ARM: dts: stm32: use dedicated files to manage stm32mp157 packages
authorAlexandre Torgue <alexandre.torgue@st.com>
Wed, 10 Apr 2019 11:30:24 +0000 (13:30 +0200)
committerAlexandre Torgue <alexandre.torgue@st.com>
Tue, 21 May 2019 07:38:34 +0000 (09:38 +0200)
Four packages exist for stm32mp157 die. As ball-out is different between
them, this patch covers those differences by creating dedicated pinctrl
dtsi files. Each dtsi pinctrl package file describes the package ball-out
through gpio-ranges.

stm32mp157a-dk1 / dk2 boards embed a STM32MP_PKG_AC (TFBGA361 (12*12))
package.

stm32mp157c-ed1 / ev1 boards embed a STM32MP_PKG_AA (LFBGA448 (18*18))
package.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi
arch/arm/boot/dts/stm32mp157a-dk1.dts
arch/arm/boot/dts/stm32mp157c-ed1.dts
arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi [new file with mode: 0644]
arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi [new file with mode: 0644]

index 85c417d9983b98ec1001b340c1521cc0318c664e..60453d512cd17719552dcda78b551073f436d724 100644 (file)
@@ -26,6 +26,7 @@
                                st,bank-name = "GPIOA";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 0 16>;
+                               status = "disabled";
                        };
 
                        gpiob: gpio@50003000 {
@@ -38,6 +39,7 @@
                                st,bank-name = "GPIOB";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 16 16>;
+                               status = "disabled";
                        };
 
                        gpioc: gpio@50004000 {
@@ -50,6 +52,7 @@
                                st,bank-name = "GPIOC";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 32 16>;
+                               status = "disabled";
                        };
 
                        gpiod: gpio@50005000 {
@@ -62,6 +65,7 @@
                                st,bank-name = "GPIOD";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 48 16>;
+                               status = "disabled";
                        };
 
                        gpioe: gpio@50006000 {
@@ -74,6 +78,7 @@
                                st,bank-name = "GPIOE";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 64 16>;
+                               status = "disabled";
                        };
 
                        gpiof: gpio@50007000 {
@@ -86,6 +91,7 @@
                                st,bank-name = "GPIOF";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 80 16>;
+                               status = "disabled";
                        };
 
                        gpiog: gpio@50008000 {
                                st,bank-name = "GPIOG";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 96 16>;
+                               status = "disabled";
                        };
 
                        gpioh: gpio@50009000 {
                                st,bank-name = "GPIOH";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 112 16>;
+                               status = "disabled";
                        };
 
                        gpioi: gpio@5000a000 {
                                st,bank-name = "GPIOI";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 128 16>;
+                               status = "disabled";
                        };
 
                        gpioj: gpio@5000b000 {
                                st,bank-name = "GPIOJ";
                                ngpios = <16>;
                                gpio-ranges = <&pinctrl 0 144 16>;
+                               status = "disabled";
                        };
 
                        gpiok: gpio@5000c000 {
                                st,bank-name = "GPIOK";
                                ngpios = <8>;
                                gpio-ranges = <&pinctrl 0 160 8>;
+                               status = "disabled";
                        };
 
                        cec_pins_a: cec-0 {
                                st,bank-ioport = <11>;
                                ngpios = <8>;
                                gpio-ranges = <&pinctrl_z 0 400 8>;
+                               status = "disabled";
                        };
 
                        i2c4_pins_a: i2c4-0 {
index 098dbfb06b613bbc40b6018e1394964130be0b24..7b4733bad0c70142413d882e9d53d812392dcc70 100644 (file)
@@ -7,7 +7,7 @@
 /dts-v1/;
 
 #include "stm32mp157c.dtsi"
-#include "stm32mp157-pinctrl.dtsi"
+#include "stm32mp157xac-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mfd/st,stpmic1.h>
 
index 62a8c78e7e2e1c55e9831aa355cfccc5f3a9a670..f656b92d20606c9b8d7af46009cc8662d7fb2c88 100644 (file)
@@ -6,7 +6,7 @@
 /dts-v1/;
 
 #include "stm32mp157c.dtsi"
-#include "stm32mp157-pinctrl.dtsi"
+#include "stm32mp157xaa-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/mfd/st,stpmic1.h>
 
diff --git a/arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xaa-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..875adf5
--- /dev/null
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com>
+ */
+
+#include "stm32mp157-pinctrl.dtsi"
+/ {
+       soc {
+               pinctrl: pin-controller@50002000 {
+                       st,package = <STM32MP_PKG_AA>;
+
+                       gpioa: gpio@50002000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 0 16>;
+                       };
+
+                       gpiob: gpio@50003000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 16 16>;
+                       };
+
+                       gpioc: gpio@50004000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 32 16>;
+                       };
+
+                       gpiod: gpio@50005000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 48 16>;
+                       };
+
+                       gpioe: gpio@50006000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 64 16>;
+                       };
+
+                       gpiof: gpio@50007000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 80 16>;
+                       };
+
+                       gpiog: gpio@50008000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 96 16>;
+                       };
+
+                       gpioh: gpio@50009000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 112 16>;
+                       };
+
+                       gpioi: gpio@5000a000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 128 16>;
+                       };
+
+                       gpioj: gpio@5000b000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 144 16>;
+                       };
+
+                       gpiok: gpio@5000c000 {
+                               status = "okay";
+                               ngpios = <8>;
+                               gpio-ranges = <&pinctrl 0 160 8>;
+                       };
+               };
+
+               pinctrl_z: pin-controller-z@54004000 {
+                       st,package = <STM32MP_PKG_AA>;
+
+                       gpioz: gpio@54004000 {
+                               status = "okay";
+                               ngpios = <8>;
+                               gpio-ranges = <&pinctrl_z 0 400 8>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xab-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..961fa12
--- /dev/null
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com>
+ */
+
+#include "stm32mp157-pinctrl.dtsi"
+/ {
+       soc {
+               pinctrl: pin-controller@50002000 {
+                       st,package = <STM32MP_PKG_AB>;
+
+                       gpioa: gpio@50002000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 0 16>;
+                       };
+
+                       gpiob: gpio@50003000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 16 16>;
+                       };
+
+                       gpioc: gpio@50004000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 32 16>;
+                       };
+
+                       gpiod: gpio@50005000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 48 16>;
+                       };
+
+                       gpioe: gpio@50006000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 64 16>;
+                       };
+
+                       gpiof: gpio@50007000 {
+                               status = "okay";
+                               ngpios = <6>;
+                               gpio-ranges = <&pinctrl 6 86 6>;
+                       };
+
+                       gpiog: gpio@50008000 {
+                               status = "okay";
+                               ngpios = <10>;
+                               gpio-ranges = <&pinctrl 6 102 10>;
+                       };
+
+                       gpioh: gpio@50009000 {
+                               status = "okay";
+                               ngpios = <2>;
+                               gpio-ranges = <&pinctrl 0 112 2>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xac-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..26600f1
--- /dev/null
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com>
+ */
+
+#include "stm32mp157-pinctrl.dtsi"
+/ {
+       soc {
+               pinctrl: pin-controller@50002000 {
+                       st,package = <STM32MP_PKG_AC>;
+
+                       gpioa: gpio@50002000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 0 16>;
+                       };
+
+                       gpiob: gpio@50003000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 16 16>;
+                       };
+
+                       gpioc: gpio@50004000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 32 16>;
+                       };
+
+                       gpiod: gpio@50005000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 48 16>;
+                       };
+
+                       gpioe: gpio@50006000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 64 16>;
+                       };
+
+                       gpiof: gpio@50007000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 80 16>;
+                       };
+
+                       gpiog: gpio@50008000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 96 16>;
+                       };
+
+                       gpioh: gpio@50009000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 112 16>;
+                       };
+
+                       gpioi: gpio@5000a000 {
+                               status = "okay";
+                               ngpios = <12>;
+                               gpio-ranges = <&pinctrl 0 128 12>;
+                       };
+               };
+
+               pinctrl_z: pin-controller-z@54004000 {
+                       st,package = <STM32MP_PKG_AC>;
+
+                       gpioz: gpio@54004000 {
+                               status = "okay";
+                               ngpios = <8>;
+                               gpio-ranges = <&pinctrl_z 0 400 8>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157xad-pinctrl.dtsi
new file mode 100644 (file)
index 0000000..910113f
--- /dev/null
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * Copyright (C) STMicroelectronics 2019 - All Rights Reserved
+ * Author: Alexandre Torgue <alexandre.torgue@st.com>
+ */
+
+#include "stm32mp157-pinctrl.dtsi"
+/ {
+       soc {
+               pinctrl: pin-controller@50002000 {
+                       st,package = <STM32MP_PKG_AD>;
+
+                       gpioa: gpio@50002000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 0 16>;
+                       };
+
+                       gpiob: gpio@50003000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 16 16>;
+                       };
+
+                       gpioc: gpio@50004000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 32 16>;
+                       };
+
+                       gpiod: gpio@50005000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 48 16>;
+                       };
+
+                       gpioe: gpio@50006000 {
+                               status = "okay";
+                               ngpios = <16>;
+                               gpio-ranges = <&pinctrl 0 64 16>;
+                       };
+
+                       gpiof: gpio@50007000 {
+                               status = "okay";
+                               ngpios = <6>;
+                               gpio-ranges = <&pinctrl 6 86 6>;
+                       };
+
+                       gpiog: gpio@50008000 {
+                               status = "okay";
+                               ngpios = <10>;
+                               gpio-ranges = <&pinctrl 6 102 10>;
+                       };
+
+                       gpioh: gpio@50009000 {
+                               status = "okay";
+                               ngpios = <2>;
+                               gpio-ranges = <&pinctrl 0 112 2>;
+                       };
+               };
+       };
+};