diff --git a/boards/arm/stm32h747i_disco/Kconfig.defconfig b/boards/arm/stm32h747i_disco/Kconfig.defconfig index 43589e94951..6afd0f51dce 100644 --- a/boards/arm/stm32h747i_disco/Kconfig.defconfig +++ b/boards/arm/stm32h747i_disco/Kconfig.defconfig @@ -9,32 +9,6 @@ config BOARD default "stm32h747i_disco_m7" if BOARD_STM32H747I_DISCO_M7 default "stm32h747i_disco_m4" if BOARD_STM32H747I_DISCO_M4 -# clock configuration -config SYS_CLOCK_HW_CYCLES_PER_SEC - default 400000000 if BOARD_STM32H747I_DISCO_M7 - # SYS_CLOCK_M4 = SYS_CLOCK_M7 / CLOCK_STM32_HPRE - default 200000000 if BOARD_STM32H747I_DISCO_M4 - -config CLOCK_STM32_D1CPRE - default 1 - -config CLOCK_STM32_HPRE - # HCLK: 200MHz - default 2 - -config CLOCK_STM32_D2PPRE1 - # APBX: 100MHz - default 2 - -config CLOCK_STM32_D2PPRE2 - default 2 - -config CLOCK_STM32_D1PPRE - default 2 - -config CLOCK_STM32_D3PPRE - default 2 - config STM32H7_DUAL_CORE default y diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi b/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi index efe5e72bf40..abfce147afd 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi @@ -66,4 +66,13 @@ }; }; +&rcc { + d1cpre = <1>; + hpre = <2>; + d1ppre = <2>; + d2ppre1 = <2>; + d2ppre2 = <2>; + d3ppre = <2>; +}; + arduino_serial: &uart8 {}; diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts index 36e3d8cf0ec..db033c0b664 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts @@ -43,6 +43,10 @@ }; }; +&rcc { + clock-frequency = ; +}; + &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; current-speed = <115200>; diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts index 5fa7c1f08f8..b63dfa74450 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts @@ -48,6 +48,26 @@ }; }; +&clk_hse { + clock-frequency = ; + status = "okay"; +}; + +&pll { + div-m = <5>; + mul-n = <160>; + div-p = <2>; + div-q = <4>; + div-r = <2>; + clocks = <&clk_hse>; + status = "okay"; +}; + +&rcc { + clocks = <&pll>; + clock-frequency = ; +}; + &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; current-speed = <115200>; diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig index d0239ba4a7d..9da952ab6ff 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig @@ -12,24 +12,9 @@ CONFIG_PINMUX=y # enable GPIO CONFIG_GPIO=y -# clock configuration +# Enable clocks CONFIG_CLOCK_CONTROL=y -# Clock configuration for Cube Clock control driver -CONFIG_CLOCK_STM32_HSE_CLOCK=25000000 -CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y - -# use HSE (bypass) as PLL input -CONFIG_CLOCK_STM32_PLL_SRC_HSE=y -CONFIG_CLOCK_STM32_HSE_BYPASS=y - -# produce 400MHz clock at PLL output -CONFIG_CLOCK_STM32_PLL_M_DIVISOR=5 -CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=160 -CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2 -CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=4 -CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2 - # Enable MPU CONFIG_ARM_MPU=y