mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-17 21:03:30 +00:00
ath79: add support for TP-Link TL-WR882N/WR885N/WR886N (#3307)
* ath79: add support for TP-Link TL-WR882N/WR885N/WR886N This adds support for the various clones of the TL-WR885N recently supported ("ath79: add support for TP-Link TL-WR885N v1"): - tplink,tl-wr882n-v1 - tplink,tl-wr882n-v2 - tplink,tl-wr882n-v3 - tplink,tl-wr885n-v1 - tplink,tl-wr885n-v2 - tplink,tl-wr886n-v2 - tplink,tl-wr886n-v3 - tplink,tl-wr886n-v4 - tplink,tl-wr886n-v5 - tplink,tl-wr886n-v6 - tplink,tl-wr886n-v7 These devices are cloned in ar71xx. All models added in this patch are the same hardware CPU WR885n V2 was tested. Specifications: - SOC: Qualcomm Atheros TP9343-AL3A - CPU: 750MHz - Flash: 2 MiB (AH1446 25Q16BS1G E5N102) - RAM: 16 MiB (Zentel A3S28D40JTP-50) - WLAN: Qualcomm Atheros TP9343 450Mbps - Ethernet: Atheros AR8228/AR8229 4 port (100M) 添加TP9343芯片的路由器型号支持,TL-WR882N/WR885N/WR886N系列 * ath79: add support for MerCury MW4530R v1 重新添加水星MW4530R路由器支持
This commit is contained in:
parent
3cd0262cd0
commit
3cde517a11
@ -469,6 +469,12 @@ mc-mac1200r)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt"
|
||||
;;
|
||||
mc-mw4530r)
|
||||
ucidef_set_led_power "power" "POWER" "mercury:green:power" "1"
|
||||
ucidef_set_led_usbdev "usb" "USB" "mercury:green:usb" "1-1"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy1tpt"
|
||||
;;
|
||||
mr12|\
|
||||
mr16)
|
||||
ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
|
||||
@ -896,6 +902,13 @@ tl-wdr4900-v2)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy1tpt"
|
||||
;;
|
||||
tl-wr885n-v1)
|
||||
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
||||
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
||||
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
||||
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
||||
;;
|
||||
tl-wdr6500-v2|\
|
||||
tl-wdr6500-v6|\
|
||||
tl-wr741nd)
|
||||
|
@ -373,6 +373,11 @@ ar71xx_setup_interfaces()
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"
|
||||
;;
|
||||
tl-wr885n-v1)
|
||||
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
||||
;;
|
||||
tl-mr6400)
|
||||
ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
|
||||
ucidef_add_switch "switch0" \
|
||||
@ -620,6 +625,11 @@ ar71xx_setup_macs()
|
||||
fritz300e)
|
||||
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
|
||||
;;
|
||||
mc-mw4530r|\
|
||||
tl-wdr4300)
|
||||
base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
wan_mac=$(macaddr_add "$base_mac" 1)
|
||||
;;
|
||||
tl-wr1043n-v5|\
|
||||
tl-wr1043nd-v4)
|
||||
lan_mac=$(mtd_get_mac_binary product-info 8)
|
||||
|
@ -286,6 +286,9 @@ get_status_led() {
|
||||
mc-mac1200r)
|
||||
status_led="mercury:green:system"
|
||||
;;
|
||||
mc-mw4530r)
|
||||
status_led="mercury:green:system"
|
||||
;;
|
||||
mr18|\
|
||||
z1)
|
||||
status_led="$board:green:tricolor0"
|
||||
@ -490,6 +493,7 @@ get_status_led() {
|
||||
tl-wr842n-v3|\
|
||||
tl-wr880n-v1|\
|
||||
tl-wr881n-v1|\
|
||||
tl-wr885n-v1|\
|
||||
tl-wr941nd|\
|
||||
tl-wr941n-v7|\
|
||||
tl-wr941nd-v5)
|
||||
|
@ -270,6 +270,9 @@ tplink_board_detect() {
|
||||
"094000"*)
|
||||
model="TP-Link TL-WR940N"
|
||||
;;
|
||||
"088500"*)
|
||||
model="TP-Link TL-WR885N"
|
||||
;;
|
||||
"094100"*)
|
||||
model="TP-Link TL-WR941N/ND"
|
||||
|
||||
@ -325,7 +328,7 @@ tplink_board_detect() {
|
||||
model="ANTROUTER-R1"
|
||||
;;
|
||||
"453000"*)
|
||||
model="Mercury MW4530R"
|
||||
model="MerCury MW4530R"
|
||||
;;
|
||||
"49000002")
|
||||
model="TP-Link TL-WDR4900"
|
||||
@ -840,6 +843,9 @@ ar71xx_board_detect() {
|
||||
*"MAC1200R")
|
||||
name="mc-mac1200r"
|
||||
;;
|
||||
*"MW4530R")
|
||||
name="mc-mw4530r"
|
||||
;;
|
||||
*"MiniBox V1.0")
|
||||
name="minibox-v1"
|
||||
;;
|
||||
@ -1385,6 +1391,9 @@ ar71xx_board_detect() {
|
||||
*"TL-WR881N v1")
|
||||
name="tl-wr881n-v1"
|
||||
;;
|
||||
*"TL-WR885N v1")
|
||||
name="tl-wr885n-v1"
|
||||
;;
|
||||
*"TL-WR902AC v1")
|
||||
name="tl-wr902ac-v1"
|
||||
;;
|
||||
|
@ -415,6 +415,7 @@ platform_check_image() {
|
||||
gl-inet|\
|
||||
lan-turtle|\
|
||||
mc-mac1200r|\
|
||||
mc-mw4530r | \
|
||||
minibox-v1|\
|
||||
omy-g1|\
|
||||
omy-x1|\
|
||||
@ -493,6 +494,7 @@ platform_check_image() {
|
||||
tl-wr842n-v3|\
|
||||
tl-wr880n-v1|\
|
||||
tl-wr881n-v1|\
|
||||
tl-wr885n-v1|\
|
||||
tl-wr902ac-v1|\
|
||||
tl-wr940n-v4|\
|
||||
tl-wr940n-v6|\
|
||||
|
@ -144,6 +144,7 @@ CONFIG_ATH79=y
|
||||
# CONFIG_ATH79_MACH_LAN_TURTLE is not set
|
||||
# CONFIG_ATH79_MACH_LIMA is not set
|
||||
# CONFIG_ATH79_MACH_MC_MAC1200R is not set
|
||||
CONFIG_ATH79_MACH_MC_MW4530R=y
|
||||
# CONFIG_ATH79_MACH_MR12 is not set
|
||||
# CONFIG_ATH79_MACH_MR16 is not set
|
||||
# CONFIG_ATH79_MACH_MR1750 is not set
|
||||
@ -240,6 +241,17 @@ CONFIG_ATH79_MACH_TL_WDR6500_V6=y
|
||||
# CONFIG_ATH79_MACH_TL_WR841N_V1 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR841N_V8 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR841N_V9 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR882N_V1 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR882N_V2 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR882N_V3 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR885N_V1 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR885N_V2 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR886N_V2 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR886N_V3 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR886N_V4 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR886N_V5 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR886N_V6 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR886N_V7 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR902AC_V1 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR940N_V4 is not set
|
||||
# CONFIG_ATH79_MACH_TL_WR941ND is not set
|
||||
|
212
target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mw4530r.c
Normal file
212
target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mw4530r.c
Normal file
@ -0,0 +1,212 @@
|
||||
/*
|
||||
* MerCury MW4530R board support
|
||||
*
|
||||
* Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* 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/pci.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/ath9k_platform.h>
|
||||
#include <linux/ar8216_platform.h>
|
||||
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
|
||||
#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 MW4530R_AR9580_LED_WLAN5G 0
|
||||
|
||||
#define MW4530R_GPIO_LED_USB 11
|
||||
#define MW4530R_GPIO_LED_WLAN2G 13
|
||||
#define MW4530R_GPIO_LED_SYSTEM 14
|
||||
#define MW4530R_GPIO_LED_QSS 15
|
||||
|
||||
#define MW4530R_GPIO_BTN_WPS 16
|
||||
#define MW4530R_GPIO_BTN_RESET 17
|
||||
|
||||
#define MW4530R_GPIO_EXTERNAL_LNA0 18
|
||||
#define MW4530R_GPIO_EXTERNAL_LNA1 19
|
||||
|
||||
#define MW4530R_GPIO_USB_POWER 22
|
||||
|
||||
#define MW4530R_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
#define MW4530R_KEYS_DEBOUNCE_INTERVAL (3 * MW4530R_KEYS_POLL_INTERVAL)
|
||||
|
||||
#define MW4530R_MAC0_OFFSET 0
|
||||
#define MW4530R_MAC1_OFFSET 6
|
||||
#define MW4530R_WMAC_CALDATA_OFFSET 0x1000
|
||||
#define MW4530R_PCIE_CALDATA_OFFSET 0x5000
|
||||
|
||||
static const char *mw4530r_part_probes[] = {
|
||||
"tp-link",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct flash_platform_data mw4530r_flash_data = {
|
||||
.part_probes = mw4530r_part_probes,
|
||||
};
|
||||
|
||||
static struct gpio_led mw4530r_leds_gpio[] __initdata = {
|
||||
{
|
||||
.name = "mercury:green:qss",
|
||||
.gpio = MW4530R_GPIO_LED_QSS,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "mercury:green:system",
|
||||
.gpio = MW4530R_GPIO_LED_SYSTEM,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "mercury:green:usb",
|
||||
.gpio = MW4530R_GPIO_LED_USB,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "mercury:green:wlan2g",
|
||||
.gpio = MW4530R_GPIO_LED_WLAN2G,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led ar9580_leds_gpio[] = {
|
||||
{
|
||||
.name = "mercury:green:wlan5g",
|
||||
.gpio = MW4530R_AR9580_LED_WLAN5G,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
static struct gpio_keys_button mw4530r_gpio_keys[] __initdata = {
|
||||
{
|
||||
.desc = "QSS button",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_WPS_BUTTON,
|
||||
.debounce_interval = MW4530R_KEYS_DEBOUNCE_INTERVAL,
|
||||
.gpio = MW4530R_GPIO_BTN_WPS,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.desc = "RESET button",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_RESTART,
|
||||
.debounce_interval = MW4530R_KEYS_DEBOUNCE_INTERVAL,
|
||||
.gpio = MW4530R_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct ar8327_led_info mw4530r_leds_ar8327[] __initconst = {
|
||||
AR8327_LED_INFO(PHY0_0, HW, "tp-link:green:wan"),
|
||||
AR8327_LED_INFO(PHY1_0, HW, "tp-link:green:lan1"),
|
||||
AR8327_LED_INFO(PHY2_0, HW, "tp-link:green:lan2"),
|
||||
AR8327_LED_INFO(PHY3_0, HW, "tp-link:green:lan3"),
|
||||
AR8327_LED_INFO(PHY4_0, HW, "tp-link:green:lan4"),
|
||||
};
|
||||
static struct ar8327_pad_cfg mw4530r_ar8327_pad0_cfg = {
|
||||
.mode = AR8327_PAD_MAC_RGMII,
|
||||
.txclk_delay_en = true,
|
||||
.rxclk_delay_en = true,
|
||||
.txclk_delay_sel = AR8327_CLK_DELAY_SEL1,
|
||||
.rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
|
||||
};
|
||||
|
||||
static struct ar8327_led_cfg mw4530r_ar8327_led_cfg = {
|
||||
.led_ctrl0 = 0xc737c737,
|
||||
.led_ctrl1 = 0x00000000,
|
||||
.led_ctrl2 = 0x00000000,
|
||||
.led_ctrl3 = 0x0030c300,
|
||||
.open_drain = false,
|
||||
};
|
||||
|
||||
static struct ar8327_platform_data mw4530r_ar8327_data = {
|
||||
.pad0_cfg = &mw4530r_ar8327_pad0_cfg,
|
||||
.port0_cfg = {
|
||||
.force_link = 1,
|
||||
.speed = AR8327_PORT_SPEED_1000,
|
||||
.duplex = 1,
|
||||
.txpause = 1,
|
||||
.rxpause = 1,
|
||||
},
|
||||
.led_cfg = &mw4530r_ar8327_led_cfg,
|
||||
.num_leds = ARRAY_SIZE(mw4530r_leds_ar8327),
|
||||
.leds = mw4530r_leds_ar8327,
|
||||
};
|
||||
|
||||
static struct mdio_board_info mw4530r_mdio0_info[] = {
|
||||
{
|
||||
.bus_id = "ag71xx-mdio.0",
|
||||
.phy_addr = 0,
|
||||
.platform_data = &mw4530r_ar8327_data,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init mw4530r_setup(void)
|
||||
{
|
||||
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
|
||||
u8 tmpmac[ETH_ALEN];
|
||||
|
||||
ath79_register_m25p80(&mw4530r_flash_data);
|
||||
ath79_register_leds_gpio(-1, ARRAY_SIZE(mw4530r_leds_gpio),
|
||||
mw4530r_leds_gpio);
|
||||
ath79_register_gpio_keys_polled(-1, MW4530R_KEYS_POLL_INTERVAL,
|
||||
ARRAY_SIZE(mw4530r_gpio_keys),
|
||||
mw4530r_gpio_keys);
|
||||
|
||||
ath79_wmac_set_ext_lna_gpio(0, MW4530R_GPIO_EXTERNAL_LNA0);
|
||||
ath79_wmac_set_ext_lna_gpio(1, MW4530R_GPIO_EXTERNAL_LNA1);
|
||||
|
||||
ath79_init_mac(tmpmac, mac, -1);
|
||||
|
||||
ath79_register_wmac(art + MW4530R_WMAC_CALDATA_OFFSET, tmpmac);
|
||||
|
||||
ath79_init_mac(tmpmac, mac, 0);
|
||||
|
||||
ap91_pci_init(art + MW4530R_PCIE_CALDATA_OFFSET, tmpmac);
|
||||
|
||||
ap9x_pci_setup_wmac_leds(0, ar9580_leds_gpio,
|
||||
ARRAY_SIZE(ar9580_leds_gpio));
|
||||
|
||||
ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
|
||||
|
||||
mdiobus_register_board_info(mw4530r_mdio0_info,
|
||||
ARRAY_SIZE(mw4530r_mdio0_info));
|
||||
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
|
||||
|
||||
/* GMAC0 is connected to an AR8327N switch */
|
||||
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
|
||||
ath79_eth0_data.phy_mask = BIT(0);
|
||||
ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
|
||||
ath79_eth0_pll_data.pll_1000 = 0x06000000;
|
||||
ath79_register_eth(0);
|
||||
|
||||
gpio_request_one(MW4530R_GPIO_USB_POWER,
|
||||
GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
|
||||
"USB power");
|
||||
ath79_register_usb();
|
||||
}
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_MC_MW4530R, "MC-MW4530R",
|
||||
"MerCury MW4530R",
|
||||
mw4530r_setup);
|
128
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr885n-v1.c
Normal file
128
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr885n-v1.c
Normal file
@ -0,0 +1,128 @@
|
||||
/*
|
||||
* TP-LINK TL-WR885N TP9343 board support
|
||||
*
|
||||
* Copyright (C) 2020 haxc
|
||||
*
|
||||
* 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/gpio.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-ath79/ath79.h>
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "dev-eth.h"
|
||||
#include "dev-gpio-buttons.h"
|
||||
#include "dev-leds-gpio.h"
|
||||
#include "dev-m25p80.h"
|
||||
#include "dev-wmac.h"
|
||||
#include "machtypes.h"
|
||||
|
||||
|
||||
#define TL_WR885N_V1_GPIO_LED_WAN 2
|
||||
#define TL_WR885N_V1_GPIO_LED_LAN1 4
|
||||
#define TL_WR885N_V1_GPIO_LED_LAN2 5
|
||||
#define TL_WR885N_V1_GPIO_LED_LAN3 6
|
||||
#define TL_WR885N_V1_GPIO_LED_LAN4 7
|
||||
#define TL_WR885N_V1_GPIO_LED_SYSTEM 8
|
||||
|
||||
#define TL_WR885N_V1_GPIO_BTN_RESET 1
|
||||
|
||||
#define TL_WR885N_KEYS_POLL_INTERVAL 20
|
||||
#define TL_WR885N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR885N_KEYS_POLL_INTERVAL)
|
||||
|
||||
|
||||
static struct gpio_led tl_wr885n_v1_leds_gpio[] __initdata = {
|
||||
|
||||
{
|
||||
.name = "tp-link:green:wan",
|
||||
.gpio = TL_WR885N_V1_GPIO_LED_WAN,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "tp-link:green:lan1",
|
||||
.gpio = TL_WR885N_V1_GPIO_LED_LAN1,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "tp-link:green:lan2",
|
||||
.gpio = TL_WR885N_V1_GPIO_LED_LAN2,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "tp-link:green:lan3",
|
||||
.gpio = TL_WR885N_V1_GPIO_LED_LAN3,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "tp-link:green:lan4",
|
||||
.gpio = TL_WR885N_V1_GPIO_LED_LAN4,
|
||||
.active_low = 1,
|
||||
},
|
||||
{
|
||||
.name = "tp-link:green:system",
|
||||
.gpio = TL_WR885N_V1_GPIO_LED_SYSTEM,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_button tl_wr885n_v1_gpio_keys[] __initdata = {
|
||||
{
|
||||
.desc = "Reset button",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_RESTART,
|
||||
.debounce_interval = TL_WR885N_KEYS_DEBOUNCE_INTERVAL,
|
||||
.gpio = TL_WR885N_V1_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static const char *tl_wr885n_part_probes[] = {
|
||||
"tp-link",
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct flash_platform_data tl_wr885n_flash_data = {
|
||||
.part_probes = tl_wr885n_part_probes,
|
||||
};
|
||||
|
||||
|
||||
static void __init tl_wr885n_setup(void)
|
||||
{
|
||||
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
|
||||
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
|
||||
|
||||
ath79_register_m25p80(&tl_wr885n_flash_data);
|
||||
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
|
||||
ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
|
||||
|
||||
ath79_switch_data.phy4_mii_en = 1;
|
||||
|
||||
ath79_register_eth(0);
|
||||
ath79_register_eth(1);
|
||||
|
||||
ath79_register_wmac(ee, mac);
|
||||
|
||||
}
|
||||
|
||||
static void __init tl_wr885n_v1_setup(void)
|
||||
{
|
||||
tl_wr885n_setup();
|
||||
|
||||
ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr885n_v1_leds_gpio),
|
||||
tl_wr885n_v1_leds_gpio);
|
||||
|
||||
ath79_register_gpio_keys_polled(-1, TL_WR885N_KEYS_POLL_INTERVAL,
|
||||
ARRAY_SIZE(tl_wr885n_v1_gpio_keys),
|
||||
tl_wr885n_v1_gpio_keys);
|
||||
}
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_TL_WR885N_V1, "TL-WR885N-v1", "TP-LINK TL-WR885N v1",
|
||||
tl_wr885n_v1_setup);
|
@ -888,6 +888,16 @@ define Device/mc-mac1200r
|
||||
endef
|
||||
TARGET_DEVICES += mc-mac1200r
|
||||
|
||||
define Device/mc-mw4530r
|
||||
$(Device/tplink-16mlzma)
|
||||
DEVICE_TITLE := MerCury MW4530R
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
BOARDNAME := MC-MW4530R
|
||||
DEVICE_PROFILE := MW4530R
|
||||
TPLINK_HWID := 0x45300001
|
||||
endef
|
||||
TARGET_DEVICES += mc-mw4530r
|
||||
|
||||
define Device/minibox-v1
|
||||
$(Device/tplink-16mlzma)
|
||||
DEVICE_TITLE := GainStrong MiniBox V1.0
|
||||
|
@ -641,6 +641,63 @@ define Device/tl-wr881n-v1
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr881n-v1
|
||||
|
||||
define Device/tl-wr882n-v1
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR882N v1
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr882n-v1
|
||||
|
||||
define Device/tl-wr882n-v2
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR882N v2
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr882n-v2
|
||||
|
||||
define Device/tl-wr882n-v3
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR882N v3
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr882n-v3
|
||||
|
||||
define Device/tl-wr885n-v1
|
||||
$(Device/tplink-8mlzma)
|
||||
DEVICE_TITLE := TP-LINK TL-WR885N v1
|
||||
BOARDNAME := TL-WR885N-v1
|
||||
DEVICE_PROFILE := TLWR885
|
||||
TPLINK_HWID := 0x08850001
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr885n-v1
|
||||
|
||||
define Device/tl-wr885n-v2
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR885N v2
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr885n-v2
|
||||
|
||||
define Device/tl-wr886n-v2
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR886N v2
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr886n-v2
|
||||
|
||||
define Device/tl-wr886n-v3
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR886N v3
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr886n-v3
|
||||
|
||||
define Device/tl-wr886n-v5
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR886N v5
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr886n-v5
|
||||
|
||||
define Device/tl-wr886n-v7
|
||||
$(Device/tl-wr885n-v1)
|
||||
DEVICE_TITLE := TP-LINK TL-WR886N v7
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr886n-v7
|
||||
|
||||
define Device/tl-wr940n-v4
|
||||
$(Device/tplink-8mlzma)
|
||||
DEVICE_TITLE := TP-LINK TL-WR940N v4
|
||||
|
42
target/linux/ar71xx/patches-4.9/960-mw4530r-support.patch
Normal file
42
target/linux/ar71xx/patches-4.9/960-mw4530r-support.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
@@ -154,6 +154,7 @@
|
||||
ATH79_MACH_LAN_TURTLE, /* Hak5 LAN Turtle */
|
||||
ATH79_MACH_LIMA, /* 8devices Lima */
|
||||
ATH79_MACH_MC_MAC1200R, /* MERCURY MAC1200R */
|
||||
+ ATH79_MACH_MC_MW4530R, /* MerCury MW4530R */
|
||||
ATH79_MACH_MR12, /* Cisco Meraki MR12 */
|
||||
ATH79_MACH_MR16, /* Cisco Meraki MR16 */
|
||||
ATH79_MACH_MR1750, /* OpenMesh MR1750 */
|
||||
===================================================================
|
||||
--- a/arch/mips/ath79/Makefile
|
||||
+++ b/arch/mips/ath79/Makefile
|
||||
@@ -154,6 +154,7 @@
|
||||
obj-$(CONFIG_ATH79_MACH_LAN_TURTLE) += mach-lan-turtle.o
|
||||
obj-$(CONFIG_ATH79_MACH_LIMA) += mach-lima.o
|
||||
obj-$(CONFIG_ATH79_MACH_MC_MAC1200R) += mach-mc-mac1200r.o
|
||||
+obj-$(CONFIG_ATH79_MACH_MC_MW4530R) += mach-mc-mw4530r.o
|
||||
obj-$(CONFIG_ATH79_MACH_MR12) += mach-mr12.o
|
||||
obj-$(CONFIG_ATH79_MACH_MR16) += mach-mr16.o
|
||||
obj-$(CONFIG_ATH79_MACH_MR1750) += mach-mr1750.o
|
||||
===================================================================
|
||||
--- a/arch/mips/ath79/Kconfig.openwrt
|
||||
+++ b/arch/mips/ath79/Kconfig.openwrt
|
||||
@@ -1126,6 +1126,17 @@
|
||||
select ATH79_DEV_M25P80
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
+config ATH79_MACH_MC_MW4530R
|
||||
+ bool "MerCury MW4530R 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_RB4XX
|
||||
bool "MikroTik RouterBOARD 4xx series support"
|
||||
select SOC_AR71XX
|
@ -0,0 +1,40 @@
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
@@ -312,6 +312,7 @@
|
||||
ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */
|
||||
ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
|
||||
ATH79_MACH_TL_WR842N_V3, /* TP-LINK TL-WR842N/ND v3 */
|
||||
+ ATH79_MACH_TL_WR885N_V1, /* TP-LINK TL-WR885N/ND v1 */
|
||||
ATH79_MACH_TL_WR902AC_V1, /* TP-LINK TL-WR902AC v1 */
|
||||
ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
|
||||
ATH79_MACH_TL_WR941ND_V5, /* TP-LINK TL-WR941ND v5 */
|
||||
===================================================================
|
||||
--- a/arch/mips/ath79/Makefile
|
||||
+++ b/arch/mips/ath79/Makefile
|
||||
@@ -251,6 +251,7 @@
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR841N_V1) += mach-tl-wr841n.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR841N_V8) += mach-tl-wr841n-v8.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR841N_V9) += mach-tl-wr841n-v9.o
|
||||
+obj-$(CONFIG_ATH79_MACH_TL_WR885N_V1) += mach-tl-wr885n-v1.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR902AC_V1) += mach-tl-wr902ac-v1.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR941ND) += mach-tl-wr941nd.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR941ND_V6) += mach-tl-wr941nd-v6.o
|
||||
===================================================================
|
||||
--- a/arch/mips/ath79/Kconfig.openwrt
|
||||
+++ b/arch/mips/ath79/Kconfig.openwrt
|
||||
@@ -2019,6 +2019,15 @@
|
||||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
+config ATH79_MACH_TL_WR885N_V1
|
||||
+ bool "TP-LINK TL-WR882N / TL-WR885N / TL-WR886N support"
|
||||
+ select SOC_QCA956X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
config ATH79_MACH_TL_WR902AC_V1
|
||||
bool "TP-LINK TL-WR902AC v1 support"
|
||||
select SOC_QCA953X
|
@ -47,6 +47,7 @@ CONFIG_ATH79_MACH_TL_WR841N_V8=y
|
||||
CONFIG_ATH79_MACH_TL_WR841N_V9=y
|
||||
CONFIG_ATH79_MACH_TL_WR880N_V1=y
|
||||
CONFIG_ATH79_MACH_TL_WR881N_V1=y
|
||||
CONFIG_ATH79_MACH_TL_WR885N_V1=y
|
||||
CONFIG_ATH79_MACH_TL_WR940N_V4=y
|
||||
CONFIG_ATH79_MACH_TL_WR941ND=y
|
||||
CONFIG_ATH79_MACH_TL_WR941ND_V6=y
|
||||
|
Loading…
Reference in New Issue
Block a user