History

usb: xhci-mtk: support quirk to disable usb2 lpm

The xHCI driver support usb2 HW LPM by default, here add support XHCI_HW_LPM_DISABLE quirk, then we can disable usb2 lpm when need it.

Chunfeng Yun committed 5 years ago

Commit bee1f891 parent 1f743c82 files · +4 −0Browse files

Unified · Split

2 files
  1. drivers/usb/host/xhci-mtk.c +3 −0
  2. drivers/usb/host/xhci-mtk.h +1 −0
drivers/usb/host/xhci-mtk.c+3−0
@@ -411,6 +411,8 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) · 410 unmodified lines
411411 xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
412412 if (mtk->lpm_support)
413413 xhci->quirks |= XHCI_LPM_SUPPORT;
414+ if (mtk->u2_lpm_disable)
415+ xhci->quirks |= XHCI_HW_LPM_DISABLE;
414416
415417 /*
416418 * MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream,
@@ -493,6 +495,7 @@ static int xhci_mtk_probe(struct platform_device *pdev) · 76 unmodified lines
493495 return ret;
494496
495497 mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
498+ mtk->u2_lpm_disable = of_property_read_bool(node, "usb2-lpm-disable");
496499 /* optional property, ignore the error if it does not exist */
497500 of_property_read_u32(node, "mediatek,u3p-dis-msk",
498501 &mtk->u3p_dis_msk);
drivers/usb/host/xhci-mtk.h+1−0
@@ -149,6 +149,7 @@ struct xhci_hcd_mtk { · 148 unmodified lines
149149 struct phy **phys;
150150 int num_phys;
151151 bool lpm_support;
152+ bool u2_lpm_disable;
152153 /* usb remote wakeup */
153154 bool uwk_en;
154155 struct regmap *uwk;