Skip to content

Commit 4953416

Browse files
Komal-Bajajvinodkoul
authored andcommitted
phy: qcpm-qmp-usb: Add support for QDU1000/QRU1000
Add QDU1000/QRU1000 specific register layout and table configs. Co-developed-by: Amrit Anand <[email protected]> Signed-off-by: Amrit Anand <[email protected]> Signed-off-by: Komal Bajaj <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent f75a4b3 commit 4953416

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-usb.c

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,29 @@ static const struct qmp_phy_init_tbl msm8996_usb3_pcs_tbl[] = {
337337
QMP_PHY_INIT_CFG(QPHY_V2_PCS_POWER_STATE_CONFIG2, 0x08),
338338
};
339339

340+
static const struct qmp_phy_init_tbl qdu1000_usb3_uniphy_pcs_tbl[] = {
341+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG1, 0xc4),
342+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG2, 0x89),
343+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG3, 0x20),
344+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG6, 0x13),
345+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7),
346+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03),
347+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_RX_SIGDET_LVL, 0xaa),
348+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_PCS_TX_RX_CONFIG, 0x0c),
349+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_CDR_RESET_TIME, 0x0a),
350+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_ALIGN_DETECT_CONFIG1, 0x88),
351+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_ALIGN_DETECT_CONFIG2, 0x13),
352+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_EQ_CONFIG1, 0x4b),
353+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_EQ_CONFIG5, 0x10),
354+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_REFGEN_REQ_CONFIG1, 0x21),
355+
};
356+
357+
static const struct qmp_phy_init_tbl qdu1000_usb3_uniphy_pcs_usb_tbl[] = {
358+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07),
359+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8),
360+
QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_POWER_STATE_CONFIG1, 0x6f),
361+
};
362+
340363
static const struct qmp_phy_init_tbl qmp_v3_usb3_uniphy_serdes_tbl[] = {
341364
QMP_PHY_INIT_CFG(QSERDES_V3_COM_PLL_IVCO, 0x07),
342365
QMP_PHY_INIT_CFG(QSERDES_V3_COM_SYSCLK_EN_SEL, 0x14),
@@ -1400,6 +1423,27 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
14001423
.regs = qmp_v2_usb3phy_regs_layout,
14011424
};
14021425

1426+
static const struct qmp_phy_cfg qdu1000_usb3_uniphy_cfg = {
1427+
.offsets = &qmp_usb_offsets_v5,
1428+
1429+
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl,
1430+
.serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
1431+
.tx_tbl = sm8350_usb3_uniphy_tx_tbl,
1432+
.tx_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_tx_tbl),
1433+
.rx_tbl = sm8350_usb3_uniphy_rx_tbl,
1434+
.rx_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_rx_tbl),
1435+
.pcs_tbl = qdu1000_usb3_uniphy_pcs_tbl,
1436+
.pcs_tbl_num = ARRAY_SIZE(qdu1000_usb3_uniphy_pcs_tbl),
1437+
.pcs_usb_tbl = qdu1000_usb3_uniphy_pcs_usb_tbl,
1438+
.pcs_usb_tbl_num = ARRAY_SIZE(qdu1000_usb3_uniphy_pcs_usb_tbl),
1439+
.vreg_list = qmp_phy_vreg_l,
1440+
.num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
1441+
.regs = qmp_v4_usb3phy_regs_layout,
1442+
.pcs_usb_offset = 0x1000,
1443+
1444+
.has_pwrdn_delay = true,
1445+
};
1446+
14031447
static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = {
14041448
.offsets = &qmp_usb_offsets_v5,
14051449

@@ -2202,6 +2246,9 @@ static const struct of_device_id qmp_usb_of_match_table[] = {
22022246
}, {
22032247
.compatible = "qcom,msm8996-qmp-usb3-phy",
22042248
.data = &msm8996_usb3phy_cfg,
2249+
}, {
2250+
.compatible = "qcom,qdu1000-qmp-usb3-uni-phy",
2251+
.data = &qdu1000_usb3_uniphy_cfg,
22052252
}, {
22062253
.compatible = "qcom,sa8775p-qmp-usb3-uni-phy",
22072254
.data = &sa8775p_usb3_uniphy_cfg,

0 commit comments

Comments
 (0)