Skip to content

Commit

Permalink
ipq806x: convert mtd-mac-address to nvmem implementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ansuel authored and ynezz committed Jul 19, 2021
1 parent d284e6e commit 0458a89
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@
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>;
Expand All @@ -429,10 +430,25 @@
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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@
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 {
Expand All @@ -302,7 +303,8 @@
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>;
Expand All @@ -313,3 +315,13 @@
&adm_dma {
status = "okay";
};

&defaultmac {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_defaultmac_8: macaddr@8 {
reg = <0x8 0x6>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@
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>;
Expand All @@ -310,7 +311,8 @@
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>;
Expand All @@ -321,3 +323,17 @@
&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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@
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>;
Expand All @@ -282,7 +283,8 @@
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>;
Expand All @@ -298,3 +300,17 @@
&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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@
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>;
Expand All @@ -312,10 +313,25 @@
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;
};
};
};

&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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@
phy-mode = "sgmii";
qcom,id = <1>;

mtd-mac-address = <&eeprom 0x6>;
nvmem-cells = <&macaddr_eeprom_6>;
nvmem-cell-names = "mac-address";
};

&gmac2 {
Expand All @@ -261,7 +262,8 @@
phy-mode = "sgmii";
qcom,id = <2>;

mtd-mac-address = <&eeprom 0x0>;
nvmem-cells = <&macaddr_eeprom_0>;
nvmem-cell-names = "mac-address";
};

&pcie0 {
Expand Down Expand Up @@ -299,3 +301,17 @@
&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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@
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 {
Expand All @@ -337,7 +338,8 @@
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>;
Expand All @@ -348,3 +350,13 @@
&adm_dma {
status = "okay";
};

&defaultmac {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;

macaddr_defaultmac_0: macaddr@0 {
reg = <0x0 0x6>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@
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>;
Expand All @@ -181,7 +182,8 @@
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>;
Expand Down Expand Up @@ -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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@
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>;
Expand All @@ -243,7 +244,8 @@
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>;
Expand Down Expand Up @@ -463,4 +465,18 @@
output-high;
};
};
};
};

&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>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
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>;
Expand All @@ -378,7 +379,8 @@
qcom,irq = <258>;
mdiobus = <&mdio0>;

mtd-mac-address = <&art 0>;
nvmem-cells = <&macaddr_art_0>;
nvmem-cell-names = "mac-address";

fixed-link {
speed = <1000>;
Expand Down Expand Up @@ -425,7 +427,8 @@
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)>;
};
};
Expand All @@ -445,8 +448,23 @@
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>;
};
};

0 comments on commit 0458a89

Please sign in to comment.