From a811f07f45406d812042d0fed49668396f7adff5 Mon Sep 17 00:00:00 2001 From: Frank Wang Date: Tue, 11 Jan 2022 17:14:28 +0800 Subject: [PATCH] usb: host: xhci: skip phy init quirk can configure in dt The "skip_phy_initialization" property in usb_hcd structure means that do not manage the PHY state in the HCD core and handle it by the controller's driver. This commit adds "quirk-skip-phy-init" quirk which can configure the property in DT to support it. For Rockchip DWC3 dual role scheme, we enabled the device wakeup capability in dwc3 runtime resume that would cause the PHY exit failed in "usb_phy_roothub_exit()" at PM suspend stage. So this commit is also a workaround to fix it. Fixes: f1636eb0fd02 ("usb: dwc3: fix failed to enter suspend") Signed-off-by: Frank Wang Change-Id: Ibc9885669f25d2aeea18a9d22d49a204eb346ea1 --- drivers/usb/host/xhci-plat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 21280a6d589e..6384c895d13f 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -358,6 +358,9 @@ static int xhci_plat_probe(struct platform_device *pdev) if (device_property_read_bool(tmpdev, "quirk-broken-port-ped")) xhci->quirks |= XHCI_BROKEN_PORT_PED; + if (device_property_read_bool(tmpdev, "quirk-skip-phy-init")) + xhci->quirks |= XHCI_SKIP_PHY_INIT; + device_property_read_u32(tmpdev, "imod-interval-ns", &xhci->imod_interval); }