ramips: add support for indicating the boot state using multiple leds
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / NA930.dts
index a5393e2a9a2203c684bc60b66ff226a97f96a874..9b734a850a8e0b8f75ca6a7d1afd637984579847 100644 (file)
@@ -2,66 +2,76 @@
 
 #include "mt7620a.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
 / {
-       compatible = "ralink,mt7620a-soc";
+       compatible = "sercomm,na930", "ralink,mt7620a-soc";
        model = "Sercomm NA930";
 
+       aliases {
+               led-boot = &led_power;
+               led-failsafe = &led_power;
+               led-running = &led_power;
+               led-upgrade = &led_power;
+       };
+
        chosen {
                bootargs = "console=ttyS1,57600";
        };
 
        nand {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "mtk,mt7620-nand";
 
-               partition@0 {
-                       label = "u-boot";
-                       reg = <0x0 0x20000>;
-                       read-only;
-               };
-
-               partition@200000 {
-                       label = "factory";
-                       reg = <0x200000 0x40000>;
-                       read-only;
-               };
-
-               partition@240000 {
-                       label = "Config";
-                       reg = <0x240000 0x400000>;
-                       read-only;
-               };
-
-               partition@640000 {
-                       label = "firmware";
-                       reg = <0x640000 0x1400000>;
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "u-boot";
+                               reg = <0x0 0x20000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               label = "factory";
+                               reg = <0x200000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@240000 {
+                               label = "Config";
+                               reg = <0x240000 0x400000>;
+                               read-only;
+                       };
+
+                       partition@640000 {
+                               label = "firmware";
+                               reg = <0x640000 0x1400000>;
+                       };
                };
        };
 
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <20>;
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 11 1>;
+                       gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
 
                zwave {
                        label = "zwave";
-                       gpios = <&gpio0 12 1>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                        linux,code = <BTN_0>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio0 14 1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
 
                zwave {
                        label = "na930:blue:zwave";
-                       gpios = <&gpio2 0 1>;
+                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
                };
 
                status {
                        label = "na930:blue:status";
-                       gpios = <&gpio2 26 1>;
+                       gpios = <&gpio2 26 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&ohci_port1>, <&ehci_port1>;
+                       linux,default-trigger = "usbport";
                };
 
                service {
                        label = "na930:blue:service";
-                       gpios = <&gpio2 28 1>;
+                       gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
                };
 
-               power {
+               led_power: power {
                        label = "na930:blue:power";
-                       gpios = <&gpio2 29 1>;
+                       gpios = <&gpio2 29 GPIO_ACTIVE_LOW>;
                };
        };
 
                telit {
                        gpio-export,name = "telit";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 13 0>;
+                       gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
                };
        };
 };