Skip to content

Commit d784552

Browse files
Nitin Rawatvinodkoul
authored andcommitted
phy: qcom-qmp-ufs: check for mode type for phy setting
Generally all target supports Rate B but for very few like SM8550, two sets of UFS PHY settings are provided, one set is to support HS-G5 Rate A and another set is to support HS-G4 and lower gears with Rate B. Commit b02cc9a("phy: qcom-qmp-ufs: Add PHY Configuration support for sm8750") apply Rate B setting for SM8550 gear 5 without checking for mode value (Rate A or Rate B) from Controller driver which caused issue as SM8550 support rate A for Gear 5. Fix this by adding mode check before applying Rat B phy setting. Fixes: b02cc9a ("phy: qcom-qmp-ufs: Add PHY Configuration support for sm8750") Reported-by: Neil Armstrong <neil.armstrong@linaro.org> Closes: https://lore.kernel.org/all/430ed11c-0490-45be-897b-27cad9682371@quicinc.com/ Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com> Link: https://lore.kernel.org/r/20250407121008.22230-1-quic_nitirawa@quicinc.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent b47158f commit d784552

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,8 @@ static void qmp_ufs_init_registers(struct qmp_ufs *qmp, const struct qmp_phy_cfg
17541754
qmp_ufs_init_all(qmp, &cfg->tbls_hs_overlay[i]);
17551755
}
17561756

1757-
qmp_ufs_init_all(qmp, &cfg->tbls_hs_b);
1757+
if (qmp->mode == PHY_MODE_UFS_HS_B)
1758+
qmp_ufs_init_all(qmp, &cfg->tbls_hs_b);
17581759
}
17591760

17601761
static int qmp_ufs_com_init(struct qmp_ufs *qmp)

0 commit comments

Comments
 (0)