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/20260420133616.88740-2-krzysztof.kozlowski@oss.qualcomm.com
Thanks,
Qiang
Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
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/20260304-glymur_gen5x8_phy-v1-0-849e9a72e125@oss.qualcomm.com/
To: Vinod Koul <vkoul@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konradybcio@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
---
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,
--
Qiang Yu <qiang.yu@oss.qualcomm.com>