mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] phy: qcom: qmp-pcie: Add vdda-refgen supply support for Glymur
@ 2026-02-09  4:49 Qiang Yu
  2026-02-09  4:49 ` [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply " Qiang Yu
  2026-02-09  4:49 ` [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies " Qiang Yu
  0 siblings, 2 replies; 16+ messages in thread
From: Qiang Yu @ 2026-02-09  4:49 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Qiang Yu

The PCIe QMP PHYs on Glymur require both refgen for stable reference
voltage and qref for stable reference clock. The refgen requires two power
supplies: vdda-refgen0p9 and vdda-refgen1p2.

Unlike qref, refgen doesn't require register configuration and has no
dedicated driver. Therefore, the PHY driver must vote for the regulators
that refgen requires.

While refgen may be a common component across different platforms, on
older platforms it typically shares regulators with PHY core or qref
supplies, making refgen supplies map not very clear. Glymur introduces
dedicated refgen supplies that require explicit management.

Hence, this series adds support for refgen power supplies specifically to
Glymur PCIe QMP PHY. If other platforms require these supplies, support
can be extended in the future.

This series creates a Glymur-specific supply list including the refgen
supplies and updates both Gen5x4 and Gen4x2 configurations to use it.

Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
Qiang Yu (2):
      dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
      phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur

 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml     | 20 ++++++++++++++++++++
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c             | 12 ++++++++----
 2 files changed, 28 insertions(+), 4 deletions(-)
---
base-commit: 8bb92fd7a04077925c8330f46a6ab44c80ca59f4
change-id: 20260202-refgen-f0a611d5c355

Best regards,
-- 
Qiang Yu <qiang.yu@oss.qualcomm.com>


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

* [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-09  4:49 [PATCH 0/2] phy: qcom: qmp-pcie: Add vdda-refgen supply support for Glymur Qiang Yu
@ 2026-02-09  4:49 ` Qiang Yu
  2026-02-09  8:06   ` Krzysztof Kozlowski
  2026-02-09  4:49 ` [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies " Qiang Yu
  1 sibling, 1 reply; 16+ messages in thread
From: Qiang Yu @ 2026-02-09  4:49 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Qiang Yu

The PCIe QMP PHYs on Glymur require stable reference voltage provided by
refgen. The refgen itself requires two separate power supplies:
vdda-refgen0p9 and vdda-refgen1p2.

Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
conditional schema to restrict these properties to only Glymur PCIe QMP
PHYs.

Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml     | 20 ++++++++++++++++++++
 1 file changed, 20 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 82316aa5e15f2bde9c32c112876dd820f9450e94..5f60b472264d54b714538c869a095e620b0eba2d 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml
@@ -90,6 +90,10 @@ properties:
 
   vdda-qref-supply: true
 
+  vdda-refgen0p9-supply: true
+
+  vdda-refgen1p2-supply: true
+
   qcom,4ln-config-sel:
     description: PCIe 4-lane configuration
     $ref: /schemas/types.yaml#/definitions/phandle-array
@@ -259,6 +263,22 @@ allOf:
         "#clock-cells":
           const: 0
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,glymur-qmp-gen4x2-pcie-phy
+              - qcom,glymur-qmp-gen5x4-pcie-phy
+    then:
+      properties:
+        vdda-refgen0p9-supply: true
+        vdda-refgen1p2-supply: true
+    else:
+      properties:
+        vdda-refgen0p9-supply: false
+        vdda-refgen1p2-supply: false
+
 examples:
   - |
     #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>

-- 
2.34.1


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

* [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur
  2026-02-09  4:49 [PATCH 0/2] phy: qcom: qmp-pcie: Add vdda-refgen supply support for Glymur Qiang Yu
  2026-02-09  4:49 ` [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply " Qiang Yu
@ 2026-02-09  4:49 ` Qiang Yu
  2026-02-09 13:15   ` Dmitry Baryshkov
  1 sibling, 1 reply; 16+ messages in thread
From: Qiang Yu @ 2026-02-09  4:49 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Qiang Yu

The refgen providing reference voltage for PCIe QMP PHY on Glymur requires
two power supplies independent from the PHY's core and qref rails. Add
support for vdda-refgen0p9 and vdda-refgen1p2 supplies with a dedicated
glymur_qmp_phy_vreg_l list.

Update both Gen5x4 and Gen4x2 configurations to use the new supply list.

Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index fed2fc9bb31108d51f88d34f3379c7744681f485..b24ed260f30a689b5668f38c1471c0ab2aced0cc 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -3382,6 +3382,10 @@ static const char * const sm8550_qmp_phy_vreg_l[] = {
 	"vdda-phy", "vdda-pll", "vdda-qref",
 };
 
+static const char * const glymur_qmp_phy_vreg_l[] = {
+	"vdda-phy", "vdda-pll", "vdda-refgen0p9", "vdda-refgen1p2",
+};
+
 /* list of resets */
 static const char * const ipq8074_pciephy_reset_l[] = {
 	"phy", "common",
@@ -4623,8 +4627,8 @@ static const struct qmp_phy_cfg glymur_qmp_gen5x4_pciephy_cfg = {
 
 	.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),
+	.vreg_list		= glymur_qmp_phy_vreg_l,
+	.num_vregs		= ARRAY_SIZE(glymur_qmp_phy_vreg_l),
 
 	.regs			= pciephy_v8_50_regs_layout,
 
@@ -4639,8 +4643,8 @@ static const struct qmp_phy_cfg glymur_qmp_gen4x2_pciephy_cfg = {
 
 	.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),
+	.vreg_list		= glymur_qmp_phy_vreg_l,
+	.num_vregs		= ARRAY_SIZE(glymur_qmp_phy_vreg_l),
 
 	.regs			= pciephy_v8_regs_layout,
 

-- 
2.34.1


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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-09  4:49 ` [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply " Qiang Yu
@ 2026-02-09  8:06   ` Krzysztof Kozlowski
  2026-02-12  3:32     ` Qiang Yu
  0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-09  8:06 UTC (permalink / raw)
  To: Qiang Yu
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> refgen. The refgen itself requires two separate power supplies:
> vdda-refgen0p9 and vdda-refgen1p2.
> 
> Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply

How does the driver matter for the bindings? If I add dedicated driver
for refgen, then I change the bindings?

There is qcom,sc8280xp-refgen-regulator so why there cannot be
qcom,x1e-refgen-regulator?


> and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
> conditional schema to restrict these properties to only Glymur PCIe QMP
> PHYs.

Best regards,
Krzysztof


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

* Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur
  2026-02-09  4:49 ` [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies " Qiang Yu
@ 2026-02-09 13:15   ` Dmitry Baryshkov
  2026-02-12  3:33     ` Qiang Yu
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2026-02-09 13:15 UTC (permalink / raw)
  To: Qiang Yu
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Sun, Feb 08, 2026 at 08:49:40PM -0800, Qiang Yu wrote:
> The refgen providing reference voltage for PCIe QMP PHY on Glymur requires
> two power supplies independent from the PHY's core and qref rails. Add
> support for vdda-refgen0p9 and vdda-refgen1p2 supplies with a dedicated
> glymur_qmp_phy_vreg_l list.
> 
> Update both Gen5x4 and Gen4x2 configurations to use the new supply list.

I'd ask for the DTSI patch too...

> 
> Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-09  8:06   ` Krzysztof Kozlowski
@ 2026-02-12  3:32     ` Qiang Yu
  2026-02-12  9:23       ` Konrad Dybcio
  2026-02-13 17:47       ` Dmitry Baryshkov
  0 siblings, 2 replies; 16+ messages in thread
From: Qiang Yu @ 2026-02-12  3:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
> On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> > The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> > refgen. The refgen itself requires two separate power supplies:
> > vdda-refgen0p9 and vdda-refgen1p2.
> > 
> > Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
> 
> How does the driver matter for the bindings? If I add dedicated driver
> for refgen, then I change the bindings?

Yeah, I know that dt-bindings should describe hardware, not software. But
what I meant to say is that the refgen is different from qref which is
controlled via TCSR registers and its LDOs are requested to vote in
tcsrcc driver. The refgen doesn't required register setting and it doesn't
have dedicated driver, so we vote its LDOs in phy driver. I will avoid
this statement in next version.

> 
> There is qcom,sc8280xp-refgen-regulator so why there cannot be
> qcom,x1e-refgen-regulator?

I think we can and it seems better because the refgen for pcie phy also
supplies reference voltage to other modules like usb. But I checked the
qcom-refgen-regulator.c, it contains some register settings and there is
no LDOs voting. I'm not sure what does those register do, maybe Konrad
can provide some backgroud. But on Glymur, we only need to vote LDOs. So
what if we use a fixed regulator in the device tree to represent refgen?
We could set refgen0p9 and refgen1p2 as its input supplies, then the PCIe
PHY would just need one refgen supply reference.

- Qiang Yu
> 
> 
> > and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
> > conditional schema to restrict these properties to only Glymur PCIe QMP
> > PHYs.
> 
> Best regards,
> Krzysztof
> 

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

* Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur
  2026-02-09 13:15   ` Dmitry Baryshkov
@ 2026-02-12  3:33     ` Qiang Yu
  2026-02-13 17:48       ` Dmitry Baryshkov
  0 siblings, 1 reply; 16+ messages in thread
From: Qiang Yu @ 2026-02-12  3:33 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Mon, Feb 09, 2026 at 03:15:24PM +0200, Dmitry Baryshkov wrote:
> On Sun, Feb 08, 2026 at 08:49:40PM -0800, Qiang Yu wrote:
> > The refgen providing reference voltage for PCIe QMP PHY on Glymur requires
> > two power supplies independent from the PHY's core and qref rails. Add
> > support for vdda-refgen0p9 and vdda-refgen1p2 supplies with a dedicated
> > glymur_qmp_phy_vreg_l list.
> > 
> > Update both Gen5x4 and Gen4x2 configurations to use the new supply list.
> 
> I'd ask for the DTSI patch too...
>
I will post dtsi patch after we get agreement on how to descibe refgen in
dt-bindings.

- Qiang Yu
> > 
> > Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
> > ---
> >  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> > 
> 
> -- 
> With best wishes
> Dmitry

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-12  3:32     ` Qiang Yu
@ 2026-02-12  9:23       ` Konrad Dybcio
  2026-02-13 17:47       ` Dmitry Baryshkov
  1 sibling, 0 replies; 16+ messages in thread
From: Konrad Dybcio @ 2026-02-12  9:23 UTC (permalink / raw)
  To: Qiang Yu, Krzysztof Kozlowski
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On 2/12/26 4:32 AM, Qiang Yu wrote:
> On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
>> On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
>>> The PCIe QMP PHYs on Glymur require stable reference voltage provided by
>>> refgen. The refgen itself requires two separate power supplies:
>>> vdda-refgen0p9 and vdda-refgen1p2.
>>>
>>> Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
>>
>> How does the driver matter for the bindings? If I add dedicated driver
>> for refgen, then I change the bindings?
> 
> Yeah, I know that dt-bindings should describe hardware, not software. But
> what I meant to say is that the refgen is different from qref which is
> controlled via TCSR registers and its LDOs are requested to vote in
> tcsrcc driver. The refgen doesn't required register setting and it doesn't
> have dedicated driver, so we vote its LDOs in phy driver. I will avoid
> this statement in next version.
> 
>>
>> There is qcom,sc8280xp-refgen-regulator so why there cannot be
>> qcom,x1e-refgen-regulator?
> 
> I think we can and it seems better because the refgen for pcie phy also
> supplies reference voltage to other modules like usb. But I checked the
> qcom-refgen-regulator.c, it contains some register settings and there is
> no LDOs voting. I'm not sure what does those register do, maybe Konrad
> can provide some backgroud. But on Glymur, we only need to vote LDOs. So
> what if we use a fixed regulator in the device tree to represent refgen?
> We could set refgen0p9 and refgen1p2 as its input supplies, then the PCIe
> PHY would just need one refgen supply reference.

That refgen on e.g. 8280 supplies display and camera PHYs. The latter have
some sideband interface to request a vote directly (on all but some single
old SoCs, IIUC), while the display ones need a manual vote.

It would stand to reason that perhaps this MMIO-controlled regulator would
have some sort of a voltage input.. so maybe that's the missing part in the
story? I'm trying to find some answers but it's not easy..

Konrad

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-12  3:32     ` Qiang Yu
  2026-02-12  9:23       ` Konrad Dybcio
@ 2026-02-13 17:47       ` Dmitry Baryshkov
  2026-02-24  6:41         ` Qiang Yu
  2026-03-02 10:21         ` Qiang Yu
  1 sibling, 2 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2026-02-13 17:47 UTC (permalink / raw)
  To: Qiang Yu
  Cc: Krzysztof Kozlowski, Vinod Koul, Neil Armstrong, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

On Wed, Feb 11, 2026 at 07:32:23PM -0800, Qiang Yu wrote:
> On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
> > On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> > > The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> > > refgen. The refgen itself requires two separate power supplies:
> > > vdda-refgen0p9 and vdda-refgen1p2.
> > > 
> > > Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
> > 
> > How does the driver matter for the bindings? If I add dedicated driver
> > for refgen, then I change the bindings?
> 
> Yeah, I know that dt-bindings should describe hardware, not software. But
> what I meant to say is that the refgen is different from qref which is
> controlled via TCSR registers and its LDOs are requested to vote in
> tcsrcc driver. The refgen doesn't required register setting and it doesn't
> have dedicated driver, so we vote its LDOs in phy driver. I will avoid
> this statement in next version.

I must admit, I could not find references to the refgen in any of Glymur
PCIe-related HPGs.

> 
> > 
> > There is qcom,sc8280xp-refgen-regulator so why there cannot be
> > qcom,x1e-refgen-regulator?
> 
> I think we can and it seems better because the refgen for pcie phy also
> supplies reference voltage to other modules like usb. But I checked the
> qcom-refgen-regulator.c, it contains some register settings and there is
> no LDOs voting. I'm not sure what does those register do, maybe Konrad
> can provide some backgroud.

Those regs provide voting for refgen, because on those platforms DSI
block doesn't have a hardware vote for refgen.

> But on Glymur, we only need to vote LDOs. So
> what if we use a fixed regulator in the device tree to represent refgen?
> We could set refgen0p9 and refgen1p2 as its input supplies, then the PCIe
> PHY would just need one refgen supply reference.
> 
> - Qiang Yu
> > 
> > 
> > > and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
> > > conditional schema to restrict these properties to only Glymur PCIe QMP
> > > PHYs.
> > 
> > Best regards,
> > Krzysztof
> > 

-- 
With best wishes
Dmitry

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

* Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur
  2026-02-12  3:33     ` Qiang Yu
@ 2026-02-13 17:48       ` Dmitry Baryshkov
  2026-02-24  6:42         ` Qiang Yu
  0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Baryshkov @ 2026-02-13 17:48 UTC (permalink / raw)
  To: Qiang Yu
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Wed, Feb 11, 2026 at 07:33:28PM -0800, Qiang Yu wrote:
> On Mon, Feb 09, 2026 at 03:15:24PM +0200, Dmitry Baryshkov wrote:
> > On Sun, Feb 08, 2026 at 08:49:40PM -0800, Qiang Yu wrote:
> > > The refgen providing reference voltage for PCIe QMP PHY on Glymur requires
> > > two power supplies independent from the PHY's core and qref rails. Add
> > > support for vdda-refgen0p9 and vdda-refgen1p2 supplies with a dedicated
> > > glymur_qmp_phy_vreg_l list.
> > > 
> > > Update both Gen5x4 and Gen4x2 configurations to use the new supply list.
> > 
> > I'd ask for the DTSI patch too...
> >
> I will post dtsi patch after we get agreement on how to descibe refgen in
> dt-bindings.

Please include DT patches in future series, they help us understand your
changes.

> 
> - Qiang Yu
> > > 
> > > Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
> > > ---
> > >  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > 
> > 
> > -- 
> > With best wishes
> > Dmitry

-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-13 17:47       ` Dmitry Baryshkov
@ 2026-02-24  6:41         ` Qiang Yu
  2026-03-02 10:21         ` Qiang Yu
  1 sibling, 0 replies; 16+ messages in thread
From: Qiang Yu @ 2026-02-24  6:41 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Krzysztof Kozlowski, Vinod Koul, Neil Armstrong, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

On Fri, Feb 13, 2026 at 07:47:36PM +0200, Dmitry Baryshkov wrote:
> On Wed, Feb 11, 2026 at 07:32:23PM -0800, Qiang Yu wrote:
> > On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
> > > On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> > > > The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> > > > refgen. The refgen itself requires two separate power supplies:
> > > > vdda-refgen0p9 and vdda-refgen1p2.
> > > > 
> > > > Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
> > > 
> > > How does the driver matter for the bindings? If I add dedicated driver
> > > for refgen, then I change the bindings?
> > 
> > Yeah, I know that dt-bindings should describe hardware, not software. But
> > what I meant to say is that the refgen is different from qref which is
> > controlled via TCSR registers and its LDOs are requested to vote in
> > tcsrcc driver. The refgen doesn't required register setting and it doesn't
> > have dedicated driver, so we vote its LDOs in phy driver. I will avoid
> > this statement in next version.
> 
> I must admit, I could not find references to the refgen in any of Glymur
> PCIe-related HPGs.

We can find it on ipcatalog. On Glymur, there are 6 refgen instances:
u_cm_phy_refgen_0_west supplies to pcie3/4/6.
u_cm_phy_refgen_3_east supplies to pcie5.
This two refgen also supply to other modules like usb and qref which
is required by PCIe phy for stable reference clk.

In previous targets, refgen was often ignored because it shares LDOs with
phy or qref. We typically only vote for vdda-phy, vdda-pll, and vdda-qref
supplies. However, on Glymur, there are more instances and less LDO
sharing between phy/qref/refgen.

> 
> > 
> > > 
> > > There is qcom,sc8280xp-refgen-regulator so why there cannot be
> > > qcom,x1e-refgen-regulator?
> > 
> > I think we can and it seems better because the refgen for pcie phy also
> > supplies reference voltage to other modules like usb. But I checked the
> > qcom-refgen-regulator.c, it contains some register settings and there is
> > no LDOs voting. I'm not sure what does those register do, maybe Konrad
> > can provide some backgroud.
> 
> Those regs provide voting for refgen, because on those platforms DSI
> block doesn't have a hardware vote for refgen.
> 

Okay, for PCIe PHY, we don't need register settings for refgen.

- Qiang Yu
> > But on Glymur, we only need to vote LDOs. So
> > what if we use a fixed regulator in the device tree to represent refgen?
> > We could set refgen0p9 and refgen1p2 as its input supplies, then the PCIe
> > PHY would just need one refgen supply reference.
> > 
> > - Qiang Yu
> > > 
> > > 
> > > > and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
> > > > conditional schema to restrict these properties to only Glymur PCIe QMP
> > > > PHYs.
> > > 
> > > Best regards,
> > > Krzysztof
> > > 
> 
> -- 
> With best wishes
> Dmitry

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

* Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur
  2026-02-13 17:48       ` Dmitry Baryshkov
@ 2026-02-24  6:42         ` Qiang Yu
  0 siblings, 0 replies; 16+ messages in thread
From: Qiang Yu @ 2026-02-24  6:42 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Vinod Koul, Neil Armstrong, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, linux-phy, devicetree, linux-kernel

On Fri, Feb 13, 2026 at 07:48:23PM +0200, Dmitry Baryshkov wrote:
> On Wed, Feb 11, 2026 at 07:33:28PM -0800, Qiang Yu wrote:
> > On Mon, Feb 09, 2026 at 03:15:24PM +0200, Dmitry Baryshkov wrote:
> > > On Sun, Feb 08, 2026 at 08:49:40PM -0800, Qiang Yu wrote:
> > > > The refgen providing reference voltage for PCIe QMP PHY on Glymur requires
> > > > two power supplies independent from the PHY's core and qref rails. Add
> > > > support for vdda-refgen0p9 and vdda-refgen1p2 supplies with a dedicated
> > > > glymur_qmp_phy_vreg_l list.
> > > > 
> > > > Update both Gen5x4 and Gen4x2 configurations to use the new supply list.
> > > 
> > > I'd ask for the DTSI patch too...
> > >
> > I will post dtsi patch after we get agreement on how to descibe refgen in
> > dt-bindings.
> 
> Please include DT patches in future series, they help us understand your
> changes.
>
Okay, will include DT patches in future series.

- Qiang Yu
> > 
> > - Qiang Yu
> > > > 
> > > > Signed-off-by: Qiang Yu <qiang.yu@oss.qualcomm.com>
> > > > ---
> > > >  drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
> > > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > > 
> > > 
> > > -- 
> > > With best wishes
> > > Dmitry
> 
> -- 
> With best wishes
> Dmitry

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-02-13 17:47       ` Dmitry Baryshkov
  2026-02-24  6:41         ` Qiang Yu
@ 2026-03-02 10:21         ` Qiang Yu
  2026-03-02 13:35           ` Dmitry Baryshkov
  2026-03-03 11:14           ` Konrad Dybcio
  1 sibling, 2 replies; 16+ messages in thread
From: Qiang Yu @ 2026-03-02 10:21 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Krzysztof Kozlowski, Vinod Koul, Neil Armstrong, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

On Fri, Feb 13, 2026 at 07:47:36PM +0200, Dmitry Baryshkov wrote:
> On Wed, Feb 11, 2026 at 07:32:23PM -0800, Qiang Yu wrote:
> > On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
> > > On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> > > > The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> > > > refgen. The refgen itself requires two separate power supplies:
> > > > vdda-refgen0p9 and vdda-refgen1p2.
> > > > 
> > > > Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
> > > 
> > > How does the driver matter for the bindings? If I add dedicated driver
> > > for refgen, then I change the bindings?
> > 
> > Yeah, I know that dt-bindings should describe hardware, not software. But
> > what I meant to say is that the refgen is different from qref which is
> > controlled via TCSR registers and its LDOs are requested to vote in
> > tcsrcc driver. The refgen doesn't required register setting and it doesn't
> > have dedicated driver, so we vote its LDOs in phy driver. I will avoid
> > this statement in next version.
> 
> I must admit, I could not find references to the refgen in any of Glymur
> PCIe-related HPGs.
> 
> > 
> > > 
> > > There is qcom,sc8280xp-refgen-regulator so why there cannot be
> > > qcom,x1e-refgen-regulator?
> > 
> > I think we can and it seems better because the refgen for pcie phy also
> > supplies reference voltage to other modules like usb. But I checked the
> > qcom-refgen-regulator.c, it contains some register settings and there is
> > no LDOs voting. I'm not sure what does those register do, maybe Konrad
> > can provide some backgroud.
> 
> Those regs provide voting for refgen, because on those platforms DSI
> block doesn't have a hardware vote for refgen.

Hi Konrad, Dmitry

I tried to model the reference voltage as a fixed regulator but the fixed
regulator driver only supports a single vin-supply. However, the refgen
block requires two separate power supplies (1.2V and 0.9V LDOs).

Would it be appropriate to modify the qcom-refgen-regulator.c driver to
handle LDO voting for both the 1.2V and 0.9V supplies? In the regulator's
enable/disable callbacks, we could vote for and unvote these two LDOs
instead of performing register operations.

- Qiang Yu
> 
> > But on Glymur, we only need to vote LDOs. So
> > what if we use a fixed regulator in the device tree to represent refgen?
> > We could set refgen0p9 and refgen1p2 as its input supplies, then the PCIe
> > PHY would just need one refgen supply reference.
> > 
> > - Qiang Yu
> > > 
> > > 
> > > > and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
> > > > conditional schema to restrict these properties to only Glymur PCIe QMP
> > > > PHYs.
> > > 
> > > Best regards,
> > > Krzysztof
> > > 
> 
> -- 
> With best wishes
> Dmitry

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-03-02 10:21         ` Qiang Yu
@ 2026-03-02 13:35           ` Dmitry Baryshkov
  2026-03-03 11:14           ` Konrad Dybcio
  1 sibling, 0 replies; 16+ messages in thread
From: Dmitry Baryshkov @ 2026-03-02 13:35 UTC (permalink / raw)
  To: Qiang Yu
  Cc: Krzysztof Kozlowski, Vinod Koul, Neil Armstrong, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

On Mon, Mar 02, 2026 at 02:21:24AM -0800, Qiang Yu wrote:
> On Fri, Feb 13, 2026 at 07:47:36PM +0200, Dmitry Baryshkov wrote:
> > On Wed, Feb 11, 2026 at 07:32:23PM -0800, Qiang Yu wrote:
> > > On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
> > > > On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> > > > > The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> > > > > refgen. The refgen itself requires two separate power supplies:
> > > > > vdda-refgen0p9 and vdda-refgen1p2.
> > > > > 
> > > > > Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
> > > > 
> > > > How does the driver matter for the bindings? If I add dedicated driver
> > > > for refgen, then I change the bindings?
> > > 
> > > Yeah, I know that dt-bindings should describe hardware, not software. But
> > > what I meant to say is that the refgen is different from qref which is
> > > controlled via TCSR registers and its LDOs are requested to vote in
> > > tcsrcc driver. The refgen doesn't required register setting and it doesn't
> > > have dedicated driver, so we vote its LDOs in phy driver. I will avoid
> > > this statement in next version.
> > 
> > I must admit, I could not find references to the refgen in any of Glymur
> > PCIe-related HPGs.
> > 
> > > 
> > > > 
> > > > There is qcom,sc8280xp-refgen-regulator so why there cannot be
> > > > qcom,x1e-refgen-regulator?
> > > 
> > > I think we can and it seems better because the refgen for pcie phy also
> > > supplies reference voltage to other modules like usb. But I checked the
> > > qcom-refgen-regulator.c, it contains some register settings and there is
> > > no LDOs voting. I'm not sure what does those register do, maybe Konrad
> > > can provide some backgroud.
> > 
> > Those regs provide voting for refgen, because on those platforms DSI
> > block doesn't have a hardware vote for refgen.
> 
> Hi Konrad, Dmitry
> 
> I tried to model the reference voltage as a fixed regulator but the fixed
> regulator driver only supports a single vin-supply. However, the refgen
> block requires two separate power supplies (1.2V and 0.9V LDOs).

On which platform? Does it require those power supplies only on GLymur
or on all relevant platforms?

> Would it be appropriate to modify the qcom-refgen-regulator.c driver to
> handle LDO voting for both the 1.2V and 0.9V supplies? In the regulator's
> enable/disable callbacks, we could vote for and unvote these two LDOs
> instead of performing register operations.

Depending on the answer on the previous question either we should fix
all refgens to use proper power supplies, or you should add separate,
Glymur-specific one (especially if you don't need to program it. Do
you?).

But, let's first sort out regulators for older platforms. Please inquiry
internally.

> > > But on Glymur, we only need to vote LDOs. So
> > > what if we use a fixed regulator in the device tree to represent refgen?
> > > We could set refgen0p9 and refgen1p2 as its input supplies, then the PCIe
> > > PHY would just need one refgen supply reference.
> > > 
> > > > > and vdda-refgen1p2-supply properties to the PCIe PHY dt-bindings. Use
> > > > > conditional schema to restrict these properties to only Glymur PCIe QMP
> > > > > PHYs.
> > > > 
> > > > Best regards,
> > > > Krzysztof
> > > > 
> > 
> > -- 
> > With best wishes
> > Dmitry

-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-03-02 10:21         ` Qiang Yu
  2026-03-02 13:35           ` Dmitry Baryshkov
@ 2026-03-03 11:14           ` Konrad Dybcio
  2026-03-05  8:57             ` Qiang Yu
  1 sibling, 1 reply; 16+ messages in thread
From: Konrad Dybcio @ 2026-03-03 11:14 UTC (permalink / raw)
  To: Qiang Yu, Dmitry Baryshkov
  Cc: Krzysztof Kozlowski, Vinod Koul, Neil Armstrong, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-phy,
	devicetree, linux-kernel

On 3/2/26 11:21 AM, Qiang Yu wrote:
> On Fri, Feb 13, 2026 at 07:47:36PM +0200, Dmitry Baryshkov wrote:
>> On Wed, Feb 11, 2026 at 07:32:23PM -0800, Qiang Yu wrote:
>>> On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
>>>> On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
>>>>> The PCIe QMP PHYs on Glymur require stable reference voltage provided by
>>>>> refgen. The refgen itself requires two separate power supplies:
>>>>> vdda-refgen0p9 and vdda-refgen1p2.
>>>>>
>>>>> Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
>>>>
>>>> How does the driver matter for the bindings? If I add dedicated driver
>>>> for refgen, then I change the bindings?
>>>
>>> Yeah, I know that dt-bindings should describe hardware, not software. But
>>> what I meant to say is that the refgen is different from qref which is
>>> controlled via TCSR registers and its LDOs are requested to vote in
>>> tcsrcc driver. The refgen doesn't required register setting and it doesn't
>>> have dedicated driver, so we vote its LDOs in phy driver. I will avoid
>>> this statement in next version.
>>
>> I must admit, I could not find references to the refgen in any of Glymur
>> PCIe-related HPGs.
>>
>>>
>>>>
>>>> There is qcom,sc8280xp-refgen-regulator so why there cannot be
>>>> qcom,x1e-refgen-regulator?
>>>
>>> I think we can and it seems better because the refgen for pcie phy also
>>> supplies reference voltage to other modules like usb. But I checked the
>>> qcom-refgen-regulator.c, it contains some register settings and there is
>>> no LDOs voting. I'm not sure what does those register do, maybe Konrad
>>> can provide some backgroud.
>>
>> Those regs provide voting for refgen, because on those platforms DSI
>> block doesn't have a hardware vote for refgen.
> 
> Hi Konrad, Dmitry
> 
> I tried to model the reference voltage as a fixed regulator but the fixed
> regulator driver only supports a single vin-supply. However, the refgen
> block requires two separate power supplies (1.2V and 0.9V LDOs).
> 
> Would it be appropriate to modify the qcom-refgen-regulator.c driver to
> handle LDO voting for both the 1.2V and 0.9V supplies? In the regulator's
> enable/disable callbacks, we could vote for and unvote these two LDOs
> instead of performing register operations.

Wait, so you want to associate the MMIO-controlled refgen's driver with
a dummy regulator that takes 2 supplies? I didn't catch that part earlier,
that's not great..

Or do we actually have access to the MMIO of *this* refgen and can control
it (except we don't do that today because X Y Z)?

Konrad

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

* Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur
  2026-03-03 11:14           ` Konrad Dybcio
@ 2026-03-05  8:57             ` Qiang Yu
  0 siblings, 0 replies; 16+ messages in thread
From: Qiang Yu @ 2026-03-05  8:57 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Dmitry Baryshkov, Krzysztof Kozlowski, Vinod Koul,
	Neil Armstrong, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, linux-phy, devicetree, linux-kernel

On Tue, Mar 03, 2026 at 12:14:29PM +0100, Konrad Dybcio wrote:
> On 3/2/26 11:21 AM, Qiang Yu wrote:
> > On Fri, Feb 13, 2026 at 07:47:36PM +0200, Dmitry Baryshkov wrote:
> >> On Wed, Feb 11, 2026 at 07:32:23PM -0800, Qiang Yu wrote:
> >>> On Mon, Feb 09, 2026 at 09:06:23AM +0100, Krzysztof Kozlowski wrote:
> >>>> On Sun, Feb 08, 2026 at 08:49:39PM -0800, Qiang Yu wrote:
> >>>>> The PCIe QMP PHYs on Glymur require stable reference voltage provided by
> >>>>> refgen. The refgen itself requires two separate power supplies:
> >>>>> vdda-refgen0p9 and vdda-refgen1p2.
> >>>>>
> >>>>> Since there is no dedicated driver for REFGEN, add vdda-refgen0p9-supply
> >>>>
> >>>> How does the driver matter for the bindings? If I add dedicated driver
> >>>> for refgen, then I change the bindings?
> >>>
> >>> Yeah, I know that dt-bindings should describe hardware, not software. But
> >>> what I meant to say is that the refgen is different from qref which is
> >>> controlled via TCSR registers and its LDOs are requested to vote in
> >>> tcsrcc driver. The refgen doesn't required register setting and it doesn't
> >>> have dedicated driver, so we vote its LDOs in phy driver. I will avoid
> >>> this statement in next version.
> >>
> >> I must admit, I could not find references to the refgen in any of Glymur
> >> PCIe-related HPGs.
> >>
> >>>
> >>>>
> >>>> There is qcom,sc8280xp-refgen-regulator so why there cannot be
> >>>> qcom,x1e-refgen-regulator?
> >>>
> >>> I think we can and it seems better because the refgen for pcie phy also
> >>> supplies reference voltage to other modules like usb. But I checked the
> >>> qcom-refgen-regulator.c, it contains some register settings and there is
> >>> no LDOs voting. I'm not sure what does those register do, maybe Konrad
> >>> can provide some backgroud.
> >>
> >> Those regs provide voting for refgen, because on those platforms DSI
> >> block doesn't have a hardware vote for refgen.
> > 
> > Hi Konrad, Dmitry
> > 
> > I tried to model the reference voltage as a fixed regulator but the fixed
> > regulator driver only supports a single vin-supply. However, the refgen
> > block requires two separate power supplies (1.2V and 0.9V LDOs).
> > 
> > Would it be appropriate to modify the qcom-refgen-regulator.c driver to
> > handle LDO voting for both the 1.2V and 0.9V supplies? In the regulator's
> > enable/disable callbacks, we could vote for and unvote these two LDOs
> > instead of performing register operations.
> 
> Wait, so you want to associate the MMIO-controlled refgen's driver with
> a dummy regulator that takes 2 supplies? I didn't catch that part earlier,
> that's not great..
> 
> Or do we actually have access to the MMIO of *this* refgen and can control

I can't find related info in any documentation.

> it (except we don't do that today because X Y Z)?
>

But even if we could find registers to enable/disable the refgen block,
the two LDOs (1.2V and 0.9V) would still need to be voted/unvoted manually
since they're separate power rails that feed the refgen.

I searched through the drivers/regulator/ directory and couldn't find any
existing examples where a regulator driver enables/disables other
regulators in its own enable/disable callbacks. This pattern doesn't seem
to be commonly used in the kernel.

So seems like we have to vote this two LDOs in phy driver.

- Qiang Yu
> Konrad

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

end of thread, other threads:[~2026-03-05  8:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-09  4:49 [PATCH 0/2] phy: qcom: qmp-pcie: Add vdda-refgen supply support for Glymur Qiang Yu
2026-02-09  4:49 ` [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply " Qiang Yu
2026-02-09  8:06   ` Krzysztof Kozlowski
2026-02-12  3:32     ` Qiang Yu
2026-02-12  9:23       ` Konrad Dybcio
2026-02-13 17:47       ` Dmitry Baryshkov
2026-02-24  6:41         ` Qiang Yu
2026-03-02 10:21         ` Qiang Yu
2026-03-02 13:35           ` Dmitry Baryshkov
2026-03-03 11:14           ` Konrad Dybcio
2026-03-05  8:57             ` Qiang Yu
2026-02-09  4:49 ` [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies " Qiang Yu
2026-02-09 13:15   ` Dmitry Baryshkov
2026-02-12  3:33     ` Qiang Yu
2026-02-13 17:48       ` Dmitry Baryshkov
2026-02-24  6:42         ` Qiang Yu

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

all inboxes | Powered by JetHome®