CM5 USB and touchscreen issues

Dear @radxa,

I’ve been experimenting the USB-C port in peripheral mode with the CM5 + IO board, but it only works in highspeed instead of superspeed. Do you know the reason why?

The other problem is that i try to use the 5 inch radxa touchscreen from Allnet on dsi 0 port with the 7 inch rpi overlay, but it doesn’t work properly. Do you know how to get it work?

RK3588 only supports USB 2.0 OTG. 3.0 part is host only.

Unfortunately they are not fully compatible. You can use our 5A’s overlays as a reference for how to change it:

@ RadxaYuntian I’m sorry but i have to prove you wrong.

If you take a look at the picture, you can clearly see that it does support USB3 (Superspeed) in OTG mode. But if i set peripheral mode, then it becomes USB2 (Highspeed) only as you can see in the following picture:

So my question again: Why does it only work in Highspeed in peripheral mode, if it knows Superspeed in OTG mode? If i remove the USB roleswitch flag from the dt file, it doesn’t help either. So i think there may be some hardware related issue.

And that hardware related issue is that ahem “RK3588 only supports USB 2.0 OTG. 3.0 part is host only.”

Let me know if you have any other questions.

@RadxaYuntian In case of Rock 5A, the USB is Superspeed even in peripheral mode. CM5 uses the same CPU, so what’s the difference? I can show screenshots of that too if it’s needed.

@ken please check if the above situation is true.

@RadxaYuntian , @ken do you have any updates about this issue?

I have confirmed that ROCK 5A indeed support USB 3.0 OTG. CM5 IO was missing related OTG overlay so we added this today. I have tested this overlay with our 6.1 t3 image and it reached speed beyond USB 2.0:

asciicast

We did a t4 build today which comes with new OTG overlay.

Hardware version is v2.2 for both the IO board and the module.

Please check if your cable supports USB 3.0, as not all Type-C cable contains the necessary contacts.

2 Likes

@RadxaYuntian I have version 2.21 of CM5 and the IO board version is 2.2. I flashed the t4 image.
My test environment is as follows: I use Mass Storage Gadget Driver on the SBC side which is connected to a Windows machine with a USB3 OTG cable. The speed test is done with CrystalDiskMark on Windows side.

Peripheral mode test with the appropriate overlay:

image


I spotted this line in kernel log, i don’t know if it’s helpful or not: “[ 64.607902] typec_fusb302 6-0022: Looking up vbus-supply from device tree”

Versus OTG mode (no overlay is loaded):


image

I hope the difference can be clearly seen even to you. This suggests that the overlay is not a solution to this problem, at least not in its current form…

The overlay was working on my computer as shown in the recording I posted. Can you try connecting the device to the other USB controller on your PC?

@RadxaYuntian Guys i really appreciate your sense of humor, but why do you think that there’s a problem with the USB controller on the PC, if the speed in OTG mode is Superspeed and in the exact same port the speed is Highspeed in peripheral mode? So how about putting aside the theory that there’s any problem with the USB controller on the PC side, and instead trying to focus on the SBC side and doing the same test like i do? Moreover i’m a developer so your initial general hints you gave me as some random noskill user was amusing but now it’s getting annoying-boring. This is the 4th different board that i bought from you, and so far all were just pure waste of money. This OTG and Peripheral mode with the Mass Storage Gadget Driver is totally fucked up everywhere, so i think it would be high time fixing it. Luring potential customers with non working features is not ethical

As you can see from my recording I could not reproduce your issue, and thus I have no clue how to fix it.

@RadxaYuntian

Just to show how gentleman i am, i give you a more simple test case which doesn’t involve any 3rd party stuff, other PC, whatsoever.

Connect the USB-C port to the USB3-A port with the USB3 OTG cable. So there aren’t any additional computers/devices involved in the party, just pure CM5.
I enabled radxa-ncm otg service in rsetup just like you did in your video.

This picture shows the situation when the peripheral overlay is disabled:

While the following picture shows the situation when the peripheral overlay is enabled:

The small arrows show that the port is in OTG mode in the first picture, and in the second picture it’s in peripheral mode.
The big arrows show that the speed is 5000M in the first case in OTG mode so it’s Superspeed, while it’s just 480M in the second case in peripheral mode
which is Highspeed only.

I can’t wait for your explanation about this phenomenon…

Hi @Rockpi_fan
This is my test result:


Could you please try changing the USB cable?

Hi @Rockpi_fan,
We have a new discovery, when using Type-C to Type-A cable, only one Type-C side is available for USB3, and can’t hot-swap to switch the flip side, can only re-power on to switch the flip side, otherwise it can only be recognized to USB2

1 Like

OTG mode in first picture. How did you modify it?

@ChenJaly @RadxaYuntian

It’s exactly the case that you said. I noticed this thing 1 year ago when i was experimenting the 5B model, but that time i didn’t create a topic about this problem because that SBC wasn’t suitable for our project. In my opinion the problem is not with the cable, because you can notice the same behaviour with a type-c -> type-c cable as well, give it a try if you haven’t done so. So it does matter which side of the cable is used to connect to the CM5’s type-c port, but at the same time it doesn’t matter which side is used of the cable to connect to the host side. Thus this led me to the conclusion that there is a hardware related problem with the USB in EVERY Radxa product…

@ChenJaly @RadxaYuntian

Guys did you have a chance to experiment the problem a bit further?
Could you confirm if this a SOM or IO board related problem?

Probably the overlay need to configure FUSB302 as well. We would come back to this later.

@RadxaYuntian This is a key thing from our perspective because if this can’t be fixed in the foreseeable future, that means we can’t build our product on this SBC, so i would appreciate if your team could provide an answer/solution to this issue as soon as possible.