diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 2f401d577eb7..8e01b27114d6 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1296,6 +1296,8 @@ static void dwc3_get_properties(struct dwc3 *dwc) "snps,xhci-slow-suspend-quirk"); dwc->xhci_trb_ent_quirk = device_property_read_bool(dev, "snps,xhci-trb-ent-quirk"); + dwc->dis_u3_autosuspend_quirk = device_property_read_bool(dev, + "snps,dis-u3-autosuspend-quirk"); dwc->tx_de_emphasis_quirk = device_property_read_bool(dev, "snps,tx_de_emphasis_quirk"); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 733fa3640833..1b301a9a529d 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -1029,6 +1029,7 @@ struct dwc3_scratchpad_array { * @xhci_trb_ent_quirk: set if need to enable the Evaluate Next TRB(ENT) flag in the TRB data structure to force xHC to pre-fetch the next TRB of a TD. + * @dis_u3_autosuspend_quirk: set if the we want to disable usb3 autosuspend * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk * @tx_de_emphasis: Tx de-emphasis value * 0 - -6dB de-emphasis @@ -1219,6 +1220,7 @@ struct dwc3 { unsigned dis_tx_ipgap_linecheck_quirk:1; unsigned xhci_slow_suspend_quirk:1; unsigned xhci_trb_ent_quirk:1; + unsigned dis_u3_autosuspend_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 31b5cf0246f2..1c78576ca79a 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -46,7 +46,7 @@ out: int dwc3_host_init(struct dwc3 *dwc) { - struct property_entry props[5]; + struct property_entry props[6]; struct platform_device *xhci; int ret, irq; struct resource *res; @@ -102,6 +102,8 @@ int dwc3_host_init(struct dwc3 *dwc) if (dwc->usb2_lpm_disable) props[prop_idx++].name = "usb2-lpm-disable"; + if (dwc->dis_u3_autosuspend_quirk) + props[prop_idx++].name = "usb3-dis-autosuspend"; /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation * where Port Disable command doesn't work.