summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-07-28 10:23:32 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-07-28 10:23:32 +0000
commite777c7a8ce52f557d43b0414abab774f934e605b (patch)
tree0d29d5d01b2543a474ecc5212d4f05de1fd7e0ae /target/linux/ar71xx
parentc58d891b39206a5fa152cf8e75ba92091f3b1f15 (diff)
ar71xx: add kernel support for the TP-LINK TL-WR710N v1 board
Small router sold in EU: AR9330@400MHz, 1x USB2.0, 2x ethernet, 8MB flash, 32MB ram, one led, one button. See: http://galeria.tech-blog.pl/TP-Link_TL-WR710N-EU/ [juhosg: use a separate kernel patch] Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> Patchwork: http://patchwork.openwrt.org/patch/3873/ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37572 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c20
-rw-r--r--target/linux/ar71xx/patches-3.10/621-MIPS-ath79-TL-WR710N-support.patch21
2 files changed, 38 insertions, 3 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
index 46597053e8..72dc2065ef 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr703n.c
@@ -59,7 +59,7 @@ static struct gpio_keys_button tl_wr703n_gpio_keys[] __initdata = {
}
};
-static void __init common_setup(unsigned usb_power_gpio)
+static void __init common_setup(unsigned usb_power_gpio, bool sec_ethernet)
{
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
@@ -84,12 +84,18 @@ static void __init common_setup(unsigned usb_power_gpio)
ath79_register_mdio(0, 0x0);
ath79_register_eth(0);
+ if (sec_ethernet)
+ {
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac, -1);
+ ath79_register_eth(1);
+ }
+
ath79_register_wmac(ee, mac);
}
static void __init tl_mr10u_setup(void)
{
- common_setup(TL_MR10U_GPIO_USB_POWER);
+ common_setup(TL_MR10U_GPIO_USB_POWER, false);
}
MIPS_MACHINE(ATH79_MACH_TL_MR10U, "TL-MR10U", "TP-LINK TL-MR10U",
@@ -97,8 +103,16 @@ MIPS_MACHINE(ATH79_MACH_TL_MR10U, "TL-MR10U", "TP-LINK TL-MR10U",
static void __init tl_wr703n_setup(void)
{
- common_setup(TL_WR703N_GPIO_USB_POWER);
+ common_setup(TL_WR703N_GPIO_USB_POWER, false);
}
MIPS_MACHINE(ATH79_MACH_TL_WR703N, "TL-WR703N", "TP-LINK TL-WR703N v1",
tl_wr703n_setup);
+
+static void __init tl_wr710n_setup(void)
+{
+ common_setup(TL_WR703N_GPIO_USB_POWER, true);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WR710N, "TL-WR710N", "TP-LINK TL-WR710N v1",
+ tl_wr710n_setup);
diff --git a/target/linux/ar71xx/patches-3.10/621-MIPS-ath79-TL-WR710N-support.patch b/target/linux/ar71xx/patches-3.10/621-MIPS-ath79-TL-WR710N-support.patch
new file mode 100644
index 0000000000..09438d3d96
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/621-MIPS-ath79-TL-WR710N-support.patch
@@ -0,0 +1,21 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -577,7 +577,7 @@ config ATH79_MACH_TL_WDR4300
+ select ATH79_DEV_WMAC
+
+ config ATH79_MACH_TL_WR703N
+- bool "TP-LINK TL-WR703N/TL-MR10U support"
++ bool "TP-LINK TL-WR703N/TL-WR710N/TL-MR10U support"
+ select SOC_AR933X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -98,6 +98,7 @@ enum ath79_mach_type {
+ ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */
+ ATH79_MACH_TL_WR2543N, /* TP-LINK TL-WR2543N/ND */
+ ATH79_MACH_TL_WR703N, /* TP-LINK TL-WR703N */
++ ATH79_MACH_TL_WR710N, /* TP-LINK TL-WR710N */
+ ATH79_MACH_TL_WR720N_V3, /* TP-LINK TL-WR720N v3 */
+ ATH79_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */
+ ATH79_MACH_TL_WR741ND_V4, /* TP-LINK TL-WR741ND v4*/