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

Commit bc75df7d authored by Hemant Kumar's avatar Hemant Kumar Committed by Azhar Shaikh
Browse files

usb: ssusb-qmp: Do not enable autonomous mode in high speed mode



Upon high speed bus suspend qmp phy is generating lfps rx term
interrupt when ss phy autonomous mode is enabled. This is causing
controller to come out of low power mode and it never goes back to
lowe power mode. Hence disable autinomous mode for high speed connecion.

Change-Id: I227ec1978e05d4a5ed7772a6b329724b3a74a266
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 8febe6a5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1951,6 +1951,9 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc)

	/* Suspend SS PHY */
	if (can_suspend_ssphy) {
		/* indicate phy about SS mode */
		if (dwc3_msm_is_superspeed(mdwc))
			mdwc->ss_phy->flags |= DEVICE_IN_SS_MODE;
		usb_phy_set_suspend(mdwc->ss_phy, 1);
		mdwc->lpm_flags |= MDWC3_SS_PHY_SUSPEND;
	}
@@ -2063,6 +2066,7 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
	/* Resume SS PHY */
	if (mdwc->lpm_flags & MDWC3_SS_PHY_SUSPEND) {
		usb_phy_set_suspend(mdwc->ss_phy, 0);
		mdwc->ss_phy->flags &= ~DEVICE_IN_SS_MODE;
		mdwc->lpm_flags &= ~MDWC3_SS_PHY_SUSPEND;
	}

+8 −6
Original line number Diff line number Diff line
@@ -401,12 +401,14 @@ static void msm_ssusb_qmp_enable_autonomous(struct msm_ssphy_qmp *phy,

	if (enable) {
		msm_ssusb_qmp_clr_lfps_rxterm_int(phy);
		if (phy->phy.flags & DEVICE_IN_SS_MODE) {
			val =
			readb_relaxed(phy->base + autonomous_mode_offset);
			val |= ARCVR_DTCT_EN;
			val |= ALFPS_DTCT_EN;
			val &= ~ARCVR_DTCT_EVENT_SEL;
			writeb_relaxed(val, phy->base + autonomous_mode_offset);
		}

		/* clamp phy level shifter to perform autonomous detection */
		writel_relaxed(0x1, phy->vls_clamp_reg);
+1 −0
Original line number Diff line number Diff line
@@ -320,6 +320,7 @@ struct msm_otg_platform_data {
#define PHY_HOST_MODE			BIT(2)
#define PHY_CHARGER_CONNECTED		BIT(3)
#define PHY_VBUS_VALID_OVERRIDE		BIT(4)
#define DEVICE_IN_SS_MODE		BIT(5)

#define USB_NUM_BUS_CLOCKS      3