This page gives an overview of the bare-metal driver support for the Xilinx® LogiCORE™ IP Zynq Ultrascale+ MPSoC USB soft IP.
Table of Contents
Table of Contents |
---|
Introduction
This page gives an overview of the Zynq Ultrascale+ MPSoC usbpsu driver which is available as part of the Xilinx Vivado and SDK distribution.
This document explains USB 2.0 & 3.0 peripheral mode standalone configurations for MASS STORAGE and DFU gadgets
...
Please refer to Chapter 72: USB2.0 Controller in Versal TRM which includes links to the official documentation and resource utilization.
Driver Sources
The source code for the driver is included with the Vitis Unified Software Platform installation and being available in the Xilinx Github repository.
...
Directory | Description |
---|---|
doc | Provides the API and data structure details |
data | Driver .tcl, .mdd file and .yaml files |
examples | Example applications that show how to use the driver features |
src | Driver source files, make and cmakelists file |
Driver Implementation
For a full list of features supported by this IP,
...
Versal: Please refer to Chapter 72: USB2.0 Controller in Versal TRM
Features
Features Controller Support
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 and device modes
Support On The Go (OTG) 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
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 the bus is idle
Features Driver support
Supports device mode only
Supports LPM transfers
Known Issues and Limitations
Host mode is not supported by the standalone driver
Doesn't support hibernation
Can't operate simultaneous USB 3.0/ 2.0 modes, need to restart example before changing modes
Example Applications
Refer to the driver examples directory for various example applications that exercise the different features of the driver. Each application is linked in the table below. The following sections describe the usage and expected output of the various applications. These example applications can be imported into the Vitis IDE from the Board Support Package settings tab.
...
Example | Depandent source files (https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/usbpsu/examples) |
---|---|
xusb_intr_example.c | xusb_class_storage.c,xusb_class_storage.h,xusb_ch9_storage.c,xusb_ch9_storage.h,xusb_ch9.c,xusb_ch9.h,xusb_wrapper.c,xusb_wrapper.h |
xusb_poll_example.c | xusb_class_storage.c,xusb_class_storage.h,xusb_ch9_storage.c,xusb_ch9_storage.h,xusb_ch9.c,xusb_ch9.h,xusb_wrapper.c,xusb_wrapper.h |
xusb_dfu_example.c | xusb_class_dfu.c,xusb_class_dfu.h,xusb_ch9_dfu.c,xusb_ch9_dfu.h,xusb_ch9.c,xusb_ch9.h,xusb_wrapper.c,xusb_wrapper.h |
xusb_composite_example.c | xusb_ch9_composite.c,xusb_ch9_composite.h,xusb_class_composite.c,xusb_class_composite.h,xusb_ch9.c,xusb_ch9.h,xusb_wrapper.c,xusb_wrapper.h |
Example Application Usage
Mass-Storage: USB Polled/Interrupt mode example
Mass storage profile can be tested by compiling xusbpsu_ch9_storage.c , xusbpsu_ch9_storage.h , xusbpsu_ch9.c , xusbpsu_ch9.h , xusbpsu_class_storage.c , xusbpsu_class_storage.h , xusbpsu_intr_example.c/xusbpsu_poll_example.c
files together
...
You will get a pop-up window on the Window machine for formatting the size 256MB
After the format complete you can copy a file to the USB device
USB Composite Testing
Testing procedure
Download and run the generated USB 3.0 example ELF on board
Debug prints you can see on com port(Teraterm/putty)
...
[13539.237627] usb 1-3.3: new high-speed USB device number 14 using xhci_hcd root@xhdbfarmrkx4:/home/piyushm# mkfs.vfat -I /dev/sdc root@xhdbfarmrkx4:/home/piyushm# mount /dev/sdc /mnt/ |
---|
USB DFU Testing
The below gives the testing procedure of zynqmp USB DFU example
...
Install DFU utils
Launch 'cmd' (make sure your path is that where dfu-util.exe is)
dfu-util –l (check our DFU Boot Image downloader)
dfu-util –D boot.bin –t 1024
Expected Output
...
Example Design Architecture
Default Petalinux Design
Performance
The below performance results are observed using CrystalDiskMark tool on windows
USB 2.0:
...
USB 3.0:
...
Change Log
2023.2
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.2/doc/ChangeLog#L321
...
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2015.4/doc/ChangeLog#L258
Related Links
...