esp-idf/components/soc/esp32s3
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 esp32s2, esp32s3: update copyright notice 2021-08-05 15:01:26 +02:00
adc_periph.c adc: fix adc1 channel 8 and 9 not defined bug on s3 2021-12-14 20:10:47 +08:00
CMakeLists.txt usb: Add usb_phy driver to support operations on USB PHY 2021-09-13 12:39:56 +08:00
dedic_gpio_periph.c dedic_gpio: support on esp32s3 2021-06-30 18:10:54 +08:00
gdma_periph.c gdma: separate tx/rx channel interrupt 2021-05-06 15:06:37 +08:00
gpio_periph.c gpio:support gpio in/out/interrupt for esp32s3(728) 2021-06-28 11:44:14 +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 lcd: unify callback prototype 2021-10-02 14:23:31 +08: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 gpio:support gpio in/out/interrupt for esp32s3(728) 2021-06-28 11:44:14 +08:00
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 spi_master:support octal mode for esp32s2 and esp32s3 2021-08-19 16:40:22 +08:00
timer_periph.c timergroup: move interrupt index into peripheral description file 2020-11-03 18:16:50 +08:00
touch_sensor_periph.c touch sensor: update copyright notice 2021-10-08 11:45:57 +08:00
uart_periph.c uart: uart_set_pin function will now use IOMUX whenever possible 2021-08-04 12:48:30 +08:00
usb_periph.c soc/hal: add tinyusb support esp32s3 2021-05-06 16:20:54 +08:00
usb_periph.h Support ESP32S3 Beta 3 target 2021-03-18 10:24:22 +08:00
usb_phy_periph.c usb: Add usb_phy driver to support operations on USB PHY 2021-09-13 12:39:56 +08:00