usb: core: hcd: integrate the PHY wrapper into the HCD core
This integrates the PHY wrapper into the core hcd infrastructure. Multiple PHYs which are part of the HCD's device tree node are now managed (= powered on/off when needed), by the new usb_phy_roothub code. Suspend and resume is also supported, however not for runtime/auto-suspend (which is triggered for example when no devices are connected to the USB bus). This is needed on some SoCs (for example Amlogic Meson GXL) because if the PHYs are disabled during auto-suspend then devices which are plugged in afterwards are not seen by the host. One example where this is required is the Amlogic GXL and GXM SoCs: They are using a dwc3 USB controller with up to three ports enabled on the internal roothub. Each port has it's own PHY which must be enabled (if one of the PHYs is left disabled then none of the USB ports works at all). The new logic works on the Amlogic GXL and GXM SoCs because the dwc3 driver internally creates a xhci-hcd which then registers a HCD which then triggers our new PHY wrapper. USB controller drivers can opt out of this by setting "skip_phy_initialization" in struct usb_hcd to true. This is identical to how it works for a single USB PHY, so the "multiple PHY" handling is disabled for drivers that opted out of the management logic of a single PHY. Signed-off-by:Martin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by:
Alan Stern <stern@rowland.harvard.edu> Acked-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Tested-by:
Yixun Lan <yixun.lan@amlogic.com> Tested-by:
Neil Armstrong <narmstrong@baylibre.con> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
07dbff0d