ath79: convert remaining mtd-mac-address cases to nvmem
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 18 Aug 2021 18:06:29 +0000 (20:06 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 18 Aug 2021 21:46:02 +0000 (23:46 +0200)
Since the nvmem-based approach for retrieving MAC addresses
appears to depend on the addresses being set up after the
partitions, it is no longer possible to keep the MAC address
setup in shared DTSI files while the partitions itself are
set up in DTS files for the individual devices.

In ath79 the firmware partition is typically located somewhere
"in the middle" of the partition table. Thus, it's not trivial
to share the partitions containing MAC address information in
a common DTSI (like we did in some cases on ramips).

In this commit, MAC address setup is thus moved to the relevant
partitions, and in most cases needs to be duplicated. While
the duplication is not really nice, it eventually provides a
cleaner and more tidy setup, making the DTS(I) file
fragmentation a bit more logical. This should also help
with adding new devices, as information is distributed across
less locations.

For consistency, this commit also moves the mtd-cal-data property
"down" together with the MAC address setup, so it's not based
on a partition before the latter is defined either. (This is
only done for those files touched due to nvmem conversion.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
64 files changed:
target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts
target/linux/ath79/dts/ar7161_netgear_wndr3700.dts
target/linux/ath79/dts/ar7161_netgear_wndr3800.dts
target/linux/ath79/dts/ar7161_netgear_wndr3800ch.dts
target/linux/ath79/dts/ar7161_netgear_wndrmac-v1.dts
target/linux/ath79/dts/ar7161_netgear_wndrmac-v2.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts
target/linux/ath79/dts/ar7241_ubnt_unifi.dts
target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi
target/linux/ath79/dts/ar9331_glinet_6408.dts
target/linux/ath79/dts/ar9331_glinet_6416.dts
target/linux/ath79/dts/ar9331_glinet_64xx.dtsi
target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi
target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
target/linux/ath79/dts/ar9341_tplink.dtsi
target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts
target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts
target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts
target/linux/ath79/dts/qca9533_qca_ap143-16m.dts
target/linux/ath79/dts/qca9533_qca_ap143-8m.dts
target/linux/ath79/dts/qca9533_qca_ap143.dtsi
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi
target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
target/linux/ath79/dts/qca9558_tplink_archer-c5-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts
target/linux/ath79/dts/qca9558_tplink_tl-wdr7500-v3.dts
target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts
target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts
target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts
target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts
target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts
target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi
target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
target/linux/ath79/dts/qca9563_tplink_re450-v3.dts
target/linux/ath79/dts/qca9563_tplink_re450.dtsi
target/linux/ath79/dts/qca9563_tplink_re455-v1.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi [deleted file]
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n-v5.dts
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts

index 369c89a97e90c8decda51422c45747c74d38777e..414d5e6d992978699c6fb6c2242a8b5595247ab8 100644 (file)
@@ -12,7 +12,6 @@
                led-failsafe = &led_power_orange;
                led-running = &led_power_green;
                led-upgrade = &led_power_orange;
-               label-mac-device = &eth0;
        };
 
        extosc: ref {
        ath9k0: wifi@0,11 {
                compatible = "pci168c,0029";
                reg = <0x8800 0 0 0 0>;
-               mtd-mac-address = <&art 0xc>;
+
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
        ath9k1: wifi@0,12 {
                compatible = "pci168c,0029";
                reg = <0x9000 0 0 0 0>;
-               mtd-mac-address = <&art 0x0>;
+
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
 
        pll-data = <0x11110000 0x00001099 0x00991099>;
 
-       mtd-mac-address = <&art 0x00>;
-
        fixed-link {
                speed = <1000>;
                full-duplex;
 
        pll-data = <0x11110000 0x00001099 0x00991099>;
 
-       mtd-mac-address = <&art 0x06>;
-
        phy-handle = <&phy4>;
 };
index 6d78c019dac12973e4bab60f7e0f4876992d5c27..0a133ce52ee454f5c5f1ec668bc3decc2df867c8 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndr3700-v2", "qca,ar7161";
        model = "Netgear WNDR3700 v2";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&ath9k0 {
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k1 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};
index ad29d256f6d8a65ef35a647a60bd26c7eaaaa02e..99bc5f56bb58bf524ff6e236e8b5f6a0617c441d 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndr3700", "qca,ar7161";
        model = "Netgear WNDR3700";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
        };
 };
 
+&ath9k0 {
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
 &ath9k1 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+
        /* The original WNDR3700(v1) variant have four antennae dedicated
         * to the 5GHz radio as well. Again, two antennae are available for
         * each chain to switch between. The following configuration is the
                output-high;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};
index 80b25492b1b71b505b7e2a76c8d2126e56c16981..0ad5c9d0e8ede8313af9cbc470ab17eac40fb97b 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndr3800", "qca,ar7161";
        model = "Netgear WNDR3800";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&ath9k0 {
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k1 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};
index cc51aca8b6369d9e0468bae2019abc0246cc3b2d..be997211a9b8a2199c898a2873e5ba31e59b4276 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndr3800ch", "qca,ar7161";
        model = "Netgear WNDR3800CH";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
        };
 };
 
+&ath9k0 {
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k1 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};
index 8604414d19982e0c2e50f981ee7c457c938910d9..fa0f40c424d43ad46a277d29f5ffc33bf5fd36d2 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndrmac-v1", "qca,ar7161";
        model = "Netgear WNDRMAC v1";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&ath9k0 {
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k1 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};
index bebd96c72f09a91e8594b404d4c0de6f43557892..ba96eba2629f3b240a08487301cfe02db5448f2f 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wndrmac-v2", "qca,ar7161";
        model = "Netgear WNDRMAC v2";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&ath9k0 {
+       nvmem-cells = <&macaddr_art_c>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k1 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_c: macaddr@c {
+               reg = <0xc 0x6>;
+       };
+};
index 3842238e540eb0d56bd27351da7e3feb1ceee128..f5c060d78064f8d2aa8f32b32f6fd55d975d671a 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wnr2200-16m", "qca,ar7241";
        model = "Netgear WNR2200 (16M)";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 4eb15e23136fb9d850b0a784ea5db6be588f1ea6..e47336e4d29b19eb243ac2d87b1dd787de5d246f 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "netgear,wnr2200-8m", "qca,ar7241";
        model = "Netgear WNR2200 (8M)";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&ath9k {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 0098b0f03ed0495c9cf706d61b837e35654787fe..6119af4a03c1b7445068e2475c28e6d5ca4e07a1 100644 (file)
@@ -16,7 +16,6 @@
                led-failsafe = &led_power_amber;
                led-running = &led_power_green;
                led-upgrade = &led_power_amber;
-               label-mac-device = &eth1;
        };
 
        ath9k-keys {
 
 &eth0 {
        status = "okay";
-
-       mtd-mac-address = <&art 0x0>;
 };
 
 &eth1 {
        compatible = "qca,ar7241-eth", "syscon", "simple-mfd";
-
-       mtd-mac-address = <&art 0x6>;
 };
 
 &pcie {
        ath9k: wifi@0,0 {
                compatible = "pci168c,002e";
                reg = <0x0000 0 0 0 0>;
-               mtd-mac-address = <&art 0x0>;
-               mac-address-increment = <1>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index 3a0cc4250ed2b51fccb075344fd7a348cd1e036a..9ccbdbd450d40e09cf9f5450048bdfae3a3d2e50 100644 (file)
        };
 };
 
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
 &eth1 {
        status = "okay";
 
        #address-cells = <1>;
        #size-cells = <1>;
 
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
        macaddr_art_6: macaddr@6 {
                reg = <0x6 0x6>;
        };
index 287e8cc7db668e1c72a3cd8f7ac1ecd48206c509..e8d903b30580ffb7237f5cae9caf6f9035167c64 100644 (file)
        };
 };
 
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
 &eth1 {
        compatible = "syscon", "simple-mfd";
 };
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index 614ac1454f34aec584c61a7f16249c71b8a9ee87..54f133ab190d35b492d12b23518cd99157496cd6 100644 (file)
@@ -42,6 +42,4 @@
 
 &eth0 {
        status = "okay";
-
-       mtd-mac-address = <&art 0x0>;
 };
index 658fa1aa5e2c1638061da9a45b766e80aa2d2aa5..0d3b7d64101bb1a69cdb585cd05749f21d1c23d2 100644 (file)
@@ -5,6 +5,10 @@
 / {
        model = "GL.iNet 6408";
        compatible = "glinet,6408", "qca,ar9331";
+
+       aliases {
+               label-mac-device = &wmac;
+       };
 };
 
 &spi {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index 189563aaf9877e107f496a22f96a6ba939dc1cfe..91b7cc0c1c43fe73f23e612aad219487b00d88cf 100644 (file)
@@ -5,6 +5,10 @@
 / {
        model = "GL.iNet 6416";
        compatible = "glinet,6416", "qca,ar9331";
+
+       aliases {
+               label-mac-device = &wmac;
+       };
 };
 
 &spi {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index 2f92123c34d0891fbf0879fa596b012d9e07d66b..8d003ce0903222ec87c3a7d5f0ba518d48d43c3d 100644 (file)
@@ -6,10 +6,6 @@
 #include <dt-bindings/input/input.h>
 
 / {
-       aliases {
-               label-mac-device = &wmac;
-       };
-
        keys {
                compatible = "gpio-keys";
 
@@ -48,8 +44,6 @@
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
-
        gmac-config {
                device = <&gmac>;
 
@@ -60,8 +54,6 @@
 
 &eth1 {
        status = "okay";
-
-       mtd-mac-address = <&uboot 0x1fc00>;
 };
 
 &usb {
@@ -76,7 +68,4 @@
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
 };
index 759e76529466655fcf56cf881a2296054661c0c6..61ef9fb99f081add80a03ba070932d56e8632693 100644 (file)
@@ -2,6 +2,12 @@
 
 #include "ar9331_tplink_tl-wr710n.dtsi"
 
+/ {
+       aliases {
+               label-mac-device = &eth0;
+       };
+};
+
 &spi {
        status = "okay";
 
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index 9207a0fde08a9860eedb9382cc38a20158f7c6d3..329822ad10f7818e78b0d541fc46c1a84eba2673 100644 (file)
@@ -11,7 +11,6 @@
                led-failsafe = &led_system;
                led-running = &led_system;
                led-upgrade = &led_system;
-               label-mac-device = &eth0;
        };
 
        keys {
@@ -47,8 +46,6 @@
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
-
        gmac-config {
                device = <&gmac>;
 
@@ -59,9 +56,6 @@
 
 &eth1 {
        status = "okay";
-
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mac-address-increment = <(-1)>;
 };
 
 &usb {
@@ -77,7 +71,4 @@
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
 };
index 0f6e0bc114a166e8fe2d051767ec4020f38a8711..9c505f2785c5e256cb6c262b2c4a59063325b4bd 100644 (file)
@@ -11,7 +11,6 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
-               label-mac-device = &wmac;
        };
 
        leds: leds {
        status = "okay";
 
        phy-handle = <&swphy0>;
-
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
-       mtd-mac-address = <&uboot 0x1fc00>;
-
        gmac-config {
                device = <&gmac>;
                switch-phy-swap = <1>;
@@ -96,7 +90,4 @@
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
 };
index 9adc9a1faf841c6d3ce945f1eb637d69421d7691..f86c4423bf98d7c75908122640dc888f2c61844c 100644 (file)
@@ -6,6 +6,10 @@
        model = "TP-Link TL-MR3420 v2";
        compatible = "tplink,tl-mr3420-v2", "qca,ar9341";
 
+       aliases {
+               label-mac-device = &wmac;
+       };
+
        keys {
                compatible = "gpio-keys";
 
 &usb_phy {
        status = "okay";
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index cd7532d27a67f87672ff8c30eef0bce3cc053a39..d86571c53198718b51a9b5e9cceade9af518555e 100644 (file)
@@ -6,6 +6,10 @@
        model = "TP-Link TL-WR841N/ND v8";
        compatible = "tplink,tl-wr841-v8", "qca,ar9341";
 
+       aliases {
+               label-mac-device = &wmac;
+       };
+
        keys {
                compatible = "gpio-keys";
 
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index 8c27fe1971440a351bb684f85829e0136f9c66c4..5d20df9261edc6891f155e19e3d16940b6b8b988 100644 (file)
@@ -6,6 +6,10 @@
        model = "TP-Link TL-WR842N/ND v2";
        compatible = "tplink,tl-wr842n-v2", "qca,ar9341";
 
+       aliases {
+               label-mac-device = &wmac;
+       };
+
        keys {
                compatible = "gpio-keys";
 
        status = "okay";
 };
 
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
 &eth1 {
        phy-handle = <&swphy4>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
 };
index 5e722bbc26c0c5508793c6908c148567a77608fa..5f5646b3e037e44333c64b7b86ccc79e0834b173 100644 (file)
@@ -88,7 +88,7 @@
                reg = <0>;
                spi-max-frequency = <25000000>;
 
-               nor_partitions: partitions {
+               partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&art 0x0>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+
        phy-handle = <&swphy4>;
 };
 
 &eth1 {
-       mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
 };
 
 &wmac {
 
        mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index 31e61de175c36647fe9f29a29141e38f721d4444..05d87e3995990a66142fba8734b227bd503aff2a 100644 (file)
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index bdb93420b583e6a199482142432ab0ee8084df2e..db6a92720ba3a30f441fb77e7778652d3661a916 100644 (file)
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};
index 95a24175a52877e7a69cecd22ff454e6afd2ece8..2836234b4c7ae0644e31f41206793fbc6f32536e 100644 (file)
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&art 0x0>;
-
        phy-handle = <&swphy4>;
 };
 
 &eth1 {
-       mtd-mac-address = <&art 0x6>;
-
        gmac-config {
                device = <&gmac>;
        };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
 };
 
 &usb0 {
index 639c8771773d1387a26a6f35af6a13e817132a56..ba145d6fb0fe1e19a1b5764e244cc915b1132c92 100644 (file)
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_art_18>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_18: macaddr@18 {
+               reg = <0x18 0x6>;
+       };
+};
index 5dda5f18695726506392cd8c6d47aa02e8b8f595..d0929f981c0120cc14dd2054a0f1a37c07f3ad14 100644 (file)
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_art_6>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_art_18>;
+       nvmem-cell-names = "mac-address";
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_art_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+
+       macaddr_art_18: macaddr@18 {
+               reg = <0x18 0x6>;
+       };
+};
index d8a311614f591f596052f455509043df5a3188c2..4daad4b0b012cb35cb4d3a6b4ebc89cffa3e72b1 100644 (file)
@@ -84,7 +84,7 @@
        status = "okay";
 
        pll-data = <0xa6000000 0x00000101 0x00001616>;
-       mtd-mac-address = <&art 0x0>;
+
        fixed-link {
                speed = <1000>;
                full-duplex;
@@ -95,7 +95,7 @@
        status = "okay";
 
        pll-data = <0x03000101 0x00000101 0x00001616>;
-       mtd-mac-address = <&art 0x6>;
+
        fixed-link {
                speed = <1000>;
                full-duplex;
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&art 0x18>;
 };
 
 // This node is required for the Ethernet ports to work correctly.
index 3f965f5b959813bcfc76275c5ea45e047ed14e7f..f629838f1ae2a0bdf2e436ae9706af0350d63bff 100644 (file)
@@ -11,7 +11,6 @@
                led-failsafe = &led_system;
                led-running = &led_system;
                led-upgrade = &led_system;
-               label-mac-device = &eth1;
        };
 
        leds: leds {
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
-       mac-address-increment = <1>;
        phy-handle = <&phy0>;
        pll-data = <0x56000000 0x00000101 0x00001616>;
 
 &eth1 {
        status = "okay";
 
-       mtd-mac-address = <&uboot 0x1fc00>;
        pll-data = <0x03000101 0x00000101 0x00001616>;
 
        fixed-link {
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&uboot 0x1fc00>;
 };
index 9ffbce0a212cb623f5794be1817238ae3d0d29c1..85012d3aace036a53d725c83925bbbe937a54ca3 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c5-v1", "qca,qca9558";
        model = "TP-Link Archer C5 v1";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &keys {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index e2d1d63813fba84c24ba378dd5563907243d7595..dfa64d6ca3d2f6c9f31731558e895da3e387da79 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c7-v1", "qca,qca9558";
        model = "TP-Link Archer C7 v1";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &keys {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index be99b8e3e4f876c9e252c85784a3a5b5e3b432a1..9e959a276afa66d0aa43739353cbfba7aa8ce941 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c7-v2", "qca,qca9558";
        model = "TP-Link Archer C7 v2";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &keys {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index 04368b924486b085dec54d88daf64a0465407417..998ede85cb9f71c6f772a168a1cce769d51de3f7 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,tl-wdr7500-v3", "qca,qca9558";
        model = "TP-Link TL-WDR7500 v3";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &keys {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_uboot_1fc00>;
+       nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_1fc00: macaddr@1fc00 {
+               reg = <0x1fc00 0x6>;
+       };
+};
index ea86b8f35eeb617b29c6df17ea6142b5aa8a0043..180efada1270b683b18a8a6d7ec473dfdde9d723 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c58-v1", "qca,qca9560";
        model = "TP-Link Archer C58 v1";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &spi {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 07e8379172e75d695f15b998086e050943b009ad..c385eb1592564934180cc2b35362252591534c98 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c59-v1", "qca,qca9560";
        model = "TP-Link Archer C59 v1";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &leds {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index c1321f5d20e7285da15484cb192d1e8aeaa96e92..5a277723e3ad051d08225cd26c1704e95fed51e5 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c59-v2", "qca,qca9560";
        model = "TP-Link Archer C59 v2";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &leds {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 673805e132b7d41ec041906bbbbfbc6ca37c1d09..bb942078dc41c90a08eb0db80a3e04d17a2767cd 100644 (file)
@@ -13,7 +13,6 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
-               label-mac-device = &eth1;
        };
 
        led_spi {
 
        phy-handle = <&swphy0>;
 
-       mtd-mac-address = <&info 0x8>;
-       mac-address-increment = <1>;
-
        gmac-config {
                device = <&gmac>;
 
 
 &eth1 {
        status = "okay";
-
-       mtd-mac-address = <&info 0x8>;
 };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
 };
index a3bbf3e49c4ff8dd8c4ad2cf88ce16ffb9811b02..f5ab2e5977c9f2b6003251dfe37caea0cf326d1c 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c60-v1", "qca,qca9561";
        model = "TP-Link Archer C60 v1";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &leds {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 2bcab77dbf9c7401c01de375b1fd28edfc485d84..014222770f9aa9a5f8e1a7f3e27cfcb9b5f9f3d9 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c60-v2", "qca,qca9561";
        model = "TP-Link Archer C60 v2";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &leds {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index c1a0a8c2e5da54714f49062391b1a739933fcb35..a2f46ecd6045f1caef617344822f84a48182994b 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c60-v3", "qca,qca9561";
        model = "TP-Link Archer C60 v3";
+
+       aliases {
+               label-mac-device = &eth1;
+       };
 };
 
 &leds {
@@ -13,6 +17,7 @@
                gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
        };
 };
+
 &spi {
        status = "okay";
 
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <1>;
+};
+
+&eth1 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 5c5d1620b9499a341187ce8c476a81fce9cefd2d..e5f9d0bcc591c145967b257b56a4f197208d47dc 100644 (file)
@@ -11,7 +11,6 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
-               label-mac-device = &eth1;
        };
 
        keys {
        status = "okay";
 
        phy-handle = <&swphy4>;
-
-       mtd-mac-address = <&info 0x8>;
-       mac-address-increment = <1>;
 };
 
 &eth1 {
        status = "okay";
-
-       mtd-mac-address = <&info 0x8>;
 };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
 };
index b4f7718230a61c1a566990ae69fd3d54ed6b9353..510b577d190df3b912e871d6a0f9594589b66f63 100644 (file)
 &pcie {
        status = "okay";
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_1002>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_1002: macaddr@1002 {
+               reg = <0x1002 0x6>;
+       };
+};
index 3af6f59d094e19e3585d08c0eb6aa7a4d142cd77..28ffce643456e62c17886879f84e556ff285e17c 100644 (file)
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_art_1002>;
+       nvmem-cell-names = "mac-address";
+       mac-address-increment = <(-1)>;
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+};
+
+&art {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_art_1002: macaddr@1002 {
+               reg = <0x1002 0x6>;
+       };
+};
index 044485316c37c1319cbb427a8c647d012ff98cf5..a6706da1a50007e3028d6f713379eb7d34b9fb05 100644 (file)
 
        pll-data = <0x03000101 0x00000101 0x00001919>;
 
-       mtd-mac-address = <&art 0x1002>;
-       mac-address-increment = <(-1)>;
        phy-mode = "sgmii";
        phy-handle = <&phy0>;
 };
 
 &wmac {
        status = "okay";
-       mtd-cal-data = <&art 0x1000>;
 };
index eecfe3545538303d8ad0caeb4f479ab102ab1828..3bb6d685cc5625df080b19c8454e8625f1f44e22 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-a7-v5", "qca,qca9563";
        model = "TP-Link Archer A7 v5";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &keys {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 892e87ebaf53f3eafc7daa7051cf60ea4f37c2a6..76e19294f8e2799a6f51cd35e5642e2025fb0c1a 100644 (file)
@@ -7,6 +7,8 @@
        model = "TP-Link Archer C6 v2 (US) / A6 v2 (US/TW)";
 
        aliases {
+               label-mac-device = &eth0;
+
                led-boot = &led_power;
                led-failsafe = &led_power;
                led-running = &led_power;
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index c64402bcfe5255c332c85acfcd95eadcb4b8bf48..c40fe0f29238149801adc21e5c4ccae0a30b1953 100644 (file)
@@ -7,6 +7,8 @@
        model = "TP-Link Archer C6 v2 (EU/RU/JP)";
 
        aliases {
+               label-mac-device = &eth0;
+
                led-boot = &led_power;
                led-failsafe = &led_power;
                led-running = &led_power;
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index da8d0c1fc72c0fbb035cac56849d011ee540ffcf..d2631e227cbab77eca8241e24ac93d808f89d623 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,archer-c7-v5", "qca,qca9563";
        model = "TP-Link Archer C7 v5";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &keys {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 1a074e63a640b85648883db5bc215db352b500af..fc6206d891a92249eabad471934ccade3b1ff7f3 100644 (file)
@@ -5,12 +5,6 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
-/ {
-       aliases {
-               label-mac-device = &eth0;
-       };
-};
-
 &pcie {
        status = "okay";
 };
 
        phy-mode = "sgmii";
        phy-handle = <&phy0>;
-
-       mtd-mac-address = <&info 0x8>;
 };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
 };
index 3644cf863edc9ce062f04b199cbab78b4c8b8a40..6763fe9d3dcd779615a9d8213a22f0fcdda93404 100644 (file)
@@ -11,7 +11,6 @@
                led-failsafe = &led_system;
                led-running = &led_system;
                led-upgrade = &led_system;
-               label-mac-device = &eth0;
        };
 
        leds {
        pll-data = <0x03000101 0x00000101 0x00001919>;
 
        phy-mode = "sgmii";
-       mtd-mac-address = <&info 0x8>;
        phy-handle = <&phy0>;
 };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
 };
index d0356d668029317889430c4dd7e5b6e31ed301c7..73cf5323eea542c561ada9a7b1c6e8900d70272e 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,re450-v2", "qca,qca9563";
        model = "TP-Link RE450 v2";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 695f78ed02514bf7d6e49844e8c24c6796424377..ffebcb9baea6949dc2af76640664d596a7863634 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,re450-v3", "qca,qca9563";
        model = "TP-Link RE450 v3";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 3354baee08f7d597d1c8406ecc6835e6c33f7dcd..3841a4c8fd7c4a708c1ed5d48b49043eff348c93 100644 (file)
@@ -7,7 +7,6 @@
 
 / {
        aliases {
-               label-mac-device = &eth0;
                led-boot = &led_power;
                led-failsafe = &led_power;
                led-running = &led_power;
 
        phy-mode = "sgmii";
        phy-handle = <&phy4>;
-
-       mtd-mac-address = <&info 0x8>;
 };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
 };
index b6c1efb8463ff0612ebbf1af9f57d8d053d66cd7..bf4e5848af8d78410916af72dee55d4bd60700d7 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,re455-v1", "qca,qca9563";
        model = "TP-Link RE455 v1";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index d0fa6d332fd10ae1e912825ae2a3f4fa3877901b..0ccfb42d9acb846ee0f1183ee709453166f723c6 100644 (file)
@@ -43,6 +43,8 @@
 };
 
 &wmac {
+       mtd-cal-data = <&art 0x1000>;
+
        nvmem-cells = <&macaddr_uboot_fc00>;
        nvmem-cell-names = "mac-address";
 };
index 5fd314b85608767611702e44b0972f5d9af96567..431c9908154770f146ca5393fa4e5fb1097e2e8b 100644 (file)
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
 };
index 50a88f344a82ac27de321001131b8be01a8c39ae..95ff6b03631adcd8f31ae0f0c723c0db5c152e0a 100644 (file)
@@ -1,13 +1,35 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "qca9563_tplink_tl-wpa8630p-v2.dtsi"
+#include "qca9563_tplink_tl-wpa8630.dtsi"
 
 / {
        compatible = "tplink,tl-wpa8630p-v2-int", "qca,qca9563";
        model = "TP-Link WPA8630P v2 (Int.)";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
+       partition@0 {
+               label = "factory-uboot";
+               reg = <0x000000 0x020000>;
+               read-only;
+       };
+
+       partition@20000 {
+               label = "u-boot";
+               reg = <0x020000 0x020000>;
+               read-only;
+       };
+
+       partition@40000 {
+               compatible = "tplink,firmware";
+               label = "firmware";
+               reg = <0x040000 0x5e0000>;
+       };
+
        partition@620000 {
                label = "partition-table";
                reg = <0x620000 0x010000>;
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index 9eff2fcf684265fa4e7fde2e37f23c04e9c213ff..34efeb9450947d76cd6fe02cb3f11607b26fbca0 100644 (file)
@@ -1,13 +1,35 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "qca9563_tplink_tl-wpa8630p-v2.dtsi"
+#include "qca9563_tplink_tl-wpa8630.dtsi"
 
 / {
        compatible = "tplink,tl-wpa8630p-v2.0-eu", "qca,qca9563";
        model = "TP-Link WPA8630P v2.0 (EU)";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
+       partition@0 {
+               label = "factory-uboot";
+               reg = <0x000000 0x020000>;
+               read-only;
+       };
+
+       partition@20000 {
+               label = "u-boot";
+               reg = <0x020000 0x020000>;
+               read-only;
+       };
+
+       partition@40000 {
+               compatible = "tplink,firmware";
+               label = "firmware";
+               reg = <0x040000 0x5e0000>;
+       };
+
        partition@620000 {
                label = "partition-table";
                reg = <0x620000 0x010000>;
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index e8d92419c615159a48ac7f4a3a4b7038cf3c24ca..a477b50417dc40578871b9d080806625576ee1c9 100644 (file)
@@ -1,13 +1,35 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "qca9563_tplink_tl-wpa8630p-v2.dtsi"
+#include "qca9563_tplink_tl-wpa8630.dtsi"
 
 / {
        compatible = "tplink,tl-wpa8630p-v2.1-eu", "qca,qca9563";
        model = "TP-Link WPA8630P v2.1 (EU)";
+
+       aliases {
+               label-mac-device = &eth0;
+       };
 };
 
 &partitions {
+       partition@0 {
+               label = "factory-uboot";
+               reg = <0x000000 0x020000>;
+               read-only;
+       };
+
+       partition@20000 {
+               label = "u-boot";
+               reg = <0x020000 0x020000>;
+               read-only;
+       };
+
+       partition@40000 {
+               compatible = "tplink,firmware";
+               label = "firmware";
+               reg = <0x040000 0x5e0000>;
+       };
+
        /* 0x620000 to 0x680000 is empty in OEM partitioning */
 
        partition@680000 {
                read-only;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
deleted file mode 100644 (file)
index 9e6d23d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-
-#include "qca9563_tplink_tl-wpa8630.dtsi"
-
-/ {
-       aliases {
-               label-mac-device = &eth0;
-       };
-};
-
-&partitions {
-       partition@0 {
-               label = "factory-uboot";
-               reg = <0x000000 0x020000>;
-               read-only;
-       };
-
-       partition@20000 {
-               label = "u-boot";
-               reg = <0x020000 0x020000>;
-               read-only;
-       };
-
-       partition@40000 {
-               compatible = "tplink,firmware";
-               label = "firmware";
-               reg = <0x040000 0x5e0000>;
-       };
-};
-
-&eth0 {
-       mtd-mac-address = <&info 0x8>;
-};
-
-&wmac {
-       mtd-mac-address = <&info 0x8>;
-};
index cba124aa858cf90a93b8ee4935d17f8275097452..6d7582451597f1547ca59149986e5e38718bd27c 100644 (file)
@@ -5,6 +5,10 @@
 / {
        compatible = "tplink,tl-wr1043n-v5", "qca,qca9563";
        model = "TP-Link TL-WR1043N v5";
+
+       aliases {
+               label-mac-device = &wmac;
+       };
 };
 
 &spi {
                };
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};
index c8c69e8a6568393db6c589b1cc7431b5b0868420..b99412eb7900a84dad592f63261662bd48167245 100644 (file)
@@ -11,7 +11,6 @@
                led-failsafe = &led_system;
                led-running = &led_system;
                led-upgrade = &led_system;
-               label-mac-device = &wmac;
        };
 
        leds: leds {
 &eth0 {
        status = "okay";
 
-       mtd-mac-address = <&info 0x8>;
        phy-mode = "sgmii";
        phy-handle = <&phy0>;
 };
 
 &wmac {
        status = "okay";
-
-       mtd-cal-data = <&art 0x1000>;
-       mtd-mac-address = <&info 0x8>;
 };
index ddb986ffddba0037ede18669d7904a47d38deb68..bf01f06de695727a653ad8ca5085c8c21069e9f6 100644 (file)
@@ -6,6 +6,10 @@
        compatible = "tplink,tl-wr1043nd-v4", "qca,qca9563";
        model = "TP-Link TL-WR1043ND v4";
 
+       aliases {
+               label-mac-device = &wmac;
+       };
+
        gpio-export {
                compatible = "gpio-export";
                #size-cells = <0>;
                #trigger-source-cells = <0>;
        };
 };
+
+&eth0 {
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+       mtd-cal-data = <&art 0x1000>;
+
+       nvmem-cells = <&macaddr_info_8>;
+       nvmem-cell-names = "mac-address";
+};
+
+&info {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_info_8: macaddr@8 {
+               reg = <0x8 0x6>;
+       };
+};