octeon: convert mtd-mac-address to nvmem implementation
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 2 Apr 2021 21:51:11 +0000 (23:51 +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/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts
target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts
target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi

index d8dabfc370c14d69afdafcc66a62417ba8a3710d..75e2c794b9e665602393484753a5a2fb791bf854 100644 (file)
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy4>;
-                       mtd-mac-address = <&eeprom 0>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 };
+
+&eeprom {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_eeprom_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index 7d31885928893af6d62a4bc395e531e53001b1b5..c1a41cbf705da78e1dc35da63370eece995ae879 100644 (file)
@@ -32,7 +32,8 @@
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy4>;
-                       mtd-mac-address = <&eeprom 0>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
                };
        };
 
@@ -44,8 +45,9 @@
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy8>;
-                       mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(4)>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
+                       mac-address-increment = <(4)>;
                };
 
                ethernet@1 {
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy9>;
-                       mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(5)>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
+                       mac-address-increment = <(5)>;
                };
        };
 };
+
+&eeprom {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_eeprom_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};
index 7a4d2e66838d4a26f239c0467af108a60a669ea4..7eafa32cf6d7bebd73255df38df4da06c279053a 100644 (file)
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy5>;
-                       mtd-mac-address = <&eeprom 0>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
                        mac-address-increment = <(1)>;
                };
 
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy6>;
-                       mtd-mac-address = <&eeprom 0>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
                        mac-address-increment = <(2)>;
                };
 
                        status = "okay";
                        phy-mode = "sgmii";
                        phy-handle = <&phy7>;
-                       mtd-mac-address = <&eeprom 0>;
+                       nvmem-cells = <&macaddr_eeprom_0>;
+                       nvmem-cell-names = "mac-address";
                        mac-address-increment = <(3)>;
                };
        };
 };
+
+&eeprom {
+       compatible = "nvmem-cells";
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       macaddr_eeprom_0: macaddr@0 {
+               reg = <0x0 0x6>;
+       };
+};