esp-idf/components/soc/esp32
Michael (XIAO Xufeng) 17b9cc6b4a 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-12 15:57:09 +08:00
..
include/soc pm: fixed RTC8M domain power issues 2022-05-12 15:57:09 +08:00
ld soc: move peripheral linker scripts out of target component 2021-07-22 12:55:01 +08:00
adc_periph.c soc: descriptive part occupy whole component 2020-10-28 07:21:29 +08:00
CMakeLists.txt lcd: support i80 LCD on esp32/s2/s3 2021-08-10 21:06:59 +08:00
dac_periph.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
gpio_periph.c Enable IO20 on ESP32 2021-08-20 14:05:38 +08:00
i2c_periph.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
i2s_periph.c driver/i2s: refactor for i2s driver layer 2021-09-02 14:33:36 +08:00
interrupts.c soc: descriptive part occupy whole component 2020-10-28 07:21:29 +08:00
lcd_periph.c i80_lcd: support I2S1 LCD mode for esp32 2022-04-19 13:01:13 +00:00
ledc_periph.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
mcpwm_periph.c mcpwm: update hal and soc naming 2021-07-26 22:32:45 +08:00
pcnt_periph.c pcnt: update pcnt soc data for all targets 2021-08-10 17:19:21 +08:00
rmt_periph.c rmt: restructure rmt_signal_conn_t 2021-06-22 15:29:11 +08:00
rtc_io_periph.c fix rtc_gpio_desc_t compilation error 2020-12-21 13:54:52 +05:30
sdio_slave_periph.c soc: descriptive part occupy whole component 2020-10-28 07:21:29 +08:00
sdmmc_periph.c soc: add esp32s3 sdmmc support 2021-05-10 23:21:27 +02:00
sigmadelta_periph.c sigma_delta: add periph signal list and support esp32-s3 2020-10-29 11:06:28 +08:00
spi_periph.c soc: descriptive part occupy whole component 2020-10-28 07:21:29 +08:00
timer_periph.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
touch_sensor_periph.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
uart_periph.c uart: uart_set_pin function will now use IOMUX whenever possible 2021-08-04 12:48:30 +08:00