Skip to content
Snippets Groups Projects
Commit 0458a899 authored by Ansuel Smith's avatar Ansuel Smith Committed by Petr Štetiar
Browse files

ipq806x: convert mtd-mac-address to nvmem implementation


Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
The conversion is done with an automated script.

Signed-off-by: default avatarAnsuel Smith <ansuelsmth@gmail.com>
parent d284e6ef
No related branches found
No related tags found
No related merge requests found
Showing
with 196 additions and 26 deletions
...@@ -416,7 +416,8 @@ ...@@ -416,7 +416,8 @@
phy-mode = "rgmii"; phy-mode = "rgmii";
qcom,id = <1>; qcom,id = <1>;
mdiobus = <&mdio0>; mdiobus = <&mdio0>;
mtd-mac-address = <&factory 0x0>; nvmem-cells = <&macaddr_factory_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -429,10 +430,25 @@ ...@@ -429,10 +430,25 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mdiobus = <&mdio0>; mdiobus = <&mdio0>;
mtd-mac-address = <&factory 0x6>; nvmem-cells = <&macaddr_factory_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
full-duplex; 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>;
};
};
...@@ -288,7 +288,8 @@ ...@@ -288,7 +288,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&defaultmac 0x8>; nvmem-cells = <&macaddr_defaultmac_8>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>; mac-address-increment = <1>;
fixed-link { fixed-link {
...@@ -302,7 +303,8 @@ ...@@ -302,7 +303,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&defaultmac 0x8>; nvmem-cells = <&macaddr_defaultmac_8>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -313,3 +315,13 @@ ...@@ -313,3 +315,13 @@
&adm_dma { &adm_dma {
status = "okay"; status = "okay";
}; };
&defaultmac {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_defaultmac_8: macaddr@8 {
reg = <0x8 0x6>;
};
};
...@@ -297,7 +297,8 @@ ...@@ -297,7 +297,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&art 6>; nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -310,7 +311,8 @@ ...@@ -310,7 +311,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&art 0>; nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -321,3 +323,17 @@ ...@@ -321,3 +323,17 @@
&adm_dma { &adm_dma {
status = "okay"; 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>;
};
};
...@@ -269,7 +269,8 @@ ...@@ -269,7 +269,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&art 6>; nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -282,7 +283,8 @@ ...@@ -282,7 +283,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&art 0>; nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -298,3 +300,17 @@ ...@@ -298,3 +300,17 @@
&adm_dma { &adm_dma {
status = "okay"; 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>;
};
};
...@@ -299,7 +299,8 @@ ...@@ -299,7 +299,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&art 6>; nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -312,10 +313,25 @@ ...@@ -312,10 +313,25 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&art 0>; nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
full-duplex; 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>;
};
};
...@@ -250,7 +250,8 @@ ...@@ -250,7 +250,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <1>; qcom,id = <1>;
mtd-mac-address = <&eeprom 0x6>; nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
}; };
&gmac2 { &gmac2 {
...@@ -261,7 +262,8 @@ ...@@ -261,7 +262,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&eeprom 0x0>; nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
}; };
&pcie0 { &pcie0 {
...@@ -299,3 +301,17 @@ ...@@ -299,3 +301,17 @@
&usb3_1 { &usb3_1 {
status = "okay"; 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>;
};
};
...@@ -323,7 +323,8 @@ ...@@ -323,7 +323,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&defaultmac 0>; nvmem-cells = <&macaddr_defaultmac_0>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>; mac-address-increment = <1>;
fixed-link { fixed-link {
...@@ -337,7 +338,8 @@ ...@@ -337,7 +338,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&defaultmac 0>; nvmem-cells = <&macaddr_defaultmac_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -348,3 +350,13 @@ ...@@ -348,3 +350,13 @@
&adm_dma { &adm_dma {
status = "okay"; status = "okay";
}; };
&defaultmac {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_defaultmac_0: macaddr@0 {
reg = <0x0 0x6>;
};
};
...@@ -167,7 +167,8 @@ ...@@ -167,7 +167,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&PRODUCTDATA 6>; nvmem-cells = <&macaddr_PRODUCTDATA_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -181,7 +182,8 @@ ...@@ -181,7 +182,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&PRODUCTDATA 0>; nvmem-cells = <&macaddr_PRODUCTDATA_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -380,3 +382,17 @@ ...@@ -380,3 +382,17 @@
}; };
}; };
}; };
&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>;
};
};
...@@ -229,7 +229,8 @@ ...@@ -229,7 +229,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&ART 6>; nvmem-cells = <&macaddr_ART_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -243,7 +244,8 @@ ...@@ -243,7 +244,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <2>; qcom,id = <2>;
mtd-mac-address = <&ART 0>; nvmem-cells = <&macaddr_ART_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -463,4 +465,18 @@ ...@@ -463,4 +465,18 @@
output-high; 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>;
};
};
...@@ -358,7 +358,8 @@ ...@@ -358,7 +358,8 @@
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
mtd-mac-address = <&art 6>; nvmem-cells = <&macaddr_art_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -378,7 +379,8 @@ ...@@ -378,7 +379,8 @@
qcom,irq = <258>; qcom,irq = <258>;
mdiobus = <&mdio0>; mdiobus = <&mdio0>;
mtd-mac-address = <&art 0>; nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -425,7 +427,8 @@ ...@@ -425,7 +427,8 @@
compatible = "pci168c,0046"; compatible = "pci168c,0046";
reg = <0x00010000 0 0 0 0>; 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)>; mac-address-increment = <(1)>;
}; };
}; };
...@@ -445,8 +448,23 @@ ...@@ -445,8 +448,23 @@
compatible = "pci168c,0046"; compatible = "pci168c,0046";
reg = <0x00010000 0 0 0 0>; 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)>; 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>;
};
};
...@@ -251,7 +251,8 @@ ...@@ -251,7 +251,8 @@
phy-mode = "rgmii"; phy-mode = "rgmii";
qcom,id = <0>; qcom,id = <0>;
mtd-mac-address = <&ART 0x0>; nvmem-cells = <&macaddr_ART_0>;
nvmem-cell-names = "mac-address";
pinctrl-0 = <&rgmii2_pins>; pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
...@@ -267,7 +268,8 @@ ...@@ -267,7 +268,8 @@
phy-mode = "sgmii"; phy-mode = "sgmii";
qcom,id = <1>; qcom,id = <1>;
mtd-mac-address = <&ART 0x6>; nvmem-cells = <&macaddr_ART_6>;
nvmem-cell-names = "mac-address";
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
...@@ -301,3 +303,17 @@ ...@@ -301,3 +303,17 @@
/delete-property/ perst-gpios; /delete-property/ perst-gpios;
force_gen1 = <1>; 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>;
};
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment