From b7f26c63929da908f83c767689bc25ef161db466 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 25 Nov 2023 20:36:49 -0800 Subject: [PATCH] ath79: ar: convert to mac-base Replacement for deprecated mac-address-increment Signed-off-by: Rosen Penev --- .../linux/ath79/dts/ar7161_aruba_ap-175.dts | 10 ++++---- .../dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 5 ++-- target/linux/ath79/dts/ar7161_meraki_mr16.dts | 10 ++++---- .../ath79/dts/ar7161_netgear_wndap360.dts | 5 ++-- .../ath79/dts/ar7240_buffalo_whr-g301n.dts | 9 ++++--- .../ath79/dts/ar7240_netgear_wnr1000-v2.dts | 7 +++--- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 7 +++--- target/linux/ath79/dts/ar7240_tplink.dtsi | 4 ++- .../linux/ath79/dts/ar7240_tplink_tl-wr.dtsi | 6 ++--- .../ath79/dts/ar7241_netgear_wnr2000-v3.dts | 7 +++--- .../ath79/dts/ar7241_netgear_wnr2200-16m.dts | 7 +++--- .../ath79/dts/ar7241_netgear_wnr2200-8m.dts | 7 +++--- target/linux/ath79/dts/ar7241_tplink.dtsi | 9 ++++--- .../ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 10 ++++---- .../ath79/dts/ar7242_engenius_eap350-v1.dts | 7 +++--- .../ath79/dts/ar7242_engenius_ecb350-v1.dts | 7 +++--- target/linux/ath79/dts/ar7242_meraki_mr12.dts | 9 ++++--- .../linux/ath79/dts/ar9330_ziking_cpe46b.dts | 7 +++--- .../ath79/dts/ar9331_hak5_lan-turtle.dtsi | 8 +++--- target/linux/ath79/dts/ar9331_onion_omega.dts | 7 +++--- .../ath79/dts/ar9331_teltonika_rut230-v1.dts | 10 ++++---- .../ath79/dts/ar9331_tplink_tl-wr710n-8m.dtsi | 9 ++++--- .../dts/ar9331_tplink_tl-wr741nd-v4.dtsi | 9 ++++--- target/linux/ath79/dts/ar9341_pcs_cr3000.dts | 7 +++--- .../ath79/dts/ar9341_tplink_tl-mr3420-v2.dts | 9 ++++--- .../ath79/dts/ar9341_tplink_tl-wr841-v8.dts | 9 ++++--- .../ath79/dts/ar9341_tplink_tl-wr842n-v2.dts | 9 ++++--- .../ath79/dts/ar9341_tplink_tl-wr941nd-v5.dts | 9 ++++--- .../ath79/dts/ar9344_aerohive_hiveap-121.dts | 10 ++++---- .../dts/ar9344_araknis_an-300-ap-i-n.dts | 10 ++++---- .../ath79/dts/ar9344_devolo_dlan_wifi.dtsi | 5 ++-- .../ath79/dts/ar9344_engenius_eap600.dts | 10 ++++---- .../ath79/dts/ar9344_engenius_ecb600.dts | 10 ++++---- .../ath79/dts/ar9344_openmesh_mr600.dtsi | 10 ++++---- .../ath79/dts/ar9344_openmesh_om5p-an.dts | 13 +++++----- target/linux/ath79/dts/ar9344_pcs_cap324.dts | 10 ++++---- .../ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts | 5 ++-- .../ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts | 5 ++-- .../ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts | 2 +- .../ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts | 2 +- .../linux/ath79/dts/ar9344_qxwlan_e750x.dtsi | 2 ++ .../linux/ath79/dts/ar9344_samsung_wam250.dts | 7 +++--- .../dts/ar9344_teltonika_rut955-h7v3c0.dts | 5 ++-- .../ath79/dts/ar9344_teltonika_rut955.dts | 5 ++-- .../ath79/dts/ar9344_teltonika_rut9xx.dtsi | 5 ++-- .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts | 25 ++++++++++++++----- .../ath79/dts/ar9344_tplink_tl-wdr4300.dtsi | 19 ++++++++++++-- .../ath79/dts/ar9344_tplink_tl-wdrxxxx.dtsi | 21 ++-------------- .../ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts | 9 ++++--- .../ath79/dts/ar9344_watchguard_ap100.dts | 8 +++--- .../ath79/dts/ar9344_watchguard_ap200.dts | 11 ++++---- .../ath79/dts/ar9344_winchannel_wb2000.dts | 10 ++++---- 52 files changed, 235 insertions(+), 203 deletions(-) diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-175.dts b/target/linux/ath79/dts/ar7161_aruba_ap-175.dts index 14b5edb0967..96a76a3cfc6 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 26147a2c808..e3f48fee852 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 110f1ba2df1..6b8574e880f 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 7baae2450b9..9761234714c 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 1285cdb6098..ad42e0a05fd 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 d1cdf56d18c..32903c2e8ff 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 d069f142351..ac27874c68a 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 959032640a8..5bcfb54bfce 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 9d896360dc1..6c090fb437e 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 61886c6589f..0a6936c5bfd 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 42942834cf8..324207656fc 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 95217f6a7b9..fbd3cb8ec8f 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 fe3f047dc1a..01eee39f195 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 02b96912ba9..e7fe31f36d0 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 361d70eb39c..8e8deba9337 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 2de6dab20df..69629335b3c 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 070cea1217d..adea2778eac 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 f2bd0541c18..256fe5f6154 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 32ff360e893..565f62a0ba8 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 f1bb5cbd74c..81fab872b5c 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 ba1daa4fb88..69965f86a8b 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 cd6da59b3dc..d1336e96895 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 bffe3586025..613b357dc87 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 722ce050149..5ec17034d17 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 1f089affac3..3971df17f81 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 d0f00a4a494..417461a5955 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 3713998e24a..d0f4c2e1f5a 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 492e46e95ca..180504523c9 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 1d4be4d3164..2a2036201e6 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 48388862090..a45aa444de4 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 f1926cc1ebb..df157f582cf 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 7e906dd3e23..888e3f82ada 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 53456d40939..ac9bbea5d4d 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 b7ec8199e9b..7661789e2f6 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 9a7e5e16ca1..38153d9dc06 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 451b0ecaca6..aab04b080a8 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 31145b39298..33e2990284e 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 f44e7a01bed..b20d187941d 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 6b84cb0ef97..ed9cd2000a2 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 13aaf322b76..5a7feba0b65 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 0bc735c0a9b..238a59cbe8d 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 4b7bad78737..0bbd5c92fe9 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 2cb8d4015c5..b94b44cfc4c 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 7a1f05afcca..d8ce6a10927 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 e8b6e089368..64959c9dc29 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 1600e12b644..a66e1fefa25 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 d2791aee709..7aa1989290b 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 138582166bb..7f49b9bde7a 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 a3910d512bc..6649e2477b2 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 b08dce2950b..2fd9a6e51bf 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 56f0c8e0487..9cf6819958f 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 1ab92c698cc..4b692b6d9bb 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>;