usb: dwc3: host: workaround xhci u2 broken suspend for RK356X

The RK356X DWC3 supports to set the USB 2.0 PHY enter
suspend mode if the DWC3 core suspend conditions are
valid (as per DWC3 controller databook 6.3.46 GUSB2PHYCFG
register bit6). This cause xHC driver failed to send
USB resume signal to USB 2.0 device in xhci_bus_resume().
This patch adds a quirk "xhci-u2-broken-suspend" to force
the xHC to set the link state to XDEV_RESUME and send USB
resume signal to USB 2.0 device.

Change-Id: I24c017867f80728890c0562a12e4554625913e67
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu
2021-03-30 11:32:33 +08:00
parent 6ad580141f
commit a5bc56f4b7

View File

@@ -46,7 +46,7 @@ out:
int dwc3_host_init(struct dwc3 *dwc)
{
struct property_entry props[7];
struct property_entry props[8];
struct platform_device *xhci;
int ret, irq;
struct resource *res;
@@ -119,6 +119,9 @@ int dwc3_host_init(struct dwc3 *dwc)
if (dwc->xhci_warm_reset_on_suspend_quirk)
props[prop_idx++].name = "xhci-warm-reset-on-suspend";
if (!dwc->dis_u2_susphy_quirk)
props[prop_idx++].name = "xhci-u2-broken-suspend";
if (prop_idx) {
ret = platform_device_add_properties(xhci, props);
if (ret) {