Introduction

This page gives overview of ZynqMp usbpsu driver which 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

How to enable

Source path for the driver:
https://gitenterprise.xilinx.com/embeddedsw/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/usbpsu/

Driver source code is organized into different folders. Below diagram shows the usbpsu driver source organization
usbpsu
|
-- Doc - Provides the API and data structure details
|
- Examples - Reference application to show how to use the driver APIs and calling sequence
|
- Source - Driver source files

Features Supported

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 bus is idle

Features Driver support

  • Supports device mode only
  • Supports LPM transfers

Known Issues and Limitations

  • Host mode is not supported by standalone driver
  • Doesn't support hibernation
  • Can't operate simultaneous USB 3.0/ 2.0 modes, need to restart example before changing modes

Test Cases

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
files together

USB 2.0 Peripheral Mode

The below gives the testing procedure of zynqmp USB standalone example which operates as a mass storage gadget

Testing procedure

  • Download and run the generated USB 2.0 example ELF on board
  • Debug prints you can see on com port(Teraterm/putty)
    the below prints should be seen on com port
    Capture_temp.PNG
  • Connect board to standard host(Windows/Linux)machine USB 2.0 port.
  • You will get pop-up window on Window machine for formatting the size 256MB
    After format complete you can copy file to usb device
    image2016-6-1 15-58-57.png

Performance Results

  • The below performance results are observed using CrystalDiskMark tool on windows
    Img1.png

USB 3.0 Peripheral Mode

The below gives the testing procedure of zynqmp USB standalone example which operates as a mass storage gadget

Testing procedure

  • Download and run the generated USB 3.0 example ELF on board
  • Debug prints you can see on com port(Teraterm/putty)
    the below prints should be seen on com port
    Capture_temp.PNG

  • Connect board to standard host(Windows/Linux)machine USB 3.0 port.
  • You will get pop-up window on Window machine for formatting the size 256MB
    After format complete you can copy file to usb device
    image2016-6-1 15-58-57.png

Performance Results

  • The below performance results are observed using CrystalDiskMark tool on windows

    Img3.png

USB DFU Testing

The below gives the testing procedure of zynqmp USB DFU example

Testing procedure


On ZCU102 board side
  • Download and run the generated dfu example

On HOST side
On Linux
  • Install dfu-util binaries in linux host. Please refer http://dfu-util.sourceforge.net/build.html
  • Connect DFU device (Alto device running DFU example)
  • dfu-util –l (check our DFU Boot Image downloader)
  • dfu-util –D boot.bin

On Windows
Install Windows driver for DFU devices in host machine
  • Download Zadig tool from http://zadig.akeo.ie/ and install
  • Connect DFU device (Alto device running DFU example)
  • Open zadig and select DFU device and install WinUSB driver

image2017-2-5_11-12-22.png

Running dfu-util and downloading files
  • 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 O/P

image2017-2-5_11-19-13.png


Changelog

2016.3
Summary:
  • Initial Driver which support USB 3.0 and USB 2.0 device mode

2016.4
Summary:
  • Added USB 3.0/2.0 backward capability

2017.1
Summary:
  • Added DFU example in device mode
  • Fixed to compile with IAR compilers
  • Changed usbpsu.mdd file to be in sync with pcw IP_NAME property
  • Corrected MISRA C errors

2017.2
Summary:
  • NONE

2017.3
Summary:
  • Added Cache Coherency (CCI) suuport to USB

2017.4
Summary:
  • None

2018.1
Summary:
  • Modify usbpsu driver code to fit USB common example code for all USB platforms
  • Changed Mass Storage Example for making USB common example code for all USB platforms
  • Chnged DFU example code for making USB common example code for all USB platforms
  • Added hibernation support
  • Added microblaze support for usbpsu driver
  • Move the Setup Interrupt System calls from the usbpsu driver to examples

2018.2
Summary:
  • Add support for flushing the link trb
  • Fix compilation warnings in xusbpsu_hw.h