mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 03:59:01 +07:00
07dbff0ddb
Many SoC platforms have separate devices for the USB PHY which are registered through the generic PHY framework. These PHYs have to be enabled to make the USB controller actually work. They also have to be disabled again on shutdown/suspend. Currently (at least) the following HCI platform drivers are using custom code to obtain all PHYs via devicetree for the roothub/controller and disable/enable them when required: - ehci-platform.c has ehci_platform_power_{on,off} - xhci-mtk.c has xhci_mtk_phy_{init,exit,power_on,power_off} - ohci-platform.c has ohci_platform_power_{on,off} With this new wrapper the USB PHYs can be specified directly in the USB controller's devicetree node (just like on the drivers listed above). This allows SoCs like the Amlogic Meson GXL family to operate correctly once this is wired up correctly. These SoCs use a dwc3 controller and require all USB PHYs to be initialized (if one of the USB PHYs it not initialized then none of USB port works at all). Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Yixun Lan <yixun.lan@amlogic.com> Cc: Chunfeng Yun <chunfeng.yun@mediatek.com> Tested-by: Neil Armstrong <narmstrong@baylibre.con> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 lines
291 B
C
8 lines
291 B
C
struct usb_phy_roothub;
|
|
|
|
struct usb_phy_roothub *usb_phy_roothub_init(struct device *dev);
|
|
int usb_phy_roothub_exit(struct usb_phy_roothub *phy_roothub);
|
|
|
|
int usb_phy_roothub_power_on(struct usb_phy_roothub *phy_roothub);
|
|
void usb_phy_roothub_power_off(struct usb_phy_roothub *phy_roothub);
|