sunxi: a10-cubieboard: Add user LEDs to the device tree
authorEmilio López <emilio@elopez.com.ar>
Mon, 28 Jan 2013 11:27:44 +0000 (08:27 -0300)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 5 Mar 2013 20:02:04 +0000 (21:02 +0100)
Cubieboard has two LEDs available for use, a blue one (labeled LED1)
and a green one (labeled LED2).

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun4i-a10-cubieboard.dts

index 5cab8254043776d892cc001c9ddda31a4c51e8b7..88e2dc13fd4d64ec40a8df26349d5981e2f2ad16 100644 (file)
        };
 
        soc {
+               pinctrl@01c20800 {
+                       led_pins_cubieboard: led_pins@0 {
+                               allwinner,pins = "PH20", "PH21";
+                               allwinner,function = "gpio_out";
+                               allwinner,drive = <1>;
+                               allwinner,pull = <0>;
+                       };
+               };
+
                uart0: uart@01c28000 {
                        status = "okay";
                };
                        status = "okay";
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins_cubieboard>;
+
+               blue {
+                       label = "cubieboard::blue";
+                       gpios = <&pio 7 21 0>; /* LED1 */
+               };
+
+               green {
+                       label = "cubieboard::green";
+                       gpios = <&pio 7 20 0>; /* LED2 */
+                       linux,default-trigger = "heartbeat";
+               };
+       };
 };