* [PATCH 0/2] phy: qcom-qmp-ufs: Add support for SM8475 @ 2024-03-27 18:06 Danila Tikhonov 2024-03-27 18:06 ` [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov 2024-03-27 18:06 ` [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support Danila Tikhonov 0 siblings, 2 replies; 9+ messages in thread From: Danila Tikhonov @ 2024-03-27 18:06 UTC (permalink / raw) To: andersson, konrad.dybcio, vkoul, kishon, robh, krzysztof.kozlowski+dt, conor+dt Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Danila Tikhonov This series adds UFS QMP support for Qualcomm SM8475 SoC. To: Bjorn Andersson <andersson@kernel.org> To: Konrad Dybcio <konrad.dybcio@linaro.org> To: Vinod Koul <vkoul@kernel.org> To: Kishon Vijay Abraham I <kishon@kernel.org> To: Rob Herring <robh@kernel.org> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> To: Conor Dooley <conor+dt@kernel.org> Cc: linux-arm-msm@vger.kernel.org Cc: linux-phy@lists.infradead.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> Danila Tikhonov (2): dt-bindings: phy: Add QMP UFS PHY comptible for SM8475 phy: qcom-qmp-ufs: Add SM8475 support .../phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 2 + drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 71 +++++++++++++++++++ 2 files changed, 73 insertions(+) -- 2.44.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible for SM8475 2024-03-27 18:06 [PATCH 0/2] phy: qcom-qmp-ufs: Add support for SM8475 Danila Tikhonov @ 2024-03-27 18:06 ` Danila Tikhonov 2024-03-28 8:42 ` Krzysztof Kozlowski 2024-03-27 18:06 ` [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support Danila Tikhonov 1 sibling, 1 reply; 9+ messages in thread From: Danila Tikhonov @ 2024-03-27 18:06 UTC (permalink / raw) To: andersson, konrad.dybcio, vkoul, kishon, robh, krzysztof.kozlowski+dt, conor+dt Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Danila Tikhonov Document the QMP UFS PHY compatible for SM8475. Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> --- .../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) 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 91a6cc38ff7f..1e8c3abb09a4 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml @@ -32,6 +32,7 @@ properties: - qcom,sm8250-qmp-ufs-phy - qcom,sm8350-qmp-ufs-phy - qcom,sm8450-qmp-ufs-phy + - qcom,sm8475-qmp-ufs-phy - qcom,sm8550-qmp-ufs-phy - qcom,sm8650-qmp-ufs-phy @@ -98,6 +99,7 @@ allOf: - qcom,sm8250-qmp-ufs-phy - qcom,sm8350-qmp-ufs-phy - qcom,sm8450-qmp-ufs-phy + - qcom,sm8475-qmp-ufs-phy - qcom,sm8550-qmp-ufs-phy - qcom,sm8650-qmp-ufs-phy then: -- 2.44.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible for SM8475 2024-03-27 18:06 ` [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov @ 2024-03-28 8:42 ` Krzysztof Kozlowski 2024-03-28 18:02 ` Danila Tikhonov 0 siblings, 1 reply; 9+ messages in thread From: Krzysztof Kozlowski @ 2024-03-28 8:42 UTC (permalink / raw) To: Danila Tikhonov, andersson, konrad.dybcio, vkoul, kishon, robh, krzysztof.kozlowski+dt, conor+dt Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel On 27/03/2024 19:06, Danila Tikhonov wrote: > Document the QMP UFS PHY compatible for SM8475. > > Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> > --- > .../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 2 ++ > 1 file changed, 2 insertions(+) > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> (not reviewed, please provide link to DTS) Best regards, Krzysztof ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible for SM8475 2024-03-28 8:42 ` Krzysztof Kozlowski @ 2024-03-28 18:02 ` Danila Tikhonov 2024-03-28 18:05 ` Krzysztof Kozlowski 0 siblings, 1 reply; 9+ messages in thread From: Danila Tikhonov @ 2024-03-28 18:02 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: krzysztof.kozlowski+dt, andersson, konrad.dybcio, vkoul, kishon, robh, conor+dt, linux-arm-msm, linux-phy, devicetree, linux-kernel, danila On 3/28/24 11:42, Krzysztof Kozlowski wrote: > On 27/03/2024 19:06, Danila Tikhonov wrote: >> Document the QMP UFS PHY compatible for SM8475. >> >> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> >> --- >> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 2 ++ >> 1 file changed, 2 insertions(+) >> > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > (not reviewed, please provide link to DTS) > > Best regards, > Krzysztof > Yes, sure. SM8475 and Nothing Phone 2 (nothing-pong) on which I tested: https://github.com/mainlining/linux/blob/danila/sm8475-test/arch/arm64/boot/dts/qcom/sm8475.dtsi https://github.com/mainlining/linux/blob/danila/sm8475-test/arch/arm64/boot/dts/qcom/sm8475-nothing-pong.dts --- Best wishes Danila ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible for SM8475 2024-03-28 18:02 ` Danila Tikhonov @ 2024-03-28 18:05 ` Krzysztof Kozlowski 0 siblings, 0 replies; 9+ messages in thread From: Krzysztof Kozlowski @ 2024-03-28 18:05 UTC (permalink / raw) To: Danila Tikhonov Cc: krzysztof.kozlowski+dt, andersson, konrad.dybcio, vkoul, kishon, robh, conor+dt, linux-arm-msm, linux-phy, devicetree, linux-kernel On 28/03/2024 19:02, Danila Tikhonov wrote: >>> >> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> >> (not reviewed, please provide link to DTS) >> >> Best regards, >> Krzysztof >> > Yes, sure. > SM8475 and Nothing Phone 2 (nothing-pong) on which I tested: > https://github.com/mainlining/linux/blob/danila/sm8475-test/arch/arm64/boot/dts/qcom/sm8475.dtsi > https://github.com/mainlining/linux/blob/danila/sm8475-test/arch/arm64/boot/dts/qcom/sm8475-nothing-pong.dts > Thanks, looks good and in match with the binding, so let's make it: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support 2024-03-27 18:06 [PATCH 0/2] phy: qcom-qmp-ufs: Add support for SM8475 Danila Tikhonov 2024-03-27 18:06 ` [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov @ 2024-03-27 18:06 ` Danila Tikhonov 2024-03-27 21:38 ` Konrad Dybcio 1 sibling, 1 reply; 9+ messages in thread From: Danila Tikhonov @ 2024-03-27 18:06 UTC (permalink / raw) To: andersson, konrad.dybcio, vkoul, kishon, robh, krzysztof.kozlowski+dt, conor+dt Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Danila Tikhonov Add the tables and constants for init sequences for UFS QMP phy found in SM8475 SoC. Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 71 +++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 590432d581f9..ddc0def0ae61 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -722,6 +722,38 @@ static const struct qmp_phy_init_tbl sm8350_ufsphy_g4_pcs[] = { QMP_PHY_INIT_CFG(QPHY_V5_PCS_UFS_BIST_FIXED_PAT_CTRL, 0x0a), }; +static const struct qmp_phy_init_tbl sm8475_ufsphy_serdes[] = { + QMP_PHY_INIT_CFG(QSERDES_V6_COM_SYSCLK_EN_SEL, 0xd9), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CMN_CONFIG_1, 0x16), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_HSCLK_SEL_1, 0x11), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_HSCLK_HS_SWITCH_SEL_1, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP_EN, 0x01), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE_INITVAL2, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DEC_START_MODE0, 0x82), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_RCTRL_MODE0, 0x18), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_CCTRL_MODE0, 0x18), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP1_MODE0, 0xff), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP2_MODE0, 0x0c), +}; + +static const struct qmp_phy_init_tbl sm8475_ufsphy_g4_serdes[] = { + QMP_PHY_INIT_CFG(QSERDES_V6_COM_VCO_TUNE_MAP, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_IVCO, 0x0f), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CP_CTRL_MODE0, 0x14), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_DEC_START_MODE1, 0x98), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_CP_CTRL_MODE1, 0x14), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_RCTRL_MODE1, 0x18), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_PLL_CCTRL_MODE1, 0x18), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP1_MODE1, 0x32), + QMP_PHY_INIT_CFG(QSERDES_V6_COM_LOCK_CMP2_MODE1, 0x0f), +}; + +static const struct qmp_phy_init_tbl sm8475_ufsphy_g4_pcs[] = { + QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_PLL_CNTL, 0x0b), + QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_TX_HSGEAR_CAPABILITY, 0x04), + QMP_PHY_INIT_CFG(QPHY_V6_PCS_UFS_RX_HSGEAR_CAPABILITY, 0x04), +}; + static const struct qmp_phy_init_tbl sm8550_ufsphy_serdes[] = { QMP_PHY_INIT_CFG(QSERDES_V6_COM_SYSCLK_EN_SEL, 0xd9), QMP_PHY_INIT_CFG(QSERDES_V6_COM_CMN_CONFIG_1, 0x16), @@ -1346,6 +1378,42 @@ static const struct qmp_phy_cfg sm8450_ufsphy_cfg = { .regs = ufsphy_v5_regs_layout, }; +static const struct qmp_phy_cfg sm8475_ufsphy_cfg = { + .lanes = 2, + + .offsets = &qmp_ufs_offsets_v6, + .max_supported_gear = UFS_HS_G4, + + .tbls = { + .serdes = sm8475_ufsphy_serdes, + .serdes_num = ARRAY_SIZE(sm8475_ufsphy_serdes), + .tx = sm8550_ufsphy_tx, + .tx_num = ARRAY_SIZE(sm8550_ufsphy_tx), + .rx = sm8550_ufsphy_rx, + .rx_num = ARRAY_SIZE(sm8550_ufsphy_rx), + .pcs = sm8550_ufsphy_pcs, + .pcs_num = ARRAY_SIZE(sm8550_ufsphy_pcs), + }, + .tbls_hs_b = { + .serdes = sm8550_ufsphy_hs_b_serdes, + .serdes_num = ARRAY_SIZE(sm8550_ufsphy_hs_b_serdes), + }, + .tbls_hs_overlay[0] = { + .serdes = sm8475_ufsphy_g4_serdes, + .serdes_num = ARRAY_SIZE(sm8475_ufsphy_g4_serdes), + .tx = sm8550_ufsphy_g4_tx, + .tx_num = ARRAY_SIZE(sm8550_ufsphy_g4_tx), + .rx = sm8550_ufsphy_g4_rx, + .rx_num = ARRAY_SIZE(sm8550_ufsphy_g4_rx), + .pcs = sm8475_ufsphy_g4_pcs, + .pcs_num = ARRAY_SIZE(sm8475_ufsphy_g4_pcs), + .max_gear = UFS_HS_G4, + }, + .vreg_list = qmp_phy_vreg_l, + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), + .regs = ufsphy_v6_regs_layout, +}; + static const struct qmp_phy_cfg sm8550_ufsphy_cfg = { .lanes = 2, @@ -1941,6 +2009,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = { }, { .compatible = "qcom,sm8450-qmp-ufs-phy", .data = &sm8450_ufsphy_cfg, + }, { + .compatible = "qcom,sm8475-qmp-ufs-phy", + .data = &sm8475_ufsphy_cfg, }, { .compatible = "qcom,sm8550-qmp-ufs-phy", .data = &sm8550_ufsphy_cfg, -- 2.44.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support 2024-03-27 18:06 ` [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support Danila Tikhonov @ 2024-03-27 21:38 ` Konrad Dybcio 2024-03-28 7:45 ` Vinod Koul 0 siblings, 1 reply; 9+ messages in thread From: Konrad Dybcio @ 2024-03-27 21:38 UTC (permalink / raw) To: Danila Tikhonov, andersson, vkoul, kishon, robh, krzysztof.kozlowski+dt, conor+dt Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel On 27.03.2024 7:06 PM, Danila Tikhonov wrote: > Add the tables and constants for init sequences for UFS QMP phy found in > SM8475 SoC. > > Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> > --- Worth mentioning that SM8475 is a respin of SM8450 on a different process node, which probably forced some electrical changes. Konrad ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support 2024-03-27 21:38 ` Konrad Dybcio @ 2024-03-28 7:45 ` Vinod Koul 2024-03-29 11:23 ` Konrad Dybcio 0 siblings, 1 reply; 9+ messages in thread From: Vinod Koul @ 2024-03-28 7:45 UTC (permalink / raw) To: Konrad Dybcio Cc: Danila Tikhonov, andersson, kishon, robh, krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, linux-phy, devicetree, linux-kernel On 27-03-24, 22:38, Konrad Dybcio wrote: > On 27.03.2024 7:06 PM, Danila Tikhonov wrote: > > Add the tables and constants for init sequences for UFS QMP phy found in > > SM8475 SoC. > > > > Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> > > --- > > Worth mentioning that SM8475 is a respin of SM8450 on a different > process node, which probably forced some electrical changes. should the tables be resued from 8450 instead of 8550 as in this patch? -- ~Vinod ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support 2024-03-28 7:45 ` Vinod Koul @ 2024-03-29 11:23 ` Konrad Dybcio 0 siblings, 0 replies; 9+ messages in thread From: Konrad Dybcio @ 2024-03-29 11:23 UTC (permalink / raw) To: Vinod Koul Cc: Danila Tikhonov, andersson, kishon, robh, krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, linux-phy, devicetree, linux-kernel On 28.03.2024 8:45 AM, Vinod Koul wrote: > On 27-03-24, 22:38, Konrad Dybcio wrote: >> On 27.03.2024 7:06 PM, Danila Tikhonov wrote: >>> Add the tables and constants for init sequences for UFS QMP phy found in >>> SM8475 SoC. >>> >>> Signed-off-by: Danila Tikhonov <danila@jiaxyga.com> >>> --- >> >> Worth mentioning that SM8475 is a respin of SM8450 on a different >> process node, which probably forced some electrical changes. > > should the tables be resued from 8450 instead of 8550 as in this patch? No, and the reason why is my message above Konrad ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-03-29 11:23 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-27 18:06 [PATCH 0/2] phy: qcom-qmp-ufs: Add support for SM8475 Danila Tikhonov 2024-03-27 18:06 ` [PATCH 1/2] dt-bindings: phy: Add QMP UFS PHY comptible " Danila Tikhonov 2024-03-28 8:42 ` Krzysztof Kozlowski 2024-03-28 18:02 ` Danila Tikhonov 2024-03-28 18:05 ` Krzysztof Kozlowski 2024-03-27 18:06 ` [PATCH 2/2] phy: qcom-qmp-ufs: Add SM8475 support Danila Tikhonov 2024-03-27 21:38 ` Konrad Dybcio 2024-03-28 7:45 ` Vinod Koul 2024-03-29 11:23 ` Konrad Dybcio
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox