From d188ad96b776e16b79da336fe49d922c62185c54 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Thu, 15 May 2025 16:30:45 +0800 Subject: [PATCH] change(soc): rename peripheral powerdowned sleep wakeable IO soc_caps rename SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK to SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK rename SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT to SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_PIN_CNT rename SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP to SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP --- .../esp_driver_gpio/include/driver/gpio.h | 4 ++-- components/esp_driver_gpio/src/gpio.c | 4 ++-- .../test_apps/gpio/main/test_rtcio.c | 4 ++-- components/esp_driver_ledc/src/ledc.c | 2 +- .../esp_hal_gpio/include/hal/gpio_hal.h | 4 ++-- .../esp_hal_gpio/include/hal/rtc_io_hal.h | 4 ++-- components/esp_hal_pmu/include/hal/rtc_hal.h | 3 ++- components/esp_hw_support/include/esp_sleep.h | 8 ++++---- components/esp_hw_support/sleep_gpio.c | 4 ++-- components/esp_hw_support/sleep_modes.c | 20 +++++++++---------- .../wakeup_tests/main/src/io_wakeup_cmd.c | 6 +++--- .../esp32c2/include/soc/Kconfig.soc_caps.in | 6 +++--- components/soc/esp32c2/include/soc/soc_caps.h | 12 +++++------ .../esp32c3/include/soc/Kconfig.soc_caps.in | 6 +++--- components/soc/esp32c3/include/soc/soc_caps.h | 12 +++++------ .../esp32c5/include/soc/Kconfig.soc_caps.in | 6 +++--- components/soc/esp32c5/include/soc/soc_caps.h | 9 +++++---- .../esp32c6/include/soc/Kconfig.soc_caps.in | 6 +++--- components/soc/esp32c6/include/soc/soc_caps.h | 9 +++++---- .../esp32c61/include/soc/Kconfig.soc_caps.in | 6 +++--- .../soc/esp32c61/include/soc/soc_caps.h | 9 +++++---- components/soc/esp32h2/include/soc/soc_caps.h | 2 +- .../esp32h4/include/soc/Kconfig.soc_caps.in | 6 +++--- components/soc/esp32h4/include/soc/soc_caps.h | 7 ++++--- .../esp32p4/include/soc/Kconfig.soc_caps.in | 6 +++--- components/soc/esp32p4/include/soc/soc_caps.h | 9 +++++---- .../esp32s31/include/soc/Kconfig.soc_caps.in | 4 ---- .../soc/esp32s31/include/soc/soc_caps.h | 5 +++-- docs/en/api-reference/system/sleep_modes.rst | 8 ++++---- .../api-reference/system/sleep_modes.rst | 8 ++++---- .../system/deep_sleep/main/Kconfig.projbuild | 2 +- 31 files changed, 102 insertions(+), 99 deletions(-) diff --git a/components/esp_driver_gpio/include/driver/gpio.h b/components/esp_driver_gpio/include/driver/gpio.h index 6c8a02458d..35c5f6843d 100644 --- a/components/esp_driver_gpio/include/driver/gpio.h +++ b/components/esp_driver_gpio/include/driver/gpio.h @@ -565,7 +565,7 @@ esp_err_t gpio_sleep_set_direction(gpio_num_t gpio_num, gpio_mode_t mode); */ esp_err_t gpio_sleep_set_pull_mode(gpio_num_t gpio_num, gpio_pull_mode_t pull); -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP #define GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO(gpio_num) ((gpio_num >= 0) && \ (((1ULL << (gpio_num)) & SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK) != 0)) @@ -596,7 +596,7 @@ esp_err_t gpio_deep_sleep_wakeup_enable(gpio_num_t gpio_num, gpio_int_type_t int */ esp_err_t gpio_deep_sleep_wakeup_disable(gpio_num_t gpio_num); -#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP /** * @brief Dump IO configuration information to console diff --git a/components/esp_driver_gpio/src/gpio.c b/components/esp_driver_gpio/src/gpio.c index fe078d4bae..3c7f455872 100644 --- a/components/esp_driver_gpio/src/gpio.c +++ b/components/esp_driver_gpio/src/gpio.c @@ -1017,7 +1017,7 @@ esp_err_t gpio_sleep_sel_dis(gpio_num_t gpio_num) return ESP_OK; } -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED esp_err_t gpio_deep_sleep_wakeup_enable(gpio_num_t gpio_num, gpio_int_type_t intr_type) { if (!GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO(gpio_num)) { @@ -1057,7 +1057,7 @@ esp_err_t gpio_deep_sleep_wakeup_disable(gpio_num_t gpio_num) portEXIT_CRITICAL(&gpio_context.gpio_spinlock); return ESP_OK; } -#endif // SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#endif // SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED esp_err_t gpio_get_io_config(gpio_num_t gpio_num, gpio_io_config_t *out_io_config) { diff --git a/components/esp_driver_gpio/test_apps/gpio/main/test_rtcio.c b/components/esp_driver_gpio/test_apps/gpio/main/test_rtcio.c index ebc87b58a0..bb7bbfa86c 100644 --- a/components/esp_driver_gpio/test_apps/gpio/main/test_rtcio.c +++ b/components/esp_driver_gpio/test_apps/gpio/main/test_rtcio.c @@ -235,7 +235,7 @@ TEST_CASE("RTCIO_output_hold_test", "[rtcio]") } #endif //SOC_RTCIO_HOLD_SUPPORTED -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) /* * test interrupt functionality */ @@ -275,7 +275,7 @@ TEST_CASE("RTCIO_interrupt_test", "[rtcio]") rtcio_ll_intr_enable(test_io, GPIO_INTR_DISABLE); TEST_ESP_OK(rtc_gpio_deinit(test_io)); } -#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) +#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) #endif //SOC_RTCIO_INPUT_OUTPUT_SUPPORTED #if SOC_DEEP_SLEEP_SUPPORTED diff --git a/components/esp_driver_ledc/src/ledc.c b/components/esp_driver_ledc/src/ledc.c index b030bf18eb..3b46aa63ab 100644 --- a/components/esp_driver_ledc/src/ledc.c +++ b/components/esp_driver_ledc/src/ledc.c @@ -1004,7 +1004,7 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t *ledc_conf) // To workaround DIG-399, all LP IOs are held when LP_PERIPH is powered off to ensure EXT wakeup functionality // But holding LP IOs will cause LEDC signal cannot output on the pad during sleep // Therefore, we will force LP periph xpd in such case - if ((1ULL << gpio_num) & SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK) { + if (GPIO_IS_HP_PERIPH_PD_WAKEUP_VALID_IO(gpio_num)) { esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); } #endif diff --git a/components/esp_hal_gpio/include/hal/gpio_hal.h b/components/esp_hal_gpio/include/hal/gpio_hal.h index b878f81dc6..80fe43a33a 100644 --- a/components/esp_hal_gpio/include/hal/gpio_hal.h +++ b/components/esp_hal_gpio/include/hal/gpio_hal.h @@ -497,7 +497,7 @@ void gpio_hal_matrix_out(gpio_hal_context_t *hal, uint32_t gpio_num, uint32_t si */ #define gpio_hal_sleep_output_enable(hal, gpio_num) gpio_ll_sleep_output_enable((hal)->dev, gpio_num) -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) && SOC_DEEP_SLEEP_SUPPORTED /** * @brief Enable GPIO deep-sleep wake-up function. * @@ -524,7 +524,7 @@ void gpio_hal_matrix_out(gpio_hal_context_t *hal, uint32_t gpio_num, uint32_t si * @return True if the pin is enabled to wake up from deep-sleep */ #define gpio_hal_deepsleep_wakeup_is_enabled(hal, gpio_num) gpio_ll_deepsleep_wakeup_is_enabled((hal)->dev, gpio_num) -#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) && SOC_DEEP_SLEEP_SUPPORTED +#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) #if SOC_GPIO_SUPPORT_PIN_HYS_FILTER /** diff --git a/components/esp_hal_gpio/include/hal/rtc_io_hal.h b/components/esp_hal_gpio/include/hal/rtc_io_hal.h index c0e1f18004..fcab5e67f7 100644 --- a/components/esp_hal_gpio/include/hal/rtc_io_hal.h +++ b/components/esp_hal_gpio/include/hal/rtc_io_hal.h @@ -295,7 +295,7 @@ void rtcio_hal_isolate(int rtcio_num); #endif //SOC_RTCIO_PIN_COUNT > 0 -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) #define gpio_hal_deepsleep_wakeup_enable(hal, gpio_num, intr_type) rtcio_hal_wakeup_enable(rtc_io_num_map[gpio_num], intr_type) #define gpio_hal_deepsleep_wakeup_disable(hal, gpio_num) rtcio_hal_wakeup_disable(rtc_io_num_map[gpio_num]) @@ -323,7 +323,7 @@ void rtcio_hal_isolate(int rtcio_num); */ #define rtcio_hal_clear_interrupt_status() rtcio_ll_clear_interrupt_status() -#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) +#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT > 0) #ifdef __cplusplus } diff --git a/components/esp_hal_pmu/include/hal/rtc_hal.h b/components/esp_hal_pmu/include/hal/rtc_hal.h index 6cdc7544a8..8df1a16cd7 100644 --- a/components/esp_hal_pmu/include/hal/rtc_hal.h +++ b/components/esp_hal_pmu/include/hal/rtc_hal.h @@ -80,7 +80,8 @@ typedef struct rtc_cntl_sleep_retent { #endif #endif // SOC_PM_SUPPORT_EXT1_WAKEUP -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && (SOC_RTCIO_PIN_COUNT == 0) + #define rtc_hal_gpio_get_wakeup_status() rtc_cntl_ll_gpio_get_wakeup_status() #define rtc_hal_gpio_clear_wakeup_status() rtc_cntl_ll_gpio_clear_wakeup_status() #endif diff --git a/components/esp_hw_support/include/esp_sleep.h b/components/esp_hw_support/include/esp_sleep.h index 115c723026..ec4d09602d 100644 --- a/components/esp_hw_support/include/esp_sleep.h +++ b/components/esp_hw_support/include/esp_sleep.h @@ -41,7 +41,7 @@ typedef enum { #endif #endif -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP typedef enum { ESP_GPIO_WAKEUP_GPIO_LOW = 0, ESP_GPIO_WAKEUP_GPIO_HIGH = 1 @@ -452,7 +452,7 @@ __attribute__((deprecated("please use 'esp_sleep_enable_ext1_wakeup_io' and 'esp #endif // SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN #endif // SOC_PM_SUPPORT_EXT1_WAKEUP -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP /** * @brief Enable wakeup using specific gpio pins * @@ -581,7 +581,7 @@ esp_err_t esp_sleep_disable_wifi_beacon_wakeup(void); */ uint64_t esp_sleep_get_ext1_wakeup_status(void); -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP /** * @brief Get the bit mask of GPIOs which caused wakeup (gpio) * @@ -590,7 +590,7 @@ uint64_t esp_sleep_get_ext1_wakeup_status(void); * @return bit mask, if GPIOn caused wakeup, BIT(n) will be set */ uint64_t esp_sleep_get_gpio_wakeup_status(void); -#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP /** * @brief Configure power domain options for sleep mode diff --git a/components/esp_hw_support/sleep_gpio.c b/components/esp_hw_support/sleep_gpio.c index deebc5262e..cfd9229970 100644 --- a/components/esp_hw_support/sleep_gpio.c +++ b/components/esp_hw_support/sleep_gpio.c @@ -244,8 +244,8 @@ void esp_deep_sleep_wakeup_io_reset(void) } #endif -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP - uint32_t dl_io_mask = SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK; +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP + uint32_t dl_io_mask = SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK; gpio_hal_context_t gpio_hal = { .dev = GPIO_HAL_GET_HW(GPIO_PORT_0) }; diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 5c8bd0c95a..233d6f1c7b 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -270,9 +270,9 @@ typedef struct { uint32_t ext0_trigger_level : 1; uint32_t ext0_rtc_gpio_num : 5; #endif -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP - uint32_t gpio_wakeup_mask : SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT; // Only RTC_GPIO supports wakeup deepsleep - uint32_t gpio_trigger_mode : SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT; +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP + uint32_t gpio_wakeup_mask : SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_PIN_CNT; + uint32_t gpio_trigger_mode : SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_PIN_CNT; #endif uint32_t sleep_time_adjustment; uint32_t ccount_ticks_record; @@ -361,7 +361,7 @@ static void touch_wakeup_prepare(void); #if SOC_VBAT_SUPPORTED static void vbat_under_volt_wakeup_prepare(void); #endif -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED static void gpio_deep_sleep_wakeup_prepare(void); #endif @@ -993,7 +993,7 @@ static esp_err_t SLEEP_FN_ATTR esp_sleep_start(uint32_t sleep_flags, uint32_t cl // for !(s_config.wakeup_triggers & RTC_EXT1_TRIG_EN), ext1 wakeup will be turned off in hardware in the real call to sleep #endif -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED if (deep_sleep && (s_config.wakeup_triggers & RTC_GPIO_TRIG_EN)) { gpio_deep_sleep_wakeup_prepare(); } @@ -1892,7 +1892,7 @@ bool esp_sleep_is_valid_wakeup_gpio(gpio_num_t gpio_num) { #if SOC_RTCIO_PIN_COUNT > 0 return RTC_GPIO_IS_VALID_GPIO(gpio_num); -#elif SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#elif SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP return GPIO_IS_DEEP_SLEEP_WAKEUP_VALID_GPIO(gpio_num); #else return false; @@ -2120,7 +2120,7 @@ uint64_t esp_sleep_get_ext1_wakeup_status(void) #endif // SOC_PM_SUPPORT_EXT1_WAKEUP && SOC_RTCIO_PIN_COUNT > 0 -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED uint64_t esp_sleep_get_gpio_wakeup_status(void) { if (!(esp_sleep_get_wakeup_causes() & BIT(ESP_SLEEP_WAKEUP_GPIO))) { @@ -2131,7 +2131,7 @@ uint64_t esp_sleep_get_gpio_wakeup_status(void) static void gpio_deep_sleep_wakeup_prepare(void) { - uint32_t valid_wake_io_mask = SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK; + uint32_t valid_wake_io_mask = SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK; for (gpio_num_t gpio_idx = __builtin_ctz(valid_wake_io_mask); valid_wake_io_mask >> gpio_idx; gpio_idx++) { if ((s_config.gpio_wakeup_mask & BIT64(gpio_idx)) == 0) { continue; @@ -2165,7 +2165,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee gpio_int_type_t intr_type = ((mode == ESP_GPIO_WAKEUP_GPIO_LOW) ? GPIO_INTR_LOW_LEVEL : GPIO_INTR_HIGH_LEVEL); esp_err_t err = ESP_OK; - uint64_t invalid_io_mask = gpio_pin_mask & ~SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK; + uint64_t invalid_io_mask = gpio_pin_mask & ~SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK; if (invalid_io_mask != 0) { for (gpio_num_t gpio_idx = __builtin_ctzll(invalid_io_mask); invalid_io_mask >> gpio_idx; gpio_idx++) { if (invalid_io_mask & BIT64(gpio_idx)) { @@ -2192,7 +2192,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee return err; } -#endif //SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#endif //SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED esp_err_t esp_sleep_enable_gpio_wakeup(void) { diff --git a/components/esp_hw_support/test_apps/wakeup_tests/main/src/io_wakeup_cmd.c b/components/esp_hw_support/test_apps/wakeup_tests/main/src/io_wakeup_cmd.c index de140f84a1..b453c8e020 100644 --- a/components/esp_hw_support/test_apps/wakeup_tests/main/src/io_wakeup_cmd.c +++ b/components/esp_hw_support/test_apps/wakeup_tests/main/src/io_wakeup_cmd.c @@ -142,7 +142,7 @@ static void register_ext1_wakeup(void) } #endif -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP static struct { struct arg_int *pin; struct arg_int *level; @@ -383,7 +383,7 @@ static int process_get_wakeup_cause(int argc, char **argv) if (causes & BIT(ESP_SLEEP_WAKEUP_GPIO)) { if (esp_reset_reason() == ESP_RST_DEEPSLEEP) { -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP uint64_t wakeup_pin_mask = esp_sleep_get_gpio_wakeup_status(); if (wakeup_pin_mask != 0) { int pin = __builtin_ffsll(wakeup_pin_mask) - 1; @@ -440,7 +440,7 @@ void register_io_wakeup_cmd(void) #endif register_gpio_control(); register_gpio_wakeup(); -#if SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP register_rtcio_wakeup(); #endif register_get_wakeup_cause(); diff --git a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in index 060f6b6ae2..3a48352d92 100644 --- a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in @@ -295,7 +295,7 @@ config SOC_GPIO_SUPPORT_FORCE_HOLD bool default y -config SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP +config SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP bool default y @@ -307,11 +307,11 @@ config SOC_GPIO_OUT_RANGE_MAX int default 20 -config SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK +config SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK int default 0 -config SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT +config SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_PIN_CNT int default 6 diff --git a/components/soc/esp32c2/include/soc/soc_caps.h b/components/soc/esp32c2/include/soc/soc_caps.h index 6d92e922fb..9fad28b55a 100644 --- a/components/soc/esp32c2/include/soc/soc_caps.h +++ b/components/soc/esp32c2/include/soc/soc_caps.h @@ -127,21 +127,21 @@ #define SOC_GPIO_PIN_COUNT 21 #define SOC_GPIO_SUPPORT_PIN_GLITCH_FILTER 1 -// Target has no full RTC IO subsystem, GPIO0~5 remain RTC function (powered by VDD3V3_RTC, and can be used as deep-sleep wakeup pins) +// Target has no full RTC IO subsystem, GPIO0~5 remain RTC function (powered by VDD3V3_RTC, and can be used as HP peripheral powerdown-ed sleep wakeup pins) // Force hold is a new function of ESP32-C2 #define SOC_GPIO_SUPPORT_FORCE_HOLD (1) -// GPIO0~5 on ESP32-C2 can support chip deep sleep wakeup -#define SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP (1) - +// GPIO0~5 on ESP32-C2 can support chip HP peripheral powerdown-ed sleep wakeup +#define SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP (1) +#define SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP #define SOC_GPIO_VALID_GPIO_MASK ((1U<