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

config USB_PHY
	def_bool n

config USB_OTG_WAKELOCK
	bool "Hold a wakelock when USB connected"
	depends on WAKELOCK
	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
	bool "Freescale USB OTG Transceiver Driver"
	depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM
	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
	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
	select 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"
	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
	select USB_PHY
	select AM335X_CONTROL_USB
	select NOP_USB_XCEIV
	help
	  This driver provides PHY support for that phy which part for the
	  AM335x SoC.

config SAMSUNG_USBPHY
	tristate
	help
	  Enable this to support Samsung USB phy helper driver for Samsung SoCs.
	  This driver provides common interface to interact, for Samsung USB 2.0 PHY
	  driver and later for Samsung USB 3.0 PHY driver.

config DUAL_ROLE_USB_INTF
	bool "Generic DUAL ROLE sysfs interface"
	depends on !TYPEC
	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
	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
	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 && EXTCON
	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 RESET_CONTROLLER
	depends on REGULATOR
	depends on EXTCON
	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 && EXTCON
	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
	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_RCAR_PHY
	tristate "Renesas R-Car USB PHY support"
	depends on USB || USB_GADGET
	depends on ARCH_R8A7778 || ARCH_R8A7779 || COMPILE_TEST
	select USB_PHY
	help
	  Say Y here to add support for the Renesas R-Car USB common PHY driver.
	  This chip is typically used as USB PHY for USB host, gadget.
	  This driver supports R8A7778 and R8A7779.

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

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
