public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
@ 2025-12-16  8:25 Abel Vesa
  2025-12-16  8:25 ` [PATCH v2 1/2] dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY Abel Vesa
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Abel Vesa @ 2025-12-16  8:25 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Wenbin Yao, linux-arm-msm, linux-phy, devicetree, linux-kernel,
	Abel Vesa, Krzysztof Kozlowski

The Glymur platform comes with two PCIe Gen4 2-lanes controllers.

Add support for their PHYs and document the compatible.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
Changes in v2:
- Rebased on next-20251215 
- Dropped dependency since it was merged.
- Picked up Krzysztof's R-b tag for the bindings patch.
- Link to v1: https://lore.kernel.org/r/20251015-phy-qcom-pcie-add-glymur-v1-0-1af8fd14f033@linaro.org

---
Abel Vesa (2):
      dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY
      phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY

 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml   |  3 ++
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c           | 34 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)
---
base-commit: 4a5663c04bb679631985a15efab774da58c37815
change-id: 20251015-phy-qcom-pcie-add-glymur-096b6d951fac

Best regards,
--  
Abel Vesa <abel.vesa@oss.qualcomm.com>


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 1/2] dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY
  2025-12-16  8:25 [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
@ 2025-12-16  8:25 ` Abel Vesa
  2025-12-16  8:25 ` [PATCH v2 2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Abel Vesa @ 2025-12-16  8:25 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Wenbin Yao, linux-arm-msm, linux-phy, devicetree, linux-kernel,
	Abel Vesa, Krzysztof Kozlowski

From: Abel Vesa <abel.vesa@linaro.org>

The fourth and sixth PCIe instances on Glymur are both Gen4 2-lane PHY.
So document the compatible.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
index 48bd11410e8c..e23480a13016 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
@@ -16,6 +16,7 @@ description:
 properties:
   compatible:
     enum:
+      - qcom,glymur-qmp-gen4x2-pcie-phy
       - qcom,glymur-qmp-gen5x4-pcie-phy
       - qcom,qcs615-qmp-gen3x1-pcie-phy
       - qcom,qcs8300-qmp-gen4x2-pcie-phy
@@ -179,6 +180,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,glymur-qmp-gen4x2-pcie-phy
               - qcom,glymur-qmp-gen5x4-pcie-phy
               - qcom,sa8775p-qmp-gen4x2-pcie-phy
               - qcom,sa8775p-qmp-gen4x4-pcie-phy
@@ -215,6 +217,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,glymur-qmp-gen4x2-pcie-phy
               - qcom,glymur-qmp-gen5x4-pcie-phy
               - qcom,sm8550-qmp-gen4x2-pcie-phy
               - qcom,sm8650-qmp-gen4x2-pcie-phy

-- 
2.48.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH v2 2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
  2025-12-16  8:25 [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
  2025-12-16  8:25 ` [PATCH v2 1/2] dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY Abel Vesa
@ 2025-12-16  8:25 ` Abel Vesa
  2025-12-18  1:14   ` Dmitry Baryshkov
  2025-12-23 15:33 ` [PATCH v2 0/2] " Vinod Koul
  2026-01-01 11:07 ` Vinod Koul
  3 siblings, 1 reply; 7+ messages in thread
From: Abel Vesa @ 2025-12-16  8:25 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Neil Armstrong
  Cc: Wenbin Yao, linux-arm-msm, linux-phy, devicetree, linux-kernel,
	Abel Vesa

From: Abel Vesa <abel.vesa@linaro.org>

Glymur platform has two Gen4 2-lanes controllers, the fourth and
sixth instances. Add support for their PHYs.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 34 ++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 86b1b7e2da86..5b53f03771d8 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -100,6 +100,12 @@ static const unsigned int pciephy_v7_regs_layout[QPHY_LAYOUT_SIZE] = {
 	[QPHY_PCS_POWER_DOWN_CONTROL]	= QPHY_V7_PCS_POWER_DOWN_CONTROL,
 };
 
+static const unsigned int pciephy_v8_regs_layout[QPHY_LAYOUT_SIZE] = {
+	[QPHY_START_CTRL]		= QPHY_V8_PCS_START_CONTROL,
+	[QPHY_PCS_STATUS]		= QPHY_V8_PCS_PCS_STATUS1,
+	[QPHY_PCS_POWER_DOWN_CONTROL]	= QPHY_V8_PCS_POWER_DOWN_CONTROL,
+};
+
 static const unsigned int pciephy_v8_50_regs_layout[QPHY_LAYOUT_SIZE] = {
 	[QPHY_START_CTRL]		= QPHY_V8_50_PCS_START_CONTROL,
 	[QPHY_PCS_STATUS]		= QPHY_V8_50_PCS_STATUS1,
@@ -3363,6 +3369,15 @@ static const struct qmp_pcie_offsets qmp_pcie_offsets_v6_30 = {
 	.ln_shrd	= 0x8000,
 };
 
+static const struct qmp_pcie_offsets qmp_pcie_offsets_v8 = {
+	.serdes		= 0x1000,
+	.pcs		= 0x1400,
+	.tx		= 0x0000,
+	.rx		= 0x0200,
+	.tx2		= 0x0800,
+	.rx2		= 0x0a00,
+};
+
 static const struct qmp_pcie_offsets qmp_pcie_offsets_v8_50 = {
 	.serdes     = 0x8000,
 	.pcs        = 0x9000,
@@ -4441,6 +4456,22 @@ static const struct qmp_phy_cfg glymur_qmp_gen5x4_pciephy_cfg = {
 	.phy_status		= PHYSTATUS_4_20,
 };
 
+static const struct qmp_phy_cfg glymur_qmp_gen4x2_pciephy_cfg = {
+	.lanes = 2,
+
+	.offsets		= &qmp_pcie_offsets_v8,
+
+	.reset_list		= sdm845_pciephy_reset_l,
+	.num_resets		= ARRAY_SIZE(sdm845_pciephy_reset_l),
+	.vreg_list		= qmp_phy_vreg_l,
+	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
+
+	.regs			= pciephy_v8_regs_layout,
+
+	.pwrdn_ctrl		= SW_PWRDN | REFCLK_DRV_DSBL,
+	.phy_status		= PHYSTATUS_4_20,
+};
+
 static void qmp_pcie_init_port_b(struct qmp_pcie *qmp, const struct qmp_phy_cfg_tbls *tbls)
 {
 	const struct qmp_phy_cfg *cfg = qmp->cfg;
@@ -5192,6 +5223,9 @@ static int qmp_pcie_probe(struct platform_device *pdev)
 
 static const struct of_device_id qmp_pcie_of_match_table[] = {
 	{
+		.compatible = "qcom,glymur-qmp-gen4x2-pcie-phy",
+		.data = &glymur_qmp_gen4x2_pciephy_cfg,
+	}, {
 		.compatible = "qcom,glymur-qmp-gen5x4-pcie-phy",
 		.data = &glymur_qmp_gen5x4_pciephy_cfg,
 	}, {

-- 
2.48.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
  2025-12-16  8:25 ` [PATCH v2 2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
@ 2025-12-18  1:14   ` Dmitry Baryshkov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-12-18  1:14 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Vinod Koul, Kishon Vijay Abraham I, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Neil Armstrong, Wenbin Yao,
	linux-arm-msm, linux-phy, devicetree, linux-kernel, Abel Vesa

On Tue, Dec 16, 2025 at 10:25:05AM +0200, Abel Vesa wrote:
> From: Abel Vesa <abel.vesa@linaro.org>
> 
> Glymur platform has two Gen4 2-lanes controllers, the fourth and
> sixth instances. Add support for their PHYs.
> 
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 34 ++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
  2025-12-16  8:25 [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
  2025-12-16  8:25 ` [PATCH v2 1/2] dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY Abel Vesa
  2025-12-16  8:25 ` [PATCH v2 2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
@ 2025-12-23 15:33 ` Vinod Koul
  2025-12-23 16:07   ` Abel Vesa
  2026-01-01 11:07 ` Vinod Koul
  3 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2025-12-23 15:33 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Neil Armstrong, Wenbin Yao, linux-arm-msm,
	linux-phy, devicetree, linux-kernel, Abel Vesa,
	Krzysztof Kozlowski

On 16-12-25, 10:25, Abel Vesa wrote:
> The Glymur platform comes with two PCIe Gen4 2-lanes controllers.
> 
> Add support for their PHYs and document the compatible.

It fails for me now. I guess I picked up bunch of patches which is
causing this. Can you please rebase on next tomorrow and send

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
  2025-12-23 15:33 ` [PATCH v2 0/2] " Vinod Koul
@ 2025-12-23 16:07   ` Abel Vesa
  0 siblings, 0 replies; 7+ messages in thread
From: Abel Vesa @ 2025-12-23 16:07 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Neil Armstrong, Wenbin Yao, linux-arm-msm,
	linux-phy, devicetree, linux-kernel, Abel Vesa,
	Krzysztof Kozlowski

On 25-12-23 21:03:41, Vinod Koul wrote:
> On 16-12-25, 10:25, Abel Vesa wrote:
> > The Glymur platform comes with two PCIe Gen4 2-lanes controllers.
> > 
> > Add support for their PHYs and document the compatible.
> 
> It fails for me now. I guess I picked up bunch of patches which is
> causing this. Can you please rebase on next tomorrow and send
> 

Sure thing.

Thanks.
Abel

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
  2025-12-16  8:25 [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
                   ` (2 preceding siblings ...)
  2025-12-23 15:33 ` [PATCH v2 0/2] " Vinod Koul
@ 2026-01-01 11:07 ` Vinod Koul
  3 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2026-01-01 11:07 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Neil Armstrong, Abel Vesa
  Cc: Wenbin Yao, linux-arm-msm, linux-phy, devicetree, linux-kernel,
	Abel Vesa, Krzysztof Kozlowski


On Tue, 16 Dec 2025 10:25:03 +0200, Abel Vesa wrote:
> The Glymur platform comes with two PCIe Gen4 2-lanes controllers.
> 
> Add support for their PHYs and document the compatible.
> 
> 

Applied, thanks!

[1/2] dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY
      commit: 25671c37821006392ff8c66e980475747bee4cde
[2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY
      commit: 085ba7c91df34e05366f9fecc9fa7a037598c30e

Best regards,
-- 
~Vinod



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2026-01-01 11:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-16  8:25 [PATCH v2 0/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
2025-12-16  8:25 ` [PATCH v2 1/2] dt-bindings: phy: sc8280xp-qmp-pcie: Document Glymur PCIe Gen4 2-lanes PHY Abel Vesa
2025-12-16  8:25 ` [PATCH v2 2/2] phy: qcom: qmp-pcie: Add support for Glymur PCIe Gen4x2 PHY Abel Vesa
2025-12-18  1:14   ` Dmitry Baryshkov
2025-12-23 15:33 ` [PATCH v2 0/2] " Vinod Koul
2025-12-23 16:07   ` Abel Vesa
2026-01-01 11:07 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox