Thank you @16F84 Whole bunch of USB stuff is indeed missing from my dmesg, namely:
ar7200-usb-phy 18030000.usb-phy0: phy reset is missing
ar7200-usb-phy 18030010.usb-phy1: phy reset is missing
and
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ehci-platform 1b000000.usb: EHCI Host Controller
ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000
ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci-platform 1b400000.usb: EHCI Host Controller
ehci-platform 1b400000.usb: new USB bus registered, assigned bus number 2
ehci-platform 1b400000.usb: irq 15, io mem 0x1b400000
ehci-platform 1b400000.usb: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
For completness, here's my complete dmesg:
[ 0.000000] Linux version 4.14.221 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11306-c4a6851c72)) #0 Mon Feb 15 15:22:37 2021
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[ 0.000000] MIPS: machine is TP-Link Archer C6 v2
[ 0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, 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] On node 0 totalpages: 32768
[ 0.000000] free_area_init_node: node 0, pgdat 804fdf80, node_mem_map 81008000
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] random: get_random_bytes called from 0x80501740 with crng_init=0
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[ 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: 123300K/131072K available (4037K kernel code, 163K rwdata, 532K rodata, 1212K init, 212K bss, 7772K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] CPU clock: 775.000 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4932285024 ns
[ 0.000007] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every 5541893118ns
[ 0.008238] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[ 0.074781] pid_max: default: 32768 minimum: 301
[ 0.079805] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.086795] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.097705] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.108100] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.114593] pinctrl core: initialized pinctrl subsystem
[ 0.122159] NET: Registered protocol family 16
[ 0.129642] PCI host bridge /ahb/pcie-controller@18250000 ranges:
[ 0.136123] MEM 0x0000000012000000..0x0000000013ffffff
[ 0.141625] IO 0x0000000000000000..0x0000000000000000
[ 0.161262] PCI host bridge to bus 0000:00
[ 0.165587] pci_bus 0000:00: root bus resource [mem 0x12000000-0x13ffffff]
[ 0.172871] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.178742] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.185906] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.194278] pci 0000:00:00.0: [168c:0056] type 00 class 0x028000
[ 0.194334] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[ 0.194455] pci 0000:00:00.0: PME# supported from D0 D3hot
[ 0.194626] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 0.194649] pci 0000:00:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
[ 0.204955] clocksource: Switched to clocksource MIPS
[ 0.211172] NET: Registered protocol family 2
[ 0.216544] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.223892] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.230647] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.237485] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.243650] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.250511] NET: Registered protocol family 1
[ 0.255179] PCI: CLS 0 bytes, default 32
[ 0.257730] Crashlog allocated RAM at address 0x3f00000
[ 0.264382] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 0.275471] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.281616] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.300226] io scheduler noop registered
[ 0.304363] io scheduler deadline registered (default)
[ 0.311459] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[ 0.319744] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.328524] console [ttyS0] disabled
[ 0.332328] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 1562500) is a 16550A
[ 0.341460] console [ttyS0] enabled
[ 0.349023] bootconsole [early0] disabled
[ 0.367111] m25p80 spi0.0: gd25q64 (8192 Kbytes)
[ 0.371925] 5 fixed-partitions partitions found on MTD device spi0.0
[ 0.378529] Creating 5 MTD partitions on "spi0.0":
[ 0.383487] 0x000000000000-0x000000020000 : "u-boot"
[ 0.389312] 0x000000020000-0x000000030000 : "mac"
[ 0.394797] 0x000000030000-0x0000007d0000 : "firmware"
[ 0.403192] 2 uimage-fw partitions found on MTD device firmware
[ 0.409353] Creating 2 MTD partitions on "firmware":
[ 0.414486] 0x000000000000-0x000000190000 : "kernel"
[ 0.420287] 0x000000190000-0x0000007a0000 : "rootfs"
[ 0.426051] mtd: device 4 (rootfs) set to be root filesystem
[ 0.431929] 1 squashfs-split partitions found on MTD device rootfs
[ 0.438356] 0x000000480000-0x0000007a0000 : "rootfs_data"
[ 0.444579] 0x0000007d0000-0x0000007f0000 : "tplink"
[ 0.450401] 0x0000007f0000-0x000000800000 : "art"
[ 0.456943] libphy: Fixed MDIO Bus: probed
[ 1.135322] libphy: ag71xx_mdio: probed
[ 1.142281] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus.0
[ 1.796423] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[ 1.808030] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: sgmii
[ 1.816758] NET: Registered protocol family 10
[ 1.826167] Segment Routing with IPv6
[ 1.830040] NET: Registered protocol family 17
[ 1.834668] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 1.848083] 8021q: 802.1Q VLAN Support v1.8
[ 1.853800] hctosys: unable to open rtc device (rtc0)
[ 1.864267] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 1.878342] Freeing unused kernel memory: 1212K
[ 1.883022] This architecture does not have kernel memory protection.
[ 2.518386] init: Console is alive
[ 2.522091] init: - watchdog -
[ 2.564989] random: fast init done
[ 3.554667] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 3.594453] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 3.612721] init: - preinit -
[ 4.420945] random: jshn: uninitialized urandom read (4 bytes read)
[ 4.529922] random: jshn: uninitialized urandom read (4 bytes read)
[ 4.700572] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.037592] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 6.043686] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[ 6.084474] urandom_read: 4 callbacks suppressed
[ 6.084481] random: procd: uninitialized urandom read (4 bytes read)
[ 7.076283] eth0: link up (1000Mbps/Full duplex)
[ 7.081141] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 7.087948] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[ 9.318470] jffs2: notice: (458) jffs2_build_xattr_subsystem: complete building xattr subsystem, 10 of xdatum (0 unchecked, 7 orphan) and 53 of xref (9 dead, 0 orphan) found.
[ 9.338071] mount_root: switching to jffs2 overlay
[ 9.362661] overlayfs: upper fs does not support tmpfile.
[ 9.388969] urandom-seed: Seeding with /etc/urandom.seed
[ 9.485386] eth0: link down
[ 9.505003] procd: - early -
[ 9.508831] procd: - watchdog -
[ 10.132120] procd: - watchdog -
[ 10.135686] procd: - ubus -
[ 10.196626] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.204689] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.212441] procd: - init -
[ 11.165649] kmodloader: loading kernel modules from /etc/modules.d/*
[ 11.200727] urngd: v1.0.2 started.
[ 11.351813] usbcore: registered new interface driver usbfs
[ 11.357601] usbcore: registered new interface driver hub
[ 11.363181] usbcore: registered new device driver usb
[ 11.425737] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 11.448338] random: crng init done
[ 11.575252] SCSI subsystem initialized
[ 11.626447] ehci-platform: EHCI generic platform driver
[ 11.719047] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 11.740488] ehci-pci: EHCI PCI platform driver
[ 11.766638] uhci_hcd: USB Universal Host Controller Interface driver
[ 11.787990] Loading modules backported from Linux version v4.19.161-0-gdaefdc9eb24b
[ 11.795948] Backport generated by backports.git v4.19.161-1-0-g4bb568fe
[ 11.834828] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 11.851079] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[ 11.973964] usbcore: registered new interface driver usb-storage
[ 12.026722] xt_time: kernel timezone is -0000
[ 12.129656] PPP generic driver version 2.4.2
[ 12.145975] NET: Registered protocol family 24
[ 12.165574] usbcore: registered new interface driver uas
[ 12.237904] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x56.
[ 12.255912] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[ 12.262060] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[ 12.485802] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/fwcfg-pci-0000:00:00.0.txt failed with error -2
[ 12.496717] ath10k_pci 0000:00:00.0: Falling back to user helper
[ 12.838472] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed
[ 12.851533] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-5.bin failed with error -2
[ 12.862899] ath10k_pci 0000:00:00.0: Falling back to user helper
[ 13.042161] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[ 13.052021] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-2.bin failed with error -2
[ 13.063381] ath10k_pci 0000:00:00.0: Falling back to user helper
[ 13.247981] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[ 13.257811] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/firmware-6.bin failed with error -2
[ 13.268896] ath10k_pci 0000:00:00.0: Falling back to user helper
[ 13.447916] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[ 14.040832] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[ 14.050399] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[ 14.070430] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-13-8c5b2baa2 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 cbf49903
[ 14.405997] ath10k_pci 0000:00:00.0: failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=20 from ath10k/QCA9888/hw2.0/board-2.bin
[ 14.420047] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:20 crc32 5180ee40
[ 16.472589] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16 peers: 48 tid: 96
[ 16.480370] ath10k_pci 0000:00:00.0: msdu-desc: 2500 skid: 32
[ 16.510728] ath10k_pci 0000:00:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186 msdu-desc: 2500 sw-crypt: 0 ct-sta: 0'
[ 16.522048] ath10k_pci 0000:00:00.0: wmi print 'free: 114572 iram: 12804 sram: 29508'
[ 16.732079] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[ 16.847885] ath: EEPROM regdomain: 0x0
[ 16.847892] ath: EEPROM indicates default country code should be used
[ 16.847895] ath: doing EEPROM country->regdmn map search
[ 16.847908] ath: country maps to regdmn code: 0x3a
[ 16.847913] ath: Country alpha2 being used: US
[ 16.847916] ath: Regpair used: 0x3a
[ 16.918775] ath: EEPROM regdomain: 0x0
[ 16.918783] ath: EEPROM indicates default country code should be used
[ 16.918786] ath: doing EEPROM country->regdmn map search
[ 16.918799] ath: country maps to regdmn code: 0x3a
[ 16.918804] ath: Country alpha2 being used: US
[ 16.918807] ath: Regpair used: 0x3a
[ 16.931550] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 16.933089] ieee80211 phy1: Atheros AR9561 Rev:0 mem=0xb8100000, irq=2
[ 17.038563] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 27.441258] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 27.448757] eth0: link up (1000Mbps/Full duplex)
[ 27.453550] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 27.482294] br-lan: port 1(eth0.1) entered blocking state
[ 27.488056] br-lan: port 1(eth0.1) entered disabled state
[ 27.493885] device eth0.1 entered promiscuous mode
[ 27.498887] device eth0 entered promiscuous mode
[ 27.565072] br-lan: port 1(eth0.1) entered blocking state
[ 27.570656] br-lan: port 1(eth0.1) entered forwarding state
[ 27.576595] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 27.817685] br-wan: port 1(eth0) entered blocking state
[ 27.823094] br-wan: port 1(eth0) entered disabled state
[ 27.846826] br-wan: port 1(eth0) entered blocking state
[ 27.852233] br-wan: port 1(eth0) entered forwarding state
[ 27.897969] br-wan: port 2(eth0.2) entered blocking state
[ 27.903555] br-wan: port 2(eth0.2) entered disabled state
[ 27.950686] device eth0.2 entered promiscuous mode
[ 27.969950] br-wan: port 2(eth0.2) entered blocking state
[ 27.975576] br-wan: port 2(eth0.2) entered forwarding state
[ 28.515276] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 33.232962] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16 peers: 48 tid: 96
[ 33.240758] ath10k_pci 0000:00:00.0: msdu-desc: 2500 skid: 32
[ 33.270898] ath10k_pci 0000:00:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186 msdu-desc: 2500 sw-crypt: 0 ct-sta: 0'
[ 33.282221] ath10k_pci 0000:00:00.0: wmi print 'free: 114572 iram: 12804 sram: 29508'
[ 33.570036] ath10k_pci 0000:00:00.0: Firmware lacks feature flag indicating a retry limit of > 2 is OK, requested limit: 4
[ 33.581630] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 33.606288] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 33.644712] br-lan: port 2(wlan1) entered blocking state
[ 33.650344] br-lan: port 2(wlan1) entered disabled state
[ 33.656315] device wlan1 entered promiscuous mode
[ 33.661265] br-lan: port 2(wlan1) entered blocking state
[ 33.666815] br-lan: port 2(wlan1) entered forwarding state
[ 33.677987] br-lan: port 3(wlan0) entered blocking state
[ 33.683609] br-lan: port 3(wlan0) entered disabled state
[ 33.689439] device wlan0 entered promiscuous mode
[ 34.231286] ath10k_pci 0000:00:00.0: NOTE: Firmware DBGLOG output disabled in debug_mask: 0x10000000
[ 34.595009] br-lan: port 2(wlan1) entered disabled state
[ 40.733435] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[ 40.740226] br-lan: port 2(wlan1) entered blocking state
[ 40.745758] br-lan: port 2(wlan1) entered forwarding state
[ 41.628088] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 41.635031] br-lan: port 3(wlan0) entered blocking state
[ 41.640549] br-lan: port 3(wlan0) entered forwarding state
@AndrewZ Yeah, I was afraid that it was going to be at least something like that, having to rebuild my own image with the USB support. I don't really know how to go about that, though.
I went through Beginners guide to building your own firmware and Quick Image Building Guide and I looked through menuconfig and kernel_menuconfig, trying to enable any options that sounded promising. I successfully built and loaded the firmware, but sadly it did not help.
Here's the list of options I enabled via make menuconfig, after selecting the Archer C6 v2 as target profile:
Kernel modules
Filesystems
kmod-fs-ext4
USB support
kmod-usb-core
kmod-usb-storage
kmod-usb-ohci
kmod-usb-uhci
kmod-usb2
and the same for make kernel_config:
Device Drivers
SCSI device support
SCSI device support
USB support
Support for Host-side USB
USB announce new devices
EHCI HCD (USB 2.0) support
Root Hub Transaction Translators
Improved Transaction Translator scheduling
Generic EHCI driver for a platform device
OHCI HCD (USB 1.1) support
Generic OHCI driver for a platform device
USB Mass Storage support
USB Attached SCSI
Dmesg output is still nearly the same in that, apart from more drivers being registered, there's still no sign of any USB root hub being detected:
root@OpenWrt:~# dmesg | grep 'usb\|uhci\|ehci\|ohci'
[ 0.172187] usbcore: registered new interface driver usbfs
[ 0.178088] usbcore: registered new interface driver hub
[ 0.183757] usbcore: registered new device driver usb
[ 1.843181] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.849966] ehci-pci: EHCI PCI platform driver
[ 1.854637] ehci-platform: EHCI generic platform driver
[ 1.860147] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.866571] ohci-platform: OHCI generic platform driver
[ 1.873484] usbcore: registered new interface driver uas
[ 1.879103] usbcore: registered new interface driver usb-storage
[ 3.995223] uhci_hcd: USB Universal Host Controller Interface driver
and lsusb is still giving the same error:
root@OpenWrt:~# lsusb
unable to initialize libusb: -99
I am not sure how to go about comparing differences in configuration between the C6 and C7, or where any other configuration needs to be changed and how.
Needless to say, I am not fond of risking bricking the router by flashing C7 firmware. Though, I do have a JTAG probe in case everything else fails - let's call that "plan-Z".