ath79: add support for TP-Link CPE510-v2/v3
[openwrt/openwrt.git] / target / linux / ath79 / image / generic-tp-link.mk
1 include ./common-tp-link.mk
2
3 define Device/tplink_archer-a7-v5
4 $(Device/tplink-safeloader-uimage)
5 ATH_SOC := qca9563
6 IMAGE_SIZE := 15104k
7 DEVICE_MODEL := Archer A7
8 DEVICE_VARIANT := v5
9 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
10 TPLINK_BOARD_ID := ARCHER-A7-V5
11 BOARDNAME := ARCHER-A7-V5
12 SUPPORTED_DEVICES += archer-a7-v5
13 endef
14 TARGET_DEVICES += tplink_archer-a7-v5
15
16 define Device/tplink_archer-c2-v3
17 $(Device/tplink-safeloader-uimage)
18 ATH_SOC := qca9563
19 IMAGE_SIZE := 7808k
20 DEVICE_MODEL := Archer C2
21 DEVICE_VARIANT := v3
22 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
23 TPLINK_BOARD_ID := ARCHER-C2-V3
24 endef
25 TARGET_DEVICES += tplink_archer-c2-v3
26
27 define Device/tplink_archer-c25-v1
28 $(Device/tplink-safeloader-uimage)
29 ATH_SOC := qca9561
30 IMAGE_SIZE := 7808k
31 DEVICE_MODEL := Archer C25
32 DEVICE_VARIANT := v1
33 TPLINK_BOARD_ID := ARCHER-C25-V1
34 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
35 SUPPORTED_DEVICES += archer-c25-v1
36 endef
37 TARGET_DEVICES += tplink_archer-c25-v1
38
39 define Device/tplink_archer-c58-v1
40 $(Device/tplink-safeloader-uimage)
41 ATH_SOC := qca9561
42 IMAGE_SIZE := 7936k
43 DEVICE_MODEL := Archer C58
44 DEVICE_VARIANT := v1
45 TPLINK_BOARD_ID := ARCHER-C58-V1
46 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
47 SUPPORTED_DEVICES += archer-c58-v1
48 endef
49 TARGET_DEVICES += tplink_archer-c58-v1
50
51 define Device/tplink_archer-c59-v1
52 $(Device/tplink-safeloader-uimage)
53 ATH_SOC := qca9561
54 IMAGE_SIZE := 14528k
55 DEVICE_MODEL := Archer C59
56 DEVICE_VARIANT := v1
57 TPLINK_BOARD_ID := ARCHER-C59-V1
58 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca9888-ct
59 SUPPORTED_DEVICES += archer-c59-v1
60 endef
61 TARGET_DEVICES += tplink_archer-c59-v1
62
63 define Device/tplink_archer-c6-v2
64 $(Device/tplink-safeloader-uimage)
65 ATH_SOC := qca9563
66 IMAGE_SIZE := 7808k
67 DEVICE_MODEL := Archer C6
68 DEVICE_VARIANT := v2
69 TPLINK_BOARD_ID := ARCHER-C6-V2
70 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
71 endef
72 TARGET_DEVICES += tplink_archer-c6-v2
73
74 define Device/tplink_archer-c5-v1
75 $(Device/tplink-16mlzma)
76 ATH_SOC := qca9558
77 DEVICE_MODEL := Archer C5
78 DEVICE_VARIANT := v1
79 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
80 TPLINK_HWID := 0xc5000001
81 SUPPORTED_DEVICES += archer-c5
82 endef
83 TARGET_DEVICES += tplink_archer-c5-v1
84
85 define Device/tplink_archer-c7-v1
86 $(Device/tplink-8mlzma)
87 ATH_SOC := qca9558
88 DEVICE_MODEL := Archer C7
89 DEVICE_VARIANT := v1
90 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
91 TPLINK_HWID := 0x75000001
92 SUPPORTED_DEVICES += archer-c7
93 endef
94 TARGET_DEVICES += tplink_archer-c7-v1
95
96 define Device/tplink_archer-c7-v2
97 $(Device/tplink-16mlzma)
98 ATH_SOC := qca9558
99 DEVICE_MODEL := Archer C7
100 DEVICE_VARIANT := v2
101 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
102 TPLINK_HWID := 0xc7000002
103 SUPPORTED_DEVICES += archer-c7
104 IMAGES += factory-us.bin factory-eu.bin
105 IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
106 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
107 endef
108 TARGET_DEVICES += tplink_archer-c7-v2
109
110 define Device/tplink_archer-c7-v4
111 $(Device/tplink-safeloader-uimage)
112 ATH_SOC := qca9563
113 IMAGE_SIZE := 15104k
114 DEVICE_MODEL := Archer C7
115 DEVICE_VARIANT := v4
116 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
117 TPLINK_BOARD_ID := ARCHER-C7-V4
118 BOARDNAME := ARCHER-C7-V4
119 SUPPORTED_DEVICES += archer-c7-v4
120 endef
121 TARGET_DEVICES += tplink_archer-c7-v4
122
123 define Device/tplink_archer-c7-v5
124 $(Device/tplink-safeloader-uimage)
125 ATH_SOC := qca9563
126 IMAGE_SIZE := 15360k
127 DEVICE_MODEL := Archer C7
128 DEVICE_VARIANT := v5
129 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
130 TPLINK_BOARD_ID := ARCHER-C7-V5
131 BOARDNAME := ARCHER-C7-V5
132 SUPPORTED_DEVICES += archer-c7-v5
133 endef
134 TARGET_DEVICES += tplink_archer-c7-v5
135
136 define Device/tplink_cpe210-v2
137 $(Device/tplink-safeloader)
138 ATH_SOC := qca9533
139 IMAGE_SIZE := 7680k
140 DEVICE_MODEL := CPE210
141 DEVICE_VARIANT := v2
142 TPLINK_BOARD_ID := CPE210V2
143 DEVICE_PACKAGES := rssileds
144 LOADER_TYPE := elf
145 SUPPORTED_DEVICES += cpe210-v2
146 endef
147 TARGET_DEVICES += tplink_cpe210-v2
148
149 define Device/tplink_cpe210-v3
150 $(Device/tplink-safeloader)
151 ATH_SOC := qca9533
152 IMAGE_SIZE := 7680k
153 DEVICE_MODEL := CPE210
154 DEVICE_VARIANT := v3
155 DEVICE_PACKAGES := rssileds
156 TPLINK_BOARD_ID := CPE210V3
157 LOADER_TYPE := elf
158 SUPPORTED_DEVICES += cpe210-v3
159 endef
160 TARGET_DEVICES += tplink_cpe210-v3
161
162 define Device/tplink_cpe510-v2
163 $(Device/tplink-safeloader)
164 ATH_SOC := ar9344
165 IMAGE_SIZE := 7680k
166 DEVICE_MODEL := CPE510
167 DEVICE_VARIANT := v2
168 DEVICE_PACKAGES := rssileds
169 TPLINK_BOARD_ID := CPE510V2
170 LOADER_TYPE := elf
171 LOADER_FLASH_OFFS := 0x43000
172 COMPILE := loader-$(1).elf
173 COMPILE/loader-$(1).elf := loader-okli-compile
174 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288
175 SUPPORTED_DEVICES += cpe510-v2
176 endef
177 TARGET_DEVICES += tplink_cpe510-v2
178
179 define Device/tplink_cpe510-v3
180 $(Device/tplink-safeloader)
181 ATH_SOC := ar9344
182 IMAGE_SIZE := 7680k
183 DEVICE_MODEL := CPE510
184 DEVICE_VARIANT := v3
185 DEVICE_PACKAGES := rssileds
186 TPLINK_BOARD_ID := CPE510V3
187 LOADER_TYPE := elf
188 LOADER_FLASH_OFFS := 0x43000
189 COMPILE := loader-$(1).elf
190 COMPILE/loader-$(1).elf := loader-okli-compile
191 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288
192 SUPPORTED_DEVICES += cpe510-v3
193 endef
194 TARGET_DEVICES += tplink_cpe510-v3
195
196 define Device/tplink_cpe610-v1
197 $(Device/tplink-safeloader)
198 ATH_SOC := ar9344
199 IMAGE_SIZE := 7680k
200 DEVICE_MODEL := CPE610
201 DEVICE_VARIANT := v1
202 TPLINK_BOARD_ID := CPE610V1
203 LOADER_TYPE := elf
204 LOADER_FLASH_OFFS := 0x43000
205 COMPILE := loader-$(1).elf
206 COMPILE/loader-$(1).elf := loader-okli-compile
207 KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288
208 endef
209 TARGET_DEVICES += tplink_cpe610-v1
210
211 define Device/tplink_archer-d50-v1
212 ATH_SOC := qca9531
213 DEVICE_VENDOR := TP-Link
214 DEVICE_MODEL := Archer D50
215 DEVICE_VARIANT := v1
216 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
217 BOARDNAME := ARCHER-D50-V1
218 IMAGE_SIZE := 7808k
219 TPLINK_HWID := 0xC1200001
220 TPLINK_HWREV := 0x00000046
221 TPLINK_FLASHLAYOUT := 8Mqca
222 TPLINK_HWREVADD := 0x00000000
223 TPLINK_HVERSION := 3
224 KERNEL := kernel-bin | append-dtb | lzma
225 KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | \
226 tplink-v2-header -s -V "ver. 1.0"
227 IMAGES := sysupgrade.bin
228 IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 2.0" | \
229 append-metadata | check-size $$$$(IMAGE_SIZE)
230 SUPPORTED_DEVICES += archer-d50-v1
231 endef
232 TARGET_DEVICES += tplink_archer-d50-v1
233
234 define Device/tplink_re350k-v1
235 $(Device/tplink-safeloader)
236 ATH_SOC := qca9558
237 IMAGE_SIZE := 13760k
238 DEVICE_MODEL := RE350K
239 DEVICE_VARIANT := v1
240 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
241 TPLINK_BOARD_ID := RE350K-V1
242 TPLINK_HWID := 0x0
243 TPLINK_HWREV := 0
244 endef
245 TARGET_DEVICES += tplink_re350k-v1
246
247 define Device/tplink_rex5x-v1
248 $(Device/tplink-safeloader)
249 ATH_SOC := qca9558
250 IMAGE_SIZE := 6016k
251 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
252 TPLINK_HWID := 0x0
253 TPLINK_HWREV := 0
254 endef
255
256 define Device/tplink_re355-v1
257 $(Device/tplink_rex5x-v1)
258 DEVICE_MODEL := RE355
259 DEVICE_VARIANT := v1
260 TPLINK_BOARD_ID := RE355
261 SUPPORTED_DEVICES += re355
262 endef
263 TARGET_DEVICES += tplink_re355-v1
264
265 define Device/tplink_re450-v1
266 $(Device/tplink_rex5x-v1)
267 DEVICE_MODEL := RE450
268 DEVICE_VARIANT := v1
269 TPLINK_BOARD_ID := RE450
270 SUPPORTED_DEVICES += re450
271 endef
272 TARGET_DEVICES += tplink_re450-v1
273
274 define Device/tplink_re450-v2
275 $(Device/tplink-safeloader)
276 ATH_SOC := qca9563
277 IMAGE_SIZE := 6016k
278 DEVICE_MODEL := RE450
279 DEVICE_VARIANT := v2
280 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
281 TPLINK_HWID := 0x0
282 TPLINK_HWREV := 0
283 TPLINK_BOARD_ID := RE450-V2
284 LOADER_TYPE := elf
285 endef
286 TARGET_DEVICES += tplink_re450-v2
287
288 define Device/tplink_tl-wdr3600-v1
289 $(Device/tplink-8mlzma)
290 ATH_SOC := ar9344
291 DEVICE_MODEL := TL-WDR3600
292 DEVICE_VARIANT := v1
293 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
294 TPLINK_HWID := 0x36000001
295 SUPPORTED_DEVICES += tl-wdr4300
296 endef
297 TARGET_DEVICES += tplink_tl-wdr3600-v1
298
299 define Device/tplink_tl-wdr4300-v1
300 $(Device/tplink-8mlzma)
301 ATH_SOC := ar9344
302 DEVICE_MODEL := TL-WDR4300
303 DEVICE_VARIANT := v1
304 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
305 TPLINK_HWID := 0x43000001
306 SUPPORTED_DEVICES += tl-wdr4300
307 endef
308 TARGET_DEVICES += tplink_tl-wdr4300-v1
309
310 define Device/tplink_tl-wdr4900-v2
311 $(Device/tplink-8mlzma)
312 ATH_SOC := qca9558
313 DEVICE_MODEL := TL-WDR4900
314 DEVICE_VARIANT := v2
315 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
316 TPLINK_HWID := 0x49000002
317 endef
318 TARGET_DEVICES += tplink_tl-wdr4900-v2
319
320 define Device/tplink_tl-wr810n-v1
321 $(Device/tplink-8mlzma)
322 ATH_SOC := qca9531
323 DEVICE_MODEL := TL-WR810N
324 DEVICE_VARIANT := v1
325 TPLINK_HWID := 0x8100001
326 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
327 endef
328 TARGET_DEVICES += tplink_tl-wr810n-v1
329
330 define Device/tplink_tl-wr810n-v2
331 $(Device/tplink-8mlzma)
332 ATH_SOC := qca9533
333 DEVICE_MODEL := TL-WR810N
334 DEVICE_VARIANT := v2
335 TPLINK_HWID := 0x8100002
336 endef
337 TARGET_DEVICES += tplink_tl-wr810n-v2
338
339 define Device/tplink_tl-wr710n-v1
340 $(Device/tplink-8mlzma)
341 ATH_SOC := ar9331
342 DEVICE_MODEL := TL-WR710N
343 DEVICE_VARIANT := v1
344 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea2 kmod-usb-ledtrig-usbport
345 TPLINK_HWID := 0x07100001
346 SUPPORTED_DEVICES += tl-wr710n
347 endef
348 TARGET_DEVICES += tplink_tl-wr710n-v1
349
350 define Device/tplink_tl-wr842n-v1
351 $(Device/tplink-8m)
352 ATH_SOC := ar7241
353 DEVICE_MODEL := TL-WR842N/ND
354 DEVICE_VARIANT := v1
355 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
356 TPLINK_HWID := 0x8420001
357 endef
358 TARGET_DEVICES += tplink_tl-wr842n-v1
359
360 define Device/tplink_tl-wr842n-v2
361 $(Device/tplink-8mlzma)
362 ATH_SOC := ar9341
363 DEVICE_MODEL := TL-WR842N/ND
364 DEVICE_VARIANT := v2
365 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
366 TPLINK_HWID := 0x8420002
367 SUPPORTED_DEVICES += tl-wr842n-v2
368 endef
369 TARGET_DEVICES += tplink_tl-wr842n-v2
370
371 define Device/tplink_tl-wr842n-v3
372 $(Device/tplink-16mlzma)
373 ATH_SOC := qca9533
374 DEVICE_MODEL := TL-WR842N
375 DEVICE_VARIANT := v3
376 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
377 TPLINK_HWID := 0x8420003
378 SUPPORTED_DEVICES += tl-wr842n-v3
379 endef
380 TARGET_DEVICES += tplink_tl-wr842n-v3
381
382 define Device/tplink_tl-wr1043nd-v1
383 $(Device/tplink-8m)
384 ATH_SOC := ar9132
385 DEVICE_MODEL := TL-WR1043N/ND
386 DEVICE_VARIANT := v1
387 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
388 TPLINK_HWID := 0x10430001
389 SUPPORTED_DEVICES += tl-wr1043nd
390 endef
391 TARGET_DEVICES += tplink_tl-wr1043nd-v1
392
393 define Device/tplink_tl-wr1043nd-v2
394 $(Device/tplink-8mlzma)
395 ATH_SOC := qca9558
396 DEVICE_MODEL := TL-WR1043N/ND
397 DEVICE_VARIANT := v2
398 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
399 TPLINK_HWID := 0x10430002
400 SUPPORTED_DEVICES += tl-wr1043nd-v2
401 endef
402 TARGET_DEVICES += tplink_tl-wr1043nd-v2
403
404 define Device/tplink_tl-wr1043nd-v3
405 $(Device/tplink-8mlzma)
406 ATH_SOC := qca9558
407 DEVICE_MODEL := TL-WR1043N/ND
408 DEVICE_VARIANT := v3
409 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
410 TPLINK_HWID := 0x10430003
411 SUPPORTED_DEVICES += tl-wr1043nd-v3
412 endef
413 TARGET_DEVICES += tplink_tl-wr1043nd-v3
414
415 define Device/tplink_tl-wr1043nd-v4
416 $(Device/tplink-safeloader)
417 ATH_SOC := qca9563
418 IMAGE_SIZE := 15552k
419 DEVICE_MODEL := TL-WR1043N/ND
420 DEVICE_VARIANT := v4
421 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
422 TPLINK_HWID := 0x10430004
423 TPLINK_BOARD_ID := TLWR1043NDV4
424 SUPPORTED_DEVICES += tl-wr1043nd-v4
425 endef
426 TARGET_DEVICES += tplink_tl-wr1043nd-v4
427
428 define Device/tplink_tl-wr1043n-v5
429 $(Device/tplink-safeloader-uimage)
430 ATH_SOC := qca9563
431 IMAGE_SIZE := 15104k
432 DEVICE_MODEL := TL-WR1043N
433 DEVICE_VARIANT := v5
434 TPLINK_BOARD_ID := TLWR1043NV5
435 SUPPORTED_DEVICES += tl-wr1043n-v5
436 endef
437 TARGET_DEVICES += tplink_tl-wr1043n-v5
438
439 define Device/tplink_tl-wr2543-v1
440 $(Device/tplink-8mlzma)
441 ATH_SOC := ar7242
442 DEVICE_MODEL := TL-WR2543N/ND
443 DEVICE_VARIANT := v1
444 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
445 TPLINK_HWID := 0x25430001
446 IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 | \
447 append-metadata | check-size $$$$(IMAGE_SIZE)
448 IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99
449 SUPPORTED_DEVICES += tl-wr2543-v1
450 endef
451 TARGET_DEVICES += tplink_tl-wr2543-v1