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

Commit 87ed8041 authored by Hemant Kumar's avatar Hemant Kumar Committed by Mayank Rana
Browse files

usb: phy: qusb2: Enable phy auto-resume



phy auto-resume allows phy to automatically drive
bus resume right after device driving bus resume for
at least 1ms due to remote wake up, before host XHCI
driver gets a chance to drive bus resume.

Change-Id: I6ea326b0864f46dd5e438f050950b8ee721726e5
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent f4da1dc3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#define DPSE_INTERRUPT			BIT(0)

#define QUSB2PHY_PORT_TUNE1		0x23c
#define QUSB2PHY_TEST1			0x24C

#define QUSB2PHY_1P8_VOL_MIN           1800000 /* uV */
#define QUSB2PHY_1P8_VOL_MAX           1800000 /* uV */
@@ -536,6 +537,14 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
			writel_relaxed(intr_mask,
				qphy->base + QUSB2PHY_INTR_CTRL);

			/* enable phy auto-resume */
			writel_relaxed(0x91,
					qphy->base + QUSB2PHY_TEST1);
			/* flush the previous write before next write */
			wmb();
			writel_relaxed(0x90,
				qphy->base + QUSB2PHY_TEST1);

			dev_dbg(phy->dev, "%s: intr_mask = %x\n",
			__func__, intr_mask);