0091-ar71xx-add-support-for-TP-LINK-WR1043ND-v4.patch 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. From: Ludwig Thomeczek <ledesrc@wxorx.net>
  2. Date: Fri, 16 Dec 2016 12:50:34 +0100
  3. Subject: ar71xx: add support for TP-LINK WR1043ND v4
  4. Signed-off-by: Ludwig Thomeczek <ledesrc@wxorx.net>
  5. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  6. index 67043d432cf7a469bf1ded14bc354274ab16e3e6..1b613dc6e8ee66f2d7ea32486c2b6ddd03bfba89 100644
  7. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  8. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  9. @@ -272,6 +272,7 @@ get_status_led() {
  10. tl-wr1041n-v2 | \
  11. tl-wr1043nd | \
  12. tl-wr1043nd-v2 | \
  13. + tl-wr1043nd-v4 | \
  14. tl-wr741nd | \
  15. tl-wr741nd-v4 | \
  16. tl-wa801nd-v3 | \
  17. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
  18. index e47cbb0b01ef4a335c059a74af66d9f8999b3b3d..fa38568fbc84aad4c85636c3894097c65e30eb9a 100644
  19. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
  20. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
  21. @@ -553,6 +553,16 @@ tl-wr1043nd-v2)
  22. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  23. ;;
  24. +tl-wr1043nd-v4)
  25. + ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
  26. + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  27. + ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
  28. + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
  29. + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  30. + ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
  31. + ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  32. + ;;
  33. +
  34. tl-wr2543n)
  35. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
  36. ;;
  37. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  38. index 878623ce3fd8b7c585da73c7bd72794a144096a3..4389bc894f8dd08a9231b35bbb4fba0e9e57560b 100755
  39. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  40. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  41. @@ -208,6 +208,15 @@ tl-wr1043nd)
  42. ucidef_add_switch_vlan "switch0" "2" "0 5t"
  43. ;;
  44. +tl-wr1043nd-v4)
  45. + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
  46. + ucidef_add_switch "switch0" "1" "1"
  47. + ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
  48. + ucidef_add_switch_vlan "switch0" "2" "0t 5"
  49. + mac=$(mtd_get_mac_binary config 0x1017c)
  50. + [ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
  51. + ;;
  52. +
  53. tl-wr2543n)
  54. ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
  55. ucidef_add_switch "switch0" "1" "1"
  56. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  57. index 6df0d8a8d0d52c103b9ded2170af19a9a6b5f8bb..5922527da4980fa3b51fdcec2bca96f5962d0f0b 100755
  58. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  59. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  60. @@ -776,6 +776,9 @@ ar71xx_board_detect() {
  61. *"TL-WR1043ND v2")
  62. name="tl-wr1043nd-v2"
  63. ;;
  64. + *"TL-WR1043ND v4")
  65. + name="tl-wr1043nd-v4"
  66. + ;;
  67. *TL-WR2543N*)
  68. name="tl-wr2543n"
  69. ;;
  70. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  71. index 76c252ccb14db970aac63ea1d2eaddca3d867867..e61ebf7c2221fd56bb902f14d96cb25d174718ee 100755
  72. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  73. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  74. @@ -377,6 +377,7 @@ platform_check_image() {
  75. tl-wr1041n-v2 | \
  76. tl-wr1043nd | \
  77. tl-wr1043nd-v2 | \
  78. + tl-wr1043nd-v4 | \
  79. tl-wr2543n)
  80. [ "$magic" != "0100" ] && {
  81. echo "Invalid image type."
  82. diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
  83. index 050362614a464b56d3740a7954686fe4e5b37803..ad0574f9ab67e78cd1359f8b45de5de51521718c 100644
  84. --- a/target/linux/ar71xx/config-3.18
  85. +++ b/target/linux/ar71xx/config-3.18
  86. @@ -131,6 +131,7 @@ CONFIG_ATH79_MACH_TL_WDR4300=y
  87. CONFIG_ATH79_MACH_TL_WR1041N_V2=y
  88. CONFIG_ATH79_MACH_TL_WR1043ND=y
  89. CONFIG_ATH79_MACH_TL_WR1043ND_V2=y
  90. +CONFIG_ATH79_MACH_TL_WR1043ND_V4=y
  91. CONFIG_ATH79_MACH_TL_WR2543N=y
  92. CONFIG_ATH79_MACH_TL_WR703N=y
  93. CONFIG_ATH79_MACH_TL_WR720N_V3=y
  94. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
  95. new file mode 100644
  96. index 0000000000000000000000000000000000000000..cb224f4611004aaaec6c3b2b737b3bb45c79d239
  97. --- /dev/null
  98. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
  99. @@ -0,0 +1,190 @@
  100. +/*
  101. + * TP-LINK WR1043 V4 support
  102. + *
  103. + * Copyright (C) 2015-2016 P. Wassi <p.wassi at gmx.at>
  104. + * Copyright (C) 2016 Matthias Schiffer <mschiffer@universe-factory.net>
  105. + * Copyright (C) 2016 Andreas Ziegler <github@andreas-ziegler.de>
  106. + * Copyright (C) 2016 Ludwig Thomeczek <ledesrc@wxorx.net>
  107. + *
  108. + * Derived from: mach-dir-869-a1.c
  109. + *
  110. + * This program is free software; you can redistribute it and/or modify it
  111. + * under the terms of the GNU General Public License version 2 as published
  112. + * by the Free Software Foundation.
  113. + */
  114. +
  115. +
  116. +#include <linux/gpio.h>
  117. +#include <linux/init.h>
  118. +#include <linux/pci.h>
  119. +#include <linux/platform_device.h>
  120. +#include <linux/ath9k_platform.h>
  121. +
  122. +#include <asm/mach-ath79/ath79.h>
  123. +#include <asm/mach-ath79/irq.h>
  124. +#include <asm/mach-ath79/ar71xx_regs.h>
  125. +
  126. +#include <linux/platform_data/phy-at803x.h>
  127. +#include <linux/ar8216_platform.h>
  128. +
  129. +#include "common.h"
  130. +#include "dev-ap9x-pci.h"
  131. +#include "dev-eth.h"
  132. +#include "dev-gpio-buttons.h"
  133. +#include "dev-leds-gpio.h"
  134. +#include "dev-m25p80.h"
  135. +#include "dev-wmac.h"
  136. +#include "dev-usb.h"
  137. +#include "machtypes.h"
  138. +#include "nvram.h"
  139. +
  140. +#define TL_WR1043_V4_GPIO_BTN_RESET 2
  141. +#define TL_WR1043_V4_GPIO_BTN_RFKILL 5
  142. +
  143. +#define TL_WR1043_V4_GPIO_LED_WLAN 19
  144. +#define TL_WR1043_V4_GPIO_LED_USB 7
  145. +#define TL_WR1043_V4_GPIO_LED_WPS 1
  146. +#define TL_WR1043_V4_GPIO_LED_SYSTEM 6
  147. +
  148. +#define TL_WR1043_V4_GPIO_USB_POWER 8
  149. +
  150. +#define TL_WR1043_V4_GPIO_LED_WAN 15
  151. +#define TL_WR1043_V4_GPIO_LED_LAN1 9
  152. +#define TL_WR1043_V4_GPIO_LED_LAN2 14
  153. +#define TL_WR1043_V4_GPIO_LED_LAN3 21
  154. +#define TL_WR1043_V4_GPIO_LED_LAN4 20
  155. +
  156. +#define TL_WR1043_V4_KEYS_POLL_INTERVAL 20 /* msecs */
  157. +#define TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043_V4_KEYS_POLL_INTERVAL)
  158. +
  159. +#define TL_WR1043_V4_MAC_LOCATION 0x1ff80174
  160. +
  161. +#define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000
  162. +#define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000
  163. +
  164. +static struct gpio_led tl_wr1043nd_v4_leds_gpio[] __initdata = {
  165. + {
  166. + .name = "tp-link:green:wps",
  167. + .gpio = TL_WR1043_V4_GPIO_LED_WPS,
  168. + .active_low = 1,
  169. + },
  170. + {
  171. + .name = "tp-link:green:system",
  172. + .gpio = TL_WR1043_V4_GPIO_LED_SYSTEM,
  173. + .active_low = 1,
  174. + },
  175. + {
  176. + .name = "tp-link:green:wlan",
  177. + .gpio = TL_WR1043_V4_GPIO_LED_WLAN,
  178. + .active_low = 1,
  179. + },
  180. + {
  181. + .name = "tp-link:green:usb",
  182. + .gpio = TL_WR1043_V4_GPIO_LED_USB,
  183. + .active_low = 1,
  184. + },
  185. + {
  186. + .name = "tp-link:green:wan",
  187. + .gpio = TL_WR1043_V4_GPIO_LED_WAN,
  188. + .active_low = 1,
  189. + },
  190. + {
  191. + .name = "tp-link:green:lan1",
  192. + .gpio = TL_WR1043_V4_GPIO_LED_LAN1,
  193. + .active_low = 1,
  194. + },
  195. + {
  196. + .name = "tp-link:green:lan2",
  197. + .gpio = TL_WR1043_V4_GPIO_LED_LAN2,
  198. + .active_low = 1,
  199. + },
  200. + {
  201. + .name = "tp-link:green:lan3",
  202. + .gpio = TL_WR1043_V4_GPIO_LED_LAN3,
  203. + .active_low = 1,
  204. + },
  205. + {
  206. + .name = "tp-link:green:lan4",
  207. + .gpio = TL_WR1043_V4_GPIO_LED_LAN4,
  208. + .active_low = 1,
  209. + },
  210. +};
  211. +
  212. +static struct gpio_keys_button tl_wr1043nd_v4_gpio_keys[] __initdata = {
  213. + {
  214. + .desc = "Reset button",
  215. + .type = EV_KEY,
  216. + .code = KEY_RESTART,
  217. + .debounce_interval = TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL,
  218. + .gpio = TL_WR1043_V4_GPIO_BTN_RESET,
  219. + .active_low = 1,
  220. + },
  221. + {
  222. + .desc = "RFKILL button",
  223. + .type = EV_KEY,
  224. + .code = KEY_RFKILL,
  225. + .debounce_interval = TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL,
  226. + .gpio = TL_WR1043_V4_GPIO_BTN_RFKILL,
  227. + .active_low = 1,
  228. + },
  229. +};
  230. +
  231. +static struct ar8327_pad_cfg tl_wr1043nd_v4_ar8327_pad0_cfg = {
  232. + .mode = AR8327_PAD_MAC_SGMII,
  233. + .sgmii_delay_en = true,
  234. +};
  235. +
  236. +static struct ar8327_platform_data tl_wr1043nd_v4_ar8327_data = {
  237. + .pad0_cfg = &tl_wr1043nd_v4_ar8327_pad0_cfg,
  238. + .port0_cfg = {
  239. + .force_link = 1,
  240. + .speed = AR8327_PORT_SPEED_1000,
  241. + .duplex = 1,
  242. + .txpause = 1,
  243. + .rxpause = 1,
  244. + },
  245. +};
  246. +
  247. +static struct mdio_board_info tl_wr1043nd_v4_mdio0_info[] = {
  248. + {
  249. + .bus_id = "ag71xx-mdio.0",
  250. + .phy_addr = 0,
  251. + .platform_data = &tl_wr1043nd_v4_ar8327_data,
  252. + },
  253. +};
  254. +
  255. +static void __init tl_wr1043nd_v4_setup(void)
  256. +{
  257. + u8 *mac = (u8 *) KSEG1ADDR(TL_WR1043_V4_MAC_LOCATION);
  258. + u8 *eeprom = (u8 *) KSEG1ADDR(TL_WR1043_V4_EEPROM_ADDR);
  259. +
  260. + ath79_register_m25p80(NULL);
  261. +
  262. + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
  263. + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
  264. + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
  265. + ath79_eth0_data.phy_mask = BIT(0);
  266. +
  267. + mdiobus_register_board_info(tl_wr1043nd_v4_mdio0_info,
  268. + ARRAY_SIZE(tl_wr1043nd_v4_mdio0_info));
  269. +
  270. + ath79_register_usb();
  271. + ath79_register_mdio(0, 0);
  272. + ath79_register_eth(0);
  273. +
  274. + ath79_register_wmac(eeprom + TL_WR1043_V4_WMAC_CALDATA_OFFSET, mac);
  275. +
  276. + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr1043nd_v4_leds_gpio),
  277. + tl_wr1043nd_v4_leds_gpio);
  278. +
  279. + ath79_register_gpio_keys_polled(-1, TL_WR1043_V4_KEYS_POLL_INTERVAL,
  280. + ARRAY_SIZE(tl_wr1043nd_v4_gpio_keys),
  281. + tl_wr1043nd_v4_gpio_keys);
  282. +
  283. + gpio_request_one(TL_WR1043_V4_GPIO_USB_POWER,
  284. + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
  285. + "USB power");
  286. +}
  287. +
  288. +MIPS_MACHINE(ATH79_MACH_TL_WR1043ND_V4, "TL-WR1043ND-v4",
  289. + "TP-LINK TL-WR1043ND v4", tl_wr1043nd_v4_setup);
  290. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  291. index 638e97f088b5420cf4f2a3c706875677815240e1..61e221255f6742f9594da168b11af7716d6a720e 100644
  292. --- a/target/linux/ar71xx/image/Makefile
  293. +++ b/target/linux/ar71xx/image/Makefile
  294. @@ -73,6 +73,18 @@ define Build/mktplinkfw-combined
  295. @mv $@.new $@
  296. endef
  297. +define Build/tplink-safeloader
  298. + -$(STAGING_DIR_HOST)/bin/tplink-safeloader \
  299. + -B $(TPLINK_BOARD_NAME) \
  300. + -V $(REVISION) \
  301. + -k $(word 1,$^) \
  302. + -r $@ \
  303. + -o $@.new \
  304. + -j \
  305. + $(wordlist 2,$(words $(1)),$(1)) \
  306. + $(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@
  307. +endef
  308. +
  309. define Build/loader-common
  310. rm -rf $@.src
  311. $(MAKE) -C lzma-loader \
  312. @@ -103,7 +115,7 @@ define Build/copy-file
  313. cat "$(1)" > "$@"
  314. endef
  315. -DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
  316. +DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_BOARD_NAME
  317. define Device/Default
  318. BOARDNAME :=
  319. @@ -677,6 +689,22 @@ define Device/tl-wr1041n-v2
  320. endef
  321. TARGET_DEVICES += tl-wr1041n-v2
  322. +define Device/tl-wr1043nd-v4
  323. + $(Device/tplink)
  324. + BOARDNAME := TL-WR1043ND-v4
  325. + DEVICE_PROFILE := TLWR1043
  326. + TPLINK_HWID := 0x10430004
  327. + TPLINK_FLASHLAYOUT := 16Msafeloader
  328. + MTDPARTS := spi0.0:128k(u-boot)ro,1536k(kernel),14016k(rootfs),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15552k@0x20000(firmware)
  329. + IMAGE_SIZE := 15552k
  330. + TPLINK_BOARD_NAME := TLWR1043NDV4
  331. + KERNEL := kernel-bin | patch-cmdline | lzma | mktplinkfw-combined
  332. + IMAGES := sysupgrade.bin factory.bin
  333. + IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  334. + IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
  335. +endef
  336. +TARGET_DEVICES += tl-wr1043nd-v4
  337. +
  338. define Device/tl-wdr4900-v2
  339. $(Device/tplink-8mlzma)
  340. BOARDNAME := TL-WDR4900-v2
  341. diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
  342. index 75155b22489a60748b3b1357a1d9c549092255ba..06850dfd5ad9dc004e5e06605c642d0f934aad6f 100644
  343. --- a/target/linux/ar71xx/mikrotik/config-default
  344. +++ b/target/linux/ar71xx/mikrotik/config-default
  345. @@ -85,6 +85,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
  346. # CONFIG_ATH79_MACH_TL_WR1041N_V2 is not set
  347. # CONFIG_ATH79_MACH_TL_WR1043ND is not set
  348. # CONFIG_ATH79_MACH_TL_WR1043ND_V2 is not set
  349. +# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
  350. # CONFIG_ATH79_MACH_TL_WR2543N is not set
  351. # CONFIG_ATH79_MACH_TL_WR703N is not set
  352. # CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
  353. diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
  354. index 802d6e0502b51a4ecf2259c20e9b6667cd255680..6d69cdcd1cc7f911fbb68dc265ef3fa4c7f5bd78 100644
  355. --- a/target/linux/ar71xx/nand/config-default
  356. +++ b/target/linux/ar71xx/nand/config-default
  357. @@ -49,6 +49,7 @@
  358. # CONFIG_ATH79_MACH_TL_WDR4300 is not set
  359. # CONFIG_ATH79_MACH_TL_WR1041N_V2 is not set
  360. # CONFIG_ATH79_MACH_TL_WR1043ND is not set
  361. +# CONFIG_ATH79_MACH_TL_WR1043ND_V4 is not set
  362. # CONFIG_ATH79_MACH_TL_WR2543N is not set
  363. # CONFIG_ATH79_MACH_TL_WR703N is not set
  364. # CONFIG_ATH79_MACH_TL_WR720N_V3 is not set
  365. 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
  366. index b7517464742679b66c3bd916b9b2a2fcc34b65e1..fb69cf3b9ee51e39c32a9e98de913c1a84bed56a 100644
  367. --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  368. +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
  369. @@ -1,6 +1,6 @@
  370. --- a/arch/mips/ath79/machtypes.h
  371. +++ b/arch/mips/ath79/machtypes.h
  372. -@@ -16,22 +16,206 @@
  373. +@@ -16,22 +16,207 @@
  374. enum ath79_mach_type {
  375. ATH79_MACH_GENERIC = 0,
  376. @@ -138,6 +138,7 @@
  377. + ATH79_MACH_TL_WR1041N_V2, /* TP-LINK TL-WR1041N v2 */
  378. + ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */
  379. + ATH79_MACH_TL_WR1043ND_V2, /* TP-LINK TL-WR1043ND v2 */
  380. ++ ATH79_MACH_TL_WR1043ND_V4, /* TP-LINK TL-WR1043ND v4 */
  381. + ATH79_MACH_TL_WR2543N, /* TP-LINK TL-WR2543N/ND */
  382. + ATH79_MACH_TL_WR703N, /* TP-LINK TL-WR703N */
  383. + ATH79_MACH_TL_WR710N, /* TP-LINK TL-WR710N */
  384. @@ -355,7 +356,7 @@
  385. config ATH79_MACH_PB44
  386. bool "Atheros PB44 reference board"
  387. select SOC_AR71XX
  388. -@@ -68,6 +178,976 @@ config ATH79_MACH_PB44
  389. +@@ -68,6 +178,988 @@ config ATH79_MACH_PB44
  390. Say 'Y' here if you want your kernel to support the
  391. Atheros PB44 reference board.
  392. @@ -1270,6 +1271,18 @@
  393. + select ATH79_DEV_USB
  394. + select ATH79_DEV_WMAC
  395. +
  396. ++config ATH79_MACH_TL_WR1043ND_V4
  397. ++ bool "TP-LINK TL-WR1043ND v4 support"
  398. ++ select SOC_QCA956X
  399. ++ select ATH79_DEV_AP9X_PCI if PCI
  400. ++ select ATH79_DEV_ETH
  401. ++ select ATH79_DEV_GPIO_BUTTONS
  402. ++ select ATH79_DEV_LEDS_GPIO
  403. ++ select ATH79_DEV_M25P80
  404. ++ select ATH79_DEV_USB
  405. ++ select ATH79_DEV_WMAC
  406. ++
  407. ++
  408. +config ATH79_MACH_TL_WR2543N
  409. + bool "TP-LINK TL-WR2543N/ND support"
  410. + select SOC_AR724X
  411. @@ -1332,7 +1345,7 @@
  412. config ATH79_MACH_UBNT_XM
  413. bool "Ubiquiti Networks XM/UniFi boards"
  414. select SOC_AR724X
  415. -@@ -83,6 +1163,117 @@ config ATH79_MACH_UBNT_XM
  416. +@@ -83,6 +1175,117 @@ config ATH79_MACH_UBNT_XM
  417. Say 'Y' here if you want your kernel to support the
  418. Ubiquiti Networks XM (rev 1.0) board.
  419. @@ -1450,7 +1463,7 @@
  420. endmenu
  421. config SOC_AR71XX
  422. -@@ -124,7 +1315,10 @@ config ATH79_DEV_DSA
  423. +@@ -124,7 +1327,10 @@ config ATH79_DEV_DSA
  424. config ATH79_DEV_ETH
  425. def_bool n
  426. @@ -1462,7 +1475,7 @@
  427. def_bool n
  428. config ATH79_DEV_GPIO_BUTTONS
  429. -@@ -154,6 +1348,11 @@ config ATH79_PCI_ATH9K_FIXUP
  430. +@@ -154,6 +1360,11 @@ config ATH79_PCI_ATH9K_FIXUP
  431. def_bool n
  432. config ATH79_ROUTERBOOT
  433. @@ -1476,7 +1489,7 @@
  434. endif
  435. --- a/arch/mips/ath79/Makefile
  436. +++ b/arch/mips/ath79/Makefile
  437. -@@ -38,9 +47,131 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
  438. +@@ -38,9 +38,132 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route
  439. #
  440. # Machines
  441. #
  442. @@ -1575,6 +1588,7 @@
  443. +obj-$(CONFIG_ATH79_MACH_TL_WR1041N_V2) += mach-tl-wr1041n-v2.o
  444. +obj-$(CONFIG_ATH79_MACH_TL_WR1043ND) += mach-tl-wr1043nd.o
  445. +obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V2) += mach-tl-wr1043nd-v2.o
  446. ++obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V4) += mach-tl-wr1043nd-v4.o
  447. +obj-$(CONFIG_ATH79_MACH_TL_WR2543N) += mach-tl-wr2543n.o
  448. +obj-$(CONFIG_ATH79_MACH_TL_WR703N) += mach-tl-wr703n.o
  449. +obj-$(CONFIG_ATH79_MACH_TL_WR720N_V3) += mach-tl-wr720n-v3.o