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

Commit 16c98474 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: phy-msm-qusb-v2: Override DEBUG_CTRL1 based on SoC Version



This change overrides DEBUG_CTRL1 value to 0x09 based on
SoC Version.

Change-Id: I900c2300b10f54b60ec406f2b31c56b658f4a10b
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 8b7300fd
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@
#define SQ_CTRL1_CHIRP_DISABLE		0x20
#define SQ_CTRL2_CHIRP_DISABLE		0x80

#define DEBUG_CTRL1_OVERRIDE_VAL	0x09

/* PERIPH_SS_PHY_REFGEN_NORTH_BG_CTRL register bits */
#define BANDGAP_BYPASS			BIT(0)

@@ -84,6 +86,7 @@ enum qusb_phy_reg {
	BIAS_CTRL_2,
	SQ_CTRL1,
	SQ_CTRL2,
	DEBUG_CTRL1,
	USB2_PHY_REG_MAX,
};

@@ -553,6 +556,11 @@ static int qusb_phy_init(struct usb_phy *phy)
			writel_relaxed(BIAS_CTRL_2_OVERRIDE_VAL,
				qphy->base + qphy->phy_reg[BIAS_CTRL_2]);

	/* if soc revision is mentioned override DEBUG_CTRL1 value */
	if (qphy->soc_min_rev)
		writel_relaxed(DEBUG_CTRL1_OVERRIDE_VAL,
				qphy->base + qphy->phy_reg[DEBUG_CTRL1]);

	/* ensure above writes are completed before re-enabling PHY */
	wmb();

@@ -1228,7 +1236,7 @@ static int qusb_phy_probe(struct platform_device *pdev)
	 * qusb_phy_disable_chirp is not required if soc version is
	 * mentioned and is not base version.
	 */
	if (qphy->soc_min_rev == 0)
	if (!qphy->soc_min_rev)
		qphy->phy.disable_chirp	= qusb_phy_disable_chirp;

	qphy->phy.start_port_reset	= qusb_phy_enable_ext_pulldown;