From 137d4c1882e486ab6b96043e313362b24e47e67e Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 5 Feb 2020 13:51:59 +0100 Subject: [PATCH] board: stm32h474i_disco: Small fixes on m4 core ST-Link VPC is wired to UART_1. Console should be assigned to this peripheral to be available. By default UART_1 is assigned to m7 core and not available to m4. This commit does not change this, but makes it easier to change UART_1 assignment from m7 to m4 core. Signed-off-by: Erwan Gouriou --- boards/arm/stm32h747i_disco/Kconfig.defconfig | 2 ++ boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts | 10 ++++++++++ .../arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig | 8 ++++++++ .../arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/boards/arm/stm32h747i_disco/Kconfig.defconfig b/boards/arm/stm32h747i_disco/Kconfig.defconfig index a59bc7d894b..fad160560b4 100644 --- a/boards/arm/stm32h747i_disco/Kconfig.defconfig +++ b/boards/arm/stm32h747i_disco/Kconfig.defconfig @@ -50,6 +50,7 @@ endif # STM32H7_DUAL_CORE if UART_CONSOLE +# Change this to assign UART_1 (console) to M4 core config UART_1 default y if BOARD_STM32H747I_DISCO_M7 @@ -57,6 +58,7 @@ endif # UART_CONSOLE if SERIAL +# Change this to assign UART_8 to M4 core config UART_8 default y if BOARD_STM32H747I_DISCO_M7 diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts index 3b0e865597b..6a10686ca62 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4.dts @@ -41,3 +41,13 @@ sw0 = &joy_center; }; }; + +&usart1 { + current-speed = <115200>; + /* status = "okay"; */ +}; + +&uart8 { + current-speed = <115200>; + /* status = "okay"; */ +}; diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig index 9e362108d8c..57612947f69 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig @@ -14,3 +14,11 @@ CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +# By default SERIAL peripherals are assigned to m7 + +# enable uart driver +#CONFIG_SERIAL=y +# console +#CONFIG_CONSOLE=y +#CONFIG_UART_CONSOLE=y diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig index cd8ad076121..cbd8a7758b6 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig @@ -30,9 +30,10 @@ CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2 CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=4 CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2 +# Disable following to assign serial ports to m4 core + # enable uart driver CONFIG_SERIAL=y - # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y