From 82d9b3e2c48a012278fef883dd72ca6db706ba09 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Fri, 23 Jul 2021 00:20:32 +0800 Subject: [PATCH] treewide: convert mtd-mac-address-increment* to generic implementation --- .../linux/ath79/dts/ar7161_aruba_ap-105.dts | 4 +- .../dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 2 +- target/linux/ath79/dts/ar7161_meraki_mr16.dts | 4 +- .../ath79/dts/ar7240_buffalo_whr-g301n.dts | 2 +- .../ath79/dts/ar7240_netgear_wnr1000-v2.dts | 2 +- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 2 +- .../linux/ath79/dts/ar7240_tplink_tl-wr.dtsi | 4 +- .../ath79/dts/ar7241_netgear_wnr2000-v3.dts | 2 +- .../ath79/dts/ar7241_netgear_wnr2200.dtsi | 2 +- target/linux/ath79/dts/ar7241_tplink.dtsi | 4 +- .../ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 4 +- .../ath79/dts/ar7242_engenius_eap350-v1.dts | 2 +- .../ath79/dts/ar7242_engenius_ecb350-v1.dts | 2 +- target/linux/ath79/dts/ar7242_meraki_mr12.dts | 2 +- .../dts/ar9331_embeddedwireless_dorin.dts | 4 +- .../ath79/dts/ar9331_hak5_lan-turtle.dtsi | 4 +- .../ath79/dts/ar9331_tplink_tl-wr710n.dtsi | 2 +- .../dts/ar9331_tplink_tl-wr741nd-v4.dtsi | 4 +- target/linux/ath79/dts/ar9341_pcs_cr3000.dts | 2 +- target/linux/ath79/dts/ar9341_tplink.dtsi | 2 +- .../ath79/dts/ar9344_aerohive_hiveap-121.dts | 4 +- .../ath79/dts/ar9344_devolo_dlan_wifi.dtsi | 2 +- .../ath79/dts/ar9344_engenius_eap600.dts | 4 +- .../ath79/dts/ar9344_engenius_ecb600.dts | 4 +- .../ath79/dts/ar9344_openmesh_mr600.dtsi | 4 +- target/linux/ath79/dts/ar9344_pcs_cap324.dts | 4 +- .../ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts | 2 +- .../ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts | 2 +- .../linux/ath79/dts/ar9344_samsung_wam250.dts | 2 +- .../dts/ar9344_teltonika_rut955-h7v3c0.dts | 2 +- .../ath79/dts/ar9344_teltonika_rut955.dts | 2 +- .../ath79/dts/ar9344_teltonika_rut9xx.dtsi | 2 +- .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts | 6 +- .../ath79/dts/ar9344_tplink_tl-wdr4300.dtsi | 2 +- .../ath79/dts/ar9344_winchannel_wb2000.dts | 4 +- .../ath79/dts/qca9531_alfa-network_n2q.dts | 4 +- .../dts/qca9531_alfa-network_pi-wifi4.dts | 2 +- .../ath79/dts/qca9531_alfa-network_r36a.dts | 4 +- .../ath79/dts/qca9531_comfast_cf-e560ac.dts | 4 +- .../ath79/dts/qca9531_comfast_cf-ew72.dts | 4 +- .../dts/qca9531_comfast_cf-wr752ac-v1.dts | 2 +- .../ath79/dts/qca9531_glinet_gl-ar300m.dtsi | 2 +- .../ath79/dts/qca9531_glinet_gl-ar750.dts | 2 +- .../ath79/dts/qca9531_glinet_gl-x750.dts | 2 +- .../linux/ath79/dts/qca9531_qxwlan_e600g.dtsi | 2 +- .../dts/qca9531_tplink_archer-d50-v1.dts | 2 +- .../ath79/dts/qca9531_tplink_tl-mr3420-v3.dts | 2 +- .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 4 +- .../dts/qca9531_tplink_tl-wr902ac-v1.dts | 2 +- .../ath79/dts/qca9533_openmesh_om2p-v4.dtsi | 2 +- .../ath79/dts/qca9533_plasmacloud_pa300.dtsi | 4 +- .../ath79/dts/qca9533_tplink_tl-wr802n.dtsi | 2 +- .../ath79/dts/qca9533_tplink_tl-wr841.dtsi | 2 +- .../ath79/dts/qca9533_tplink_tl-wr842n-v3.dts | 2 +- .../ath79/dts/qca953x_tplink_tl-wr810n.dtsi | 2 +- .../ath79/dts/qca9557_engenius_eap1200h.dts | 2 +- .../dts/qca9557_engenius_enstationac-v1.dts | 2 +- .../dts/qca9558_allnet_all-wap02860ac.dts | 3 +- .../ath79/dts/qca9558_belkin_f9x-v2.dtsi | 2 +- .../ath79/dts/qca9558_devolo_dvl1200e.dts | 2 +- .../ath79/dts/qca9558_devolo_dvl1750e.dts | 2 +- .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 2 +- .../linux/ath79/dts/qca9558_openmesh_mr.dtsi | 2 +- .../ath79/dts/qca9558_openmesh_mr900-v1.dts | 2 +- .../ath79/dts/qca9558_openmesh_mr900-v2.dts | 2 +- .../linux/ath79/dts/qca9558_qxwlan_e558.dtsi | 2 +- .../ath79/dts/qca9558_tplink_archer-c.dtsi | 2 +- .../ath79/dts/qca9558_tplink_archer-d7-v1.dts | 2 +- .../dts/qca9558_tplink_archer-d7b-v1.dts | 2 +- .../linux/ath79/dts/qca9558_tplink_rex5x.dtsi | 2 +- .../dts/qca9558_tplink_tl-wdr4900-v2.dts | 6 +- .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi | 2 +- .../dts/qca9561_tplink_archer-c25-v1.dts | 2 +- .../ath79/dts/qca9561_tplink_archer-c5x.dtsi | 2 +- .../ath79/dts/qca9561_tplink_archer-c6x.dtsi | 2 +- .../ath79/dts/qca9561_xiaomi_mi-router-4q.dts | 2 +- .../ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi | 2 +- .../ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi | 2 +- .../linux/ath79/dts/tp9343_tplink_tl-wx.dtsi | 2 +- ...ddress-support-to-of_get_mac_addres.patch} | 45 +++--- ...et-add-mac-address-increment-support.patch | 133 ++++++++++++++++ ...ddress-support-to-of_get_mac_addres.patch} | 45 +++--- ...et-add-mac-address-increment-support.patch | 133 ++++++++++++++++ .../boot/dts/qcom-ipq8064-ad7200-c2600.dtsi | 2 +- .../arm/boot/dts/qcom-ipq8064-vr2600v.dts | 2 +- .../arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 4 +- .../boot/dts/lantiq/ar9_avm_fritz7312.dts | 2 +- .../boot/dts/lantiq/ar9_avm_fritz7320.dts | 2 +- .../lantiq/danube_arcadyan_arv7506pw11.dts | 2 +- .../dts/lantiq/danube_arcadyan_arv7518pw.dts | 2 +- .../lantiq/danube_arcadyan_arv8539pw22.dts | 2 +- .../dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi | 2 +- .../boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi | 144 +++++++++--------- .../boot/dts/lantiq/vr9_avm_fritz736x.dtsi | 122 +++++++-------- .../boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi | 2 +- .../boot/dts/lantiq/vr9_tplink_vr200.dtsi | 2 +- .../arch/powerpc/boot/dts/hiveap-330.dts | 2 +- .../cn7130_ubnt_edgerouter-e300.dtsi | 6 +- .../linux/ramips/dts/mt7620a_cameo_810.dtsi | 2 +- .../ramips/dts/mt7620a_dlink_dir-510l.dts | 2 +- .../ramips/dts/mt7620a_dlink_dwr-118-a1.dts | 2 +- .../ramips/dts/mt7620a_dlink_dwr-118-a2.dts | 2 +- .../ramips/dts/mt7620a_dlink_dwr-960.dts | 2 +- .../ramips/dts/mt7620a_lava_lr-25g001.dts | 2 +- .../dts/mt7620a_tplink_archer-c2-v1.dts | 2 +- .../dts/mt7620a_tplink_archer-c20-v1.dts | 4 +- .../ramips/dts/mt7620a_tplink_archer-c20i.dts | 2 +- .../dts/mt7620a_tplink_archer-c50-v1.dts | 4 +- .../ramips/dts/mt7620a_tplink_re2x0-v1.dtsi | 2 +- target/linux/ramips/dts/mt7621_adslr_g7.dts | 2 +- .../ramips/dts/mt7621_afoundry_ew1200.dts | 2 +- .../ramips/dts/mt7621_asiarf_ap7621-001.dts | 2 +- .../ramips/dts/mt7621_asiarf_ap7621-nv1.dts | 2 +- .../dts/mt7621_buffalo_wsr-2533dhpl.dts | 2 +- .../linux/ramips/dts/mt7621_cudy_wr1300.dts | 4 +- .../ramips/dts/mt7621_dlink_dir-1960-a1.dts | 4 +- .../ramips/dts/mt7621_dlink_dir-2640-a1.dts | 4 +- .../ramips/dts/mt7621_dlink_dir-2660-a1.dts | 4 +- .../dts/mt7621_elecom_wrc-1167ghbk2-s.dts | 2 +- .../dts/mt7621_elecom_wrc-1167gs2-b.dts | 2 +- .../ramips/dts/mt7621_elecom_wrc-1167gst2.dts | 2 +- .../ramips/dts/mt7621_firefly_firewrt.dts | 2 +- .../ramips/dts/mt7621_gehua_ghl-r-001.dts | 2 +- .../ramips/dts/mt7621_glinet_gl-mt1300.dts | 2 +- .../ramips/dts/mt7621_iodata_wn-ax1167gr.dts | 2 +- .../ramips/dts/mt7621_iodata_wn-gx300gr.dts | 2 +- .../dts/mt7621_mediatek_ap-mt7621a-v60.dts | 2 +- .../linux/ramips/dts/mt7621_mqmaker_witi.dts | 2 +- target/linux/ramips/dts/mt7621_mtc_wr1201.dts | 2 +- .../dts/mt7621_netgear_sercomm_ayx.dtsi | 2 +- .../dts/mt7621_netgear_sercomm_bzv.dtsi | 2 +- .../dts/mt7621_netgear_sercomm_chj.dtsi | 2 +- .../dts/mt7621_storylink_sap-g3200u3.dts | 2 +- .../dts/mt7621_telco-electronics_x1.dts | 2 +- .../ramips/dts/mt7621_totolink_a7000r.dts | 2 +- .../dts/mt7621_tplink_eap235-wall-v1.dts | 2 +- .../ramips/dts/mt7621_tplink_re350-v1.dts | 4 +- .../ramips/dts/mt7621_tplink_rexx0-v1.dtsi | 4 +- .../dts/mt7621_ubnt_edgerouter-x-sfp.dts | 2 +- .../ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 8 +- .../ramips/dts/mt7621_unielec_u7621-01.dtsi | 2 +- .../ramips/dts/mt7621_unielec_u7621-06.dtsi | 2 +- .../linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts | 2 +- .../dts/mt7621_xzwifi_creativebox-v1.dts | 2 +- .../ramips/dts/mt7621_zbtlink_zbt-wg2626.dts | 2 +- .../ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi | 2 +- .../ramips/dts/mt7628an_netgear_r6120.dts | 2 +- .../dts/mt7628an_tplink_archer-c20-v4.dts | 4 +- .../dts/mt7628an_tplink_archer-c20-v5.dts | 2 +- .../dts/mt7628an_tplink_archer-c50-v3.dts | 2 +- .../dts/mt7628an_tplink_archer-c50-v4.dts | 2 +- .../ramips/dts/mt7628an_tplink_re200.dtsi | 4 +- .../ramips/dts/mt7628an_tplink_re305-v1.dts | 4 +- .../dts/mt7628an_tplink_tl-wr902ac-v3.dts | 2 +- .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts | 2 +- .../ramips/dts/rt3883_sitecom_wlr-6000.dts | 2 +- .../ramips/dts/rt3883_trendnet_tew-691gr.dts | 2 +- .../ramips/dts/rt3883_trendnet_tew-692gr.dts | 2 +- 158 files changed, 633 insertions(+), 376 deletions(-) rename target/linux/generic/pending-5.10/{681-NET-add-of_get_mac_address_mtd.patch => 681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch} (75%) create mode 100644 target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch rename target/linux/generic/pending-5.4/{681-NET-add-of_get_mac_address_mtd.patch => 681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch} (75%) create mode 100644 target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts index e24236324..083db183d 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts @@ -104,7 +104,7 @@ ath9k0: wifi@0,11 { /* 2.4 GHz */ compatible = "pci168c,0029"; mtd-mac-address = <&hwinfo 0x1c>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; reg = <0x8800 0 0 0 0>; #gpio-cells = <2>; gpio-controller; @@ -113,7 +113,7 @@ ath9k1: wifi@0,12 { /* 5 GHz */ compatible = "pci168c,0029"; mtd-mac-address = <&hwinfo 0x1c>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; reg = <0x9000 0 0 0 0>; #gpio-cells = <2>; gpio-controller; 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 b8176dc05..15ac14869 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -259,7 +259,7 @@ status = "okay"; mtd-mac-address = <&art 0x520c>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy4>; }; diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts index afbf1e31f..3d11e641e 100644 --- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts +++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts @@ -82,7 +82,7 @@ reg = <0x8800 0 0 0 0>; qca,no-eeprom; mtd-mac-address = <&config 0x66>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; #gpio-cells = <2>; gpio-controller; }; @@ -92,7 +92,7 @@ reg = <0x9000 0 0 0 0>; qca,no-eeprom; mtd-mac-address = <&config 0x66>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; #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 e5d7ea57f..7f736dc00 100644 --- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts +++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts @@ -160,7 +160,7 @@ status = "okay"; mtd-mac-address = <&art 0x120c>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &pcie { diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts index 7e1c87add..931032d85 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts +++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts @@ -190,7 +190,7 @@ compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index 7202e1d68..91438ebf8 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -123,7 +123,7 @@ compatible = "pci168c,002b"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi index bd6caacdf..adc6cc87b 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi @@ -31,12 +31,12 @@ ð0 { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; ð1 { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &ath9k { diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts index de2b53622..380f82a59 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts @@ -195,7 +195,7 @@ compatible = "pci168c,002e"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi index e704ddd9f..0098b0f03 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi @@ -171,7 +171,7 @@ compatible = "pci168c,002e"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index 6d7f7515e..c2c81b3a8 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -97,10 +97,10 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; ð1 { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; 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 ca1ad270c..4cc6d2a8f 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -143,10 +143,10 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; ð1 { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; diff --git a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts index 436d8c128..3e2a67697 100644 --- a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts @@ -78,7 +78,7 @@ compatible = "pci168c,002a"; reg = <0x0 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts index be9a19317..9026eb997 100644 --- a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts @@ -78,7 +78,7 @@ compatible = "pci168c,002a"; reg = <0x0 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts index ea64b947e..8a19bffe6 100644 --- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts +++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts @@ -82,7 +82,7 @@ reg = <0x0000 0 0 0 0>; qca,no-eeprom; mtd-mac-address = <&config 0x66>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts index 48bf4d159..b14e70c13 100644 --- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts +++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts @@ -94,8 +94,8 @@ status = "okay"; mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment-byte = <3>; - mtd-mac-address-increment = <0x40>; + mac-address-increment-byte = <3>; + mac-address-increment = <0x40>; }; &mdio1 { diff --git a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi index 3f20843b0..261657312 100644 --- a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi +++ b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi @@ -25,7 +25,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; gmac-config { device = <&gmac>; @@ -39,7 +39,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &pinmux { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi index 7d2cbeb95..9207a0fde 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi @@ -61,7 +61,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &usb { 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 e460e4cd2..248a2b646 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -122,7 +122,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; gmac-config { device = <&gmac>; @@ -136,7 +136,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &wmac { diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts index 1d742a785..f822c69ae 100644 --- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts +++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts @@ -134,7 +134,7 @@ phy-handle = <&swphy0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/ar9341_tplink.dtsi b/target/linux/ath79/dts/ar9341_tplink.dtsi index 26410bcc1..0f6e0bc11 100644 --- a/target/linux/ath79/dts/ar9341_tplink.dtsi +++ b/target/linux/ath79/dts/ar9341_tplink.dtsi @@ -82,7 +82,7 @@ phy-handle = <&swphy0>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; ð1 { diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts index fae3eec78..2f8719437 100644 --- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts +++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts @@ -107,7 +107,7 @@ reg = <0x0000 0 0 0 0>; mtd-mac-address = <&hw_info 0x0>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; @@ -161,7 +161,7 @@ status = "okay"; mtd-mac-address = <&hw_info 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &nand { diff --git a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi index 9424e4865..b61ab75ae 100644 --- a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi +++ b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi @@ -131,7 +131,7 @@ pll-data = <0x02000000 0x00000101 0x00001616>; mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; phy-mode = "rgmii"; phy-handle = <&phy0>; diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts index c6961f636..b25e3be17 100644 --- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts @@ -30,7 +30,7 @@ ð0 { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; &pcie { @@ -41,5 +41,5 @@ &wmac { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts index 13167adc4..6c7a99c47 100644 --- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts @@ -30,11 +30,11 @@ &pcie { wifi@0,0,0 { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; }; &wmac { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi index ff532733b..6a7af5914 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi +++ b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi @@ -114,7 +114,7 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &pcie { @@ -125,6 +125,6 @@ reg = <0x0000 0 0 0 0>; qca,no-eeprom; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <8>; + mac-address-increment = <8>; }; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts index 3ce8bb58f..4125a4026 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts @@ -119,7 +119,7 @@ compatible = "168c,0030"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; mtd-cal-data = <&art 0x5000>; qca,no-eeprom; qca,disable-5ghz; @@ -134,7 +134,7 @@ qca,disable-2ghz; mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &mdio0 { 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 61389be12..366a0f720 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts @@ -25,7 +25,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&pridata 0x400>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 e232cdab2..994b842f3 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts @@ -25,7 +25,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&pridata 0x400>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/ar9344_samsung_wam250.dts b/target/linux/ath79/dts/ar9344_samsung_wam250.dts index 0f38ff82e..bca757e77 100644 --- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts +++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts @@ -67,7 +67,7 @@ phy-handle = <&swphy0>; mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; gmac-config { device = <&gmac>; diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts index eb9606e58..22c2163fe 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts +++ b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts @@ -165,7 +165,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts index ba840a05d..28dbb7451 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts +++ b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts @@ -164,7 +164,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi index d9c66d274..53fe69ae0 100644 --- a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi +++ b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi @@ -148,7 +148,7 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&config 0x0>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; &pinmux { diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts index 59a06346a..e8f9672b5 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts @@ -58,7 +58,7 @@ &ath9k { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wmac { @@ -69,7 +69,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; gmac-config { device = <&gmac>; @@ -84,5 +84,5 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index 21fd079e1..f8b4d0385 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -85,7 +85,7 @@ &wmac { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &mdio0 { diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts index 72cd5aab4..87bbd206b 100644 --- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts +++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts @@ -142,7 +142,7 @@ reg = <0x0000 0 0 0 0>; qca,no-eeprom; mtd-mac-address = <&addr 0x0>; - mtd-mac-address-increment = <0x10>; + mac-address-increment = <0x10>; #gpio-cells = <2>; gpio-controller; }; @@ -198,7 +198,7 @@ pll-data = <0xe000000 0x04000101 0x04001313>; mtd-mac-address = <&addr 0x0>; - mtd-mac-address-increment = <0x21>; + mac-address-increment = <0x21>; phy-mode = "rgmii-rxid"; phy-handle = <&phy4>; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts index 40eabd048..4f0e371c2 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts @@ -107,12 +107,12 @@ ð0 { mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; ð1 { mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &pcie0 { 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 42f2c9ffe..4288e92fc 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts @@ -46,7 +46,7 @@ ð0 { mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; ð1 { diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts index ab6536924..1effb4485 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts @@ -51,7 +51,7 @@ ð0 { mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; ð1 { @@ -60,7 +60,7 @@ compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &gpio_export { diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts index a7ea34eeb..634d20015 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts @@ -151,7 +151,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { @@ -163,5 +163,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <10>; + mac-address-increment = <10>; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts index edb6bbe5f..f67a8cbb7 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts @@ -110,7 +110,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { @@ -122,5 +122,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <3>; + mac-address-increment = <3>; }; 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 6ae2e4eb5..44c85b62e 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts @@ -122,5 +122,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <10>; + mac-address-increment = <10>; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index d0b0d88c4..3b20fa51a 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -151,7 +151,7 @@ ð1 { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wmac { diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts index 24dc8aaf6..80623085f 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts @@ -134,7 +134,7 @@ ð1 { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wmac { diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts index c755e0003..8cb611c11 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts @@ -123,7 +123,7 @@ ð1 { mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wmac { diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi index 7c6ed9f4f..6423ae027 100644 --- a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi +++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi @@ -96,7 +96,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&pridata 0x400>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 9a3900193..1113c51be 100644 --- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts @@ -147,7 +147,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&romfile 0xf100>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 0e2c15826..4c730375a 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts @@ -172,7 +172,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 82a73d301..47d9e0846 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts @@ -129,12 +129,12 @@ phy-handle = <&swphy0>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &wmac { 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 69445df74..a769a81d5 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts @@ -148,7 +148,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&info 0x8>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi index 53eb08b25..e38fc9378 100644 --- a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi +++ b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi @@ -149,5 +149,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; diff --git a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi index c506c849f..6df843f14 100644 --- a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi +++ b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi @@ -124,7 +124,7 @@ compatible = "qca,qca9530-eth", "syscon", "simple-mfd"; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wmac { @@ -132,5 +132,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi index fb034195e..1835cbcb9 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi @@ -74,7 +74,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi index 416668679..df68a56d4 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -109,7 +109,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 db99f70b3..cb93afa23 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts @@ -149,7 +149,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi index ab8ac9242..27d9681ea 100644 --- a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi +++ b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi @@ -91,7 +91,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts index 80298a9d8..0b006bcff 100644 --- a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts +++ b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts @@ -90,5 +90,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; diff --git a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts index 5da50ff6d..9a45bd427 100644 --- a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts +++ b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts @@ -100,7 +100,7 @@ status = "okay"; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy2>; diff --git a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts index 973cb16ef..3b9e25e3e 100644 --- a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts +++ b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts @@ -90,5 +90,6 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; + qca-no-eeprom; }; diff --git a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi index e4bb6c25e..81c2c0866 100644 --- a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi +++ b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi @@ -199,7 +199,7 @@ status = "okay"; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; pll-data = <0x03000101 0x00000101 0x00001616>; fixed-link { diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts index 9e38a9f39..85617cc80 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -59,7 +59,7 @@ status = "okay"; mtd-mac-address = <&art 0x00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy1>; pll-data = <0x03000101 0x00000101 0x00001313>; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts index 0a1c9cb6d..895398e35 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts @@ -94,7 +94,7 @@ status = "okay"; mtd-mac-address = <&art 0x00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy1>; pll-data = <0x03000101 0x00000101 0x00001313>; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index 7ae33c3e0..ba7f014e6 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -114,5 +114,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x00>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi index f4eed2246..fa379030e 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi +++ b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi @@ -157,7 +157,7 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &pcie0 { diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts index f7889b00c..6704fbbe8 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts @@ -20,6 +20,6 @@ compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <16>; + mac-address-increment = <16>; }; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts index 1f54d2134..7221b5b09 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts @@ -20,6 +20,6 @@ compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <16>; + mac-address-increment = <16>; }; }; diff --git a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi index 21946c42b..e1c44af3f 100644 --- a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi +++ b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi @@ -128,7 +128,7 @@ phy-handle = <&phy0>; mtd-mac-address = <&pridata 0x400>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi index 52cbb5d01..3f965f5b9 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi @@ -150,7 +150,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy0>; pll-data = <0x56000000 0x00000101 0x00001616>; 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 fd1717b66..90332f187 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts @@ -71,7 +71,7 @@ ð0 { mtd-mac-address = <&romfs 0xf100>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 d2ef7e82a..754cb1791 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts @@ -65,7 +65,7 @@ ð0 { mtd-mac-address = <&romfs 0xf100>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi index 6c487f15b..b12b547a7 100644 --- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi @@ -166,5 +166,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&info 0x8>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; 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 0099592dc..10d6e6040 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -97,7 +97,7 @@ compatible = "pci168c,0033"; reg = <0x0000 0 0 0 0>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; qca,no-eeprom; #gpio-cells = <2>; gpio-controller; @@ -191,7 +191,7 @@ status = "okay"; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy0>; pll-data = <0x56000000 0x00000101 0x00001616>; @@ -218,5 +218,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index 959d5c35f..8f2b626ba 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -146,7 +146,7 @@ pll-data = <0x56000000 0x00000101 0x00001616>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; phy-handle = <&phy0>; }; 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 bf744f108..66a578305 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts @@ -179,7 +179,7 @@ status = "okay"; mtd-mac-address = <&info 0x8>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wmac { diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi index 664032936..673805e13 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi @@ -127,7 +127,7 @@ phy-handle = <&swphy0>; mtd-mac-address = <&info 0x8>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; gmac-config { device = <&gmac>; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi index 75d3816b7..5c5d1620b 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi @@ -73,7 +73,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&info 0x8>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { 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 821f125c2..6693a5cd7 100644 --- a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts +++ b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts @@ -134,5 +134,5 @@ mtd-cal-data = <&art 0x1000>; mtd-mac-address = <&art 0x0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi b/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi index 78eb0fe21..044485316 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi @@ -106,7 +106,7 @@ pll-data = <0x03000101 0x00000101 0x00001919>; mtd-mac-address = <&art 0x1002>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; phy-mode = "sgmii"; phy-handle = <&phy0>; }; 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 5c897b16a..c1c553e8c 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi @@ -64,5 +64,5 @@ ð1 { mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi index 31079123c..14e10596b 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi @@ -51,7 +51,7 @@ phy-handle = <&swphy4>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ð1 { diff --git a/target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch similarity index 75% rename from target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch rename to target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch index 71fbfe997..44a6b6a04 100644 --- a/target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch +++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch @@ -1,5 +1,7 @@ -From: John Crispin -Subject: NET: add mtd-mac-address support to of_get_mac_address() +From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 30 Mar 2021 13:16:38 +0200 +Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address() Many embedded devices have information such as mac addresses stored inside mtd devices. This patch allows us to add a property inside a node describing a @@ -8,11 +10,13 @@ where the mac address can be found. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau +Signed-off-by: Ansuel Smith --- - drivers/of/of_net.c | 37 +++++++++++++++++++++++++++++++++++++ - include/linux/of_net.h | 1 + - 2 files changed, 38 insertions(+) + drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 74 insertions(+), 1 deletion(-) +diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c +index 6e411821583e..f072e2509cc9 100644 --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c @@ -11,6 +11,7 @@ @@ -23,7 +27,7 @@ Signed-off-by: Felix Fietkau /** * of_get_phy_mode - Get phy mode for given device_node -@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node * +@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface) } EXPORT_SYMBOL_GPL(of_get_phy_mode); @@ -32,7 +36,7 @@ Signed-off-by: Felix Fietkau { struct property *pp = of_find_property(np, name, NULL); -@@ -78,6 +79,79 @@ static const void *of_get_mac_addr_nvmem +@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np) return mac; } @@ -47,10 +51,8 @@ Signed-off-by: Felix Fietkau + const char *part; + const __be32 *list; + phandle phandle; -+ u32 mac_inc = 0; + u8 mac[ETH_ALEN]; + void *addr; -+ u32 inc_idx; + + list = of_get_property(np, "mtd-mac-address", &size); + if (!list || (size != (2 * sizeof(*list)))) @@ -74,14 +76,6 @@ Signed-off-by: Felix Fietkau + ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac); + put_mtd_device(mtd); + -+ if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx)) -+ inc_idx = 5; -+ if (inc_idx > 5) -+ return NULL; -+ -+ if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc)) -+ mac[inc_idx] += mac_inc; -+ + if (!is_valid_ether_addr(mac)) + return NULL; + @@ -108,11 +102,12 @@ Signed-off-by: Felix Fietkau +#endif + return NULL; +} ++ + /** * Search the device tree for the best MAC address to use. 'mac-address' is * checked first, because that is supposed to contain to "most recent" MAC -@@ -98,12 +172,20 @@ static const void *of_get_mac_addr_nvmem +@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np) * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists * but is all zeros. * @@ -123,13 +118,17 @@ Signed-off-by: Felix Fietkau * Return: Will be a valid pointer on success and ERR_PTR in case of error. */ const void *of_get_mac_address(struct device_node *np) - { - const void *addr; +@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np) + if (addr) + return addr; + addr = of_get_mac_address_mtd(np); + if (addr) + return addr; + - addr = of_get_mac_addr(np, "mac-address"); - if (addr) - return addr; + return of_get_mac_addr_nvmem(np); + } + EXPORT_SYMBOL(of_get_mac_address); +-- +2.30.2 + diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch new file mode 100644 index 000000000..1c08e2369 --- /dev/null +++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch @@ -0,0 +1,133 @@ +From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 30 Mar 2021 18:21:14 +0200 +Subject: [PATCH 2/2] of_net: add mac-address-increment support + +Lots of embedded devices use the mac-address of other interface +extracted from nvmem cells and increments it by one or two. Add two +bindings to integrate this and directly use the right mac-address for +the interface. Some example are some routers that use the gmac +mac-address stored in the art partition and increments it by one for the +wifi. mac-address-increment-byte bindings is used to tell what byte of +the mac-address has to be increased (if not defined the last byte is +increased) and mac-address-increment tells how much the byte decided +early has to be increased. + +Signed-off-by: Ansuel Smith +--- + drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++----------- + 1 file changed, 45 insertions(+), 14 deletions(-) + +diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c +index f072e2509cc9..0dbd1f7ef396 100644 +--- a/drivers/of/of_net.c ++++ b/drivers/of/of_net.c +@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name) + return NULL; + } + +-static const void *of_get_mac_addr_nvmem(struct device_node *np) ++static void *of_get_mac_addr_nvmem(struct device_node *np, int *err) + { + int ret; +- const void *mac; ++ void *mac; + u8 nvmem_mac[ETH_ALEN]; + struct platform_device *pdev = of_find_device_by_node(np); + +- if (!pdev) +- return ERR_PTR(-ENODEV); ++ if (!pdev) { ++ *err = -ENODEV; ++ return NULL; ++ } + + ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac); + if (ret) { + put_device(&pdev->dev); +- return ERR_PTR(ret); ++ *err = ret; ++ return NULL; + } + + mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL); + put_device(&pdev->dev); +- if (!mac) +- return ERR_PTR(-ENOMEM); ++ if (!mac) { ++ *err = -ENOMEM; ++ return NULL; ++ } + + return mac; + } + +-static const void *of_get_mac_address_mtd(struct device_node *np) ++static void *of_get_mac_address_mtd(struct device_node *np) + { + #ifdef CONFIG_MTD + struct device_node *mtd_np = NULL; +@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np) + * If a mtd-mac-address property exists, try to fetch the MAC address from the + * specified mtd device, and store it as a 'mac-address' property + * ++ * DT can tell the system to increment the mac-address after is extracted by ++ * using: ++ * - mac-address-increment-byte to decide what byte to increase ++ * (if not defined is increased the last byte) ++ * - mac-address-increment to decide how much to increase. The value will ++ * not overflow to other bytes if the increment is over 255. ++ * (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00) ++ * + * Return: Will be a valid pointer on success and ERR_PTR in case of error. + */ + const void *of_get_mac_address(struct device_node *np) + { +- const void *addr; ++ u32 inc_idx, mac_inc; ++ int ret = 0; ++ u8 *addr; ++ ++ /* Check first if the increment byte is present and valid. ++ * If not set assume to increment the last byte if found. ++ */ ++ if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx)) ++ inc_idx = 5; ++ if (inc_idx < 3 || inc_idx > 5) ++ return ERR_PTR(-EINVAL); + + addr = of_get_mac_addr(np, "mac-address"); + if (addr) +- return addr; ++ goto found; + + addr = of_get_mac_addr(np, "local-mac-address"); + if (addr) +- return addr; ++ goto found; + + addr = of_get_mac_addr(np, "address"); + if (addr) +- return addr; ++ goto found; + + addr = of_get_mac_address_mtd(np); + if (addr) +- return addr; ++ goto found; ++ ++ addr = of_get_mac_addr_nvmem(np, &ret); ++ if (ret) ++ return ERR_PTR(ret); ++ ++found: ++ if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) ++ addr[inc_idx] += mac_inc; + +- return of_get_mac_addr_nvmem(np); ++ return addr; + } + EXPORT_SYMBOL(of_get_mac_address); +-- +2.30.2 + diff --git a/target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch similarity index 75% rename from target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch rename to target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch index b02febefd..44a6b6a04 100644 --- a/target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch +++ b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch @@ -1,5 +1,7 @@ -From: John Crispin -Subject: NET: add mtd-mac-address support to of_get_mac_address() +From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 30 Mar 2021 13:16:38 +0200 +Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address() Many embedded devices have information such as mac addresses stored inside mtd devices. This patch allows us to add a property inside a node describing a @@ -8,11 +10,13 @@ where the mac address can be found. Signed-off-by: John Crispin Signed-off-by: Felix Fietkau +Signed-off-by: Ansuel Smith --- - drivers/of/of_net.c | 37 +++++++++++++++++++++++++++++++++++++ - include/linux/of_net.h | 1 + - 2 files changed, 38 insertions(+) + drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 74 insertions(+), 1 deletion(-) +diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c +index 6e411821583e..f072e2509cc9 100644 --- a/drivers/of/of_net.c +++ b/drivers/of/of_net.c @@ -11,6 +11,7 @@ @@ -23,7 +27,7 @@ Signed-off-by: Felix Fietkau /** * of_get_phy_mode - Get phy mode for given device_node -@@ -39,7 +40,7 @@ int of_get_phy_mode(struct device_node * +@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface) } EXPORT_SYMBOL_GPL(of_get_phy_mode); @@ -32,7 +36,7 @@ Signed-off-by: Felix Fietkau { struct property *pp = of_find_property(np, name, NULL); -@@ -72,6 +73,79 @@ static const void *of_get_mac_addr_nvmem +@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np) return mac; } @@ -47,10 +51,8 @@ Signed-off-by: Felix Fietkau + const char *part; + const __be32 *list; + phandle phandle; -+ u32 mac_inc = 0; + u8 mac[ETH_ALEN]; + void *addr; -+ u32 inc_idx; + + list = of_get_property(np, "mtd-mac-address", &size); + if (!list || (size != (2 * sizeof(*list)))) @@ -74,14 +76,6 @@ Signed-off-by: Felix Fietkau + ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac); + put_mtd_device(mtd); + -+ if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx)) -+ inc_idx = 5; -+ if (inc_idx > 5) -+ return NULL; -+ -+ if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc)) -+ mac[inc_idx] += mac_inc; -+ + if (!is_valid_ether_addr(mac)) + return NULL; + @@ -108,11 +102,12 @@ Signed-off-by: Felix Fietkau +#endif + return NULL; +} ++ + /** * Search the device tree for the best MAC address to use. 'mac-address' is * checked first, because that is supposed to contain to "most recent" MAC -@@ -92,12 +166,20 @@ static const void *of_get_mac_addr_nvmem +@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np) * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists * but is all zeros. * @@ -123,13 +118,17 @@ Signed-off-by: Felix Fietkau * Return: Will be a valid pointer on success and ERR_PTR in case of error. */ const void *of_get_mac_address(struct device_node *np) - { - const void *addr; +@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np) + if (addr) + return addr; + addr = of_get_mac_address_mtd(np); + if (addr) + return addr; + - addr = of_get_mac_addr(np, "mac-address"); - if (addr) - return addr; + return of_get_mac_addr_nvmem(np); + } + EXPORT_SYMBOL(of_get_mac_address); +-- +2.30.2 + diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch new file mode 100644 index 000000000..1c08e2369 --- /dev/null +++ b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch @@ -0,0 +1,133 @@ +From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001 +From: Ansuel Smith +Date: Tue, 30 Mar 2021 18:21:14 +0200 +Subject: [PATCH 2/2] of_net: add mac-address-increment support + +Lots of embedded devices use the mac-address of other interface +extracted from nvmem cells and increments it by one or two. Add two +bindings to integrate this and directly use the right mac-address for +the interface. Some example are some routers that use the gmac +mac-address stored in the art partition and increments it by one for the +wifi. mac-address-increment-byte bindings is used to tell what byte of +the mac-address has to be increased (if not defined the last byte is +increased) and mac-address-increment tells how much the byte decided +early has to be increased. + +Signed-off-by: Ansuel Smith +--- + drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++----------- + 1 file changed, 45 insertions(+), 14 deletions(-) + +diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c +index f072e2509cc9..0dbd1f7ef396 100644 +--- a/drivers/of/of_net.c ++++ b/drivers/of/of_net.c +@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name) + return NULL; + } + +-static const void *of_get_mac_addr_nvmem(struct device_node *np) ++static void *of_get_mac_addr_nvmem(struct device_node *np, int *err) + { + int ret; +- const void *mac; ++ void *mac; + u8 nvmem_mac[ETH_ALEN]; + struct platform_device *pdev = of_find_device_by_node(np); + +- if (!pdev) +- return ERR_PTR(-ENODEV); ++ if (!pdev) { ++ *err = -ENODEV; ++ return NULL; ++ } + + ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac); + if (ret) { + put_device(&pdev->dev); +- return ERR_PTR(ret); ++ *err = ret; ++ return NULL; + } + + mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL); + put_device(&pdev->dev); +- if (!mac) +- return ERR_PTR(-ENOMEM); ++ if (!mac) { ++ *err = -ENOMEM; ++ return NULL; ++ } + + return mac; + } + +-static const void *of_get_mac_address_mtd(struct device_node *np) ++static void *of_get_mac_address_mtd(struct device_node *np) + { + #ifdef CONFIG_MTD + struct device_node *mtd_np = NULL; +@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np) + * If a mtd-mac-address property exists, try to fetch the MAC address from the + * specified mtd device, and store it as a 'mac-address' property + * ++ * DT can tell the system to increment the mac-address after is extracted by ++ * using: ++ * - mac-address-increment-byte to decide what byte to increase ++ * (if not defined is increased the last byte) ++ * - mac-address-increment to decide how much to increase. The value will ++ * not overflow to other bytes if the increment is over 255. ++ * (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00) ++ * + * Return: Will be a valid pointer on success and ERR_PTR in case of error. + */ + const void *of_get_mac_address(struct device_node *np) + { +- const void *addr; ++ u32 inc_idx, mac_inc; ++ int ret = 0; ++ u8 *addr; ++ ++ /* Check first if the increment byte is present and valid. ++ * If not set assume to increment the last byte if found. ++ */ ++ if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx)) ++ inc_idx = 5; ++ if (inc_idx < 3 || inc_idx > 5) ++ return ERR_PTR(-EINVAL); + + addr = of_get_mac_addr(np, "mac-address"); + if (addr) +- return addr; ++ goto found; + + addr = of_get_mac_addr(np, "local-mac-address"); + if (addr) +- return addr; ++ goto found; + + addr = of_get_mac_addr(np, "address"); + if (addr) +- return addr; ++ goto found; + + addr = of_get_mac_address_mtd(np); + if (addr) +- return addr; ++ goto found; ++ ++ addr = of_get_mac_addr_nvmem(np, &ret); ++ if (ret) ++ return ERR_PTR(ret); ++ ++found: ++ if (!of_property_read_u32(np, "mac-address-increment", &mac_inc)) ++ addr[inc_idx] += mac_inc; + +- return of_get_mac_addr_nvmem(np); ++ return addr; + } + EXPORT_SYMBOL(of_get_mac_address); +-- +2.30.2 + diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi index 2c2505bd2..717096cb6 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi @@ -303,7 +303,7 @@ pinctrl-names = "default"; mtd-mac-address = <&defaultmac 0x8>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; fixed-link { speed = <1000>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 893addf24..79b22ff0c 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -324,7 +324,7 @@ pinctrl-names = "default"; mtd-mac-address = <&defaultmac 0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; fixed-link { speed = <1000>; diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts index 5d5c44fcc..3a34b9282 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts @@ -440,7 +440,7 @@ reg = <0x00010000 0 0 0 0>; mtd-mac-address = <&art 6>; - mtd-mac-address-increment = <(1)>; + mac-address-increment = <(1)>; }; }; }; @@ -460,7 +460,7 @@ reg = <0x00010000 0 0 0 0>; mtd-mac-address = <&art 6>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; }; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts index 4a4a06514..19cb54db6 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts @@ -97,7 +97,7 @@ phy-mode = "rmii"; phy-handle = <&phy0>; mtd-mac-address = <&ath9k_cal 0xa91>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; mdio-bus { #address-cells = <1>; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts index 5f3893657..4d7986f0a 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts @@ -98,7 +98,7 @@ &gsw { phy-mode = "mii"; mtd-mac-address = <&ath9k_cal 0xa91>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; &gpio { diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts index 87954fef0..f0b288c6b 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts @@ -155,6 +155,6 @@ ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; mtd-mac-address = <&boardconfig 0x16>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index f2592961c..ca0cf107d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -213,7 +213,7 @@ reg = <0x7000 0 0 0 0>; qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ mtd-mac-address = <&boardconfig 0x16>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts index 5986279e6..3b9f6c246 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts @@ -160,7 +160,7 @@ reg = <0x7000 0 0 0 0>; qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ mtd-mac-address = <&art 0x16>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi index 696a61a86..ba355cce3 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi @@ -233,7 +233,7 @@ ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; mtd-mac-address = <&boardconfig 0x16>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi index 08d9148fa..381c3fc27 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi @@ -127,76 +127,9 @@ }; ð0 { - pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led0_pins>; - pinctrl-names = "default"; - - interface@0 { - compatible = "lantiq,xrx200-pdi"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - mtd-mac-address = <&boardconfig 0x16>; - mtd-mac-address-increment = <1>; - lantiq,switch; - - ethernet@0 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <0>; - phy-mode = "rgmii"; - phy-handle = <&phy0>; - }; - ethernet@1 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <1>; - phy-mode = "rgmii"; - phy-handle = <&phy1>; - }; - ethernet@2 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <2>; - phy-mode = "gmii"; - phy-handle = <&phy11>; - }; - ethernet@4 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <4>; - phy-mode = "gmii"; - phy-handle = <&phy13>; - }; - ethernet@5 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <5>; - phy-mode = "rgmii"; - phy-handle = <&phy5>; - }; - }; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - compatible = "lantiq,xrx200-mdio"; - - phy0: ethernet-phy@0 { - reg = <0x0>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - phy1: ethernet-phy@1 { - reg = <0x1>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - phy5: ethernet-phy@5 { - reg = <0x5>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - phy11: ethernet-phy@11 { - reg = <0x11>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - phy13: ethernet-phy@13 { - reg = <0x13>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - }; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; &gphy0 { @@ -221,6 +154,62 @@ }; }; +&gswip { + pinctrl-0 = <&mdio_pins>, <&gphy0_led1_pins>, <&gphy1_led0_pins>; + pinctrl-names = "default"; +}; + +&gswip_mdio { + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + phy1: ethernet-phy@1 { + reg = <0x1>; + }; + phy5: ethernet-phy@5 { + reg = <0x5>; + }; + phy11: ethernet-phy@11 { + reg = <0x11>; + }; + phy13: ethernet-phy@13 { + reg = <0x13>; + }; +}; + +&gswip_ports { + port@0 { + reg = <0>; + label = "lan4"; + phy-mode = "rgmii"; + phy-handle = <&phy0>; + }; + port@1 { + reg = <1>; + label = "lan3"; + phy-mode = "rgmii"; + phy-handle = <&phy1>; + }; + port@2 { + reg = <2>; + label = "lan2"; + phy-mode = "internal"; + phy-handle = <&phy11>; + }; + port@4 { + reg = <4>; + label = "lan1"; + phy-mode = "internal"; + phy-handle = <&phy13>; + }; + port@5 { + reg = <5>; + label = "wan"; + phy-mode = "rgmii"; + phy-handle = <&phy5>; + }; +}; + &localbus { flash@0 { compatible = "lantiq,nor"; @@ -250,8 +239,9 @@ reg = <0x7000 0 0 0 0>; ralink,mtd-eeprom = <&boardconfig 0x410>; ralink,mtd-eeprom-swap; - mtd-mac-address = <&boardconfig 0x16>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_boardconfig_16>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; }; @@ -290,3 +280,13 @@ &gpio 31 GPIO_ACTIVE_HIGH //still unknown &gpio 3 GPIO_ACTIVE_HIGH>; //reset_slic? }; + +&boardconfig { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_boardconfig_16: macaddr@16 { + reg = <0x16 0x6>; + }; +}; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi index c7e600aac..d91dc74e2 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi @@ -81,71 +81,8 @@ }; ð0 { - interface@0 { - compatible = "lantiq,xrx200-pdi"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - mtd-mac-address = <&urlader 0xa91>; - mtd-mac-address-increment = <(-2)>; - lantiq,switch; - - ethernet@0 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <0>; - phy-mode = "rmii"; - phy-handle = <&phy0>; - }; - - ethernet@1 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <1>; - phy-mode = "rmii"; - phy-handle = <&phy1>; - }; - - ethernet@2 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <2>; - phy-mode = "gmii"; - phy-handle = <&phy11>; - }; - - ethernet@4 { - compatible = "lantiq,xrx200-pdi-port"; - reg = <4>; - phy-mode = "gmii"; - phy-handle = <&phy13>; - }; - }; - - mdio { - #address-cells = <1>; - #size-cells = <0>; - compatible = "lantiq,xrx200-mdio"; - - phy0: ethernet-phy@0 { - reg = <0x00>; - compatible = "ethernet-phy-ieee802.3-c22"; - reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>; - }; - - phy1: ethernet-phy@1 { - reg = <0x01>; - compatible = "ethernet-phy-ieee802.3-c22"; - reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; - }; - - phy11: ethernet-phy@11 { - reg = <0x11>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - - phy13: ethernet-phy@13 { - reg = <0x13>; - compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - }; - }; + mtd-mac-address = <&urlader 0xa91>; + mac-address-increment = <(-2)>; }; &gphy0 { @@ -171,6 +108,61 @@ }; +&gswip { + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; +}; + +&gswip_mdio { + phy0: ethernet-phy@0 { + reg = <0x00>; + reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + + phy1: ethernet-phy@1 { + reg = <0x01>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + phy11: ethernet-phy@11 { + reg = <0x11>; + }; + + phy13: ethernet-phy@13 { + reg = <0x13>; + }; +}; + +&gswip_ports { + port@0 { + reg = <0>; + label = "lan3"; + phy-mode = "rmii"; + phy-handle = <&phy0>; + }; + + port@1 { + reg = <1>; + label = "lan4"; + phy-mode = "rmii"; + phy-handle = <&phy1>; + }; + + port@2 { + reg = <2>; + label = "lan2"; + phy-mode = "internal"; + phy-handle = <&phy11>; + }; + + port@4 { + reg = <4>; + label = "lan1"; + phy-mode = "internal"; + phy-handle = <&phy13>; + }; +}; + &pcie0 { status = "okay"; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi index d33b817f2..9e53e9949 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi @@ -215,7 +215,7 @@ qca,no-eeprom; qca,disable-5ghz; mtd-mac-address = <&ath9k_cal 0xf100>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; }; diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi index aa76f6626..b2649487d 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi @@ -203,7 +203,7 @@ big-endian; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&romfile 0xf100>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; }; diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts index 3ca132d0c..10bb35368 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts @@ -177,7 +177,7 @@ phy-handle = <&phy1>; phy-connection-type = "rgmii-id"; mtd-mac-address = <&hwinfo 0>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; gpio0: gpio-controller@fc00 { diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi index 7d4c7f0de..7a4d2e668 100644 --- a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi +++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi @@ -181,7 +181,7 @@ phy-mode = "sgmii"; phy-handle = <&phy5>; mtd-mac-address = <&eeprom 0>; - mtd-mac-address-increment = <(1)>; + mac-address-increment = <(1)>; }; ethernet@2 { @@ -190,7 +190,7 @@ phy-mode = "sgmii"; phy-handle = <&phy6>; mtd-mac-address = <&eeprom 0>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; }; ethernet@3 { @@ -199,7 +199,7 @@ phy-mode = "sgmii"; phy-handle = <&phy7>; mtd-mac-address = <&eeprom 0>; - mtd-mac-address-increment = <(3)>; + mac-address-increment = <(3)>; }; }; }; diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index 70407449d..b1a50bb71 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -154,6 +154,6 @@ mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&factory 0x28>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index 774d90c79..5b8d883dd 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -115,7 +115,7 @@ mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; mtd-mac-address = <&config 0xe490>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe05d>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index b86ab1449..2e755b662 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -143,7 +143,7 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; mtd-mac-address = <&config 0xe496>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe083>; led { diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts index b0dd31caf..eec4969ff 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -141,7 +141,7 @@ reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&config 0xe4a8>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; led { led-sources = <2>; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index 4284c61aa..eed57f7f6 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -176,7 +176,7 @@ ieee80211-freq-limit = <5000000 6000000>; mediatek,mtd-eeprom = <&config 0xe08e>; mtd-mac-address = <&config 0xe50e>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index 41d69d009..2f882b3b5 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -141,7 +141,7 @@ mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; mtd-mac-address = <&config 0xe07e>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe08a>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts index 184af58d2..cfd55ea22 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -184,6 +184,6 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts index f7e7d50df..89f48dc7d 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -73,10 +73,10 @@ pinctrl-0 = <&pa_pins>; mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; &wifi { mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index a6c3cea73..c4fb98c46 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -58,5 +58,5 @@ &wifi { mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts index d564552ff..8de87caec 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -73,10 +73,10 @@ pinctrl-0 = <&pa_pins>; mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; &wifi { mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi index 80b47b7d7..7b3025e8b 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi @@ -89,7 +89,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; mtd-mac-address = <&uboot 0x1fc00>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 3290a5e71..84c0d3b28 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -130,7 +130,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe00c>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index ed9e9852d..0a4971d06 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -135,7 +135,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts index cf91dc031..0e66057fa 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -18,7 +18,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts index 5a4c03fb7..4088b8137 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -13,7 +13,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; port@2 { diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 048eac5a3..9244c8368 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -165,7 +165,7 @@ &gmac0 { mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts index a66ce942a..e943c0406 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts @@ -142,7 +142,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; mtd-mac-address = <&bdinfo 0xde00>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; led { @@ -182,7 +182,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&bdinfo 0xde00>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts index 0f4fbc187..fd11768ce 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts @@ -18,10 +18,10 @@ &wifi0 { mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wifi1 { mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts index 323a79060..b19f70f7c 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts @@ -25,10 +25,10 @@ &wifi0 { mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wifi1 { mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts index fbf233d96..a4d72876a 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts @@ -25,10 +25,10 @@ &wifi0 { mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &wifi1 { mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts index b6a738355..f8ea5dbbb 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -169,7 +169,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0>; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts index 6349fd487..becd2a9f9 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts @@ -49,5 +49,5 @@ &wifi { mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts index 11b782488..5cc8ff27f 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts @@ -49,5 +49,5 @@ &wifi { mtd-mac-address = <&factory 0xe006>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index 62423f02e..968932657 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -134,7 +134,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts index e7b19fa42..f0152e8db 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -131,7 +131,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 20f63902a..629a9a243 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -116,7 +116,7 @@ &gmac0 { mtd-mac-address = <&factory 0x4000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &switch0 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index 879fb68c8..c549bbb51 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -137,7 +137,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; port@1 { diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 06d024e9a..91f30f872 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -137,7 +137,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; port@1 { diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index 04996558a..ec9be40ce 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -142,7 +142,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x5>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index 45901474d..130193c17 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -123,7 +123,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index 8a79d9ca9..cfa0e6af2 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -128,7 +128,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi index 1a19cd048..eaf9059e3 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -136,7 +136,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 71c95e75b..3ed8bc55e 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -191,7 +191,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 7a15cd1f6..61cb522df 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -125,7 +125,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index d44960a9a..6ecf71895 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -131,7 +131,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe006>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index f597d0f63..0386a3cdd 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -150,7 +150,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe006>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index d0e38f172..4b53e60cd 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -129,7 +129,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts index 17308eb60..cf63e6b98 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -147,7 +147,7 @@ mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&info 0x8>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 9f29ecd8c..0a810b019 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -131,7 +131,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; @@ -141,7 +141,7 @@ mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 45a983098..0ec83fa38 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -149,7 +149,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -160,7 +160,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts index 9f9217890..536180be1 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts @@ -67,7 +67,7 @@ phy-handle = <&ephy7>; phy-mode = "rgmii-rxid"; mtd-mac-address = <&factory 0x22>; - mtd-mac-address-increment = <5>; + mac-address-increment = <5>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index 04eb49bfa..b92dc8f3f 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -35,28 +35,28 @@ status = "okay"; label = "eth1"; mtd-mac-address = <&factory 0x22>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; port@2 { status = "okay"; label = "eth2"; mtd-mac-address = <&factory 0x22>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; port@3 { status = "okay"; label = "eth3"; mtd-mac-address = <&factory 0x22>; - mtd-mac-address-increment = <3>; + mac-address-increment = <3>; }; port@4 { status = "okay"; label = "eth4"; mtd-mac-address = <&factory 0x22>; - mtd-mac-address-increment = <4>; + mac-address-increment = <4>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi index 336f68ea6..b9b16fbb4 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi @@ -82,7 +82,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; port@1 { diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index 3b149df85..29e625172 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -103,7 +103,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index b90ff92c7..ee1a452fa 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -114,7 +114,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 182b6db5b..afee235ac 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -182,7 +182,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index d0d656ba6..b1fbf5393 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -136,7 +136,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 515d37cea..2fe855abd 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -140,7 +140,7 @@ status = "okay"; label = "wan"; mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; }; }; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts index f4d9823cd..c70db4989 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts +++ b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts @@ -45,5 +45,5 @@ &wifi5 { mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <(2)>; + mac-address-increment = <(2)>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts index 58743db6b..55f39db68 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts @@ -78,7 +78,7 @@ }; &wmac { - mtd-mac-address-increment = <(-2)>; + mac-address-increment = <(-2)>; }; &esw { @@ -102,6 +102,6 @@ mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&factory 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts index d76ce34ca..38879d70e 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts @@ -97,6 +97,6 @@ mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts index 4966d56a6..bb13bac8c 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts @@ -97,6 +97,6 @@ mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&factory 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts index 11bf90353..34170547a 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts @@ -95,6 +95,6 @@ mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&rom 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 95addff3c..633950f28 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -138,7 +138,7 @@ mediatek,mtd-eeprom = <&radio 0x0>; mtd-mac-address = <&config 0x2008>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; &pcie { @@ -151,6 +151,6 @@ mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&config 0x2008>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts index 22e15eb7a..300ea3bb2 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts @@ -128,7 +128,7 @@ mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <2>; + mac-address-increment = <2>; }; }; @@ -137,7 +137,7 @@ mediatek,mtd-eeprom = <&radio 0x0>; mtd-mac-address = <&config 0x10008>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; ðernet { diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts index 77a68acf3..d3558547b 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts @@ -93,6 +93,6 @@ mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; mtd-mac-address = <&factory 0xf100>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts index 37797fc36..ff562cbff 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts @@ -36,7 +36,7 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <(-1)>; + mac-address-increment = <(-1)>; }; &esw { diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts index ccf9917da..6bed6f57b 100644 --- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts +++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts @@ -65,7 +65,7 @@ ðernet { status = "okay"; mtd-mac-address = <&factory 0x8004>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; port@0 { phy-handle = <&phy0>; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts index 03e504a6d..b5cae6673 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts @@ -117,5 +117,5 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,5ghz = <0>; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <1>; + mac-address-increment = <1>; }; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts index 95a2bb75f..39fb3d1c7 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts @@ -143,5 +143,5 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,5ghz = <0>; mtd-mac-address = <&factory 0x4>; - mtd-mac-address-increment = <3>; + mac-address-increment = <3>; };