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