Skip to content

Commit

Permalink
mediatek: use mac-base
Browse files Browse the repository at this point in the history
mac-address-increment is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb authored and pull[bot] committed Feb 13, 2024
1 parent d2a18bd commit 19944fd
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 26 deletions.
5 changes: 3 additions & 2 deletions target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};

macaddr_factory_7fff4: macaddr@7fff4 {
Expand Down Expand Up @@ -396,9 +398,8 @@
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x5000>;
ieee80211-freq-limit = <5000000 6000000>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};

Expand Down
5 changes: 3 additions & 2 deletions target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@

phy-connection-type = "2500base-x";

nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;

fixed-link {
speed = <2500>;
Expand Down Expand Up @@ -274,7 +273,9 @@
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down
8 changes: 4 additions & 4 deletions target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 3>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;

fixed-link {
speed = <2500>;
Expand All @@ -113,9 +112,8 @@
reg = <1>;
phy-mode = "gmii";
phy-handle = <&phy0>;
nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

mdio: mdio-bus {
Expand Down Expand Up @@ -218,7 +216,9 @@
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down
13 changes: 7 additions & 6 deletions target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
phy-mode = "2500base-x";

nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_bdinfo_de00>;
nvmem-cells = <&macaddr_bdinfo_de00 0>;

fixed-link {
speed = <2500>;
Expand Down Expand Up @@ -175,7 +175,9 @@
#size-cells = <1>;

macaddr_bdinfo_de00: macaddr@de00 {
compatible = "mac-base";
reg = <0xde00 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -233,32 +235,31 @@
label = "wan";

nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_bdinfo_de00>;
mac-address-increment = <1>;
nvmem-cells = <&macaddr_bdinfo_de00 1>;
};

lan1: port@1 {
reg = <1>;
label = "lan1";

nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_bdinfo_de00>;
nvmem-cells = <&macaddr_bdinfo_de00 0>;
};

port@2 {
reg = <2>;
label = "lan2";

nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_bdinfo_de00>;
nvmem-cells = <&macaddr_bdinfo_de00 0>;
};

port@3 {
reg = <3>;
label = "lan3";

nvmem-cell-names = "mac-address";
nvmem-cells = <&macaddr_bdinfo_de00>;
nvmem-cells = <&macaddr_bdinfo_de00 0>;
};

port@6 {
Expand Down
7 changes: 4 additions & 3 deletions target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
reg = <0>;
phy-mode = "2500base-x";
phy-handle = <&phy0>;
nvmem-cells = <&macaddr>;
nvmem-cells = <&macaddr 0>;
nvmem-cell-names = "mac-address";
};

Expand All @@ -100,9 +100,8 @@
reg = <1>;
phy-mode = "gmii";
phy-handle = <&int_gbe_phy>;
nvmem-cells = <&macaddr>;
nvmem-cells = <&macaddr 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
};

Expand Down Expand Up @@ -185,7 +184,9 @@
#size-cells = <1>;

macaddr: macaddr@a {
compatible = "mac-base";
reg = <0xa 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down
5 changes: 3 additions & 2 deletions target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@
reg = <0>;
phy-mode = "2500base-x";

nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;

fixed-link {
speed = <2500>;
Expand Down Expand Up @@ -183,7 +182,9 @@
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down
10 changes: 5 additions & 5 deletions target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
reg = <0>;
phy-mode = "2500base-x";

nvmem-cells = <&macaddr_config_1c>;
nvmem-cells = <&macaddr_config_1c 0>;
nvmem-cell-names = "mac-address";

fixed-link {
Expand All @@ -111,9 +111,8 @@
phy-handle = <&phy7>;
phy-mode = "2500base-x";

nvmem-cells = <&macaddr_config_1c>;
nvmem-cells = <&macaddr_config_1c 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};

mdio: mdio-bus {
Expand Down Expand Up @@ -189,7 +188,9 @@
#size-cells = <1>;

macaddr_config_1c: macaddr@1c {
compatible = "mac-base";
reg = <0x1c 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down Expand Up @@ -263,8 +264,7 @@

&wifi {
mediatek,mtd-eeprom = <&factory 0x0>;
nvmem-cells = <&macaddr_config_1c>;
nvmem-cells = <&macaddr_config_1c 2>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
reg = <0>;
phy-mode = "2500base-x";

nvmem-cells = <&macaddr_factory_4>;
nvmem-cells = <&macaddr_factory_4 (-1)>;
nvmem-cell-names = "mac-address";
mac-address-increment = <(-1)>;

fixed-link {
speed = <2500>;
Expand Down Expand Up @@ -173,7 +172,9 @@
#size-cells = <1>;

macaddr_factory_4: macaddr@4 {
compatible = "mac-base";
reg = <0x4 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
Expand Down

0 comments on commit 19944fd

Please sign in to comment.