ramips: add basic support for TP-Link EC330-G5u v1
[openwrt/openwrt.git] / target / linux / ramips / mt7621 / base-files / etc / board.d / 01_leds
1
2 . /lib/functions/leds.sh
3 . /lib/functions/uci-defaults.sh
4
5 board=$(board_name)
6
7 board_config_update
8
9 case $board in
10 asus,rp-ac87)
11 ucidef_set_rssimon "wlan0" "200000" "1"
12 ucidef_set_rssimon "wlan1" "200000" "1"
13 ucidef_set_led_rssi "rssilow-wlan0" "RSSILOW" "green:rssilow-wlan0" "wlan0" "1" "100"
14 ucidef_set_led_rssi "rssimedlow-wlan0" "RSSIMEDLOW" "green:rssimedlow-wlan0" "wlan0" "20" "100"
15 ucidef_set_led_rssi "rssimed-wlan0" "RSSIMED" "green:rssimed-wlan0" "wlan0" "40" "100"
16 ucidef_set_led_rssi "rssihigh-wlan0" "RSSIHIGH" "green:rssihigh-wlan0" "wlan0" "70" "100"
17 ucidef_set_led_rssi "rssilow-wlan1" "RSSILOW" "green:rssilow-wlan1" "wlan1" "1" "100"
18 ucidef_set_led_rssi "rssimedlow-wlan1" "RSSIMEDLOW" "green:rssimedlow-wlan1" "wlan1" "20" "100"
19 ucidef_set_led_rssi "rssimed-wlan1" "RSSIMED" "green:rssimed-wlan1" "wlan1" "40" "100"
20 ucidef_set_led_rssi "rssihigh-wlan1" "RSSIHIGH" "green:rssihigh-wlan1" "wlan1" "70" "100"
21 ;;
22 asus,rt-ax53u)
23 ucidef_set_led_usbport "usb" "USB" "blue:usb" "usb1-port2"
24 ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "mt76-phy0" "phy0tpt"
25 ucidef_set_led_wlan "wlan5g" "WiFi 5GHz" "mt76-phy1" "phy1tpt"
26 ;;
27 asus,rt-n56u-b1)
28 ucidef_set_led_netdev "lan" "LAN link" "blue:lan" "br-lan"
29 ucidef_set_led_netdev "wan" "WAN link" "blue:wan" "wan"
30 ;;
31 beeline,smartbox-flash|\
32 beeline,smartbox-giga|\
33 beeline,smartbox-turbo|\
34 etisalat,s3|\
35 rostelecom,rt-sf-1)
36 ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
37 ;;
38 belkin,rt1800)
39 ucidef_set_led_netdev "wan" "wan" "white:wan" "wan"
40 ;;
41 cudy,wr2100)
42 ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "lan1"
43 ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "lan2"
44 ucidef_set_led_netdev "lan3" "lan3" "green:lan3" "lan3"
45 ucidef_set_led_netdev "lan4" "lan4" "green:lan4" "lan4"
46 ucidef_set_led_netdev "wan" "wan" "green:wan" "wan"
47 ;;
48 d-team,newifi-d2)
49 ucidef_set_led_netdev "internet" "internet" "amber:internet" "wan"
50 ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "blue:wlan2g" "wlan0"
51 ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "blue:wlan5g" "wlan1"
52 ;;
53 d-team,pbr-m1|\
54 gehua,ghl-r-001|\
55 jcg,y2|\
56 xzwifi,creativebox-v1)
57 ucidef_set_led_netdev "internet" "internet" "blue:internet" "wan"
58 ;;
59 dlink,dap-x1860-a1)
60 ucidef_set_rssimon "wlan1" "200000" "1"
61 ucidef_set_led_rssi "rssilow" "RSSILOW" "orange:rssilow" "wlan1" "1" "25"
62 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssilow" "wlan1" "26" "100"
63 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimedium" "wlan1" "51" "100"
64 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan1" "76" "100"
65 ;;
66 dlink,dir-1960-a1|\
67 dlink,dir-2640-a1|\
68 dlink,dir-2660-a1)
69 ucidef_set_led_netdev "wan" "wan" "white:net" "wan"
70 ;;
71 dlink,dir-3060-a1)
72 ucidef_set_led_netdev "net_white" "WAN Link" "white:net" "wan" "link"
73 ucidef_set_led_netdev "net_orange" "WAN Activity" "orange:net" "wan" "tx rx"
74 ;;
75 dlink,dir-853-a3)
76 ucidef_set_led_netdev "wan" "wan" "blue:net" "wan"
77 ;;
78 dlink,dir-853-r1)
79 ucidef_set_led_netdev "internet" "internet" "blue:net" "wan"
80 ;;
81 dlink,dir-860l-b1|\
82 dlink,dir-867-a1|\
83 dlink,dir-878-a1|\
84 dlink,dir-882-a1|\
85 dlink,dir-882-r1)
86 ucidef_set_led_netdev "wan" "wan" "green:net" "wan"
87 ;;
88 gnubee,gb-pc2)
89 ucidef_set_led_netdev "ethyellow" "ethyellow" "orange:ethyellow" "ethyellow" "link tx rx"
90 ;;
91 keenetic,kn-3010)
92 ucidef_set_led_netdev "internet" "internet" "green:internet" "wan"
93 ;;
94 linksys,e5600)
95 ucidef_set_led_netdev "wan" "wan link" "blue:wan" "wan" "link"
96 ;;
97 linksys,ea6350-v4|\
98 linksys,ea7300-v1|\
99 linksys,ea7300-v2|\
100 linksys,ea7500-v2|\
101 linksys,ea8100-v1|\
102 linksys,ea8100-v2)
103 ucidef_set_led_netdev "lan1" "lan1 link" "green:lan1" "lan1" "link"
104 ucidef_set_led_netdev "lan2" "lan2 link" "green:lan2" "lan2" "link"
105 ucidef_set_led_netdev "lan3" "lan3 link" "green:lan3" "lan3" "link"
106 ucidef_set_led_netdev "lan4" "lan4 link" "green:lan4" "lan4" "link"
107 ucidef_set_led_netdev "wan" "wan link" "green:wan" "wan" "link"
108 ;;
109 mikrotik,routerboard-760igs)
110 ucidef_set_led_netdev "sfp" "SFP" "blue:sfp" "sfp"
111 ;;
112 mikrotik,ltap-2hnd|\
113 mikrotik,routerboard-m11g)
114 ucidef_set_rssimon "wlan0" "200000" "1"
115 ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssi0" "wlan0" "1" "100"
116 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssi1" "wlan0" "20" "100"
117 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssi2" "wlan0" "40" "100"
118 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssi3" "wlan0" "60" "100"
119 ucidef_set_led_rssi "rssiveryhigh" "RSSIVERYHIGH" "green:rssi4" "wlan0" "80" "100"
120 ;;
121 mtc,wr1201)
122 ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "br-lan"
123 ;;
124 netgear,r6220|\
125 netgear,r6260|\
126 netgear,r6350|\
127 netgear,r6850|\
128 netgear,wac124|\
129 netgear,wndr3700-v5)
130 ucidef_set_led_netdev "wan" "wan" "green:wan" "wan"
131 ;;
132 netgear,r6700-v2|\
133 netgear,r6800|\
134 netgear,r6900-v2|\
135 netgear,r7200|\
136 netgear,r7450)
137 ucidef_set_led_netdev "wan" "WAN" "white:wan" "wan"
138 ucidef_set_led_netdev "lan1" "LAN1" "white:lan1" "lan1"
139 ucidef_set_led_netdev "lan2" "LAN2" "white:lan2" "lan2"
140 ucidef_set_led_netdev "lan3" "LAN3" "white:lan3" "lan3"
141 ucidef_set_led_netdev "lan4" "LAN4" "white:lan4" "lan4"
142 ;;
143 netgear,wax202)
144 ucidef_set_led_netdev "internet" "Internet" "green:net" "wan"
145 ;;
146 oraybox,x3a)
147 ucidef_set_led_netdev "wan" "wan link" "red:status" "wan"
148 ucidef_set_led_netdev "lan" "lan link" "green:status" "br-lan"
149 ;;
150 tplink,archer-a6-v3|\
151 tplink,archer-c6-v3|\
152 tplink,archer-c6u-v1)
153 ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan"
154 ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
155 ;;
156 tplink,ec330-g5u-v1)
157 ucidef_set_led_netdev "lan" "Ethernet" "blue:ethernet" "br-lan" "link tx rx"
158 ucidef_set_led_netdev "wan" "Internet" "blue:internet" "wan" "link tx rx"
159 ucidef_set_led_netdev "wan-off" "Internet-off" "amber:internet" "wan" "link"
160 ;;
161 tplink,re350-v1)
162 ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "blue:wifi2G" "wlan0"
163 ucidef_set_led_netdev "wifi5g" "Wifi 5G" "blue:wifi5G" "wlan1"
164 ucidef_set_led_netdev "eth_act" "LAN act" "green:eth_act" "lan" "tx rx"
165 ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "lan" "link"
166 ;;
167 tplink,mr600-v2-eu)
168 ucidef_set_led_netdev "lan" "LAN" "white:lan" "br-lan"
169 ucidef_set_led_netdev "wan" "WAN" "white:wan" "wan"
170 ucidef_set_led_netdev "4g" "4G" "white:4g" "wwan0"
171 ;;
172 tplink,re500-v1|\
173 tplink,re650-v1|\
174 tplink,re650-v2)
175 ucidef_set_led_netdev "eth_act" "LAN act" "green:eth_act" "lan" "tx rx"
176 ucidef_set_led_netdev "eth_link" "LAN link" "green:eth_link" "lan" "link"
177 ;;
178 tplink,tl-wpa8631p-v3)
179 ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan"
180 ;;
181 xiaomi,mi-router-ac2100)
182 ucidef_set_led_netdev "wan-blue" "WAN (blue)" "blue:wan" "wan"
183 ;;
184 xiaomi,mi-router-cr6606|\
185 xiaomi,mi-router-cr6608|\
186 xiaomi,mi-router-cr6609)
187 ucidef_set_led_netdev "internet" "Internet" "blue:net" "wan"
188 ;;
189 xiaomi,redmi-router-ac2100)
190 ucidef_set_led_netdev "wan" "wan" "white:wan" "wan"
191 ;;
192 youhua,wr1200js)
193 ucidef_set_led_netdev "internet" "INTERNET" "green:wan" "wan"
194 ;;
195 yuncore,fap690)
196 ucidef_set_led_netdev "eth_link" "LAN link" "blue:status" "lan" "link"
197 ;;
198 yuncore,ax820)
199 ucidef_set_led_netdev "lan" "LAN" "green:lan" "lan"
200 ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
201 ;;
202 zyxel,lte3301-plus)
203 ucidef_set_led_netdev "internet" "internet" "white:internet" "wwan0"
204 ;;
205 esac
206
207 board_config_flush
208
209 exit 0