ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WL-351.dts
index 541f8cef992f333a72685644ca93a7f365f28028..59ef573f042c811bd5c35c3f6a9292057986001f 100644 (file)
@@ -2,10 +2,17 @@
 
 #include "rt3050.dtsi"
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
 / {
-       compatible = "WL-351", "ralink,rt3052-soc";
+       compatible = "sitecom,wl-351", "ralink,rt3052-soc";
        model = "Sitecom WL-351 v1 002";
 
+       aliases {
+               led-status = &led_power;
+       };
+
        cfi@1f000000 {
                compatible = "cfi-flash";
                reg = <0x1f000000 0x800000>;
        gpio-leds {
                compatible = "gpio-leds";
 
-               power {
+               led_power: power {
                        label = "wl-351:amber:power";
-                       gpios = <&gpio0 8 1>;
+                       gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
                };
 
                unpopulated {
                        label = "wl-351:amber:unpopulated";
-                       gpios = <&gpio0 12 1>;
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                };
 
                unpopulated2 {
                        label = "wl-351:blue:unpopulated";
-                       gpios = <&gpio0 13 1>;
+                       gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                };
        };
 
 
                reset {
                        label = "reset";
-                       gpios = <&gpio0 10 1>;
-                       linux,code = <0x198>;
+                       gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_RESTART>;
                };
 
                wps {
                        label = "wps";
-                       gpios = <&gpio0 0 1>;
-                       linux,code = <0x211>;
+                       gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_WPS_BUTTON>;
                };
        };
 
        rtl8366rb {
-               compatible = "rtl8366rb";
-               gpio-sda = <&gpio0 1 0>;
-               gpio-sck = <&gpio0 2 0>;
+               compatible = "realtek,rtl8366rb";
+               gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+               gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
        };
 };
 
                        ralink,group = "spi", "i2c", "jtag", "mdio", "uartf";
                        ralink,function = "gpio";
                };
-               rgmii {
-                       ralink,group = "rgmii";
-                       ralink,function = "rgmii";
-               };
        };
 };
 
 &ethernet {
        mtd-mac-address = <&factory 0x4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
 };
 
 &esw {