ar71xx: wpj588: add missing usb support
[openwrt.git] / target / linux / ar71xx / patches-3.18 / 608-MIPS-ath79-ubnt-xm-add-more-boards.patch
1 --- a/arch/mips/ath79/mach-ubnt-xm.c
2 +++ b/arch/mips/ath79/mach-ubnt-xm.c
3 @@ -12,16 +12,24 @@
4  
5  #include <linux/init.h>
6  #include <linux/pci.h>
7 +#include <linux/platform_device.h>
8  #include <linux/ath9k_platform.h>
9 +#include <linux/etherdevice.h>
10 +#include <linux/ar8216_platform.h>
11  
12 +#include <asm/mach-ath79/ath79.h>
13  #include <asm/mach-ath79/irq.h>
14 +#include <asm/mach-ath79/ar71xx_regs.h>
15  
16 +#include "common.h"
17  #include "dev-ap9x-pci.h"
18 +#include "dev-eth.h"
19  #include "dev-gpio-buttons.h"
20  #include "dev-leds-gpio.h"
21  #include "dev-m25p80.h"
22 +#include "dev-usb.h"
23 +#include "dev-wmac.h"
24  #include "machtypes.h"
25 -#include "pci.h"
26  
27  #define UBNT_XM_GPIO_LED_L1            0
28  #define UBNT_XM_GPIO_LED_L2            1
29 @@ -37,19 +45,19 @@
30  
31  static struct gpio_led ubnt_xm_leds_gpio[] __initdata = {
32         {
33 -               .name           = "ubnt-xm:red:link1",
34 +               .name           = "ubnt:red:link1",
35                 .gpio           = UBNT_XM_GPIO_LED_L1,
36                 .active_low     = 0,
37         }, {
38 -               .name           = "ubnt-xm:orange:link2",
39 +               .name           = "ubnt:orange:link2",
40                 .gpio           = UBNT_XM_GPIO_LED_L2,
41                 .active_low     = 0,
42         }, {
43 -               .name           = "ubnt-xm:green:link3",
44 +               .name           = "ubnt:green:link3",
45                 .gpio           = UBNT_XM_GPIO_LED_L3,
46                 .active_low     = 0,
47         }, {
48 -               .name           = "ubnt-xm:green:link4",
49 +               .name           = "ubnt:green:link4",
50                 .gpio           = UBNT_XM_GPIO_LED_L4,
51                 .active_low     = 0,
52         },
53 @@ -66,9 +74,13 @@ static struct gpio_keys_button ubnt_xm_g
54         }
55  };
56  
57 +#define UBNT_M_WAN_PHYMASK     BIT(4)
58 +
59  static void __init ubnt_xm_init(void)
60  {
61         u8 *eeprom = (u8 *) KSEG1ADDR(UBNT_XM_EEPROM_ADDR);
62 +       u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
63 +       u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
64  
65         ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xm_leds_gpio),
66                                  ubnt_xm_leds_gpio);
67 @@ -79,9 +91,428 @@ static void __init ubnt_xm_init(void)
68  
69         ath79_register_m25p80(NULL);
70         ap91_pci_init(eeprom, NULL);
71 +
72 +       ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK);
73 +       ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
74 +       ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0);
75 +       ath79_register_eth(0);
76  }
77  
78  MIPS_MACHINE(ATH79_MACH_UBNT_XM,
79              "UBNT-XM",
80              "Ubiquiti Networks XM (rev 1.0) board",
81              ubnt_xm_init);
82 +
83 +MIPS_MACHINE(ATH79_MACH_UBNT_BULLET_M, "UBNT-BM", "Ubiquiti Bullet M",
84 +            ubnt_xm_init);
85 +
86 +static void __init ubnt_rocket_m_setup(void)
87 +{
88 +       ubnt_xm_init();
89 +       ath79_register_usb();
90 +}
91 +
92 +MIPS_MACHINE(ATH79_MACH_UBNT_ROCKET_M, "UBNT-RM", "Ubiquiti Rocket M",
93 +            ubnt_rocket_m_setup);
94 +
95 +static void __init ubnt_nano_m_setup(void)
96 +{
97 +       ubnt_xm_init();
98 +       ath79_register_eth(1);
99 +}
100 +
101 +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M, "UBNT-NM", "Ubiquiti Nanostation M",
102 +            ubnt_nano_m_setup);
103 +
104 +static struct gpio_led ubnt_airrouter_leds_gpio[] __initdata = {
105 +       {
106 +               .name           = "ubnt:green:globe",
107 +               .gpio           = 0,
108 +               .active_low     = 1,
109 +       }, {
110 +               .name           = "ubnt:green:power",
111 +               .gpio           = 11,
112 +               .active_low     = 1,
113 +               .default_state  = LEDS_GPIO_DEFSTATE_ON,
114 +       }
115 +};
116 +
117 +static void __init ubnt_airrouter_setup(void)
118 +{
119 +       u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
120 +       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
121 +
122 +       ath79_register_m25p80(NULL);
123 +       ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK);
124 +
125 +       ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
126 +       ath79_init_local_mac(ath79_eth1_data.mac_addr, mac1);
127 +
128 +       ath79_register_eth(1);
129 +       ath79_register_eth(0);
130 +       ath79_register_usb();
131 +
132 +       ap91_pci_init(ee, NULL);
133 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airrouter_leds_gpio),
134 +                                ubnt_airrouter_leds_gpio);
135 +
136 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
137 +                                        ARRAY_SIZE(ubnt_xm_gpio_keys),
138 +                                        ubnt_xm_gpio_keys);
139 +}
140 +
141 +MIPS_MACHINE(ATH79_MACH_UBNT_AIRROUTER, "UBNT-AR", "Ubiquiti AirRouter",
142 +            ubnt_airrouter_setup);
143 +
144 +static struct gpio_led ubnt_unifi_leds_gpio[] __initdata = {
145 +       {
146 +               .name           = "ubnt:orange:dome",
147 +               .gpio           = 1,
148 +               .active_low     = 0,
149 +       }, {
150 +               .name           = "ubnt:green:dome",
151 +               .gpio           = 0,
152 +               .active_low     = 0,
153 +       }
154 +};
155 +
156 +static struct gpio_led ubnt_unifi_outdoor_leds_gpio[] __initdata = {
157 +       {
158 +               .name           = "ubnt:orange:front",
159 +               .gpio           = 1,
160 +               .active_low     = 0,
161 +       }, {
162 +               .name           = "ubnt:green:front",
163 +               .gpio           = 0,
164 +               .active_low     = 0,
165 +       }
166 +};
167 +
168 +static struct gpio_led ubnt_unifi_outdoor_plus_leds_gpio[] __initdata = {
169 +       {
170 +               .name           = "ubnt:white:front",
171 +               .gpio           = 1,
172 +               .active_low     = 0,
173 +       }, {
174 +               .name           = "ubnt:blue:front",
175 +               .gpio           = 0,
176 +               .active_low     = 0,
177 +       }
178 +};
179 +
180 +
181 +static void __init ubnt_unifi_setup(void)
182 +{
183 +       u8 *mac = (u8 *) KSEG1ADDR(0x1fff0000);
184 +       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
185 +
186 +       ath79_register_m25p80(NULL);
187 +
188 +       ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK);
189 +
190 +       ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
191 +       ath79_register_eth(0);
192 +
193 +       ap91_pci_init(ee, NULL);
194 +
195 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_leds_gpio),
196 +                                ubnt_unifi_leds_gpio);
197 +
198 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
199 +                                        ARRAY_SIZE(ubnt_xm_gpio_keys),
200 +                                        ubnt_xm_gpio_keys);
201 +}
202 +
203 +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI, "UBNT-UF", "Ubiquiti UniFi",
204 +            ubnt_unifi_setup);
205 +
206 +
207 +#define UBNT_UNIFIOD_PRI_PHYMASK       BIT(4)
208 +#define UBNT_UNIFIOD_2ND_PHYMASK       (BIT(0) | BIT(1) | BIT(2) | BIT(3))
209 +
210 +static void __init ubnt_unifi_outdoor_setup(void)
211 +{
212 +       u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
213 +       u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
214 +       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
215 +
216 +       ath79_register_m25p80(NULL);
217 +
218 +       ath79_register_mdio(0, ~(UBNT_UNIFIOD_PRI_PHYMASK |
219 +                                UBNT_UNIFIOD_2ND_PHYMASK));
220 +
221 +       ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
222 +       ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0);
223 +       ath79_register_eth(0);
224 +       ath79_register_eth(1);
225 +
226 +       ap91_pci_init(ee, NULL);
227 +
228 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_outdoor_leds_gpio),
229 +                                ubnt_unifi_outdoor_leds_gpio);
230 +
231 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
232 +                                        ARRAY_SIZE(ubnt_xm_gpio_keys),
233 +                                        ubnt_xm_gpio_keys);
234 +}
235 +
236 +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDOOR, "UBNT-U20",
237 +            "Ubiquiti UniFiAP Outdoor",
238 +            ubnt_unifi_outdoor_setup);
239 +
240 +
241 +static void __init ubnt_unifi_outdoor_plus_setup(void)
242 +{
243 +       u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
244 +       u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
245 +       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
246 +
247 +       ath79_register_m25p80(NULL);
248 +
249 +       ath79_register_mdio(0, ~(UBNT_UNIFIOD_PRI_PHYMASK |
250 +                                UBNT_UNIFIOD_2ND_PHYMASK));
251 +
252 +       ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
253 +       ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0);
254 +       ath79_register_eth(0);
255 +       ath79_register_eth(1);
256 +
257 +       ap91_pci_init(ee, NULL);
258 +
259 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_outdoor_plus_leds_gpio),
260 +                                ubnt_unifi_outdoor_plus_leds_gpio);
261 +
262 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
263 +                                        ARRAY_SIZE(ubnt_xm_gpio_keys),
264 +                                        ubnt_xm_gpio_keys);
265 +}
266 +
267 +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, "UBNT-UOP",
268 +            "Ubiquiti UniFiAP Outdoor+",
269 +            ubnt_unifi_outdoor_plus_setup);
270 +
271 +
272 +static struct gpio_led ubnt_uap_pro_gpio_leds[] __initdata = {
273 +       {
274 +               .name           = "ubnt:white:dome",
275 +               .gpio           = 12,
276 +       }, {
277 +               .name           = "ubnt:blue:dome",
278 +               .gpio           = 13,
279 +       }
280 +};
281 +
282 +static struct gpio_keys_button uap_pro_gpio_keys[] __initdata = {
283 +       {
284 +               .desc                   = "reset",
285 +               .type                   = EV_KEY,
286 +               .code                   = KEY_RESTART,
287 +               .debounce_interval      = UBNT_XM_KEYS_DEBOUNCE_INTERVAL,
288 +               .gpio                   = 17,
289 +               .active_low             = 1,
290 +       }
291 +};
292 +
293 +static struct ar8327_pad_cfg uap_pro_ar8327_pad0_cfg = {
294 +       .mode = AR8327_PAD_MAC_RGMII,
295 +       .txclk_delay_en = true,
296 +       .rxclk_delay_en = true,
297 +       .txclk_delay_sel = AR8327_CLK_DELAY_SEL1,
298 +       .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
299 +};
300 +
301 +static struct ar8327_platform_data uap_pro_ar8327_data = {
302 +       .pad0_cfg = &uap_pro_ar8327_pad0_cfg,
303 +       .port0_cfg = {
304 +               .force_link = 1,
305 +               .speed = AR8327_PORT_SPEED_1000,
306 +               .duplex = 1,
307 +               .txpause = 1,
308 +               .rxpause = 1,
309 +       },
310 +};
311 +
312 +static struct mdio_board_info uap_pro_mdio0_info[] = {
313 +       {
314 +               .bus_id = "ag71xx-mdio.0",
315 +               .phy_addr = 0,
316 +               .platform_data = &uap_pro_ar8327_data,
317 +       },
318 +};
319 +
320 +#define UAP_PRO_MAC0_OFFSET            0x0000
321 +#define UAP_PRO_MAC1_OFFSET            0x0006
322 +#define UAP_PRO_WMAC_CALDATA_OFFSET    0x1000
323 +#define UAP_PRO_PCI_CALDATA_OFFSET     0x5000
324 +
325 +static void __init ubnt_uap_pro_setup(void)
326 +{
327 +       u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
328 +
329 +       ath79_register_m25p80(NULL);
330 +
331 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_uap_pro_gpio_leds),
332 +                                ubnt_uap_pro_gpio_leds);
333 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
334 +                                        ARRAY_SIZE(uap_pro_gpio_keys),
335 +                                        uap_pro_gpio_keys);
336 +
337 +       ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
338 +       ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
339 +
340 +       ath79_register_mdio(0, 0x0);
341 +       mdiobus_register_board_info(uap_pro_mdio0_info,
342 +                                   ARRAY_SIZE(uap_pro_mdio0_info));
343 +
344 +       ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
345 +       ath79_init_mac(ath79_eth0_data.mac_addr,
346 +                      eeprom + UAP_PRO_MAC0_OFFSET, 0);
347 +
348 +       /* GMAC0 is connected to an AR8327 switch */
349 +       ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
350 +       ath79_eth0_data.phy_mask = BIT(0);
351 +       ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
352 +       ath79_eth0_pll_data.pll_1000 = 0x06000000;
353 +       ath79_register_eth(0);
354 +}
355 +
356 +MIPS_MACHINE(ATH79_MACH_UBNT_UAP_PRO, "UAP-PRO", "Ubiquiti UniFi AP Pro",
357 +            ubnt_uap_pro_setup);
358 +
359 +#define UBNT_XW_GPIO_LED_L1            11
360 +#define UBNT_XW_GPIO_LED_L2            16
361 +#define UBNT_XW_GPIO_LED_L3            13
362 +#define UBNT_XW_GPIO_LED_L4            14
363 +
364 +static struct gpio_led ubnt_xw_leds_gpio[] __initdata = {
365 +       {
366 +               .name           = "ubnt:red:link1",
367 +               .gpio           = UBNT_XW_GPIO_LED_L1,
368 +               .active_low     = 1,
369 +       }, {
370 +               .name           = "ubnt:orange:link2",
371 +               .gpio           = UBNT_XW_GPIO_LED_L2,
372 +               .active_low     = 1,
373 +       }, {
374 +               .name           = "ubnt:green:link3",
375 +               .gpio           = UBNT_XW_GPIO_LED_L3,
376 +               .active_low     = 1,
377 +       }, {
378 +               .name           = "ubnt:green:link4",
379 +               .gpio           = UBNT_XW_GPIO_LED_L4,
380 +               .active_low     = 1,
381 +       },
382 +};
383 +
384 +static void __init ubnt_xw_init(void)
385 +{
386 +       u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
387 +
388 +       ath79_register_m25p80(NULL);
389 +
390 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xw_leds_gpio),
391 +                                ubnt_xw_leds_gpio);
392 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
393 +                                        ARRAY_SIZE(ubnt_xm_gpio_keys),
394 +                                        ubnt_xm_gpio_keys);
395 +
396 +       ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
397 +       ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
398 +
399 +
400 +       ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0_SLAVE);
401 +       ath79_init_mac(ath79_eth0_data.mac_addr,
402 +                      eeprom + UAP_PRO_MAC0_OFFSET, 0);
403 +
404 +       ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
405 +       ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
406 +}
407 +
408 +static void __init ubnt_nano_m_xw_setup(void)
409 +{
410 +       ubnt_xw_init();
411 +
412 +       /* GMAC0 is connected to an AR8326 switch */
413 +       ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5)));
414 +       ath79_eth0_data.phy_mask = (BIT(0) | BIT(1) | BIT(5));
415 +       ath79_eth0_data.speed = SPEED_100;
416 +       ath79_eth0_data.duplex = DUPLEX_FULL;
417 +       ath79_register_eth(0);
418 +}
419 +
420 +static void __init ubnt_loco_m_xw_setup(void)
421 +{
422 +       ubnt_xw_init();
423 +
424 +       ath79_register_mdio(0, ~BIT(1));
425 +       ath79_eth0_data.phy_mask = BIT(1);
426 +       ath79_register_eth(0);
427 +}
428 +
429 +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW",
430 +            ubnt_nano_m_xw_setup);
431 +
432 +MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
433 +            ubnt_loco_m_xw_setup);
434 +
435 +static struct gpio_led ubnt_airgateway_gpio_leds[] __initdata = {
436 +       {
437 +               .name      = "ubnt:blue:wlan",
438 +               .gpio      = 0,
439 +       }, {
440 +               .name      = "ubnt:white:status",
441 +               .gpio      = 1,
442 +       },
443 +};
444 +
445 +static struct gpio_keys_button airgateway_gpio_keys[] __initdata = {
446 +       {
447 +               .desc           = "reset",
448 +               .type           = EV_KEY,
449 +               .code           = KEY_RESTART,
450 +               .debounce_interval      = UBNT_XM_KEYS_DEBOUNCE_INTERVAL,
451 +               .gpio           = 12,
452 +               .active_low     = 1,
453 +       }
454 +};
455 +
456 +static void __init ubnt_airgateway_setup(void)
457 +{
458 +       u32 t;
459 +       u8 *mac0 = (u8 *) KSEG1ADDR(0x1fff0000);
460 +       u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
461 +       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
462 +
463 +
464 +       ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
465 +                                    AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
466 +                                    AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
467 +                                    AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
468 +                                    AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
469 +
470 +       t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
471 +       t |= AR933X_BOOTSTRAP_MDIO_GPIO_EN;
472 +       ath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP, t);
473 +
474 +       ath79_register_m25p80(NULL);
475 +       ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airgateway_gpio_leds),
476 +                                ubnt_airgateway_gpio_leds);
477 +
478 +       ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
479 +                                       ARRAY_SIZE(airgateway_gpio_keys),
480 +                                       airgateway_gpio_keys);
481 +
482 +       ath79_init_mac(ath79_eth1_data.mac_addr, mac0, 0);
483 +       ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
484 +
485 +       ath79_register_mdio(0, 0x0);
486 +
487 +       ath79_register_eth(1);
488 +       ath79_register_eth(0);
489 +
490 +       ath79_register_wmac(ee, NULL);
491 +}
492 +
493 +MIPS_MACHINE(ATH79_MACH_UBNT_AIRGW, "UBNT-AGW", "Ubiquiti AirGateway",
494 +            ubnt_airgateway_setup);
495 +
496 --- a/arch/mips/ath79/Kconfig
497 +++ b/arch/mips/ath79/Kconfig
498 @@ -68,12 +68,16 @@ config ATH79_MACH_PB44
499           Atheros PB44 reference board.
500  
501  config ATH79_MACH_UBNT_XM
502 -       bool "Ubiquiti Networks XM (rev 1.0) board"
503 +       bool "Ubiquiti Networks XM/UniFi boards"
504         select SOC_AR724X
505 +       select SOC_AR934X
506         select ATH79_DEV_AP9X_PCI if PCI
507 +       select ATH79_DEV_ETH
508         select ATH79_DEV_GPIO_BUTTONS
509         select ATH79_DEV_LEDS_GPIO
510         select ATH79_DEV_M25P80
511 +       select ATH79_DEV_USB
512 +       select ATH79_DEV_WMAC
513         help
514           Say 'Y' here if you want your kernel to support the
515           Ubiquiti Networks XM (rev 1.0) board.
516 --- a/arch/mips/ath79/machtypes.h
517 +++ b/arch/mips/ath79/machtypes.h
518 @@ -22,6 +22,13 @@ enum ath79_mach_type {
519         ATH79_MACH_AP81,                /* Atheros AP81 reference board */
520         ATH79_MACH_DB120,               /* Atheros DB120 reference board */
521         ATH79_MACH_PB44,                /* Atheros PB44 reference board */
522 +       ATH79_MACH_UBNT_AIRROUTER,      /* Ubiquiti AirRouter */
523 +       ATH79_MACH_UBNT_BULLET_M,       /* Ubiquiti Bullet M */
524 +       ATH79_MACH_UBNT_NANO_M,         /* Ubiquiti NanoStation M */
525 +       ATH79_MACH_UBNT_ROCKET_M,       /* Ubiquiti Rocket M */
526 +       ATH79_MACH_UBNT_UAP_PRO,        /* Ubiquiti UniFi AP Pro */
527 +       ATH79_MACH_UBNT_UNIFI,          /* Ubiquiti Unifi */
528 +       ATH79_MACH_UBNT_UNIFI_OUTDOOR,  /* Ubiquiti UnifiAP Outdoor */
529         ATH79_MACH_UBNT_XM,             /* Ubiquiti Networks XM board rev 1.0 */
530  };
531