1#
2# USB Host Controller Drivers
3#
4comment "USB Host Controller Drivers"
5
6config USB_HOST
7	bool
8	select DM_USB
9	help
10	  Enable access to USB (Universal Serial Bus) host devices so that
11	  SPL can load U-Boot from a connected USB peripheral, such as a USB
12	  flash stick. While USB takes a little longer to start up than most
13	  buses, it is very flexible since many different types of storage
14	  device can be attached.
15
16config SPL_USB_HOST
17	bool "Support USB host drivers"
18	depends on SPL
19	help
20	  For detailed help see USB_HOST Kconfig symbol. This option enables
21	  the drivers in drivers/usb/host as part of an SPL build.
22
23config USB_XHCI_HCD
24	bool "xHCI HCD (USB 3.0) support"
25	depends on DM && OF_CONTROL
26	select USB_HOST
27	---help---
28	  The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0
29	  "SuperSpeed" host controller hardware.
30
31if USB_XHCI_HCD
32
33config USB_XHCI_DWC3
34	bool "DesignWare USB3 DRD Core Support"
35	help
36	  Say Y or if your system has a Dual Role SuperSpeed
37	  USB controller based on the DesignWare USB3 IP Core.
38
39config USB_XHCI_DWC3_OF_SIMPLE
40	bool "DesignWare USB3 DRD Generic OF Simple Glue Layer"
41	depends on DM_USB
42	default y if DRA7XX
43	help
44	  Support USB2/3 functionality in simple SoC integrations with
45	  USB controller based on the DesignWare USB3 IP Core.
46
47config USB_XHCI_EXYNOS
48	bool "Support for Samsung Exynos5 family on-chip xHCI USB controller"
49	depends on ARCH_EXYNOS5
50	default y
51	help
52	  Enables support for he on-chip xHCI controller on Samsung Exynos5
53	  SoCs.
54
55config USB_XHCI_MTK
56	bool "Support for MediaTek on-chip xHCI USB controller"
57	depends on ARCH_MEDIATEK || SOC_MT7621
58	help
59	  Enables support for the on-chip xHCI controller on MediaTek SoCs.
60
61config USB_XHCI_MVEBU
62	bool "MVEBU USB 3.0 support"
63	default y
64	depends on ARCH_MVEBU
65	select DM_REGULATOR
66	help
67	  Choose this option to add support for USB 3.0 driver on mvebu
68	  SoCs, which includes Armada8K, Armada3700 and other Armada
69	  family SoCs.
70
71config USB_XHCI_GENERIC
72	bool "Generic SoC USB 3.0 support"
73	depends on OF_CONTROL
74	default n
75	help
76	  Choose this option to add support for USB 3.0 driver for SoCs
77	  that do not need platform specific code, like on emulated targets.
78
79config USB_XHCI_OCTEON
80	bool "Support for Marvell Octeon family on-chip xHCI USB controller"
81	depends on ARCH_OCTEON
82	default y
83	help
84	  Enables support for the on-chip xHCI controller on Marvell Octeon
85	  family SoCs. This is a driver for the dwc3 to provide the glue logic
86	  to configure the controller.
87
88config USB_XHCI_OMAP
89	bool "Support for TI OMAP family xHCI USB controller"
90	depends on ARCH_OMAP2PLUS
91	help
92	  Enables support for the on-chip xHCI controller found on some TI SoC
93	  families.  Note that some families have multiple contollers while
94	  others only have something such as DesignWare-based controllers.
95	  Consult the SoC documentation to determine if this option applies
96	  to your hardware.
97
98config USB_XHCI_PCI
99	bool "Support for PCI-based xHCI USB controller"
100	depends on DM_USB && PCI
101	default y if X86
102	help
103	  Enables support for the PCI-based xHCI controller.
104
105config USB_XHCI_RCAR
106	bool "Renesas R-Car USB 3.0 support"
107	default y
108	depends on ARCH_RENESAS
109	help
110	  Choose this option to add support for USB 3.0 driver on Renesas
111	  R-Car Gen3 SoCs.
112
113config USB_XHCI_DRA7XX_INDEX
114	int "DRA7XX xHCI USB index"
115	range 0 1
116	default 0
117	depends on DRA7XX
118	help
119	  Select the DRA7XX xHCI USB index.
120	  Current supported values: 0, 1.
121
122config USB_XHCI_FSL
123	bool "Support for NXP Layerscape on-chip xHCI USB controller"
124	default y if ARCH_LS1021A || FSL_LSCH3 || FSL_LSCH2
125	depends on !SPL_NO_USB
126	help
127	  Enables support for the on-chip xHCI controller on NXP Layerscape SoCs.
128
129config USB_XHCI_BRCM
130	bool "Broadcom USB3 Host XHCI controller"
131	depends on DM_USB
132	help
133	  USB controller based on the Broadcom USB3 IP Core.
134	  Supports USB2/3 functionality.
135
136endif # USB_XHCI_HCD
137
138config EHCI_DESC_BIG_ENDIAN
139	bool
140
141config EHCI_MMIO_BIG_ENDIAN
142	bool
143
144config USB_EHCI_HCD
145	bool "EHCI HCD (USB 2.0) support"
146	default y if ARCH_MX5 || ARCH_MX6
147	depends on DM && OF_CONTROL
148	select USB_HOST
149	select EHCI_DESC_BIG_ENDIAN if SYS_BIG_ENDIAN
150	select EHCI_MMIO_BIG_ENDIAN if SYS_BIG_ENDIAN
151	---help---
152	  The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
153	  "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
154	  If your USB host controller supports USB 2.0, you will likely want to
155	  configure this Host Controller Driver.
156
157	  EHCI controllers are packaged with "companion" host controllers (OHCI
158	  or UHCI) to handle USB 1.1 devices connected to root hub ports.  Ports
159	  will connect to EHCI if the device is high speed, otherwise they
160	  connect to a companion controller.  If you configure EHCI, you should
161	  probably configure the OHCI (for NEC and some other vendors) USB Host
162	  Controller Driver or UHCI (for Via motherboards) Host Controller
163	  Driver too.
164
165	  You may want to read <file:Documentation/usb/ehci.txt>.
166
167if USB_EHCI_HCD
168
169config USB_EHCI_IS_TDI
170	bool
171
172config USB_EHCI_ATMEL
173	bool  "Support for Atmel on-chip EHCI USB controller"
174	depends on ARCH_AT91
175	default y
176	---help---
177	  Enables support for the on-chip EHCI controller on Atmel chips.
178
179config USB_EHCI_EXYNOS
180	bool "Support for Samsung Exynos EHCI USB controller"
181	depends on ARCH_EXYNOS
182	default y
183	---help---
184	  Enables support for the on-chip EHCI controller on Samsung Exynos
185	  SoCs.
186
187config USB_EHCI_MARVELL
188	bool "Support for Marvell on-chip EHCI USB controller"
189	depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X
190	default y
191	select USB_EHCI_IS_TDI if !ARM64
192	select USB_EHCI_IS_TDI if ALLEYCAT_5
193	---help---
194	  Enables support for the on-chip EHCI controller on MVEBU SoCs.
195
196config USB_EHCI_MX5
197	bool "Support for i.MX5 on-chip EHCI USB controller"
198	depends on ARCH_MX5
199	help
200	  Enables support for the on-chip EHCI controller on i.MX5 SoCs.
201
202config USB_EHCI_MX6
203	bool "Support for i.MX6/i.MX7ULP on-chip EHCI USB controller"
204	depends on ARCH_MX6 || ARCH_MX7ULP || ARCH_IMXRT
205	select EHCI_HCD_INIT_AFTER_RESET
206	default y
207	---help---
208	  Enables support for the on-chip EHCI controller on i.MX6 SoCs.
209
210config USB_EHCI_MX7
211	bool "Support for i.MX7/i.MX8M/i.MX9 on-chip EHCI USB controller"
212	depends on ARCH_MX7 || IMX8M || IMX93 || IMX95
213	select EHCI_HCD_INIT_AFTER_RESET if ARCH_MX7
214	select PHY if IMX8M || IMX93 || IMX95
215	select NOP_PHY if IMX8M || IMX93 || IMX95
216	default y
217	---help---
218	  Enables support for the on-chip EHCI controller on i.MX7/i.MX8M/i.MX9 SoCs.
219
220config USB_EHCI_MXS
221	bool "Support for i.MX23/i.MX28 EHCI USB controller"
222	depends on ARCH_MX23 || ARCH_MX28
223	default y
224	select USB_EHCI_IS_TDI
225	help
226	  Enables support for the on-chip EHCI controller on i.MX23 and
227	  i.MX28 SoCs.
228
229config USB_EHCI_NPCM
230	bool "Support for Nuvoton NPCM on-chip EHCI USB controller"
231	depends on ARCH_NPCM
232	---help---
233	  Enables support for the on-chip EHCI controller on
234	  Nuvoton NPCM chips.
235
236config USB_EHCI_OMAP
237	bool "Support for OMAP3+ on-chip EHCI USB controller"
238	depends on ARCH_OMAP2PLUS
239	select PHY
240	imply NOP_PHY
241	default y
242	---help---
243	  Enables support for the on-chip EHCI controller on OMAP3 and later
244	  SoCs.
245
246config USB_EHCI_VF
247	bool "Support for Vybrid on-chip EHCI USB controller"
248	depends on ARCH_VF610
249	default y
250	help
251	  Enables support for the on-chip EHCI controller on Vybrid SoCs.
252
253if USB_EHCI_MX6 || USB_EHCI_MX7
254
255config MXC_USB_OTG_HACTIVE
256	bool "USB Power pin high active"
257	---help---
258	  Set the USB Power pin polarity to be high active (PWR_POL)
259
260endif
261
262config USB_EHCI_MSM
263	bool "Support for Qualcomm on-chip EHCI USB controller"
264	depends on DM_USB
265	select USB_ULPI
266	select MSM8916_USB_PHY
267	---help---
268	  Enables support for the on-chip EHCI controller on Qualcomm
269	  Snapdragon SoCs.
270
271config USB_EHCI_PCI
272	bool "Support for PCI-based EHCI USB controller"
273	default y if X86
274	help
275	  Enables support for the PCI-based EHCI controller.
276
277config USB_EHCI_TEGRA
278	bool "Support for NVIDIA Tegra on-chip EHCI USB controller"
279	depends on ARCH_TEGRA
280	select USB_EHCI_IS_TDI
281	---help---
282	  Enable support for Tegra on-chip EHCI USB controller. If you enable
283	  ULPI and your PHY needs a different reference clock than the standard
284	  24 MHz then you have to define CFG_ULPI_REF_CLK to the appropriate
285	  value in Hz.
286
287config USB_EHCI_ZYNQ
288	bool "Support for Xilinx Zynq on-chip EHCI USB controller"
289	default y if ARCH_ZYNQ
290	select USB_EHCI_IS_TDI
291	---help---
292	  Enable support for Zynq on-chip EHCI USB controller
293
294config USB_EHCI_GENERIC
295	bool "Support for generic EHCI USB controller"
296	depends on DM_USB
297	default ARCH_SUNXI
298	---help---
299	  Enables support for generic EHCI controller.
300
301config EHCI_HCD_INIT_AFTER_RESET
302	bool
303
304config USB_EHCI_FSL
305	bool  "Support for FSL on-chip EHCI USB controller"
306	select EHCI_HCD_INIT_AFTER_RESET
307	select SYS_FSL_USB_INTERNAL_UTMI_PHY if MPC85xx && \
308		!(ARCH_B4860 || ARCH_B4420 || ARCH_P4080 || ARCH_P1020 || ARCH_P2020)
309	---help---
310	  Enables support for the on-chip EHCI controller on FSL chips.
311
312config SYS_FSL_USB_INTERNAL_UTMI_PHY
313	bool
314	depends on USB_EHCI_FSL
315
316config USB_EHCI_TXFIFO_THRESH
317	hex
318	depends on USB_EHCI_TEGRA
319	default 0x10
320	help
321	  This parameter affects a TXFILLTUNING field that controls how much
322	  data is sent to the latency fifo before it is sent to the wire.
323	  Without this parameter, the default (2) causes occasional Data Buffer
324	  Errors in OUT packets depending on the buffer address and size.
325
326endif # USB_EHCI_HCD
327
328config USB_OHCI_NEW
329	bool
330
331config SYS_USB_OHCI_CPU_INIT
332	bool
333
334config USB_OHCI_HCD
335	bool "OHCI HCD (USB 1.1) support"
336	depends on DM && OF_CONTROL
337	select USB_HOST
338	select USB_OHCI_NEW
339	---help---
340	  The Open Host Controller Interface (OHCI) is a standard for accessing
341	  USB 1.1 host controller hardware.  It does more in hardware than Intel's
342	  UHCI specification.  If your USB host controller follows the OHCI spec,
343	  say Y.  On most non-x86 systems, and on x86 hardware that's not using a
344	  USB controller from Intel or VIA, this is appropriate.  If your host
345	  controller doesn't use PCI, this is probably appropriate.  For a PCI
346	  based system where you're not sure, the "lspci -v" entry will list the
347	  right "prog-if" for your USB controller(s):  EHCI, OHCI, or UHCI.
348
349if USB_OHCI_HCD
350
351config USB_OHCI_PCI
352	bool "Support for PCI-based OHCI USB controller"
353	depends on PCI
354	help
355	  Enables support for the PCI-based OHCI controller.
356
357config USB_OHCI_GENERIC
358	bool "Support for generic OHCI USB controller"
359	default ARCH_SUNXI
360	---help---
361	  Enables support for generic OHCI controller.
362
363config USB_OHCI_DA8XX
364	bool "Support for da850 OHCI USB controller"
365	help
366	  Enable support for the da850 USB controller.
367
368config USB_OHCI_NPCM
369	bool "Support for Nuvoton NPCM on-chip OHCI USB controller"
370	depends on ARCH_NPCM
371	---help---
372	  Enables support for the on-chip OHCI controller on
373	  Nuvoton NPCM chips.
374
375endif # USB_OHCI_HCD
376
377config SYS_USB_OHCI_SLOT_NAME
378	string "Display name for the OHCI controller"
379	depends on USB_OHCI_NEW && !DM_USB
380
381config SYS_OHCI_SWAP_REG_ACCESS
382	bool "Perform byte swapping on OHCI controller register accesses"
383	depends on USB_OHCI_NEW
384
385config USB_UHCI_HCD
386	bool "UHCI HCD (most Intel and VIA) support"
387	select USB_HOST
388	---help---
389	  The Universal Host Controller Interface is a standard by Intel for
390	  accessing the USB hardware in the PC (which is also called the USB
391	  host controller). If your USB host controller conforms to this
392	  standard, you may want to say Y, but see below. All recent boards
393	  with Intel PCI chipsets (like intel 430TX, 440FX, 440LX, 440BX,
394	  i810, i820) conform to this standard. Also all VIA PCI chipsets
395	  (like VIA VP2, VP3, MVP3, Apollo Pro, Apollo Pro II or Apollo Pro
396	  133) and LEON/GRLIB SoCs with the GRUSBHC controller.
397	  If unsure, say Y.
398
399if USB_UHCI_HCD
400
401endif # USB_UHCI_HCD
402
403config USB_DWC2
404	bool "DesignWare USB2 Core support"
405	depends on DM && OF_CONTROL
406	select USB_HOST
407	---help---
408	  The DesignWare USB 2.0 controller is compliant with the
409	  USB-Implementers Forum (USB-IF) USB 2.0 specifications.
410	  Hi-Speed (480 Mbps), Full-Speed (12 Mbps), and Low-Speed (1.5 Mbps)
411	  operation is compliant to the controller Supplement. If you want to
412	  enable this controller in host mode, say Y.
413
414if USB_DWC2
415config USB_DWC2_BUFFER_SIZE
416	int "Data buffer size in kB"
417	default 64
418	---help---
419	  By default 64 kB buffer is used but if amount of RAM avaialble on
420	  the target is not enough to accommodate allocation of buffer of
421	  that size it is possible to shrink it. Smaller sizes should be fine
422	  because larger transactions could be split in smaller ones.
423
424endif # USB_DWC2
425
426config USB_R8A66597_HCD
427	bool "Renesas R8A66597 USB Core support"
428	depends on DM && OF_CONTROL
429	select USB_HOST
430	---help---
431	  This enables support for the on-chip Renesas R8A66597 USB 2.0
432	  controller, present in various RZ and SH SoCs.
433
434config USB_ATMEL
435	bool "AT91 OHCI USB support"
436	depends on ARCH_AT91
437	select SYS_USB_OHCI_CPU_INIT
438	select USB_OHCI_NEW
439
440choice
441	prompt "Clock for OHCI"
442	depends on USB_ATMEL
443
444config USB_ATMEL_CLK_SEL_PLLB
445	bool "PLLB"
446
447config USB_ATMEL_CLK_SEL_UPLL
448	bool "UPLL"
449
450endchoice
451
452config USB_OHCI_LPC32XX
453	bool "LPC32xx USB OHCI support"
454	depends on ARCH_LPC32XX
455	select SYS_USB_OHCI_CPU_INIT
456	select USB_OHCI_NEW
457
458config USB_MAX_CONTROLLER_COUNT
459	int "Maximum number of USB host controllers"
460	depends on USB_EHCI_FSL || USB_XHCI_FSL || \
461		(SPL_USB_HOST && !DM_SPL_USB) || (USB_HOST && !DM_USB)
462	default 1
463