devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] phy: qcom: qmp-usbc: properly handle the clamping register
@ 2024-01-17 14:04 Dmitry Baryshkov
  2024-01-17 14:04 ` [PATCH v2 1/6] dt-bindings: mfd: qcom,tcsr: Add compatibles for QCM2290 and SM6115 Dmitry Baryshkov
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2024-01-17 14:04 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Jeffrey Hugo
  Cc: linux-arm-msm, devicetree, linux-phy, Krzysztof Kozlowski

The USB-C PHY on the MSM8998, QCM2290, SM6115 and several other platforms
doesn't have built-in PCS_MISC_CLAMP_ENABLE register. Instead clamping
is handled separately via the register in the TCSR space. Make the new
phy-qcom-qmp-usbc driver correctly handle the clamp register.

For backwards compatibility the driver treats these registers as
optional. They are only required for the PHY suspend/resume. However the
schema declares corresponding property as required, it should be present
on all relevant platforms.

At this point I'm not sure whether having a single TCSR-based register
will be enough or whether we will have to add more TCSR registers in
future. In order to avoid repeating TCSR handle (and having multiple
instances of TCSR regmap in the driver) use qcom,tcsr-reg property
rather than someting more exact like qcom,vls-clamp-reg.

Dependecies: PHY-related changes of [1]

Note for the backporters: if the patch is packported to the kernel
before the phy-qocm-qmp-usbc split, the phy-qcom-qmp-usb driver needs to
handle both PCS_MISC_CLAMP_ENABLE and VLS_CLAMP registers as optional.

[1] https://lore.kernel.org/linux-arm-msm/20240113-pmi632-typec-v2-0-182d9aa0a5b3@linaro.org/

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Changes in v2:
- Fixed the TCSR region definitions (Konrad, Bjorn)
- Link to v1: https://lore.kernel.org/r/20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org

---
Dmitry Baryshkov (6):
      dt-bindings: mfd: qcom,tcsr: Add compatibles for QCM2290 and SM6115
      dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: add TCSR registers
      phy: qcom: qmp-usbc: handle CLAMP register in a correct way
      arm64: dts: qcom: msm8998: declare VLS CLAMP register for USB3 PHY
      arm64: dts: qcom: qcm2290: declare VLS CLAMP register for USB3 PHY
      arm64: dts: qcom: sm6115: declare VLS CLAMP register for USB3 PHY

 .../devicetree/bindings/mfd/qcom,tcsr.yaml         |  2 +
 .../bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml    | 11 +++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi              |  7 ++++
 arch/arm64/boot/dts/qcom/qcm2290.dtsi              |  7 ++++
 arch/arm64/boot/dts/qcom/sm6115.dtsi               |  7 ++++
 drivers/phy/qualcomm/phy-qcom-qmp-usbc.c           | 48 +++++++++++++++++-----
 6 files changed, 71 insertions(+), 11 deletions(-)
---
base-commit: 3cbd23fa6ef85801574a4b0d3f81fb365e06b2d2
change-id: 20240116-usbc-phy-vls-clamp-10189efdcf12

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-07  4:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 14:04 [PATCH v2 0/6] phy: qcom: qmp-usbc: properly handle the clamping register Dmitry Baryshkov
2024-01-17 14:04 ` [PATCH v2 1/6] dt-bindings: mfd: qcom,tcsr: Add compatibles for QCM2290 and SM6115 Dmitry Baryshkov
2024-01-17 14:04 ` [PATCH v2 2/6] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: add TCSR registers Dmitry Baryshkov
2024-01-17 14:04 ` [PATCH v2 3/6] phy: qcom: qmp-usbc: handle CLAMP register in a correct way Dmitry Baryshkov
2024-01-18 11:23   ` Konrad Dybcio
2024-01-26 17:30   ` Jeffrey Hugo
2024-01-17 14:04 ` [PATCH v2 4/6] arm64: dts: qcom: msm8998: declare VLS CLAMP register for USB3 PHY Dmitry Baryshkov
2024-01-18 11:22   ` Konrad Dybcio
2024-01-26 17:34   ` Jeffrey Hugo
2024-01-17 14:04 ` [PATCH v2 5/6] arm64: dts: qcom: qcm2290: " Dmitry Baryshkov
2024-01-18 11:22   ` Konrad Dybcio
2024-01-17 14:04 ` [PATCH v2 6/6] arm64: dts: qcom: sm6115: " Dmitry Baryshkov
2024-01-18 11:22   ` Konrad Dybcio
2024-01-23 14:20 ` (subset) [PATCH v2 0/6] phy: qcom: qmp-usbc: properly handle the clamping register Vinod Koul
2024-02-07  4:46 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).