diff --git a/components/esp_hw_support/include/esp_sleep.h b/components/esp_hw_support/include/esp_sleep.h index 5039def888..7909cf443d 100644 --- a/components/esp_hw_support/include/esp_sleep.h +++ b/components/esp_hw_support/include/esp_sleep.h @@ -47,6 +47,15 @@ typedef enum { ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory #endif ESP_PD_DOMAIN_XTAL, //!< XTAL oscillator +#if SOC_PM_SUPPORT_XTAL32K_PD + ESP_PD_DOMAIN_XTAL32K, +#endif +#if SOC_PM_SUPPORT_RC32K_PD + ESP_PD_DOMAIN_RC32K, +#endif +#if SOC_PM_SUPPORT_FOSC_PD + ESP_PD_DOMAIN_FOSC, +#endif #if SOC_PM_SUPPORT_CPU_PD ESP_PD_DOMAIN_CPU, //!< CPU core #endif diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 2fa03c233c..844d446698 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -164,22 +164,7 @@ typedef struct { _Static_assert(22 >= SOC_RTCIO_PIN_COUNT, "Chip has more RTCIOs than 22, should increase ext1_rtc_gpio_mask field size"); static sleep_config_t s_config = { - .pd_options = { -#if SOC_PM_SUPPORT_RTC_PERIPH_PD - ESP_PD_OPTION_AUTO, -#endif -#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD - ESP_PD_OPTION_AUTO, -#endif -#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD - ESP_PD_OPTION_AUTO, -#endif - ESP_PD_OPTION_AUTO, -#if SOC_PM_SUPPORT_CPU_PD - ESP_PD_OPTION_AUTO, -#endif - ESP_PD_OPTION_AUTO, ESP_PD_OPTION_AUTO - }, + .pd_options = {[0 ... ESP_PD_DOMAIN_MAX - 1] = ESP_PD_OPTION_AUTO,}, .ccount_ticks_record = 0, .sleep_time_overhead_out = DEFAULT_SLEEP_OUT_OVERHEAD_US, .wakeup_triggers = 0 diff --git a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in index 76f8a7dbf5..b72fbf6aa7 100644 --- a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in @@ -915,10 +915,26 @@ config SOC_PM_SUPPORT_BT_PD bool default y +config SOC_PM_SUPPORT_XTAL32K_PD + bool + default y + +config SOC_PM_SUPPORT_RC32K_PD + bool + default y + +config SOC_PM_SUPPORT_FOSC_PD + bool + default y + config SOC_CLK_RC_FAST_SUPPORT_CALIBRATION bool default y +config SOC_MODEM_CLOCK_IS_INDEPENDENT + bool + default y + config SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC bool default y diff --git a/components/soc/esp32c6/include/soc/soc_caps.h b/components/soc/esp32c6/include/soc/soc_caps.h index 13bc0f22e2..b30dd8dfdb 100644 --- a/components/soc/esp32c6/include/soc/soc_caps.h +++ b/components/soc/esp32c6/include/soc/soc_caps.h @@ -428,8 +428,15 @@ #define SOC_PM_SUPPORT_BT_PD (1) +#define SOC_PM_SUPPORT_XTAL32K_PD (1) + +#define SOC_PM_SUPPORT_RC32K_PD (1) + +#define SOC_PM_SUPPORT_FOSC_PD (1) + /*-------------------------- CLOCK SUBSYSTEM CAPS ----------------------------------------*/ #define SOC_CLK_RC_FAST_SUPPORT_CALIBRATION (1) +#define SOC_MODEM_CLOCK_IS_INDEPENDENT (1) /*-------------------------- Temperature Sensor CAPS -------------------------------------*/ #define SOC_TEMPERATURE_SENSOR_SUPPORT_FAST_RC (1)