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 b45d6bd77f..d2161e4a74 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 d7b961d8f6..3075179b10 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 dd110fc185..5e72759643 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 62a2083d20..3ec3a4fe61 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 50c0748a38..7219b0dacf 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 639736d9c4..e6d2db57c0 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 e0aa5704cd..b98239915e 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 b732010446..0353a558f9 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 020b45d9e1..2acdba1c86 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 d30b4dad30..bc280976cb 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 54a15c49c1..a80b6045b4 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 56a2cfab67..a8ee7df0da 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 7508be1df1..d10c75c0d6 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 ad42e0a05f..d5ceb8b44a 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 abd298449b..4a709395e9 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 ec3a371850..11e9c6853f 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 32903c2e8f..bfee490051 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 ac27874c68..c197a90ec5 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 17a5744661..673e9b740b 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 f5d0a9e3b0..887f5f7b29 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 5bcfb54bfc..17c826c6c0 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 2bded28ea4..1f46e77423 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 6c090fb437..e0c625e239 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 0a6936c5bf..d8baa07111 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 e17a485396..2c1dd064fe 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 af8e297b1d..c9f696234b 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 cae2f5477d..539a5952b3 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 17e06dfac7..c9543afed3 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 e7fe31f36d..b0edbf4d06 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 fcc66c018c..4fa0c704a6 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 7a0d7dd268..f8ca3ed563 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 15a808ad2a..f14053b045 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 ac4c096961..abb39e119b 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 861964fdfc..4c618956ac 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 a7def14c73..024cce6f0f 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 5218a5ce27..2ab6f8aaf3 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 8df1fdb4dd..efedf2a31b 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 0eb38b5712..77e7925715 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 476f3e18a3..1857b2b4a6 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 a4d19ce970..7957c438d6 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 41e53e1fc8..e786ad2760 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 ad48e07701..c5109ff800 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 7401cd053a..088973048d 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 a7fd10bd73..38704f9169 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 a2665519f4..98ef9abcc0 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 256fe5f615..ebd6d5384f 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 f786f425f0..73699d9bfa 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 98de255332..ca0b4131ac 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 bf3a46f962..c866889ce4 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 6286f203ef..ee90617160 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 5a96d50940..ad3b88ab2b 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 8d003ce090..be199b5e4f 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 e4d2ff1e11..37418bfc4a 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 541b73850a..e9b1c18924 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 b10f7fc965..5d0c02a649 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 ad987dbca1..054ccea522 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 7b307cd6d0..0a965c2fa9 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 91023111a6..df39577110 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 613b357dc8..04537fd33a 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 9ba8932422..30f42862b2 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 eb304db8a3..1b90deace5 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 bb6af232fd..d41dcaa328 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 5ec17034d1..1011ab4980 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 9c505f2785..5dff908129 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 3971df17f8..5a5e785d92 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 12755aea2f..08f14f5cc1 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 9f540f82d9..e1ed0c2935 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 4a4e51f4b8..696e8f6391 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 d0f4c2e1f5..3efd824246 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 8b354d6015..21c5d6bc17 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 86b4bc358b..5f9d8e42fb 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 917dc297fe..83d29c90ea 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 fd438059e5..028171abaa 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 65dc8c0440..b28f8e5cf6 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 68d4930813..e3164259df 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 b999c960c4..cb5588c122 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 2a2036201e..300b3b39bf 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 789bd6df14..9f4c95c3d4 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 c2c7cbb960..86e990ffc7 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 9d50441412..5004f40341 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 c53f03235f..6bfa82356b 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 21329db258..8a354dfe37 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 fc8ac9ce8a..e503be08ce 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 35d0e26d85..f0ca94f231 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 b2fcf71bd8..8ecea4d6c0 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 4d3a149e3e..94543cd255 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 e7b8b9c3ce..1b75d887f2 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 8f8276255a..0605baa58e 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 0cad9b76d1..f97ca42955 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 0315f49d07..b815291e70 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 b6de8c4b7b..fd07858b6b 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 a448532034..0f86ad7903 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 5952e0140f..d0535251bd 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 49057548f8..64ceb875d0 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 bd1eb59f4f..165c5bdf4d 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 da6020769f..f11314694a 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 39ba2ffc3a..d4ab23ed43 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 6c20f2715f..f7985629bb 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 988066798f..b6bec0a438 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 38153d9dc0..d15acfc7ca 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 e3aa19c82d..739ba583a8 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 aab04b080a..f7f3ef06c9 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 a5fc1160c2..6f35bd2c1e 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 8241c21dd0..1d9c6ca9a4 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 33e2990284..6762264d35 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 b20d187941..999030a9cd 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 238a59cbe8..df8f28c7d7 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 dbccbef023..b60dc61c74 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 0bbd5c92fe..da8c9ac165 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 0c6eee7ba6..1b762896a1 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 c495eb298c..c44ad29ccf 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 fa533d9f50..7228ca9f49 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 a1dca81093..27f425fa6d 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 a66e1fefa2..013b44a123 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 6649e2477b..456efc8b75 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 e09d539c56..6f56016696 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 c3d7c50813..cb69bd9da9 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 d18ffff34d..ecc1d182d1 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 20dad6a675..1b531aa035 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 4b692b6d9b..145ff0418e 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 d494f9b1ed..2164ce9599 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 072a0fa27c..9c801d8b60 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 c9cd7038a5..2175c72692 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 52a6b5431f..fc2aa19324 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 943731e69e..698f028df8 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 9b35e471e5..774d864964 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 cdc365beb7..e24ef54112 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 d0d2a07c2b..1c96bd9a6a 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 40aa19a66f..08a0a99c2b 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 ff053d628e..9a616921e5 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 73d45f9b7c..ec99ee0c4f 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 b68ef442df..535676aab2 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 88a3eccb2b..5f9240d6c1 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 6fcda9fbe3..d13e4966ae 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 9a4db6f9fc..8f2027f250 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 07b0655e35..29886a4d3e 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 c712236114..f83618afac 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 652ffb9c69..461392660f 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 e5d7cd04c1..b6a37754fa 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 104ed3c72d..75a8dca7d2 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 0ed3f805c7..106d81ff11 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 37830c4f7d..2e7137bc3a 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 f599f5b77c..d4e35c84b3 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 d6e23bef12..c3c313f3c6 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 ff6bdd4815..c417a8ff4c 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 383b2e67c5..ddc3e0f3c6 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 1748d9e1c9..543fad3c4f 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 f01bcafbad..497cb6f43c 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 37353ce100..fa17cd3ce3 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 f288317c2c..be1dc66aff 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 76f1288738..fb9fb12b6b 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 a31694effd..676f8adf1f 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 59f86170c9..9e90f99728 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 0385d73a7a..4ad19fe600 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 f4422e2242..e4b6f5fc68 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 f1eef86a9b..d5609f7af1 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 90383690b9..796451768f 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 5758b0d2a3..20002aaba8 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 487bbf9d4c..b1d40ddc05 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 aa5c57b278..a65c4fd8ed 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 062c3bd061..7b7477c506 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 e337bcc70d..8d18df8abb 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 d4d049920c..10841591b5 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 19ada708d9..942030e4c9 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 1f3bf68f69..c78f52152d 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 66ede5554d..010b752995 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 2836234b4c..e7cb1f605d 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 3295776bf9..e976566f4f 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 5a05869a1c..7bad615a6c 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 c3d42a8b35..f1cdde13a2 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 027ed82cbe..035d968cb2 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 c0e23f6d62..9487e67e99 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 c11f11ae18..d6768e1af2 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 33234fcb9f..4d4acd202c 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 05b76ecadb..9dafaaa9a4 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 0d30535976..9123ae34b2 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 355f0850c4..a746b95922 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 941d87657f..8cf1f00255 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 f17af66cdf..62c1124cb6 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 b380fef515..2b5294fe96 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 31d86b1cf0..c7dd3cea99 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 da159caa20..6fe518cbab 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 b9338f55db..c81d17d20a 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 a70dc4739d..fd805fa13f 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 686a474517..9df72df66e 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 76932be64a..097e1a87be 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 9189c6e551..1df5d6125c 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 25b36e50be..33fc3f1a07 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 9001e3fb86..c6620969d1 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 778710eb91..3906b82776 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 9d95282451..a5318b6cdd 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 b20a36a031..9048fd3e2f 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 281559ac12..febbccb4cb 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 4daad4b0b0..7bcadb2ada 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 d98600934a..ec9d5cc655 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 97687f1ce3..dfef71e6d7 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 ee6d35685e..8d4bbe3ef2 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 c520904617..25760c8ccf 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 2b808ce921..aac5d4612f 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 747a1a46d3..4db10ac776 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 d32329b366..4cee284f31 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 3ca641a550..6f23fbec46 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 e72af99da2..2cdfd2cff9 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 de44aec47d..765cfafe15 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 56c08621a7..ea43eb0e67 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 36aba0714e..52708f3c6b 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 4cfdfc1f28..0aae9b5187 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 ef0e21a3b5..39a0790f12 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 5ee38b2e88..333b52f4d9 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 81898e972f..3c9141fcba 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 ad5a378e93..891bdd95c4 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 cfceb9e698..11a6e81f9f 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 3bb793db7f..a5d3d37987 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 d8b6b5d98f..f7c51578ba 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 0d9053e43f..b9eb0e91a9 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 716bc0d77b..9cbdca234d 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 ba7feeab5a..2a57eeec77 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 70d9e9d148..92e89ff3aa 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 69a0af972e..5801303040 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 35532f42c8..b4f32b9fc7 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 5205426f8e..a3fb9b22d2 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 e8ab6ff512..3061ae07c7 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 f4390f4656..a72b6e6050 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 9d329000c9..f51b89206d 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 176fe97cc0..23b484cdf5 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 09e7e1bf8d..b42ea4dbc2 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 68cd277719..e3431330de 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 27341a88e6..76ae8a99a6 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 9d591bd6b3..2a00985ba7 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 7c220baddd..b3b8d01986 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 8f67299c48..c4671bf57f 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 3e87bebd14..97e9ebf0b6 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 397e81d17b..e8b282b9c2 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 bb942078dc..80e5db55e4 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 9e437b6f00..eb21394d04 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 e71fc9eb7a..aa4a7da10c 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 d84ba25db4..ede6878d5c 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 e5f9d0bcc5..b3fdc03de4 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 cf5f3a3a4e..0e5c1fdc43 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 8767693c82..f120435407 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 4510872e27..752ecb2798 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 71c95ad332..763ba431ef 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 15b8b81958..ebcaeb6ddc 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 3047c6f479..3b0c2afb50 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 a42deaddaf..34961c94c4 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 93bd8e363e..320181c2b3 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 5afe683613..60777ea900 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 a69b9d54e8..e7cdcad9c3 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 5180082054..8b64d8d2ff 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 a6706da1a5..f63edb09cf 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 da9e7ee867..0624d88d8a 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 22ba567694..7f8866bd36 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 a7390573cd..fdcca64a0c 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 c4faec8ef1..757fdfe650 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 8682413b0b..60b65a4fcb 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 5befbb1608..614d88d383 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 0861821f44..a0e6489918 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 57db3cfa9a..907eda9400 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 61c52943de..f78a52a120 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 4a69d29b31..fc7814a97e 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 929e8dc1bb..611cb8953e 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 f6a959903f..c1000f52a3 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 5439adaacb..3a0c16d4a3 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 989a21b1f1..7968bdbf6d 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 9c731ad996..29d0d8868d 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 c3f1a130eb..4d5d75a8e0 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 1fac6082cf..916d30d3c6 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 5139bc7670..75b28f93a5 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 6e7ba5fede..82da14faad 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 af133813e7..b44facf3f6 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 1e37db82bc..38edffc529 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 3841a4c8fd..2e9ef99cd0 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 0629a63955..b1d564be15 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 560aae9694..81fb6ce097 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 2e3ac952e2..e54003cb7a 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 4aa0ef572f..6db4653f69 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 6dfc885bc0..27e3436f8f 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 e64680e112..4b92239666 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 89177ef2d3..9a42ea668a 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 ffc2b89345..3d3df1adcc 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 32b97a4601..24a54834fd 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 6266f5561b..76137c73c4 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 6b27468551..1cf7461926 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 b38cd41817..7780e0172c 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 f837dccff9..549bf4fea4 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 ccb3bb1670..04517cffd4 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 61adc08289..aaca7fa531 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