This device is an LTE router supported in ar71xx. As per original commit, hardware specifications (v1.0 EU): - SoC: QCA9531 - Flash: Winbond W25Q64FV (8MiB) - RAM: EtronTech EM6AB160TSE-5G (64MiB) - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna) - Ethernet: 2NIC (3x100M + 1x100M) - WWAN: TP-LINK LTE MODULE (2x external detachable antenna) - Power: DC 12V 1A
Flashing instructions: You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin on 192.168.0.66/24, connect to any ethernet port and power on device while holding the reset button). Flashing via OEM web interface does not work. Working: - Wi-Fi - TP-Link LTE module does it's thing (but see Notes) - reset/rfkill keys Untested: - recovery via factory - leds (I promise I'll test untested items as well in final version.) Issues: switch configuration currently broken (port 2 on device is seen as port 3, port 3 as port 2). Note: as it happened occasionally in ar71xx, during bursty flash activity, LTE module init will fail, with USB enumeration errors. V1->V2: - addressed most comments, except for SUPPORTED_DEVICES Signed-off-by: Enrico Mioso <[email protected]> CC: Filip Moc <[email protected]> CC: Piotr Dymacz <[email protected]> --- { This version is not meant to be definite nor merged. I'll be laving tomorrow, and will be back sunday, so I wanted to post this version so in case you have visibility over last changes. Thanks! Enrico } .../ath79/base-files/etc/board.d/01_leds | 5 + .../ath79/base-files/etc/board.d/02_network | 5 + .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 172 ++++++++++++++++++ target/linux/ath79/image/generic-tp-link.mk | 10 + 4 files changed, 192 insertions(+) create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 778316e450..385ac8d9ca 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -130,6 +130,11 @@ tplink,archer-c7-v5) ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x20" ;; +tplink,tl-mr6400-v1) + ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0" + ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1" + ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0" + ;; tplink,archer-c2-v3|\ tplink,tl-wr1043nd-v4|\ tplink,tl-wr1043n-v5) diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 5b47af8ef7..2b0e1ce400 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -56,6 +56,11 @@ ath79_setup_interfaces() winchannel,wb2000) ucidef_set_interface_lan "eth0" ;; + tplink,tl-mr6400-v1) + ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0" + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan" "2:lan" "3:lan" + ;; avm,fritz4020|\ pcs,cr3000|\ tplink,archer-c58-v1|\ diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts new file mode 100644 index 0000000000..a2c006f05e --- /dev/null +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +#include "qca953x.dtsi" + +/ { + compatible = "tplink,tl-mr6400-v1", "qca,qca9531"; + model = "TP-Link TL-MR6400 v1"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + /* D12 */ + wan { + label = "tp-link:white:wan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + /* D11 */ + 4g { + label = "tp-link:white:4g"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + + /* D5 */ + wps { + label = "tp-link:white:wps"; + gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + }; + + /* D3 */ + wlan { + label = "tp-link:white:wlan"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + /* D2 */ + led_power: power { + label = "tp-link:white:power"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + /* D4 */ + lan { + label = "tp-link:white:lan"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + /* SW2 */ + reset { + label = "Reset button"; + linux,code = <KEY_RESTART>; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + /* SW3 */ + rfkill { + label = "RFKill button"; + linux,code = <KEY_RFKILL>; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + compatible = "tplink,firmware"; + label = "firmware"; + reg = <0x020000 0x7d0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +ð0 { + status = "okay"; + phy-mode = "mii"; + phy-handle = <&swphy0>; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + switch-phy-addr-swap = <1>; + }; +}; + +ð1 { + status = "okay"; + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&uboot 0x1fc00>; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&gpio { + lte_power { + gpio-hog; + gpios = <4 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "tp-link:power:LTE"; + }; +}; diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 5519e9c960..78d7810f29 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -393,6 +393,16 @@ define Device/tplink_tl-wr810n-v1 endef TARGET_DEVICES += tplink_tl-wr810n-v1 +define Device/tplink_tl-mr6400-v1 + $(Device/tplink-8mlzma) + ATH_SOC := qca9531 + DEVICE_MODEL := TL-MR6400 + DEVICE_VARIANT := v1 + TPLINK_HWID := 0x64000001 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb +endef +TARGET_DEVICES += tplink_tl-mr6400-v1 + define Device/tplink_tl-wr810n-v2 $(Device/tplink-8mlzma) ATH_SOC := qca9533 -- 2.23.0 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
