From 821b6640994df32d20a087a01b7c368187a93c24 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Fri, 2 Apr 2021 23:53:52 +0200 Subject: [PATCH] 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 --- .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 20 +++++++++++++++++-- .../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 167094d4a29..6c97cede7bf 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@1006 { + reg = <0x1006 0x6>; + }; + + macaddr_art_5006: macaddr@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 cdf0cfe6445..fb0cec59f7e 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@20 { + reg = <0x20 0x6>; + }; +}; -- 2.30.2