Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Introduction

USB 3.0 is the second major revision of the Universal Serial Bus (USB) standard for computer connectivity. USB 3.0 implements a 5.0 Gbit/s raw transfer rate using 8b/10b encoding. USB 2.0 implements the Hi-Speed mode (HS – 480 Mbit/s), while USB 1.1 implements Low Speed (LS) – 1.5 Mbit/s and Full Speed (FS) – 12 Mbit/s). The USB 3.0 Controller used shall provide one 5.0Gbit/s USB channel using the PS internal GT as PHY.

Table of Contents

Table of Contents

HW/IP Features

The ZynqMP USB 3.0 Controller shall provide one 5.0Gbit/s USB channel using the PS internal GT as PHY.
  • Two USB 2.0/3.0 controllers
  • Compliant with USB 3.0 specs
  • Compliant with xHCI standard
  • Supports 5.0 Gbps data rate
  • Support host, device and OTG modes
  • Support On The Go (OTG) 2.0 host/device selection
  • Provide simultaneous operation of the USB2.0 and USB3.0 interfaces where applicable
    • In host mode, as required by the standard for speed negotiation and switching
    • In device mode, statically configured as USB2.0 or USB3.0
    • In OTG mode, dynamically switch between host role and device role
      • HNP, SRP supported at USB 2.0 speeds in OTG
      • DRD supported in USB 3.0 speeds
  • 64-bit AXI master port with built-in DMA
  • Register programming via AXI and/or APB slave ports
  • Power management features: hibernation mode
  • Support 44-bit address space
  • Supports Link Power Management (LPM) transfers to save power when bus is idle

Features supported in driver

  • All the HW/IP features are supported by driver

Missing Features, Known Issues and Limitations

  • ZynqMP USB 3.0 controller doesn't support USB 3.0 OTG (On The Go) host/device selection

Host Mode

ZCU102 board jumper settings for Host mode
J7 - ON
J113 - 1-2
J110 - 2-3

Please refer the below image for jumper settings on ZCU102 board


USB 3.0 Host mode setup snapshot



Kernel Configuration

Code Block
themeMidnight
Device Drivers------>
    USB support
        <*> xHCI HCD (USB 3.0) support
        <*> USB Mass Storage support
        <*> DesignWare USB3 DRD Core Support
        DWC3 Mode Selection (Dual Role mode)  --->
            (X) Dual Role mode

By enabling the above we need to see the below mentioned Kconfig parameter enabled
CONFIG_USB_DWC3 = y
CONFIG_USB_DWC3_DUAL_ROLE = y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PLATFORM=y

Devicetree

Code Block
themeMidnight
usb0: usb0@ff9d0000 {
	#address-cells = <2>;
	#size-cells = <2>;
	status = "disabled";
	compatible = "xlnx,zynqmp-dwc3";
	reg = <0x0 0xff9d0000 0x0 0x100>;
	clock-names = "bus_clk", "ref_clk";
	power-domains = <&zynqmp_firmware PD_USB_0>;
	ranges;
	nvmem-cells = <&soc_revision>;
	nvmem-cell-names = "soc_revision";

	dwc3_0: dwc3@fe200000 {
		compatible = "snps,dwc3";
		status = "disabled";
		reg = <0x0 0xfe200000 0x0 0x40000>;
		interrupt-parent = <&gic>;
		interrupt-names = "dwc_usb3", "otg", "hiber";
		interrupts = <0 65 4>, <0 69 4>, <0 75 4>;
		#stream-id-cells = <1>;
		iommus = <&smmu 0x860>;
		snps,quirk-frame-length-adjustment = <0x20>;
		snps,refclk_fladj;
		snps,enable_guctl1_resume_quirk;
		snps,enable_guctl1_ipd_quirk;
		snps,xhci-stream-quirk;
		/* dma-coherent; */
		/* snps,enable-hibernation; */
	};
};
 
&usb0 {
    status = "okay";
};
 
&dwc3_0 {
    status = "okay";
    dr_mode = "host";
};

Test Procedure

Connect the USB 3.0/2.0 pendrive to USB 3.0 capable board and see it getting detected in /dev/sd<x>.

Expected Output

Once Linux boots the below highlighted prints should be visible when we connected the mass storage device
Code Block
themeMidnight
84943.023896] usb 2-1: new SuperSpeed USB device number 4 using xhci-hcd
 
[84943.044949] usb 2-1: New USB device found, idVendor=0781, idProduct=5581
 
[84943.051579] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 
[84943.058695] usb 2-1: Product: SanDisk Ultra
 
[84943.062858] usb 2-1: Manufacturer: SanDisk
 
[84943.066939] usb 2-1: SerialNumber: A20037A3AD063355
 
[84943.072653] usb-storage 2-1:1.0: USB Mass Storage device detected
 
[84943.078836] scsi host1: usb-storage 2-1:1.0
 
[84944.080804] scsi 1:0:0:0: Direct-Access SanDisk SanDisk Ultra PMAP PQ: 0 ANSI: 6
 
[84944.089531] sd 1:0:0:0: [sda] 30283008 512-byte logical blocks: (15.5 GB/14.4 GiB)
 
[84944.097708] sd 1:0:0:0: [sda] Write Protect is off
 
[84944.103904] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 
[84944.309725] sda:
 
[84944.312888] sd 1:0:0:0: [sda] Attached SCSI removable disk
 

Performance

When Mass Storage device is connected
Device used :
USB 3.0 : HP USB 3.0 16 GB pendrive (idVendor=03f0, idProduct=4840)
USB 3.0 - UASP capable drive - Transcend Storjet 128GB
USB 2.0 : Sandisk Cruzer Blade USB 2.0 8 GB Pendrive (idVendor=0781, idProduct=5567)

Using HDPARM tool
ModeSpeed
USB 3.0 (Super Speed)128 MB/sec
USB 3.0 (UASP capable)327.10 MB/sec
USB 2.0 (High Speed)25.48 MB/sec

Note : Above results may vary from device to device

When Ethernet device is connected
Device used :
USB 3.0/2.0 : Xilinx ZynqMP RNDIS/Ethernet Gadget

Using Iperf tool (TCP)
ModeSpeed
USB 3.0 (Super Speed)761.6 Mbits/sec
USB 2.0 (High Speed)467.2 Mbits/sec

Using Iperf tool (UDP)
ModeSpeed
USB 3.0 (Super Speed)761.6 Mbits/sec
USB 2.0 (High Speed)467.2 Mbits/sec

Note : The above results are taken with LPM mode disabled

Peripheral Mode

ZCU102 jumper settings for Peripheral mode
J7 - OFF
J113 - 1-2
J110 - 1-2

J109- No jumper


Please refer the below image for jumper settings required for peripheral mode on ZCU102 board
Image RemovedImage Added

USB 3.0 peripheral mode setup snapshot

...

Commits:

8cd05

b7442

dc417

39384

567fa

0dcdb

2439d

fbf9a

d669f

30ca7

63039


2019.2
Summary:

  • Add support for disabling U1 and U2 entries
  • Add support for masking phy reset signal
  • Add wakeup capability support for versal usb controller
  • Add D0/D3 entry/exit  support for versal

Commits:

65313

31d78

7f71d

5a80c

2020.1
Summary:

  • kernel upgrade to 5.4

Latest commit for kernel 5.4:

27e21ab

2020.2
Summary:

  • None

Related Links

...