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

Commit 129111e7 authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: phy: Add BIAS_CTRL2 register offset as mandatory



BIAS_CTRL2 register is required to be override by QUSB PHY in
some cases. Hence add BIAS_CTRL2 register offset with QUSB PHY
device node on SDM845, and also modify check for to make sure
that all mandatory register offsets are provided.

Change-Id: I845a5a1dd6498a651f77eeab4b146395cfec7336
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 06e4dc68
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -191,7 +191,8 @@ Example:
			 0x210 /* QUSB2PHY_PWR_CTRL1 */
			 0x230 /* QUSB2PHY_INTR_CTRL */
			 0x0a8 /* QUSB2PHY_PLL_CORE_INPUT_OVERRIDE */
			 0x254>; /* QUSB2PHY_TEST1 */
			 0x254 /* QUSB2PHY_TEST1 */
			 0x198>; /* QUSB2PHY_PLL_BIAS_CONTROL_2 */
		qcom,efuse-bit-pos = <21>;
		qcom,efuse-num-bits = <3>;

+4 −2
Original line number Diff line number Diff line
@@ -133,7 +133,8 @@
			 0x210 /* QUSB2PHY_PWR_CTRL1 */
			 0x230 /* QUSB2PHY_INTR_CTRL */
			 0x0a8 /* QUSB2PHY_PLL_CORE_INPUT_OVERRIDE */
			 0x254>; /* QUSB2PHY_TEST1 */
			 0x254 /* QUSB2PHY_TEST1 */
			 0x198>; /* PLL_BIAS_CONTROL_2 */

		qcom,qusb-phy-init-seq =
			/* <value reg_offset> */
@@ -408,7 +409,8 @@
			 0x210 /* QUSB2PHY_PWR_CTRL1 */
			 0x230 /* QUSB2PHY_INTR_CTRL */
			 0x0a8 /* QUSB2PHY_PLL_CORE_INPUT_OVERRIDE */
			 0x254>; /* QUSB2PHY_TEST1 */
			 0x254 /* QUSB2PHY_TEST1 */
			 0x198>; /* PLL_BIAS_CONTROL_2 */

		qcom,qusb-phy-init-seq =
			/* <value reg_offset> */
+2 −1
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ enum qusb_phy_reg {
	INTR_CTRL,
	PLL_CORE_INPUT_OVERRIDE,
	TEST1,
	BIAS_CTRL_2,
	USB2_PHY_REG_MAX,
};

@@ -892,7 +893,7 @@ static int qusb_phy_probe(struct platform_device *pdev)
		if (qphy->phy_reg) {
			qphy->qusb_phy_reg_offset_cnt =
				size / sizeof(*qphy->phy_reg);
			if (qphy->qusb_phy_reg_offset_cnt > USB2_PHY_REG_MAX) {
			if (qphy->qusb_phy_reg_offset_cnt != USB2_PHY_REG_MAX) {
				dev_err(dev, "invalid reg offset count\n");
				return -EINVAL;
			}