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

Commit a81e1491 authored by Pratham Pratap's avatar Pratham Pratap Committed by Gerrit - the friendly Code Review server
Browse files

usb: phy: qusb2: Update tune params based on efuse value



For 8nm zero value is treated as a valid efuse value and
driver should honor this efuse value to update the tune
params. This change makes the updation of tune value possible
even if the efuse value is zero.

Change-Id: I6eac2e2414bf61b89aa41bebbfe56ad10017969e
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 9ffc7bc4
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -430,8 +430,8 @@ static void qusb_phy_get_tune1_param(struct qusb_phy *qphy)
	bit_mask = (bit_mask << qphy->efuse_num_of_bits) - 1;

	/*
	 * if efuse reg is updated (i.e non-zero) then use it to program
	 * tune parameters
	 * For 8nm zero is treated as a valid efuse value and driver
	 * should program the tune1 reg based on efuse value
	 */
	qphy->tune_val = readl_relaxed(qphy->efuse_reg);
	pr_debug("%s(): bit_mask:%d efuse based tune1 value:%d\n",
@@ -440,10 +440,8 @@ static void qusb_phy_get_tune1_param(struct qusb_phy *qphy)
	qphy->tune_val = TUNE_VAL_MASK(qphy->tune_val,
				qphy->efuse_bit_pos, bit_mask);
	reg = readb_relaxed(qphy->base + qphy->phy_reg[PORT_TUNE1]);
	if (qphy->tune_val) {
	reg = reg & 0x0f;
	reg |= (qphy->tune_val << 4);
	}

	qphy->tune_val = reg;
}