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

Commit 8d48db5f authored by Jack Pham's avatar Jack Pham Committed by Mayank Rana
Browse files

usb: phy: qmp: Select usb3 phy mode before initializing PHY



Make sure the USB3/DP PHY mode selection is switched back to
USB3 mode before proceeding with PHY initialization. This fixes
a bug when DisplayPort previously uses the PHY and does not
switch it back which causes the POWER_DOWN_CONTROL register write
to not take effect and results in USB3 PHY initialization failure.

Change-Id: Idad0f80eda6192ccae9e824f1f76c7071806ffec
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 16d1a057
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -304,13 +304,13 @@ static int msm_ssphy_qmp_init(struct usb_phy *uphy)
		phy->clk_enabled = true;
	}

	writel_relaxed(0x01,
		phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]);

	/* select usb3 phy mode */
	if (phy->tcsr_usb3_dp_phymode)
		writel_relaxed(0x0, phy->tcsr_usb3_dp_phymode);

	writel_relaxed(0x01,
		phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]);

	/* Make sure that above write completed to get PHY into POWER DOWN */
	mb();