blob: 1dd21c2315e4e5b6467a671ee0941e18f706ab06 [file] [log] [blame]
Felipe Balbi550a7372008-07-24 12:27:36 +03001#
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
Mike Frysingerb20cf902009-09-16 21:10:53 -040011 depends on (USB || USB_GADGET)
Sonic Zhang1c47cb02009-11-16 20:04:21 -050012 depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
Cliff Cai8ba63a22009-11-16 20:05:03 -050013 select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
Felipe Balbi550a7372008-07-24 12:27:36 +030014 select TWL4030_USB if MACH_OMAP_3430SDP
David Brownell37daa922009-01-24 17:56:25 -080015 select USB_OTG_UTILS
Bryan Wu085ad402008-12-02 21:33:49 +020016 tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
Felipe Balbi550a7372008-07-24 12:27:36 +030017 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
David Brownella227fd72009-02-24 15:31:54 -080024 Texas Instruments familiies using this IP include DaVinci
25 (35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010.
Felipe Balbi550a7372008-07-24 12:27:36 +030026
Bryan Wu085ad402008-12-02 21:33:49 +020027 Analog Devices parts using this IP include Blackfin BF54x,
28 BF525 and BF527.
29
Felipe Balbi550a7372008-07-24 12:27:36 +030030 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
Tony Lindgrena8eb7ca2010-02-12 12:26:48 -080040 default y if ARCH_OMAP3
Maulik Mankadc71b1b92010-03-12 10:29:08 +020041 default y if ARCH_OMAP4
Bryan Wu085ad402008-12-02 21:33:49 +020042 default y if (BF54x && !BF544)
43 default y if (BF52x && !BF522 && !BF523)
Felipe Balbi550a7372008-07-24 12:27:36 +030044
David Brownella227fd72009-02-24 15:31:54 -080045comment "DaVinci 35x and 644x USB support"
Sergei Shtylyovc6a39ee2010-03-25 13:14:24 +020046 depends on USB_MUSB_HDRC && ARCH_DAVINCI_DMx
Felipe Balbi550a7372008-07-24 12:27:36 +030047
Sergei Shtylyov3ee076d2010-09-24 13:44:03 +030048comment "DA8xx/OMAP-L1x USB support"
49 depends on USB_MUSB_HDRC && ARCH_DAVINCI_DA8XX
50
Felipe Balbi550a7372008-07-24 12:27:36 +030051comment "OMAP 243x high speed USB support"
52 depends on USB_MUSB_HDRC && ARCH_OMAP2430
53
54comment "OMAP 343x high speed USB support"
Tony Lindgrena8eb7ca2010-02-12 12:26:48 -080055 depends on USB_MUSB_HDRC && ARCH_OMAP3
Felipe Balbi550a7372008-07-24 12:27:36 +030056
Maulik Mankadc71b1b92010-03-12 10:29:08 +020057comment "OMAP 44xx high speed USB support"
58 depends on USB_MUSB_HDRC && ARCH_OMAP4
59
Bryan Wu085ad402008-12-02 21:33:49 +020060comment "Blackfin high speed USB Support"
David Brownellcd674352009-01-26 02:05:43 -080061 depends on USB_MUSB_HDRC && ((BF54x && !BF544) || (BF52x && !BF522 && !BF523))
Bryan Wu085ad402008-12-02 21:33:49 +020062
Felipe Balbi550a7372008-07-24 12:27:36 +030063config USB_TUSB6010
64 boolean "TUSB 6010 support"
65 depends on USB_MUSB_HDRC && !USB_MUSB_SOC
David Brownell84e250f2009-03-31 12:30:04 -070066 select NOP_USB_XCEIV
Felipe Balbi550a7372008-07-24 12:27:36 +030067 default y
68 help
69 The TUSB 6010 chip, from Texas Instruments, connects a discrete
70 HDRC core using a 16-bit parallel bus (NOR flash style) or VLYNQ
71 (a high speed serial link). It can use system-specific external
72 DMA controllers.
73
74choice
75 prompt "Driver Mode"
76 depends on USB_MUSB_HDRC
77 help
78 Dual-Role devices can support both host and peripheral roles,
79 as well as a the special "OTG Device" role which can switch
80 between both roles as needed.
81
82# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support;
83# OTG needs both roles, not just USB_MUSB_HOST.
84config USB_MUSB_HOST
85 depends on USB
86 bool "USB Host"
87 help
88 Say Y here if your system supports the USB host role.
89 If it has a USB "A" (rectangular), "Mini-A" (uncommon),
90 or "Mini-AB" connector, it supports the host role.
91 (With a "Mini-AB" connector, you should enable USB OTG.)
92
93# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral
94# side support ... OTG needs both roles
95config USB_MUSB_PERIPHERAL
96 depends on USB_GADGET
97 bool "USB Peripheral (gadget stack)"
98 select USB_GADGET_MUSB_HDRC
99 help
100 Say Y here if your system supports the USB peripheral role.
101 If it has a USB "B" (squarish), "Mini-B", or "Mini-AB"
102 connector, it supports the peripheral role.
103 (With a "Mini-AB" connector, you should enable USB OTG.)
104
105config USB_MUSB_OTG
106 depends on USB && USB_GADGET && PM && EXPERIMENTAL
107 bool "Both host and peripheral: USB OTG (On The Go) Device"
108 select USB_GADGET_MUSB_HDRC
109 select USB_OTG
110 help
111 The most notable feature of USB OTG is support for a
112 "Dual-Role" device, which can act as either a device
113 or a host. The initial role choice can be changed
114 later, when two dual-role devices talk to each other.
115
116 At this writing, the OTG support in this driver is incomplete,
117 omitting the mandatory HNP or SRP protocols. However, some
118 of the cable based role switching works. (That is, grounding
119 the ID pin switches the controller to host mode, while leaving
120 it floating leaves it in peripheral mode.)
121
122 Select this if your system has a Mini-AB connector, or
123 to simplify certain kinds of configuration.
124
125 To implement your OTG Targeted Peripherals List (TPL), enable
126 USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h"
127 to match your requirements.
128
129endchoice
130
131# enable peripheral support (including with OTG)
132config USB_GADGET_MUSB_HDRC
133 bool
134 depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
135# default y
136# select USB_GADGET_DUALSPEED
137# select USB_GADGET_SELECTED
138
139# enables host support (including with OTG)
140config USB_MUSB_HDRC_HCD
141 bool
142 depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG)
143 select USB_OTG if USB_GADGET_MUSB_HDRC
144 default y
145
146
147config MUSB_PIO_ONLY
148 bool 'Disable DMA (always use PIO)'
149 depends on USB_MUSB_HDRC
Sergei Shtylyov3ee076d2010-09-24 13:44:03 +0300150 default USB_TUSB6010 || ARCH_DAVINCI_DA8XX
Felipe Balbi550a7372008-07-24 12:27:36 +0300151 help
152 All data is copied between memory and FIFO by the CPU.
153 DMA controllers are ignored.
154
155 Do not select 'n' here unless DMA support for your SOC or board
156 is unavailable (or unstable). When DMA is enabled at compile time,
157 you can still disable it at run time using the "use_dma=n" module
158 parameter.
159
160config USB_INVENTRA_DMA
161 bool
162 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
Maulik Mankadc71b1b92010-03-12 10:29:08 +0200163 default ARCH_OMAP2430 || ARCH_OMAP3 || BLACKFIN || ARCH_OMAP4
Felipe Balbi550a7372008-07-24 12:27:36 +0300164 help
165 Enable DMA transfers using Mentor's engine.
166
167config USB_TI_CPPI_DMA
168 bool
169 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
170 default ARCH_DAVINCI
171 help
172 Enable DMA transfers when TI CPPI DMA is available.
173
174config USB_TUSB_OMAP_DMA
175 bool
176 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
177 depends on USB_TUSB6010
178 depends on ARCH_OMAP
179 default y
180 help
181 Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
182
Felipe Balbie8164f62008-08-10 21:22:35 +0300183config USB_MUSB_DEBUG
Felipe Balbi550a7372008-07-24 12:27:36 +0300184 depends on USB_MUSB_HDRC
Felipe Balbie8164f62008-08-10 21:22:35 +0300185 bool "Enable debugging messages"
186 default n
Felipe Balbi550a7372008-07-24 12:27:36 +0300187 help
Felipe Balbie8164f62008-08-10 21:22:35 +0300188 This enables musb debugging. To set the logging level use the debug
189 module parameter. Starting at level 3, per-transfer (urb, usb_request,
190 packet, or dma transfer) tracing may kick in.