dts: arm: stm32f3: Add pinctrl node and uart pin configurations
Add needed uart pinctrl configuration in pinmux node. This is done thanks to <soc>-pinctrl.dtsi file matching <soc>.dtsi files Populate stm32 f3 based boards dts files with references to uart pinctrl nodes Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
e514554cd1
commit
bcdb4825a4
5 changed files with 98 additions and 1 deletions
|
@ -18,7 +18,22 @@
|
|||
};
|
||||
};
|
||||
|
||||
&usart2 {
|
||||
&usart1 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart1_pins_b>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&usart2 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart2_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&usart3 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart3_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
|
68
dts/arm/st/stm32f3-pinctrl.dtsi
Normal file
68
dts/arm/st/stm32f3-pinctrl.dtsi
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Linaro Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <dt-bindings/pinctrl/stm32-pinctrl.h>
|
||||
|
||||
/ {
|
||||
soc {
|
||||
pinctrl: pin-controller {
|
||||
usart1_pins_a: usart1@0 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PB6 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PB7 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart1_pins_b: usart1@1 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PA10 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PA9 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart1_pins_c: usart1@2 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PG10 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PB6 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart2_pins_a: usart2@0 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PA3 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PA2 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart2_pins_b: usart2@1 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PA15 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PA2 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart2_pins_c: usart2@2 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PD6 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PA2 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart2_pins_d: usart2@3 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PD6 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PD5 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart3_pins_a: usart3@0 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PB11 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PB10 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
usart3_pins_b: usart3@1 {
|
||||
rx_tx {
|
||||
rx = <STM32_PIN_PD9 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
|
||||
tx = <STM32_PIN_PD8 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <st/stm32f3-pinctrl.dtsi>
|
||||
#include <arm/armv7-m.dtsi>
|
||||
#include <st/mem.h>
|
||||
#include <dt-bindings/clock/stm32_clock.h>
|
||||
|
@ -39,6 +40,13 @@
|
|||
label = "STM32_CLK_RCC";
|
||||
};
|
||||
|
||||
pinctrl: pin-controller {
|
||||
compatible = "st,stm32-pinmux";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x48000000 0x1800>;
|
||||
};
|
||||
|
||||
usart1: serial@40013800 {
|
||||
compatible = "st,stm32-usart", "st,stm32-uart";
|
||||
reg = <0x40013800 0x400>;
|
||||
|
|
|
@ -20,5 +20,7 @@
|
|||
|
||||
&usart2 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart2_pins_d>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
|
|
@ -20,10 +20,14 @@
|
|||
|
||||
&usart1 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart1_pins_b>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&usart2 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&usart2_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue