Does Rock 5C support USB OTG/peripheral mode?

Hello,

I know that documentation states that OTG is supported on the top USB3 (blue) USB-A port of 5C, but I am unable to make it work, with neither official Radxa OS nor with Armbian. I am applying dwc3-peripheral overlay and using rsetup to enable OTG function (tried one at a time, tried multiple) but am unable to make another USB host (a PC) to recognize 5C as a USB peripheral.

Is there perhaps any documentation or tutorial on how to make this work? Has anyone been successful in using 5C as a USB device?

Thank you.

I have never tried OTG on the RK3588, but most likely you need to add a device tree overlay that tells the port to become OTG.

Here is an example on the Rock 5A with kernel 5.1:

Thanks. I am applying this overlay which says it should do the trick for 5C, but that just isn’t working for me: radxa-overlays/arch/arm64/boot/dts/rockchip/overlays/rk3588-dwc3-peripheral.dts at main · radxa-pkg/radxa-overlays

You should provide details of what image/kernel you are using because the overlays may have different formats/details between distributions and kernel versions. You can see that yours and mine are largely different in content.

In any case, I think Radxa should chime in since as I mentioned previously, I have not played with OTG in Linux.

Yes, I am hoping someone from Radxa will chime in.

Regarding kernel versions, I’ve tried current ‘stable’ Armbian (6.1.75) and edge Armbian (6.11), as well as the “official” Debian-based distro from Radxa (also IIRC 6.1). In all cases I made sure that dr_mode of usbdrd_dwc3_0 is set to peripheral via overlay but that seemingly isn’t enough as I wasn’t able to make it work / make Rock 5C be recognized as a USB device by another host.

If you are using a Mac for your computer, I suggest getting a USB power blocker such as this one: https://www.amazon.co.uk/PortaPow-USB-Power-Blocker-Cased/dp/B094FYL9QT/

I have seen various cases of Macs not accepting the OTG connection from the Rock 5A/C because the Rock supplies power while the Mac does the same and there’s some kind of conflict.

may be you can ref this: https://docs.radxa.com/en/template/sbc/radxa-os/usbnet#otg设置

Thank you. Yes, I have seen this and I am unable to make this work on 5C.

@DualTachyon: thanks for the pointer with the power blocker, ordered one :slight_smile: It is definitely part of the problem (see below), but I’ve been able to work around it using USB hub so far.

Since I’ve been getting nowhere with 5C I’ve got a Rock 4C+ (which seems to work for some folks) and tried with it. Using Radxa OS (kernel 5.10.110-20) USB peripheral works partially – USBNET works, but mass storage gadget doesn’t. After upgrading to 5.10.110-39 mass storage gadget works. Note that direct USB connection to Mac didn’t work, probably due to power reason explained by DualTachyon, but connecting via USB hub worked well. No such issues with Windows.

I’ll continue trying to make this work with 5C.

OK, I can now confirm that USB 3 peripheral mode works on 5C and 5C Lite with kernel 6.1.43-20 (which you can get by using build from here and upgrading in-place, for example).

I am unclear what was causing issues earlier as I am sure I’ve tested this setup before and Windows wouldn’t recognize USB gadget; could be a USB cable or one A-to-C adapters I was using.

Thanks folks for your help/support.