boards: nucleo_l053r8: Move clock config to DT
Use DT to configure board clocks Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
391cd36e70
commit
7b55d07a2d
2 changed files with 23 additions and 19 deletions
|
@ -43,6 +43,28 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&clk_hse{
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <DT_FREQ_M(8)>;
|
||||||
|
hse-bypass;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pll {
|
||||||
|
clocks = <&clk_hse>;
|
||||||
|
mul = <8>;
|
||||||
|
div = <2>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rcc {
|
||||||
|
clocks = <&pll>;
|
||||||
|
clock-frequency = <DT_FREQ_M(32)>;
|
||||||
|
ahb-prescaler = <1>;
|
||||||
|
apb1-prescaler = <1>;
|
||||||
|
apb2-prescaler = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Due to limited available memory, don't enable gpiod and gpiof */
|
/* Due to limited available memory, don't enable gpiod and gpiof */
|
||||||
/* (Test cases fail due to 'SRAM' region overflow) */
|
/* (Test cases fail due to 'SRAM' region overflow) */
|
||||||
&gpiod {status = "disabled";};
|
&gpiod {status = "disabled";};
|
||||||
|
|
|
@ -6,9 +6,6 @@ CONFIG_SOC_SERIES_STM32L0X=y
|
||||||
# Platform Configuration
|
# Platform Configuration
|
||||||
CONFIG_SOC_STM32L053XX=y
|
CONFIG_SOC_STM32L053XX=y
|
||||||
|
|
||||||
# General Kernel Options
|
|
||||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32000000
|
|
||||||
|
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
@ -33,20 +30,5 @@ CONFIG_PINMUX=y
|
||||||
# GPIO Controller
|
# GPIO Controller
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Clock configuration
|
# Clock controller
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
# SYSCLK selection
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# HSE configuration
|
|
||||||
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
|
|
||||||
# however, the board does not have an external oscillator, so just use
|
|
||||||
# the 8MHz clock signal coming from integrated STLink
|
|
||||||
CONFIG_CLOCK_STM32_HSE_BYPASS=y
|
|
||||||
# PLL configuration
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
|
||||||
# produce 32MHz clock at PLL output
|
|
||||||
CONFIG_CLOCK_STM32_PLL_MULTIPLIER=8
|
|
||||||
CONFIG_CLOCK_STM32_PLL_DIVISOR=2
|
|
||||||
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