ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / DCS-930.dts
index 3c89f84dd64961997b6657e057f19e91436a9cf9..1665e5417103055bde65d6c3daaefc34f3bcdf1e 100644 (file)
@@ -1,18 +1,16 @@
 /dts-v1/;
 
-/include/ "rt3050.dtsi"
+#include "rt3050.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
-       compatible = "DCS-930", "ralink,rt3050-soc";
+       compatible = "dlink,dcs-930", "ralink,rt3050-soc";
        model = "D-Link DCS-930";
 
-       pinctrl {
-               state_default: pinctrl0 {
-                       gpio {
-                               ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
-                               ralink,function = "gpio";
-                       };
-               };
+       aliases {
+               led-status = &led_status;
        };
 
        cfi@1f000000 {
 
                wifi {
                        label = "dcs-930:red:alert";
-                       gpios = <&gpio0 8 1>;
+                       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                };
 
-               power {
+               led_status: status {
                        label = "dcs-930:green:status";
-                       gpios = <&gpio0 9 1>;
+                       gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
 
                wps {
                        label = "dcs-930:blue:wps";
-                       gpios = <&gpio0 13 1>;
+                       gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
 
 
                wps {
                        label = "wps";
-                       gpios = <&gpio0 0 1>;
-                       linux,code = <0x101>;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <BTN_1>;
                };
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 10 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
+};
 
-       ethernet@10100000 {
-               mtd-mac-address = <&factory 0x4>;
+&pinctrl {
+       state_default: pinctrl0 {
+               gpio {
+                       ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
+                       ralink,function = "gpio";
+               };
        };
+};
 
-       esw@10110000 {
-               ralink,portmap = <0x2f>;
-       };
+&ethernet {
+       mtd-mac-address = <&factory 0x4>;
+};
 
-       wmac@10180000 {
-               ralink,mtd-eeprom = <&factory 0>;
-       };
+&esw {
+       mediatek,portmap = <0x2f>;
+};
 
-       otg@101c0000 {
-               status = "okay";
-       };
+&wmac {
+       ralink,mtd-eeprom = <&factory 0>;
+};
+
+&otg {
+       status = "okay";
 };