1550a7375SFelipe Balbi# 2550a7375SFelipe Balbi# USB Dual Role (OTG-ready) Controller Drivers 3550a7375SFelipe Balbi# for silicon based on Mentor Graphics INVENTRA designs 4550a7375SFelipe Balbi# 5550a7375SFelipe Balbi 6550a7375SFelipe Balbicomment "Enable Host or Gadget support to see Inventra options" 7550a7375SFelipe Balbi depends on !USB && USB_GADGET=n 8550a7375SFelipe Balbi 9550a7375SFelipe Balbi# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller 10550a7375SFelipe Balbiconfig USB_MUSB_HDRC 11b20cf906SMike Frysinger depends on (USB || USB_GADGET) 121c47cb01SSonic Zhang depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523)) 138ba63a22SCliff Cai select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) 14550a7375SFelipe Balbi select TWL4030_USB if MACH_OMAP_3430SDP 154c42fbc9SHema HK select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA 1637daa925SDavid Brownell select USB_OTG_UTILS 17*1376d92fSFelipe Balbi tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 18550a7375SFelipe Balbi help 19550a7375SFelipe Balbi Say Y here if your system has a dual role high speed USB 20550a7375SFelipe Balbi controller based on the Mentor Graphics silicon IP. Then 21550a7375SFelipe Balbi configure options to match your silicon and the board 22550a7375SFelipe Balbi it's being used with, including the USB peripheral role, 23550a7375SFelipe Balbi or the USB host role, or both. 24550a7375SFelipe Balbi 25a227fd7dSDavid Brownell Texas Instruments familiies using this IP include DaVinci 26a227fd7dSDavid Brownell (35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010. 27550a7375SFelipe Balbi 28085ad406SBryan Wu Analog Devices parts using this IP include Blackfin BF54x, 29085ad406SBryan Wu BF525 and BF527. 30085ad406SBryan Wu 31550a7375SFelipe Balbi If you do not know what this is, please say N. 32550a7375SFelipe Balbi 33*1376d92fSFelipe Balbi To compile this driver as a module, choose M here; the 34*1376d92fSFelipe Balbi module will be called "musb-hdrc". 35550a7375SFelipe Balbi 367c925546SFelipe Balbichoice 377c925546SFelipe Balbi prompt "Platform Glue Layer" 38550a7375SFelipe Balbi depends on USB_MUSB_HDRC 39550a7375SFelipe Balbi 407c925546SFelipe Balbiconfig USB_MUSB_DAVINCI 41*1376d92fSFelipe Balbi tristate "DaVinci" 427c925546SFelipe Balbi depends on ARCH_DAVINCI_DMx 43550a7375SFelipe Balbi 447c925546SFelipe Balbiconfig USB_MUSB_DA8XX 45*1376d92fSFelipe Balbi tristate "DA8xx/OMAP-L1x" 467c925546SFelipe Balbi depends on ARCH_DAVINCI_DA8XX 473ee076deSSergei Shtylyov 487c925546SFelipe Balbiconfig USB_MUSB_TUSB6010 49*1376d92fSFelipe Balbi tristate "TUSB6010" 507c925546SFelipe Balbi depends on ARCH_OMAP 51550a7375SFelipe Balbi 527c925546SFelipe Balbiconfig USB_MUSB_OMAP2PLUS 53*1376d92fSFelipe Balbi tristate "OMAP2430 and onwards" 547c925546SFelipe Balbi depends on ARCH_OMAP2PLUS 55085ad406SBryan Wu 56eb83092cSAjay Kumar Guptaconfig USB_MUSB_AM35X 57*1376d92fSFelipe Balbi tristate "AM35x" 587c925546SFelipe Balbi depends on ARCH_OMAP 59eb83092cSAjay Kumar Gupta 607c925546SFelipe Balbiconfig USB_MUSB_BLACKFIN 61*1376d92fSFelipe Balbi tristate "Blackfin" 627c925546SFelipe Balbi depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523) 637c925546SFelipe Balbi 644bc36fd3SMian Yousaf Kaukabconfig USB_MUSB_UX500 65*1376d92fSFelipe Balbi tristate "U8500 and U5500" 664bc36fd3SMian Yousaf Kaukab depends on (ARCH_U8500 && AB8500_USB) || (ARCH_U5500) 674bc36fd3SMian Yousaf Kaukab 687c925546SFelipe Balbiendchoice 69550a7375SFelipe Balbi 70550a7375SFelipe Balbichoice 71550a7375SFelipe Balbi prompt "Driver Mode" 72550a7375SFelipe Balbi depends on USB_MUSB_HDRC 73550a7375SFelipe Balbi help 74550a7375SFelipe Balbi Dual-Role devices can support both host and peripheral roles, 75550a7375SFelipe Balbi as well as a the special "OTG Device" role which can switch 76550a7375SFelipe Balbi between both roles as needed. 77550a7375SFelipe Balbi 78550a7375SFelipe Balbi# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support; 79550a7375SFelipe Balbi# OTG needs both roles, not just USB_MUSB_HOST. 80550a7375SFelipe Balbiconfig USB_MUSB_HOST 81550a7375SFelipe Balbi depends on USB 82550a7375SFelipe Balbi bool "USB Host" 83550a7375SFelipe Balbi help 84550a7375SFelipe Balbi Say Y here if your system supports the USB host role. 85550a7375SFelipe Balbi If it has a USB "A" (rectangular), "Mini-A" (uncommon), 86550a7375SFelipe Balbi or "Mini-AB" connector, it supports the host role. 87550a7375SFelipe Balbi (With a "Mini-AB" connector, you should enable USB OTG.) 88550a7375SFelipe Balbi 89550a7375SFelipe Balbi# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral 90550a7375SFelipe Balbi# side support ... OTG needs both roles 91550a7375SFelipe Balbiconfig USB_MUSB_PERIPHERAL 92550a7375SFelipe Balbi depends on USB_GADGET 93550a7375SFelipe Balbi bool "USB Peripheral (gadget stack)" 94550a7375SFelipe Balbi select USB_GADGET_MUSB_HDRC 95550a7375SFelipe Balbi help 96550a7375SFelipe Balbi Say Y here if your system supports the USB peripheral role. 97550a7375SFelipe Balbi If it has a USB "B" (squarish), "Mini-B", or "Mini-AB" 98550a7375SFelipe Balbi connector, it supports the peripheral role. 99550a7375SFelipe Balbi (With a "Mini-AB" connector, you should enable USB OTG.) 100550a7375SFelipe Balbi 101550a7375SFelipe Balbiconfig USB_MUSB_OTG 102550a7375SFelipe Balbi depends on USB && USB_GADGET && PM && EXPERIMENTAL 103550a7375SFelipe Balbi bool "Both host and peripheral: USB OTG (On The Go) Device" 104550a7375SFelipe Balbi select USB_GADGET_MUSB_HDRC 105550a7375SFelipe Balbi select USB_OTG 106550a7375SFelipe Balbi help 107550a7375SFelipe Balbi The most notable feature of USB OTG is support for a 108550a7375SFelipe Balbi "Dual-Role" device, which can act as either a device 109550a7375SFelipe Balbi or a host. The initial role choice can be changed 110550a7375SFelipe Balbi later, when two dual-role devices talk to each other. 111550a7375SFelipe Balbi 112550a7375SFelipe Balbi At this writing, the OTG support in this driver is incomplete, 113550a7375SFelipe Balbi omitting the mandatory HNP or SRP protocols. However, some 114550a7375SFelipe Balbi of the cable based role switching works. (That is, grounding 115550a7375SFelipe Balbi the ID pin switches the controller to host mode, while leaving 116550a7375SFelipe Balbi it floating leaves it in peripheral mode.) 117550a7375SFelipe Balbi 118550a7375SFelipe Balbi Select this if your system has a Mini-AB connector, or 119550a7375SFelipe Balbi to simplify certain kinds of configuration. 120550a7375SFelipe Balbi 121550a7375SFelipe Balbi To implement your OTG Targeted Peripherals List (TPL), enable 122550a7375SFelipe Balbi USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h" 123550a7375SFelipe Balbi to match your requirements. 124550a7375SFelipe Balbi 125550a7375SFelipe Balbiendchoice 126550a7375SFelipe Balbi 127550a7375SFelipe Balbi# enable peripheral support (including with OTG) 128550a7375SFelipe Balbiconfig USB_GADGET_MUSB_HDRC 129550a7375SFelipe Balbi bool 130550a7375SFelipe Balbi depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG) 131550a7375SFelipe Balbi# default y 132550a7375SFelipe Balbi# select USB_GADGET_DUALSPEED 133550a7375SFelipe Balbi# select USB_GADGET_SELECTED 134550a7375SFelipe Balbi 135550a7375SFelipe Balbi# enables host support (including with OTG) 136550a7375SFelipe Balbiconfig USB_MUSB_HDRC_HCD 137550a7375SFelipe Balbi bool 138550a7375SFelipe Balbi depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG) 139550a7375SFelipe Balbi select USB_OTG if USB_GADGET_MUSB_HDRC 140550a7375SFelipe Balbi default y 141550a7375SFelipe Balbi 142550a7375SFelipe Balbi 143550a7375SFelipe Balbiconfig MUSB_PIO_ONLY 144550a7375SFelipe Balbi bool 'Disable DMA (always use PIO)' 145550a7375SFelipe Balbi depends on USB_MUSB_HDRC 1467c925546SFelipe Balbi default USB_MUSB_TUSB6010 || USB_MUSB_DA8XX || USB_MUSB_AM35X 147550a7375SFelipe Balbi help 148550a7375SFelipe Balbi All data is copied between memory and FIFO by the CPU. 149550a7375SFelipe Balbi DMA controllers are ignored. 150550a7375SFelipe Balbi 151550a7375SFelipe Balbi Do not select 'n' here unless DMA support for your SOC or board 152550a7375SFelipe Balbi is unavailable (or unstable). When DMA is enabled at compile time, 153550a7375SFelipe Balbi you can still disable it at run time using the "use_dma=n" module 154550a7375SFelipe Balbi parameter. 155550a7375SFelipe Balbi 156550a7375SFelipe Balbiconfig USB_INVENTRA_DMA 157550a7375SFelipe Balbi bool 158550a7375SFelipe Balbi depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY 1597c925546SFelipe Balbi default USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN 160550a7375SFelipe Balbi help 161550a7375SFelipe Balbi Enable DMA transfers using Mentor's engine. 162550a7375SFelipe Balbi 163550a7375SFelipe Balbiconfig USB_TI_CPPI_DMA 164550a7375SFelipe Balbi bool 165550a7375SFelipe Balbi depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY 1667c925546SFelipe Balbi default USB_MUSB_DAVINCI 167550a7375SFelipe Balbi help 168550a7375SFelipe Balbi Enable DMA transfers when TI CPPI DMA is available. 169550a7375SFelipe Balbi 170550a7375SFelipe Balbiconfig USB_TUSB_OMAP_DMA 171550a7375SFelipe Balbi bool 172550a7375SFelipe Balbi depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY 1737c925546SFelipe Balbi depends on USB_MUSB_TUSB6010 174550a7375SFelipe Balbi depends on ARCH_OMAP 175550a7375SFelipe Balbi default y 176550a7375SFelipe Balbi help 177550a7375SFelipe Balbi Enable DMA transfers on TUSB 6010 when OMAP DMA is available. 178550a7375SFelipe Balbi 179