Skip to content

Commit 6707674

Browse files
abelvesavinodkoul
authored andcommitted
phy: qualcomm: phy-qcom-eusb2-repeater: Add support for SMB2360
The SMB2360 PMICs contain the same repeater as the PM8550B, but requiring different settings, so add dedicated compatible for SMB2360. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/20240220-phy-qualcomm-eusb2-repeater-smb2360-v2-2-213338ca1d5f@linaro.org Signed-off-by: Vinod Koul <[email protected]>
1 parent f8d27a7 commit 6707674

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,26 @@ static const u32 pm8550b_init_tbl[NUM_TUNE_FIELDS] = {
8888
[TUNE_USB2_PREEM] = 0x5,
8989
};
9090

91+
static const u32 smb2360_init_tbl[NUM_TUNE_FIELDS] = {
92+
[TUNE_IUSB2] = 0x5,
93+
[TUNE_SQUELCH_U] = 0x3,
94+
[TUNE_USB2_PREEM] = 0x2,
95+
};
96+
9197
static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = {
9298
.init_tbl = pm8550b_init_tbl,
9399
.init_tbl_num = ARRAY_SIZE(pm8550b_init_tbl),
94100
.vreg_list = pm8550b_vreg_l,
95101
.num_vregs = ARRAY_SIZE(pm8550b_vreg_l),
96102
};
97103

104+
static const struct eusb2_repeater_cfg smb2360_eusb2_cfg = {
105+
.init_tbl = smb2360_init_tbl,
106+
.init_tbl_num = ARRAY_SIZE(smb2360_init_tbl),
107+
.vreg_list = pm8550b_vreg_l,
108+
.num_vregs = ARRAY_SIZE(pm8550b_vreg_l),
109+
};
110+
98111
static int eusb2_repeater_init_vregs(struct eusb2_repeater *rptr)
99112
{
100113
int num = rptr->cfg->num_vregs;
@@ -271,6 +284,10 @@ static const struct of_device_id eusb2_repeater_of_match_table[] = {
271284
.compatible = "qcom,pm8550b-eusb2-repeater",
272285
.data = &pm8550b_eusb2_cfg,
273286
},
287+
{
288+
.compatible = "qcom,smb2360-eusb2-repeater",
289+
.data = &smb2360_eusb2_cfg,
290+
},
274291
{ },
275292
};
276293
MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table);

0 commit comments

Comments
 (0)