mvebu: convert mtd-mac-address to nvmem implementation
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 2 Apr 2021 21:45:20 +0000 (23:45 +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/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts

index 80b078cfaa1ab73043f8535e29896053518dd819..cdc91880ee5ad95232b251718b065ca163597319 100644 (file)
                                label = "lan0";
                                phy-handle = <&switch0phy1>;
 
-                               mtd-mac-address = <&factory 0x6>;
+                               nvmem-cells = <&macaddr_factory_6>;
+                               nvmem-cell-names = "mac-address";
                        };
 
                        port@3 {
                                label = "lan1";
                                phy-handle = <&switch0phy2>;
 
-                               mtd-mac-address = <&factory 0x6>;
+                               nvmem-cells = <&macaddr_factory_6>;
+                               nvmem-cell-names = "mac-address";
                        };
                };
 
 };
 
 &eth0 {
-       mtd-mac-address = <&factory 0x0>;
+       nvmem-cells = <&macaddr_factory_0>;
+       nvmem-cell-names = "mac-address";
        phy-mode = "rgmii-id";
        status = "okay";
 
                full-duplex;
        };
 };
+
+&factory {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_factory_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+
+       macaddr_factory_6: macaddr@6 {
+               reg = <0x6 0x6>;
+       };
+};