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>
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>;
+ };
+};
status = "okay";
phy-mode = "sgmii";
phy-handle = <&phy4>;
- mtd-mac-address = <&eeprom 0>;
+ nvmem-cells = <&macaddr_eeprom_0>;
+ nvmem-cell-names = "mac-address";
};
};
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>;
+ };
+};
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>;
+ };
+};