boards: nucleo_f756zg: 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
704a0e4cb0
commit
c37c4e23dd
2 changed files with 24 additions and 21 deletions
|
@ -60,6 +60,29 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&clk_hse {
|
||||||
|
hse-bypass;
|
||||||
|
clock-frequency = <DT_FREQ_M(8)>; /* STLink 8MHz clock */
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pll {
|
||||||
|
div-m = <4>;
|
||||||
|
mul-n = <72>;
|
||||||
|
div-p = <2>;
|
||||||
|
div-q = <3>;
|
||||||
|
clocks = <&clk_hse>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&rcc {
|
||||||
|
clocks = <&pll>;
|
||||||
|
clock-frequency = <DT_FREQ_M(72)>;
|
||||||
|
ahb-prescaler = <1>;
|
||||||
|
apb1-prescaler = <2>;
|
||||||
|
apb2-prescaler = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
&usart2 {
|
&usart2 {
|
||||||
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6
|
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6
|
||||||
&usart2_rts_pd4 &usart2_cts_pd3>;
|
&usart2_rts_pd4 &usart2_cts_pd3>;
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_STM32F7X=y
|
CONFIG_SOC_SERIES_STM32F7X=y
|
||||||
CONFIG_SOC_STM32F756XX=y
|
CONFIG_SOC_STM32F756XX=y
|
||||||
# 72MHz system clock (CubeMX Defaults)
|
|
||||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
|
||||||
|
|
||||||
# Enable MPU
|
# Enable MPU
|
||||||
CONFIG_ARM_MPU=y
|
CONFIG_ARM_MPU=y
|
||||||
|
@ -24,23 +22,5 @@ CONFIG_PINMUX=y
|
||||||
# Enable GPIO
|
# Enable GPIO
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
# Clock Configuration
|
# Enable Clocks
|
||||||
CONFIG_CLOCK_CONTROL=y
|
CONFIG_CLOCK_CONTROL=y
|
||||||
|
|
||||||
# STLINK provides 8MHz clock input
|
|
||||||
CONFIG_CLOCK_STM32_HSE_CLOCK=8000000
|
|
||||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
|
||||||
# Use HSE as PLL input
|
|
||||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
|
||||||
# Nucleo-144 boards do not have an external oscillator, so just use
|
|
||||||
# the 8MHz clock signal coming from integrated STLink
|
|
||||||
CONFIG_CLOCK_STM32_HSE_BYPASS=y
|
|
||||||
|
|
||||||
# Produce 72MHz clock at PLL output
|
|
||||||
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=4
|
|
||||||
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=72
|
|
||||||
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
|
|
||||||
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=3
|
|
||||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
|
||||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=2
|
|
||||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=1
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue