aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2024-02-07 14:48:34 +0100
committerChristian Marangi <ansuelsmth@gmail.com>2024-02-07 14:48:34 +0100
commite3ddfcc70c604c6eb9172a497df2291489dc1890 (patch)
treea23ce9cfe32642c60274d47ef71236ba63bdcb2f /target/linux
parente92632f760a9db733ee05a3eef5ebaa45e167343 (diff)
downloadupstream-e3ddfcc70c604c6eb9172a497df2291489dc1890.tar.gz
upstream-e3ddfcc70c604c6eb9172a497df2291489dc1890.tar.bz2
upstream-e3ddfcc70c604c6eb9172a497df2291489dc1890.zip
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 <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ath79/dts/ar1022_sitecom_wlr-7100.dts4
-rw-r--r--target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi7
-rw-r--r--target/linux/ath79/dts/ar7161_aruba_ap-105.dts7
-rw-r--r--target/linux/ath79/dts/ar7161_aruba_ap-175.dts4
-rw-r--r--target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi4
-rw-r--r--target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts13
-rw-r--r--target/linux/ath79/dts/ar7161_fortinet_fap-220-b.dts10
-rw-r--r--target/linux/ath79/dts/ar7161_meraki_mr16.dts10
-rw-r--r--target/linux/ath79/dts/ar7161_netgear_wndap360.dts4
-rw-r--r--target/linux/ath79/dts/ar7161_netgear_wndr.dtsi19
-rw-r--r--target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi7
-rw-r--r--target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts7
-rw-r--r--target/linux/ath79/dts/ar7161_trendnet_tew-673gru.dts4
-rw-r--r--target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts7
-rw-r--r--target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts19
-rw-r--r--target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts10
-rw-r--r--target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts19
-rw-r--r--target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi10
-rw-r--r--target/linux/ath79/dts/ar7240_openmesh_om2p-v1.dts10
-rw-r--r--target/linux/ath79/dts/ar7240_ruckus_zf7025.dts13
-rw-r--r--target/linux/ath79/dts/ar7240_tplink.dtsi4
-rw-r--r--target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi5
-rw-r--r--target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi5
-rw-r--r--target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts19
-rw-r--r--target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi22
-rw-r--r--target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts5
-rw-r--r--target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts5
-rw-r--r--target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts5
-rw-r--r--target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts4
-rw-r--r--target/linux/ath79/dts/ar7241_ubnt_airrouter.dts5
-rw-r--r--target/linux/ath79/dts/ar7242_avm_fritz300e.dts10
-rw-r--r--target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi4
-rw-r--r--target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts4
-rw-r--r--target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts7
-rw-r--r--target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts7
-rw-r--r--target/linux/ath79/dts/ar7242_meraki_mr12.dts10
-rw-r--r--target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts7
-rw-r--r--target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi4
-rw-r--r--target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts4
-rw-r--r--target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts7
-rw-r--r--target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts4
-rw-r--r--target/linux/ath79/dts/ar9330_dlink_dir-505.dts7
-rw-r--r--target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts7
-rw-r--r--target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi10
-rw-r--r--target/linux/ath79/dts/ar9330_pqi_air-pen.dts7
-rw-r--r--target/linux/ath79/dts/ar9330_ziking_cpe46b.dts4
-rw-r--r--target/linux/ath79/dts/ar9331_8dev_carambola2.dts4
-rw-r--r--target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi7
-rw-r--r--target/linux/ath79/dts/ar9331_arduino_yun.dts7
-rw-r--r--target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts4
-rw-r--r--target/linux/ath79/dts/ar9331_etactica_eg200.dts4
-rw-r--r--target/linux/ath79/dts/ar9331_glinet_64xx.dtsi7
-rw-r--r--target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts10
-rw-r--r--target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts7
-rw-r--r--target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts7
-rw-r--r--target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts7
-rw-r--r--target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts10
-rw-r--r--target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts7
-rw-r--r--target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi7
-rw-r--r--target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts7
-rw-r--r--target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts7
-rw-r--r--target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi10
-rw-r--r--target/linux/ath79/dts/ar9341_pcs_cr3000.dts10
-rw-r--r--target/linux/ath79/dts/ar9341_tplink.dtsi10
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts5
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-wa850re-v1.dts8
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-wa860re-v1.dts17
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-wa901nd-v3.dts8
-rw-r--r--target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts5
-rw-r--r--target/linux/ath79/dts/ar9342_iodata_etg3-r.dts4
-rw-r--r--target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi4
-rw-r--r--target/linux/ath79/dts/ar9342_ruckus_zf7321.dts5
-rw-r--r--target/linux/ath79/dts/ar9342_zyxel_nwa1100-nh.dts17
-rw-r--r--target/linux/ath79/dts/ar9342_zyxel_nwa1121-ni.dts8
-rw-r--r--target/linux/ath79/dts/ar9342_zyxel_nwa1123-ac.dts8
-rw-r--r--target/linux/ath79/dts/ar9342_zyxel_nwa1123-ni.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts7
-rw-r--r--target/linux/ath79/dts/ar9344_alfa-network_n5q.dts4
-rw-r--r--target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts7
-rw-r--r--target/linux/ath79/dts/ar9344_atheros_db120.dts4
-rw-r--r--target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts10
-rw-r--r--target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts4
-rw-r--r--target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi4
-rw-r--r--target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts20
-rw-r--r--target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts17
-rw-r--r--target/linux/ath79/dts/ar9344_engenius_eap600.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_engenius_ecb600.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_enterasys_ws-ap3705i.dts13
-rw-r--r--target/linux/ath79/dts/ar9344_fortinet_fap-221-b.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_mikrotik_routerboard-911-lite.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_mikrotik_routerboard-lhg-5nd.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5nd-r2.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_netgear_r6100.dts19
-rw-r--r--target/linux/ath79/dts/ar9344_netgear_wndr.dtsi13
-rw-r--r--target/linux/ath79/dts/ar9344_netgear_wndr_usb.dtsi5
-rw-r--r--target/linux/ath79/dts/ar9344_netgear_wndr_wan.dtsi8
-rw-r--r--target/linux/ath79/dts/ar9344_ocedo_raccoon.dts4
-rw-r--r--target/linux/ath79/dts/ar9344_openmesh_mr600-v1.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_openmesh_mr600-v2.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts10
-rw-r--r--target/linux/ath79/dts/ar9344_openmesh_om5p.dts10
-rw-r--r--target/linux/ath79/dts/ar9344_pcs_cap324.dts19
-rw-r--r--target/linux/ath79/dts/ar9344_pcs_cr5000.dts10
-rw-r--r--target/linux/ath79/dts/ar9344_qihoo_c301.dts7
-rw-r--r--target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi4
-rw-r--r--target/linux/ath79/dts/ar9344_ruckus_zf7372.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_samsung_wam250.dts10
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_cpe605-v1.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_cpe610-v1.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_cpe610-v2.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_cpe_1port.dtsi5
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts5
-rw-r--r--target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts10
-rw-r--r--target/linux/ath79/dts/ar9344_watchguard_ap100.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_watchguard_ap200.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_wd_mynet-n750.dts8
-rw-r--r--target/linux/ath79/dts/ar9344_wd_mynet-wifi-rangeextender.dts7
-rw-r--r--target/linux/ath79/dts/ar9344_winchannel_wb2000.dts4
-rw-r--r--target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9531_alcatel_hh40v.dts13
-rw-r--r--target/linux/ath79/dts/qca9531_alfa-network_n2q.dts8
-rw-r--r--target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts8
-rw-r--r--target/linux/ath79/dts/qca9531_alfa-network_r36a.dts17
-rw-r--r--target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts5
-rw-r--r--target/linux/ath79/dts/qca9531_asus_rp-ac51.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts7
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-e5.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts7
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts4
-rw-r--r--target/linux/ath79/dts/qca9531_dlink_dch-g020-a1.dts7
-rw-r--r--target/linux/ath79/dts/qca9531_engenius_ews511ap.dts4
-rw-r--r--target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts8
-rw-r--r--target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts4
-rw-r--r--target/linux/ath79/dts/qca9531_glinet_gl-x300b.dts4
-rw-r--r--target/linux/ath79/dts/qca9531_glinet_gl-x750.dts7
-rw-r--r--target/linux/ath79/dts/qca9531_glinet_gl-xe300.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts7
-rw-r--r--target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-16m.dts5
-rw-r--r--target/linux/ath79/dts/qca9531_qxwlan_e600g-v2-8m.dts5
-rw-r--r--target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9531_telco_t1.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_teltonika_rut300.dts4
-rw-r--r--target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts10
-rw-r--r--target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts13
-rw-r--r--target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts16
-rw-r--r--target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts13
-rw-r--r--target/linux/ath79/dts/qca9531_wallys_dr531.dts7
-rw-r--r--target/linux/ath79/dts/qca9531_yuncore_a770.dts10
-rw-r--r--target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts10
-rw-r--r--target/linux/ath79/dts/qca9533_dlink_dap-13xx.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9533_dlink_dap-2230-a1.dts5
-rw-r--r--target/linux/ath79/dts/qca9533_dlink_dap-3320-a1.dts5
-rw-r--r--target/linux/ath79/dts/qca9533_kuwfi_c910.dts4
-rw-r--r--target/linux/ath79/dts/qca9533_mikrotik_routerboard-lhg-hb.dtsi11
-rw-r--r--target/linux/ath79/dts/qca9533_mikrotik_routerboard-map-2nd.dts8
-rw-r--r--target/linux/ath79/dts/qca9533_mikrotik_routerboard-mapl-2nd.dts11
-rw-r--r--target/linux/ath79/dts/qca9533_mikrotik_routerboard-wap-2nd.dts8
-rw-r--r--target/linux/ath79/dts/qca9533_mikrotik_routerboard-wapr-2nd.dts5
-rw-r--r--target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9533_qca_ap143.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi5
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts7
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dtsi5
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts16
-rw-r--r--target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts16
-rw-r--r--target/linux/ath79/dts/qca9556_avm_fritz1750e.dts11
-rw-r--r--target/linux/ath79/dts/qca9556_avm_fritz450e.dts11
-rw-r--r--target/linux/ath79/dts/qca9556_avm_fritzdvbc.dts8
-rw-r--r--target/linux/ath79/dts/qca9557_araknis_an-500-ap-i-ac.dts7
-rw-r--r--target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts4
-rw-r--r--target/linux/ath79/dts/qca9557_dlink_dap-2660-a1.dts8
-rw-r--r--target/linux/ath79/dts/qca9557_dongwon_dw02-412h.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9557_engenius_eap1200h.dts7
-rw-r--r--target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts7
-rw-r--r--target/linux/ath79/dts/qca9557_engenius_esr1200.dts11
-rw-r--r--target/linux/ath79/dts/qca9557_extreme-networks_ws-ap3805i.dts7
-rw-r--r--target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9557_meraki_mr18.dts6
-rw-r--r--target/linux/ath79/dts/qca9557_zyxel_nbg6616.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts7
-rw-r--r--target/linux/ath79/dts/qca9558_araknis_an-700-ap-i-ac.dts7
-rw-r--r--target/linux/ath79/dts/qca9558_aruba_ap-115.dts7
-rw-r--r--target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9558_comfast_cf-e380ac-v2.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_comfast_cf-wr650ac.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_devolo_dvl1750x.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_dlink_dap-2680-a1.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_dlink_dap-3662-a1.dts8
-rw-r--r--target/linux/ath79/dts/qca9558_domywifi_dw33d.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_engenius_eap1750h.dts7
-rw-r--r--target/linux/ath79/dts/qca9558_engenius_epg5000.dts11
-rw-r--r--target/linux/ath79/dts/qca9558_engenius_esr1750.dts11
-rw-r--r--target/linux/ath79/dts/qca9558_engenius_esr900.dts11
-rw-r--r--target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_netgear_ex7300.dts10
-rw-r--r--target/linux/ath79/dts/qca9558_ocedo_koala.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_openmesh_a60.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9558_openmesh_mr.dtsi13
-rw-r--r--target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts10
-rw-r--r--target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9558_sitecom_wlr-8100.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_sophos_ap.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9558_sophos_ap15.dts7
-rw-r--r--target/linux/ath79/dts/qca9558_tplink_archer-d7.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts7
-rw-r--r--target/linux/ath79/dts/qca9558_ubnt_nanobeam-ac-xc.dts5
-rw-r--r--target/linux/ath79/dts/qca9558_watchguard_ap300.dts4
-rw-r--r--target/linux/ath79/dts/qca9558_zyxel_nbg6716.dts8
-rw-r--r--target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9561_avm_fritz4020.dts13
-rw-r--r--target/linux/ath79/dts/qca9561_nec_wf1200cr.dts7
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts13
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts5
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi16
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts8
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts8
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts5
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts4
-rw-r--r--target/linux/ath79/dts/qca9561_tplink_tl-wdr6500-v2.dts4
-rw-r--r--target/linux/ath79/dts/qca9563_asus_pl-ac56.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_asus_rp-ac66.dts6
-rw-r--r--target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_dlink_covr-p2500-a1.dts10
-rw-r--r--target/linux/ath79/dts/qca9563_dlink_dir-842-c.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts11
-rw-r--r--target/linux/ath79/dts/qca9563_dlink_dir-869-a1.dts8
-rw-r--r--target/linux/ath79/dts/qca9563_elecom_wrc-1750ghbk2-i.dts5
-rw-r--r--target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts5
-rw-r--r--target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9563_nec_wg1200cr.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_nec_wg800hp.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_netgear_wndr.dtsi16
-rw-r--r--target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts5
-rw-r--r--target/linux/ath79/dts/qca9563_phicomm_k2t.dts10
-rw-r--r--target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi4
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts10
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts17
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts17
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts10
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi13
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts4
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_deco-m4r-v1.dts4
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_deco-s4-v2.dts4
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts8
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts8
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts8
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts8
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts11
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_re450.dtsi10
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_tl-wa1201-v2.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_tl-wpa8630.dtsi7
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi13
-rw-r--r--target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts5
-rw-r--r--target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts7
-rw-r--r--target/linux/ath79/dts/qca9563_zte_mf286.dts5
-rw-r--r--target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi5
-rw-r--r--target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi7
-rw-r--r--target/linux/ath79/dts/qcn5502_netgear_ex7300-v2.dts10
-rw-r--r--target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts16
-rw-r--r--target/linux/ath79/dts/tp9343_tplink_tl-wa901nd.dtsi8
-rw-r--r--target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi11
-rw-r--r--target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts11
-rw-r--r--target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts5
-rw-r--r--target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts16
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 b45d6bd77f3..d2161e4a74e 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Sitecom WLR-7100 (X7 AC1200)";
@@ -41,7 +42,8 @@
};
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
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 d7b961d8f63..3075179b10c 100644
--- a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi
+++ b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -33,12 +34,14 @@
};
led_status_green: status_green {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
};
led_status_yellow: status_yellow {
- label = "yellow:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_YELLOW>;
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 dd110fc1859..5e727596439 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
led_power_red: power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 62a2083d20c..3ec3a4fe619 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_AMBER>;
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 50c0748a384..7219b0dacf2 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -30,7 +31,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 639736d9c45..e6d2db57c08 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "dlink,dir-825-b1", "qca,ar7161";
@@ -20,25 +21,29 @@
compatible = "gpio-leds";
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
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 = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 e0aa5704cdd..b98239915ed 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
status-green {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
status-yellow {
- label = "yellow:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_YELLOW>;
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 b732010446f..0353a558f98 100644
--- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts
+++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "meraki,mr16", "qca,ar7161";
@@ -40,18 +41,21 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
panic-indicator;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 020b45d9e1d..2acdba1c86d 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndap360.dts
+++ b/target/linux/ath79/dts/ar7161_netgear_wndap360.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_ORANGE>;
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 d30b4dad308..bc280976cb5 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -18,7 +19,8 @@
compatible = "reset-leds";
usb_led {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 54a15c49c1b..a80b6045b4e 100644
--- a/target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi
+++ b/target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "ruckus,gd11", "qca,ar7161";
@@ -40,13 +41,15 @@
};
led_power_green: power-green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_power_red: power-red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 56a2cfab67b..a8ee7df0da3 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
led_power_red: led_power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 7508be1df1d..d10c75c0d67 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "trendnet,tew-673gru", "qca,ar7161";
@@ -20,7 +21,8 @@
compatible = "gpio-leds";
led_wps: wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 ad42e0a05fd..d5ceb8b44ae 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,whr-g301n", "qca,ar7240";
@@ -90,7 +91,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
@@ -99,7 +101,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 abd298449b5..4a709395e96 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
@@ -75,12 +79,14 @@
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
@@ -89,7 +95,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 ec3a3718506..11e9c6853fd 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,enh202-v1", "qca,ar7240";
@@ -50,12 +51,14 @@
};
lan {
- label = "amber:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
@@ -64,7 +67,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 32903c2e8ff..bfee490051a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
@@ -120,12 +125,14 @@
compatible = "gpio-leds";
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
};
wlan_blue {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 ac27874c68a..c197a90ec5a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
@@ -49,7 +51,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
@@ -58,7 +61,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 17a57446618..673e9b740b6 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -60,12 +62,14 @@
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
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 f5d0a9e3b07..887f5f7b29d 100644
--- a/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
+++ b/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
@@ -71,25 +72,29 @@
};
led_power_red: power-red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
panic-indicator;
};
led_power_green: power-green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan-green {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0assoc";
};
wlan-yellow {
- label = "yellow:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_YELLOW>;
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 5bcfb54bfce..17c826c6c0f 100644
--- a/target/linux/ath79/dts/ar7240_tplink.dtsi
+++ b/target/linux/ath79/dts/ar7240_tplink.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -53,7 +54,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 2bded28ea42..1f46e77423c 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 <dt-bindings/leds/common.h>
+
#include "ar7240_tplink.dtsi"
&leds {
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 6c090fb437e..e0c625e2395 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 <dt-bindings/leds/common.h>
+
#include "ar7240_tplink.dtsi"
&leds {
@@ -24,7 +26,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 0a6936c5bfd..d8baa071112 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
@@ -108,7 +111,8 @@
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
gpios = <&ath9k 3 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&ath9k 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wlan_blue {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 e17a485396f..2c1dd064fec 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
@@ -101,12 +104,14 @@
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
usb_green {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
gpios = <&ath9k 2 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wlan_blue {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 af8e297b1df..c9f696234bf 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 <dt-bindings/leds/common.h>
+
#include "ar7241_tplink_tl-mr3x20.dtsi"
/ {
@@ -10,7 +12,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 cae2f5477d6..539a5952b30 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 <dt-bindings/leds/common.h>
+
#include "ar7241_tplink_tl-mr3x20.dtsi"
/ {
@@ -10,7 +12,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 17e06dfac7d..c9543afed39 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 <dt-bindings/leds/common.h>
+
#include "ar7241_tplink.dtsi"
/ {
@@ -10,7 +12,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 e7fe31f36d0..b0edbf4d06f 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
@@ -60,7 +61,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 fcc66c018c7..4fa0c704a60 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 <dt-bindings/leds/common.h>
+
#include "ar7241.dtsi"
#include "ar724x_ubnt_xm.dtsi"
@@ -24,7 +26,8 @@
};
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 7a0d7dd2689..f8ca3ed5639 100644
--- a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts
+++ b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "avm,fritz300e", "qca,ar7242";
@@ -32,18 +33,21 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 15a808ad2ac..f14053b0459 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -39,7 +40,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 ac4c096961b..abb39e119b9 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242";
@@ -69,7 +70,8 @@
compatible = "gpio-leds";
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
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 861964fdfcd..4c618956ac7 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,eap350-v1", "qca,ar7242";
@@ -33,7 +34,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
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 = <LED_COLOR_ID_BLUE>;
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 a7def14c738..024cce6f0f4 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,ecb350-v1", "qca,ar7242";
@@ -33,7 +34,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
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 5218a5ce276..2ab6f8aaf34 100644
--- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts
+++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "meraki,mr12", "qca,ar7242";
@@ -40,18 +41,21 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
panic-indicator;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 8df1fdb4ddb..efedf2a31bb 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 0eb38b5712e..77e7925715a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -155,7 +156,8 @@
compatible = "gpio-leds";
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
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 476f3e18a3f..1857b2b4a6c 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wa901nd-v2", "qca,ar9132";
@@ -49,7 +50,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 a4d19ce970a..7957c438d6a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132";
@@ -39,7 +40,8 @@
compatible = "gpio-leds";
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
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 41e53e1fc8d..e786ad2760e 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr941-v2", "qca,ar9132";
@@ -54,7 +55,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 ad48e07701d..c5109ff8000 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
};
led_status_red: status {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 7401cd053a7..088973048d8 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "GL.iNet GL-AR150";
@@ -21,7 +22,8 @@
compatible = "gpio-leds";
wlan {
- label = "orange:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 = <LED_COLOR_ID_GREEN>;
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 a7fd10bd732..38704f91697 100644
--- a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi
+++ b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -40,13 +41,15 @@
};
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
default-state = "on";
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
@@ -62,7 +65,8 @@
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
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 a2665519f46..98ef9abcc02 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "PQI Air-Pen";
@@ -19,13 +20,15 @@
compatible = "gpio-leds";
led_wlan: wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 256fe5f6154..ebd6d5384fc 100644
--- a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts
+++ b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "ZiKing CPE46B";
@@ -17,7 +18,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 f786f425f05..73699d9bfab 100644
--- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
+++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "8devices Carambola2";
@@ -17,7 +18,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 98de255332d..ca0b4131acf 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -35,7 +36,8 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
@@ -45,7 +47,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 bf3a46f9626..c866889ce4b 100644
--- a/target/linux/ath79/dts/ar9331_arduino_yun.dts
+++ b/target/linux/ath79/dts/ar9331_arduino_yun.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Arduino Yun";
@@ -49,13 +50,15 @@
compatible = "gpio-leds";
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
usb {
- label = "white:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_WHITE>;
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 6286f203efc..ee906171601 100644
--- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
+++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Embedded Wireless Dorin";
@@ -20,7 +21,8 @@
compatible = "gpio-leds";
led_status: status {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
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 5a96d509402..ad3b88ab2b9 100644
--- a/target/linux/ath79/dts/ar9331_etactica_eg200.dts
+++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "eTactica EG200";
@@ -45,7 +46,8 @@
};
wlan {
- label = "red:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_RED>;
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 8d003ce0903..be199b5e4fa 100644
--- a/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi
+++ b/target/linux/ath79/dts/ar9331_glinet_64xx.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
keys {
@@ -21,13 +22,15 @@
compatible = "gpio-leds";
wlan {
- label = "red:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 e4d2ff1e11d..37418bfc4ad 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "glinet,gl-mifi", "qca,ar9331";
@@ -17,18 +18,21 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 541b73850a0..e9b1c189249 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "glinet,gl-usb150", "qca,ar9331";
@@ -21,13 +22,15 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 b10f7fc965f..5d0c02a6499 100644
--- a/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts
+++ b/target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "HiWiFi HC6361";
@@ -37,11 +38,13 @@
default-state = "on";
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
wan {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
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 ad987dbca1d..054ccea5227 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Teltonika RUT230 v1";
@@ -82,13 +83,15 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
/* GPIO 13 - ACTIVE HIGH for hwrev 0 */
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 7b307cd6d07..0a965c2fa92 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "TP-Link TL-MR3020 V1";
@@ -21,18 +22,21 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
led_wps: wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 91023111a68..df39577110e 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_lan: lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 613b357dc87..04537fd33aa 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr741n-v4", "qca,ar9331";
@@ -72,12 +73,14 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 9ba89324223..30f42862b22 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Engenius EAP300 v2";
@@ -32,13 +33,15 @@
compatible = "gpio-leds";
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 eb304db8a38..1b90deace53 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Engenius ENS202EXT v1";
@@ -32,13 +33,15 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan {
- label = "amber:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_AMBER>;
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 bb6af232fd2..d41dcaa3289 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -35,7 +36,8 @@
compatible = "gpio-leds";
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -57,12 +59,14 @@
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
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 5ec17034d17..1011ab4980e 100644
--- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
+++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "PowerCloud Systems CR3000";
@@ -41,19 +42,22 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wan {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
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 9c505f2785c..5dff908129a 100644
--- a/target/linux/ath79/dts/ar9341_tplink.dtsi
+++ b/target/linux/ath79/dts/ar9341_tplink.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -17,13 +18,15 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
@@ -34,7 +37,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 3971df17f81..5a5e785d927 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 <dt-bindings/leds/common.h>
+
#include "ar9341_tplink.dtsi"
/ {
@@ -31,7 +33,8 @@
&leds {
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 12755aea2fa..08f14f5cc1b 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 <dt-bindings/leds/common.h>
+
#include "ar9341_tplink_tl-wa.dtsi"
/ {
@@ -35,12 +37,14 @@
compatible = "gpio-leds";
lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 9f540f82d95..e1ed0c29359 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 <dt-bindings/leds/common.h>
+
#include "ar9341_tplink_tl-wa.dtsi"
/ {
@@ -42,29 +44,34 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
wlan_green {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan_orange {
- label = "orange:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 4a4e51f4b8a..696e8f6391e 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 <dt-bindings/leds/common.h>
+
#include "ar9341_tplink_tl-wa.dtsi"
/ {
@@ -28,12 +30,14 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 d0f4c2e1f5a..3efd8242469 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 <dt-bindings/leds/common.h>
+
#include "ar9341_tplink.dtsi"
/ {
@@ -41,7 +43,8 @@
&leds {
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 8b354d60153..21c5d6bc178 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "iodata,etg3-r", "qca,ar9344";
@@ -20,7 +21,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 86b4bc358b4..5f9d8e42fb8 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -85,7 +86,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 917dc297fe1..83d29c90eae 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 <dt-bindings/leds/common.h>
+
#include "ar934x_ruckus_zf73xx.dtsi"
/ {
@@ -18,7 +20,8 @@
};
power_red: power-red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 fd438059e55..028171abaa5 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
led_wlan_green: wlan_green {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
led_lan_green: lan_green {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_lan_amber: lan_amber {
- label = "amber:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_AMBER>;
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 65dc8c0440a..b28f8e5cf6f 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 68d49308137..e3164259dfe 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 b999c960c4a..cb5588c1223 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 2a2036201e6..300b3b39bfa 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_white: power_white {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
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 789bd6df149..9f4c95c3d46 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "ALFA Network N5Q";
@@ -72,7 +73,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 c2c7cbb960c..86e990ffc7d 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "off";
};
@@ -43,7 +45,8 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 9d504414124..5004f403414 100644
--- a/target/linux/ath79/dts/ar9344_atheros_db120.dts
+++ b/target/linux/ath79/dts/ar9344_atheros_db120.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -39,7 +40,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 c53f03235fc..6bfa82356bf 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 21329db2584..8a354dfe374 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "compex,wpj344-16m", "qca,ar9344";
@@ -21,7 +22,8 @@
compatible = "gpio-leds";
led_status: status {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
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 fc8ac9ce8a9..e503be08ce0 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -17,7 +18,8 @@
compatible = "gpio-leds";
wlan {
- label = "white:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_WHITE>;
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 35d0e26d853..f0ca94f2317 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "usbport";
trigger-sources = <&hub_port>;
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
@@ -43,17 +48,20 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wan_orange {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 b2fcf71bd82..8ecea4d6c07 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wan_orange {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 4d3a149e3ee..94543cd2557 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 <dt-bindings/leds/common.h>
+
#include "ar9344_senao_ap-dual.dtsi"
/ {
@@ -10,13 +12,15 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 e7b8b9c3ce2..1b75d887f29 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 <dt-bindings/leds/common.h>
+
#include "ar9344_senao_ap-dual.dtsi"
/ {
@@ -10,7 +12,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
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 8f8276255a3..0605baa58e7 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_red: power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
};
lan_green {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 0cad9b76d15..f97ca429558 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
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 0315f49d074..b815291e70c 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 b6de8c4b7b1..fd07858b6b6 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
@@ -21,7 +24,8 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 a4485320345..0f86ad7903e 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 <dt-bindings/leds/common.h>
+
#include "ar9344_mikrotik_routerboard.dtsi"
/ {
@@ -24,7 +26,8 @@
&leds {
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 5952e0140fa..d0535251bdc 100644
--- a/target/linux/ath79/dts/ar9344_netgear_r6100.dts
+++ b/target/linux/ath79/dts/ar9344_netgear_r6100.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Netgear R6100";
@@ -57,34 +58,40 @@
compatible = "gpio-leds";
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
trigger-sources = <&hub_port>;
linux,default-trigger = "usbport";
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 49057548f89..64ceb875d07 100644
--- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -48,12 +49,14 @@
pinctrl-0 = <&enable_gpio_11>;
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
@@ -71,12 +74,14 @@
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wps_amber {
- label = "amber:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_AMBER>;
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 bd1eb59f4fa..165c5bdf4d3 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 <dt-bindings/leds/common.h>
+
&leds {
usb_green {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 da6020769f1..f11314694ab 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 <dt-bindings/leds/common.h>
+
&leds {
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
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 39ba2ffc3af..d4ab23ed43c 100644
--- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
+++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "OCEDO Raccoon";
@@ -24,7 +25,8 @@
compatible = "gpio-leds";
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 6c20f2715f0..f7985629bb2 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 <dt-bindings/leds/common.h>
+
#include "ar9344_openmesh_mr600.dtsi"
/ {
@@ -23,12 +25,14 @@
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_orange: power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
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 988066798f5..b6bec0a4385 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 <dt-bindings/leds/common.h>
+
#include "ar9344_openmesh_mr600.dtsi"
/ {
@@ -22,12 +24,14 @@
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
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 38153d9dc06..d15acfc7ca2 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
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 e3aa19c82de..739ba583a80 100644
--- a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts
+++ b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
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 aab04b080a8..f7f3ef06c97 100644
--- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts
+++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "PowerCloud Systems CAP324";
@@ -34,35 +35,41 @@
compatible = "gpio-leds";
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan_amber {
- label = "amber:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan_green {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan_amber {
- label = "amber:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
lan_green {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 a5fc1160c2c..6f35bd2c1e5 100644
--- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts
+++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "PowerCloud Systems CR5000";
@@ -41,20 +42,23 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>,
<&gpio 4 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wps_white {
- label = "white:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_WHITE>;
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 8241c21dd07..1d9c6ca9a43 100644
--- a/target/linux/ath79/dts/ar9344_qihoo_c301.dts
+++ b/target/linux/ath79/dts/ar9344_qihoo_c301.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
led_wlan_o: wlan_o {
- label = "orange:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 33e2990284e..6762264d358 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 <dt-bindings/leds/common.h>
+
#include "ar9344_qxwlan_e750x.dtsi"
/ {
@@ -9,12 +11,14 @@
&leds {
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 b20d187941d..999030a9cdd 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 <dt-bindings/leds/common.h>
+
#include "ar9344_qxwlan_e750x.dtsi"
/ {
@@ -9,12 +11,14 @@
&leds {
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 238a59cbe8d..df8f28c7d74 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750x.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -45,7 +46,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 dbccbef023b..b60dc61c74a 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 <dt-bindings/leds/common.h>
+
#include "ar934x_ruckus_zf73xx.dtsi"
/ {
@@ -28,7 +30,8 @@
};
power_red: power-red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 0bbd5c92fe9..da8c9ac165d 100644
--- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts
+++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Samsung WAM250";
@@ -38,12 +39,14 @@
compatible = "gpio-leds";
lan {
- label = "white:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power: power {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
@@ -54,7 +57,8 @@
};
wlan {
- label = "white:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_WHITE>;
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 0c6eee7ba63..1b762896a14 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 <dt-bindings/leds/common.h>
+
#include "ar9344_tplink_cpe.dtsi"
/ {
@@ -16,7 +18,8 @@
compatible = "gpio-leds";
led_lan: lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 c495eb298c8..c44ad29ccf9 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 <dt-bindings/leds/common.h>
+
#include "ar9344_tplink_cpe.dtsi"
/ {
@@ -16,7 +18,8 @@
compatible = "gpio-leds";
led_lan: lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 fa533d9f504..7228ca9f49c 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 <dt-bindings/leds/common.h>
+
#include "ar9344_tplink_cpe.dtsi"
/ {
@@ -16,7 +18,8 @@
compatible = "gpio-leds";
led_lan: lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 a1dca810936..27f425fa6d0 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 <dt-bindings/leds/common.h>
+
#include "ar9344_tplink_cpe.dtsi"
/ {
@@ -14,7 +16,8 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 a66e1fefa25..013b44a1239 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 <dt-bindings/leds/common.h>
+
#include "ar9344_tplink_tl-wdrxxxx.dtsi"
/ {
@@ -13,7 +15,8 @@
&leds {
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 6649e2477b2..456efc8b759 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "TP-Link TL-WR841HP v2";
@@ -31,7 +32,8 @@
compatible = "gpio-leds";
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
@@ -56,12 +58,14 @@
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 e09d539c564..6f560166965 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 c3d7c50813a..cb69bd9da96 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 d18ffff34d0..ecc1d182d15 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 <dt-bindings/leds/common.h>
+
#include "ar9344_wd_mynet-nxxx.dtsi"
/ {
@@ -27,12 +29,14 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
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 20dad6a675f..1b531aa0359 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
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 = <LED_COLOR_ID_GREEN>;
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 4b692b6d9bb..145ff0418ed 100644
--- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
+++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Winchannel WB2000";
@@ -44,7 +45,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 d494f9b1ed8..2164ce95991 100644
--- a/target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi
+++ b/target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -51,7 +52,8 @@
<&clks_disable_pins>;
power_green: power-green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 072a0fa27c2..9c801d8b606 100644
--- a/target/linux/ath79/dts/qca9531_alcatel_hh40v.dts
+++ b/target/linux/ath79/dts/qca9531_alcatel_hh40v.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "alcatel,hh40v", "qca,qca9531";
@@ -40,22 +41,26 @@
pinctrl-0 = <&jtag_disable_pins>;
lan_active {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
led_lan_link: lan_link {
- label = "orange:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
wan_active {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
wan_link {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 c9cd7038a5d..2175c72692a 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 <dt-bindings/leds/common.h>
+
#include "qca9531_alfa-network_r36a.dtsi"
/ {
@@ -62,7 +64,8 @@
};
led_usb: usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
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 52a6b5431f3..fc2aa19324f 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 <dt-bindings/leds/common.h>
+
#include "qca9531_alfa-network_r36a.dtsi"
/ {
@@ -29,7 +31,8 @@
};
led_usb: usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_BLUE>;
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 943731e69eb..698f028df81 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
led_status: status {
- label = "blue:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
trigger-sources = <&hub_port0>;
linux,default-trigger = "usbport";
};
wan {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 9b35e471e59..774d864964c 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
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 cdc365beb77..e24ef541126 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "ASUS RP-AC51";
@@ -37,17 +38,20 @@
compatible = "gpio-leds";
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
};
led_wps: wps {
- label = "red:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
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 d0d2a07c2b4..1c96bd9a6ac 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "comfast,cf-e130n-v2", "qca,qca9531";
@@ -23,13 +24,15 @@
pinctrl-names = "default";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 40aa19a66f0..08a0a99c2b8 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "comfast,cf-e313ac", "qca,qca9531";
@@ -22,18 +23,21 @@
pinctrl-names = "default";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 ff053d628e4..9a616921e53 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
@@ -53,7 +56,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 73d45f9b7cc..ec99ee0c4f5 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 b68ef442df8..535676aab21 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "comfast,cf-e560ac", "qca,qca9531";
@@ -60,12 +61,14 @@
};
wan {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 88a3eccb2b3..5f9240d6c1f 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "comfast,cf-ew72", "qca,qca9531";
@@ -23,17 +24,20 @@
pinctrl-0 = <&jtag_disable_pins>;
lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
led_wan: wan {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 6fcda9fbe35..d13e4966ae4 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
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 9a4db6f9fcd..8f2027f2502 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
status {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 07b0655e354..29886a4d3ec 100644
--- a/target/linux/ath79/dts/qca9531_engenius_ews511ap.dts
+++ b/target/linux/ath79/dts/qca9531_engenius_ews511ap.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,ews511ap", "qca,qca9531";
@@ -33,7 +34,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
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 c712236114c..f83618aface 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 <dt-bindings/leds/common.h>
+
#include "qca9531_glinet_gl-ar300m.dtsi"
/ {
@@ -22,10 +24,12 @@
};
&led_status {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
};
&led_wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
};
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
index 652ffb9c698..461392660f9 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -53,17 +54,20 @@
// Colors for non-Lite versions
led_status: status {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_wlan: wlan {
- label = "red:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_RED>;
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 e5d7cd04c1a..b6a37754fab 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "glinet,gl-ar750", "qca,qca9531";
@@ -40,7 +41,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
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 104ed3c72df..75a8dca7d20 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "glinet,gl-x300b", "qca,qca9531";
@@ -32,7 +33,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 0ed3f805c7e..106d81ff113 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "glinet,gl-x750", "qca,qca9531";
@@ -26,7 +27,8 @@
compatible = "gpio-leds";
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -44,7 +46,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 37830c4f7d0..2e7137bc3a9 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
};
wan {
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
};
wlan {
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 f599f5b77cd..d4e35c84b34 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 d6e23bef120..c3c313f3c67 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 <dt-bindings/leds/common.h>
+
#include "qca9531_qxwlan_e600g.dtsi"
/ {
@@ -9,7 +11,8 @@
&leds {
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 ff6bdd48152..c417a8ff4cb 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 <dt-bindings/leds/common.h>
+
#include "qca9531_qxwlan_e600g.dtsi"
/ {
@@ -9,7 +11,8 @@
&leds {
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 383b2e67c5e..ddc3e0f3c6e 100644
--- a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
+++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -35,12 +36,14 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 1748d9e1c9c..543fad3c4fc 100644
--- a/target/linux/ath79/dts/qca9531_telco_t1.dts
+++ b/target/linux/ath79/dts/qca9531_telco_t1.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 f01bcafbad3..497cb6f43c0 100644
--- a/target/linux/ath79/dts/qca9531_teltonika_rut300.dts
+++ b/target/linux/ath79/dts/qca9531_teltonika_rut300.dts
@@ -3,6 +3,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#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 = <LED_COLOR_ID_YELLOW>;
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 37353ce1005..fa17cd3ce33 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,archer-d50-v1", "qca,qca9531";
@@ -38,17 +39,20 @@
};
wan {
- label = "white:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
lan {
- label = "white:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
usb {
- label = "white:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_WHITE>;
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 f288317c2c3..be1dc66aff6 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-mr3420-v3", "qca,qca9531";
@@ -84,23 +85,27 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 76f12887386..fb9fb12b6b7 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-mr6400-v1", "qca,qca9531";
@@ -22,7 +23,8 @@
/* D12 */
wan {
- label = "white:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
@@ -34,26 +36,30 @@
/* D5 */
wps {
- label = "white:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
};
/* D3 */
wlan {
- label = "white:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
/* D2 */
led_power: power {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
/* D4 */
lan {
- label = "white:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_WHITE>;
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 a31694effdc..676f8adf1fc 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
@@ -38,19 +40,22 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
trigger-sources = <&hub_port0>;
linux,default-trigger = "usbport";
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 59f86170c98..9e90f99728f 100644
--- a/target/linux/ath79/dts/qca9531_wallys_dr531.dts
+++ b/target/linux/ath79/dts/qca9531_wallys_dr531.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Wallys DR531";
@@ -41,7 +42,8 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
@@ -66,7 +68,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 0385d73a7a1..4ad19fe600e 100644
--- a/target/linux/ath79/dts/qca9531_yuncore_a770.dts
+++ b/target/linux/ath79/dts/qca9531_yuncore_a770.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "YunCore A770";
@@ -31,18 +32,21 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
led_status: status {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 f4422e22429..e4b6f5fc68a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
@@ -57,7 +60,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 f1eef86a9b5..d5609f7af10 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -33,12 +34,14 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_status: status {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 90383690b97..796451768f2 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
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 5758b0d2a31..20002aaba85 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
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 487bbf9d4c7..b1d40ddc05b 100644
--- a/target/linux/ath79/dts/qca9533_kuwfi_c910.dts
+++ b/target/linux/ath79/dts/qca9533_kuwfi_c910.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -66,7 +67,8 @@
};
wan {
- label = "white:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_WHITE>;
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 aa5c57b2789..a65c4fd8ed4 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 <dt-bindings/leds/common.h>
+
#include "qca9533_mikrotik_routerboard-16m.dtsi"
/ {
@@ -19,7 +21,8 @@
pinctrl-0 = <&led_wan_pin>;
power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
@@ -30,12 +33,14 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 062c3bd061a..7b7477c506f 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 <dt-bindings/leds/common.h>
+
#include "qca9533_mikrotik_routerboard-16m.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -43,7 +46,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 e337bcc70db..8d18df8abbd 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 d4d049920c7..10841591b5d 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 <dt-bindings/leds/common.h>
+
#include "qca9533_mikrotik_routerboard-16m.dtsi"
/ {
@@ -19,12 +21,14 @@
pinctrl-0 = <&led_lan_pin>;
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 19ada708d99..942030e4c9a 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 <dt-bindings/leds/common.h>
+
#include "qca9533_mikrotik_routerboard-16m.dtsi"
/ {
@@ -33,7 +35,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 1f3bf68f69c..c78f52152d5 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -35,7 +36,8 @@
compatible = "gpio-leds";
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -57,12 +59,14 @@
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
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 66ede5554d0..010b752995b 100644
--- a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
+++ b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -34,17 +35,20 @@
compatible = "gpio-leds";
status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
};
led_status_green: status_green {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
};
status_blue {
- label = "blue:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
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 2836234b4c7..e7cb1f605d7 100644
--- a/target/linux/ath79/dts/qca9533_qca_ap143.dtsi
+++ b/target/linux/ath79/dts/qca9533_qca_ap143.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -18,12 +19,14 @@
compatible = "gpio-leds";
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
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 3295776bf93..e976566f4fc 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 <dt-bindings/leds/common.h>
+
#include "qca9533_tplink_cpexxx.dtsi"
&leds {
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 5a05869a1c0..7bad615a6c4 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -18,7 +19,8 @@
compatible = "gpio-leds";
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
@@ -28,7 +30,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 c3d42a8b350..f1cdde13a2d 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
@@ -59,7 +61,8 @@
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
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 027ed82cbe1..035d968cb2a 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 <dt-bindings/leds/common.h>
+
#include "qca9533_tplink_tl-wr841.dtsi"
/ {
@@ -18,7 +20,8 @@
};
wan_orange {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 c0e23f6d62e..9487e67e99b 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -14,7 +15,8 @@
compatible = "gpio-leds";
wifi {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
@@ -25,7 +27,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 c11f11ae185..d6768e1af2d 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr841hp-v3", "qca,qca9533";
@@ -27,28 +28,33 @@
};
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 33234fcb9f7..4d4acd202ce 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wifi {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
@@ -38,12 +41,14 @@
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
wan_red {
- label = "red:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
@@ -68,7 +73,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 05b76ecadba..9dafaaa9a4f 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 <dt-bindings/leds/common.h>
+
#include "qca9556_avm_fritz-repeater.dtsi"
#include <dt-bindings/gpio/gpio.h>
@@ -45,18 +47,21 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&spi_gpio 6 GPIO_ACTIVE_HIGH>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&spi_gpio 5 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 0d305359765..9123ae34b23 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 <dt-bindings/leds/common.h>
+
#include "qca9556_avm_fritz-repeater.dtsi"
#include <dt-bindings/gpio/gpio.h>
@@ -19,18 +21,21 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 355f0850c4b..a746b95922f 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 <dt-bindings/leds/common.h>
+
#include "qca9556_avm_fritz-repeater.dtsi"
/ {
@@ -48,12 +50,14 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&spi_gpio 6 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 941d87657fc..8cf1f00255e 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "off";
};
@@ -48,7 +50,8 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 f17af66cdf9..62c1124cb6d 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "buffalo,bhr-4grv2", "qca,qca9557";
@@ -20,7 +21,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 b380fef5152..2b5294fe965 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_RED>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 31d86b1cf07..c7dd3cea996 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -32,12 +33,14 @@
compatible = "gpio-leds";
led_wan: wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 da159caa20c..6fe518cbabe 100644
--- a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
+++ b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,eap1200h", "qca,qca9557";
@@ -32,7 +33,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -50,7 +52,8 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 b9338f55db0..c81d17d20a1 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,enstationac-v1", "qca,qca9557";
@@ -32,13 +33,15 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 a70dc4739df..fd805fa13f6 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 <dt-bindings/leds/common.h>
+
#include "qca955x_senao_router-dual.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -35,12 +38,14 @@
};
wps_amber {
- label = "amber:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 686a4745175..9df72df66ec 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
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 76932be64a2..097e1a87beb 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -17,7 +18,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 9189c6e5516..1df5d6125cc 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 = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
};
orange: orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
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 25b36e50be3..33fc3f1a070 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 <dt-bindings/leds/common.h>
+
#include "qca955x_zyxel_nbg6x16.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
@@ -48,7 +51,8 @@
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 9001e3fb866..c6620969d10 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "allnet,all-wap02860ac", "qca,qca9558";
@@ -32,7 +33,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -50,7 +52,8 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 778710eb919..3906b82776b 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "off";
};
@@ -48,7 +50,8 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 9d952824513..a5318b6cdd1 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
led_power_red: power-red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 b20a36a0319..9048fd3e2f0 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -26,17 +27,20 @@
};
status {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
wps-amber {
- label = "amber:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wps-blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 281559ac128..febbccb4cb4 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
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 4daad4b0b01..7bcadb2adaf 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
keys {
@@ -21,7 +22,8 @@
compatible = "gpio-leds";
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 d98600934ad..ec9d5cc6557 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 97687f1ce3a..dfef71e6d7c 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 ee6d35685ef..8d4bbe3ef2d 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 c5209046173..25760c8ccfa 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 2b808ce9213..aac5d4612fd 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 747a1a46d30..4db10ac776c 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_RED>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 d32329b3660..4cee284f31f 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_RED>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 3ca641a5507..6f23fbec464 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_power_red: power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 e72af99da24..2cdfd2cff93 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_RED>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 de44aec47d7..765cfafe15e 100644
--- a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
+++ b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "domywifi,dw33d", "qca,qca9558";
@@ -32,7 +33,8 @@
};
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
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 56c08621a74..ea43eb0e675 100644
--- a/target/linux/ath79/dts/qca9558_engenius_eap1750h.dts
+++ b/target/linux/ath79/dts/qca9558_engenius_eap1750h.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "engenius,eap1750h", "qca,qca9558";
@@ -32,7 +33,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -50,7 +52,8 @@
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 36aba0714e4..52708f3c6b2 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 <dt-bindings/leds/common.h>
+
#include "qca955x_senao_router-dual.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -35,12 +38,14 @@
};
wps_amber {
- label = "amber:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 4cfdfc1f280..0aae9b5187c 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 <dt-bindings/leds/common.h>
+
#include "qca955x_senao_router-dual.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -35,12 +38,14 @@
};
wps_amber {
- label = "amber:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 ef0e21a3b59..39a0790f121 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 <dt-bindings/leds/common.h>
+
#include "qca955x_senao_router-dual.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -35,12 +38,14 @@
};
wps_amber {
- label = "amber:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
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 5ee38b2e884..333b52f4d91 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "librerouter,librerouter-v1", "qca,qca9558";
@@ -32,7 +33,8 @@
};
status_blue {
- label = "blue:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
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 81898e972f0..3c9141fcba6 100644
--- a/target/linux/ath79/dts/qca9558_netgear_ex7300.dts
+++ b/target/linux/ath79/dts/qca9558_netgear_ex7300.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Netgear EX7300";
@@ -47,12 +48,14 @@
compatible = "gpio-leds";
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
@@ -67,7 +70,8 @@
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 ad5a378e932..891bdd95c43 100644
--- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts
+++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "ocedo,koala", "qca,qca9558";
@@ -21,7 +22,8 @@
compatible = "gpio-leds";
power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 cfceb9e6981..11a6e81f9f2 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
+++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -33,17 +34,20 @@
compatible = "gpio-leds";
status_blue {
- label = "blue:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
};
led_status_green: status_green {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
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 3bb793db7fd..a5d3d379878 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
chosen {
@@ -33,7 +34,8 @@
compatible = "gpio-leds";
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
@@ -43,17 +45,20 @@
};
status_green {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
};
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
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 d8b6b5d98f8..f7c51578ba9 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
};
lan_blue {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
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 0d9053e43f2..b9eb0e91a9b 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "openmesh,om5p-ac-v2", "qca,qca9558";
@@ -32,7 +33,8 @@
};
led_power_blue: power_blue {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
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 716bc0d77b6..9cbdca234d9 100644
--- a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
+++ b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -29,7 +30,8 @@
compatible = "gpio-leds";
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 ba7feeab5a1..2a57eeec775 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_AMBER>;
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 70d9e9d148b..92e89ff3aa7 100644
--- a/target/linux/ath79/dts/qca9558_sophos_ap.dtsi
+++ b/target/linux/ath79/dts/qca9558_sophos_ap.dtsi
@@ -17,6 +17,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -46,13 +47,15 @@
compatible = "gpio-leds";
led_status_green: status_green {
- label = "green:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 69a0af972ef..5801303040f 100644
--- a/target/linux/ath79/dts/qca9558_sophos_ap15.dts
+++ b/target/linux/ath79/dts/qca9558_sophos_ap15.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_yellow: status_yellow {
- label = "yellow:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_YELLOW>;
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 35532f42c8b..b4f32b9fc7c 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -23,17 +24,20 @@
};
wlan {
- label = "white:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
lan {
- label = "white:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
usb {
- label = "white:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_WHITE>;
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 5205426f8e6..a3fb9b22d22 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "TP-Link RE350K v1";
@@ -46,7 +47,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 e8ab6ff5125..3061ae07c7c 100644
--- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -19,7 +20,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
};
@@ -46,12 +48,14 @@
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
};
wps_red {
- label = "red:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_RED>;
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 f4390f46568..a72b6e6050d 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -24,20 +25,23 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
trigger-sources = <&hub_port0>;
linux,default-trigger = "usbport";
};
wifi_green {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wifi_wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 9d329000c9b..f51b89206d6 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr941n-v7-cn", "qca,qca9558";
@@ -27,7 +28,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 176fe97cc0a..23b484cdf58 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "trendnet,tew-823dru", "qca,qca9558";
@@ -20,12 +21,14 @@
compatible = "gpio-leds";
power_orange {
- label = "orange:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 09e7e1bf8d9..b42ea4dbc27 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_BLUE>;
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 68cd2777198..e3431330de0 100644
--- a/target/linux/ath79/dts/qca9558_watchguard_ap300.dts
+++ b/target/linux/ath79/dts/qca9558_watchguard_ap300.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "watchguard,ap300", "qca,qca9558";
@@ -31,7 +32,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 27341a88e67..76ae8a99a69 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 <dt-bindings/leds/common.h>
+
#include "qca955x_zyxel_nbg6x16.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
@@ -53,7 +56,8 @@
};
wps {
- label = "white:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_WHITE>;
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 9d591bd6b36..2a00985ba75 100644
--- a/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi
+++ b/target/linux/ath79/dts/qca955x_engenius_ecb1xxx.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -28,7 +29,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
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 7c220baddd3..b3b8d01986d 100644
--- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts
+++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "avm,fritz4020", "qca,qca9560";
@@ -46,24 +47,28 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 8f67299c489..c4671bf57f2 100644
--- a/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
+++ b/target/linux/ath79/dts/qca9561_nec_wf1200cr.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power_red: power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 3e87bebd146..97e9ebf0b64 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
@@ -80,12 +83,14 @@
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
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 397e81d17b3..e8b282b9c20 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 <dt-bindings/leds/common.h>
+
#include "qca9561_tplink_archer-c5x.dtsi"
/ {
@@ -13,7 +15,8 @@
&leds {
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 bb942078dc4..80e5db55e4a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,archer-c5x", "qca,qca9560";
@@ -39,7 +40,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -57,22 +59,26 @@
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 9e437b6f00f..eb21394d046 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 <dt-bindings/leds/common.h>
+
#include "qca9561_tplink_archer-c6x.dtsi"
/ {
@@ -13,12 +15,14 @@
&leds {
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 e71fc9eb7ab..aa4a7da10cf 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 <dt-bindings/leds/common.h>
+
#include "qca9561_tplink_archer-c6x.dtsi"
/ {
@@ -13,12 +15,14 @@
&leds {
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 d84ba25db4a..ede6878d5c1 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 <dt-bindings/leds/common.h>
+
#include "qca9561_tplink_archer-c6x.dtsi"
/ {
@@ -13,7 +15,8 @@
&leds {
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
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 e5f9d0bcc59..b3fdc03de47 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -33,7 +34,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -51,12 +53,14 @@
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 cf5f3a3a4e0..0e5c1fdc43c 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_WHITE>;
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 8767693c82e..f1204354074 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wdr6500-v2", "qca,qca9561";
@@ -51,7 +52,8 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
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 4510872e278..752ecb27980 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "ASUS PL-AC56";
@@ -36,12 +37,14 @@
compatible = "gpio-leds";
led_power: power {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 71c95ad3322..763ba431ef3 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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
};
led_orange: wps {
- label = "orange:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_ORANGE>;
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 15b8b819581..ebcaeb6ddc9 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "COMFAST CF-E375AC";
@@ -21,12 +22,14 @@
compatible = "gpio-leds";
led_lan: lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
};
wan {
- label = "red:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_RED>;
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 3047c6f4794..3b0c2afb50d 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/mtd/partitions/uimage.h>
/ {
@@ -39,12 +40,14 @@
pinctrl-0 = <&jtag_disable_pins>;
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_RED>;
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 a42deaddafd..34961c94c4a 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -33,17 +34,20 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 93bd8e363e8..320181c2b39 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 <dt-bindings/leds/common.h>
+
#include "qca9563_dlink_dir-8x9-a1.dtsi"
/ {
@@ -17,12 +19,14 @@
compatible = "gpio-leds";
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
@@ -32,7 +36,8 @@
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 5afe683613b..60777ea9002 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
led_power_white: power_white {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
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 a69b9d54e8b..e7cdcad9c3a 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 <dt-bindings/leds/common.h>
+
#include "qca9563_elecom_wrc-ghbk2-i.dtsi"
/ {
@@ -9,7 +11,8 @@
&leds {
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
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 51800820542..8b64d8d2ff3 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 <dt-bindings/leds/common.h>
+
#include "qca9563_elecom_wrc-ghbk2-i.dtsi"
/ {
@@ -9,7 +11,8 @@
&leds {
led_power: power {
- label = "white:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_WHITE>;
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 a6706da1a50..f63edb09cf9 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -17,7 +18,8 @@
compatible = "gpio-leds";
wps {
- label = "red:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_RED>;
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 da9e7ee867e..0624d88d8a1 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "glinet,gl-ar750s", "qca,qca9563";
@@ -41,7 +42,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 22ba567694a..7f8866bd36a 100644
--- a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
+++ b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_power_red: power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
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 a7390573cd6..fdcca64a0c8 100644
--- a/target/linux/ath79/dts/qca9563_nec_wg800hp.dts
+++ b/target/linux/ath79/dts/qca9563_nec_wg800hp.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "NEC Aterm WG800HP";
@@ -37,12 +38,14 @@
};
led_power_red: power_red {
- label = "red:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 c4faec8ef14..757fdfe650a 100644
--- a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -49,23 +50,27 @@
pinctrl-0 = <&jtag_disable_pins>;
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
default-state = "keep";
};
wan_green {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
wan_amber {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
@@ -76,7 +81,8 @@
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 8682413b0b0..60b65a4fcbf 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 <dt-bindings/leds/common.h>
+
#include "qca9563_netgear_wndr.dtsi"
/ {
@@ -9,7 +11,8 @@
&leds {
usb_green {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 5befbb16086..614d88d3830 100644
--- a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts
+++ b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Phicomm K2T";
@@ -20,17 +21,20 @@
compatible = "gpio-leds";
status_blue {
- label = "blue:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
status_yellow {
- label = "yellow:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_YELLOW>;
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 0861821f44a..a0e64899187 100644
--- a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi
+++ b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -35,7 +36,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 57db3cfa9ac..907eda94007 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,archer-c2-v3", "qca,qca9563";
@@ -38,17 +39,20 @@
};
wifi_wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 61c52943de0..f78a52a1208 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -37,22 +40,26 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 4a69d29b315..fc7814a97ec 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -37,22 +40,26 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "amber:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 929e8dc1bbc..611cb8953ed 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,archer-c7-v4", "qca,qca9563";
@@ -89,12 +90,14 @@
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
};
@@ -119,7 +122,8 @@
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 f6a959903fb..c1000f52a3b 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -23,7 +24,8 @@
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};
@@ -72,7 +76,8 @@
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 5439adaacb6..3a0c16d4a34 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "TP-Link CPE710 v1";
@@ -20,7 +21,8 @@
compatible = "gpio-leds";
led_lan: lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
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 989a21b1f19..7968bdbf6da 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include "qca956x.dtsi"
@@ -26,7 +27,8 @@
};
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 9c731ad9969..29d0d8868df 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include "qca956x.dtsi"
@@ -26,7 +27,8 @@
};
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
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 c3f1a130eb0..4d5d75a8e0f 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 1fac6082cf2..916d30d3c62 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 5139bc76702..75b28f93a50 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 6e7ba5fede4..82da14faad6 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 af133813e71..b44facf3f67 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 <dt-bindings/leds/common.h>
+
#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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
};
led_status_red: status_red {
- label = "red:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_RED>;
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 1e37db82bce..38edffc529b 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
led_status_amber: status_amber {
- label = "amber:status";
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_AMBER>;
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 3841a4c8fd7..2e9ef99cd0d 100644
--- a/target/linux/ath79/dts/qca9563_tplink_re450.dtsi
+++ b/target/linux/ath79/dts/qca9563_tplink_re450.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -18,7 +19,8 @@
compatible = "gpio-leds";
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
@@ -45,12 +47,14 @@
};
wps_blue {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
};
wps_red {
- label = "red:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_RED>;
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 0629a639550..b1d564be155 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
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 = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "on";
};
@@ -40,7 +42,8 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 560aae9694b..81fb6ce097f 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -49,12 +50,14 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
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 2e3ac952e29..e54003cb7a8 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -23,23 +24,27 @@
};
wifi_green {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wifi_wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
wan_fail {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 4aa0ef572f6..6db4653f69f 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 <dt-bindings/leds/common.h>
+
#include "qca9563_tplink_tl-wr1043n.dtsi"
/ {
@@ -92,7 +94,8 @@
&leds {
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
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 6dfc885bc0a..27e3436f8f2 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Xiaomi AIoT AC2350";
@@ -42,12 +43,14 @@
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
wan_orange {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
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 e64680e1121..4b922396661 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 <dt-bindings/leds/common.h>
// 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 = <LED_COLOR_ID_GREEN>;
- label = "green:debug";
+ function = LED_FUNCTION_DEBUG;
+ color = <LED_COLOR_ID_GREEN>;
};
&boot_flash {
diff --git a/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi b/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi
index 89177ef2d35..9a42ea668ac 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 <dt-bindings/leds/common.h>
// 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 = <LED_COLOR_ID_BLUE>;
- label = "blue:debug";
+ function = LED_FUNCTION_DEBUG;
+ color = <LED_COLOR_ID_BLUE>;
};
&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 ffc2b893451..3d3df1adcca 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
aliases {
@@ -35,12 +36,14 @@
compatible = "gpio-leds";
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
usb {
- label = "blue:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_BLUE>;
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 32b97a46013..24a54834fd3 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "Netgear EX7300 v2";
@@ -40,17 +41,20 @@
compatible = "gpio-leds";
led_power_green: power_green {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
led_power_amber: power_amber {
- label = "amber:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_AMBER>;
gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
};
wps_green {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 6266f5561be..76137c73c4e 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
model = "TP-Link Archer A9 v6";
@@ -39,25 +40,29 @@
compatible = "gpio-leds";
led_power: power {
- label = "green:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "on";
};
usb {
- label = "green:usb";
+ function = LED_FUNCTION_USB;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
trigger-sources = <&hub_port0>;
linux,default-trigger = "usbport";
};
wan {
- label = "green:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
wan_orange {
- label = "orange:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_ORANGE>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
@@ -74,7 +79,8 @@
};
wps {
- label = "green:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_GREEN>;
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 6b27468551e..1cf74619260 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 <dt-bindings/leds/common.h>
+
#include "tp9343_tplink_tl-wx.dtsi"
/ {
@@ -35,12 +37,14 @@
};
lan {
- label = "green:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wlan {
- label = "green:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_GREEN>;
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 b38cd418176..7780e0172c3 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 <dt-bindings/leds/common.h>
+
#include "tp9343_tplink_tl-wr94x.dtsi"
/ {
@@ -25,18 +27,21 @@
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wan_red {
- label = "red:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_RED>;
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 f837dccff9a..549bf4fea42 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 <dt-bindings/leds/common.h>
+
#include "tp9343_tplink_tl-wr94x.dtsi"
/ {
@@ -28,18 +30,21 @@
};
wlan {
- label = "blue:wlan";
+ function = LED_FUNCTION_WLAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wan_red {
- label = "red:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_RED>;
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 ccb3bb16709..04517cffd49 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 <dt-bindings/leds/common.h>
+
#include "tp9343_tplink_tl-wr94x.dtsi"
/ {
@@ -17,7 +19,8 @@
compatible = "gpio-leds";
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
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 61adc08289a..aaca7fa531b 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 <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/ {
compatible = "tplink,tl-wr941hp-v1", "qca,tp9343";
@@ -32,28 +33,33 @@
};
led_power: power {
- label = "blue:power";
+ function = LED_FUNCTION_POWER;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wan_blue {
- label = "blue:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
wan_red {
- label = "red:wan";
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_RED>;
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
};
lan {
- label = "blue:lan";
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
};
wps {
- label = "blue:wps";
+ function = LED_FUNCTION_WPS;
+ color = <LED_COLOR_ID_BLUE>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
};