hcm's fixes
[kernel-power] / usbhost / drivers / usb2 / 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         select TWL4030_USB if MACH_NOKIA_RX51
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 parts using this IP include DaVinci 644x,
25           OMAP 243x, OMAP 343x, 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
35 config 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_OMAP34XX
41         default y if (BF54x && !BF544)
42         default y if (BF52x && !BF522 && !BF523)
43
44 comment "DaVinci 644x USB support"
45         depends on USB_MUSB_HDRC && ARCH_DAVINCI
46
47 comment "OMAP 243x high speed USB support"
48         depends on USB_MUSB_HDRC && ARCH_OMAP2430
49
50 comment "OMAP 343x high speed USB support"
51         depends on USB_MUSB_HDRC && ARCH_OMAP34XX
52
53 comment "Blackfin high speed USB Support"
54         depends on USB_MUSB_HDRC && (BF54x && !BF544) || (BF52x && !BF522 && !BF523)
55
56 config USB_TUSB6010
57         boolean "TUSB 6010 support"
58         depends on USB_MUSB_HDRC && !USB_MUSB_SOC
59         default y
60         help
61           The TUSB 6010 chip, from Texas Instruments, connects a discrete
62           HDRC core using a 16-bit parallel bus (NOR flash style) or VLYNQ
63           (a high speed serial link).  It can use system-specific external
64           DMA controllers.
65
66 choice
67         prompt "Driver Mode"
68         depends on USB_MUSB_HDRC
69         help
70           Dual-Role devices can support both host and peripheral roles,
71           as well as a the special "OTG Device" role which can switch
72           between both roles as needed.
73
74 # use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support;
75 # OTG needs both roles, not just USB_MUSB_HOST.
76 config USB_MUSB_HOST
77         depends on USB
78         bool "USB Host"
79         help
80           Say Y here if your system supports the USB host role.
81           If it has a USB "A" (rectangular), "Mini-A" (uncommon),
82           or "Mini-AB" connector, it supports the host role.
83           (With a "Mini-AB" connector, you should enable USB OTG.)
84
85 # use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral
86 # side support ... OTG needs both roles
87 config USB_MUSB_PERIPHERAL
88         depends on USB_GADGET
89         bool "USB Peripheral (gadget stack)"
90         select USB_GADGET_MUSB_HDRC
91         help
92           Say Y here if your system supports the USB peripheral role.
93           If it has a USB "B" (squarish), "Mini-B", or "Mini-AB"
94           connector, it supports the peripheral role.
95           (With a "Mini-AB" connector, you should enable USB OTG.)
96
97 config USB_MUSB_OTG
98         depends on USB && USB_GADGET && PM && EXPERIMENTAL
99         bool "Both host and peripheral:  USB OTG (On The Go) Device"
100         select USB_GADGET_MUSB_HDRC
101         select USB_OTG
102         help
103            The most notable feature of USB OTG is support for a
104            "Dual-Role" device, which can act as either a device
105            or a host.  The initial role choice can be changed
106            later, when two dual-role devices talk to each other.
107
108            At this writing, the OTG support in this driver is incomplete,
109            omitting the mandatory HNP or SRP protocols.  However, some
110            of the cable based role switching works.  (That is, grounding
111            the ID pin switches the controller to host mode, while leaving
112            it floating leaves it in peripheral mode.)
113
114            Select this if your system has a Mini-AB connector, or
115            to simplify certain kinds of configuration.
116
117            To implement your OTG Targeted Peripherals List (TPL), enable
118            USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h"
119            to match your requirements.
120
121 endchoice
122
123 # enable peripheral support (including with OTG)
124 config USB_GADGET_MUSB_HDRC
125         bool
126         depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
127 #       default y
128 #       select USB_GADGET_DUALSPEED
129 #       select USB_GADGET_SELECTED
130
131 # enables host support (including with OTG)
132 config USB_MUSB_HDRC_HCD
133         bool
134         depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG)
135         select USB_OTG if USB_GADGET_MUSB_HDRC
136         default y
137
138
139 config MUSB_PIO_ONLY
140         bool 'Disable DMA (always use PIO)'
141         depends on USB_MUSB_HDRC
142         default y if USB_TUSB6010
143         help
144           All data is copied between memory and FIFO by the CPU.
145           DMA controllers are ignored.
146
147           Do not select 'n' here unless DMA support for your SOC or board
148           is unavailable (or unstable).  When DMA is enabled at compile time,
149           you can still disable it at run time using the "use_dma=n" module
150           parameter.
151
152 config USB_INVENTRA_DMA
153         bool
154         depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
155         default ARCH_OMAP2430 || ARCH_OMAP34XX || BLACKFIN
156         help
157           Enable DMA transfers using Mentor's engine.
158
159 config USB_TI_CPPI_DMA
160         bool
161         depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
162         default ARCH_DAVINCI
163         help
164           Enable DMA transfers when TI CPPI DMA is available.
165
166 config USB_TUSB_OMAP_DMA
167         bool
168         depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
169         depends on USB_TUSB6010
170         depends on ARCH_OMAP
171         default y
172         help
173           Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
174
175 config  USB_MUSB_DEBUG
176         depends on USB_MUSB_HDRC
177         bool "Enable debugging messages"
178         default n
179         help
180           This enables musb debugging. To set the logging level use the debug
181           module parameter. Starting at level 3, per-transfer (urb, usb_request,
182           packet, or dma transfer) tracing may kick in.
183
184 config MUSB_PROC_FS
185         depends on USB_MUSB_HDRC && PROC_FS
186         bool "Enabled old musb procfs interface"
187         default n
188         help
189           This enables the old musb procfs entry. Ideally this would move to a userland application
190           talking to musb via usbfs and issueing the correct control messages.