ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wa801nd-v5.dts
index 0336730a4b15c950bfcefd3aa1e0deb2af80f189..af1a758d789b1fa078ee1180257682aee29a0718 100644 (file)
@@ -1,10 +1,5 @@
-/dts-v1/;
-
 #include "mt7628an_tplink_8m.dtsi"
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-
 / {
        compatible = "tplink,tl-wa801nd-v5", "mediatek,mt7628an-soc";
        model = "TP-Link TL-WA801ND v5";
 
                reset {
                        label = "reset";
-                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
+
+               wps {
+                       label = "wps";
+                       gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_WPS_BUTTON>;
+               };
        };
 
        leds {
                compatible = "gpio-leds";
 
                led_power: power {
-                       label = "tl-wa801nd-v5:green:power";
-                       gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+                       function = LED_FUNCTION_POWER;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
                };
 
                lan {
-                       label = "tl-wa801nd-v5:green:lan";
-                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+                       function = LED_FUNCTION_LAN;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "tl-wa801nd-v5:green:wlan";
-                       gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "phy0tpt";
                };
 
-               wps {
-                       label = "tl-wa801nd-v5:orange:wps";
-                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+               wps_red {
+                       function = LED_FUNCTION_WPS;
+                       color = <LED_COLOR_ID_RED>;
+                       gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
+               };
+
+               wps_green {
+                       function = LED_FUNCTION_WPS;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
                };
        };
 };
 
-&pinctrl {
-       state_default: pinctrl0 {
-               gpio {
-                       ralink,group = "p0led_an", "perst", "refclk", "wdt", "wled_an";
-                       ralink,function = "gpio";
-               };
+&ehci {
+       status = "disabled";
+};
+
+&ohci {
+       status = "disabled";
+};
+
+&state_default {
+       gpio {
+               groups = "p0led_an", "p1led_an", "perst", "refclk",
+                               "uart1", "wdt", "wled_an";
+               function = "gpio";
        };
 };
+
+&wmac {
+       status = "okay";
+
+       nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100 0>;
+       nvmem-cell-names = "eeprom", "mac-address";
+#include <dt-bindings/leds/common.h>
+
+};