From 7a2e74604f8bc1ba3ab913858034b057ca3a3d61 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 20 Dec 2023 17:17:56 +0100 Subject: [PATCH] soc: stm32: common: Define STM32_LPTIM_CLOCK from device tree inputs Now that: 1 - LS Clocks sources values are identical accross series 2 - We're able to extract this value from device tree define STM32_LPTIM_CLOCK choice symbol from device tree Signed-off-by: Erwan Gouriou --- soc/arm/st_stm32/common/Kconfig.defconfig.series | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soc/arm/st_stm32/common/Kconfig.defconfig.series b/soc/arm/st_stm32/common/Kconfig.defconfig.series index c1d0237e1ee..5b586516d83 100644 --- a/soc/arm/st_stm32/common/Kconfig.defconfig.series +++ b/soc/arm/st_stm32/common/Kconfig.defconfig.series @@ -45,6 +45,11 @@ config SYS_CLOCK_TICKS_PER_SEC default 250 if "$(dt_node_int_prop_int,$(DT_STM32_LPTIM_PATH),$(DT_ST_PRESCALER))" = 128 depends on STM32_LPTIM_TIMER && STM32_LPTIM_CLOCK_LSI +choice STM32_LPTIM_CLOCK + default STM32_LPTIM_CLOCK_LSE if "$(dt_node_ph_array_prop_int,$(DT_STM32_LPTIM_PATH),clocks,1,bus)" = 2 + default STM32_LPTIM_CLOCK_LSI if "$(dt_node_ph_array_prop_int,$(DT_STM32_LPTIM_PATH),clocks,1,bus)" = 3 +endchoice + config CLOCK_CONTROL_STM32_CUBE default y depends on CLOCK_CONTROL