aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorKeith Maika <keithm@aoeex.com>2018-06-15 00:39:09 -0400
committerJohn Crispin <john@phrozen.org>2018-07-30 14:04:45 +0200
commit4caab808300ad75575d778bae6e184caa26aeabc (patch)
tree787765d5401038139b55a77be6e88172e30742f9 /target/linux/ar71xx/files
parenta3d2448fae5499356a31d71585a812ac65e7a39a (diff)
downloadupstream-4caab808300ad75575d778bae6e184caa26aeabc.tar.gz
upstream-4caab808300ad75575d778bae6e184caa26aeabc.tar.bz2
upstream-4caab808300ad75575d778bae6e184caa26aeabc.zip
ar71xx: add support for TP-Link Archer C59 v2
TP-Link Archer C59v2 is a dual-band AC1350 router based on Qualcomm/Atheros QCA9561+QCA9886 chips. Specification: - 775/650/258 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 2T2R 5 GHz - 5x 10/100 Mbps Ethernet - USB 2.0 port - UART header on PCB Flash instruction: - via web UI: 1. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin 2. Login to router and open the Advanced tab 3. Navigate to System Tools -> Firmware Upgrade 4. Upload firmware using the Manual Upgrade form - via TFTP: 1. Set PC to fixed ip address 192.168.0.66 2. Download openwrt-ar71xx-generic-archer-c59-v2-squashfs-factory.bin and rename it to tp_recovery.bin 3. Start a tftp server with the file tp_recovery.bin in its root directory 4. Turn off the router 5. Press and hold Reset button 6. Turn on router with the reset button pressed and wait ~15 seconds 7. Release the reset button and after a short time the firmware should be transferred from the tftp server 8. Wait ~30 second to complete recovery. Signed-off-by: Keith Maika <keithm@aoeex.com>
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c61
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/machtypes.h1
3 files changed, 69 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index a6903d2939..7b82b42e0a 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1575,6 +1575,17 @@ config ATH79_MACH_ARCHER_C59_V1
select ATH79_DEV_USB
select ATH79_DEV_WMAC
+config ATH79_MACH_ARCHER_C59_V2
+ bool "TP-LINK Archer C59 v2 support"
+ select SOC_QCA956X
+ select ATH79_DEV_AP9X_PCI if PCI
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
+
config ATH79_MACH_ARCHER_C60_V1
bool "TP-LINK Archer C60 v1 support"
select SOC_QCA956X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c
index c500c91a1a..6cc40e6a7b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-archer-c59-v1.c
@@ -146,6 +146,49 @@ static struct gpio_led archer_c59_v1_leds_gpio[] __initdata = {
},
};
+static struct gpio_led archer_c59_v2_leds_gpio[] __initdata = {
+ {
+ .name = "archer-c59-v2:green:power",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_POWER,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:green:wlan2g",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_WLAN2,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:green:wlan5g",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_WLAN5,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:green:lan",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_LAN,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:green:wan",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_WAN_GREEN,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:amber:wan",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_WAN_AMBER,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:green:wps",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_WPS,
+ .active_low = 1,
+ },
+ {
+ .name = "archer-c59-v2:green:usb",
+ .gpio = ARCHER_C59_74HC_GPIO_LED_USB,
+ .active_low = 1,
+ },
+};
+
static struct gpio_keys_button archer_c59_v1_gpio_keys[] __initdata = {
{
.desc = "Reset button",
@@ -215,9 +258,9 @@ static struct spi_board_info archer_c59_v1_spi_info[] = {
},
};
-static void __init archer_c5x_v1_setup(void)
+static void __init archer_c5x_v1_setup(u32 macLocation)
{
- u8 *mac = (u8 *) KSEG1ADDR(0x1f010008);
+ u8 *mac = (u8 *) KSEG1ADDR(macLocation);
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
ath79_register_m25p80(NULL);
@@ -270,7 +313,7 @@ static void __init archer_c5x_v1_setup(void)
static void __init archer_c58_v1_setup(void)
{
- archer_c5x_v1_setup();
+ archer_c5x_v1_setup(0x1f010008);
ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c58_v1_leds_gpio),
archer_c58_v1_leds_gpio);
}
@@ -280,10 +323,20 @@ MIPS_MACHINE(ATH79_MACH_ARCHER_C58_V1, "ARCHER-C58-V1",
static void __init archer_c59_v1_setup(void)
{
- archer_c5x_v1_setup();
+ archer_c5x_v1_setup(0x1f010008);
ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c59_v1_leds_gpio),
archer_c59_v1_leds_gpio);
}
MIPS_MACHINE(ATH79_MACH_ARCHER_C59_V1, "ARCHER-C59-V1",
"TP-LINK Archer C59 v1", archer_c59_v1_setup);
+
+static void __init archer_c59_v2_setup(void)
+{
+ archer_c5x_v1_setup(0x1f030008);
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(archer_c59_v2_leds_gpio),
+ archer_c59_v2_leds_gpio);
+}
+
+MIPS_MACHINE(ATH79_MACH_ARCHER_C59_V2, "ARCHER-C59-V2",
+ "TP-LINK Archer C59 v2", archer_c59_v2_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 8328a6febc..0b959632db 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -47,6 +47,7 @@ enum ath79_mach_type {
ATH79_MACH_ARCHER_C5, /* TP-LINK Archer C5 board */
ATH79_MACH_ARCHER_C58_V1, /* TP-LINK Archer C58 V1 board */
ATH79_MACH_ARCHER_C59_V1, /* TP-LINK Archer C59 V1 board */
+ ATH79_MACH_ARCHER_C59_V2, /* TP-LINK Archer C59 V2 board */
ATH79_MACH_ARCHER_C60_V1, /* TP-LINK Archer C60 V1 board */
ATH79_MACH_ARCHER_C60_V2, /* TP-LINK Archer C60 V2 board */
ATH79_MACH_ARCHER_C7, /* TP-LINK Archer C7 board */