ramips: Use dts alias based status led
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / AWAPN2403.dts
index 7babe42d56f84397b06537d69055c9e84af08f23..8c8117005497af896694dba2cfc5765701f57c25 100644 (file)
@@ -2,16 +2,24 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
-       compatible = "AWAPN2403", "ralink,rt3052-soc";
+       compatible = "asiarf,awapn2403", "ralink,rt3052-soc";
        model = "AsiaRF AWAPN2403";
 
+       aliases {
+               led-status = &led_wps;
+       };
+
+
        gpio-leds {
                compatible = "gpio-leds";
 
-               link {
+               led_wps: wps {
                        label = "awapn2403:green:wps";
-                       gpios = <&gpio0 14 1>;
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
                };
        };
 
@@ -23,8 +31,8 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 0 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
 };
@@ -37,7 +45,6 @@
                #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
-               linux,modalias = "m25p80", "mx25l3205d";
                spi-max-frequency = <10000000>;
 
                partition@0 {