;;
archer-c58-v1|\
archer-c59-v1|\
+archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2)
ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x1E"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
case "$board" in
- archer-c59-v1)
+ archer-c59-v1|\
+ archer-c59-v2)
ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
;;
esac
;;
archer-c58-v1|\
archer-c59-v1|\
+ archer-c59-v2|\
fritz4020|\
rb-450g)
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
archer-c25-v1|\
archer-c58-v1|\
archer-c59-v1|\
+ archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2|\
archer-c7-v4|\
case $board in
archer-c58-v1|\
archer-c59-v1|\
+ archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2|\
cf-e355ac-v2|\
case "$board" in
archer-c58-v1|\
archer-c59-v1|\
+ archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2)
echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
;;
*"Archer C59 v1")
name="archer-c59-v1"
+ ;;
+ *"Archer C59 v2")
+ name="archer-c59-v2"
;;
*"Archer C60 v1")
name="archer-c60-v1"
archer-c25-v1|\
archer-c58-v1|\
archer-c59-v1|\
+ archer-c59-v2|\
archer-c60-v1|\
archer-c60-v2|\
archer-c7-v4|\
# CONFIG_ATH79_MACH_ARCHER_C25_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C58_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C59_V1 is not set
+# CONFIG_ATH79_MACH_ARCHER_C59_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V1 is not set
# CONFIG_ATH79_MACH_ARCHER_C60_V2 is not set
# CONFIG_ATH79_MACH_ARCHER_C7 is not set
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
},
};
+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",
},
};
-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);
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);
}
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);
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 */
endef
TARGET_DEVICES += archer-c59-v1
+define Device/archer-c59-v2
+ $(Device/archer-c59-v1)
+ DEVICE_TITLE := TP-LINK Archer C59 v2
+ BOARDNAME := ARCHER-C59-V2
+ TPLINK_BOARD_ID := ARCHER-C59-V2
+ DEVICE_PROFILE := ARCHERC59V2
+ IMAGE_SIZE := 14400k
+ MTDPARTS := spi0.0:128k(factory-boot)ro,64k(u-boot)ro,64k(mac)ro,14400k(firmware),1664k(tplink)ro,64k@0xff0000(art)ro
+ SUPPORTED_DEVICES := archer-c59-v2
+endef
+TARGET_DEVICES += archer-c59-v2
+
define Device/archer-c60-v1
$(Device/archer-cxx)
DEVICE_TITLE := TP-LINK Archer C60 v1
.last_sysupgrade_partition = "file-system",
},
+ /** Firmware layout for the C59v2 */
+ {
+ .id = "ARCHER-C59-V2",
+ .vendor = "",
+ .support_list =
+ "SupportList:\r\n"
+ "{product_name:Archer C59,product_ver:2.0.0,special_id:00000000}\r\n"
+ "{product_name:Archer C59,product_ver:2.0.0,special_id:45550000}\r\n"
+ "{product_name:Archer C59,product_ver:2.0.0,special_id:55530000}\r\n",
+ .support_trail = '\x00',
+ .soft_ver = "soft_ver:2.0.0 Build 20161206 rel.7303\n",
+
+ /** We're using a dynamic kernel/rootfs split here */
+ .partitions = {
+ {"factory-boot", 0x00000, 0x20000},
+ {"fs-uboot", 0x20000, 0x10000},
+ {"default-mac", 0x30000, 0x00200},
+ {"pin", 0x30200, 0x00200},
+ {"device-id", 0x30400, 0x00100},
+ {"product-info", 0x30500, 0x0fb00},
+ {"firmware", 0x40000, 0xe10000},
+ {"partition-table", 0xe50000, 0x10000},
+ {"soft-version", 0xe60000, 0x10000},
+ {"support-list", 0xe70000, 0x10000},
+ {"profile", 0xe80000, 0x10000},
+ {"default-config", 0xe90000, 0x10000},
+ {"user-config", 0xea0000, 0x40000},
+ {"usb-config", 0xee0000, 0x10000},
+ {"certificate", 0xef0000, 0x10000},
+ {"extra-para", 0xf00000, 0x10000},
+ {"qos-db", 0xf10000, 0x30000},
+ {"log", 0xfe0000, 0x10000},
+ {"radio", 0xff0000, 0x10000},
+ {NULL, 0, 0}
+ },
+
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "file-system",
+ },
+
/** Firmware layout for the C60v1 */
{
.id = "ARCHER-C60-V1",
/* Some devices need the extra-para partition to accept the firmware */
if (strcasecmp(info->id, "ARCHER-C25-V1") == 0 ||
+ strcasecmp(info->id, "ARCHER-C59-V2") == 0 ||
strcasecmp(info->id, "ARCHER-C60-V2") == 0 ||
strcasecmp(info->id, "TLWR1043NV5") == 0) {
const char mdat[11] = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00};