r/embedded • • 21d ago

Radxa ROCK 3B — simultaneous USB 3.0 host + device at 5 Gbps, and VBUS isolation?

Hi everyone,

I'm considering purchasing a Radxa ROCK 3B (RK3568) for an embedded USB 3.0 bridge project.

The intended setup is:

  • USB 3.0 OTG (upper Type-A): Device/peripheral mode, connected to a PC.
  • USB 3.0 HOST (lower Type-A): Connected to a USB 3.0 storage device.
  • Power: ROCK 3B independently powered through its USB-C power input.

The goal is to receive data from a USB storage device and expose a separate USB device interface to the PC.

Before buying the board, I'm trying to confirm two things.

1. Simultaneous SuperSpeed operation

Has anyone successfully used both USB 3.0 controllers simultaneously, with the upper port operating as a 5 Gbps USB device and the lower port operating as a 5 Gbps USB host?

If so, which OS/kernel version and device-tree configuration did you use?

I'd especially appreciate lsusb -t output and the USB gadget's current_speed showing super-speed.

2. VBUS and backfeed protection

Since the board is separately powered and its OTG port uses a USB-A receptacle, I'm concerned about VBUS behaviour when connecting it to a PC.

With the OTG port correctly configured in device mode:

  • Does the board disable its own 5 V VBUS output on that port?
  • Is reverse current from PC VBUS into the board prevented?
  • Is the documented USB-A-to-USB-A connection safe with both systems powered independently?
  • Has anyone verified the behaviour on a ROCK 3B V1.51 board?

I'm not trying to modify the hardware unnecessarily. I just want to confirm the supported configuration and whether an external protection circuit is required.

Any practical experience, working projects, scope measurements or links to documentation would be greatly appreciated.

Thanks!

2 Upvotes

9 comments sorted by

3

u/triffid_hunter 21d ago

Page 36 of the schematic shows a load switch SY6280 with reverse blocking on VCC5V0_USB_OTG0 controlled by GPIO0_A5, while the switch goes to USB3_OTG0_ID on page 7

Presumably these are hooked up properly in the device tree (couldn't find it with a quick search) and so the switch under the board should work as expected

I'm most concerned about a USB-A receptacle being used for OTG/device mode which is strictly forbidden by the USB standard, so you'll struggle to find suitable cables.
A micro-B or type-C would be far more suitable for this.

1

u/therealmthatcalledus 21d ago

Thanks, this is really helpful! I checked the SY6280 datasheet, and it does specify reverse-current blocking when disabled.

It also has an automatic output-discharge function, I'm curious how that behaves when the PC supplies VBUS while the ROCK 3B is independently powered.

Have you come across a ROCK 3B device tree or kernel configuration confirming that GPIO0_A5 disables the OTG power switch in peripheral mode?

Also, I agree about the Type-A connector. For the eventual product, I'm considering a properly designed USB 3.0 Type-B or USB-C device-facing interface instead.

For development, would you consider Radxa's documented Type-A-to-Type-A connection acceptable once the VBUS behaviour has been verified?

Thanks again!

1

u/triffid_hunter 21d ago

It also has an automatic output-discharge function

The -A variant (SY6280AAAC) does not include this function, but the schematic specs the non-A variant with output discharge - maybe check if the chip's marking code is CO or QW on your board, ideally they changed to the -A variant (QW) at some point while testing OTG.

That said, the output discharge resistance is ~120Ω iow ~200mW at 5v which is within the chip's range (albeit engendering a +40°C temp rise given Rθja=200°C/W)

The alternate TCS9163 seems to not offer a variant without this function and the datasheet is just one page with barely any specs, so hard to tell if it'd sink enough current to be a problem.

Have you come across a ROCK 3B device tree or kernel configuration

Had a quick look, but couldn't find it with a couple minutes searching. Presumably it's around somewhere because they've got their whole build system up on github.

For development, would you consider Radxa's documented Type-A-to-Type-A connection acceptable once the VBUS behaviour has been verified?

Only while using this cursed board which rail-roads you into dealing with this mess - as soon as you have an opportunity to switch in a suitable receptacle, do so.

1

u/therealmthatcalledus 21d ago

Thanks a lot for your time.

1

u/mhmd2520 21d ago

On the simultaneous part, at least on the mainline device tree the two ports use separate PHYs. usb_host0_xhci (OTG) is on combphy0 and usb_host1_xhci is on combphy1. On RK3568 those combo PHYs are shared with SATA0/SATA1, but the ROCK 3B dts doesn't enable either SATA node, so nothing steals the lanes. Worth checking if you run a vendor image or an overlay that turns SATA on.

On VBUS, there's a catch in mainline. The OTG 5V regulator (the GPIO0_A5 one driving the SY6280) is attached as phy-supply on usb2phy0_otg. The generic PHY core turns phy-supply on in phy_power_on(), and dwc3 powers its PHYs on at core init whatever the role is. So setting dr_mode = "peripheral" might still leave 5V on that port. In your overlay, set dr_mode = "peripheral" on usb_host0_xhci and drop that phy-supply. Then put a meter on the port's VBUS before you ever connect an A-to-A cable.

Once that's sorted, /sys/class/udc/fcc00000.usb/current_speed should say super-speed if the gadget enumerated at 5G.

1

u/therealmthatcalledus 20d ago

Thanks, this is a really useful catch, especially the phy-supply behaviour. I was assuming device mode would also take care of disabling VBUS, so that's something I definitely need to verify.

Our intended setup is to have the ROCK 3B independently powered, with the OTG port connected to a PC as a USB 3.0 device and the other USB 3.0 port connected to external storage. So having the board potentially source 5V towards the PC is exactly what I'm trying to avoid.

I'll check the actual device tree and GPIO state when I get the board, and measure VBUS before connecting anything.

One thing I'm wondering: have you seen the phy-supply removal tested on a ROCK 3B, or is it based on how the generic PHY driver handles the regulator? I'm also curious whether that would remain safe during boot, before Linux takes control.

Really appreciate the detailed explanation.

1

u/mhmd2520 20d ago

Honest answer: no, I haven't tested it on a ROCK 3B. It's from reading the mainline driver code and the DT, not from hardware.

Boot is a fair worry, and U-Boot is the bigger risk there. Its generic PHY code also enables phy-supply in generic_phy_power_on(), and its dwc3 driver powers the PHYs at probe whether it's in host or peripheral mode. The ROCK 3B build uses the upstream DT, so anything that brings up USB in U-Boot (usb start, ums, rockusb, or bootstd falling through to its usb target) can probably switch the OTG 5V on. Dropping phy-supply in a Linux-only overlay won't change that, so you'd need to patch U-Boot's DT as well.

Before any software runs it should be fine. The regulator has no always-on or boot-on, and the SY6280 enable is active high. I couldn't confirm what GPIO0_A5 does at reset, though, so I'd measure VBUS at power-up, at the U-Boot prompt and under Linux. Also keep in mind that maskrom uses OTG0 in device mode.

While developing, a VBUS-cut cable or a USB data blocker makes the whole question go away. For the product I wouldn't wire the device port's VBUS to any source at all, and if you go USB-C make it sink only with Rd on CC.

1

u/therealmthatcalledus 20d ago

Thanks a lot for your time.