From: Rosen Penev Date: Sun, 26 Nov 2023 04:36:49 +0000 (-0800) Subject: ath79: ar: convert to mac-base X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b7f26c63929da908f83c767689bc25ef161db466;p=openwrt%2Fstaging%2Fhauke.git ath79: ar: convert to mac-base Replacement for deprecated mac-address-increment Signed-off-by: Rosen Penev --- diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-175.dts b/target/linux/ath79/dts/ar7161_aruba_ap-175.dts index 14b5edb096..96a76a3cfc 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-175.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-175.dts @@ -122,9 +122,8 @@ ath9k0: wifi@0,11 { compatible = "pci168c,0029"; - nvmem-cells = <&macaddr_hwinfo_1c>; + nvmem-cells = <&macaddr_hwinfo_1c 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; reg = <0x8800 0 0 0 0>; #gpio-cells = <2>; gpio-controller; @@ -132,9 +131,8 @@ ath9k1: wifi@0,12 { compatible = "pci168c,0029"; - nvmem-cells = <&macaddr_hwinfo_1c>; + nvmem-cells = <&macaddr_hwinfo_1c 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; reg = <0x9000 0 0 0 0>; #gpio-cells = <2>; gpio-controller; @@ -151,7 +149,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_hwinfo_1c>; + nvmem-cells = <&macaddr_hwinfo_1c 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; @@ -194,7 +192,9 @@ #size-cells = <1>; macaddr_hwinfo_1c: macaddr@1c { + compatible = "mac-base"; reg = <0x1c 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi index 26147a2c80..e3f48fee85 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -159,7 +159,9 @@ }; macaddr_art_520c: macaddr@520c { + compatible = "mac-base"; reg = <0x520c 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -254,9 +256,8 @@ ð1 { status = "okay"; - nvmem-cells = <&macaddr_art_520c>; + nvmem-cells = <&macaddr_art_520c 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; phy-handle = <&phy4>; }; diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts index 110f1ba2df..6b8574e880 100644 --- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts +++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts @@ -74,9 +74,8 @@ compatible = "pci168c,0029"; reg = <0x8800 0 0 0 0>; qca,no-eeprom; - nvmem-cells = <&macaddr_config_66>; + nvmem-cells = <&macaddr_config_66 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; #gpio-cells = <2>; gpio-controller; }; @@ -85,9 +84,8 @@ compatible = "pci168c,0029"; reg = <0x9000 0 0 0 0>; qca,no-eeprom; - nvmem-cells = <&macaddr_config_66>; + nvmem-cells = <&macaddr_config_66 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; #gpio-cells = <2>; gpio-controller; }; @@ -103,7 +101,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_config_66>; + nvmem-cells = <&macaddr_config_66 0>; nvmem-cell-names = "mac-address"; pll-data = <0x00110000 0x00001099 0x00991099>; @@ -148,7 +146,9 @@ #size-cells = <1>; macaddr_config_66: macaddr@66 { + compatible = "mac-base"; reg = <0x66 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts index 7baae2450b..9761234714 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts @@ -126,7 +126,9 @@ }; macaddr_art_520c: macaddr@520c { + compatible = "mac-base"; reg = <0x520c 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { @@ -157,9 +159,8 @@ ath9k1: wifi@0,12 { compatible = "pci168c,0029"; reg = <0x9000 0 0 0 0>; - nvmem-cells = <&macaddr_art_520c>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_520c 1>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <1>; #gpio-cells = <2>; gpio-controller; }; diff --git a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts index 1285cdb609..ad42e0a05f 100644 --- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts +++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts @@ -154,7 +154,9 @@ #size-cells = <1>; macaddr_art_120c: macaddr@120c { + compatible = "mac-base"; reg = <0x120c 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -163,16 +165,15 @@ }; ð0 { - nvmem-cells = <&macaddr_art_120c>; + nvmem-cells = <&macaddr_art_120c 0>; nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_art_120c>; + nvmem-cells = <&macaddr_art_120c 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &pcie { @@ -182,7 +183,7 @@ compatible = "pci168c,002a"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; - nvmem-cells = <&macaddr_art_120c>; + nvmem-cells = <&macaddr_art_120c 0>; nvmem-cell-names = "mac-address"; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts index d1cdf56d18..32903c2e8f 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts +++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts @@ -175,7 +175,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_art_6: macaddr@6 { @@ -188,7 +190,7 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; @@ -205,9 +207,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index d069f14235..ac27874c68 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -108,7 +108,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_art_6: macaddr@6 { @@ -121,7 +123,7 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; @@ -138,9 +140,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_tplink.dtsi b/target/linux/ath79/dts/ar7240_tplink.dtsi index 959032640a..5bcfb54bfc 100644 --- a/target/linux/ath79/dts/ar7240_tplink.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink.dtsi @@ -84,7 +84,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -114,7 +116,7 @@ ath9k: wifi@0,0 { reg = <0x0000 0 0 0 0>; qca,no-eeprom; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi index 9d896360dc..6c090fb437 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi @@ -30,15 +30,13 @@ }; ð0 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; ð1 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &ath9k { diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts index 61886c6589..0a6936c5bf 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts @@ -178,7 +178,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_art_6: macaddr@6 { @@ -193,7 +195,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; @@ -210,9 +212,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,002e"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts index 42942834cf..324207656f 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-16m.dts @@ -42,7 +42,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_art_6: macaddr@6 { @@ -53,7 +55,7 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; @@ -63,7 +65,6 @@ }; &ath9k { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts index 95217f6a7b..fbd3cb8ec8 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200-8m.dts @@ -42,7 +42,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; macaddr_art_6: macaddr@6 { @@ -53,7 +55,7 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; @@ -63,7 +65,6 @@ }; &ath9k { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index fe3f047dc1..01eee39f19 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -71,7 +71,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -99,7 +101,7 @@ #gpio-cells = <2>; gpio-controller; qca,no-eeprom; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; }; @@ -107,12 +109,11 @@ ð0 { /* WAN interface, initialized last as eth1 */ status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { /* LAN interface, initialized first as eth0 */ - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index 02b96912ba..e7fe31f36d 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -109,7 +109,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -138,7 +140,7 @@ #gpio-cells = <2>; gpio-controller; qca,no-eeprom; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; }; @@ -146,13 +148,11 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; ð1 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; diff --git a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts index 361d70eb39..8e8deba933 100644 --- a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts @@ -63,7 +63,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; @@ -78,9 +78,8 @@ ath9k: wifi@0,0,0 { compatible = "pci168c,002a"; reg = <0x0 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; @@ -94,7 +93,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts index 2de6dab20d..69629335b3 100644 --- a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts @@ -63,7 +63,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; @@ -78,9 +78,8 @@ ath9k: wifi@0,0,0 { compatible = "pci168c,002a"; reg = <0x0 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; @@ -94,7 +93,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts index 070cea1217..adea2778ea 100644 --- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts +++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts @@ -74,9 +74,8 @@ compatible = "pci168c,002a"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; - nvmem-cells = <&macaddr_config_66>; + nvmem-cells = <&macaddr_config_66 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; }; @@ -91,7 +90,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_config_66>; + nvmem-cells = <&macaddr_config_66 0>; nvmem-cell-names = "mac-address"; pll-data = <0x02000000 0x00000101 0x00001313>; @@ -107,7 +106,7 @@ ð1 { status = "okay"; - nvmem-cells = <&macaddr_config_66>; + nvmem-cells = <&macaddr_config_66 0>; nvmem-cell-names = "mac-address"; }; @@ -147,7 +146,9 @@ #size-cells = <1>; macaddr_config_66: macaddr@66 { + compatible = "mac-base"; reg = <0x66 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts index f2bd0541c1..256fe5f615 100644 --- a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts +++ b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts @@ -85,7 +85,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -96,16 +98,15 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; &wmac { diff --git a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi index 32ff360e89..565f62a0ba 100644 --- a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi +++ b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi @@ -24,9 +24,8 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; gmac-config { device = <&gmac>; @@ -39,9 +38,8 @@ ð1 { status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &pinmux { @@ -75,7 +73,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar9331_onion_omega.dts b/target/linux/ath79/dts/ar9331_onion_omega.dts index f1bb5cbd74..81fab872b5 100644 --- a/target/linux/ath79/dts/ar9331_onion_omega.dts +++ b/target/linux/ath79/dts/ar9331_onion_omega.dts @@ -72,9 +72,8 @@ ð1 { status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; gmac-config { device = <&gmac>; @@ -107,7 +106,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -132,6 +133,6 @@ mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts index ba1daa4fb8..69965f86a8 100644 --- a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts +++ b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts @@ -109,15 +109,14 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 0>; nvmem-cell-names = "mac-address"; }; @@ -151,7 +150,9 @@ #size-cells = <1>; macaddr_config_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -200,7 +201,6 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi index cd6da59b3d..d1336e9689 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi @@ -32,7 +32,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -53,19 +55,18 @@ }; ð0 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; ð1 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi index bffe358602..613b357dc8 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -108,7 +108,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -131,9 +133,8 @@ ð0 { /* WAN interface, initialized last as eth1 */ status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; gmac-config { device = <&gmac>; @@ -146,7 +147,7 @@ ð1 { /* LAN interface, initialized first as eth0 */ status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; @@ -154,6 +155,6 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts index 722ce05014..5ec17034d1 100644 --- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts +++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts @@ -125,7 +125,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -143,16 +145,15 @@ status = "okay"; phy-handle = <&swphy0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { phy-handle = <&swphy4>; pll-data = <0x06000000 0x00000101 0x00001616>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; gmac-config { diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts index 1f089affac..3971df17f8 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts @@ -71,7 +71,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -100,19 +102,18 @@ }; ð0 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; ð1 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts index d0f00a4a49..417461a595 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts @@ -54,7 +54,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -75,19 +77,18 @@ }; ð0 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; ð1 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts index 3713998e24..d0f4c2e1f5 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts @@ -72,7 +72,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -101,21 +103,20 @@ }; ð0 { - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; ð1 { phy-handle = <&swphy4>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr941nd-v5.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr941nd-v5.dts index 492e46e95c..180504523c 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr941nd-v5.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr941nd-v5.dts @@ -64,7 +64,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -85,19 +87,18 @@ }; ð0 { // WAN port, initialized last as eth1 - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { // LAN ports, initialized first as eth0 - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts index 1d4be4d316..2a2036201e 100644 --- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts +++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts @@ -106,9 +106,8 @@ compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_hw_info_0>; + nvmem-cells = <&macaddr_hw_info_0 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; }; @@ -148,7 +147,9 @@ #size-cells = <1>; macaddr_hw_info_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -171,9 +172,8 @@ &wmac { status = "okay"; - nvmem-cells = <&macaddr_hw_info_0>; + nvmem-cells = <&macaddr_hw_info_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &nand { @@ -227,7 +227,7 @@ pll-data = <0x06000000 0x00000101 0x00001313>; - nvmem-cells = <&macaddr_hw_info_0>; + nvmem-cells = <&macaddr_hw_info_0 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; diff --git a/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts b/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts index 4838886209..a45aa444de 100644 --- a/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts +++ b/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts @@ -72,7 +72,7 @@ ð0 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; @@ -87,9 +87,8 @@ ath9k: wifi@0,0,0 { compatible = "pci168c,0030"; reg = <0x0 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_0 1>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <1>; ieee80211-freq-limit = <2402000 2482000>; #gpio-cells = <2>; gpio-controller; @@ -101,9 +100,8 @@ ieee80211-freq-limit = <4900000 5990000>; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 2>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <2>; }; &art { @@ -113,7 +111,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { diff --git a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi index f1926cc1eb..df157f582c 100644 --- a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi +++ b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi @@ -123,7 +123,9 @@ #size-cells = <1>; macaddr_art_1002: macaddr@1002 { + compatible = "mac-base"; reg = <0x1002 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -140,9 +142,8 @@ pll-data = <0x02000000 0x00000101 0x00001616>; - nvmem-cells = <&macaddr_art_1002>; + nvmem-cells = <&macaddr_art_1002 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; phy-mode = "rgmii"; phy-handle = <&phy0>; diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts index 7e906dd3e2..888e3f82ad 100644 --- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts @@ -29,22 +29,20 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &pcie { wifi@0,0,0 { - nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_0 0>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; }; }; &wmac { - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 (-1)>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <(-1)>; }; &art { @@ -54,7 +52,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts index 53456d4093..ac9bbea5d4 100644 --- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts @@ -24,22 +24,20 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; }; &pcie { wifi@0,0,0 { - nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <(-2)>; }; }; &wmac { - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 (-1)>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <(-1)>; }; &art { @@ -49,7 +47,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi index b7ec8199e9..7661789e2f 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi +++ b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi @@ -81,7 +81,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { @@ -112,7 +114,7 @@ pll-data = <0x02000000 0x00000101 0x00001313>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; @@ -129,9 +131,8 @@ &wmac { status = "okay"; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 1>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <1>; }; &pcie { @@ -140,9 +141,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_0 8>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <8>; gpio-controller; #gpio-cells = <2>; diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts index 9a7e5e16ca..38153d9dc0 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts +++ b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts @@ -159,7 +159,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { @@ -190,7 +192,7 @@ pll-data = <0x02000000 0x00000101 0x00001313>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; @@ -208,17 +210,15 @@ ð1 { status = "okay"; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; &wmac { status = "okay"; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 2>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <2>; }; &pcie { @@ -227,8 +227,7 @@ wifi@0,0 { compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_0 16>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <16>; }; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts index 451b0ecaca..aab04b080a 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts @@ -114,7 +114,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -128,9 +130,8 @@ ath9k: wifi@0,0 { compatible = "168c,0030"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; mtd-cal-data = <&art 0x5000>; qca,no-eeprom; ieee80211-freq-limit = <2402000 2482000>; @@ -144,9 +145,8 @@ ieee80211-freq-limit = <4900000 5990000>; mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; }; &mdio0 { @@ -164,7 +164,7 @@ /* default for ar934x, except for 1000M */ pll-data = <0x06000000 0x00000101 0x00001616>; - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts index 31145b3929..33e2990284 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts @@ -24,15 +24,14 @@ phy-handle = <&swphy4>; - nvmem-cells = <&macaddr_pridata_400>; + nvmem-cells = <&macaddr_pridata_400 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_pridata_400>; + nvmem-cells = <&macaddr_pridata_400 0>; nvmem-cell-names = "mac-address"; gmac-config { diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts index f44e7a01be..b20d187941 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts @@ -24,15 +24,14 @@ phy-handle = <&swphy4>; - nvmem-cells = <&macaddr_pridata_400>; + nvmem-cells = <&macaddr_pridata_400 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_pridata_400>; + nvmem-cells = <&macaddr_pridata_400 0>; nvmem-cell-names = "mac-address"; gmac-config { diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts index 6b84cb0ef9..ed9cd2000a 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts @@ -31,7 +31,7 @@ pll-data = <0x06000000 0x00000101 0x00001616>; - nvmem-cells = <&macaddr_pridata_400>; + nvmem-cells = <&macaddr_pridata_400 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts index 13aaf322b7..5a7feba0b6 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts @@ -31,7 +31,7 @@ pll-data = <0x06000000 0x00000101 0x00001616>; - nvmem-cells = <&macaddr_pridata_400>; + nvmem-cells = <&macaddr_pridata_400 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi b/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi index 0bc735c0a9..238a59cbe8 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi @@ -92,7 +92,9 @@ #size-cells = <1>; macaddr_pridata_400: macaddr@400 { + compatible = "mac-base"; reg = <0x400 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar9344_samsung_wam250.dts b/target/linux/ath79/dts/ar9344_samsung_wam250.dts index 4b7bad7873..0bbd5c92fe 100644 --- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts +++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts @@ -66,9 +66,8 @@ phy-handle = <&swphy0>; - nvmem-cells = <&macaddr_art_1002>; + nvmem-cells = <&macaddr_art_1002 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; gmac-config { device = <&gmac>; @@ -79,7 +78,7 @@ ð1 { status = "okay"; - nvmem-cells = <&macaddr_art_1002>; + nvmem-cells = <&macaddr_art_1002 0>; nvmem-cell-names = "mac-address"; }; @@ -144,7 +143,9 @@ #size-cells = <1>; macaddr_art_1002: macaddr@1002 { + compatible = "mac-base"; reg = <0x1002 0x6>; + #nvmem-cell-cells = <1>; }; }; }; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts index 2cb8d4015c..b94b44cfc4 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts +++ b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts @@ -164,15 +164,14 @@ phy-handle = <&swphy4>; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts index 7a1f05afcc..d8ce6a1092 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts +++ b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts @@ -163,15 +163,14 @@ phy-handle = <&swphy4>; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 0>; nvmem-cell-names = "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi index e8b6e08936..64959c9dc2 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi +++ b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi @@ -86,7 +86,9 @@ #size-cells = <1>; macaddr_config_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -154,9 +156,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_config_0>; + nvmem-cells = <&macaddr_config_0 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; &pinmux { diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts index 1600e12b64..a66e1fefa2 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts @@ -49,16 +49,30 @@ status = "okay"; }; -&ath9k { - mac-address-increment = <1>; +&wmac { + status = "okay"; + nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0033"; + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + nvmem-cells = <&macaddr_uboot_1fc00 1>, <&cal_art_5000>; + nvmem-cell-names = "mac-address", "calibration"; + }; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-1)>; gmac-config { device = <&gmac>; @@ -72,7 +86,6 @@ phy-handle = <&swphy4>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 2>; nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index d2791aee70..7aa1989290 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -76,7 +76,22 @@ }; &wmac { - mac-address-increment = <(-1)>; + status = "okay"; + nvmem-cells = <&macaddr_uboot_1fc00 (-1)>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0033"; + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + nvmem-cells = <&macaddr_uboot_1fc00 0>, <&cal_art_5000>; + nvmem-cell-names = "mac-address", "calibration"; + }; }; &mdio0 { @@ -104,7 +119,7 @@ /* default for ar934x, except for 1000M */ pll-data = <0x06000000 0x00000101 0x00001616>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi index 138582166b..7f49b9bde7 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi @@ -90,7 +90,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -123,22 +125,3 @@ }; }; }; - -&pcie { - status = "okay"; - - ath9k: wifi@0,0 { - compatible = "pci168c,0033"; - reg = <0x0000 0 0 0 0>; - #gpio-cells = <2>; - gpio-controller; - nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_art_5000>; - nvmem-cell-names = "mac-address", "calibration"; - }; -}; - -&wmac { - status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>, <&cal_art_1000>; - nvmem-cell-names = "mac-address", "calibration"; -}; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts index a3910d512b..6649e2477b 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts @@ -102,7 +102,9 @@ #size-cells = <1>; macaddr_uboot_1fc00: macaddr@1fc00 { + compatible = "mac-base"; reg = <0x1fc00 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -143,7 +145,7 @@ mtd-cal-data = <&art 0x1000>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; }; @@ -152,15 +154,14 @@ phy-handle = <&swphy0>; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 1>; nvmem-cell-names = "mac-address"; - mac-address-increment = <1>; }; ð1 { status = "okay"; - nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00 0>; nvmem-cell-names = "mac-address"; gmac-config { diff --git a/target/linux/ath79/dts/ar9344_watchguard_ap100.dts b/target/linux/ath79/dts/ar9344_watchguard_ap100.dts index b08dce2950..2fd9a6e51b 100644 --- a/target/linux/ath79/dts/ar9344_watchguard_ap100.dts +++ b/target/linux/ath79/dts/ar9344_watchguard_ap100.dts @@ -56,9 +56,8 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &pcie { @@ -73,9 +72,8 @@ &wmac { /delete-property/ ieee80211-freq-limit; - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <(-2)>; }; &art { @@ -85,7 +83,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { diff --git a/target/linux/ath79/dts/ar9344_watchguard_ap200.dts b/target/linux/ath79/dts/ar9344_watchguard_ap200.dts index 56f0c8e048..9cf6819958 100644 --- a/target/linux/ath79/dts/ar9344_watchguard_ap200.dts +++ b/target/linux/ath79/dts/ar9344_watchguard_ap200.dts @@ -56,23 +56,20 @@ }; ð0 { - nvmem-cells = <&macaddr_art_0>; + nvmem-cells = <&macaddr_art_0 (-2)>; nvmem-cell-names = "mac-address"; - mac-address-increment = <(-2)>; }; &pcie { wifi@0,0,0 { - nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_art_0 (-1)>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <(-1)>; }; }; &wmac { - nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_art_0 (-2)>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <(-2)>; }; &art { @@ -82,7 +79,9 @@ #size-cells = <1>; macaddr_art_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; calibration_art_1000: calibration@1000 { diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts index 1ab92c698c..4b692b6d9b 100644 --- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts +++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts @@ -150,7 +150,9 @@ #size-cells = <1>; macaddr_addr_0: macaddr@0 { + compatible = "mac-base"; reg = <0x0 0x6>; + #nvmem-cell-cells = <1>; }; }; }; @@ -164,9 +166,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&macaddr_addr_0>, <&calibration_art_5000>; + nvmem-cells = <&macaddr_addr_0 0x10>, <&calibration_art_5000>; nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <0x10>; #gpio-cells = <2>; gpio-controller; }; @@ -183,7 +184,7 @@ &wmac { status = "okay"; - nvmem-cells = <&macaddr_addr_0>, <&calibration_art_1000>; + nvmem-cells = <&macaddr_addr_0 0>, <&calibration_art_1000>; nvmem-cell-names = "mac-address", "calibration"; }; @@ -200,9 +201,8 @@ pll-data = <0xe000000 0x04000101 0x04001313>; - nvmem-cells = <&macaddr_addr_0>; + nvmem-cells = <&macaddr_addr_0 0x21>; nvmem-cell-names = "mac-address"; - mac-address-increment = <0x21>; phy-mode = "rgmii-rxid"; phy-handle = <&phy4>;