ramips: fix Gigabit Ethernet port of the HiWiFi HC5861
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_wndr3700-v5.dts
index 90c0ca1276db2b8e1a88b598f28ce32617b6ce95..8252d2b9ff7d8d81aa41c42a8d789cd272235808 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndr3700-v5", "mediatek,mt7621-soc";
        model = "Netgear WNDR3700 v5";
+
+       aliases {
+               label-mac-device = &gmac0;
+       };
 };
 
 &spi0 {
                                label = "factory";
                                reg = <0xf30000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom0: eeprom@0 {
+                                               reg = <0x0 0x400>;
+                                       };
+
+                                       macaddr_factory_4: macaddr@4 {
+                                               compatible = "mac-base";
+                                               reg = <0x4 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       eeprom1: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
                };
        };
 };
+
+&gmac0 {
+       nvmem-cells = <&macaddr_factory_4 0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       nvmem-cells = <&macaddr_factory_4 1>;
+       nvmem-cell-names = "mac-address";
+};