forked from espressif/esp-idf
change(esp_hw_support): support power management dfs flow
This commit is contained in:
@@ -171,12 +171,6 @@ set(public_include_dirs "include" "include/soc" "include/soc/${target}"
|
||||
"dma/include" "ldo/include" "debug_probe/include"
|
||||
"mspi_timing_tuning/include" "power_supply/include")
|
||||
|
||||
if(CONFIG_IDF_TARGET_ESP32H21)
|
||||
list(REMOVE_ITEM srcs
|
||||
"sleep_modes.c" # TODO: [ESP32H21] IDF-11515, IDF-11517
|
||||
)
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${public_include_dirs}
|
||||
PRIV_INCLUDE_DIRS port/include include/esp_private
|
||||
|
@@ -108,9 +108,12 @@
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#include "esp32h2/rom/rtc.h"
|
||||
#include "esp32h2/rom/cache.h"
|
||||
#include "esp32h2/rom/rtc.h"
|
||||
#include "soc/extmem_reg.h"
|
||||
#include "hal/gpio_ll.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32H21
|
||||
#include "esp32h21/rom/rtc.h"
|
||||
#include "esp32h21/rom/cache.h"
|
||||
#include "hal/gpio_ll.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||
#include "esp32p4/rom/rtc.h"
|
||||
#include "hal/gpio_ll.h"
|
||||
@@ -167,6 +170,9 @@
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#define DEFAULT_SLEEP_OUT_OVERHEAD_US (118)
|
||||
#define DEFAULT_HARDWARE_OUT_OVERHEAD_US (9)
|
||||
#elif CONFIG_IDF_TARGET_ESP32H21
|
||||
#define DEFAULT_SLEEP_OUT_OVERHEAD_US (118)
|
||||
#define DEFAULT_HARDWARE_OUT_OVERHEAD_US (9)
|
||||
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||
#define DEFAULT_SLEEP_OUT_OVERHEAD_US (324)
|
||||
#define DEFAULT_HARDWARE_OUT_OVERHEAD_US (240)
|
||||
|
@@ -379,14 +379,15 @@ static esp_err_t esp_pm_sleep_configure(const void *vconfig)
|
||||
esp_err_t err = ESP_OK;
|
||||
const esp_pm_config_t* config = (const esp_pm_config_t*) vconfig;
|
||||
|
||||
#if ESP_SLEEP_POWER_DOWN_CPU
|
||||
#if ESP_SLEEP_POWER_DOWN_CPU && CONFIG_SOC_LIGHT_SLEEP_SUPPORTED
|
||||
err = sleep_cpu_configure(config->light_sleep_enable);
|
||||
if (err != ESP_OK) {
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_SOC_LIGHT_SLEEP_SUPPORTED
|
||||
err = sleep_modem_configure(config->max_freq_mhz, config->min_freq_mhz, config->light_sleep_enable);
|
||||
#endif
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@@ -75,6 +75,10 @@ config SOC_PAU_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_PM_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_XTAL_SUPPORT_32M
|
||||
bool
|
||||
default y
|
||||
|
@@ -78,7 +78,7 @@
|
||||
// #define SOC_LIGHT_SLEEP_SUPPORTED 1 //TODO: [ESP32H21] IDF-11517, IDF-11520
|
||||
// #define SOC_DEEP_SLEEP_SUPPORTED 1 //TODO: [ESP32H21] IDF-11515
|
||||
// #define SOC_MODEM_CLOCK_SUPPORTED 1
|
||||
// #define SOC_PM_SUPPORTED 1
|
||||
#define SOC_PM_SUPPORTED 1
|
||||
|
||||
/*-------------------------- XTAL CAPS ---------------------------------------*/
|
||||
#define SOC_XTAL_SUPPORT_32M 1
|
||||
|
Reference in New Issue
Block a user