diff options
author | Alexandre Torgue <alexandre.torgue@st.com> | 2017-10-16 13:45:58 +0200 |
---|---|---|
committer | Alexandre Torgue <alexandre.torgue@st.com> | 2017-10-16 14:01:25 +0200 |
commit | 162d58c26d65e1486d18436eb151148a7f9886e5 (patch) | |
tree | 4f581ff9db37769ff68f627a3367c94220907f87 /arch/arm/boot/dts/stm32f746.dtsi | |
parent | ARM: dts: stm32: Enable STM32H743 clock driver (diff) | |
download | linux-162d58c26d65e1486d18436eb151148a7f9886e5.tar.xz linux-162d58c26d65e1486d18436eb151148a7f9886e5.zip |
ARM: dts: stm32: change pinctrl bindings definition
Initially each pin was declared in "include/dt-bindings/stm32<SOC>-pinfunc.h"
and each definition contained SOC names (ex: STM32F429_PA9_FUNC_USART1_TX).
Since this approach was approved, the number of supported MCU has
increased (STM32F429/STM32F469/STM32f746/STM32H743). To avoid to add a new
file in "include/dt-bindings" each time a new STM32 SOC arrives I propose
a new approach which consist to use a macro to define pin muxing in device
tree. All STM32 will use the common macro to define pinmux. Furthermore, it
will make STM32 maintenance and integration of new SOC easier .
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Reviewed-by: Vikas MANOCHA <vikas.manocha@st.com>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/arm/boot/dts/stm32f746.dtsi')
-rw-r--r-- | arch/arm/boot/dts/stm32f746.dtsi | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/boot/dts/stm32f746.dtsi b/arch/arm/boot/dts/stm32f746.dtsi index 73bf8c1529a1..faaeca803943 100644 --- a/arch/arm/boot/dts/stm32f746.dtsi +++ b/arch/arm/boot/dts/stm32f746.dtsi @@ -42,7 +42,7 @@ #include "skeleton.dtsi" #include "armv7-m.dtsi" -#include <dt-bindings/pinctrl/stm32f746-pinfunc.h> +#include <dt-bindings/pinctrl/stm32-pinfunc.h> #include <dt-bindings/clock/stm32fx-clock.h> #include <dt-bindings/mfd/stm32f7-rcc.h> @@ -619,7 +619,7 @@ cec_pins_a: cec@0 { pins { - pinmux = <STM32F746_PA15_FUNC_HDMI_CEC>; + pinmux = <STM32_PINMUX('A', 15, AF4)>; /* HDMI CEC */ slew-rate = <0>; drive-open-drain; bias-disable; @@ -628,34 +628,34 @@ usart1_pins_a: usart1@0 { pins1 { - pinmux = <STM32F746_PA9_FUNC_USART1_TX>; + pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */ bias-disable; drive-push-pull; slew-rate = <0>; }; pins2 { - pinmux = <STM32F746_PA10_FUNC_USART1_RX>; + pinmux = <STM32_PINMUX('A', 10, AF7)>; /* USART1_RX */ bias-disable; }; }; usart1_pins_b: usart1@1 { pins1 { - pinmux = <STM32F746_PA9_FUNC_USART1_TX>; + pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */ bias-disable; drive-push-pull; slew-rate = <0>; }; pins2 { - pinmux = <STM32F746_PB7_FUNC_USART1_RX>; + pinmux = <STM32_PINMUX('B', 7, AF7)>; /* USART1_RX */ bias-disable; }; }; i2c1_pins_b: i2c1@0 { pins { - pinmux = <STM32F746_PB9_FUNC_I2C1_SDA>, - <STM32F746_PB8_FUNC_I2C1_SCL>; + pinmux = <STM32_PINMUX('B', 9, AF4)>, /* I2C1 SDA */ + <STM32_PINMUX('B', 8, AF4)>; /* I2C1 SCL */ bias-disable; drive-open-drain; slew-rate = <0>; |