From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [RFC v2 10/10] WIP: MIPS: black-swift: use GPIO
Date: Mon, 21 Sep 2015 02:23:53 +0300 [thread overview]
Message-ID: <1442791433-10892-11-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1442791433-10892-1-git-send-email-antonynpavlov@gmail.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-09-20 23:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-20 23:23 [RFC v2 00/10] MIPS: barebox as a first stage loader on the Black Swift board Antony Pavlov
2015-09-20 23:23 ` [RFC v2 01/10] MIPS: ar933x: pbl: add pbl_ar9331_pll macro Antony Pavlov
2015-09-20 23:23 ` [RFC v2 02/10] MIPS: ar933x: pbl: add pbl_ar9331_ddr2_config macro Antony Pavlov
2015-09-20 23:23 ` [RFC v2 03/10] MIPS: mach-ath79: add pbl_ar9331_uart_enable macro Antony Pavlov
2015-09-20 23:23 ` [RFC v2 04/10] MIPS: mach-ath79: add debug_ll_ar9331_init macro Antony Pavlov
2015-09-20 23:23 ` [RFC v2 05/10] MIPS: ath79: add black-swift board support Antony Pavlov
2015-09-20 23:23 ` [RFC v2 06/10] MIPS: add black-swift_defconfig Antony Pavlov
2015-09-20 23:23 ` [RFC v2 07/10] gpio: add ath79-gpio driver for Atheros MIPS SoCs Antony Pavlov
2015-09-20 23:23 ` [RFC v2 08/10] MIPS: ath79: use gpiolib Antony Pavlov
2015-09-20 23:23 ` [RFC v2 09/10] MIPS: dts: ar9331.dtsi: add gpio Antony Pavlov
2015-09-20 23:23 ` Antony Pavlov [this message]
2015-09-23 4:53 ` [RFC v2 00/10] MIPS: barebox as a first stage loader on the Black Swift board Sascha Hauer
2015-09-23 6:11 ` Antony Pavlov
2015-09-23 8:32 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442791433-10892-11-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox