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