boards: nucleo_f103rb: Configure serial console pins using dt

usart2 pin configuration is now done through device tree.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-08-12 13:41:45 +02:00 committed by Kumar Gala
commit e4e60a4a0f
2 changed files with 2 additions and 4 deletions

View file

@ -6,6 +6,7 @@
/dts-v1/;
#include <st/f1/stm32f103Xb.dtsi>
#include <st/f1/stm32f103r(8-b)tx-pinctrl.dtsi>
#include "arduino_r3_connector.dtsi"
/ {
@ -46,6 +47,7 @@
};
&usart2 {
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
current-speed = <115200>;
status = "okay";
};

View file

@ -18,10 +18,6 @@ static const struct pin_config pinconf[] = {
{STM32_PIN_PA9, STM32F1_PINMUX_FUNC_PA9_USART1_TX},
{STM32_PIN_PA10, STM32F1_PINMUX_FUNC_PA10_USART1_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) && CONFIG_SERIAL
{STM32_PIN_PA2, STM32F1_PINMUX_FUNC_PA2_USART2_TX},
{STM32_PIN_PA3, STM32F1_PINMUX_FUNC_PA3_USART2_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) && CONFIG_SERIAL
{STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX},
{STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX},