[openwrt/openwrt] lantiq: convert mtd-mac-address to nvmem for Fritz!Box 736x

LEDE Commits lede-commits at lists.infradead.org
Fri Aug 20 09:14:18 PDT 2021


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/adb3e46616c69472964bfc0763ff622f468cb2ff

commit adb3e46616c69472964bfc0763ff622f468cb2ff
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Fri Aug 20 14:27:13 2021 +0200

    lantiq: convert mtd-mac-address to nvmem for Fritz!Box 736x
    
    Convert this series by moving the definitions to the individual
    devices.
    
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts   | 16 ++++++++++++++++
 .../arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts    | 16 ++++++++++++++++
 .../arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts    | 16 ++++++++++++++++
 .../arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi     |  5 -----
 4 files changed, 48 insertions(+), 5 deletions(-)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
index 3bd6ff0ee7..8881745819 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360-v2.dts
@@ -51,3 +51,19 @@
 		};
 	};
 };
+
+&eth0 {
+	nvmem-cells = <&macaddr_urlader_a91>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <(-2)>;
+};
+
+&urlader {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_urlader_a91: macaddr at a91 {
+		reg = <0xa91 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
index 898ca00c34..945c553688 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
@@ -51,3 +51,19 @@
 		};
 	};
 };
+
+&eth0 {
+	nvmem-cells = <&macaddr_urlader_a91>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <(-2)>;
+};
+
+&urlader {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_urlader_a91: macaddr at a91 {
+		reg = <0xa91 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
index c26908642c..b1423e5dea 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
@@ -83,3 +83,19 @@
 		#address-cells = <2>;
 	};
 };
+
+&eth0 {
+	nvmem-cells = <&macaddr_urlader_a91>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <(-2)>;
+};
+
+&urlader {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_urlader_a91: macaddr at a91 {
+		reg = <0xa91 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
index d91dc74e2f..83ef415423 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
@@ -80,11 +80,6 @@
 	};
 };
 
-&eth0 {
-	mtd-mac-address = <&urlader 0xa91>;
-	mac-address-increment = <(-2)>;
-};
-
 &gphy0 {
 	lantiq,gphy-mode = <GPHY_MODE_GE>;
 };



More information about the lede-commits mailing list