This is sad situation. It makes an interesting contrast to Texas Instruments, ARM, or Xilinx; all of whom publish exquisite documentation. Synopsys does have documentation. Who knows how good it is, because a person like me can't get access to it.
This is where this whole business started. I began getting a deja vu feeling studying the RK3399 USB 3 driver. It turns out this uses a USB design known as the "Synopsys Designware" usb core. And it turns out there are two versions, one for USB 2.0 and the other for USB 3.0
Linux has drivers for each, and they are different. You find them at:
drivers/usb/dwc2 drivers/usb/dwc3Both are OTG drivers. What OTG means is that the device can assume either a host or a device role. If software allows it, the device can switch roles as needed.
Take a look at the driver source, along with:
A lot of ARM chip makers like to use the "designware" cores, and I decided to make an inventory of them. It is not always indicated or obvious that a chip is using a designware core. Here are my clues for finding out. I look at the device registers.
The USB 3.0 designware core has a set of standard xHCI registers at the start (offset 0)
Then there are global (core) registers following, at offset 0xc100 in the RK3399.
Then there are device registers after that, at offset 0xc700 in the RK3399.
The USB 2.0 designware core has global (core) registers first, at offset 0.
Then there are host registers at offset 0x400.
Then there are device registers at offset 0x800.
Take a look at:
sys/external/bsd/dwc2 is a driver for the Synopsys Designware USB IP
STM32H743 - dwc2 HS/FS OTG STM32F4xx family - dwc2 HS/FS OTG STM32F103 - FS device only (older dwc ??? ) BBB - not DWC - Mentor OTG HS/FS Orange Pi H3 boards - not DWC - OTG HS/FS ohci/ehci Orange Pi H5 boards - not DWC - OTG HS/FS ohci/ehci Fire3 Samsung S5P6818 HS/FS USB2 OTG - probably dwc2 Fire3 Samsung S5P6818 HS/FS USB2 host - ohci/ehci RK3328 - one dwc2 and 2 others unknown RK3399 - two dwc3 USB3 OTG interfaces RK3399 - two x USB2 host fs/hs interfaces
usb20_otg: usb@ff580000 is dwc2 usb_host0_ehci: usb@ff5c0000 is generic-ehci usb_host0_ohci: usb@ff5d0000 is generic-ohciThe datasheet mentions that the RK3328 has a USB3 host that is xhci, but says nothing about OTG. It is odd that the linux dtsi makes no mention of it. The RK3328 trm (part 1) shows the address map with the 3 entries above, and also an entry at ff60_0000 that is labeled "usb3_otg".
It is worth noting also that the Orange Pi board I have with the RK3328 (the Orange Pi R1 plus LTS) has a USB-C port.
On the R1 LTS, the usb2 otg is connected to the USB-C connector. The usb3 is connected internally to the second ethernet (which does make sense given that usb3 can do 5G/s) The usb2 host ehci/ohci goes to a typical usb host connector
Indeed the RK3328 usb3 is a dwc3 device. This note (circa March, 2019) indicates there are issues with the PHY device handling disconnects. This would certainly not seem to matter when the usb3 is hard-wired to the usb-ethernet chip on board.
Also note that "SuperSpeed" implies USB 3.0
Tom's electronics pages / [email protected]