USB USB2514B not responding with CM3

Hi,

I have an issue regarding the USB on the Radxa Rock 3 CM3. We’ve developed an specific carrier board for a project and we are having issues with the USB. The system is not recognizing the usb and when trying to list the usb devices using lusb, the message returned is “lusb not found”.
The schematic used is a copy of the Raspberry Pi CM4 board because we need that this carrier board has to be compatible with Pi CM4. Here is the schematic implemented.


The tags CM4_USB2_N and CM4_USB2_P are connected to the pins 103 and 105 of CN2.
Checking the board, there is no USB +5V on the USB connectors, so both power switches AP2171W are not enabled because signal USB2_PWRX_EN is low. The issue seems to be located in the USB hub, that sems not enabled. I’ve checked RESET_N voltage pin and is high.

Also, we’ve followed the indications of this topic but still there is no response on the usb hub.
CM3 compatible boards with working USB? - ROCK 3 Series / CM3 - Radxa Forum

If someone can point some light to this issue. I would be very grateful.

Many thanks.

Regards,

That should be correct regardless of how good your USB implementation is - there is no such command lusb.

The correct command is lsusb.

When I look at your schematic, the whole schema is controlled by the switch U9. But I fail to understand what is driving the selection between SEL = H and SEL = L ??? The state of USB2_PWRx_EN is not a good indicator if the circuit is correct, because it is driven by the hub IC U7, and then only if a device is plugged into the dual connector… The hub should be on at all times and thus seen by the CPU upon boot. Have you checked if there is power on the chip? Is the oscillator/crystal working? And can you provide a boot log from your test rig, e.g. dmesg output?..

The provided information is not nearly enough to diagnose the issue.

@chuvihi

In addition, I have been trying to use a CM3 module with Bigtreetech PI4B adapter, and also having issues with USB not working. After comparing schematics of the PI4B base and the Radxa CM3 IO base board, I noticed that the CM3 has an additional pin labeled USB_OTG0_VBUSDET, which the CM4 does not have/expect… and this pin is on connector 3 (the one on the side). It looks to me as if the RK3566 is expecting this input and the Broadcom chip does not.

Also, when comparing the USB hub part of the schematics (PI4B vs CM3 IO), they are virtually identical with respect to ICs and connections, except that the CM3 IO board is routing this to connector 3 as well.

For your reference: CM3 IO board schematic. The USB hub and USB OTG schematic is on page 12; connector 2 (identical to CM4) is on page 18; connector 3 (which CM4 modules do not have) is on page 19.

When I look through my boot messages (e.g. sudo dmesg | grep -i usb), I see the following:

[    0.452195] phy phy-fe8a0000.usb2-phy.0: Looking up phy-supply from device tree
[    0.452213] phy phy-fe8a0000.usb2-phy.0: Looking up phy-supply property in node /usb2-phy@fe8a0000/host-port failed
[    0.452365] phy phy-fe8a0000.usb2-phy.1: Looking up phy-supply from device tree
[    0.452378] phy phy-fe8a0000.usb2-phy.1: Looking up phy-supply property in node /usb2-phy@fe8a0000/otg-port failed
[    0.452505] phy phy-fe8a0000.usb2-phy.1: Looking up vbus-supply from device tree
[    0.452517] phy phy-fe8a0000.usb2-phy.1: Looking up vbus-supply property in node /usb2-phy@fe8a0000/otg-port failed
[    0.452530] phy phy-fe8a0000.usb2-phy.1: No vbus specified for otg port
[    0.454543] extcon extcon1: failed to create extcon usb2-phy link
[    0.454646] phy phy-fe8b0000.usb2-phy.2: Looking up phy-supply from device tree
[    0.454660] phy phy-fe8b0000.usb2-phy.2: Looking up phy-supply property in node /usb2-phy@fe8b0000/host-port failed
[    0.454801] phy phy-fe8b0000.usb2-phy.3: Looking up phy-supply from device tree
[    0.454815] phy phy-fe8b0000.usb2-phy.3: Looking up phy-supply property in node /usb2-phy@fe8b0000/otg-port failed
[    0.455010] phy phy-fe8b0000.usb2-phy.3: Looking up vbus-supply from device tree
[    0.455023] phy phy-fe8b0000.usb2-phy.3: Looking up vbus-supply property in node /usb2-phy@fe8b0000/otg-port failed
[    0.455037] phy phy-fe8b0000.usb2-phy.3: No vbus specified for otg port

I tried both the original rk3566-radxa-cm3-io.dtb and then the rk3566-radxa-cm3-rpi-cm4-io.dtb, and neither worked. We probably need to somehow fix the DTB, to let the kernel know not to expect a value there and always work in a certain configuration. I still need to investigate more.

Hi tnt, many thanks for your response.

Sorry about the command, I was writing it using my memory and is not so good.

The SEL input depends on the VBUS from the USB OTG Connector. If USB OTG is connected, then HSD2 is selected. This is working because I’m able to flash the eMMC image using the USB OTG connector.

root@radxa-cm3-io:/home/rock# dmesg | grep -i usb
[    0.139586] usbcore: registered new interface driver usbfs
[    0.139674] usbcore: registered new interface driver hub
[    0.139772] usbcore: registered new device driver usb
[    0.654365] phy phy-fe8a0000.usb2-phy.0: Looking up phy-supply from device tree
[    0.654382] phy phy-fe8a0000.usb2-phy.0: Looking up phy-supply property in node /usb2-phy@fe8a0000/host-port failed
[    0.654538] phy phy-fe8a0000.usb2-phy.1: Looking up phy-supply from device tree
[    0.654551] phy phy-fe8a0000.usb2-phy.1: Looking up phy-supply property in node /usb2-phy@fe8a0000/otg-port failed
[    0.654669] phy phy-fe8a0000.usb2-phy.1: Looking up vbus-supply from device tree
[    0.654682] phy phy-fe8a0000.usb2-phy.1: Looking up vbus-supply property in node /usb2-phy@fe8a0000/otg-port failed
[    0.654695] phy phy-fe8a0000.usb2-phy.1: No vbus specified for otg port
[    0.656776] extcon extcon1: failed to create extcon usb2-phy link
[    0.656885] phy phy-fe8b0000.usb2-phy.2: Looking up phy-supply from device tree
[    0.656900] phy phy-fe8b0000.usb2-phy.2: Looking up phy-supply property in node /usb2-phy@fe8b0000/host-port failed
[    0.657044] phy phy-fe8b0000.usb2-phy.3: Looking up phy-supply from device tree
[    0.657057] phy phy-fe8b0000.usb2-phy.3: Looking up phy-supply property in node /usb2-phy@fe8b0000/otg-port failed
[    0.657180] phy phy-fe8b0000.usb2-phy.3: Looking up vbus-supply from device tree
[    0.657192] phy phy-fe8b0000.usb2-phy.3: Looking up vbus-supply property in node /usb2-phy@fe8b0000/otg-port failed
[    0.657205] phy phy-fe8b0000.usb2-phy.3: No vbus specified for otg port
[    0.895255] usbcore: registered new interface driver rndis_wlan
[    0.895365] usbcore: registered new interface driver asix
[    0.895468] usbcore: registered new interface driver cdc_ether
[    0.895546] usbcore: registered new interface driver rndis_host
[    0.895652] usbcore: registered new interface driver cdc_ncm
[    0.895712] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.898419] ehci-platform fd800000.usb: EHCI Host Controller
[    0.898493] ehci-platform fd800000.usb: new USB bus registered, assigned bus number 1
[    0.899288] ehci-platform fd800000.usb: irq 11, io mem 0xfd800000
[    0.912712] ehci-platform fd800000.usb: USB 2.0 started, EHCI 1.00
[    0.913069] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.913118] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.913157] usb usb1: Product: EHCI Host Controller
[    0.913190] usb usb1: Manufacturer: Linux 4.19.193-67-rockchip-g450948183988 ehci_hcd
[    0.913226] usb usb1: SerialNumber: fd800000.usb
[    0.913985] hub 1-0:1.0: USB hub found
[    0.916570] ehci-platform fd880000.usb: EHCI Host Controller
[    0.916639] ehci-platform fd880000.usb: new USB bus registered, assigned bus number 2
[    0.917145] ehci-platform fd880000.usb: irq 13, io mem 0xfd880000
[    0.929369] ehci-platform fd880000.usb: USB 2.0 started, EHCI 1.00
[    0.929736] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    0.929784] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.929823] usb usb2: Product: EHCI Host Controller
[    0.929855] usb usb2: Manufacturer: Linux 4.19.193-67-rockchip-g450948183988 ehci_hcd
[    0.929892] usb usb2: SerialNumber: fd880000.usb
[    0.930569] hub 2-0:1.0: USB hub found
[    0.931642] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.932057] ohci-platform fd840000.usb: Generic Platform OHCI controller
[    0.932124] ohci-platform fd840000.usb: new USB bus registered, assigned bus number 3
[    0.932543] ohci-platform fd840000.usb: irq 12, io mem 0xfd840000
[    0.990299] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    0.990350] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.990380] usb usb3: Product: Generic Platform OHCI controller
[    0.990406] usb usb3: Manufacturer: Linux 4.19.193-67-rockchip-g450948183988 ohci_hcd
[    0.990442] usb usb3: SerialNumber: fd840000.usb
[    0.991134] hub 3-0:1.0: USB hub found
[    0.992000] ohci-platform fd8c0000.usb: Generic Platform OHCI controller
[    0.992068] ohci-platform fd8c0000.usb: new USB bus registered, assigned bus number 4
[    0.992491] ohci-platform fd8c0000.usb: irq 14, io mem 0xfd8c0000
[    1.050329] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.19
[    1.050378] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.050408] usb usb4: Product: Generic Platform OHCI controller
[    1.050434] usb usb4: Manufacturer: Linux 4.19.193-67-rockchip-g450948183988 ohci_hcd
[    1.050471] usb usb4: SerialNumber: fd8c0000.usb
[    1.051147] hub 4-0:1.0: USB hub found
[    1.053222] usbcore: registered new interface driver usb-storage
[    1.054783] usbcore: registered new interface driver usbtouchscreen
[    1.209271] usbcore: registered new interface driver uvcvideo
[    1.209313] USB Video Class driver (1.1.1)
[    1.321880] usbcore: registered new interface driver usbhid
[    1.321903] usbhid: USB HID core driver
[    1.326704] usbcore: registered new interface driver snd-usb-audio
[    1.827557] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 5
[    1.829401] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    1.829436] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.829450] usb usb5: Product: xHCI Host Controller
[    1.829462] usb usb5: Manufacturer: Linux 4.19.193-67-rockchip-g450948183988 xhci-hcd
[    1.829475] usb usb5: SerialNumber: xhci-hcd.4.auto
[    1.830005] hub 5-0:1.0: USB hub found
[    1.830477] xhci-hcd xhci-hcd.4.auto: new USB bus registered, assigned bus number 6
[    1.830512] xhci-hcd xhci-hcd.4.auto: Host supports USB 3.0 SuperSpeed
[    1.830657] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.830828] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    1.830845] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.830864] usb usb6: Product: xHCI Host Controller
[    1.830876] usb usb6: Manufacturer: Linux 4.19.193-67-rockchip-g450948183988 xhci-hcd
[    1.830889] usb usb6: SerialNumber: xhci-hcd.4.auto
[    2.513640] systemd[1]: Configuration file /etc/systemd/system/usb.service is marked executable. Please remove executable permission bits. Proceeding anyway.

And this is the output of lsusb

root@radxa-cm3-io:/home/rock# lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Thanks,

Regards

There is no one of Radxa Support Team here?

@chuvihi

Ok, after a few days of testing and investigation, I have more information to share.

As I mentioned in a previous comment above, the CM3 module connects to the USB hub on the CM3 IO board via the 3rd connector (on the short side). Only the USB OTG is routed to connector U13B (as designated on the schematic here, page 22).

When I look at your schematic, you are connecting the USB hub via the USB switch to the USB OTG pins on the CM3 module. For this to work, you need to do:

echo host > /sys/devices/platform/fe8a0000.usb2-phy/otg_mode

It helps if you set this up as a systemd service to be executed on boot, as described here.
In addition, you have to replace the original DTB with the RP4 DTB:

cd /boot/dtbs/$(uname -r)/rockchip/
sudo cp rk3566-radxa-cm3-io.dtb rk3566-radxa-cm3-io.dtb.orig
sudo cp rk3566-radxa-cm3-rpi-cm4-io.dtb rk3566-radxa-cm3-io.dtb
sudo reboot

However, this is not enough!

I did all of that with my CM3 on the BigTreeTech RPi4B adapter and it still did not work. It seems that the USB hub IC that is selected must also support OTG negotiation upstream!. Thus my RPI4B adapter did not work. But I tried it with this Waveshare CM4 base board, and it works flawlessly. I did not have to do any circuit surgery as described in other posts on this forum. The Waveshare base board uses the VLI VL805-Q6 hub IC.

I also looked where one can source the VLI chip from. The usual suspects (DigiKey, Mouser, Arrow, etc.) do not offer any VLI products, at all. I found it on AliExpress though, for a bit more than 1 USD a piece. So if you need just a few for in-house use, that might be for you. But if you need industrial quantities, then you’ll have to hunt for a proper supplier.

Your other choice would be to look for a different chip, which provides OTG negotiation upstream. I would look up all the manufacturers which products are sold where you buy your electronic components, and look if they have engineering/support forums. You could ask there, if their engineers would recommend a specific IC which satisfies your needs…

Hope that helps - it is certainly possible to have it working (as I can attest right now with my setup), just not with the chip you are currently using.

Hi tnt,

many thanks for your message. I’ve alredy tried all you have said, but still no working USB. I think is what you said, there is something on the USB hub IC. But the thing that puzzle’s me is that is the same IC used in the Raspberry PI CM4 IO board, and there are no big complains about this here.

I’ve tried to look at the schematics of your Waveshare board, but they are incomplete New Output (waveshare.com) There is no information about USB hub IC.

The big problem to use the Radxa CM3 is the level of documentation and support…

Many thanks. We will keep investigating…