Commit 052a11d1 authored by Roger Quadros's avatar Roger Quadros Committed by Felipe Balbi

usb: phy: make PHY driver selection possible by controller drivers

Convert PHY Drivers from menuconfig to menu so that the PHY drivers
can be explicitely selected by the controller drivers.

USB_PHY is no longer a user visible option. It is upto to the PHY
drivers to select it if needed. This patch does so for the existing
PHY drivers that use the USB_PHY library.

Doing so moves the USB_PHY and PHY driver selection problem from the
end user to the PHY and controller driver developer.

e.g.

Earlier, a controller driver (e.g. EHCI_OMAP) that needs to select
a PHY driver (e.g. NOP_PHY) couldn't do so because the PHY driver
depended on USB_PHY. Making the controller driver depend on USB_PHY
has a negative effect i.e. it becomes invisible to the user till
USB_PHY is enabled. Most end users will not familiar with this.

With this patch, the end user just needs to select the controller driver
needed for his/her platform without worrying about which PHY driver to
select.

Also update USB_EHCI_MSM, USB_LPC32XX and USB_OMAP to not depend
on USB_PHY any more. They can safely select the necessary PHY drivers.

[ balbi@ti.com : refreshed on top of my next branch. Changed bool
	followed by default n into def_bool n ]

CC: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: default avatarRoland Stigge <stigge@antcom.de>
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 7c81290e
...@@ -45,7 +45,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/ ...@@ -45,7 +45,7 @@ obj-$(CONFIG_USB_MICROTEK) += image/
obj-$(CONFIG_USB_SERIAL) += serial/ obj-$(CONFIG_USB_SERIAL) += serial/
obj-$(CONFIG_USB) += misc/ obj-$(CONFIG_USB) += misc/
obj-$(CONFIG_USB_PHY) += phy/ obj-$(CONFIG_USB_SUPPORT) += phy/
obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/ obj-$(CONFIG_EARLY_PRINTK_DBGP) += early/
obj-$(CONFIG_USB_ATM) += atm/ obj-$(CONFIG_USB_ATM) += atm/
......
...@@ -144,7 +144,6 @@ config USB_AT91 ...@@ -144,7 +144,6 @@ config USB_AT91
config USB_LPC32XX config USB_LPC32XX
tristate "LPC32XX USB Peripheral Controller" tristate "LPC32XX USB Peripheral Controller"
depends on ARCH_LPC32XX depends on ARCH_LPC32XX
depends on USB_PHY
select USB_ISP1301 select USB_ISP1301
help help
This option selects the USB device controller in the LPC32xx SoC. This option selects the USB device controller in the LPC32xx SoC.
...@@ -206,7 +205,6 @@ config USB_FOTG210_UDC ...@@ -206,7 +205,6 @@ config USB_FOTG210_UDC
config USB_OMAP config USB_OMAP
tristate "OMAP USB Device Controller" tristate "OMAP USB Device Controller"
depends on ARCH_OMAP1 depends on ARCH_OMAP1
depends on USB_PHY
select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
help help
Many Texas Instruments OMAP processors have flexible full Many Texas Instruments OMAP processors have flexible full
......
...@@ -186,7 +186,6 @@ config USB_EHCI_HCD_AT91 ...@@ -186,7 +186,6 @@ config USB_EHCI_HCD_AT91
config USB_EHCI_MSM config USB_EHCI_MSM
tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller" tristate "Support for Qualcomm QSD/MSM on-chip EHCI USB controller"
depends on ARCH_MSM depends on ARCH_MSM
depends on USB_PHY
select USB_EHCI_ROOT_HUB_TT select USB_EHCI_ROOT_HUB_TT
select USB_MSM_OTG select USB_MSM_OTG
---help--- ---help---
......
# #
# Physical Layer USB driver configuration # Physical Layer USB driver configuration
# #
menuconfig USB_PHY menu "USB Physical Layer drivers"
bool "USB Physical Layer drivers"
help
Most USB controllers have the physical layer signalling part
(commonly called a PHY) built in. However, dual-role devices
(a.k.a. USB on-the-go) which support being USB master or slave
with the same connector often use an external PHY.
The drivers in this submenu add support for such PHY devices.
They are not needed for standard master-only (or the vast
majority of slave-only) USB interfaces.
If you're not sure if this applies to you, it probably doesn't;
say N here.
if USB_PHY config USB_PHY
def_bool n
# #
# USB Transceiver Drivers # USB Transceiver Drivers
...@@ -24,6 +12,7 @@ if USB_PHY ...@@ -24,6 +12,7 @@ if USB_PHY
config AB8500_USB config AB8500_USB
tristate "AB8500 USB Transceiver Driver" tristate "AB8500 USB Transceiver Driver"
depends on AB8500_CORE depends on AB8500_CORE
select USB_PHY
help help
Enable this to support the USB OTG transceiver in AB8500 chip. Enable this to support the USB OTG transceiver in AB8500 chip.
This transceiver supports high and full speed devices plus, This transceiver supports high and full speed devices plus,
...@@ -33,12 +22,14 @@ config FSL_USB2_OTG ...@@ -33,12 +22,14 @@ config FSL_USB2_OTG
bool "Freescale USB OTG Transceiver Driver" bool "Freescale USB OTG Transceiver Driver"
depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME depends on USB_EHCI_FSL && USB_FSL_USB2 && PM_RUNTIME
select USB_OTG select USB_OTG
select USB_PHY
help help
Enable this to support Freescale USB OTG transceiver. Enable this to support Freescale USB OTG transceiver.
config ISP1301_OMAP config ISP1301_OMAP
tristate "Philips ISP1301 with OMAP OTG" tristate "Philips ISP1301 with OMAP OTG"
depends on I2C && ARCH_OMAP_OTG depends on I2C && ARCH_OMAP_OTG
select USB_PHY
help help
If you say yes here you get support for the Philips ISP1301 If you say yes here you get support for the Philips ISP1301
USB-On-The-Go transceiver working with the OMAP OTG controller. USB-On-The-Go transceiver working with the OMAP OTG controller.
...@@ -52,12 +43,14 @@ config ISP1301_OMAP ...@@ -52,12 +43,14 @@ config ISP1301_OMAP
config MV_U3D_PHY config MV_U3D_PHY
bool "Marvell USB 3.0 PHY controller Driver" bool "Marvell USB 3.0 PHY controller Driver"
depends on CPU_MMP3 depends on CPU_MMP3
select USB_PHY
help help
Enable this to support Marvell USB 3.0 phy controller for Marvell Enable this to support Marvell USB 3.0 phy controller for Marvell
SoC. SoC.
config NOP_USB_XCEIV config NOP_USB_XCEIV
tristate "NOP USB Transceiver Driver" tristate "NOP USB Transceiver Driver"
select USB_PHY
help help
This driver is to be used by all the usb transceiver which are either 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 built-in with usb ip or which are autonomous and doesn't require any
...@@ -76,6 +69,7 @@ config OMAP_USB2 ...@@ -76,6 +69,7 @@ config OMAP_USB2
tristate "OMAP USB2 PHY Driver" tristate "OMAP USB2 PHY Driver"
depends on ARCH_OMAP2PLUS depends on ARCH_OMAP2PLUS
select OMAP_CONTROL_USB select OMAP_CONTROL_USB
select USB_PHY
help help
Enable this to support the transceiver that is part of SOC. This Enable this to support the transceiver that is part of SOC. This
driver takes care of all the PHY functionality apart from comparator. driver takes care of all the PHY functionality apart from comparator.
...@@ -85,6 +79,7 @@ config OMAP_USB2 ...@@ -85,6 +79,7 @@ config OMAP_USB2
config OMAP_USB3 config OMAP_USB3
tristate "OMAP USB3 PHY Driver" tristate "OMAP USB3 PHY Driver"
select OMAP_CONTROL_USB select OMAP_CONTROL_USB
select USB_PHY
help help
Enable this to support the USB3 PHY that is part of SOC. This Enable this to support the USB3 PHY that is part of SOC. This
driver takes care of all the PHY functionality apart from comparator. driver takes care of all the PHY functionality apart from comparator.
...@@ -101,6 +96,7 @@ config SAMSUNG_USBPHY ...@@ -101,6 +96,7 @@ config SAMSUNG_USBPHY
config SAMSUNG_USB2PHY config SAMSUNG_USB2PHY
tristate "Samsung USB 2.0 PHY controller Driver" tristate "Samsung USB 2.0 PHY controller Driver"
select SAMSUNG_USBPHY select SAMSUNG_USBPHY
select USB_PHY
help help
Enable this to support Samsung USB 2.0 (High Speed) PHY controller Enable this to support Samsung USB 2.0 (High Speed) PHY controller
driver for Samsung SoCs. driver for Samsung SoCs.
...@@ -108,6 +104,7 @@ config SAMSUNG_USB2PHY ...@@ -108,6 +104,7 @@ config SAMSUNG_USB2PHY
config SAMSUNG_USB3PHY config SAMSUNG_USB3PHY
tristate "Samsung USB 3.0 PHY controller Driver" tristate "Samsung USB 3.0 PHY controller Driver"
select SAMSUNG_USBPHY select SAMSUNG_USBPHY
select USB_PHY
help help
Enable this to support Samsung USB 3.0 (Super Speed) phy controller Enable this to support Samsung USB 3.0 (Super Speed) phy controller
for samsung SoCs. for samsung SoCs.
...@@ -115,6 +112,7 @@ config SAMSUNG_USB3PHY ...@@ -115,6 +112,7 @@ config SAMSUNG_USB3PHY
config TWL4030_USB config TWL4030_USB
tristate "TWL4030 USB Transceiver Driver" tristate "TWL4030 USB Transceiver Driver"
depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
select USB_PHY
help help
Enable this to support the USB OTG transceiver on TWL4030 Enable this to support the USB OTG transceiver on TWL4030
family chips (including the TWL5030 and TPS659x0 devices). family chips (including the TWL5030 and TPS659x0 devices).
...@@ -135,6 +133,7 @@ config TWL6030_USB ...@@ -135,6 +133,7 @@ config TWL6030_USB
config USB_GPIO_VBUS config USB_GPIO_VBUS
tristate "GPIO based peripheral-only VBUS sensing 'transceiver'" tristate "GPIO based peripheral-only VBUS sensing 'transceiver'"
depends on GPIOLIB depends on GPIOLIB
select USB_PHY
help help
Provides simple GPIO VBUS sensing for controllers with an Provides simple GPIO VBUS sensing for controllers with an
internal transceiver via the usb_phy interface, and internal transceiver via the usb_phy interface, and
...@@ -145,6 +144,7 @@ config USB_ISP1301 ...@@ -145,6 +144,7 @@ config USB_ISP1301
tristate "NXP ISP1301 USB transceiver support" tristate "NXP ISP1301 USB transceiver support"
depends on USB || USB_GADGET depends on USB || USB_GADGET
depends on I2C depends on I2C
select USB_PHY
help help
Say Y here to add support for the NXP ISP1301 USB transceiver driver. 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 This chip is typically used as USB transceiver for USB host, gadget
...@@ -156,6 +156,7 @@ config USB_ISP1301 ...@@ -156,6 +156,7 @@ config USB_ISP1301
config USB_MSM_OTG config USB_MSM_OTG
tristate "OTG support for Qualcomm on-chip USB controller" tristate "OTG support for Qualcomm on-chip USB controller"
depends on (USB || USB_GADGET) && ARCH_MSM depends on (USB || USB_GADGET) && ARCH_MSM
select USB_PHY
help help
Enable this to support the USB OTG transceiver on MSM chips. It Enable this to support the USB OTG transceiver on MSM chips. It
handles PHY initialization, clock management, and workarounds handles PHY initialization, clock management, and workarounds
...@@ -169,6 +170,7 @@ config USB_MV_OTG ...@@ -169,6 +170,7 @@ config USB_MV_OTG
tristate "Marvell USB OTG support" tristate "Marvell USB OTG support"
depends on USB_EHCI_MV && USB_MV_UDC && PM_RUNTIME depends on USB_EHCI_MV && USB_MV_UDC && PM_RUNTIME
select USB_OTG select USB_OTG
select USB_PHY
help help
Say Y here if you want to build Marvell USB OTG transciever Say Y here if you want to build Marvell USB OTG transciever
driver in kernel (including PXA and MMP series). This driver driver in kernel (including PXA and MMP series). This driver
...@@ -180,6 +182,7 @@ config USB_MXS_PHY ...@@ -180,6 +182,7 @@ config USB_MXS_PHY
tristate "Freescale MXS USB PHY support" tristate "Freescale MXS USB PHY support"
depends on ARCH_MXC || ARCH_MXS depends on ARCH_MXC || ARCH_MXS
select STMP_DEVICE select STMP_DEVICE
select USB_PHY
help help
Enable this to support the Freescale MXS USB PHY. Enable this to support the Freescale MXS USB PHY.
...@@ -188,6 +191,7 @@ config USB_MXS_PHY ...@@ -188,6 +191,7 @@ config USB_MXS_PHY
config USB_RCAR_PHY config USB_RCAR_PHY
tristate "Renesas R-Car USB PHY support" tristate "Renesas R-Car USB PHY support"
depends on USB || USB_GADGET depends on USB || USB_GADGET
select USB_PHY
help help
Say Y here to add support for the Renesas R-Car USB common PHY driver. 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 chip is typically used as USB PHY for USB host, gadget.
...@@ -210,4 +214,4 @@ config USB_ULPI_VIEWPORT ...@@ -210,4 +214,4 @@ config USB_ULPI_VIEWPORT
Provides read/write operations to the ULPI phy register set for Provides read/write operations to the ULPI phy register set for
controllers with a viewport register (e.g. Chipidea/ARC controllers). controllers with a viewport register (e.g. Chipidea/ARC controllers).
endif # USB_PHY endmenu
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment