ramips: add TP-LINK TL-WR902AC v4
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wr840n-v4.dts
index 1fc2316d703d776a0ca1ce2831090c416a43d9e5..e480395ffd46fbe9dee5a724d1faab6f1e8a183b 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-wr840n-v4", "mediatek,mt7628an-soc";
        model = "TP-Link TL-WR840N v4";
@@ -21,7 +16,7 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };
                compatible = "gpio-leds";
 
                lan {
-                       label = "tl-wr840n-v4:green:lan";
-                       gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+                       label = "green:lan";
+                       gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
                };
 
                led_power: power {
-                       label = "tl-wr840n-v4:green:power";
-                       gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+                       label = "green:power";
+                       gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
                };
 
                wan {
-                       label = "tl-wr840n-v4:green:wan";
-                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+                       label = "green:wan";
+                       gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
                };
 
                wlan {
-                       label = "tl-wr840n-v4:green:wlan";
-                       gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+                       label = "green:wlan";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
                };
 
                wps {
-                       label = "tl-wr840n-v4:green:wps";
-                       gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+                       label = "green:wps";
+                       gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
+&ehci {
+       status = "disabled";
+};
+
+&ohci {
+       status = "disabled";
+};
+
 &state_default {
        gpio {
-               ralink,group = "p0led_an", "p2led_an", "perst", "refclk", "wdt", "wled_an";
-               ralink,function = "gpio";
+               groups = "p0led_an", "p2led_an", "perst", "refclk", "wdt", "wled_an";
+               function = "gpio";
        };
 };
+
+&wmac {
+       status = "okay";
+
+       nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100 0>;
+       nvmem-cell-names = "eeprom", "mac-address";
+};
+
+&esw {
+       mediatek,portmap = <0x3e>;
+};