From 06bb4a5018cd84dc4553e71c273e2daae2c996ab Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Fri, 2 Apr 2021 23:50:02 +0200 Subject: [PATCH] ramips: convert mtd-mac-address to nvmem implementation Define nvmem-cells and convert mtd-mac-address to nvmem implementation. The conversion is done with an automated script. Signed-off-by: Ansuel Smith --- .../ramips/dts/mt7620a_aigale_ai-br100.dts | 13 ++++++++- .../dts/mt7620a_alfa-network_ac1200rm.dts | 13 ++++++++- .../dts/mt7620a_alfa-network_r36m-e4g.dts | 13 ++++++++- .../dts/mt7620a_alfa-network_tube-e4g.dts | 13 ++++++++- .../ramips/dts/mt7620a_asus_rt-ac5x.dtsi | 13 ++++++++- .../ramips/dts/mt7620a_bdcom_wap2100-sk.dts | 13 ++++++++- .../ramips/dts/mt7620a_buffalo_whr-1166d.dts | 13 ++++++++- .../ramips/dts/mt7620a_buffalo_whr-300hp2.dts | 13 ++++++++- .../ramips/dts/mt7620a_buffalo_whr-600d.dts | 13 ++++++++- .../linux/ramips/dts/mt7620a_cameo_810.dtsi | 19 ++++++++++--- .../ramips/dts/mt7620a_dlink_dch-m225.dts | 13 ++++++++- .../ramips/dts/mt7620a_dlink_dir-510l.dts | 13 ++++++++- .../ramips/dts/mt7620a_dlink_dwr-118-a1.dts | 13 ++++++++- .../ramips/dts/mt7620a_dlink_dwr-118-a2.dts | 13 ++++++++- .../ramips/dts/mt7620a_dlink_dwr-960.dts | 13 ++++++++- .../dts/mt7620a_edimax_br-6478ac-v2.dts | 13 ++++++++- .../ramips/dts/mt7620a_edimax_ew-7478apc.dts | 13 ++++++++- .../ramips/dts/mt7620a_edimax_ew-747x.dtsi | 13 ++++++++- .../ramips/dts/mt7620a_engenius_esr600.dts | 13 ++++++++- .../linux/ramips/dts/mt7620a_fon_fon2601.dts | 13 ++++++++- .../ramips/dts/mt7620a_glinet_gl-mt300a.dts | 13 ++++++++- .../ramips/dts/mt7620a_glinet_gl-mt300n.dts | 13 ++++++++- .../ramips/dts/mt7620a_glinet_gl-mt750.dts | 13 ++++++++- .../dts/mt7620a_head-weblink_hdrm200.dts | 13 ++++++++- .../ramips/dts/mt7620a_hiwifi_hc5861.dts | 13 ++++++++- .../ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 13 ++++++++- target/linux/ramips/dts/mt7620a_hnet_c108.dts | 13 ++++++++- .../ramips/dts/mt7620a_iodata_wn-ac1167gr.dts | 13 ++++++++- .../ramips/dts/mt7620a_iodata_wn-ac733gr3.dts | 13 ++++++++- target/linux/ramips/dts/mt7620a_iptime.dtsi | 13 ++++++++- .../ramips/dts/mt7620a_kimax_u25awf-h1.dts | 13 ++++++++- .../ramips/dts/mt7620a_lava_lr-25g001.dts | 13 ++++++++- .../ramips/dts/mt7620a_lb-link_bl-w1200.dts | 13 ++++++++- .../ramips/dts/mt7620a_lenovo_newifi-y1.dts | 13 ++++++++- .../ramips/dts/mt7620a_lenovo_newifi-y1s.dts | 13 ++++++++- .../ramips/dts/mt7620a_linksys_e1700.dts | 13 ++++++++- .../dts/mt7620a_microduino_microwrt.dts | 13 ++++++++- .../dts/mt7620a_netgear_ex3x00_ex61xx.dtsi | 13 ++++++++- .../linux/ramips/dts/mt7620a_netis_wf2770.dts | 13 ++++++++- .../ramips/dts/mt7620a_ohyeah_oy-0001.dts | 13 ++++++++- .../linux/ramips/dts/mt7620a_phicomm_k2g.dts | 13 ++++++++- .../ramips/dts/mt7620a_phicomm_psg1208.dts | 13 ++++++++- .../ramips/dts/mt7620a_phicomm_psg1218a.dts | 13 ++++++++- .../ramips/dts/mt7620a_phicomm_psg1218b.dts | 13 ++++++++- .../ramips/dts/mt7620a_planex_cs-qr10.dts | 13 ++++++++- .../ramips/dts/mt7620a_planex_db-wrt01.dts | 13 ++++++++- .../ramips/dts/mt7620a_planex_mzk-750dhp.dts | 13 ++++++++- .../ramips/dts/mt7620a_planex_mzk-ex300np.dts | 13 ++++++++- .../ramips/dts/mt7620a_planex_mzk-ex750np.dts | 13 ++++++++- .../ramips/dts/mt7620a_sanlinking_d240.dts | 13 ++++++++- .../dts/mt7620a_tplink_archer-c2-v1.dts | 19 ++++++++++--- .../dts/mt7620a_tplink_archer-c20-v1.dts | 16 +++++++++-- .../ramips/dts/mt7620a_tplink_archer-c20i.dts | 16 +++++++++-- .../dts/mt7620a_tplink_archer-c50-v1.dts | 16 +++++++++-- .../dts/mt7620a_tplink_archer-mr200.dts | 13 ++++++++- .../ramips/dts/mt7620a_tplink_archer.dtsi | 13 ++++++++- .../ramips/dts/mt7620a_tplink_re2x0-v1.dtsi | 19 ++++++++++--- .../dts/mt7620a_wavlink_wl-wn530hg4.dts | 13 ++++++++- .../ramips/dts/mt7620a_wavlink_wl-wn579x3.dts | 13 ++++++++- .../ramips/dts/mt7620a_xiaomi_miwifi-mini.dts | 13 ++++++++- .../linux/ramips/dts/mt7620a_youku_yk-l1.dtsi | 13 ++++++++- .../linux/ramips/dts/mt7620a_yukai_bocco.dts | 13 ++++++++- .../dts/mt7620a_zbtlink_zbt-ape522ii.dts | 13 ++++++++- .../dts/mt7620a_zbtlink_zbt-we1026.dtsi | 13 ++++++++- target/linux/ramips/dts/mt7620a_zte_q7.dts | 13 ++++++++- .../dts/mt7620a_zyxel_keenetic-viva.dts | 13 ++++++++- .../linux/ramips/dts/mt7620n_asus_rt-n12p.dts | 13 ++++++++- .../linux/ramips/dts/mt7620n_asus_rt-n14u.dts | 13 ++++++++- .../ramips/dts/mt7620n_buffalo_wmr-300.dts | 13 ++++++++- .../ramips/dts/mt7620n_comfast_cf-wr800n.dts | 13 ++++++++- .../ramips/dts/mt7620n_elecom_wrh-300cr.dts | 13 ++++++++- .../linux/ramips/dts/mt7620n_kimax_u35wf.dts | 13 ++++++++- .../ramips/dts/mt7620n_kingston_mlw221.dts | 13 ++++++++- .../ramips/dts/mt7620n_kingston_mlwg2.dts | 13 ++++++++- .../ramips/dts/mt7620n_netgear_n300.dtsi | 13 ++++++++- .../ramips/dts/mt7620n_sunvalley_filehub.dtsi | 13 ++++++++- .../ramips/dts/mt7620n_vonets_var11n-300.dts | 13 ++++++++- .../ramips/dts/mt7620n_wrtnode_wrtnode.dts | 13 ++++++++- .../ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts | 13 ++++++++- .../ramips/dts/mt7620n_zbtlink_zbt-wa05.dts | 13 ++++++++- .../ramips/dts/mt7620n_zbtlink_zbt-we2026.dts | 13 ++++++++- .../dts/mt7620n_zbtlink_zbt-wr8305rt.dts | 13 ++++++++- .../dts/mt7620n_zyxel_keenetic-omni-ii.dts | 13 ++++++++- .../dts/mt7620n_zyxel_keenetic-omni.dts | 13 ++++++++- target/linux/ramips/dts/mt7621_adslr_g7.dts | 16 +++++++++-- .../ramips/dts/mt7621_afoundry_ew1200.dts | 16 +++++++++-- .../dts/mt7621_alfa-network_quad-e4g.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_asiarf_ap7621-001.dts | 13 ++++++++- .../ramips/dts/mt7621_asiarf_ap7621-nv1.dts | 13 ++++++++- .../ramips/dts/mt7621_asiarf_ap7621.dtsi | 13 ++++++++- .../linux/ramips/dts/mt7621_asus_rt-ac57u.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_asus_rt-acx5p.dtsi | 13 ++++++++- .../ramips/dts/mt7621_asus_rt-n56u-b1.dts | 20 ++++++++++++-- .../dts/mt7621_buffalo_wsr-2533dhpl.dts | 13 ++++++++- .../ramips/dts/mt7621_buffalo_wsr-600dhp.dts | 13 ++++++++- .../linux/ramips/dts/mt7621_cudy_wr1300.dts | 22 ++++++++++++--- .../linux/ramips/dts/mt7621_cudy_wr2100.dts | 18 ++++++++++--- .../ramips/dts/mt7621_d-team_newifi-d2.dts | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_d-team_pbr-m1.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_dlink_dir-1960-a1.dts | 16 +++++++++-- .../ramips/dts/mt7621_dlink_dir-2640-a1.dts | 16 +++++++++-- .../ramips/dts/mt7621_dlink_dir-2660-a1.dts | 16 +++++++++-- .../ramips/dts/mt7621_dlink_dir-860l-b1.dts | 13 ++++++++- .../ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_edimax_re23s.dts | 13 ++++++++- .../linux/ramips/dts/mt7621_edimax_rx21s.dtsi | 13 ++++++++- .../dts/mt7621_elecom_wrc-1167ghbk2-s.dts | 23 +++++++++++++--- .../dts/mt7621_elecom_wrc-1167gs2-b.dts | 27 ++++++++++++++++--- .../ramips/dts/mt7621_elecom_wrc-1167gst2.dts | 23 +++++++++++++--- .../ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi | 20 ++++++++++++-- .../ramips/dts/mt7621_firefly_firewrt.dts | 16 +++++++++-- .../ramips/dts/mt7621_gehua_ghl-r-001.dts | 16 +++++++++-- .../ramips/dts/mt7621_glinet_gl-mt1300.dts | 16 +++++++++-- .../linux/ramips/dts/mt7621_gnubee_gb-pc1.dts | 13 ++++++++- .../linux/ramips/dts/mt7621_gnubee_gb-pc2.dts | 13 ++++++++- .../ramips/dts/mt7621_iodata_wn-ax1167gr.dts | 26 ++++++++++++++++-- .../ramips/dts/mt7621_iodata_wn-dx1200gr.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_iodata_wn-gx300gr.dts | 16 +++++++++-- .../ramips/dts/mt7621_iodata_wn-xx-xr.dtsi | 20 ++++++++++++-- .../ramips/dts/mt7621_iodata_wnpr2600g.dts | 13 ++++++++- .../linux/ramips/dts/mt7621_iptime_a6ns-m.dts | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_iptime_a8004t.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_jcg_jhr-ac876m.dts | 20 ++++++++++++-- target/linux/ramips/dts/mt7621_jcg_q20.dts | 20 ++++++++++++-- target/linux/ramips/dts/mt7621_jcg_y2.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_lenovo_newifi-d1.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_linksys_re6500.dts | 13 ++++++++- .../dts/mt7621_mediatek_ap-mt7621a-v60.dts | 16 +++++++++-- .../linux/ramips/dts/mt7621_mqmaker_witi.dts | 22 ++++++++++++--- target/linux/ramips/dts/mt7621_mtc_wr1201.dts | 16 +++++++++-- .../ramips/dts/mt7621_netgear_ex6150.dts | 13 ++++++++- .../dts/mt7621_netgear_sercomm_bzv.dtsi | 16 +++++++++-- .../dts/mt7621_netgear_sercomm_chj.dtsi | 16 +++++++++-- .../ramips/dts/mt7621_netgear_wac104.dts | 13 ++++++++- .../linux/ramips/dts/mt7621_netis_wf2881.dts | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_phicomm_k2p.dts | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_planex_vr500.dts | 20 ++++++++++++-- .../dts/mt7621_samknows_whitebox-v8.dts | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_sercomm_na502.dts | 23 ++++++++++++---- .../dts/mt7621_storylink_sap-g3200u3.dts | 16 +++++++++-- .../dts/mt7621_telco-electronics_x1.dts | 16 +++++++++-- .../ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_thunder_timecloud.dts | 13 ++++++++- .../ramips/dts/mt7621_totolink_a7000r.dts | 16 +++++++++-- .../ramips/dts/mt7621_totolink_x5000r.dts | 20 ++++++++++++-- .../dts/mt7621_tplink_archer-c6u-v1.dts | 26 +++++++++++++----- .../dts/mt7621_tplink_archer-x6-v3.dtsi | 23 ++++++++++++---- .../dts/mt7621_tplink_eap235-wall-v1.dts | 19 ++++++++++--- .../ramips/dts/mt7621_tplink_re350-v1.dts | 19 ++++++++++--- .../ramips/dts/mt7621_tplink_rexx0-v1.dtsi | 19 ++++++++++--- .../dts/mt7621_ubnt_edgerouter-x-sfp.dts | 13 ++++++++- .../ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 25 +++++++++++++---- .../ramips/dts/mt7621_ubnt_unifi-6-lite.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_wavlink_wl-wn531a6.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_wevo_w2914ns-v2.dtsi | 20 ++++++++++++-- .../ramips/dts/mt7621_winstars_ws-wn583a6.dts | 20 ++++++++++++-- .../dts/mt7621_xiaomi_mi-router-3-pro.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_xiaomi_mi-router-3g.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_xiaomi_mi-router-4.dts | 20 ++++++++++++-- .../dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi | 20 ++++++++++++-- .../dts/mt7621_xiaomi_router-ac2100.dtsi | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts | 16 +++++++++-- .../dts/mt7621_xzwifi_creativebox-v1.dts | 16 +++++++++-- .../ramips/dts/mt7621_youhua_wr1200js.dts | 20 ++++++++++++-- .../linux/ramips/dts/mt7621_youku_yk-l2.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_zbtlink_zbt-we1326.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_zbtlink_zbt-we3526.dts | 20 ++++++++++++-- .../ramips/dts/mt7621_zbtlink_zbt-wg2626.dts | 16 +++++++++-- .../ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi | 16 +++++++++-- .../linux/ramips/dts/mt7621_zyxel_nr7101.dts | 13 ++++++++- .../linux/ramips/dts/mt7621_zyxel_wap6805.dts | 13 ++++++++- .../dts/mt7628an_alfa-network_awusfree1.dts | 13 ++++++++- .../ramips/dts/mt7628an_asus_rt-n1x.dtsi | 13 ++++++++- .../linux/ramips/dts/mt7628an_cudy_wr1000.dts | 13 ++++++++- .../ramips/dts/mt7628an_d-team_pbr-d1.dts | 13 ++++++++- .../linux/ramips/dts/mt7628an_duzun_dm06.dts | 13 ++++++++- .../ramips/dts/mt7628an_elecom_wrc-1167fs.dts | 13 ++++++++- .../dts/mt7628an_glinet_gl-mt300n-v2.dts | 13 ++++++++- .../mt7628an_glinet_vixmini_microuter.dtsi | 13 ++++++++- .../dts/mt7628an_hak5_wifi-pineapple-mk7.dts | 13 ++++++++- .../ramips/dts/mt7628an_hilink_hlk-7628n.dts | 13 ++++++++- .../ramips/dts/mt7628an_hilink_hlk-7688a.dts | 13 ++++++++- .../ramips/dts/mt7628an_hiwifi_hc5861b.dts | 13 ++++++++- .../ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi | 13 ++++++++- target/linux/ramips/dts/mt7628an_iptime.dtsi | 13 ++++++++- .../ramips/dts/mt7628an_jotale_js76x8.dtsi | 13 ++++++++- .../mt7628an_mediatek_linkit-smart-7688.dts | 13 ++++++++- .../dts/mt7628an_mercury_mac1200r-v2.dts | 13 ++++++++- .../linux/ramips/dts/mt7628an_minew_g1-c.dts | 13 ++++++++- .../ramips/dts/mt7628an_netgear_r6120.dts | 13 ++++++++- .../ramips/dts/mt7628an_netgear_r6xxx.dtsi | 13 ++++++++- .../ramips/dts/mt7628an_onion_omega2.dtsi | 13 ++++++++- .../dts/mt7628an_rakwireless_rak633.dts | 13 ++++++++- .../ramips/dts/mt7628an_ravpower_rp-wd009.dts | 13 ++++++++- .../ramips/dts/mt7628an_skylab_skw92a.dts | 13 ++++++++- target/linux/ramips/dts/mt7628an_tama_w06.dts | 13 ++++++++- .../ramips/dts/mt7628an_totolink_lr1200.dts | 13 ++++++++- .../dts/mt7628an_tplink_8m-split-uboot.dtsi | 16 +++++++++-- .../linux/ramips/dts/mt7628an_tplink_8m.dtsi | 16 +++++++++-- .../dts/mt7628an_tplink_archer-c20-v4.dts | 13 ++++++++- .../dts/mt7628an_tplink_archer-c20-v5.dts | 13 ++++++++- .../dts/mt7628an_tplink_archer-c50-v3.dts | 13 ++++++++- .../dts/mt7628an_tplink_archer-c50-v4.dts | 13 ++++++++- .../ramips/dts/mt7628an_tplink_re200.dtsi | 19 ++++++++++--- .../ramips/dts/mt7628an_tplink_re305-v1.dts | 19 ++++++++++--- .../dts/mt7628an_tplink_tl-mr3020-v3.dts | 16 +++++++++-- .../dts/mt7628an_tplink_tl-mr6400-v4.dts | 16 +++++++++-- .../dts/mt7628an_tplink_tl-mr6400-v5.dts | 16 +++++++++-- .../dts/mt7628an_tplink_tl-wr802n-v4.dts | 13 ++++++++- .../dts/mt7628an_tplink_tl-wr840n-v5.dts | 16 +++++++++-- .../dts/mt7628an_tplink_tl-wr841n-v14.dts | 16 +++++++++-- .../dts/mt7628an_tplink_tl-wr902ac-v3.dts | 13 ++++++++- .../dts/mt7628an_wavlink_wl-wn570ha1.dts | 13 ++++++++- .../dts/mt7628an_wavlink_wl-wn575a3.dts | 13 ++++++++- .../dts/mt7628an_wavlink_wl-wn577a2.dts | 13 ++++++++- .../dts/mt7628an_wavlink_wl-wn578a2.dts | 13 ++++++++- .../ramips/dts/mt7628an_wiznet_wizfi630s.dts | 13 ++++++++- .../ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi | 13 ++++++++- .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts | 13 ++++++++- .../dts/mt7628an_xiaomi_mi-router-4c.dts | 13 ++++++++- .../dts/mt7628an_xiaomi_miwifi-nano.dts | 13 ++++++++- .../dts/mt7628an_zbtlink_zbt-we1226.dts | 13 ++++++++- .../dts/mt7628an_zyxel_keenetic-extra-ii.dts | 13 ++++++++- .../ramips/dts/rt2880_airlink101_ar670w.dts | 13 ++++++++- .../ramips/dts/rt2880_airlink101_ar725w.dts | 13 ++++++++- .../linux/ramips/dts/rt2880_asus_rt-n15.dts | 13 ++++++++- .../ramips/dts/rt2880_belkin_f5d8235-v1.dts | 13 ++++++++- .../dts/rt2880_buffalo_wli-tx4-ag300n.dts | 13 ++++++++- .../dts/rt2880_buffalo_wzr-agl300nh.dts | 13 ++++++++- .../ramips/dts/rt2880_dlink_dap-1522-a1.dts | 13 ++++++++- .../ramips/dts/rt3050_8devices_carambola.dts | 13 ++++++++- .../dts/rt3050_arcwireless_freestation5.dts | 13 ++++++++- .../ramips/dts/rt3050_asus_rt-g32-b1.dts | 13 ++++++++- .../ramips/dts/rt3050_asus_rt-n10-plus.dts | 13 ++++++++- .../linux/ramips/dts/rt3050_asus_wl-330n.dts | 13 ++++++++- .../ramips/dts/rt3050_asus_wl-330n3g.dts | 13 ++++++++- .../linux/ramips/dts/rt3050_dlink_dcs-930.dts | 13 ++++++++- .../ramips/dts/rt3050_dlink_dir-300-b1.dts | 13 ++++++++- .../ramips/dts/rt3050_dlink_dir-600-b1.dts | 13 ++++++++- .../ramips/dts/rt3050_dlink_dir-620-a1.dts | 13 ++++++++- .../ramips/dts/rt3050_edimax_3g-6200n.dts | 13 ++++++++- .../ramips/dts/rt3050_edimax_3g-6200nl.dts | 13 ++++++++- .../linux/ramips/dts/rt3050_huawei_d105.dts | 13 ++++++++- .../linux/ramips/dts/rt3050_jcg_jhr-n805r.dts | 13 ++++++++- .../linux/ramips/dts/rt3050_netcore_nw718.dts | 13 ++++++++- .../ramips/dts/rt3050_sparklan_wcr-150gn.dts | 13 ++++++++- .../ramips/dts/rt3050_teltonika_rut5xx.dts | 13 ++++++++- .../linux/ramips/dts/rt3050_tenda_w150m.dts | 13 ++++++++- .../dts/rt3050_trendnet_tew-638apb-v2.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_accton_wr6202.dts | 13 ++++++++- .../ramips/dts/rt3052_alfa-network_w502u.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_argus_atp-52b.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_asus_rt-n13u.dts | 13 ++++++++- .../ramips/dts/rt3052_aximcom_mr-102n.dts | 13 ++++++++- .../ramips/dts/rt3052_aztech_hw550-3g.dts | 13 ++++++++- .../ramips/dts/rt3052_belkin_f5d8235-v2.dts | 13 ++++++++- .../ramips/dts/rt3052_buffalo_whr-g300n.dts | 13 ++++++++- .../ramips/dts/rt3052_dlink_dap-1350.dts | 13 ++++++++- .../ramips/dts/rt3052_engenius_esr-9753.dts | 13 ++++++++- .../ramips/dts/rt3052_fon_fonera-20n.dts | 13 ++++++++- .../ramips/dts/rt3052_hauppauge_broadway.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_huawei_hg255d.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_jcg_jhr-n825r.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_jcg_jhr-n926r.dts | 13 ++++++++- .../ramips/dts/rt3052_netgear_wnce2001.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_nexaira_bc2.dts | 13 ++++++++- .../ramips/dts/rt3052_omnima_miniembwifi.dts | 13 ++++++++- .../ramips/dts/rt3052_petatel_psr-680w.dts | 13 ++++++++- .../ramips/dts/rt3052_planex_mzk-w300nh2.dts | 13 ++++++++- .../ramips/dts/rt3052_planex_mzk-wdpr.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_poray_ip2202.dts | 13 ++++++++- .../ramips/dts/rt3052_sitecom_wl-351.dts | 13 ++++++++- .../ramips/dts/rt3052_skyline_sl-r7205.dts | 13 ++++++++- .../linux/ramips/dts/rt3052_tenda_3g300m.dts | 13 ++++++++- .../ramips/dts/rt3052_tenda_w306r-v2.dts | 13 ++++++++- .../dts/rt3052_unbranded_xdx-rn502j.dts | 13 ++++++++- .../ramips/dts/rt3052_upvel_ur-326n4g.dts | 13 ++++++++- .../ramips/dts/rt3052_upvel_ur-336un.dts | 13 ++++++++- .../ramips/dts/rt3052_zyxel_keenetic.dts | 13 ++++++++- .../ramips/dts/rt3052_zyxel_nbg-419n.dts | 13 ++++++++- .../ramips/dts/rt3352_allnet_all5002.dts | 13 ++++++++- .../ramips/dts/rt3352_dlink_dir-615-h1.dts | 13 ++++++++- .../ramips/dts/rt3352_dlink_dir-620-d1.dts | 13 ++++++++- .../linux/ramips/dts/rt3352_zte_mf283plus.dts | 13 ++++++++- .../ramips/dts/rt3352_zyxel_nbg-419n-v2.dts | 13 ++++++++- .../linux/ramips/dts/rt3662_asus_rt-n56u.dts | 13 ++++++++- .../linux/ramips/dts/rt3662_dlink_dir-645.dts | 13 ++++++++- .../ramips/dts/rt3662_edimax_br-6475nd.dts | 13 ++++++++- target/linux/ramips/dts/rt3662_omnima_hpm.dts | 13 ++++++++- .../ramips/dts/rt3883_sitecom_wlr-6000.dts | 13 ++++++++- .../ramips/dts/rt3883_trendnet_tew-691gr.dts | 16 +++++++++-- .../ramips/dts/rt3883_trendnet_tew-692gr.dts | 16 +++++++++-- .../ramips/dts/rt5350_airlive_air3gii.dts | 13 ++++++++- .../ramips/dts/rt5350_allnet_all5003.dts | 13 ++++++++- .../ramips/dts/rt5350_dlink_dcs-930l-b1.dts | 13 ++++++++- .../ramips/dts/rt5350_dlink_dir-300-b7.dts | 13 ++++++++- .../ramips/dts/rt5350_dlink_dir-320-b1.dts | 13 ++++++++- .../ramips/dts/rt5350_dlink_dir-610-a1.dts | 13 ++++++++- .../ramips/dts/rt5350_dlink_dwr-512-b.dts | 16 +++++++++-- .../ramips/dts/rt5350_easyacc_wizard-8800.dts | 13 ++++++++- .../linux/ramips/dts/rt5350_hame_mpr-a1.dts | 13 ++++++++- .../linux/ramips/dts/rt5350_hame_mpr-a2.dts | 13 ++++++++- .../ramips/dts/rt5350_hilink_hlk-rm04.dts | 13 ++++++++- .../ramips/dts/rt5350_hootoo_ht-tm02.dts | 13 ++++++++- .../ramips/dts/rt5350_intenso_memory2move.dts | 13 ++++++++- .../dts/rt5350_olimex_rt5350f-olinuxino.dtsi | 13 ++++++++- .../ramips/dts/rt5350_omnima_miniembplug.dts | 13 ++++++++- .../ramips/dts/rt5350_planex_mzk-dp150n.dts | 13 ++++++++- target/linux/ramips/dts/rt5350_poray_m3.dts | 13 ++++++++- target/linux/ramips/dts/rt5350_poray_x5.dts | 13 ++++++++- target/linux/ramips/dts/rt5350_poray_x8.dts | 13 ++++++++- .../linux/ramips/dts/rt5350_tenda_3g150b.dts | 13 ++++++++- .../ramips/dts/rt5350_trendnet_tew-714tru.dts | 13 ++++++++- .../ramips/dts/rt5350_unbranded_a5-v11.dts | 13 ++++++++- .../ramips/dts/rt5350_wansview_ncs601w.dts | 13 ++++++++- .../ramips/dts/rt5350_wiznet_wizfi630a.dts | 13 ++++++++- .../ramips/dts/rt5350_zorlik_zl5900v2.dts | 13 ++++++++- .../dts/rt5350_zyxel_keenetic-lite-b.dts | 13 ++++++++- .../dts/rt5350_zyxel_keenetic-start.dts | 13 ++++++++- 319 files changed, 4213 insertions(+), 434 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts index ba251c26563..1142746c7af 100644 --- a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts +++ b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts @@ -103,7 +103,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -111,3 +112,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts index 752a940cd86..19b6d5fdfba 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts @@ -55,7 +55,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -148,3 +149,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts index 0991ae84475..09afc018e8d 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts @@ -126,7 +126,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &gpio1 { @@ -209,3 +210,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts index ca58d780f41..a90f9b2775d 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts @@ -103,7 +103,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &gpio1 { @@ -178,3 +179,13 @@ &wmac { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi index 423b4edc6b1..f61843095d5 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi @@ -122,7 +122,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -134,3 +135,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts index fc2b74db2a7..b95a428656e 100644 --- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts +++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts @@ -117,7 +117,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -144,3 +145,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts index 93a09f99c3e..f71545815d6 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -173,3 +174,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts index 95152bc41a2..7c8caa5066b 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -149,3 +150,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts index 226967763bc..d943e3abef7 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -159,3 +160,13 @@ ralink,mtd-eeprom = <&factory 0x8000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index b1a50bb7116..3174b98bbf8 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -127,7 +127,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -141,7 +142,8 @@ pinctrl-0 = <&pa_pins>; ralink,mtd-eeprom = <&factory 0x0>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -153,7 +155,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts index 0c9f56875ec..68b733cade2 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts @@ -168,7 +168,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -176,3 +177,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index 5b8d883dd59..2b8ad2759c4 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -114,7 +114,8 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&config 0xe490>; + nvmem-cells = <&macaddr_config_e490>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe05d>; }; @@ -126,3 +127,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e490: macaddr@e490 { + reg = <0xe490 0x6>; + }; +}; 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 2e755b66205..c63a85dd884 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -142,7 +142,8 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&config 0xe496>; + nvmem-cells = <&macaddr_config_e496>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe083>; @@ -188,3 +189,13 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e496: macaddr@e496 { + reg = <0xe496 0x6>; + }; +}; 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 eec4969ff37..711f9f7c9a3 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -140,7 +140,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0xe4a8>; + nvmem-cells = <&macaddr_config_e4a8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; led { @@ -176,3 +177,13 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <2>; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e4a8: macaddr@e4a8 { + reg = <0xe4a8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index eed57f7f684..e80719a4e78 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -175,7 +175,8 @@ reg = <0x0000 0 0 0 0>; ieee80211-freq-limit = <5000000 6000000>; mediatek,mtd-eeprom = <&config 0xe08e>; - mtd-mac-address = <&config 0xe50e>; + nvmem-cells = <&macaddr_config_e50e>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -186,3 +187,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e50e: macaddr@e50e { + reg = <0xe50e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts index 03a4c96f6ba..cc902888bae 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -132,7 +132,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -204,3 +205,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts index 986b047e477..bc73c197c0d 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts @@ -124,7 +124,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -196,3 +197,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index 6060fd99a65..1d77c27f5f3 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -153,7 +153,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; phy-reset-duration = <30>; @@ -218,3 +219,13 @@ mediatek,2ghz = <0>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index ea895ac6eab..267525a0fce 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -134,7 +134,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&iNIC_rf 0x4>; + nvmem-cells = <&macaddr_iNIC_rf_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -193,3 +194,13 @@ &ohci { status = "okay"; }; + +&iNIC_rf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_iNIC_rf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index 373205e7254..69ddea589b9 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -117,7 +117,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@4 { status = "okay"; @@ -165,3 +166,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts index 545e11a83f7..9c9b3d3bf9f 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts @@ -127,7 +127,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -142,3 +143,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts index 575566c5fa6..70d0827ed2b 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts @@ -118,7 +118,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -133,3 +134,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts index 75823787bfb..9ee19686b76 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts @@ -122,7 +122,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -148,3 +149,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts index 7d807bff4bb..10c9958e0a6 100644 --- a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts +++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts @@ -120,7 +120,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@4 { status = "okay"; @@ -182,3 +183,13 @@ &uart { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts index d77df2158c7..6222efcca52 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts @@ -72,7 +72,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -109,3 +110,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 42a59f285b0..4c24857df1d 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -104,3 +105,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts index 4035139ed16..4c241a84de7 100644 --- a/target/linux/ramips/dts/mt7620a_hnet_c108.dts +++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts @@ -136,7 +136,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -153,3 +154,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts index d59b481a612..5eca06fcb93 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts @@ -139,7 +139,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -210,3 +211,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts index e29431dc8d2..9997e5cecf3 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts @@ -147,7 +147,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -188,3 +189,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_iptime.dtsi b/target/linux/ramips/dts/mt7620a_iptime.dtsi index c7c90ca722c..3e2378aa60b 100644 --- a/target/linux/ramips/dts/mt7620a_iptime.dtsi +++ b/target/linux/ramips/dts/mt7620a_iptime.dtsi @@ -49,7 +49,8 @@ }; ðernet { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &ehci { @@ -84,3 +85,13 @@ ralink,mtd-eeprom = <&uboot 0x1f400>; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts index 218dd7a761d..87e6222c534 100644 --- a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts +++ b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts @@ -96,7 +96,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -109,3 +110,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index 2f882b3b504..1966e4cffd1 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -140,7 +140,8 @@ &pcie0 { mt76x0e@0,0 { reg = <0x0000 0 0 0 0>; - mtd-mac-address = <&config 0xe07e>; + nvmem-cells = <&macaddr_config_e07e>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe08a>; }; @@ -152,3 +153,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e07e: macaddr@e07e { + reg = <0xe07e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts index 9e0b8171633..5368f939a2b 100644 --- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts +++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts @@ -90,7 +90,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -168,3 +169,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts index 2bea987b423..bff117b7295 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts @@ -53,7 +53,18 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts index 0544550bf9d..2b59351bd89 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts @@ -79,7 +79,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; @@ -114,3 +115,13 @@ mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts index c38ea8082ca..862f28e399f 100644 --- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts +++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts @@ -101,7 +101,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -151,3 +152,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts index 4307d51424a..ceecafa0669 100644 --- a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts +++ b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts @@ -80,7 +80,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -95,3 +96,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi index 11e8f7fce6b..6884bf7943a 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi @@ -137,7 +137,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -150,3 +151,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts index f8390488656..2a0e52cee26 100644 --- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts +++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts @@ -99,7 +99,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -162,3 +163,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts index 7dabbed9ba4..a691f4203fe 100644 --- a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts +++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts @@ -98,7 +98,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -118,3 +119,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts index a153520e2f7..fd6cc7f82b0 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts @@ -23,7 +23,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -47,3 +48,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index 27c4ec31dc4..4e123c32bde 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -99,7 +99,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -119,3 +120,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts index d5aa1594981..3a9a57d90b6 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts @@ -14,7 +14,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -23,3 +24,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts index 4143d5e4d61..916479c252e 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts @@ -14,5 +14,16 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts index 3edc41ac0d9..e095401c4e6 100644 --- a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts +++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts @@ -117,7 +117,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -137,3 +138,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts index 8f8f173de3f..7d875c24fcb 100644 --- a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts +++ b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts @@ -89,7 +89,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -97,3 +98,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts index e1c5568ed82..bfa4dac6f1b 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts @@ -109,7 +109,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -128,3 +129,13 @@ mediatek,mtd-eeprom = <&factory 0x8000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts index 5459886a3a6..ab53f678f5c 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts @@ -129,7 +129,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -137,3 +138,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts index 457d4fd552c..6fc95214a29 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts @@ -134,7 +134,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -153,3 +154,13 @@ mediatek,mtd-eeprom = <&factory 0x8000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index 6cff557fcd0..6b1edabc1ab 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -140,7 +140,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -173,3 +174,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; 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 cfd55ea2218..63643927d51 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -130,7 +130,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; port@5 { status = "okay"; @@ -164,7 +165,8 @@ &wmac { ralink,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &ehci { @@ -183,7 +185,18 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; 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 89f48dc7d31..2248da5b102 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -72,11 +72,23 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; &wifi { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index c4fb98c4676..ba9bf1db99a 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -53,10 +53,22 @@ }; &wmac { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &wifi { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; 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 8de87caecc0..db92af7e371 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -72,11 +72,23 @@ pinctrl-names = "default"; pinctrl-0 = <&pa_pins>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-2)>; }; &wifi { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts index 4212a70dc34..1222ff2fcd5 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts @@ -167,7 +167,8 @@ }; ðernet { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &ehci { @@ -192,3 +193,13 @@ mediatek,mtd-eeprom = <&radio 0x8000>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi index d2fb891433c..743d1e8db66 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi @@ -92,7 +92,8 @@ ðernet { pinctrl-names = "default"; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -120,3 +121,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi index 7b3025e8b48..e6d9b8576d9 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi +++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi @@ -72,12 +72,14 @@ }; ðernet { - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -88,8 +90,19 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&uboot 0x1fc00>; + nvmem-cells = <&macaddr_uboot_1fc00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc00: macaddr@1fc00 { + reg = <0x1fc00 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts index 27fd2e2450d..b0522de7d0c 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts @@ -97,7 +97,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -135,3 +136,13 @@ ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts index bfec806c125..ce617198ce9 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts @@ -163,7 +163,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; @@ -209,3 +210,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 11b1aa38d6c..49ef40827b3 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -121,7 +121,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -150,3 +151,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index db9bacefe8d..937a41d54b7 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -105,7 +105,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -125,3 +126,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts index 347c246e2e1..96ef110bdac 100644 --- a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts +++ b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts @@ -136,7 +136,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -144,3 +145,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts index 28ae7c3f98b..6fcda971a69 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts @@ -98,7 +98,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -127,3 +128,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi index 91bbd4a0449..cdbdfbd38c2 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi @@ -87,7 +87,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -100,3 +101,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zte_q7.dts b/target/linux/ramips/dts/mt7620a_zte_q7.dts index 550f750c5a4..c2dc1110082 100644 --- a/target/linux/ramips/dts/mt7620a_zte_q7.dts +++ b/target/linux/ramips/dts/mt7620a_zte_q7.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -111,3 +112,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts index 1a5ff2d0dfc..a79578aa015 100644 --- a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts +++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts @@ -137,7 +137,8 @@ pinctrl-names = "default"; pinctrl-0 = <&rgmii2_pins &mdio_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@4 { status = "okay"; @@ -172,3 +173,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts index 24a8779b27a..be1f9ee0268 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -121,3 +122,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts index ce51ff89b3e..ee68ebb2d27 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts @@ -119,7 +119,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -134,3 +135,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts index 26803c0c2ad..4ecd3204c61 100644 --- a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts +++ b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -110,3 +111,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts index c458f8724f6..b87e5a3530e 100644 --- a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts +++ b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -114,3 +115,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts index 19d2f63694f..9d66b191cb2 100644 --- a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts +++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts @@ -112,7 +112,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -127,3 +128,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts index 7d6d80038c7..14e328842b3 100644 --- a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts +++ b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts @@ -96,7 +96,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -109,3 +110,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts index 1186b83f064..1e8fe0d833e 100644 --- a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts +++ b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -122,3 +123,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts index eba7fabff62..5a30dee05f3 100644 --- a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts +++ b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -122,3 +123,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi index 6f5be57ec77..1fe2cbaabc5 100644 --- a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi +++ b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi @@ -66,7 +66,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -81,3 +82,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi index 20ff2dbd1c3..cd9e6cacce7 100644 --- a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi +++ b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi @@ -123,7 +123,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -136,3 +137,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts index 97ed206f56d..88a968d33b9 100644 --- a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts +++ b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts @@ -75,7 +75,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -90,3 +91,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts index 144591d48a6..4ab1b818108 100644 --- a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts +++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts @@ -76,7 +76,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -91,3 +92,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts index 6d018b9e589..8a3e96ff266 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -114,3 +115,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts index b29c0341405..69d5474bf65 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -122,3 +123,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts index fe1799885a4..7c92f45e7b0 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts @@ -92,7 +92,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -107,3 +108,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts index af3ac4b0096..2ac2415736f 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts @@ -106,7 +106,8 @@ pinctrl-names = "default"; pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -121,3 +122,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts index 4e5c68ef3fc..917a1934bd3 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts @@ -130,7 +130,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "wllll"; }; @@ -146,3 +147,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts index e43f1357dde..9cea6ad667c 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts @@ -130,7 +130,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; }; @@ -146,3 +147,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts index 84c0d3b2828..95f2ac3a20b 100644 --- a/target/linux/ramips/dts/mt7621_adslr_g7.dts +++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts @@ -101,7 +101,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe00c>; + nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -129,7 +130,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe00c>; + nvmem-cells = <&macaddr_factory_e00c>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -141,3 +143,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e00c: macaddr@e00c { + reg = <0xe00c 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index 0a4971d06c8..2ed9f716ab7 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -106,7 +106,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -134,7 +135,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -146,3 +148,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts index e457dfcdbea..8c6fdab04f8 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts @@ -148,7 +148,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -176,7 +177,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -257,3 +259,17 @@ &uartlite3 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts index 0e66057fa59..8af4d2cc082 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts @@ -17,8 +17,19 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts index 4088b8137dc..4900e8db66c 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts @@ -12,7 +12,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -27,3 +28,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi index b011c7ae2ae..bea0b79df5e 100644 --- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi +++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi @@ -100,7 +100,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &state_default { @@ -109,3 +110,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts index 78f5584b4c5..2c6b3f53e6b 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts @@ -130,7 +130,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -138,7 +139,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -169,3 +171,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index b5e8655cb9b..0ccc3c7ecc5 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -131,7 +131,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -169,3 +170,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts index b78e594ffda..63ab424b881 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -140,7 +140,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x8004>; + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -168,7 +169,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -179,3 +181,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index 9244c8368b3..789edca6dfa 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -164,7 +164,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -229,3 +230,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index 7392b1d7c10..5d20b6e28a8 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -173,7 +173,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -208,3 +209,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts index e943c040695..3fd67c967a2 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts @@ -127,7 +127,8 @@ compatible = "pci14c3,7603"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <2400000 2500000>; led { @@ -141,7 +142,8 @@ compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; @@ -153,7 +155,8 @@ }; &gmac0 { - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -181,7 +184,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -193,3 +197,13 @@ function = "gpio"; }; }; + +&bdinfo { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index 692c94da555..21d03322a75 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -78,7 +78,8 @@ }; &gmac0 { - mtd-mac-address = <&bdinfo 0xde00>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -194,8 +195,19 @@ status = "okay"; label = "wan"; - mtd-mac-address = <&bdinfo 0xde00>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_bdinfo_de00>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; }; }; + +&bdinfo { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_de00: macaddr@de00 { + reg = <0xde00 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts index 5622855f487..c04fe9e245d 100644 --- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts +++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts @@ -149,7 +149,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -177,7 +178,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -188,3 +190,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index 2fcdce5f19b..d30e4d19536 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -175,7 +175,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -203,7 +204,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -214,3 +216,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; 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 fd11768ce64..82ba8cf3f70 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts @@ -17,11 +17,23 @@ }; &wifi0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wifi1 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; 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 b19f70f7c95..14a79cef513 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts @@ -24,11 +24,23 @@ }; &wifi0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wifi1 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; 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 a4d72876abc..a90856c0b64 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts @@ -24,11 +24,23 @@ }; &wifi0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; &wifi1 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts index f843f628013..26f142dcffd 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -109,7 +109,8 @@ }; &gmac0 { - mtd-mac-address = <&radio 0x4>; + nvmem-cells = <&macaddr_radio_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -170,3 +171,13 @@ function = "gpio"; }; }; + +&radio { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_radio_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi index a54b2be4f06..a1550cfb401 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -152,7 +152,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -180,7 +181,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -191,3 +193,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts index 9b965734460..1a3181e4e39 100644 --- a/target/linux/ramips/dts/mt7621_edimax_re23s.dts +++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts @@ -137,7 +137,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x8004>; + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -159,3 +160,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi index 3f3bae43f16..f9a6c375c2a 100644 --- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi +++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi @@ -118,7 +118,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -160,3 +161,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; 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 f8ea5dbbbfa..8e87fd06bc6 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -67,7 +67,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -75,7 +76,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -168,7 +170,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0>; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -176,3 +179,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; 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 becd2a9f9de..97e0ab2956e 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts @@ -8,11 +8,13 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xfff4>; + nvmem-cells = <&macaddr_factory_fff4>; + nvmem-cell-names = "mac-address"; }; &wan { - mtd-mac-address = <&factory 0xfffa>; + nvmem-cells = <&macaddr_factory_fffa>; + nvmem-cell-names = "mac-address"; }; &partitions { @@ -48,6 +50,25 @@ }; &wifi { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_fff4: macaddr@fff4 { + reg = <0xfff4 0x6>; + }; + + macaddr_factory_fffa: macaddr@fffa { + reg = <0xfffa 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts index 5cc8ff27f67..dfc58c1ff60 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts @@ -8,11 +8,13 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &wan { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &partitions { @@ -48,6 +50,21 @@ }; &wifi { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi index 642724da10c..547d1b16410 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi @@ -3,11 +3,13 @@ #include "mt7621_elecom_wrc-gs.dtsi" &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &wan { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &state_default { @@ -44,3 +46,17 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index 96893265708..9da515f017b 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -105,7 +105,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -133,7 +134,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -145,3 +147,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; 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 f0152e8db3c..4f652b90bb2 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -107,7 +107,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -130,7 +131,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -142,3 +144,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts index 629a9a24394..8c1d2788c14 100644 --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -115,7 +115,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -134,7 +135,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4000>; + nvmem-cells = <&macaddr_factory_4000>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -149,3 +151,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4000: macaddr@4000 { + reg = <0x4000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index c218521c03c..db760381a45 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -100,7 +100,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -123,3 +124,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index 613524d1da5..a3ef3a01043 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -110,7 +110,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -133,3 +134,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index c549bbb5183..cc6446b75c8 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -128,7 +128,8 @@ }; &gmac0 { - mtd-mac-address = <&iNIC_rf 0x4>; + nvmem-cells = <&macaddr_iNIC_rf_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -136,7 +137,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -191,3 +193,23 @@ &xhci { status = "disabled"; }; + +&iNIC_rf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_iNIC_rf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index 055c1abde0c..b63b4783b8d 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -127,7 +127,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x1e000>; + nvmem-cells = <&macaddr_factory_1e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -135,7 +136,8 @@ wan: port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x1e006>; + nvmem-cells = <&macaddr_factory_1e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -194,3 +196,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1e000: macaddr@1e000 { + reg = <0x1e000 0x6>; + }; + + macaddr_factory_1e006: macaddr@1e006 { + reg = <0x1e006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 91f30f87216..398a84117c1 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -128,7 +128,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -136,7 +137,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -183,3 +185,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi index ff9e525ae28..1dd3d778780 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -118,7 +118,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -126,7 +127,8 @@ wan: port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -165,3 +167,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 0e808f68941..6af6bdce7a7 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -120,7 +120,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -184,3 +185,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts index 4ebd980521f..b3efe557e25 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts @@ -111,7 +111,8 @@ }; &gmac0 { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -119,7 +120,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&uboot 0x1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -165,3 +167,17 @@ ieee80211-freq-limit = <2400000 2500000>; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; + + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index df6aed664e7..a00e921a498 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -95,7 +95,8 @@ }; &gmac0 { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -103,7 +104,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&uboot 0x1fc40>; + nvmem-cells = <&macaddr_uboot_1fc40>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -156,3 +158,17 @@ function = "gpio"; }; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; + + macaddr_uboot_1fc40: macaddr@1fc40 { + reg = <0x1fc40 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index ae312fcc524..da832d6df56 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -129,7 +129,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -156,7 +157,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -167,3 +169,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index f0e829393ce..c9bf648a31a 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -144,7 +144,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x3fff4>; + nvmem-cells = <&macaddr_factory_3fff4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -152,7 +153,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x3fffa>; + nvmem-cells = <&macaddr_factory_3fffa>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -173,3 +175,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; + + macaddr_factory_3fffa: macaddr@3fffa { + reg = <0x3fffa 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts index 06d6579aaa7..5de6ba6d950 100644 --- a/target/linux/ramips/dts/mt7621_jcg_y2.dts +++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts @@ -89,7 +89,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -117,7 +118,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -128,3 +130,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index fa269007204..ddd46befe65 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -132,7 +132,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -150,7 +151,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -161,3 +163,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index 319d0d7fb21..680bc863cd4 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -113,7 +113,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -143,3 +144,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; 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 ec9be40ce40..73dfbef27fc 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -113,7 +113,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x5>; + nvmem-cells = <&macaddr_factory_5>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -141,7 +142,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x5>; + nvmem-cells = <&macaddr_factory_5>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -150,3 +152,13 @@ &pcie { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_5: macaddr@5 { + reg = <0x5 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts index 130193c171c..cb6310df18d 100644 --- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts +++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts @@ -80,7 +80,8 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; }; @@ -89,12 +90,14 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; ieee80211-freq-limit = <2400000 2500000>; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -122,7 +125,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -134,3 +138,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index cfa0e6af241..b1b020b3a85 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -99,7 +99,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -127,7 +128,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -173,3 +175,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 0da8f6b30c7..360bcbb77d4 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -228,7 +228,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -246,3 +247,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 3ed8bc55e95..2be3f878692 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -162,7 +162,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -190,7 +191,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -258,3 +260,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 61cb522dfdb..c2dc9878711 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -96,7 +96,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -124,7 +125,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -186,3 +188,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index fbedeb26450..61ab0574a7d 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -61,7 +61,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &nand { @@ -164,3 +165,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index 7dfd133a441..56a2647638c 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -122,7 +122,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -150,7 +151,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -161,3 +163,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index ec24c713ea9..a5060a1aee2 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -103,7 +103,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -131,7 +132,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -142,3 +144,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 5f8f190a918..fb6a42166f5 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -75,7 +75,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -103,7 +104,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -114,3 +116,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index 9561c97b7e6..929c2a8f265 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -106,7 +106,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -134,7 +135,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -145,3 +147,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index af55d1058f6..ee77e303624 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -96,7 +96,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &nand { @@ -170,8 +171,9 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -181,8 +183,9 @@ compatible = "mediatek,mt76"; reg = <0x0 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; - mtd-mac-address = <&factory 0xe000>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -210,3 +213,13 @@ &uartlite3 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 6ecf71895c3..19eb11111db 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -102,7 +102,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -130,7 +131,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -142,3 +144,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index 0386a3cdd22..51c1d868cbd 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -121,7 +121,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -149,7 +150,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -186,3 +188,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts index ef0d48b8c4a..6e5f5772be9 100644 --- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts +++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts @@ -109,7 +109,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -117,7 +118,8 @@ wan_port: port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -194,3 +196,17 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts index fe11f4f4870..917a6beb512 100644 --- a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts +++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts @@ -94,7 +94,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -112,3 +113,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts index 4b53e60cd58..e817278728f 100644 --- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts @@ -100,7 +100,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -128,7 +129,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -140,3 +142,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts index ef491087ef1..8066340c5de 100644 --- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts +++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts @@ -97,7 +97,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -125,7 +126,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -136,3 +138,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts index 7d38b7b0968..93ceeb08f4c 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -145,7 +145,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -155,8 +156,9 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <(-1)>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(-1)>; ieee80211-freq-limit = <5000000 6000000>; }; }; @@ -167,7 +169,8 @@ }; &gmac0 { - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -175,8 +178,9 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; }; port@1 { @@ -211,3 +215,13 @@ &xhci { vbus-supply = <®_usb_vbus>; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index 76d9908fb94..3cc738530cc 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -134,8 +134,9 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <1>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -145,14 +146,16 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x8>; - mtd-mac-address-increment = <2>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; &gmac0 { - mtd-mac-address = <&config 0x8>; + nvmem-cells = <&macaddr_config_8>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -183,3 +186,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; 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 cf63e6b989a..b40448791ab 100644 --- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts @@ -137,7 +137,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; }; @@ -146,13 +147,15 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; &gmac0 { - mtd-mac-address = <&info 0x8>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -178,3 +181,13 @@ }; }; }; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 0a810b0195b..3df4bc5d64f 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -130,7 +130,8 @@ mt76@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -140,13 +141,15 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; &gmac0 { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -164,3 +167,13 @@ function = "gpio"; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 0ec83fa389b..6cb6c0e460b 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -148,7 +148,8 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; ieee80211-freq-limit = <2400000 2500000>; }; @@ -159,14 +160,16 @@ compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; ieee80211-freq-limit = <5000000 6000000>; }; }; &gmac0 { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -177,3 +180,13 @@ }; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; +}; 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 536180be104..8f97ba3353a 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts @@ -66,8 +66,19 @@ label = "eth5"; phy-handle = <&ephy7>; phy-mode = "rgmii-rxid"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <5>; }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_22: macaddr@22 { + reg = <0x22 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index b92dc8f3f06..e968c4e6850 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -20,7 +20,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; label = "dsa"; }; @@ -34,28 +35,32 @@ port@1 { status = "okay"; label = "eth1"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; port@2 { status = "okay"; label = "eth2"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; port@3 { status = "okay"; label = "eth3"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <3>; }; port@4 { status = "okay"; label = "eth4"; - mtd-mac-address = <&factory 0x22>; + nvmem-cells = <&macaddr_factory_22>; + nvmem-cell-names = "mac-address"; mac-address-increment = <4>; }; }; @@ -141,3 +146,13 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_22: macaddr@22 { + reg = <0x22 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts index d374fd3ddea..1265a921232 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts @@ -74,11 +74,27 @@ }; &wlan_2g { - mtd-mac-address = <&eeprom 0x0>; + nvmem-cells = <&macaddr_eeprom_0>; + nvmem-cell-names = "mac-address"; }; &wlan_5g { mediatek,mtd-eeprom = <&factory 0x20000>; - mtd-mac-address = <&eeprom 0x6>; + nvmem-cells = <&macaddr_eeprom_6>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <5000000 6000000>; }; + +&eeprom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_eeprom_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_eeprom_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts index 04f656d0f6c..252ade4854f 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts @@ -138,7 +138,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -166,7 +167,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -181,3 +183,17 @@ &uartlite2 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index ffa86a4810b..06b301ba0be 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -98,7 +98,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -125,7 +126,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -136,3 +138,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index 803bf5cf240..af6181b6d01 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -119,7 +119,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -127,7 +128,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -147,3 +149,17 @@ &xhci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts index e8f3a50dbec..e9bd6e1cab3 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts @@ -176,7 +176,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -199,7 +200,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -210,3 +212,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts index 40ea6625d4a..1a19579208b 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts @@ -86,7 +86,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -94,7 +95,8 @@ port@1 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; port@2 { @@ -115,3 +117,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts index 18cbe0c013f..67a44dad117 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -65,7 +65,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -83,7 +84,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -94,3 +96,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi index cc5abf09b6b..4c469a2836f 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi @@ -131,7 +131,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -149,7 +150,8 @@ wan: port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -160,3 +162,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi index 7e6b3afcdf0..7faf9b3e89a 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi +++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi @@ -25,7 +25,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -33,7 +34,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@2 { @@ -59,3 +61,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts index ee1a452fa99..c1f10ac55ea 100644 --- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts +++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts @@ -85,7 +85,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -113,7 +114,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -125,3 +127,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index afee235ac7d..6e04f9a4934 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -153,7 +153,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -181,7 +182,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -193,3 +195,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index a77d13c71c1..6813a2cf05c 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -125,7 +125,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -133,7 +134,8 @@ port@0 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; port@1 { @@ -164,3 +166,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 627188873d0..19ba7c08de3 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -133,7 +133,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -161,7 +162,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -172,3 +174,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index cd71166f4d8..80166158b29 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -74,7 +74,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -102,7 +103,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -130,3 +132,17 @@ &sdhci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index 10e08cd3d05..b156b12fc8e 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -96,7 +96,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -124,7 +125,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe006>; + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; }; }; }; @@ -135,3 +137,17 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index b1fbf539313..e33fac8db10 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -107,7 +107,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -135,7 +136,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -147,3 +149,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 2fe855abd55..87f9e2243c8 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -111,7 +111,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -139,7 +140,8 @@ port@4 { status = "okay"; label = "wan"; - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; }; @@ -151,3 +153,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts index ef3306caa7a..2a0bc6f8fd0 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts @@ -144,7 +144,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &switch0 { @@ -162,3 +163,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts index 0596dc71d67..a4672366409 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts @@ -128,7 +128,8 @@ }; &gmac0 { - mtd-mac-address = <&factory 0xe000>; + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; }; &gmac1 { @@ -171,3 +172,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts index d4f6a093d42..2e01b974a8a 100644 --- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts +++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts @@ -58,7 +58,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &ohci { @@ -130,3 +131,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi index 239bb08230c..3a2de12f6a8 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi @@ -90,7 +90,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -119,3 +120,13 @@ &ohci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts index adc99886000..5a2962a3155 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts @@ -134,9 +134,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts index e5c52322b66..5a0aeaf5f25 100644 --- a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts +++ b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts @@ -152,10 +152,21 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &sdhci { status = "okay"; mediatek,cd-high; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts index f0d3dcb62ad..b9a105b0e3b 100644 --- a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts +++ b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts @@ -66,7 +66,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -129,3 +130,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts index aa60b8a2c66..e4b5f31ada8 100644 --- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -132,7 +132,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &ohci { @@ -162,3 +163,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts index c5e0c2e02b2..e0445c61dd0 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts @@ -81,7 +81,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -131,3 +132,13 @@ &uart1 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi index 738968d1f9f..6e3f64632dd 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi +++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi @@ -53,7 +53,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -102,3 +103,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts index 2ef04229255..945f6806189 100644 --- a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts +++ b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts @@ -116,9 +116,20 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts index 87dff72c401..97acb3ff3f5 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts @@ -82,9 +82,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts index 969488e4167..8e07dff0f14 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts @@ -103,7 +103,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -113,3 +114,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts index 326c412b0e2..08bdcd73ada 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts @@ -43,7 +43,8 @@ wifi@0,0 { reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; ieee80211-freq-limit = <5000000 6000000>; led { @@ -52,3 +53,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi index 7bd394c3464..dcdf0cddc77 100644 --- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi +++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi @@ -90,9 +90,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_iptime.dtsi b/target/linux/ramips/dts/mt7628an_iptime.dtsi index 8a33c37f7aa..bc8965ca277 100644 --- a/target/linux/ramips/dts/mt7628an_iptime.dtsi +++ b/target/linux/ramips/dts/mt7628an_iptime.dtsi @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&uboot 0x1fc20>; + nvmem-cells = <&macaddr_uboot_1fc20>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -104,3 +105,13 @@ &wmac { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_1fc20: macaddr@1fc20 { + reg = <0x1fc20 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi index 3fd173914e9..8e73767dc28 100644 --- a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi +++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi @@ -112,7 +112,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &sdhci { @@ -123,3 +124,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts index cbec8c9d406..7beda75806e 100644 --- a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts +++ b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts @@ -147,7 +147,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &sdhci { @@ -158,3 +159,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts index 7aa678a1adb..f79d2d2641d 100644 --- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts +++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts @@ -75,7 +75,8 @@ ðernet { pinctrl-names = "default"; - mtd-mac-address = <&factory 0xd>; + nvmem-cells = <&macaddr_factory_d>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -98,3 +99,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_d: macaddr@d { + reg = <0xd 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts index 12cf47f5a79..e741d2182c0 100644 --- a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts +++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts @@ -125,7 +125,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -140,3 +141,13 @@ status = "okay"; mediatek,cd-high; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts index c70db4989bd..02a22b7495d 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts +++ b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts @@ -44,6 +44,17 @@ }; &wifi5 { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(2)>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index c3d7da2f090..f811466c16f 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &pcie { @@ -113,3 +114,13 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi index b6d2df47563..d4de7fe6a47 100644 --- a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi +++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi @@ -152,7 +152,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &sdhci { @@ -163,3 +164,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts index 63c4901ec25..bf5fbcc64ef 100644 --- a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts +++ b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts @@ -87,9 +87,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index 859568b1c12..4775f8f0762 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -185,5 +185,16 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts index 6e1cb396b89..4ceccde06d5 100644 --- a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts +++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts @@ -47,7 +47,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { @@ -97,3 +98,13 @@ &uart1 { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts index 2be5f3fc889..def722832da 100644 --- a/target/linux/ramips/dts/mt7628an_tama_w06.dts +++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts @@ -38,7 +38,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &state_default { @@ -97,3 +98,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts index ab5fdd32469..ef60f010023 100644 --- a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts +++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts @@ -110,7 +110,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &spi0 { @@ -152,3 +153,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi index b6ce7b1f562..bbd66e113cc 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi @@ -74,14 +74,26 @@ &wmac { status = "okay"; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mediatek,mtd-eeprom = <&radio 0x0>; }; ðernet { - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x3e>; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi index 2faf8a87fe0..8372f057cd6 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi @@ -55,10 +55,22 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mediatek,mtd-eeprom = <&factory 0x20000>; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; 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 55f39db6804..c2c6e922b76 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts @@ -101,7 +101,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; 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 38879d70e69..4f5faf2ee0c 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts @@ -96,7 +96,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; 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 bb13bac8c8e..8fc2334ae26 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts @@ -96,7 +96,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; 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 34170547a4e..2a6963ab1cb 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts @@ -94,7 +94,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&rom 0xf100>; + nvmem-cells = <&macaddr_rom_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&rom { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_rom_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 633950f287f..d221a5c7c88 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -130,14 +130,16 @@ }; ðernet { - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; }; &wmac { status = "okay"; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; @@ -150,7 +152,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x2008>; + nvmem-cells = <&macaddr_config_2008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_2008: macaddr@2008 { + reg = <0x2008 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts index 300ea3bb297..6ac3730194a 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts @@ -127,7 +127,8 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&radio 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <2>; }; }; @@ -136,10 +137,22 @@ status = "okay"; mediatek,mtd-eeprom = <&radio 0x0>; - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; ðernet { - mtd-mac-address = <&config 0x10008>; + nvmem-cells = <&macaddr_config_10008>; + nvmem-cell-names = "mac-address"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_10008: macaddr@10008 { + reg = <0x10008 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts index 5bc12758d4e..496f8db2ca0 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts @@ -123,10 +123,22 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mediatek,mtd-eeprom = <&factory 0x20000>; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts index a142be78703..1dfb89d5285 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts @@ -83,9 +83,21 @@ }; &wmac { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1f100: macaddr@1f100 { + reg = <0x1f100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts index 7ab19632e8c..408f12aeaed 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts @@ -83,9 +83,21 @@ }; &wmac { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0x1f100>; + nvmem-cells = <&macaddr_factory_1f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_1f100: macaddr@1f100 { + reg = <0x1f100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts index bce34045c6e..2141abc4423 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts @@ -49,5 +49,16 @@ }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; +}; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts index 1f8f7f4babc..ad65152a95f 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts @@ -88,11 +88,13 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -105,3 +107,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts index a1a83bf2377..9f1d6670705 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -100,11 +100,13 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; ðernet { - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -125,3 +127,13 @@ output-high; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; 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 d3558547b8e..fe10600cb91 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts @@ -92,7 +92,18 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0xf100>; + nvmem-cells = <&macaddr_factory_f100>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_f100: macaddr@f100 { + reg = <0xf100 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts index 9cea8b43f3b..eb74c2ae511 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts @@ -117,9 +117,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts index d6d418f1b9f..b12e1f71066 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts @@ -112,9 +112,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts index b5f8ff03a80..5e19e331c88 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts @@ -116,7 +116,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -134,3 +135,13 @@ &ohci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts index d7238e17c68..96633c062ed 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts @@ -146,7 +146,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -164,3 +165,13 @@ &ohci { status = "disabled"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts index 12466512044..a25f4d8d285 100644 --- a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts +++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts @@ -143,7 +143,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -159,3 +160,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi index a3330fb2ebd..7158101ab70 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi @@ -70,7 +70,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -88,3 +89,13 @@ &wmac { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; 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 ff562cbff40..626b36366d8 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 @@ -35,7 +35,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <(-1)>; }; @@ -43,3 +44,13 @@ mediatek,portmap = <0x3e>; mediatek,portdisable = <0x2a>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts index 4389a9daf4c..e3aae273a9a 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts @@ -38,10 +38,21 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x3d>; mediatek,portdisable = <0x29>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts index ae6a72ebc3f..37f409eee9f 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts @@ -74,7 +74,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &spi0 { @@ -115,3 +116,13 @@ }; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts index ac2a01eabaf..fef199ac34a 100644 --- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts +++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts @@ -105,9 +105,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { mediatek,portmap = <0x2f>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts index 5e92cd21261..f3650dc6ae7 100644 --- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts +++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts @@ -168,7 +168,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -197,3 +198,13 @@ function = "gpio"; }; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts index 9d78ca142c3..52d56466106 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts @@ -85,7 +85,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x2004>; + nvmem-cells = <&macaddr_factory_2004>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -106,3 +107,13 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x2000>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2004: macaddr@2004 { + reg = <0x2004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts index 7038fc6590b..bb3795aafac 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts @@ -95,7 +95,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -116,3 +117,13 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts index 4b832faaf1b..3bf3e21a470 100644 --- a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts +++ b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts @@ -95,7 +95,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -114,3 +115,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts index cbaa3e832f6..59cc965f23d 100644 --- a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts +++ b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts @@ -196,7 +196,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -235,3 +236,13 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts index a1f10ae45da..1bab37fc5ea 100644 --- a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts +++ b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts @@ -98,7 +98,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <100 1 1 1>; @@ -117,3 +118,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts index cd9e918404f..b3ada11220a 100644 --- a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts +++ b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts @@ -116,7 +116,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -139,3 +140,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts index 3de9dc755c7..ff714d12730 100644 --- a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts +++ b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts @@ -120,7 +120,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x2004>; + nvmem-cells = <&macaddr_factory_2004>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -139,3 +140,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x2000>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2004: macaddr@2004 { + reg = <0x2004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_8devices_carambola.dts b/target/linux/ramips/dts/rt3050_8devices_carambola.dts index 4ad23ff26da..820bbd3e99e 100644 --- a/target/linux/ramips/dts/rt3050_8devices_carambola.dts +++ b/target/linux/ramips/dts/rt3050_8devices_carambola.dts @@ -63,7 +63,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -77,3 +78,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts index 44b2ad4185e..036d3105610 100644 --- a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts +++ b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts index 0baa2feac94..0d4d8f4cfd5 100644 --- a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts +++ b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts @@ -73,7 +73,8 @@ }; ðernet { - mtd-mac-address = <&devconf 0x4>; + nvmem-cells = <&macaddr_devconf_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -83,3 +84,13 @@ &wmac { ralink,mtd-eeprom = <&devconf 0x0>; }; + +&devconf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devconf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts index 5c1975595fe..af6ebf00628 100644 --- a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts +++ b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts @@ -79,7 +79,8 @@ }; ðernet { - mtd-mac-address = <&devconf 0x4>; + nvmem-cells = <&macaddr_devconf_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -89,3 +90,13 @@ &wmac { ralink,mtd-eeprom = <&devconf 0x0>; }; + +&devconf { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devconf_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts index cc6cd382460..2202cf3127d 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -104,3 +105,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts index c2513c5dd53..4b9add1fda5 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -113,3 +114,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts index ff01fe2709b..6620b1e8584 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts @@ -96,7 +96,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -110,3 +111,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts index 7699dcaabbf..e1397d92f91 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x4004>; + nvmem-cells = <&macaddr_devdata_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -116,3 +117,13 @@ &wmac { ralink,mtd-eeprom = <&devdata 0x4000>; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts index 21f0a73212e..b0f734e4e06 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x4004>; + nvmem-cells = <&macaddr_devdata_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -116,3 +117,13 @@ &wmac { ralink,mtd-eeprom = <&devdata 0x4000>; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts index c134803f670..4580a070633 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -125,3 +126,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts index 07ff8bc9bc4..c8f3951384d 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts @@ -107,7 +107,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -121,3 +122,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts index f339b7ebe8b..3767afb4527 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_huawei_d105.dts b/target/linux/ramips/dts/rt3050_huawei_d105.dts index 2784b0c580c..05d3847e71e 100644 --- a/target/linux/ramips/dts/rt3050_huawei_d105.dts +++ b/target/linux/ramips/dts/rt3050_huawei_d105.dts @@ -87,7 +87,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts index 581edc6dfcd..f449b0d0f80 100644 --- a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts +++ b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -93,3 +94,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_netcore_nw718.dts b/target/linux/ramips/dts/rt3050_netcore_nw718.dts index 124a2ba13cd..f9fda94ec0d 100644 --- a/target/linux/ramips/dts/rt3050_netcore_nw718.dts +++ b/target/linux/ramips/dts/rt3050_netcore_nw718.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -115,3 +116,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts index e4574919061..c00feb42889 100644 --- a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts +++ b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts @@ -93,7 +93,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -107,3 +108,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts index 742edbb11da..cfdb4d6b4b7 100644 --- a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts +++ b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -97,3 +98,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_tenda_w150m.dts b/target/linux/ramips/dts/rt3050_tenda_w150m.dts index 2826993a9a4..b921b7d1788 100644 --- a/target/linux/ramips/dts/rt3050_tenda_w150m.dts +++ b/target/linux/ramips/dts/rt3050_tenda_w150m.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -121,3 +122,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts index 7df592bebd1..36171ae591c 100644 --- a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts +++ b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts index fac721cd768..a1c179c286b 100644 --- a/target/linux/ramips/dts/rt3052_accton_wr6202.dts +++ b/target/linux/ramips/dts/rt3052_accton_wr6202.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -113,3 +114,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts index d88df8ca25b..97b37706fbd 100644 --- a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts +++ b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts @@ -97,7 +97,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -111,3 +112,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts index 39afaa582e1..dffa5beefa7 100644 --- a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts +++ b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts @@ -89,7 +89,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -103,3 +104,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts index a67a839dcce..cbd586232e0 100644 --- a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts +++ b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -105,3 +106,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts index 2d5f07746f6..ada957fc528 100644 --- a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts +++ b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts @@ -108,7 +108,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts index f58a519b117..c547c9df69a 100644 --- a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts +++ b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts @@ -109,7 +109,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts index a9db2882f3b..444a5af4f53 100644 --- a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts +++ b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts @@ -115,7 +115,8 @@ }; ðernet { - mtd-mac-address = <&uboot 0x40004>; + nvmem-cells = <&macaddr_uboot_40004>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; }; @@ -140,3 +141,13 @@ &otg { status = "okay"; }; + +&uboot { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_uboot_40004: macaddr@40004 { + reg = <0x40004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts index ca6259d3039..5d61c757754 100644 --- a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts +++ b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts @@ -113,7 +113,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts index a2584e005e2..e33a7ef5b5e 100644 --- a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts +++ b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts @@ -118,7 +118,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x2e>; + nvmem-cells = <&macaddr_devdata_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -132,3 +133,13 @@ &otg { status = "okay"; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts index 4566e7a1668..4501a44c41f 100644 --- a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts +++ b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts index 9d89c6e2f9a..b9fb232aa12 100644 --- a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts +++ b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts @@ -99,7 +99,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -151,3 +152,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts index 6734f5b3369..9d5d4ceb1e9 100644 --- a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts +++ b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts @@ -80,7 +80,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -94,3 +95,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts index 92ea59bc4c6..1cb19d01846 100644 --- a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts +++ b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts @@ -125,7 +125,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -139,3 +140,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts index 7b71af402fa..0641a4e7968 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts @@ -78,7 +78,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -88,3 +89,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts index 543144394f8..6573159985e 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts @@ -124,7 +124,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x2e>; + nvmem-cells = <&macaddr_factory_2e>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -134,3 +135,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_2e: macaddr@2e { + reg = <0x2e 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts index e5d70bd803f..c65fc100d8c 100644 --- a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts +++ b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts @@ -137,9 +137,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts index d3d5afe64b3..c72d9372a54 100644 --- a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts +++ b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts @@ -75,7 +75,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -89,3 +90,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts index bc3dd5ee56b..4399467b290 100644 --- a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts +++ b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -99,3 +100,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts index b17097cb459..ec46584381c 100644 --- a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts +++ b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts @@ -84,7 +84,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -98,3 +99,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts index ff199f890b2..779443e70e2 100644 --- a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts +++ b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts @@ -108,7 +108,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -118,3 +119,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts index 7f660d61d5e..7e6d47cc021 100644 --- a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts +++ b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts @@ -73,7 +73,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -87,3 +88,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_poray_ip2202.dts b/target/linux/ramips/dts/rt3052_poray_ip2202.dts index f3dab80073c..2f340c4c310 100644 --- a/target/linux/ramips/dts/rt3052_poray_ip2202.dts +++ b/target/linux/ramips/dts/rt3052_poray_ip2202.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -95,3 +96,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts index f4aa24ec5a2..13f1ae4e59d 100644 --- a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts +++ b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts @@ -102,7 +102,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; }; @@ -127,3 +128,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts index 89e6c9ed710..c897aac7c49 100644 --- a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts +++ b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts @@ -86,7 +86,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -100,3 +101,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts index dcebe64af42..4ae42d71a58 100644 --- a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts +++ b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts @@ -116,7 +116,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -130,3 +131,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts index f6c1b2d2b5a..8a60184959f 100644 --- a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts +++ b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -95,3 +96,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts index d94da950293..1067e5cf8b2 100644 --- a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts +++ b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts @@ -85,7 +85,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -99,3 +100,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts index fc71437b48d..211db1cbaba 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4004>; + nvmem-cells = <&macaddr_factory_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -120,3 +121,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts index 2c00ca89456..735f59f0670 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4004>; + nvmem-cells = <&macaddr_factory_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -120,3 +121,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts index 6c65d34f166..c2f44ee5653 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -119,3 +120,13 @@ &otg { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts index db4f8d4a31f..c5990977dc5 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_allnet_all5002.dts b/target/linux/ramips/dts/rt3352_allnet_all5002.dts index 3aa132a727b..28c677041a5 100644 --- a/target/linux/ramips/dts/rt3352_allnet_all5002.dts +++ b/target/linux/ramips/dts/rt3352_allnet_all5002.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -109,3 +110,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts index 2233c9018c8..01393c2383b 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins &mdio_pins>; }; @@ -123,3 +124,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts index 50b762ce5a5..bb362790164 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts @@ -88,7 +88,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins &mdio_pins>; }; @@ -108,3 +109,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts index a91d0e6ea90..b733d68586e 100644 --- a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts +++ b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -129,3 +130,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts index 84bb645c5af..8b7c47e88b5 100644 --- a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts +++ b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -123,3 +124,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts index 98426b86f06..38191d2643a 100644 --- a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts +++ b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts @@ -111,7 +111,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -145,3 +146,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts index 23313759c79..b02c6b692af 100644 --- a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts +++ b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts @@ -127,7 +127,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 0>; @@ -146,3 +147,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts index 56d9dc08948..fc3a5549f20 100644 --- a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts +++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts @@ -139,7 +139,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&devdata 0xd>; + nvmem-cells = <&macaddr_devdata_d>; + nvmem-cell-names = "mac-address"; port@0 { mediatek,fixed-link = <1000 1 1 1>; @@ -173,3 +174,13 @@ &ohci { status = "okay"; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_d: macaddr@d { + reg = <0xd 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_omnima_hpm.dts b/target/linux/ramips/dts/rt3662_omnima_hpm.dts index c0f30ec6c77..84ca468e3d2 100644 --- a/target/linux/ramips/dts/rt3662_omnima_hpm.dts +++ b/target/linux/ramips/dts/rt3662_omnima_hpm.dts @@ -134,7 +134,8 @@ ðernet { phy-handle = <&phy0>; phy-mode = "rgmii"; - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; mdio-bus { status = "okay"; @@ -156,3 +157,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts index 6bed6f57bcc..fc437c1f62c 100644 --- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts +++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts @@ -64,7 +64,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x8004>; + nvmem-cells = <&macaddr_factory_8004>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; port@0 { @@ -180,3 +181,13 @@ &ohci { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_8004: macaddr@8004 { + reg = <0x8004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts index b5cae66732e..fe503289a3d 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -116,6 +117,17 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; ralink,5ghz = <0>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts index 39fb3d1c78d..26c8dfe2f29 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts @@ -95,7 +95,8 @@ ðernet { status = "okay"; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; port@0 { phy-handle = <&phy0>; @@ -142,6 +143,17 @@ status = "okay"; ralink,mtd-eeprom = <&factory 0x0>; ralink,5ghz = <0>; - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; mac-address-increment = <3>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts index 0a62c755e60..0082af958dc 100644 --- a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts +++ b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -93,3 +94,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_allnet_all5003.dts b/target/linux/ramips/dts/rt5350_allnet_all5003.dts index 96dde0fbf1c..e4e0ef1b62a 100644 --- a/target/linux/ramips/dts/rt5350_allnet_all5003.dts +++ b/target/linux/ramips/dts/rt5350_allnet_all5003.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -101,3 +102,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts index 58a84073015..5b504bea650 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -104,3 +105,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts index bcc02f3cda3..62c68a3fc2a 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -107,3 +108,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts index 7d9bb0e359e..5c5517ccb29 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts @@ -116,7 +116,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -127,3 +128,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts index 5bd87190a54..261346ce867 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts @@ -94,7 +94,8 @@ }; ðernet { - mtd-mac-address = <&devdata 0x4004>; + nvmem-cells = <&macaddr_devdata_4004>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&devdata 0x4000>; }; + +&devdata { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_devdata_4004: macaddr@4004 { + reg = <0x4004 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts index 48fb1d4ffd2..a7fc4765b76 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts @@ -135,11 +135,23 @@ }; ðernet { - mtd-mac-address = <&config 0xe07e>; + nvmem-cells = <&macaddr_config_e07e>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&config 0xe08a>; ralink,led-polarity = <1>; - mtd-mac-address = <&config 0xe07e>; + nvmem-cells = <&macaddr_config_e07e>; + nvmem-cell-names = "mac-address"; +}; + +&config { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_e07e: macaddr@e07e { + reg = <0xe07e 0x6>; + }; }; diff --git a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts index 3b1fdd4a8ef..1b80382f681 100644 --- a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts +++ b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts @@ -53,7 +53,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -63,3 +64,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts index 1386ec920b2..a246c22c215 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -115,3 +116,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts index f9365d5700d..710fd2d6be2 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts @@ -105,7 +105,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -116,3 +117,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts index 83b1fb2a6d0..7dc56673a04 100644 --- a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts +++ b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts @@ -103,9 +103,20 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts index 543fda74b72..387e4adfdc1 100644 --- a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts +++ b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -106,3 +107,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts index 8ab2a87304d..8df91594b7e 100644 --- a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts +++ b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts @@ -98,7 +98,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -108,3 +109,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi index 8a8e5a92e13..2d5d86ee1bc 100644 --- a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi +++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi @@ -60,7 +60,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -80,3 +81,13 @@ &uart { status = "okay"; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts index 499b555da41..0e69cf8919c 100644 --- a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts +++ b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -111,3 +112,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts index d3d1ebe26fc..89a774a060a 100644 --- a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts +++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts @@ -91,7 +91,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -102,3 +103,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_poray_m3.dts b/target/linux/ramips/dts/rt5350_poray_m3.dts index b6bad0ab778..f02e7b024d3 100644 --- a/target/linux/ramips/dts/rt5350_poray_m3.dts +++ b/target/linux/ramips/dts/rt5350_poray_m3.dts @@ -90,7 +90,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -102,3 +103,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_poray_x5.dts b/target/linux/ramips/dts/rt5350_poray_x5.dts index 9c00da82ed1..20e2a5257fa 100644 --- a/target/linux/ramips/dts/rt5350_poray_x5.dts +++ b/target/linux/ramips/dts/rt5350_poray_x5.dts @@ -122,7 +122,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -134,3 +135,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_poray_x8.dts b/target/linux/ramips/dts/rt5350_poray_x8.dts index b60bb99ee91..e84f28f783c 100644 --- a/target/linux/ramips/dts/rt5350_poray_x8.dts +++ b/target/linux/ramips/dts/rt5350_poray_x8.dts @@ -83,7 +83,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -95,3 +96,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts index 35ccee15848..19b6d78009e 100644 --- a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts +++ b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts @@ -101,7 +101,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -112,3 +113,13 @@ ralink,mtd-eeprom = <&factory 0x0>; ralink,led-polarity = <1>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts index 13d1a16741c..a03f33f3fc1 100644 --- a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts +++ b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts @@ -104,7 +104,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -115,3 +116,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts index 089b85629b9..502ac60211b 100644 --- a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts +++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts @@ -106,7 +106,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -117,3 +118,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts index adb4034e8a5..911e3e44edf 100644 --- a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts +++ b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts @@ -53,7 +53,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -63,3 +64,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts index 2cb61011843..12d41e305e5 100644 --- a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts +++ b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts @@ -130,7 +130,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -140,3 +141,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts index 0879c11206b..4ff2d57f729 100644 --- a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts +++ b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts @@ -88,7 +88,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -98,3 +99,13 @@ &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts index bc16e2c5c1a..d044be395a8 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts @@ -95,7 +95,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -107,3 +108,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts index eb7d7ed46bb..69a1759f36f 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts @@ -97,7 +97,8 @@ }; ðernet { - mtd-mac-address = <&factory 0x28>; + nvmem-cells = <&macaddr_factory_28>; + nvmem-cell-names = "mac-address"; }; &esw { @@ -110,3 +111,13 @@ ralink,led-polarity = <1>; ralink,mtd-eeprom = <&factory 0x0>; }; + +&factory { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_factory_28: macaddr@28 { + reg = <0x28 0x6>; + }; +};