[RFC v2 10/10] WIP: MIPS: black-swift: use GPIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
---
 arch/mips/boot/start.S        |  2 ++
 arch/mips/dts/black-swift.dts | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index 1ddce95..d6449e1 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -34,6 +34,8 @@ EXPORT(_start)
 
 	mips_disable_interrupts
 
+	pbl_reg_set (1 << 18), 0xb80600ac
+
 	copy_to_link_location _start
 
 	stack_setup
diff --git a/arch/mips/dts/black-swift.dts b/arch/mips/dts/black-swift.dts
index 270374d..e2d1271 100644
--- a/arch/mips/dts/black-swift.dts
+++ b/arch/mips/dts/black-swift.dts
@@ -1,6 +1,8 @@
 /dts-v1/;
 
 #include "ar9331.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Black Swift";
@@ -13,6 +15,26 @@
 	aliases {
 		spiflash = &spiflash;
 	};
+
+	buttons {
+		compatible = "gpio-keys";
+
+		s1 {
+			label = "S1";
+			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_UP>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		s1 {
+			label = "LED1";
+			gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
 };
 
 &serial0 {
@@ -32,3 +54,7 @@
 		reg = <0>;
 	};
 };
+
+&gpio {
+	status = "okay";
+};
-- 
2.5.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux