Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f1c8202 authored by John Youn's avatar John Youn Committed by Hemant Kumar
Browse files

usb: dwc3: Add support for device L1 exit



For the usb31 IP and from version 2.90a of the usb3 IP, the core
supports HW exit from L1 in HS. Enable it, otherwise the controller may
never exit from LPM to do a transfer.

Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 0bb39ca1ad8758f109cd2e7b30a5316f3097346a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Change-Id: Ia66a7d87d4811a996f1a7c8464d1785e79cc925e
parent 4867091e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -903,6 +903,16 @@ int dwc3_core_init(struct dwc3 *dwc)
		dwc3_writel(dwc->regs, DWC3_GUCTL2, reg);
	}

	/*
	 * Enable hardware control of sending remote wakeup in HS when
	 * the device is in the L1 state.
	 */
	if (dwc->revision >= DWC3_REVISION_290A) {
		reg = dwc3_readl(dwc->regs, DWC3_GUCTL1);
		reg |= DWC3_GUCTL1_DEV_L1_EXIT_BY_HW;
		dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
	}

	return 0;

err2:
+4 −0
Original line number Diff line number Diff line
@@ -217,6 +217,9 @@
/* Global Debug LTSSM Register */
#define DWC3_GDBGLTSSM_LINKSTATE_MASK	(0xF << 22)

/* Global User Control 1 Register */
#define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW	(1 << 24)

/* Global USB2 PHY Configuration Register */
#define DWC3_GUSB2PHYCFG_PHYSOFTRST	(1 << 31)
#define DWC3_GUSB2PHYCFG_ENBLSLPM	(1 << 8)
@@ -1036,6 +1039,7 @@ struct dwc3 {
#define DWC3_REVISION_260A	0x5533260a
#define DWC3_REVISION_270A	0x5533270a
#define DWC3_REVISION_280A	0x5533280a
#define DWC3_REVISION_290A	0x5533290a
#define DWC3_REVISION_300A	0x5533300a
#define DWC3_REVISION_310A	0x5533310a
#define DWC3_REVISION_320A	0x5533320a