mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
feat(esp_hw_support): support LP_Peripheral & CNNT power domain auto powerdown on esp32p4eco1
This commit is contained in:
parent
6b1a173030
commit
fdb0dd23ca
@ -83,6 +83,9 @@ typedef enum {
|
||||
#endif
|
||||
#if SOC_PM_SUPPORT_TOP_PD
|
||||
ESP_PD_DOMAIN_TOP, //!< SoC TOP
|
||||
#endif
|
||||
#if SOC_PM_SUPPORT_CNNT_PD
|
||||
ESP_PD_DOMAIN_CNNT, //!< Hight-speed connect peripherals power domain
|
||||
#endif
|
||||
ESP_PD_DOMAIN_MAX //!< Number of domains
|
||||
} esp_sleep_pd_domain_t;
|
||||
|
@ -26,7 +26,9 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/chip_revision.h"
|
||||
#include "driver/rtc_io.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/rtc_io_hal.h"
|
||||
#include "hal/clk_tree_hal.h"
|
||||
|
||||
@ -862,6 +864,12 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
|
||||
pd_flags &= ~RTC_SLEEP_PD_RTC_PERIPH;
|
||||
}
|
||||
}
|
||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||
/* Due to esp32p4 eco0 hardware bug, if LP peripheral power domain is powerdowned in sleep, there will be a possibility of
|
||||
triggering the EFUSE_CRC reset, so disable the power-down of this power domain on lightsleep for ECO0 version. */
|
||||
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 1)) {
|
||||
pd_flags &= ~RTC_SLEEP_PD_RTC_PERIPH;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t reject_triggers = allow_sleep_rejection ? (s_config.wakeup_triggers & RTC_SLEEP_REJECT_MASK) : 0;
|
||||
@ -2275,6 +2283,12 @@ static uint32_t get_power_down_flags(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOC_PM_SUPPORT_CNNT_PD
|
||||
if (s_config.domain[ESP_PD_DOMAIN_CNNT].pd_option != ESP_PD_OPTION_ON) {
|
||||
pd_flags |= PMU_SLEEP_PD_CNNT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOC_PM_SUPPORT_VDDSDIO_PD
|
||||
if (s_config.domain[ESP_PD_DOMAIN_VDDSDIO].pd_option != ESP_PD_OPTION_ON) {
|
||||
pd_flags |= RTC_SLEEP_PD_VDDSDIO;
|
||||
|
@ -1567,6 +1567,10 @@ config SOC_PM_SUPPORT_CNNT_PD
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_PM_SUPPORT_RTC_PERIPH_PD
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_PM_SUPPORT_DEEPSLEEP_CHECK_STUB_ONLY
|
||||
bool
|
||||
default y
|
||||
|
@ -620,6 +620,7 @@
|
||||
#define SOC_PM_SUPPORT_VDDSDIO_PD (1)
|
||||
#define SOC_PM_SUPPORT_TOP_PD (1)
|
||||
#define SOC_PM_SUPPORT_CNNT_PD (1)
|
||||
#define SOC_PM_SUPPORT_RTC_PERIPH_PD (1)
|
||||
|
||||
#define SOC_PM_SUPPORT_DEEPSLEEP_CHECK_STUB_ONLY (1) /*!<Supports CRC only the stub code in RTC memory */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user