Table of Contents

Document History


DateVersionAuthorDescription of Revisions
05/12/20161.0Rutuja Chavan & Rajesh GugulothuInitial version
02/15/20171.1Rutuja Chavan1. Updated to 2016.4 tool version
2. Designed for ZCU102 Rev1.0 and RevB/C/D Boards
05/17/20172.0Rajesh Gugulothu1. Updated to 2017.1 tool version
2. Designed for ZCU102 Rev1.0 and RevB/C/D Prod silicon Boards
12/06/20182.1Surender Polsani1. Updated to 2018.1 tool version
2. Designed for ZCU102 Rev1.0 and RevB/C/D Prod silicon Boards

Summary

The Zynq® UltraScale+™ MPSoC USB 3.0 controller consists of two independent dual-role device (DRD) controllers. Both can be individually configured to work as host or device at any given time. The USB 3.0 DRD controller provides an eXtensible host controller interface (xHCI) to the system software through the advanced eXtensible interface (AXI) slave interface. An internal DMA engine is present in the controller and it utilizes the AXI master interface to transfer data. There are four primary types of communication defined by the USB protocol, based on which any required application can be built without changing the firmware or underlying hardware for different applications. These transfer types are Control Transfer, Bulk Transfer, Isochronous transfer and Interrupt transfer. Zynq® UltraScale+™ MPSoC USB3.0 controller supports all four types of transfers.This Tech Tip explains how to enable all the configuration options, step by step procedure to use the Zynq® UltraScale+™ MPSoC USB 3.0 controller in device mode and make use of bulk transfer type for a serial communication device abstraction using the USB 3.0. The CDC (ACM) class in the USB Component is used for data communication. You can typically use it in applications like serial COM or UART communicationThis design covers:

Implementation

Implementation Details
Design TypePS Only
SW TypeZynq® UltraScale+™ MPSoC Linux OS
CPUsARM Cortex A53 Core 0 running at 1.1 GHz
PS Features
  • DDR3
  • Cache
  • L1 and L2 Cache
  • OCM
  • Generic Interrupt Controller
  • USB 3.0 Controller
Boards/ToolsZCU102 Rev1.0 board,
ZCU102 Rev B/C/ D Prod silicon boards
Xilinx Tools VersionXilinx SDK 2018.1, Petalinux 2018.1
Other Details--

Files Provided
Zynqmp_CDC_design_files_2018_1.zipSee Appendix A for the descriptions of the files

Block Diagram

The design explained in the below figure shows how to use Zynq® UltraScale+™ MPSoC USB 3.0 controller as a communication class device. ZCU102 board (running Linux OS) connection with host machine. Windows/Linux PC/laptop USB host controller is used for all host functionality.
Figure 1: Zynq ultrascale + MPSoC USB 3.0 CDC reference block diagram


Linux: Step by Step procedure for creating Zynq® UltraScale+™ MPSoC USB 3.0 controller’s communication device class functionality
This section explains the CDC Abstract Control Model (ACM) Linux gadget driver details, how to configure the Linux source to support serial gadget driver for Zynq® UltraScale+™ MPSoC USB 3.0. and, also step by step procedure to test the Zynq® UltraScale+™ MPSoC USB 3.0 communication device class functionality on windows/Linux host machines.
CDC ACM Linux gadget driver:
The gadget serial driver is a Linux USB gadget driver, a USB device side driver. It runs on a Linux system that has USB device side hardware; for example, a PDA, an embedded Linux system, or a PC with a USB development card. The gadget serial driver talks over USB to either a CDC ACM driver or a generic USB serial driver running on a host PC. On the device-side Linux system, the gadget serial driver looks like a serial device. On the host-side system, the gadget serial device looks like a CDC ACM compliant class device or a simple vendor specific device with bulk in and bulk out endpoints, and it is treated similarly to other serial devices.The host side driver can potentially be any ACM compliant driver or any driver that can talk to a device with a simple bulk in/out interface. With the gadget serial driver and the host side ACM or generic serial driver running, you should be able to communicate between the host and the gadget side systems as if they were connected by a serial cable.Configuring and building the Linux Operating System for Zynq Ultrascale + MPSoC
Note: This Tech Tip is developed based on PetaLinux version 2018.1. It is recommended to download the PetaLinux installer version 2018.1 from Xilinx website. This example uses the ZCU102 PetaLinux BSP to create a PetaLinux project. For Rev1 board download ZCU102,ES2,Rev1.0 BSP and for Rev B/C/D boards, download ZCU102 BSP from Xilinx website.

Figure 2: Linux kernel configuration withUSB 3.0 device mode CDC ACM support
Figure 3: Linux kernel configuration for Userspace-driven configuration filesystem
Preparing SD card:
copy the following files into the SD card
Note: For user convenience SD card images are provided along with this Tech Tip. Download the design files archive released with this Tech Tip and extract it under the convenient location of host machine. Find the SD card images under the path Design_files/ of your extracted directory. For Rev1.0 board copy the files from Design_files/Rev_1_0_prebuilt_images directory to SD card and for Rev B/C/D boards, copy files from Design_files/Rev_BCD_prebuilt_images on to SD card. Refer to appendix A for more information about design files.
ZCU102 Board Setup:
Figure 4: ZCU102 board setup for Communication device class
Figure 5: SD boot mode switch setting for ZCU102 Rev B/C/D Board
Figure 6: SD boot mode settings for ZCU102 Rev1.0 board

Testing Linux Zynq® UltraScale+™ MPSoC USB 3.0 communication device class functionality on Windows host PC:

Figure 7: Zynqmp linux console after successful installation
Note: if automatic driver installation fails and it shows a popup windows of Device driver software was not successfully installed. In that case try to install the windows driver for Zynq® UltraScale+™ MPSoC USB 3.0 device on host machine by following the below procedure.

Installation steps for windows CDC ACM driver


Figure 8: Gadget driver after successful installation>
Figure 9: Serial terminal shows successful transfer of data from target board to host machine
Figure 10: Serial terminal shows successful transfer of data from host machine to target board
Testing Linux Zynq® UltraScale+™ MPSoC USB 3.0 communication device class functionality on Linux host PC:
The CDC ACM only driver that comes with the Linux kernel is supported on Linux host PC.
Figure 11: Inspecting log for successful device installation
Figure 12: Sending data over USB 3.0 ttyGS0
Figure 13: Reading data on ttyACM0
Figure 14: Sending data over ttyACM0
Figure 15: Reading data on target at ttyGS0
Appendix A: If other items need to be added
Zynqmp_CDC_design_files_2018_1.zip