ath79: ar: convert to mac-base
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9331_tplink_tl-wr741nd-v4.dtsi
index 248a2b646e3e149f16a84a7d01875cff95318cc8..613b357dc872d2ff66dc69602b9a2ab27b220f1f 100644 (file)
                                reg = <0x0 0x20000>;
                                label = "u-boot";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_uboot_1fc00: macaddr@1fc00 {
+                                               compatible = "mac-base";
+                                               reg = <0x1fc00 0x6>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        firmware: partition@20000 {
        };
 };
 
-&eth0 {
+&eth0 {                /* WAN interface, initialized last as eth1 */
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mac-address-increment = <1>;
+       nvmem-cells = <&macaddr_uboot_1fc00 1>;
+       nvmem-cell-names = "mac-address";
 
        gmac-config {
                device = <&gmac>;
        };
 };
 
-&eth1 {
+&eth1 {                /* LAN interface, initialized first as eth0 */
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mac-address-increment = <(-1)>;
+       nvmem-cells = <&macaddr_uboot_1fc00 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {
        status = "okay";
 
        mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
+       nvmem-cells = <&macaddr_uboot_1fc00 0>;
+       nvmem-cell-names = "mac-address";
 };