xref: /openbmc/linux/drivers/usb/musb/Kconfig (revision e8164f64caff68d4e878e1719d88d145faa75f1d)
1550a7375SFelipe Balbi#
2550a7375SFelipe Balbi# USB Dual Role (OTG-ready) Controller Drivers
3550a7375SFelipe Balbi# for silicon based on Mentor Graphics INVENTRA designs
4550a7375SFelipe Balbi#
5550a7375SFelipe Balbi
6550a7375SFelipe Balbicomment "Enable Host or Gadget support to see Inventra options"
7550a7375SFelipe Balbi	depends on !USB && USB_GADGET=n
8550a7375SFelipe Balbi
9550a7375SFelipe Balbi# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
10550a7375SFelipe Balbiconfig USB_MUSB_HDRC
11550a7375SFelipe Balbi	depends on (USB || USB_GADGET) && HAVE_CLK
12550a7375SFelipe Balbi	select TWL4030_USB if MACH_OMAP_3430SDP
13550a7375SFelipe Balbi	tristate 'Inventra Highspeed Dual Role Controller (TI, ...)'
14550a7375SFelipe Balbi	help
15550a7375SFelipe Balbi	  Say Y here if your system has a dual role high speed USB
16550a7375SFelipe Balbi	  controller based on the Mentor Graphics silicon IP.  Then
17550a7375SFelipe Balbi	  configure options to match your silicon and the board
18550a7375SFelipe Balbi	  it's being used with, including the USB peripheral role,
19550a7375SFelipe Balbi	  or the USB host role, or both.
20550a7375SFelipe Balbi
21550a7375SFelipe Balbi	  Texas Instruments parts using this IP include DaVinci 644x,
22550a7375SFelipe Balbi	  OMAP 243x, OMAP 343x, and TUSB 6010.
23550a7375SFelipe Balbi
24550a7375SFelipe Balbi	  If you do not know what this is, please say N.
25550a7375SFelipe Balbi
26550a7375SFelipe Balbi	  To compile this driver as a module, choose M here; the
27550a7375SFelipe Balbi	  module will be called "musb_hdrc".
28550a7375SFelipe Balbi
29550a7375SFelipe Balbiconfig USB_MUSB_SOC
30550a7375SFelipe Balbi	boolean
31550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
32550a7375SFelipe Balbi	default y if ARCH_DAVINCI
33550a7375SFelipe Balbi	default y if ARCH_OMAP2430
34550a7375SFelipe Balbi	default y if ARCH_OMAP34XX
35550a7375SFelipe Balbi	help
36550a7375SFelipe Balbi	  Use a static <asm/arch/hdrc_cnf.h> file to describe how the
37550a7375SFelipe Balbi	  controller is configured (endpoints, mechanisms, etc) on the
38550a7375SFelipe Balbi	  current iteration of a given system-on-chip.
39550a7375SFelipe Balbi
40550a7375SFelipe Balbicomment "DaVinci 644x USB support"
41550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && ARCH_DAVINCI
42550a7375SFelipe Balbi
43550a7375SFelipe Balbicomment "OMAP 243x high speed USB support"
44550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && ARCH_OMAP2430
45550a7375SFelipe Balbi
46550a7375SFelipe Balbicomment "OMAP 343x high speed USB support"
47550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && ARCH_OMAP34XX
48550a7375SFelipe Balbi
49550a7375SFelipe Balbiconfig USB_TUSB6010
50550a7375SFelipe Balbi	boolean "TUSB 6010 support"
51550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !USB_MUSB_SOC
52550a7375SFelipe Balbi	default y
53550a7375SFelipe Balbi	help
54550a7375SFelipe Balbi	  The TUSB 6010 chip, from Texas Instruments, connects a discrete
55550a7375SFelipe Balbi	  HDRC core using a 16-bit parallel bus (NOR flash style) or VLYNQ
56550a7375SFelipe Balbi	  (a high speed serial link).  It can use system-specific external
57550a7375SFelipe Balbi	  DMA controllers.
58550a7375SFelipe Balbi
59550a7375SFelipe Balbichoice
60550a7375SFelipe Balbi	prompt "Driver Mode"
61550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
62550a7375SFelipe Balbi	help
63550a7375SFelipe Balbi	  Dual-Role devices can support both host and peripheral roles,
64550a7375SFelipe Balbi	  as well as a the special "OTG Device" role which can switch
65550a7375SFelipe Balbi	  between both roles as needed.
66550a7375SFelipe Balbi
67550a7375SFelipe Balbi# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support;
68550a7375SFelipe Balbi# OTG needs both roles, not just USB_MUSB_HOST.
69550a7375SFelipe Balbiconfig USB_MUSB_HOST
70550a7375SFelipe Balbi	depends on USB
71550a7375SFelipe Balbi	bool "USB Host"
72550a7375SFelipe Balbi	help
73550a7375SFelipe Balbi	  Say Y here if your system supports the USB host role.
74550a7375SFelipe Balbi	  If it has a USB "A" (rectangular), "Mini-A" (uncommon),
75550a7375SFelipe Balbi	  or "Mini-AB" connector, it supports the host role.
76550a7375SFelipe Balbi	  (With a "Mini-AB" connector, you should enable USB OTG.)
77550a7375SFelipe Balbi
78550a7375SFelipe Balbi# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral
79550a7375SFelipe Balbi# side support ... OTG needs both roles
80550a7375SFelipe Balbiconfig USB_MUSB_PERIPHERAL
81550a7375SFelipe Balbi	depends on USB_GADGET
82550a7375SFelipe Balbi	bool "USB Peripheral (gadget stack)"
83550a7375SFelipe Balbi	select USB_GADGET_MUSB_HDRC
84550a7375SFelipe Balbi	help
85550a7375SFelipe Balbi	  Say Y here if your system supports the USB peripheral role.
86550a7375SFelipe Balbi	  If it has a USB "B" (squarish), "Mini-B", or "Mini-AB"
87550a7375SFelipe Balbi	  connector, it supports the peripheral role.
88550a7375SFelipe Balbi	  (With a "Mini-AB" connector, you should enable USB OTG.)
89550a7375SFelipe Balbi
90550a7375SFelipe Balbiconfig USB_MUSB_OTG
91550a7375SFelipe Balbi	depends on USB && USB_GADGET && PM && EXPERIMENTAL
92550a7375SFelipe Balbi	bool "Both host and peripheral:  USB OTG (On The Go) Device"
93550a7375SFelipe Balbi	select USB_GADGET_MUSB_HDRC
94550a7375SFelipe Balbi	select USB_OTG
95550a7375SFelipe Balbi	help
96550a7375SFelipe Balbi	   The most notable feature of USB OTG is support for a
97550a7375SFelipe Balbi	   "Dual-Role" device, which can act as either a device
98550a7375SFelipe Balbi	   or a host.  The initial role choice can be changed
99550a7375SFelipe Balbi	   later, when two dual-role devices talk to each other.
100550a7375SFelipe Balbi
101550a7375SFelipe Balbi	   At this writing, the OTG support in this driver is incomplete,
102550a7375SFelipe Balbi	   omitting the mandatory HNP or SRP protocols.  However, some
103550a7375SFelipe Balbi	   of the cable based role switching works.  (That is, grounding
104550a7375SFelipe Balbi	   the ID pin switches the controller to host mode, while leaving
105550a7375SFelipe Balbi	   it floating leaves it in peripheral mode.)
106550a7375SFelipe Balbi
107550a7375SFelipe Balbi	   Select this if your system has a Mini-AB connector, or
108550a7375SFelipe Balbi	   to simplify certain kinds of configuration.
109550a7375SFelipe Balbi
110550a7375SFelipe Balbi	   To implement your OTG Targeted Peripherals List (TPL), enable
111550a7375SFelipe Balbi	   USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h"
112550a7375SFelipe Balbi	   to match your requirements.
113550a7375SFelipe Balbi
114550a7375SFelipe Balbiendchoice
115550a7375SFelipe Balbi
116550a7375SFelipe Balbi# enable peripheral support (including with OTG)
117550a7375SFelipe Balbiconfig USB_GADGET_MUSB_HDRC
118550a7375SFelipe Balbi	bool
119550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
120550a7375SFelipe Balbi#	default y
121550a7375SFelipe Balbi#	select USB_GADGET_DUALSPEED
122550a7375SFelipe Balbi#	select USB_GADGET_SELECTED
123550a7375SFelipe Balbi
124550a7375SFelipe Balbi# enables host support (including with OTG)
125550a7375SFelipe Balbiconfig USB_MUSB_HDRC_HCD
126550a7375SFelipe Balbi	bool
127550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG)
128550a7375SFelipe Balbi	select USB_OTG if USB_GADGET_MUSB_HDRC
129550a7375SFelipe Balbi	default y
130550a7375SFelipe Balbi
131550a7375SFelipe Balbi
132550a7375SFelipe Balbiconfig MUSB_PIO_ONLY
133550a7375SFelipe Balbi	bool 'Disable DMA (always use PIO)'
134550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
135550a7375SFelipe Balbi	default y if USB_TUSB6010
136550a7375SFelipe Balbi	help
137550a7375SFelipe Balbi	  All data is copied between memory and FIFO by the CPU.
138550a7375SFelipe Balbi	  DMA controllers are ignored.
139550a7375SFelipe Balbi
140550a7375SFelipe Balbi	  Do not select 'n' here unless DMA support for your SOC or board
141550a7375SFelipe Balbi	  is unavailable (or unstable).  When DMA is enabled at compile time,
142550a7375SFelipe Balbi	  you can still disable it at run time using the "use_dma=n" module
143550a7375SFelipe Balbi	  parameter.
144550a7375SFelipe Balbi
145550a7375SFelipe Balbiconfig USB_INVENTRA_DMA
146550a7375SFelipe Balbi	bool
147550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
148550a7375SFelipe Balbi	default ARCH_OMAP2430 || ARCH_OMAP34XX
149550a7375SFelipe Balbi	help
150550a7375SFelipe Balbi	  Enable DMA transfers using Mentor's engine.
151550a7375SFelipe Balbi
152550a7375SFelipe Balbiconfig USB_TI_CPPI_DMA
153550a7375SFelipe Balbi	bool
154550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
155550a7375SFelipe Balbi	default ARCH_DAVINCI
156550a7375SFelipe Balbi	help
157550a7375SFelipe Balbi	  Enable DMA transfers when TI CPPI DMA is available.
158550a7375SFelipe Balbi
159550a7375SFelipe Balbiconfig USB_TUSB_OMAP_DMA
160550a7375SFelipe Balbi	bool
161550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
162550a7375SFelipe Balbi	depends on USB_TUSB6010
163550a7375SFelipe Balbi	depends on ARCH_OMAP
164550a7375SFelipe Balbi	default y
165550a7375SFelipe Balbi	help
166550a7375SFelipe Balbi	  Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
167550a7375SFelipe Balbi
168*e8164f64SFelipe Balbiconfig	USB_MUSB_DEBUG
169550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
170*e8164f64SFelipe Balbi	bool "Enable debugging messages"
171*e8164f64SFelipe Balbi	default n
172550a7375SFelipe Balbi	help
173*e8164f64SFelipe Balbi	  This enables musb debugging. To set the logging level use the debug
174*e8164f64SFelipe Balbi	  module parameter. Starting at level 3, per-transfer (urb, usb_request,
175*e8164f64SFelipe Balbi	  packet, or dma transfer) tracing may kick in.
176