ipq40xx: convert mtd-mac-address to nvmem implementation
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 2 Apr 2021 21:53:52 +0000 (23:53 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 19 Jul 2021 12:51:22 +0000 (14:51 +0200)
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@gmail.com>
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts

index 167094d4a2935664782bf029ad0499b73b8929ca..6c97cede7bf46387f2feb48c4126fbe29bb1f8eb 100644 (file)
 };
 
 &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 {
        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>;
+       };
+};
index cdf0cfe6445bd0e4c615af6c25c3a9d7d6c56758..fb0cec59f7e1330d161d6878694db1fc25fb17c6 100644 (file)
 };
 
 &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 {
 &usb3_hs_phy {
        status = "okay";
 };
+
+&orgdata {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_orgdata_20: macaddr@20 {
+               reg = <0x20 0x6>;
+       };
+};