boards: stm32l1_disco: Use dts for clocks configuration
Convert board to use of device tree for clocks configuration. Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
This commit is contained in:
parent
cf6a7f3ca6
commit
61b6e2cc23
2 changed files with 21 additions and 12 deletions
|
@ -46,6 +46,26 @@
|
|||
};
|
||||
};
|
||||
|
||||
&clk_hsi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pll {
|
||||
div = <4>;
|
||||
mul = <8>;
|
||||
/* out of the box, MCO from stlink is not enabled, unlike later discos */
|
||||
clocks = <&clk_hsi>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rcc {
|
||||
clocks = <&pll>;
|
||||
clock-frequency = <DT_FREQ_M(32)>;
|
||||
ahb-prescaler = <1>;
|
||||
apb1-prescaler = <1>;
|
||||
apb2-prescaler = <1>;
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
|
||||
current-speed = <115200>;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
CONFIG_SOC_SERIES_STM32L1X=y
|
||||
CONFIG_SOC_STM32L151XB=y
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
|
@ -17,15 +16,5 @@ CONFIG_PINMUX=y
|
|||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# clock configuration
|
||||
# Enable Clocks
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
||||
# out of the box, MCO from stlink is not enabled, unlike later discos
|
||||
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
|
||||
# produce 32MHz clock at PLL output
|
||||
CONFIG_CLOCK_STM32_PLL_DIVISOR=4
|
||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=8
|
||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue