Skip to content

Commit fd941c7

Browse files
right-0903lumag
authored andcommitted
drm/msm/dsi/phy: fix hardware revision
The hardware revision for TSMC 3nm-based Qualcomm SOCs should be 7.2, this can be confirmed from REG_DSI_7nm_PHY_CMN_REVISION_ID0, the value is 0x27, which means hardware revision is 7.2 No functional change. Fixes: 1337d7e ("drm/msm/dsi/phy: Add support for SM8750") Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/707414/ Link: https://lore.kernel.org/r/20260226122958.22555-2-mitltlatltl@gmail.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
1 parent 7403e87 commit fd941c7

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
#define DSI_PHY_7NM_QUIRK_V4_3 BIT(3)
5252
/* Hardware is V5.2 */
5353
#define DSI_PHY_7NM_QUIRK_V5_2 BIT(4)
54-
/* Hardware is V7.0 */
55-
#define DSI_PHY_7NM_QUIRK_V7_0 BIT(5)
54+
/* Hardware is V7.2 */
55+
#define DSI_PHY_7NM_QUIRK_V7_2 BIT(5)
5656

5757
struct dsi_pll_config {
5858
bool enable_ssc;
@@ -143,7 +143,7 @@ static void dsi_pll_calc_dec_frac(struct dsi_pll_7nm *pll, struct dsi_pll_config
143143

144144
if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1) {
145145
config->pll_clock_inverters = 0x28;
146-
} else if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
146+
} else if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
147147
if (pll_freq < 163000000ULL)
148148
config->pll_clock_inverters = 0xa0;
149149
else if (pll_freq < 175000000ULL)
@@ -284,7 +284,7 @@ static void dsi_pll_config_hzindep_reg(struct dsi_pll_7nm *pll)
284284
}
285285

286286
if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
287-
(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
287+
(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
288288
if (pll->vco_current_rate < 1557000000ULL)
289289
vco_config_1 = 0x08;
290290
else
@@ -699,7 +699,7 @@ static int dsi_7nm_set_usecase(struct msm_dsi_phy *phy)
699699
case MSM_DSI_PHY_MASTER:
700700
pll_7nm->slave = pll_7nm_list[(pll_7nm->phy->id + 1) % DSI_MAX];
701701
/* v7.0: Enable ATB_EN0 and alternate clock output to external phy */
702-
if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)
702+
if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)
703703
writel(0x07, base + REG_DSI_7nm_PHY_CMN_CTRL_5);
704704
break;
705705
case MSM_DSI_PHY_SLAVE:
@@ -987,7 +987,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
987987
/* Request for REFGEN READY */
988988
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3) ||
989989
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
990-
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
990+
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
991991
writel(0x1, phy->base + REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE10);
992992
udelay(500);
993993
}
@@ -1021,7 +1021,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
10211021
lane_ctrl0 = 0x1f;
10221022
}
10231023

1024-
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
1024+
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
10251025
if (phy->cphy_mode) {
10261026
/* TODO: different for second phy */
10271027
vreg_ctrl_0 = 0x57;
@@ -1097,7 +1097,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
10971097

10981098
/* program CMN_CTRL_4 for minor_ver 2 chipsets*/
10991099
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
1100-
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0) ||
1100+
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2) ||
11011101
(readl(base + REG_DSI_7nm_PHY_CMN_REVISION_ID0) & (0xf0)) == 0x20)
11021102
writel(0x04, base + REG_DSI_7nm_PHY_CMN_CTRL_4);
11031103

@@ -1213,7 +1213,7 @@ static void dsi_7nm_phy_disable(struct msm_dsi_phy *phy)
12131213
/* Turn off REFGEN Vote */
12141214
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3) ||
12151215
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
1216-
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
1216+
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
12171217
writel(0x0, base + REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE10);
12181218
wmb();
12191219
/* Delay to ensure HW removes vote before PHY shut down */
@@ -1502,7 +1502,7 @@ const struct msm_dsi_phy_cfg dsi_phy_3nm_8750_cfgs = {
15021502
#endif
15031503
.io_start = { 0xae95000, 0xae97000 },
15041504
.num_dsi_phy = 2,
1505-
.quirks = DSI_PHY_7NM_QUIRK_V7_0,
1505+
.quirks = DSI_PHY_7NM_QUIRK_V7_2,
15061506
};
15071507

15081508
const struct msm_dsi_phy_cfg dsi_phy_3nm_kaanapali_cfgs = {
@@ -1525,5 +1525,5 @@ const struct msm_dsi_phy_cfg dsi_phy_3nm_kaanapali_cfgs = {
15251525
#endif
15261526
.io_start = { 0x9ac1000, 0x9ac4000 },
15271527
.num_dsi_phy = 2,
1528-
.quirks = DSI_PHY_7NM_QUIRK_V7_0,
1528+
.quirks = DSI_PHY_7NM_QUIRK_V7_2,
15291529
};

0 commit comments

Comments
 (0)