Skip to content

Commit 6bfb305

Browse files
EmreYavuzalphauke
authored andcommitted
mediatek: filogic: TP-Link Archer AX80 v1 (EU) support
Device specification SoC Type: MediaTek MT7986B, Cortex-A53, 64-bit 1.6GHz Quad Core RAM: ESMT M15T4G16256 (512MB) Flash: ESMT F50L1G41LB (128 MB) Ethernet: MediaTek MT7531AE + 2.5GbE MaxLinear GPY211C0VC (SLNW8) Ethernet: 1x2.5Gbe (WAN/LAN 2.5Gbps), 4xGbE (WAN/LAN 1Gbps, LAN1, LAN2, LAN3) WLAN 2g: MediaTek MT7975 WLAN 5g: MediaTek MT7975 LEDs: All White(probably) Buttons: 4 (Reset,ledswitch,wps,wlan), USB ports: 1 (USB 3.0) Power: 12 VDC, 2.0 A Connector: Barrel Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, both UBI slots contain "seconduboot" (also U-Boot 2022.01-rc4) Serial console (UART) V +-------+-------+-------+-------+ | +3.3V | GND | TX | RX | +---+---+-------+-------+-------+ | +--- Don't connect CPU BLOCK HERE LAN PORTS HERE Installation (UART) Note: There might be methods without UART possible soon. Place OpenWrt initramfs image on tftp server with IP 192.168.1.2 Attach UART, switch on the router and interrupt the boot process by pressing 'Ctrl-C' Load and run OpenWrt initramfs image: tftpboot initramfs-kernel.bin bootm !!Attention!! is very important! After entering OpenWrt, please set / update the environment variables: fw_setenv bootargs "ubi.mtd=ubi0 console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 init=/etc/preinit" fw_setenv mtdids "spi-nand0=spi-nand0" fw_setenv mtdparts "spi-nand0:2M(boot),1M(u-boot-env),50M(ubi0),50M(ubi1),8M(userconfig),4M(tp_data),8M(mali_data)" fw_setenv tp_boot_idx 0 Run 'sysupgrade -n' with the sysupgrade OpenWrt image from console or Luci WebUI. Recovery Press Reset button and power on the router Navigate to U-Boot recovery web server (192.168.1.1) and upload the OEM firmware Stock layout 0x000000000000-0x000000200000 : "boot" 0x000000200000-0x000000300000 : "u-boot-env" 0x000000300000-0x000003500000 : "ubi0" 0x000003500000-0x000006700000 : "ubi1" 0x000006700000-0x000006f00000 : "userconfig" 0x000006f00000-0x000007300000 : "tp_data" 0x000007300000-0x000007B00000 : "mali_data" ubi0/ubi1 format U-Boot at boot checks that all volumes are in place: +-------------------------------+ | Volume Name: uboot Vol ID: 0| | Volume Name: kernel Vol ID: 1| | Volume Name: rootfs Vol ID: 2| +-------------------------------+ MAC addresses +---------+-------------------+-----------+ | label | 00:eb:xx:xx:xx:be | label | | LAN | 00:eb:xx:xx:xx:be | label | | WAN | 00:eb:xx:xx:xx:bf | label+1 | | WLAN 2g | 00:eb:xx:xx:xx:be | label | | WLAN 5g | 00:eb:xx:xx:xx:bd | label-1 | +---------+-------------------+-----------+ label MAC address was found in UBI partition "tp_data", file "default-mac". OEM wireless eeprom is also there (file "MT7986_EEPROM.bin"). Signed-off-by: Emre Yavuzalp <[email protected]> Link: openwrt/openwrt#20630 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent b289edd commit 6bfb305

File tree

10 files changed

+362
-2
lines changed

10 files changed

+362
-2
lines changed

package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ teltonika,rutc50)
134134
ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x10000"
135135
;;
136136
tplink,archer-ax80-v1|\
137+
tplink,archer-ax80-v1-eu|\
137138
tplink,be450)
138139
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "8"
139140
;;
Lines changed: 333 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,333 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2+
3+
/dts-v1/;
4+
#include <dt-bindings/gpio/gpio.h>
5+
#include <dt-bindings/input/input.h>
6+
#include <dt-bindings/leds/common.h>
7+
#include <dt-bindings/pinctrl/mt65xx.h>
8+
9+
#include "mt7986b.dtsi"
10+
11+
/ {
12+
compatible = "tplink,archer-ax80-v1-eu", "mediatek,mt7986b";
13+
model = "TP-Link Archer AX80 v1 (EU)";
14+
15+
aliases {
16+
serial0 = &uart0;
17+
led-boot = &led_power;
18+
led-failsafe = &led_power;
19+
led-running = &led_power;
20+
led-upgrade = &led_power;
21+
};
22+
23+
chosen {
24+
stdout-path = "serial0:115200n8";
25+
};
26+
27+
memory@40000000 {
28+
reg = <0 0x40000000 0 0x20000000>;
29+
device_type = "memory";
30+
};
31+
32+
leds {
33+
compatible = "gpio-leds";
34+
35+
led_power: power {
36+
color = <LED_COLOR_ID_WHITE>;
37+
function = LED_FUNCTION_POWER;
38+
gpios = <&pio 15 GPIO_ACTIVE_LOW>;
39+
default-state = "on";
40+
};
41+
42+
wlan2g {
43+
color = <LED_COLOR_ID_WHITE>;
44+
function = LED_FUNCTION_WLAN_2GHZ;
45+
gpios = <&pio 11 GPIO_ACTIVE_HIGH>;
46+
linux,default-trigger = "phy0tpt";
47+
};
48+
49+
wlan5g {
50+
color = <LED_COLOR_ID_WHITE>;
51+
function = LED_FUNCTION_WLAN_5GHZ;
52+
gpios = <&pio 12 GPIO_ACTIVE_LOW>;
53+
linux,default-trigger = "phy1tpt";
54+
};
55+
56+
internet_white {
57+
color = <LED_COLOR_ID_WHITE>;
58+
function = LED_FUNCTION_WAN_ONLINE;
59+
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
60+
};
61+
62+
internet_orange {
63+
color = <LED_COLOR_ID_ORANGE>;
64+
function = LED_FUNCTION_WAN;
65+
gpios = <&pio 19 GPIO_ACTIVE_LOW>;
66+
};
67+
68+
lan {
69+
color = <LED_COLOR_ID_WHITE>;
70+
function = LED_FUNCTION_LAN;
71+
gpios = <&pio 16 GPIO_ACTIVE_HIGH>;
72+
};
73+
74+
usb {
75+
color = <LED_COLOR_ID_WHITE>;
76+
function = LED_FUNCTION_DISK;
77+
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
78+
trigger-sources = <&ssusb>;
79+
linux,default-trigger = "usbport";
80+
};
81+
82+
wps {
83+
color = <LED_COLOR_ID_WHITE>;
84+
function = LED_FUNCTION_WPS;
85+
gpios = <&pio 18 GPIO_ACTIVE_LOW>;
86+
};
87+
};
88+
89+
keys {
90+
compatible = "gpio-keys";
91+
92+
reset {
93+
label = "reset";
94+
linux,code = <KEY_RESTART>;
95+
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
96+
};
97+
98+
wps {
99+
label = "wps";
100+
linux,code = <KEY_WPS_BUTTON>;
101+
gpios = <&pio 14 GPIO_ACTIVE_LOW>;
102+
};
103+
104+
wifi {
105+
label = "wlan";
106+
linux,code = <KEY_WLAN>;
107+
gpios = <&pio 20 GPIO_ACTIVE_LOW>;
108+
};
109+
};
110+
111+
reg_3p3v: regulator-3p3v {
112+
compatible = "regulator-fixed";
113+
regulator-name = "fixed-3.3V";
114+
regulator-min-microvolt = <3300000>;
115+
regulator-max-microvolt = <3300000>;
116+
regulator-boot-on;
117+
regulator-always-on;
118+
};
119+
120+
reg_5v: regulator-5v {
121+
compatible = "regulator-fixed";
122+
regulator-name = "fixed-5V";
123+
regulator-min-microvolt = <5000000>;
124+
regulator-max-microvolt = <5000000>;
125+
regulator-boot-on;
126+
regulator-always-on;
127+
};
128+
};
129+
130+
&auxadc {
131+
status = "okay";
132+
};
133+
134+
&crypto {
135+
status = "okay";
136+
};
137+
138+
&eth {
139+
status = "okay";
140+
141+
gmac0: mac@0 {
142+
compatible = "mediatek,eth-mac";
143+
reg = <0>;
144+
phy-mode = "2500base-x";
145+
fixed-link {
146+
speed = <2500>;
147+
full-duplex;
148+
};
149+
};
150+
151+
mac@1 {
152+
compatible = "mediatek,eth-mac";
153+
reg = <1>;
154+
phy-mode = "2500base-x";
155+
phy-handle = <&phy6>;
156+
};
157+
158+
mdio-bus {
159+
#address-cells = <1>;
160+
#size-cells = <0>;
161+
reset-delay-us = <1500000>;
162+
reset-post-delay-us = <1000000>;
163+
reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
164+
phy6: phy@6 {
165+
compatible = "ethernet-phy-ieee802.3-c45";
166+
reg = <6>;
167+
};
168+
169+
switch@1f {
170+
compatible = "mediatek,mt7531";
171+
reg = <31>;
172+
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
173+
interrupt-controller;
174+
#interrupt-cells = <1>;
175+
interrupt-parent = <&pio>;
176+
interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
177+
178+
ports {
179+
#address-cells = <1>;
180+
#size-cells = <0>;
181+
port@0 {
182+
reg = <1>;
183+
label = "lan0";
184+
};
185+
port@1 {
186+
reg = <2>;
187+
label = "lan1";
188+
};
189+
port@2 {
190+
reg = <3>;
191+
label = "lan2";
192+
};
193+
port@3 {
194+
reg = <4>;
195+
label = "lan3";
196+
};
197+
port@6 {
198+
reg = <6>;
199+
label = "cpu";
200+
ethernet = <&gmac0>;
201+
phy-mode = "2500base-x";
202+
fixed-link {
203+
speed = <2500>;
204+
full-duplex;
205+
};
206+
};
207+
};
208+
};
209+
};
210+
};
211+
212+
&spi0 {
213+
pinctrl-names = "default";
214+
pinctrl-0 = <&spi_flash_pins>;
215+
status = "okay";
216+
217+
flash@0 {
218+
compatible = "spi-nand";
219+
reg = <0>;
220+
spi-max-frequency = <52000000>;
221+
spi-tx-bus-width = <4>;
222+
spi-rx-bus-width = <4>;
223+
spi-cal-enable;
224+
spi-cal-mode = "read-data";
225+
226+
partitions {
227+
compatible = "fixed-partitions";
228+
#address-cells = <1>;
229+
#size-cells = <1>;
230+
231+
partition@0 {
232+
label = "boot";
233+
reg = <0x0 0x200000>;
234+
read-only;
235+
};
236+
237+
partition@200000 {
238+
label = "u-boot-env";
239+
reg = <0x200000 0x100000>;
240+
};
241+
242+
partition@300000 {
243+
label = "ubi0";
244+
reg = <0x300000 0x3200000>;
245+
};
246+
247+
partition@3500000 {
248+
label = "ubi1";
249+
reg = <0x3500000 0x3200000>;
250+
};
251+
252+
partition@6700000 {
253+
label = "userconfig";
254+
reg = <0x6700000 0x800000>;
255+
};
256+
257+
partition@6f00000 {
258+
label = "tp_data";
259+
reg = <0x6f00000 0x400000>;
260+
read-only;
261+
};
262+
263+
partition@7300000 {
264+
label = "mali_data";
265+
reg = <0x7300000 0x800000>;
266+
};
267+
};
268+
};
269+
};
270+
271+
&pio {
272+
spi_flash_pins: spi-flash-pins-33-to-38 {
273+
mux {
274+
function = "spi";
275+
groups = "spi0", "spi0_wp_hold";
276+
};
277+
conf-pu {
278+
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
279+
drive-strength = <MTK_DRIVE_8mA>;
280+
bias-disable; /* bias-disable */
281+
};
282+
conf-pd {
283+
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
284+
drive-strength = <MTK_DRIVE_8mA>;
285+
bias-disable; /* bias-disable */
286+
};
287+
};
288+
289+
wf_2g_5g_pins: wf_2g_5g-pins {
290+
mux {
291+
function = "wifi";
292+
groups = "wf_2g", "wf_5g";
293+
};
294+
conf {
295+
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
296+
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
297+
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
298+
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
299+
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
300+
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
301+
"WF1_TOP_CLK", "WF1_TOP_DATA";
302+
drive-strength = <MTK_DRIVE_4mA>;
303+
};
304+
};
305+
};
306+
307+
&trng {
308+
status = "okay";
309+
};
310+
311+
&uart0 {
312+
status = "okay";
313+
};
314+
315+
&ssusb {
316+
vusb33-supply = <&reg_3p3v>;
317+
vbus-supply = <&reg_5v>;
318+
status = "okay";
319+
};
320+
321+
&usb_phy {
322+
status = "okay";
323+
};
324+
325+
&watchdog {
326+
status = "okay";
327+
};
328+
329+
&wifi {
330+
status = "okay";
331+
pinctrl-names = "default";
332+
pinctrl-0 = <&wf_2g_5g_pins>;
333+
};

target/linux/mediatek/filogic/base-files/etc/board.d/01_leds

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ teltonika,rutc50)
248248
totolink,x6000r)
249249
ucidef_set_led_netdev "wan" "wan" "green:wan" "wan" "link tx rx"
250250
;;
251+
tplink,archer-ax80-v1-eu)
252+
ucidef_set_led_netdev "lan" "LAN" "white:lan" "br-lan" "link tx rx"
253+
;;
251254
tplink,be450)
252255
ucidef_set_led_netdev "br-lan" "lan" "blue:lan" "br-lan" "link tx rx"
253256
ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan-2ghz" "phy0.0-ap0"

target/linux/mediatek/filogic/base-files/etc/board.d/02_network

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ mediatek_setup_interfaces()
173173
wavlink,wl-wn586x3b)
174174
ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
175175
;;
176-
tplink,archer-ax80-v1)
176+
tplink,archer-ax80-v1|\
177+
tplink,archer-ax80-v1-eu)
177178
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" eth1
178179
;;
179180
tplink,be450)
@@ -236,6 +237,7 @@ mediatek_setup_macs()
236237
;;
237238
mercusys,mr90x-v1|\
238239
tplink,archer-ax80-v1|\
240+
tplink,archer-ax80-v1-eu|\
239241
tplink,re6000xd)
240242
label_mac=$(get_mac_binary "/tmp/tp_data/default-mac" 0)
241243
lan_mac=$label_mac

target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ case "$FIRMWARE" in
2222
"mediatek/mt7986_eeprom_mt7975_dual.bin")
2323
case "$board" in
2424
mercusys,mr90x-v1|\
25+
tplink,archer-ax80-v1-eu|\
2526
tplink,re6000xd)
2627
ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
2728
/lib/firmware/$FIRMWARE

target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ case "$board" in
159159
;;
160160
mercusys,mr90x-v1|\
161161
tplink,archer-ax80-v1|\
162+
tplink,archer-ax80-v1-eu|\
162163
tplink,be450|\
163164
tplink,re6000xd)
164165
addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0)

target/linux/mediatek/filogic/base-files/lib/preinit/09_mount_cfg_part

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ preinit_mount_cfg_part() {
1717
mercusys,mr85x|\
1818
mercusys,mr90x-v1|\
1919
tplink,archer-ax80-v1|\
20+
tplink,archer-ax80-v1-eu|\
2021
tplink,be450|\
2122
tplink,re6000xd)
2223
mount_ubi_part "tp_data" "tp_data"

0 commit comments

Comments
 (0)