xref: /openbmc/linux/drivers/usb/musb/Kconfig (revision eb83092c2b24587719c917a1d6a5b682eeaa03df)
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
11b20cf906SMike Frysinger	depends on (USB || USB_GADGET)
121c47cb01SSonic Zhang	depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
138ba63a22SCliff Cai	select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
14550a7375SFelipe Balbi	select TWL4030_USB if MACH_OMAP_3430SDP
1537daa925SDavid Brownell	select USB_OTG_UTILS
16085ad406SBryan Wu	tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
17550a7375SFelipe Balbi	help
18550a7375SFelipe Balbi	  Say Y here if your system has a dual role high speed USB
19550a7375SFelipe Balbi	  controller based on the Mentor Graphics silicon IP.  Then
20550a7375SFelipe Balbi	  configure options to match your silicon and the board
21550a7375SFelipe Balbi	  it's being used with, including the USB peripheral role,
22550a7375SFelipe Balbi	  or the USB host role, or both.
23550a7375SFelipe Balbi
24a227fd7dSDavid Brownell	  Texas Instruments familiies using this IP include DaVinci
25a227fd7dSDavid Brownell	  (35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010.
26550a7375SFelipe Balbi
27085ad406SBryan Wu	  Analog Devices parts using this IP include Blackfin BF54x,
28085ad406SBryan Wu	  BF525 and BF527.
29085ad406SBryan Wu
30550a7375SFelipe Balbi	  If you do not know what this is, please say N.
31550a7375SFelipe Balbi
32550a7375SFelipe Balbi	  To compile this driver as a module, choose M here; the
33550a7375SFelipe Balbi	  module will be called "musb_hdrc".
34550a7375SFelipe Balbi
35550a7375SFelipe Balbiconfig USB_MUSB_SOC
36550a7375SFelipe Balbi	boolean
37550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
38550a7375SFelipe Balbi	default y if ARCH_DAVINCI
39550a7375SFelipe Balbi	default y if ARCH_OMAP2430
40a8eb7ca0STony Lindgren	default y if ARCH_OMAP3
41c71b1b9cSMaulik Mankad	default y if ARCH_OMAP4
42085ad406SBryan Wu	default y if (BF54x && !BF544)
43085ad406SBryan Wu	default y if (BF52x && !BF522 && !BF523)
44550a7375SFelipe Balbi
45a227fd7dSDavid Brownellcomment "DaVinci 35x and 644x USB support"
46c6a39eecSSergei Shtylyov	depends on USB_MUSB_HDRC && ARCH_DAVINCI_DMx
47550a7375SFelipe Balbi
483ee076deSSergei Shtylyovcomment "DA8xx/OMAP-L1x USB support"
493ee076deSSergei Shtylyov	depends on USB_MUSB_HDRC && ARCH_DAVINCI_DA8XX
503ee076deSSergei Shtylyov
51550a7375SFelipe Balbicomment "OMAP 243x high speed USB support"
52550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && ARCH_OMAP2430
53550a7375SFelipe Balbi
54550a7375SFelipe Balbicomment "OMAP 343x high speed USB support"
55a8eb7ca0STony Lindgren	depends on USB_MUSB_HDRC && ARCH_OMAP3
56550a7375SFelipe Balbi
57c71b1b9cSMaulik Mankadcomment "OMAP 44xx high speed USB support"
58c71b1b9cSMaulik Mankad	depends on USB_MUSB_HDRC && ARCH_OMAP4
59c71b1b9cSMaulik Mankad
60085ad406SBryan Wucomment "Blackfin high speed USB Support"
61cd67435eSDavid Brownell	depends on USB_MUSB_HDRC && ((BF54x && !BF544) || (BF52x && !BF522 && !BF523))
62085ad406SBryan Wu
63*eb83092cSAjay Kumar Guptaconfig USB_MUSB_AM35X
64*eb83092cSAjay Kumar Gupta	bool
65*eb83092cSAjay Kumar Gupta	depends on USB_MUSB_HDRC && !ARCH_OMAP2430 && !ARCH_OMAP4
66*eb83092cSAjay Kumar Gupta	select NOP_USB_XCEIV
67*eb83092cSAjay Kumar Gupta	default MACH_OMAP3517EVM
68*eb83092cSAjay Kumar Gupta	help
69*eb83092cSAjay Kumar Gupta	  Select this option if your platform is based on AM35x. As
70*eb83092cSAjay Kumar Gupta	  AM35x has an updated MUSB with CPPI4.1 DMA so this config
71*eb83092cSAjay Kumar Gupta	  is introduced to differentiate musb ip between OMAP3x and
72*eb83092cSAjay Kumar Gupta	  AM35x platforms.
73*eb83092cSAjay Kumar Gupta
74550a7375SFelipe Balbiconfig USB_TUSB6010
75550a7375SFelipe Balbi	boolean "TUSB 6010 support"
76550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !USB_MUSB_SOC
7784e250ffSDavid Brownell	select NOP_USB_XCEIV
78550a7375SFelipe Balbi	default y
79550a7375SFelipe Balbi	help
80550a7375SFelipe Balbi	  The TUSB 6010 chip, from Texas Instruments, connects a discrete
81550a7375SFelipe Balbi	  HDRC core using a 16-bit parallel bus (NOR flash style) or VLYNQ
82550a7375SFelipe Balbi	  (a high speed serial link).  It can use system-specific external
83550a7375SFelipe Balbi	  DMA controllers.
84550a7375SFelipe Balbi
85550a7375SFelipe Balbichoice
86550a7375SFelipe Balbi	prompt "Driver Mode"
87550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
88550a7375SFelipe Balbi	help
89550a7375SFelipe Balbi	  Dual-Role devices can support both host and peripheral roles,
90550a7375SFelipe Balbi	  as well as a the special "OTG Device" role which can switch
91550a7375SFelipe Balbi	  between both roles as needed.
92550a7375SFelipe Balbi
93550a7375SFelipe Balbi# use USB_MUSB_HDRC_HCD not USB_MUSB_HOST to #ifdef host side support;
94550a7375SFelipe Balbi# OTG needs both roles, not just USB_MUSB_HOST.
95550a7375SFelipe Balbiconfig USB_MUSB_HOST
96550a7375SFelipe Balbi	depends on USB
97550a7375SFelipe Balbi	bool "USB Host"
98550a7375SFelipe Balbi	help
99550a7375SFelipe Balbi	  Say Y here if your system supports the USB host role.
100550a7375SFelipe Balbi	  If it has a USB "A" (rectangular), "Mini-A" (uncommon),
101550a7375SFelipe Balbi	  or "Mini-AB" connector, it supports the host role.
102550a7375SFelipe Balbi	  (With a "Mini-AB" connector, you should enable USB OTG.)
103550a7375SFelipe Balbi
104550a7375SFelipe Balbi# use USB_GADGET_MUSB_HDRC not USB_MUSB_PERIPHERAL to #ifdef peripheral
105550a7375SFelipe Balbi# side support ... OTG needs both roles
106550a7375SFelipe Balbiconfig USB_MUSB_PERIPHERAL
107550a7375SFelipe Balbi	depends on USB_GADGET
108550a7375SFelipe Balbi	bool "USB Peripheral (gadget stack)"
109550a7375SFelipe Balbi	select USB_GADGET_MUSB_HDRC
110550a7375SFelipe Balbi	help
111550a7375SFelipe Balbi	  Say Y here if your system supports the USB peripheral role.
112550a7375SFelipe Balbi	  If it has a USB "B" (squarish), "Mini-B", or "Mini-AB"
113550a7375SFelipe Balbi	  connector, it supports the peripheral role.
114550a7375SFelipe Balbi	  (With a "Mini-AB" connector, you should enable USB OTG.)
115550a7375SFelipe Balbi
116550a7375SFelipe Balbiconfig USB_MUSB_OTG
117550a7375SFelipe Balbi	depends on USB && USB_GADGET && PM && EXPERIMENTAL
118550a7375SFelipe Balbi	bool "Both host and peripheral:  USB OTG (On The Go) Device"
119550a7375SFelipe Balbi	select USB_GADGET_MUSB_HDRC
120550a7375SFelipe Balbi	select USB_OTG
121550a7375SFelipe Balbi	help
122550a7375SFelipe Balbi	   The most notable feature of USB OTG is support for a
123550a7375SFelipe Balbi	   "Dual-Role" device, which can act as either a device
124550a7375SFelipe Balbi	   or a host.  The initial role choice can be changed
125550a7375SFelipe Balbi	   later, when two dual-role devices talk to each other.
126550a7375SFelipe Balbi
127550a7375SFelipe Balbi	   At this writing, the OTG support in this driver is incomplete,
128550a7375SFelipe Balbi	   omitting the mandatory HNP or SRP protocols.  However, some
129550a7375SFelipe Balbi	   of the cable based role switching works.  (That is, grounding
130550a7375SFelipe Balbi	   the ID pin switches the controller to host mode, while leaving
131550a7375SFelipe Balbi	   it floating leaves it in peripheral mode.)
132550a7375SFelipe Balbi
133550a7375SFelipe Balbi	   Select this if your system has a Mini-AB connector, or
134550a7375SFelipe Balbi	   to simplify certain kinds of configuration.
135550a7375SFelipe Balbi
136550a7375SFelipe Balbi	   To implement your OTG Targeted Peripherals List (TPL), enable
137550a7375SFelipe Balbi	   USB_OTG_WHITELIST and update "drivers/usb/core/otg_whitelist.h"
138550a7375SFelipe Balbi	   to match your requirements.
139550a7375SFelipe Balbi
140550a7375SFelipe Balbiendchoice
141550a7375SFelipe Balbi
142550a7375SFelipe Balbi# enable peripheral support (including with OTG)
143550a7375SFelipe Balbiconfig USB_GADGET_MUSB_HDRC
144550a7375SFelipe Balbi	bool
145550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
146550a7375SFelipe Balbi#	default y
147550a7375SFelipe Balbi#	select USB_GADGET_DUALSPEED
148550a7375SFelipe Balbi#	select USB_GADGET_SELECTED
149550a7375SFelipe Balbi
150550a7375SFelipe Balbi# enables host support (including with OTG)
151550a7375SFelipe Balbiconfig USB_MUSB_HDRC_HCD
152550a7375SFelipe Balbi	bool
153550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG)
154550a7375SFelipe Balbi	select USB_OTG if USB_GADGET_MUSB_HDRC
155550a7375SFelipe Balbi	default y
156550a7375SFelipe Balbi
157550a7375SFelipe Balbi
158550a7375SFelipe Balbiconfig MUSB_PIO_ONLY
159550a7375SFelipe Balbi	bool 'Disable DMA (always use PIO)'
160550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
161*eb83092cSAjay Kumar Gupta	default USB_TUSB6010 || ARCH_DAVINCI_DA8XX || USB_MUSB_AM35X
162550a7375SFelipe Balbi	help
163550a7375SFelipe Balbi	  All data is copied between memory and FIFO by the CPU.
164550a7375SFelipe Balbi	  DMA controllers are ignored.
165550a7375SFelipe Balbi
166550a7375SFelipe Balbi	  Do not select 'n' here unless DMA support for your SOC or board
167550a7375SFelipe Balbi	  is unavailable (or unstable).  When DMA is enabled at compile time,
168550a7375SFelipe Balbi	  you can still disable it at run time using the "use_dma=n" module
169550a7375SFelipe Balbi	  parameter.
170550a7375SFelipe Balbi
171550a7375SFelipe Balbiconfig USB_INVENTRA_DMA
172550a7375SFelipe Balbi	bool
173550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
174c71b1b9cSMaulik Mankad	default ARCH_OMAP2430 || ARCH_OMAP3 || BLACKFIN || ARCH_OMAP4
175550a7375SFelipe Balbi	help
176550a7375SFelipe Balbi	  Enable DMA transfers using Mentor's engine.
177550a7375SFelipe Balbi
178550a7375SFelipe Balbiconfig USB_TI_CPPI_DMA
179550a7375SFelipe Balbi	bool
180550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
181550a7375SFelipe Balbi	default ARCH_DAVINCI
182550a7375SFelipe Balbi	help
183550a7375SFelipe Balbi	  Enable DMA transfers when TI CPPI DMA is available.
184550a7375SFelipe Balbi
185550a7375SFelipe Balbiconfig USB_TUSB_OMAP_DMA
186550a7375SFelipe Balbi	bool
187550a7375SFelipe Balbi	depends on USB_MUSB_HDRC && !MUSB_PIO_ONLY
188550a7375SFelipe Balbi	depends on USB_TUSB6010
189550a7375SFelipe Balbi	depends on ARCH_OMAP
190550a7375SFelipe Balbi	default y
191550a7375SFelipe Balbi	help
192550a7375SFelipe Balbi	  Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
193550a7375SFelipe Balbi
194e8164f64SFelipe Balbiconfig	USB_MUSB_DEBUG
195550a7375SFelipe Balbi	depends on USB_MUSB_HDRC
196e8164f64SFelipe Balbi	bool "Enable debugging messages"
197e8164f64SFelipe Balbi	default n
198550a7375SFelipe Balbi	help
199e8164f64SFelipe Balbi	  This enables musb debugging. To set the logging level use the debug
200e8164f64SFelipe Balbi	  module parameter. Starting at level 3, per-transfer (urb, usb_request,
201e8164f64SFelipe Balbi	  packet, or dma transfer) tracing may kick in.
202