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

Commit d8100119 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add DEBUG_CTRL1 register in qusb_phy on SDM670"

parents ac497d5a 0f59784c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -138,7 +138,8 @@
			 0x254 /* QUSB2PHY_TEST1 */
			 0x198 /* PLL_BIAS_CONTROL_2 */
			 0x228 /* QUSB2PHY_SQ_CTRL1 */
			 0x22c>; /* QUSB2PHY_SQ_CTRL2 */
			 0x22c /* QUSB2PHY_SQ_CTRL2 */
			 0x27c>; /* QUSB2PHY_DEBUG_CTRL1 */

		qcom,qusb-phy-init-seq =
			/* <value reg_offset> */
+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;