Skip to content

Commit

Permalink
soc/soc_caps: update soc caps for chips that support power-down of mo…
Browse files Browse the repository at this point in the history
…dem hardware

Closes WIFI-4424
  • Loading branch information
jingli committed Mar 10, 2023
1 parent c028d12 commit f7774a0
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 59 deletions.
1 change: 1 addition & 0 deletions components/esp_hw_support/include/esp_private/esp_pmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extern "C" {
#define RTC_SLEEP_PD_DIG_PERIPH PMU_SLEEP_PD_HP_PERIPH //!< Power down DIG peripherals
#define RTC_SLEEP_PD_INT_8M PMU_SLEEP_PD_RC_FAST //!< Power down Internal 20M oscillator
#define RTC_SLEEP_PD_XTAL PMU_SLEEP_PD_XTAL //!< Power down main XTAL
#define RTC_SLEEP_PD_MODEM PMU_SLEEP_PD_MODEM //!< Power down modem(include wifi, ble and 15.4)

//These flags are not power domains, but will affect some sleep parameters
#define RTC_SLEEP_DIG_USE_8M BIT(16)
Expand Down
12 changes: 11 additions & 1 deletion components/esp_hw_support/port/esp32/rtc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@

void rtc_init(rtc_config_t cfg)
{
/**
* When run rtc_init, it maybe deep sleep reset. Since we power down modem in deep sleep, after wakeup
* from deep sleep, these fields are changed and not reset. We will access two BB regs(BBPD_CTRL and
* NRXPD_CTRL) in rtc_sleep_pu. If PD modem and no iso, CPU will stuck when access these two BB regs
* and finally triggle RTC WDT. So need to clear modem Force PD.
*
* No worry about the power consumption, Because modem Force PD will be set at the end of this function.
*/
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);

CLEAR_PERI_REG_MASK(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_PVTMON_PU | RTC_CNTL_TXRF_I2C_PU |
RTC_CNTL_RFRX_PBUS_PU | RTC_CNTL_CKGEN_I2C_PU | RTC_CNTL_PLL_I2C_PU);

Expand Down Expand Up @@ -91,7 +101,7 @@ void rtc_init(rtc_config_t cfg)
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_NOISO);
}
/* force power down wifi and bt power domain */
/* force power down modem(wifi and btdm) power domain */
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_ISO);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);

Expand Down
6 changes: 4 additions & 2 deletions components/esp_hw_support/port/esp32/rtc_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void rtc_sleep_get_default_config(uint32_t sleep_flags, rtc_sleep_config_t *out_
.rtc_fastmem_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_FAST_MEM) ? 1 : 0,
.rtc_slowmem_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_SLOW_MEM) ? 1 : 0,
.rtc_peri_pd_en = ((sleep_flags) & RTC_SLEEP_PD_RTC_PERIPH) ? 1 : 0,
.wifi_pd_en = 0,
.modem_pd_en = (sleep_flags & RTC_SLEEP_PD_MODEM) ? 1 : 0,
.int_8m_pd_en = ((sleep_flags) & RTC_SLEEP_PD_INT_8M) ? 1 : 0,
.rom_mem_pd_en = 0,
.deep_slp = ((sleep_flags) & RTC_SLEEP_PD_DIG) ? 1 : 0,
Expand Down Expand Up @@ -182,7 +182,9 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
CLEAR_PERI_REG_MASK(RTC_CNTL_PWC_REG, RTC_CNTL_PD_EN);
}

if (cfg.wifi_pd_en) {
if (cfg.modem_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_NOISO | RTC_CNTL_WIFI_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
Expand Down
10 changes: 10 additions & 0 deletions components/esp_hw_support/port/esp32c3/rtc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ static void set_rtc_dig_dbias(void);

void rtc_init(rtc_config_t cfg)
{
/**
* When run rtc_init, it maybe deep sleep reset. Since we power down modem in deep sleep, after wakeup
* from deep sleep, these fields are changed and not reset. We will access two BB regs(BBPD_CTRL and
* NRXPD_CTRL) in rtc_sleep_pu. If PD modem and no iso, CPU will stuck when access these two BB regs
* and finally triggle RTC WDT. So need to clear modem Force PD.
*
* No worry about the power consumption, Because modem Force PD will be set at the end of this function.
*/
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);

REGI2C_WRITE_MASK(I2C_DIG_REG, I2C_DIG_REG_XPD_DIG_REG, 0);
REGI2C_WRITE_MASK(I2C_DIG_REG, I2C_DIG_REG_XPD_RTC_REG, 0);

Expand Down
4 changes: 4 additions & 0 deletions components/esp_hw_support/port/esp32c3/rtc_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,15 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
rtc_sleep_pu(pu_cfg);
}
if (cfg.wifi_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_NOISO | RTC_CNTL_WIFI_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
}
if (cfg.bt_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_BT_FORCE_NOISO | RTC_CNTL_BT_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_BT_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_BT_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_BT_PD_EN);
Expand Down
10 changes: 10 additions & 0 deletions components/esp_hw_support/port/esp32s2/rtc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ static void calibrate_ocode(void);

void rtc_init(rtc_config_t cfg)
{
/**
* When run rtc_init, it maybe deep sleep reset. Since we power down modem in deep sleep, after wakeup
* from deep sleep, these fields are changed and not reset. We will access two BB regs(BBPD_CTRL and
* NRXPD_CTRL) in rtc_sleep_pu. If PD modem and no iso, CPU will stuck when access these two BB regs
* and finally triggle RTC WDT. So need to clear modem Force PD.
*
* No worry about the power consumption, Because modem Force PD will be set at the end of this function.
*/
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);

CLEAR_PERI_REG_MASK(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_PVTMON_PU);
REG_SET_FIELD(RTC_CNTL_TIMER1_REG, RTC_CNTL_PLL_BUF_WAIT, cfg.pll_wait);
REG_SET_FIELD(RTC_CNTL_TIMER1_REG, RTC_CNTL_CK8M_WAIT, cfg.ck8m_wait);
Expand Down
2 changes: 2 additions & 0 deletions components/esp_hw_support/port/esp32s2/rtc_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
}

if (cfg.wifi_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_NOISO | RTC_CNTL_WIFI_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
Expand Down
12 changes: 11 additions & 1 deletion components/esp_hw_support/port/esp32s3/rtc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ uint32_t g_rtc_dbias_pvt_non_240m = 27;

void rtc_init(rtc_config_t cfg)
{
/**
* When run rtc_init, it maybe deep sleep reset. Since we power down modem in deep sleep, after wakeup
* from deep sleep, these fields are changed and not reset. We will access two BB regs(BBPD_CTRL and
* NRXPD_CTRL) in rtc_sleep_pu. If PD modem and no iso, CPU will stuck when access these two BB regs
* and finally triggle RTC WDT. So need to clear modem Force PD.
*
* No worry about the power consumption, Because modem Force PD will be set at the end of this function.
*/
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);

REGI2C_WRITE_MASK(I2C_DIG_REG, I2C_DIG_REG_XPD_RTC_REG, 0);
REGI2C_WRITE_MASK(I2C_DIG_REG, I2C_DIG_REG_XPD_DIG_REG, 0);
CLEAR_PERI_REG_MASK(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_PVTMON_PU);
Expand Down Expand Up @@ -187,7 +197,7 @@ void rtc_init(rtc_config_t cfg)
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_NOISO);
}
/* force power down wifi and bt power domain */
/* force power down modem(wifi and ble) power domain */
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_ISO);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PD);

Expand Down
15 changes: 5 additions & 10 deletions components/esp_hw_support/port/esp32s3/rtc_sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ void rtc_sleep_get_default_config(uint32_t sleep_flags, rtc_sleep_config_t *out_
.rtc_fastmem_pd_en = (sleep_flags & RTC_SLEEP_PD_RTC_FAST_MEM) ? 1 : 0,
.rtc_slowmem_pd_en = (sleep_flags & RTC_SLEEP_PD_RTC_SLOW_MEM) ? 1 : 0,
.rtc_peri_pd_en = (sleep_flags & RTC_SLEEP_PD_RTC_PERIPH) ? 1 : 0,
.wifi_pd_en = (sleep_flags & RTC_SLEEP_PD_WIFI) ? 1 : 0,
.bt_pd_en = (sleep_flags & RTC_SLEEP_PD_BT) ? 1 : 0,
.modem_pd_en = (sleep_flags & RTC_SLEEP_PD_MODEM) ? 1 : 0,
.cpu_pd_en = (sleep_flags & RTC_SLEEP_PD_CPU) ? 1 : 0,
.int_8m_pd_en = (sleep_flags & RTC_SLEEP_PD_INT_8M) ? 1 : 0,
.dig_peri_pd_en = (sleep_flags & RTC_SLEEP_PD_DIG_PERIPH) ? 1 : 0,
Expand Down Expand Up @@ -157,34 +156,30 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
rtc_sleep_pu(pu_cfg);
}

if (cfg.wifi_pd_en) {
if (cfg.modem_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_WIFI_FORCE_NOISO | RTC_CNTL_WIFI_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_WIFI_PD_EN);
}
if (cfg.bt_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_BT_FORCE_NOISO | RTC_CNTL_BT_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_BT_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_BT_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_BT_PD_EN);
}

if (cfg.cpu_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_CPU_TOP_FORCE_NOISO | RTC_CNTL_CPU_TOP_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_CPU_TOP_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_CPU_TOP_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_CPU_TOP_PD_EN);
}

if (cfg.dig_peri_pd_en) {
REG_CLR_BIT(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PERI_FORCE_NOISO | RTC_CNTL_DG_PERI_FORCE_ISO);
REG_CLR_BIT(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_PERI_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_PERI_PD_EN);
} else {
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_PWC_REG, RTC_CNTL_DG_PERI_PD_EN);
}

if (cfg.rtc_peri_pd_en) {
REG_CLR_BIT(RTC_CNTL_PWC_REG, RTC_CNTL_FORCE_NOISO | RTC_CNTL_FORCE_ISO | RTC_CNTL_FORCE_PU);
SET_PERI_REG_MASK(RTC_CNTL_PWC_REG, RTC_CNTL_PD_EN);
Expand Down
16 changes: 10 additions & 6 deletions components/esp_hw_support/sleep_modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,18 +692,22 @@ void IRAM_ATTR esp_deep_sleep_start(void)
uint32_t force_pd_flags = RTC_SLEEP_PD_DIG | RTC_SLEEP_PD_VDDSDIO | RTC_SLEEP_PD_INT_8M | RTC_SLEEP_PD_XTAL;
#endif



/**
* If all wireless modules share one power domain, we name this power domain "modem".
* If wireless modules have their own power domain, we give these power domains separate
* names.
*/
#if SOC_PM_SUPPORT_MODEM_PD
force_pd_flags |= PMU_SLEEP_PD_MODEM;
#else // !SOC_PM_SUPPORT_MODEM_PD
force_pd_flags |= RTC_SLEEP_PD_MODEM;
#endif

#if SOC_PM_SUPPORT_WIFI_PD
force_pd_flags |= RTC_SLEEP_PD_WIFI;
#endif

#if SOC_PM_SUPPORT_BT_PD
force_pd_flags |= RTC_SLEEP_PD_BT;
#endif
#endif // !SOC_PM_SUPPORT_MODEM_PD

// Enter sleep
esp_sleep_start(force_pd_flags | pd_flags, ESP_SLEEP_MODE_DEEP_SLEEP);
Expand Down Expand Up @@ -1621,7 +1625,7 @@ static uint32_t get_power_down_flags(void)

#if SOC_PM_SUPPORT_MODEM_PD
if (s_config.domain[ESP_PD_DOMAIN_MODEM].pd_option != ESP_PD_OPTION_ON) {
pd_flags |= PMU_SLEEP_PD_MODEM;
pd_flags |= RTC_SLEEP_PD_MODEM;
}
#endif

Expand Down
4 changes: 4 additions & 0 deletions components/soc/esp32/include/soc/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,10 @@ config SOC_PM_SUPPORT_VDDSDIO_PD
bool
default y

config SOC_PM_SUPPORT_MODEM_PD
bool
default y

config SOC_CONFIGURABLE_VDDSDIO_SUPPORTED
bool
default y
Expand Down
7 changes: 4 additions & 3 deletions components/soc/esp32/include/soc/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ typedef struct rtc_sleep_config_s {
uint32_t rtc_fastmem_pd_en : 1; //!< power down RTC fast memory
uint32_t rtc_slowmem_pd_en : 1; //!< power down RTC slow memory
uint32_t rtc_peri_pd_en : 1; //!< power down RTC peripherals
uint32_t wifi_pd_en : 1; //!< power down WiFi
uint32_t modem_pd_en : 1; //!< power down Modem(wifi and btdm)
uint32_t int_8m_pd_en : 1; //!< Power down Internal 8M oscillator
uint32_t rom_mem_pd_en : 1; //!< power down main RAM and ROM
uint32_t deep_slp : 1; //!< power down digital domain
Expand All @@ -516,8 +516,9 @@ typedef struct rtc_sleep_config_s {
#define RTC_SLEEP_PD_RTC_FAST_MEM BIT(3) //!< Power down RTC FAST memory
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
#define RTC_SLEEP_PD_XTAL BIT(6) //!< Power down main XTAL
#define RTC_SLEEP_PD_INT_8M BIT(7) //!< Power down Internal 8M oscillator
#define RTC_SLEEP_PD_MODEM BIT(6) //!< Power down Modem(wifi and btdm)
#define RTC_SLEEP_PD_XTAL BIT(7) //!< Power down main XTAL
#define RTC_SLEEP_PD_INT_8M BIT(8) //!< Power down Internal 8M oscillator

//These flags are not power domains, but will affect some sleep parameters
#define RTC_SLEEP_DIG_USE_8M BIT(16)
Expand Down
1 change: 1 addition & 0 deletions components/soc/esp32/include/soc/soc_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@
#define SOC_PM_SUPPORT_RTC_SLOW_MEM_PD (1)
#define SOC_PM_SUPPORT_RC_FAST_PD (1)
#define SOC_PM_SUPPORT_VDDSDIO_PD (1)
#define SOC_PM_SUPPORT_MODEM_PD (1) /*!<Modem here includes wifi and btdm */

#define SOC_CONFIGURABLE_VDDSDIO_SUPPORTED (1)

Expand Down
12 changes: 0 additions & 12 deletions components/soc/esp32c2/include/soc/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -607,18 +607,6 @@ config SOC_PM_SUPPORT_BT_WAKEUP
bool
default y

config SOC_PM_SUPPORT_CPU_PD
bool
default n

config SOC_PM_SUPPORT_WIFI_PD
bool
default n

config SOC_PM_SUPPORT_BT_PD
bool
default n

config SOC_PM_SUPPORT_RC_FAST_PD
bool
default y
Expand Down
3 changes: 0 additions & 3 deletions components/soc/esp32c2/include/soc/soc_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@
/*-------------------------- Power Management CAPS ----------------------------*/
#define SOC_PM_SUPPORT_WIFI_WAKEUP (1)
#define SOC_PM_SUPPORT_BT_WAKEUP (1)
#define SOC_PM_SUPPORT_CPU_PD (0)
#define SOC_PM_SUPPORT_WIFI_PD (0)
#define SOC_PM_SUPPORT_BT_PD (0)
#define SOC_PM_SUPPORT_RC_FAST_PD (1)
#define SOC_PM_SUPPORT_VDDSDIO_PD (1)

Expand Down
4 changes: 0 additions & 4 deletions components/soc/esp32h2/include/soc/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -1011,10 +1011,6 @@ config SOC_PM_SUPPORT_CPU_PD
bool
default y

config SOC_PM_SUPPORT_WIFI_PD
bool
default y

config SOC_PM_SUPPORT_BT_PD
bool
default y
Expand Down
1 change: 0 additions & 1 deletion components/soc/esp32h2/include/soc/soc_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@
#define SOC_PM_SUPPORT_WIFI_WAKEUP (1)
#define SOC_PM_SUPPORT_BT_WAKEUP (1)
#define SOC_PM_SUPPORT_CPU_PD (1)
#define SOC_PM_SUPPORT_WIFI_PD (1)
#define SOC_PM_SUPPORT_BT_PD (1)
#define SOC_PM_SUPPORT_RC_FAST_PD (1)
#define SOC_PM_SUPPORT_VDDSDIO_PD (1)
Expand Down
6 changes: 3 additions & 3 deletions components/soc/esp32s2/include/soc/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -971,15 +971,15 @@ config SOC_PM_SUPPORT_WIFI_WAKEUP
bool
default y

config SOC_PM_SUPPORT_WIFI_PD
config SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP
bool
default y

config SOC_PM_SUPPORT_RTC_PERIPH_PD
config SOC_PM_SUPPORT_WIFI_PD
bool
default y

config SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP
config SOC_PM_SUPPORT_RTC_PERIPH_PD
bool
default y

Expand Down
4 changes: 2 additions & 2 deletions components/soc/esp32s2/include/soc/soc_caps.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@
#define SOC_PM_SUPPORT_EXT0_WAKEUP (1)
#define SOC_PM_SUPPORT_EXT1_WAKEUP (1)
#define SOC_PM_SUPPORT_EXT_WAKEUP (1) /*!<Compatible to the old version of IDF */

#define SOC_PM_SUPPORT_WIFI_WAKEUP (1)
#define SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP (1) /*!<Supports waking up from touch pad trigger */

#define SOC_PM_SUPPORT_WIFI_PD (1)
#define SOC_PM_SUPPORT_RTC_PERIPH_PD (1)
#define SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP (1) /*!<Supports waking up from touch pad trigger */
#define SOC_PM_SUPPORT_RTC_FAST_MEM_PD (1)
#define SOC_PM_SUPPORT_RTC_SLOW_MEM_PD (1)
#define SOC_PM_SUPPORT_RC_FAST_PD (1)
Expand Down
4 changes: 4 additions & 0 deletions components/soc/esp32s3/include/soc/Kconfig.soc_caps.in
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,10 @@ config SOC_PM_SUPPORT_MAC_BB_PD
bool
default y

config SOC_PM_SUPPORT_MODEM_PD
bool
default y

config SOC_CONFIGURABLE_VDDSDIO_SUPPORTED
bool
default y
Expand Down
6 changes: 2 additions & 4 deletions components/soc/esp32s3/include/soc/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,7 @@ typedef struct {
uint32_t rtc_fastmem_pd_en : 1; //!< power down RTC fast memory
uint32_t rtc_slowmem_pd_en : 1; //!< power down RTC slow memory
uint32_t rtc_peri_pd_en : 1; //!< power down RTC peripherals
uint32_t wifi_pd_en : 1; //!< power down WiFi
uint32_t bt_pd_en : 1; //!< power down BT
uint32_t modem_pd_en : 1; //!< power down Modem(wifi and ble)
uint32_t cpu_pd_en : 1; //!< power down CPU, but not restart when lightsleep.
uint32_t int_8m_pd_en : 1; //!< Power down Internal 8M oscillator
uint32_t dig_peri_pd_en : 1; //!< power down digital peripherals
Expand All @@ -618,8 +617,7 @@ typedef struct {
#define RTC_SLEEP_PD_RTC_FAST_MEM BIT(3) //!< Power down RTC FAST memory
#define RTC_SLEEP_PD_RTC_MEM_FOLLOW_CPU BIT(4) //!< RTC FAST and SLOW memories are automatically powered up and down along with the CPU
#define RTC_SLEEP_PD_VDDSDIO BIT(5) //!< Power down VDDSDIO regulator
#define RTC_SLEEP_PD_WIFI BIT(6) //!< Power down WIFI
#define RTC_SLEEP_PD_BT BIT(7) //!< Power down BT
#define RTC_SLEEP_PD_MODEM BIT(6) //!< Power down Modem(wifi and ble)
#define RTC_SLEEP_PD_CPU BIT(8) //!< Power down CPU when in lightsleep, but not restart
#define RTC_SLEEP_PD_DIG_PERIPH BIT(9) //!< Power down DIG peripherals
#define RTC_SLEEP_PD_INT_8M BIT(10) //!< Power down Internal 8M oscillator
Expand Down
6 changes: 0 additions & 6 deletions components/soc/esp32s3/include/soc/rtc_cntl_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1796,12 +1796,6 @@ ork.*/
#define RTC_CNTL_DG_PERI_PD_EN_M (BIT(28))
#define RTC_CNTL_DG_PERI_PD_EN_V 0x1
#define RTC_CNTL_DG_PERI_PD_EN_S 28
/* RTC_CNTL_BT_PD_EN : R/W ;bitpos:[27] ;default: 0 ; */
/*description: enable power down internal SRAM 2 in sleep.*/
#define RTC_CNTL_BT_PD_EN (BIT(27))
#define RTC_CNTL_BT_PD_EN_M (BIT(27))
#define RTC_CNTL_BT_PD_EN_V 0x1
#define RTC_CNTL_BT_PD_EN_S 27
/* RTC_CNTL_CPU_TOP_FORCE_PU : R/W ;bitpos:[22] ;default: 1'd1 ; */
/*description: digital dcdc force power up.*/
#define RTC_CNTL_CPU_TOP_FORCE_PU (BIT(22))
Expand Down
Loading

0 comments on commit f7774a0

Please sign in to comment.