[U-Boot] [PATCH v2 4/4] ARM: dts: Add STMFX gpio expander support for stm32mp157c-ev1

Patrice Chotard patrice.chotard at st.com
Mon Mar 11 10:13:18 UTC 2019


Adds alias to set the pincontrol seq id.
For STMFX gpio expander, force sequence number after
the last bank (GPIOZ) to avoid conflict between STM32MP and STMFX
gpio bank sequence number.


Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
Signed-off-by: Patrice Chotard <patrice.chotard at st.com>



---

Changes in v2:
  _ Add missing pinctrl2 alias in stm32mp157c-ev1-u-boot.dtsi
  _ Move pinctrl0 and pinctrl1 aliases in stm32mp157c-u-boot.dtsi
  _ Set stmfx_pinctrl status to "okay"

 arch/arm/dts/stm32mp157-u-boot.dtsi      |  2 ++
 arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi |  2 ++
 arch/arm/dts/stm32mp157c-ev1.dts         | 18 ++++++++++++++++++
 3 files changed, 22 insertions(+)

diff --git a/arch/arm/dts/stm32mp157-u-boot.dtsi b/arch/arm/dts/stm32mp157-u-boot.dtsi
index 2594702c926f..ab6f673ea24c 100644
--- a/arch/arm/dts/stm32mp157-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157-u-boot.dtsi
@@ -17,6 +17,8 @@
 		gpio9 = &gpioj;
 		gpio10 = &gpiok;
 		gpio25 = &gpioz;
+		pinctrl0 = &pinctrl;
+		pinctrl1 = &pinctrl_z;
 	};
 
 	config {
diff --git a/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi b/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi
index be3b1526288f..6a18d032ae54 100644
--- a/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi
@@ -7,8 +7,10 @@
 
 / {
 	aliases {
+		gpio26 = &stmfx_pinctrl;
 		i2c1 = &i2c2;
 		i2c4 = &i2c5;
+		pinctrl2 = &stmfx_pinctrl;
 		spi0 = &qspi;
 	};
 };
diff --git a/arch/arm/dts/stm32mp157c-ev1.dts b/arch/arm/dts/stm32mp157c-ev1.dts
index e114c9b628b8..3c85909c42bd 100644
--- a/arch/arm/dts/stm32mp157c-ev1.dts
+++ b/arch/arm/dts/stm32mp157c-ev1.dts
@@ -98,6 +98,24 @@
 	i2c-scl-rising-time-ns = <185>;
 	i2c-scl-falling-time-ns = <20>;
 	status = "okay";
+
+	stmfx: stmfx at 42 {
+		compatible = "st,stmfx-0300";
+		reg = <0x42>;
+		interrupts = <8 IRQ_TYPE_EDGE_RISING>;
+		interrupt-parent = <&gpioi>;
+		vdd-supply = <&v3v3>;
+
+		stmfx_pinctrl: stmfx-pin-controller {
+			compatible = "st,stmfx-0300-pinctrl";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			gpio-ranges = <&stmfx_pinctrl 0 0 24>;
+			status = "okay";
+		};
+	};
 };
 
 &i2c5 {
-- 
1.9.1



More information about the U-Boot mailing list