#
# Physical Layer USB driver configuration
#
menu "USB Physical Layer drivers"

config USB_PHY
	select EXTCON
	def_bool n

config USB_OTG_WAKELOCK
	bool "Hold a wakelock when USB connected"
	depends on PM_WAKELOCKS
	select USB_OTG_UTILS
	help
	  Select this to automatically hold a wakelock when USB is
	  connected, preventing suspend.

#
# USB Transceiver Drivers
#
config AB8500_USB
	tristate "AB8500 USB Transceiver Driver"
	depends on AB8500_CORE
	select USB_PHY
	help
	  Enable this to support the USB OTG transceiver in AB8500 chip.
	  This transceiver supports high and full speed devices plus,
	  in host mode, low speed.

config FSL_USB2_OTG
	tristate "Freescale USB OTG Transceiver Driver"
	depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
	select USB_PHY
	help
	  Enable this to support Freescale USB OTG transceiver.

config ISP1301_OMAP
	tristate "Philips ISP1301 with OMAP OTG"
	depends on I2C && ARCH_OMAP_OTG
	depends on USB
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
	select USB_PHY
	help
	  If you say yes here you get support for the Philips ISP1301
	  USB-On-The-Go transceiver working with the OMAP OTG controller.
	  The ISP1301 is a full speed USB  transceiver which is used in
	  products including H2, H3, and H4 development boards for Texas
	  Instruments OMAP processors.

	  This driver can also be built as a module.  If so, the module
	  will be called phy-isp1301-omap.

config KEYSTONE_USB_PHY
	tristate "Keystone USB PHY Driver"
	depends on ARCH_KEYSTONE || COMPILE_TEST
	depends on NOP_USB_XCEIV
	help
	  Enable this to support Keystone USB phy. This driver provides
	  interface to interact with USB 2.0 and USB 3.0 PHY that is part
	  of the Keystone SOC.

config NOP_USB_XCEIV
	tristate "NOP USB Transceiver Driver"
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, NOP can't be built-in
	select USB_PHY
	help
	  This driver is to be used by all the usb transceiver which are either
	  built-in with usb ip or which are autonomous and doesn't require any
	  phy programming such as ISP1x04 etc.

config AM335X_CONTROL_USB
	tristate

config AM335X_PHY_USB
	tristate "AM335x USB PHY Driver"
	depends on ARM || COMPILE_TEST
	depends on NOP_USB_XCEIV
	select USB_PHY
	select AM335X_CONTROL_USB
	select USB_COMMON
	help
	  This driver provides PHY support for that phy which part for the
	  AM335x SoC.

config DUAL_ROLE_USB_INTF
	bool "Generic DUAL ROLE sysfs interface"
	help
	  A generic sysfs interface to track and change the state of
	  dual role usb phys. The usb phy drivers can register to
	  this interface to expose it capabilities to the userspace
	  and thereby allowing userspace to change the port mode.

config TWL6030_USB
	tristate "TWL6030 USB Transceiver Driver"
	depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS
	depends on OF
	help
	  Enable this to support the USB OTG transceiver on TWL6030
	  family chips. This TWL6030 transceiver has the VBUS and ID GND
	  and OTG SRP events capabilities. For all other transceiver functionality
	  UTMI PHY is embedded in OMAP4430. The internal PHY configurations APIs
	  are hooked to this driver through platform_data structure.
	  The definition of internal PHY APIs are in the mach-omap2 layer.

config USB_GPIO_VBUS
	tristate "GPIO based peripheral-only VBUS sensing 'transceiver'"
	depends on GPIOLIB || COMPILE_TEST
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
	select USB_PHY
	help
	  Provides simple GPIO VBUS sensing for controllers with an
	  internal transceiver via the usb_phy interface, and
	  optionally control of a D+ pullup GPIO as well as a VBUS
	  current limit regulator.

config OMAP_OTG
	tristate "OMAP USB OTG controller driver"
	depends on ARCH_OMAP_OTG && EXTCON
	help
	  Enable this to support some transceivers on OMAP1 platforms. OTG
	  controller is needed to switch between host and peripheral modes.

	  This driver can also be built as a module. If so, the module
	  will be called phy-omap-otg.

config TAHVO_USB
	tristate "Tahvo USB transceiver driver"
	depends on MFD_RETU
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
	select USB_PHY
	help
	  Enable this to support USB transceiver on Tahvo. This is used
	  at least on Nokia 770.

config TAHVO_USB_HOST_BY_DEFAULT
	depends on TAHVO_USB
	bool "Device in USB host mode by default"
	help
	  Say Y here, if you want the device to enter USB host mode
	  by default on bootup.

config USB_ISP1301
	tristate "NXP ISP1301 USB transceiver support"
	depends on USB || USB_GADGET
	depends on I2C
	select USB_PHY
	help
	  Say Y here to add support for the NXP ISP1301 USB transceiver driver.
	  This chip is typically used as USB transceiver for USB host, gadget
	  and OTG drivers (to be selected separately).

	  To compile this driver as a module, choose M here: the
	  module will be called phy-isp1301.

config USB_MSM_OTG
	tristate "Qualcomm on-chip USB OTG controller support"
	depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST)
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
	depends on RESET_CONTROLLER
	select USB_PHY
	help
	  Enable this to support the USB OTG transceiver on Qualcomm chips. It
	  handles PHY initialization, clock management, and workarounds
	  required after resetting the hardware and power management.
	  This driver is required even for peripheral only or host only
	  mode configurations.
	  This driver is not supported on boards like trout which
	  has an external PHY.

config USB_QCOM_8X16_PHY
	tristate "Qualcomm APQ8016/MSM8916 on-chip USB PHY controller support"
	depends on ARCH_QCOM || COMPILE_TEST
	depends on RESET_CONTROLLER
	select USB_PHY
	select USB_ULPI_VIEWPORT
	help
	  Enable this to support the USB transceiver on Qualcomm 8x16 chipsets.
	  It handles PHY initialization, clock management, power management,
	  and workarounds required after resetting the hardware.

	  To compile this driver as a module, choose M here: the
	  module will be called phy-qcom-8x16-usb.

config USB_MV_OTG
	tristate "Marvell USB OTG support"
	depends on USB_EHCI_MV && USB_MV_UDC && PM && USB_OTG
	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
	select USB_PHY
	help
	  Say Y here if you want to build Marvell USB OTG transciever
	  driver in kernel (including PXA and MMP series). This driver
	  implements role switch between EHCI host driver and gadget driver.

	  To compile this driver as a module, choose M here.

config USB_MXS_PHY
	tristate "Freescale MXS USB PHY support"
	depends on ARCH_MXC || ARCH_MXS
	select STMP_DEVICE
	select USB_PHY
	help
	  Enable this to support the Freescale MXS USB PHY.

	  MXS Phy is used by some of the i.MX SoCs, for example imx23/28/6x.

config USB_ULPI
	bool "Generic ULPI Transceiver Driver"
	depends on ARM || ARM64
	select USB_ULPI_VIEWPORT
	help
	  Enable this to support ULPI connected USB OTG transceivers which
	  are likely found on embedded boards.

config USB_ULPI_VIEWPORT
	bool
	help
	  Provides read/write operations to the ULPI phy register set for
	  controllers with a viewport register (e.g. Chipidea/ARC controllers).

config DUAL_ROLE_USB_INTF
	bool "Generic DUAL ROLE sysfs interface"
	depends on SYSFS && USB_PHY
	help
	  A generic sysfs interface to track and change the state of
	  dual role usb phys. The usb phy drivers can register to
	  this interface to expose it capabilities to the userspace
	  and thereby allowing userspace to change the port mode.

endmenu
