Merge branch 'bugfix/lp_io_clock_control_v6.0' into 'release/v6.0'

fix(rtcio): RTC GPIO configuration should be written if LP IO clock exists (v6.0)

See merge request espressif/esp-idf!46595
This commit is contained in:
morris
2026-03-19 23:17:09 +08:00
32 changed files with 248 additions and 156 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -11,7 +11,6 @@
#include "soc/clk_tree_defs.h"
#include "soc/gpio_num.h"
#include "soc/soc_caps.h"
#include "soc/io_mux_reg.h"
#ifdef __cplusplus
extern "C" {
@@ -32,8 +31,8 @@ esp_err_t io_mux_set_clock_source(soc_module_clk_t clk_src);
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT
typedef struct {
uint8_t rtc_io_enabled_cnt[MAX_RTC_GPIO_NUM + 1];
uint32_t rtc_io_using_mask;
uint8_t rtc_io_enabled_cnt[SOC_RTCIO_PIN_COUNT];
uint32_t rtc_io_using_mask : SOC_RTCIO_PIN_COUNT;
} rtc_io_status_t;
/**
@@ -45,12 +44,24 @@ typedef struct {
void io_mux_enable_lp_io_clock(gpio_num_t gpio_num, bool enable);
/**
* Force disable one LP_IO to clock dependency
* @brief Force disable one LP_IO to clock dependency
*
* @param gpio_num GPIO number
*/
void io_mux_force_disable_lp_io_clock(gpio_num_t gpio_num);
#endif
#if SOC_RTCIO_PIN_COUNT > 0
/**
* @brief Check if the LP_IO is in use
*
* @param gpio_num GPIO number
*
* @return true if the LP_IO is in use, false otherwise
*/
bool io_mux_is_lp_io_in_use(gpio_num_t gpio_num);
#endif
#ifdef __cplusplus
}
#endif