From: Rosen Penev Date: Sat, 25 Nov 2023 21:35:04 +0000 (-0800) Subject: ramips: mt7620a: use mac-base X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=458cb2cd6bdb2e7f83ae1fc949e71349bbd162f0;p=openwrt%2Fstaging%2Fthess.git ramips: mt7620a: use mac-base mac-address-increment is deprecated. Signed-off-by: Rosen Penev --- diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index 80eba827d7..d09f4d292e 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -99,7 +99,9 @@ }; macaddr_factory_28: macaddr@28 { + compatible = "mac-base"; reg = <0x28 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -145,7 +147,7 @@ }; ðernet { - nvmem-cells = <&macaddr_factory_28>; + nvmem-cells = <&macaddr_factory_28 0>; nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -159,7 +161,7 @@ pinctrl-names = "default", "pa_gpio"; pinctrl-0 = <&pa_pins>; pinctrl-1 = <&pa_gpio_pins>; - nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28>; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_28 0>; nvmem-cell-names = "eeprom", "mac-address"; }; @@ -171,8 +173,7 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_28 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index 7b9145a741..febfd2e32e 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -108,7 +108,9 @@ }; macaddr_config_e490: macaddr@e490 { + compatible = "mac-base"; reg = <0xe490 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -131,9 +133,8 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_config_e05d>, <&macaddr_config_e490>; + nvmem-cells = <&eeprom_config_e05d>, <&macaddr_config_e490 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <(2)>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts index e2aeb86420..52739f5114 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-806a-b1.dts @@ -109,11 +109,15 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_factory_8004: macaddr@8004 { + compatible = "mac-base"; reg = <0x8004 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -136,9 +140,8 @@ }; ðernet { - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &wmac { @@ -146,9 +149,8 @@ pinctrl-0 = <&pa_pins>; pinctrl-1 = <&pa_gpio_pins>; - nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <(-1)>; }; &pcie { @@ -159,9 +161,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_8004 (-3)>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <(-3)>; led { led-active-low; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 19acb0bb3a..97fc4f0935 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -129,7 +129,9 @@ }; macaddr_config_e496: macaddr@e496 { + compatible = "mac-base"; reg = <0xe496 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -159,9 +161,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_config_e083>, <&macaddr_config_e496>; + nvmem-cells = <&eeprom_config_e083>, <&macaddr_config_e496 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <(2)>; led { led-sources = <0>; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts index 990fa298f2..5f11b73ad9 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -122,7 +122,9 @@ #size-cells = <1>; macaddr_config_e4a8: macaddr@e4a8 { + compatible = "mac-base"; reg = <0xe4a8 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -153,9 +155,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&macaddr_config_e4a8>; + nvmem-cells = <&macaddr_config_e4a8 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(2)>; led { led-sources = <2>; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index a3e65c6468..c1fff81452 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -30,7 +30,6 @@ }; &wifi { - nvmem-cells = <&eeprom_config_e08e>, <&macaddr_config_e50e>; + nvmem-cells = <&eeprom_config_e08e>, <&macaddr_config_e50e 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts index f80aa71681..c4220592e8 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts @@ -58,7 +58,6 @@ }; &wifi { - nvmem-cells = <&eeprom_config_e29e>, <&macaddr_config_e50e>; + nvmem-cells = <&eeprom_config_e29e>, <&macaddr_config_e50e 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi index 241e71cbcf..11cd15922c 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi @@ -169,7 +169,9 @@ }; macaddr_config_e50e: macaddr@e50e { + compatible = "mac-base"; reg = <0xe50e 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index 0be86e5e97..eb21ff7d6f 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -98,7 +98,9 @@ }; macaddr_factory_4: macaddr@4 { + compatible = "mac-base"; reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -140,7 +142,7 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>; - nvmem-cells = <&macaddr_factory_4>; + nvmem-cells = <&macaddr_factory_4 0>; nvmem-cell-names = "mac-address"; phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; @@ -192,7 +194,7 @@ }; &wmac { - nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4>; + nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_4 0>; nvmem-cell-names = "eeprom", "mac-address"; }; @@ -204,8 +206,7 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4>; + nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_4 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index d887099906..f43aa2d3bc 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -106,7 +106,9 @@ }; macaddr_config_e07e: macaddr@e07e { + compatible = "mac-base"; reg = <0xe07e 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -164,9 +166,8 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_config_e08a>, <&macaddr_config_e07e>; + nvmem-cells = <&eeprom_config_e08a>, <&macaddr_config_e07e 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index 7c1d7b483d..88d2416010 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -116,7 +116,9 @@ #size-cells = <1>; macaddr_rom_f100: macaddr@f100 { + compatible = "mac-base"; reg = <0xf100 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -154,7 +156,7 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 0>; nvmem-cell-names = "mac-address"; port@5 { @@ -188,7 +190,7 @@ }; &wmac { - nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100>; + nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>; nvmem-cell-names = "eeprom", "mac-address"; }; @@ -207,8 +209,7 @@ &pcie0 { mt76@0,0 { reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100>; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts index 8fe5b9c3a2..e631f6f4e4 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -73,13 +73,11 @@ pinctrl-0 = <&pa_pins>; pinctrl-1 = <&pa_gpio_pins>; - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &wifi { - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index 88165c02be..d00d2195ee 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -53,12 +53,11 @@ }; &wmac { - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 0>; nvmem-cell-names = "mac-address"; }; &wifi { - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts index 4dbd1b2a98..439bc36dc3 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -73,13 +73,11 @@ pinctrl-0 = <&pa_pins>; pinctrl-1 = <&pa_gpio_pins>; - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &wifi { - nvmem-cells = <&macaddr_rom_f100>; + nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi index e860d3ed13..50a91be8ec 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi @@ -79,7 +79,9 @@ #size-cells = <1>; macaddr_rom_f100: macaddr@f100 { + compatible = "mac-base"; reg = <0xf100 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi index c9d0ab87ee..02f03afc48 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi @@ -55,7 +55,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -96,12 +98,12 @@ }; ðernet { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; &wmac { - nvmem-cells = <&eeprom_radio_0>, <&macaddr_uboot_1fc00>; + nvmem-cells = <&eeprom_radio_0>, <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "eeprom", "mac-address"; }; @@ -113,8 +115,7 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - nvmem-cells = <&eeprom_radio_8000>, <&macaddr_uboot_1fc00>; + nvmem-cells = <&eeprom_radio_8000>, <&macaddr_uboot_1fc00 2>; nvmem-cell-names = "eeprom", "mac-address"; - mac-address-increment = <2>; }; };