ARM: dts: sun9i: Add GPIO LEDs for A80 Optimus board
authorChen-Yu Tsai <wens@csie.org>
Fri, 31 Oct 2014 03:05:49 +0000 (11:05 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sun, 23 Nov 2014 15:53:03 +0000 (16:53 +0100)
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>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun9i-a80-optimus.dts

index 955436a..87b1355 100644 (file)
                                /* Enable internal pull-up */
                                allwinner,pull = <1>;
                        };
+
+                       led_pins_optimus: led-pins@0 {
+                               allwinner,pins = "PH0", "PH1";
+                               allwinner,function = "gpio_out";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
                };
 
                uart0: serial@07000000 {
                        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>;
+               };
+       };
 };