mbox series

[v3,00/17] Fix Qcom UFS PHY clocks

Message ID 20240131-ufs-phy-clock-v3-0-58a49d2f4605@linaro.org (mailing list archive)
Headers show
Series Fix Qcom UFS PHY clocks | expand

Message

Manivannan Sadhasivam Jan. 31, 2024, 7:07 a.m. UTC
Hi,

This series fixes the clocks supplied to QMP PHY IPs in the Qcom SoCs. All
of the Qcom SoCs except MSM8996 require 3 clocks for QMP UFS:

* ref - 19.2MHz reference clock from RPM/RPMh
* ref_aux - Auxiliary reference clock from GCC
* qref - QREF clock from GCC or TCSR (TCSR since SM8550)

MSM8996 only requires 'ref' and 'qref' clocks.

Hence, this series fixes the binding, DT and GCC driver to reflect the
actual clock topology.

Note that the clock topology is not based on any downstream dts sources (even
they are not accurate). But rather based on information from Qcom internal
documentation and brain dump from Can Guo.

Testing
=======

Tested on Qualcomm RB5 development board based on SM8250 SoC. I don't
expect this series to break other SoCs too.

- Mani

Changes in v3:

* Added a patch for SM8650
* Collected review tags
* Rebased on top of next/20231123

Changes in v2:

* Reworded the commit message of patch 1 to justify ABI breakage
* Collected review tags

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Manivannan Sadhasivam (17):
      dt-bindings: phy: qmp-ufs: Fix PHY clocks
      phy: qcom-qmp-ufs: Switch to devm_clk_bulk_get_all() API
      dt-bindings: clock: qcom: Add missing UFS QREF clocks
      clk: qcom: gcc-sc8180x: Add missing UFS QREF clocks
      arm64: dts: qcom: msm8996: Fix UFS PHY clocks
      arm64: dts: qcom: msm8998: Fix UFS PHY clocks
      arm64: dts: qcom: sdm845: Fix UFS PHY clocks
      arm64: dts: qcom: sm6115: Fix UFS PHY clocks
      arm64: dts: qcom: sm6125: Fix UFS PHY clocks
      arm64: dts: qcom: sm6350: Fix UFS PHY clocks
      arm64: dts: qcom: sm8150: Fix UFS PHY clocks
      arm64: dts: qcom: sm8250: Fix UFS PHY clocks
      arm64: dts: qcom: sc8180x: Fix UFS PHY clocks
      arm64: dts: qcom: sc8280xp: Fix UFS PHY clocks
      arm64: dts: qcom: sm8350: Fix UFS PHY clocks
      arm64: dts: qcom: sm8550: Fix UFS PHY clocks
      arm64: dts: qcom: sm8650: Fix UFS PHY clocks

 .../bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml    | 48 ++++++++---------
 arch/arm64/boot/dts/qcom/msm8996.dtsi              |  4 +-
 arch/arm64/boot/dts/qcom/msm8998.dtsi              | 12 ++---
 arch/arm64/boot/dts/qcom/sc8180x.dtsi              |  6 ++-
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi             | 18 ++++---
 arch/arm64/boot/dts/qcom/sdm845.dtsi               |  8 +--
 arch/arm64/boot/dts/qcom/sm6115.dtsi               |  8 ++-
 arch/arm64/boot/dts/qcom/sm6125.dtsi               |  8 +--
 arch/arm64/boot/dts/qcom/sm6350.dtsi               |  8 +--
 arch/arm64/boot/dts/qcom/sm8150.dtsi               |  8 +--
 arch/arm64/boot/dts/qcom/sm8250.dtsi               |  8 +--
 arch/arm64/boot/dts/qcom/sm8350.dtsi               |  8 +--
 arch/arm64/boot/dts/qcom/sm8550.dtsi               |  9 ++--
 arch/arm64/boot/dts/qcom/sm8650.dtsi               |  8 +--
 drivers/clk/qcom/gcc-sc8180x.c                     | 28 ++++++++++
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c            | 63 +++-------------------
 include/dt-bindings/clock/qcom,gcc-sc8180x.h       |  2 +
 17 files changed, 129 insertions(+), 125 deletions(-)
---
base-commit: 06f658aadff0e483ee4f807b0b46c9e5cba62bfa
change-id: 20240131-ufs-phy-clock-7939b9258b3c

Best regards,

Comments

Bjorn Andersson Feb. 7, 2024, 4:46 a.m. UTC | #1
On Wed, 31 Jan 2024 12:37:23 +0530, Manivannan Sadhasivam wrote:
> This series fixes the clocks supplied to QMP PHY IPs in the Qcom SoCs. All
> of the Qcom SoCs except MSM8996 require 3 clocks for QMP UFS:
> 
> * ref - 19.2MHz reference clock from RPM/RPMh
> * ref_aux - Auxiliary reference clock from GCC
> * qref - QREF clock from GCC or TCSR (TCSR since SM8550)
> 
> [...]

Applied, thanks!

[05/17] arm64: dts: qcom: msm8996: Fix UFS PHY clocks
        commit: c83fdb4335cec507d685ba9661ed7c4ccbaf12ff
[06/17] arm64: dts: qcom: msm8998: Fix UFS PHY clocks
        commit: 5e653a7ff4426242f22dd8bc6af7f29e10ee0d68
[07/17] arm64: dts: qcom: sdm845: Fix UFS PHY clocks
        commit: ca8fb2bd2248ae05890c011d691ba5d4a1e7d8d6
[08/17] arm64: dts: qcom: sm6115: Fix UFS PHY clocks
        commit: a820a285ef1b7c7fd94055bbb114c0413c04b96b
[09/17] arm64: dts: qcom: sm6125: Fix UFS PHY clocks
        commit: 3823a877f25baa152e34325818d5140990d6464f
[10/17] arm64: dts: qcom: sm6350: Fix UFS PHY clocks
        commit: 68f9fcba3a0c015d649907805534fe66c9c60865
[11/17] arm64: dts: qcom: sm8150: Fix UFS PHY clocks
        commit: eff7496b72810ca54da8c9c4542bf2aca479dd44
[12/17] arm64: dts: qcom: sm8250: Fix UFS PHY clocks
        commit: 55ee02b10bdd9577b6eabe98ebb383ec4e0674a7
[13/17] arm64: dts: qcom: sc8180x: Fix UFS PHY clocks
        commit: dde771402292ea60f96bfbfae8b130556585ad76
[14/17] arm64: dts: qcom: sc8280xp: Fix UFS PHY clocks
        commit: 1d4ef9644e219202ed89ac42f3e1defebcab9c7d
[15/17] arm64: dts: qcom: sm8350: Fix UFS PHY clocks
        commit: 8edbdefee1c9eb24690d5794556af08f00ecc576
[16/17] arm64: dts: qcom: sm8550: Fix UFS PHY clocks
        commit: 746ae23ad02004fe283e2edb45b7a060bbc36d46
[17/17] arm64: dts: qcom: sm8650: Fix UFS PHY clocks
        commit: 0f9b8054bb4abd7b4686cc66b85f71fec9160136

Best regards,
Vinod Koul Feb. 7, 2024, 2:01 p.m. UTC | #2
On Wed, 31 Jan 2024 12:37:23 +0530, Manivannan Sadhasivam wrote:
> This series fixes the clocks supplied to QMP PHY IPs in the Qcom SoCs. All
> of the Qcom SoCs except MSM8996 require 3 clocks for QMP UFS:
> 
> * ref - 19.2MHz reference clock from RPM/RPMh
> * ref_aux - Auxiliary reference clock from GCC
> * qref - QREF clock from GCC or TCSR (TCSR since SM8550)
> 
> [...]

Applied, thanks!

[01/17] dt-bindings: phy: qmp-ufs: Fix PHY clocks
        commit: b0bcec86f47b44c98a23c31d54dd3963e27761a2
[02/17] phy: qcom-qmp-ufs: Switch to devm_clk_bulk_get_all() API
        commit: 2668cae8b64bf25c4c7a39eb2cb0012c92153c11

Best regards,