0068-ar71xx-Added-support-for-TL-WA801NDv3.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Mon, 22 Aug 2016 23:55:22 +0200
  3. Subject: ar71xx: Added support for TL-WA801NDv3
  4. Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
  5. Backport of OpenWrt r48705
  6. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  7. index 6c3ecf54dccd111231d93e539346f7839252794c..027a671215e5acd70cee06620c6648506ad6be47 100755
  8. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  9. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  10. @@ -377,6 +377,7 @@ wp543)
  11. ucidef_set_interface_lan "eth0"
  12. ;;
  13. +tl-wa801nd-v3 |\
  14. dir-505-a1)
  15. ucidef_set_interface_lan "eth1"
  16. ;;
  17. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  18. index 51102d6ed7990cc36bf2e9e4a052ceb4c5d9ea36..83be32908027ce03269fbf382ef986eb91342016 100755
  19. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  20. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  21. @@ -838,6 +838,9 @@ ar71xx_board_detect() {
  22. *"TL-WA801ND v2")
  23. name="tl-wa801nd-v2"
  24. ;;
  25. + *"TL-WA801ND v3")
  26. + name="tl-wa801nd-v3"
  27. + ;;
  28. *TL-WA901ND)
  29. name="tl-wa901nd"
  30. ;;
  31. diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
  32. index d4d92738d0ab010e1d43ebed0baef34fd9bc3f9d..d7cbe2e79af31a0ff88d946323e237f3215620a0 100644
  33. --- a/target/linux/ar71xx/config-3.18
  34. +++ b/target/linux/ar71xx/config-3.18
  35. @@ -120,6 +120,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y
  36. CONFIG_ATH79_MACH_TL_MR3X20=y
  37. CONFIG_ATH79_MACH_TL_WA701ND_V2=y
  38. CONFIG_ATH79_MACH_TL_WA7210N_V2=y
  39. +CONFIG_ATH79_MACH_TL_WA801ND_V3=y
  40. CONFIG_ATH79_MACH_TL_WA830RE_V2=y
  41. CONFIG_ATH79_MACH_TL_WA901ND=y
  42. CONFIG_ATH79_MACH_TL_WA901ND_V2=y
  43. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c
  44. new file mode 100644
  45. index 0000000000000000000000000000000000000000..39cdb10ee340650bc69e4f6054b06a4ae7421e57
  46. --- /dev/null
  47. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa801nd-v3.c
  48. @@ -0,0 +1,136 @@
  49. +/*
  50. + * TP-LINK TL-WA801ND v3 adapted from TP-LINK TL-WR841N/ND v9
  51. + *
  52. + * Copyright (C) 2014 Matthias Schiffer <mschiffer@universe-factory.net>
  53. + * Copyright (C) 2016 Tiziano Bacocco <tizbac2@gmail.com>
  54. + *
  55. + * This program is free software; you can redistribute it and/or modify it
  56. + * under the terms of the GNU General Public License version 2 as published
  57. + * by the Free Software Foundation.
  58. + */
  59. +
  60. +#include <linux/gpio.h>
  61. +#include <linux/platform_device.h>
  62. +
  63. +#include <asm/mach-ath79/ath79.h>
  64. +#include <asm/mach-ath79/ar71xx_regs.h>
  65. +
  66. +#include "common.h"
  67. +#include "dev-eth.h"
  68. +#include "dev-gpio-buttons.h"
  69. +#include "dev-leds-gpio.h"
  70. +#include "dev-m25p80.h"
  71. +#include "dev-wmac.h"
  72. +#include "machtypes.h"
  73. +
  74. +#define TL_WA801NDV3_GPIO_LED_WLAN 12
  75. +#define TL_WA801NDV3_GPIO_LED_QSS 13
  76. +#define TL_WA801NDV3_GPIO_LED_SECURITY_RED 11
  77. +#define TL_WA801NDV3_GPIO_LED_SECURITY_GREEN 15
  78. +#define TL_WA801NDV3_GPIO_LED_LAN 3
  79. +
  80. +#define TL_WA801NDV3_GPIO_BTN_RESET 2
  81. +#define TL_WA801NDV3_GPIO_BTN_WIFI 1
  82. +
  83. +#define TL_WA801NDV3_KEYS_POLL_INTERVAL 20 /* msecs */
  84. +#define TL_WA801NDV3_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA801NDV3_KEYS_POLL_INTERVAL)
  85. +
  86. +static const char *tl_wa801n_v3_part_probes[] = {
  87. + "tp-link",
  88. + NULL,
  89. +};
  90. +
  91. +static struct flash_platform_data tl_wa801n_v3_flash_data = {
  92. + .part_probes = tl_wa801n_v3_part_probes,
  93. +};
  94. +
  95. +static struct gpio_led tl_wa801n_v3_leds_gpio[] __initdata = {
  96. + {
  97. + .name = "tp-link:green:qss",
  98. + .gpio = TL_WA801NDV3_GPIO_LED_QSS,
  99. + .active_low = 1,
  100. + }, {
  101. + .name = "tp-link:green:lan",
  102. + .gpio = TL_WA801NDV3_GPIO_LED_LAN,
  103. + .active_low = 1,
  104. + }, {
  105. + .name = "tp-link:green:wlan",
  106. + .gpio = TL_WA801NDV3_GPIO_LED_WLAN,
  107. + .active_low = 1,
  108. + }, {
  109. + .name = "tp-link:red:security",
  110. + .gpio = TL_WA801NDV3_GPIO_LED_SECURITY_RED,
  111. + .active_low = 0,
  112. + }, {
  113. + .name = "tp-link:green:security",
  114. + .gpio = TL_WA801NDV3_GPIO_LED_SECURITY_GREEN,
  115. + .active_low = 0,
  116. + }
  117. +
  118. +};
  119. +
  120. +static struct gpio_keys_button tl_wa801n_v3_gpio_keys[] __initdata = {
  121. + {
  122. + .desc = "Reset button",
  123. + .type = EV_KEY,
  124. + .code = KEY_RESTART,
  125. + .debounce_interval = TL_WA801NDV3_KEYS_DEBOUNCE_INTERVAL,
  126. + .gpio = TL_WA801NDV3_GPIO_BTN_RESET,
  127. + .active_low = 1,
  128. + }, {
  129. + .desc = "WIFI button",
  130. + .type = EV_KEY,
  131. + .code = KEY_RFKILL,
  132. + .debounce_interval = TL_WA801NDV3_KEYS_DEBOUNCE_INTERVAL,
  133. + .gpio = TL_WA801NDV3_GPIO_BTN_WIFI,
  134. + .active_low = 1,
  135. + }
  136. +};
  137. +
  138. +
  139. +static void __init tl_ap143_setup(void)
  140. +{
  141. + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
  142. + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
  143. + u8 tmpmac[ETH_ALEN];
  144. +
  145. + ath79_register_m25p80(&tl_wa801n_v3_flash_data);
  146. +
  147. + ath79_setup_ar933x_phy4_switch(false, false);
  148. +
  149. + ath79_register_mdio(0, 0x0);
  150. +
  151. + /* LAN */
  152. + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
  153. + ath79_eth1_data.duplex = DUPLEX_FULL;
  154. + ath79_switch_data.phy_poll_mask |= BIT(4);
  155. + ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
  156. + ath79_register_eth(1);
  157. +
  158. + /* WAN */
  159. + ath79_switch_data.phy4_mii_en = 1;
  160. + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  161. + ath79_eth0_data.duplex = DUPLEX_FULL;
  162. + ath79_eth0_data.speed = SPEED_100;
  163. + ath79_eth0_data.phy_mask = BIT(4);
  164. + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
  165. + ath79_register_eth(0);
  166. +
  167. + ath79_init_mac(tmpmac, mac, 0);
  168. + ath79_register_wmac(ee, tmpmac);
  169. +}
  170. +
  171. +static void __init tl_wa801n_v3_setup(void)
  172. +{
  173. + tl_ap143_setup();
  174. +
  175. + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa801n_v3_leds_gpio),
  176. + tl_wa801n_v3_leds_gpio);
  177. +
  178. + ath79_register_gpio_keys_polled(1, TL_WA801NDV3_KEYS_POLL_INTERVAL,
  179. + ARRAY_SIZE(tl_wa801n_v3_gpio_keys),
  180. + tl_wa801n_v3_gpio_keys);
  181. +}
  182. +
  183. +MIPS_MACHINE(ATH79_MACH_TL_WA801ND_V3, "TL-WA801ND-v3", "TP-LINK TL-WA801ND v3",
  184. + tl_wa801n_v3_setup);
  185. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  186. index bb2bb94e04ee8f59db62907ace49952061b411dc..868a5021acb49878359497c90509de07faa3ca49 100644
  187. --- a/target/linux/ar71xx/image/Makefile
  188. +++ b/target/linux/ar71xx/image/Makefile
  189. @@ -691,6 +691,13 @@ define Device/tl-wa801nd-v2
  190. TPLINK_HWID := 0x08010002
  191. endef
  192. +define Device/tl-wa801nd-v3
  193. + $(Device/tplink-4mlzma)
  194. + BOARDNAME := TL-WA801ND-v3
  195. + DEVICE_PROFILE := TLWA801
  196. + TPLINK_HWID := 0x08010003
  197. +endef
  198. +
  199. define Device/tl-wa830re-v2
  200. $(Device/tplink-4mlzma)
  201. BOARDNAME := TL-WA830RE-v2
  202. @@ -711,7 +718,7 @@ define Device/tl-wa860re-v1
  203. DEVICE_PROFILE := TLWA860
  204. TPLINK_HWID := 0x08600001
  205. endef
  206. -TARGET_DEVICES += tl-wa801nd-v2 tl-wa830re-v2 tl-wa850re-v1 tl-wa860re-v1
  207. +TARGET_DEVICES += tl-wa801nd-v2 tl-wa801nd-v3 tl-wa830re-v2 tl-wa850re-v1 tl-wa860re-v1
  208. define Device/tl-wa901nd-v3
  209. $(Device/tplink-4mlzma)
  210. 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
  211. index c83ac2e89324deda3135aab84e8c4f4112ea728d..d23f0cf33e50da891e7135861f1defda047ff2c8 100644
  212. --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  213. +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  214. @@ -1,6 +1,6 @@
  215. --- a/arch/mips/ath79/machtypes.h
  216. +++ b/arch/mips/ath79/machtypes.h
  217. -@@ -16,22 +16,204 @@
  218. +@@ -16,22 +16,205 @@
  219. enum ath79_mach_type {
  220. ATH79_MACH_GENERIC = 0,
  221. @@ -127,6 +127,7 @@
  222. + ATH79_MACH_TL_WA850RE, /* TP-LINK TL-WA850RE */
  223. + ATH79_MACH_TL_WA860RE, /* TP-LINK TL-WA860RE */
  224. + ATH79_MACH_TL_WA801ND_V2, /* TP-LINK TL-WA801ND v2 */
  225. ++ ATH79_MACH_TL_WA801ND_V3, /* TP-LINK TL-WA801ND v3 */
  226. + ATH79_MACH_TL_WA830RE_V2, /* TP-LINK TL-WA830RE v2 */
  227. + ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
  228. + ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
  229. @@ -287,17 +288,10 @@
  230. config ATH79_MACH_AP121
  231. bool "Atheros AP121 reference board"
  232. select SOC_AR933X
  233. -@@ -11,62 +84,1051 @@ config ATH79_MACH_AP121
  234. - select ATH79_DEV_M25P80
  235. - select ATH79_DEV_USB
  236. - select ATH79_DEV_WMAC
  237. -- help
  238. -- Say 'Y' here if you want your kernel to support the
  239. -- Atheros AP121 reference board.
  240. -+ help
  241. -+ Say 'Y' here if you want your kernel to support the
  242. -+ Atheros AP121 reference board.
  243. -+
  244. +@@ -15,13 +88,25 @@ config ATH79_MACH_AP121
  245. + Say 'Y' here if you want your kernel to support the
  246. + Atheros AP121 reference board.
  247. +
  248. +config ATH79_MACH_AP132
  249. + bool "Atheros AP132 reference board"
  250. + select SOC_QCA955X
  251. @@ -310,32 +304,21 @@
  252. + Say 'Y' here if you want your kernel to support the
  253. + Atheros AP132 reference boards.
  254. +
  255. -+config ATH79_MACH_AP136
  256. -+ bool "Atheros AP136/AP135 reference board"
  257. -+ select SOC_QCA955X
  258. -+ select ATH79_DEV_GPIO_BUTTONS
  259. -+ select ATH79_DEV_LEDS_GPIO
  260. -+ select ATH79_DEV_NFC
  261. -+ select ATH79_DEV_M25P80
  262. -+ select ATH79_DEV_USB
  263. -+ select ATH79_DEV_WMAC
  264. -+ help
  265. -+ Say 'Y' here if you want your kernel to support the
  266. -+ Atheros AP136 or AP135 reference boards.
  267. -+
  268. -+config ATH79_MACH_AP81
  269. -+ bool "Atheros AP81 reference board"
  270. -+ select SOC_AR913X
  271. -+ select ATH79_DEV_ETH
  272. -+ select ATH79_DEV_GPIO_BUTTONS
  273. -+ select ATH79_DEV_LEDS_GPIO
  274. + config ATH79_MACH_AP136
  275. + bool "Atheros AP136/AP135 reference board"
  276. + select SOC_QCA955X
  277. + select ATH79_DEV_GPIO_BUTTONS
  278. + select ATH79_DEV_LEDS_GPIO
  279. + select ATH79_DEV_NFC
  280. +- select ATH79_DEV_SPI
  281. + select ATH79_DEV_M25P80
  282. -+ select ATH79_DEV_USB
  283. -+ select ATH79_DEV_WMAC
  284. -+ help
  285. -+ Say 'Y' here if you want your kernel to support the
  286. -+ Atheros AP81 reference board.
  287. -+
  288. + select ATH79_DEV_USB
  289. + select ATH79_DEV_WMAC
  290. + help
  291. +@@ -41,6 +126,24 @@ config ATH79_MACH_AP81
  292. + Say 'Y' here if you want your kernel to support the
  293. + Atheros AP81 reference board.
  294. +
  295. +config ATH79_MACH_AP83
  296. + bool "Atheros AP83 board support"
  297. + select SOC_AR913X
  298. @@ -354,21 +337,13 @@
  299. + select ATH79_DEV_M25P80
  300. + select ATH79_DEV_USB
  301. +
  302. -+config ATH79_MACH_DB120
  303. -+ bool "Atheros DB120 reference board"
  304. -+ select SOC_AR934X
  305. -+ select ATH79_DEV_AP9X_PCI if PCI
  306. -+ select ATH79_DEV_ETH
  307. -+ select ATH79_DEV_GPIO_BUTTONS
  308. -+ select ATH79_DEV_LEDS_GPIO
  309. -+ select ATH79_DEV_M25P80
  310. -+ select ATH79_DEV_NFC
  311. -+ select ATH79_DEV_USB
  312. -+ select ATH79_DEV_WMAC
  313. -+ help
  314. -+ Say 'Y' here if you want your kernel to support the
  315. -+ Atheros DB120 reference board.
  316. -+
  317. + config ATH79_MACH_DB120
  318. + bool "Atheros DB120 reference board"
  319. + select SOC_AR934X
  320. +@@ -56,6 +159,13 @@ config ATH79_MACH_DB120
  321. + Say 'Y' here if you want your kernel to support the
  322. + Atheros DB120 reference board.
  323. +
  324. +config ATH79_MACH_PB42
  325. + bool "Atheros PB42 board support"
  326. + select SOC_AR71XX
  327. @@ -376,18 +351,13 @@
  328. + select ATH79_DEV_GPIO_BUTTONS
  329. + select ATH79_DEV_M25P80
  330. +
  331. -+config ATH79_MACH_PB44
  332. -+ bool "Atheros PB44 reference board"
  333. -+ select SOC_AR71XX
  334. -+ select ATH79_DEV_ETH
  335. -+ select ATH79_DEV_GPIO_BUTTONS
  336. -+ select ATH79_DEV_LEDS_GPIO
  337. -+ select ATH79_DEV_SPI
  338. -+ select ATH79_DEV_USB
  339. -+ help
  340. -+ Say 'Y' here if you want your kernel to support the
  341. -+ Atheros PB44 reference board.
  342. -+
  343. + config ATH79_MACH_PB44
  344. + bool "Atheros PB44 reference board"
  345. + select SOC_AR71XX
  346. +@@ -68,6 +178,967 @@ config ATH79_MACH_PB44
  347. + Say 'Y' here if you want your kernel to support the
  348. + Atheros PB44 reference board.
  349. +
  350. +config ATH79_MACH_PB92
  351. + bool "Atheros PB92 board support"
  352. + select SOC_AR724X
  353. @@ -1113,6 +1083,15 @@
  354. + select ATH79_DEV_M25P80
  355. + select ATH79_DEV_WMAC
  356. +
  357. ++config ATH79_MACH_TL_WA801ND_V3
  358. ++ bool "TP-LINK TL-WA801ND v3 support"
  359. ++ select SOC_QCA953X
  360. ++ select ATH79_DEV_ETH
  361. ++ select ATH79_DEV_GPIO_BUTTONS
  362. ++ select ATH79_DEV_LEDS_GPIO
  363. ++ select ATH79_DEV_M25P80
  364. ++ select ATH79_DEV_WMAC
  365. ++
  366. +config ATH79_MACH_TL_WA830RE_V2
  367. + bool "TP-LINK TL-WA830RE v2 support"
  368. + select SOC_AR934X
  369. @@ -1172,28 +1151,17 @@
  370. + select ATH79_DEV_M25P80
  371. + select ATH79_DEV_USB
  372. + select ATH79_DEV_WMAC
  373. -
  374. --config ATH79_MACH_AP136
  375. -- bool "Atheros AP136/AP135 reference board"
  376. -- select SOC_QCA955X
  377. ++
  378. +config ATH79_MACH_TL_WR720N_V3
  379. + bool "TP-LINK TL-WR720N v3/v4 support"
  380. + select SOC_AR933X
  381. + select ATH79_DEV_ETH
  382. - select ATH79_DEV_GPIO_BUTTONS
  383. - select ATH79_DEV_LEDS_GPIO
  384. -- select ATH79_DEV_NFC
  385. -- select ATH79_DEV_SPI
  386. ++ select ATH79_DEV_GPIO_BUTTONS
  387. ++ select ATH79_DEV_LEDS_GPIO
  388. + select ATH79_DEV_M25P80
  389. - select ATH79_DEV_USB
  390. - select ATH79_DEV_WMAC
  391. -- help
  392. -- Say 'Y' here if you want your kernel to support the
  393. -- Atheros AP136 or AP135 reference boards.
  394. -
  395. --config ATH79_MACH_AP81
  396. -- bool "Atheros AP81 reference board"
  397. -- select SOC_AR913X
  398. ++ select ATH79_DEV_USB
  399. ++ select ATH79_DEV_WMAC
  400. ++
  401. +config ATH79_MACH_TL_WR741ND
  402. + bool "TP-LINK TL-WR741ND support"
  403. + select SOC_AR724X
  404. @@ -1206,18 +1174,13 @@
  405. +config ATH79_MACH_TL_WR741ND_V4
  406. + bool "TP-LINK TL-WR741ND v4/TL-MR3220 v2 support"
  407. + select SOC_AR933X
  408. - select ATH79_DEV_ETH
  409. - select ATH79_DEV_GPIO_BUTTONS
  410. - select ATH79_DEV_LEDS_GPIO
  411. - select ATH79_DEV_M25P80
  412. - select ATH79_DEV_USB
  413. - select ATH79_DEV_WMAC
  414. -- help
  415. -- Say 'Y' here if you want your kernel to support the
  416. -- Atheros AP81 reference board.
  417. -
  418. --config ATH79_MACH_DB120
  419. -- bool "Atheros DB120 reference board"
  420. ++ select ATH79_DEV_ETH
  421. ++ select ATH79_DEV_GPIO_BUTTONS
  422. ++ select ATH79_DEV_LEDS_GPIO
  423. ++ select ATH79_DEV_M25P80
  424. ++ select ATH79_DEV_USB
  425. ++ select ATH79_DEV_WMAC
  426. ++
  427. +config ATH79_MACH_TL_WR841N_V1
  428. + bool "TP-LINK TL-WR841N v1 support"
  429. + select SOC_AR71XX
  430. @@ -1268,21 +1231,15 @@
  431. +
  432. +config ATH79_MACH_TL_WR1041N_V2
  433. + bool "TP-LINK TL-WR1041N v2 support"
  434. - select SOC_AR934X
  435. - select ATH79_DEV_AP9X_PCI if PCI
  436. - select ATH79_DEV_ETH
  437. - select ATH79_DEV_GPIO_BUTTONS
  438. - select ATH79_DEV_LEDS_GPIO
  439. - select ATH79_DEV_M25P80
  440. -- select ATH79_DEV_NFC
  441. - select ATH79_DEV_USB
  442. - select ATH79_DEV_WMAC
  443. -- help
  444. -- Say 'Y' here if you want your kernel to support the
  445. -- Atheros DB120 reference board.
  446. -
  447. --config ATH79_MACH_PB44
  448. -- bool "Atheros PB44 reference board"
  449. ++ select SOC_AR934X
  450. ++ select ATH79_DEV_AP9X_PCI if PCI
  451. ++ select ATH79_DEV_ETH
  452. ++ select ATH79_DEV_GPIO_BUTTONS
  453. ++ select ATH79_DEV_LEDS_GPIO
  454. ++ select ATH79_DEV_M25P80
  455. ++ select ATH79_DEV_USB
  456. ++ select ATH79_DEV_WMAC
  457. ++
  458. +config ATH79_MACH_TL_WR1043ND
  459. + bool "TP-LINK TL-WR1043ND support"
  460. + select SOC_AR913X
  461. @@ -1325,12 +1282,11 @@
  462. +
  463. +config ATH79_MACH_TEW_673GRU
  464. + bool "TRENDnet TEW-673GRU support"
  465. - select SOC_AR71XX
  466. ++ select SOC_AR71XX
  467. + select ATH79_DEV_AP9X_PCI if PCI
  468. - select ATH79_DEV_ETH
  469. - select ATH79_DEV_GPIO_BUTTONS
  470. - select ATH79_DEV_LEDS_GPIO
  471. -- select ATH79_DEV_SPI
  472. ++ select ATH79_DEV_ETH
  473. ++ select ATH79_DEV_GPIO_BUTTONS
  474. ++ select ATH79_DEV_LEDS_GPIO
  475. + select ATH79_DEV_M25P80
  476. + select ATH79_DEV_USB
  477. + select ATH79_NVRAM
  478. @@ -1361,14 +1317,12 @@
  479. + select ATH79_DEV_GPIO_BUTTONS
  480. + select ATH79_DEV_LEDS_GPIO
  481. + select ATH79_DEV_M25P80
  482. - select ATH79_DEV_USB
  483. -- help
  484. -- Say 'Y' here if you want your kernel to support the
  485. -- Atheros PB44 reference board.
  486. -
  487. ++ select ATH79_DEV_USB
  488. ++
  489. config ATH79_MACH_UBNT_XM
  490. bool "Ubiquiti Networks XM/UniFi boards"
  491. -@@ -83,6 +1145,117 @@ config ATH79_MACH_UBNT_XM
  492. + select SOC_AR724X
  493. +@@ -83,6 +1154,117 @@ config ATH79_MACH_UBNT_XM
  494. Say 'Y' here if you want your kernel to support the
  495. Ubiquiti Networks XM (rev 1.0) board.
  496. @@ -1486,7 +1440,7 @@
  497. endmenu
  498. config SOC_AR71XX
  499. -@@ -124,7 +1297,10 @@ config ATH79_DEV_DSA
  500. +@@ -124,7 +1306,10 @@ config ATH79_DEV_DSA
  501. config ATH79_DEV_ETH
  502. def_bool n
  503. @@ -1498,7 +1452,7 @@
  504. def_bool n
  505. config ATH79_DEV_GPIO_BUTTONS
  506. -@@ -154,6 +1330,11 @@ config ATH79_PCI_ATH9K_FIXUP
  507. +@@ -154,6 +1339,11 @@ config ATH79_PCI_ATH9K_FIXUP
  508. def_bool n
  509. config ATH79_ROUTERBOOT
  510. @@ -1512,7 +1466,7 @@
  511. endif
  512. --- a/arch/mips/ath79/Makefile
  513. +++ b/arch/mips/ath79/Makefile
  514. -@@ -38,9 +38,129 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
  515. +@@ -38,9 +38,130 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
  516. #
  517. # Machines
  518. #
  519. @@ -1595,6 +1549,7 @@
  520. +obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2) += mach-tl-wa701nd-v2.o
  521. +obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2) += mach-tl-wa7210n-v2.o
  522. +obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o
  523. ++obj-$(CONFIG_ATH79_MACH_TL_WA801ND_V3) += mach-tl-wa801nd-v3.o
  524. +obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o
  525. +obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
  526. +obj-$(CONFIG_ATH79_MACH_TL_WDR3500) += mach-tl-wdr3500.o
  527. diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
  528. index 6df869d59a6138d4c0dd1fbec5337a71c31eccd3..9785a3f232ed4457e77aee249c0da86b4e99c532 100644
  529. --- a/tools/firmware-utils/src/mktplinkfw.c
  530. +++ b/tools/firmware-utils/src/mktplinkfw.c
  531. @@ -50,6 +50,7 @@
  532. #define HWID_TL_WA830RE_V1 0x08300010
  533. #define HWID_TL_WA830RE_V2 0x08300002
  534. #define HWID_TL_WA801ND_V2 0x08010002
  535. +#define HWID_TL_WA801ND_V3 0x08010003
  536. #define HWID_TL_WA901ND_V1 0x09010001
  537. #define HWID_TL_WA901ND_V2 0x09010002
  538. #define HWID_TL_WA901ND_V4 0x09010004
  539. @@ -296,6 +297,11 @@ static struct board_info boards[] = {
  540. .hw_id = HWID_TL_WA801ND_V2,
  541. .hw_rev = 1,
  542. .layout_id = "4Mlzma",
  543. + },{
  544. + .id = "TL-WA801NDv3",
  545. + .hw_id = HWID_TL_WA801ND_V3,
  546. + .hw_rev = 1,
  547. + .layout_id = "4Mlzma",
  548. }, {
  549. .id = "TL-WA901NDv1",
  550. .hw_id = HWID_TL_WA901ND_V1,
  551. @@ -1207,4 +1213,3 @@ int main(int argc, char *argv[])
  552. out:
  553. return ret;
  554. }
  555. -