public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: wens@csie.org (Chen-Yu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/6] ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
Date: Fri, 31 Oct 2014 11:05:49 +0800	[thread overview]
Message-ID: <1414724751-25580-5-git-send-email-wens@csie.org> (raw)
In-Reply-To: <1414724751-25580-1-git-send-email-wens@csie.org>

The A80 Optimus board has 3 usable LEDs that are controlled via GPIO.

This patch adds support for 2 of them which are driver by GPIOs in the
main pin controller. The remaining one uses GPIO from the R_PIO
controller, which we don't support yet.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun9i-a80-optimus.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index 955436a..87b1355 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -64,6 +64,13 @@
 				/* Enable internal pull-up */
 				allwinner,pull = <1>;
 			};
+
+			led_pins_optimus: led-pins at 0 {
+				allwinner,pins = "PH0", "PH1";
+				allwinner,function = "gpio_out";
+				allwinner,drive = <0>;
+				allwinner,pull = <0>;
+			};
 		};
 
 		uart0: serial at 07000000 {
@@ -78,4 +85,24 @@
 			status = "okay";
 		};
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&led_pins_optimus>;
+
+		/* The LED names match those found on the board */
+
+		led2 {
+			label = "optimus:led2:usr";
+			gpios = <&pio 7 1 0>;
+		};
+
+		/* led3 is on PM15, in R_PIO */
+
+		led4 {
+			label = "optimus:led4:usr";
+			gpios = <&pio 7 0 0>;
+		};
+	};
 };
-- 
2.1.1

  parent reply	other threads:[~2014-10-31  3:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31  3:05 [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Chen-Yu Tsai
2014-10-31  3:05 ` [PATCH v2 1/6] ARM: dts: sun9i: Add i2c controller nodes to a80 dtsi Chen-Yu Tsai
2014-10-31  3:05 ` [PATCH v2 2/6] ARM: dts: sun9i: Add i2c3 pinmux setting for A80 SoC Chen-Yu Tsai
2014-10-31  3:05 ` [PATCH v2 3/6] ARM: dts: sun9i: Enable i2c3 on A80 Optimus board Chen-Yu Tsai
2014-10-31  3:05 ` Chen-Yu Tsai [this message]
2014-10-31  3:05 ` [PATCH v2 5/6] ARM: dts: sun9i: Add uart4 pinmux setting for A80 SoC Chen-Yu Tsai
2014-10-31  3:05 ` [PATCH v2 6/6] ARM: dts: sun9i: Enable uart4 for A80 Optimus board Chen-Yu Tsai
2014-10-31  8:27 ` [PATCH v2 0/6] ARM: sun9i: Enable extra uarts, leds and i2c controllers Maxime Ripard

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=1414724751-25580-5-git-send-email-wens@csie.org \
    --to=wens@csie.org \
    --cc=linux-arm-kernel@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