feat(esp_hw_support): use pvt to auto control digital ldo and rtc ldo for esp32p4

This commit is contained in:
yanzihan@espressif.com
2025-06-24 11:01:01 +08:00
committed by Xiao Xufeng
parent dfa785ed44
commit 34b8f67a89
21 changed files with 396 additions and 30 deletions

View File

@@ -20,6 +20,7 @@
#include "esp_private/esp_sleep_internal.h"
#include "esp_private/esp_timer_private.h"
#include "esp_private/rtc_clk.h"
#include "soc/rtc.h"
#include "esp_private/sleep_event.h"
#include "esp_private/system_internal.h"
#include "esp_private/io_mux.h"
@@ -699,6 +700,9 @@ FORCE_INLINE_ATTR void misc_modules_sleep_prepare(uint32_t sleep_flags, bool dee
regi2c_tsens_reg_read();
#endif
}
#if CONFIG_ESP_ENABLE_PVT
pvt_func_enable(false);
#endif
#if !CONFIG_IDF_TARGET_ESP32C61
// TODO: IDF-7370
@@ -713,6 +717,10 @@ FORCE_INLINE_ATTR void misc_modules_sleep_prepare(uint32_t sleep_flags, bool dee
*/
FORCE_INLINE_ATTR void misc_modules_wake_prepare(uint32_t sleep_flags)
{
#if CONFIG_ESP_ENABLE_PVT
pvt_func_enable(true);
#endif
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
if (sleep_flags & PMU_SLEEP_PD_TOP) {
// There is no driver to manage the flashboot watchdog, and it is definitely be in off state when