diff --git a/components/esp_hw_support/include/esp_sleep.h b/components/esp_hw_support/include/esp_sleep.h index 679c360baa..6db629f75f 100644 --- a/components/esp_hw_support/include/esp_sleep.h +++ b/components/esp_hw_support/include/esp_sleep.h @@ -40,10 +40,10 @@ typedef enum { #if SOC_PM_SUPPORT_RTC_PERIPH_PD ESP_PD_DOMAIN_RTC_PERIPH, //!< RTC IO, sensors and ULP co-processor #endif -#if SOC_RTC_SLOW_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD ESP_PD_DOMAIN_RTC_SLOW_MEM, //!< RTC slow memory #endif -#if SOC_RTC_FAST_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory #endif ESP_PD_DOMAIN_XTAL, //!< XTAL oscillator diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 0ab58bfd02..0afac30632 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -156,10 +156,10 @@ static sleep_config_t s_config = { #if SOC_PM_SUPPORT_RTC_PERIPH_PD ESP_PD_OPTION_AUTO, #endif -#if SOC_RTC_SLOW_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD ESP_PD_OPTION_AUTO, #endif -#if SOC_RTC_FAST_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD ESP_PD_OPTION_AUTO, #endif ESP_PD_OPTION_AUTO, @@ -1247,7 +1247,7 @@ static uint32_t get_power_down_flags(void) // If there is any data placed into .rtc.data or .rtc.bss segments, and // RTC_SLOW_MEM is Auto, keep it powered up as well. -#if SOC_RTC_SLOW_MEM_SUPPORTED && SOC_ULP_SUPPORTED +#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD && SOC_ULP_SUPPORTED // Labels are defined in the linker script extern int _rtc_slow_length; /** @@ -1262,7 +1262,7 @@ static uint32_t get_power_down_flags(void) } #endif -#if SOC_RTC_FAST_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD #if !CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP /* RTC_FAST_MEM is needed for deep sleep stub. If RTC_FAST_MEM is Auto, keep it powered on, so that deep sleep stub can run. @@ -1318,21 +1318,21 @@ static uint32_t get_power_down_flags(void) #if SOC_PM_SUPPORT_RTC_PERIPH_PD ESP_EARLY_LOGD(TAG, "RTC_PERIPH: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_PERIPH]]); #endif -#if SOC_RTC_SLOW_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD ESP_EARLY_LOGD(TAG, "RTC_SLOW_MEM: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM]]); #endif -#if SOC_RTC_FAST_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD ESP_EARLY_LOGD(TAG, "RTC_FAST_MEM: %s", option_str[s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM]]); #endif // Prepare flags based on the selected options uint32_t pd_flags = 0; -#if SOC_RTC_FAST_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD if (s_config.pd_options[ESP_PD_DOMAIN_RTC_FAST_MEM] != ESP_PD_OPTION_ON) { pd_flags |= RTC_SLEEP_PD_RTC_FAST_MEM; } #endif -#if SOC_RTC_SLOW_MEM_SUPPORTED +#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD if (s_config.pd_options[ESP_PD_DOMAIN_RTC_SLOW_MEM] != ESP_PD_OPTION_ON) { pd_flags |= RTC_SLEEP_PD_RTC_SLOW_MEM; } diff --git a/components/soc/esp32/include/soc/Kconfig.soc_caps.in b/components/soc/esp32/include/soc/Kconfig.soc_caps.in index 4a395ae568..2a65146523 100644 --- a/components/soc/esp32/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32/include/soc/Kconfig.soc_caps.in @@ -647,6 +647,14 @@ config SOC_PM_SUPPORT_RTC_PERIPH_PD bool default y +config SOC_PM_SUPPORT_RTC_FAST_MEM_PD + bool + default y + +config SOC_PM_SUPPORT_RTC_SLOW_MEM_PD + bool + default y + config SOC_SDMMC_USE_IOMUX bool default y diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index 56d0a4c925..abbbf6a192 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -349,9 +349,11 @@ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) /*-------------------------- Power Management CAPS ---------------------------*/ -#define SOC_PM_SUPPORT_EXT_WAKEUP (1) +#define SOC_PM_SUPPORT_EXT_WAKEUP (1) #define SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP (1) /*!