From e3ddfcc70c604c6eb9172a497df2291489dc1890 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Wed, 7 Feb 2024 14:48:34 +0100 Subject: [PATCH] ath79: 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 --- .../ath79/dts/ar1022_sitecom_wlr-7100.dts | 4 +++- .../ath79/dts/ar7161_adtran_bsap1880.dtsi | 7 ++++-- .../linux/ath79/dts/ar7161_aruba_ap-105.dts | 7 ++++-- .../linux/ath79/dts/ar7161_aruba_ap-175.dts | 4 +++- .../dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 4 +++- .../ath79/dts/ar7161_dlink_dir-825-b1.dts | 13 +++++++---- .../ath79/dts/ar7161_fortinet_fap-220-b.dts | 10 ++++++--- target/linux/ath79/dts/ar7161_meraki_mr16.dts | 10 ++++++--- .../ath79/dts/ar7161_netgear_wndap360.dts | 4 +++- .../linux/ath79/dts/ar7161_netgear_wndr.dtsi | 19 +++++++++++----- .../linux/ath79/dts/ar7161_ruckus_gd11.dtsi | 7 ++++-- .../ath79/dts/ar7161_siemens_ws-ap3610.dts | 7 ++++-- .../ath79/dts/ar7161_trendnet_tew-673gru.dts | 4 +++- .../ath79/dts/ar7240_buffalo_whr-g301n.dts | 7 ++++-- .../ath79/dts/ar7240_dlink_dir-615-e4.dts | 19 +++++++++++----- .../ath79/dts/ar7240_engenius_enh202-v1.dts | 10 ++++++--- .../ath79/dts/ar7240_netgear_wnr1000-v2.dts | 19 +++++++++++----- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 10 ++++++--- .../ath79/dts/ar7240_openmesh_om2p-v1.dts | 10 ++++++--- .../linux/ath79/dts/ar7240_ruckus_zf7025.dts | 13 +++++++---- target/linux/ath79/dts/ar7240_tplink.dtsi | 4 +++- .../linux/ath79/dts/ar7240_tplink_tl-wa.dtsi | 5 ++++- .../linux/ath79/dts/ar7240_tplink_tl-wr.dtsi | 5 ++++- .../ath79/dts/ar7241_netgear_wnr2000-v3.dts | 19 +++++++++++----- .../ath79/dts/ar7241_netgear_wnr2200.dtsi | 22 +++++++++++++------ .../ath79/dts/ar7241_tplink_tl-mr3220-v1.dts | 5 ++++- .../ath79/dts/ar7241_tplink_tl-mr3420-v1.dts | 5 ++++- .../ath79/dts/ar7241_tplink_tl-wr841-v7.dts | 5 ++++- .../ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 4 +++- .../linux/ath79/dts/ar7241_ubnt_airrouter.dts | 5 ++++- .../linux/ath79/dts/ar7242_avm_fritz300e.dts | 10 ++++++--- .../ath79/dts/ar7242_buffalo_wzr-bhr.dtsi | 4 +++- .../dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 4 +++- .../ath79/dts/ar7242_engenius_eap350-v1.dts | 7 ++++-- .../ath79/dts/ar7242_engenius_ecb350-v1.dts | 7 ++++-- target/linux/ath79/dts/ar7242_meraki_mr12.dts | 10 ++++++--- .../ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 7 ++++-- .../dts/ar9132_buffalo_wzr-hp-g300nh.dtsi | 4 +++- .../ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 4 +++- .../dts/ar9132_tplink_tl-wr1043nd-v1.dts | 7 ++++-- .../ath79/dts/ar9132_tplink_tl-wr941-v2.dts | 4 +++- .../linux/ath79/dts/ar9330_dlink_dir-505.dts | 7 ++++-- .../ath79/dts/ar9330_glinet_gl-ar150.dts | 7 ++++-- .../linux/ath79/dts/ar9330_openmesh_om2p.dtsi | 10 ++++++--- target/linux/ath79/dts/ar9330_pqi_air-pen.dts | 7 ++++-- .../linux/ath79/dts/ar9330_ziking_cpe46b.dts | 4 +++- .../ath79/dts/ar9331_8dev_carambola2.dts | 4 +++- .../ath79/dts/ar9331_alfa-network_ap121f.dtsi | 7 ++++-- target/linux/ath79/dts/ar9331_arduino_yun.dts | 7 ++++-- .../dts/ar9331_embeddedwireless_dorin.dts | 4 +++- .../linux/ath79/dts/ar9331_etactica_eg200.dts | 4 +++- .../linux/ath79/dts/ar9331_glinet_64xx.dtsi | 7 ++++-- .../linux/ath79/dts/ar9331_glinet_gl-mifi.dts | 10 ++++++--- .../ath79/dts/ar9331_glinet_gl-usb150.dts | 7 ++++-- .../linux/ath79/dts/ar9331_hiwifi_hc6361.dts | 7 ++++-- .../ath79/dts/ar9331_teltonika_rut230-v1.dts | 7 ++++-- .../ath79/dts/ar9331_tplink_tl-mr3020-v1.dts | 10 ++++++--- .../ath79/dts/ar9331_tplink_tl-mr3040-v2.dts | 7 ++++-- .../dts/ar9331_tplink_tl-wr741nd-v4.dtsi | 7 ++++-- .../ath79/dts/ar9341_engenius_eap300-v2.dts | 7 ++++-- .../dts/ar9341_engenius_ens202ext-v1.dts | 7 ++++-- .../ath79/dts/ar9341_openmesh_om2p-hs.dtsi | 10 ++++++--- target/linux/ath79/dts/ar9341_pcs_cr3000.dts | 10 ++++++--- target/linux/ath79/dts/ar9341_tplink.dtsi | 10 ++++++--- .../ath79/dts/ar9341_tplink_tl-mr3420-v2.dts | 5 ++++- .../ath79/dts/ar9341_tplink_tl-wa850re-v1.dts | 8 +++++-- .../ath79/dts/ar9341_tplink_tl-wa860re-v1.dts | 17 +++++++++----- .../ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts | 8 +++++-- .../ath79/dts/ar9341_tplink_tl-wr842n-v2.dts | 5 ++++- .../linux/ath79/dts/ar9342_iodata_etg3-r.dts | 4 +++- .../dts/ar9342_mikrotik_routerboard-911g.dtsi | 4 +++- .../linux/ath79/dts/ar9342_ruckus_zf7321.dts | 5 ++++- .../ath79/dts/ar9342_zyxel_nwa1100-nh.dts | 17 +++++++++----- .../ath79/dts/ar9342_zyxel_nwa1121-ni.dts | 8 +++++-- .../ath79/dts/ar9342_zyxel_nwa1123-ac.dts | 8 +++++-- .../ath79/dts/ar9342_zyxel_nwa1123-ni.dts | 8 +++++-- .../ath79/dts/ar9344_aerohive_hiveap-121.dts | 7 ++++-- .../ath79/dts/ar9344_alfa-network_n5q.dts | 4 +++- .../dts/ar9344_araknis_an-300-ap-i-n.dts | 7 ++++-- .../linux/ath79/dts/ar9344_atheros_db120.dts | 4 +++- .../ath79/dts/ar9344_comfast_cf-e120a-v3.dts | 10 ++++++--- .../ath79/dts/ar9344_compex_wpj344-16m.dts | 4 +++- .../ath79/dts/ar9344_devolo_dlan_wifi.dtsi | 4 +++- .../ath79/dts/ar9344_dlink_dir-825-c1.dts | 20 ++++++++++++----- .../ath79/dts/ar9344_dlink_dir-835-a1.dts | 17 +++++++++----- .../ath79/dts/ar9344_engenius_eap600.dts | 8 +++++-- .../ath79/dts/ar9344_engenius_ecb600.dts | 5 ++++- .../ath79/dts/ar9344_enterasys_ws-ap3705i.dts | 13 +++++++---- .../ath79/dts/ar9344_fortinet_fap-221-b.dts | 8 +++++-- .../ar9344_mikrotik_routerboard-911-lite.dts | 8 +++++-- .../ar9344_mikrotik_routerboard-lhg-5nd.dts | 8 +++++-- ...ar9344_mikrotik_routerboard-sxt-5nd-r2.dts | 5 ++++- .../linux/ath79/dts/ar9344_netgear_r6100.dts | 19 +++++++++++----- .../linux/ath79/dts/ar9344_netgear_wndr.dtsi | 13 +++++++---- .../ath79/dts/ar9344_netgear_wndr_usb.dtsi | 5 ++++- .../ath79/dts/ar9344_netgear_wndr_wan.dtsi | 8 +++++-- .../linux/ath79/dts/ar9344_ocedo_raccoon.dts | 4 +++- .../ath79/dts/ar9344_openmesh_mr600-v1.dts | 8 +++++-- .../ath79/dts/ar9344_openmesh_mr600-v2.dts | 8 +++++-- .../ath79/dts/ar9344_openmesh_om5p-an.dts | 10 ++++++--- .../linux/ath79/dts/ar9344_openmesh_om5p.dts | 10 ++++++--- target/linux/ath79/dts/ar9344_pcs_cap324.dts | 19 +++++++++++----- target/linux/ath79/dts/ar9344_pcs_cr5000.dts | 10 ++++++--- target/linux/ath79/dts/ar9344_qihoo_c301.dts | 7 ++++-- .../ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts | 8 +++++-- .../ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts | 8 +++++-- .../linux/ath79/dts/ar9344_qxwlan_e750x.dtsi | 4 +++- .../linux/ath79/dts/ar9344_ruckus_zf7372.dts | 5 ++++- .../linux/ath79/dts/ar9344_samsung_wam250.dts | 10 ++++++--- .../ath79/dts/ar9344_tplink_cpe605-v1.dts | 5 ++++- .../ath79/dts/ar9344_tplink_cpe610-v1.dts | 5 ++++- .../ath79/dts/ar9344_tplink_cpe610-v2.dts | 5 ++++- .../ath79/dts/ar9344_tplink_cpe_1port.dtsi | 5 ++++- .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts | 5 ++++- .../ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts | 10 ++++++--- .../ath79/dts/ar9344_watchguard_ap100.dts | 8 +++++-- .../ath79/dts/ar9344_watchguard_ap200.dts | 8 +++++-- .../linux/ath79/dts/ar9344_wd_mynet-n750.dts | 8 +++++-- .../ar9344_wd_mynet-wifi-rangeextender.dts | 7 ++++-- .../ath79/dts/ar9344_winchannel_wb2000.dts | 4 +++- .../linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi | 4 +++- .../linux/ath79/dts/qca9531_alcatel_hh40v.dts | 13 +++++++---- .../ath79/dts/qca9531_alfa-network_n2q.dts | 8 +++++-- .../dts/qca9531_alfa-network_pi-wifi4.dts | 8 +++++-- .../ath79/dts/qca9531_alfa-network_r36a.dts | 17 +++++++++----- .../dts/qca9531_alfa-network_tube-2hq.dts | 5 ++++- .../linux/ath79/dts/qca9531_asus_rp-ac51.dts | 10 ++++++--- .../ath79/dts/qca9531_comfast_cf-e130n-v2.dts | 7 ++++-- .../ath79/dts/qca9531_comfast_cf-e313ac.dts | 10 ++++++--- .../ath79/dts/qca9531_comfast_cf-e314n-v2.dts | 10 ++++++--- .../linux/ath79/dts/qca9531_comfast_cf-e5.dts | 10 ++++++--- .../ath79/dts/qca9531_comfast_cf-e560ac.dts | 7 ++++-- .../ath79/dts/qca9531_comfast_cf-ew72.dts | 10 ++++++--- .../dts/qca9531_comfast_cf-wr752ac-v1.dts | 4 +++- .../ath79/dts/qca9531_dlink_dch-g020-a1.dts | 7 ++++-- .../ath79/dts/qca9531_engenius_ews511ap.dts | 4 +++- .../dts/qca9531_glinet_gl-ar300m-lite.dts | 8 +++++-- .../ath79/dts/qca9531_glinet_gl-ar300m.dtsi | 10 ++++++--- .../ath79/dts/qca9531_glinet_gl-ar750.dts | 4 +++- .../ath79/dts/qca9531_glinet_gl-x300b.dts | 4 +++- .../ath79/dts/qca9531_glinet_gl-x750.dts | 7 ++++-- .../ath79/dts/qca9531_glinet_gl-xe300.dts | 10 ++++++--- .../ath79/dts/qca9531_joyit_jt-or750i.dts | 7 ++++-- .../ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts | 5 ++++- .../ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts | 5 ++++- .../linux/ath79/dts/qca9531_qxwlan_e600g.dtsi | 7 ++++-- target/linux/ath79/dts/qca9531_telco_t1.dts | 10 ++++++--- .../ath79/dts/qca9531_teltonika_rut300.dts | 4 +++- .../dts/qca9531_tplink_archer-d50-v1.dts | 10 ++++++--- .../ath79/dts/qca9531_tplink_tl-mr3420-v3.dts | 13 +++++++---- .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 16 +++++++++----- .../dts/qca9531_tplink_tl-wr902ac-v1.dts | 13 +++++++---- .../linux/ath79/dts/qca9531_wallys_dr531.dts | 7 ++++-- .../linux/ath79/dts/qca9531_yuncore_a770.dts | 10 ++++++--- .../ath79/dts/qca9533_comfast_cf-e110n-v2.dts | 10 ++++++--- .../ath79/dts/qca9533_dlink_dap-13xx.dtsi | 7 ++++-- .../ath79/dts/qca9533_dlink_dap-2230-a1.dts | 5 ++++- .../ath79/dts/qca9533_dlink_dap-3320-a1.dts | 5 ++++- target/linux/ath79/dts/qca9533_kuwfi_c910.dts | 4 +++- .../qca9533_mikrotik_routerboard-lhg-hb.dtsi | 11 +++++++--- .../qca9533_mikrotik_routerboard-map-2nd.dts | 8 +++++-- .../qca9533_mikrotik_routerboard-mapl-2nd.dts | 11 +++++++--- .../qca9533_mikrotik_routerboard-wap-2nd.dts | 8 +++++-- .../qca9533_mikrotik_routerboard-wapr-2nd.dts | 5 ++++- .../ath79/dts/qca9533_openmesh_om2p-v4.dtsi | 10 ++++++--- .../ath79/dts/qca9533_plasmacloud_pa300.dtsi | 10 ++++++--- target/linux/ath79/dts/qca9533_qca_ap143.dtsi | 10 ++++++--- .../ath79/dts/qca9533_tplink_cpe210.dtsi | 5 ++++- .../ath79/dts/qca9533_tplink_tl-wa801nd.dtsi | 7 ++++-- .../dts/qca9533_tplink_tl-wa850re-v2.dts | 7 ++++-- .../dts/qca9533_tplink_tl-wr841-v11.dtsi | 5 ++++- .../ath79/dts/qca9533_tplink_tl-wr841.dtsi | 7 ++++-- .../dts/qca9533_tplink_tl-wr841hp-v3.dts | 16 +++++++++----- .../ath79/dts/qca9533_tplink_tl-wr842n-v3.dts | 16 +++++++++----- .../ath79/dts/qca9556_avm_fritz1750e.dts | 11 +++++++--- .../linux/ath79/dts/qca9556_avm_fritz450e.dts | 11 +++++++--- .../linux/ath79/dts/qca9556_avm_fritzdvbc.dts | 8 +++++-- .../dts/qca9557_araknis_an-500-ap-i-ac.dts | 7 ++++-- .../ath79/dts/qca9557_buffalo_bhr-4grv2.dts | 4 +++- .../ath79/dts/qca9557_dlink_dap-2660-a1.dts | 8 +++++-- .../ath79/dts/qca9557_dongwon_dw02-412h.dtsi | 7 ++++-- .../ath79/dts/qca9557_engenius_eap1200h.dts | 7 ++++-- .../dts/qca9557_engenius_enstationac-v1.dts | 7 ++++-- .../ath79/dts/qca9557_engenius_esr1200.dts | 11 +++++++--- .../qca9557_extreme-networks_ws-ap3805i.dts | 7 ++++-- .../ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi | 4 +++- .../linux/ath79/dts/qca9557_meraki_mr18.dts | 6 +++-- .../linux/ath79/dts/qca9557_zyxel_nbg6616.dts | 8 +++++-- .../dts/qca9558_allnet_all-wap02860ac.dts | 7 ++++-- .../dts/qca9558_araknis_an-700-ap-i-ac.dts | 7 ++++-- .../linux/ath79/dts/qca9558_aruba_ap-115.dts | 7 ++++-- .../ath79/dts/qca9558_belkin_f9x-v2.dtsi | 10 ++++++--- .../dts/qca9558_comfast_cf-e380ac-v2.dts | 4 +++- .../ath79/dts/qca9558_comfast_cf-wr650ac.dtsi | 4 +++- .../ath79/dts/qca9558_devolo_dvl1200e.dts | 8 +++++-- .../ath79/dts/qca9558_devolo_dvl1200i.dts | 8 +++++-- .../ath79/dts/qca9558_devolo_dvl1750c.dts | 8 +++++-- .../ath79/dts/qca9558_devolo_dvl1750e.dts | 8 +++++-- .../ath79/dts/qca9558_devolo_dvl1750i.dts | 8 +++++-- .../ath79/dts/qca9558_devolo_dvl1750x.dts | 8 +++++-- .../ath79/dts/qca9558_dlink_dap-2680-a1.dts | 8 +++++-- .../ath79/dts/qca9558_dlink_dap-2695-a1.dts | 8 +++++-- .../ath79/dts/qca9558_dlink_dap-3662-a1.dts | 8 +++++-- .../ath79/dts/qca9558_domywifi_dw33d.dts | 4 +++- .../ath79/dts/qca9558_engenius_eap1750h.dts | 7 ++++-- .../ath79/dts/qca9558_engenius_epg5000.dts | 11 +++++++--- .../ath79/dts/qca9558_engenius_esr1750.dts | 11 +++++++--- .../ath79/dts/qca9558_engenius_esr900.dts | 11 +++++++--- .../qca9558_librerouter_librerouter-v1.dts | 4 +++- .../ath79/dts/qca9558_netgear_ex7300.dts | 10 ++++++--- .../linux/ath79/dts/qca9558_ocedo_koala.dts | 4 +++- .../linux/ath79/dts/qca9558_openmesh_a60.dtsi | 10 ++++++--- .../linux/ath79/dts/qca9558_openmesh_mr.dtsi | 13 +++++++---- .../ath79/dts/qca9558_openmesh_om5p-ac-v1.dts | 10 ++++++--- .../ath79/dts/qca9558_openmesh_om5p-ac-v2.dts | 4 +++- .../linux/ath79/dts/qca9558_qxwlan_e558.dtsi | 4 +++- .../ath79/dts/qca9558_sitecom_wlr-8100.dts | 4 +++- target/linux/ath79/dts/qca9558_sophos_ap.dtsi | 7 ++++-- .../linux/ath79/dts/qca9558_sophos_ap15.dts | 7 ++++-- .../ath79/dts/qca9558_tplink_archer-d7.dtsi | 10 ++++++--- .../ath79/dts/qca9558_tplink_re350k-v1.dts | 4 +++- .../linux/ath79/dts/qca9558_tplink_rex5x.dtsi | 10 ++++++--- .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi | 10 ++++++--- .../dts/qca9558_tplink_tl-wr941n-v7-cn.dts | 4 +++- .../ath79/dts/qca9558_trendnet_tew-823dru.dts | 7 ++++-- .../ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts | 5 ++++- .../ath79/dts/qca9558_watchguard_ap300.dts | 4 +++- .../linux/ath79/dts/qca9558_zyxel_nbg6716.dts | 8 +++++-- .../ath79/dts/qca955x_engenius_ecb1xxx.dtsi | 4 +++- .../linux/ath79/dts/qca9561_avm_fritz4020.dts | 13 +++++++---- .../linux/ath79/dts/qca9561_nec_wf1200cr.dts | 7 ++++-- .../dts/qca9561_tplink_archer-c25-v1.dts | 13 +++++++---- .../dts/qca9561_tplink_archer-c59-v1.dts | 5 ++++- .../ath79/dts/qca9561_tplink_archer-c5x.dtsi | 16 +++++++++----- .../dts/qca9561_tplink_archer-c60-v1.dts | 8 +++++-- .../dts/qca9561_tplink_archer-c60-v2.dts | 8 +++++-- .../dts/qca9561_tplink_archer-c60-v3.dts | 5 ++++- .../ath79/dts/qca9561_tplink_archer-c6x.dtsi | 10 ++++++--- .../dts/qca9561_tplink_eap225-wall-v2.dts | 4 +++- .../dts/qca9561_tplink_tl-wdr6500-v2.dts | 4 +++- .../linux/ath79/dts/qca9563_asus_pl-ac56.dts | 7 ++++-- .../linux/ath79/dts/qca9563_asus_rp-ac66.dts | 6 +++-- .../ath79/dts/qca9563_comfast_cf-e375ac.dts | 7 ++++-- .../ath79/dts/qca9563_dlink_covr-p2500-a1.dts | 10 ++++++--- .../ath79/dts/qca9563_dlink_dir-842-c.dtsi | 10 ++++++--- .../ath79/dts/qca9563_dlink_dir-859-a1.dts | 11 +++++++--- .../ath79/dts/qca9563_dlink_dir-869-a1.dts | 8 +++++-- .../dts/qca9563_elecom_wrc-1750ghbk2-i.dts | 5 ++++- .../dts/qca9563_elecom_wrc-300ghbk2-i.dts | 5 ++++- .../ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi | 4 +++- .../ath79/dts/qca9563_glinet_gl-ar750s.dtsi | 4 +++- .../linux/ath79/dts/qca9563_nec_wg1200cr.dts | 7 ++++-- .../linux/ath79/dts/qca9563_nec_wg800hp.dts | 7 ++++-- .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 16 +++++++++----- .../ath79/dts/qca9563_netgear_wndr4300-v2.dts | 5 ++++- .../linux/ath79/dts/qca9563_phicomm_k2t.dts | 10 ++++++--- .../ath79/dts/qca9563_qxwlan_e1700ac.dtsi | 4 +++- .../ath79/dts/qca9563_tplink_archer-c2-v3.dts | 10 ++++++--- .../dts/qca9563_tplink_archer-c6-v2-us.dts | 17 +++++++++----- .../ath79/dts/qca9563_tplink_archer-c6-v2.dts | 17 +++++++++----- .../ath79/dts/qca9563_tplink_archer-c7-v4.dts | 10 ++++++--- .../dts/qca9563_tplink_archer-x7-v5.dtsi | 13 +++++++---- .../ath79/dts/qca9563_tplink_cpe710-v1.dts | 4 +++- .../ath79/dts/qca9563_tplink_deco-m4r-v1.dts | 4 +++- .../ath79/dts/qca9563_tplink_deco-s4-v2.dts | 4 +++- .../dts/qca9563_tplink_eap225-outdoor-v1.dts | 8 +++++-- .../dts/qca9563_tplink_eap225-outdoor-v3.dts | 8 +++++-- .../ath79/dts/qca9563_tplink_eap225-v3.dts | 8 +++++-- .../ath79/dts/qca9563_tplink_eap225-v4.dts | 8 +++++-- .../ath79/dts/qca9563_tplink_eap245-v1.dts | 11 +++++++--- .../ath79/dts/qca9563_tplink_eap245-v3.dts | 7 ++++-- .../linux/ath79/dts/qca9563_tplink_re450.dtsi | 10 ++++++--- .../ath79/dts/qca9563_tplink_tl-wa1201-v2.dts | 7 ++++-- .../ath79/dts/qca9563_tplink_tl-wpa8630.dtsi | 7 ++++-- .../ath79/dts/qca9563_tplink_tl-wr1043n.dtsi | 13 +++++++---- .../dts/qca9563_tplink_tl-wr1043nd-v4.dts | 5 ++++- .../ath79/dts/qca9563_xiaomi_aiot-ac2350.dts | 7 ++++-- target/linux/ath79/dts/qca9563_zte_mf286.dts | 5 ++++- .../linux/ath79/dts/qca9563_zte_mf286ar.dtsi | 5 ++++- .../ath79/dts/qcn5502_asus_rt-ac59u.dtsi | 7 ++++-- .../ath79/dts/qcn5502_netgear_ex7300-v2.dts | 10 ++++++--- .../ath79/dts/qcn5502_tplink_archer-a9-v6.dts | 16 +++++++++----- .../ath79/dts/tp9343_tplink_tl-wa901nd.dtsi | 8 +++++-- .../ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi | 11 +++++++--- .../ath79/dts/tp9343_tplink_tl-wr940n-v4.dts | 11 +++++++--- .../ath79/dts/tp9343_tplink_tl-wr940n-v6.dts | 5 ++++- .../ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts | 16 +++++++++----- 287 files changed, 1663 insertions(+), 640 deletions(-) diff --git a/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts b/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts index b45d6bd77f39..d2161e4a74e1 100644 --- a/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts +++ b/target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Sitecom WLR-7100 (X7 AC1200)"; @@ -41,7 +42,8 @@ }; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi index d7b961d8f630..3075179b10c0 100644 --- a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi +++ b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -33,12 +34,14 @@ }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts index dd110fc18591..5e727596439d 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "aruba,ap-105", "qca,ar7161"; @@ -25,12 +26,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; panic-indicator; }; diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-175.dts b/target/linux/ath79/dts/ar7161_aruba_ap-175.dts index 62a2083d20c4..3ec3a4fe6193 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-175.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-175.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "aruba,ap-175", "qca,ar7161"; @@ -37,7 +38,8 @@ /* These external LEDs are visible from the bottom panel */ led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio_ext 5 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi index 50c0748a3841..7219b0dacf23 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -30,7 +31,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>; trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts index 639736d9c453..e6d2db57c080 100644 --- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts +++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dir-825-b1", "qca,ar7161"; @@ -20,25 +21,29 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>; linux,default-trigger = "usbport"; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts b/target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts index e0aa5704cddc..b98239915edb 100644 --- a/target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts +++ b/target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts @@ -5,6 +5,7 @@ #include #include +#include / { compatible = "fortinet,fap-220-b", "qca,ar7161"; @@ -36,18 +37,21 @@ compatible = "gpio-leds"; led_power: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; default-state = "on"; }; status-green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; status-yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; panic-indicator; }; diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts index b732010446f2..0353a558f98e 100644 --- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts +++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "meraki,mr16", "qca,ar7161"; @@ -40,18 +41,21 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; panic-indicator; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts index 020b45d9e1d7..2acdba1c86de 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts +++ b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "netgear,wndap360", "qca,ar7161"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi index d30b4dad3080..bc280976cb5a 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -18,7 +19,8 @@ compatible = "reset-leds"; usb_led { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; resets = <&rst 12>; trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>; linux,default-trigger = "usbport"; @@ -29,28 +31,33 @@ compatible = "gpio-leds"; wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; default-state = "on"; }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi b/target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi index 54a15c49c1bd..a80b6045b4ef 100644 --- a/target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi +++ b/target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "ruckus,gd11", "qca,ar7161"; @@ -40,13 +41,15 @@ }; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts index 56a2cfab67b9..a8ee7df0da3e 100644 --- a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts +++ b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "siemens,ws-ap3610", "qca,ar7161"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_power_green: led_power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; led_power_red: led_power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts b/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts index 7508be1df1d9..d10c75c0d670 100644 --- a/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts +++ b/target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "trendnet,tew-673gru", "qca,ar7161"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_wps: wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts index ad42e0a05fd2..d5ceb8b44ae2 100644 --- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts +++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "buffalo,whr-g301n", "qca,ar7240"; @@ -90,7 +91,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; @@ -99,7 +101,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts index abd298449b5a..4a709395e968 100644 --- a/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts +++ b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "D-Link DIR-615 E4"; @@ -40,17 +41,20 @@ pinctrl-0 = <&switch_led_pins>; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; @@ -75,12 +79,14 @@ }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; @@ -89,7 +95,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts index ec3a3718506d..11e9c6853fd4 100644 --- a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts +++ b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts @@ -5,6 +5,7 @@ #include #include +#include / { compatible = "engenius,enh202-v1", "qca,ar7240"; @@ -50,12 +51,14 @@ }; lan { - label = "amber:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; @@ -64,7 +67,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts index 32903c2e8ff4..bfee490051a1 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts +++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -55,23 +56,27 @@ pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; @@ -120,12 +125,14 @@ compatible = "gpio-leds"; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&ath9k 5 GPIO_ACTIVE_LOW>; }; wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index ac27874c68ab..c197a90ec5aa 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -34,7 +35,8 @@ pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -49,7 +51,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; @@ -58,7 +61,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts b/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts index 17a574466187..673e9b740b6f 100644 --- a/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts +++ b/target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "openmesh,om2p-v1", "qca,ar7240"; @@ -38,7 +39,8 @@ pinctrl-0 = <&switch_led_disable_pins>; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -60,12 +62,14 @@ }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts b/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts index f5d0a9e3b074..887f5f7b29d6 100644 --- a/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts +++ b/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts @@ -4,6 +4,7 @@ #include #include +#include / { @@ -71,25 +72,29 @@ }; led_power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; panic-indicator; }; led_power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan-green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0assoc"; }; wlan-yellow { - label = "yellow:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink.dtsi b/target/linux/ath79/dts/ar7240_tplink.dtsi index 5bcfb54bfce2..17c826c6c0f1 100644 --- a/target/linux/ath79/dts/ar7240_tplink.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -53,7 +54,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi index 2bded28ea423..1f46e77423cd 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi @@ -1,10 +1,13 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar7240_tplink.dtsi" &leds { lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi index 6c090fb437e8..e0c625e23955 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar7240_tplink.dtsi" &leds { @@ -24,7 +26,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts index 0a6936c5bfd5..d8baa0711123 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -58,12 +59,14 @@ pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; @@ -108,7 +111,8 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; }; @@ -117,18 +121,21 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&ath9k 3 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&ath9k 2 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi index e17a485396ff..2c1dd064fecf 100644 --- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi +++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -51,12 +52,14 @@ pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -101,12 +104,14 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; usb_green { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; @@ -117,18 +122,21 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&ath9k 2 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wlan_blue { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts index af8e297b1df8..c9f696234bf8 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar7241_tplink_tl-mr3x20.dtsi" / { @@ -10,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts index cae2f5477d65..539a5952b30e 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar7241_tplink_tl-mr3x20.dtsi" / { @@ -10,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts index 17e06dfac7d6..c9543afed397 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar7241_tplink.dtsi" / { @@ -10,7 +12,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index e7fe31f36d0d..b0edbf4d06f3 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr842n-v1", "qca,ar7241"; @@ -60,7 +61,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts index fcc66c018c7e..4fa0c704a600 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar7241.dtsi" #include "ar724x_ubnt_xm.dtsi" @@ -24,7 +26,8 @@ }; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts index 7a0d7dd2689b..f8ca3ed5639e 100644 --- a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts +++ b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "avm,fritz300e", "qca,ar7242"; @@ -32,18 +33,21 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi index 15a808ad2ac9..f14053b04591 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -39,7 +40,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts index ac4c096961ba..abb39e119b94 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242"; @@ -69,7 +70,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&ath9k 4 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts index 861964fdfcdc..4c618956ac7e 100644 --- a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts @@ -5,6 +5,7 @@ #include #include +#include / { compatible = "engenius,eap350-v1", "qca,ar7242"; @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; default-state = "on"; }; @@ -43,7 +45,8 @@ compatible = "gpio-leds"; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts index a7def14c738a..024cce6f0f4e 100644 --- a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts +++ b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts @@ -5,6 +5,7 @@ #include #include +#include / { compatible = "engenius,ecb350-v1", "qca,ar7242"; @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; default-state = "on"; }; @@ -43,7 +45,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts index 5218a5ce2764..2ab6f8aaf345 100644 --- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts +++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "meraki,mr12", "qca,ar7242"; @@ -40,18 +41,21 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; panic-indicator; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index 8df1fdb4ddbe..efedf2a31bb9 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr2543-v1", "qca,ar7242"; @@ -43,12 +44,14 @@ compatible = "gpio-leds"; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi index 0eb38b5712ef..77e7925715a3 100644 --- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -3,6 +3,7 @@ #include "ar9132.dtsi" #include #include +#include / { aliases { @@ -155,7 +156,8 @@ compatible = "gpio-leds"; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index 476f3e18a3f4..1857b2b4a6cc 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wa901nd-v2", "qca,ar9132"; @@ -49,7 +50,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index a4d19ce970a1..7957c438d6a3 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132"; @@ -39,7 +40,8 @@ compatible = "gpio-leds"; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; @@ -57,7 +59,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts index 41e53e1fc8d9..e786ad2760ee 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr941-v2", "qca,ar9132"; @@ -54,7 +55,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9330_dlink_dir-505.dts b/target/linux/ath79/dts/ar9330_dlink_dir-505.dts index ad48e07701de..c5109ff8000e 100644 --- a/target/linux/ath79/dts/ar9330_dlink_dir-505.dts +++ b/target/linux/ath79/dts/ar9330_dlink_dir-505.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "D-Link DIR-505"; @@ -38,12 +39,14 @@ pinctrl-0 = <&jtag_disable_pins>; led_power_green: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; }; led_status_red: status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts index 7401cd053a70..088973048d81 100644 --- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "GL.iNet GL-AR150"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; wlan { - label = "orange:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; @@ -32,7 +34,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi index a7fd10bd7320..38704f916971 100644 --- a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi +++ b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -40,13 +41,15 @@ }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; default-state = "on"; }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; @@ -62,7 +65,8 @@ }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts index a2665519f462..98ef9abcc020 100644 --- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts +++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "PQI Air-Pen"; @@ -19,13 +20,15 @@ compatible = "gpio-leds"; led_wlan: wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts index 256fe5f6154c..ebd6d5384fc6 100644 --- a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts +++ b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "ZiKing CPE46B"; @@ -17,7 +18,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts index f786f425f05a..73699d9bfabf 100644 --- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts +++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "8devices Carambola2"; @@ -17,7 +18,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi index 98de255332d6..ca0b4131acff 100644 --- a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi +++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; @@ -45,7 +47,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9331_arduino_yun.dts b/target/linux/ath79/dts/ar9331_arduino_yun.dts index bf3a46f96261..c866889ce4b6 100644 --- a/target/linux/ath79/dts/ar9331_arduino_yun.dts +++ b/target/linux/ath79/dts/ar9331_arduino_yun.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Arduino Yun"; @@ -49,13 +50,15 @@ compatible = "gpio-leds"; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; usb { - label = "white:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts index 6286f203efc2..ee9061716017 100644 --- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts +++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Embedded Wireless Dorin"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9331_etactica_eg200.dts b/target/linux/ath79/dts/ar9331_etactica_eg200.dts index 5a96d5094028..ad3b88ab2b97 100644 --- a/target/linux/ath79/dts/ar9331_etactica_eg200.dts +++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "eTactica EG200"; @@ -45,7 +46,8 @@ }; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi b/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi index 8d003ce09032..be199b5e4fa1 100644 --- a/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi +++ b/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { keys { @@ -21,13 +22,15 @@ compatible = "gpio-leds"; wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts index e4d2ff1e11d0..37418bfc4ad9 100644 --- a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts +++ b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-mifi", "qca,ar9331"; @@ -17,18 +18,21 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts b/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts index 541b73850a05..e9b1c1892490 100644 --- a/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts +++ b/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-usb150", "qca,ar9331"; @@ -21,13 +22,15 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts b/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts index b10f7fc965f2..5d0c02a64992 100644 --- a/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts +++ b/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "HiWiFi HC6361"; @@ -37,11 +38,13 @@ default-state = "on"; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts index ad987dbca1db..054ccea52276 100644 --- a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts +++ b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Teltonika RUT230 v1"; @@ -82,13 +83,15 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; /* GPIO 13 - ACTIVE HIGH for hwrev 0 */ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; /* GPIO 14 - ACTIVE HIGH for hwrev 0 */ }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts index 7b307cd6d072..0a965c2fa925 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "TP-Link TL-MR3020 V1"; @@ -21,18 +22,21 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts index 91023111a681..df39577110e5 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "TP-Link TL-MR3040 V2"; @@ -22,13 +23,15 @@ pinctrl-0 = <&switch_led_disable_pins>; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 26 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi index 613b357dc872..04537fd33aa2 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr741n-v4", "qca,ar9331"; @@ -72,12 +73,14 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts index 9ba89324223b..30f42862b222 100644 --- a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts +++ b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts @@ -5,6 +5,7 @@ #include #include +#include / { model = "Engenius EAP300 v2"; @@ -32,13 +33,15 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts index eb304db8a380..1b90deace53c 100644 --- a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts +++ b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts @@ -5,6 +5,7 @@ #include #include +#include / { model = "Engenius ENS202EXT v1"; @@ -32,13 +33,15 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi b/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi index bb6af232fd2e..d41dcaa3289c 100644 --- a/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi +++ b/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -57,12 +59,14 @@ }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts index 5ec17034d17b..1011ab4980ea 100644 --- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts +++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "PowerCloud Systems CR3000"; @@ -41,19 +42,22 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan2g { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9341_tplink.dtsi b/target/linux/ath79/dts/ar9341_tplink.dtsi index 9c505f2785c5..5dff908129a9 100644 --- a/target/linux/ath79/dts/ar9341_tplink.dtsi +++ b/target/linux/ath79/dts/ar9341_tplink.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -17,13 +18,15 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; @@ -34,7 +37,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts index 3971df17f81f..5a5e785d9270 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9341_tplink.dtsi" / { @@ -31,7 +33,8 @@ &leds { usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts index 12755aea2fa8..08f14f5cc1b6 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9341_tplink_tl-wa.dtsi" / { @@ -35,12 +37,14 @@ compatible = "gpio-leds"; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts index 9f540f82d959..e1ed0c293596 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9341_tplink_tl-wa.dtsi" / { @@ -42,29 +44,34 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; wlan_green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wlan_orange { - label = "orange:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts index 4a4e51f4b8ac..696e8f6391eb 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9341_tplink_tl-wa.dtsi" / { @@ -28,12 +30,14 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts index d0f4c2e1f5aa..3efd8242469b 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9341_tplink.dtsi" / { @@ -41,7 +43,8 @@ &leds { usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts b/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts index 8b354d601534..21c5d6bc1783 100644 --- a/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts +++ b/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "iodata,etg3-r", "qca,ar9344"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi index 86b4bc358b4c..5f9d8e42fb80 100644 --- a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi +++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -85,7 +86,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9342_ruckus_zf7321.dts b/target/linux/ath79/dts/ar9342_ruckus_zf7321.dts index 917dc297fe12..83d29c90eae0 100644 --- a/target/linux/ath79/dts/ar9342_ruckus_zf7321.dts +++ b/target/linux/ath79/dts/ar9342_ruckus_zf7321.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar934x_ruckus_zf73xx.dtsi" / { @@ -18,7 +20,8 @@ }; power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts b/target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts index fd438059e555..028171abaa5b 100644 --- a/target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts +++ b/target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9342_zyxel_nwa11xx.dtsi" / { @@ -17,29 +19,34 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_wlan_green: wlan_green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; led_lan_green: lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_lan_amber: lan_amber { - label = "amber:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts b/target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts index 65dc8c0440a1..b28f8e5cf6f8 100644 --- a/target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts +++ b/target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9342_zyxel_nwa11xx.dtsi" / { @@ -18,13 +20,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts b/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts index 68d49308137f..e3164259dfe9 100644 --- a/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts +++ b/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9342_zyxel_nwa11xx.dtsi" / { @@ -18,13 +20,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts b/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts index b999c960c4a0..cb5588c12231 100644 --- a/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts +++ b/target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9342_zyxel_nwa11xx.dtsi" / { @@ -18,13 +20,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts index 2a2036201e62..300b3b39bfaa 100644 --- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts +++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "aerohive,hiveap-121", "qca,ar9344"; @@ -36,12 +37,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_white: power_white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts index 789bd6df1490..9f4c95c3d46e 100644 --- a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts +++ b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "ALFA Network N5Q"; @@ -72,7 +73,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts b/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts index c2c7cbb960c7..86e990ffc7de 100644 --- a/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts +++ b/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts @@ -5,6 +5,7 @@ #include #include +#include / { compatible = "araknis,an-300-ap-i-n", "qca,ar9344"; @@ -31,7 +32,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "off"; }; @@ -43,7 +45,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_atheros_db120.dts b/target/linux/ath79/dts/ar9344_atheros_db120.dts index 9d5044141245..5004f4034148 100644 --- a/target/linux/ath79/dts/ar9344_atheros_db120.dts +++ b/target/linux/ath79/dts/ar9344_atheros_db120.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -39,7 +40,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts index c53f03235fcb..6bfa82356bfc 100644 --- a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts +++ b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e120a-v3", "qca,ar9344"; @@ -23,17 +24,20 @@ pinctrl-0 = <&led_rssimediumhigh_pin>; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts index 21329db25842..8a354dfe374d 100644 --- a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts +++ b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "compex,wpj344-16m", "qca,ar9344"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi index fc8ac9ce8a96..e503be08ce0f 100644 --- a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi +++ b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -17,7 +18,8 @@ compatible = "gpio-leds"; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts index 35d0e26d8530..f0ca94f2317d 100644 --- a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts +++ b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_dlink_dir-8x5.dtsi" / { @@ -20,19 +22,22 @@ pinctrl-0 = <&enable_gpio_11>; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port>; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; @@ -43,17 +48,20 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts b/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts index b2fcf71bd826..8ecea4d6c070 100644 --- a/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts +++ b/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_dlink_dir-8x5.dtsi" / { @@ -17,27 +19,32 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts index 4d3a149e3ee2..94543cd25574 100644 --- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_senao_ap-dual.dtsi" / { @@ -10,13 +12,15 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts index e7b8b9c3ce23..1b75d887f298 100644 --- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts +++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_senao_ap-dual.dtsi" / { @@ -10,7 +12,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts b/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts index 8f8276255a30..0605baa58e7f 100644 --- a/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts +++ b/target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "enterasys,ws-ap3705i", "qca,ar9344"; @@ -45,22 +46,26 @@ pinctrl-0 = <&enable_gpio_11 &enable_gpio_16>; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; }; lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts b/target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts index 0cad9b76d15e..f97ca429558a 100644 --- a/target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts +++ b/target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_fortinet_ap-dual.dtsi" / { @@ -14,13 +16,15 @@ compatible = "gpio-leds"; led_power: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts index 0315f49d0748..b815291e70cc 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_mikrotik_routerboard.dtsi" #include "ar9344_mikrotik_routerboard-16m-nor.dtsi" @@ -13,12 +15,14 @@ pinctrl-0 = <&enable_gpio_20>; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts index b6de8c4b7b11..fd07858b6b69 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_mikrotik_routerboard.dtsi" #include "ar9344_mikrotik_routerboard-16m-nor.dtsi" @@ -10,7 +12,8 @@ &leds { power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; default-state = "on"; }; @@ -21,7 +24,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts index a4485320345c..0f86ad7903e6 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_mikrotik_routerboard.dtsi" / { @@ -24,7 +26,8 @@ &leds { power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_netgear_r6100.dts b/target/linux/ath79/dts/ar9344_netgear_r6100.dts index 5952e0140fa0..d0535251bdc2 100644 --- a/target/linux/ath79/dts/ar9344_netgear_r6100.dts +++ b/target/linux/ath79/dts/ar9344_netgear_r6100.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Netgear R6100"; @@ -57,34 +58,40 @@ compatible = "gpio-leds"; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi index 49057548f89d..64ceb875d07c 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -48,12 +49,14 @@ pinctrl-0 = <&enable_gpio_11>; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -71,12 +74,14 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi index bd1eb59f4fab..165c5bdf4d3e 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi @@ -1,8 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + &leds { usb_green { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi index da6020769f18..f11314694ab7 100644 --- a/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi +++ b/target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi @@ -1,13 +1,17 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + &leds { wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index 39ba2ffc3aff..d4ab23ed43ca 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "OCEDO Raccoon"; @@ -24,7 +25,8 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts b/target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts index 6c20f2715f0e..f7985629bb25 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts +++ b/target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_openmesh_mr600.dtsi" / { @@ -23,12 +25,14 @@ }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts b/target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts index 988066798f5e..b6bec0a4385f 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts +++ b/target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_openmesh_mr600.dtsi" / { @@ -22,12 +24,14 @@ }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + 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>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts index 38153d9dc068..d15acfc7ca2e 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts +++ b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "openmesh,om5p-an", "qca,ar9344"; @@ -38,18 +39,21 @@ pinctrl-0 = <&led_lan_wan_blue_pin>; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts index e3aa19c82de6..739ba583a800 100644 --- a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts +++ b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "openmesh,om5p", "qca,ar9344"; @@ -38,18 +39,21 @@ pinctrl-0 = <&led_lan_wan_blue_pin>; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts index aab04b080a89..f7f3ef06c971 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "PowerCloud Systems CAP324"; @@ -34,35 +35,41 @@ compatible = "gpio-leds"; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan_amber { - label = "amber:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; wlan_green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan_amber { - label = "amber:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; lan_green { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts index a5fc1160c2ce..6f35bd2c1e51 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "PowerCloud Systems CR5000"; @@ -41,20 +42,23 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>, <&gpio 4 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan2g { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wps_white { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_qihoo_c301.dts b/target/linux/ath79/dts/ar9344_qihoo_c301.dts index 8241c21dd07f..1d9c6ca9a431 100644 --- a/target/linux/ath79/dts/ar9344_qihoo_c301.dts +++ b/target/linux/ath79/dts/ar9344_qihoo_c301.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Qihoo 360 C301"; @@ -21,12 +22,14 @@ pinctrl-0 = <&jtag_disable_pins>; led_wlan_g: wlan_g { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; led_wlan_o: wlan_o { - label = "orange:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts index 33e2990284e2..6762264d3582 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_qxwlan_e750x.dtsi" / { @@ -9,12 +11,14 @@ &leds { lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts index b20d187941da..999030a9cdd7 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_qxwlan_e750x.dtsi" / { @@ -9,12 +11,14 @@ &leds { lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi b/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi index 238a59cbe8d5..df8f28c7d748 100644 --- a/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi +++ b/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -45,7 +46,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_ruckus_zf7372.dts b/target/linux/ath79/dts/ar9344_ruckus_zf7372.dts index dbccbef023b7..b60dc61c74a7 100644 --- a/target/linux/ath79/dts/ar9344_ruckus_zf7372.dts +++ b/target/linux/ath79/dts/ar9344_ruckus_zf7372.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar934x_ruckus_zf73xx.dtsi" / { @@ -28,7 +30,8 @@ }; power_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/ath79/dts/ar9344_samsung_wam250.dts b/target/linux/ath79/dts/ar9344_samsung_wam250.dts index 0bbd5c92fe9e..da8c9ac165d7 100644 --- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts +++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Samsung WAM250"; @@ -38,12 +39,14 @@ compatible = "gpio-leds"; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; default-state = "keep"; }; @@ -54,7 +57,8 @@ }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe605-v1.dts b/target/linux/ath79/dts/ar9344_tplink_cpe605-v1.dts index 0c6eee7ba634..1b762896a14d 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe605-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_cpe605-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_tplink_cpe.dtsi" / { @@ -16,7 +18,8 @@ compatible = "gpio-leds"; led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts b/target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts index c495eb298c8c..c44ad29ccf90 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_tplink_cpe.dtsi" / { @@ -16,7 +18,8 @@ compatible = "gpio-leds"; led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe610-v2.dts b/target/linux/ath79/dts/ar9344_tplink_cpe610-v2.dts index fa533d9f504a..7228ca9f49c8 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe610-v2.dts +++ b/target/linux/ath79/dts/ar9344_tplink_cpe610-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_tplink_cpe.dtsi" / { @@ -16,7 +18,8 @@ compatible = "gpio-leds"; led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe_1port.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe_1port.dtsi index a1dca810936f..27f425fa6d07 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe_1port.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_cpe_1port.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_tplink_cpe.dtsi" / { @@ -14,7 +16,8 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts index a66e1fefa25e..013b44a1239e 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_tplink_tl-wdrxxxx.dtsi" / { @@ -13,7 +15,8 @@ &leds { usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port>; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts index 6649e2477b25..456efc8b7596 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "TP-Link TL-WR841HP v2"; @@ -31,7 +32,8 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; @@ -56,12 +58,14 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/ar9344_watchguard_ap100.dts b/target/linux/ath79/dts/ar9344_watchguard_ap100.dts index e09d539c5644..6f560166965c 100644 --- a/target/linux/ath79/dts/ar9344_watchguard_ap100.dts +++ b/target/linux/ath79/dts/ar9344_watchguard_ap100.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_senao_ap-dual.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_watchguard_ap200.dts b/target/linux/ath79/dts/ar9344_watchguard_ap200.dts index c3d7c50813ab..cb69bd9da96b 100644 --- a/target/linux/ath79/dts/ar9344_watchguard_ap200.dts +++ b/target/linux/ath79/dts/ar9344_watchguard_ap200.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_senao_ap-dual.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts b/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts index d18ffff34d03..ecc1d182d15d 100644 --- a/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts +++ b/target/linux/ath79/dts/ar9344_wd_mynet-n750.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "ar9344_wd_mynet-nxxx.dtsi" / { @@ -27,12 +29,14 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/ar9344_wd_mynet-wifi-rangeextender.dts b/target/linux/ath79/dts/ar9344_wd_mynet-wifi-rangeextender.dts index 20dad6a675f9..1b531aa03598 100644 --- a/target/linux/ath79/dts/ar9344_wd_mynet-wifi-rangeextender.dts +++ b/target/linux/ath79/dts/ar9344_wd_mynet-wifi-rangeextender.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Western Digital My Net Wi-Fi Range Extender"; @@ -24,13 +25,15 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; /* LED has no off state. It's either on or it blinks */ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts index 4b692b6d9bb3..145ff0418ed7 100644 --- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts +++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Winchannel WB2000"; @@ -44,7 +45,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi b/target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi index d494f9b1ed86..2164ce95991e 100644 --- a/target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi +++ b/target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -51,7 +52,8 @@ <&clks_disable_pins>; power_green: power-green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9531_alcatel_hh40v.dts b/target/linux/ath79/dts/qca9531_alcatel_hh40v.dts index 072a0fa27c2a..9c801d8b6062 100644 --- a/target/linux/ath79/dts/qca9531_alcatel_hh40v.dts +++ b/target/linux/ath79/dts/qca9531_alcatel_hh40v.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "alcatel,hh40v", "qca,qca9531"; @@ -40,22 +41,26 @@ pinctrl-0 = <&jtag_disable_pins>; lan_active { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; led_lan_link: lan_link { - label = "orange:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; wan_active { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; wan_link { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts index c9cd7038a5d9..2175c72692ae 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_alfa-network_r36a.dtsi" / { @@ -62,7 +64,8 @@ }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port0>; @@ -74,7 +77,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts index 52a6b5431f3c..fc2aa19324fb 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_alfa-network_r36a.dtsi" / { @@ -29,7 +31,8 @@ }; led_usb: usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; trigger-sources = <&gl850g_port1>, <&gl850g_port2>, @@ -37,7 +40,8 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts index 943731e69eb8..698f028df815 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_alfa-network_r36a.dtsi" / { @@ -20,29 +22,34 @@ pinctrl-0 = <&enable_gpio4 &enable_gpio16>; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led_status: status { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts b/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts index 9b35e471e592..774d864964c6 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_alfa-network_r36a.dtsi" / { @@ -19,7 +21,8 @@ pinctrl-0 = <&enable_gpio4 &enable_gpio16>; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts b/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts index cdc365beb77c..e24ef5411263 100644 --- a/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts +++ b/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "ASUS RP-AC51"; @@ -37,17 +38,20 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; }; led_wps: wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts index d0d2a07c2b46..1c96bd9a6ac3 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e130n-v2", "qca,qca9531"; @@ -23,13 +24,15 @@ pinctrl-names = "default"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts index 40aa19a66f00..08a0a99c2b8f 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e313ac", "qca,qca9531"; @@ -22,18 +23,21 @@ pinctrl-names = "default"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts index ff053d628e47..9a616921e539 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e314n-v2", "qca,qca9531"; @@ -23,12 +24,14 @@ pinctrl-0 = <&jtag_disable_pins &led_rssilow_pin &led_rssimediumhigh_pin &led_rssihigh_pin>; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; @@ -53,7 +56,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts index 73d45f9b7cc0..ec99ee0c4f5e 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e5", "qca,qca9531"; @@ -29,17 +30,20 @@ pinctrl-0 = <&jtag_disable_pins &led_wan_pin>; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts index b68ef442df85..535676aab212 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e560ac", "qca,qca9531"; @@ -60,12 +61,14 @@ }; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts index 88a3eccb2b3c..5f9240d6c1fe 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-ew72", "qca,qca9531"; @@ -23,17 +24,20 @@ pinctrl-0 = <&jtag_disable_pins>; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; led_wan: wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts index 6fcda9fbe357..d13e4966ae45 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-wr752ac-v1", "qca,qca9531"; @@ -23,7 +24,8 @@ pinctrl-0 = <&jtag_disable_pins &pinmux_led_rssihigh &pinmux_led_rssilow>; led_lan: lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_dlink_dch-g020-a1.dts b/target/linux/ath79/dts/qca9531_dlink_dch-g020-a1.dts index 9a4db6f9fcdc..8f2027f25020 100644 --- a/target/linux/ath79/dts/qca9531_dlink_dch-g020-a1.dts +++ b/target/linux/ath79/dts/qca9531_dlink_dch-g020-a1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "dlink,dch-g020-a1", "qca,qca9531"; @@ -76,12 +77,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9531_engenius_ews511ap.dts b/target/linux/ath79/dts/qca9531_engenius_ews511ap.dts index 07b0655e354a..29886a4d3ec8 100644 --- a/target/linux/ath79/dts/qca9531_engenius_ews511ap.dts +++ b/target/linux/ath79/dts/qca9531_engenius_ews511ap.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,ews511ap", "qca,qca9531"; @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts index c712236114cc..f83618aface5 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_glinet_gl-ar300m.dtsi" / { @@ -22,10 +24,12 @@ }; &led_status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; }; &led_wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index 652ffb9c698b..461392660f99 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -2,6 +2,7 @@ #include #include +#include / { aliases { @@ -53,17 +54,20 @@ // Colors for non-Lite versions led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_wlan: wlan { - label = "red:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts index e5d7cd04c1ac..b6a37754fab7 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-ar750", "qca,qca9531"; @@ -40,7 +41,8 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts index 104ed3c72df4..75a8dca7d201 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-x300b", "qca,qca9531"; @@ -32,7 +33,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts index 0ed3f805c7e2..106d81ff113e 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-x750", "qca,qca9531"; @@ -26,7 +27,8 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -44,7 +46,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts b/target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts index 37830c4f7d04..2e7137bc3a92 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-xe300", "qca,qca9531"; @@ -47,17 +48,20 @@ lan { gpios = <&gpio 10 GPIO_ACTIVE_LOW>; - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; }; wan { gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; }; wlan { gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts index f599f5b77cdd..d4e35c84b343 100644 --- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts +++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "joyit,jt-or750i", "qca,qca9531"; @@ -34,13 +35,15 @@ pinctrl-0 = <&jtag_disable_pins &pinmux_led_eth_pins>; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts b/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts index d6e23bef1206..c3c313f3c67e 100644 --- a/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts +++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_qxwlan_e600g.dtsi" / { @@ -9,7 +11,8 @@ &leds { wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts b/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts index ff6bdd481520..c417a8ff4cbb 100644 --- a/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts +++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9531_qxwlan_e600g.dtsi" / { @@ -9,7 +11,8 @@ &leds { wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi index 383b2e67c5e5..ddc3e0f3c6e2 100644 --- a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi +++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -35,12 +36,14 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9531_telco_t1.dts b/target/linux/ath79/dts/qca9531_telco_t1.dts index 1748d9e1c9cf..543fad3c4fc4 100644 --- a/target/linux/ath79/dts/qca9531_telco_t1.dts +++ b/target/linux/ath79/dts/qca9531_telco_t1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "telco,t1", "qca,qca9531"; @@ -33,17 +34,20 @@ pinctrl-0 = <&jtag_disable_pins &pinmux_led_wan_pin>; wan { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts index f01bcafbad33..497cb6f43c00 100644 --- a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts +++ b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts @@ -3,6 +3,7 @@ #include #include +#include #include "qca953x.dtsi" / { @@ -24,7 +25,8 @@ pinctrl-0 = <&pmx_leds_switch>, <&jtag_disable_pins>; led_wan: wan { - label = "yellow:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts index 37353ce1005d..fa17cd3ce33a 100644 --- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-d50-v1", "qca,qca9531"; @@ -38,17 +39,20 @@ }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; usb { - label = "white:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts index f288317c2c37..be1dc66aff6f 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-mr3420-v3", "qca,qca9531"; @@ -84,23 +85,27 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts index 76f12887386c..fb9fb12b6b78 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-mr6400-v1", "qca,qca9531"; @@ -22,7 +23,8 @@ /* D12 */ wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; }; @@ -34,26 +36,30 @@ /* D5 */ wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; }; /* D3 */ wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; /* D2 */ led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; /* D4 */ lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts index a31694effdc3..676f8adf1fce 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr902ac-v1", "qca,qca9531"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; default-state = "on"; }; @@ -38,19 +40,22 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9531_wallys_dr531.dts b/target/linux/ath79/dts/qca9531_wallys_dr531.dts index 59f86170c98f..9e90f99728ff 100644 --- a/target/linux/ath79/dts/qca9531_wallys_dr531.dts +++ b/target/linux/ath79/dts/qca9531_wallys_dr531.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Wallys DR531"; @@ -41,7 +42,8 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -66,7 +68,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9531_yuncore_a770.dts b/target/linux/ath79/dts/qca9531_yuncore_a770.dts index 0385d73a7a12..4ad19fe600eb 100644 --- a/target/linux/ath79/dts/qca9531_yuncore_a770.dts +++ b/target/linux/ath79/dts/qca9531_yuncore_a770.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "YunCore A770"; @@ -31,18 +32,21 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; led_status: status { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts b/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts index f4422e224290..e4b6f5fc68ad 100644 --- a/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts +++ b/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e110n-v2", "qca,qca9533"; @@ -23,12 +24,14 @@ pinctrl-0 = <&jtag_disable_pins &led_rssilow_pin &led_rssimediumhigh_pin &led_rssihigh_pin>; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; @@ -57,7 +60,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi b/target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi index f1eef86a9b58..d5609f7af10c 100644 --- a/target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi +++ b/target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,12 +34,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; led_status: status { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9533_dlink_dap-2230-a1.dts b/target/linux/ath79/dts/qca9533_dlink_dap-2230-a1.dts index 90383690b972..796451768f2f 100644 --- a/target/linux/ath79/dts/qca9533_dlink_dap-2230-a1.dts +++ b/target/linux/ath79/dts/qca9533_dlink_dap-2230-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca953x_dlink_dap-2xxx.dtsi" / { @@ -27,7 +29,8 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9533_dlink_dap-3320-a1.dts b/target/linux/ath79/dts/qca9533_dlink_dap-3320-a1.dts index 5758b0d2a31c..20002aaba859 100644 --- a/target/linux/ath79/dts/qca9533_dlink_dap-3320-a1.dts +++ b/target/linux/ath79/dts/qca9533_dlink_dap-3320-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca953x_dlink_dap-2xxx.dtsi" / { @@ -27,7 +29,8 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9533_kuwfi_c910.dts b/target/linux/ath79/dts/qca9533_kuwfi_c910.dts index 487bbf9d4c70..b1d40ddc05b0 100644 --- a/target/linux/ath79/dts/qca9533_kuwfi_c910.dts +++ b/target/linux/ath79/dts/qca9533_kuwfi_c910.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -66,7 +67,8 @@ }; wan { - label = "white:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi index aa5c57b27891..a65c4fd8ed4c 100644 --- a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_mikrotik_routerboard-16m.dtsi" / { @@ -19,7 +21,8 @@ pinctrl-0 = <&led_wan_pin>; power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; default-state = "on"; }; @@ -30,12 +33,14 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts index 062c3bd061a6..7b7477c506f1 100644 --- a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_mikrotik_routerboard-16m.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -43,7 +46,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio_ext 4 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-mapl-2nd.dts b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-mapl-2nd.dts index e337bcc70db8..8d18df8abbdc 100644 --- a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-mapl-2nd.dts +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-mapl-2nd.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_mikrotik_routerboard-16m.dtsi" / { @@ -19,18 +21,21 @@ pinctrl-0 = <&led_power_pin &led_lan_pin>; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; default-state = "on"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wap-2nd.dts b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wap-2nd.dts index d4d049920c7f..10841591b5de 100644 --- a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wap-2nd.dts +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wap-2nd.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_mikrotik_routerboard-16m.dtsi" / { @@ -19,12 +21,14 @@ pinctrl-0 = <&led_lan_pin>; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wapr-2nd.dts b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wapr-2nd.dts index 19ada708d990..942030e4c9a6 100644 --- a/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wapr-2nd.dts +++ b/target/linux/ath79/dts/qca9533_mikrotik_routerboard-wapr-2nd.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_mikrotik_routerboard-16m.dtsi" / { @@ -33,7 +35,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi index 1f3bf68f69c5..c78f52152d53 100644 --- a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi +++ b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -35,7 +36,8 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -57,12 +59,14 @@ }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi index 66ede5554d08..010b752995b8 100644 --- a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi +++ b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -34,17 +35,20 @@ compatible = "gpio-leds"; status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; }; status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9533_qca_ap143.dtsi b/target/linux/ath79/dts/qca9533_qca_ap143.dtsi index 2836234b4c7a..e7cb1f605d76 100644 --- a/target/linux/ath79/dts/qca9533_qca_ap143.dtsi +++ b/target/linux/ath79/dts/qca9533_qca_ap143.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -18,12 +19,14 @@ compatible = "gpio-leds"; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; @@ -49,7 +52,8 @@ }; led_wps: wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi b/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi index 3295776bf93e..e976566f4fca 100644 --- a/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi @@ -1,10 +1,13 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_tplink_cpexxx.dtsi" &leds { lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi index 5a05869a1c03..7bad615a6c4a 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,7 +19,8 @@ compatible = "gpio-leds"; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; @@ -28,7 +30,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts index c3d42a8b3502..f1cdde13a2d4 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wa850re-v2", "qca,qca9533"; @@ -24,7 +25,8 @@ pinctrl-0 = <&jtag_disable_pins>; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; @@ -59,7 +61,8 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi index 027ed82cbe16..035d968cb2a0 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9533_tplink_tl-wr841.dtsi" / { @@ -18,7 +20,8 @@ }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi index c0e23f6d62e4..9487e67e99bb 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -14,7 +15,8 @@ compatible = "gpio-leds"; wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; @@ -25,7 +27,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts index c11f11ae1852..d6768e1af2da 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr841hp-v3", "qca,qca9533"; @@ -27,28 +28,33 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts index 33234fcb9f7a..4d4acd202ce1 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr842n-v3", "qca,qca9533"; @@ -21,13 +22,15 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; wifi { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; @@ -38,12 +41,14 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; }; wan_red { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; @@ -68,7 +73,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port0>; diff --git a/target/linux/ath79/dts/qca9556_avm_fritz1750e.dts b/target/linux/ath79/dts/qca9556_avm_fritz1750e.dts index 05b76ecadba0..9dafaaa9a4fb 100644 --- a/target/linux/ath79/dts/qca9556_avm_fritz1750e.dts +++ b/target/linux/ath79/dts/qca9556_avm_fritz1750e.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9556_avm_fritz-repeater.dtsi" #include @@ -45,18 +47,21 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&spi_gpio 6 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&spi_gpio 5 GPIO_ACTIVE_HIGH>; linux,default-trigger = "phy1tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/qca9556_avm_fritz450e.dts b/target/linux/ath79/dts/qca9556_avm_fritz450e.dts index 0d3053597656..9123ae34b239 100644 --- a/target/linux/ath79/dts/qca9556_avm_fritz450e.dts +++ b/target/linux/ath79/dts/qca9556_avm_fritz450e.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9556_avm_fritz-repeater.dtsi" #include @@ -19,18 +21,21 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9556_avm_fritzdvbc.dts b/target/linux/ath79/dts/qca9556_avm_fritzdvbc.dts index 355f0850c4bf..a746b95922f7 100644 --- a/target/linux/ath79/dts/qca9556_avm_fritzdvbc.dts +++ b/target/linux/ath79/dts/qca9556_avm_fritzdvbc.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9556_avm_fritz-repeater.dtsi" / { @@ -48,12 +50,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&spi_gpio 6 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&spi_gpio 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ath79/dts/qca9557_araknis_an-500-ap-i-ac.dts b/target/linux/ath79/dts/qca9557_araknis_an-500-ap-i-ac.dts index 941d87657fc8..8cf1f00255ed 100644 --- a/target/linux/ath79/dts/qca9557_araknis_an-500-ap-i-ac.dts +++ b/target/linux/ath79/dts/qca9557_araknis_an-500-ap-i-ac.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "araknis,an-500-ap-i-ac", "qca,qca9557"; @@ -30,7 +31,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "off"; }; @@ -48,7 +50,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts index f17af66cdf9d..62c1124cb6df 100644 --- a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts +++ b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "buffalo,bhr-4grv2", "qca,qca9557"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts index b380fef5152c..2b5294fe965c 100644 --- a/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts +++ b/target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_dlink_dap-2xxx.dtsi" / { @@ -27,12 +29,14 @@ compatible = "gpio-leds"; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9557_dongwon_dw02-412h.dtsi b/target/linux/ath79/dts/qca9557_dongwon_dw02-412h.dtsi index 31d86b1cf07f..c7dd3cea9962 100644 --- a/target/linux/ath79/dts/qca9557_dongwon_dw02-412h.dtsi +++ b/target/linux/ath79/dts/qca9557_dongwon_dw02-412h.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -32,12 +33,14 @@ compatible = "gpio-leds"; led_wan: wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts index da159caa20cc..6fe518cbabe2 100644 --- a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts +++ b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,eap1200h", "qca,qca9557"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -50,7 +52,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts index b9338f55db00..c81d17d20a1e 100644 --- a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts +++ b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,enstationac-v1", "qca,qca9557"; @@ -32,13 +33,15 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9557_engenius_esr1200.dts b/target/linux/ath79/dts/qca9557_engenius_esr1200.dts index a70dc4739dfc..fd805fa13f67 100644 --- a/target/linux/ath79/dts/qca9557_engenius_esr1200.dts +++ b/target/linux/ath79/dts/qca9557_engenius_esr1200.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_senao_router-dual.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -35,12 +38,14 @@ }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts b/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts index 686a4745175f..9df72df66ec7 100644 --- a/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts +++ b/target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "extreme-networks,ws-ap3805i", "qca,qca9557"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi index 76932be64a20..097e1a87beb3 100644 --- a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi +++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -17,7 +18,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9557_meraki_mr18.dts b/target/linux/ath79/dts/qca9557_meraki_mr18.dts index 9189c6e55161..1df5d6125cc4 100644 --- a/target/linux/ath79/dts/qca9557_meraki_mr18.dts +++ b/target/linux/ath79/dts/qca9557_meraki_mr18.dts @@ -22,12 +22,14 @@ compatible = "gpio-leds"; white: white { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; orange: orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; panic-indicator; }; diff --git a/target/linux/ath79/dts/qca9557_zyxel_nbg6616.dts b/target/linux/ath79/dts/qca9557_zyxel_nbg6616.dts index 25b36e50be31..33fc3f1a070f 100644 --- a/target/linux/ath79/dts/qca9557_zyxel_nbg6616.dts +++ b/target/linux/ath79/dts/qca9557_zyxel_nbg6616.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_zyxel_nbg6x16.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; @@ -48,7 +51,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts index 9001e3fb866d..c6620969d100 100644 --- a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts +++ b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "allnet,all-wap02860ac", "qca,qca9558"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -50,7 +52,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_araknis_an-700-ap-i-ac.dts b/target/linux/ath79/dts/qca9558_araknis_an-700-ap-i-ac.dts index 778710eb9192..3906b82776b9 100644 --- a/target/linux/ath79/dts/qca9558_araknis_an-700-ap-i-ac.dts +++ b/target/linux/ath79/dts/qca9558_araknis_an-700-ap-i-ac.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "araknis,an-700-ap-i-ac", "qca,qca9558"; @@ -30,7 +31,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "off"; }; @@ -48,7 +50,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_aruba_ap-115.dts b/target/linux/ath79/dts/qca9558_aruba_ap-115.dts index 9d9528245131..a5318b6cdd18 100644 --- a/target/linux/ath79/dts/qca9558_aruba_ap-115.dts +++ b/target/linux/ath79/dts/qca9558_aruba_ap-115.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "aruba,ap-115", "qca,qca9558"; @@ -36,12 +37,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_red: power-red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi index b20a36a03190..9048fd3e2f05 100644 --- a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi +++ b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -26,17 +27,20 @@ }; status { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wps-amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wps-blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts b/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts index 281559ac128d..febbccb4cb4b 100644 --- a/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "comfast,cf-e380ac-v2", "qca,qca9558"; @@ -35,7 +36,8 @@ pinctrl-0 = <&jtag_disable_pins>; led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi b/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi index 4daad4b0b012..7bcadb2adaf4 100644 --- a/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi +++ b/target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { keys { @@ -21,7 +22,8 @@ compatible = "gpio-leds"; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts index d98600934ad6..ec9d5cc6557d 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9558_devolo_dvl1xxx.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts index 97687f1ce3ad..dfef71e6d7c5 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9558_devolo_dvl1xxx.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts index ee6d35685eff..8d4bbe3ef2da 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9558_devolo_dvl1xxx.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts index c5209046173f..25760c8ccfa5 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9558_devolo_dvl1xxx.dtsi" / { @@ -34,13 +36,15 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts index 2b808ce9213b..aac5d4612fdf 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9558_devolo_dvl1xxx.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_blue: status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts index 747a1a46d303..4db10ac776ca 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9558_devolo_dvl1xxx.dtsi" / { @@ -18,12 +20,14 @@ led_status_red: status_red { /* This LED is not visible on the external casing. */ - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts index d32329b3660d..4cee284f31fa 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_dlink_dap-2xxx.dtsi" / { @@ -27,12 +29,14 @@ compatible = "gpio-leds"; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts index 3ca641a55070..6f23fbec4648 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_dlink_dap-2xxx.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts index e72af99da243..2cdfd2cff93f 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_dlink_dap-2xxx.dtsi" / { @@ -27,12 +29,14 @@ compatible = "gpio-leds"; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts index de44aec47d7b..765cfafe15ea 100644 --- a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts +++ b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "domywifi,dw33d", "qca,qca9558"; @@ -32,7 +33,8 @@ }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port1>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9558_engenius_eap1750h.dts b/target/linux/ath79/dts/qca9558_engenius_eap1750h.dts index 56c08621a746..ea43eb0e6754 100644 --- a/target/linux/ath79/dts/qca9558_engenius_eap1750h.dts +++ b/target/linux/ath79/dts/qca9558_engenius_eap1750h.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "engenius,eap1750h", "qca,qca9558"; @@ -32,7 +33,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -50,7 +52,8 @@ }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_engenius_epg5000.dts b/target/linux/ath79/dts/qca9558_engenius_epg5000.dts index 36aba0714e4e..52708f3c6b20 100644 --- a/target/linux/ath79/dts/qca9558_engenius_epg5000.dts +++ b/target/linux/ath79/dts/qca9558_engenius_epg5000.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_senao_router-dual.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -35,12 +38,14 @@ }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_engenius_esr1750.dts b/target/linux/ath79/dts/qca9558_engenius_esr1750.dts index 4cfdfc1f2802..0aae9b5187c2 100644 --- a/target/linux/ath79/dts/qca9558_engenius_esr1750.dts +++ b/target/linux/ath79/dts/qca9558_engenius_esr1750.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_senao_router-dual.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -35,12 +38,14 @@ }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_engenius_esr900.dts b/target/linux/ath79/dts/qca9558_engenius_esr900.dts index ef0e21a3b59f..39a0790f121e 100644 --- a/target/linux/ath79/dts/qca9558_engenius_esr900.dts +++ b/target/linux/ath79/dts/qca9558_engenius_esr900.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_senao_router-dual.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -35,12 +38,14 @@ }; wps_amber { - label = "amber:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts index 5ee38b2e884c..333b52f4d915 100644 --- a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts +++ b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "librerouter,librerouter-v1", "qca,qca9558"; @@ -32,7 +33,8 @@ }; status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_netgear_ex7300.dts b/target/linux/ath79/dts/qca9558_netgear_ex7300.dts index 81898e972f09..3c9141fcba6d 100644 --- a/target/linux/ath79/dts/qca9558_netgear_ex7300.dts +++ b/target/linux/ath79/dts/qca9558_netgear_ex7300.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Netgear EX7300"; @@ -47,12 +48,14 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; @@ -67,7 +70,8 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index ad5a378e9320..891bdd95c43c 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "ocedo,koala", "qca,qca9558"; @@ -21,7 +22,8 @@ compatible = "gpio-leds"; power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi index cfceb9e69814..11a6e81f9f28 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi +++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -33,17 +34,20 @@ compatible = "gpio-leds"; status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; }; status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi index 3bb793db7fd4..a5d3d3798788 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi +++ b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { chosen { @@ -33,7 +34,8 @@ compatible = "gpio-leds"; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -43,17 +45,20 @@ }; status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts index d8b6b5d98f8a..f7c51578ba9a 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "openmesh,om5p-ac-v1", "qca,qca9558"; @@ -26,18 +27,21 @@ compatible = "gpio-leds"; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; lan_blue { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts index 0d9053e43f2a..b9eb0e91a9b6 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "openmesh,om5p-ac-v2", "qca,qca9558"; @@ -32,7 +33,8 @@ }; led_power_blue: power_blue { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi index 716bc0d77b60..9cbdca234d9b 100644 --- a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi +++ b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -29,7 +30,8 @@ compatible = "gpio-leds"; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts b/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts index ba7feeab5a17..2a57eeec7752 100644 --- a/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts +++ b/target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Sitecom WLR-8100 (X8 AC1750)"; @@ -36,7 +37,8 @@ compatible = "gpio-leds"; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_sophos_ap.dtsi b/target/linux/ath79/dts/qca9558_sophos_ap.dtsi index 70d9e9d148ba..92e89ff3aa79 100644 --- a/target/linux/ath79/dts/qca9558_sophos_ap.dtsi +++ b/target/linux/ath79/dts/qca9558_sophos_ap.dtsi @@ -17,6 +17,7 @@ #include #include +#include / { aliases { @@ -46,13 +47,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_sophos_ap15.dts b/target/linux/ath79/dts/qca9558_sophos_ap15.dts index 69a0af972ef9..5801303040f9 100644 --- a/target/linux/ath79/dts/qca9558_sophos_ap15.dts +++ b/target/linux/ath79/dts/qca9558_sophos_ap15.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "sophos,ap15", "qca,qca9558"; @@ -25,13 +26,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_yellow: status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi index 35532f42c8b6..b4f32b9fc7c9 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -23,17 +24,20 @@ }; wlan { - label = "white:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; lan { - label = "white:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; }; usb { - label = "white:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port1>, <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts index 5205426f8e69..a3fb9b22d227 100644 --- a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "TP-Link RE350K v1"; @@ -46,7 +47,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi index e8ab6ff5125d..3061ae07c7cb 100644 --- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -19,7 +20,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; @@ -46,12 +48,14 @@ }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index f4390f465681..a72b6e6050d1 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -24,20 +25,23 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; wifi_green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wifi_wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts index 9d329000c9bd..f51b89206d62 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr941n-v7-cn", "qca,qca9558"; @@ -27,7 +28,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts index 176fe97cc0a9..23b484cdf58e 100644 --- a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts +++ b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "trendnet,tew-823dru", "qca,qca9558"; @@ -20,12 +21,14 @@ compatible = "gpio-leds"; power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts b/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts index 09e7e1bf8d9d..b42ea4dbc272 100644 --- a/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts +++ b/target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts @@ -6,6 +6,8 @@ * based on device tree from qca9558_ubnt_powerbeam-5ac-500.dts */ +#include + #include "qca955x_ubnt_xc.dtsi" / { @@ -71,7 +73,8 @@ gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_watchguard_ap300.dts b/target/linux/ath79/dts/qca9558_watchguard_ap300.dts index 68cd27771985..e3431330de0f 100644 --- a/target/linux/ath79/dts/qca9558_watchguard_ap300.dts +++ b/target/linux/ath79/dts/qca9558_watchguard_ap300.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "watchguard,ap300", "qca,qca9558"; @@ -31,7 +32,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts index 27341a88e67b..76ae8a99a691 100644 --- a/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts +++ b/target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca955x_zyxel_nbg6x16.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; @@ -53,7 +56,8 @@ }; wps { - label = "white:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi b/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi index 9d591bd6b363..2a00985ba75b 100644 --- a/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi +++ b/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -28,7 +29,8 @@ compatible = "gpio-leds"; led_power: power { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts index 7c220baddd33..b3b8d01986db 100644 --- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts +++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "avm,fritz4020", "qca,qca9560"; @@ -46,24 +47,28 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>; default-state = "on"; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts index 8f67299c4892..c4671bf57f2f 100644 --- a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts +++ b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "NEC Aterm WF1200CR"; @@ -21,12 +22,14 @@ /* other LEDs are connected to ath10k (QCA9888) gpiochip */ led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts index 3e87bebd1468..97e9ebf0b649 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-c25-v1", "qca,qca9561"; @@ -57,13 +58,15 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; default-state = "on"; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; @@ -80,12 +83,14 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts index 397e81d17b39..e8b282b9c207 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9561_tplink_archer-c5x.dtsi" / { @@ -13,7 +15,8 @@ &leds { usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "usbport"; trigger-sources = <&hub_port0>; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi index bb942078dc41..80e5db55e4ac 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-c5x", "qca,qca9560"; @@ -39,7 +40,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -57,22 +59,26 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts index 9e437b6f00f6..eb21394d046f 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9561_tplink_archer-c6x.dtsi" / { @@ -13,12 +15,14 @@ &leds { wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts index e71fc9eb7abe..aa4a7da10cf4 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9561_tplink_archer-c6x.dtsi" / { @@ -13,12 +15,14 @@ &leds { wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts index d84ba25db4ab..ede6878d5c16 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9561_tplink_archer-c6x.dtsi" / { @@ -13,7 +15,8 @@ &leds { wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi index e5f9d0bcc591..b3fdc03de47e 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,7 +34,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -51,12 +53,14 @@ }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts b/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts index cf5f3a3a4e04..0e5c1fdc43c6 100644 --- a/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,eap225-wall-v2", "qca,qca9561"; @@ -39,7 +40,8 @@ compatible = "gpio-leds"; led_status: status { - label = "white:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_tl-wdr6500-v2.dts b/target/linux/ath79/dts/qca9561_tplink_tl-wdr6500-v2.dts index 8767693c82e5..f12043540741 100644 --- a/target/linux/ath79/dts/qca9561_tplink_tl-wdr6500-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_tl-wdr6500-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wdr6500-v2", "qca,qca9561"; @@ -51,7 +52,8 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts b/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts index 4510872e278f..752ecb27980a 100644 --- a/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts +++ b/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "ASUS PL-AC56"; @@ -36,12 +37,14 @@ compatible = "gpio-leds"; led_power: power { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_asus_rp-ac66.dts b/target/linux/ath79/dts/qca9563_asus_rp-ac66.dts index 71c95ad33221..763ba431ef39 100644 --- a/target/linux/ath79/dts/qca9563_asus_rp-ac66.dts +++ b/target/linux/ath79/dts/qca9563_asus_rp-ac66.dts @@ -22,12 +22,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; }; led_orange: wps { - label = "orange:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts index 15b8b819581e..ebcaeb6ddc96 100644 --- a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts +++ b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "COMFAST CF-E375AC"; @@ -21,12 +22,14 @@ compatible = "gpio-leds"; led_lan: lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; wan { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/qca9563_dlink_covr-p2500-a1.dts b/target/linux/ath79/dts/qca9563_dlink_covr-p2500-a1.dts index 3047c6f47945..3b0c2afb50d0 100644 --- a/target/linux/ath79/dts/qca9563_dlink_covr-p2500-a1.dts +++ b/target/linux/ath79/dts/qca9563_dlink_covr-p2500-a1.dts @@ -4,6 +4,7 @@ #include #include +#include #include / { @@ -39,12 +40,14 @@ pinctrl-0 = <&jtag_disable_pins>; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -56,7 +59,8 @@ }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_dlink_dir-842-c.dtsi b/target/linux/ath79/dts/qca9563_dlink_dir-842-c.dtsi index a42deaddafd3..34961c94c4ad 100644 --- a/target/linux/ath79/dts/qca9563_dlink_dir-842-c.dtsi +++ b/target/linux/ath79/dts/qca9563_dlink_dir-842-c.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -33,17 +34,20 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts b/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts index 93bd8e363e85..320181c2b398 100644 --- a/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts +++ b/target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_dlink_dir-8x9-a1.dtsi" / { @@ -17,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 15 GPIO_ACTIVE_LOW>; }; @@ -32,7 +36,8 @@ }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/qca9563_dlink_dir-869-a1.dts b/target/linux/ath79/dts/qca9563_dlink_dir-869-a1.dts index 5afe683613b4..60777ea9002c 100644 --- a/target/linux/ath79/dts/qca9563_dlink_dir-869-a1.dts +++ b/target/linux/ath79/dts/qca9563_dlink_dir-869-a1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_dlink_dir-8x9-a1.dtsi" / { @@ -17,12 +19,14 @@ compatible = "gpio-leds"; led_power_orange: power_orange { - label = "orange:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 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/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts index a69b9d54e8b8..e7cdcad9c3a3 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_elecom_wrc-ghbk2-i.dtsi" / { @@ -9,7 +11,8 @@ &leds { led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts index 518008205423..8b64d8d2ff37 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_elecom_wrc-ghbk2-i.dtsi" / { @@ -9,7 +11,8 @@ &leds { led_power: power { - label = "white:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi b/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi index a6706da1a500..f63edb09cf9b 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -17,7 +18,8 @@ compatible = "gpio-leds"; wps { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi index da9e7ee867e4..0624d88d8a13 100644 --- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi +++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "glinet,gl-ar750s", "qca,qca9563"; @@ -41,7 +42,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; default-state = "keep"; }; diff --git a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts index 22ba567694ac..7f8866bd36a6 100644 --- a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts +++ b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "NEC Aterm WG1200CR"; @@ -21,13 +22,15 @@ /* other LEDs are connected to ath10k (QCA9888) gpiochip */ led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_nec_wg800hp.dts b/target/linux/ath79/dts/qca9563_nec_wg800hp.dts index a7390573cd64..fdcca64a0c88 100644 --- a/target/linux/ath79/dts/qca9563_nec_wg800hp.dts +++ b/target/linux/ath79/dts/qca9563_nec_wg800hp.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "NEC Aterm WG800HP"; @@ -37,12 +38,14 @@ }; led_power_red: power_red { - label = "red:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi index c4faec8ef140..757fdfe650ae 100644 --- a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi +++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -49,23 +50,27 @@ pinctrl-0 = <&jtag_disable_pins>; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; default-state = "keep"; }; wan_green { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; @@ -76,7 +81,8 @@ }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts index 8682413b0b00..60b65a4fcbfc 100644 --- a/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts +++ b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_netgear_wndr.dtsi" / { @@ -9,7 +11,8 @@ &leds { usb_green { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts index 5befbb16086d..614d88d3830f 100644 --- a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts +++ b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Phicomm K2T"; @@ -20,17 +21,20 @@ compatible = "gpio-leds"; status_blue { - label = "blue:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; }; status_yellow { - label = "yellow:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi index 0861821f44a2..a0e648991879 100644 --- a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi +++ b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -35,7 +36,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts index 57db3cfa9aca..907eda94007e 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-c2-v3", "qca,qca9563"; @@ -38,17 +39,20 @@ }; wifi_wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts index 61c52943de0a..f78a52a1208f 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_archer-x6-v2.dtsi" / { @@ -19,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -37,22 +40,26 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts index 4a69d29b3157..fc7814a97ec5 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_archer-x6-v2.dtsi" / { @@ -19,7 +21,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -37,22 +40,26 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "amber:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts index 929e8dc1bbcf..611cb8953ed5 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,archer-c7-v4", "qca,qca9563"; @@ -89,12 +90,14 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; }; @@ -119,7 +122,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi index f6a959903fb9..c1000f52a3bd 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -23,7 +24,8 @@ }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; @@ -42,12 +44,14 @@ }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; @@ -72,7 +76,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts index 5439adaacb62..3a0c16d4a34b 100644 --- a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "TP-Link CPE710 v1"; @@ -20,7 +21,8 @@ compatible = "gpio-leds"; led_lan: lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts b/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts index 989a21b1f191..7968bdbf6da8 100644 --- a/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts @@ -2,6 +2,7 @@ #include #include +#include #include "qca956x.dtsi" @@ -26,7 +27,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts b/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts index 9c731ad99692..29d0d8868dfc 100644 --- a/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts @@ -2,6 +2,7 @@ #include #include +#include #include "qca956x.dtsi" @@ -26,7 +27,8 @@ }; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts index c3f1a130eb02..4d5d75a8e0f5 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_eap2x5-1port.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts index 1fac6082cf24..916d30d3c62f 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_eap2x5-1port.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts index 5139bc767029..75b28f93a500 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_eap2x5-1port.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts index 6e7ba5fede45..82da14faad66 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_eap2x5-1port.dtsi" / { @@ -17,13 +19,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts index af133813e71e..b44facf3f67a 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_eap2x5-1port.dtsi" / { @@ -17,18 +19,21 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; led_status_red: status_red { - label = "red:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts index 1e37db82bce4..38edffc529be 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,eap245-v3", "qca,qca9563"; @@ -21,13 +22,15 @@ compatible = "gpio-leds"; led_status_green: status_green { - label = "green:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; default-state = "on"; }; led_status_amber: status_amber { - label = "amber:status"; + function = LED_FUNCTION_STATUS; + color = ; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_re450.dtsi b/target/linux/ath79/dts/qca9563_tplink_re450.dtsi index 3841a4c8fd7c..2e9ef99cd0d9 100644 --- a/target/linux/ath79/dts/qca9563_tplink_re450.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_re450.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -18,7 +19,8 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; @@ -45,12 +47,14 @@ }; wps_blue { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; }; wps_red { - label = "red:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts index 0629a639550c..b1d564be1556 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wa1201-v2", "qca,qca9563"; @@ -22,7 +23,8 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; default-state = "on"; }; @@ -40,7 +42,8 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi index 560aae9694b9..81fb6ce097fd 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -49,12 +50,14 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi index 2e3ac952e290..e54003cb7a85 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -23,23 +24,27 @@ }; wifi_green { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wifi_wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; wan_fail { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts index 4aa0ef572f63..6db4653f69fe 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "qca9563_tplink_tl-wr1043n.dtsi" / { @@ -92,7 +94,8 @@ &leds { usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts index 6dfc885bc0a6..27e3436f8f21 100644 --- a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts +++ b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Xiaomi AIoT AC2350"; @@ -42,12 +43,14 @@ }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/qca9563_zte_mf286.dts b/target/linux/ath79/dts/qca9563_zte_mf286.dts index e64680e11215..4b9223966612 100644 --- a/target/linux/ath79/dts/qca9563_zte_mf286.dts +++ b/target/linux/ath79/dts/qca9563_zte_mf286.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT // Copyright (c) 2021 Cezary Jackiewicz + +#include // Copyright (c) 2021, 2022 Lech Perczak #include "qca9563_zte_mf286.dtsi" @@ -30,7 +32,8 @@ * and slightly through the case below signal state LEDs */ color = ; - label = "green:debug"; + function = LED_FUNCTION_DEBUG; + color = ; }; &boot_flash { diff --git a/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi b/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi index 89177ef2d350..9a42ea668ac6 100644 --- a/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi +++ b/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT // Copyright (c) 2021 Cezary Jackiewicz + +#include // Copyright (c) 2021, 2022 Lech Perczak #include "qca9563_zte_mf286.dtsi" @@ -27,7 +29,8 @@ * and slightly through the case below signal state LEDs */ color = ; - label = "blue:debug"; + function = LED_FUNCTION_DEBUG; + color = ; }; &boot_flash { diff --git a/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi b/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi index ffc2b8934516..3d3df1adccaa 100644 --- a/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi +++ b/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -35,12 +36,14 @@ compatible = "gpio-leds"; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; usb { - label = "blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; diff --git a/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts b/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts index 32b97a460137..24a54834fd36 100644 --- a/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts +++ b/target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "Netgear EX7300 v2"; @@ -40,17 +41,20 @@ compatible = "gpio-leds"; led_power_green: power_green { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; led_power_amber: power_amber { - label = "amber:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; }; wps_green { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts index 6266f5561be3..76137c73c4e8 100644 --- a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts +++ b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "TP-Link Archer A9 v6"; @@ -39,25 +40,29 @@ compatible = "gpio-leds"; led_power: power { - label = "green:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; default-state = "on"; }; usb { - label = "green:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; wan { - label = "green:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; }; wan_orange { - label = "orange:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; @@ -74,7 +79,8 @@ }; wps { - label = "green:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi index 6b27468551e2..1cf74619260e 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "tp9343_tplink_tl-wx.dtsi" / { @@ -35,12 +37,14 @@ }; lan { - label = "green:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wlan { - label = "green:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi index b38cd418176a..7780e0172c33 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "tp9343_tplink_tl-wr94x.dtsi" / { @@ -25,18 +27,21 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_red { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts index f837dccff9af..549bf4fea420 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "tp9343_tplink_tl-wr94x.dtsi" / { @@ -28,18 +30,21 @@ }; wlan { - label = "blue:wlan"; + function = LED_FUNCTION_WLAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_red { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts index ccb3bb167090..04517cffd492 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include + #include "tp9343_tplink_tl-wr94x.dtsi" / { @@ -17,7 +19,8 @@ compatible = "gpio-leds"; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts index 61adc08289a9..aaca7fa531b9 100644 --- a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts +++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts @@ -4,6 +4,7 @@ #include #include +#include / { compatible = "tplink,tl-wr941hp-v1", "qca,tp9343"; @@ -32,28 +33,33 @@ }; led_power: power { - label = "blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; default-state = "on"; }; wan_blue { - label = "blue:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wan_red { - label = "red:wan"; + function = LED_FUNCTION_WAN; + color = ; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; lan { - label = "blue:lan"; + function = LED_FUNCTION_LAN; + color = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; }; wps { - label = "blue:wps"; + function = LED_FUNCTION_WPS; + color = ; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; }; }; -- 2.30.2