From abc17bf306acd1c5954fbba97134e891439f917c Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Fri, 2 Apr 2021 23:47:31 +0200 Subject: [PATCH] ath79: convert mtd-mac-address to nvmem implementation Define nvmem-cells and convert mtd-mac-address to nvmem implementation. The conversion is done with an automated script. Signed-off-by: Ansuel Smith --- .../linux/ath79/dts/ar7161_aruba_ap-105.dts | 19 ++++++++++--- .../dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 20 ++++++++++++-- target/linux/ath79/dts/ar7161_meraki_mr16.dts | 19 ++++++++++--- .../linux/ath79/dts/ar7161_netgear_wndr.dtsi | 4 +-- .../ath79/dts/ar7240_buffalo_whr-g301n.dts | 19 ++++++++++--- .../ath79/dts/ar7240_engenius_enh202-v1.dts | 16 +++++++++-- .../ath79/dts/ar7240_netgear_wnr1000-v2.dts | 23 +++++++++++++--- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 23 +++++++++++++--- target/linux/ath79/dts/ar7240_tplink.dtsi | 13 ++++++++- .../linux/ath79/dts/ar7240_tplink_tl-wa.dtsi | 13 ++++++++- .../linux/ath79/dts/ar7240_tplink_tl-wr.dtsi | 16 +++++++++-- .../ath79/dts/ar7241_netgear_wnr2000-v3.dts | 23 +++++++++++++--- target/linux/ath79/dts/ar7241_tplink.dtsi | 19 ++++++++++--- .../ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 19 ++++++++++--- .../dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts | 13 ++++++++- target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi | 1 - .../ath79/dts/ar7242_buffalo_bhr-4grv.dts | 13 ++++++++- .../dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 16 +++++++++-- .../ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts | 16 +++++++++-- .../ath79/dts/ar7242_engenius_eap350-v1.dts | 16 +++++++++-- .../ath79/dts/ar7242_engenius_ecb350-v1.dts | 16 +++++++++-- target/linux/ath79/dts/ar7242_meraki_mr12.dts | 19 ++++++++++--- .../ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 16 +++++++++-- .../ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts | 13 ++++++++- .../ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts | 13 ++++++++- target/linux/ath79/dts/ar7242_ubnt_sw.dtsi | 13 ++++++++- target/linux/ath79/dts/ar724x_ubnt_xm.dtsi | 20 ++++++++++++-- .../dts/ar9132_buffalo_wzr-hp-g300nh.dtsi | 16 +++++++++-- .../ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 16 +++++++++-- .../dts/ar9132_tplink_tl-wr1043nd-v1.dts | 16 +++++++++-- .../ath79/dts/ar9132_tplink_tl-wr941-v2.dts | 16 +++++++++-- .../ath79/dts/ar9330_glinet_gl-ar150.dts | 19 ++++++++++--- .../linux/ath79/dts/ar9330_openmesh_om2p.dtsi | 20 ++++++++++++-- target/linux/ath79/dts/ar9330_pqi_air-pen.dts | 20 ++++++++++++-- .../linux/ath79/dts/ar9330_ziking_cpe46b.dts | 18 ++++++++++--- .../ath79/dts/ar9331_8dev_carambola2.dts | 20 ++++++++++++-- .../ath79/dts/ar9331_alfa-network_ap121f.dtsi | 13 ++++++++- .../dts/ar9331_embeddedwireless_dorin.dts | 13 ++++++++- .../linux/ath79/dts/ar9331_etactica_eg200.dts | 13 ++++++++- .../linux/ath79/dts/ar9331_glinet_gl-mifi.dts | 16 +++++++++-- .../ath79/dts/ar9331_glinet_gl-usb150.dts | 13 ++++++++- .../ath79/dts/ar9331_hak5_lan-turtle.dtsi | 16 +++++++++-- .../dts/ar9331_hak5_wifi-pineapple-nano.dts | 13 ++++++++- .../linux/ath79/dts/ar9331_pisen_ts-d084.dts | 16 +++++++++-- .../linux/ath79/dts/ar9331_pisen_wmm003n.dts | 16 +++++++++-- .../ath79/dts/ar9331_teltonika_rut230-v1.dts | 23 ++++++++++++---- .../ath79/dts/ar9331_tplink_tl-mr3020-v1.dts | 16 +++++++++-- .../ath79/dts/ar9331_tplink_tl-mr3040-v2.dts | 16 +++++++++-- .../dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi | 16 +++++++++-- .../dts/ar9331_tplink_tl-wr741nd-v4.dtsi | 19 ++++++++++--- .../ath79/dts/ar9341_engenius_eap300-v2.dts | 13 ++++++++- .../dts/ar9341_engenius_ens202ext-v1.dts | 16 +++++++++-- .../ath79/dts/ar9341_openmesh_om2p-hs.dtsi | 20 ++++++++++++-- target/linux/ath79/dts/ar9341_pcs_cr3000.dts | 16 +++++++++-- .../linux/ath79/dts/ar9341_pisen_wmb001n.dts | 13 ++++++++- .../linux/ath79/dts/ar9341_tplink_tl-wa.dtsi | 16 +++++++++-- .../ath79/dts/ar9342_ubnt_aircube-ac.dts | 13 ++++++++- .../linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi | 13 ++++++++- .../linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi | 13 ++++++++- target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 13 ++++++++- .../ath79/dts/ar9344_aerohive_hiveap-121.dts | 19 ++++++++++--- .../ath79/dts/ar9344_alfa-network_n5q.dts | 20 ++++++++++++-- .../ath79/dts/ar9344_comfast_cf-e120a-v3.dts | 20 ++++++++++++-- .../ath79/dts/ar9344_compex_wpj344-16m.dts | 13 ++++++++- .../ath79/dts/ar9344_devolo_dlan_wifi.dtsi | 13 ++++++++- .../ath79/dts/ar9344_engenius_eap600.dts | 19 ++++++++++--- .../ath79/dts/ar9344_engenius_ecb600.dts | 19 ++++++++++--- .../linux/ath79/dts/ar9344_netgear_wndr.dtsi | 23 +++++++++++++--- .../linux/ath79/dts/ar9344_ocedo_raccoon.dts | 27 ++++++++++++++++--- .../ath79/dts/ar9344_openmesh_mr600.dtsi | 19 ++++++++++--- .../linux/ath79/dts/ar9344_openmesh_om5p.dts | 20 ++++++++++++-- target/linux/ath79/dts/ar9344_pcs_cap324.dts | 19 ++++++++++--- target/linux/ath79/dts/ar9344_pcs_cr5000.dts | 20 ++++++++++++-- .../ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts | 16 +++++++++-- .../ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts | 16 +++++++++-- .../ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts | 13 ++++++++- .../ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts | 13 ++++++++- .../linux/ath79/dts/ar9344_samsung_wam250.dts | 16 +++++++++-- .../dts/ar9344_teltonika_rut955-h7v3c0.dts | 16 +++++++++-- .../ath79/dts/ar9344_teltonika_rut955.dts | 16 +++++++++-- .../ath79/dts/ar9344_teltonika_rut9xx.dtsi | 13 ++++++++- target/linux/ath79/dts/ar9344_tplink_cpe.dtsi | 16 +++++++++-- .../ath79/dts/ar9344_tplink_cpe_2port.dtsi | 13 ++++++++- .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts | 22 ++++++++++++--- .../ath79/dts/ar9344_tplink_tl-wdr4300.dtsi | 19 ++++++++++--- .../ath79/dts/ar9344_ubnt_unifi-ap-pro.dts | 13 ++++++++- .../ath79/dts/ar9344_winchannel_wb2000.dts | 19 ++++++++++--- .../ath79/dts/ar9344_zbtlink_zbt-wd323.dts | 20 ++++++++++++-- target/linux/ath79/dts/qca9531_8dev_lima.dts | 20 ++++++++++++-- .../ath79/dts/qca9531_alfa-network_n2q.dts | 16 +++++++++-- .../dts/qca9531_alfa-network_pi-wifi4.dts | 13 ++++++++- .../ath79/dts/qca9531_alfa-network_r36a.dts | 16 +++++++++-- .../ath79/dts/qca9531_comfast_cf-e130n-v2.dts | 16 +++++++++-- .../ath79/dts/qca9531_comfast_cf-e313ac.dts | 20 ++++++++++++-- .../ath79/dts/qca9531_comfast_cf-e314n-v2.dts | 20 ++++++++++++-- .../linux/ath79/dts/qca9531_comfast_cf-e5.dts | 20 ++++++++++++-- .../ath79/dts/qca9531_comfast_cf-e560ac.dts | 19 ++++++++++--- .../ath79/dts/qca9531_comfast_cf-ew72.dts | 19 ++++++++++--- .../dts/qca9531_comfast_cf-wr752ac-v1.dts | 16 +++++++++-- .../ath79/dts/qca9531_compex_wpj531-16m.dts | 20 ++++++++++++-- .../ath79/dts/qca9531_glinet_gl-ar300m.dtsi | 16 +++++++++-- .../ath79/dts/qca9531_glinet_gl-ar750.dts | 16 +++++++++-- .../ath79/dts/qca9531_glinet_gl-e750.dts | 13 ++++++++- .../ath79/dts/qca9531_glinet_gl-x750.dts | 16 +++++++++-- .../linux/ath79/dts/qca9531_qxwlan_e600g.dtsi | 16 +++++++++-- target/linux/ath79/dts/qca9531_telco_t1.dts | 20 ++++++++++++-- .../dts/qca9531_tplink_archer-d50-v1.dts | 19 ++++++++++--- .../ath79/dts/qca9531_tplink_tl-mr3420-v3.dts | 19 ++++++++++--- .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 19 ++++++++++--- .../dts/qca9531_tplink_tl-wr902ac-v1.dts | 16 +++++++++-- .../linux/ath79/dts/qca9531_wallys_dr531.dts | 20 ++++++++++++-- .../linux/ath79/dts/qca9531_yuncore_a770.dts | 20 ++++++++++++-- .../ath79/dts/qca9533_comfast_cf-e110n-v2.dts | 27 ++++++++++++++++--- .../ath79/dts/qca9533_openmesh_om2p-v4.dtsi | 23 +++++++++++++--- .../ath79/dts/qca9533_plasmacloud_pa300.dtsi | 19 ++++++++++--- .../ath79/dts/qca9533_tplink_cpe220-v3.dts | 13 ++++++++- .../ath79/dts/qca9533_tplink_cpexxx.dtsi | 16 +++++++++-- .../ath79/dts/qca9533_tplink_tl-wa801nd.dtsi | 16 +++++++++-- .../dts/qca9533_tplink_tl-wa850re-v2.dts | 16 +++++++++-- .../ath79/dts/qca9533_tplink_tl-wr802n.dtsi | 16 +++++++++-- .../ath79/dts/qca9533_tplink_tl-wr841.dtsi | 19 ++++++++++--- .../dts/qca9533_tplink_tl-wr841hp-v3.dts | 21 ++++++++++++--- .../ath79/dts/qca9533_tplink_tl-wr842n-v3.dts | 19 ++++++++++--- .../ath79/dts/qca9533_ubnt_aircube-isp.dts | 20 ++++++++++++-- .../ath79/dts/qca953x_tplink_tl-wr810n.dtsi | 19 ++++++++++--- .../linux/ath79/dts/qca9550_airtight_c-75.dts | 20 ++++++++++++-- .../linux/ath79/dts/qca9557_8dev_rambutan.dts | 20 ++++++++++++-- .../ath79/dts/qca9557_buffalo_bhr-4grv2.dts | 20 ++++++++++++-- .../ath79/dts/qca9557_engenius_eap1200h.dts | 16 +++++++++-- .../dts/qca9557_engenius_enstationac-v1.dts | 16 +++++++++-- .../dts/qca9558_allnet_all-wap02860ac.dts | 17 +++++++++--- .../ath79/dts/qca9558_belkin_f9x-v2.dtsi | 16 +++++++++-- .../ath79/dts/qca9558_devolo_dvl1200e.dts | 13 ++++++++- .../ath79/dts/qca9558_devolo_dvl1750e.dts | 13 ++++++++- .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 16 +++++++++-- .../ath79/dts/qca9558_domywifi_dw33d.dts | 27 ++++++++++++++++--- .../qca9558_librerouter_librerouter-v1.dts | 27 ++++++++++++++++--- .../ath79/dts/qca9558_netgear_ex7300.dtsi | 20 ++++++++++++-- .../linux/ath79/dts/qca9558_ocedo_koala.dts | 20 ++++++++++++-- .../linux/ath79/dts/qca9558_ocedo_ursus.dts | 27 ++++++++++++++++--- .../linux/ath79/dts/qca9558_openmesh_a60.dtsi | 25 ++++++++++++++--- .../linux/ath79/dts/qca9558_openmesh_mr.dtsi | 16 +++++++++-- .../ath79/dts/qca9558_openmesh_mr900-v1.dts | 13 ++++++++- .../ath79/dts/qca9558_openmesh_mr900-v2.dts | 13 ++++++++- .../linux/ath79/dts/qca9558_qxwlan_e558.dtsi | 16 +++++++++-- .../ath79/dts/qca9558_tplink_archer-d7-v1.dts | 19 ++++++++++--- .../dts/qca9558_tplink_archer-d7b-v1.dts | 19 ++++++++++--- .../ath79/dts/qca9558_tplink_re350k-v1.dts | 16 +++++++++-- .../linux/ath79/dts/qca9558_tplink_rex5x.dtsi | 16 +++++++++-- .../dts/qca9558_tplink_tl-wdr4900-v2.dts | 22 ++++++++++++--- .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi | 19 ++++++++++--- .../dts/qca9558_tplink_tl-wr941n-v7-cn.dts | 16 +++++++++-- .../dts/qca9558_ubnt_powerbeam-5ac-500.dts | 13 ++++++++- .../dts/qca9558_ubnt_rocket-5ac-lite.dts | 13 ++++++++- .../dts/qca9561_tplink_archer-c25-v1.dts | 19 ++++++++++--- .../dts/qca9561_tplink_eap225-wall-v2.dts | 16 +++++++++-- .../ath79/dts/qca9561_xiaomi_mi-router-4q.dts | 23 +++++++++++++--- .../ath79/dts/qca9563_comfast_cf-e375ac.dts | 18 ++++++++++--- .../linux/ath79/dts/qca9563_compex_wpj563.dts | 13 ++++++++- .../ath79/dts/qca9563_glinet_gl-ar750s.dtsi | 13 ++++++++- .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 23 +++++++++++++--- .../ath79/dts/qca9563_qxwlan_e1700ac.dtsi | 13 ++++++++- .../ath79/dts/qca9563_rosinson_wr818.dts | 13 ++++++++- .../ath79/dts/qca9563_tplink_archer-c2-v3.dts | 16 +++++++++-- .../ath79/dts/qca9563_tplink_archer-c7-v4.dts | 16 +++++++++-- .../ath79/dts/qca9563_tplink_eap245-v3.dts | 16 +++++++++-- .../dts/qca9563_tplink_eap2x5-1port.dtsi | 16 +++++++++-- .../dts/qca9563_tplink_tl-wpa8630-v1.dts | 16 +++++++++-- .../ath79/dts/qca9563_ubnt_unifiac-lite.dtsi | 13 ++++++++- .../ath79/dts/qca9563_ubnt_unifiac-pro.dtsi | 13 ++++++++- .../ath79/dts/qca9563_xiaomi_aiot-ac2350.dts | 13 ++++++++- .../ath79/dts/qca9563_yuncore_xd4200.dtsi | 13 ++++++++- .../ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi | 13 ++++++++- .../ath79/dts/tp9343_tplink_tl-wr940n-v4.dts | 13 ++++++++- .../ath79/dts/tp9343_tplink_tl-wr940n-v6.dts | 13 ++++++++- .../ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts | 21 ++++++++++++--- .../linux/ath79/dts/tp9343_tplink_tl-wx.dtsi | 16 +++++++++-- 177 files changed, 2637 insertions(+), 364 deletions(-) diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts index 083db183d42..8180e0d6bd5 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts @@ -103,7 +103,8 @@ ath9k0: wifi@0,11 { /* 2.4 GHz */ compatible = "pci168c,0029"; - mtd-mac-address = <&hwinfo 0x1c>; + nvmem-cells = <&macaddr_hwinfo_1c>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; reg = <0x8800 0 0 0 0>; #gpio-cells = <2>; @@ -112,7 +113,8 @@ ath9k1: wifi@0,12 { /* 5 GHz */ compatible = "pci168c,0029"; - mtd-mac-address = <&hwinfo 0x1c>; + nvmem-cells = <&macaddr_hwinfo_1c>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; reg = <0x9000 0 0 0 0>; #gpio-cells = <2>; @@ -132,7 +134,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&hwinfo 0x1c>; + nvmem-cells = <&macaddr_hwinfo_1c>; + nvmem-cell-names = "mac-address"; pll-data = <0x00110000 0x00001099 0x00991099>; @@ -179,3 +182,13 @@ }; }; }; + +&hwinfo { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_hwinfo_1c: macaddr@1c { + reg = <0x1c 0x6>; + }; +}; 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 15ac1486976..006755e4182 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -247,7 +247,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x120c>; + nvmem-cells = <&macaddr_art_120c>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -258,8 +259,23 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x520c>; + nvmem-cells = <&macaddr_art_520c>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; phy-handle = <&phy4>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_120c: macaddr@120c { + reg = <0x120c 0x6>; + }; + + macaddr_art_520c: macaddr@520c { + reg = <0x520c 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts index 3d11e641eb8..d672364e562 100644 --- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts +++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts @@ -81,7 +81,8 @@ compatible = "pci168c,0029"; reg = <0x8800 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&config 0x66>; + nvmem-cells = <&macaddr_config_66>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; #gpio-cells = <2>; gpio-controller; @@ -91,7 +92,8 @@ compatible = "pci168c,0029"; reg = <0x9000 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&config 0x66>; + nvmem-cells = <&macaddr_config_66>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; #gpio-cells = <2>; gpio-controller; @@ -114,7 +116,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&config 0x66>; + nvmem-cells = <&macaddr_config_66>; + nvmem-cell-names = "mac-address"; pll-data = <0x00110000 0x00001099 0x00991099>; @@ -167,3 +170,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_66: macaddr@66 { + reg = <0x66 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi index c7e83631cce..369c89a97e9 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi @@ -153,7 +153,7 @@ ath9k0: wifi@0,11 { compatible = "pci168c,0029"; reg = <0x8800 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + mtd-mac-address = <&art 0xc>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; @@ -181,7 +181,7 @@ ath9k1: wifi@0,12 { compatible = "pci168c,0029"; reg = <0x9000 0 0 0 0>; - mtd-mac-address = <&art 0xc>; + mtd-mac-address = <&art 0x0>; qca,no-eeprom; #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 7f736dc0053..cf51078bc32 100644 --- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts +++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts @@ -153,13 +153,15 @@ }; ð0 { - mtd-mac-address = <&art 0x120c>; + nvmem-cells = <&macaddr_art_120c>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x120c>; + nvmem-cells = <&macaddr_art_120c>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -170,7 +172,8 @@ compatible = "pci168c,002a"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&art 0x120c>; + nvmem-cells = <&macaddr_art_120c>; + nvmem-cell-names = "mac-address"; #gpio-cells = <2>; gpio-controller; }; @@ -181,3 +184,13 @@ pinctrl-single,bits = <0x0 0x0 0xf8>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_120c: macaddr@120c { + reg = <0x120c 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts index c5a667b5139..9a233c836b7 100644 --- a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts +++ b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts @@ -72,13 +72,15 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -92,3 +94,13 @@ gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts index 931032d851b..91b72cf1db8 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts +++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts @@ -174,13 +174,15 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -189,10 +191,25 @@ ath9k: wifi@0,0 { compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index 91438ebf8fd..9bae95b5575 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -107,13 +107,15 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -122,10 +124,25 @@ ath9k: wifi@0,0 { compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7240_tplink.dtsi b/target/linux/ath79/dts/ar7240_tplink.dtsi index 4799fd79ec7..60cd38c220c 100644 --- a/target/linux/ath79/dts/ar7240_tplink.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink.dtsi @@ -104,7 +104,8 @@ ath9k: wifi@0,0 { reg = <0x0000 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; #gpio-cells = <2>; gpio-controller; }; @@ -115,3 +116,13 @@ pinctrl-single,bits = <0x0 0x0 0xf8>; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi index e0ac582f9dc..ceb6b1d7a20 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi @@ -14,9 +14,20 @@ }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &ath9k { compatible = "pci168c,002a"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi index adc6cc87b32..40a2ca23990 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi @@ -30,15 +30,27 @@ }; ð0 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &ath9k { compatible = "pci168c,002b"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts index 380f82a59f4..290871d648e 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts @@ -179,13 +179,15 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { compatible = "qca,ar7241-eth", "syscon", "simple-mfd"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -194,10 +196,25 @@ ath9k: wifi@0,0 { compatible = "pci168c,002e"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index c2c81b3a872..84a9a4f63d6 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -89,18 +89,31 @@ #gpio-cells = <2>; gpio-controller; qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; }; ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; 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 4cc6d2a8f13..df77ca0fdc0 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -135,18 +135,31 @@ #gpio-cells = <2>; gpio-controller; qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; }; ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts index 68f83f7a665..3a0cc4250ed 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts @@ -94,9 +94,20 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wifi { ubnt,hsr; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi b/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi index 73ded0f5bd8..614ac1454f3 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi @@ -45,4 +45,3 @@ mtd-mac-address = <&art 0x0>; }; - diff --git a/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts b/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts index 3b2dc0ecfc4..dde91295052 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts @@ -15,5 +15,16 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts index 111d06491ec..fa3c47354e8 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts @@ -192,7 +192,8 @@ pll-data = <0x1c000000 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x120c>; + nvmem-cells = <&macaddr_art_120c>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -204,7 +205,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,002a"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x120c>; + nvmem-cells = <&macaddr_art_120c>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; @@ -229,3 +231,13 @@ #trigger-source-cells = <0>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_120c: macaddr@120c { + reg = <0x120c 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts index 4f186c2c11d..84d029b5dce 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts @@ -64,7 +64,8 @@ }; ð0 { - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -73,9 +74,20 @@ ath9k: wifi@0,0 { compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts index 3e2a67697f1..7458685802b 100644 --- a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts @@ -63,7 +63,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; phy-mode = "rgmii-id"; @@ -77,10 +78,21 @@ ath9k: wifi@0,0,0 { compatible = "pci168c,002a"; reg = <0x0 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts index 9026eb997fc..f1f86019dd9 100644 --- a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts @@ -63,7 +63,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; phy-mode = "rgmii-id"; @@ -77,10 +78,21 @@ ath9k: wifi@0,0,0 { compatible = "pci168c,002a"; reg = <0x0 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts index 8a19bffe6ec..5e82b5bb6bc 100644 --- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts +++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts @@ -81,7 +81,8 @@ compatible = "pci168c,002a"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&config 0x66>; + nvmem-cells = <&macaddr_config_66>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -101,7 +102,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&config 0x66>; + nvmem-cells = <&macaddr_config_66>; + nvmem-cell-names = "mac-address"; pll-data = <0x02000000 0x00000101 0x00001313>; @@ -116,7 +118,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&config 0x66>; + nvmem-cells = <&macaddr_config_66>; + nvmem-cell-names = "mac-address"; }; &spi { @@ -164,3 +167,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_66: macaddr@66 { + reg = <0x66 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index 01f4cb7fde6..ae4867521a7 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -157,7 +157,8 @@ #gpio-cells = <2>; gpio-controller; qca,no-eeprom; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; }; @@ -165,7 +166,8 @@ status = "okay"; phy-mode = "rgmii"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; fixed-link { @@ -173,3 +175,13 @@ full-duplex; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts index 85e85d84158..b353e760288 100644 --- a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts +++ b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts @@ -67,10 +67,21 @@ phy-handle = <&phy0>; phy-mode = "rgmii"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; full-duplex; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts index b640badb32f..ec17d59d1a3 100644 --- a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts +++ b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts @@ -179,7 +179,8 @@ phy-mode = "rgmii-rxid"; pll-data = <0x16000000 0x00000101 0x00001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; fixed-link { @@ -187,3 +188,13 @@ full-duplex; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi b/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi index caae72c91f4..3f996a16c75 100644 --- a/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi +++ b/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi @@ -131,5 +131,16 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi b/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi index 77dbfc4ac33..341d0bad0d6 100644 --- a/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi +++ b/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi @@ -79,11 +79,27 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi index 9bd4656d85e..ca1eeab4494 100644 --- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -188,7 +188,8 @@ status = "disabled"; phy-mode = "rgmii"; - mtd-mac-address = <&art 0x1120c>; + nvmem-cells = <&macaddr_art_1120c>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -215,7 +216,8 @@ resets = <&rst 13>; reset-names = "mac"; qca,mac-idx = <1>; - mtd-mac-address = <&art 0x1120c>; + nvmem-cells = <&macaddr_art_1120c>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -247,3 +249,13 @@ &usb_phy { status = "okay"; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1120c: macaddr@1120c { + reg = <0x1120c 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index 606572aaba1..354213c4404 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -118,7 +118,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy12>; }; @@ -127,5 +128,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index 3b406e4d80d..12e417d3a47 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -137,7 +137,8 @@ status = "okay"; phy-mode = "rgmii"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -149,5 +150,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts index 821c2aec666..58586eb0361 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts @@ -144,7 +144,8 @@ status = "okay"; phy-mode = "rmii"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <100>; @@ -155,5 +156,16 @@ &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts index 6a13c1bafe5..b31d0f961b3 100644 --- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts @@ -113,13 +113,15 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -133,5 +135,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi index 4f428cbb17f..e010e5cad0c 100644 --- a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi +++ b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi @@ -130,13 +130,15 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -144,3 +146,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts index 607ee5f6c97..5383d658847 100644 --- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts +++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts @@ -112,7 +112,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -132,5 +133,20 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x2>; + nvmem-cells = <&macaddr_art_2>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_2: macaddr@2 { + reg = <0x2 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts index 19a73909777..5801044f4e8 100644 --- a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts +++ b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts @@ -86,14 +86,16 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; }; &wmac { @@ -101,3 +103,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts index ba01d25d582..d99e0a422a7 100644 --- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts +++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts @@ -103,7 +103,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -115,10 +116,25 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi index 7734f20e04e..e12205c310e 100644 --- a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi +++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi @@ -55,7 +55,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -123,3 +124,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts index b14e70c132d..de6b709b5cb 100644 --- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts +++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts @@ -93,7 +93,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment-byte = <3>; mac-address-increment = <0x40>; }; @@ -107,3 +108,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_etactica_eg200.dts b/target/linux/ath79/dts/ar9331_etactica_eg200.dts index 95c8a10e0d4..402fca80a1e 100644 --- a/target/linux/ath79/dts/ar9331_etactica_eg200.dts +++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts @@ -63,7 +63,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -117,3 +118,13 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts index 7d6e7bd4af0..e5460b299df 100644 --- a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts +++ b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts @@ -121,7 +121,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -134,7 +135,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -142,3 +144,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts b/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts index d1c26547125..6f332dd99b3 100644 --- a/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts +++ b/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts @@ -58,7 +58,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -117,3 +118,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi index 261657312b7..69d974eb538 100644 --- a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi +++ b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi @@ -24,7 +24,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; gmac-config { @@ -38,7 +39,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -90,3 +92,13 @@ &usb_phy { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts b/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts index 62d5caeb9df..0502d5d14ce 100644 --- a/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts +++ b/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts @@ -62,7 +62,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -119,3 +120,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts index 873762088a1..58ef4ab0910 100644 --- a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts +++ b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts @@ -75,7 +75,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -102,5 +103,16 @@ &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts index 3a18249aa6f..f438567e52c 100644 --- a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts +++ b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts @@ -83,7 +83,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -111,5 +112,16 @@ &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts index c394cf1cb85..1858c74272b 100644 --- a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts +++ b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts @@ -109,14 +109,16 @@ ð0 { status = "okay"; - mtd-mac-address = <&config 0x0>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; &spi { @@ -188,6 +190,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts index 7df4ed9a986..c420c1a4cd5 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -146,7 +146,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -165,5 +166,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts index 6c353379b79..619fd09ee99 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts @@ -135,7 +135,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -154,5 +155,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi index e31640b87f5..5fda458fbc3 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi @@ -80,7 +80,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -110,5 +111,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; 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 248a2b646e3..b74b8251ce5 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -121,7 +121,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; gmac-config { @@ -135,7 +136,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -143,5 +145,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts index 8c87a73508d..4a993c93012 100644 --- a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts +++ b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts @@ -46,7 +46,8 @@ }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -54,3 +55,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts index 5c81020ccdf..ec574ccf9f0 100644 --- a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts +++ b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts @@ -65,13 +65,15 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -84,3 +86,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi b/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi index 727064def3f..2dfdff03d82 100644 --- a/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi +++ b/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi @@ -142,11 +142,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -154,3 +156,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts index f822c69aeee..4e4daef1c8e 100644 --- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts +++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts @@ -133,7 +133,8 @@ status = "okay"; phy-handle = <&swphy0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -141,10 +142,21 @@ phy-handle = <&swphy4>; pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; switch-phy-swap = <1>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts b/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts index ffa52b437cb..23b5cf74504 100644 --- a/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts +++ b/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts @@ -188,7 +188,8 @@ ð0 { status = "okay"; phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -213,3 +214,13 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi index 499ef982018..5d5b88c5f3b 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi @@ -54,7 +54,8 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -71,5 +72,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts index 01bc487626f..25adac4e8ad 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts @@ -96,7 +96,8 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -111,3 +112,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi index 918b69c1dad..bd6feb3d787 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi @@ -18,7 +18,8 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x02000000 0x00000101 0x00001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; phy-handle = <&phy4>; @@ -29,3 +30,13 @@ rxdv-delay = <3>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi index f2e936bcc40..5024a140f3d 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi @@ -26,7 +26,8 @@ /* default for ar934x, except for 1000M and 10M */ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -37,3 +38,13 @@ rxdv-delay = <2>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index 3089e6b341f..ce49c10e5cc 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -110,5 +110,16 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts index 2f871943758..a2ac53b9963 100644 --- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts +++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts @@ -106,7 +106,8 @@ compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&hw_info 0x0>; + nvmem-cells = <&macaddr_hw_info_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -160,7 +161,8 @@ &wmac { status = "okay"; - mtd-mac-address = <&hw_info 0x0>; + nvmem-cells = <&macaddr_hw_info_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -215,7 +217,8 @@ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&hw_info 0x0>; + nvmem-cells = <&macaddr_hw_info_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; phy-handle = <&phy0>; @@ -227,3 +230,13 @@ rxdv-delay = <1>; }; }; + +&hw_info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_hw_info_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts index 486e109c8f2..c54270a78dc 100644 --- a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts +++ b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts @@ -90,14 +90,16 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&swphy4>; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &ref { @@ -149,3 +151,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts index 73e06370f83..94a82baddcd 100644 --- a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts +++ b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts @@ -120,7 +120,8 @@ ð0 { status = "okay"; phy-handle = <&swphy0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -130,10 +131,25 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts index 96549ec2ca8..8d42f0c2116 100644 --- a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts +++ b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts @@ -139,8 +139,19 @@ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&uboot 0x2e010>; + nvmem-cells = <&macaddr_uboot_2e010>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_2e010: macaddr@2e010 { + reg = <0x2e010 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi index b61ab75ae8e..1cec6625692 100644 --- a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi +++ b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi @@ -130,7 +130,8 @@ pll-data = <0x02000000 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; phy-mode = "rgmii"; @@ -168,3 +169,13 @@ >; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts index b25e3be17f1..5ad8078f83f 100644 --- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts @@ -29,17 +29,30 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; &pcie { wifi@0,0,0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; }; &wmac { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts index 6c7a99c4777..e064994dba6 100644 --- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts @@ -24,17 +24,30 @@ }; ð0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &pcie { wifi@0,0,0 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; }; &wmac { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi index 52425a071cd..c075c38557e 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi @@ -219,7 +219,8 @@ /* default for ar934x, except for 1000M */ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&caldata 0x0>; + nvmem-cells = <&macaddr_caldata_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -244,7 +245,8 @@ &wmac { status = "okay"; - mtd-mac-address = <&caldata 0x0>; + nvmem-cells = <&macaddr_caldata_0>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; }; @@ -254,9 +256,24 @@ ath9k: wifi@0,0 { compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&caldata 0xc>; + nvmem-cells = <&macaddr_caldata_c>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; }; }; + +&caldata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_caldata_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_caldata_c: macaddr@c { + reg = <0xc 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index cf02b711fa5..e5e20678460 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -129,7 +129,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0xc>; + nvmem-cells = <&macaddr_art_c>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; @@ -140,7 +141,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &mdio0 { @@ -158,8 +160,27 @@ pll-data = <0x06000000 0x00000101 0x00001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; phy-handle = <&phy0>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_c: macaddr@c { + reg = <0xc 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi index 6a7af59147b..de8bfb70b74 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi +++ b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi @@ -96,7 +96,8 @@ pll-data = <0x02000000 0x00000101 0x00001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; phy-handle = <&phy0>; @@ -113,7 +114,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -124,7 +126,18 @@ compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <8>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts index 636595c9ee5..3e60d05ed32 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts +++ b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts @@ -145,13 +145,15 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -159,3 +161,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts index 4125a402692..1f15a2e8b82 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts @@ -118,7 +118,8 @@ ath9k: wifi@0,0 { compatible = "168c,0030"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; mtd-cal-data = <&art 0x5000>; qca,no-eeprom; @@ -133,7 +134,8 @@ qca,disable-2ghz; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -154,8 +156,19 @@ /* default for ar934x, except for 1000M */ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts index 9aaabd0c246..7b99ef7373e 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts @@ -125,7 +125,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x5002>; + nvmem-cells = <&macaddr_art_5002>; + nvmem-cell-names = "mac-address"; #gpio-cells = <2>; gpio-controller; }; @@ -159,7 +160,8 @@ /* default for ar934x, except for 1000M */ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -209,3 +211,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_5002: macaddr@5002 { + reg = <0x5002 0x6>; + }; +}; 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 366a0f720ad..7c2f90e72c3 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts @@ -24,14 +24,16 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { status = "okay"; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -47,3 +49,13 @@ reg = <0x070000 0xf90000>; }; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; 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 994b842f346..042974610ca 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts @@ -24,14 +24,16 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { status = "okay"; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -47,3 +49,13 @@ reg = <0x070000 0x790000>; }; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; 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 fb200fae351..195ab9db20e 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts @@ -33,7 +33,8 @@ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -46,3 +47,13 @@ reg = <0x070000 0xf90000>; }; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; 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 75ef13ec13e..b81a7f77786 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts @@ -33,7 +33,8 @@ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; @@ -46,3 +47,13 @@ reg = <0x070000 0x790000>; }; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_samsung_wam250.dts b/target/linux/ath79/dts/ar9344_samsung_wam250.dts index bca757e77fe..fd5bf9e81d4 100644 --- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts +++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts @@ -66,7 +66,8 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; gmac-config { @@ -78,7 +79,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; }; &gpio { @@ -154,3 +156,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts index 22c2163fecb..e017ae23083 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts +++ b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts @@ -164,14 +164,16 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&config 0x0>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { status = "okay"; - mtd-mac-address = <&config 0x0>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; }; &builtin_switch { @@ -190,3 +192,13 @@ pinctrl-single,bits = <0x0 0x002e0000 0x00ff0000>; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts index 28dbb745119..56821fccdea 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts +++ b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts @@ -163,14 +163,16 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&config 0x0>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { status = "okay"; - mtd-mac-address = <&config 0x0>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; }; &builtin_switch { @@ -186,3 +188,13 @@ <0x14 0x08 0xff>; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi index 53fe69ae000..c989a30b108 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi +++ b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi @@ -147,7 +147,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&config 0x0>; + nvmem-cells = <&macaddr_config_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; @@ -171,3 +172,13 @@ <0x3c 0x000b0000 0x00ff0000>; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi index fd6aa0f08be..9d8873ddaf1 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi @@ -84,7 +84,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; ð0 { @@ -92,7 +93,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -114,3 +116,13 @@ line-name = "tp-link:ext:lna1"; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi index e7d33ab22be..d539d2e0a6e 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi @@ -45,7 +45,8 @@ }; ð1 { - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -53,3 +54,13 @@ switch-only-mode = <1>; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; 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 e8f9672b58c..6c5d013ccd6 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts @@ -57,18 +57,21 @@ }; &ath9k { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wmac { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; gmac-config { @@ -83,6 +86,17 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index f8b4d0385af..262c6f713e9 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -80,11 +80,13 @@ }; &ath9k { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -115,8 +117,19 @@ /* default for ar934x, except for 1000M */ pll-data = <0x06000000 0x00000101 0x00001616>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts b/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts index 4612ae1a669..8471be9b6b8 100644 --- a/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts +++ b/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts @@ -144,8 +144,19 @@ pll-data = <0x6000000 0x101 0x1616>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii"; phy-handle = <&phy0>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts index 87bbd206b2c..2586a174cb9 100644 --- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts +++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts @@ -141,7 +141,8 @@ compatible = "pci168c,0030"; reg = <0x0000 0 0 0 0>; qca,no-eeprom; - mtd-mac-address = <&addr 0x0>; + nvmem-cells = <&macaddr_addr_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <0x10>; #gpio-cells = <2>; gpio-controller; @@ -179,7 +180,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&addr 0x0>; + nvmem-cells = <&macaddr_addr_0>; + nvmem-cell-names = "mac-address"; }; &mdio0 { @@ -197,7 +199,8 @@ pll-data = <0xe000000 0x04000101 0x04001313>; - mtd-mac-address = <&addr 0x0>; + nvmem-cells = <&macaddr_addr_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <0x21>; phy-mode = "rgmii-rxid"; @@ -210,3 +213,13 @@ rxdv-delay = <1>; }; }; + +&addr { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_addr_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts index a3b4534cb5b..8fc21be1dcb 100644 --- a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts +++ b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts @@ -84,12 +84,14 @@ ð0 { status = "okay"; phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &spi { @@ -150,3 +152,17 @@ pinctrl-single,bits = <0x14 0x0 0xff00>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_8dev_lima.dts b/target/linux/ath79/dts/qca9531_8dev_lima.dts index 7fc84a67874..5a21251d6d3 100644 --- a/target/linux/ath79/dts/qca9531_8dev_lima.dts +++ b/target/linux/ath79/dts/qca9531_8dev_lima.dts @@ -87,7 +87,8 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -98,7 +99,8 @@ }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -106,3 +108,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts index 4f0e371c229..671adb8ccf8 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts @@ -106,15 +106,27 @@ }; ð0 { - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; ð1 { - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; &pcie0 { status = "okay"; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts index 4288e92fcde..5a934ce957c 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts @@ -45,7 +45,8 @@ }; ð0 { - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -85,3 +86,13 @@ #trigger-source-cells = <0>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts index 1effb4485b6..01e14bb0b13 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts @@ -50,7 +50,8 @@ }; ð0 { - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; @@ -59,7 +60,8 @@ * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target) */ compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -79,3 +81,13 @@ debounce-interval = <60>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts index e14cf772af1..4a84e150ae6 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts @@ -118,7 +118,8 @@ }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -129,6 +130,17 @@ &wmac { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts index 757a2eaeeeb..c1875213519 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts @@ -121,7 +121,8 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -130,7 +131,8 @@ }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &pcie0 { @@ -141,3 +143,17 @@ reg = <0 0 0 0 0>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts index 4738ba56af5..c182390b217 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts @@ -136,14 +136,30 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts index 57727754bba..d8397252585 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts @@ -121,11 +121,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -139,3 +141,17 @@ pinctrl-single,bits = <0x4 0x0 0xff>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts index 634d20015d9..477a2bddc6b 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts @@ -150,18 +150,31 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <10>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts index f67a8cbb728..e5024b39f94 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts @@ -109,18 +109,31 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <3>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts index 44c85b62e19..fc2f6de1114 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts @@ -109,7 +109,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -121,6 +122,17 @@ mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <10>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts b/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts index 89822586ffd..16a2794b973 100644 --- a/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts +++ b/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts @@ -105,11 +105,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x2e010>; + nvmem-cells = <&macaddr_uboot_2e010>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&uboot 0x2e018>; + nvmem-cells = <&macaddr_uboot_2e018>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -134,3 +136,17 @@ &usb0 { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_2e010: macaddr@2e010 { + reg = <0x2e010 0x6>; + }; + + macaddr_uboot_2e018: macaddr@2e018 { + reg = <0x2e018 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index 3b20fa51ab5..d4e1e6b2374 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -146,11 +146,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -158,3 +160,13 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts index 80623085f08..60bd2922a2d 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts @@ -129,11 +129,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -142,3 +144,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts index 98022d7cc5c..ca0784e6bf6 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts @@ -120,7 +120,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -132,3 +133,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts index 8cb611c11d5..7fd622a8c5f 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts @@ -118,11 +118,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -131,3 +133,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi index 6423ae02722..ce515159b15 100644 --- a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi +++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi @@ -95,12 +95,14 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -108,3 +110,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_telco_t1.dts b/target/linux/ath79/dts/qca9531_telco_t1.dts index eaaf4f154c8..540de60377e 100644 --- a/target/linux/ath79/dts/qca9531_telco_t1.dts +++ b/target/linux/ath79/dts/qca9531_telco_t1.dts @@ -118,11 +118,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -136,3 +138,17 @@ pinctrl-single,bits = <0x4 0x0 0xff>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts index 1113c51be5c..27b70e082af 100644 --- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts @@ -146,19 +146,22 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&romfile 0xf100>; + nvmem-cells = <&macaddr_romfile_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&romfile 0xf100>; + nvmem-cells = <&macaddr_romfile_f100>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&romfile 0xf100>; + nvmem-cells = <&macaddr_romfile_f100>; + nvmem-cell-names = "mac-address"; }; &pcie0 { @@ -184,3 +187,13 @@ #trigger-source-cells = <0>; }; }; + +&romfile { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_romfile_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts index 4c730375a69..818ec776952 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts @@ -171,19 +171,22 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &usb0 { @@ -200,3 +203,13 @@ &usb_phy { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts index 47d9e0846af..ca7832ebd49 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts @@ -128,12 +128,14 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -141,7 +143,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &usb0 { @@ -158,3 +161,13 @@ &usb_phy { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts index a769a81d580..7ce8cd30cdf 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts @@ -147,7 +147,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -159,7 +160,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &pcie0 { @@ -185,3 +187,13 @@ #trigger-source-cells = <0>; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_wallys_dr531.dts b/target/linux/ath79/dts/qca9531_wallys_dr531.dts index abf821b11b5..9982914442d 100644 --- a/target/linux/ath79/dts/qca9531_wallys_dr531.dts +++ b/target/linux/ath79/dts/qca9531_wallys_dr531.dts @@ -76,7 +76,8 @@ status = "okay"; phy-handle = <&swphy4>; - mtd-mac-address = <&env 0xf818>; + nvmem-cells = <&macaddr_env_f818>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -84,7 +85,8 @@ * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target) */ compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; - mtd-mac-address = <&env 0xf810>; + nvmem-cells = <&macaddr_env_f810>; + nvmem-cell-names = "mac-address"; }; &pcie0 { @@ -150,3 +152,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&env { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_env_f810: macaddr@f810 { + reg = <0xf810 0x6>; + }; + + macaddr_env_f818: macaddr@f818 { + reg = <0xf818 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9531_yuncore_a770.dts b/target/linux/ath79/dts/qca9531_yuncore_a770.dts index c58b0c4e38d..a255342015a 100644 --- a/target/linux/ath79/dts/qca9531_yuncore_a770.dts +++ b/target/linux/ath79/dts/qca9531_yuncore_a770.dts @@ -98,11 +98,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &pcie0 { @@ -114,3 +116,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts b/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts index 8deeea42450..64df0cff7c5 100644 --- a/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts +++ b/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts @@ -134,11 +134,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x1002>; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -149,5 +151,24 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi index e38fc9378aa..8a51d6b6d65 100644 --- a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi +++ b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi @@ -132,7 +132,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -141,13 +142,29 @@ */ compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi index 6df843f143d..602365f45d8 100644 --- a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi +++ b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi @@ -114,7 +114,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -123,7 +124,8 @@ */ compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -131,6 +133,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts b/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts index 1d8098944a1..fb31aa28728 100644 --- a/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts @@ -20,7 +20,8 @@ }; ð1 { - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -28,3 +29,13 @@ switch-only-mode = <1>; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi b/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi index d5eeec13b77..3f3fae1dfd7 100644 --- a/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi @@ -108,12 +108,24 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi index 6033acddf3a..43db72ec650 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi @@ -102,7 +102,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -113,5 +114,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts index 45fe9e86b3d..e7d837a5740 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts @@ -150,7 +150,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; ð1 { @@ -161,5 +162,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi index 1835cbcb96e..4be1ced4b21 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi @@ -73,7 +73,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -85,5 +86,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi index df68a56d477..c9c109ee392 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -108,17 +108,30 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts index 7170601f6ae..07b706251a3 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts @@ -130,17 +130,30 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts index cb93afa233d..e171984511d 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts @@ -148,17 +148,30 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts b/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts index f7910b3d6f8..e854f3700cd 100644 --- a/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts +++ b/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts @@ -76,11 +76,13 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -91,3 +93,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi index 27d9681eadd..e49b8fc1ca0 100644 --- a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi +++ b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi @@ -90,17 +90,30 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9550_airtight_c-75.dts b/target/linux/ath79/dts/qca9550_airtight_c-75.dts index a984b38ad27..01217534454 100644 --- a/target/linux/ath79/dts/qca9550_airtight_c-75.dts +++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts @@ -63,7 +63,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; pll-data = <0xa6000000 0x00000101 0x00001616>; }; @@ -87,7 +88,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; pll-data = <0x03000101 0x00000101 0x00001616>; fixed-link { @@ -179,3 +181,17 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts index 638d78a7a5f..2724c3a1b67 100644 --- a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts +++ b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts @@ -77,7 +77,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "mii"; phy-handle = <&phy0>; }; @@ -88,7 +89,8 @@ pll-data = <0x17000000 0x101 0x1313>; phy-handle = <&phy1>; qca955x-sgmii-fixup; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -123,3 +125,17 @@ #address-cells = <1>; #size-cells = <0>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts index dce1a2144ff..a4e2a615f64 100644 --- a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts +++ b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts @@ -118,7 +118,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; pll-data = <0x56000000 0x00000101 0x00001616>; }; @@ -126,7 +127,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; pll-data = <0x03000101 0x00000101 0x00001616>; fixed-link { @@ -134,3 +136,17 @@ full-duplex; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts index 0b006bcffb5..3b3a3e3c3d2 100644 --- a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts +++ b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts @@ -77,7 +77,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy5>; phy-mode = "rgmii-id"; @@ -89,6 +90,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts index 9a45bd4277e..812fcfc5dcb 100644 --- a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts +++ b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts @@ -88,7 +88,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy1>; phy-mode = "rgmii-id"; @@ -99,7 +100,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; phy-handle = <&phy2>; @@ -108,3 +110,13 @@ qca955x-sgmii-fixup; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts index 3b9e25e3e8f..aa1f4ad02bd 100644 --- a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts +++ b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts @@ -59,7 +59,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy5>; phy-mode = "rgmii-id"; @@ -89,7 +90,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; - qca-no-eeprom; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi index 81c2c0866f1..23fe321efbf 100644 --- a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi +++ b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi @@ -185,7 +185,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; pll-data = <0xa6000000 0x00000101 0x00001616>; @@ -198,7 +199,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; pll-data = <0x03000101 0x00000101 0x00001616>; @@ -222,3 +224,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts index 85617cc8099..d078df1989b 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -58,7 +58,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x00>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; phy-handle = <&phy1>; @@ -66,3 +67,13 @@ qca955x-sgmii-fixup; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts index 895398e358a..d60e7c4857f 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts @@ -93,7 +93,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x00>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; phy-handle = <&phy1>; @@ -101,3 +102,13 @@ qca955x-sgmii-fixup; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index ba7f014e6a4..b96b314fa54 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -99,7 +99,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x00>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; gmac_config: gmac-config { @@ -113,6 +114,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x00>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts index 0c42208c203..5b3318b8b28 100644 --- a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts +++ b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts @@ -182,7 +182,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; pll-data = <0x56000000 0x00000101 0x00001616>; phy-handle = <&phy0>; }; @@ -190,7 +191,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; pll-data = <0x03000101 0x00000101 0x00001616>; fixed-link { speed = <1000>; @@ -202,5 +204,24 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0xc>; + nvmem-cells = <&macaddr_art_c>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_c: macaddr@c { + reg = <0xc 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts index ddb91d07916..6cd8ba4578b 100644 --- a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts +++ b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts @@ -167,7 +167,8 @@ status = "okay"; pll-data = <0xa6000000 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; }; @@ -176,7 +177,8 @@ status = "okay"; pll-data = <0x03000101 0x00000101 0x00001616>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -188,5 +190,24 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0xc>; + nvmem-cells = <&macaddr_art_c>; + nvmem-cell-names = "mac-address"; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_c: macaddr@c { + reg = <0xc 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi index 2f7cdcf8c3b..6c5ed4defb2 100644 --- a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi +++ b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi @@ -188,7 +188,8 @@ status = "okay"; mtd-cal-data = <&caldata 0x1000>; - mtd-mac-address = <&caldata 0x06>; + nvmem-cells = <&macaddr_caldata_6>; + nvmem-cell-names = "mac-address"; }; &mdio0 { @@ -203,10 +204,25 @@ ð0 { status = "okay"; - mtd-mac-address = <&caldata 0x00>; + nvmem-cells = <&macaddr_caldata_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; phy-mode = "rgmii-rxid"; pll-data = <0x86000000 0x80000101 0x80001313>; }; + +&caldata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_caldata_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_caldata_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index fd54a6e8c21..66f8c6589b2 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -124,7 +124,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x06>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &mdio0 { @@ -140,10 +141,25 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x00>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy5>; phy-mode = "rgmii-rxid"; pll-data = <0x8e000000 0x80000101 0x80001313>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts index 05c2d2d1dca..2dc4c07e918 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts @@ -95,7 +95,8 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x06>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &mdio0 { @@ -113,7 +114,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x00>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-rxid"; phy-handle = <&phy1>; @@ -132,8 +134,27 @@ ð1 { status = "okay"; - mtd-mac-address = <&art 0x12>; + nvmem-cells = <&macaddr_art_12>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy2>; pll-data = <0x3000101 0x101 0x1313>; qca955x-sgmii-fixup; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_12: macaddr@12 { + reg = <0x12 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi index 9938e5f4c01..05d3a4f3411 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi +++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi @@ -140,7 +140,8 @@ pll-data = <0x82000101 0x80000101 0x80001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; phy-handle = <&phy1>; @@ -160,7 +161,8 @@ pll-data = <0x03000101 0x80000101 0x80001313>; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; qca955x-sgmii-fixup; @@ -171,10 +173,25 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; }; &pcie0 { status = "okay"; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi index fa379030e75..8c4856f1ea0 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi +++ b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi @@ -141,7 +141,8 @@ pll-data = <0x82000000 0x80000101 0x80001313>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "rgmii-id"; phy-handle = <&phy5>; @@ -156,10 +157,21 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &pcie0 { status = "okay"; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts index 6704fbbe810..ff33a075f5e 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts @@ -19,7 +19,18 @@ wifi@0,0 { compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <16>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts index 7221b5b0988..12ebb67ba6a 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts @@ -19,7 +19,18 @@ wifi@0,0 { compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <16>; }; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi index e1c44af3f7a..5b28af5ca6e 100644 --- a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi +++ b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi @@ -127,7 +127,8 @@ phy-handle = <&phy0>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -136,7 +137,8 @@ pll-data = <0x03000101 0x00000101 0x00001616>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -165,3 +167,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts index 90332f18746..4f822fbc7d1 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts @@ -70,15 +70,28 @@ }; ð0 { - mtd-mac-address = <&romfs 0xf100>; + nvmem-cells = <&macaddr_romfs_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&romfs 0xf100>; + nvmem-cells = <&macaddr_romfs_f100>; + nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&romfs 0xf100>; + nvmem-cells = <&macaddr_romfs_f100>; + nvmem-cell-names = "mac-address"; +}; + +&romfs { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_romfs_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts index 754cb17918b..9adaa7fa6d3 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts @@ -64,15 +64,28 @@ }; ð0 { - mtd-mac-address = <&romfs 0xf100>; + nvmem-cells = <&macaddr_romfs_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ð1 { - mtd-mac-address = <&romfs 0xf100>; + nvmem-cells = <&macaddr_romfs_f100>; + nvmem-cell-names = "mac-address"; }; &wmac { mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&romfs 0xf100>; + nvmem-cells = <&macaddr_romfs_f100>; + nvmem-cell-names = "mac-address"; +}; + +&romfs { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_romfs_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts index c0fbeb5a439..0966f019089 100644 --- a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts @@ -99,7 +99,8 @@ phy-handle = <&phy4>; pll-data = <0x9e000000 0x80000101 0x80001313>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; gmac-config { device = <&gmac>; @@ -172,5 +173,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi index b12b547a7f7..31089f339da 100644 --- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi @@ -158,13 +158,25 @@ phy-handle = <&phy4>; pll-data = <0xa6000000 0x00000101 0x00001616>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts index 10d6e6040b0..5b69a1708ea 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -96,7 +96,8 @@ ath9k: wifi@0,0 { compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; qca,no-eeprom; #gpio-cells = <2>; @@ -190,7 +191,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; phy-handle = <&phy0>; pll-data = <0x56000000 0x00000101 0x00001616>; @@ -204,7 +206,8 @@ ð1 { status = "okay"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; pll-data = <0x03000101 0x00000101 0x00001616>; fixed-link { @@ -217,6 +220,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index 8f2b626bad2..ff7ea7da039 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -145,7 +145,8 @@ pll-data = <0x56000000 0x00000101 0x00001616>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; phy-handle = <&phy0>; }; @@ -155,7 +156,8 @@ pll-data = <0x03000101 0x00000101 0x00001616>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <1000>; @@ -166,5 +168,16 @@ &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts index 058acda7469..27bf82d20df 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts @@ -103,7 +103,8 @@ ð0 { status = "okay"; phy-mode = "mii"; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; fixed-link { speed = <100>; full-duplex; @@ -113,5 +114,16 @@ &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts b/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts index 3d90531a31a..9d3d1395f9b 100644 --- a/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts +++ b/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts @@ -32,7 +32,18 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy4>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts b/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts index e8e2322c568..0458fcaa4d7 100644 --- a/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts +++ b/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts @@ -32,7 +32,18 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy4>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts index 66a578305d6..4b371e0e8e8 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts @@ -172,13 +172,15 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -186,5 +188,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts b/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts index a39fde01e54..ecb427029db 100644 --- a/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts @@ -129,12 +129,24 @@ ð1 { status = "okay"; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts index 6693a5cd737..6e45fbb20fc 100644 --- a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts +++ b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts @@ -120,19 +120,36 @@ status = "okay"; phy-handle = <&swphy4>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; ð1 { status = "okay"; - mtd-mac-address = <&art 0x6>; + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts index 1eeb02f7f97..1337341b0b2 100644 --- a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts +++ b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts @@ -124,7 +124,8 @@ pll-data = <0x03000101 0x00000101 0x00001919>; phy-mode = "sgmii"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; }; @@ -132,6 +133,17 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <10>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <10>; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9563_compex_wpj563.dts b/target/linux/ath79/dts/qca9563_compex_wpj563.dts index aa829413dcf..ba31f40fe28 100644 --- a/target/linux/ath79/dts/qca9563_compex_wpj563.dts +++ b/target/linux/ath79/dts/qca9563_compex_wpj563.dts @@ -118,7 +118,8 @@ pll-data = <0x03000101 0x00000101 0x00001919>; - mtd-mac-address = <&uboot 0x2e010>; + nvmem-cells = <&macaddr_uboot_2e010>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy0>; }; @@ -136,3 +137,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_2e010: macaddr@2e010 { + reg = <0x2e010 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi index 9226d37a432..878a740cfd0 100644 --- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi +++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi @@ -123,7 +123,8 @@ status = "okay"; phy-handle = <&phy0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &gpio { @@ -175,3 +176,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi index 8c6a3741318..6090fdf5277 100644 --- a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi @@ -201,7 +201,8 @@ pll-data = <0x03000101 0x00000101 0x00001919>; - mtd-mac-address = <&caldata 0x0>; + nvmem-cells = <&macaddr_caldata_0>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy0>; @@ -210,7 +211,8 @@ &wmac { status = "okay"; - mtd-mac-address = <&caldata 0x0>; + nvmem-cells = <&macaddr_caldata_0>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; }; @@ -221,7 +223,8 @@ /* chip is AR9580, override bogus PCI ID 168c:abcd */ compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&caldata 0xc>; + nvmem-cells = <&macaddr_caldata_c>; + nvmem-cell-names = "mac-address"; qca,no-eeprom; qca,gpio-mask=<0xf6ff>; /* unmask pin 9 for RFKILL button */ #gpio-cells = <2>; @@ -243,3 +246,17 @@ #trigger-source-cells = <0>; }; }; + +&caldata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_caldata_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_caldata_c: macaddr@c { + reg = <0xc 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi index 9cf146c918b..91c73567d88 100644 --- a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi +++ b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi @@ -118,7 +118,8 @@ phy-mode = "sgmii"; phy-handle = <&phy0>; - mtd-mac-address = <&pridata 0x400>; + nvmem-cells = <&macaddr_pridata_400>; + nvmem-cell-names = "mac-address"; }; &usb_phy0 { @@ -149,3 +150,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&pridata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_pridata_400: macaddr@400 { + reg = <0x400 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts index a88eeb3de0d..c08291560bf 100644 --- a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts +++ b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts @@ -107,7 +107,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&info 0x0>; + nvmem-cells = <&macaddr_info_0>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy0>; }; @@ -147,3 +148,13 @@ #trigger-source-cells = <0>; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts index 6c4b04b81ce..81c25fc01d4 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts @@ -161,7 +161,8 @@ ð0 { status = "okay"; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy0>; }; @@ -170,5 +171,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts index 63040acf4ae..4334475ff76 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -247,7 +247,8 @@ pll-data = <0x03000101 0x00000101 0x00001919>; phy-mode = "sgmii"; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; }; @@ -255,5 +256,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts index 6b438ce126a..ee9f5ff5c7f 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts @@ -146,12 +146,24 @@ phy-handle = <&phy0>; phy-mode = "sgmii"; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi index a6aefc7b55a..e10c5dbb739 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi @@ -114,7 +114,8 @@ phy-mode = "sgmii"; pll-data = <0x03000000 0x00000101 0x00001313>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; qca956x-serdes-fixup; @@ -127,5 +128,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts index 4df03efb448..d0fa6d332fd 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts @@ -38,9 +38,21 @@ }; ð0 { - mtd-mac-address = <&uboot 0x0fc00>; + nvmem-cells = <&macaddr_uboot_fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { - mtd-mac-address = <&uboot 0x0fc00>; + nvmem-cells = <&macaddr_uboot_fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_fc00: macaddr@fc00 { + reg = <0xfc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi index b41e90abe81..d2797086f48 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi @@ -21,9 +21,20 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy4>; pll-data = <0x03000000 0x00000101 0x00001313>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi index 5a0cf4badee..f3dc0686053 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi @@ -25,6 +25,17 @@ ð0 { status = "okay"; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts index d8fc589d589..a7a73ad2fbf 100644 --- a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts +++ b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts @@ -163,7 +163,8 @@ phy-mode = "sgmii"; phy-handle = <&phy0>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -175,3 +176,13 @@ &pcie { status = "okay"; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi index 4eed20bea47..f8dec2bc6b7 100644 --- a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi +++ b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi @@ -26,7 +26,8 @@ pll-data = <0x03000101 0x00000101 0x00001919>; - mtd-mac-address = <&art 0x0>; + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; phy-mode = "sgmii"; phy-handle = <&phy0>; }; @@ -105,3 +106,13 @@ mtd-cal-data = <&art 0x1000>; }; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi index c1c553e8c82..416623fec43 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi @@ -63,6 +63,17 @@ }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts index 21a2be993cd..35facbdade3 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts @@ -66,5 +66,16 @@ }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts index 4334b70ce87..1bc3b0ae904 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts @@ -30,5 +30,16 @@ }; ð1 { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts index 7451f00740b..d4638f1acf4 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts @@ -136,19 +136,32 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; ð1 { status = "okay"; - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi index 14e10596b58..3a38b8025ab 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi @@ -50,7 +50,8 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -62,5 +63,16 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; +}; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; }; -- 2.30.2