From: Rosen Penev Date: Sat, 25 Nov 2023 22:11:08 +0000 (-0800) Subject: mediatek: use mac-base X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3eb899fd36752ce07fed14cf05de7868d1a67944;p=openwrt%2Fstaging%2Fblocktrron.git mediatek: use mac-base mac-address-increment is deprecated. Signed-off-by: Rosen Penev --- diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts index 503e12c91b..c775d99818 100644 --- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts +++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts @@ -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 { @@ -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>; }; }; diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts index df571a5375..dcf851b274 100644 --- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts +++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts @@ -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>; @@ -274,7 +273,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts index 20aeac6e14..5b1b3083a0 100644 --- a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts +++ b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts @@ -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>; @@ -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 { @@ -218,7 +216,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts index 366d35ecf8..e2fa8bf5d3 100644 --- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts +++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts @@ -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>; @@ -175,7 +175,9 @@ #size-cells = <1>; macaddr_bdinfo_de00: macaddr@de00 { + compatible = "mac-base"; reg = <0xde00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -233,8 +235,7 @@ 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 { @@ -242,7 +243,7 @@ label = "lan1"; nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 0>; }; port@2 { @@ -250,7 +251,7 @@ label = "lan2"; nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 0>; }; port@3 { @@ -258,7 +259,7 @@ label = "lan3"; nvmem-cell-names = "mac-address"; - nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cells = <&macaddr_bdinfo_de00 0>; }; port@6 { diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts index 135eb0410d..b1ebaf4312 100644 --- a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts +++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt3000.dts @@ -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"; }; @@ -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>; }; }; @@ -185,7 +184,9 @@ #size-cells = <1>; macaddr: macaddr@a { + compatible = "mac-base"; reg = <0xa 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi index 82f3d35014..1e738a4474 100644 --- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi +++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi @@ -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>; @@ -183,7 +182,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi index c339d0e6f3..da08bdc723 100644 --- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi +++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi @@ -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 { @@ -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 { @@ -189,7 +188,9 @@ #size-cells = <1>; macaddr_config_1c: macaddr@1c { + compatible = "mac-base"; reg = <0x1c 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -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"; }; diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi index 5974802df0..ffa5acb5d3 100644 --- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi +++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi @@ -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>; @@ -173,7 +172,9 @@ #size-cells = <1>; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; };