Skip to contentSkip to conversation

phy: Add MSM8996 support to Qualcomm QUSB2 phy

PATCH Applied [email protected] 3 participants 4 messages Dec 7, 2025 – Jan 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: Add MSM8996 support to Qualcomm QUSB2 phy

From: Biswapriyo Nath <[email protected]>

This change is imported from Linux driver and tested with SM6125 SoC. Note, the msm8996_phy_cfg struct is same as sdm660_phy_cfg but qusb2_phy_cfg::se_clk_scheme_default differs only.

---

 drivers/phy/qcom/phy-qcom-qusb2.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +14 -0
index d98f6108..9e821365 100644
@@ -224,6 +224,18 @@ static const unsigned int qusb2_v2_regs_layout[] = {
 	[QUSB2PHY_INTR_CTRL] = 0x230,
 };
 
+static const struct qusb2_phy_cfg msm8996_phy_cfg = {
+	.tbl = msm8996_init_tbl,
+	.tbl_num = ARRAY_SIZE(msm8996_init_tbl),
+	.regs = sm6115_regs_layout,
+
+	.has_pll_test = true,
+	.se_clk_scheme_default = true,
+	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
+	.mask_core_ready = PLL_LOCKED,
+	.autoresume_en = BIT(3),
+};
+
 static const struct qusb2_phy_cfg sm6115_phy_cfg = {
 	.tbl = sm6115_init_tbl,
 	.tbl_num = ARRAY_SIZE(sm6115_init_tbl),
@@ -450,6 +462,8 @@ static struct phy_ops qusb2phy_ops = {
 };
 
 static const struct udevice_id qusb2phy_ids[] = {
+	{ .compatible = "qcom,msm8996-qusb2-phy",
+	  .data = (ulong)&msm8996_phy_cfg },
 	{ .compatible = "qcom,qusb2-phy" },
 	{ .compatible = "qcom,qcm2290-qusb2-phy",
 	  .data = (ulong)&sm6115_phy_cfg },
Signature · 4 lines
2.52.0

base-commit: c7c2c3c0101f625c01bf101d652e03a6d4aa950f
branch: master
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · On Sun, Dec 07, 2025 at 06:49:19PM +0000, [email protected] wrote:

From: Biswapriyo Nath <[email protected]>

This change is imported from Linux driver and tested with SM6125 SoC. Note, the msm8996_phy_cfg struct is same as sdm660_phy_cfg but qusb2_phy_cfg::se_clk_scheme_default differs only.

---

 drivers/phy/qcom/phy-qcom-qusb2.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

-Sumit

Quoted 38 lines
drivers/phy/qcom/phy-qcom-qusb2.c +14 -0
index d98f6108..9e821365 100644
@@ -224,6 +224,18 @@ static const unsigned int qusb2_v2_regs_layout[] = {
 	[QUSB2PHY_INTR_CTRL] = 0x230,
 };
 
+static const struct qusb2_phy_cfg msm8996_phy_cfg = {
+	.tbl = msm8996_init_tbl,
+	.tbl_num = ARRAY_SIZE(msm8996_init_tbl),
+	.regs = sm6115_regs_layout,
+
+	.has_pll_test = true,
+	.se_clk_scheme_default = true,
+	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
+	.mask_core_ready = PLL_LOCKED,
+	.autoresume_en = BIT(3),
+};
+
 static const struct qusb2_phy_cfg sm6115_phy_cfg = {
 	.tbl = sm6115_init_tbl,
 	.tbl_num = ARRAY_SIZE(sm6115_init_tbl),
@@ -450,6 +462,8 @@ static struct phy_ops qusb2phy_ops = {
 };
 
 static const struct udevice_id qusb2phy_ids[] = {
+	{ .compatible = "qcom,msm8996-qusb2-phy",
+	  .data = (ulong)&msm8996_phy_cfg },
 	{ .compatible = "qcom,qusb2-phy" },
 	{ .compatible = "qcom,qcm2290-qusb2-phy",
 	  .data = (ulong)&sm6115_phy_cfg },
Signature · 4 lines
2.52.0

base-commit: c7c2c3c0101f625c01bf101d652e03a6d4aa950f
branch: master
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]

Hi Biswapriyo,

Quoted 7 lines · On 12/7/25 19:49, [email protected] wrote:

From: Biswapriyo Nath <[email protected]>

This change is imported from Linux driver and tested with SM6125 SoC. Note, the msm8996_phy_cfg struct is same as sdm660_phy_cfg but qusb2_phy_cfg::se_clk_scheme_default differs only.

Thanks for this! Excited to see sm6125 support :D

Quoted 37 lines

---

  drivers/phy/qcom/phy-qcom-qusb2.c | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
drivers/phy/qcom/phy-qcom-qusb2.c +14 -0
index d98f6108..9e821365 100644
@@ -224,6 +224,18 @@ static const unsigned int qusb2_v2_regs_layout[] = {
  	[QUSB2PHY_INTR_CTRL] = 0x230,
  };
 
+static const struct qusb2_phy_cfg msm8996_phy_cfg = {
+	.tbl = msm8996_init_tbl,
+	.tbl_num = ARRAY_SIZE(msm8996_init_tbl),
+	.regs = sm6115_regs_layout,
+
+	.has_pll_test = true,
+	.se_clk_scheme_default = true,
+	.disable_ctrl = (CLAMP_N_EN | FREEZIO_N | POWER_DOWN),
+	.mask_core_ready = PLL_LOCKED,
+	.autoresume_en = BIT(3),
+};
+
  static const struct qusb2_phy_cfg sm6115_phy_cfg = {
  	.tbl = sm6115_init_tbl,
  	.tbl_num = ARRAY_SIZE(sm6115_init_tbl),
@@ -450,6 +462,8 @@ static struct phy_ops qusb2phy_ops = {
  };
 
  static const struct udevice_id qusb2phy_ids[] = {
+	{ .compatible = "qcom,msm8996-qusb2-phy",
+	  .data = (ulong)&msm8996_phy_cfg },
  	{ .compatible = "qcom,qusb2-phy" },
  	{ .compatible = "qcom,qcm2290-qusb2-phy",
  	  .data = (ulong)&sm6115_phy_cfg },
#3 lore raw
In reply to [email protected]
Quoted 5 lines · On Sun, 07 Dec 2025 18:49:19 +0000, [email protected] wrote:

This change is imported from Linux driver and tested with SM6125 SoC. Note, the msm8996_phy_cfg struct is same as sdm660_phy_cfg but qusb2_phy_cfg::se_clk_scheme_default differs only.

Applied, thanks!

[1/1] phy: Add MSM8996 support to Qualcomm QUSB2 phy

      https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/commit/4ad3992cc357

Best regards,

Signature · 1 line
// Casey (she/they)