ramips: fix Gigabit Ethernet port of the HiWiFi HC5861
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_zbtlink_zbt-we1226.dts
index b558a0057fcfb8480ce6dfff8b11919a263a287e..fd233cd30bb25d11f32c83be4de7a642a4bc5698 100644 (file)
@@ -1,9 +1,8 @@
-/dts-v1/;
+#include "mt7628an.dtsi"
+
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 
-#include "mt7628an.dtsi"
-
 / {
        compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
        model = "Zbtlink ZBT-WE1226";
@@ -24,7 +23,7 @@
 
                reset {
                        label = "reset";
-                       gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };
        };
                compatible = "gpio-leds";
 
                wan {
-                       label = "zbt-we1226:green:wan";
-                       gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+                       label = "green:wan";
+                       gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
                };
 
                lan1 {
-                       label = "zbt-we1226:green:lan1";
-                       gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+                       label = "green:lan1";
+                       gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
                };
 
                lan2 {
-                       label = "zbt-we1226:green:lan2";
-                       gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+                       label = "green:lan2";
+                       gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
                };
 
                led_wlan: wlan {
-                       label = "zbt-we1226:green:wlan";
-                       gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
+                       label = "green:wlan";
+                       gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
                };
        };
 };
 
 &state_default {
        gpio {
-               ralink,group = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
-               ralink,function = "gpio";
+               groups = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
+               function = "gpio";
        };
 };
 
 &spi0 {
        status = "okay";
 
-       m25p80@0 {
+       flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <10000000>;
                        };
 
                        factory: partition@40000 {
+                               compatible = "nvmem-cells";
                                label = "factory";
                                reg = <0x40000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_factory_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
+                               macaddr_factory_2e: macaddr@2e {
+                                       reg = <0x2e 0x6>;
+                               };
                        };
 
                        partition@50000 {
 
 &wmac {
        status = "okay";
+
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x2e>;
-       mediatek,portmap = "llllw";
+       nvmem-cells = <&macaddr_factory_2e>;
+       nvmem-cell-names = "mac-address";
+};
+
+&esw {
+       mediatek,portmap = <0x2f>;
 };