boards/xtensa/esp32[-s2|-s3]: Refactor PM board layer

Refactor PM board layer for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
This commit is contained in:
Eren Terzioglu
2025-11-14 12:16:54 +01:00
committed by Xiang Xiao
parent 6b53141c9e
commit 1dcbb7c519
4 changed files with 81 additions and 189 deletions
@@ -180,6 +180,7 @@ SECTIONS
*libarch.a:*rtc_init.*(.text .text.* .literal .literal.*)
*libarch.a:*rtc_sleep.*(.text .text.* .literal .literal.*)
*libarch.a:*rtc_time.*(.text .text.* .literal .literal.*)
*libarch.a:*sleep_modes.*(.text .text.* .literal .literal.*)
*libarch.a:*regi2c_ctrl.*(.text .text.* .literal .literal.*)
*libarch.a:*uart_hal_iram.*(.text .text.* .literal .literal.*)
*libarch.a:*wdt_hal_iram.*(.text .text.* .literal .literal.*)
@@ -354,6 +355,7 @@ SECTIONS
*libarch.a:*rtc_clk_init.*(.rodata .rodata.*)
*libarch.a:*rtc_sleep.*(.rodata .rodata.*)
*libarch.a:*rtc_time.*(.rodata .rodata.*)
*libarch.a:*sleep_modes.*(.rodata .rodata.*)
*libarch.a:*regi2c_ctrl.*(.rodata .rodata.*)
*libarch.a:*uart_hal_iram.*(.rodata .rodata.*)
*libarch.a:*wdt_hal_iram.*(.rodata .rodata.*)
@@ -606,6 +608,7 @@ SECTIONS
{
. = ALIGN(4);
*(.rtc.literal .rtc.text)
*(.rtc.literal* .rtc.text*)
} >rtc_iram_seg AT>ROM
.rtc.dummy (NOLOAD) :
@@ -622,11 +625,13 @@ SECTIONS
.rtc.bss (NOLOAD) :
{
*(.rtc.bss)
*(.rtc.bss*)
} >rtc_slow_seg
.rtc.data :
{
. = ALIGN(4);
_rtc_data_start = ABSOLUTE(.);
*(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata)
@@ -638,6 +643,17 @@ SECTIONS
_srtcheap = ABSOLUTE(.);
} >rtc_slow_seg AT>ROM
.rtc.force_slow :
{
. = ALIGN(4);
*(.rtc.force_slow .rtc.force_slow.*)
. = ALIGN(4);
_rtc_force_slow_end = ABSOLUTE(.);
} >rtc_slow_seg AT>ROM
/* Get size of rtc slow data */
_rtc_slow_length = (_rtc_force_slow_end - _rtc_data_start);
/* This section holds RTC data that should have fixed addresses.
* The data are not initialized at power-up and are retained during deep sleep.
*/
@@ -0,0 +1,45 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_ARCH_LEDS is not set
# CONFIG_NSH_ARGCAT is not set
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
CONFIG_ARCH="xtensa"
CONFIG_ARCH_BOARD="esp32s2-saola-1"
CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_ESP32S2_SAOLA_1=y
CONFIG_ARCH_CHIP="esp32s2"
CONFIG_ARCH_CHIP_ESP32S2=y
CONFIG_ARCH_CHIP_ESP32S2WROVER=y
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_XTENSA=y
CONFIG_BOARD_LOOPSPERMSEC=16717
CONFIG_BUILTIN=y
CONFIG_ESP32S2_UART0=y
CONFIG_FS_PROCFS=y
CONFIG_FS_PROCFS_REGISTER=y
CONFIG_IDLETHREAD_STACKSIZE=3072
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INIT_STACKSIZE=3072
CONFIG_INTELHEX_BINARY=y
CONFIG_LINE_MAX=64
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PM=y
CONFIG_PM_GOVERNOR_EXPLICIT_RELAX=-1
CONFIG_PM_GOVERNOR_GREEDY=y
CONFIG_PM_PROCFS=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAM_SIZE=114688
CONFIG_RAM_START=0x20000000
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_WAITPID=y
CONFIG_SYSLOG_BUFFER=y
CONFIG_SYSTEM_NSH=y
CONFIG_UART0_SERIAL_CONSOLE=y
-189
View File
@@ -78,195 +78,6 @@ config ESP32S3_SPIFLASH_LITTLEFS
endchoice # ESP32S3_SPIFLASH_FS
if PM
config PM_EXT1_WAKEUP
bool "PM EXT1 Wakeup"
default n
---help---
Enable EXT1 wakeup functionality.
This allows the system to wake up from PM_STANDBY or PM_SLEEP
when a GPIO pin configured as an EXT1 wakeup source is triggered.
if PM_EXT1_WAKEUP
menu "PM EXT1 Wakeup Sources"
config PM_EXT1_WAKEUP_RTC_GPIO0
bool "RTC_GPIO0"
default n
---help---
Enable RTC GPIO0 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO1
bool "RTC_GPIO1"
default n
---help---
Enable RTC GPIO1 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO2
bool "RTC_GPIO2"
default n
---help---
Enable RTC GPIO2 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO3
bool "RTC_GPIO3"
default n
---help---
Enable RTC GPIO3 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO4
bool "RTC_GPIO4"
default n
---help---
Enable RTC GPIO4 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO5
bool "RTC_GPIO5"
default n
---help---
Enable RTC GPIO5 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO6
bool "RTC_GPIO6"
default n
---help---
Enable RTC GPIO6 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO7
bool "RTC_GPIO7"
default n
---help---
Enable RTC GPIO7 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO8
bool "RTC_GPIO8"
default n
---help---
Enable RTC GPIO8 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO9
bool "RTC_GPIO9"
default n
---help---
Enable RTC GPIO9 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO10
bool "RTC_GPIO10"
default n
---help---
Enable RTC GPIO10 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO11
bool "RTC_GPIO11"
default n
---help---
Enable RTC GPIO11 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO12
bool "RTC_GPIO12"
default n
---help---
Enable RTC GPIO12 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO13
bool "RTC_GPIO13"
default n
---help---
Enable RTC GPIO13 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO14
bool "RTC_GPIO14"
default n
---help---
Enable RTC GPIO14 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO15
bool "RTC_GPIO15"
default n
---help---
Enable RTC GPIO15 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO16
bool "RTC_GPIO16"
default n
---help---
Enable RTC GPIO16 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO17
bool "RTC_GPIO17"
default n
---help---
Enable RTC GPIO17 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO18
bool "RTC_GPIO18"
default n
---help---
Enable RTC GPIO18 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO19
bool "RTC_GPIO19"
default n
---help---
Enable RTC GPIO19 as an EXT1 wakeup source.
config PM_EXT1_WAKEUP_RTC_GPIO20
bool "RTC_GPIO20"
default n
---help---
Enable RTC GPIO20 as an EXT1 wakeup source.
endmenu # PM_EXT1_WAKEUP_SOURCES
config PM_EXT1_WAKEUP_TRIGGER_MODE
int "PM EXT1 Wakeup Trigger Mode"
range 0 1
default 0
---help---
Select EXT1 wakeup mode:
0 = Wakeup when any selected GPIO is LOW
1 = Wakeup when any selected GPIO is HIGH
endif # PM_EXT1_WAKEUP
config PM_ULP_WAKEUP
bool "PM ULP Wakeup"
default n
---help---
Enable ULP RISC-V coprocessor wakeup functionality.
This allows the system to wake up from PM_STANDBY or PM_SLEEP
when ULP app triggers HP core to wakeup with "ulp_riscv_wakeup_main_processor"
call on ULP app.
config PM_ALARM_SEC
int "PM_STANDBY delay (seconds)"
default 15
---help---
Number of seconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_ALARM_NSEC
int "PM_STANDBY delay (nanoseconds)"
default 0
---help---
Number of additional nanoseconds to wait in PM_STANDBY before going to PM_STANDBY mode.
config PM_SLEEP_WAKEUP_SEC
int "PM_SLEEP delay (seconds)"
default 20
---help---
Number of seconds to wait in PM_SLEEP.
config PM_SLEEP_WAKEUP_NSEC
int "PM_SLEEP delay (nanoseconds)"
default 0
---help---
Number of additional nanoseconds to wait in PM_SLEEP.
endif # PM
config ESP32S3_BOARD_I2C
bool
default y if ESP32S3_I2C0 || ESP32S3_I2C1
@@ -291,6 +291,7 @@ SECTIONS
*libarch.a:*log_write.*(.literal.esp_log_writev .text.esp_log_writev)
*libarch.a:*cpu_region_protect.*(.text .text.* .literal .literal.*)
*libarch.a:*mspi_timing_tuning.*(.text .text.* .literal .literal.*)
*libarch.a:*mspi_timing_config.*(.text .text.* .literal .literal.*)
*libarch.a:*esp_rom_cache_esp32s2_esp32s3.*(.literal .text .literal.* .text.*)
*libarch.a:*flash_qio_mode.*(.text .text.* .literal .literal.*)
*libarch.a:*spi_flash_wrap.*(.text .text.* .literal .literal.*)
@@ -500,6 +501,7 @@ SECTIONS
*libarch.a:*log_noos.*(.rodata .rodata.*)
*libarch.a:*cpu_region_protect.*(.rodata .rodata.*)
*libarch.a:*mspi_timing_tuning.*(.rodata .rodata.*)
*libarch.a:*mspi_timing_config.*(.rodata .rodata.*)
#ifdef CONFIG_ESP32S3_SPIRAM_MODE_QUAD
*libarch.a:esp32s3_psram_quad.*(.rodata .rodata.*)
#endif
@@ -763,7 +765,10 @@ SECTIONS
.rtc.text :
{
. = ALIGN(4);
_rtc_fast_start = ABSOLUTE(.);
_rtc_text_start = ABSOLUTE(.);
*(.rtc.literal .rtc.text)
_rtc_text_end = ABSOLUTE(.);
} >rtc_iram_seg AT>ROM
.rtc.dummy (NOLOAD) :
@@ -782,6 +787,21 @@ SECTIONS
*(.rtc.bss)
} >rtc_slow_seg
/* This section located in RTC FAST Memory area.
* It holds data marked with RTC_FAST_ATTR attribute.
* See the file "esp_attr.h" for more information.
*/
.rtc.force_fast :
{
. = ALIGN(4);
_rtc_force_fast_start = ABSOLUTE(.);
*(.rtc.force_fast .rtc.force_fast.*)
. = ALIGN(4);
_rtc_force_fast_end = ABSOLUTE(.);
} >rtc_slow_seg AT>ROM
.rtc.data :
{
*(.rtc.data)