esp-idf/components/esp_hw_support/port/esp32s3
Michael (XIAO Xufeng) 2905cbbe03 pm: fixed RTC8M domain power issues
introduced in e44ead5356

1. The int8M power domain config by default is PD. While LEDC is using
RTC8M as clock source, this power domain will be kept on.

But when 8MD256 is used as RTC clock source, the power domain should
also be kept on.

On ESP32, there was protection for it, but broken by commit
e44ead5356. Currently the power domain
will be forced on when LEDC is using RTC8M as clock source &&
!int8m_pd_en (user enable ESP_PDP_DOMAIN_RTC8M in lightsleep). Otherwise
the power domain will be powered off, regardless of RTC clock source.

In other words, int8M domain will be forced off (even when 8MD256
used as RTC clock source) if LEDC not using RTC8M as clock source, user
doesn't enable ESP_PDP_DOMAIN_RTC8M, or in deep sleep.

On later chips, there's no such protection, so 8MD256 could't be used as
RTC clock source in sleep modes.

This commit adds protection of 8MD256 clock to other chips. Fixes the
incorrect protection logic overriding on ESP32. Now the power domain
will be determiend by the logic below (order by priority):

    1. When RTC clock source uses 8MD256, power up
    2. When LEDC uses RTC8M clock source, power up
    3. In deepsleep, power down
    4. Otherwise determined by user config of ESP_PDP_DOMAIN_RTC8M,
       power down by default. (This is preferred to have highest
       priority, but it's kept as is because of current code structure.)

2. Before, after the macro `RTC_SLEEP_CONFIG_DEFAULT` decides dbias, the
protection above may force the int8m PU. This may cause the inconsistent
of dbias and the int8m PU status.

This commit lifts the logic of pd int8m/xtal fpu logic to upper layer
(sleep_modes.c).

Related: https://github.com/espressif/esp-idf/issues/8007, https://github.com/espressif/esp-idf/pull/8089

temp
2022-05-11 11:30:47 +08:00
..
private_include hw_support: fixed regi2c not protected by lock on ESP32S2 2022-03-13 00:24:08 +08:00
chip_info.c esp_hw_support: update copyright notice 4 2021-08-10 13:31:53 +02:00
CMakeLists.txt psram: support .bss on psram on esp32s3 2022-04-19 19:48:00 +08:00
dport_access.c esp32s2, esp32s3: update copyright notice 2021-08-05 15:01:26 +02:00
esp_crypto_lock.c Digital Signature support for S3 2021-09-02 11:59:24 +05:30
esp_ds.c global: make periph enable/disable APIs private 2021-11-08 10:37:47 +08:00
esp_hmac.c global: make periph enable/disable APIs private 2021-11-08 10:37:47 +08:00
esp_memprot.c System/Security: Memprot API unified (ESP32C3) 2021-12-21 01:50:36 +01:00
Kconfig.mac esp32: move mac target specific configs 2021-03-31 19:17:33 +08:00
Kconfig.rtc soc: moved kconfig options out of the target component. 2022-04-21 12:09:43 +08:00
opiram_psram.c psram: support .bss on psram on esp32s3 2022-04-19 19:48:00 +08:00
rtc_clk_common.h esp_hw_support: update copyright notice 4 2021-08-10 13:31:53 +02:00
rtc_clk_init.c clk_tree: prework of introducing clk subsystem control 2022-04-11 12:09:06 +08:00
rtc_clk.c pm: fixed RTC8M domain power issues 2022-05-11 11:30:47 +08:00
rtc_init.c hw_support: fixed regi2c not protected by lock on ESP32S2 2022-03-13 00:24:08 +08:00
rtc_pm.c rename APB_CTRL ro SYS_CON 2021-09-16 20:57:57 +08:00
rtc_sleep.c pm: fixed RTC8M domain power issues 2022-05-11 11:30:47 +08:00
rtc_time.c reduce bootup time when using usb-serial-jtag 2021-11-29 17:21:11 +08:00
spiram_psram.c psram: support .bss on psram on esp32s3 2022-04-19 19:48:00 +08:00
spiram_psram.h psram: support .bss on psram on esp32s3 2022-04-19 19:48:00 +08:00
spiram.c psram: support .bss on psram on esp32s3 2022-04-19 19:48:00 +08:00