Support for TP-LINK Archer D2 Ver 1.0

Hi! I have this model and access to a serial console, tftp doesn't work apparently.
Here's the uboot log with the cpu and mtd partitions info, any tips and/or pointers to where I should start to try to port this? @robimarko thoughts?

Thanks for reading!

ROM VER: 1.1.0
CFG 05
 
ROM VER: 1.1.0
CFG 05
 
DDR autotuning Rev 1.0
DDR size from 0xa0000000 - 0xa3ffffff
DDR check ok... start booting...
 
 
 
U-Boot 2010.06-svn14778-LANTIQ-v-2.2.67 (Jan 15 2016 - 15:05:13)
 
CLOCK CPU 500M RAM 250M
16 Bit RAM
DRAM:  64 MiB
Using default environment
 
In:    serial
Out:   serial
Err:   serial
Net:   internal phy using 25Mhz clock
Internal phy firmware version: 0x8435
ar10 Switch0 KiB W25Q128 at 0:0 is now current device
MAC: ec-08-6b-a7-56-77  
 
 
Type "run flash_nfs" to mount root filesystem over NFS
 
Hit any key to stop autoboot:  0
0 KiB W25Q128 at 0:0 is now current device
    Uncompressing ...
Starting kernel ...
 
Lantiq xDSL CPE AR10
mips_hpt_frequency = 250000000, counter_resolution = 2
Linux version 2.6.32.42 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #4 Mon Jan 18 10:32:23 HKT 2016
phym = 04000000, mem = 03f00000, max_pfn = 00003f00
Reserving memory for CP1 @0xa3f00000, size 0x00100000
CPU revision is: 00019556 (MIPS 34Kc)
Determined physical RAM map:
AR10 mem final size = 65011712
User-defined physical RAM map:
 memory: 03e00000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00003e00
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00003e00
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 15748
Kernel command line: root=/dev/mtdblock2 rw rootfstype=squashfs ip=192.168.1.1:192.168.1.100::::eth0:on console=ttyS0,115200    ethaddr=AC:9A:96:F0:28:39 phym=64M mem=63M wlanm=62M panic=1    mtdparts=ifx_sflash:128k(boot),1280k(kernel),14656k(rootfs),64k(radioDECT),64k(config),64k(romfile),64k(rom),64k(radio)     -(res)  init=/sbin/init ethwan=
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=000602a0
Readback ErrCtl register=000602a0
Memory: 58584k/63488k available (2841k kernel code, 4828k reserved, 692k data, 184k init, 0k highmem)
Hierarchical RCU implementation.
NR_IRQS:185
Lantiq ICU driver, version 3.0.1, (c) 2001-2011 Lantiq Deutschland GmbH
console [ttyS0] enabled
Calibrating delay loop... 332.59 BogoMIPS (lpj=1662976)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
!!!!!!! WAVE400 system registeration on AHB
MTLK_MEM_BAR0_START is 3e00000
MTLK_MEM_BAR0_END is 3efffff
MTLK_MEM_BAR1_START is 1a000000
MTLK_MEM_BAR1_END is 1a7fffff
MTLK_WIRELESS_IRQ_IN_INDEX is 18
Lantiq PCIe Root Complex driver, version 1.9.1, (c) 2001-2011 Lantiq Deutschland GmbH
bio: create slab <bio-0> at 0
ifx_pcie_rc_class_early_fixup port 0: fixed pcie host bridge to pci-pci bridge
pci 0000:00:00.0: PME# supported from D0 D3hot
pci 0000:00:00.0: PME# disabled
pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
pci 0000:01:00.0: PME# disabled
pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
pci 0000:01:00.1: PME# disabled
pci 0000:00:00.0: PCI bridge, secondary bus 0000:01
pci 0000:00:00.0:   IO window: disabled
pci 0000:00:00.0:   MEM window: 0x1c000000-0x1c1fffff
pci 0000:00:00.0:   PREFETCH window: disabled
NET: Registered protocol family 8
NET: Registered protocol family 20
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
gptu: totally 6 16-bit timers/counters
gptu: misc_register on minor 63
gptu: succeeded to request irq 118
gptu: succeeded to request irq 119
gptu: succeeded to request irq 120
gptu: succeeded to request irq 121
gptu: succeeded to request irq 122
gptu: succeeded to request irq 123
IFX DMA driver, version ifxmips_dma_core.c:v1.1.5
,(c)2009 Infineon Technologies AG
Lantiq CGU driver, version 1.1.38, (c) 2001-2011 Lantiq Deutschland GmbH
vpe1_mem = 0
Wired TLB entries for Linux read_c0_wired() = 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
fuse init (API version 7.13)
msgmni has been set to 114
DMA Referenced PAGE_SIZE = 4096
Infineon Technologies DEU driver version 2.0.0
Lantiq Technologies DEU Driver version 2.0.0
IFX DEU DES initialized (multiblock) (DMA).
Lantiq Technologies DEU Driver version 2.0.0
IFX DEU AES initialized (multiblock) (DMA).
Infineon Technologies DEU driver version 2.0.0
IFX DEU ARC4 initialized (multiblock) (DMA).
Infineon Technologies DEU driver version 2.0.0
IFX DEU SHA1 initialized (DMA).
Infineon Technologies DEU driver version 2.0.0
IFX DEU MD5 initialized (DMA).
Infineon Technologies DEU driver version 2.0.0
IFX DEU SHA1_HMAC initialized (DMA).
Infineon Technologies DEU driver version 2.0.0
IFX DEU MD5_HMAC initialized (DMA).
DEU driver initialization complete!
io scheduler noop registered (default)
ifx_pmu_init: Major 252
Lantiq PMU driver, version 1.2.6, (c) 2001-2011 Lantiq Deutschland GmbH
Lantiq GPIO driver, version 1.3.2, (c) 2001-2011 Lantiq Deutschland GmbH
Infineon Technologies RCU driver version 1.1.1
Lantiq LED Controller driver, version 1.1.3, (c) 2001-2011 Lantiq Deutschland GmbH
Lantiq MEI driver version: 5.07.02
ttyS0 at MMIO 0xbe100c00 (irq = 105) is a IFX_ASC
Register ASC (UART) to PMCU.
Lantiq ASC (UART) driver, version 1.0.14, (c) 2001-2011 Lantiq Deutschland GmbH
brd: module loaded
loop: module loaded
Lantiq SSC driver, version 2.4.2, (c) 2001-2011 Lantiq Deutschland GmbH
Register flash device:flash0
SPI Device: W25Q128 0xEF (Winbond) 0x40 0x18
Parameters: num sectors = 256, sector size = 65536, write size = 256
8 cmdlinepart partitions found on MTD device ifx_sflash
Creating 8 MTD partitions on "ifx_sflash":
0x000000000000-0x000000020000 : "boot"
0x000000020000-0x000000160000 : "kernel"
0x000000160000-0x000000fb0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
0x000000fb0000-0x000000fc0000 : "radioDECT"
0x000000fc0000-0x000000fd0000 : "config"
0x000000fd0000-0x000000fe0000 : "romfile"
0x000000fe0000-0x000000ff0000 : "rom"
0x000000ff0000-0x000001000000 : "radio"
Lantiq SPI flash driver, version 1.2.4, (c) 2001-2011 Lantiq Deutschland GmbH
ifxmips_gpio: Pin ID 15 (port 0, pin 15) has been reserved by module SFLASH from kernel module!
ifx_dataflash_init status error 0
PPP generic driver version 2.4.2
NET: Registered protocol family 24
IFX SWITCH API, Version 1.2.5
SWAPI: Registered character device [switch_api] with major no [81]
Switch API: PCE MicroCode loaded !!
Init IFX_ETHSW_Switch_API_procModule successfully.
GPHY FW load for ARX300 !!
Registered led device: USB_VBUS1
Registered led device: COSIC_reset
Registered led device: broadband_led
Registered led device: internet_led
Registered led device: ledc_8
Registered led device: ledc_9
Registered led device: ledc_10
Registered led device: rst_to_default
Registered led device: wps_button
Registered led device: wlan0:green
Registered led device: pcie1_led
Registered led device: pcie2_led
Registered led device: fxs2_led
Registered led device: voip_led
Registered led device: ledc_19
Registered led device: dect_led
Registered led device: wps:green
Registered led device: error_led
Lantiq LED driver, version 1.1.4, (c) 2001-2011 Lantiq Deutschland GmbH
Mirror/redirect action on
u32 classifier
    Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (916 buckets, 10000 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
Ebtables v2.0 registered
NET: Registered protocol family 8
atmpvc_init() failed with -17
KOAM is loaded successfully.
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 184k freed
starting pid 210, tty '': '/etc/init.d/rcS'
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
IFXUSB: ifxusb_hcd: version 3.2 B130116
IFXUSB: USB core #0 soft-reset
IFXUSB: USB core #0 soft-reset
ifxusb_hcd ifxusb_hcd: IFX USB Controller
ifxusb_hcd ifxusb_hcd: new USB bus registered, assigned bus number 1
ifxusb_hcd ifxusb_hcd: irq 54, io mem 0xbe101000
IFXUSB: Init: Power Port (0)
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
IFXUSB: USB core #1 soft-reset
IFXUSB: USB core #1 soft-reset
ifxusb_hcd ifxusb_hcd: IFX USB Controller
ifxusb_hcd ifxusb_hcd: new USB bus registered, assigned bus number 2
ifxusb_hcd ifxusb_hcd: irq 83, io mem 0xbe106000
IFXUSB: Init: Power Port (0)
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
dns_init
domain_name:tplinkmodem.net
PPPoL2TP kernel driver, V1.0
GPHY FIRMWARE LOAD SUCCESSFULLY AT ADDR (GE MODE) : 803d4000
IFX GPHY driver GE Mode, version ifxmips_xrx_gphy: V1.1.1 - Firmware: 8435
 
Please press Enter to activate this console. [ dm_readFile ] 2042:  can not open xml file /var/tmp/pc/reduced_data_model.xml!, about to open file /etc/reduced_data_model.xml
[ dm_loadCfg ] 2258:  software version is not match, in config, version = 0
[ dm_readFile ] 2042:  can not open xml file /var/tmp/pc/default_config.xml!, about to open file /etc/default_config.xml
****************************************cut 
~ # cat /proc/meminfo
MemTotal:          58844 kB
MemFree:           23248 kB
Buffers:             808 kB
Cached:             6228 kB
SwapCached:            0 kB
Active:             7004 kB
Inactive:           5160 kB
Active(anon):       5128 kB
Inactive(anon):        0 kB
Active(file):       1876 kB
Inactive(file):     5160 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          5144 kB
Mapped:             4528 kB
Shmem:                 0 kB
Slab:              16116 kB
SReclaimable:        552 kB
SUnreclaim:        15564 kB
KernelStack:         760 kB
PageTables:          568 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       55900 kB
Committed_AS:      11472 kB
VmallocTotal:    1048372 kB
VmallocUsed:        1852 kB
VmallocChunk:    1027660 kB
 
 
~ # cat /proc/cpuinfo
system type     : AR10
processor       : 0
cpu model       : MIPS 34Kc V5.6
BogoMIPS        : 332.59
wait instruction    : yes
microsecond timers  : yes
tlb_entries     : 16
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ff8]
ASEs implemented    : mips16 dsp mt
shadow register sets    : 1
core            : 0
VCED exceptions     : not available
VCEI exceptions     : not available
 
 
~ # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "boot"
mtd1: 00140000 00010000 "kernel"
mtd2: 00e50000 00010000 "rootfs"
mtd3: 00010000 00010000 "radioDECT"
mtd4: 00010000 00010000 "config"
mtd5: 00010000 00010000 "romfile"
mtd6: 00010000 00010000 "rom"
mtd7: 00010000 00010000 "radio"
 
~ # cat /proc/partitions
major minor  #blocks  name
 
  31        0        128 mtdblock0
  31        1       1280 mtdblock1
  31        2      14656 mtdblock2
  31        3         64 mtdblock3
  31        4         64 mtdblock4
  31        5         64 mtdblock5
  31        6         64 mtdblock6
  31        7         64 mtdblock7

Full log: https://pastebin.com/drMwftQ9

Looks supportable since its Lantiq with 16MB of flash and 64MB of RAM.
Altough I never worked on a lantiq based device

Thanks, I think the most similar device I could find is the TP-Link Archer VR200v, flash size, ethernet, switch, wireless and the partition scheme seems the same.
But cpuinfo throws me off

|system type||: AR10|
|---|---|---|
|processor||: 0|
|cpu model||: MIPS 34Kc V5.6|
|BogoMIPS||: 332.59|

Does anyone knows if AR10 is supported? I can see ar9 in the wiki but no ar10.

Not yet as a turn-key solution, while parts of the essential SOC support should be similar to VR9 (xrx200), you will have to work on the low-level glue (SOC) code to get it actually working and might be up for surprises.

1 Like

ZyXEL FMG3542-D10A / AET-2342GNAUY also similar with 128 MiB RAM and 128MiB NAND. SoC: xRX330 rev 1.1
Pm for the GPL code that was on a google drive link but now removed

Hi. Send me a pm. :slight_smile:

any news on this?

https://drive.google.com/drive/folders/1u1Ymh_2Z0vd61GYHWHG5xFvXm1JN5Sk5?usp=sharing

Hi there. New here! Will OpenWRT work on the Archer D2? I see a WIP (https://openwrt.org/toh/tp-link/archer_d2_ac750) but not too much info if it works. Would I be able to try this with serial console?

Idk if this thread will ever be revived but here we are, so following the Archer D2 V1 openwrt wiki, I tried using 19.07.4/5 on this device instead 18.06.5 and I got a kernel panic on boot

(19.07.04 tested, same thing shows up with .05)

U-Boot 2010.06-svn14778-LANTIQ-v-2.2.67 (Jan 15 2016 - 15:05:13)

CLOCK CPU 500M RAM 250M
16 Bit RAM
DRAM:  64 MiB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   internal phy using 25Mhz clock
Internal phy firmware version: 0x8435
ar10 Switch0 KiB W25Q128 at 0:0 is now current device
MAC: 18-d6-c7-ee-6f-45


Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0
0 KiB W25Q128 at 0:0 is now current device
        Uncompressing ...
Starting kernel ...

[    0.000000] Linux version 4.14.195 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11208-ce6496                                           d796)) #0 SMP Sun Sep 6 16:19:39 2020
[    0.000000] SoC: xRX300 rev 1.2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is TP-LINK Archer VR200v
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 07f00000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 07e00000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007dfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007dfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007dfffff]
[    0.000000] random: get_random_bytes called from 0x80634740 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s25968 r8192 d23184 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32004
[    0.000000] Kernel command line: console=ttyLTQ0,115200 mem=126M vpe1_load_addr=0x87e00000 vpe1_mem=2M max                                           vpes=1 maxtcs=1 nosmp
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 119840K/129024K available (5225K kernel code, 198K rwdata, 912K rodata, 1264K init, 23                                           0K bss, 9184K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] Data bus error, epc == 806372b4, ra == 8063727c
[    0.000000] Oops[#1]:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.195 #0
[    0.000000] task: 80616840 task.stack: 80604000
[    0.000000] $ 0   : 00000000 00000001 ffffffff 80770000
[    0.000000] $ 4   : bf103000 e0000000 00000400 00000001
[    0.000000] $ 8   : 8061a168 80512730 00000000 00000000
[    0.000000] $12   : 00000000 00000000 00000000 3d090000
[    0.000000] $16   : 00000000 80770000 80770000 80770000
[    0.000000] $20   : 00000001 80770000 83fa0000 80002000
[    0.000000] $24   : 00000000 00000000
[    0.000000] $28   : 80604000 80605dd8 81003cf0 8063727c
[    0.000000] Hi    : 00000000
[    0.000000] Lo    : 00000000
[    0.000000] epc   : 806372b4 0x806372b4
[    0.000000] ra    : 8063727c 0x8063727c
[    0.000000] Status: 11007c02 KERNEL EXL
[    0.000000] Cause : 5080801c (ExcCode 07)
[    0.000000] PrId  : 00019556 (MIPS 34Kc)
[    0.000000] Modules linked in:
[    0.000000] Process swapper/0 (pid: 0, threadinfo=80604000, task=80616840, tls=00000000)
[    0.000000] *HwTLS: 0009c008
[    0.000000] Stack : 1e105300 805971dc 80772090 8061a14c 00000000 80636b70 1f101000 80391e3c
[    0.000000]         81002b20 8039156c 00000000 00000000 1f101000 1f101fff 80798d28 00000006
[    0.000000]         1f102000 1f102fff 81003c34 00000200 00000000 00000000 00000000 00000000
[    0.000000]         1f103000 1f103fff 81003d48 00000200 00000000 00000000 00000000 00000000
[    0.000000]         1e105300 1e1053ff 81007c64 00000200 00000000 00000000 00000000 00000000
[    0.000000]         ...
[    0.000000] Call Trace:
[    0.000000] [<80636b70>] 0x80636b70
[    0.000000] [<80391e3c>] 0x80391e3c
[    0.000000] [<8039156c>] 0x8039156c
[    0.000000] [<80636bd8>] 0x80636bd8
[    0.000000] [<80639ff0>] 0x80639ff0
[    0.000000] [<806349b8>] 0x806349b8
[    0.000000] [<80634380>] 0x80634380
[    0.000000]
[    0.000000] Code: 248474ac  8c420060  0000000f <7c42f000> 8c6322f0  3c048059  ac620060  24024000  00003825                                           
[    0.000000]
[    0.000000] ---[ end trace 6daa6ea0f6bf3f22 ]---
[    0.000000] Kernel panic - not syncing: Fatal exception
[    0.000000] Rebooting in 1 seconds..
[    0.000000] Reboot failed -- System halted

Anyone have any idea what may be the cause (never debugged a kernel panic before)?

Hello. In the end, what is the status of this router? As I understand, openwrt does boot on it, but with broken ethernet and WiFi, is that right? I have this router, and though I don't know what I'm doing, I might try to work on it if the essentials are working or can be reused.

Hi,
I don't have archer d2, but I can tell you what's missing in OpenWRT:

  1. Only 2 of the 4 ethernet ports should work. The downstream driver needs at least a clock alias patch which is in PR [1]. The patch for upstream driver has been accepted and is in kernel 5.10.
  2. 5GHz WiFi should work. The downstream PCIe driver uses hardcoded IRQ numbers and only first PCIe works. xRX300 has 2 PCIe interfaces. There is also an effort to use the mainline driver for PCIe [2].

My experience is based on the Lantiq GRX389 which is very similar to the ARX368. Take a look at this DTS [1] as it should be very similar. OpenWRT should boot correctly to Archer D2.

I'm currently busy with studies but plan to continue OpenWRT porting for the GRX389.

[1] https://github.com/openwrt/openwrt/pull/3102/files
[2] https://github.com/xdarklight/openwrt/tree/lantiq-pcie-20210109

Hello again. I have managed to boot OpenWRT up on the router, but I could not get ethernet working at all (and also the wifi and USB, but that's not the priority). I've used the ar10.dtsi from here and also added some of the patches from the above message. Can someone help me with writing the proper/working dts (as I don't really understand it)?
Here is what I have now:
ar10_tplink_archer-d2-v1.dts

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;

#include "ar10.dtsi"

#include <dt-bindings/input/input.h>
#include <dt-bindings/mips/lantiq_rcu_gphy.h>

/ {
 	compatible = "tplink,archer-d2-v1", "lantiq,xway", "lantiq,ar10";
 	model = "TP-Link Archer D2 v1";

 	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x8000000>;
 	};

	aliases {
                led-boot = &led_power;
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;

                led-dsl = &led_dsl;
                led-internet = &led_internet;
                led-wifi = &led_wlan;
        };

	keys: keys {
                compatible = "gpio-keys-polled";
                poll-interval = <100>;

                reset {
                        label = "reset";
                        gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };

                wifi {
                        label = "wifi";
                        gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
                        linux,code = <KEY_RFKILL>;
                        linux,input-type = <EV_SW>;
                };

                wps {
                        label = "wps";
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };


        leds: leds {
                compatible = "gpio-leds";

                led_power: power {
                        label = "power";
                        gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
                        default-state = "keep";
                };

                led_dsl: dsl {
                        label = "dsl";
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                };

                led_internet: internet {
                        label = "internet";
                        gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
                };

                usb {   
                        label = "usb";
                        gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
//                        trigger-sources = <&ehci_port1>, <&ehci_port2>;
                        linux,default-trigger = "usbport";
                };

                eth {   
                        label = "lan";
                        gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
                };

                led_wlan: wlan {
                        label = "wlan";
                        gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
                };

                wps {
                        label = "wps";
                        gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
                };
        };

        usb_vbus: regulator-usb-vbus {
                compatible = "regulator-fixed";

                regulator-name = "USB_VBUS";

                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;

                gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };


};

&pcie0 {
        pcie@0 {
		status = "okay";

        };
};


&pcie1 {
        pcie@1 {
                status = "okay";

        };
};

&pcie2 {
        pcie@2 {
                status = "okay";

        };
};



&spi {
        status = "okay";

        flash@0 {
                compatible = "jedec,spi-nor";
                reg = <1>;
                spi-max-frequency = <25000000>;
                //m25p,fast-read;

                partitions {
                        compatible = "fixed-partitions";
                        #address-cells = <1>;
                        #size-cells = <1>;

                        partition@0 {
                                reg = <0x0 0x20000>;
                                label = "u-boot";
                                read-only;
                        };

                        partition@20000 {
                                reg = <0x20000 0xf90000>;
                                label = "firmware";
                        };

                        partition@fb0000 {
                                reg = <0xfb0000 0x10000>;
                                label = "radioDECT";
                                read-only;
                        };

                        partition@fc0000 {
                                reg = <0xfc0000 0x10000>;
                                label = "config";
                                read-only;
                        };

                        romfile: partition@fd0000 {
                                reg = <0xfd0000 0x10000>;
                                label = "romfile";
                                read-only;
                        };

                        partition@fe0000 {
                                reg = <0xfe0000 0x10000>;
                                label = "rom";
                                read-only;
                        };

                        radio: partition@ff0000 {
                                reg = <0xff0000 0x10000>;
                                label = "radio";
                                read-only;
                        };
                };
        };
};

&eth0 {
	interface@0 {
		compatible = "lantiq,xrx200-pdi";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;
		mac-address = [ 00 11 22 33 44 55 ];
		lantiq,switch;

		ethernet@1 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <1>;
			phy-mode = "gmii";
			phy-handle = <&phy1>;
		};

		ethernet@2 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <2>;
			phy-mode = "gmii";
			phy-handle = <&phy2>;
		};

		ethernet@3 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <3>;
			phy-mode = "gmii";
			phy-handle = <&phy3>;
		};

		ethernet@4 {
			compatible = "lantiq,xrx200-pdi-port";
			reg = <4>;
			phy-mode = "gmii";
			phy-handle = <&phy3>;
		};
	};

	mdio@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "lantiq,xrx200-mdio";
		reg = <0>;

		phy1: ethernet-phy@1 {
			reg = <0x1>;
		};

		phy2: ethernet-phy@2 {
			reg = <0x2>;
		};

		phy3: ethernet-phy@3 {
			reg = <0x3>;
		};

	};
};

&usb_phy0 {
        status = "okay";
};

&usb_phy1 {
        status = "okay";
};


&usb0 {
        status = "okay";
};

&usb1 {
        status = "okay";
};

(GPIO LEDs/buttons and SPI Flash seem to be working properly)

ar10.dtsi

#include <dt-bindings/gpio/gpio.h>

/ {
 	#address-cells = <1>;
 	#size-cells = <1>;
 	compatible = "lantiq,xway", "lantiq,ar10";

 	aliases {
 		serial0 = &asc1;
 	};

 	chosen {
 		stdout-path = "serial0:115200n8";
 	};

 	cpus {
 		cpu@0 {
 			compatible = "mips,mips34Kc";
 		};
 		cpu@1 {
 			compatible = "mips,mips34Kc";
 		};
 	};

 	memory@0 {
 		device_type = "memory";
 	};

 	cputemp@0 {
 		compatible = "lantiq,cputemp";
 	};

 	biu@1f800000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "lantiq,biu", "simple-bus";
 		reg = <0x1f800000 0x800000>;
 		ranges = <0x0 0x1f800000 0x7fffff>;

 		icu0: icu0@80200 {
 			#interrupt-cells = <1>;
 			interrupt-controller;
 			compatible = "lantiq,icu";
 			reg = <0x80200 0x28
 				0x80228 0x28
 				0x80250 0x28
 				0x80278 0x28
 				0x802a0 0x28>;
 		};

 		icu1: icu1@80300 {
 			#interrupt-cells = <1>;
 			interrupt-controller;
 			compatible = "lantiq,icu1";
 			reg = <0x80300 0x28
 				0x80328 0x28
 				0x80350 0x28
 				0x80378 0x28
 				0x803a0 0x28>;
 		};

 		watchdog@803f0 {
 			compatible = "lantiq,xrx100-wdt";
 			reg = <0x803f0 0x10>;
 			regmap = <&rcu0>;
 		};
 	};

 	sram@1f000000 {
 		#address-cells = <1>;
 		#size-cells = <1>;
 		compatible = "lantiq,sram", "simple-bus";
 		reg = <0x1f000000 0x800000>;
 		ranges = <0x0 0x1f000000 0x7fffff>;

 		eiu0: eiu@101000 {
 			#interrupt-cells = <1>;
 			interrupt-controller;
 			compatible = "lantiq,eiu-xway";
 			reg = <0x101000 0x1000>;
 			interrupt-parent = <&icu0>;
 			lantiq,eiu-irqs = <166 135 66 40 41 42>;
 		};

 		pmu0: pmu@102000 {
 			compatible = "lantiq,pmu-xway";
 			reg = <0x102000 0x1000>;
 		};

 		cgu0: cgu@103000 {
 			compatible = "lantiq,cgu-xway";
 			reg = <0x103000 0x1000>;
 		};

 		ts: ts@106f00 {
 			compatible = "lantiq,ts-grx390"; /* to revisit */
 			reg = <0x106f00 0x10>;
 			interrupt-parent = <&icu0>;
 			interrupts = <143>;
 			lantiq,numofsensors = <0x1>;
 		};

 		dcdc@106a00 {
 			compatible = "lantiq,dcdc-xrx200";
 			reg = <0x106a00 0x200>;
 		};

 		vmmc: vmmc@103000 {
 			status = "disabled";
 			compatible = "lantiq,vmmc-xway";
 			reg = <0x103000 0x400>;
 			interrupt-parent = <&icu0>;
 			interrupts = <150 151 152 153 154 155>;
 		};

 		rcu0: rcu@203000 {
 			compatible = "lantiq,xrx200-rcu", "simple-mfd", "syscon";
 			reg = <0x203000 0x1000>;
//			interrupt-parent = <&icu0>;
//			interrupts = <115>;
 			ranges = <0x0 0x203000 0x100>;
 			big-endian;

 			gphy0: gphy@20 {
 				compatible = "lantiq,xrx300-gphy";
 				reg = <0x20 0x4>;

 				resets = <&reset0 31 30>, <&reset1 6 6>;
 				reset-names = "gphy", "gphy2";
 			};

 			gphy1: gphy@58 {
 				compatible = "lantiq,xrx300-gphy";
 				reg = <0x58 0x4>;

 				resets = <&reset0 29 28>, <&reset1 7 7>;
 				reset-names = "gphy", "gphy2";
 			};

 			gphy2: gphy@ac {
 				compatible = "lantiq,xrx300-gphy";
 				reg = <0xac 0x4>;
 				resets = <&reset0 27 26>, <&reset1 8 8>;
 				reset-names = "gphy", "gphy2";
 			};

 			reset0: reset-controller@10 {
 				compatible = "lantiq,xrx200-reset";
 				reg = <0x10 4>, <0x14 4>;

 				#reset-cells = <2>;
 			};

 			reset1: reset-controller@48 {
 				compatible = "lantiq,xrx200-reset";
 				reg = <0x48 4>, <0x24 4>;

 				#reset-cells = <2>;
 			};

 			usb_phy0: usb2-phy@18 {
 				compatible = "lantiq,xrx300-usb2-phy";
 				reg = <0x18 4>, <0x38 4>;
 				status = "disabled";

 				resets = <&reset1 4 4>, <&reset0 4 4>;
 				reset-names = "phy", "ctrl";
 				#phy-cells = <0>;
 			};

 			usb_phy1: usb2-phy@34 {
 				compatible = "lantiq,xrx300-usb2-phy";
 				reg = <0x34 4>, <0x3c 4>;
 				status = "disabled";

 				resets = <&reset1 5 4>, <&reset0 4 4>;
 				reset-names = "phy", "ctrl";
 				#phy-cells = <0>;
 			};

 			reboot@10 {
 				compatible = "syscon-reboot";
 				reg = <0x10 4>;

 				regmap = <&rcu0>;
 				offset = <0x10>;
 				mask = <0xe0000000>;
 			};
 		};
 	};

 	fpi@10000000 {
 		compatible = "lantiq,xrx200-fpi", "simple-bus";
 		ranges = <0x0 0x10000000 0xff00000>;
 		reg = <0x1f400000 0x1000>,
 			<0x10000000 0xf000000>;
 		regmap = <&rcu0>;
 		offset-endianness = <0x4c>; /* ?????????? */
 		#address-cells = <1>;
 		#size-cells = <1>;

 		localbus: localbus@0 {
 			#address-cells = <2>;
 			#size-cells = <1>;
 			ranges = <0 0 0x0 0x3ffffff /* addrsel0 */
 				1 0 0x4000000 0x4000010>; /* addsel1 */
 			compatible = "lantiq,localbus", "simple-bus";
 		};

 		gptu@e100a00 {
 			compatible = "lantiq,gptu-xway";
 			reg = <0xe100a00 0x100>;
 			interrupt-parent = <&icu0>;
 			interrupts = <126 127 128 129 130 131>;
 		};

 		usif: usif@da00000 {
 			compatible = "lantiq,usif";
 			reg = <0xda00000 0x1000000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <29 125 107 108 109 110>;
 			status = "disabled";
 		};

 		spi: spi@e100800 {
 			compatible = "lantiq,xrx200-spi", "lantiq,xrx100-spi";
 			reg = <0xe100800 0x100>;
 			interrupt-parent = <&icu0>;
 			interrupts = <22 23 24>;
 			interrupt-names = "spi_rx", "spi_tx", "spi_err",
 				"spi_frm";
 			#address-cells = <1>;
 			#size-cells = <1>;
 			status = "disabled";
 		};

 		asc1: serial@e100c00 {
 			compatible = "lantiq,asc";
 			reg = <0xe100c00 0x400>;
 			interrupt-parent = <&icu0>;
 			interrupts = <112 113 114>;
 		};

 		gpio: pinmux@e100b10 {
 			compatible = "lantiq,xrx300-pinctrl";
 			#gpio-cells = <2>;
 			gpio-controller;
 			reg = <0xe100b10 0xa0>;
 		};

 		stp: stp@e100bb0 {
 			status = "disabled";
 			compatible = "lantiq,gpio-stp-xway";
 			reg = <0xe100bb0 0x40>;
 			#gpio-cells = <2>;
 			gpio-controller;

 			lantiq,shadow = <0xffffff>;
 			lantiq,groups = <0x7>;
 			lantiq,dsl = <0x0>;
 			lantiq,phy1 = <0x0>;
 			lantiq,phy2 = <0x0>;
 		};

 		deu@e103100 {
 			status = "disabled";
 			compatible = "lantiq,deu-xrx200";
 			reg = <0xe103100 0xf00>;

 			/* supported by upstream? */
 			lantiq,algo = "aes", "des", "arc4", "sha1", "md5", "sha1-hmac", "md5-hmac";
 			lantiq,dma-mode = <0>;
 			lantiq,sync-mode = <1>;
 		};

 		dma0: dma@e104100 {
 			compatible = "lantiq,dma-xway";
 			reg = <0xe104100 0x800>;
 			interrupt-parent = <&icu0>;
 			interrupts = <72 73 74 75 76 77 78 79 80 81 82 83 97 98 99 100 101 70 88 93 136 137 138 139>;
 			lantiq,desc-num = <256>;
 			lantiq,dma-hw-poll = <1>;
 			lantiq,dma-pkt-arb = <0>;
 		};

 		ebu0: ebu@6000000 {
 			compatible = "lantiq,ebu-xway";
 			reg = <0x6000000 0x100>,
 				<0x6000100 0x100>;
 		};

 		usb0: usb@e101000 {
 			status = "disabled";
 			compatible = "lantiq,xrx200-usb";
 			reg = <0xe101000 0x1000
 				0xe120000 0x3f000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <62 91>;
 			dr_mode = "host";
 			phys = <&usb_phy0>;
 			phy-names = "usb2-phy";
 		};

 		usb1: usb@e106000 {
 			status = "disabled";
 			compatible = "lantiq,xrx200-usb";
 			reg = <0xe106000 0x1000>;
 			interrupt-parent = <&icu0>;
 			interrupts = <91>;
 			dr_mode = "host";
 			phys = <&usb_phy1>;
 			phy-names = "usb2-phy";
 		};

 		eth0: eth@e108000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			compatible = "lantiq,xrx200-net";
 			reg = < 0xe108000 0x3000 /* switch */
 				0xe10b100 0x70 /* mdio */
 				0xe10b1d8 0x30 /* mii */
 				0xe10b308 0x30 /* pmac */
 			>;
 			interrupt-parent = <&icu0>;
 			interrupts = <75 73 72>;
 			resets = <&reset0 21 16>, <&reset0 8 8>;
 			reset-names = "switch", "ppe";
 			lantiq,phys = <&gphy0>, <&gphy1>, <&gphy2>;
 		};

 		mei@e116000 {
 			compatible = "lantiq,mei-xrx300";
 			reg = <0xe116000 0x100>;
 			interrupt-parent = <&icu0>;
 			interrupts = <63 61>;
 		};

 		ppe@e234000 {
 			compatible = "lantiq,ppe-xrx200";
 			interrupt-parent = <&icu0>;
 			interrupts = <32 95 69>;
 		};

 		wlan@a000000 {
 			compatible ="lantiq,wlan-xrx330";
 			status = "okay";
 			interrupt-parent = <&icu0>;
 			interrupts = <26>;
 		};

 		pcie0: pcie@d900000 {
 			status = "disabled";
 			compatible = "lantiq,pcie-xrx330";
 			device_type = "pci";
 			#address-cells = <3>;
 			#size-cells = <2>;
 			reg = < 0xD900000 0x1000 /* RC controller */
 				0xD000000 0x800000 /* Cfg Space */
 				0xE100900 0x100 /* App logic */
 				0xF106800 0x200 /* PCIe PHY Reg */
 				0xF600000 0x100000 /* MSI addr space */
 				0xF700000 0x400 /* MSI PIC */
 			>;
 			reg-names = "csr", "cfg", "app", "phy", "msi", "pic";
 			interrupt-parent = <&icu0>;
 			interrupts = <163 164 165 38 161>;
 			interrupt-names = "msi0", "msi1", "msi2", "msi3", "ir";
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 0x7>;
 			interrupt-map = <0 0 0 1 &icu0  144>,
 					<0 0 0 2 &icu0  145>,
 					<0 0 0 3 &icu0  146>,
 					<0 0 0 4 &icu0  147>;
 			ranges = <0x02000000 0 0x0C000000 0x0C000000 0 0x01000000    /* Non-pretechable memory 32bit */
 				  0x01000000 0 0x0D800000 0x0D800000 0 0x00100000    /* Downsream I/O */
 				 >;
 			resets = <&rcu0 12>,
 				 <&rcu0 22>;
 			reset-names = "phy", "core";
 			lantiq,inbound-shift = <12>;
 			lantiq,outbound-shift = <4>;
 		};

 		pcie1: pcie@9900000 {
 			status = "disabled";
 			compatible = "lantiq,pcie-xrx330";
 			device_type = "pci";
 			#address-cells = <3>;
 			#size-cells = <2>;
 			reg = < 0x9900000 0x1000 /* RC controller */
 				0x9000000 0x800000 /* Cfg Space */
 				0xE100700 0x100 /* App logic */
 				0xF700400 0x200 /* PCIe PHY Reg */
 				0xF400000 0x100000 /* MSI addr space */
 				0xF500000 0x400 /* MSI PIC */
 			>;
 			reg-names = "csr", "cfg", "app", "phy", "msi", "pic";
 			interrupt-parent = <&icu0>;
 			interrupts = <49 50 51 52 57>;
 			interrupt-names = "msi0", "msi1", "msi2", "msi3", "ir";
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 0x7>;
 			interrupt-map = <0 0 0 1 &icu0  17>,
 					<0 0 0 2 &icu0  18>,
 					<0 0 0 3 &icu0  19>,
 					<0 0 0 4 &icu0  20>;
 			bus-range = <0x00 0xff>;
 			ranges = < 0x02000000 0 0x08000000 0x08000000 0 0x01000000    /* Non-pretechable memory 32bit */
 				   0x01000000 0 0x09800000 0x09800000 0 0x00100000    /* Downsream I/O */
 				 >;
 			resets = <&rcu0 13>,
 				 <&rcu0 27>;
 			reset-names = "phy", "core";
 			lantiq,inbound-shift = <13>;
 			lantiq,outbound-shift = <8>;
 		};

 		pcie2: pcie@9B00000 {
 			status = "disabled";
 			compatible = "lantiq,pcie-xrx330";
 			device_type = "pci";
 			#address-cells = <3>;
 			#size-cells = <2>;
 			reg = < 0x9B00000 0x1000 /* RC controller */
 				0xA800000 0x800000 /* Cfg Space */
 				0xE100400 0x100 /* App logic */
 				0xF106A00 0x200 /* PCIe PHY Reg */
 				0xF700A00 0x100000 /* MSI addr space */
 				0xF700600 0x400 /* MSI PIC */
 			>;
 			reg-names = "csr", "cfg", "app", "phy", "msi", "pic";
 			interrupt-parent = <&icu0>;
 			interrupts = <84 85 86 87 61>;
 			interrupt-names = "msi0", "msi1", "msi2", "msi3", "ir";
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 0x7>;
 			interrupt-map = <0 0 0 1 &icu0  27>,
 					<0 0 0 2 &icu0  71>,
 					<0 0 0 3 &icu0  89>,
 					<0 0 0 4 &icu0  90>;
 			bus-range = <0x00 0xff>;
 			ranges = < 0x02000000 0 0x0B000000 0x0B000000 0 0x01000000    /* Non-pretechable memory 32bit */
 				   0x01000000 0 0x09A00000 0x09A00000 0 0x00100000    /* Downsream I/O */
 				 >;
 			resets = <&rcu0 60>,
 				 <&rcu0 61>;
 			reset-names = "phy", "core";
 			lantiq,inbound-shift = <14>;
 			lantiq,outbound-shift = <17>;
 		};

 	};

};

OpenWRT bootlog:

[    0.000000] Linux version 5.4.105 (misha@Ryzen-PC) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16249-9ac47ee469)) #0 SMP Thu Mar 18 09:53:26 2021
[    0.000000] SoC: xRX300 rev 1.2
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is TP-Link Archer D2 v1
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] percpu: Embedded 14 pages/cpu s26224 r8192 d22928 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line:  
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=00000048
[    0.000000] Readback ErrCtl register=00000048
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 115992K/131072K available (5943K kernel code, 214K rwdata, 1532K rodata, 5732K init, 221K bss, 15080K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x318/0x530 with crng_init=0
[    0.000000] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000010] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.007902] Calibrating delay loop... 332.54 BogoMIPS (lpj=665088)
[    0.045960] pid_max: default: 32768 minimum: 301
[    0.050894] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.058085] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.069578] rcu: Hierarchical SRCU implementation.
[    0.075192] smp: Bringing up secondary CPUs ...
[    0.080919] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.080935] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.081080] CPU1 revision is: 00019556 (MIPS 34Kc)
[    0.111854] Synchronize counters for CPU 1: done.
[    0.136213] smp: Brought up 1 node, 2 CPUs
[    0.145447] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.155108] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.162153] pinctrl core: initialized pinctrl subsystem
[    0.168955] NET: Registered protocol family 16
[    0.188410] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 0 mV
[    0.203093] pinctrl-xway 1e100b10.pinmux: Init done
[    0.209354] dma-xway 1e104100.dma: Init done - hw rev: 8, ports: 5, channels: 24
[    0.261056] pinctrl-xway 1e100b10.pinmux: No GPIO function on pin33
[    0.267499] pinctrl-xway 1e100b10.pinmux: request() failed for pin 33
[    0.273833] pinctrl-xway 1e100b10.pinmux: pin-33 (XWAY GPIO:481) status -22
[    0.280912] reg-fixed-voltage: probe of regulator-usb-vbus failed with error -22
[    0.289458] usbcore: registered new interface driver usbfs
[    0.295034] usbcore: registered new interface driver hub
[    0.300409] usbcore: registered new device driver usb
[    0.306178] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.318912] clocksource: Switched to clocksource MIPS
[    0.325480] NET: Registered protocol family 2
[    0.331647] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.339980] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.347667] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.354767] TCP: Hash tables configured (established 1024 bind 1024)
[    0.361367] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.367832] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.375244] NET: Registered protocol family 1
[    0.379568] PCI: CLS 0 bytes, default 32
[    0.502668] random: fast init done
[   10.123263] gptu: totally 6 16-bit timers/counters
[   10.128115] gptu: misc_register on minor 63
[   10.132277] gptu: succeeded to request irq 126
[   10.136762] gptu: succeeded to request irq 127
[   10.141294] gptu: succeeded to request irq 128
[   10.145823] gptu: succeeded to request irq 129
[   10.150324] gptu: succeeded to request irq 130
[   10.154848] gptu: succeeded to request irq 131
[   10.159528] No VPEs reserved for AP/SP, not initialize VPE loader
[   10.159528] Pass maxvpes=<n> argument as kernel argument
[   10.170902] No TCs reserved for AP/SP, not initializing RTLX.
[   10.170902] Pass maxtcs=<n> argument as kernel argument
[   10.184311] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[   10.209475] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[   10.215240] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[   10.237812] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[   10.246730] printk: console [ttyLTQ0] enabled
[   10.246730] printk: console [ttyLTQ0] enabled
[   10.255453] printk: bootconsole [early0] disabled
[   10.255453] printk: bootconsole [early0] disabled
[   10.269827] spi-lantiq-ssc 1e100800.spi: Lantiq SSC SPI controller (Rev 9, TXFS 8, RXFS 8, DMA 1)
[   10.279976] spi-nor spi0.1: s25fl128s1 (16384 Kbytes)
[   10.283760] 7 fixed-partitions partitions found on MTD device spi0.1
[   10.290053] Creating 7 MTD partitions on "spi0.1":
[   10.294783] 0x000000000000-0x000000020000 : "u-boot"
[   10.301168] 0x000000020000-0x000000fb0000 : "firmware"
[   10.618866] random: crng init done
[   10.680331] 2 tplink-fw partitions found on MTD device firmware
[   10.684848] 0x000000020000-0x00000014dd47 : "kernel"
[   10.691320] 0x000000160000-0x000000fb0000 : "rootfs"
[   10.696285] mtd: device 3 (rootfs) set to be root filesystem
[   10.703188] 1 squashfs-split partitions found on MTD device rootfs
[   10.708003] 0x000000830000-0x000000fb0000 : "rootfs_data"
[   10.715228] 0x000000fb0000-0x000000fc0000 : "radioDECT"
[   10.721297] 0x000000fc0000-0x000000fd0000 : "config"
[   10.727159] 0x000000fd0000-0x000000fe0000 : "romfile"
[   10.733051] 0x000000fe0000-0x000000ff0000 : "rom"
[   10.738579] 0x000000ff0000-0x000001000000 : "radio"
[   10.745997] libphy: Fixed MDIO Bus: probed
[   10.759616] NET: Registered protocol family 10
[   10.767094] Segment Routing with IPv6
[   10.769439] NET: Registered protocol family 17
[   10.773944] 8021q: 802.1Q VLAN Support v1.8
[   10.785669] xway-rcu-gphy 1f203020.gphy: Direct firmware load for lantiq/xrx300_phy11g_a21.bin failed with error -2
[   10.794891] xway-rcu-gphy 1f203020.gphy: Falling back to sysfs fallback for: lantiq/xrx300_phy11g_a21.bin
[   72.750856] xway-rcu-gphy 1f203020.gphy: failed to load firmware: lantiq/xrx300_phy11g_a21.bin, error: -11
[   72.759207] xway-rcu-gphy: probe of 1f203020.gphy failed with error -11
[   72.766183] xway-rcu-gphy 1f203058.gphy: Direct firmware load for lantiq/xrx300_phy11g_a21.bin failed with error -2
[   72.776196] xway-rcu-gphy 1f203058.gphy: Falling back to sysfs fallback for: lantiq/xrx300_phy11g_a21.bin
[  134.190857] xway-rcu-gphy 1f203058.gphy: failed to load firmware: lantiq/xrx300_phy11g_a21.bin, error: -11
[  134.199202] xway-rcu-gphy: probe of 1f203058.gphy failed with error -11
[  134.206180] xway-rcu-gphy 1f2030ac.gphy: Direct firmware load for lantiq/xrx300_phy11g_a21.bin failed with error -2
[  134.216191] xway-rcu-gphy 1f2030ac.gphy: Falling back to sysfs fallback for: lantiq/xrx300_phy11g_a21.bin
[  195.630852] xway-rcu-gphy 1f2030ac.gphy: failed to load firmware: lantiq/xrx300_phy11g_a21.bin, error: -11
[  195.639197] xway-rcu-gphy: probe of 1f2030ac.gphy failed with error -11
[  195.668694] Freeing unused kernel memory: 5732K
[  195.671832] This architecture does not have kernel memory protection.
[  195.678245] Run /init as init process
[  196.729766] init: Console is alive
[  196.732204] init: - watchdog -
[  196.762359] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[  196.779289] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[  196.786306] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[  196.897187] dwc2 1e101000.usb: DWC OTG Controller
[  196.900618] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[  196.907617] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[  196.914263] hub 1-0:1.0: USB hub found
[  196.916842] hub 1-0:1.0: 1 port detected
[  196.922052] dwc2 1e106000.usb: 1e106000.usb supply vusb_d not found, using dummy regulator
[  196.929179] dwc2 1e106000.usb: 1e106000.usb supply vusb_a not found, using dummy regulator
[  197.038933] dwc2 1e106000.usb: DWC OTG Controller
[  197.042231] dwc2 1e106000.usb: new USB bus registered, assigned bus number 2
[  197.049340] dwc2 1e106000.usb: irq 91, io mem 0x1e106000
[  197.056024] hub 2-0:1.0: USB hub found
[  197.058527] hub 2-0:1.0: 1 port detected
[  197.065537] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[  197.074492] init: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[  201.442868] procd: - early -
[  201.444498] procd: - watchdog -
[  202.031712] procd: - watchdog -
[  202.034128] procd: - ubus -
[  202.095171] procd: - init -
Please press Enter to activate this console.
[  202.784335] kmodloader: loading kernel modules from /etc/modules.d/*
[  202.793116] IFXOS, Version 1.5.19 (c) Copyright 2009, Lantiq Deutschland GmbH
[  202.803549] NET: Registered protocol family 8
[  202.806449] NET: Registered protocol family 20
[  202.818291] PPP generic driver version 2.4.2
[  202.882269] Lantiq (VRX) DSL CPE MEI driver, version 1.5.17.6, (c) 2007-2015 Lantiq Beteiligungs-GmbH & Co. KG
[  202.899011] 
[  202.899011] 
[  202.899011] Lantiq CPE API Driver version: DSL CPE API V4.17.18.6
[  202.916701] 
[  202.916701] Predefined debug level: 3
[  202.921792] Get BSP Driver Handle Fail!
[  202.925621] Get BSP Driver NFC Handle Fail!
[  202.936042] Loading modules backported from Linux version v5.10.16-0-gde53befa79cf
[  202.942241] Backport generated by backports.git v5.10.16-1-0-g21d2a1d2
[  202.996800] NET: Registered protocol family 24
[  203.012614] xt_time: kernel timezone is -0000
[  203.166439] kmodloader: done loading kernel modules from /etc/modules.d/*
[  203.257505] urngd: v1.0.2 started.



BusyBox v1.33.0 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r16249-9ac47ee469
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#

Hello again. I have found that I've had errors in dts file (and I've incorrectly applied some patches) and have managed to get 3 out of 4 all ethernet ports working.
How can I find how it is connected internally and construct a proper dts file and
What do I need to do to make wifi and usb working? (I have set all pci-e status to okay, but I'd guess that's not enough and lspci shows nothing)

Hello. I have managed to get mt7610 WiFi working, but it only allows me to set the power to 10dbm and my phone is unable to discover the network. What could be the issue?
Here is the driver initializing:

[   19.350705] ifx_pcie_bios_map_irq port 0 dev 0000:01:00.0 slot 0 pin 1 
[   19.355956] ifx_pcie_bios_map_irq dev 0000:01:00.0 irq 144 assigned
[   19.362289] mt76x0e 0000:01:00.0: enabling device (0000 -> 0002)
[   19.368521] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   19.375291] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   19.610776] mt76x0e 0000:01:00.0: EEPROM ver:01 fae:00
root@OpenWrt:/# iw phy
Wiphy phy0
	wiphy index: 0
	max # scan SSIDs: 4
	max scan IEs length: 2247 bytes
	max # sched scan SSIDs: 0
	max # match sets: 0
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Device supports AP-side u-APSD.
	Device supports T-DLS.
	Available Antennas: TX 0x1 RX 0x1
	Configured Antennas: TX 0x1 RX 0x1
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * mesh point
		 * P2P-client
		 * P2P-GO
	Band 2:
		Capabilities: 0x17e
			HT20/HT40
			SM Power Save disabled
			RX Greenfield
			RX HT20 SGI
			RX HT40 SGI
			RX STBC 1-stream
			Max AMSDU length: 3839 bytes
			No DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: No restriction (0x00)
		HT TX/RX MCS rate indexes supported: 0-7
		VHT Capabilities (0x31800120):
			Max MPDU length: 3895
			Supported Channel Width: neither 160 nor 80+80
			short GI (80 MHz)
			RX antenna pattern consistency
			TX antenna pattern consistency
		VHT RX MCS set:
			1 streams: MCS 0-9
			2 streams: not supported
			3 streams: not supported
			4 streams: not supported
			5 streams: not supported
			6 streams: not supported
			7 streams: not supported
			8 streams: not supported
		VHT RX highest supported: 0 Mbps
		VHT TX MCS set:
			1 streams: MCS 0-9
			2 streams: not supported
			3 streams: not supported
			4 streams: not supported
			5 streams: not supported
			6 streams: not supported
			7 streams: not supported
			8 streams: not supported
		VHT TX highest supported: 0 Mbps
		Frequencies:
			* 5180 MHz [36] (10.0 dBm)
			* 5200 MHz [40] (10.0 dBm)
			* 5220 MHz [44] (10.0 dBm)
			* 5240 MHz [48] (10.0 dBm)
			* 5260 MHz [52] (10.0 dBm) (no IR, radar detection)
			* 5280 MHz [56] (10.0 dBm) (no IR, radar detection)
			* 5300 MHz [60] (10.0 dBm) (no IR, radar detection)
			* 5320 MHz [64] (10.0 dBm) (no IR, radar detection)
			* 5500 MHz [100] (11.0 dBm) (no IR, radar detection)
			* 5520 MHz [104] (11.0 dBm) (no IR, radar detection)
			* 5540 MHz [108] (11.0 dBm) (no IR, radar detection)
			* 5560 MHz [112] (11.0 dBm) (no IR, radar detection)
			* 5580 MHz [116] (11.0 dBm) (no IR, radar detection)
			* 5600 MHz [120] (11.0 dBm) (no IR, radar detection)
			* 5620 MHz [124] (11.0 dBm) (no IR, radar detection)
			* 5640 MHz [128] (11.0 dBm) (no IR, radar detection)
			* 5660 MHz [132] (11.0 dBm) (no IR, radar detection)
			* 5680 MHz [136] (11.0 dBm) (no IR, radar detection)
			* 5700 MHz [140] (11.0 dBm) (no IR, radar detection)
			* 5720 MHz [144] (11.0 dBm) (no IR, radar detection)
			* 5745 MHz [149] (11.0 dBm) (no IR)
			* 5765 MHz [153] (11.0 dBm) (no IR)
			* 5785 MHz [157] (11.0 dBm) (no IR)
			* 5805 MHz [161] (11.0 dBm) (no IR)
			* 5825 MHz [165] (11.0 dBm) (no IR)
			* 5845 MHz [169] (disabled)
			* 5865 MHz [173] (disabled)
	valid interface combinations:
		 * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 8,
		   total <= 8, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

	HT Capability overrides:
		 * MCS: ff ff ff ff ff ff ff ff ff ff
		 * maximum A-MSDU length
		 * supported channel width
		 * short GI for 40 MHz
		 * max A-MPDU length exponent
		 * min MPDU start spacing
	max # scan plans: 1
	max scan plan interval: -1
	max scan plan iterations: 0
	Supported extended features:
		* [ VHT_IBSS ]: VHT-IBSS
		* [ RRM ]: RRM
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
		* [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
		* [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
		* [ AQL ]: Airtime Queue Limits (AQL)
		* [ SCAN_RANDOM_SN ]: use random sequence numbers in scans
		* [ SCAN_MIN_PREQ_CONTENT ]: use probe request with only rate IEs in scans
		* [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
		* [ DEL_IBSS_STA ]: deletion of IBSS station support
		* [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
		* [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support

Is that normal?

Edit: I have also found that radio might break after a soft reboot. Is that also normal?

Edit2: Radio partition dump:

00000000  76 10 01 00 0c 00 26 43  88 60 76 10 14 c3 00 00  |v.....&C.`v.....|
00000010  00 00 76 10 14 c3 00 00  00 00 00 00 00 00 00 00  |..v.............|
00000020  ff ff 37 ff ff ef 3e 30  9b 3c ff ff ff ff ff ff  |..7...>0.<......|
00000030  ff ff ff ff 05 11 10 08  ff ff 01 7e ff ff ff ff  |...........~....|
00000040  ff ff 06 11 0c 00 00 00  0c 00 00 00 0c 00 00 00  |................|
00000050  80 ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000070  ff ff ff ff 00 ff ff 00  0d 0d 0d 0d 0d 0d 0d 0d  |................|
00000080  0d 0d 0d 0d 0f 0f 0f 0f  0f 0f 0f 0f 0f 0f 0f 0f  |................|
00000090  10 0f 10 10 10 10 10 10  0f 0f ff 0f ff ff ff ff  |................|
000000a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
000000d0  fa ff 81 1c 74 40 00 95  00 00 00 00 9b 64 00 00  |....t@.......d..|
000000e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000f0  80 80 80 80 f8 f2 04 fd  10 0a 7f 7f 7f 7f 80 80  |................|
00000100  80 80 f7 f1 05 fc 11 0b  7f 7f 7f 7f fa 80 ff ff  |................|
00000110  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000120  07 07 00 04 07 07 00 04  07 07 00 04 ff 3e ff ff  |.............>..|
00000130  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00010000

Hello. I have found a different (from the radio partition) MT7610E-V10-FEM-1ANT.bin in the OEM firmware and also SingleSKU_5G_CE.dat and SingleSKU_5G_FCC.dat. Might those be the right files and firmware that is needed to be loaded?

Any progress with this?

You are missing firmware files which is why Ethernet isn't working:

Hello. I haven't been doing anything with this router because there is (was ?) a bug in kernel driver, which makes it stop receiving packets after a few minutes under load. Apart from that, Ethernet and switch were fully working and I didn't have problems with firmware missing. You can check my pull request https://github.com/openwrt/openwrt/pull/4059 . I might try and update it to see if it has been fixed, but I haven't had time lately to follow any of the OpenWrt development