From cd49273d7a573294aaba32a4c0a443d1f067eb49 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Fri, 15 Mar 2024 16:31:31 +0100 Subject: [PATCH] change(clk_tree): Added clock tree definitions for LP I2C for esp32p4 This commit adds the clock tree definitions for the LP I2C peripheral for the esp32p4. --- .../soc/esp32p4/include/soc/clk_tree_defs.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/components/soc/esp32p4/include/soc/clk_tree_defs.h b/components/soc/esp32p4/include/soc/clk_tree_defs.h index 26fb9a0f82..b39730b19a 100644 --- a/components/soc/esp32p4/include/soc/clk_tree_defs.h +++ b/components/soc/esp32p4/include/soc/clk_tree_defs.h @@ -420,6 +420,24 @@ typedef enum { I2C_CLK_SRC_RC_FAST = SOC_MOD_CLK_RC_FAST, /*!< Select RC_FAST as the source clock */ I2C_CLK_SRC_DEFAULT = SOC_MOD_CLK_XTAL, /*!< Select XTAL as the default source clock */ } soc_periph_i2c_clk_src_t; + +///////////////////////////////////////////////LP_I2C/////////////////////////////////////////////////////////////////// + +/** + * @brief Array initializer for all supported clock sources of LP_I2C + */ +#define SOC_LP_I2C_CLKS {SOC_MOD_CLK_RTC_FAST, SOC_MOD_CLK_XTAL_D2} + +/** + * @brief Type of LP_I2C clock source. + */ +typedef enum { + LP_I2C_SCLK_LP_FAST = SOC_MOD_CLK_RTC_FAST, /*!< LP_I2C source clock is RTC_FAST */ + LP_I2C_SCLK_XTAL_D2 = SOC_MOD_CLK_XTAL_D2, /*!< LP_I2C source clock is XTAL_D2 */ + // LP_I2C_SCLK_LP_PLL = SOC_MOD_CLK_LP_PLL, /*!< LP_I2C source clock is LP_PLL */ + LP_I2C_SCLK_DEFAULT = SOC_MOD_CLK_RTC_FAST, /*!< LP_I2C source clock default choice is RTC_FAST */ +} soc_periph_lp_i2c_clk_src_t; + /////////////////////////////////////////////////SPI//////////////////////////////////////////////////////////////////// /**