mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
ar71xx: add kernel support for the TL-MR10U board
Based on andelf's patch: http://andelf.diandian.com/post/2013-05-22/40050677370 [juhosg: extend WR703N code to handle the TL-MR10U instead of adding a separate mach-tl-mr10u file]] Signed-off-by: Oleg Titov <oleg.titov@gmail.com> Patchwork: http://patchwork.openwrt.org/patch/3840/ Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 37547
This commit is contained in:
parent
e9688455f6
commit
ec7fe3fab7
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* TP-LINK TL-WR703N board support
|
* TP-LINK TL-WR703N/TL-MR10U board support
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 dongyuqi <729650915@qq.com>
|
* Copyright (C) 2011 dongyuqi <729650915@qq.com>
|
||||||
* Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
|
* Copyright (C) 2011-2012 Gabor Juhos <juhosg@openwrt.org>
|
||||||
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#define TL_WR703N_GPIO_USB_POWER 8
|
#define TL_WR703N_GPIO_USB_POWER 8
|
||||||
|
|
||||||
|
#define TL_MR10U_GPIO_USB_POWER 18
|
||||||
|
|
||||||
#define TL_WR703N_KEYS_POLL_INTERVAL 20 /* msecs */
|
#define TL_WR703N_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||||
#define TL_WR703N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR703N_KEYS_POLL_INTERVAL)
|
#define TL_WR703N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR703N_KEYS_POLL_INTERVAL)
|
||||||
|
|
||||||
@ -57,7 +59,7 @@ static struct gpio_keys_button tl_wr703n_gpio_keys[] __initdata = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init tl_wr703n_setup(void)
|
static void __init common_setup(unsigned usb_power_gpio)
|
||||||
{
|
{
|
||||||
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||||
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
|
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
|
||||||
@ -72,7 +74,7 @@ static void __init tl_wr703n_setup(void)
|
|||||||
ARRAY_SIZE(tl_wr703n_gpio_keys),
|
ARRAY_SIZE(tl_wr703n_gpio_keys),
|
||||||
tl_wr703n_gpio_keys);
|
tl_wr703n_gpio_keys);
|
||||||
|
|
||||||
gpio_request_one(TL_WR703N_GPIO_USB_POWER,
|
gpio_request_one(usb_power_gpio,
|
||||||
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||||
"USB power");
|
"USB power");
|
||||||
ath79_register_usb();
|
ath79_register_usb();
|
||||||
@ -85,5 +87,18 @@ static void __init tl_wr703n_setup(void)
|
|||||||
ath79_register_wmac(ee, mac);
|
ath79_register_wmac(ee, mac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __init tl_mr10u_setup(void)
|
||||||
|
{
|
||||||
|
common_setup(TL_MR10U_GPIO_USB_POWER);
|
||||||
|
}
|
||||||
|
|
||||||
|
MIPS_MACHINE(ATH79_MACH_TL_MR10U, "TL-MR10U", "TP-LINK TL-MR10U",
|
||||||
|
tl_mr10u_setup);
|
||||||
|
|
||||||
|
static void __init tl_wr703n_setup(void)
|
||||||
|
{
|
||||||
|
common_setup(TL_WR703N_GPIO_USB_POWER);
|
||||||
|
}
|
||||||
|
|
||||||
MIPS_MACHINE(ATH79_MACH_TL_WR703N, "TL-WR703N", "TP-LINK TL-WR703N v1",
|
MIPS_MACHINE(ATH79_MACH_TL_WR703N, "TL-WR703N", "TP-LINK TL-WR703N v1",
|
||||||
tl_wr703n_setup);
|
tl_wr703n_setup);
|
||||||
|
@ -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 support"
|
||||||
|
+ bool "TP-LINK TL-WR703N/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
|
||||||
|
@@ -81,6 +81,7 @@ enum ath79_mach_type {
|
||||||
|
ATH79_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
|
||||||
|
ATH79_MACH_TEW_673GRU, /* TRENDnet TEW-673GRU */
|
||||||
|
ATH79_MACH_TEW_712BR, /* TRENDnet TEW-712BR */
|
||||||
|
+ ATH79_MACH_TL_MR10U, /* TP-LINK TL-MR10U */
|
||||||
|
ATH79_MACH_TL_MR11U, /* TP-LINK TL-MR11U */
|
||||||
|
ATH79_MACH_TL_MR3020, /* TP-LINK TL-MR3020 */
|
||||||
|
ATH79_MACH_TL_MR3040, /* TP-LINK TL-MR3040 */
|
Loading…
Reference in New Issue
Block a user