ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / PWH2004.dts
index 51f43928f4601b04b0b15ed2e4fd9ecaa62885f0..332e82265f757557b439d1c537256ecf6c0dbe5a 100644 (file)
@@ -2,10 +2,17 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
-       compatible = "PWH2004", "ralink,rt3052-soc";
+       compatible = "prolink,pwh2004", "ralink,rt3052-soc";
        model = "Prolink PWH2004";
 
+       aliases {
+               led-status = &led_power;
+       };
+
        cfi@1f000000 {
                compatible = "cfi-flash";
                reg = <0x1f000000 0x800000>;
 
                wifi {
                        label = "pwh2004:red:wifi";
-                       gpios = <&gpio0 14 1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
 
-               power {
+               led_power: power {
                        label = "pwh2004:green:power";
-                       gpios = <&gpio0 9 1>;
+                       gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
                };
        };
 
@@ -60,8 +67,8 @@
 
                wps {
                        label = "wps";
-                       gpios = <&gpio0 12 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
 };