From 976c9a1f787ee7baa8bf8e58e47fda0f8208b695 Mon Sep 17 00:00:00 2001 From: Alexandre Bourdiol Date: Fri, 30 Apr 2021 14:14:21 +0200 Subject: [PATCH] boards: 96b_wistrio: Use dts for clocks configuration Convert board to use of device tree for clocks configuration. Signed-off-by: Alexandre Bourdiol --- boards/arm/96b_wistrio/96b_wistrio.dts | 19 +++++++++++++++++++ boards/arm/96b_wistrio/96b_wistrio_defconfig | 13 +------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/boards/arm/96b_wistrio/96b_wistrio.dts b/boards/arm/96b_wistrio/96b_wistrio.dts index 43649c1b118..b902ef7d175 100644 --- a/boards/arm/96b_wistrio/96b_wistrio.dts +++ b/boards/arm/96b_wistrio/96b_wistrio.dts @@ -39,6 +39,25 @@ }; }; +&clk_hsi { + status = "okay"; +}; + +&pll { + div = <2>; + mul = <4>; + clocks = <&clk_hsi>; + status = "okay"; +}; + +&rcc { + clocks = <&pll>; + clock-frequency = ; + ahb-prescaler = <1>; + apb1-prescaler = <1>; + apb2-prescaler = <1>; +}; + &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; current-speed = <115200>; diff --git a/boards/arm/96b_wistrio/96b_wistrio_defconfig b/boards/arm/96b_wistrio/96b_wistrio_defconfig index 7dfd676c925..e2f2155fd42 100644 --- a/boards/arm/96b_wistrio/96b_wistrio_defconfig +++ b/boards/arm/96b_wistrio/96b_wistrio_defconfig @@ -1,7 +1,5 @@ CONFIG_SOC_SERIES_STM32L1X=y CONFIG_SOC_STM32L151XBA=y -# 32MHz system clock -CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000 # Enable MPU CONFIG_ARM_MPU=y @@ -18,17 +16,8 @@ CONFIG_PINMUX=y # enable GPIO CONFIG_GPIO=y -# clock configuration +# Enable Clocks CONFIG_CLOCK_CONTROL=y -# SYSCLK selection -CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y -# Use HSI source -CONFIG_CLOCK_STM32_PLL_SRC_HSI=y -CONFIG_CLOCK_STM32_PLL_DIVISOR=2 -# produce 32Mhz clock at PLL output -CONFIG_CLOCK_STM32_PLL_MULTIPLIER=4 -CONFIG_CLOCK_STM32_AHB_PRESCALER=1 -CONFIG_CLOCK_STM32_APB1_PRESCALER=1 # console CONFIG_CONSOLE=y