Skip to contentSkip to conversation

ARM: dts: aspeed: rainier: gpio-keys for PSU presence

PATCH In review Brandon Wyman 2 participants 2 messages Oct 28, 2019 – Oct 31, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: aspeed: rainier: gpio-keys for PSU presence

Add in a gpio-keys section to the Rainier device tree source, add in the power supply presence GPIOs.

---
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +29 -0
index efb1e99b5124..6dee4bf1deef 100644
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "aspeed-g6.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
 
 / {
 	model = "Rainier";
@@ -33,6 +34,34 @@
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		ps0-presence {
+			label = "ps0-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 0) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 0)>;
+		};
+
+		ps1-presence {
+			label = "ps1-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 1) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 1)>;
+		};
+
+		ps2-presence {
+			label = "ps2-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 2)>;
+		};
+
+		ps3-presence {
+			label = "ps3-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 3) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 3)>;
+		};
+	};
+
 };
 
 &emmc_controller {
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Brandon Wyman

Add in a gpio-keys section to the Rainier device tree source, add in the power supply presence GPIOs.

Quoted 53 lines
---
  arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 29 ++++++++++++++++++++
  1 file changed, 29 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +29 -0
index efb1e99b5124..6dee4bf1deef 100644
@@ -3,6 +3,7 @@
  /dts-v1/;
 
  #include "aspeed-g6.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
 
  / {
  	model = "Rainier";
@@ -33,6 +34,34 @@
  		};
  	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		ps0-presence {
+			label = "ps0-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 0) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 0)>;
+		};
+
+		ps1-presence {
+			label = "ps1-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 1) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 1)>;
+		};
+
+		ps2-presence {
+			label = "ps2-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 2)>;
+		};
+
+		ps3-presence {
+			label = "ps3-presence";
+			gpios = <&gpio0 ASPEED_GPIO(S, 3) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(S, 3)>;
+		};
+	};
+
  };
 
  &emmc_controller {