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