* [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150
@ 2023-03-11 23:17 Danila Tikhonov
2023-03-11 23:17 ` [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Danila Tikhonov @ 2023-03-11 23:17 UTC (permalink / raw)
To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt,
krzysztof.kozlowski+dt
Cc: dmitry.baryshkov, linux-arm-msm, linux-phy, devicetree,
linux-kernel, davidwronek, Danila Tikhonov
This series adds UFS QMP support for Qualcomm SM7150 SoC.
Changes in v2:
- Switch to new bindings (qcom,sc8280xp-qmp-ufs-phy.yaml)
- Fix compilation error
- Switch to 0xff instead of 0xFF
- Add offsets
- Set no_pcs_sw_reset to true
- Add Dmitry Reviewed-by on patch 2
- Link to v1: https://lore.kernel.org/all/20230309185049.170878-1-danila@jiaxyga.com/
David Wronek (2):
dt-bindings: phy: Add QMP UFS PHY comptible for SM7150
phy: qcom-qmp-ufs: Add SM7150 support
.../phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 1 +
drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 61 +++++++++++++++++++
2 files changed, 62 insertions(+)
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible for SM7150 2023-03-11 23:17 [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Danila Tikhonov @ 2023-03-11 23:17 ` Danila Tikhonov 2023-03-12 11:18 ` Krzysztof Kozlowski 2023-03-11 23:17 ` [PATCH v2 2/2] phy: qcom-qmp-ufs: Add SM7150 support Danila Tikhonov 2023-03-31 13:56 ` [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Vinod Koul 2 siblings, 1 reply; 5+ messages in thread From: Danila Tikhonov @ 2023-03-11 23:17 UTC (permalink / raw) To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt, krzysztof.kozlowski+dt Cc: dmitry.baryshkov, linux-arm-msm, linux-phy, devicetree, linux-kernel, davidwronek, Danila Tikhonov From: David Wronek <davidwronek@gmail.com> Document the QMP UFS PHY compatible for SM7150. Signed-off-by: David Wronek <davidwronek@gmail.com> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> --- .../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml index 64ed331880f6..cd0fbbd3593d 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml @@ -18,6 +18,7 @@ properties: enum: - qcom,sc8280xp-qmp-ufs-phy - qcom,sm6125-qmp-ufs-phy + - qcom,sm7150-qmp-ufs-phy - qcom,sm8550-qmp-ufs-phy reg: -- 2.39.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible for SM7150 2023-03-11 23:17 ` [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov @ 2023-03-12 11:18 ` Krzysztof Kozlowski 0 siblings, 0 replies; 5+ messages in thread From: Krzysztof Kozlowski @ 2023-03-12 11:18 UTC (permalink / raw) To: Danila Tikhonov, agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt, krzysztof.kozlowski+dt Cc: dmitry.baryshkov, linux-arm-msm, linux-phy, devicetree, linux-kernel, davidwronek On 12/03/2023 00:17, Danila Tikhonov wrote: > From: David Wronek <davidwronek@gmail.com> > > Document the QMP UFS PHY compatible for SM7150. > > Signed-off-by: David Wronek <davidwronek@gmail.com> > Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] phy: qcom-qmp-ufs: Add SM7150 support 2023-03-11 23:17 [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Danila Tikhonov 2023-03-11 23:17 ` [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov @ 2023-03-11 23:17 ` Danila Tikhonov 2023-03-31 13:56 ` [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Vinod Koul 2 siblings, 0 replies; 5+ messages in thread From: Danila Tikhonov @ 2023-03-11 23:17 UTC (permalink / raw) To: agross, andersson, konrad.dybcio, vkoul, kishon, robh+dt, krzysztof.kozlowski+dt Cc: dmitry.baryshkov, linux-arm-msm, linux-phy, devicetree, linux-kernel, davidwronek, Danila Tikhonov From: David Wronek <davidwronek@gmail.com> Add the tables and constants for init sequences for UFS QMP phy found in SM7150 SoC. Signed-off-by: David Wronek <davidwronek@gmail.com> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 61 +++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 994ddd5d4a81..d58822049211 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -349,6 +349,36 @@ static const struct qmp_phy_init_tbl sdm845_ufsphy_pcs[] = { QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_MULTI_LANE_CTRL1, 0x02), }; +static const struct qmp_phy_init_tbl sm7150_ufsphy_rx[] = { + QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_LVL, 0x24), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_CNTRL, 0x0f), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_DEGLITCH_CNTRL, 0x1e), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_INTERFACE_MODE, 0x40), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_FASTLOCK_FO_GAIN, 0x0b), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_TERM_BW, 0x5b), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL2, 0x06), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL3, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL4, 0x1b), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SVS_SO_GAIN_HALF, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SVS_SO_GAIN_QUARTER, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SVS_SO_GAIN, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SO_SATURATION_AND_ENABLE, 0x5b), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_PI_CONTROLS, 0x81), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_FASTLOCK_COUNT_LOW, 0x80), + QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_MODE_00, 0x59), +}; + +static const struct qmp_phy_init_tbl sm7150_ufsphy_pcs[] = { + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_SIGDET_CTRL2, 0x6f), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_TX_LARGE_AMP_DRV_LVL, 0x0f), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_TX_SMALL_AMP_DRV_LVL, 0x02), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_SYM_RESYNC_CTRL, 0x03), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_TX_MID_TERM_CTRL1, 0x43), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_SIGDET_CTRL1, 0x0f), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_RX_MIN_HIBERN8_TIME, 0xff), + QMP_PHY_INIT_CFG(QPHY_V3_PCS_UFS_MULTI_LANE_CTRL1, 0x02), +}; + static const struct qmp_phy_init_tbl sm8150_ufsphy_serdes[] = { QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_EN_SEL, 0xd9), QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_SEL, 0x11), @@ -911,6 +941,34 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = { .no_pcs_sw_reset = true, }; +static const struct qmp_phy_cfg sm7150_ufsphy_cfg = { + .lanes = 1, + + .offsets = &qmp_ufs_offsets, + + .tbls = { + .serdes = sdm845_ufsphy_serdes, + .serdes_num = ARRAY_SIZE(sdm845_ufsphy_serdes), + .tx = sdm845_ufsphy_tx, + .tx_num = ARRAY_SIZE(sdm845_ufsphy_tx), + .rx = sm7150_ufsphy_rx, + .rx_num = ARRAY_SIZE(sm7150_ufsphy_rx), + .pcs = sm7150_ufsphy_pcs, + .pcs_num = ARRAY_SIZE(sm7150_ufsphy_pcs), + }, + .tbls_hs_b = { + .serdes = sdm845_ufsphy_hs_b_serdes, + .serdes_num = ARRAY_SIZE(sdm845_ufsphy_hs_b_serdes), + }, + .clk_list = sdm845_ufs_phy_clk_l, + .num_clks = ARRAY_SIZE(sdm845_ufs_phy_clk_l), + .vreg_list = qmp_phy_vreg_l, + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), + .regs = ufsphy_v3_regs_layout, + + .no_pcs_sw_reset = true, +}; + static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { .lanes = 2, @@ -1560,6 +1618,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = { }, { .compatible = "qcom,sm6350-qmp-ufs-phy", .data = &sdm845_ufsphy_cfg, + }, { + .compatible = "qcom,sm7150-qmp-ufs-phy", + .data = &sm7150_ufsphy_cfg, }, { .compatible = "qcom,sm8150-qmp-ufs-phy", .data = &sm8150_ufsphy_cfg, -- 2.39.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 2023-03-11 23:17 [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Danila Tikhonov 2023-03-11 23:17 ` [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov 2023-03-11 23:17 ` [PATCH v2 2/2] phy: qcom-qmp-ufs: Add SM7150 support Danila Tikhonov @ 2023-03-31 13:56 ` Vinod Koul 2 siblings, 0 replies; 5+ messages in thread From: Vinod Koul @ 2023-03-31 13:56 UTC (permalink / raw) To: Danila Tikhonov Cc: agross, andersson, konrad.dybcio, kishon, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov, linux-arm-msm, linux-phy, devicetree, linux-kernel, davidwronek On 12-03-23, 02:17, Danila Tikhonov wrote: > This series adds UFS QMP support for Qualcomm SM7150 SoC. > > Changes in v2: > - Switch to new bindings (qcom,sc8280xp-qmp-ufs-phy.yaml) > - Fix compilation error > - Switch to 0xff instead of 0xFF > - Add offsets > - Set no_pcs_sw_reset to true > - Add Dmitry Reviewed-by on patch 2 > - Link to v1: https://lore.kernel.org/all/20230309185049.170878-1-danila@jiaxyga.com/ Applied, thanks -- ~Vinod ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-31 13:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-11 23:17 [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Danila Tikhonov 2023-03-11 23:17 ` [PATCH v2 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov 2023-03-12 11:18 ` Krzysztof Kozlowski 2023-03-11 23:17 ` [PATCH v2 2/2] phy: qcom-qmp-ufs: Add SM7150 support Danila Tikhonov 2023-03-31 13:56 ` [PATCH v2 0/2] phy: qcom-qmp-ufs: Add support for SM7150 Vinod Koul
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox