ramips: fix Gigabit Ethernet port of the HiWiFi HC5861
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_iptime_a3004t.dts
index 704ecac721144929023084a98bbf8db08011fa50..000657c8667e8156f7b756725a5d29f79f9e66b8 100644 (file)
                };
 
                factory: partition@a0000 {
+                       compatible = "nvmem-cells";
                        label = "factory";
                        reg = <0xa0000 0x20000>;
-                       read-only;
-
-                       compatible = "nvmem-cells";
                        #address-cells = <1>;
                        #size-cells = <1>;
+                       read-only;
+
+                       eeprom_factory_0: eeprom@0 {
+                               reg = <0x0 0x4da8>;
+                       };
 
                        macaddr_factory_4: macaddr@4 {
                                reg = <0x4 0x6>;
        mac-address-increment = <(3)>;
 };
 
+&gmac1 {
+       status = "okay";
+       label = "wan";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_factory_4>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(1)>;
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "wan";
-                       nvmem-cells = <&macaddr_factory_4>;
-                       nvmem-cell-names = "mac-address";
-                       mac-address-increment = <(1)>;
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan4";
        wifi@0,0 {
                compatible = "mediatek,mt76";
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&factory 0x0>;
+               nvmem-cells = <&eeprom_factory_0>;
+               nvmem-cell-names = "eeprom";
        };
 };