ramips: convert MT7613 and MT7615 EEPROM to NVMEM format for MT7621
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_tplink_eap235-wall-v1.dts
index 17308eb605b81a6bf392277f16cee3abf72fefe3..f2aea644fa2b064482909adf91dc54138abe9b42 100644 (file)
                        };
 
                        info: partition@90000 {
+                               compatible = "nvmem-cells";
                                label = "product-info";
                                reg = <0x90000 0x10000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               macaddr_info_8: macaddr@8 {
+                                       reg = <0x8 0x6>;
+                               };
                        };
 
                        partition@a0000 {
                        };
 
                        radio: partition@ff0000 {
+                               compatible = "nvmem-cells";
                                label = "radio";
                                reg = <0xff0000 0x010000>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
                                read-only;
+
+                               eeprom_radio_0: eeprom@0 {
+                                       reg = <0x0 0x400>;
+                               };
+
+                               eeprom_radio_8000: eeprom@8000 {
+                                       reg = <0x8000 0x4da8>;
+                               };
                        };
                };
        };
 &pcie0 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x0>;
-               mtd-mac-address = <&info 0x8>;
+               nvmem-cells = <&eeprom_radio_0>, <&macaddr_info_8>;
+               nvmem-cell-names = "eeprom", "mac-address";
        };
 };
 
 &pcie1 {
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
-               mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
-               mtd-mac-address = <&info 0x8>;
-               mtd-mac-address-increment = <1>;
+               nvmem-cells = <&eeprom_radio_8000>, <&macaddr_info_8>;
+               nvmem-cell-names = "eeprom", "mac-address";
+               mac-address-increment = <1>;
        };
 };
 
 &gmac0 {
-       mtd-mac-address = <&info 0x8>;
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+       status = "okay";
+       label = "lan0";
+       phy-handle = <&ethphy0>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
 };
 
 &switch0 {
        ports {
-               port@0 {
-                       status = "okay";
-                       label = "lan0";
-               };
-
                port@1 {
                        status = "okay";
                        label = "lan3";