ramips: Use dts alias based status led
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / A5-V11.dts
index 51eb00587460634fd19ef6c6156bec909bb9d3ee..920a121994f19d3831684ecbb7bc4c6c71f62573 100644 (file)
@@ -2,21 +2,28 @@
 
 #include "rt5350.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
-       compatible = "A5-V11", "ralink,rt5350-soc";
+       compatible = "unbranded,a5-v11", "ralink,rt5350-soc";
        model = "A5-V11";
 
+       aliases {
+               led-status = &led_power;
+       };
+
        gpio-leds {
                compatible = "gpio-leds";
 
                system {
                        label = "a5-v11:blue:system";
-                       gpios = <&gpio0 20 1>;
+                       gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
                };
 
-               power {
+               led_power: power {
                        label = "a5-v11:red:power";
-                       gpios = <&gpio0 17 1>;
+                       gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
                };
        };
 
@@ -28,8 +35,8 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 0 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
        };
 
                usb {
                        gpio-export,name = "usb";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 7 0>;
+                       gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
                };
 
                root_hub {
                        gpio-export,name = "root_hub";
                        gpio-export,output = <1>;
-                       gpios = <&gpio0 12 0>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
                };
        };
 };
@@ -59,7 +66,6 @@
                #size-cells = <1>;
                compatible = "jedec,spi-nor";
                reg = <0>;
-               linux,modalias = "m25p80", "pm25lq032";
                spi-max-frequency = <10000000>;
 
                partition@0 {