blob: 7119d900a479bd577e316041ae980e88ba3e0cab [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
Felipe Balbi7c925542010-12-01 14:23:48 +020035choice
36 prompt "Platform Glue Layer"
Felipe Balbi550a7372008-07-24 12:27:36 +030037 depends on USB_MUSB_HDRC
Felipe Balbi550a7372008-07-24 12:27:36 +030038
Felipe Balbi7c925542010-12-01 14:23:48 +020039config USB_MUSB_DAVINCI
40 bool "DaVinci"
41 depends on ARCH_DAVINCI_DMx
Felipe Balbi550a7372008-07-24 12:27:36 +030042
Felipe Balbi7c925542010-12-01 14:23:48 +020043config USB_MUSB_DA8XX
44 bool "DA8xx/OMAP-L1x"
45 depends on ARCH_DAVINCI_DA8XX
Sergei Shtylyov3ee076d2010-09-24 13:44:03 +030046
Felipe Balbi7c925542010-12-01 14:23:48 +020047config USB_MUSB_TUSB6010
48 bool "TUSB6010"
49 depends on ARCH_OMAP
Felipe Balbi550a7372008-07-24 12:27:36 +030050
Felipe Balbi7c925542010-12-01 14:23:48 +020051config USB_MUSB_OMAP2PLUS
52 bool "OMAP2430 and onwards"
53 depends on ARCH_OMAP2PLUS
Bryan Wu085ad402008-12-02 21:33:49 +020054
Ajay Kumar Guptaeb830922010-10-19 10:08:12 +030055config USB_MUSB_AM35X
Felipe Balbi7c925542010-12-01 14:23:48 +020056 bool "AM35x"
57 depends on ARCH_OMAP
Ajay Kumar Guptaeb830922010-10-19 10:08:12 +030058
Felipe Balbi7c925542010-12-01 14:23:48 +020059config USB_MUSB_BLACKFIN
60 bool "Blackfin"
61 depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
62
63endchoice
Felipe Balbi550a7372008-07-24 12:27:36 +030064
65choice
66 prompt "Driver Mode"
67 depends on USB_MUSB_HDRC
68 help
69 Dual-Role devices can support both host and peripheral roles,
70 as well as a the special "OTG Device" role which can switch
71 between both roles as needed.
72
73# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support;
74# OTG needs both roles, not just USB_MUSB_HOST.
75config USB_MUSB_HOST
76 depends on USB
77 bool "USB Host"
78 help
79 Say Y here if your system supports the USB host role.
80 If it has a USB "A" (rectangular), "Mini-A" (uncommon),
81 or "Mini-AB" connector, it supports the host role.
82 (With a "Mini-AB" connector, you should enable USB OTG.)
83
84# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral
85# side support ... OTG needs both roles
86config USB_MUSB_PERIPHERAL
87 depends on USB_GADGET
88 bool "USB Peripheral (gadget stack)"
89 select USB_GADGET_MUSB_HDRC
90 help
91 Say Y here if your system supports the USB peripheral role.
92 If it has a USB "B" (squarish), "Mini-B", or "Mini-AB"
93 connector, it supports the peripheral role.
94 (With a "Mini-AB" connector, you should enable USB OTG.)
95
96config USB_MUSB_OTG
97 depends on USB && USB_GADGET && PM && EXPERIMENTAL
98 bool "Both host and peripheral: USB OTG (On The Go) Device"
99 select USB_GADGET_MUSB_HDRC
100 select USB_OTG
101 help
102 The most notable feature of USB OTG is support for a
103 "Dual-Role" device, which can act as either a device
104 or a host. The initial role choice can be changed
105 later, when two dual-role devices talk to each other.
106
107 At this writing, the OTG support in this driver is incomplete,
108 omitting the mandatory HNP or SRP protocols. However, some
109 of the cable based role switching works. (That is, grounding
110 the ID pin switches the controller to host mode, while leaving
111 it floating leaves it in peripheral mode.)
112
113 Select this if your system has a Mini-AB connector, or
114 to simplify certain kinds of configuration.
115
116 To implement your OTG Targeted Peripherals List (TPL), enable
117 USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h"
118 to match your requirements.
119
120endchoice
121
122# enable peripheral support (including with OTG)
123config USB_GADGET_MUSB_HDRC
124 bool
125 depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
126# default y
127# select USB_GADGET_DUALSPEED
128# select USB_GADGET_SELECTED
129
130# enables host support (including with OTG)
131config USB_MUSB_HDRC_HCD
132 bool
133 depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG)
134 select USB_OTG if USB_GADGET_MUSB_HDRC
135 default y
136
137
138config MUSB_PIO_ONLY
139 bool 'Disable DMA (always use PIO)'
140 depends on USB_MUSB_HDRC
Felipe Balbi7c925542010-12-01 14:23:48 +0200141 default USB_MUSB_TUSB6010 || USB_MUSB_DA8XX || USB_MUSB_AM35X
Felipe Balbi550a7372008-07-24 12:27:36 +0300142 help
143 All data is copied between memory and FIFO by the CPU.
144 DMA controllers are ignored.
145
146 Do not select 'n' here unless DMA support for your SOC or board
147 is unavailable (or unstable). When DMA is enabled at compile time,
148 you can still disable it at run time using the "use_dma=n" module
149 parameter.
150
151config USB_INVENTRA_DMA
152 bool
153 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
Felipe Balbi7c925542010-12-01 14:23:48 +0200154 default USB_MUSB_OMAP2PLUS || USB_MUSB_BLACKFIN
Felipe Balbi550a7372008-07-24 12:27:36 +0300155 help
156 Enable DMA transfers using Mentor's engine.
157
158config USB_TI_CPPI_DMA
159 bool
160 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
Felipe Balbi7c925542010-12-01 14:23:48 +0200161 default USB_MUSB_DAVINCI
Felipe Balbi550a7372008-07-24 12:27:36 +0300162 help
163 Enable DMA transfers when TI CPPI DMA is available.
164
165config USB_TUSB_OMAP_DMA
166 bool
167 depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
Felipe Balbi7c925542010-12-01 14:23:48 +0200168 depends on USB_MUSB_TUSB6010
Felipe Balbi550a7372008-07-24 12:27:36 +0300169 depends on ARCH_OMAP
170 default y
171 help
172 Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
173
Felipe Balbie8164f62008-08-10 21:22:35 +0300174config USB_MUSB_DEBUG
Felipe Balbi550a7372008-07-24 12:27:36 +0300175 depends on USB_MUSB_HDRC
Felipe Balbie8164f62008-08-10 21:22:35 +0300176 bool "Enable debugging messages"
177 default n
Felipe Balbi550a7372008-07-24 12:27:36 +0300178 help
Felipe Balbie8164f62008-08-10 21:22:35 +0300179 This enables musb debugging. To set the logging level use the debug
180 module parameter. Starting at level 3, per-transfer (urb, usb_request,
181 packet, or dma transfer) tracing may kick in.