Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: qcom-qmp-ufs: Add support for configuring PHY in HS G4 mode

Add separate tables_hs_g4 instance to allow the PHY driver to configure the
PHY in HS G4 mode. The individual SoC configs need to supply the Rx, Tx and
PCS register setting in tables_hs_g4 and the UFS driver can request the
Hs G4 mode by calling phy_set_mode_ext() with submode set to UFS_HS_G4.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # Qdrive3/sa8540p-ride
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20230114071009.88102-6-manivannan.sadhasivam@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Manivannan Sadhasivam and committed by
Vinod Koul
baf8d17e 69d2f980

+9
+9
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
··· 20 20 #include <linux/reset.h> 21 21 #include <linux/slab.h> 22 22 23 + #include <ufs/unipro.h> 23 24 #include "phy-qcom-qmp.h" 24 25 #include "phy-qcom-qmp-pcs-ufs-v2.h" 25 26 #include "phy-qcom-qmp-pcs-ufs-v3.h" ··· 555 554 const struct qmp_phy_cfg_tbls tbls; 556 555 /* Additional sequence for HS Series B */ 557 556 const struct qmp_phy_cfg_tbls tbls_hs_b; 557 + /* Additional sequence for HS G4 */ 558 + const struct qmp_phy_cfg_tbls tbls_hs_g4; 558 559 559 560 /* clock ids to be requested */ 560 561 const char * const *clk_list; ··· 591 588 592 589 struct phy *phy; 593 590 u32 mode; 591 + u32 submode; 594 592 }; 595 593 596 594 static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) ··· 858 854 if (qmp->mode == PHY_MODE_UFS_HS_B) 859 855 qmp_ufs_serdes_init(qmp, &cfg->tbls_hs_b); 860 856 qmp_ufs_lanes_init(qmp, &cfg->tbls); 857 + if (qmp->submode == UFS_HS_G4) 858 + qmp_ufs_lanes_init(qmp, &cfg->tbls_hs_g4); 861 859 qmp_ufs_pcs_init(qmp, &cfg->tbls); 860 + if (qmp->submode == UFS_HS_G4) 861 + qmp_ufs_pcs_init(qmp, &cfg->tbls_hs_g4); 862 862 } 863 863 864 864 static int qmp_ufs_com_init(struct qmp_ufs *qmp) ··· 1036 1028 struct qmp_ufs *qmp = phy_get_drvdata(phy); 1037 1029 1038 1030 qmp->mode = mode; 1031 + qmp->submode = submode; 1039 1032 1040 1033 return 0; 1041 1034 }