ath79: GL-AR300M: provide NAND support; increase to 4 MB kernel
[openwrt/openwrt.git] / target / linux / ath79 / generic / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4
5 board_config_update
6
7 board=$(board_name)
8 boardname="${board##*,}"
9
10 case "$board" in
11 8dev,carambola2)
12 ucidef_set_led_netdev "lan" "LAN" "$boardname:orange:eth0" "eth0"
13 ucidef_set_led_switch "wan" "WAN" "$boardname:orange:eth1" "switch0" "0x04"
14 ;;
15 alfa-network,ap121f)
16 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
17 ;;
18 avm,fritz300e)
19 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
20 ucidef_set_rssimon "wlan0" "200000" "1"
21 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
22 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:green:rssi1" "wlan0" "20" "100"
23 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:green:rssi2" "wlan0" "40" "100"
24 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
25 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
26 ;;
27 avm,fritz4020)
28 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
29 ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E"
30 ;;
31 comfast,cf-e110n-v2)
32 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1"
33 ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x02"
34 ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
35 ucidef_set_rssimon "wlan0" "200000" "1"
36 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
37 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
38 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
39 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
40 ;;
41 comfast,cf-e120a-v3)
42 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1"
43 ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x04"
44 ucidef_set_rssimon "wlan0" "200000" "1"
45 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
46 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
47 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
48 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
49 ;;
50 comfast,cf-e313ac)
51 ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02"
52 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
53 ucidef_set_rssimon "wlan0" "200000" "1"
54 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
55 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
56 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
57 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
58 ;;
59 comfast,cf-e314n-v2)
60 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
61 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1"
62 ucidef_set_rssimon "wlan0" "200000" "1"
63 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
64 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
65 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
66 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
67 ;;
68 comfast,cf-e5)
69 ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x02"
70 ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:wan" "eth1"
71 ucidef_set_rssimon "wlan0" "200000" "1"
72 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:blue:rssi0" "wlan0" "1" "100"
73 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:blue:rssi1" "wlan0" "33" "100"
74 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:blue:rssi2" "wlan0" "66" "100"
75 ;;
76 dlink,dir-842-c1|\
77 dlink,dir-842-c2|\
78 dlink,dir-842-c3|\
79 dlink,dir-859-a1)
80 ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
81 ;;
82 engenius,ecb1750)
83 ucidef_set_led_netdev "lan" "LAN" "$boardname:blue:lan" "eth0"
84 ;;
85 engenius,ews511ap)
86 ucidef_set_led_netdev "lan1" "LAN1" "$boardname:blue:lan1" "eth1"
87 ucidef_set_led_netdev "lan2" "LAN2" "$boardname:blue:lan2" "eth0"
88 ;;
89 etactica,eg200)
90 ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
91 ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
92 ;;
93 glinet,gl-ar150)
94 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
95 ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02"
96 ;;
97 glinet,gl-ar300m-lite)
98 ucidef_set_led_netdev "lan" "LAN" "gl-ar300m-lite:green:lan" "eth0"
99 ;;
100 glinet,gl-x750)
101 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
102 ;;
103 netgear,wnr2200-8m|\
104 netgear,wnr2200-16m)
105 ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0"
106 ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" "switch0" "0x02" "0x04"
107 ucidef_set_led_switch "lan2green" "LAN2 (green)" "netgear:green:lan2" "switch0" "0x04" "0x04"
108 ucidef_set_led_switch "lan3green" "LAN3 (green)" "netgear:green:lan3" "switch0" "0x08" "0x04"
109 ucidef_set_led_switch "lan4green" "LAN4 (green)" "netgear:green:lan4" "switch0" "0x10" "0x04"
110 ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02" "0x02"
111 ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04" "0x02"
112 ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08" "0x02"
113 ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" "0x02"
114 ;;
115 pcs,cap324)
116 ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
117 ;;
118 pcs,cr3000)
119 ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
120 ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
121 ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
122 ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
123 ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
124 ;;
125 qihoo,c301)
126 ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt"
127 ;;
128 tplink,archer-a7-v5|\
129 tplink,archer-c7-v4|\
130 tplink,archer-c7-v5)
131 ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02"
132 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
133 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
134 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
135 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x20"
136 ;;
137 tplink,archer-c2-v3|\
138 tplink,tl-wr1043nd-v4|\
139 tplink,tl-wr1043n-v5)
140 ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
141 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
142 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
143 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
144 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
145 ;;
146 tplink,archer-c6-v2)
147 ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x3C"
148 ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02"
149 ;;
150 tplink,archer-c25-v1|\
151 tplink,tl-wr842n-v3)
152 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
153 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
154 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
155 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
156 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
157 ;;
158 tplink,archer-c58-v1|\
159 tplink,archer-c59-v1|\
160 tplink,archer-c59-v2|\
161 tplink,archer-c60-v1|\
162 tplink,archer-c60-v2)
163 ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E"
164 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
165 ;;
166 tplink,archer-d50-v1)
167 ucidef_set_led_switch "lan" "LAN" "tp-link:white:lan" "switch0" "0x1c"
168 ucidef_set_led_switch "wan_data" "WAN Data" "tp-link:white:internet" "switch0" "0x02" "" "tx rx"
169 ucidef_set_led_switch "wan_link" "WAN Link" "tp-link:white:wan" "switch0" "0x02" "" "link"
170 ;;
171 tplink,cpe210-v1|\
172 tplink,cpe220-v2|\
173 tplink,cpe220-v3|\
174 tplink,cpe510-v1|\
175 tplink,wbs210-v2)
176 ucidef_set_led_netdev "lan0" "LAN0" "tp-link:green:lan0" "eth1"
177 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
178 ucidef_set_rssimon "wlan0" "200000" "1"
179 ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100"
180 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "30" "100"
181 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "60" "100"
182 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "80" "100"
183 ;;
184 tplink,cpe210-v2|\
185 tplink,cpe210-v3)
186 ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
187 ucidef_set_rssimon "wlan0" "200000" "1"
188 ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100"
189 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "30" "100"
190 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "60" "100"
191 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "80" "100"
192 ;;
193 tplink,cpe510-v2|\
194 tplink,cpe510-v3)
195 ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
196 ucidef_set_rssimon "wlan0" "200000" "1"
197 ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100" "0" "13"
198 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "26" "100" "-25" "13"
199 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "51" "100" "-50" "13"
200 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
201 ;;
202 tplink,cpe610-v1)
203 ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
204 ;;
205 tplink,re355-v1|\
206 tplink,re450-v1|\
207 tplink,re450-v2)
208 ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
209 ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
210 ;;
211 tplink,tl-wr842n-v2)
212 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
213 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
214 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
215 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
216 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
217 ;;
218 trendnet,tew-823dru)
219 ucidef_set_led_netdev "wan" "WAN" "trendnet:green:planet" "eth0"
220 ;;
221 ubnt,bullet-m|\
222 ubnt,bullet-m-xw|\
223 ubnt,nanostation-m|\
224 ubnt,nanostation-m-xw|\
225 ubnt,rocket-m)
226 ucidef_set_rssimon "wlan0" "200000" "1"
227 ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
228 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100"
229 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100"
230 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100"
231 ;;
232 ubnt,nanobeam-ac|\
233 ubnt,nanostation-ac)
234 ucidef_set_rssimon "wlan0" "200000" "1"
235 ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:blue:rssi0" "wlan0" "1" "100"
236 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:blue:rssi1" "wlan0" "26" "100"
237 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:blue:rssi2" "wlan0" "51" "100"
238 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:blue:rssi3" "wlan0" "76" "100"
239 ;;
240 wd,mynet-wifi-rangeextender)
241 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
242 ucidef_set_rssimon "wlan0" "200000" "1"
243 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:rssi-low" "wlan0" "1" "100"
244 ucidef_set_led_rssi "rssimedium" "RSSIMED" "$boardname:blue:rssi-med" "wlan0" "33" "100"
245 ucidef_set_led_rssi "rssihigh" "RSSIMAX" "$boardname:blue:rssi-max" "wlan0" "66" "100"
246 ;;
247 yuncore,a770)
248 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
249 ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x10"
250 ;;
251 zbtlink,zbt-wd323)
252 ucidef_set_led_switch "lan1" "LAN1" "zbt-wd323:orange:lan1" "switch0" "0x10"
253 ucidef_set_led_switch "lan2" "LAN2" "zbt-wd323:orange:lan2" "switch0" "0x08"
254 ;;
255 esac
256
257 board_config_flush
258
259 exit 0