arm: mvebu: Add GPIO LEDs to Mirabox board
authorRyan Press <ryan@presslab.us>
Fri, 29 Mar 2013 02:10:24 +0000 (19:10 -0700)
committerJason Cooper <jason@lakedaemon.net>
Sun, 31 Mar 2013 00:27:46 +0000 (00:27 +0000)
Add the three external LED definitions to the device tree file on
the Mirabox.

The Mirabox user guide calls out one as a power LED, and the other
two are defined for WiFi, but as the current mwifiex drivers don't
have LED support, we make them status LEDs.

These have been tested working by writing to the appropriate
/sys/class/leds trigger.

Signed-off-by: Ryan Press <ryan@presslab.us>
Tested-by: Neil Greatorex <neil@fatboyfat.co.uk>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/boot/dts/armada-370-mirabox.dts

index 193ae1467816009ab658eac727f8d563c60d91e0..8cfae34e3e02cab8c47f658370ad94a98d87b70c 100644 (file)
                        clock-frequency = <600000000>;
                        status = "okay";
                };
+
+               pinctrl {
+                       pwr_led_pin: pwr-led-pin {
+                               marvell,pins = "mpp63";
+                               marvell,function = "gpo";
+                       };
+
+                       stat_led_pins: stat-led-pins {
+                               marvell,pins = "mpp64", "mpp65";
+                               marvell,function = "gpio";
+                       };
+               };
+
+               gpio_leds {
+                       compatible = "gpio-leds";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pwr_led_pin &stat_led_pins>;
+
+                       green_pwr_led {
+                               label = "mirabox:green:pwr";
+                               gpios = <&gpio1 31 1>;
+                               linux,default-trigger = "heartbeat";
+                       };
+
+                       blue_stat_led {
+                               label = "mirabox:blue:stat";
+                               gpios = <&gpio2 0 1>;
+                               linux,default-trigger = "cpu0";
+                       };
+
+                       green_stat_led {
+                               label = "mirabox:green:stat";
+                               gpios = <&gpio2 1 1>;
+                               default-state = "off";
+                       };
+               };
+
                mdio {
                        phy0: ethernet-phy@0 {
                                reg = <0>;