powerpc/83xx: Add MCU LEDs support for MPC837xRDB and MPC8315RDB boards
authorAnton Vorontsov <avorontsov@mvista.com>
Sun, 2 May 2010 17:27:05 +0000 (21:27 +0400)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 17 May 2010 15:55:32 +0000 (10:55 -0500)
There are two front-panel LEDs on MPC837xRDB and MPC8315RDB boards: PWR
and HDD. After adding appropriate nodes we can program these LEDs from
kernel and user space.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/boot/dts/mpc8315erdb.dts
arch/powerpc/boot/dts/mpc8377_rdb.dts
arch/powerpc/boot/dts/mpc8378_rdb.dts
arch/powerpc/boot/dts/mpc8379_rdb.dts
arch/powerpc/platforms/83xx/mpc831x_rdb.c
arch/powerpc/platforms/83xx/mpc837x_rdb.c

index 508b770..4dd08c3 100644 (file)
                                  0 0x00800000>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 9e2264b..dbc1b98 100644 (file)
                                  0 0x00800000>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 4e6a1a4..3447eb9 100644 (file)
                                  0 0x00800000>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 72336d5..15560c6 100644 (file)
                compatible = "fsl,mpc8349-pci";
                device_type = "pci";
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pwr {
+                       gpios = <&mcu_pio 0 0>;
+                       default-state = "on";
+               };
+
+               hdd {
+                       gpios = <&mcu_pio 1 0>;
+                       linux,default-trigger = "ide-disk";
+               };
+       };
 };
index 0b4f883..ae525e4 100644 (file)
@@ -74,6 +74,7 @@ static int __init mpc831x_rdb_probe(void)
 static struct of_device_id __initdata of_bus_ids[] = {
        { .compatible = "simple-bus" },
        { .compatible = "gianfar" },
+       { .compatible = "gpio-leds", },
        {},
 };
 
index a1908d2..e00801c 100644 (file)
@@ -72,6 +72,7 @@ static struct of_device_id mpc837x_ids[] = {
        { .compatible = "soc", },
        { .compatible = "simple-bus", },
        { .compatible = "gianfar", },
+       { .compatible = "gpio-leds", },
        {},
 };