Commit 851dd2c9 authored by Wesley Cheng's avatar Wesley Cheng Committed by Vinod Koul
Browse files

phy: qualcomm: eusb2-repeater: Add SMB2370 eUSB2 repeater support



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: default avatarDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: default avatarWesley Cheng <wesley.cheng@oss.qualcomm.com>
Link: https://patch.msgid.link/20251209-linux-next-12825-v8-5-42133596bda0@oss.qualcomm.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 18da9912
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -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);