esp-idf/components/esp_hw_support/port/esp32s2
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
async_memcpy_impl_cp_dma.c esp_hw_support: update copyright notice 4 2021-08-10 13:31:53 +02:00
chip_info.c soc: Adds efuse hal 2022-02-24 22:20:09 +08: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 esp32s2, esp32s3: update copyright notice 2021-08-05 15:01:26 +02:00
esp_ds.c esp32s2, esp32s3: update copyright notice 2021-08-05 15:01:26 +02:00
esp_hmac.c esp32s2/hmac: Release HMAC lock in downstream mode incase of failure 2021-09-06 11:21:39 +05:30
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
memprot.c esp_rom: extract int matrix route and cpu ticks getter 2022-02-09 13:52:20 +08:00
mmu_psram.c cache/mmu: implememnt cache and mmu hal APIs in bootloader 2022-03-11 22:43:11 +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 esp_hw_support/esp_system: Re-evaluate header inclusions and include directories 2022-03-07 11:18:08 +05:30
rtc_clk.c pm: fixed RTC8M domain power issues 2022-05-11 11:30:47 +08:00
rtc_init.c touch: fix the touch sensor wait cycle on s3 2022-03-08 09:11:14 +00: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