Skip to contentSkip to conversation

phy: qcom: qmp-pcie: Add vdda-refgen supply support for Glymur

PATCH Superseded Qiang Yu 4 participants 16 messages Feb 9 – Mar 5

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Qiang Yu

author
#0 lore raw

cover phy: qcom: qmp-pcie: Add vdda-refgen supply support for Glymur

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.

---
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,

Signature · 1 line
Qiang Yu <[email protected]>
author
#1 lore raw

PATCH 1/2 dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

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.

---
 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml     | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +20 -0
index 82316aa5e15f2bde9c32c112876dd820f9450e94..5f60b472264d54b714538c869a095e620b0eba2d 100644
@@ -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>
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

Quoted 5 lines · 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

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?

Quoted 3 lines

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

author
#3 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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.

Quoted 3 lines

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

Quoted 9 lines
Quoted 5 lines

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

#4 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

Quoted 22 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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.

Quoted 3 lines

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

Quoted 8 lines

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

#5 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

In reply to Qiang Yu
Quoted 11 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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

Quoted 6 lines

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.

Quoted 10 lines
Quoted 4 lines

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.

Quoted 15 lines

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

Quoted 9 lines
Quoted 5 lines

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

Signature · 2 lines
With best wishes
Dmitry
author
#6 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

Quoted 19 lines · Dmitry Baryshkov
Quoted 11 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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

Quoted 6 lines

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.

Quoted 2 lines

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.

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

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

Quoted 9 lines
Quoted 5 lines

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

Quoted 19 lines
Quoted 15 lines

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

Quoted 9 lines
Quoted 5 lines

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

Signature · 2 lines
With best wishes
Dmitry
author
#7 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

In reply to Dmitry Baryshkov
Quoted 27 lines · Dmitry Baryshkov
Quoted 11 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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

Quoted 6 lines

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.

Quoted 5 lines
Quoted 4 lines

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

Quoted 8 lines
Quoted 5 lines

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

Quoted 20 lines
Quoted 16 lines

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

Quoted 9 lines
Quoted 5 lines

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

Signature · 2 lines
With best wishes
Dmitry
#8 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

Quoted 34 lines · Qiang Yu
Quoted 33 lines · Dmitry Baryshkov
Quoted 11 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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

Quoted 6 lines

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.

Quoted 10 lines
Quoted 4 lines

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.

Quoted 8 lines
Quoted 2 lines

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?

Quoted 4 lines

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.

Quoted 16 lines
Quoted 16 lines
Quoted 12 lines

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.

Quoted 7 lines
Quoted 3 lines

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

Signature · 2 lines
With best wishes
Dmitry
Signature · 2 lines
With best wishes
Dmitry
#9 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

In reply to Qiang Yu
Quoted 39 lines · Qiang Yu
Quoted 27 lines · Dmitry Baryshkov
Quoted 11 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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

Quoted 6 lines

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.

Quoted 5 lines
Quoted 4 lines

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

Quoted 8 lines
Quoted 5 lines

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

Quoted 8 lines

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

author
#10 lore raw

Re: [PATCH 1/2] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: Add vdda-refgen supply for Glymur

Quoted 49 lines · Konrad Dybcio
Quoted 39 lines · Qiang Yu
Quoted 27 lines · Dmitry Baryshkov
Quoted 11 lines · Qiang Yu
Quoted 9 lines · Krzysztof Kozlowski
Quoted 5 lines · 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

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

Quoted 6 lines

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.

Quoted 5 lines
Quoted 4 lines

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

Quoted 8 lines
Quoted 5 lines

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

Quoted 8 lines

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.

Quoted 5 lines

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.

Quoted 2 lines

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

Quoted 1 line

Konrad

author
#11 lore raw

PATCH 2/2 phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur

In reply to 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.

---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +8 -4
index fed2fc9bb31108d51f88d34f3379c7744681f485..b24ed260f30a689b5668f38c1471c0ab2aced0cc 100644
@@ -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,
 
Signature · 1 line
2.34.1
#12 lore raw

Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur

Quoted 6 lines · 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.

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

Quoted 6 lines
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
author
#13 lore raw

Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur

Quoted 10 lines · Dmitry Baryshkov
Quoted 6 lines · 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.

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

Quoted 10 lines
Quoted 6 lines
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#14 lore raw

Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur

Quoted 7 lines · Qiang Yu
Quoted 6 lines · Dmitry Baryshkov
Quoted 5 lines · 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.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

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.

Quoted 12 lines

- Qiang Yu

Quoted 10 lines
Quoted 6 lines
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
Signature · 2 lines
With best wishes
Dmitry
author
#15 lore raw

Re: [PATCH 2/2] phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur

Quoted 10 lines · Dmitry Baryshkov
Quoted 9 lines · Qiang Yu
Quoted 8 lines · Dmitry Baryshkov
Quoted 6 lines · 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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

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

Quoted 16 lines
Quoted 12 lines

- Qiang Yu

Quoted 10 lines
Quoted 6 lines
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
Signature · 2 lines
With best wishes
Dmitry