aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts
diff options
context:
space:
mode:
authorTomasz Maciej Nowak <tmn505@gmail.com>2022-07-04 14:23:05 +0200
committerChristian Lamparter <chunkeey@gmail.com>2022-07-15 15:22:08 +0200
commit1be4cad6690b1c509b6706a5ba4cafbb7ded4fb9 (patch)
treed8e517e855ebfa97edd395ad5534207feb3fc198 /target/linux/ath79/dts
parent94530067adb6e91fdf1e94474e067ec68fd29bf1 (diff)
downloadupstream-1be4cad6690b1c509b6706a5ba4cafbb7ded4fb9.tar.gz
upstream-1be4cad6690b1c509b6706a5ba4cafbb7ded4fb9.tar.bz2
upstream-1be4cad6690b1c509b6706a5ba4cafbb7ded4fb9.zip
ath79: ja76pf2: use nvmem cells to specify MAC addresses
The bootloader on this board hid the partition containig MAC addresses and prevented adding this space to FIS directory, therefore those had to be stored in RedBoot configuration as aliases to be able to assigne them to proper interfaces. Now that fixed partition size are used instead of redboot-fis parser, the partition containig MAC addresses could be specified, and with marking it as nvmem cell, we can assign them without userspace involvement. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (cherry picked from commit b52719b71a3337e5ae840c7a50fe41ebdc070f4e)
Diffstat (limited to 'target/linux/ath79/dts')
-rw-r--r--target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts
index 7a8e2faa53..3d2ef9b5ee 100644
--- a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts
+++ b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts
@@ -90,12 +90,16 @@
&eth0 {
status = "okay";
+ nvmem-cells = <&macaddr_lan>;
+ nvmem-cell-names = "mac-address";
phy-handle = <&phy0>;
};
&eth1 {
status = "okay";
+ nvmem-cells = <&macaddr_wan>;
+ nvmem-cell-names = "mac-address";
phy-handle = <&phy4>;
};
@@ -150,6 +154,17 @@
label = "Atheros Board Data";
reg = <0xff0000 0x10000>;
read-only;
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_wan: macaddr@1000 {
+ reg = <0x1000 0x6>;
+ };
+
+ macaddr_lan: macaddr@1006 {
+ reg = <0x1006 0x6>;
+ };
};
};
};