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>
phy-mode = "rgmii";
qcom,id = <1>;
mdiobus = <&mdio0>;
- mtd-mac-address = <&factory 0x0>;
+ nvmem-cells = <&macaddr_factory_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
phy-mode = "sgmii";
qcom,id = <2>;
mdiobus = <&mdio0>;
- mtd-mac-address = <&factory 0x6>;
+ nvmem-cells = <&macaddr_factory_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
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>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&defaultmac 0x8>;
+ nvmem-cells = <&macaddr_defaultmac_8>;
+ nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
fixed-link {
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&defaultmac 0x8>;
+ nvmem-cells = <&macaddr_defaultmac_8>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
&adm_dma {
status = "okay";
};
+
+&defaultmac {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_defaultmac_8: macaddr@8 {
+ reg = <0x8 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&art 6>;
+ nvmem-cells = <&macaddr_art_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&art 0>;
+ nvmem-cells = <&macaddr_art_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
&adm_dma {
status = "okay";
};
+
+&art {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_art_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&art 6>;
+ nvmem-cells = <&macaddr_art_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&art 0>;
+ nvmem-cells = <&macaddr_art_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
&adm_dma {
status = "okay";
};
+
+&art {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_art_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&art 6>;
+ nvmem-cells = <&macaddr_art_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&art 0>;
+ nvmem-cells = <&macaddr_art_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
};
-};
\ No newline at end of file
+};
+
+&art {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_art_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
phy-mode = "sgmii";
qcom,id = <1>;
- mtd-mac-address = <&eeprom 0x6>;
+ nvmem-cells = <&macaddr_eeprom_6>;
+ nvmem-cell-names = "mac-address";
};
&gmac2 {
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&eeprom 0x0>;
+ nvmem-cells = <&macaddr_eeprom_0>;
+ nvmem-cell-names = "mac-address";
};
&pcie0 {
&usb3_1 {
status = "okay";
};
+
+&eeprom {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_eeprom_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_eeprom_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&defaultmac 0>;
+ nvmem-cells = <&macaddr_defaultmac_0>;
+ nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
fixed-link {
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&defaultmac 0>;
+ nvmem-cells = <&macaddr_defaultmac_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
&adm_dma {
status = "okay";
};
+
+&defaultmac {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_defaultmac_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&PRODUCTDATA 6>;
+ nvmem-cells = <&macaddr_PRODUCTDATA_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&PRODUCTDATA 0>;
+ nvmem-cells = <&macaddr_PRODUCTDATA_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
};
};
};
+
+&PRODUCTDATA {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_PRODUCTDATA_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_PRODUCTDATA_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&ART 6>;
+ nvmem-cells = <&macaddr_ART_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
phy-mode = "sgmii";
qcom,id = <2>;
- mtd-mac-address = <&ART 0>;
+ nvmem-cells = <&macaddr_ART_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
output-high;
};
};
-};
\ No newline at end of file
+};
+
+&ART {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_ART_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_ART_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
- mtd-mac-address = <&art 6>;
+ nvmem-cells = <&macaddr_art_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
qcom,irq = <258>;
mdiobus = <&mdio0>;
- mtd-mac-address = <&art 0>;
+ nvmem-cells = <&macaddr_art_0>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
compatible = "pci168c,0046";
reg = <0x00010000 0 0 0 0>;
- mtd-mac-address = <&art 6>;
+ nvmem-cells = <&macaddr_art_6>;
+ nvmem-cell-names = "mac-address";
mac-address-increment = <(1)>;
};
};
compatible = "pci168c,0046";
reg = <0x00010000 0 0 0 0>;
- mtd-mac-address = <&art 6>;
+ nvmem-cells = <&macaddr_art_6>;
+ nvmem-cell-names = "mac-address";
mac-address-increment = <(2)>;
};
};
};
+
+&art {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_art_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};
phy-mode = "rgmii";
qcom,id = <0>;
- mtd-mac-address = <&ART 0x0>;
+ nvmem-cells = <&macaddr_ART_0>;
+ nvmem-cell-names = "mac-address";
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
phy-mode = "sgmii";
qcom,id = <1>;
- mtd-mac-address = <&ART 0x6>;
+ nvmem-cells = <&macaddr_ART_6>;
+ nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
/delete-property/ perst-gpios;
force_gen1 = <1>;
};
+
+&ART {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_ART_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_ART_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+};