NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

MUSB Linux Driver Configuration

From Texas Instruments Wiki
Jump to: navigation, search

The Linux USB drivers have multiple layers, which are controlled by multiple kernel configurations. This page describe these configurations which are required to enable MUSB in AMSDK 8.0 (Kernel 3.14+), and all Processor Linux SDKs (up to kernel v4.9.x).


Introduction[edit]

The following drivers are required for MUSB, regardless for host-only, device-only, or dual-role mode.

  • USB Core Driver
  • MUSB Controller Driver
  • MUSB Platform Glue Driver
  • USB PHY Driver
  • CPPI41 DMA Driver (optional)

For MUSB to work in host mode, the USB Class Driver(s) and the corresponding upper layer functional driver(s) are required too. For example, to support USB thumb drive or harddisk, the USB MSC driver and SCSI drivers should be enabled.

And for MUSB to work in device mode, the USB gadget driver(s) is required as well.

Additionally, a (any) gadget driver is required too when the MUSB controller is configured in dual-role mode. (TODO: how to configure the mode in dts)

Configurations[edit]

The following table lists the MUSB related drivers, their CONFIG options, and locations under "Device Drivers" in menuconfig.

Drivers Options Locations
USB Core CONFIG_USB_SUPPORT
USB Support

CONFIG_USB
USB Support
Support for Host-side USB
MUSB Controller
CONFIG_USB_MUSB_HDRC
CONFIG_USB_MUSB_DUAL_ROLE
USB Support
Inventra Highspeed Dual Role
MUSB Mode Selection (Dual Role mode)
MUSB Glue
CONFIG_USB_MUSB_DSPS
(for AM335x only)
USB Support
Inventra Highspeed Dual Role
Platform Glue Layer
TI DSPS platforms

CONFIG_USB_MUSB_DA8XX
(for OMAPL138 only)
USB Support
Inventra Highspeed Dual Role
Platform Glue Layer
DA8xx/OMAP-L1x
USB PHY

CONFIG_NOP_USB_XCEIV
CONFIG_AM335X_PHY_USB
(for AM335x only)
USB Support
USB Physical Layer drivers
NOP USB Transceiver Driver
AM335x USB PHY Driver

.



CONFIG_NOP_USB_XCEIV
(for OMAPL138 only)
USB Support
USB Physical Layer drivers
NOP USB Transceiver Driver

.

CPPI41 DMA CONFIG_DMADEVICES
CONFIG_TI_CPPI41
DMA Engine support
CPPI 4.1 DMA support



CONFIG_USB_TI_CPPI41_DMA
USB Support
Inventra Highspeed Dual Role
MUSB DMA mode
TI CPPI 4.1
PIO mode

CONFIG_MUSB_PIO_ONLY
USB Support
Inventra Highspeed Dual Role
Disable DMA (always use PIO)
USB Class
CONFIG_*
USB Support
*
USB Gadget
CONFIG_USB_GADGET

CONFIG_*
USB Support
USB Gadget Support
USB Gadget Drivers
*

Kernel Config Merge Script[edit]

The kernel config merge script (scripts/kconfig/merge_config.sh) is a convenient tool to modify kernel config file. Doing the following steps enables MUSB drivers in kernel for AM335x.

- Put the following content into a file, for example, called omap2plus-extra.cfg

# MUSB
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_HOST=n
CONFIG_USB_MUSB_GADGET=n
CONFIG_USB_MUSB_DUAL_ROLE=y
CONFIG_USB_MUSB_TUSB6010=n
CONFIG_USB_MUSB_OMAP2PLUS=n
CONFIG_USB_MUSB_AM35X=n
CONFIG_USB_MUSB_DSPS=m
CONFIG_USB_MUSB_UX500=n
CONFIG_USB_TI_CPPI41_DMA=y
CONFIG_MUSB_PIO_ONLY=n

# MISC to avoid prompt
CONFIG_USB_SISUSBVGA=n

- generate .config

 $ make omap2plus_defconfig

- merge MUSB options

 $ scripts/kconfig/merge_config.sh -m .config omap2plus-extra.cfg

Build Drivers into Kernel Image[edit]

To build all MUSB related drivers into kernel, use one of the following three options.

1. Set the following config options to 'y' instead of 'm' in .config.

       CONFIG_USB_MUSB_HDRC=y
       CONFIG_USB_MUSB_DSPS=y
       CONFIG_AM335X_PHY_USB=y (for AM335x only)

2. Set the related config options in the table above to <*> instead of '<M>' in menuconfig.

3. Set the corresponding options to 'y', then use merge_config.sh script mentioned in the previous section.

Known Issue: the built-in gadget driver is not functional. But a workaround is to disable CPPI41 DMA and use PIO mode, or build gadget drivers as kernel module.

Notes[edit]

  • Config option USB_OTG is not required for MUSB dual-role mode.
  • Don't enable Config option USB_OTG_WHITELIST, Unless you know what this option means.

Archived[edit]

Sitara Linux SDK 08.00.00.00

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MUSB Linux Driver Configuration here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MUSB Linux Driver Configuration here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article MUSB Linux Driver Configuration here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article MUSB Linux Driver Configuration here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article MUSB Linux Driver Configuration here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MUSB Linux Driver Configuration here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MUSB Linux Driver Configuration here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article MUSB Linux Driver Configuration here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article MUSB Linux Driver Configuration here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity