Skip to contentSkip to conversation

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

PATCH New Qiang Yu 1 participant 4 messages Dec 2

Subsystems (4)
lore
Share & tools
lore

Qiang Yu

author
#0 lore raw

v5 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.

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

Changes in v5:
- Rebase on latest linux-next master branch.
- Link to v4: https://lore.kernel.org/all/[email protected]/

Changes in v4:
- Add reviewed-by tags.
- Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Add vdda-refgen-* porperty in all glymur and mahua board.dts.
- Reword commit msg.
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Add dts patch in this series.
- Reword commit msg of dtbinding patch.
- Link to v1: https://lore.kernel.org/all/[email protected]/

---
Qiang Yu (3):
dt-bindings: phy: sc8280xp-qmp-pcie: Add vdda-refgen supply for Glymur
phy: qcom: qmp-pcie: Add vdda-refgen supplies for Glymur
arm64: dts: qcom: Add refgen supplies for PCIe PHY on Glymur and Mahua boards

 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml         | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/glymur-cob.dtsi                 |  6 ++++++
 arch/arm64/boot/dts/qcom/glymur-sip.dtsi                 |  6 ++++++
 arch/arm64/boot/dts/qcom/mahua-crd.dts                   |  2 ++
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c                 | 12 ++++++++----
 5 files changed, 38 insertions(+), 4 deletions(-)

---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261202-phyrefgen_1202-3d92ce403a59

Best regards,

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

PATCH v5 1/3 dt-bindings: phy: sc8280xp-qmp-pcie: Add vdda-refgen supply for Glymur

The PCIe QMP PHYs require a stable reference voltage provided by REFGEN, which in turn requires two separate LDOs to operate. Without these supplies, the PCIe PHY cannot work properly.

Add vdda-refgen0p9-supply and vdda-refgen1p2-supply properties. Mark them as required for the Glymur PCIe QMP PHYs for now, even though it breaks ABI; other platforms having the same requirement can be added later.

---
 .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +16 -0
index c0a3e1f160ad..f827abaf22ef 100644
@@ -104,6 +104,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
@@ -280,6 +284,18 @@ allOf:
         "#clock-cells":
           const: 0
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,glymur-qmp-gen4x2-pcie-phy
+              - qcom,glymur-qmp-gen5x4-pcie-phy
+    then:
+      required:
+        - vdda-refgen0p9-supply
+        - vdda-refgen1p2-supply
+
 examples:
   - |
     #include <dt-bindings/clock/qcom,gcc-sc8280xp.h>
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH v5 2/3 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 85c04c506743..e01791ab9267 100644
@@ -4106,6 +4106,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",
@@ -5555,8 +5559,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,
 
@@ -5571,8 +5575,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
author
#3 lore raw

PATCH v5 3/3 arm64: dts: qcom: Add refgen supplies for PCIe PHY on Glymur and Mahua boards

In reply to Qiang Yu

The PCIe PHYs on Glymur and Mahua require a reference voltage provided by REFGEN, which in turn is powered by two LDOs.

Since there is no devicetree node for REFGEN, add the vdda-refgen0p9 and vdda-refgen1p2 supplies for each PCIe PHY node.

---
 arch/arm64/boot/dts/qcom/glymur-cob.dtsi | 6 ++++++
 arch/arm64/boot/dts/qcom/glymur-sip.dtsi | 6 ++++++
 arch/arm64/boot/dts/qcom/mahua-crd.dts   | 2 ++
 3 files changed, 14 insertions(+)
arch/arm64/boot/dts/qcom/glymur-cob.dtsi +6 -0
index 5dd4ef0f5d72..0b9b186331b9 100644
@@ -204,6 +204,8 @@ &mdss_dp3_phy {
 &pcie4_phy {
 	vdda-phy-supply = <&vreg_l1c1>;
 	vdda-pll-supply = <&vreg_l4f1>;
+	vdda-refgen0p9-supply = <&vreg_l1c1>;
+	vdda-refgen1p2-supply = <&vreg_l4f1>;
 };
 
 &pcie3_phy {
@@ -217,11 +219,15 @@ &pcie3_phy {
 &pcie5_phy {
 	vdda-phy-supply = <&vreg_l2f0>;
 	vdda-pll-supply = <&vreg_l4h0>;
+	vdda-refgen0p9-supply = <&vreg_l2f0>;
+	vdda-refgen1p2-supply = <&vreg_l4h0>;
 };
 
 &pcie6_phy {
 	vdda-phy-supply = <&vreg_l1c1>;
 	vdda-pll-supply = <&vreg_l4f1>;
+	vdda-refgen0p9-supply = <&vreg_l1c1>;
+	vdda-refgen1p2-supply = <&vreg_l4f1>;
 };
 
 &smb2370_j_e2_eusb2_repeater {
arch/arm64/boot/dts/qcom/glymur-sip.dtsi +6 -0
index 4acc002a36ee..848faf8fc761 100644
@@ -193,6 +193,8 @@ &mdss_dp3_phy {
 &pcie4_phy {
 	vdda-phy-supply = <&vreg_l1c1>;
 	vdda-pll-supply = <&vreg_l4f1>;
+	vdda-refgen0p9-supply = <&vreg_l1c1>;
+	vdda-refgen1p2-supply = <&vreg_l4f1>;
 };
 
 &pcie3_phy {
@@ -206,11 +208,15 @@ &pcie3_phy {
 &pcie5_phy {
 	vdda-phy-supply = <&vreg_l2f0>;
 	vdda-pll-supply = <&vreg_l4c0>;
+	vdda-refgen0p9-supply = <&vreg_l2f0>;
+	vdda-refgen1p2-supply = <&vreg_l4c0>;
 };
 
 &pcie6_phy {
 	vdda-phy-supply = <&vreg_l1c1>;
 	vdda-pll-supply = <&vreg_l4f1>;
+	vdda-refgen0p9-supply = <&vreg_l1c1>;
+	vdda-refgen1p2-supply = <&vreg_l4f1>;
 };
 
 &smb2370_j_e2_eusb2_repeater {
arch/arm64/boot/dts/qcom/mahua-crd.dts +2 -0
index c8a1669e57f3..d743da4441fd 100644
@@ -16,4 +16,6 @@ / {
 &pcie3b_phy {
 	vdda-phy-supply = <&vreg_l3c1>;
 	vdda-pll-supply = <&vreg_l2c1>;
+	vdda-refgen0p9-supply = <&vreg_l1c1>;
+	vdda-refgen1p2-supply = <&vreg_l4f1>;
 };
Signature · 1 line
2.34.1