ath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam...
[openwrt/staging/wigyori.git] / target / linux / ath79 / image / generic-ubnt.mk
1 include ./common-ubnt.mk
2
3 define Device/ubnt_aircube-ac
4 $(Device/ubnt-acb)
5 SOC := ar9342
6 DEVICE_MODEL := airCube AC
7 UBNT_CHIP := ar9342
8 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
9 endef
10 TARGET_DEVICES += ubnt_aircube-ac
11
12 define Device/ubnt_aircube-isp
13 $(Device/ubnt-acb)
14 SOC := qca9533
15 DEVICE_MODEL := airCube ISP
16 UBNT_CHIP := qca9533
17 SUPPORTED_DEVICES += ubnt,acb-isp
18 endef
19 TARGET_DEVICES += ubnt_aircube-isp
20
21 define Device/ubnt_bullet-ac
22 $(Device/ubnt-2wa)
23 DEVICE_MODEL := Bullet AC
24 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
25 endef
26 TARGET_DEVICES += ubnt_bullet-ac
27
28 define Device/ubnt_bullet-m-xw
29 $(Device/ubnt-xw)
30 DEVICE_MODEL := Bullet M
31 DEVICE_PACKAGES += rssileds
32 SUPPORTED_DEVICES += bullet-m-xw
33 endef
34 TARGET_DEVICES += ubnt_bullet-m-xw
35
36 define Device/ubnt_edgeswitch-5xp
37 $(Device/ubnt-sw)
38 DEVICE_MODEL := EdgeSwitch 5XP
39 endef
40 TARGET_DEVICES += ubnt_edgeswitch-5xp
41
42 define Device/ubnt_edgeswitch-8xp
43 $(Device/ubnt-sw)
44 DEVICE_MODEL := EdgeSwitch 8XP
45 DEVICE_PACKAGES += kmod-switch-bcm53xx-mdio
46 DEFAULT := n
47 endef
48 TARGET_DEVICES += ubnt_edgeswitch-8xp
49
50 define Device/ubnt_lap-120
51 $(Device/ubnt-wa)
52 DEVICE_MODEL := LiteAP ac (LAP-120)
53 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
54 endef
55 TARGET_DEVICES += ubnt_lap-120
56
57 define Device/ubnt_litebeam-ac-gen2
58 $(Device/ubnt-wa)
59 DEVICE_MODEL := LiteBeam AC
60 DEVICE_VARIANT := Gen2
61 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
62 endef
63 TARGET_DEVICES += ubnt_litebeam-ac-gen2
64
65 define Device/ubnt_litebeam-m5-xw
66 $(Device/ubnt-xw)
67 DEVICE_MODEL := LiteBeam M5
68 SUPPORTED_DEVICES += lbe-m5
69 DEVICE_PACKAGES := -kmod-usb2
70 endef
71 TARGET_DEVICES += ubnt_litebeam-m5-xw
72
73 define Device/ubnt_nanobeam-ac
74 $(Device/ubnt-wa)
75 DEVICE_MODEL := NanoBeam AC
76 DEVICE_VARIANT := Gen1
77 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
78 endef
79 TARGET_DEVICES += ubnt_nanobeam-ac
80
81 define Device/ubnt_nanobeam-ac-gen2
82 $(Device/ubnt-wa)
83 DEVICE_MODEL := NanoBeam AC
84 DEVICE_VARIANT := Gen2
85 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
86 endef
87 TARGET_DEVICES += ubnt_nanobeam-ac-gen2
88
89 define Device/ubnt_nanobeam-ac-xc
90 $(Device/ubnt-xc)
91 SOC := qca9558
92 DEVICE_MODEL := NanoBeam AC
93 DEVICE_VARIANT := Gen1 (XC)
94 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
95 endef
96 TARGET_DEVICES += ubnt_nanobeam-ac-xc
97
98 define Device/ubnt_nanostation-ac
99 $(Device/ubnt-wa)
100 DEVICE_MODEL := Nanostation AC
101 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
102 endef
103 TARGET_DEVICES += ubnt_nanostation-ac
104
105 define Device/ubnt_nanostation-ac-loco
106 $(Device/ubnt-wa)
107 DEVICE_MODEL := Nanostation AC loco
108 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
109 endef
110 TARGET_DEVICES += ubnt_nanostation-ac-loco
111
112 define Device/ubnt_nanostation-loco-m-xw
113 $(Device/ubnt-xw)
114 DEVICE_MODEL := Nanostation Loco M
115 DEVICE_PACKAGES += rssileds -kmod-usb2
116 DEVICE_ALT0_VENDOR := Ubiquiti
117 DEVICE_ALT0_MODEL := AirGrid M5 HP
118 DEVICE_ALT0_VARIANT := XW
119 DEVICE_ALT1_VENDOR := Ubiquiti
120 DEVICE_ALT1_MODEL := PowerBeam M5 300
121 DEVICE_ALT1_VARIANT := XW
122 DEVICE_ALT2_VENDOR := Ubiquiti
123 DEVICE_ALT2_MODEL := NanoBeam M5
124 DEVICE_ALT2_VARIANT := XW
125 SUPPORTED_DEVICES += loco-m-xw nanostation-m-xw ubnt,nanobeam-m5-xw
126 endef
127 TARGET_DEVICES += ubnt_nanostation-loco-m-xw
128
129 define Device/ubnt_nanostation-m-xw
130 $(Device/ubnt-xw)
131 DEVICE_MODEL := Nanostation M
132 DEVICE_PACKAGES += rssileds
133 SUPPORTED_DEVICES += nanostation-m-xw
134 endef
135 TARGET_DEVICES += ubnt_nanostation-m-xw
136
137 define Device/ubnt_powerbeam-5ac-500
138 $(Device/ubnt-xc)
139 SOC := qca9558
140 DEVICE_MODEL := PowerBeam 5AC
141 DEVICE_VARIANT := 500
142 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
143 endef
144 TARGET_DEVICES += ubnt_powerbeam-5ac-500
145
146 define Device/ubnt_powerbeam-5ac-gen2
147 $(Device/ubnt-wa)
148 DEVICE_MODEL := PowerBeam 5AC
149 DEVICE_VARIANT := Gen2
150 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
151 endef
152 TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
153
154 define Device/ubnt_powerbeam-m2-xw
155 $(Device/ubnt-xw)
156 DEVICE_MODEL := PowerBeam M2
157 DEVICE_PACKAGES += rssileds
158 SUPPORTED_DEVICES += loco-m-xw
159 endef
160 TARGET_DEVICES += ubnt_powerbeam-m2-xw
161
162 define Device/ubnt_powerbeam-m5-xw
163 $(Device/ubnt-xw)
164 DEVICE_MODEL := PowerBeam M5
165 DEVICE_PACKAGES += rssileds
166 SUPPORTED_DEVICES += loco-m-xw
167 endef
168 TARGET_DEVICES += ubnt_powerbeam-m5-xw
169
170 define Device/ubnt_powerbridge-m
171 $(Device/ubnt-xm)
172 SOC := ar7241
173 DEVICE_MODEL := PowerBridge M
174 DEVICE_PACKAGES += rssileds
175 SUPPORTED_DEVICES += bullet-m
176 endef
177 TARGET_DEVICES += ubnt_powerbridge-m
178
179 define Device/ubnt_rocket-5ac-lite
180 $(Device/ubnt-xc)
181 SOC := qca9558
182 DEVICE_MODEL := Rocket 5AC
183 DEVICE_VARIANT := Lite
184 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
185 endef
186 TARGET_DEVICES += ubnt_rocket-5ac-lite
187
188 define Device/ubnt_rocket-m
189 $(Device/ubnt-xm)
190 SOC := ar7241
191 DEVICE_MODEL := Rocket M
192 DEVICE_PACKAGES += rssileds
193 SUPPORTED_DEVICES += rocket-m
194 endef
195 TARGET_DEVICES += ubnt_rocket-m
196
197 define Device/ubnt_routerstation_common
198 DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-mbedtls -uboot-envtools kmod-usb-ohci \
199 kmod-usb2 fconfig
200 DEVICE_VENDOR := Ubiquiti
201 SOC := ar7161
202 LOADER_TYPE := bin
203 LOADER_FLASH_OFFS := 0x50000
204 COMPILE := loader-$(1).bin
205 COMPILE/loader-$(1).bin := loader-okli-compile | lzma | pad-to 128k
206 IMAGE_SIZE := 16000k
207 IMAGES += factory.bin
208 IMAGE/factory.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
209 append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | \
210 mkubntimage $$$$(KDIR)/loader-$(1).bin | check-size
211 IMAGE/sysupgrade.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
212 append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | check-size | \
213 sysupgrade-tar kernel=$$$$(KDIR)/loader-$(1).bin rootfs=$$$$@ | append-metadata
214 KERNEL := kernel-bin | append-dtb | lzma
215 KERNEL_INITRAMFS := kernel-bin | append-dtb
216 DEVICE_COMPAT_VERSION := 2.0
217 DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (19.07 and 21.02) \
218 due to kernel drivers restrictions. Upgrade via sysupgrade mechanism is one way operation. \
219 Downgrading OpenWrt version will involve usage of TFTP recovery or bootloader command line interface.
220 endef
221
222 define Device/ubnt_routerstation
223 $(Device/ubnt_routerstation_common)
224 DEVICE_MODEL := RouterStation
225 UBNT_BOARD := RS
226 UBNT_TYPE := RSx
227 UBNT_CHIP := ar7100
228 DEVICE_PACKAGES += -swconfig
229 endef
230 TARGET_DEVICES += ubnt_routerstation
231
232 define Device/ubnt_routerstation-pro
233 $(Device/ubnt_routerstation_common)
234 DEVICE_MODEL := RouterStation Pro
235 UBNT_BOARD := RSPRO
236 UBNT_TYPE := RSPRO
237 UBNT_CHIP := ar7100pro
238 endef
239 TARGET_DEVICES += ubnt_routerstation-pro
240
241 define Device/ubnt_uk-ultra
242 $(Device/ubnt_unifiac)
243 DEVICE_MODEL := UniFi Swiss Army Knife Ultra
244 DEVICE_PACKAGES += rssileds -swconfig
245 endef
246 TARGET_DEVICES += ubnt_uk-ultra
247
248 define Device/ubnt_unifi-ap
249 $(Device/ubnt-bz)
250 DEVICE_MODEL := UniFi AP
251 SUPPORTED_DEVICES += unifi ubnt,unifi
252 endef
253 TARGET_DEVICES += ubnt_unifi-ap
254
255 define Device/ubnt_unifi-ap-lr
256 $(Device/ubnt-bz)
257 DEVICE_MODEL := UniFi AP
258 DEVICE_VARIANT := LR
259 SUPPORTED_DEVICES += unifi ubnt,unifi ubnt,unifi-ap
260 endef
261 TARGET_DEVICES += ubnt_unifi-ap-lr
262
263 define Device/ubnt_unifiac-lite
264 $(Device/ubnt_unifiac)
265 DEVICE_MODEL := UniFi AC Lite
266 DEVICE_PACKAGES += -swconfig
267 SUPPORTED_DEVICES += unifiac-lite
268 endef
269 TARGET_DEVICES += ubnt_unifiac-lite
270
271 define Device/ubnt_unifiac-lr
272 $(Device/ubnt_unifiac)
273 DEVICE_MODEL := UniFi AC LR
274 DEVICE_PACKAGES += -swconfig
275 SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
276 endef
277 TARGET_DEVICES += ubnt_unifiac-lr
278
279 define Device/ubnt_unifiac-mesh
280 $(Device/ubnt_unifiac)
281 DEVICE_MODEL := UniFi AC Mesh
282 DEVICE_PACKAGES += -swconfig
283 SUPPORTED_DEVICES += unifiac-lite
284 endef
285 TARGET_DEVICES += ubnt_unifiac-mesh
286
287 define Device/ubnt_unifiac-mesh-pro
288 $(Device/ubnt_unifiac)
289 DEVICE_MODEL := UniFi AC Mesh Pro
290 SUPPORTED_DEVICES += unifiac-pro
291 endef
292 TARGET_DEVICES += ubnt_unifiac-mesh-pro
293
294 define Device/ubnt_unifiac-pro
295 $(Device/ubnt_unifiac)
296 DEVICE_MODEL := UniFi AC Pro
297 DEVICE_PACKAGES += kmod-usb2
298 SUPPORTED_DEVICES += unifiac-pro
299 endef
300 TARGET_DEVICES += ubnt_unifiac-pro
301
302 define Device/ubnt_unifi-ap-outdoor-plus
303 $(Device/ubnt-bz)
304 $(Device/ubnt-unifi-jffs2)
305 DEVICE_MODEL := UniFi AP Outdoor+
306 SUPPORTED_DEVICES += unifi-outdoor-plus
307 endef
308 TARGET_DEVICES += ubnt_unifi-ap-outdoor-plus
309
310 define Device/ubnt_unifi-ap-pro
311 $(Device/ubnt-unifi-jffs2)
312 SOC := ar9344
313 DEVICE_MODEL := UniFi AP Pro
314 UBNT_CHIP := ar934x
315 SUPPORTED_DEVICES += uap-pro
316 endef
317 TARGET_DEVICES += ubnt_unifi-ap-pro