[openwrt/openwrt] ipq40xx: convert mtd-mac-address to nvmem implementation

LEDE Commits lede-commits at lists.infradead.org
Mon Jul 19 05:51:53 PDT 2021


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/821b6640994df32d20a087a01b7c368187a93c24

commit 821b6640994df32d20a087a01b7c368187a93c24
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:53:52 2021 +0200

    ipq40xx: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts     | 20 ++++++++++++++++++--
 .../arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts   | 16 ++++++++++++++--
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
index 167094d4a2..6c97cede7b 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
@@ -197,11 +197,13 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&art 0x1006>;
+	nvmem-cells = <&macaddr_art_1006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
-	mtd-mac-address = <&art 0x5006>;
+	nvmem-cells = <&macaddr_art_5006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &nand {
@@ -352,3 +354,17 @@
 	status = "okay";
 	qcom,ath10k-calibration-variant = "CM520-79F";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1006: macaddr at 1006 {
+		reg = <0x1006 0x6>;
+	};
+
+	macaddr_art_5006: macaddr at 5006 {
+		reg = <0x5006 0x6>;
+	};
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
index cdf0cfe644..fb0cec59f7 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
@@ -403,11 +403,13 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&orgdata 0x20>;
+	nvmem-cells = <&macaddr_orgdata_20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
-	mtd-mac-address = <&orgdata 0x20>;
+	nvmem-cells = <&macaddr_orgdata_20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &usb3_ss_phy {
@@ -417,3 +419,13 @@
 &usb3_hs_phy {
 	status = "okay";
 };
+
+&orgdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_orgdata_20: macaddr at 20 {
+		reg = <0x20 0x6>;
+	};
+};



More information about the lede-commits mailing list