>From Stefan Helmert <helst_lis...@aol.de> It is mostly the same as wr841nd. WLAN and LAN are working. LAN-Led is working. WLAN signal strength Leds are not working yet.
This is version 4: did some clean up in the patch added Copyright, hope there are no thunderbird created linebreaks. Hope it will be the last try. http://wiki.openwrt.org/toh/tp-link/tl-wa7510n?s[]=wa7510n Signed-off-by: Stefan Helmert <helst_lis...@aol.de> --- Index: target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa7510n.c =================================================================== --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa7510n.c (revision 0) +++ target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa7510n.c (revision 0) @@ -0,0 +1,65 @@ +/* + * TP-LINK TL-WA7510N/ND v1 board support + * + * Copyright (C) 2012 Stefan Helmert <helst_lis...@aol.de> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include <linux/mtd/mtd.h> +#include <linux/mtd/partitions.h> +#include <linux/platform_device.h> + +#include <asm/mach-ath79/ar71xx_regs.h> +#include <asm/mach-ath79/ath79.h> + +#include "dev-dsa.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "machtypes.h" +#include "pci.h" + +#include "common.h" + + +static const char *tl_wa7510n_v1_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data tl_wa7510n_v1_flash_data = { + .part_probes = tl_wa7510n_v1_part_probes, +}; + +static void __init tl_wa7510n_v1_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + + + /* use this to switch off LAN-LED */ +/* ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN); +*/ + /* + * ath79_eth0 would be the WAN port, but is not connected on + * the TL-WA7510N like the TL-WA901ND. ath79_eth1 connects to the internal switch chip, + * however we have a single LAN port only. + */ + ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); + ath79_register_mdio(0, 0x0); + ath79_register_eth(1); + + ath79_register_m25p80(&tl_wa7510n_v1_flash_data); + + ath79_register_pci(); +} + +MIPS_MACHINE(ATH79_MACH_TL_WA7510N_V1, "TL-WA7510N", "TP-LINK TL-WA7510N v1", + tl_wa7510n_v1_setup); Index: target/linux/ar71xx/image/Makefile =================================================================== --- target/linux/ar71xx/image/Makefile (revision 33891) +++ target/linux/ar71xx/image/Makefile (working copy) @@ -799,6 +799,7 @@ $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M)) $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M)) $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) +$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M)) $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV1,tl-wa901nd-v1,TL-WA901ND,ttyS0,115200,0x09010001,1,4M)) $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2,ttyS0,115200,0x09010002,1,4M)) $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x07400001,1,4M)) @@ -861,6 +862,7 @@ $(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT)) $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY)) $(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2)) +$(eval $(call MultiProfile,TLWA7510,TLWA7510NV1)) $(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4)) $(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4)) $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8)) Index: target/linux/ar71xx/config-3.3 =================================================================== --- target/linux/ar71xx/config-3.3 (revision 33891) +++ target/linux/ar71xx/config-3.3 (working copy) @@ -56,6 +56,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y CONFIG_ATH79_MACH_TL_MR3020=y CONFIG_ATH79_MACH_TL_MR3X20=y +CONFIG_ATH79_MACH_TL_WA7510N_V1=y CONFIG_ATH79_MACH_TL_WA901ND=y CONFIG_ATH79_MACH_TL_WA901ND_V2=y CONFIG_ATH79_MACH_TL_WDR4300=y Index: target/linux/ar71xx/patches-3.3/615-MIPS-ath79-TL-WA7510N-v1-support.patch =================================================================== --- target/linux/ar71xx/patches-3.3/615-MIPS-ath79-TL-WA7510N-v1-support.patch (revision 0) +++ target/linux/ar71xx/patches-3.3/615-MIPS-ath79-TL-WA7510N-v1-support.patch (revision 0) @@ -0,0 +1,41 @@ +diff -ruN a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig +--- a/arch/mips/ath79/Kconfig 2012-10-04 12:22:11.000000000 -0700 ++++ b/arch/mips/ath79/Kconfig 2012-10-16 06:18:35.000000000 -0700 +@@ -441,6 +441,15 @@ + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + ++config ATH79_MACH_TL_WA7510N_V1 ++ bool "TP-LINK TL-WA7510N support" ++ select SOC_AR724X ++ select ATH79_DEV_AP9X_PCI if PCI ++ select ATH79_DEV_ETH ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_WMAC ++ + config ATH79_MACH_TL_WA901ND + bool "TP-LINK TL-WA901ND support" + select SOC_AR724X +diff -ruN a/arch/mips/ath79/machtypes.h b/arch/mips/ath79/machtypes.h +--- a/arch/mips/ath79/machtypes.h 2012-10-04 12:22:11.000000000 -0700 ++++ b/arch/mips/ath79/machtypes.h 2012-10-16 06:26:37.000000000 -0700 +@@ -72,6 +72,7 @@ + ATH79_MACH_TL_MR3040, /* TP-LINK TL-MR3040 */ + ATH79_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */ + ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */ ++ ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/ + ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ + ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ + ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */ +diff -ruN a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile +--- a/arch/mips/ath79/Makefile 2012-10-04 12:22:11.000000000 -0700 ++++ b/arch/mips/ath79/Makefile 2012-10-16 05:57:52.000000000 -0700 +@@ -75,6 +75,7 @@ + obj-$(CONFIG_ATH79_MACH_TL_MR11U) += mach-tl-mr11u.o + obj-$(CONFIG_ATH79_MACH_TL_MR3020) += mach-tl-mr3020.o + obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.o ++obj-$(CONFIG_ATH79_MACH_TL_WA7510N_V1) += mach-tl-wa7510n.o + obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o + obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o + obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o Index: target/linux/ar71xx/base-files/lib/ar71xx.sh =================================================================== --- target/linux/ar71xx/base-files/lib/ar71xx.sh (revision 33891) +++ target/linux/ar71xx/base-files/lib/ar71xx.sh (working copy) @@ -339,6 +339,9 @@ *TL-MR3420) name="tl-mr3420" ;; + *TL-WA7510N) + name="tl-wa7510n" + ;; *TL-WA901ND) name="tl-wa901nd" ;; Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh =================================================================== --- target/linux/ar71xx/base-files/lib/upgrade/platform.sh (revision 33891) +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh (working copy) @@ -145,6 +145,7 @@ tl-mr3040 | \ tl-mr3220 | \ tl-mr3420 | \ + tl-wa7510n | \ tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wdr4300 | \ Index: target/linux/ar71xx/generic/profiles/tp-link.mk =================================================================== --- target/linux/ar71xx/generic/profiles/tp-link.mk (revision 33891) +++ target/linux/ar71xx/generic/profiles/tp-link.mk (working copy) @@ -82,7 +82,17 @@ endef $(eval $(call Profile,TLWA701)) +define Profile/TLWA7510 + NAME:=TP-LINK TL-WA7510N + PACKAGES:= +endef +define Profile/TLWA7510/Description + Package set optimized for the TP-LINK TL-WA7510N. +endef +$(eval $(call Profile,TLWA7510)) + + define Profile/TLWA901 NAME:=TP-LINK TL-WA901N/ND PACKAGES:= Index: tools/firmware-utils/src/mktplinkfw.c =================================================================== --- tools/firmware-utils/src/mktplinkfw.c (revision 33891) +++ tools/firmware-utils/src/mktplinkfw.c (working copy) @@ -34,6 +34,7 @@ #define HWID_TL_MR3220_V1 0x32200001 #define HWID_TL_MR3420_V1 0x34200001 #define HWID_TL_WA701N_V1 0x07010001 +#define HWID_TL_WA7510N_V1 0x75100001 #define HWID_TL_WA901ND_V1 0x09010001 #define HWID_TL_WA901ND_V2 0x09010002 #define HWID_TL_WR703N_V1 0x07030101 @@ -198,6 +199,11 @@ .hw_rev = 1, .layout_id = "4M", }, { + .id = "TL-WA7510N", + .hw_id = HWID_TL_WA7510N_V1, + .hw_rev = 1, + .layout_id = "4M", + }, { .id = "TL-WA901NDv1", .hw_id = HWID_TL_WA901ND_V1, .hw_rev = 1, _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel