Skip to content

Commit 6cd52a2

Browse files
superna9999vinodkoul
authored andcommitted
phy: qcom: qmp-combo: fix Display Port PHY configuration for SM8550
The SM8550 PHY also uses a different offset for the CMN_STATUS reg, use the right one for the v6 Display Port configuration. Fixes: 49742e9 ("phy: qcom-qmp-combo: Add support for SM8550") Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230601-topic-sm8550-upstream-dp-phy-init-fix-v1-1-4e9da9f97991@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 601d062 commit 6cd52a2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,7 @@ static void qmp_v4_configure_dp_tx(struct qmp_combo *qmp)
21512151
static int qmp_v456_configure_dp_phy(struct qmp_combo *qmp,
21522152
unsigned int com_resetm_ctrl_reg,
21532153
unsigned int com_c_ready_status_reg,
2154+
unsigned int com_cmn_status_reg,
21542155
unsigned int dp_phy_status_reg)
21552156
{
21562157
const struct phy_configure_opts_dp *dp_opts = &qmp->dp_opts;
@@ -2207,14 +2208,14 @@ static int qmp_v456_configure_dp_phy(struct qmp_combo *qmp,
22072208
10000))
22082209
return -ETIMEDOUT;
22092210

2210-
if (readl_poll_timeout(qmp->dp_serdes + QSERDES_V4_COM_CMN_STATUS,
2211+
if (readl_poll_timeout(qmp->dp_serdes + com_cmn_status_reg,
22112212
status,
22122213
((status & BIT(0)) > 0),
22132214
500,
22142215
10000))
22152216
return -ETIMEDOUT;
22162217

2217-
if (readl_poll_timeout(qmp->dp_serdes + QSERDES_V4_COM_CMN_STATUS,
2218+
if (readl_poll_timeout(qmp->dp_serdes + com_cmn_status_reg,
22182219
status,
22192220
((status & BIT(1)) > 0),
22202221
500,
@@ -2250,6 +2251,7 @@ static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp)
22502251

22512252
ret = qmp_v456_configure_dp_phy(qmp, QSERDES_V4_COM_RESETSM_CNTRL,
22522253
QSERDES_V4_COM_C_READY_STATUS,
2254+
QSERDES_V4_COM_CMN_STATUS,
22532255
QSERDES_V4_DP_PHY_STATUS);
22542256
if (ret < 0)
22552257
return ret;
@@ -2314,6 +2316,7 @@ static int qmp_v5_configure_dp_phy(struct qmp_combo *qmp)
23142316

23152317
ret = qmp_v456_configure_dp_phy(qmp, QSERDES_V4_COM_RESETSM_CNTRL,
23162318
QSERDES_V4_COM_C_READY_STATUS,
2319+
QSERDES_V4_COM_CMN_STATUS,
23172320
QSERDES_V4_DP_PHY_STATUS);
23182321
if (ret < 0)
23192322
return ret;
@@ -2373,6 +2376,7 @@ static int qmp_v6_configure_dp_phy(struct qmp_combo *qmp)
23732376

23742377
ret = qmp_v456_configure_dp_phy(qmp, QSERDES_V6_COM_RESETSM_CNTRL,
23752378
QSERDES_V6_COM_C_READY_STATUS,
2379+
QSERDES_V6_COM_CMN_STATUS,
23762380
QSERDES_V6_DP_PHY_STATUS);
23772381
if (ret < 0)
23782382
return ret;

0 commit comments

Comments
 (0)