aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-08-18 20:06:29 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-08-18 23:46:02 +0200
commite826b642945ee7b196044a07faddd71c1bd6c6ef (patch)
tree06dc9a1c433de229f67899b0c1da70bbadb930da /target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
parentba3d92c5a087cd4d28124fc366fc63a34732ff3d (diff)
downloadupstream-e826b642945ee7b196044a07faddd71c1bd6c6ef.tar.gz
upstream-e826b642945ee7b196044a07faddd71c1bd6c6ef.tar.bz2
upstream-e826b642945ee7b196044a07faddd71c1bd6c6ef.zip
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 <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts')
-rw-r--r--target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
index 4eb15e2313..e47336e4d2 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts
@@ -5,6 +5,10 @@
/ {
compatible = "netgear,wnr2200-8m", "qca,ar7241";
model = "Netgear WNR2200 (8M)";
+
+ aliases {
+ label-mac-device = &eth1;
+ };
};
&partitions {
@@ -33,3 +37,33 @@
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>;
+ };
+};