From 7912f9fafef4c90a2a644332c46af7fd5e91f148 Mon Sep 17 00:00:00 2001 From: Li Shuai Date: Wed, 4 Jun 2025 21:03:02 +0800 Subject: [PATCH] change(esp_hw_support): force top domain power up during sleep --- components/esp_hw_support/sleep_modes.c | 5 +++++ components/soc/esp32c5/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c5/include/soc/soc_caps.h | 1 + 3 files changed, 10 insertions(+) diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index b15ef9cd40..35fa4292de 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -2441,6 +2441,11 @@ FORCE_INLINE_ATTR bool top_domain_pd_allowed(void) { #if SOC_XTAL_CLOCK_PATH_DEPENDS_ON_TOP_DOMAIN top_pd_allowed &= (s_config.domain[ESP_PD_DOMAIN_XTAL].pd_option != ESP_PD_OPTION_ON); #endif +#if SOC_PM_TOP_PD_NOT_ALLOWED + // TODO: PM-436, Need to use efuse_hal_chip_revision() to determine whether + // the TOP domain power-down is allowed + top_pd_allowed = false; +#endif return top_pd_allowed; } diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index e4a9a8103c..8d4f1df11e 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -1631,6 +1631,10 @@ config SOC_EXT_MEM_CACHE_TAG_IN_CPU_DOMAIN bool default y +config SOC_PM_TOP_PD_NOT_ALLOWED + bool + default y + config SOC_PM_PAU_LINK_NUM int default 5 diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index abe48b81c6..e10357be40 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -640,6 +640,7 @@ #define SOC_PM_CPU_RETENTION_BY_SW (1) #define SOC_PM_MODEM_RETENTION_BY_REGDMA (1) #define SOC_EXT_MEM_CACHE_TAG_IN_CPU_DOMAIN (1) +#define SOC_PM_TOP_PD_NOT_ALLOWED (1) #define SOC_PM_PAU_LINK_NUM (5) #define SOC_PM_PAU_REGDMA_LINK_CONFIGURABLE (1)