]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
phy: qualcomm: eusb2-repeater: Add SMB2370 eUSB2 repeater support
authorWesley Cheng <wesley.cheng@oss.qualcomm.com>
Tue, 9 Dec 2025 23:09:41 +0000 (15:09 -0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 23 Dec 2025 17:41:07 +0000 (23:11 +0530)
Introduce support for the SMB2370 based eUSB2 repeater.  Configure the
proper repeater tuning settings, as if this is not done correctly, it
can lead to instability on the USB2 link, which leads to USB2
enumeration failures, or random disconnects.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Wesley Cheng <wesley.cheng@oss.qualcomm.com>
Link: https://patch.msgid.link/20251209-linux-next-12825-v8-5-42133596bda0@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c

index 651a12b59bc8c585d9ebea13d716f247fce4e797..441996480a67fa52e73f683cec3ba106d3048335 100644 (file)
@@ -75,6 +75,13 @@ static const struct eusb2_repeater_init_tbl_reg smb2360_init_tbl[] = {
        { EUSB2_TUNE_USB2_PREEM, 0x2 },
 };
 
+static const struct eusb2_repeater_init_tbl_reg smb2370_init_tbl[] = {
+       { EUSB2_TUNE_IUSB2, 0x4 },
+       { EUSB2_TUNE_SQUELCH_U, 0x3 },
+       { EUSB2_TUNE_USB2_SLEW, 0x7 },
+       { EUSB2_TUNE_USB2_PREEM, 0x0 },
+};
+
 static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
        .init_tbl       = pm8550b_init_tbl,
        .init_tbl_num   = ARRAY_SIZE(pm8550b_init_tbl),
@@ -97,6 +104,13 @@ static const struct eusb2_repeater_cfg smb2360_eusb2_cfg = {
        .num_vregs      = ARRAY_SIZE(pm8550b_vreg_l),
 };
 
+static const struct eusb2_repeater_cfg smb2370_eusb2_cfg = {
+       .init_tbl       = smb2370_init_tbl,
+       .init_tbl_num   = ARRAY_SIZE(smb2370_init_tbl),
+       .vreg_list      = pm8550b_vreg_l,
+       .num_vregs      = ARRAY_SIZE(pm8550b_vreg_l),
+};
+
 static int eusb2_repeater_init_vregs(struct eusb2_repeater *rptr)
 {
        int num = rptr->cfg->num_vregs;
@@ -278,6 +292,10 @@ static const struct of_device_id eusb2_repeater_of_match_table[] = {
                .compatible = "qcom,smb2360-eusb2-repeater",
                .data = &smb2360_eusb2_cfg,
        },
+       {
+               .compatible = "qcom,smb2370-eusb2-repeater",
+               .data = &smb2370_eusb2_cfg,
+       },
        { },
 };
 MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table);