Skip to content

RFC phy: qcom: qmp-pcie: Add link-mode based support for Glymur Gen5x8 PHY

Qiang Yu linux-arm-msm linux-devicetree linux-phy lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20260518-link_mode_0519-708494cee2da

Versions newest first

  1. v4 RFC Latest9 patches 22 repliesIn review

Changes in v4 from the cover letter

- Replaced the static bifurcation probe model with a link-mode
architecture: the active topology (x8 or x4+x4) is selected via a
new "qcom,link-mode" DT property and written to a TCSR register at
power-on. This replaces v3 patches 4 and 5 with four new patches
(driver refactor, secondary PHY clock/reset lists, link-mode probe
infrastructure, and Glymur config).
- Updated dt-bindings to describe "qcom,link-mode", #phy-cells = <1>,
per-mode validation rules, and added a new header with
QMP_PHY_SELECTOR_* and QMP_PCIE_GLYMUR_MODE_* macros.
- Patches 2 and 3 (multiple power-domains, multiple nocsr resets) are
unchanged from v3.
- Link to v3: https://lore.kernel.org/r/20260412-glymur_gen5x8_phy_0413-v3-0-affcebc16b8b@oss.qualcomm.com

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add glymur-qmp-gen5x8-pcie-phy compatibleDocumentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml+126 -143 replies
2/9dt-bindings: phy: qcom-qmp: Add PHY selector and Glymur link-mode macrosinclude/dt-bindings/phy/phy-qcom-qmp.h+8 -03 replies
3/9phy: qcom: qmp-pcie: Add multiple power-domains supportdrivers/phy/qualcomm/phy-qcom-qmp-pcie.c+12 -00 replies
4/9phy: qcom: qmp-pcie: Support multiple nocsr resetsdrivers/phy/qualcomm/phy-qcom-qmp-pcie.c+77 -100 replies
5/9phy: qcom: qmp-pcie: Refactor pipe clk register and parse_dt helpersdrivers/phy/qualcomm/phy-qcom-qmp-pcie.c+44 -328 replies
6/9phy: qcom: qmp-pcie: Add clock and reset lists for secondary PHY selectordrivers/phy/qualcomm/phy-qcom-qmp-pcie.c+40 -90 replies
7/9phy: qcom: qmp-pcie: Add link-mode multi-PHY probe infrastructuredrivers/phy/qualcomm/phy-qcom-qmp-pcie.c+311 -400 replies
8/9phy: qcom: qmp-pcie: Add Glymur Gen5x8 PHY config and match datadrivers/phy/qualcomm/phy-qcom-qmp-pcie.c+79 -10 replies
9/9arm64: dts: qcom: glymur: Wire PCIe3a/3b to shared Gen5x8 PHYarch/arm64/boot/dts/qcom/glymur-crd.dtsi arch/arm64/boot/dts/qcom/glymur.dtsi+336 -28 replies

Reviews trailers per patch

1 of 9 patches has a Reviewed-by or Acked-by.

PatchDmitry Baryshkov
1/9
2/9
3/9R-b
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH RFC v4 0/9] phy: qcom: qmp-pcie: Add link-mode based support for Glymur Gen5x8 PHY

Hi all,

This RFC proposes a revised model for Glymur Gen5x8 PCIe PHY support.

On Glymur, PCIe3 uses one shared Gen5x8 QMP PHY hardware block that can operate in different link topologies (x8 or x4+x4). The previous series approach was not accepted, so this RFC reworks the design to better match the hardware model and DT expectations.

This RFC focuses on the link-mode model and associated binding/API changes while keeping prerequisite/independent patches separate.

What this RFC changes:

- Keep a single PHY provider node for the shared Gen5x8 hardware block.
- Select active topology on the provider side via link-mode.
- Use #phy-cells = <1> so consumers can pass logical PHY index to get different phy structure.
- Keep legacy (non-link-mode) platforms on the existing path.
- Validate mode consistency at probe:
- if HW mode matches DT mode, continue;
- if mismatch, allow only when selected mode has complete PHY setting tables for all logical PHYs; otherwise fail probe.
- Keep programming link-mode register during power_on, so DT-selected mode is re-applied when TCSR register may be reset after low-power mode.

Mode/cfg selection model:

- Introduce mode-indexed match data:
- first dimension: link_mode
- second dimension: logical_phy_index
- Effective lookup is:
cfg = mode_cfgs[active_link_mode].cfgs[logical_phy_index]

This allows one shared provider to expose different logical PHY sets per mode.

Impact:
- Keep existing qmp-pcie PHY operation flow (phy_ops) unchanged as much as possible.
- Constrain the new design mainly to cfg selection and provider/xlate wiring.
- Reuse existing init/power/reset flows with selected cfg, minimizing code churn and behavioral risk.
- This RFC is implemented and validated on Glymur Gen5x8, it is designed to be extensible to other multi-mode QMP PCIe PHYs, although additional platform-specific requirements may still be needed.

This series depends on a prerequisite patch by Krzysztof Kozlowski:
https://lore.kernel.org/r/[email protected]

Thanks,
Qiang

---
Changes in v4:
- Replaced the static bifurcation probe model with a link-mode
architecture: the active topology (x8 or x4+x4) is selected via a
new "qcom,link-mode" DT property and written to a TCSR register at
power-on. This replaces v3 patches 4 and 5 with four new patches
(driver refactor, secondary PHY clock/reset lists, link-mode probe
infrastructure, and Glymur config).
- Updated dt-bindings to describe "qcom,link-mode", #phy-cells = <1>,
per-mode validation rules, and added a new header with
QMP_PHY_SELECTOR_* and QMP_PCIE_GLYMUR_MODE_* macros.
- Patches 2 and 3 (multiple power-domains, multiple nocsr resets) are
unchanged from v3.
- Link to v3: https://lore.kernel.org/r/20260412-glymur_gen5x8_phy_0413-v3-0-affcebc16b8b@oss.qualcomm.com

Changes in v3:
- Add description of each power-domain.
- Add 64bit prefetchable memory range required by some EPs eg. AI100 ultra.
- Move PCIe3a after PCIe3b and move PCIe3a PHY before PCIe3b PHY.
- Link to v2: https://lore.kernel.org/all/20260323-glymur_gen5x8_phy_0323-v2-0-ce0fc07f0e52@oss.qualcomm.com/

Changes in v2:
- Remove pd_list from qmp_pcie struct as it is not used in phy driver.
- align clk-names on "
- Link to v1: https://lore.kernel.org/all/[email protected]/

To: Vinod Koul <[email protected]>
To: Neil Armstrong <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Philipp Zabel <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
Qiang Yu (9):
dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add glymur-qmp-gen5x8-pcie-phy compatible
dt-bindings: phy: qcom-qmp: Add PHY selector and Glymur link-mode macros
phy: qcom: qmp-pcie: Add multiple power-domains support
phy: qcom: qmp-pcie: Support multiple nocsr resets
phy: qcom: qmp-pcie: Refactor pipe clk register and parse_dt helpers
phy: qcom: qmp-pcie: Add clock and reset lists for secondary PHY selector
phy: qcom: qmp-pcie: Add link-mode multi-PHY probe infrastructure
phy: qcom: qmp-pcie: Add Glymur Gen5x8 PHY config and match data
arm64: dts: qcom: glymur: Wire PCIe3a/3b to shared Gen5x8 PHY

 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml   | 140 ++++-
 arch/arm64/boot/dts/qcom/glymur-crd.dtsi           |   5 +
 arch/arm64/boot/dts/qcom/glymur.dtsi               | 333 ++++++++++-
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c           | 631 ++++++++++++++++++---
 include/dt-bindings/phy/phy-qcom-qmp.h             |   8 +
 5 files changed, 1021 insertions(+), 96 deletions(-)

---
base-commit: 4359f733f8edf6be944b9f28ccb6a6c6e9a24aaa
change-id: 20260518-link_mode_0519-708494cee2da

Best regards,

Signature · 1 line
Qiang Yu <[email protected]>