Zynq Linux USB Device Driver

Introduction

The purpose of this page is to describe the Linux USB driver solution for Zynq. The driver is made up of multiple drivers to suport host, device and On-The-Go (OTG) modes.

Testing

Host

Testing has been done with USB memory sticks, mice, keyboards, and web cams.

Device

Testing has been done using the g_file_storage driver in Linux to emulate a mass storage devices.

OTG

Testing has been done using the g_file_storage driver in Linux such that the device is a mass storage device and it is mounted and written to by the host.

Device Tree Details

A property in the device tree, dr_mode, controls the mode of the device driver. The following table shows the values that the property can contain.

Mode Value of dr_mode
host host
device peripheral
OTG otg

Kernel Configuration

The default kernel configuration for Zynq has all the drivers built into the kernel.

OTG Details

Using the correct cables is the key to OTG operation. Testing was doing using two cables joined together to create an OTG cable. An OTG cable has a micro A connector on one end and a micro B connector on the other end. The micro A connector is the host side of the cable and the micro B connector is the device side by default.

Testing for OTG was done with 2 ZC702 boards connected togther. An adapter with a Micro-A plug on one end and a Standard-A receptacle on the other end was used for testing. The adapter is connected the board that defaults to being a host. A cable with a Micro-B plug on one end and a Standard-A plug on the end is connected to the board that defaults to being a device. The cable is then connected to the adapter with the Standard-A receptable and Standard-A plug.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License