Add support for TP-LINK AX55 V1

you'll likely need a factory.bin for the initial update. you can also start by doing a diff on your /sbin/sysupgrade vs the stock one on the router, it's likely been modified slightly, for example, the b3000 needed the dumpimage binary, I had to grab it from the stock firmware dump and add it to my build. Look in the the upgrade directory for vendor scripts

ls /lib/upgrade 

really you can compare the entire filesystem to your build by poking around the router and comparing the the files in your build ..

./build_dir/target-aarch64_cortex-a53_musl/root-qualcommax

note extra files and files sizes in general. Comparing to your build files as you go. If your missing a file(script) then add it. Next if your build file size is different from the size of the same file on the router ...investigate and see what has been added/removed

1 Like

do you have a github repo setup ? I'd like to take a peek at what you've got so far.

Just finished uploading files...

1 Like

i dont see your commits, and you should use git, you'll need to if you plan to have the device added anyway.

quick lesson ..

1, fork the repo on github

  1. from home directory (or wherever you prefer) right click and open a terminal an clone the repository
git clone <url to your fork>
  1. cd into openwrt-6.6 (or whatever you named your fork) and create a new branch for your work
cd openwrt-6.6
git checkout -b add_tp-link-ax55-v1_support
code .  <-- to use vscode to make edits
  1. now make your commits, I prefer to use vscode as seen above, it makes it very easy to navigate and keep track of things. However, you can use your preferred method, it really doesn't matter at this stage.

  2. once you have made your changes/commits. you need to commit to your github

from terminal

git add -i
select 4 (add untracked )
add each of your changed files by typing their corresponding numbers ie

Add untracked>> 1 2 3 4 5 ...etc
hit enter, select 7 or q to quit
  1. sign off your commits

from terminal

git commit --signoff

here an example of one of mine...

  1. push your changes to your github
git push -f

if you get any warnings, just following the messages produce in the warnings. you'll likely have to add the branch to upstream ...git will guide you if this is the case.

Besides being required for the pr, this make it so much easier, for you and other collaborators, to quickly navigate any changes you have made for review. And its just good practice in general

1 Like

Thanks for the help! I'll try to do as you wrote

1 Like

I managed to run the router under openwrt firmware. Now I have the same problem with running wi-fi modules that Hostle had.

ath11k c000000.wifi: failed to wait qmi memory request: -110
ath11k c000000.wifi: qmi failed to respond fw mem req: -110
ath11k c000000.wifi: Coldboot Calibration timed out

How can I make an ax55 board file to put it in the /src folder? There are no any board*.bin files in router OEM lib/firmware folder...
UPD: My Board ID for IPQ5018 = 24. Board ID for QCN6122 = 60. All FW bdaddr parameters are standart and the same as most IPQ5018+QCN6122 boards..

you need to look at the boot log and identify which bins you devices uses. Then take the corresponding bins from the stock firmware and use bdf tool to add the ath11k header, board id, variant string .. etc

See my post here -->

as you see in the post, the b3000 uses the bdwlan.b23 for 5018 and the bdwlan.b60 for 6122 ... I assume your device uses the bdwlan.b24 and bdwlan.b60 respectively, but the stock boot log will confirm this

1 Like

Done. bdwlan.b24 for IPQ518 and bdwlan.b60 for QCN6122

I apologize for the misunderstanding, but what is "bdftool"? Any links or docs? Thanks!

IPQ5018# bootm
## Loading kernel from FIT Image at 44000000 ...
   Using 'config@mp03.3' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-6.6.52
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x440000e8
     Data Size:    13327029 Bytes = 12.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41000000
     Entry Point:  0x41000000
     Hash algo:    crc32
     Hash value:   58f11ad9
     Hash algo:    sha1
     Hash value:   a15793b5f72972317b4e95762e65eeebc22c5fed
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
   Using 'config@mp03.3' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt tplink_archer-ax55-v1 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x44cb5ce8
     Data Size:    26558 Bytes = 25.9 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   f7bcc024
     Hash algo:    sha1
     Hash value:   8822af8767e7e0f482542bd90d60f944886c58cc
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x44cb5ce8
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4a3f6000, end 4a3ff7bd ... OK
Using machid 0x8040002 from environment

Starting kernel ...

Jumping to AARCH64 kernel via monitor
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x51af8014]
[    0.000000] Linux version 6.6.52 (mainc0de@mainc0de-Linux) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r27599-18f15abf26) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 SMP Mon Oct 28 15:02:30 2024
[    0.000000] Machine model: TP-Link Archer AX55 v1
[    0.000000] OF: reserved mem: 0x000000004a400000..0x000000004a7fffff (4096 KiB) nomap non-reusable tzapp@4a400000
[    0.000000] OF: reserved mem: 0x000000004a800000..0x000000004a9fffff (2048 KiB) nomap non-reusable bootloader@4a800000
[    0.000000] OF: reserved mem: 0x000000004aa00000..0x000000004aafffff (1024 KiB) nomap non-reusable sbl@4aa00000
[    0.000000] OF: reserved mem: 0x000000004ab00000..0x000000004abfffff (1024 KiB) nomap non-reusable smem@4ab00000
[    0.000000] OF: reserved mem: 0x000000004ac00000..0x000000004affffff (4096 KiB) nomap non-reusable tz@4ac00000
[    0.000000] OF: reserved mem: 0x000000004b000000..0x000000004e8fffff (58368 KiB) nomap non-reusable q6_mem_regions@4b000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000004a3fffff]
[    0.000000]   node   0: [mem 0x000000004a400000-0x000000004e8fffff]
[    0.000000]   node   0: [mem 0x000000004e900000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] psci: OSI mode supported.
[    0.000000] psci: [Firmware Bug]: failed to set PC mode: -1
[    0.000000] percpu: Embedded 18 pages/cpu s35240 r8192 d30296 u73728
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line:  swiotlb=1 coherent_pool=2M
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129024
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 2.
[    0.000000] software IO TLB: SWIOTLB bounce buffer size roundup to 0MB
[    0.000000] software IO TLB: mapped [mem 0x000000005f540000-0x000000005f5c0000] (0MB)
[    0.000000] Memory: 421544K/524288K available (8128K kernel code, 882K rwdata, 2420K rodata, 9472K init, 274K bss, 102744K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv2m: range[mem 0x0b00a000-0x0b00aff7], SPI[448:479]
[    0.000000] GICv2m: range[mem 0x0b00b000-0x0b00bff7], SPI[480:511]
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 24.00MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000145] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000164] pid_max: default: 32768 minimum: 301
[    0.005222] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.005243] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.010913] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1.
[    0.011338] rcu: Hierarchical SRCU implementation.
[    0.011349] rcu:     Max phase no-delay instances is 1000.
[    0.012446] smp: Bringing up secondary CPUs ...
[    0.013540] Detected VIPT I-cache on CPU1
[    0.013676] CPU1: Booted secondary processor 0x0000000001 [0x51af8014]
[    0.013857] smp: Brought up 1 node, 2 CPUs
[    0.013872] SMP: Total of 2 processors activated.
[    0.013879] CPU features: detected: 32-bit EL0 Support
[    0.013885] CPU features: detected: CRC32 instructions
[    0.013983] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.013994] CPU: All CPU(s) started at EL1
[    0.013997] alternatives: applying system-wide alternatives
[    0.022293] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.022329] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.024149] pinctrl core: initialized pinctrl subsystem
[    0.026236] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.027941] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.028276] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.028584] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.029143] thermal_sys: Registered thermal governor 'step_wise'
[    0.029259] cpuidle: using governor menu
[    0.029567] ASID allocator initialised with 65536 entries
[    0.051087] Modules: 27424 pages in range for non-PLT usage
[    0.051105] Modules: 518944 pages in range for PLT usage
[    0.057692] SCSI subsystem initialized
[    0.058026] usbcore: registered new interface driver usbfs
[    0.058079] usbcore: registered new interface driver hub
[    0.058142] usbcore: registered new device driver usb
[    0.058494] qcom_scm: convention: smc arm 64
[    0.061071] clocksource: Switched to clocksource arch_sys_counter
[    0.065366] NET: Registered PF_INET protocol family
[    0.065606] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.067943] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.067979] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.068006] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.068061] TCP bind hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.068244] TCP: Hash tables configured (established 4096 bind 4096)
[    0.068416] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.068459] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.069041] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.069110] PCI: CLS 0 bytes, default 64
[    0.082821] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[    0.083701] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.083750] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.103080] qcom-pcie a0000000.pcie: host bridge /soc@0/pcie@a0000000 ranges:
[    0.103179] qcom-pcie a0000000.pcie:       IO 0x00a0200000..0x00a02fffff -> 0x00a0200000
[    0.103222] qcom-pcie a0000000.pcie:      MEM 0x00a0300000..0x00b02fffff -> 0x00a0300000
[    0.242723] qcom-pcie a0000000.pcie: iATU: unroll T, 8 ob, 8 ib, align 4K, limit 1024G
[    0.328488] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.330193] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.330262] msm_serial 78af000.serial: uartclk = 1843199
[    0.330909] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 20, base_baud = 115199) is a MSM
[    0.330963] msm_serial: console setup on port #0
[    0.331146] printk: console [ttyMSM0] enabled
[    0.378227] qcom-pcie a0000000.pcie: PCIe Gen.2 x1 link up
[    0.380116] msm_serial: driver initialized
[    0.389970] qcom-pcie a0000000.pcie: PCI host bridge to bus 0001:00
[    1.055260] pci_bus 0001:00: root bus resource [bus 00-ff]
[    1.061431] pci_bus 0001:00: root bus resource [io  0x0000-0xfffff] (bus address [0xa0200000-0xa02fffff])
[    1.066963] pci_bus 0001:00: root bus resource [mem 0xa0300000-0xb02fffff]
[    1.076653] pci 0001:00:00.0: [17cb:1004] type 01 class 0x060400
[    1.083391] pci 0001:00:00.0: reg 0x10: [mem 0x00000000-0x00000fff]
[    1.089603] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    1.098875] pci 0001:01:00.0: [17cb:1106] type 00 class 0x028000
[    1.101911] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x01ffffff 64bit]
[    1.107903] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x001fffff 64bit]
[    1.115073] pci 0001:01:00.0: PME# supported from D0 D3hot D3cold
[    1.121504] pci 0001:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0001:00:00.0 (capable of 7.876 Gb/s with 8.0 GT/s PCIe x1 link)
[    1.128029] pci 0001:00:00.0: BAR 8: assigned [mem 0xa1000000-0xa3ffffff]
[    1.142177] pci 0001:00:00.0: BAR 0: assigned [mem 0xa0300000-0xa0300fff]
[    1.149006] pci 0001:01:00.0: BAR 0: assigned [mem 0xa2000000-0xa3ffffff 64bit]
[    1.155837] pci 0001:01:00.0: BAR 2: assigned [mem 0xa1000000-0xa11fffff 64bit]
[    1.162941] pci 0001:00:00.0: PCI bridge to [bus 01-ff]
[    1.170171] pci 0001:00:00.0:   bridge window [mem 0xa1000000-0xa3ffffff]
[    1.178900] pcieport 0001:00:00.0: PME: Signaling with IRQ 21
[    1.184483] pcieport 0001:00:00.0: AER: enabled with IRQ 21
[    1.196775] loop: module loaded
[    1.200346] i2c_dev: i2c /dev entries driver
[    1.208072] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 799999 KHz, changing to: 1008000 KHz
[    1.210498] sdhci: Secure Digital Host Controller Interface driver
[    1.217772] sdhci: Copyright(c) Pierre Ossman
[    1.223860] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.233621] remoteproc remoteproc0: releasing cd00000.remoteproc
[    1.236875] NET: Registered PF_INET6 protocol family
[    1.242643] Segment Routing with IPv6
[    1.245016] In-situ OAM (IOAM) with IPv6
[    1.248592] NET: Registered PF_PACKET protocol family
[    1.252978] 8021q: 802.1Q VLAN Support v1.8
[    1.316797] remoteproc remoteproc0: cd00000.remoteproc is available
[    1.317019] qcom-q6-mpd cd00000.remoteproc: pd-1 node found
[    1.323765] remoteproc remoteproc1: pd-1 is available
[    1.327541] qcom-q6-mpd cd00000.remoteproc: pd-2 node found
[    1.334321] remoteproc remoteproc2: pd-2 is availablβ–’[    1.350160] Freeing unused kernel memory: 9472K
[    1.350285] Run /init as init process
[    2.008410] init: Console is alive
[    2.008857] init: - watchdog -
[    2.028644] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.060300] gpio_button_hotplug: loading out-of-tree module taints kernel.
[    2.076137] ssdk_dt_get_switch_node[1344]:WARN:ess-switch node[ess-switch] is disabled
[    2.076190] regi_init[2455]:INFO:ess-switch node is unavalilable
[    2.083098] ssdk_dev_event[2257]:ERROR:chip verfion get failed
[    2.089127] regi_init[2574]:INFO:qca-ssdk module init succeeded!
[    2.097762] **********************************************************
[    2.100936] * NSS Data Plane driver
[    2.107313] **********************************************************
[    2.133556] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.135775] init: - preinit -
mtd_get_mac_ascii: partition devinfo not found!
[    8.501080] random: crng init done
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
[   10.714235] procd: - early -
[   10.714506] procd: - watchdog -
[   11.286895] procd: - watchdog -
[   11.287990] procd: - ubus -
[   11.444928] procd: - init -
Please press Enter to activate this console.
[   11.876815] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.037443] urngd: v1.0.2 started.
[   12.187267] Loading modules backported from Linux version v6.11-0-g98f7e32f20d2
[   12.187312] Backport generated by backports.git v6.1.110-1-31-g35e7a9061609
[   12.232894] NET: Registered PF_QIPCRTR protocol family
[   12.364045] PPP generic driver version 2.4.2
[   12.366798] NET: Registered PF_PPPOX protocol family
[   12.386420] ath11k c000000.wifi: ipq5018 hw1.0
[   12.386468] ath11k c000000.wifi: FW memory mode: 2
[   12.444337] remoteproc remoteproc1: powering up pd-1
[   12.444651] remoteproc remoteproc1: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
[   12.448426] remoteproc remoteproc0: powering up cd00000.remoteproc
[   12.456963] remoteproc remoteproc0: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
[   12.569889] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
[   12.586933] remoteproc remoteproc1: remote processor pd-1 is now up
[   12.591018] ath11k soc@0:wifi1@c000000: qcn6122 hw1.0
[   12.592023] ath11k soc@0:wifi1@c000000: FW memory mode: 2
[   12.614851] ath11k c000000.wifi: qmi fail to get qcom,m3-dump-addr, ignore m3 dump mem req
[   12.622342] ath11k c000000.wifi: chip_id 0x0 chip_family 0x4 board_id 0xff soc_id 0xffffffff
[   12.622413] ath11k c000000.wifi: fw_version 0x270206d0 fw_build_timestamp 2022-08-04 13:28 fw_build_id WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
[   12.652187] remoteproc remoteproc2: powering up pd-2
[   12.653599] remoteproc remoteproc2: Booting fw image ath11k/IPQ5018/hw1.0/q6_fw.mdt, size 1820
[   12.667088] remoteproc remoteproc2: remote processor pd-2 is now up
[   12.682471] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.879994] ath11k c000000.wifi: qmi failed to load CAL data file:cal-ahb-c000000.wifi.bin
[   12.880839] ath11k c000000.wifi: failed to load board data file: -12
[   24.617248] ssdk_dev_event[2257]:ERROR:chip verfion get failed
[   24.617443] ssdk_dev_event[2257]:ERROR:chip verfion get failed
[   52.668184] qcom-q6-mpd cd00000.remoteproc: fatal error received: err_smem_ver.2.1:
[   52.668184] QC Image Version : QC_IMAGE_VERSION_STRING=WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
[   52.668184] Image Variant : IMAGE_VARIANT_STRING=5018.wlanfw2.map_spr_spr_evalQ
[   52.668184] dog_virtual_user.c:242 USER-PD DOG detects stalled initialization, triage with IMAGE OWNER param0 :zero,param1 :zero,param2 :zero
[   52.668184] Thread ID : 0x00000050 Thread name : TIMER_CLIENT_2 Process ID : 0x00000002 Process name :wlan1
[   52.668184]
[   52.668184] Registers:
[   52.668184] SP : 0x4bfc7020
[   52.668184] FP : 0x4bfc7030
[   52.668184] PC : 0xd025bc70
[   52.668184] SSR : 0x00000000
[   52.668184] BADVA : 0x00000000
[   52.668184] LR : 0xd000a3fc
[   52.668184]
[   52.668184] StackDump
[   52.668184] from:0x4bfc7020
[   52.668184] to: 0x00000000:
[   52.668184]
[   52.723209] remoteproc remoteproc0: crash detected in cd00000.remoteproc: type fatal error
[   52.745484] remoteproc remoteproc0: handling crash #1 in cd00000.remoteproc
[   52.753625] remoteproc remoteproc0: recovering cd00000.remoteproc
[   52.768205] remoteproc remoteproc0: stopped remote processor cd00000.remoteproc
[   52.860002] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up

1 Like

you can try these --> https://filebin.net/0fqg1rie05pbzis1.

I am not sure if the variant string is correct, i used ..

variant=TP-LINK-AX55-V1

based off of the board-tplink_eap660hd-v1.ipq8074 bdf found here -->

A strings on the above bdf produces ...

bus=ahb,qmi-chip-id=0,qmi-board-id=255,variant=TP-Link-EAP660-HD-v1m

Also, I am not sure what you've named the board in your ipq-wifi makefile, but you'll need to rename the bins to match ...ie

using the b3000 for an example, I named it glinet_gl-b3000 in my makefile, so the bdf's are named .. board-glinet_gl-b3000.ipq5018 and board-glinet_gl-b3000.qcn6122.

you dts will need to match the same variant string I used, and you'll also need to comment out the id's in the wifi nodes ..ie

// Can be overridden by /etc/hotplug.d/firmware/10-ath11k-board_id
	//qcom,board_id = <0x24>;

qcom,ath11k-calibration-variant = "TP-LINK-AX55-V1";
...

// Can be overridden by /etc/hotplug.d/firmware/10-ath11k-board_id
	//qcom,board_id = <0x60>;

qcom,ath11k-calibration-variant = "TP-LINK-AX55-V1";
1 Like

OK, moving to 6.x kernel and new problems begin..

This router has an rtl8367s switch. In the old dts file, it was configured like this:

rtl8367b {
compatible = "realtek,rtl8367s";
		realtek,extif1 = <0 0 10 1 0 0 1 1 4>;
		mii-bus = <&mdio1>;
		cpu-port = <6>;
		phy_id = <29>;
	};

how can I configure it for a new kernel so that it works through DSA?
Old config:

rtl8367b {
		compatible = "realtek,rtl8367s";
		realtek,extif1 = <0 0 10 1 0 0 1 1 4>;
		mii-bus = <&mdio1>;
		cpu-port = <6>;
		phy_id = <29>;
	};

......

&soc {
	ess-instance {
		num_devices = <0x1>;

		ess-switch@0x39c00000 {
			compatible = "qcom,ess-switch-ipq50xx";
			device_id = <0>;

			cmnblk_clk = "internal_96MHz";

			switch_mac_mode = <0xc>; // PORT_WRAPPER_SGMII_PLUS

			qcom,port_phyinfo {
				port@0 {
				 	port_id = <1>;
					phy_address = <7>;
				};
				
				port@1 {
					port_id = <2>;
					forced-speed = <2500>;
					forced-duplex = <1>;
				};
			};
		};
	};
	
	mac1: dp2 {
		compatible = "qcom,nss-dp";
		device_type = "network";
		qcom,id = <2>;

		reg = <0x39D00000 0x10000>;
		interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
		clock-names = "nss-snoc-gmac-axi-clk";

		qcom,mactype = <2>; // GMAC_HAL_TYPE_SYN_GMAC
		local-mac-address = [000000000000];
		phy-mode = "sgmii";
	};

.........

&mdio0 {
	status = "ok";	

	resets = <&gcc GCC_GEPHY_MDC_SW_ARES>;
	reset-names = "phy";

	// IPQ5018 GE Phy -> QCA8337 Phy4
	ge_phy: ethernet-phy@0 {
		reg = <7>;
	};
};

&mdio1 {
	pinctrl-0 = <&mdio1_pins>;
	pinctrl-names = "default";
	//reset-gpios = <&tlmm 21 0>;
	status = "ok";
};

02_network old config:

tplink,ax55v1)
			ucidef_add_switch "switch0" \
				"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
			;;

I'm at a bit loss, please tell me where to start? In the OEM firmware, swconfig shows the presence of only one switch: switch0 - "QCA MP"

Ok, realtek switch working only on 5.15 kernel. On 6.6.x it's not even initializing..
I assume that the DTS port configuration and the 02_network file need to be modified for the 6.6.x kernel and DSA. However, I’m not sure how to do this with the Realtek chip yet.


is there even a dsa driver for your switch? In the linux source I see two only:

static const struct of_device_id realtek_smi_of_match[] = {
#if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8366RB)
	{
		.compatible = "realtek,rtl8366rb",
		.data = &rtl8366rb_variant,
	},
#endif
#if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8365MB)
	{
		.compatible = "realtek,rtl8365mb",
		.data = &rtl8365mb_variant,
	},
#endif
	{ /* sentinel */ },
};

EDIT: there seems to be support for it, see the TPLink Archer C5v4: openwrt/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts at main Β· openwrt/openwrt

you may need to import some of the patches for that target (ramips) as well.

1 Like

Yes, thank you! Will try. It's working on 5.4 and 5.15 with patches. But I am at a loss why there is not a single mention of this switch in the OEM dts? everything is configured to work via qca 83xx. However, the initialization process of rtl8367s is visible in the bootloader via UART. It made me nervous.. Here is an example of OEM configuration:

ess-switch1@1 {
				compatible = "qcom,ess-switch-qca83xx";
				device_id = <0x01>;
				switch_access_mode = "mdio";
				mdio-bus = <0x08>;
				reset_gpio = <0x27>;
				switch_cpu_bmp = <0x40>;
				switch_lan_bmp = <0x1e>;
				switch_wan_bmp = <0x00>;
				qca,ar8327-initvals = <0x04 0x7600000 0x08 0x1000000 0x0c 0x80 0x10 0x2613a0 0xe4 0xaa545 0xe0 0xc74164de 0x7c 0x4e 0x94 0x4e>;

				qcom,port_phyinfo {

					port@0 {
						port_id = <0x01>;
						phy_address = <0x00>;
					};

					port@1 {
						port_id = <0x02>;
						phy_address = <0x01>;
					};

					port@2 {
						port_id = <0x03>;
						phy_address = <0x02>;
					};

					port@3 {
						port_id = <0x04>;
						phy_address = <0x03>;
					};
				};
			};
		};

And here is log from UART uboot:

Net:   cmbblk is stable 5
MAC0 addr:0:11:22:33:44:55
PHY ID1: 0x4d
PHY ID2: 0xd0c0
MAC1 addr:0:11:22:33:44:56
rtk_switch_init ret = 0!!!!!!!!!!!!
rtk_vlan_init ret = 0!!!!!!!!!!!!
Set RTL8367S SGMII 2.5Gbps
rtk_port_macForceLinkExt_set ret = 0!!!!!!!!!!!!
rtk_port_sgmiiNway_set ret = 0!!!!!!!!!!!!
eth0, eth1

How is it possible?

uboot uses its own dts, not the one that the Linux kernel loads.

Your device doesn’t have a qca8337 switch, so the dts you have is not correct. Where did you get it from?

I extract it from device DTB by ssh. And if i call swconfig in OEM firmware, it shows only one switch called "QCA MP".
Here is patch, thats make rtl8367s working, but it for old kernel 5.4:
net-phy-add-rtl8367s

Here is log from OEM firmware where we can see switch node related process

 ssdk_switch_device_num_init[1159]:INFO:ess-switch dts node number: 2
[   14.778877] ssdk_dt_get_switch_node[970]:INFO:ess-switch DT exist!
[   14.785290] ssdk_dt_parse_access_mode[856]:INFO:switch_access_mode: local bus
[   14.791350] ssdk_dt_parse_access_mode[869]:INFO:switchreg_base_addr: 0x39c00000
[   14.798508] ssdk_dt_parse_access_mode[870]:INFO:switchreg_size: 0x200000
[   14.805601] ssdk_dt_parse_mac_mode[295]:INFO:mac mode = 0xc
[   14.812570] ssdk_dt_parse_mac_mode[301]:INFO:mac mode1 doesn't exit!
[   14.817926] ssdk_dt_parse_mac_mode[310]:INFO:mac mode2 doesn't exit!
[   14.824454] ssdk_dt_parse_port_bmp[757]:INFO:port_bmp doesn't exist!
[   14.830837] ssdk_dt_parse_uniphy[332]:INFO:ess-uniphy DT exist!
[   14.837137] ssdk_dt_parse_led[943]:INFO:current dts led_source_num is 1
[   14.842770] ssdk_plat_init start
[   17.256032] ssdk_mp_reset_init[739]:INFO:MP reset successfully!
[   17.256093] ssdk_gcc_clock_init[1033]:INFO:SSDK gcc clock init successfully!
[   17.261992] mpge_phy_api_ops_init[1089]:INFO:qca probe mpge phy driver succeeded!
[   17.268488] regi_init[5721]:INFO:Initializing SCOMPHY!
[   18.402110] ssdk_led_init[152]:INFO:ssdk_led_mode:3, ssdk_led_map:ffc, ssdk_led_src_id:0
[   18.402242] ssdk_switch_register[1710]:INFO:Chip version 0xee
[   18.409315] qca_link_polling_select[1315]:INFO:link-polling-required node does not exist
[   18.414903] ssdk_switch_register[1744]:INFO:polling is selected
[   18.423117] regi_init[5731]:INFO:Initializing SCOMPHY Done!!
[   18.428752] ssdk_dt_get_switch_node[970]:INFO:ess-switch DT exist!
[   18.434611] ssdk_dt_parse_access_mode[856]:INFO:switch_access_mode: mdio
[   18.440614] ssdk_dt_parse_mac_mode[292]:INFO:mac mode doesn't exit!
[   18.447466] ssdk_dt_parse_mac_mode[301]:INFO:mac mode1 doesn't exit!
[   18.453443] ssdk_dt_parse_mac_mode[310]:INFO:mac mode2 doesn't exit!
[   18.460083] ssdk_dt_parse[1061]:INFO:switch node is qca83xx!
[   18.466389] ssdk_plat_init start
[   19.396009] rtl8367_gpio_reset[3618]:INFO:GPIO33 reset switch done
[   19.396261] find rtk switch 0...................
[   19.411123] phy patch set Done.
[   19.426765] set portAcceptFrameType failed...ret=3
[   19.426780] rtk_switch_init ok, go on vlan_init..............
[   19.430433] regi_init[5809]:INFO:qca-ssdk module init, no device found!
[   19.465677] tun: Universal TUN/TAP device driver, 1.6
[   19.465702] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   19.546781] PPP MPPE Compression module registered
[   19.597923] **********************************************************
[   19.597949] * NSS Data Plane driver
[   19.603334] **********************************************************
[   20.031943] l2tp_core: L2TP core driver, V2.0
[   20.043319] l2tp_netlink: L2TP netlink interface
[   20.206399] nss_driver - fw of size 764748  bytes copied to load addr: 40000000, nss_id : 0
[   20.207795] Supported Frequencies -
[   20.213544] 850 MHz 1 GHz
[   20.219181]
[   20.220100] 7f622500: set sdma 9d4cad00
[   20.221830] node size 2 # items 4
[   20.225094] memory: 40000000 536870912 (avl 447524864) items 4 active_cores 1
[   20.228615] addr/size storage words 2 2 # words 4 in DTS, ddr size 1000000
[   20.235684] 7f622500: NSS core 0 DDR from 40000000 to 41000000
[   20.242584] 7f622500: meminfo init succeed
[   20.279325] node size 2 # items 4
[   20.279357] memory: 40000000 536870912 (avl 447524864) items 4 active_cores 1
[   20.281622] addr/size storage words 2 2 # words 4 in DTS, ddr size 1000000
[   20.288777] 7f622500: nss core 0 booted successfully
[   20.316443] sit: IPv6 over IPv4 tunneling driver
[   20.450469] gre: GRE over IPv4 demultiplexor driver
[   20.483757] ip_gre: GRE over IPv4 tunneling driver
[   20.539580] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[   20.594887] init tp_hyfi_nss_acc_timer
[   20.594944] mc_netlink_init NETLINK_QCA_MC:27QCA Hy-Fi multicast installation successfully
[   20.601641] QCA Hy-Fi netfilter installation: OK
[   20.605769] DEBUG_LEVEL:1
[   20.720843] ip_tables: (C) 2000-2006 Netfilter Core Team
[   20.898431] NET: Registered protocol family 24
[   20.957728] SCSI subsystem initialized
[   21.059927] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   21.071382] ehci-platform: EHCI generic platform driver
[   21.148711] nf_conntrack version 0.5.0 (5937 buckets, 23748 max)
[   21.349564] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   21.361861] PPTP driver version 0.8.5
[   22.240474] nf_conntrack_rtsp v0.6.21 loading
[   22.252788] nf_nat_rtsp v0.6.21 loading
[   22.393528] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   22.538630] ctnetlink v0.93: registering with nfnetlink.
[   22.584002] openvswitch: Open vSwitch switching datapath
[   22.714977] nat46: module (version 8ff2ae59ec9840a7b8b45f976c51cae80abe0226) loaded.
[   22.934829] nss_lag_init[352]:LAG Manager Installed
[   23.076062] QCA multicast snooping installed successfully
[   23.115484] <NSS-CRYPTO>:module loaded Build_ID - 06/22/24, 15:00:18 SoC=ipq50xx
[   23.151968] cannot find nss-macsec0 node
[   23.152085] cannot find nss-macsec1 node
[   23.155009] cannot find nss-macsec2 node
[   23.159005] nss_macsec init success
[   23.377583] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   23.389666] ohci-pci: OHCI PCI platform driver
[   23.402565] ohci-platform: OHCI generic platform driver
[   23.692578] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   23.692636] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   23.697316] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe65 hci version 0x110 quirks 0x00010010
[   23.704557] xhci-hcd xhci-hcd.0.auto: irq 188, io mem 0x08a00000
[   23.715285] hub 1-0:1.0: USB hub found
[   23.719562] hub 1-0:1.0: 1 port detected
[   23.723458] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   23.727154] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   23.732469] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   23.741823] hub 2-0:1.0: USB hub found
[   23.749010] hub 2-0:1.0: 1 port detected
[   24.178646] u32 classifier
[   24.178669]     input device check on
[   24.180271]     Actions configured
[   24.239742] Mirror/redirect action on
[   24.784268] vmap allocation for size 77824 failed: use vmalloc=<size> to increase size.
[   24.831488] vmap allocation for size 151552 failed: use vmalloc=<size> to increase size.
[   24.834581] wireguard: enabled KERNEL_MODE_NEON success
[   24.838733] wireguard: enabled NEON success
[   24.844798] wireguard: WireGuard 1.0.20211208 loaded. See www.wireguard.com for information.
[   24.847809] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   24.980326] IOT security netfilter installation: OK
[   24.980413] DEBUG_LEVEL:1
[   24.984023] ISO_HASH_SIZE:64
[   25.013657] vmap allocation for size 53248 failed: use vmalloc=<size> to increase size.
[   25.024035] usbcore: registered new interface driver usb-storage
[   25.070528] usbcore: registered new interface driver uas

I managed to disassemble the TP-Link AX80 firmware using your utility. However, I have not found a way to enable telnet/ssh. Can you tell me the right way?

Hello! Amazing job so far! I managed to build OpenWRT for the AX55 from your repository, and produced the same types of images that you described above. How did you manage to get OpenWRT running on the device? I tried a couple methods so far to no avail... Thanks!

EDIT: I forgot to mention; I have been working on my AX55 the last some days and then stumbled on this thread (of course, much more progress has happened here than what I have done), so I am willing to help in any way I can!

Good morning I saw it on the official website Tp-link source code gpl for different routers But I didn't find this for our router, the question is if I make a request for this source code, will it somehow help the development?

Hi. The source code is available on the TP-Link website https://static.tp-link.com/upload/gpl-code/2022/202208/20220829/GPL_AX55v1.tar.gz
That's not the problem.

By the way, I also saw an interesting tree on GitHub Are you familiar with this? https://github.com/N1kroks/openwrt-tplink-ax55?ysclid=m3zjhcum16710541495