public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mvebu: GPIO reset on GlobalScale Mirabox
@ 2015-03-25 21:33 Leigh Brown
  2015-03-25 22:16 ` Gregory CLEMENT
  0 siblings, 1 reply; 7+ messages in thread
From: Leigh Brown @ 2015-03-25 21:33 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for the system reset button on the GlobalScale Mirabox.
The reset button is connected via GPIO so add a gpio-keys entry for
it in the device tree file.  Patch is based on the implementation
in armada-370-netgear-rn102.dts but using the GPIO pin specified in
the original patch by Ezequiel Garcia from 2013.

Tested with the triggerhappy daemon.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
---
 arch/arm/boot/dts/armada-370-mirabox.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index e1b0eb6..41f453d 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -9,6 +9,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include "armada-370.dtsi"
 
@@ -78,6 +79,18 @@
 				};
 			};
 
+			gpio-keys {
+				compatible = "gpio-keys";
+				pinctrl-0 = <&reset_button_pin>;
+				pinctrl-names = "default";
+
+				reset-button {
+					label = "Reset Button";
+					linux,code = <KEY_RESTART>;
+					gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
+				};
+			};
+
 			mdio {
 				pinctrl-0 = <&mdio_pins>;
 				pinctrl-names = "default";
@@ -168,5 +181,10 @@
 		marvell,pins = "mpp64", "mpp65";
 		marvell,function = "gpio";
 	};
+
+	reset_button_pin: reset-button-pin {
+		marvell,pins = "mpp58";
+		marvell,function = "gpio";
+	};
 };
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-26 17:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 21:33 [PATCH] ARM: mvebu: GPIO reset on GlobalScale Mirabox Leigh Brown
2015-03-25 22:16 ` Gregory CLEMENT
2015-03-25 22:36   ` Andrew Lunn
2015-03-25 23:16     ` Leigh Brown
2015-03-25 23:10       ` Gregory CLEMENT
2015-03-26 17:16         ` Gregory CLEMENT
2015-03-25 23:00   ` Leigh Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox