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