AXI USB gadget driver

AXI USB gadget driver



Table of Contents

Introduction

The AXI USB device IP is an USB device controller IP. It has no support for HOST or OTG mode. This IP can be instantiated on FPGA or Zynq /Ultrascale plus PL. This page describes the usage of the AXI USB device IP linux driver.

HW/IP Features

  • Compliant with the USB 2.0 Specification

  • Supports High Speed, Full Speed and Low speed

Features supported by driver

  • All the HW/IP features are supported by the driver

Missing Features and Known Issues/Limitations in Driver

  • The driver is supported/validated for mass storage gadget only on Zynq and ZU+.



Kernel Configuration

  1. Enable the AXI USB linux driver in kernel configuration
    Device Drivers -> USB Support -> USB Gadget Support -> USB Peripheral Controller -> Xilinx USB driver

  2. Enable Mass storage gadget
    Device Drivers -> USB Support -> USB Gadget Support -> Mass Storage Gadget
    Device Drivers -> USB Support -> USB Gadget Support -> USB Gadget Drivers -> USB functions configurable through configfs



Devicetree

Example Device tree node:

axi_usb2_device@42e00000 { phandle = <0x06>; interrupts = <0x00 0x1d 0x01>; compatible = "xlnx,axi-usb2-device-5.0\0xlnx,usb2-device-4.00.a"; xlnx,enable-hsic = <0x00>; xlnx,in-clk-freq-24mhz = <0x00>; xlnx,dma-ua-trans-support = <0x01>; xlnx,simulation = <0x00>; interrupt-parent = <0x16>; xlnx,has-builtin-dma; xlnx,use-bufio = <0x01>; xlnx,ip-name = "axi_usb2_device"; xlnx,include-usberr-logic = <0x01>; xlnx,phy-reset-type = <0x00>; reg = <0x42e00000 0x10000>; xlnx,include-debug = <0x00>; clocks = <0x26 0x0f 0x26 0x0f>; xlnx,include-dma = <0x01>; xlnx,edk-iptype = "PERIPHERAL"; xlnx,use-async-clocks = <0x00>; status = "okay"; clock-names = "m_axi_aclk\0s_axi_aclk"; xlnx,connect-width = <0x00>; interrupt-names = "usb_irpt"; xlnx,s-axi-id-width = <0x01>; xlnx,oversampling-mode = <0x00>; };

Performance

Host used: Dell Precision Tower 7910

Read

Write

15.0 MB/sec

22.9 MB/sec



Test Procedure


Images





  1. Copy following to SD card: BOOT.bin which has PL bitstream with AXI USB device IP, FSBL and U-Boot. dtb, uImage, rootfs.cpio.gz.u-boot (All are provided in the attachment).

  2. Boot ZC702 with SD card.

  3. Follow these steps on the board after linux boots :

    xilinx-zc702-2025_2:~# cd /run/media/mmcblk0p1 xilinx-zc702-2025_2:/run/media/mmcblk0p1# ./mass_storage_script.sh 1-run 2-reset 0-exit 1 Running … Select USB speed to configure: 1) high-speed 2) super-speed 3) super-speed-plus-gen2x1 Enter choice (1/2/3): 1 Mass Storage Function, version: 2009/09/11 LUN: removable file: (no medium) TEST RUNNING 1-run 2-reset 0-exit 2 Resetting … Reset done. 1-run 2-reset 0-exit
  4. Connect the usb cable to host PC(windows/linux). Host shows the gadget as a mass storage device with 5MB capacity.



Mainline Status

The current driver available in the Xilinx Linux git is in sync with the open-source kernel.

Change Log

2025.2

  • None

2025.1

  • 6.12 kernel upgrade, no other changes.

2024.2

  • None

2024.1

  • Kernel upgrade to 6.6, no other changes.

2023.2

  • None

2023.1

  • Kernel upgrade to 6.1

  • Fixed udc compilation error with upgrade kernel 

2022.2

  • Fixed udc complication error

2022.1

  • Kernel upgrade to 5.15

2021.2

  • None

2021.1

  • Kernel upgrade to 5.10

2020.2

  • None

2020.1

  • None



Related Links

© 2025 Advanced Micro Devices, Inc. Privacy Policy