1# 2# USB Dual Role (OTG-ready) Controller Drivers 3# for silicon based on Mentor Graphics INVENTRA designs 4# 5 6comment "Enable Host or Gadget support to see Inventra options" 7 depends on !USB && USB_GADGET=n 8 9# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller 10config USB_MUSB_HDRC 11 depends on (USB || USB_GADGET) 12 depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523)) 13 select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN) 14 select TWL4030_USB if MACH_OMAP_3430SDP 15 select USB_OTG_UTILS 16 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' 17 help 18 Say Y here if your system has a dual role high speed USB 19 controller based on the Mentor Graphics silicon IP. Then 20 configure options to match your silicon and the board 21 it's being used with, including the USB peripheral role, 22 or the USB host role, or both. 23 24 Texas Instruments familiies using this IP include DaVinci 25 (35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010. 26 27 Analog Devices parts using this IP include Blackfin BF54x, 28 BF525 and BF527. 29 30 If you do not know what this is, please say N. 31 32 To compile this driver as a module, choose M here; the 33 module will be called "musb_hdrc". 34 35config USB_MUSB_SOC 36 boolean 37 depends on USB_MUSB_HDRC 38 default y if ARCH_DAVINCI 39 default y if ARCH_OMAP2430 40 default y if ARCH_OMAP3 41 default y if (BF54x && !BF544) 42 default y if (BF52x && !BF522 && !BF523) 43 44comment "DaVinci 35x and 644x USB support" 45 depends on USB_MUSB_HDRC && ARCH_DAVINCI 46 47comment "OMAP 243x high speed USB support" 48 depends on USB_MUSB_HDRC && ARCH_OMAP2430 49 50comment "OMAP 343x high speed USB support" 51 depends on USB_MUSB_HDRC && ARCH_OMAP3 52 53comment "Blackfin high speed USB Support" 54 depends on USB_MUSB_HDRC && ((BF54x && !BF544) || (BF52x && !BF522 && !BF523)) 55 56config USB_TUSB6010 57 boolean "TUSB 6010 support" 58 depends on USB_MUSB_HDRC && !USB_MUSB_SOC 59 select NOP_USB_XCEIV 60 default y 61 help 62 The TUSB 6010 chip, from Texas Instruments, connects a discrete 63 HDRC core using a 16-bit parallel bus (NOR flash style) or VLYNQ 64 (a high speed serial link). It can use system-specific external 65 DMA controllers. 66 67choice 68 prompt "Driver Mode" 69 depends on USB_MUSB_HDRC 70 help 71 Dual-Role devices can support both host and peripheral roles, 72 as well as a the special "OTG Device" role which can switch 73 between both roles as needed. 74 75# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support; 76# OTG needs both roles, not just USB_MUSB_HOST. 77config USB_MUSB_HOST 78 depends on USB 79 bool "USB Host" 80 help 81 Say Y here if your system supports the USB host role. 82 If it has a USB "A" (rectangular), "Mini-A" (uncommon), 83 or "Mini-AB" connector, it supports the host role. 84 (With a "Mini-AB" connector, you should enable USB OTG.) 85 86# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral 87# side support ... OTG needs both roles 88config USB_MUSB_PERIPHERAL 89 depends on USB_GADGET 90 bool "USB Peripheral (gadget stack)" 91 select USB_GADGET_MUSB_HDRC 92 help 93 Say Y here if your system supports the USB peripheral role. 94 If it has a USB "B" (squarish), "Mini-B", or "Mini-AB" 95 connector, it supports the peripheral role. 96 (With a "Mini-AB" connector, you should enable USB OTG.) 97 98config USB_MUSB_OTG 99 depends on USB && USB_GADGET && PM && EXPERIMENTAL 100 bool "Both host and peripheral: USB OTG (On The Go) Device" 101 select USB_GADGET_MUSB_HDRC 102 select USB_OTG 103 help 104 The most notable feature of USB OTG is support for a 105 "Dual-Role" device, which can act as either a device 106 or a host. The initial role choice can be changed 107 later, when two dual-role devices talk to each other. 108 109 At this writing, the OTG support in this driver is incomplete, 110 omitting the mandatory HNP or SRP protocols. However, some 111 of the cable based role switching works. (That is, grounding 112 the ID pin switches the controller to host mode, while leaving 113 it floating leaves it in peripheral mode.) 114 115 Select this if your system has a Mini-AB connector, or 116 to simplify certain kinds of configuration. 117 118 To implement your OTG Targeted Peripherals List (TPL), enable 119 USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h" 120 to match your requirements. 121 122endchoice 123 124# enable peripheral support (including with OTG) 125config USB_GADGET_MUSB_HDRC 126 bool 127 depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG) 128# default y 129# select USB_GADGET_DUALSPEED 130# select USB_GADGET_SELECTED 131 132# enables host support (including with OTG) 133config USB_MUSB_HDRC_HCD 134 bool 135 depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG) 136 select USB_OTG if USB_GADGET_MUSB_HDRC 137 default y 138 139 140config MUSB_PIO_ONLY 141 bool 'Disable DMA (always use PIO)' 142 depends on USB_MUSB_HDRC 143 default y if USB_TUSB6010 144 help 145 All data is copied between memory and FIFO by the CPU. 146 DMA controllers are ignored. 147 148 Do not select 'n' here unless DMA support for your SOC or board 149 is unavailable (or unstable). When DMA is enabled at compile time, 150 you can still disable it at run time using the "use_dma=n" module 151 parameter. 152 153config USB_INVENTRA_DMA 154 bool 155 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY 156 default ARCH_OMAP2430 || ARCH_OMAP3 || BLACKFIN 157 help 158 Enable DMA transfers using Mentor's engine. 159 160config USB_TI_CPPI_DMA 161 bool 162 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY 163 default ARCH_DAVINCI 164 help 165 Enable DMA transfers when TI CPPI DMA is available. 166 167config USB_TUSB_OMAP_DMA 168 bool 169 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY 170 depends on USB_TUSB6010 171 depends on ARCH_OMAP 172 default y 173 help 174 Enable DMA transfers on TUSB 6010 when OMAP DMA is available. 175 176config USB_MUSB_DEBUG 177 depends on USB_MUSB_HDRC 178 bool "Enable debugging messages" 179 default n 180 help 181 This enables musb debugging. To set the logging level use the debug 182 module parameter. Starting at level 3, per-transfer (urb, usb_request, 183 packet, or dma transfer) tracing may kick in. 184