#
# USB Host Controller Drivers
#
comment "USB Host Controller Drivers"

config USB_HOST
	bool

config USB_XHCI_HCD
	bool "xHCI HCD (USB 3.0) support"
	select USB_HOST
	---help---
	  The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0
	  "SuperSpeed" host controller hardware.

if USB_XHCI_HCD

config USB_XHCI_DWC3
	bool "DesignWare USB3 DRD Core Support"
	help
	  Say Y or if your system has a Dual Role SuperSpeed
	  USB controller based on the DesignWare USB3 IP Core.

config USB_XHCI_MVEBU
	bool "MVEBU USB 3.0 support"
	default y
	depends on ARCH_MVEBU
	select DM_REGULATOR
	help
	  Choose this option to add support for USB 3.0 driver on mvebu
	  SoCs, which includes Armada8K, Armada3700 and other Armada
	  family SoCs.

config USB_XHCI_ROCKCHIP
	bool "Support for Rockchip on-chip xHCI USB controller"
	depends on ARCH_ROCKCHIP
	default y
	help
	  Enables support for the on-chip xHCI controller on Rockchip SoCs.

config USB_XHCI_ZYNQMP
	bool "Support for Xilinx ZynqMP on-chip xHCI USB controller"
	depends on ARCH_ZYNQMP
	help
	  Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.

config USB_XHCI_DRA7XX_INDEX
	int "DRA7XX xHCI USB index"
	range 0 1
	default 0
	depends on DRA7XX
	help
	  Select the DRA7XX xHCI USB index.
	  Current supported values: 0, 1.

endif # USB_XHCI_HCD

config USB_EHCI_HCD
	bool "EHCI HCD (USB 2.0) support"
	select USB_HOST
	---help---
	  The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0
	  "high speed" (480 Mbit/sec, 60 Mbyte/sec) host controller hardware.
	  If your USB host controller supports USB 2.0, you will likely want to
	  configure this Host Controller Driver.

	  EHCI controllers are packaged with "companion" host controllers (OHCI
	  or UHCI) to handle USB 1.1 devices connected to root hub ports.  Ports
	  will connect to EHCI if the device is high speed, otherwise they
	  connect to a companion controller.  If you configure EHCI, you should
	  probably configure the OHCI (for NEC and some other vendors) USB Host
	  Controller Driver or UHCI (for Via motherboards) Host Controller
	  Driver too.

	  You may want to read <file:Documentation/usb/ehci.txt>.

config USB_EHCI
	bool
	default USB_EHCI_HCD
	---help---
	  TODO: rename after most boards switch to Kconfig

if USB_EHCI_HCD

config USB_EHCI_ATMEL
	bool  "Support for Atmel on-chip EHCI USB controller"
	depends on ARCH_AT91
	default y
	---help---
	  Enables support for the on-chip EHCI controller on Atmel chips.

config USB_EHCI_MARVELL
	bool "Support for MVEBU (AXP / A38x) on-chip EHCI USB controller"
	depends on ARCH_MVEBU
	default y
	---help---
	  Enables support for the on-chip EHCI controller on MVEBU SoCs.

config USB_EHCI_MX6
	bool "Support for i.MX6 on-chip EHCI USB controller"
	depends on ARCH_MX6
	default y
	---help---
	  Enables support for the on-chip EHCI controller on i.MX6 SoCs.

config USB_EHCI_MX7
	bool "Support for i.MX7 on-chip EHCI USB controller"
	depends on ARCH_MX7
	default y
	---help---
	  Enables support for the on-chip EHCI controller on i.MX7 SoCs.

if USB_EHCI_MX7

config MXC_USB_OTG_HACTIVE
	bool "USB Power pin high active"
	---help---
	  Set the USB Power pin polarity to be high active (PWR_POL)

endif

config USB_EHCI_MSM
	bool "Support for Qualcomm on-chip EHCI USB controller"
	depends on DM_USB
	select USB_ULPI_VIEWPORT
	default n
	---help---
	  Enables support for the on-chip EHCI controller on Qualcomm
	  Snapdragon SoCs.
	  This driver supports combination of Chipidea USB controller
	  and Synapsys USB PHY in host mode only.

config USB_EHCI_ZYNQ
	bool "Support for Xilinx Zynq on-chip EHCI USB controller"
	depends on ARCH_ZYNQ
	default y
	---help---
	  Enable support for Zynq on-chip EHCI USB controller

config USB_EHCI_GENERIC
	bool "Support for generic EHCI USB controller"
	depends on OF_CONTROL
	depends on DM_USB
	default n
	---help---
	  Enables support for generic EHCI controller.

endif # USB_EHCI_HCD

config USB_OHCI_HCD
	bool "OHCI HCD (USB 1.1) support"
	---help---
	  The Open Host Controller Interface (OHCI) is a standard for accessing
	  USB 1.1 host controller hardware.  It does more in hardware than Intel's
	  UHCI specification.  If your USB host controller follows the OHCI spec,
	  say Y.  On most non-x86 systems, and on x86 hardware that's not using a
	  USB controller from Intel or VIA, this is appropriate.  If your host
	  controller doesn't use PCI, this is probably appropriate.  For a PCI
	  based system where you're not sure, the "lspci -v" entry will list the
	  right "prog-if" for your USB controller(s):  EHCI, OHCI, or UHCI.

if USB_OHCI_HCD

config USB_OHCI_GENERIC
	bool "Support for generic OHCI USB controller"
	depends on OF_CONTROL
	depends on DM_USB
	select USB_HOST
	---help---
	  Enables support for generic OHCI controller.

endif # USB_OHCI_HCD

config USB_UHCI_HCD
	bool "UHCI HCD (most Intel and VIA) support"
	select USB_HOST
	---help---
	  The Universal Host Controller Interface is a standard by Intel for
	  accessing the USB hardware in the PC (which is also called the USB
	  host controller). If your USB host controller conforms to this
	  standard, you may want to say Y, but see below. All recent boards
	  with Intel PCI chipsets (like intel 430TX, 440FX, 440LX, 440BX,
	  i810, i820) conform to this standard. Also all VIA PCI chipsets
	  (like VIA VP2, VP3, MVP3, Apollo Pro, Apollo Pro II or Apollo Pro
	  133) and LEON/GRLIB SoCs with the GRUSBHC controller.
	  If unsure, say Y.

if USB_UHCI_HCD

endif # USB_UHCI_HCD
