[PATCH v3 0/3] phy: qcom-qmp-pcie: Add support to keep refclk always on

From: Krishna chaitanya chundru
Date: Mon Nov 27 2023 - 07:14:37 EST


This series adds support to provide refclk to endpoint even in low
power states.

Due to some platform specific issues with CLKREQ signal, it is not being
propagated to the host and as host doesn't know the clkreq signal host is
not sending refclk. Due to this endpoint is seeing linkdown and going
to bad state.
To avoid those ref clk should be provided always to the endpoint. The
issue is coming only when ep intiates the L1.1 or L1.2 exit and clkreq
is not being propagated properly to the host.

Signed-off-by: Krishna chaitanya chundru <quic_krichai@xxxxxxxxxxx>
---
Changes in v3:
- Updated the dt-binding description as suggested by Dmitry.
- Added the new macros for v5_20 and v6_20 as suggested by Dmitry.
- Link to v2: https://lore.kernel.org/r/20231107-refclk_always_on-v2-0-de23962fc4b3@xxxxxxxxxxx

Changes in v2:
- Added refclk cntrl registers to the applicable phy versions & added reg layout where
- refclk cntrl offset needs to be updated (Dmitry)
- Error out if refclk_always_on is set and there is no refclk control register to enable it (Dmitry)
- updated the dt-binding description & some nit's as suggested by (Bjorn)
- Link to v1: https://lore.kernel.org/r/20231106-refclk_always_on-v1-0-17a7fd8b532b@xxxxxxxxxxx

---
Krishna chaitanya chundru (3):
dt-bindings: phy: qcom,qmp: Add PCIe qcom,refclk-always-on property
phy: qcom-qmp-pcie: Add endpoint refclk control register offset
phy: qcom-qmp-pcie: Add support for keeping refclk always on

.../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 7 ++++
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 40 ++++++++++++++++++++--
drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5.h | 1 +
drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5_20.h | 1 +
drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6_20.h | 1 +
drivers/phy/qualcomm/phy-qcom-qmp-pcs-v5_20.h | 4 +++
drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6_20.h | 4 +++
7 files changed, 55 insertions(+), 3 deletions(-)
---
base-commit: 71e68e182e382e951d6248bccc3c960dcec5a718
change-id: 20231106-refclk_always_on-9beae8297cb8

Best regards,
--
Krishna chaitanya chundru <quic_krichai@xxxxxxxxxxx>