ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_tplink_archer.dtsi
index 74908e05aa48293d29055f017e9066c0e762396f..e860d3ed13d518d8fd0b98491533d0d44e2ccfa8 100644 (file)
@@ -43,7 +43,7 @@
        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
-               spi-max-frequency = <10000000>;
+               spi-max-frequency = <30000000>;
 
                partitions {
                        compatible = "fixed-partitions";
                                label = "rom";
                                reg = <0x7d0000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_rom_f100: macaddr@f100 {
+                                               reg = <0xf100 0x6>;
+                                       };
+                               };
                        };
 
                        partition@7e0000 {
                                label = "radio";
                                reg = <0x7f0000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       eeprom_radio_0: eeprom@0 {
+                                               reg = <0x0 0x200>;
+                                       };
+
+                                       eeprom_radio_8000: eeprom@8000 {
+                                               reg = <0x8000 0x200>;
+                                       };
+                               };
                        };
                };
        };
 
 &ethernet {
        pinctrl-names = "default";
-       mtd-mac-address = <&rom 0xf100>;
+
+       nvmem-cells = <&macaddr_rom_f100>;
+       nvmem-cell-names = "mac-address";
+
        mediatek,portmap = "wllll";
 };
 
        status = "okay";
 };
 
-&gsw {
-       mediatek,port4 = "ephy";
-};
-
 &wmac {
-       ralink,mtd-eeprom = <&radio 0x0>;
+       nvmem-cells = <&eeprom_radio_0>;
+       nvmem-cell-names = "eeprom";
 };
 
 &pcie {
 &pcie0 {
        wifi: mt76@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
+               nvmem-cells = <&eeprom_radio_8000>;
+               nvmem-cell-names = "eeprom";
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };