Subject: Add leds node to PCM051 device tree
From: Carsten Emde <C.Emde@osadl.org>
Date: Sun, 23 Mar 2014 11:46:46 +0100

Add green and yellow LED to device tree to provide user-settable trigger
conditions. Default green -> heartbeat, yellow -> SD card.

Signed-off-by: Carsten Emde <C.Emde@osadl.org>

---
 arch/arm/boot/dts/am335x-pcm051.dts |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Index: linux-3.12.13-rt21-r7s5/arch/arm/boot/dts/am335x-pcm051.dts
===================================================================
--- linux-3.12.13-rt21-r7s5.orig/arch/arm/boot/dts/am335x-pcm051.dts
+++ linux-3.12.13-rt21-r7s5/arch/arm/boot/dts/am335x-pcm051.dts
@@ -26,6 +26,13 @@
 
        am33xx_pinmux: pinmux@44e10800 {
 
+               user_leds_s0: user_leds_s0 {
+                       pinctrl-single,pins = <
+                               0xf8 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpio2_30 */
+                               0xfc (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpio2_31 */
+                       >;
+               };
+
                lcd_pins_s0: lcd_pins_s0 {
                        pinctrl-single,pins = <
                                0x20 0x01       /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
@@ -179,6 +186,26 @@
                        status = "okay";
                };
 
+               leds {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&user_leds_s0>;
+
+                       compatible = "gpio-leds";
+
+                       led@1 {
+                               label = "green";
+                               gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+                               linux,default-trigger = "heartbeat";
+                               default-state = "off";
+                       };
+
+                       led@2 {
+                               label = "yellow";
+                               gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
+                               linux,default-trigger = "mmc0";
+                               default-state = "off";
+                       };
+               };
 
                epwmss0: epwmss@48300000 {
                        status = "okay";