From c0d58d1a6089a8cfb8b4be2e539d8bb00702a48f Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 12 Sep 2018 09:25:54 +0200 Subject: [PATCH] boards: nucleo_f207zg: Fix default config According to GH7151: boards: Move existing boards to "default configuration guidelines" Add USART6 Arduino compatible config Signed-off-by: Erwan Gouriou --- boards/arm/nucleo_f207zg/Kconfig.defconfig | 7 +++++++ boards/arm/nucleo_f207zg/doc/nucleo_f207zg.rst | 2 ++ boards/arm/nucleo_f207zg/nucleo_f207zg.dts | 8 ++++++++ boards/arm/nucleo_f207zg/pinmux.c | 4 ++++ 4 files changed, 21 insertions(+) diff --git a/boards/arm/nucleo_f207zg/Kconfig.defconfig b/boards/arm/nucleo_f207zg/Kconfig.defconfig index b7b5b965d58..5fd9af4b960 100644 --- a/boards/arm/nucleo_f207zg/Kconfig.defconfig +++ b/boards/arm/nucleo_f207zg/Kconfig.defconfig @@ -27,4 +27,11 @@ config ETH_STM32_HAL endif # NETWORKING +if SERIAL + +config UART_STM32_PORT_6 + default y + +endif # SERIAL + endif # BOARD_NUCLEO_F207ZG diff --git a/boards/arm/nucleo_f207zg/doc/nucleo_f207zg.rst b/boards/arm/nucleo_f207zg/doc/nucleo_f207zg.rst index a17269e11ef..c116ee3df63 100644 --- a/boards/arm/nucleo_f207zg/doc/nucleo_f207zg.rst +++ b/boards/arm/nucleo_f207zg/doc/nucleo_f207zg.rst @@ -131,6 +131,8 @@ For more details please refer to `STM32 Nucleo-144 board User Manual`_. Default Zephyr Peripheral Mapping: ---------------------------------- +- UART_3 TX/RX : PD8/PD9 (ST-Link Virtual Port Com) +- UART_6 TX/RX : PG14/PG9 (Arduino Serial) - ETH : PA1, PA2, PA7, PB13, PC1, PC4, PC5, PG11, PG13 - USB_DM : PA11 - USB_DP : PA12 diff --git a/boards/arm/nucleo_f207zg/nucleo_f207zg.dts b/boards/arm/nucleo_f207zg/nucleo_f207zg.dts index be3882e26af..0aa6749f880 100644 --- a/boards/arm/nucleo_f207zg/nucleo_f207zg.dts +++ b/boards/arm/nucleo_f207zg/nucleo_f207zg.dts @@ -49,6 +49,8 @@ }; }; +arduino_serial: &usart6 {}; + &usart3 { current-speed = <115200>; pinctrl-0 = <&usart3_pins_b>; @@ -56,6 +58,12 @@ status = "ok"; }; +&usart6 { + current-speed = <115200>; + pinctrl-names = "default"; + status = "ok"; +}; + &usbotg_fs { status = "ok"; }; diff --git a/boards/arm/nucleo_f207zg/pinmux.c b/boards/arm/nucleo_f207zg/pinmux.c index 09c11b1d0de..91cc87d2273 100644 --- a/boards/arm/nucleo_f207zg/pinmux.c +++ b/boards/arm/nucleo_f207zg/pinmux.c @@ -18,6 +18,10 @@ static const struct pin_config pinconf[] = { {STM32_PIN_PD8, STM32F2_PINMUX_FUNC_PD8_USART3_TX}, {STM32_PIN_PD9, STM32F2_PINMUX_FUNC_PD9_USART3_RX}, #endif /* #ifdef CONFIG_UART_STM32_PORT_3 */ +#ifdef CONFIG_UART_STM32_PORT_6 + {STM32_PIN_PG14, STM32F2_PINMUX_FUNC_PG14_USART6_TX}, + {STM32_PIN_PG9, STM32F2_PINMUX_FUNC_PG9_USART6_RX}, +#endif /* CONFIG_UART_STM32_PORT_6 */ #ifdef CONFIG_ETH_STM32_HAL {STM32_PIN_PC1, STM32F2_PINMUX_FUNC_PC1_ETH}, {STM32_PIN_PC4, STM32F2_PINMUX_FUNC_PC4_ETH},