Skip to contentSkip to conversation

arm64: dts: stratix10: add gpio header

PATCH In review Alan Tull 2 participants 3 messages Oct 10, 2017 – Oct 11, 2017

Subsystems (2)
lore
Share & tools
lore

Alan Tull

author
#0 lore raw

PATCH 1/2 arm64: dts: stratix10: add gpio header

Add the gpio header to the base stratix10 dtsi.

---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +1 -0
index 6804936..721b91a 100644
@@ -16,6 +16,7 @@
 
 /dts-v1/;
 #include <dt-bindings/reset/altr,rst-mgr-s10.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	compatible = "altr,socfpga-stratix10";
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/2 arm64: dts: stratix10: enable gpio and leds

Enable gpio and leds for socdk OOBE daughtercard.

pushbutton PB_SW0 = gpio1.io4
pushbutton PB_SW1 = gpio1.io5

LED HPS_LED0      = gpio1.io20
LED HPS_LED1      = gpio1.io19
LED HPS_LED2      = gpio1.io21
---
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts +22 -0
index 46f27ed..a37c461 100644
@@ -27,6 +27,24 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	leds {
+		compatible = "gpio-leds";
+		hps0 {
+			label = "hps_led0";
+			gpios = <&portb 20 GPIO_ACTIVE_HIGH>;
+		};
+
+		hps1 {
+			label = "hps_led1";
+			gpios = <&portb 19 GPIO_ACTIVE_HIGH>;
+		};
+
+		hps2 {
+			label = "hps_led2";
+			gpios = <&portb 21 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
 	memory {
 		device_type = "memory";
 		/* We expect the bootloader to fill in the reg */
@@ -34,6 +52,10 @@
 	};
 };
 
+&gpio1 {
+	status = "okay";
+};
+
 &gmac0 {
 	status = "okay";
 	phy-mode = "rgmii";
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Re: [PATCH 2/2] arm64: dts: stratix10: enable gpio and leds

Quoted 4 lines · Alan Tull

Enable gpio and leds for socdk OOBE daughtercard.

pushbutton PB_SW0 = gpio1.io4
pushbutton PB_SW1 = gpio1.io5

Quoted 9 lines
LED HPS_LED0      = gpio1.io20
LED HPS_LED1      = gpio1.io19
LED HPS_LED2      = gpio1.io21
---
 .../boot/dts/altera/socfpga_stratix10_socdk.dts    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Both patches applied, thanks Alan!

Dinh