Wiki

This version (27 Jan 2021 22:40) was approved by Robin Getz.The Previously approved version (27 Jul 2020 07:21) is available.Diff

USB Interface

Introduction

This document introduces usage of USB interface for SC5XX Linux. There are two different kinds of USB controller on SC5XX silicon, one supports OTG (On-The-Go) for USB2.0, which is able to work as Host or Device dynamically according to the standard USB HNP protocol. Another support Host or Device only, dedicated hardware and software configurations should be made in advance to identify it is for Host or Device mode.

Example Usage Description

In this page, we cover configuration and example on how to use USB interface in Host, Device, and OTG mode, and take ADSP-SC589 EZ-Kit ( with an OTG port and a HS port) as example to demonstrate the USB usage, which using the USB - OTG port to illustrate both Host (Host only mode) and OTG ( auto-detected Dual Role mode ) cases, and the USB1-HS port to illustrate DEVICE (Gadget only mode)example.


Supported Board

Below table shows numbers of the USB controller for SC589/584/573 chips [supported:; unsupported:]

Board Hardware Port USB 2.0 Supported Mode
HOST-Host only mode DEVICE-Gadget only mode OTG-Dual Role mode
adsp-sc573-ezkit USB0 - OTG Port ( P23 )
adsp-sc584-ezkit USB0 - OTG Port ( P23 )
adsp-sc589-ezkit USB0 - OTG Port ( P10 )
USB1 - HS  Port ( P11 )
adsp-sc589-mini USB0 - OTG Port ( P10 )
USB1 - HS Port  ( J7 )

HOST - host only mode

With the USB Host mode, we can add a lot of USB dongle peripheral to the Ez-Kits and using the corresponding features.

Hardware Connection Software Configuration

Step 1: Linux kernel Configuration:

$ bitbake linux-adi -c cleansstate
$ bitbake linux-adi -c menuconfig

Step 2: Configure the USB drivers to host mode:

Device Drivers  --->
	[*] USB support  --->
		<*>   Support for Host-side USB
                [*]   Enable USB persist by default 
                <*>   Inventra Highspeed Dual Role Controller
                        MUSB Mode Selection (Host only mode)  --->
                        *** Platform Glue Layer *** 
                <*>     ADI
                        *** MUSB DMA mode ***
                [N]     Disable DMA (always use PIO)  
                [*]       Inventra 

Step 3: Configure the USB host mode supported devices:

Device Drivers  --->
        SCSI device support  --->
		<*> SCSI device support
		<*> SCSI disk support
	[*] USB support  --->
                <*>   USB Mass Storage support

Step 4: Build target images:

$ bitbake adsp-sc5xx-full

USB Host Mode Example Usage:


DEVICE - gadget only mode

With the USB Device mode, we can connect the the Ez-Kits to a host PC other Hosts with the USB cable and make the Ez-Kits as an USB Devices: Hardware Connection Software Configuration

Step 1: Linux kernel Configuration:

$ bitbake linux-adi -c cleansstate
$ bitbake linux-adi -c menuconfig

Step 2: Configure the USB drivers to device mode(gadget only):

Device Drivers  --->
	[*] USB support  --->
                <N>   Support for Host-side USB
                <*>   Inventra Highspeed Dual Role Controller
                        MUSB Mode Selection (Gadget only mode)  --->
                        *** Platform Glue Layer *** 
                <*>     ADI
                        *** MUSB DMA mode ***
                [N]     Disable DMA (always use PIO)  
                [*]       Inventra
                <*>   USB Gadget Support  --->
                      USB Physical Layer drivers  --->
		        <*> NOP USB Transceiver Driver 

Step 3: Configure the USB device mode supported devices:

Device Drivers  --->
	[*] USB support  --->
                <*>   USB Gadget Support  --->
                      <M>   USB Gadget precomposed configurations
                      <M>     Gadget Zero (DEVELOPMENT)
                      <M>     Audio Gadget
                      [*]       UAC 1.0
                      [*]         UAC 1.0 (Legacy)
                      <M>     Ethernet Gadget (with CDC Ethernet support)
                      [*]       RNDIS support
                      <M>     Gadget Filesystem   
                      <M>     Mass Storage Gadget      
                      <M>     Serial Gadget (with CDC ACM and CDC OBEX support)
                      <M>     HID Gadget 

Step 4: Build target images:

$ bitbake adsp-sc5xx-full

USB Device Mode Example Usage:


OTG - dual role mode

The USB OTG port can work as either Host or Device, depends on the way we connect it, for Host or Device application, as illustrated previously.



Back to Kernel Features and Device Drivers for ADSP-SC5xx Yocto Linux

resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/usb/start.txt · Last modified: 27 Jan 2021 22:35 by Robin Getz