Skip to content

Commit 3f2ec77

Browse files
Kuogee Hsiehvinodkoul
authored andcommitted
phy: qcom-qmp: add hbr3_hbr2 voltage and premphasis swing table
Add hbr3_hbr2 voltage and premphasis swing table to support HBR3 link rate. Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/1615914761-12300-1-git-send-email-khsieh@codeaurora.org Fixes: 52e013d ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 446c200 commit 3f2ec77

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3375,6 +3375,20 @@ static void qcom_qmp_phy_dp_aux_init(struct qmp_phy *qphy)
33753375
qphy->pcs + QSERDES_V3_DP_PHY_AUX_INTERRUPT_MASK);
33763376
}
33773377

3378+
static const u8 qmp_dp_v3_pre_emphasis_hbr3_hbr2[4][4] = {
3379+
{ 0x00, 0x0c, 0x15, 0x1a },
3380+
{ 0x02, 0x0e, 0x16, 0xff },
3381+
{ 0x02, 0x11, 0xff, 0xff },
3382+
{ 0x04, 0xff, 0xff, 0xff }
3383+
};
3384+
3385+
static const u8 qmp_dp_v3_voltage_swing_hbr3_hbr2[4][4] = {
3386+
{ 0x02, 0x12, 0x16, 0x1a },
3387+
{ 0x09, 0x19, 0x1f, 0xff },
3388+
{ 0x10, 0x1f, 0xff, 0xff },
3389+
{ 0x1f, 0xff, 0xff, 0xff }
3390+
};
3391+
33783392
static const u8 qmp_dp_v3_pre_emphasis_hbr_rbr[4][4] = {
33793393
{ 0x00, 0x0c, 0x14, 0x19 },
33803394
{ 0x00, 0x0b, 0x12, 0xff },
@@ -3410,8 +3424,13 @@ static void qcom_qmp_phy_configure_dp_tx(struct qmp_phy *qphy)
34103424
drvr_en = 0x10;
34113425
}
34123426

3413-
voltage_swing_cfg = qmp_dp_v3_voltage_swing_hbr_rbr[v_level][p_level];
3414-
pre_emphasis_cfg = qmp_dp_v3_pre_emphasis_hbr_rbr[v_level][p_level];
3427+
if (dp_opts->link_rate <= 2700) {
3428+
voltage_swing_cfg = qmp_dp_v3_voltage_swing_hbr_rbr[v_level][p_level];
3429+
pre_emphasis_cfg = qmp_dp_v3_pre_emphasis_hbr_rbr[v_level][p_level];
3430+
} else {
3431+
voltage_swing_cfg = qmp_dp_v3_voltage_swing_hbr3_hbr2[v_level][p_level];
3432+
pre_emphasis_cfg = qmp_dp_v3_pre_emphasis_hbr3_hbr2[v_level][p_level];
3433+
}
34153434

34163435
/* TODO: Move check to config check */
34173436
if (voltage_swing_cfg == 0xFF && pre_emphasis_cfg == 0xFF)

0 commit comments

Comments
 (0)