mpc85xx: convert mtd-mac-address to nvmem implementation
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 2 Apr 2021 21:52:21 +0000 (23:52 +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/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts

index 10bb353683a53bacc90907b06d152e86e7e9ec67..97f5b7c7b7604fc1674112269fb832ae9644f200 100644 (file)
                        status = "okay";
                        phy-handle = <&phy0>;
                        phy-connection-type = "rgmii-id";
-                       mtd-mac-address = <&hwinfo 0>;
+                       nvmem-cells = <&macaddr_hwinfo_0>;
+                       nvmem-cell-names = "mac-address";
                };
 
                enet1: ethernet@b1000 {
                        status = "okay";
                        phy-handle = <&phy1>;
                        phy-connection-type = "rgmii-id";
-                       mtd-mac-address = <&hwinfo 0>;
+                       nvmem-cells = <&macaddr_hwinfo_0>;
+                       nvmem-cell-names = "mac-address";
                        mac-address-increment = <1>;
                };
 
        };
 };
 /include/ "fsl/p1020si-post.dtsi"
+
+&hwinfo {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_hwinfo_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index 29b49a9357b7f637ba4c19491ebe77086f17bd48..1976b4af96613bea3feba94deccf42a4d1bbc428 100644 (file)
                enet0: ethernet@b0000 {
                        phy-handle = <&phy0>;
                        phy-connection-type = "rgmii-id";
-                       mtd-mac-address = <&uboot 0x4fc00>;
+                       nvmem-cells = <&macaddr_uboot_4fc00>;
+                       nvmem-cell-names = "mac-address";
                };
 
                enet1: ethernet@b1000 {
                /delete-node/ crypto@30000; /* Pulled in by p1010si-post */
        };
 };
+
+&uboot {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_uboot_4fc00: macaddr@4fc00 {
+               reg = <0x4fc00 0x6>;
+       };
+};