xref: /linux/drivers/usb/gadget/udc/Kconfig (revision c0c9379f235df33a12ceae94370ad80c5278324d)
1# SPDX-License-Identifier: GPL-2.0
2#
3# USB Gadget support on a system involves
4#    (a) a peripheral controller, and
5#    (b) the gadget driver using it.
6#
7# NOTE:  Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
8#
9#  - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
10#  - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
11#  - Some systems have both kinds of controllers.
12#
13# With help from a special transceiver and a "Mini-AB" jack, systems with
14# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
15#
16
17#
18# USB Peripheral Controller Support
19#
20# The order here is alphabetical, except that integrated controllers go
21# before discrete ones so they will be the initial/default value:
22#   - integrated/SOC controllers first
23#   - licensed IP used in both SOC and discrete versions
24#   - discrete ones (including all PCI-only controllers)
25#   - debug/dummy gadget+hcd is last.
26#
27menu "USB Peripheral Controller"
28
29#
30# Integrated controllers
31#
32
33config USB_AT91
34	tristate "Atmel AT91 USB Device Port"
35	depends on ARCH_AT91
36	depends on OF
37	help
38	   Many Atmel AT91 processors (such as the AT91RM2000) have a
39	   full speed USB Device Port with support for five configurable
40	   endpoints (plus endpoint zero).
41
42	   Say "y" to link the driver statically, or "m" to build a
43	   dynamically linked module called "at91_udc" and force all
44	   gadget drivers to also be dynamically linked.
45
46config USB_LPC32XX
47	tristate "LPC32XX USB Peripheral Controller"
48	depends on ARCH_LPC32XX || COMPILE_TEST
49	depends on I2C
50	select USB_ISP1301
51	help
52	   This option selects the USB device controller in the LPC32xx SoC.
53
54	   Say "y" to link the driver statically, or "m" to build a
55	   dynamically linked module called "lpc32xx_udc" and force all
56	   gadget drivers to also be dynamically linked.
57
58config USB_ATMEL_USBA
59	tristate "Atmel USBA"
60	depends on ARCH_AT91
61	help
62	  USBA is the integrated high-speed USB Device controller on some
63	  AT91SAM9 and AT91CAP9 processors from Atmel.
64
65	  The fifo_mode parameter is used to select endpoint allocation mode.
66	  fifo_mode = 0 is used to let the driver autoconfigure the endpoints.
67	  In this case, for ep1 2 banks are allocated if it works in isochronous
68	  mode and only 1 bank otherwise. For the rest of the endpoints
69	  only 1 bank is allocated.
70
71	  fifo_mode = 1 is a generic maximum fifo size (1024 bytes) configuration
72	  allowing the usage of ep1 - ep6
73
74	  fifo_mode = 2 is a generic performance maximum fifo size (1024 bytes)
75	  configuration allowing the usage of ep1 - ep3
76
77	  fifo_mode = 3 is a balanced performance configuration allowing the
78	  the usage of ep1 - ep8
79
80config USB_BCM63XX_UDC
81	tristate "Broadcom BCM63xx Peripheral Controller"
82	depends on BCM63XX
83	help
84	   Many Broadcom BCM63xx chipsets (such as the BCM6328) have a
85	   high speed USB Device Port with support for four fixed endpoints
86	   (plus endpoint zero).
87
88	   Say "y" to link the driver statically, or "m" to build a
89	   dynamically linked module called "bcm63xx_udc".
90
91config USB_FSL_USB2
92	tristate "Freescale Highspeed USB DR Peripheral Controller"
93	depends on FSL_SOC
94	help
95	   Some of Freescale PowerPC and i.MX processors have a High Speed
96	   Dual-Role(DR) USB controller, which supports device mode.
97
98	   The number of programmable endpoints is different through
99	   SOC revisions.
100
101	   Say "y" to link the driver statically, or "m" to build a
102	   dynamically linked module called "fsl_usb2_udc" and force
103	   all gadget drivers to also be dynamically linked.
104
105config USB_GR_UDC
106	tristate "Aeroflex Gaisler GRUSBDC USB Peripheral Controller Driver"
107	depends on HAS_DMA
108	help
109	  Select this to support Aeroflex Gaisler GRUSBDC cores from the GRLIB
110	  VHDL IP core library.
111
112config USB_OMAP
113	tristate "OMAP USB Device Controller"
114	depends on ARCH_OMAP1
115	help
116	   Many Texas Instruments OMAP processors have flexible full
117	   speed USB device controllers, with support for up to 30
118	   endpoints (plus endpoint zero).  This driver supports the
119	   controller in the OMAP 1611, and should work with controllers
120	   in other OMAP processors too, given minor tweaks.
121
122	   Say "y" to link the driver statically, or "m" to build a
123	   dynamically linked module called "omap_udc" and force all
124	   gadget drivers to also be dynamically linked.
125
126config USB_PXA25X
127	tristate "PXA 25x or IXP 4xx"
128	depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
129	depends on HAS_IOMEM
130	help
131	   Intel's PXA 25x series XScale ARM-5TE processors include
132	   an integrated full speed USB 1.1 device controller.  The
133	   controller in the IXP 4xx series is register-compatible.
134
135	   It has fifteen fixed-function endpoints, as well as endpoint
136	   zero (for control transfers).
137
138	   Say "y" to link the driver statically, or "m" to build a
139	   dynamically linked module called "pxa25x_udc" and force all
140	   gadget drivers to also be dynamically linked.
141
142# if there's only one gadget driver, using only two bulk endpoints,
143# don't waste memory for the other endpoints
144config USB_PXA25X_SMALL
145	depends on USB_PXA25X
146	bool
147	default n if USB_ETH_RNDIS
148	default y if USB_ZERO
149	default y if USB_ETH
150	default y if USB_G_SERIAL
151
152config USB_R8A66597
153	tristate "Renesas R8A66597 USB Peripheral Controller"
154	depends on HAS_DMA
155	help
156	   R8A66597 is a discrete USB host and peripheral controller chip that
157	   supports both full and high speed USB 2.0 data transfers.
158	   It has nine configurable endpoints, and endpoint zero.
159
160	   Say "y" to link the driver statically, or "m" to build a
161	   dynamically linked module called "r8a66597_udc" and force all
162	   gadget drivers to also be dynamically linked.
163
164config USB_RENESAS_USBHS_UDC
165	tristate 'Renesas USBHS controller'
166	depends on USB_RENESAS_USBHS
167	help
168	   Renesas USBHS is a discrete USB host and peripheral controller chip
169	   that supports both full and high speed USB 2.0 data transfers.
170	   It has nine or more configurable endpoints, and endpoint zero.
171
172	   Say "y" to link the driver statically, or "m" to build a
173	   dynamically linked module called "renesas_usbhs" and force all
174	   gadget drivers to also be dynamically linked.
175
176config USB_RZV2M_USB3DRD
177	tristate 'Renesas USB3.1 DRD controller'
178	depends on ARCH_R9A09G011 || COMPILE_TEST
179	help
180	   Renesas USB3.1 DRD controller is a USB DRD controller
181	   that supports both host and device switching.
182
183	   Say "y" to link the driver statically, or "m" to build a
184	   dynamically linked module called "rzv2m_usb3drd".
185
186config USB_RENESAS_USB3
187	tristate 'Renesas USB3.0 Peripheral controller'
188	depends on ARCH_RENESAS || COMPILE_TEST
189	depends on USB_RZV2M_USB3DRD || !USB_RZV2M_USB3DRD
190	depends on EXTCON
191	select USB_ROLE_SWITCH
192	help
193	   Renesas USB3.0 Peripheral controller is a USB peripheral controller
194	   that supports super, high, and full speed USB 3.0 data transfers.
195
196	   Say "y" to link the driver statically, or "m" to build a
197	   dynamically linked module called "renesas_usb3" and force all
198	   gadget drivers to also be dynamically linked.
199
200config USB_RENESAS_USBF
201	tristate 'Renesas USB Function controller'
202	depends on ARCH_RENESAS || COMPILE_TEST
203	help
204	   Renesas USB Function controller is a USB peripheral controller
205	   available on RZ/N1 Renesas SoCs.
206
207	   Say "y" to link the driver statically, or "m" to build a
208	   dynamically linked module called "renesas_usbf" and force all
209	   gadget drivers to also be dynamically linked.
210
211config USB_PXA27X
212	tristate "PXA 27x"
213	depends on HAS_IOMEM
214	help
215	   Intel's PXA 27x series XScale ARM v5TE processors include
216	   an integrated full speed USB 1.1 device controller.
217
218	   It has up to 23 endpoints, as well as endpoint zero (for
219	   control transfers).
220
221	   Say "y" to link the driver statically, or "m" to build a
222	   dynamically linked module called "pxa27x_udc" and force all
223	   gadget drivers to also be dynamically linked.
224
225config USB_SNP_CORE
226	depends on (USB_AMD5536UDC || USB_SNP_UDC_PLAT)
227	depends on HAS_DMA
228	tristate
229	help
230	  This enables core driver support for Synopsys USB 2.0 Device
231	  controller.
232
233	  This will be enabled when PCI or Platform driver for this UDC is
234	  selected. Currently, this will be enabled by USB_SNP_UDC_PLAT or
235	  USB_AMD5536UDC options.
236
237	  This IP is different to the High Speed OTG IP that can be enabled
238	  by selecting USB_DWC2 or USB_DWC3 options.
239
240config USB_SNP_UDC_PLAT
241	tristate "Synopsys USB 2.0 Device controller"
242	depends on USB_GADGET && OF && HAS_DMA
243	depends on EXTCON || EXTCON=n
244	select USB_SNP_CORE
245	default ARCH_BCM_IPROC
246	help
247	  This adds Platform Device support for Synopsys Designware core
248	  AHB subsystem USB2.0 Device Controller (UDC).
249
250	  This driver works with UDCs integrated into Broadcom's Northstar2
251	  and Cygnus SoCs.
252
253	  If unsure, say N.
254#
255# Controllers available in both integrated and discrete versions
256#
257
258config USB_M66592
259	tristate "Renesas M66592 USB Peripheral Controller"
260	depends on HAS_IOMEM
261	help
262	   M66592 is a discrete USB peripheral controller chip that
263	   supports both full and high speed USB 2.0 data transfers.
264	   It has seven configurable endpoints, and endpoint zero.
265
266	   Say "y" to link the driver statically, or "m" to build a
267	   dynamically linked module called "m66592_udc" and force all
268	   gadget drivers to also be dynamically linked.
269
270source "drivers/usb/gadget/udc/bdc/Kconfig"
271
272#
273# Controllers available only in discrete form (and all PCI controllers)
274#
275
276config USB_AMD5536UDC
277	tristate "AMD5536 UDC"
278	depends on USB_PCI && HAS_DMA
279	select USB_SNP_CORE
280	help
281	   The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge.
282	   It is a USB Highspeed DMA capable USB device controller. Beside ep0
283	   it provides 4 IN and 4 OUT endpoints (bulk or interrupt type).
284	   The UDC port supports OTG operation, and may be used as a host port
285	   if it's not being used to implement peripheral or OTG roles.
286
287	   This UDC is based on Synopsys USB device controller IP and selects
288	   CONFIG_USB_SNP_CORE option to build the core driver.
289
290	   Say "y" to link the driver statically, or "m" to build a
291	   dynamically linked module called "amd5536udc" and force all
292	   gadget drivers to also be dynamically linked.
293
294config USB_FSL_QE
295	tristate "Freescale QE/CPM USB Device Controller"
296	depends on FSL_SOC && (QUICC_ENGINE || CPM)
297	depends on !64BIT || BROKEN
298	help
299	   Some of Freescale PowerPC processors have a Full Speed
300	   QE/CPM2 USB controller, which support device mode with 4
301	   programmable endpoints. This driver supports the
302	   controller in the MPC8360 and MPC8272, and should work with
303	   controllers having QE or CPM2, given minor tweaks.
304
305	   Set CONFIG_USB_GADGET to "m" to build this driver as a
306	   dynamically linked module called "fsl_qe_udc".
307
308config USB_NET2280
309	tristate "NetChip NET228x / PLX USB3x8x"
310	depends on USB_PCI
311	help
312	   NetChip 2280 / 2282 is a PCI based USB peripheral controller which
313	   supports both full and high speed USB 2.0 data transfers.
314
315	   It has six configurable endpoints, as well as endpoint zero
316	   (for control transfers) and several endpoints with dedicated
317	   functions.
318
319	   PLX 2380 is a PCIe version of the PLX 2380.
320
321	   PLX 3380 / 3382 is a PCIe based USB peripheral controller which
322	   supports full, high speed USB 2.0 and super speed USB 3.0
323	   data transfers.
324
325	   It has eight configurable endpoints, as well as endpoint zero
326	   (for control transfers) and several endpoints with dedicated
327	   functions.
328
329	   Say "y" to link the driver statically, or "m" to build a
330	   dynamically linked module called "net2280" and force all
331	   gadget drivers to also be dynamically linked.
332
333config USB_GOKU
334	tristate "Toshiba TC86C001 'Goku-S'"
335	depends on USB_PCI
336	help
337	   The Toshiba TC86C001 is a PCI device which includes controllers
338	   for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI).
339
340	   The device controller has three configurable (bulk or interrupt)
341	   endpoints, plus endpoint zero (for control transfers).
342
343	   Say "y" to link the driver statically, or "m" to build a
344	   dynamically linked module called "goku_udc" and to force all
345	   gadget drivers to also be dynamically linked.
346
347config USB_EG20T
348	tristate "Intel QUARK X1000/EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7831) UDC"
349	depends on USB_PCI
350	help
351	  This is a USB device driver for EG20T PCH.
352	  EG20T PCH is the platform controller hub that is used in Intel's
353	  general embedded platform. EG20T PCH has USB device interface.
354	  Using this interface, it is able to access system devices connected
355	  to USB device.
356	  This driver enables USB device function.
357	  USB device is a USB peripheral controller which
358	  supports both full and high speed USB 2.0 data transfers.
359	  This driver supports both control transfer and bulk transfer modes.
360	  This driver dose not support interrupt transfer or isochronous
361	  transfer modes.
362
363	  This driver also can be used for LAPIS Semiconductor's ML7213 which is
364	  for IVI(In-Vehicle Infotainment) use.
365	  ML7831 is for general purpose use.
366	  ML7213/ML7831 is companion chip for Intel Atom E6xx series.
367	  ML7213/ML7831 is completely compatible for Intel EG20T PCH.
368
369	  This driver can be used with Intel's Quark X1000 SOC platform
370
371config USB_GADGET_XILINX
372	tristate "Xilinx USB Driver"
373	depends on HAS_DMA
374	depends on OF
375	help
376	  USB peripheral controller driver for Xilinx USB2 device.
377	  Xilinx USB2 device is a soft IP which supports both full
378	  and high speed USB 2.0 data transfers. It has seven configurable
379	  endpoints(bulk or interrupt or isochronous), as well as
380	  endpoint zero(for control transfers).
381
382	  Say "y" to link the driver statically, or "m" to build a
383	  dynamically linked module called "udc-xilinx" and force all
384	  gadget drivers to also be dynamically linked.
385
386config USB_MAX3420_UDC
387	tristate "MAX3420 (USB-over-SPI) support"
388	depends on SPI
389	help
390	  The Maxim MAX3420 chip supports USB2.0 full-speed peripheral mode.
391	  The MAX3420 is run by SPI interface, and hence the dependency.
392
393	  To compile this driver as a module, choose M here: the module will
394	  be called max3420_udc
395
396config USB_TEGRA_XUDC
397	tristate "NVIDIA Tegra Superspeed USB 3.0 Device Controller"
398	depends on ARCH_TEGRA || COMPILE_TEST
399	depends on PHY_TEGRA_XUSB
400	help
401	 Enables NVIDIA Tegra USB 3.0 device mode controller driver.
402
403	 Say "y" to link the driver statically, or "m" to build a
404	 dynamically linked module called "tegra_xudc" and force all
405	 gadget drivers to also be dynamically linked.
406
407config USB_ASPEED_UDC
408	tristate "Aspeed UDC driver support"
409	depends on ARCH_ASPEED || COMPILE_TEST
410	depends on USB_LIBCOMPOSITE
411	help
412	  Enables Aspeed USB2.0 Device Controller driver for AST260x
413	  family SoCs. The controller supports 1 control endpoint and
414	  4 programmable endpoints.
415
416	  Say "y" to link the driver statically, or "m" to build a
417	  dynamically linked module called "aspeed_udc" and force all
418	  gadget drivers to also be dynamically linked.
419
420source "drivers/usb/gadget/udc/aspeed-vhub/Kconfig"
421
422source "drivers/usb/gadget/udc/cdns2/Kconfig"
423
424#
425# LAST -- dummy/emulated controller
426#
427
428config USB_DUMMY_HCD
429	tristate "Dummy HCD (DEVELOPMENT)"
430	depends on USB=y || (USB=m && USB_GADGET=m)
431	help
432	  This host controller driver emulates USB, looping all data transfer
433	  requests back to a USB "gadget driver" in the same host.  The host
434	  side is the controller; the gadget side is the device.  Gadget drivers
435	  can be high, full, or low speed; and they have access to endpoints
436	  like those from NET2280, PXA2xx, or SA1100 hardware.
437
438	  This may help in some stages of creating a driver to embed in a
439	  Linux device, since it lets you debug several parts of the gadget
440	  driver without its hardware or drivers being involved.
441
442	  Since such a gadget side driver needs to interoperate with a host
443	  side Linux-USB device driver, this may help to debug both sides
444	  of a USB protocol stack.
445
446	  Say "y" to link the driver statically, or "m" to build a
447	  dynamically linked module called "dummy_hcd" and force all
448	  gadget drivers to also be dynamically linked.
449
450# NOTE:  Please keep dummy_hcd LAST so that "real hardware" appears
451# first and will be selected by default.
452
453endmenu
454