boards: nucleo_f302r8: configure serial pins from DT

usart1, usart2, usart3 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
This commit is contained in:
Jeremy LOCHE 2020-10-06 10:51:01 +02:00 committed by Kumar Gala
commit edaab9a6f7
2 changed files with 3 additions and 12 deletions

View file

@ -52,14 +52,17 @@
};
&usart1 {
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
current-speed = <115200>;
status = "okay";
};
&usart2 {
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
current-speed = <115200>;
status = "okay";
};
&usart3 {
pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>;
current-speed = <115200>;
status = "okay";
};

View file

@ -14,18 +14,6 @@
/* pin assignments for NUCLEO-F302R8 board */
static const struct pin_config pinconf[] = {
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart1), okay) && CONFIG_SERIAL
{STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_USART1_TX},
{STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_USART1_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart2), okay) && CONFIG_SERIAL
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},
{STM32_PIN_PA3, STM32F3_PINMUX_FUNC_PA3_USART2_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usart3), okay) && CONFIG_SERIAL
{STM32_PIN_PC10, STM32F3_PINMUX_FUNC_PC10_USART3_TX},
{STM32_PIN_PC11, STM32F3_PINMUX_FUNC_PC11_USART3_RX},
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C
{STM32_PIN_PB8, STM32F3_PINMUX_FUNC_PB8_I2C1_SCL},
{STM32_PIN_PB9, STM32F3_PINMUX_FUNC_PB9_I2C1_SDA},