Explorar o código

ath79: convert remaining mtd-mac-address cases to nvmem

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 <[email protected]>
Adrian Schmutzler %!s(int64=4) %!d(string=hai) anos
pai
achega
e826b64294
Modificáronse 64 ficheiros con 1406 adicións e 157 borrados
  1. 2 7
      target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
  2. 42 0
      target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts
  3. 40 0
      target/linux/ath79/dts/ar7161_netgear_wndr3700.dts
  4. 42 0
      target/linux/ath79/dts/ar7161_netgear_wndr3800.dts
  5. 41 0
      target/linux/ath79/dts/ar7161_netgear_wndr3800ch.dts
  6. 42 0
      target/linux/ath79/dts/ar7161_netgear_wndrmac-v1.dts
  7. 42 0
      target/linux/ath79/dts/ar7161_netgear_wndrmac-v2.dts
  8. 34 0
      target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts
  9. 34 0
      target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
  10. 0 7
      target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
  11. 9 0
      target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts
  12. 15 0
      target/linux/ath79/dts/ar7241_ubnt_unifi.dts
  13. 0 2
      target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi
  14. 31 0
      target/linux/ath79/dts/ar9331_glinet_6408.dts
  15. 31 0
      target/linux/ath79/dts/ar9331_glinet_6416.dts
  16. 0 11
      target/linux/ath79/dts/ar9331_glinet_64xx.dtsi
  17. 34 0
      target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi
  18. 0 9
      target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
  19. 0 9
      target/linux/ath79/dts/ar9341_tplink.dtsi
  20. 32 0
      target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts
  21. 32 0
      target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts
  22. 30 0
      target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
  23. 17 4
      target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts
  24. 28 0
      target/linux/ath79/dts/qca9533_qca_ap143-16m.dts
  25. 28 0
      target/linux/ath79/dts/qca9533_qca_ap143-8m.dts
  26. 0 6
      target/linux/ath79/dts/qca9533_qca_ap143.dtsi
  27. 35 0
      target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts
  28. 35 0
      target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts
  29. 2 5
      target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi
  30. 0 7
      target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
  31. 32 0
      target/linux/ath79/dts/qca9558_tplink_archer-c5-v1.dts
  32. 32 0
      target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts
  33. 32 0
      target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts
  34. 32 0
      target/linux/ath79/dts/qca9558_tplink_tl-wdr7500-v3.dts
  35. 32 0
      target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts
  36. 32 0
      target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts
  37. 32 0
      target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts
  38. 0 9
      target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
  39. 32 0
      target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts
  40. 32 0
      target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts
  41. 33 0
      target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts
  42. 0 9
      target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
  43. 20 0
      target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts
  44. 20 0
      target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts
  45. 0 3
      target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
  46. 26 0
      target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts
  47. 24 0
      target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts
  48. 24 0
      target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts
  49. 26 0
      target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts
  50. 0 11
      target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
  51. 0 5
      target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi
  52. 26 0
      target/linux/ath79/dts/qca9563_tplink_re450-v2.dts
  53. 26 0
      target/linux/ath79/dts/qca9563_tplink_re450-v3.dts
  54. 0 6
      target/linux/ath79/dts/qca9563_tplink_re450.dtsi
  55. 26 0
      target/linux/ath79/dts/qca9563_tplink_re455-v1.dts
  56. 2 0
      target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
  57. 0 2
      target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi
  58. 45 1
      target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts
  59. 45 1
      target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts
  60. 45 1
      target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts
  61. 0 37
      target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi
  62. 26 0
      target/linux/ath79/dts/qca9563_tplink_tl-wr1043n-v5.dts
  63. 0 5
      target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi
  64. 26 0
      target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts

+ 2 - 7
target/linux/ath79/dts/ar7161_netgear_wndr.dtsi

@@ -12,7 +12,6 @@
 		led-failsafe = &led_power_orange;
 		led-failsafe = &led_power_orange;
 		led-running = &led_power_green;
 		led-running = &led_power_green;
 		led-upgrade = &led_power_orange;
 		led-upgrade = &led_power_orange;
-		label-mac-device = &eth0;
 	};
 	};
 
 
 	extosc: ref {
 	extosc: ref {
@@ -153,7 +152,7 @@
 	ath9k0: wifi@0,11 {
 	ath9k0: wifi@0,11 {
 		compatible = "pci168c,0029";
 		compatible = "pci168c,0029";
 		reg = <0x8800 0 0 0 0>;
 		reg = <0x8800 0 0 0 0>;
-		mtd-mac-address = <&art 0xc>;
+
 		qca,no-eeprom;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 		gpio-controller;
@@ -181,7 +180,7 @@
 	ath9k1: wifi@0,12 {
 	ath9k1: wifi@0,12 {
 		compatible = "pci168c,0029";
 		compatible = "pci168c,0029";
 		reg = <0x9000 0 0 0 0>;
 		reg = <0x9000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+
 		qca,no-eeprom;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 		gpio-controller;
@@ -209,8 +208,6 @@
 
 
 	pll-data = <0x11110000 0x00001099 0x00991099>;
 	pll-data = <0x11110000 0x00001099 0x00991099>;
 
 
-	mtd-mac-address = <&art 0x00>;
-
 	fixed-link {
 	fixed-link {
 		speed = <1000>;
 		speed = <1000>;
 		full-duplex;
 		full-duplex;
@@ -222,7 +219,5 @@
 
 
 	pll-data = <0x11110000 0x00001099 0x00991099>;
 	pll-data = <0x11110000 0x00001099 0x00991099>;
 
 
-	mtd-mac-address = <&art 0x06>;
-
 	phy-handle = <&phy4>;
 	phy-handle = <&phy4>;
 };
 };

+ 42 - 0
target/linux/ath79/dts/ar7161_netgear_wndr3700-v2.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wndr3700-v2", "qca,ar7161";
 	compatible = "netgear,wndr3700-v2", "qca,ar7161";
 	model = "Netgear WNDR3700 v2";
 	model = "Netgear WNDR3700 v2";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -33,3 +37,41 @@
 		read-only;
 		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>;
+	};
+};

+ 40 - 0
target/linux/ath79/dts/ar7161_netgear_wndr3700.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wndr3700", "qca,ar7161";
 	compatible = "netgear,wndr3700", "qca,ar7161";
 	model = "Netgear WNDR3700";
 	model = "Netgear WNDR3700";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -34,7 +38,15 @@
 	};
 	};
 };
 };
 
 
+&ath9k0 {
+	nvmem-cells = <&macaddr_art_c>;
+	nvmem-cell-names = "mac-address";
+};
+
 &ath9k1 {
 &ath9k1 {
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+
 	/* The original WNDR3700(v1) variant have four antennae dedicated
 	/* The original WNDR3700(v1) variant have four antennae dedicated
 	 * to the 5GHz radio as well. Again, two antennae are available for
 	 * to the 5GHz radio as well. Again, two antennae are available for
 	 * each chain to switch between. The following configuration is the
 	 * each chain to switch between. The following configuration is the
@@ -54,3 +66,31 @@
 		output-high;
 		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>;
+	};
+};

+ 42 - 0
target/linux/ath79/dts/ar7161_netgear_wndr3800.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wndr3800", "qca,ar7161";
 	compatible = "netgear,wndr3800", "qca,ar7161";
 	model = "Netgear WNDR3800";
 	model = "Netgear WNDR3800";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -34,3 +38,41 @@
 		read-only;
 		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>;
+	};
+};

+ 41 - 0
target/linux/ath79/dts/ar7161_netgear_wndr3800ch.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wndr3800ch", "qca,ar7161";
 	compatible = "netgear,wndr3800ch", "qca,ar7161";
 	model = "Netgear WNDR3800CH";
 	model = "Netgear WNDR3800CH";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -35,3 +39,40 @@
 	};
 	};
 };
 };
 
 
+&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>;
+	};
+};

+ 42 - 0
target/linux/ath79/dts/ar7161_netgear_wndrmac-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wndrmac-v1", "qca,ar7161";
 	compatible = "netgear,wndrmac-v1", "qca,ar7161";
 	model = "Netgear WNDRMAC v1";
 	model = "Netgear WNDRMAC v1";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -33,3 +37,41 @@
 		read-only;
 		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>;
+	};
+};

+ 42 - 0
target/linux/ath79/dts/ar7161_netgear_wndrmac-v2.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wndrmac-v2", "qca,ar7161";
 	compatible = "netgear,wndrmac-v2", "qca,ar7161";
 	model = "Netgear WNDRMAC v2";
 	model = "Netgear WNDRMAC v2";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -34,3 +38,41 @@
 		read-only;
 		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>;
+	};
+};

+ 34 - 0
target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wnr2200-16m", "qca,ar7241";
 	compatible = "netgear,wnr2200-16m", "qca,ar7241";
 	model = "Netgear WNR2200 (16M)";
 	model = "Netgear WNR2200 (16M)";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -33,3 +37,33 @@
 		read-only;
 		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>;
+	};
+};

+ 34 - 0
target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "netgear,wnr2200-8m", "qca,ar7241";
 	compatible = "netgear,wnr2200-8m", "qca,ar7241";
 	model = "Netgear WNR2200 (8M)";
 	model = "Netgear WNR2200 (8M)";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -33,3 +37,33 @@
 		read-only;
 		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>;
+	};
+};

+ 0 - 7
target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi

@@ -16,7 +16,6 @@
 		led-failsafe = &led_power_amber;
 		led-failsafe = &led_power_amber;
 		led-running = &led_power_green;
 		led-running = &led_power_green;
 		led-upgrade = &led_power_amber;
 		led-upgrade = &led_power_amber;
-		label-mac-device = &eth1;
 	};
 	};
 
 
 	ath9k-keys {
 	ath9k-keys {
@@ -154,14 +153,10 @@
 
 
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
-
-	mtd-mac-address = <&art 0x0>;
 };
 };
 
 
 &eth1 {
 &eth1 {
 	compatible = "qca,ar7241-eth", "syscon", "simple-mfd";
 	compatible = "qca,ar7241-eth", "syscon", "simple-mfd";
-
-	mtd-mac-address = <&art 0x6>;
 };
 };
 
 
 &pcie {
 &pcie {
@@ -170,8 +165,6 @@
 	ath9k: wifi@0,0 {
 	ath9k: wifi@0,0 {
 		compatible = "pci168c,002e";
 		compatible = "pci168c,002e";
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
-		mac-address-increment = <1>;
 		qca,no-eeprom;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 		gpio-controller;

+ 9 - 0
target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts

@@ -91,6 +91,11 @@
 	};
 	};
 };
 };
 
 
+&eth0 {
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
 &eth1 {
 &eth1 {
 	status = "okay";
 	status = "okay";
 
 
@@ -107,6 +112,10 @@
 	#address-cells = <1>;
 	#address-cells = <1>;
 	#size-cells = <1>;
 	#size-cells = <1>;
 
 
+	macaddr_art_0: macaddr@0 {
+		reg = <0x0 0x6>;
+	};
+
 	macaddr_art_6: macaddr@6 {
 	macaddr_art_6: macaddr@6 {
 		reg = <0x6 0x6>;
 		reg = <0x6 0x6>;
 	};
 	};

+ 15 - 0
target/linux/ath79/dts/ar7241_ubnt_unifi.dts

@@ -80,6 +80,21 @@
 	};
 	};
 };
 };
 
 
+&eth0 {
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
 &eth1 {
 &eth1 {
 	compatible = "syscon", "simple-mfd";
 	compatible = "syscon", "simple-mfd";
 };
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr@0 {
+		reg = <0x0 0x6>;
+	};
+};

+ 0 - 2
target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi

@@ -42,6 +42,4 @@
 
 
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
-
-	mtd-mac-address = <&art 0x0>;
 };
 };

+ 31 - 0
target/linux/ath79/dts/ar9331_glinet_6408.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	model = "GL.iNet 6408";
 	model = "GL.iNet 6408";
 	compatible = "glinet,6408", "qca,ar9331";
 	compatible = "glinet,6408", "qca,ar9331";
+
+	aliases {
+		label-mac-device = &wmac;
+	};
 };
 };
 
 
 &spi {
 &spi {
@@ -40,3 +44,30 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 31 - 0
target/linux/ath79/dts/ar9331_glinet_6416.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	model = "GL.iNet 6416";
 	model = "GL.iNet 6416";
 	compatible = "glinet,6416", "qca,ar9331";
 	compatible = "glinet,6416", "qca,ar9331";
+
+	aliases {
+		label-mac-device = &wmac;
+	};
 };
 };
 
 
 &spi {
 &spi {
@@ -40,3 +44,30 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 0 - 11
target/linux/ath79/dts/ar9331_glinet_64xx.dtsi

@@ -6,10 +6,6 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/input/input.h>
 
 
 / {
 / {
-	aliases {
-		label-mac-device = &wmac;
-	};
-
 	keys {
 	keys {
 		compatible = "gpio-keys";
 		compatible = "gpio-keys";
 
 
@@ -48,8 +44,6 @@
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&uboot 0x1fc00>;
-
 	gmac-config {
 	gmac-config {
 		device = <&gmac>;
 		device = <&gmac>;
 
 
@@ -60,8 +54,6 @@
 
 
 &eth1 {
 &eth1 {
 	status = "okay";
 	status = "okay";
-
-	mtd-mac-address = <&uboot 0x1fc00>;
 };
 };
 
 
 &usb {
 &usb {
@@ -76,7 +68,4 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
 };
 };

+ 34 - 0
target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi

@@ -2,6 +2,12 @@
 
 
 #include "ar9331_tplink_tl-wr710n.dtsi"
 #include "ar9331_tplink_tl-wr710n.dtsi"
 
 
+/ {
+	aliases {
+		label-mac-device = &eth0;
+	};
+};
+
 &spi {
 &spi {
 	status = "okay";
 	status = "okay";
 
 
@@ -35,3 +41,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 0 - 9
target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi

@@ -11,7 +11,6 @@
 		led-failsafe = &led_system;
 		led-failsafe = &led_system;
 		led-running = &led_system;
 		led-running = &led_system;
 		led-upgrade = &led_system;
 		led-upgrade = &led_system;
-		label-mac-device = &eth0;
 	};
 	};
 
 
 	keys {
 	keys {
@@ -47,8 +46,6 @@
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&uboot 0x1fc00>;
-
 	gmac-config {
 	gmac-config {
 		device = <&gmac>;
 		device = <&gmac>;
 
 
@@ -59,9 +56,6 @@
 
 
 &eth1 {
 &eth1 {
 	status = "okay";
 	status = "okay";
-
-	mtd-mac-address = <&uboot 0x1fc00>;
-	mac-address-increment = <(-1)>;
 };
 };
 
 
 &usb {
 &usb {
@@ -77,7 +71,4 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
 };
 };

+ 0 - 9
target/linux/ath79/dts/ar9341_tplink.dtsi

@@ -11,7 +11,6 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
-		label-mac-device = &wmac;
 	};
 	};
 
 
 	leds: leds {
 	leds: leds {
@@ -80,14 +79,9 @@
 	status = "okay";
 	status = "okay";
 
 
 	phy-handle = <&swphy0>;
 	phy-handle = <&swphy0>;
-
-	mtd-mac-address = <&uboot 0x1fc00>;
-	mac-address-increment = <(-1)>;
 };
 };
 
 
 &eth1 {
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
-
 	gmac-config {
 	gmac-config {
 		device = <&gmac>;
 		device = <&gmac>;
 		switch-phy-swap = <1>;
 		switch-phy-swap = <1>;
@@ -96,7 +90,4 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
 };
 };

+ 32 - 0
target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts

@@ -6,6 +6,10 @@
 	model = "TP-Link TL-MR3420 v2";
 	model = "TP-Link TL-MR3420 v2";
 	compatible = "tplink,tl-mr3420-v2", "qca,ar9341";
 	compatible = "tplink,tl-mr3420-v2", "qca,ar9341";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	keys {
 	keys {
 		compatible = "gpio-keys";
 		compatible = "gpio-keys";
 
 
@@ -91,3 +95,31 @@
 &usb_phy {
 &usb_phy {
 	status = "okay";
 	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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts

@@ -6,6 +6,10 @@
 	model = "TP-Link TL-WR841N/ND v8";
 	model = "TP-Link TL-WR841N/ND v8";
 	compatible = "tplink,tl-wr841-v8", "qca,ar9341";
 	compatible = "tplink,tl-wr841-v8", "qca,ar9341";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	keys {
 	keys {
 		compatible = "gpio-keys";
 		compatible = "gpio-keys";
 
 
@@ -59,3 +63,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 30 - 0
target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts

@@ -6,6 +6,10 @@
 	model = "TP-Link TL-WR842N/ND v2";
 	model = "TP-Link TL-WR842N/ND v2";
 	compatible = "tplink,tl-wr842n-v2", "qca,ar9341";
 	compatible = "tplink,tl-wr842n-v2", "qca,ar9341";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	keys {
 	keys {
 		compatible = "gpio-keys";
 		compatible = "gpio-keys";
 
 
@@ -93,6 +97,32 @@
 	status = "okay";
 	status = "okay";
 };
 };
 
 
+&eth0 {
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <(-1)>;
+};
+
 &eth1 {
 &eth1 {
 	phy-handle = <&swphy4>;
 	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>;
+	};
 };
 };

+ 17 - 4
target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts

@@ -88,7 +88,7 @@
 		reg = <0>;
 		reg = <0>;
 		spi-max-frequency = <25000000>;
 		spi-max-frequency = <25000000>;
 
 
-		nor_partitions: partitions {
+		partitions {
 			compatible = "fixed-partitions";
 			compatible = "fixed-partitions";
 			#address-cells = <1>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			#size-cells = <1>;
@@ -123,13 +123,16 @@
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+
 	phy-handle = <&swphy4>;
 	phy-handle = <&swphy4>;
 };
 };
 
 
 &eth1 {
 &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 {
 &wmac {
@@ -137,3 +140,13 @@
 
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-cal-data = <&art 0x1000>;
 };
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr@0 {
+		reg = <0x0 0x6>;
+	};
+};

+ 28 - 0
target/linux/ath79/dts/qca9533_qca_ap143-16m.dts

@@ -47,3 +47,31 @@
 		read-only;
 		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>;
+	};
+};

+ 28 - 0
target/linux/ath79/dts/qca9533_qca_ap143-8m.dts

@@ -47,3 +47,31 @@
 		read-only;
 		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>;
+	};
+};

+ 0 - 6
target/linux/ath79/dts/qca9533_qca_ap143.dtsi

@@ -97,14 +97,10 @@
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&art 0x0>;
-
 	phy-handle = <&swphy4>;
 	phy-handle = <&swphy4>;
 };
 };
 
 
 &eth1 {
 &eth1 {
-	mtd-mac-address = <&art 0x6>;
-
 	gmac-config {
 	gmac-config {
 		device = <&gmac>;
 		device = <&gmac>;
 	};
 	};
@@ -112,8 +108,6 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
 };
 };
 
 
 &usb0 {
 &usb0 {

+ 35 - 0
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v1.dts

@@ -46,3 +46,38 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 35 - 0
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac-v2.dts

@@ -46,3 +46,38 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 2 - 5
target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi

@@ -84,7 +84,7 @@
 	status = "okay";
 	status = "okay";
 
 
 	pll-data = <0xa6000000 0x00000101 0x00001616>;
 	pll-data = <0xa6000000 0x00000101 0x00001616>;
-	mtd-mac-address = <&art 0x0>;
+
 	fixed-link {
 	fixed-link {
 		speed = <1000>;
 		speed = <1000>;
 		full-duplex;
 		full-duplex;
@@ -95,7 +95,7 @@
 	status = "okay";
 	status = "okay";
 
 
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 	pll-data = <0x03000101 0x00000101 0x00001616>;
-	mtd-mac-address = <&art 0x6>;
+
 	fixed-link {
 	fixed-link {
 		speed = <1000>;
 		speed = <1000>;
 		full-duplex;
 		full-duplex;
@@ -104,9 +104,6 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x18>;
 };
 };
 
 
 // This node is required for the Ethernet ports to work correctly.
 // This node is required for the Ethernet ports to work correctly.

+ 0 - 7
target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi

@@ -11,7 +11,6 @@
 		led-failsafe = &led_system;
 		led-failsafe = &led_system;
 		led-running = &led_system;
 		led-running = &led_system;
 		led-upgrade = &led_system;
 		led-upgrade = &led_system;
-		label-mac-device = &eth1;
 	};
 	};
 
 
 	leds: leds {
 	leds: leds {
@@ -149,8 +148,6 @@
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&uboot 0x1fc00>;
-	mac-address-increment = <1>;
 	phy-handle = <&phy0>;
 	phy-handle = <&phy0>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 
 
@@ -163,7 +160,6 @@
 &eth1 {
 &eth1 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&uboot 0x1fc00>;
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
 
 	fixed-link {
 	fixed-link {
@@ -174,7 +170,4 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
 };
 };

+ 32 - 0
target/linux/ath79/dts/qca9558_tplink_archer-c5-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c5-v1", "qca,qca9558";
 	compatible = "tplink,archer-c5-v1", "qca,qca9558";
 	model = "TP-Link Archer C5 v1";
 	model = "TP-Link Archer C5 v1";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &keys {
 &keys {
@@ -43,3 +47,31 @@
 		read-only;
 		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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c7-v1", "qca,qca9558";
 	compatible = "tplink,archer-c7-v1", "qca,qca9558";
 	model = "TP-Link Archer C7 v1";
 	model = "TP-Link Archer C7 v1";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &keys {
 &keys {
@@ -43,3 +47,31 @@
 		read-only;
 		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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c7-v2", "qca,qca9558";
 	compatible = "tplink,archer-c7-v2", "qca,qca9558";
 	model = "TP-Link Archer C7 v2";
 	model = "TP-Link Archer C7 v2";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &keys {
 &keys {
@@ -43,3 +47,31 @@
 		read-only;
 		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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9558_tplink_tl-wdr7500-v3.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,tl-wdr7500-v3", "qca,qca9558";
 	compatible = "tplink,tl-wdr7500-v3", "qca,qca9558";
 	model = "TP-Link TL-WDR7500 v3";
 	model = "TP-Link TL-WDR7500 v3";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &keys {
 &keys {
@@ -43,3 +47,31 @@
 		read-only;
 		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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c58-v1", "qca,qca9560";
 	compatible = "tplink,archer-c58-v1", "qca,qca9560";
 	model = "TP-Link Archer C58 v1";
 	model = "TP-Link Archer C58 v1";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &spi {
 &spi {
@@ -52,3 +56,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c59-v1", "qca,qca9560";
 	compatible = "tplink,archer-c59-v1", "qca,qca9560";
 	model = "TP-Link Archer C59 v1";
 	model = "TP-Link Archer C59 v1";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &leds {
 &leds {
@@ -76,3 +80,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c59-v2", "qca,qca9560";
 	compatible = "tplink,archer-c59-v2", "qca,qca9560";
 	model = "TP-Link Archer C59 v2";
 	model = "TP-Link Archer C59 v2";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &leds {
 &leds {
@@ -82,3 +86,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 0 - 9
target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi

@@ -13,7 +13,6 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
-		label-mac-device = &eth1;
 	};
 	};
 
 
 	led_spi {
 	led_spi {
@@ -126,9 +125,6 @@
 
 
 	phy-handle = <&swphy0>;
 	phy-handle = <&swphy0>;
 
 
-	mtd-mac-address = <&info 0x8>;
-	mac-address-increment = <1>;
-
 	gmac-config {
 	gmac-config {
 		device = <&gmac>;
 		device = <&gmac>;
 
 
@@ -139,13 +135,8 @@
 
 
 &eth1 {
 &eth1 {
 	status = "okay";
 	status = "okay";
-
-	mtd-mac-address = <&info 0x8>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
 };
 };

+ 32 - 0
target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c60-v1", "qca,qca9561";
 	compatible = "tplink,archer-c60-v1", "qca,qca9561";
 	model = "TP-Link Archer C60 v1";
 	model = "TP-Link Archer C60 v1";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &leds {
 &leds {
@@ -64,3 +68,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 32 - 0
target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c60-v2", "qca,qca9561";
 	compatible = "tplink,archer-c60-v2", "qca,qca9561";
 	model = "TP-Link Archer C60 v2";
 	model = "TP-Link Archer C60 v2";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &leds {
 &leds {
@@ -70,3 +74,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 33 - 0
target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c60-v3", "qca,qca9561";
 	compatible = "tplink,archer-c60-v3", "qca,qca9561";
 	model = "TP-Link Archer C60 v3";
 	model = "TP-Link Archer C60 v3";
+
+	aliases {
+		label-mac-device = &eth1;
+	};
 };
 };
 
 
 &leds {
 &leds {
@@ -13,6 +17,7 @@
 		gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
 		gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
 	};
 	};
 };
 };
+
 &spi {
 &spi {
 	status = "okay";
 	status = "okay";
 
 
@@ -64,3 +69,31 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 0 - 9
target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi

@@ -11,7 +11,6 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
-		label-mac-device = &eth1;
 	};
 	};
 
 
 	keys {
 	keys {
@@ -71,20 +70,12 @@
 	status = "okay";
 	status = "okay";
 
 
 	phy-handle = <&swphy4>;
 	phy-handle = <&swphy4>;
-
-	mtd-mac-address = <&info 0x8>;
-	mac-address-increment = <1>;
 };
 };
 
 
 &eth1 {
 &eth1 {
 	status = "okay";
 	status = "okay";
-
-	mtd-mac-address = <&info 0x8>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
 };
 };

+ 20 - 0
target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts

@@ -50,3 +50,23 @@
 &pcie {
 &pcie {
 	status = "okay";
 	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>;
+	};
+};

+ 20 - 0
target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts

@@ -40,3 +40,23 @@
 		read-only;
 		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>;
+	};
+};

+ 0 - 3
target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi

@@ -105,13 +105,10 @@
 
 
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
 
-	mtd-mac-address = <&art 0x1002>;
-	mac-address-increment = <(-1)>;
 	phy-mode = "sgmii";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 	phy-handle = <&phy0>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-	mtd-cal-data = <&art 0x1000>;
 };
 };

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-a7-v5", "qca,qca9563";
 	compatible = "tplink,archer-a7-v5", "qca,qca9563";
 	model = "TP-Link Archer A7 v5";
 	model = "TP-Link Archer A7 v5";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &keys {
 &keys {
@@ -59,3 +63,25 @@
 		read-only;
 		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>;
+	};
+};

+ 24 - 0
target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts

@@ -7,6 +7,8 @@
 	model = "TP-Link Archer C6 v2 (US) / A6 v2 (US/TW)";
 	model = "TP-Link Archer C6 v2 (US) / A6 v2 (US/TW)";
 
 
 	aliases {
 	aliases {
+		label-mac-device = &eth0;
+
 		led-boot = &led_power;
 		led-boot = &led_power;
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
@@ -125,3 +127,25 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 24 - 0
target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts

@@ -7,6 +7,8 @@
 	model = "TP-Link Archer C6 v2 (EU/RU/JP)";
 	model = "TP-Link Archer C6 v2 (EU/RU/JP)";
 
 
 	aliases {
 	aliases {
+		label-mac-device = &eth0;
+
 		led-boot = &led_power;
 		led-boot = &led_power;
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
@@ -119,3 +121,25 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_archer-c7-v5.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,archer-c7-v5", "qca,qca9563";
 	compatible = "tplink,archer-c7-v5", "qca,qca9563";
 	model = "TP-Link Archer C7 v5";
 	model = "TP-Link Archer C7 v5";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &keys {
 &keys {
@@ -65,3 +69,25 @@
 		read-only;
 		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>;
+	};
+};

+ 0 - 11
target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi

@@ -5,12 +5,6 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/input/input.h>
 
 
-/ {
-	aliases {
-		label-mac-device = &eth0;
-	};
-};
-
 &pcie {
 &pcie {
 	status = "okay";
 	status = "okay";
 };
 };
@@ -37,13 +31,8 @@
 
 
 	phy-mode = "sgmii";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 	phy-handle = <&phy0>;
-
-	mtd-mac-address = <&info 0x8>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
 };
 };

+ 0 - 5
target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi

@@ -11,7 +11,6 @@
 		led-failsafe = &led_system;
 		led-failsafe = &led_system;
 		led-running = &led_system;
 		led-running = &led_system;
 		led-upgrade = &led_system;
 		led-upgrade = &led_system;
-		label-mac-device = &eth0;
 	};
 	};
 
 
 	leds {
 	leds {
@@ -162,13 +161,9 @@
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
 
 	phy-mode = "sgmii";
 	phy-mode = "sgmii";
-	mtd-mac-address = <&info 0x8>;
 	phy-handle = <&phy0>;
 	phy-handle = <&phy0>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
 };
 };

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_re450-v2.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,re450-v2", "qca,qca9563";
 	compatible = "tplink,re450-v2", "qca,qca9563";
 	model = "TP-Link RE450 v2";
 	model = "TP-Link RE450 v2";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -44,3 +48,25 @@
 		read-only;
 		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>;
+	};
+};

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_re450-v3.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,re450-v3", "qca,qca9563";
 	compatible = "tplink,re450-v3", "qca,qca9563";
 	model = "TP-Link RE450 v3";
 	model = "TP-Link RE450 v3";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -50,3 +54,25 @@
 		read-only;
 		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>;
+	};
+};

+ 0 - 6
target/linux/ath79/dts/qca9563_tplink_re450.dtsi

@@ -7,7 +7,6 @@
 
 
 / {
 / {
 	aliases {
 	aliases {
-		label-mac-device = &eth0;
 		led-boot = &led_power;
 		led-boot = &led_power;
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
@@ -129,13 +128,8 @@
 
 
 	phy-mode = "sgmii";
 	phy-mode = "sgmii";
 	phy-handle = <&phy4>;
 	phy-handle = <&phy4>;
-
-	mtd-mac-address = <&info 0x8>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
 };
 };

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_re455-v1.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,re455-v1", "qca,qca9563";
 	compatible = "tplink,re455-v1", "qca,qca9563";
 	model = "TP-Link RE455 v1";
 	model = "TP-Link RE455 v1";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &partitions {
@@ -50,3 +54,25 @@
 		read-only;
 		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>;
+	};
+};

+ 2 - 0
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts

@@ -43,6 +43,8 @@
 };
 };
 
 
 &wmac {
 &wmac {
+	mtd-cal-data = <&art 0x1000>;
+
 	nvmem-cells = <&macaddr_uboot_fc00>;
 	nvmem-cells = <&macaddr_uboot_fc00>;
 	nvmem-cell-names = "mac-address";
 	nvmem-cell-names = "mac-address";
 };
 };

+ 0 - 2
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi

@@ -128,6 +128,4 @@
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
 };
 };

+ 45 - 1
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts

@@ -1,13 +1,35 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 // 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";
 	compatible = "tplink,tl-wpa8630p-v2-int", "qca,qca9563";
 	model = "TP-Link WPA8630P v2 (Int.)";
 	model = "TP-Link WPA8630P v2 (Int.)";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &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 {
 	partition@620000 {
 		label = "partition-table";
 		label = "partition-table";
 		reg = <0x620000 0x010000>;
 		reg = <0x620000 0x010000>;
@@ -32,3 +54,25 @@
 		read-only;
 		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>;
+	};
+};

+ 45 - 1
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.0-eu.dts

@@ -1,13 +1,35 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 // 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";
 	compatible = "tplink,tl-wpa8630p-v2.0-eu", "qca,qca9563";
 	model = "TP-Link WPA8630P v2.0 (EU)";
 	model = "TP-Link WPA8630P v2.0 (EU)";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &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 {
 	partition@620000 {
 		label = "partition-table";
 		label = "partition-table";
 		reg = <0x620000 0x010000>;
 		reg = <0x620000 0x010000>;
@@ -32,3 +54,25 @@
 		read-only;
 		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>;
+	};
+};

+ 45 - 1
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.1-eu.dts

@@ -1,13 +1,35 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 // 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";
 	compatible = "tplink,tl-wpa8630p-v2.1-eu", "qca,qca9563";
 	model = "TP-Link WPA8630P v2.1 (EU)";
 	model = "TP-Link WPA8630P v2.1 (EU)";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
 };
 };
 
 
 &partitions {
 &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 */
 	/* 0x620000 to 0x680000 is empty in OEM partitioning */
 
 
 	partition@680000 {
 	partition@680000 {
@@ -28,3 +50,25 @@
 		read-only;
 		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>;
+	};
+};

+ 0 - 37
target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi

@@ -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>;
-};

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n-v5.dts

@@ -5,6 +5,10 @@
 / {
 / {
 	compatible = "tplink,tl-wr1043n-v5", "qca,qca9563";
 	compatible = "tplink,tl-wr1043n-v5", "qca,qca9563";
 	model = "TP-Link TL-WR1043N v5";
 	model = "TP-Link TL-WR1043N v5";
+
+	aliases {
+		label-mac-device = &wmac;
+	};
 };
 };
 
 
 &spi {
 &spi {
@@ -70,3 +74,25 @@
 		};
 		};
 	};
 	};
 };
 };
+
+&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>;
+	};
+};

+ 0 - 5
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi

@@ -11,7 +11,6 @@
 		led-failsafe = &led_system;
 		led-failsafe = &led_system;
 		led-running = &led_system;
 		led-running = &led_system;
 		led-upgrade = &led_system;
 		led-upgrade = &led_system;
-		label-mac-device = &wmac;
 	};
 	};
 
 
 	leds: leds {
 	leds: leds {
@@ -103,14 +102,10 @@
 &eth0 {
 &eth0 {
 	status = "okay";
 	status = "okay";
 
 
-	mtd-mac-address = <&info 0x8>;
 	phy-mode = "sgmii";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 	phy-handle = <&phy0>;
 };
 };
 
 
 &wmac {
 &wmac {
 	status = "okay";
 	status = "okay";
-
-	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
 };
 };

+ 26 - 0
target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts

@@ -6,6 +6,10 @@
 	compatible = "tplink,tl-wr1043nd-v4", "qca,qca9563";
 	compatible = "tplink,tl-wr1043nd-v4", "qca,qca9563";
 	model = "TP-Link TL-WR1043ND v4";
 	model = "TP-Link TL-WR1043ND v4";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	gpio-export {
 	gpio-export {
 		compatible = "gpio-export";
 		compatible = "gpio-export";
 		#size-cells = <0>;
 		#size-cells = <0>;
@@ -99,3 +103,25 @@
 		#trigger-source-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>;
+	};
+};