]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: dts: aspeed: rainier: gpio-keys for PSU presence
authorBrandon Wyman <bjwyman@gmail.com>
Mon, 28 Oct 2019 21:47:54 +0000 (16:47 -0500)
committerJoel Stanley <joel@jms.id.au>
Fri, 1 Nov 2019 10:24:46 +0000 (20:54 +1030)
Add in a gpio-keys section to the Rainier device tree source, add in the
power supply presence GPIOs.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts

index a63b0642f1044e55d835cc0b05bedf581fc9cc89..c1c9cd30f9803cd20cf7bdcb4f15b9479a4e0b39 100644 (file)
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include "aspeed-g6.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
 
 / {
        model = "Rainier";
@@ -33,6 +34,34 @@ flash_memory: region@B8000000 {
                };
        };
 
+       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 {