Hi all,
Recently I was trying to build a custom image for this practically antique router (TP LINK TL-WR741ND, seems like v2, based on AR72xx). My main goal is to repurpose it as p910nd print server. I managed to install the USB socket on the board and attach it to the SoC (following the "USB host mod" guide on the device page), and I also updated the RAM to 64 megs.
I'm building 21.02.5 since there are existing configs that work; I initially tried to build 22.03.3 but I had issues.
Since the device page was written quite some time ago I didn't try to apply USB patches mentioned there - I just updated the device tree to enable the USB and USB-PHY:
...
&usb_phy {
status = "ok";
};
&usb {
status = "ok";
};
The results are promising, but not complete. Driver seems to load and detect USB insertion, however it fails with:
[ 6.949330] ohci-platform 1b000000.usb: Generic Platform OHCI controller
[ 6.956173] ohci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[ 6.964114] ohci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[ 8.744853] usb 1-1: new full-speed USB device number 2 using ohci-platform
[ 9.056825] ohci-platform 1b000000.usb: frame counter not updating; disabled
[ 9.063907] ohci-platform 1b000000.usb: HC died; cleaning up
[ 13.824989] usb usb1-port1: attempt power cycle
And after that it stops reacting to USB actions at all.
I tried taking existing, older images with USB support and it worked - so I don't have many doubts in my hardware setup. This is a part of dmesg of a firmware found on the 4pda.ru, compiled by one of the forum members:
root@Fazenda:~# dmesg | grep usb
[ 6.460122] usbcore: registered new interface driver usbfs
[ 6.465861] usbcore: registered new interface driver hub
[ 6.471347] usbcore: registered new device driver usb
[ 7.202545] usb 1-1: new full-speed USB device number 2 using ohci-platform
[ 14.904268] usbcore: registered new interface driver cdc_wdm
[ 15.040387] usbcore: registered new interface driver usbserial
[ 15.046498] usbcore: registered new interface driver usbserial_generic
[ 15.053182] usbserial: USB Serial support registered for generic
[ 15.144420] usbcore: registered new interface driver cdc_ether
[ 15.166346] usbcore: registered new interface driver cdc_ncm
[ 15.215490] usbcore: registered new interface driver huawei_cdc_ncm
[ 15.312924] usbcore: registered new interface driver qmi_wwan
[ 15.322769] usbcore: registered new interface driver rndis_host
[ 15.371447] usbcore: registered new interface driver ipw
[ 15.377032] usbserial: USB Serial support registered for IPWireless converter
[ 15.392648] usbcore: registered new interface driver qcserial
[ 15.398682] usbserial: USB Serial support registered for Qualcomm USB modem
[ 206.160794] usb 1-1: USB disconnect, device number 2
[ 206.665697] usb 1-1: new full-speed USB device number 3 using ohci-platform
[ 206.936133] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-ohci-platform-1, RNDIS device, xx:xx:xx:xx:xx:xx
So clearly HW works. Is there a known regression in kernel ~5.4.x that may mess up this OHCI adapter? Am I missing something?