From 19c45b95dbb53a7ba1a26c201277ca86293bf404 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 7 Feb 2024 14:48:43 +0100 Subject: [PATCH] ramips: convert to new LED color/function format where possible Initial conversion to new LED color/function format and drop label format where possible. The same label is composed at runtime. Signed-off-by: Christian Marangi --- .../ramips/dts/mt7620a_aigale_ai-br100.dts | 7 ++++-- .../dts/mt7620a_alfa-network_ac1200rm.dts | 4 +++- .../dts/mt7620a_alfa-network_r36m-e4g.dts | 10 +++++--- .../dts/mt7620a_alfa-network_tube-e4g.dts | 7 ++++-- .../ramips/dts/mt7620a_asus_rt-ac5x.dtsi | 7 ++++-- .../ramips/dts/mt7620a_bdcom_wap2100-sk.dts | 7 ++++-- .../ramips/dts/mt7620a_buffalo_whr-1166d.dts | 7 ++++-- .../ramips/dts/mt7620a_buffalo_whr-300hp2.dts | 7 ++++-- .../ramips/dts/mt7620a_buffalo_whr-600d.dts | 7 ++++-- .../linux/ramips/dts/mt7620a_cameo_810.dtsi | 13 +++++++---- .../ramips/dts/mt7620a_dlink_dch-m225.dts | 7 ++++-- .../ramips/dts/mt7620a_dlink_dir-510l.dts | 7 ++++-- .../ramips/dts/mt7620a_dlink_dwr-118-a1.dts | 10 +++++--- .../ramips/dts/mt7620a_dlink_dwr-118-a2.dts | 10 +++++--- .../ramips/dts/mt7620a_dlink_dwr-96x.dtsi | 10 +++++--- target/linux/ramips/dts/mt7620a_domywifi.dtsi | 4 +++- .../ramips/dts/mt7620a_dovado_tiny-ac.dts | 4 +++- .../dts/mt7620a_edimax_br-6478ac-v2.dts | 10 +++++--- .../ramips/dts/mt7620a_edimax_ew-7478apc.dts | 10 +++++--- .../ramips/dts/mt7620a_edimax_ew-747x.dtsi | 10 +++++--- .../ramips/dts/mt7620a_engenius_epg600.dts | 4 +++- .../ramips/dts/mt7620a_engenius_esr600.dts | 4 +++- .../linux/ramips/dts/mt7620a_fon_fon2601.dts | 4 +++- target/linux/ramips/dts/mt7620a_hnet_c108.dts | 7 ++++-- target/linux/ramips/dts/mt7620a_humax_e2.dts | 13 +++++++---- .../ramips/dts/mt7620a_iodata_wn-ac1167gr.dts | 4 +++- .../ramips/dts/mt7620a_iodata_wn-ac733gr3.dts | 4 +++- .../ramips/dts/mt7620a_iptime_a1004ns.dts | 8 +++++-- .../ramips/dts/mt7620a_iptime_a104ns.dts | 8 +++++-- .../ramips/dts/mt7620a_kimax_u25awf-h1.dts | 4 +++- .../ramips/dts/mt7620a_lava_lr-25g001.dts | 4 +++- .../ramips/dts/mt7620a_lb-link_bl-w1200.dts | 4 +++- .../ramips/dts/mt7620a_lenovo_newifi-y1.dts | 11 ++++++--- .../ramips/dts/mt7620a_lenovo_newifi-y1s.dts | 14 +++++++---- .../ramips/dts/mt7620a_linksys_e1700.dts | 7 ++++-- .../ramips/dts/mt7620a_netcore_nw5212.dts | 4 +++- .../ramips/dts/mt7620a_netgear_ex2700.dts | 10 +++++--- .../dts/mt7620a_netgear_ex3x00_ex61xx.dtsi | 10 +++++--- .../ramips/dts/mt7620a_netgear_wn3x00rp.dtsi | 10 +++++--- .../linux/ramips/dts/mt7620a_netis_wf2770.dts | 4 +++- .../ramips/dts/mt7620a_ohyeah_oy-0001.dts | 4 +++- .../linux/ramips/dts/mt7620a_phicomm_k2x.dtsi | 10 +++++--- .../ramips/dts/mt7620a_phicomm_psg1208.dts | 4 +++- .../ramips/dts/mt7620a_planex_cs-qr10.dts | 4 +++- .../ramips/dts/mt7620a_planex_db-wrt01.dts | 4 +++- .../ramips/dts/mt7620a_planex_mzk-750dhp.dts | 7 ++++-- .../ramips/dts/mt7620a_planex_mzk-ex300np.dts | 4 +++- .../ramips/dts/mt7620a_planex_mzk-ex750np.dts | 7 ++++-- .../ramips/dts/mt7620a_sanlinking_d240.dts | 7 ++++-- .../ramips/dts/mt7620a_sercomm_na930.dts | 7 ++++-- .../dts/mt7620a_sitecom_wlr-4100-v1-002.dts | 7 ++++-- .../dts/mt7620a_tplink_archer-c2-v1.dts | 16 +++++++++---- .../dts/mt7620a_tplink_archer-c20-v1.dts | 20 +++++++++++----- .../ramips/dts/mt7620a_tplink_archer-c20i.dts | 17 ++++++++++---- .../dts/mt7620a_tplink_archer-c50-v1.dts | 20 +++++++++++----- .../dts/mt7620a_tplink_archer-mr200.dts | 16 +++++++++---- .../ramips/dts/mt7620a_tplink_re200-v1.dts | 11 ++++++--- .../ramips/dts/mt7620a_tplink_re210-v1.dts | 5 +++- .../dts/mt7620a_wavlink_wl-wn530hg4.dts | 10 +++++--- .../ramips/dts/mt7620a_wavlink_wl-wn535k1.dts | 10 +++++--- .../ramips/dts/mt7620a_wavlink_wl-wn579x3.dts | 10 +++++--- .../ramips/dts/mt7620a_xiaomi_miwifi-mini.dts | 13 +++++++---- .../linux/ramips/dts/mt7620a_youku_yk-l1.dtsi | 10 +++++--- .../dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi | 8 +++++-- .../dts/mt7620a_zbtlink_zbt-we1026-h.dtsi | 11 ++++++--- .../ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi | 7 ++++-- target/linux/ramips/dts/mt7620a_zte_q7.dts | 7 ++++-- .../dts/mt7620a_zyxel_keenetic-viva.dts | 13 +++++++---- .../linux/ramips/dts/mt7620n_asus_rt-n12p.dts | 10 +++++--- .../linux/ramips/dts/mt7620n_asus_rt-n14u.dts | 13 +++++++---- .../ramips/dts/mt7620n_buffalo_wmr-300.dts | 4 +++- .../ramips/dts/mt7620n_comfast_cf-wr800n.dts | 4 +++- .../ramips/dts/mt7620n_dlink_dwr-116-a1.dts | 4 +++- .../ramips/dts/mt7620n_dlink_dwr-921-c1.dts | 4 +++- .../ramips/dts/mt7620n_dlink_dwr-922-e2.dts | 4 +++- .../ramips/dts/mt7620n_elecom_wrh-300cr.dts | 7 ++++-- .../ramips/dts/mt7620n_hootoo_ht-tm05.dts | 5 +++- .../dts/mt7620n_netgear_jwnr2010-v5.dts | 11 ++++++--- .../ramips/dts/mt7620n_netgear_pr2000.dts | 4 +++- .../linux/ramips/dts/mt7620n_nexx_wt3020.dtsi | 4 +++- .../ramips/dts/mt7620n_wrtnode_wrtnode.dts | 5 +++- .../ramips/dts/mt7620n_zbtlink_zbt-wa05.dts | 7 ++++-- .../ramips/dts/mt7620n_zbtlink_zbt-we2026.dts | 7 ++++-- .../dts/mt7620n_zbtlink_zbt-wr8305rt.dts | 4 +++- .../dts/mt7620n_zyxel_keenetic-omni-ii.dts | 10 +++++--- .../dts/mt7620n_zyxel_keenetic-omni.dts | 10 +++++--- .../ramips/dts/mt7621_afoundry_ew1200.dts | 4 +++- .../ramips/dts/mt7621_ampedwireless_ally.dtsi | 10 +++++--- .../linux/ramips/dts/mt7621_asus_rp-ac56.dts | 10 +++++--- .../linux/ramips/dts/mt7621_asus_rp-ac87.dts | 4 +++- .../ramips/dts/mt7621_asus_rt-ac57u-v1.dts | 7 ++++-- .../ramips/dts/mt7621_asus_rt-acx5p.dtsi | 4 +++- .../ramips/dts/mt7621_asus_rt-n56u-b1.dts | 13 +++++++---- .../linux/ramips/dts/mt7621_belkin_rt1800.dts | 3 ++- target/linux/ramips/dts/mt7621_bolt_arion.dts | 7 ++++-- .../ramips/dts/mt7621_buffalo_wsr-1166dhp.dts | 4 +++- .../dts/mt7621_buffalo_wsr-2533dhpl.dts | 4 +++- .../ramips/dts/mt7621_buffalo_wsr-600dhp.dts | 4 +++- .../ramips/dts/mt7621_comfast_cf-e390ax.dts | 9 +++++--- .../ramips/dts/mt7621_comfast_cf-ew72-v2.dts | 3 ++- .../ramips/dts/mt7621_cudy_wr1300-v1.dts | 7 ++++-- .../ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi | 4 +++- .../linux/ramips/dts/mt7621_cudy_wr2100.dts | 4 +++- .../ramips/dts/mt7621_d-team_newifi-d2.dts | 10 +++++--- .../linux/ramips/dts/mt7621_d-team_pbr-m1.dts | 4 +++- .../ramips/dts/mt7621_dlink_covr-x1860-a1.dts | 10 +++++--- .../ramips/dts/mt7621_dlink_dap-x1860-a1.dts | 10 +++++--- .../ramips/dts/mt7621_dlink_dir-1960-a1.dts | 5 +++- .../ramips/dts/mt7621_dlink_dir-3060-a1.dts | 7 ++++-- .../ramips/dts/mt7621_dlink_dir-853-a1.dts | 10 +++++--- .../ramips/dts/mt7621_dlink_dir-853-a3.dts | 10 +++++--- .../ramips/dts/mt7621_dlink_dir-853-r1.dts | 10 +++++--- .../ramips/dts/mt7621_dlink_dir-860l-b1.dts | 7 ++++-- .../ramips/dts/mt7621_dlink_dir-8xx.dtsi | 7 ++++-- .../ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 7 ++++-- .../ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi | 7 ++++-- .../linux/ramips/dts/mt7621_dual-q_h721.dts | 4 +++- .../linux/ramips/dts/mt7621_edimax_re23s.dts | 4 +++- .../dts/mt7621_elecom_wrc-1167ghbk2-s.dts | 13 +++++++---- .../ramips/dts/mt7621_elecom_wrc-gs.dtsi | 13 +++++++---- .../ramips/dts/mt7621_firefly_firewrt.dts | 4 +++- .../ramips/dts/mt7621_gehua_ghl-r-001.dts | 4 +++- .../linux/ramips/dts/mt7621_gnubee_gb-pc1.dts | 4 +++- .../linux/ramips/dts/mt7621_gnubee_gb-pc2.dts | 4 +++- .../ramips/dts/mt7621_hanyang_hyc-g920.dts | 7 ++++-- .../linux/ramips/dts/mt7621_hiwifi_hc5962.dts | 4 +++- .../ramips/dts/mt7621_huasifei_ws1208v2.dts | 7 ++++-- target/linux/ramips/dts/mt7621_humax_e10.dts | 10 +++++--- .../ramips/dts/mt7621_iodata_wn-ax1167gr.dts | 7 ++++-- .../ramips/dts/mt7621_iodata_wn-dx1200gr.dts | 7 ++++-- .../ramips/dts/mt7621_iodata_wn-gx300gr.dts | 7 ++++-- .../ramips/dts/mt7621_iodata_wn-xx-xr.dtsi | 7 ++++-- .../ramips/dts/mt7621_iodata_wnpr2600g.dts | 4 +++- .../ramips/dts/mt7621_iptime_a3004ns-dual.dts | 7 ++++-- .../ramips/dts/mt7621_iptime_a6004ns-m.dtsi | 7 ++++-- .../linux/ramips/dts/mt7621_iptime_a8004t.dts | 4 +++- .../ramips/dts/mt7621_iptime_ax2004m.dts | 4 +++- .../ramips/dts/mt7621_jcg_jhr-ac876m.dts | 4 +++- target/linux/ramips/dts/mt7621_jcg_q20.dts | 7 ++++-- .../ramips/dts/mt7621_keenetic_kn-3010.dts | 4 +++- .../ramips/dts/mt7621_lenovo_newifi-d1.dts | 10 +++++--- .../linux/ramips/dts/mt7621_linksys_e5600.dts | 13 +++++++---- .../linux/ramips/dts/mt7621_linksys_e7350.dts | 3 ++- .../ramips/dts/mt7621_linksys_ea7xxx.dtsi | 10 +++++--- .../ramips/dts/mt7621_linksys_re6500.dts | 4 +++- .../ramips/dts/mt7621_linksys_re7000.dts | 7 ++++-- .../ramips/dts/mt7621_mercusys_mr70x-v1.dts | 7 ++++-- target/linux/ramips/dts/mt7621_mtc_wr1201.dts | 10 +++++--- .../linux/ramips/dts/mt7621_netgear_eax12.dts | 10 +++++--- .../ramips/dts/mt7621_netgear_ex6150.dts | 10 +++++--- .../dts/mt7621_netgear_sercomm_ayx.dtsi | 13 +++++++---- .../dts/mt7621_netgear_sercomm_bzv.dtsi | 19 ++++++++++----- .../dts/mt7621_netgear_sercomm_chj.dtsi | 10 +++++--- .../ramips/dts/mt7621_netgear_wac104.dts | 7 ++++-- .../ramips/dts/mt7621_netgear_wax202.dts | 7 ++++-- .../linux/ramips/dts/mt7621_netis_wf2881.dts | 7 ++++-- .../linux/ramips/dts/mt7621_oraybox_x3a.dts | 10 +++++--- .../linux/ramips/dts/mt7621_phicomm_k2p.dts | 10 +++++--- .../linux/ramips/dts/mt7621_planex_vr500.dts | 4 +++- .../dts/mt7621_raisecom_msg1500-x-00.dts | 4 +++- .../dts/mt7621_samknows_whitebox-v8.dts | 7 ++++-- .../linux/ramips/dts/mt7621_sercomm_na502.dts | 7 ++++-- .../ramips/dts/mt7621_sercomm_na502s.dts | 7 ++++-- .../dts/mt7621_storylink_sap-g3200u3.dts | 4 +++- .../ramips/dts/mt7621_thunder_timecloud.dts | 7 ++++-- .../ramips/dts/mt7621_tozed_zlt-s12-pro.dts | 6 +++-- .../dts/mt7621_tplink_archer-ax23-v1.dts | 16 +++++++++---- .../dts/mt7621_tplink_archer-c6u-v1.dts | 16 +++++++++---- .../ramips/dts/mt7621_tplink_deco-m4r-v4.dts | 4 +++- .../ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 12 ++++++---- .../ramips/dts/mt7621_tplink_re350-v1.dts | 10 +++++--- .../ramips/dts/mt7621_tplink_re650-v2.dts | 10 +++++--- .../ramips/dts/mt7621_tplink_rexx0-v1.dtsi | 10 +++++--- .../dts/mt7621_tplink_tl-wpa8631p-v3.dts | 7 ++++-- .../linux/ramips/dts/mt7621_ubnt_usw-flex.dts | 7 ++++-- .../ramips/dts/mt7621_unielec_u7621-01.dtsi | 4 +++- .../ramips/dts/mt7621_unielec_u7621-06.dtsi | 4 +++- .../ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi | 7 ++++-- .../dts/mt7621_wavlink_ws-wn572hp3-4g.dts | 4 +++- .../ramips/dts/mt7621_wevo_w2914ns-v2.dtsi | 4 +++- .../ramips/dts/mt7621_winstars_ws-wn583a6.dts | 10 +++++--- .../ramips/dts/mt7621_xiaomi_mi-router-4.dts | 11 ++++++--- .../dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi | 8 +++++-- .../mt7621_xiaomi_mi-router-4a-gigabit-v2.dts | 14 +++++++---- .../dts/mt7621_xiaomi_mi-router-ac2100.dts | 14 +++++++---- .../dts/mt7621_xiaomi_redmi-router-ac2100.dts | 14 +++++++---- .../dts/mt7621_xzwifi_creativebox-v1.dts | 4 +++- .../ramips/dts/mt7621_youhua_wr1200js.dts | 7 ++++-- .../linux/ramips/dts/mt7621_youku_yk-l2.dts | 10 +++++--- .../ramips/dts/mt7621_yuncore_fap640.dts | 13 +++++++---- .../ramips/dts/mt7621_yuncore_fap690.dts | 10 +++++--- .../ramips/dts/mt7621_zbtlink_zbt-wg2626.dts | 4 +++- .../ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi | 4 +++- .../ramips/dts/mt7621_zyxel_lte5398-m904.dts | 7 ++++-- .../linux/ramips/dts/mt7621_zyxel_wap6805.dts | 7 ++++-- .../dts/mt7628an_alfa-network_awusfree1.dts | 4 +++- .../ramips/dts/mt7628an_asus_rt-ac1200.dts | 5 +++- .../ramips/dts/mt7628an_asus_rt-ac1200.dtsi | 4 +++- .../ramips/dts/mt7628an_asus_rt-n1x.dtsi | 13 +++++++---- .../dts/mt7628an_buffalo_wcr-1166ds.dts | 4 +++- .../dts/mt7628an_comfast_cf-wr617ac.dts | 7 ++++-- .../linux/ramips/dts/mt7628an_cudy_wr1000.dts | 7 ++++-- .../ramips/dts/mt7628an_d-team_pbr-d1.dts | 7 ++++-- .../ramips/dts/mt7628an_dlink_dap-1325-a1.dts | 7 ++++-- .../ramips/dts/mt7628an_elecom_wrc-1167fs.dts | 10 +++++--- .../dts/mt7628an_glinet_gl-mt300n-v2.dts | 10 +++++--- .../mt7628an_glinet_vixmini_microuter.dtsi | 7 ++++-- .../ramips/dts/mt7628an_hilink_hlk-7628n.dts | 4 +++- .../ramips/dts/mt7628an_hilink_hlk-7688a.dts | 4 +++- .../linux/ramips/dts/mt7628an_iptime_a3.dts | 8 +++++-- .../ramips/dts/mt7628an_iptime_a604m.dts | 5 +++- .../ramips/dts/mt7628an_keenetic_kn-1613.dts | 4 +++- .../ramips/dts/mt7628an_kroks_kndrt31r16.dts | 5 +++- .../ramips/dts/mt7628an_kroks_kndrt31r19.dts | 5 +++- .../ramips/dts/mt7628an_linksys_e5400.dts | 4 +++- .../dts/mt7628an_mercury_mac1200r-v2.dts | 4 +++- .../ramips/dts/mt7628an_motorola_mwr03.dts | 7 ++++-- .../ramips/dts/mt7628an_netgear_r6xxx.dtsi | 13 +++++++---- .../linux/ramips/dts/mt7628an_oraybox_x1.dts | 10 +++++--- .../ramips/dts/mt7628an_ravpower_rp-wd009.dts | 7 ++++-- .../ramips/dts/mt7628an_skylab_skw92a.dts | 7 ++++-- target/linux/ramips/dts/mt7628an_tama_w06.dts | 10 +++++--- .../linux/ramips/dts/mt7628an_totolink_a3.dts | 8 +++++-- .../dts/mt7628an_tplink_archer-c20-v4.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_archer-c20-v5.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_archer-c50-v3.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_archer-c50-v4.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_archer-c50-v6.dts | 14 +++++++---- .../ramips/dts/mt7628an_tplink_re200.dtsi | 10 +++++--- .../ramips/dts/mt7628an_tplink_re305.dtsi | 4 +++- .../dts/mt7628an_tplink_tl-mr3020-v3.dts | 13 +++++++---- .../dts/mt7628an_tplink_tl-mr3420-v5.dts | 23 +++++++++++++------ .../dts/mt7628an_tplink_tl-mr6400-v4.dts | 14 +++++++---- .../dts/mt7628an_tplink_tl-mr6400-v5.dts | 14 +++++++---- .../dts/mt7628an_tplink_tl-wa801nd-v5.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_tl-wr802n-v4.dts | 5 +++- .../dts/mt7628an_tplink_tl-wr840n-v4.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_tl-wr840n-v5.dts | 7 ++++-- .../dts/mt7628an_tplink_tl-wr841n-v13.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_tl-wr841n-v14.dts | 13 +++++++---- .../dts/mt7628an_tplink_tl-wr842n-v5.dts | 23 +++++++++++++------ .../dts/mt7628an_tplink_tl-wr850n-v2.dts | 17 ++++++++++---- .../dts/mt7628an_tplink_tl-wr902ac-v3.dts | 20 +++++++++++----- .../ramips/dts/mt7628an_unielec_u7628-01.dtsi | 13 +++++++---- .../dts/mt7628an_vocore_vocore2-lite.dts | 5 +++- .../dts/mt7628an_wavlink_wl-wn531a3.dts | 7 ++++-- .../dts/mt7628an_wavlink_wl-wn570ha1.dts | 7 ++++-- .../dts/mt7628an_wavlink_wl-wn575a3.dts | 4 +++- .../dts/mt7628an_wavlink_wl-wn576a2.dts | 7 ++++-- .../dts/mt7628an_wavlink_wl-wn577a2.dts | 10 +++++--- .../dts/mt7628an_wavlink_wl-wn578a2.dts | 10 +++++--- .../ramips/dts/mt7628an_wiznet_wizfi630s.dts | 4 +++- .../ramips/dts/mt7628an_wrtnode_wrtnode2p.dts | 5 +++- .../ramips/dts/mt7628an_wrtnode_wrtnode2r.dts | 5 +++- ...mt7628an_xiaomi_mi-router-4a-100m-intl.dts | 11 ++++++--- .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts | 11 ++++++--- .../dts/mt7628an_xiaomi_mi-router-4c.dts | 11 ++++++--- .../ramips/dts/mt7628an_xiaomi_miwifi-3c.dts | 10 +++++--- .../dts/mt7628an_xiaomi_miwifi-nano.dts | 10 +++++--- .../dts/mt7628an_zbtlink_zbt-we1226.dts | 7 ++++-- .../dts/mt7628an_zyxel_keenetic-extra-ii.dts | 7 ++++-- .../ramips/dts/rt2880_airlink101_ar670w.dts | 7 ++++-- .../ramips/dts/rt2880_airlink101_ar725w.dts | 10 +++++--- .../linux/ramips/dts/rt2880_asus_rt-n15.dts | 4 +++- .../dts/rt2880_buffalo_wli-tx4-ag300n.dts | 4 +++- .../ramips/dts/rt2880_dlink_dap-1522-a1.dts | 7 ++++-- .../ramips/dts/rt2880_ralink_v11st-fe.dts | 4 +++- .../dts/rt3050_alphanetworks_asl26555.dtsi | 16 +++++++++---- .../ramips/dts/rt3050_asus_rt-n10-plus.dts | 4 +++- .../linux/ramips/dts/rt3050_asus_wl-330n.dts | 4 +++- .../ramips/dts/rt3050_asus_wl-330n3g.dts | 4 +++- .../linux/ramips/dts/rt3050_dlink_dcs-930.dts | 7 ++++-- .../ramips/dts/rt3050_dlink_dir-300-b1.dts | 16 +++++++++---- .../ramips/dts/rt3050_dlink_dir-600-b1.dts | 16 +++++++++---- .../ramips/dts/rt3050_dlink_dir-615-d.dts | 16 +++++++++---- .../ramips/dts/rt3050_dlink_dir-620-a1.dts | 19 ++++++++++----- .../ramips/dts/rt3050_edimax_3g-6200n.dts | 7 ++++-- .../ramips/dts/rt3050_edimax_3g-6200nl.dts | 4 +++- .../linux/ramips/dts/rt3050_huawei_d105.dts | 7 ++++-- .../linux/ramips/dts/rt3050_netcore_nw718.dts | 10 +++++--- .../ramips/dts/rt3050_sparklan_wcr-150gn.dts | 4 +++- .../ramips/dts/rt3050_teltonika_rut5xx.dts | 4 +++- .../dts/rt3050_trendnet_tew-638apb-v2.dts | 7 ++++-- .../linux/ramips/dts/rt3052_accton_wr6202.dts | 4 +++- .../ramips/dts/rt3052_alfa-network_w502u.dts | 7 ++++-- .../ramips/dts/rt3052_asiarf_awapn2403.dts | 4 +++- .../linux/ramips/dts/rt3052_asus_rt-n13u.dts | 4 +++- .../ramips/dts/rt3052_aximcom_mr-102n.dts | 10 +++++--- .../ramips/dts/rt3052_aztech_hw550-3g.dts | 10 +++++--- .../ramips/dts/rt3052_dlink_dap-1350.dts | 10 +++++--- .../ramips/dts/rt3052_engenius_esr-9753.dts | 7 ++++-- .../ramips/dts/rt3052_fon_fonera-20n.dts | 7 ++++-- .../linux/ramips/dts/rt3052_huawei_hg255d.dts | 13 +++++++---- .../linux/ramips/dts/rt3052_jcg_jhr-n825r.dts | 4 +++- .../linux/ramips/dts/rt3052_jcg_jhr-n926r.dts | 10 +++++--- .../dts/rt3052_mofinetwork_mofi3500-3gn.dts | 10 +++++--- .../ramips/dts/rt3052_netgear_wnce2001.dts | 13 +++++++---- .../linux/ramips/dts/rt3052_nexaira_bc2.dts | 4 +++- .../ramips/dts/rt3052_omnima_miniembwifi.dts | 7 ++++-- .../ramips/dts/rt3052_petatel_psr-680w.dts | 4 +++- .../ramips/dts/rt3052_planex_mzk-w300nh2.dts | 10 +++++--- .../ramips/dts/rt3052_prolink_pwh2004.dts | 4 +++- .../ramips/dts/rt3052_ralink_v22rw-2x2.dts | 4 +++- .../ramips/dts/rt3052_sitecom_wl-351.dts | 4 +++- .../ramips/dts/rt3052_tenda_w306r-v2.dts | 4 +++- .../dts/rt3052_unbranded_wr512-3gn.dtsi | 4 +++- .../dts/rt3052_unbranded_xdx-rn502j.dts | 4 +++- .../ramips/dts/rt3052_upvel_ur-326n4g.dts | 4 +++- .../ramips/dts/rt3052_upvel_ur-336un.dts | 4 +++- .../ramips/dts/rt3052_zyxel_keenetic.dts | 10 +++++--- .../ramips/dts/rt3052_zyxel_nbg-419n.dts | 7 ++++-- .../ramips/dts/rt3352_dlink_dir-615-h1.dts | 16 +++++++++---- .../ramips/dts/rt3352_dlink_dir-620-d1.dts | 4 +++- .../ramips/dts/rt3352_zyxel_nbg-419n-v2.dts | 10 +++++--- .../linux/ramips/dts/rt3662_asus_rt-n56u.dts | 13 +++++++---- .../linux/ramips/dts/rt3662_dlink_dir-645.dts | 4 +++- .../ramips/dts/rt3662_edimax_br-6475nd.dts | 7 ++++-- .../ramips/dts/rt3662_engenius_esr600h.dts | 7 ++++-- target/linux/ramips/dts/rt3662_omnima_hpm.dts | 7 ++++-- .../ramips/dts/rt3662_samsung_cy-swr1100.dts | 10 +++++--- .../ramips/dts/rt3883_belkin_f9k1109v1.dts | 8 +++++-- .../ramips/dts/rt3883_sitecom_wlr-6000.dts | 4 +++- .../ramips/dts/rt3883_trendnet_tew-691gr.dts | 4 +++- .../ramips/dts/rt3883_trendnet_tew-692gr.dts | 7 ++++-- .../ramips/dts/rt5350_airlive_air3gii.dts | 4 +++- .../ramips/dts/rt5350_asiarf_awm002-evb.dtsi | 10 +++++--- .../linux/ramips/dts/rt5350_belkin_f7c027.dts | 10 +++++--- .../ramips/dts/rt5350_dlink_dcs-930l-b1.dts | 7 ++++-- .../ramips/dts/rt5350_dlink_dir-300-b7.dts | 7 ++++-- .../ramips/dts/rt5350_dlink_dir-320-b1.dts | 10 +++++--- .../ramips/dts/rt5350_dlink_dir-610-a1.dts | 7 ++++-- .../ramips/dts/rt5350_dlink_dwr-512-b.dts | 4 +++- .../linux/ramips/dts/rt5350_hame_mpr-a1.dts | 4 +++- .../linux/ramips/dts/rt5350_hame_mpr-a2.dts | 4 +++- .../ramips/dts/rt5350_hootoo_ht-tm02.dts | 7 ++++-- .../ramips/dts/rt5350_intenso_memory2move.dts | 4 +++- .../ramips/dts/rt5350_omnima_miniembplug.dts | 4 +++- .../ramips/dts/rt5350_planex_mzk-dp150n.dts | 4 +++- target/linux/ramips/dts/rt5350_poray_m3.dts | 4 +++- target/linux/ramips/dts/rt5350_poray_m4.dtsi | 4 +++- target/linux/ramips/dts/rt5350_poray_x5.dts | 4 +++- target/linux/ramips/dts/rt5350_poray_x8.dts | 4 +++- .../ramips/dts/rt5350_trendnet_tew-714tru.dts | 4 +++- .../ramips/dts/rt5350_unbranded_a5-v11.dts | 4 +++- .../ramips/dts/rt5350_vocore_vocore.dtsi | 5 +++- .../ramips/dts/rt5350_zorlik_zl5900v2.dts | 7 ++++-- .../ramips/dts/rt5350_zyxel_keenetic-4g-b.dts | 10 +++++--- .../dts/rt5350_zyxel_keenetic-lite-b.dts | 7 ++++-- .../dts/rt5350_zyxel_keenetic-start.dts | 4 +++- 349 files changed, 1958 insertions(+), 783 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts index bbd8c47a8294..0dff381d2dab 100644 --- a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts +++ b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "aigale,ai-br100", "ralink,mt7620a-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts index 8ac74f70628a..52f0b4977179 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc"; @@ -41,7 +42,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; }; 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 2325d53153da..e8276fe71756 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "alfa-network,r36m-e4g", "ralink,mt7620a-soc"; @@ -86,7 +87,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; @@ -109,12 +111,14 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "orange:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0radio"; }; 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 f5fa41009089..aa109d428c68 100644 --- a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts +++ b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc"; @@ -74,12 +75,14 @@ }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi index 92119ff8127c..199b7026e19c 100644 --- a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi +++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -32,12 +33,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts index 4d442825a97b..8652d6573c89 100644 --- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts +++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc"; @@ -22,14 +23,16 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts index 17bf2f8272ee..8145f4492dbb 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,whr-1166d", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts index 85946ca1e0bb..4e0d8ebec401 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,whr-300hp2", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts index b571d122cf36..5a341cf09dc2 100644 --- a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts +++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,whr-600d", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi index d09f4d292ebd..511b76abde09 100644 --- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi +++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,22 +35,26 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts index 6d5d461c8fa5..d08322af13e1 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dch-m225", "ralink,mt7620a-soc"; @@ -34,13 +35,15 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; default-state = "on"; }; status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts index febfd2e32eda..7c32b122ccfc 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts @@ -3,6 +3,7 @@ #include "mt7620a.dtsi" #include +#include #include #include @@ -41,12 +42,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; }; }; 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 97fc4f0935c4..553f215b7c79 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -36,7 +37,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; @@ -46,7 +48,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; @@ -56,7 +59,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; 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 5f11b73ad9e4..ea660c83f0bc 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -33,7 +34,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; @@ -43,7 +45,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; @@ -53,7 +56,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi index 11cd15922cc1..e8a3d59d77c3 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi @@ -7,6 +7,7 @@ #include #include +#include #include / { @@ -38,17 +39,20 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_domywifi.dtsi b/target/linux/ramips/dts/mt7620a_domywifi.dtsi index 778de63f1bc9..c6a1ac0c7735 100644 --- a/target/linux/ramips/dts/mt7620a_domywifi.dtsi +++ b/target/linux/ramips/dts/mt7620a_domywifi.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -67,7 +68,8 @@ }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts index 821aa04f9531..89daaf0afedd 100644 --- a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts +++ b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dovado,tiny-ac", "ralink,mt7620a-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; 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 486f6399df49..999fff4ecb2a 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -9,6 +9,7 @@ #include #include +#include #include / { @@ -36,7 +37,8 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -46,12 +48,14 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts index 5759774f6ee2..d9ad11b506f9 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -31,7 +32,8 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -41,12 +43,14 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index eb21ff7d6f96..6cc1138efb29 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -30,17 +31,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_engenius_epg600.dts b/target/linux/ramips/dts/mt7620a_engenius_epg600.dts index 4b3332d2f074..6c7d3a72803e 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_epg600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_epg600.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,epg600", "ralink,mt7620a-soc"; @@ -46,7 +47,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index beee73f11c87..98da6d204537 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,esr600", "ralink,mt7620a-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index 7adf0faf868d..3e475395f9f8 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "fon,fon2601", "ralink,mt7620a-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power_r { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts index 60c6b2a7d4ae..0c0adf26ebe8 100644 --- a/target/linux/ramips/dts/mt7620a_hnet_c108.dts +++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "hnet,c108", "ralink,mt7620a-soc"; @@ -54,12 +55,14 @@ }; lan_red { - label = "red:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; }; led_lan_green: lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_humax_e2.dts b/target/linux/ramips/dts/mt7620a_humax_e2.dts index 453208eb34ed..94f2e2003dec 100644 --- a/target/linux/ramips/dts/mt7620a_humax_e2.dts +++ b/target/linux/ramips/dts/mt7620a_humax_e2.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; @@ -32,17 +34,20 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts index 6f95bd015149..315f0bfb56ad 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts index bc674fa4b304..1fa551bddfbd 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts index 6270af3b1589..5c5637c1988d 100644 --- a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts +++ b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_iptime.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts index c997d68cd12f..f76d184c44a9 100644 --- a/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts +++ b/target/linux/ramips/dts/mt7620a_iptime_a104ns.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_iptime.dtsi" / { @@ -17,14 +19,16 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts index 772cab32e2ae..412530c257f7 100644 --- a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts +++ b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts @@ -2,6 +2,7 @@ #include #include +#include /{ compatible = "kimax,u25awf-h1","ralink,mt7620a-soc"; @@ -33,7 +34,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index f43aa2d3bca6..46b269395079 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; 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 cefc3c3e925d..41bca0bbc320 100644 --- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts +++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "lb-link,bl-w1200", "ralink,mt7620a-soc"; @@ -29,7 +30,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts index 24b79711c5e4..acc73a8ec949 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts @@ -16,7 +16,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; @@ -31,14 +32,16 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; }; @@ -57,4 +60,6 @@ nvmem-cell-names = "mac-address"; mediatek,portmap = "llllw"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts index f1d2c8733711..254472f72cfe 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts @@ -37,12 +37,14 @@ compatible = "gpio-leds"; power1 { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; led_power_blue: power2 { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; @@ -57,12 +59,14 @@ }; usb1 { - label = "yellow:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; }; usb2 { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -114,4 +118,6 @@ &gsw { mediatek,port4-gmac; mediatek,ephy-base = /bits/ 8 <8>; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts index 4310f9dfc7fa..a4a5a69b12e3 100644 --- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts +++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts @@ -7,6 +7,7 @@ #include #include +#include / { compatible = "linksys,e1700", "ralink,mt7620a-soc"; @@ -39,12 +40,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts index 34c3d4f42d87..e01babc95701 100644 --- a/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts +++ b/target/linux/ramips/dts/mt7620a_netcore_nw5212.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netcore,nw5212", "ralink,mt7620a-soc"; @@ -37,7 +38,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts index 79b622b1bb38..c537091bca2b 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_ex2700.dts @@ -7,6 +7,7 @@ #include #include +#include / { compatible = "netgear,ex2700", "ralink,mt7620a-soc"; @@ -39,13 +40,15 @@ compatible = "gpio-leds"; led_power_green: power_g { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; power_r { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -70,7 +73,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi index fe26c3b85949..8551a30c4a00 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -31,13 +32,15 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 23 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; }; @@ -62,7 +65,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 27 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi index 8810742e6718..1d3f2f3772f6 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,13 +34,15 @@ compatible = "gpio-leds"; led_power_green: power_g { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; power_r { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; @@ -64,7 +67,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts index c2ef14262313..1b1d4decd303 100644 --- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts +++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netis,wf2770", "ralink,mt7620a-soc"; @@ -13,7 +14,8 @@ compatible = "gpio-leds"; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts index 2c503db80dec..d87c7951cadc 100644 --- a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts +++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: powerled { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi index 588789239f09..3d01ba9cae66 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi +++ b/target/linux/ramips/dts/mt7620a_phicomm_k2x.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -25,18 +26,21 @@ compatible = "gpio-leds"; led_blue: blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; default-state = "on"; }; yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts index 74faef8dea62..da325062ab7b 100644 --- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts +++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "phicomm,psg1208", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts index eeeb7cf65766..891e067c534a 100644 --- a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts +++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,cs-qr10", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts index 53c0215e0ce6..072bdb277ee0 100644 --- a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts +++ b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,db-wrt01", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts index 3c6f7c582ef7..ac7b7fefd95f 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-750dhp", "ralink,mt7620a-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts index 2879f6d870f4..754abf879ae9 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-ex300np", "ralink,mt7620a-soc"; @@ -23,7 +24,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts index de4df5d277d4..ba8c9a4737fe 100644 --- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts +++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-ex750np", "ralink,mt7620a-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index 415ecf1bd9fa..ad0747cb740d 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "sanlinking,d240", "ralink,mt7620a-soc"; @@ -45,12 +46,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts index 1ffc0a2bc815..c0452fdcd59d 100644 --- a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts +++ b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sercomm,na930", "ralink,mt7620a-soc"; @@ -83,7 +84,8 @@ }; status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio2 26 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -95,7 +97,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 29 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts index d94331a87d98..d76babae9d88 100644 --- a/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts +++ b/target/linux/ramips/dts/mt7620a_sitecom_wlr-4100-v1-002.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "sitecom,wlr-4100-v1-002", "ralink,mt7620a-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -36,7 +38,8 @@ }; wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; 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 88d241601019..fcce614e71dd 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc"; @@ -22,29 +23,34 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; 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 e631f6f4e48f..60ab58366fb7 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts @@ -15,30 +15,35 @@ compatible = "gpio-leds"; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "keep"; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; @@ -55,7 +60,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; @@ -80,4 +86,6 @@ &wifi { nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts index d00d2195eeb5..86205464abce 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts @@ -16,29 +16,34 @@ compatible = "gpio-leds"; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; @@ -60,4 +65,6 @@ &wifi { nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; +#include + }; 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 439bc36dc3a2..797710c8841f 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts @@ -15,30 +15,35 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; @@ -55,7 +60,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; @@ -80,4 +86,6 @@ &wifi { nvmem-cells = <&macaddr_rom_f100 (-1)>; nvmem-cell-names = "mac-address"; +#include + }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts index cc947e212e51..a7a2338bce4a 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,archer-mr200", "ralink,mt7620a-soc"; @@ -22,17 +23,20 @@ compatible = "gpio-leds"; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; @@ -42,7 +46,8 @@ }; wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; @@ -67,7 +72,8 @@ }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts index d2f5207fac14..fccda507000a 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_re200-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_tplink_re2x0-v1.dtsi" / { @@ -17,17 +19,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts index 57cd0ed539f8..c92c6e7f0d62 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_tplink_re2x0-v1.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts index 687b3ced37b4..13f4c4c36268 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,wl-wn530hg4", "ralink,mt7620a-soc"; @@ -20,17 +21,20 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts index 48f1a7f3c0df..0bd158da4fe5 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn535k1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,wl-wn535k1", "ralink,mt7620a-soc"; @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; @@ -57,7 +60,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts index b2b762d63a7f..cdebbd9e85a2 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,wl-wn579x3", "ralink,mt7620a-soc"; @@ -50,17 +51,20 @@ compatible = "gpio-leds"; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 8ed6b7764dcf..bc40fbb91aa2 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc"; @@ -23,22 +24,26 @@ compatible = "gpio-leds"; led_blue: blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; led_yellow: yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; }; led_red: red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index fc758a455648..666544191128 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -16,20 +17,23 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi index 39c50c7366df..b5065aa97b69 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_zbtlink_zbt-we1026.dtsi" / { @@ -10,12 +12,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi index 09f0ba773c09..c1aff2f86811 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-h.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620a_zbtlink_zbt-we1026.dtsi" / { @@ -10,17 +12,20 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi index b3032af63f38..405c110c1f50 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we826.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620a_zte_q7.dts b/target/linux/ramips/dts/mt7620a_zte_q7.dts index 3848f7317e60..95a48d29ae23 100644 --- a/target/linux/ramips/dts/mt7620a_zte_q7.dts +++ b/target/linux/ramips/dts/mt7620a_zte_q7.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zte,q7", "ralink,mt7620a-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; statred { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; led_status_blue: statblue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts index abeb4c2a2d16..95ca0bfa34b8 100644 --- a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts +++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-viva", "ralink,mt7620a-soc"; @@ -18,19 +19,22 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; power_alert { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; @@ -40,7 +44,8 @@ }; led_power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts index 29350a855657..1a693b1df2f9 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n12p", "ralink,mt7620n-soc"; @@ -22,17 +23,20 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts index c467ed0dde54..30edead06672 100644 --- a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts +++ b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n14u", "ralink,mt7620n-soc"; @@ -18,24 +19,28 @@ compatible = "gpio-leds"; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts index a714960b7f33..081b6d914c34 100644 --- a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts +++ b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wmr-300", "ralink,mt7620n-soc"; @@ -28,7 +29,8 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts index 19e968bf948a..5ba4d812b25a 100644 --- a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts +++ b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "comfast,cf-wr800n", "ralink,mt7620n-soc"; @@ -32,7 +33,8 @@ }; led_wps: wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts index 1c1a700630db..5fa45a59c4e2 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts index 95a93ea4deb0..d14abad41b18 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-921-c1.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -38,7 +39,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts index 22bff2c948a9..94de91bfdf7e 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-922-e2.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -41,7 +42,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts index afb14b118895..9f8ee0eda98f 100644 --- a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts +++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts index 1c408bcaa1a9..e77e439ac410 100644 --- a/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts +++ b/target/linux/ramips/dts/mt7620n_hootoo_ht-tm05.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620n_sunvalley_filehub.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts b/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts index 63cf38dec55e..0c4958e9e9c1 100644 --- a/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts +++ b/target/linux/ramips/dts/mt7620n_netgear_jwnr2010-v5.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7620n_netgear_n300.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0radio"; }; diff --git a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts index f06b97498221..d5fc6d3854a5 100644 --- a/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts +++ b/target/linux/ramips/dts/mt7620n_netgear_pr2000.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,pr2000", "ralink,mt7620n-soc"; @@ -28,7 +29,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi index 8903ab5c36ab..d53f3a9198af 100644 --- a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi +++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "nexx,wt3020", "ralink,mt7620n-soc"; @@ -28,7 +29,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts index 8e608bba2e4c..4e7298e8af1d 100644 --- a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts +++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts @@ -17,7 +17,8 @@ compatible = "gpio-leds"; led_indicator: indicator { - label = "blue:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; }; @@ -106,4 +107,6 @@ groups = "ephy", "wled", "pa", "i2c", "wdt", "uartf", "spi refclk"; function = "gpio"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts index 52c497645b0c..c24c60abacd5 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wa05", "ralink,mt7620n-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts index 7000447c6ce5..0d139f2e30ce 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-we2026", "ralink,mt7620n-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts index 20063e2b47d7..dbadfe4c20ad 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wr8305rt", "ralink,mt7620n-soc"; @@ -23,7 +24,8 @@ }; lan { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; 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 1937c3a14c1f..c7c853b1bc0d 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-omni-ii", "ralink,mt7620n-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -35,7 +38,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts index 8faab1cc6b20..d7d1d969faee 100644 --- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts +++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-omni", "ralink,mt7620n-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; @@ -35,7 +38,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts index d63ae33311fb..1422f3dde846 100644 --- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts +++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "afoundry,ew1200", "mediatek,mt7621-soc"; @@ -33,7 +34,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi index 35274afbf3ac..6062d001ebd8 100644 --- a/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi +++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -40,17 +41,20 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts index d9fdb3b675f8..4f58156d72bb 100644 --- a/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac56.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rp-ac56", "mediatek,mt7621-soc"; @@ -53,17 +54,20 @@ }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 48 GPIO_ACTIVE_HIGH>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_HIGH>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts b/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts index 34e64182cf56..51b0b10867b6 100644 --- a/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts +++ b/target/linux/ramips/dts/mt7621_asus_rp-ac87.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rp-ac87", "mediatek,mt7621-soc"; @@ -37,7 +38,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts index 6790b37d1aef..a23bfcc1ff10 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rt-ac57u-v1", "mediatek,mt7621-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 48 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi index 7c607f962dbb..dfb906546c28 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi +++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; 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 cfc8330fe5c5..411026d7b0e3 100644 --- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts +++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "asus,rt-n56u-b1", "mediatek,mt7621-soc"; @@ -25,7 +26,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -42,17 +44,20 @@ }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts index e7acc55e500f..a6720adb0e8c 100644 --- a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts +++ b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts @@ -47,7 +47,8 @@ }; led_power: led-power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_bolt_arion.dts b/target/linux/ramips/dts/mt7621_bolt_arion.dts index 83855f9dc898..4dedb12eadc8 100644 --- a/target/linux/ramips/dts/mt7621_bolt_arion.dts +++ b/target/linux/ramips/dts/mt7621_bolt_arion.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "bolt,arion", "mediatek,mt7621-soc"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_wlan_blue: wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; led_wlan_red: wlan_red { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 86 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index f176691aacc8..aeeab4af32eb 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc"; @@ -43,7 +44,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts index b4ba1519d3df..10decdfe82fa 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "buffalo,wsr-2533dhpl", "mediatek,mt7621-soc"; @@ -46,7 +47,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index e1b82816f0cf..c80d686d3140 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wsr-600dhp", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts index 5730ca04d31c..5487eddfd70e 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-e390ax.dts @@ -28,17 +28,20 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts b/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts index a915a5d79f0f..0a2baf19c769 100644 --- a/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts +++ b/target/linux/ramips/dts/mt7621_comfast_cf-ew72-v2.dts @@ -70,7 +70,8 @@ }; wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts index e87209fbb1d8..0f0386a1665c 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts @@ -3,6 +3,7 @@ #include "mt7621.dtsi" #include +#include #include / { @@ -46,14 +47,16 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi index b4c61fb7c667..55da73dcdab1 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi +++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi @@ -3,6 +3,7 @@ #include "mt7621.dtsi" #include +#include #include / { @@ -43,7 +44,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts index afccce15ccdd..885cf41dbf8d 100644 --- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts +++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "cudy,wr2100", "mediatek,mt7621-soc"; @@ -51,7 +52,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; 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 82160cff03f2..2c9a0302afba 100644 --- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts +++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "d-team,newifi-d2", "mediatek,mt7621-soc"; @@ -23,12 +24,14 @@ compatible = "gpio-leds"; power-amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_power_blue: power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; @@ -53,7 +56,8 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; 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 29c212671ccc..02987737cd8b 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "d-team,pbr-m1", "mediatek,mt7621-soc"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 31 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts index 7a5fbeeddb56..a96b6ad5df76 100644 --- a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,covr-x1860-a1", "mediatek,mt7621-soc"; @@ -40,18 +41,21 @@ compatible = "gpio-leds"; status_white: power { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; status_orange: status_orange { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts index 82b7c8070e29..13095319e2fa 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dap-x1860-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dap-x1860-a1", "mediatek,mt7621-soc"; @@ -41,18 +42,21 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; 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 e0a714c9dc64..13883f9f7404 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_dlink_dir-xx60-a1.dtsi" / { @@ -9,7 +11,8 @@ &leds { usb_white { - label = "white:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts index 1cca6f6b5785..8bb55bfba8aa 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-3060-a1", "mediatek,mt7621-soc"; @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts index 8e5e35945a64..336ed17a744f 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-853-a1", "mediatek,mt7621-soc"; @@ -54,19 +55,22 @@ }; usb_blue { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts index 747d1de18a06..771fc610ebf1 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-853-a3", "mediatek,mt7621-soc"; @@ -44,12 +45,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -64,7 +67,8 @@ }; usb_blue { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts index bce0e6996bef..a3753f37d431 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts @@ -6,6 +6,7 @@ #include #include +#include / { compatible = "dlink,dir-853-r1", "mediatek,mt7621-soc"; @@ -24,12 +25,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -44,7 +47,8 @@ }; usb_blue { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; 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 451722743d96..0426fe5d8f5b 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts +++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-860l-b1", "mediatek,mt7621-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_green: power2 { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi index bd8fd6f8a15d..b94a0784feb6 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -39,12 +40,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; 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 6eb3f3cdd9bf..24766b2f3b8a 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,12 +35,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi index a933b1492509..e24ee3ef2480 100644 --- a/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi +++ b/target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -36,12 +37,14 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_dual-q_h721.dts b/target/linux/ramips/dts/mt7621_dual-q_h721.dts index 2c35a8839cb6..039072cf5037 100644 --- a/target/linux/ramips/dts/mt7621_dual-q_h721.dts +++ b/target/linux/ramips/dts/mt7621_dual-q_h721.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dual-q,h721", "mediatek,mt7621-soc"; @@ -86,7 +87,8 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts index 80a271f6e33d..6af8fc50cec9 100644 --- a/target/linux/ramips/dts/mt7621_edimax_re23s.dts +++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; 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 9c0353ae28b7..a095275f5d8f 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "elecom,wrc-1167ghbk2-s", "mediatek,mt7621-soc"; @@ -29,22 +30,26 @@ }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi index 30b8d4e0104c..dae247f4ceaa 100644 --- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi +++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,22 +19,26 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index c2c2acac9f28..639e9bebd18f 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "firefly,firewrt", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; }; 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 d224fd388d7f..2c81b9cfe845 100644 --- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts +++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index 6bdba25b2b4c..4a2095e99bb5 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc"; @@ -28,7 +29,8 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "default-on"; }; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index 9a2cffeb97cf..26e6aa05a0cc 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc"; @@ -48,7 +49,8 @@ }; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "default-on"; }; diff --git a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts index 5737c0ce68f1..e6d79b316cfa 100644 --- a/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts +++ b/target/linux/ramips/dts/mt7621_hanyang_hyc-g920.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "hanyang,hyc-g920", "mediatek,mt7621-soc"; @@ -25,12 +26,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index a21a6a455b3a..70366c5dc888 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hiwifi,hc5962", "mediatek,mt7621-soc"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_status: status { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts index 9b9a98310877..ee1679110105 100644 --- a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts +++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "huasifei,ws1208v2", "mediatek,mt7621-soc"; @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_status: led-status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -55,7 +57,8 @@ }; led-usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts index be5f23ca7d6e..afadfa8a5be5 100644 --- a/target/linux/ramips/dts/mt7621_humax_e10.dts +++ b/target/linux/ramips/dts/mt7621_humax_e10.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; }; @@ -42,12 +44,14 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts index b46ba87f3940..4d7a4cf7a1b3 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "iodata,wn-ax1167gr", "mediatek,mt7621-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts index 9680aadfbbf9..061f537a96e9 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wn-dx1200gr", "mediatek,mt7621-soc"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts index 6bd5e733f4a6..eaf1a1d66a6a 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "iodata,wn-gx300gr", "mediatek,mt7621-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; 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 5ed92cf0e7dc..d8fd51292d2e 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi +++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts index 1c46f57e584b..08d59e534f61 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,wnpr2600g", "mediatek,mt7621-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts index 3bf0600e5fec..a28903b5918c 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iptime,a3004ns-dual", "mediatek,mt7621-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi index ef58382ab61c..64ef31261525 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi +++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,7 +19,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>; linux,default-trigger = "usbport"; @@ -37,7 +39,8 @@ }; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts index 7be11315c540..f75b26233a16 100644 --- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts +++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iptime,a8004t", "mediatek,mt7621-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "orange:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts index a0df60234e74..1d29c6da88bf 100644 --- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts +++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iptime,ax2004m", "mediatek,mt7621-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "amber:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts index fd9bd66bf8c7..3328c3053ec4 100644 --- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts +++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc"; @@ -35,7 +36,8 @@ }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index 349773e22cd9..03e0eab25b6b 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "jcg,q20", "mediatek,mt7621-soc"; @@ -25,12 +26,14 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts index 264c908c45b6..4bdf6a58f47d 100644 --- a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts +++ b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts @@ -3,6 +3,7 @@ #include #include +#include / { compatible = "keenetic,kn-3010", "mediatek,mt7621-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts index dd8d22445429..5cf7535b701b 100644 --- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts +++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "lenovo,newifi-d1", "mediatek,mt7621-soc"; @@ -23,17 +24,20 @@ compatible = "gpio-leds"; status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; status-green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_blue: status-blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index 3f23aa69a432..cd69291113aa 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "linksys,e5600", "mediatek,mt7621-soc"; @@ -40,23 +41,27 @@ compatible = "gpio-leds"; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; default-state = "on"; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_e7350.dts b/target/linux/ramips/dts/mt7621_linksys_e7350.dts index 2bce2d759019..0adc43df0efb 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e7350.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e7350.dts @@ -47,7 +47,8 @@ }; led_power: led-power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index 4980b4fe9b4a..78c73a188e90 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -37,7 +38,8 @@ compatible = "gpio-leds"; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; @@ -62,12 +64,14 @@ }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts index 3a6822452685..c1231b862940 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "linksys,re6500", "mediatek,mt7621-soc"; @@ -23,7 +24,8 @@ }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_linksys_re7000.dts b/target/linux/ramips/dts/mt7621_linksys_re7000.dts index 9b9c84a04876..31248e73b4a1 100644 --- a/target/linux/ramips/dts/mt7621_linksys_re7000.dts +++ b/target/linux/ramips/dts/mt7621_linksys_re7000.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "linksys,re7000", "mediatek,mt7621-soc"; @@ -26,12 +27,14 @@ }; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts index 9004e5f0fde8..46892f1e7342 100644 --- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts +++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mercusys,mr70x-v1", "mediatek,mt7621-soc"; @@ -35,12 +36,14 @@ compatible = "gpio-leds"; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led_power_orange: power-orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index 43b021fa13ae..54a10863fad2 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "mtc,wr1201", "mediatek,mt7621-soc"; @@ -19,12 +20,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; @@ -36,7 +39,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_eax12.dts b/target/linux/ramips/dts/mt7621_netgear_eax12.dts index d0e0eb247ad9..00631b9153c7 100644 --- a/target/linux/ramips/dts/mt7621_netgear_eax12.dts +++ b/target/linux/ramips/dts/mt7621_netgear_eax12.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,eax12", "mediatek,mt7621-soc"; @@ -40,12 +41,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; @@ -70,7 +73,8 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 41e603c16058..fae862bc658c 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,ex6150", "mediatek,mt7621-soc"; @@ -20,17 +21,20 @@ compatible = "gpio-leds"; power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi index 052b2a4babe6..6e225c0825c0 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mediatek,mt7621-soc"; @@ -41,19 +42,22 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; internet { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; @@ -64,7 +68,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi index 1ae7fd0f5721..15e9fa1c45bc 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mediatek,mt7621-soc"; @@ -43,22 +44,26 @@ led_power_orange: power_orange { gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>; - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; }; led_power_white: power_white { gpios = <&gpio_expander 1 GPIO_ACTIVE_LOW>; - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; }; wan_orange { gpios = <&gpio_expander 2 GPIO_ACTIVE_LOW>; - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; }; wan_white { gpios = <&gpio_expander 3 GPIO_ACTIVE_LOW>; - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; }; wlan2g { @@ -122,12 +127,14 @@ wps { gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; }; wlan { gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi index 72ff75cefa9a..a5559cb5fca2 100644 --- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi +++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "mediatek,mt7621-soc"; @@ -20,19 +21,22 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; internet { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts index 48a3302e79c4..2ad34022462c 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,wac104", "mediatek,mt7621-soc"; @@ -43,12 +44,14 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts index c0c3500af25a..31614d53d432 100644 --- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts +++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,wax202", "mediatek,mt7621-soc"; @@ -34,12 +35,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts index c58e32377e80..a13eb0f22227 100644 --- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts +++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "netis,wf2881", "mediatek,mt7621-soc"; @@ -19,14 +20,16 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts index 239159996337..718cfeae0568 100644 --- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts +++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "oraybox,x3a", "mediatek,mt7621-soc"; @@ -25,17 +26,20 @@ compatible = "gpio-leds"; led_status_red: status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_status_blue: status-blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_status_green: status-green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts index 85cf8ecfd3ef..9da689c5eba8 100644 --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "phicomm,k2p", "mediatek,mt7621-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; stat_r { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; stat_y { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_blue: stat_b { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts index 93e7280b4c06..bd1e47b10315 100644 --- a/target/linux/ramips/dts/mt7621_planex_vr500.dts +++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,vr500", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts index 4a9e420370a4..dbdce76ee075 100644 --- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts +++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "raisecom,msg1500-x-00", "mediatek,mt7621-soc"; @@ -32,7 +33,8 @@ }; led_usb: usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts index c3c5a2ff4a82..6b5436899aa1 100644 --- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts +++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts @@ -1,6 +1,7 @@ #include "mt7621.dtsi" #include +#include #include / { @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 47 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index 44b1077bc60a..e189b19522d0 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "sercomm,na502", "mediatek,mt7621-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -51,7 +53,8 @@ }; bluetooth { - label = "green:bluetooth"; + function = LED_FUNCTION_BLUETOOTH; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts index bea5998935f6..275bb2b67fa2 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502s.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502s.dts @@ -3,6 +3,7 @@ #include #include +#include / { compatible = "sercomm,na502s", "mediatek,mt7621-soc"; @@ -19,7 +20,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; @@ -40,7 +42,8 @@ }; bluetooth { - label = "green:bluetooth"; + function = LED_FUNCTION_BLUETOOTH; + color = ; gpios = <&gpio_expander1 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts index 60817edbbff7..272d62dc2472 100644 --- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts +++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "storylink,sap-g3200u3", "mediatek,mt7621-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts index da1db0366f46..19ae8bb8b600 100644 --- a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts +++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "thunder,timecloud", "mediatek,mt7621-soc"; @@ -22,12 +23,14 @@ compatible = "gpio-leds"; statw { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; led_statuso: stato { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts b/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts index 2d8717e3cdd0..00f47bd9c038 100644 --- a/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts +++ b/target/linux/ramips/dts/mt7621_tozed_zlt-s12-pro.dts @@ -36,12 +36,14 @@ }; led_power_blue: led-power-blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_power_yellow: led-power-yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 29 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts index 4de71d9e4295..eaf38f7b7553 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-ax23-v1", "mediatek,mt7621-soc"; @@ -41,7 +42,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; @@ -58,22 +60,26 @@ }; wan-green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan-orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; 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 522408b220c8..7320a706b1d5 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-c6u-v1", "mediatek,mt7621-soc"; @@ -41,24 +42,28 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&ehci_port2>; linux,default-trigger = "usbport"; }; wan-orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; @@ -75,7 +80,8 @@ }; wan-green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 45 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts index 087910233e28..13ff83ee9431 100644 --- a/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts +++ b/target/linux/ramips/dts/mt7621_tplink_deco-m4r-v4.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,deco-m4r-v4", "mediatek,mt7621-soc"; @@ -55,7 +56,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts index 6b73ffff24f1..f2e18ee8d1e1 100644 --- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts +++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts @@ -42,16 +42,19 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; @@ -75,7 +78,8 @@ gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index be23abf4c83e..7f4ae256bf90 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,re350-v1", "mediatek,mt7621-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; @@ -33,12 +35,14 @@ }; wps_r { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; }; wps_b { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts index 7dcd5e553cd7..9621693319e7 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re650-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,re650-v2", "mediatek,mt7621-soc"; @@ -53,7 +54,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; @@ -70,12 +72,14 @@ }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 3784a4f3c952..c688e5d15608 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -50,7 +51,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; @@ -67,12 +69,14 @@ }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts index 1e0fd2023970..0221278d8f19 100644 --- a/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts +++ b/target/linux/ramips/dts/mt7621_tplink_tl-wpa8631p-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wpa8631p-v3", "mediatek,mt7621-soc"; @@ -53,12 +54,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 29 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts index f09ccba58556..7568daf6669d 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts +++ b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts @@ -2,6 +2,7 @@ #include #include +#include / { model = "Ubiquiti UniFi Switch Flex"; @@ -33,12 +34,14 @@ compatible = "gpio-leds"; led_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; led_white: status_white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi index 813ddc7327a0..b78faf975eca 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "unielec,u7621-01", "mediatek,mt7621-soc"; @@ -40,7 +41,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi index 9e91a0a2993d..42f6cea2d3c0 100644 --- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi +++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi @@ -9,6 +9,7 @@ #include #include +#include / { compatible = "unielec,u7621-06", "mediatek,mt7621-soc"; @@ -49,7 +50,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi b/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi index 7df61c4eb30d..b33a288620f0 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn53xax.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -45,12 +46,14 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts index 55e828a29557..c673eb8497ce 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wavlink,ws-wn572hp3-4g", "mediatek,mt7621-soc"; @@ -50,7 +51,8 @@ }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index 8b018e18ae44..37319b763de6 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -12,7 +13,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index 78f81314fc12..18e5b7361d89 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "winstars,ws-wn583a6", "mediatek,mt7621-soc"; @@ -25,17 +26,20 @@ }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 25 GPIO_ACTIVE_LOW>; }; }; 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 a9b62b1b28d3..1dfded14b1dd 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_nand_128m.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; 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 8f88eb175dd6..61359e8b21b1 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 @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_mi-router-4a-common.dtsi" / { @@ -11,12 +13,14 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts index 719d430fd874..779b87816124 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-gigabit-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_mi-router-4a-common.dtsi" / { @@ -14,22 +16,26 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_yellow { - label = "yellow:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts index 6cca16a79b52..d3221315bfb2 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-ac2100.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_router-ac2100.dtsi" / { @@ -18,22 +20,26 @@ compatible = "gpio-leds"; wan_yellow { - label = "yellow:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts index 4299de318bf1..9ccfd25d5764 100644 --- a/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts +++ b/target/linux/ramips/dts/mt7621_xiaomi_redmi-router-ac2100.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7621_xiaomi_router-ac2100.dtsi" / { @@ -18,22 +20,26 @@ compatible = "gpio-leds"; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_status_white: status_white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 10 GPIO_ACTIVE_LOW>; }; wan_white { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 147713ddce19..989dc0913ed9 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "xzwifi,creativebox-v1", "mediatek,mt7621-soc"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 31 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts index e715237a4012..9ad24ef66eed 100644 --- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts +++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "youhua,wr1200js", "mediatek,mt7621-soc"; @@ -25,12 +26,14 @@ }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts index 98d2e6892254..c96495da2783 100644 --- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts +++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "youku,yk-l2", "mediatek,mt7621-soc"; @@ -24,18 +25,21 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts index c61189c4bc19..8bd795e88450 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "yuncore,fap640", "mediatek,mt7621-soc"; @@ -25,22 +26,26 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&switch0 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "mt7530-0:04:link"; }; diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts index caebe0b589a3..e99753209bc3 100644 --- a/target/linux/ramips/dts/mt7621_yuncore_fap690.dts +++ b/target/linux/ramips/dts/mt7621_yuncore_fap690.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "yuncore,fap690", "mediatek,mt7621-soc"; @@ -25,17 +26,20 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index 3756baa14efe..e00c2cb51828 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wg2626", "mediatek,mt7621-soc"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 87ed1c712970..6fb8d2a69292 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zbtlink,zbt-wg3526", "mediatek,mt7621-soc"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 24 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts index 307819e746e9..e4795352ccb8 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_lte5398-m904.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,lte5398-m904", "mediatek,mt7621-soc"; @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; linux,default-trigger = "usbport"; trigger-sources = <&ehci_port2>; diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts index 2f6654da5c3e..907e90b77b83 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,wap6805", "mediatek,mt7621-soc"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; }; @@ -31,7 +33,8 @@ }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts index 641844ccc0d8..d4f8b26aea88 100644 --- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts +++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc"; @@ -43,7 +44,8 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts index abb86456da85..833a44cc7124 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dts @@ -2,6 +2,8 @@ // Copyright (c) 2022 Ray Wang // Copyright (c) 2022 Ivan Pavlov +#include + #include "mt7628an_asus_rt-ac1200.dtsi" / { @@ -12,7 +14,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi index e91f1b602979..7dce3513d120 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-ac1200.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,7 +35,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi index aa642da11fdd..29c3b08921dd 100644 --- a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi +++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -27,23 +28,27 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts index 1b9e0047ccc7..02c48791b6a0 100644 --- a/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts +++ b/target/linux/ramips/dts/mt7628an_buffalo_wcr-1166ds.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc"; @@ -76,7 +77,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts index 1d6304cfa771..2a304e9c630b 100644 --- a/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts +++ b/target/linux/ramips/dts/mt7628an_comfast_cf-wr617ac.dts @@ -4,6 +4,7 @@ #include "mt7628an.dtsi" #include #include +#include / { compatible = "comfast,cf-wr617ac", "mediatek,mt7628an-soc"; @@ -21,11 +22,13 @@ leds { compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts index 883459d2f303..df1b33472155 100644 --- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts +++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "cudy,wr1000", "mediatek,mt7628an-soc"; @@ -46,7 +47,8 @@ }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; @@ -57,7 +59,8 @@ }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; 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 f5e9a169d4da..6545f8962334 100644 --- a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts +++ b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "d-team,pbr-d1", "mediatek,mt7628an-soc"; @@ -26,14 +27,16 @@ compatible = "gpio-leds"; usb { - label = "orange:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts b/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts index 3ad34c51c1a9..8ed409c19ea3 100644 --- a/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts +++ b/target/linux/ramips/dts/mt7628an_dlink_dap-1325-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dap-1325-a1", "mediatek,mt7628an-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts index 9d8b360c6a3f..4b29ddd78809 100644 --- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "elecom,wrc-1167fs", "mediatek,mt7628an-soc"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; @@ -31,7 +33,8 @@ }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; @@ -41,7 +44,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; 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 d84290d4c123..9540a1058d3d 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts @@ -2,6 +2,7 @@ #include #include +#include /{ compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc"; @@ -23,18 +24,21 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; default-state = "on"; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi index a40be00887f1..7ffdeb83278d 100644 --- a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi +++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -23,12 +24,14 @@ compatible = "gpio-leds"; led_power_blue: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts index 69e22f6dd7d6..2cc3fee39407 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "hilink,hlk-7628n", "mediatek,mt7628an-soc"; @@ -23,7 +24,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts index 121a24b50250..4e8704b36b74 100644 --- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts +++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "hilink,hlk-7688a", "mediatek,mt7628an-soc"; @@ -29,7 +30,8 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_iptime_a3.dts b/target/linux/ramips/dts/mt7628an_iptime_a3.dts index d90a075af564..405c10ffb71d 100644 --- a/target/linux/ramips/dts/mt7628an_iptime_a3.dts +++ b/target/linux/ramips/dts/mt7628an_iptime_a3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_iptime.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ramips/dts/mt7628an_iptime_a604m.dts b/target/linux/ramips/dts/mt7628an_iptime_a604m.dts index 2f626f1adf70..cbc2f3027f9f 100644 --- a/target/linux/ramips/dts/mt7628an_iptime_a604m.dts +++ b/target/linux/ramips/dts/mt7628an_iptime_a604m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_iptime.dtsi" / { @@ -23,7 +25,8 @@ }; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts index 475426896619..bd916aab4173 100644 --- a/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts +++ b/target/linux/ramips/dts/mt7628an_keenetic_kn-1613.dts @@ -3,6 +3,7 @@ #include #include +#include / { compatible = "keenetic,kn-1613", "mediatek,mt7628an-soc"; @@ -23,7 +24,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts index b0b41f0420d9..8e1c6d81740f 100644 --- a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts +++ b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r16.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_kroks.dtsi" / { @@ -8,7 +10,8 @@ leds { status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts index eb36c986f6d4..d641fa078f9f 100644 --- a/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts +++ b/target/linux/ramips/dts/mt7628an_kroks_kndrt31r19.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_kroks.dtsi" / { @@ -8,7 +10,8 @@ leds { status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; }; wifi { diff --git a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts index 26ff86dac2d2..3eff008dda0e 100644 --- a/target/linux/ramips/dts/mt7628an_linksys_e5400.dts +++ b/target/linux/ramips/dts/mt7628an_linksys_e5400.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "linksys,e5400", "mediatek,mt7628an-soc"; @@ -46,7 +47,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts index 074011fbb9b2..f520305322a6 100644 --- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts +++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "mercury,mac1200r-v2", "mediatek,mt7628an-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts index ebaa4326aea9..0f5525378017 100644 --- a/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts +++ b/target/linux/ramips/dts/mt7628an_motorola_mwr03.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Motorola MWR03"; @@ -30,12 +31,14 @@ compatible = "gpio-leds"; led_status_orange: status_orange { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; led_status_white: status_white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi index 98d132e891f1..550e59301a64 100644 --- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi +++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -27,12 +28,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; @@ -48,12 +51,14 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_oraybox_x1.dts b/target/linux/ramips/dts/mt7628an_oraybox_x1.dts index 9f43e46fac0c..77a9a78d14e1 100644 --- a/target/linux/ramips/dts/mt7628an_oraybox_x1.dts +++ b/target/linux/ramips/dts/mt7628an_oraybox_x1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "oraybox,x1", "mediatek,mt7628an-soc"; @@ -24,17 +25,20 @@ compatible = "gpio-leds"; led_status_blue: status-blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_HIGH>; }; led_status_red: status-red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; led_status_white: status-white { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts index 7c0e7551ce2a..0f0a3b0147e9 100644 --- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts +++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "ravpower,rp-wd009", "mediatek,mt7628an-soc"; @@ -37,12 +38,14 @@ }; sd_white { - label = "white:sd"; + function = LED_FUNCTION_SD; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; sd_red { - label = "red:sd"; + function = LED_FUNCTION_SD; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts index fc111019a7d9..1a1bea51a953 100644 --- a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts +++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "skylab,skw92a", "mediatek,mt7628an-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_power: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts index dfe5192e12c5..b7b0f43249b2 100644 --- a/target/linux/ramips/dts/mt7628an_tama_w06.dts +++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tama,w06", "mediatek,mt7628an-soc"; @@ -11,17 +12,20 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wireless { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_totolink_a3.dts b/target/linux/ramips/dts/mt7628an_totolink_a3.dts index 246dfadddd89..c8a4f9195811 100644 --- a/target/linux/ramips/dts/mt7628an_totolink_a3.dts +++ b/target/linux/ramips/dts/mt7628an_totolink_a3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_iptime.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "blue:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; 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 0d09e5434564..1031c3375f44 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts @@ -15,22 +15,26 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -47,7 +51,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; }; @@ -106,4 +111,6 @@ nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; }; +#include + }; 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 93695660aebb..eef9635e16a4 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m-split-uboot.dtsi" / { @@ -33,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; @@ -50,22 +53,26 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; }; 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 bfb39b3531ce..f19f8704adea 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts @@ -31,22 +31,26 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; @@ -61,7 +65,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; }; @@ -105,4 +110,6 @@ nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; }; +#include + }; 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 302a9d9c6a2a..59a61e3d8644 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m-split-uboot.dtsi" / { @@ -33,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -48,22 +51,26 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts index c3a890bc2ddd..b2571a06d1ff 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v6.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m-split-uboot.dtsi" / { @@ -33,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -48,17 +51,20 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi index 8826365bebfd..4423b232c576 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -38,7 +39,8 @@ compatible = "gpio-leds"; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; @@ -48,12 +50,14 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; }; wifi2g_green { diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi index 029b95591177..13f8d89fd2f9 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi +++ b/target/linux/ramips/dts/mt7628an_tplink_re305.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -34,7 +35,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; 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 5f35cb4c7fac..39e949261292 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,tl-mr3020-v3", "mediatek,mt7628an-soc"; @@ -47,7 +48,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -60,18 +62,21 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts index 297e7b441d4f..d5a56412f97f 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3420-v5.dts @@ -31,39 +31,46 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; @@ -85,4 +92,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; 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 d0350f9924d9..21d1e483361e 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -33,23 +35,27 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; 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 f77f1acbf2a7..1bd35fc33491 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -33,23 +35,27 @@ compatible = "gpio-leds"; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts index 44a483ed6d6b..af1a758d789b 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wa801nd-v5.dts @@ -31,28 +31,33 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; }; }; @@ -79,4 +84,6 @@ nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_f100 0>; nvmem-cell-names = "eeprom", "mac-address"; +#include + }; 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 01cbba202448..b14eb64a22b0 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -27,7 +29,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts index e480395ffd46..1bf826349eb9 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v4.dts @@ -25,27 +25,32 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; @@ -75,4 +80,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; 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 3e639668bbaa..8d14992ea026 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tplink,tl-wr840n-v5", "mediatek,mt7628an-soc"; @@ -33,12 +34,14 @@ compatible = "gpio-leds"; led_power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts index e1e77eba237e..2fda2e9b889a 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v13.dts @@ -31,12 +31,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; @@ -61,17 +63,20 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; @@ -101,4 +106,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; 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 5b3bcbe63ab8..11f3552e5f69 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr841n-v14", "mediatek,mt7628an-soc"; @@ -33,23 +34,27 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; led_wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts index b5c3bd9ab5b8..dc248689bced 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr842n-v5.dts @@ -31,39 +31,46 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; @@ -85,4 +92,6 @@ &esw { mediatek,portmap = <0x3e>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts index 9fc7f97ae510..b8a394b26ba8 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr850n-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_tplink_8m.dtsi" / { @@ -27,27 +29,32 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 36 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; 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 0029be21e0f9..b7aed8132d2f 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts @@ -43,34 +43,40 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; @@ -101,4 +107,6 @@ nvmem-cells = <&eeprom_factory_28000>, <&macaddr_factory_f100 (-1)>; nvmem-cell-names = "eeprom", "mac-address"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi index b31ffba80907..e9a942785fa0 100644 --- a/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi +++ b/target/linux/ramips/dts/mt7628an_unielec_u7628-01.dtsi @@ -9,6 +9,7 @@ #include #include +#include / { compatible = "unielec,u7628-01", "mediatek,mt7628an-soc"; @@ -38,17 +39,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; @@ -73,7 +77,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts b/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts index 26012a6a4f37..e1a1bc599d1f 100644 --- a/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts +++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2-lite.dts @@ -15,7 +15,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; }; }; @@ -23,4 +24,6 @@ &firmware { reg = <0x50000 0x7b0000>; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts index 1ae08ed84079..1e4b7c1cb0f1 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn531a3.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -52,12 +53,14 @@ }; led_status_blue: led_status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; }; led_status_red: led_status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts index 76e89b77b6c8..0d2dd4e6c2b8 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -21,13 +22,15 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 43 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts index 7b12dac350c2..06167c0eb24d 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -42,7 +43,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts index fa06c44e3fc0..60f8e6db3897 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn576a2.dts @@ -3,6 +3,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -75,12 +76,14 @@ }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts index d2b45faa25d7..b1b29b38decd 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts @@ -3,6 +3,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -36,17 +37,20 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts index a9b98683042e..08a8d367eb93 100644 --- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts +++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts @@ -3,6 +3,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -65,17 +66,20 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 40 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts index 01c8bb942a07..a18fdd27c8e2 100644 --- a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts +++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "wiznet,wizfi630s", "mediatek,mt7628an-soc"; @@ -31,7 +32,8 @@ }; ledwps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 42 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts index 88ec3f0c3064..b82b740dcd68 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2p.dts @@ -15,7 +15,8 @@ compatible = "gpio-leds"; led_indicator: indicator { - label = "blue:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; gpios = <&gpio 41 GPIO_ACTIVE_LOW>; }; }; @@ -26,4 +27,6 @@ groups = "i2c", "gpio"; function = "gpio"; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts index 511354ae5e95..37c2d1e9a4a0 100644 --- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts +++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2r.dts @@ -18,7 +18,8 @@ pinctrl-0 = <&led_pins>; led_indicator: indicator { - label = "blue:indicator"; + function = LED_FUNCTION_INDICATOR; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; @@ -48,4 +49,6 @@ reg = <1>; spi-max-frequency = <10000000>; }; +#include + }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts index 49ca637cb9e6..4009033689da 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_xiaomi_mi-router-4.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_yellow: power_yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; 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 f40717267c7a..621bd22b00b7 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 @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_xiaomi_mi-router-4.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_yellow: power_yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; 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 27348b3ad7d6..a406c8f124e0 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "mt7628an_xiaomi_mi-router-4.dtsi" / { @@ -18,17 +20,20 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_yellow: power_yellow { - label = "yellow:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts index 2adb6ba8e368..fc47be479c51 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-3c.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "xiaomi,miwifi-3c", "mediatek,mt7628an-soc"; @@ -25,17 +26,20 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts index 66297232e3a5..8f431cae62ee 100644 --- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts +++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc"; @@ -23,17 +24,20 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts index 64f3d6d83f3f..976994f53893 100644 --- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts +++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts @@ -1,6 +1,7 @@ #include "mt7628an.dtsi" #include +#include #include / { @@ -32,7 +33,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 39 GPIO_ACTIVE_LOW>; }; @@ -47,7 +49,8 @@ }; led_wlan: wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; }; 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 95eb9cfd9e67..92d63f250136 100644 --- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts +++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-extra-ii", "mediatek,mt7628an-soc"; @@ -44,7 +45,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -59,7 +61,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts index dc61cd9da506..dbbaf9c45e48 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "airlink101,ar670w", "ralink,rt2880-soc"; @@ -62,12 +63,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; wpsblue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts index f41a9b8561ed..d60707a7c3d7 100644 --- a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts +++ b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "airlink101,ar725w", "ralink,rt2880-soc"; @@ -67,17 +68,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; wpsred { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; wpsblue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts index 0275a84bde0f..6874bd39f220 100644 --- a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts +++ b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts @@ -2,6 +2,7 @@ #include #include +#include / { #address-cells = <1>; @@ -94,7 +95,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; 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 37288e5fc401..bed5b950a40c 100644 --- a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts +++ b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts @@ -2,6 +2,7 @@ #include #include +#include / { #address-cells = <1>; @@ -99,7 +100,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; 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 105a3c49d486..3e8a42e18a15 100644 --- a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts +++ b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dap-1522-a1", "ralink,rt2880-soc"; @@ -100,7 +101,8 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio2 17 GPIO_ACTIVE_LOW>; }; @@ -115,7 +117,8 @@ }; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio2 20 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts b/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts index 3f4142f50895..ac65264c5cf3 100644 --- a/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts +++ b/target/linux/ramips/dts/rt2880_ralink_v11st-fe.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "ralink,v11st-fe", "ralink,rt2880-soc"; @@ -75,7 +76,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi index 41985278632a..74e3edd4edce 100644 --- a/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi +++ b/target/linux/ramips/dts/rt3050_alphanetworks_asl26555.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "alphanetworks,asl26555", "ralink,rt3050-soc"; @@ -39,27 +40,32 @@ }; wan-red { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; }; wan-green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; 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 a452a44202fc..9fb325bc0910 100644 --- a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts +++ b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n10-plus", "ralink,rt3050-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts index 938f5d440c87..d89fb0995e7e 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,wl-330n", "ralink,rt3050-soc"; @@ -23,7 +24,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts index 4f8b7e73ea4c..ef0668c02fdc 100644 --- a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts +++ b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,wl-330n3g", "ralink,rt3050-soc"; @@ -28,7 +29,8 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts index e3a26bd4cf61..c0c9ffec135f 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dcs-930", "ralink,rt3050-soc"; @@ -74,12 +75,14 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; 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 a05122b6040c..7a4907c4db1c 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-300-b1", "ralink,rt3050-soc"; @@ -86,27 +87,32 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; 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 73e65128e592..e5441d2d652d 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-600-b1", "ralink,rt3050-soc"; @@ -86,27 +87,32 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts index 0d81f7e09662..30022a9ced99 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-615-d", "ralink,rt3050-soc"; @@ -83,28 +84,33 @@ compatible = "gpio-leds"; status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; 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 3a5624d125ee..f080f47b5119 100644 --- a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts +++ b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-620-a1", "ralink,rt3050-soc"; @@ -86,32 +87,38 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; wps2 { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts index 62686b5489bf..e95889f9ef56 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -78,12 +79,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts index c0fdb9995dea..0cf0943ed64d 100644 --- a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts +++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -83,7 +84,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_huawei_d105.dts b/target/linux/ramips/dts/rt3050_huawei_d105.dts index 5e217aa36258..7c3dc845bd56 100644 --- a/target/linux/ramips/dts/rt3050_huawei_d105.dts +++ b/target/linux/ramips/dts/rt3050_huawei_d105.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "huawei,d105", "ralink,rt3050-soc"; @@ -69,12 +70,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3050_netcore_nw718.dts b/target/linux/ramips/dts/rt3050_netcore_nw718.dts index beceb3f35d69..2c2e302ec68f 100644 --- a/target/linux/ramips/dts/rt3050_netcore_nw718.dts +++ b/target/linux/ramips/dts/rt3050_netcore_nw718.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "netcore,nw718", "ralink,rt3050-soc"; @@ -18,19 +19,22 @@ compatible = "gpio-leds"; led_cpu: cpu { - label = "amber:cpu"; + function = LED_FUNCTION_CPU; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; usb { - label = "amber:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts index a241e91bafbb..8f153fbc2478 100644 --- a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts +++ b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sparklan,wcr-150gn", "ralink,rt3050-soc"; @@ -76,7 +77,8 @@ }; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts index 95faff03b44f..6f8baaf0d24a 100644 --- a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts +++ b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "teltonika,rut5xx", "ralink,rt3050-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; 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 2accb51c3f9b..36e7706b0213 100644 --- a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts +++ b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-638apb-v2", "ralink,rt3050-soc"; @@ -86,12 +87,14 @@ compatible = "gpio-leds"; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; led_wps_green: wps2 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts index a62f7757c7f8..7e79f4260c73 100644 --- a/target/linux/ramips/dts/rt3052_accton_wr6202.dts +++ b/target/linux/ramips/dts/rt3052_accton_wr6202.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "accton,wr6202", "ralink,rt3052-soc"; @@ -15,7 +16,8 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts index 0b9270461bd2..e8c429cf1d08 100644 --- a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts +++ b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "alfa-network,w502u", "ralink,rt3052-soc"; @@ -73,14 +74,16 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts b/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts index 49965d4e5e8f..279826d7f101 100644 --- a/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts +++ b/target/linux/ramips/dts/rt3052_asiarf_awapn2403.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asiarf,awapn2403", "ralink,rt3052-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts index d60dabb5ea6b..8c9cca940f31 100644 --- a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts +++ b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n13u", "ralink,rt3052-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts index 456bc204157f..9aac3f9d8e73 100644 --- a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts +++ b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "aximcom,mr-102n", "ralink,rt3052-soc"; @@ -79,19 +80,22 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; led_status: status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts index 4a23d65628c2..37d7b36d92e3 100644 --- a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts +++ b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "aztech,hw550-3g", "ralink,rt3052-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; @@ -81,12 +83,14 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts index 75cc1385cdd3..b9fe0730be58 100644 --- a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts +++ b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dap-1350", "ralink,rt3052-soc"; @@ -79,17 +80,20 @@ compatible = "gpio-leds"; led_power_blue: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; power2 { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts index 2c3b759c041a..933459a90bf7 100644 --- a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts +++ b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "engenius,esr-9753", "ralink,rt3052-soc"; @@ -69,12 +70,14 @@ compatible = "gpio-leds"; led_power: power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts index 9a256e65dc83..e2d16e9a862d 100644 --- a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts +++ b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "fon,fonera-20n", "ralink,rt3052-soc"; @@ -74,12 +75,14 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "orange:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts index dc00110f1b7b..27de7e4306e6 100644 --- a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts +++ b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "huawei,hg255d", "ralink,rt3052-soc"; @@ -75,7 +76,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; @@ -85,19 +87,22 @@ }; wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts index 6fb85b237400..acd040a68e01 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "jcg,jhr-n825r", "ralink,rt3052-soc"; @@ -68,7 +69,8 @@ leds { compatible = "gpio-leds"; led_system: system { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts index 6096019b1031..4bcb91eacfec 100644 --- a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts +++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "jcg,jhr-n926r", "ralink,rt3052-soc"; @@ -69,17 +70,20 @@ compatible = "gpio-leds"; wlan1 { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; }; wlan2 { - label = "yellow:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; wlan3 { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts b/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts index e1d1197d7092..52d725e080ee 100644 --- a/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts +++ b/target/linux/ramips/dts/rt3052_mofinetwork_mofi3500-3gn.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "mofinetwork,mofi3500-3gn", "ralink,rt3052-soc"; @@ -65,7 +66,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; @@ -77,12 +79,14 @@ }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts index 856dc85679dc..7f22a3bf6f47 100644 --- a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts +++ b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "netgear,wnce2001", "ralink,rt3052-soc"; @@ -22,22 +23,26 @@ compatible = "gpio-leds"; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan-green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; wlan-red { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts index b95e919591e3..03486cac91e1 100644 --- a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts +++ b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "nexaira,bc2", "ralink,rt3052-soc"; @@ -62,7 +63,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts index 7dcecc078bd5..f5ec7592ae2f 100644 --- a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts +++ b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "omnima,miniembwifi", "ralink,rt3052-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts index 5461ee2f9568..1d5d334af206 100644 --- a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts +++ b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "petatel,psr-680w", "ralink,rt3052-soc"; @@ -73,7 +74,8 @@ compatible = "gpio-leds"; led_wan: wan { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts index c3d7993ae66a..f88525666b00 100644 --- a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts +++ b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-w300nh2", "ralink,rt3052-soc"; @@ -75,17 +76,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wps { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts b/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts index 495f187a37e5..736a56f2da0e 100644 --- a/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts +++ b/target/linux/ramips/dts/rt3052_prolink_pwh2004.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "prolink,pwh2004", "ralink,rt3052-soc"; @@ -70,7 +71,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts b/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts index 1b5ba03feb8d..4d51839db7f9 100644 --- a/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts +++ b/target/linux/ramips/dts/rt3052_ralink_v22rw-2x2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "ralink,v22rw-2x2", "ralink,rt3052-soc"; @@ -70,7 +71,8 @@ }; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts index 82c3783e1f63..f0a96d04489c 100644 --- a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts +++ b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sitecom,wl-351", "ralink,rt3052-soc"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts index a4d11072ea57..2be0c26c7b19 100644 --- a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts +++ b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "tenda,w306r-v2", "ralink,rt3052-soc"; @@ -74,7 +75,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi index 869cf32d7879..c18112fc01eb 100644 --- a/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi +++ b/target/linux/ramips/dts/rt3052_unbranded_wr512-3gn.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "unbranded,wr512-3gn", "ralink,rt3052-soc"; @@ -32,7 +33,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts index ec5e4af5e28a..dc07c597c3fb 100644 --- a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts +++ b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "unbranded,xdx-rn502j", "ralink,rt3052-soc"; @@ -74,7 +75,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts index 8104bf605387..a019e17344f2 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "upvel,ur-326n4g", "ralink,rt3052-soc"; @@ -84,7 +85,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts index 050ce21a7536..4a0e196baa1c 100644 --- a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts +++ b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "upvel,ur-336un", "ralink,rt3052-soc"; @@ -84,7 +85,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts index 2c16736c962a..a1ac3239b135 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,keenetic", "ralink,rt3052-soc"; @@ -69,19 +70,22 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&otg_port1>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts index 18dcf6b6760d..4bb8cefe5613 100644 --- a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts +++ b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,nbg-419n", "ralink,rt3052-soc"; @@ -69,12 +70,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; 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 dc2c49cd0b80..4c80d479c196 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-615-h1", "ralink,rt3352-soc"; @@ -19,28 +20,33 @@ compatible = "gpio-leds"; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; led_status_green: status2 { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; default-state = "on"; }; wan { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; wan2 { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; 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 de020706dfd6..c9f71f157da4 100644 --- a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts +++ b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-620-d1", "ralink,rt3352-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; 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 0ac89bce43b2..db58009e6d4c 100644 --- a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts +++ b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zyxel,nbg-419n-v2", "ralink,rt3352-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts index 7837a4ca3da9..af3f390d885d 100644 --- a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts +++ b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asus,rt-n56u", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -96,22 +97,26 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts index 87d52d679c12..19d15bed597a 100644 --- a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts +++ b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-645", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -47,7 +48,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts index 60ec3dacf501..0811c2493482 100644 --- a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts +++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts @@ -2,6 +2,7 @@ #include #include +#include #include / { @@ -37,12 +38,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3662_engenius_esr600h.dts b/target/linux/ramips/dts/rt3662_engenius_esr600h.dts index e142fe534743..2356aa93f900 100644 --- a/target/linux/ramips/dts/rt3662_engenius_esr600h.dts +++ b/target/linux/ramips/dts/rt3662_engenius_esr600h.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,esr600h", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -20,13 +21,15 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; default-state = "on"; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3662_omnima_hpm.dts b/target/linux/ramips/dts/rt3662_omnima_hpm.dts index e06e6986ec2b..3a09053f7b03 100644 --- a/target/linux/ramips/dts/rt3662_omnima_hpm.dts +++ b/target/linux/ramips/dts/rt3662_omnima_hpm.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "omnima,hpm", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -33,13 +34,15 @@ compatible = "gpio-leds"; power { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts index b022b5c2be70..d9f2e8c42529 100644 --- a/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts +++ b/target/linux/ramips/dts/rt3662_samsung_cy-swr1100.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "samsung,cy-swr1100", "ralink,rt3662-soc", "ralink,rt3883-soc"; @@ -103,19 +104,22 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts b/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts index 78c9bb4b6d54..38667a5fdacb 100644 --- a/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts +++ b/target/linux/ramips/dts/rt3883_belkin_f9k1109v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "rt3883_belkin_f9k110x.dtsi" / { @@ -41,12 +43,14 @@ }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts index 17f3c10bc90e..5067a53457cf 100644 --- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts +++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "sitecom,wlr-6000", "ralink,rt3883-soc"; @@ -29,7 +30,8 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts index f23dc1cb0390..e98274143591 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-691gr", "ralink,rt3883-soc"; @@ -93,7 +94,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts index ee2ca91af7ff..93a5aac758fa 100644 --- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts +++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-692gr", "ralink,rt3883-soc"; @@ -87,12 +88,14 @@ compatible = "gpio-leds"; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; led_wps_green: wps2 { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts index e46b33659590..473672135157 100644 --- a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts +++ b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "airlive,air3gii", "ralink,rt5350-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi index b9905f62f599..0dbeeba63919 100644 --- a/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi +++ b/target/linux/ramips/dts/rt5350_asiarf_awm002-evb.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "asiarf,awm002-evb", "ralink,rt5350-soc"; @@ -10,17 +11,20 @@ compatible = "gpio-leds"; tx { - label = "green:tx"; + function = LED_FUNCTION_TX; + color = ; gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; }; rx { - label = "green:rx"; + function = LED_FUNCTION_RX; + color = ; gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_belkin_f7c027.dts b/target/linux/ramips/dts/rt5350_belkin_f7c027.dts index b1a897a85950..013dba456bef 100644 --- a/target/linux/ramips/dts/rt5350_belkin_f7c027.dts +++ b/target/linux/ramips/dts/rt5350_belkin_f7c027.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "belkin,f7c027", "ralink,rt5350-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; led_status_orange: orange { - label = "orange:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; }; 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 1e561136fae5..6f671cc58fb3 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dcs-930l-b1", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; }; 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 13100edf0461..8e586ca6e1a8 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-300-b7", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; 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 577b3a0a3e7c..501c06da4631 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-320-b1", "ralink,rt5350-soc"; @@ -18,17 +19,20 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; 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 7467900e4268..535e19284f5d 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dir-610-a1", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; 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 3475f4ccf70b..3c1d42ec73ea 100644 --- a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts +++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "dlink,dwr-512-b", "ralink,rt5350-soc"; @@ -39,7 +40,8 @@ gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; 2g { diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts index 9a9580a3fba0..cabc7bf26431 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hame,mpr-a1", "ralink,rt5350-soc"; @@ -23,7 +24,8 @@ }; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts index 5a06ef46fb35..402071a8523a 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hame,mpr-a2", "ralink,rt5350-soc"; @@ -23,7 +24,8 @@ }; power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts index 70acc3fc4393..b41f5f0819ec 100644 --- a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts +++ b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "hootoo,ht-tm02", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts index b1a28815f6a6..b27408b67b92 100644 --- a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts +++ b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "intenso,memory2move", "ralink,rt5350-soc"; @@ -27,7 +28,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts index ca98ab3599f7..ea75306ec487 100644 --- a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts +++ b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "omnima,miniembplug", "ralink,rt5350-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts index db349de5e104..81fd2056388f 100644 --- a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts +++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "planex,mzk-dp150n", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_poray_m3.dts b/target/linux/ramips/dts/rt5350_poray_m3.dts index 505fba650e60..b6c8a8c0d147 100644 --- a/target/linux/ramips/dts/rt5350_poray_m3.dts +++ b/target/linux/ramips/dts/rt5350_poray_m3.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,m3", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_poray_m4.dtsi b/target/linux/ramips/dts/rt5350_poray_m4.dtsi index fd358ff8efd5..fc411265918f 100644 --- a/target/linux/ramips/dts/rt5350_poray_m4.dtsi +++ b/target/linux/ramips/dts/rt5350_poray_m4.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,m4", "ralink,rt5350-soc"; @@ -17,7 +18,8 @@ compatible = "gpio-leds"; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_poray_x5.dts b/target/linux/ramips/dts/rt5350_poray_x5.dts index d441fd3144a7..fc654563a6e8 100644 --- a/target/linux/ramips/dts/rt5350_poray_x5.dts +++ b/target/linux/ramips/dts/rt5350_poray_x5.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,x5", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ramips/dts/rt5350_poray_x8.dts b/target/linux/ramips/dts/rt5350_poray_x8.dts index f02eac27b128..a4284342d04a 100644 --- a/target/linux/ramips/dts/rt5350_poray_x8.dts +++ b/target/linux/ramips/dts/rt5350_poray_x8.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "poray,x8", "ralink,rt5350-soc"; @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts index 2810b7a70103..a463d78236d1 100644 --- a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts +++ b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "trendnet,tew-714tru", "ralink,rt5350-soc"; @@ -11,7 +12,8 @@ compatible = "gpio-leds"; usb { - label = "red:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts index 64fd8c6b15e6..a92798a9613a 100644 --- a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts +++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "unbranded,a5-v11", "ralink,rt5350-soc"; @@ -24,7 +25,8 @@ }; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi b/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi index f3ef0edfe48d..15049e032fd3 100644 --- a/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi +++ b/target/linux/ramips/dts/rt5350_vocore_vocore.dtsi @@ -144,7 +144,8 @@ led_status: status { /* UARTF_RXD */ - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; }; @@ -248,4 +249,6 @@ spi-max-frequency = <10000000>; reg = <0>; }; +#include + }; diff --git a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts index 00fbb5e927ae..8f8ffa66d980 100644 --- a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts +++ b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts @@ -2,6 +2,7 @@ #include #include +#include / { compatible = "zorlik,zl5900v2", "ralink,rt5350-soc"; @@ -18,12 +19,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts index 9e1e47c099bd..c81a2d503638 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-4g-b.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-4g-b", "ralink,rt5350-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; @@ -40,7 +43,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; }; 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 6effb4f075b6..3cf3e7b07d96 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-lite-b", "ralink,rt5350-soc"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts index 8b1e0584b6f1..eed11e59bf04 100644 --- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts +++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "zyxel,keenetic-start", "ralink,rt5350-soc"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; -- 2.30.2