From: Ansuel Smith Date: Fri, 2 Apr 2021 21:53:52 +0000 (+0200) Subject: ipq40xx: convert mtd-mac-address to nvmem implementation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=821b6640994df32d20a087a01b7c368187a93c24;p=openwrt%2Fstaging%2Fneocturne.git 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 --- 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@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 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@20 { + reg = <0x20 0x6>; + }; +};