0042-ar71xx-Support-for-Ubiquiti-UniFi-AP-AC-LITE.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Fri, 13 May 2016 20:47:26 +0200
  3. Subject: ar71xx: Support for Ubiquiti UniFi AP AC LITE
  4. Add support for the Ubiquiti UniFi AP AC LITE
  5. Signed-off-by: P.Wassi <p.wassi at gmx.at>
  6. Backport of OpenWrt r48711
  7. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  8. index 5a184cd..8c6ac9a 100644
  9. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  10. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  11. @@ -296,7 +296,8 @@ get_status_led() {
  12. unifi)
  13. status_led="ubnt:green:dome"
  14. ;;
  15. - uap-pro)
  16. + uap-pro | \
  17. + unifiac)
  18. status_led="ubnt:white:dome"
  19. ;;
  20. unifi-outdoor-plus)
  21. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  22. index b2e15bb..e4a1473 100755
  23. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  24. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  25. @@ -366,6 +366,7 @@ tl-wa901nd-v3 |\
  26. tl-wa901nd-v4 |\
  27. tl-wr703n |\
  28. tube2h |\
  29. +unifiac |\
  30. wndap360 |\
  31. mynet-rext |\
  32. wp543)
  33. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  34. index ddd6611..8670583 100755
  35. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  36. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  37. @@ -881,6 +881,9 @@ ar71xx_board_detect() {
  38. *UniFi)
  39. name="unifi"
  40. ;;
  41. + *"UniFi-AC")
  42. + name="unifiac"
  43. + ;;
  44. *"UniFi AP Pro")
  45. name="uap-pro"
  46. ;;
  47. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  48. index c5c1871..4c43166 100755
  49. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  50. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  51. @@ -251,6 +251,7 @@ platform_check_image() {
  52. wlae-ag300n | \
  53. nbg460n_550n_550nh | \
  54. unifi | \
  55. + unifiac | \
  56. unifi-outdoor | \
  57. carambola2 | \
  58. weio )
  59. diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
  60. index e2ff826..9a81911 100644
  61. --- a/target/linux/ar71xx/config-3.18
  62. +++ b/target/linux/ar71xx/config-3.18
  63. @@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
  64. CONFIG_ATH79_MACH_TL_WR941ND_V6=y
  65. CONFIG_ATH79_MACH_TUBE2H=y
  66. CONFIG_ATH79_MACH_UBNT=y
  67. +CONFIG_ATH79_MACH_UBNT_UNIFIAC=y
  68. CONFIG_ATH79_MACH_UBNT_XM=y
  69. CONFIG_ATH79_MACH_WEIO=y
  70. CONFIG_ATH79_MACH_WHR_HP_G300N=y
  71. @@ -320,7 +321,7 @@ CONFIG_SOC_AR933X=y
  72. CONFIG_SOC_AR934X=y
  73. CONFIG_SOC_QCA953X=y
  74. CONFIG_SOC_QCA955X=y
  75. -# CONFIG_SOC_QCA956X is not set
  76. +CONFIG_SOC_QCA956X=y
  77. CONFIG_SPI=y
  78. CONFIG_SPI_AP83=y
  79. CONFIG_SPI_ATH79=y
  80. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c
  81. new file mode 100644
  82. index 0000000..3617ca7
  83. --- /dev/null
  84. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c
  85. @@ -0,0 +1,109 @@
  86. +/*
  87. + * Ubiquiti UniFi AC (LITE) board support
  88. + *
  89. + * Copyright (C) 2015-2016 P. Wassi <p.wassi at gmx.at>
  90. + *
  91. + * Derived from: mach-ubnt-xm.c
  92. + *
  93. + * This program is free software; you can redistribute it and/or modify it
  94. + * under the terms of the GNU General Public License version 2 as published
  95. + * by the Free Software Foundation.
  96. + */
  97. +
  98. +#include <linux/init.h>
  99. +#include <linux/pci.h>
  100. +#include <linux/platform_device.h>
  101. +#include <linux/ath9k_platform.h>
  102. +#include <linux/etherdevice.h>
  103. +
  104. +#include <asm/mach-ath79/ath79.h>
  105. +#include <asm/mach-ath79/irq.h>
  106. +#include <asm/mach-ath79/ar71xx_regs.h>
  107. +
  108. +#include <linux/platform_data/phy-at803x.h>
  109. +
  110. +#include "common.h"
  111. +#include "dev-ap9x-pci.h"
  112. +#include "dev-eth.h"
  113. +#include "dev-gpio-buttons.h"
  114. +#include "dev-leds-gpio.h"
  115. +#include "dev-m25p80.h"
  116. +#include "dev-wmac.h"
  117. +#include "machtypes.h"
  118. +
  119. +
  120. +#define UNIFIAC_KEYS_POLL_INTERVAL 20
  121. +#define UNIFIAC_KEYS_DEBOUNCE_INTERVAL (3 * UNIFIAC_KEYS_POLL_INTERVAL)
  122. +
  123. +#define UNIFIAC_GPIO_LED_WHITE 7
  124. +#define UNIFIAC_GPIO_LED_BLUE 8
  125. +
  126. +#define UNIFIAC_GPIO_BTN_RESET 2
  127. +
  128. +#define UNIFIAC_MAC0_OFFSET 0x0000
  129. +#define UNIFIAC_WMAC_CALDATA_OFFSET 0x1000
  130. +#define UNIFIAC_PCI_CALDATA_OFFSET 0x5000
  131. +
  132. +
  133. +static struct flash_platform_data ubnt_unifiac_flash_data = {
  134. + /* mx25l12805d and mx25l12835f have the same JEDEC ID */
  135. + .type = "mx25l12805d",
  136. +};
  137. +
  138. +static struct gpio_led ubnt_unifiac_leds_gpio[] __initdata = {
  139. + {
  140. + .name = "ubnt:white:dome",
  141. + .gpio = UNIFIAC_GPIO_LED_WHITE,
  142. + .active_low = 0,
  143. + }, {
  144. + .name = "ubnt:blue:dome",
  145. + .gpio = UNIFIAC_GPIO_LED_BLUE,
  146. + .active_low = 0,
  147. + }
  148. +};
  149. +
  150. +static struct gpio_keys_button ubnt_unifiac_gpio_keys[] __initdata = {
  151. + {
  152. + .desc = "reset",
  153. + .type = EV_KEY,
  154. + .code = KEY_RESTART,
  155. + .debounce_interval = UNIFIAC_KEYS_DEBOUNCE_INTERVAL,
  156. + .gpio = UNIFIAC_GPIO_BTN_RESET,
  157. + .active_low = 1,
  158. + }
  159. +};
  160. +
  161. +static void __init ubnt_unifiac_setup(void)
  162. +{
  163. + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
  164. +
  165. + ath79_register_m25p80(&ubnt_unifiac_flash_data);
  166. +
  167. +
  168. + ath79_init_mac(ath79_eth0_data.mac_addr,
  169. + eeprom + UNIFIAC_MAC0_OFFSET, 0);
  170. +
  171. + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
  172. + ath79_eth0_data.phy_mask = BIT(4);
  173. + ath79_eth0_pll_data.pll_10 = 0x00001313;
  174. +
  175. + ath79_register_mdio(0, ~BIT(4));
  176. + ath79_register_eth(0);
  177. +
  178. +
  179. + ath79_register_wmac(eeprom + UNIFIAC_WMAC_CALDATA_OFFSET, NULL);
  180. +
  181. +
  182. + ap91_pci_init(eeprom + UNIFIAC_PCI_CALDATA_OFFSET, NULL);
  183. +
  184. +
  185. + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifiac_leds_gpio),
  186. + ubnt_unifiac_leds_gpio);
  187. +
  188. + ath79_register_gpio_keys_polled(-1, UNIFIAC_KEYS_POLL_INTERVAL,
  189. + ARRAY_SIZE(ubnt_unifiac_gpio_keys),
  190. + ubnt_unifiac_gpio_keys);
  191. +}
  192. +
  193. +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFIAC, "UBNT-UF-AC", "Ubiquiti UniFi-AC",
  194. + ubnt_unifiac_setup);
  195. diff --git a/target/linux/ar71xx/generic/profiles/ubnt.mk b/target/linux/ar71xx/generic/profiles/ubnt.mk
  196. index d8e24d0..94eff18 100644
  197. --- a/target/linux/ar71xx/generic/profiles/ubnt.mk
  198. +++ b/target/linux/ar71xx/generic/profiles/ubnt.mk
  199. @@ -38,6 +38,17 @@ endef
  200. $(eval $(call Profile,UBNTUNIFI))
  201. +define Profile/UBNTUNIFIAC
  202. + NAME:=Ubiquiti UniFi AP AC
  203. + PACKAGES:=kmod-ath10k ath10k-firmware-qca988x
  204. +endef
  205. +
  206. +define Profile/UBNTUNIFIAC/Description
  207. + Package set optimized for the Ubiquiti UniFi AP AC.
  208. +endef
  209. +
  210. +$(eval $(call Profile,UBNTUNIFIAC))
  211. +
  212. define Profile/UBNTUNIFIOUTDOOR
  213. NAME:=Ubiquiti UniFiAP Outdoor
  214. PACKAGES:=
  215. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  216. index d42ceef..dd59f2d 100644
  217. --- a/target/linux/ar71xx/image/Makefile
  218. +++ b/target/linux/ar71xx/image/Makefile
  219. @@ -740,6 +740,16 @@ define Device/oolite
  220. endef
  221. TARGET_DEVICES += oolite
  222. +define Device/ubnt-unifiac
  223. + DEVICE_PROFILE := UBNT UBNTUNIFIAC
  224. + IMAGE_SIZE := 7744k
  225. + MTDPARTS = spi0.0:384k(u-boot)ro,64k(u-boot-env)ro,7744k(firmware),7744k(ubnt-airos)ro,128k(bs)ro,256k(cfg)ro,64k(EEPROM)ro
  226. + IMAGES := sysupgrade.bin
  227. + IMAGE/sysupgrade.bin = append-kernel $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
  228. + BOARDNAME := UBNT-UF-AC
  229. +endef
  230. +TARGET_DEVICES += ubnt-unifiac
  231. +
  232. rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
  233. # $(1): rootfs type.
  234. diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
  235. index b8a7bf1..2b1fe24 100644
  236. --- a/target/linux/ar71xx/mikrotik/config-default
  237. +++ b/target/linux/ar71xx/mikrotik/config-default
  238. @@ -97,6 +97,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
  239. # CONFIG_ATH79_MACH_TUBE2H is not set
  240. # CONFIG_ATH79_MACH_UBNT is not set
  241. # CONFIG_ATH79_MACH_UBNT_XM is not set
  242. +# CONFIG_ATH79_MACH_UBNT_UNIFIAC is not set
  243. # CONFIG_ATH79_MACH_WHR_HP_G300N is not set
  244. # CONFIG_ATH79_MACH_WLAE_AG300N is not set
  245. # CONFIG_ATH79_MACH_WLR8100 is not set
  246. diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
  247. index 626d676..f62cf1a 100644
  248. --- a/target/linux/ar71xx/nand/config-default
  249. +++ b/target/linux/ar71xx/nand/config-default
  250. @@ -59,6 +59,7 @@
  251. # CONFIG_ATH79_MACH_TL_WR941ND is not set
  252. # CONFIG_ATH79_MACH_UBNT is not set
  253. # CONFIG_ATH79_MACH_UBNT_XM is not set
  254. +# CONFIG_ATH79_MACH_UBNT_UNIFIAC is not set
  255. # CONFIG_ATH79_MACH_WHR_HP_G300N is not set
  256. # CONFIG_ATH79_MACH_WLAE_AG300N is not set
  257. # CONFIG_ATH79_MACH_WNDAP360 is not set
  258. diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  259. index d6e786d..5a7a72c 100644
  260. --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  261. +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  262. @@ -1,6 +1,6 @@
  263. --- a/arch/mips/ath79/machtypes.h
  264. +++ b/arch/mips/ath79/machtypes.h
  265. -@@ -16,22 +16,199 @@
  266. +@@ -16,22 +16,200 @@
  267. enum ath79_mach_type {
  268. ATH79_MACH_GENERIC = 0,
  269. @@ -164,6 +164,7 @@
  270. + ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */
  271. ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */
  272. ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */
  273. ++ ATH79_MACH_UBNT_UNIFIAC, /* Ubiquiti Unifi AC */
  274. ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */
  275. + ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */
  276. ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */
  277. @@ -1097,10 +1098,7 @@
  278. + select ATH79_DEV_M25P80
  279. + select ATH79_DEV_USB
  280. + select ATH79_DEV_WMAC
  281. -
  282. --config ATH79_MACH_AP136
  283. -- bool "Atheros AP136/AP135 reference board"
  284. -- select SOC_QCA955X
  285. ++
  286. +config ATH79_MACH_TL_WA7210N_V2
  287. + bool "TP-LINK TL-WA7210N v2 support"
  288. + select SOC_AR724X
  289. @@ -1115,19 +1113,12 @@
  290. + bool "TP-LINK TL-WA830RE v2 support"
  291. + select SOC_AR934X
  292. + select ATH79_DEV_ETH
  293. - select ATH79_DEV_GPIO_BUTTONS
  294. - select ATH79_DEV_LEDS_GPIO
  295. -- select ATH79_DEV_NFC
  296. -- select ATH79_DEV_SPI
  297. ++ select ATH79_DEV_GPIO_BUTTONS
  298. ++ select ATH79_DEV_LEDS_GPIO
  299. + select ATH79_DEV_M25P80
  300. - select ATH79_DEV_USB
  301. - select ATH79_DEV_WMAC
  302. -- help
  303. -- Say 'Y' here if you want your kernel to support the
  304. -- Atheros AP136 or AP135 reference boards.
  305. -
  306. --config ATH79_MACH_AP81
  307. -- bool "Atheros AP81 reference board"
  308. ++ select ATH79_DEV_USB
  309. ++ select ATH79_DEV_WMAC
  310. ++
  311. +config ATH79_MACH_TL_WA901ND
  312. + bool "TP-LINK TL-WA901ND/TL-WA7510N support"
  313. + select SOC_AR724X
  314. @@ -1139,11 +1130,11 @@
  315. +
  316. +config ATH79_MACH_TL_WA901ND_V2
  317. + bool "TP-LINK TL-WA901ND v2 support"
  318. - select SOC_AR913X
  319. - select ATH79_DEV_ETH
  320. - select ATH79_DEV_GPIO_BUTTONS
  321. - select ATH79_DEV_LEDS_GPIO
  322. - select ATH79_DEV_M25P80
  323. ++ select SOC_AR913X
  324. ++ select ATH79_DEV_ETH
  325. ++ select ATH79_DEV_GPIO_BUTTONS
  326. ++ select ATH79_DEV_LEDS_GPIO
  327. ++ select ATH79_DEV_M25P80
  328. + select ATH79_DEV_WMAC
  329. +
  330. +config ATH79_MACH_TL_WDR3500
  331. @@ -1154,34 +1145,13 @@
  332. + select ATH79_DEV_GPIO_BUTTONS
  333. + select ATH79_DEV_LEDS_GPIO
  334. + select ATH79_DEV_M25P80
  335. - select ATH79_DEV_USB
  336. - select ATH79_DEV_WMAC
  337. -- help
  338. -- Say 'Y' here if you want your kernel to support the
  339. -- Atheros AP81 reference board.
  340. -
  341. --config ATH79_MACH_DB120
  342. -- bool "Atheros DB120 reference board"
  343. ++ select ATH79_DEV_USB
  344. ++ select ATH79_DEV_WMAC
  345. ++
  346. +config ATH79_MACH_TL_WDR4300
  347. + bool "TP-LINK TL-WDR3600/4300/4310 board support"
  348. - select SOC_AR934X
  349. - select ATH79_DEV_AP9X_PCI if PCI
  350. - select ATH79_DEV_ETH
  351. - select ATH79_DEV_GPIO_BUTTONS
  352. - select ATH79_DEV_LEDS_GPIO
  353. - select ATH79_DEV_M25P80
  354. -- select ATH79_DEV_NFC
  355. - select ATH79_DEV_USB
  356. - select ATH79_DEV_WMAC
  357. -- help
  358. -- Say 'Y' here if you want your kernel to support the
  359. -- Atheros DB120 reference board.
  360. -
  361. --config ATH79_MACH_PB44
  362. -- bool "Atheros PB44 reference board"
  363. -+config ATH79_MACH_TL_WR703N
  364. -+ bool "TP-LINK TL-WR703N/TL-WR710N/TL-MR10U support"
  365. -+ select SOC_AR933X
  366. ++ select SOC_AR934X
  367. ++ select ATH79_DEV_AP9X_PCI if PCI
  368. + select ATH79_DEV_ETH
  369. + select ATH79_DEV_GPIO_BUTTONS
  370. + select ATH79_DEV_LEDS_GPIO
  371. @@ -1189,8 +1159,8 @@
  372. + select ATH79_DEV_USB
  373. + select ATH79_DEV_WMAC
  374. +
  375. -+config ATH79_MACH_TL_WR720N_V3
  376. -+ bool "TP-LINK TL-WR720N v3/v4 support"
  377. ++config ATH79_MACH_TL_WR703N
  378. ++ bool "TP-LINK TL-WR703N/TL-WR710N/TL-MR10U support"
  379. + select SOC_AR933X
  380. + select ATH79_DEV_ETH
  381. + select ATH79_DEV_GPIO_BUTTONS
  382. @@ -1198,7 +1168,28 @@
  383. + select ATH79_DEV_M25P80
  384. + select ATH79_DEV_USB
  385. + select ATH79_DEV_WMAC
  386. -+
  387. +
  388. +-config ATH79_MACH_AP136
  389. +- bool "Atheros AP136/AP135 reference board"
  390. +- select SOC_QCA955X
  391. ++config ATH79_MACH_TL_WR720N_V3
  392. ++ bool "TP-LINK TL-WR720N v3/v4 support"
  393. ++ select SOC_AR933X
  394. ++ select ATH79_DEV_ETH
  395. + select ATH79_DEV_GPIO_BUTTONS
  396. + select ATH79_DEV_LEDS_GPIO
  397. +- select ATH79_DEV_NFC
  398. +- select ATH79_DEV_SPI
  399. ++ select ATH79_DEV_M25P80
  400. + select ATH79_DEV_USB
  401. + select ATH79_DEV_WMAC
  402. +- help
  403. +- Say 'Y' here if you want your kernel to support the
  404. +- Atheros AP136 or AP135 reference boards.
  405. +
  406. +-config ATH79_MACH_AP81
  407. +- bool "Atheros AP81 reference board"
  408. +- select SOC_AR913X
  409. +config ATH79_MACH_TL_WR741ND
  410. + bool "TP-LINK TL-WR741ND support"
  411. + select SOC_AR724X
  412. @@ -1211,21 +1202,25 @@
  413. +config ATH79_MACH_TL_WR741ND_V4
  414. + bool "TP-LINK TL-WR741ND v4/TL-MR3220 v2 support"
  415. + select SOC_AR933X
  416. -+ select ATH79_DEV_ETH
  417. -+ select ATH79_DEV_GPIO_BUTTONS
  418. -+ select ATH79_DEV_LEDS_GPIO
  419. -+ select ATH79_DEV_M25P80
  420. -+ select ATH79_DEV_USB
  421. -+ select ATH79_DEV_WMAC
  422. -+
  423. -+config ATH79_MACH_TL_WR841N_V1
  424. -+ bool "TP-LINK TL-WR841N v1 support"
  425. - select SOC_AR71XX
  426. -+ select ATH79_DEV_DSA
  427. select ATH79_DEV_ETH
  428. select ATH79_DEV_GPIO_BUTTONS
  429. select ATH79_DEV_LEDS_GPIO
  430. -- select ATH79_DEV_SPI
  431. + select ATH79_DEV_M25P80
  432. + select ATH79_DEV_USB
  433. + select ATH79_DEV_WMAC
  434. +- help
  435. +- Say 'Y' here if you want your kernel to support the
  436. +- Atheros AP81 reference board.
  437. +
  438. +-config ATH79_MACH_DB120
  439. +- bool "Atheros DB120 reference board"
  440. ++config ATH79_MACH_TL_WR841N_V1
  441. ++ bool "TP-LINK TL-WR841N v1 support"
  442. ++ select SOC_AR71XX
  443. ++ select ATH79_DEV_DSA
  444. ++ select ATH79_DEV_ETH
  445. ++ select ATH79_DEV_GPIO_BUTTONS
  446. ++ select ATH79_DEV_LEDS_GPIO
  447. + select ATH79_DEV_M25P80
  448. +
  449. +config ATH79_MACH_TL_WR841N_V8
  450. @@ -1268,15 +1263,21 @@
  451. +
  452. +config ATH79_MACH_TL_WR1041N_V2
  453. + bool "TP-LINK TL-WR1041N v2 support"
  454. -+ select SOC_AR934X
  455. -+ select ATH79_DEV_AP9X_PCI if PCI
  456. -+ select ATH79_DEV_ETH
  457. -+ select ATH79_DEV_GPIO_BUTTONS
  458. -+ select ATH79_DEV_LEDS_GPIO
  459. -+ select ATH79_DEV_M25P80
  460. -+ select ATH79_DEV_USB
  461. -+ select ATH79_DEV_WMAC
  462. -+
  463. + select SOC_AR934X
  464. + select ATH79_DEV_AP9X_PCI if PCI
  465. + select ATH79_DEV_ETH
  466. + select ATH79_DEV_GPIO_BUTTONS
  467. + select ATH79_DEV_LEDS_GPIO
  468. + select ATH79_DEV_M25P80
  469. +- select ATH79_DEV_NFC
  470. + select ATH79_DEV_USB
  471. + select ATH79_DEV_WMAC
  472. +- help
  473. +- Say 'Y' here if you want your kernel to support the
  474. +- Atheros DB120 reference board.
  475. +
  476. +-config ATH79_MACH_PB44
  477. +- bool "Atheros PB44 reference board"
  478. +config ATH79_MACH_TL_WR1043ND
  479. + bool "TP-LINK TL-WR1043ND support"
  480. + select SOC_AR913X
  481. @@ -1319,11 +1320,12 @@
  482. +
  483. +config ATH79_MACH_TEW_673GRU
  484. + bool "TRENDnet TEW-673GRU support"
  485. -+ select SOC_AR71XX
  486. + select SOC_AR71XX
  487. + select ATH79_DEV_AP9X_PCI if PCI
  488. -+ select ATH79_DEV_ETH
  489. -+ select ATH79_DEV_GPIO_BUTTONS
  490. -+ select ATH79_DEV_LEDS_GPIO
  491. + select ATH79_DEV_ETH
  492. + select ATH79_DEV_GPIO_BUTTONS
  493. + select ATH79_DEV_LEDS_GPIO
  494. +- select ATH79_DEV_SPI
  495. + select ATH79_DEV_M25P80
  496. + select ATH79_DEV_USB
  497. + select ATH79_NVRAM
  498. @@ -1361,10 +1363,20 @@
  499. config ATH79_MACH_UBNT_XM
  500. bool "Ubiquiti Networks XM/UniFi boards"
  501. -@@ -83,6 +1144,106 @@ config ATH79_MACH_UBNT_XM
  502. +@@ -83,6 +1144,116 @@ config ATH79_MACH_UBNT_XM
  503. Say 'Y' here if you want your kernel to support the
  504. Ubiquiti Networks XM (rev 1.0) board.
  505. ++config ATH79_MACH_UBNT_UNIFIAC
  506. ++ bool "Ubiquiti UniFi AC (LITE) support"
  507. ++ select SOC_QCA956X
  508. ++ select ATH79_DEV_AP9X_PCI if PCI
  509. ++ select ATH79_DEV_ETH
  510. ++ select ATH79_DEV_GPIO_BUTTONS
  511. ++ select ATH79_DEV_LEDS_GPIO
  512. ++ select ATH79_DEV_M25P80
  513. ++ select ATH79_DEV_WMAC
  514. ++
  515. +config ATH79_MACH_WEIO
  516. + bool "WeIO board"
  517. + select SOC_AR933X
  518. @@ -1468,7 +1480,7 @@
  519. endmenu
  520. config SOC_AR71XX
  521. -@@ -124,7 +1285,10 @@ config ATH79_DEV_DSA
  522. +@@ -124,7 +1295,10 @@ config ATH79_DEV_DSA
  523. config ATH79_DEV_ETH
  524. def_bool n
  525. @@ -1480,7 +1492,7 @@
  526. def_bool n
  527. config ATH79_DEV_GPIO_BUTTONS
  528. -@@ -154,6 +1318,11 @@ config ATH79_PCI_ATH9K_FIXUP
  529. +@@ -154,6 +1328,11 @@ config ATH79_PCI_ATH9K_FIXUP
  530. def_bool n
  531. config ATH79_ROUTERBOOT
  532. @@ -1494,7 +1506,7 @@
  533. endif
  534. --- a/arch/mips/ath79/Makefile
  535. +++ b/arch/mips/ath79/Makefile
  536. -@@ -38,9 +38,128 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
  537. +@@ -38,9 +38,129 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
  538. #
  539. # Machines
  540. #
  541. @@ -1596,6 +1608,7 @@
  542. +obj-$(CONFIG_ATH79_MACH_TL_WR720N_V3) += mach-tl-wr720n-v3.o
  543. +obj-$(CONFIG_ATH79_MACH_TUBE2H) += mach-tube2h.o
  544. +obj-$(CONFIG_ATH79_MACH_UBNT) += mach-ubnt.o
  545. ++obj-$(CONFIG_ATH79_MACH_UBNT_UNIFIAC) += mach-ubnt-unifiac.o
  546. obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.o
  547. +obj-$(CONFIG_ATH79_MACH_WEIO) += mach-weio.o
  548. +obj-$(CONFIG_ATH79_MACH_WHR_HP_G300N) += mach-whr-hp-g300n.o