diff --git a/include/profiles.mk b/include/profiles.mk index 9333b7ba..935effa0 100644 --- a/include/profiles.mk +++ b/include/profiles.mk @@ -40,8 +40,9 @@ $(eval $(call GluonModel,TLWR941,tl-wr941nd-v4-squashfs,tp-link-tl-wr941n-nd-v4) $(eval $(call GluonProfile,TLWR1043,$(USB_PACKAGES))) $(eval $(call GluonModel,TLWR1043,tl-wr1043nd-v1-squashfs,tp-link-tl-wr1043n-nd-v1)) -# TL-WDR3600/4300 v1 +# TL-WDR350/3600/4300 v1 $(eval $(call GluonProfile,TLWDR4300,$(USB_PACKAGES))) +$(eval $(call GluonModel,TLWDR4300,tl-wdr3500-v1-squashfs,tp-link-tl-wdr3500-v1)) $(eval $(call GluonModel,TLWDR4300,tl-wdr3600-v1-squashfs,tp-link-tl-wdr3600-v1)) $(eval $(call GluonModel,TLWDR4300,tl-wdr4300-v1-squashfs,tp-link-tl-wdr4300-v1)) diff --git a/kernel/config-ar71xx-generic b/kernel/config-ar71xx-generic index 56385904..5a1e19cd 100644 --- a/kernel/config-ar71xx-generic +++ b/kernel/config-ar71xx-generic @@ -105,6 +105,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y CONFIG_ATH79_MACH_TL_MR3X20=y CONFIG_ATH79_MACH_TL_WA901ND=y CONFIG_ATH79_MACH_TL_WA901ND_V2=y +CONFIG_ATH79_MACH_TL_WDR3500=y CONFIG_ATH79_MACH_TL_WDR4300=y CONFIG_ATH79_MACH_TL_WR703N=y CONFIG_ATH79_MACH_TL_WR741ND=y diff --git a/patches/openwrt/0009-ar71xx-add-kernel-support-for-the-TL-WDR3500-board.patch b/patches/openwrt/0009-ar71xx-add-kernel-support-for-the-TL-WDR3500-board.patch new file mode 100644 index 00000000..df15852d --- /dev/null +++ b/patches/openwrt/0009-ar71xx-add-kernel-support-for-the-TL-WDR3500-board.patch @@ -0,0 +1,246 @@ +From: juhosg +Date: Fri, 1 Feb 2013 15:50:29 +0000 +Subject: ar71xx: add kernel support for the TL-WDR3500 board + +WDR3500 is similar to WDR3600 except it doesn't have gigabit ethernet, +and has only 1 USB port. + +Pending issues: + + * Leds are not working at all (except power and wlan_5g) + * LAN switch ethernet ports are reversed with respect to case label. + + [Label] -> soft device + [LAN1] -> eth0.4 + [LAN2] -> eth0.3 + [LAN3] -> eth0.2 + [LAN4] -> eth0.1 + +Based on http://patchwork.openwrt.org/patch/3208/ + +Thanks-to: Paul Fertser +Signed-off-by: Gui Iribarren +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35423 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +Conflicts: + target/linux/ar71xx/config-3.7 + +diff --git a/target/linux/ar71xx/config-3.3 b/target/linux/ar71xx/config-3.3 +index 446f202..dfc5bf2 100644 +--- a/target/linux/ar71xx/config-3.3 ++++ b/target/linux/ar71xx/config-3.3 +@@ -60,6 +60,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y + CONFIG_ATH79_MACH_TL_MR3X20=y + CONFIG_ATH79_MACH_TL_WA901ND=y + CONFIG_ATH79_MACH_TL_WA901ND_V2=y ++CONFIG_ATH79_MACH_TL_WDR3500=y + CONFIG_ATH79_MACH_TL_WDR4300=y + CONFIG_ATH79_MACH_TL_WR1041N_V2=y + CONFIG_ATH79_MACH_TL_WR1043ND=y +diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +new file mode 100644 +index 0000000..05fe83d +--- /dev/null ++++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +@@ -0,0 +1,153 @@ ++/* ++ * TP-LINK TL-WDR3500 board support ++ * ++ * Copyright (C) 2012 Gabor Juhos ++ * Copyright (C) 2013 Gui Iribarren ++ * ++ * 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 ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "common.h" ++#include "dev-ap9x-pci.h" ++#include "dev-eth.h" ++#include "dev-gpio-buttons.h" ++#include "dev-leds-gpio.h" ++#include "dev-m25p80.h" ++#include "dev-spi.h" ++#include "dev-usb.h" ++#include "dev-wmac.h" ++#include "machtypes.h" ++ ++#define WDR3500_GPIO_LED_USB1 11 ++#define WDR3500_GPIO_LED_WLAN2G 13 ++#define WDR3500_GPIO_LED_SYSTEM 14 ++#define WDR3500_GPIO_LED_QSS 15 ++ ++#define WDR3500_GPIO_BTN_WPS 16 ++#define WDR3500_GPIO_BTN_RFKILL 17 ++ ++#define WDR3500_GPIO_USB1_POWER 22 ++ ++#define WDR3500_KEYS_POLL_INTERVAL 20 /* msecs */ ++#define WDR3500_KEYS_DEBOUNCE_INTERVAL (3 * WDR3500_KEYS_POLL_INTERVAL) ++ ++#define WDR3500_MAC0_OFFSET 0 ++#define WDR3500_MAC1_OFFSET 6 ++#define WDR3500_WMAC_CALDATA_OFFSET 0x1000 ++#define WDR3500_PCIE_CALDATA_OFFSET 0x5000 ++ ++static const char *wdr3500_part_probes[] = { ++ "tp-link", ++ NULL, ++}; ++ ++static struct flash_platform_data wdr3500_flash_data = { ++ .part_probes = wdr3500_part_probes, ++}; ++ ++static struct gpio_led wdr3500_leds_gpio[] __initdata = { ++ { ++ .name = "tp-link:green:qss", ++ .gpio = WDR3500_GPIO_LED_QSS, ++ .active_low = 1, ++ }, ++ { ++ .name = "tp-link:green:system", ++ .gpio = WDR3500_GPIO_LED_SYSTEM, ++ .active_low = 1, ++ }, ++ { ++ .name = "tp-link:green:usb1", ++ .gpio = WDR3500_GPIO_LED_USB1, ++ .active_low = 1, ++ }, ++ { ++ .name = "tp-link:green:wlan2g", ++ .gpio = WDR3500_GPIO_LED_WLAN2G, ++ .active_low = 1, ++ }, ++}; ++ ++static struct gpio_keys_button wdr3500_gpio_keys[] __initdata = { ++ { ++ .desc = "QSS button", ++ .type = EV_KEY, ++ .code = KEY_WPS_BUTTON, ++ .debounce_interval = WDR3500_KEYS_DEBOUNCE_INTERVAL, ++ .gpio = WDR3500_GPIO_BTN_WPS, ++ .active_low = 1, ++ }, ++ { ++ .desc = "RFKILL switch", ++ .type = EV_SW, ++ .code = KEY_RFKILL, ++ .debounce_interval = WDR3500_KEYS_DEBOUNCE_INTERVAL, ++ .gpio = WDR3500_GPIO_BTN_RFKILL, ++ }, ++}; ++ ++ ++static void __init wdr3500_setup(void) ++{ ++ u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); ++ u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); ++ u8 tmpmac[ETH_ALEN]; ++ ++ ath79_register_m25p80(&wdr3500_flash_data); ++ ath79_register_leds_gpio(-1, ARRAY_SIZE(wdr3500_leds_gpio), ++ wdr3500_leds_gpio); ++ ath79_register_gpio_keys_polled(-1, WDR3500_KEYS_POLL_INTERVAL, ++ ARRAY_SIZE(wdr3500_gpio_keys), ++ wdr3500_gpio_keys); ++ ++ ath79_init_mac(tmpmac, mac, 0); ++ ath79_register_wmac(art + WDR3500_WMAC_CALDATA_OFFSET, tmpmac); ++ ++ ath79_init_mac(tmpmac, mac, 1); ++ ap9x_pci_setup_wmac_led_pin(0, 0); ++ ap91_pci_init(art + WDR3500_PCIE_CALDATA_OFFSET, tmpmac); ++ ++ ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE); ++ ++ ath79_register_mdio(1, 0x0); ++ ++ /* LAN */ ++ ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); ++ ++ /* GMAC1 is connected to the internal switch */ ++ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; ++ ++ ath79_register_eth(1); ++ ++ /* WAN */ ++ ath79_init_mac(ath79_eth0_data.mac_addr, mac, 2); ++ ++ /* GMAC0 is connected to the PHY4 of the internal switch */ ++ ath79_switch_data.phy4_mii_en = 1; ++ ath79_switch_data.phy_poll_mask = BIT(4); ++ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ++ ath79_eth0_data.phy_mask = BIT(4); ++ ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev; ++ ++ ath79_register_eth(0); ++ ++ gpio_request_one(WDR3500_GPIO_USB1_POWER, ++ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, ++ "USB1 power"); ++ ath79_register_usb(); ++} ++ ++MIPS_MACHINE(ATH79_MACH_TL_WDR3500, "TL-WDR3500", ++ "TP-LINK TL-WDR3500", ++ wdr3500_setup); +diff --git a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch +new file mode 100644 +index 0000000..0a2c3bd +--- /dev/null ++++ b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch +@@ -0,0 +1,40 @@ ++--- a/arch/mips/ath79/machtypes.h +++++ b/arch/mips/ath79/machtypes.h ++@@ -84,6 +84,7 @@ enum ath79_mach_type { ++ 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_WDR3500, /* TP-LINK TL-WDR3500 */ ++ ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */ ++ ATH79_MACH_TL_WR1041N_V2, /* TP-LINK TL-WR1041N v2 */ ++ ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */ ++--- a/arch/mips/ath79/Kconfig +++++ b/arch/mips/ath79/Kconfig ++@@ -514,6 +514,17 @@ config ATH79_MACH_TL_WA901ND_V2 ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_WMAC ++ +++config ATH79_MACH_TL_WDR3500 +++ bool "TP-LINK TL-WDR3500 board support" +++ select SOC_AR934X +++ 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_TL_WDR4300 ++ bool "TP-LINK TL-WDR3600/4300/4310 board support" ++ select SOC_AR934X ++--- a/arch/mips/ath79/Makefile +++++ b/arch/mips/ath79/Makefile ++@@ -81,6 +81,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR3020) += ma ++ obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.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_WDR3500) += mach-tl-wdr3500.o ++ obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o ++ obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += mach-tl-wr741nd.o ++ obj-$(CONFIG_ATH79_MACH_TL_WR741ND_V4) += mach-tl-wr741nd-v4.o diff --git a/patches/openwrt/0010-ar71xx-add-user-space-support-for-TL-WDR3500-board.patch b/patches/openwrt/0010-ar71xx-add-user-space-support-for-TL-WDR3500-board.patch new file mode 100644 index 00000000..c6d1bcc4 --- /dev/null +++ b/patches/openwrt/0010-ar71xx-add-user-space-support-for-TL-WDR3500-board.patch @@ -0,0 +1,48 @@ +From: juhosg +Date: Fri, 1 Feb 2013 15:50:32 +0000 +Subject: ar71xx: add user-space support for TL-WDR3500 board + +Based on http://patchwork.openwrt.org/patch/3208/ + +Thanks-to: Paul Fertser +Signed-off-by: Gui Iribarren +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35424 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh +index fe7c910..8d71352 100755 +--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh ++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +@@ -123,6 +123,9 @@ tplink_board_detect() { + "342000"*) + model="TP-Link TL-MR3420" + ;; ++ "350000"*) ++ model="TP-Link TL-WDR3500" ++ ;; + "360000"*) + model="TP-Link TL-WDR3600" + ;; +@@ -357,6 +360,9 @@ ar71xx_board_detect() { + *"TL-WA901ND v2") + name="tl-wa901nd-v2" + ;; ++ *"TL-WDR3500") ++ name="tl-wdr3500" ++ ;; + *"TL-WDR3600/4300/4310") + name="tl-wdr4300" + ;; +diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +index 49b1de9..e52ad9e 100755 +--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh ++++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +@@ -155,6 +155,7 @@ platform_check_image() { + tl-wa7510n | \ + tl-wa901nd | \ + tl-wa901nd-v2 | \ ++ tl-wdr3500 | \ + tl-wdr4300 | \ + tl-wr703n | \ + tl-wr741nd | \ diff --git a/patches/openwrt/0011-ar71xx-build-image-for-the-TL-WDR3500-board.patch b/patches/openwrt/0011-ar71xx-build-image-for-the-TL-WDR3500-board.patch new file mode 100644 index 00000000..80e3cf76 --- /dev/null +++ b/patches/openwrt/0011-ar71xx-build-image-for-the-TL-WDR3500-board.patch @@ -0,0 +1,55 @@ +From: juhosg +Date: Fri, 1 Feb 2013 15:50:34 +0000 +Subject: ar71xx: build image for the TL-WDR3500 board + +Based on http://patchwork.openwrt.org/patch/3208/ + +Thanks-to: Paul Fertser +Signed-off-by: Gui Iribarren +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35425 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +Conflicts: + target/linux/ar71xx/image/Makefile + +diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk +index 07d7059..3d7859c 100644 +--- a/target/linux/ar71xx/generic/profiles/tp-link.mk ++++ b/target/linux/ar71xx/generic/profiles/tp-link.mk +@@ -105,12 +105,12 @@ $(eval $(call Profile,TLWA901)) + + + define Profile/TLWDR4300 +- NAME:=TP-LINK TL-WDR3600/4300/4310 ++ NAME:=TP-LINK TL-WDR3500/3600/4300/4310 + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev + endef + + define Profile/TLWDR4300/Description +- Package set optimized for the TP-LINK TL-WDR3600/4300/4310. ++ Package set optimized for the TP-LINK TL-WDR3500/3600/4300/4310. + endef + $(eval $(call Profile,TLWDR4300)) + +diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile +index 8e82f7f..01d1e67 100644 +--- a/target/linux/ar71xx/image/Makefile ++++ b/target/linux/ar71xx/image/Makefile +@@ -881,6 +881,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL + $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma)) + $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma)) + $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99)) ++$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3500V1,tl-wdr3500-v1,TL-WDR3500,ttyS0,115200,0x35000001,1,8Mlzma)) + $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3600V1,tl-wdr3600-v1,TL-WDR4300,ttyS0,115200,0x36000001,1,8Mlzma)) + $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR4300V1,tl-wdr4300-v1,TL-WDR4300,ttyS0,115200,0x43000001,1,8Mlzma)) + $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR4310V1,tl-wdr4310-v1,TL-WDR4300,ttyS0,115200,0x43100001,1,8Mlzma)) +@@ -925,7 +926,7 @@ $(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4)) + $(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4)) + $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8)) + $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4)) +-$(eval $(call MultiProfile,TLWDR4300,TLWDR3600V1 TLWDR4300V1 TLWDR4310V1)) ++$(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4310V1)) + $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTUNIFI UBNTUNIFIOUTDOOR)) + $(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDRMAC WNDRMACV2)) + $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M)) diff --git a/patches/openwrt/0012-ar71xx-add-default-switch-configuration-for-the-TL-WDR3500.patch b/patches/openwrt/0012-ar71xx-add-default-switch-configuration-for-the-TL-WDR3500.patch new file mode 100644 index 00000000..14456f7c --- /dev/null +++ b/patches/openwrt/0012-ar71xx-add-default-switch-configuration-for-the-TL-WDR3500.patch @@ -0,0 +1,23 @@ +From: juhosg +Date: Sun, 24 Mar 2013 19:23:36 +0000 +Subject: ar71xx: add default switch configuration for the TL-WDR3500 + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36116 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +Conflicts: + target/linux/ar71xx/base-files/etc/uci-defaults/02_network + +diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network +index 7fa219d..a36036f 100755 +--- a/target/linux/ar71xx/base-files/etc/uci-defaults/network ++++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network +@@ -188,6 +188,7 @@ tew-632brp |\ + tew-712br |\ + tl-mr3220 |\ + tl-mr3420 |\ ++tl-wdr3500 |\ + tl-wr741nd |\ + tl-wr741nd-v4 |\ + tl-wr841n-v7 |\ diff --git a/patches/openwrt/0013-ar71xx-add-diag-support-for-the-TL-WDR3500.patch b/patches/openwrt/0013-ar71xx-add-diag-support-for-the-TL-WDR3500.patch new file mode 100644 index 00000000..1ac6acde --- /dev/null +++ b/patches/openwrt/0013-ar71xx-add-diag-support-for-the-TL-WDR3500.patch @@ -0,0 +1,20 @@ +From: juhosg +Date: Sun, 24 Mar 2013 19:23:43 +0000 +Subject: ar71xx: add diag support for the TL-WDR3500 + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36117 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh +index 416322d..b206438 100755 +--- a/target/linux/ar71xx/base-files/etc/diag.sh ++++ b/target/linux/ar71xx/base-files/etc/diag.sh +@@ -129,6 +129,7 @@ get_status_led() { + tl-mr3420 | \ + tl-wa901nd | \ + tl-wa901nd-v2 | \ ++ tl-wdr3500 | \ + tl-wr1041n-v2 | \ + tl-wr1043nd | \ + tl-wr741nd | \ diff --git a/patches/openwrt/0014-ar71xx-remove-numeric-suffix-of-the-TL-WDR3500-USB-LED.patch b/patches/openwrt/0014-ar71xx-remove-numeric-suffix-of-the-TL-WDR3500-USB-LED.patch new file mode 100644 index 00000000..4ade0f4e --- /dev/null +++ b/patches/openwrt/0014-ar71xx-remove-numeric-suffix-of-the-TL-WDR3500-USB-LED.patch @@ -0,0 +1,53 @@ +From: juhosg +Date: Sun, 24 Mar 2013 19:23:45 +0000 +Subject: ar71xx: remove numeric suffix of the TL-WDR3500 USB LED + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36118 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +index 05fe83d..785b21f 100644 +--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c ++++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +@@ -29,7 +29,7 @@ + #include "dev-wmac.h" + #include "machtypes.h" + +-#define WDR3500_GPIO_LED_USB1 11 ++#define WDR3500_GPIO_LED_USB 11 + #define WDR3500_GPIO_LED_WLAN2G 13 + #define WDR3500_GPIO_LED_SYSTEM 14 + #define WDR3500_GPIO_LED_QSS 15 +@@ -37,7 +37,7 @@ + #define WDR3500_GPIO_BTN_WPS 16 + #define WDR3500_GPIO_BTN_RFKILL 17 + +-#define WDR3500_GPIO_USB1_POWER 22 ++#define WDR3500_GPIO_USB_POWER 22 + + #define WDR3500_KEYS_POLL_INTERVAL 20 /* msecs */ + #define WDR3500_KEYS_DEBOUNCE_INTERVAL (3 * WDR3500_KEYS_POLL_INTERVAL) +@@ -68,8 +68,8 @@ static struct gpio_led wdr3500_leds_gpio[] __initdata = { + .active_low = 1, + }, + { +- .name = "tp-link:green:usb1", +- .gpio = WDR3500_GPIO_LED_USB1, ++ .name = "tp-link:green:usb", ++ .gpio = WDR3500_GPIO_LED_USB, + .active_low = 1, + }, + { +@@ -142,9 +142,9 @@ static void __init wdr3500_setup(void) + + ath79_register_eth(0); + +- gpio_request_one(WDR3500_GPIO_USB1_POWER, ++ gpio_request_one(WDR3500_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, +- "USB1 power"); ++ "USB power"); + ath79_register_usb(); + } + diff --git a/patches/openwrt/0015-ar71xx-fix-USB-power-GPIO-on-the-TL-WDR3500.patch b/patches/openwrt/0015-ar71xx-fix-USB-power-GPIO-on-the-TL-WDR3500.patch new file mode 100644 index 00000000..e6a90f70 --- /dev/null +++ b/patches/openwrt/0015-ar71xx-fix-USB-power-GPIO-on-the-TL-WDR3500.patch @@ -0,0 +1,21 @@ +From: juhosg +Date: Sun, 24 Mar 2013 19:23:47 +0000 +Subject: ar71xx: fix USB power GPIO on the TL-WDR3500 + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36119 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +index 785b21f..5020ba4 100644 +--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c ++++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +@@ -37,7 +37,7 @@ + #define WDR3500_GPIO_BTN_WPS 16 + #define WDR3500_GPIO_BTN_RFKILL 17 + +-#define WDR3500_GPIO_USB_POWER 22 ++#define WDR3500_GPIO_USB_POWER 12 + + #define WDR3500_KEYS_POLL_INTERVAL 20 /* msecs */ + #define WDR3500_KEYS_DEBOUNCE_INTERVAL (3 * WDR3500_KEYS_POLL_INTERVAL) diff --git a/patches/openwrt/0016-ar71xx-add-default-LED-configuration-for-the-WL-WRD3500.patch b/patches/openwrt/0016-ar71xx-add-default-LED-configuration-for-the-WL-WRD3500.patch new file mode 100644 index 00000000..50b78af1 --- /dev/null +++ b/patches/openwrt/0016-ar71xx-add-default-LED-configuration-for-the-WL-WRD3500.patch @@ -0,0 +1,27 @@ +From: juhosg +Date: Sun, 24 Mar 2013 21:07:21 +0000 +Subject: ar71xx: add default LED configuration for the WL-WRD3500 + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36120 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +Conflicts: + target/linux/ar71xx/base-files/etc/uci-defaults/01_leds + +diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds +index 7be4ce9..48b8154 100755 +--- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds ++++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds +@@ -126,6 +126,11 @@ tl-wa901nd-v2) + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" + ;; + ++tl-wdr3500) ++ ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1" ++ ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:green:wlan2g" "phy0tpt" ++ ;; ++ + tl-wdr4300) + ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1.1" + ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "1-1.2" diff --git a/patches/openwrt/0017-ar71xx-fix-ethernet-LEDs-on-the-TL-WDR3500.patch b/patches/openwrt/0017-ar71xx-fix-ethernet-LEDs-on-the-TL-WDR3500.patch new file mode 100644 index 00000000..8bc06445 --- /dev/null +++ b/patches/openwrt/0017-ar71xx-fix-ethernet-LEDs-on-the-TL-WDR3500.patch @@ -0,0 +1,42 @@ +From: juhosg +Date: Mon, 25 Mar 2013 06:40:03 +0000 +Subject: ar71xx: fix ethernet LEDs on the TL-WDR3500 + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36122 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +index 5020ba4..452c20b 100644 +--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c ++++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr3500.c +@@ -33,6 +33,11 @@ + #define WDR3500_GPIO_LED_WLAN2G 13 + #define WDR3500_GPIO_LED_SYSTEM 14 + #define WDR3500_GPIO_LED_QSS 15 ++#define WDR3500_GPIO_LED_WAN 18 ++#define WDR3500_GPIO_LED_LAN1 19 ++#define WDR3500_GPIO_LED_LAN2 20 ++#define WDR3500_GPIO_LED_LAN3 21 ++#define WDR3500_GPIO_LED_LAN4 22 + + #define WDR3500_GPIO_BTN_WPS 16 + #define WDR3500_GPIO_BTN_RFKILL 17 +@@ -146,6 +151,17 @@ static void __init wdr3500_setup(void) + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + ath79_register_usb(); ++ ++ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN1, ++ AR934X_GPIO_OUT_LED_LINK3); ++ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN2, ++ AR934X_GPIO_OUT_LED_LINK2); ++ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN3, ++ AR934X_GPIO_OUT_LED_LINK1); ++ ath79_gpio_output_select(WDR3500_GPIO_LED_LAN4, ++ AR934X_GPIO_OUT_LED_LINK0); ++ ath79_gpio_output_select(WDR3500_GPIO_LED_WAN, ++ AR934X_GPIO_OUT_LED_LINK4); + } + + MIPS_MACHINE(ATH79_MACH_TL_WDR3500, "TL-WDR3500", diff --git a/patches/openwrt/0018-ar71xx-add-GPIO-output-select-values-for-AR934x.patch b/patches/openwrt/0018-ar71xx-add-GPIO-output-select-values-for-AR934x.patch new file mode 100644 index 00000000..10847ed2 --- /dev/null +++ b/patches/openwrt/0018-ar71xx-add-GPIO-output-select-values-for-AR934x.patch @@ -0,0 +1,38 @@ +From: juhosg +Date: Mon, 25 Mar 2013 06:40:00 +0000 +Subject: ar71xx: add GPIO output select values for AR934x + +Signed-off-by: Gabor Juhos + +git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36121 3c298f89-4303-0410-b956-a3cf2f4a3e73 + +Conflicts: + target/linux/ar71xx/patches-3.8/601-MIPS-ath79-add-more-register-defines.patch + +diff --git a/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch +index 8411d58..12522c1 100644 +--- a/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch ++++ b/target/linux/ar71xx/patches-3.3/601-MIPS-ath79-add-more-register-defines.patch +@@ -166,7 +166,7 @@ + #define AR934X_GPIO_REG_FUNC 0x6c + + #define AR71XX_GPIO_COUNT 16 +-@@ -550,4 +618,139 @@ ++@@ -550,4 +618,144 @@ + #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 + #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7 + +@@ -237,7 +237,12 @@ + +#define AR934X_GPIO_FUNC_CLK_OBS0_EN BIT(2) + +#define AR934X_GPIO_FUNC_JTAG_DISABLE BIT(1) + + +-+#define AR934X_GPIO_OUT_GPIO 0x00 +++#define AR934X_GPIO_OUT_GPIO 0 +++#define AR934X_GPIO_OUT_LED_LINK0 41 +++#define AR934X_GPIO_OUT_LED_LINK1 42 +++#define AR934X_GPIO_OUT_LED_LINK2 43 +++#define AR934X_GPIO_OUT_LED_LINK3 44 +++#define AR934X_GPIO_OUT_LED_LINK4 45 + + + +/* + + * MII_CTRL block