Camera using usb 2 if plugged in during boot

Hi!

I’m bringing up a new carrier board for our product and I’ve been having a problem. We are using a realsense camera and if it is plugged in during boot it gets registered as a usb2 device and not usb3 so it does not work. If you pull it out and plugg it in again it starts working and is correctly registered as a usb3 device.

Output from lsusb | egrep -i hub

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output from lsusb after boot:

Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 005: ID 8086:0b5c Intel Corp. 
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output from lsusb after removing and plugging in camera again:

Bus 002 Device 003: ID 8086:0b5c Intel Corp. 
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp. 
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So the device with id 8086:0b5c goes from being on the usb2 bus to the usb3 bus.

Anyone have any suggestions about how to solve this?

Does this issue happened on devkit?

No this only seems to appear on the new carrierboard. But it is weird that it works when plugged in after boot.

May I know what is the exact timing of plugging the camera that would cause this problem?

Also, could you try if every usb 3 device has such problem or only the Realsense camera?

Do you have any dmesg to share when error happened and not happened?

I have not been able to pin point exactly as it’s a bit hard during boot. But if it is plugged when I put in the power cable / flip the on switch it never works and if I plugg it in after reaching the terminal login promt it always works.

I’ve attached the dmesg logs from one start of the system. At 2.515135 it is detected the first time. I remove it at around 32 seconds and then reattach it again. At 35.511746 it is detected the second time, this this as a usb3 device.
dmesg.txt (68.2 KB)

Hmm it only seems to affect realsense right now. I have another webcam and it connects as usb3 even during boot.

How about another case that you just plug the Realsense before powered on but not during boot?

Will you see such issue?

I’m not sure I follow but that’s what I have been doing. The realsense is attached when the power if turned on, so “before powered on”.

I mean scenario as below

  1. No power cable connected

  2. Connect the Realsense to the usb port

  3. Power cable in and power on.

Are you saying that this is the scenario that would hit issue?

Yes that’s right, that is what I have been doing :)

  1. Could you share the schematic of the usb part of your carrier board?

  2. Are you able to dump the bootloader log from uart? It feels like the usb device is firstly enumerated as HS device in the cboot and then the kernel. That is why when cboot is not getting involved, it will have no issue.

  3. Did you change any device tree setting in your dtb to match the board design?

I’ll get back to you about 1 and 2, I need to ask the hardware people.

About 3: no, and maybe this is the problem, though supposedly it should be should follow the same design as the devkit, but I might be wrong. I’ll get back to you.

Thanks!