U-Boot USB Driver

Table of Contents


The USB controller is capable of fulfilling a wide range of applications for USB 2.0 implementations. Two identical controllers are in the Zynq-7000 device. Each controller is configured and controlled independently. The USB controller I/O uses the ULPI protocol to connect external ULPI PHY via the MIO pins. The ULPI interface provides an 8-bit parallel SDR data path from the controller’s internal UTMI-like bus to the PHY. The ULPI interface minimizes device pin count and is controlled by a 60 MHz clock output from the PHY.

U-boot Configuration

For ZynqMP

For Zynq

Device Tree

For ZynqMP

For Zynq

Test Procedure

DFU testing in u-boot

Host setup

For DFU setup at host please refer to section at ZynqMp USB Stadalone Driver#USBDFUTesting

Build u-boot for DFU

In order to test DFU at u-boot ensure that usb node has below two properties as shown.

dr_mode = "peripheral";

maximum-speed = "high-speed";

The dr_mode with "peripheral" informs u-boot to act as usb device and maximum-speed is used to inform about max-speed that driver supports. 

NOTE: For ZynqMP maximum-speed can be super-speed also but as of now u-boot doesn't support USB 3.0 so, always ensure that maximum-speed was set to high-speed. 

In case if you are building through petalinux, please ensure that these properties were set through system-user.dtsi at path<PetaLinux-project>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi. But, if we modify here and build linux then the Linux also will be restricted to high-speed. So, first build u-boot, copy the u-boot image and then change this maximum-speed property to super-speed and the build linux..


  1. Add the following to system-user.dtsi, so that it looks like:

/include/ "system-conf.dtsi"

/ {


&dwc3_0 {

dr_mode = "peripheral";

maximum-speed = "high-speed";


Testing at u-boot

  • Boot till u-boot and stop at u-boot prompt.
  • Now, run u-boot command as "run dfu_ram"
    • dfu_ram is an environment variable defined in Zynq/ZynqMP config .h u-boot. It looks like below as an example.

      "dfu_ram_info=" \
      "setenv dfu_alt_info " \
      "image.ub ram $fdt_addr $fdt_size\0" \
      "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" 

  • Running dfu_ram lets the u-boot enter into DFU mode and it waits for image to be downloaded from the host. As per above env, it waits for kernel images image.ub to get downloaded on to ram at address "kernel_addr". Below is the snap shot(left side is u-boot target and right side is host detects the DFU device with dfu-utils -l command) 
  • Now at host, download the image.ub  to target using dfu-util -D option. (example command : sudo dfu-util -d 03fd:0300 -D image.ub).
  • This completes the downloading the kernel image using DFU,, now press ctrl+c at u-boot to comeout of DFU mode and the boot/use the downloaded image normally.


For Zynq

The USB controller has the following key features:
  • USB 2.0 High Speed Host controller (480 Mb/s)
  • Intel® EHCI software programming model
  • USB 2.0 HS and FS Device controller
  • Up to 12 Endpoint: Control Endpoint plus 11 configurable Endpoints
  • USB 1.1 legacy FS/LS
  • Embedded Transaction Translator to support FS/LS in Host mode

For ZynqMP

  • Two USB 2.0/3.0 controllers
  • Supports a 5.0 Gb/s data rate
  • Supports host and device modes
  • Supports on-the-go (OTG) host/device selection for USB 2.0 (only)
  • Provides simultaneous operation of the USB 2.0 and USB 3.0 interfaces (only in host mode)
  • 64-bit AXI master port with built-in DMA
  • AXI port for register programming
  • Power management features: hibernation mode
  • Support for 48-bit address space

Note: U-boot does not support USB3.0