2021-09-28 02:22:27

by Shawn Guo

[permalink] [raw]
Subject: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY

The series adds missing vdd-supply for QUSB2 PHY which is required for
digital circuit. The driver works right now likely because firmware
already sets it up. Add it to bindings, driver and DTS that miss the
supply.

It should not cause problem for existing DTBs:
- SC7180, SDM630, SDM845 based platforms already specified vdd-supply
in the DTBs.
- MSM8996 and MSM8998 platform DTBs miss vdd-supply, but dummy regulator
will ensure QUSB2 PHY driver works as before on these platforms.

Changes for v2:
- Correct copy & paste error on vdd-supply name in bindings doc.


Shawn Guo (3):
dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
phy: qcom-qusb2: Add missing vdd supply
arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY

Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 6 ++++++
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 2 ++
arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 1 +
drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +-
6 files changed, 12 insertions(+), 1 deletion(-)

--
2.17.1


2021-09-28 02:23:09

by Shawn Guo

[permalink] [raw]
Subject: [PATCH v2 2/3] phy: qcom-qusb2: Add missing vdd supply

Per downstream kernel, beside vdda-pll and vdda-phy-dpdm, vdd is also a
required supply for QUSB2 PHY digital circuit operation. The driver
works right now likely because firmware already sets it up. Add it for
correctness and completeness.

Signed-off-by: Shawn Guo <[email protected]>
---
drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
index 3c1d3b71c825..02845e08dac0 100644
--- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
+++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
@@ -371,7 +371,7 @@ static const struct qusb2_phy_cfg sm6115_phy_cfg = {
};

static const char * const qusb2_phy_vreg_names[] = {
- "vdda-pll", "vdda-phy-dpdm",
+ "vdd", "vdda-pll", "vdda-phy-dpdm",
};

#define QUSB2_NUM_VREGS ARRAY_SIZE(qusb2_phy_vreg_names)
--
2.17.1

2021-09-28 02:23:41

by Shawn Guo

[permalink] [raw]
Subject: [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply

Besides vdda-pll and vdda-phy-dpdm, vdd-supply is a required supply for
PHY digital circuit operation. Add it for correctness and completeness.

Signed-off-by: Shawn Guo <[email protected]>
---
Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
index ec9ccaaba098..e49fa4ce18c8 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
@@ -50,6 +50,10 @@ properties:
- const: ref
- const: iface

+ vdd-supply:
+ description:
+ Phandle to 0.9V regulator supply to PHY digital circuit.
+
vdda-pll-supply:
description:
Phandle to 1.8V regulator supply to PHY refclk pll block.
@@ -156,6 +160,7 @@ required:
- "#phy-cells"
- clocks
- clock-names
+ - vdd-supply
- vdda-pll-supply
- vdda-phy-dpdm-supply
- resets
@@ -174,6 +179,7 @@ examples:
<&gcc GCC_RX1_USB2_CLKREF_CLK>;
clock-names = "cfg_ahb", "ref";

+ vdd-supply = <&pm8994_l28>;
vdda-pll-supply = <&pm8994_l12>;
vdda-phy-dpdm-supply = <&pm8994_l24>;

--
2.17.1

2021-09-28 02:25:02

by Shawn Guo

[permalink] [raw]
Subject: [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY

QUSB2 PHY requires vdd-supply for digital circuit operation. Add it for
platforms that miss it.

Signed-off-by: Shawn Guo <[email protected]>
---
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 2 ++
arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 1 +
arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 1 +
4 files changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
index 51e17094d7b1..d9826ce27e50 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
@@ -230,6 +230,7 @@
&hsusb_phy1 {
status = "okay";

+ vdd-supply = <&vreg_l28a_0p925>;
vdda-pll-supply = <&vreg_l12a_1p8>;
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
};
@@ -237,6 +238,7 @@
&hsusb_phy2 {
status = "okay";

+ vdd-supply = <&vreg_l28a_0p925>;
vdda-pll-supply = <&vreg_l12a_1p8>;
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
};
diff --git a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
index 507396c4d23b..61ea6d4ef8ac 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi
@@ -184,6 +184,7 @@
&hsusb_phy1 {
status = "okay";

+ vdd-supply = <&pm8994_l28>;
vdda-pll-supply = <&pm8994_l12>;
vdda-phy-dpdm-supply = <&pm8994_l24>;
};
diff --git a/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi b/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
index 125d7923d713..4f823974559b 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
@@ -102,6 +102,7 @@
&qusb2phy {
status = "okay";

+ vdd-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l12a_1p8>;
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
};
diff --git a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi
index 0f5c7828a901..243f4ee5da8c 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi
@@ -260,6 +260,7 @@
&qusb2phy {
status = "okay";

+ vdd-supply = <&vreg_l1a_0p875>;
vdda-pll-supply = <&vreg_l12a_1p8>;
vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
};
--
2.17.1

2021-10-01 08:19:03

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY

Hi Shawn,

On 28-09-21, 10:19, Shawn Guo wrote:
> The series adds missing vdd-supply for QUSB2 PHY which is required for
> digital circuit. The driver works right now likely because firmware
> already sets it up. Add it to bindings, driver and DTS that miss the
> supply.
>
> It should not cause problem for existing DTBs:
> - SC7180, SDM630, SDM845 based platforms already specified vdd-supply
> in the DTBs.
> - MSM8996 and MSM8998 platform DTBs miss vdd-supply, but dummy regulator
> will ensure QUSB2 PHY driver works as before on these platforms.

What about the rest.. I checked SM8350 and SM8250 mtp ones are missing
this. With the property made mandatory, I guess it would cause these to
fail right..

>
> Changes for v2:
> - Correct copy & paste error on vdd-supply name in bindings doc.
>
>
> Shawn Guo (3):
> dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
> phy: qcom-qusb2: Add missing vdd supply
> arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY
>
> Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 6 ++++++
> arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 2 ++
> arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone.dtsi | 1 +
> arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 1 +
> arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 1 +
> drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +-
> 6 files changed, 12 insertions(+), 1 deletion(-)
>
> --
> 2.17.1

--
~Vinod

2021-10-04 03:16:38

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY

Hi Vinod,

On Fri, Oct 01, 2021 at 01:46:23PM +0530, Vinod Koul wrote:
> Hi Shawn,
>
> On 28-09-21, 10:19, Shawn Guo wrote:
> > The series adds missing vdd-supply for QUSB2 PHY which is required for
> > digital circuit. The driver works right now likely because firmware
> > already sets it up. Add it to bindings, driver and DTS that miss the
> > supply.
> >
> > It should not cause problem for existing DTBs:
> > - SC7180, SDM630, SDM845 based platforms already specified vdd-supply
> > in the DTBs.
> > - MSM8996 and MSM8998 platform DTBs miss vdd-supply, but dummy regulator
> > will ensure QUSB2 PHY driver works as before on these platforms.
>
> What about the rest.. I checked SM8350 and SM8250 mtp ones are missing
> this. With the property made mandatory, I guess it would cause these to
> fail right..

From what I can see, SM8350 and SM8250 use qcom-snps-femto-v2 PHY
rather than qcom-qusb2. So they should not be affected by this series.

Shawn

2021-10-04 23:29:57

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply

On Tue, 28 Sep 2021 10:20:00 +0800, Shawn Guo wrote:
> Besides vdda-pll and vdda-phy-dpdm, vdd-supply is a required supply for
> PHY digital circuit operation. Add it for correctness and completeness.
>
> Signed-off-by: Shawn Guo <[email protected]>
> ---
> Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>

Reviewed-by: Rob Herring <[email protected]>

2021-10-05 07:50:12

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY

On 04-10-21, 11:01, Shawn Guo wrote:
> Hi Vinod,
>
> On Fri, Oct 01, 2021 at 01:46:23PM +0530, Vinod Koul wrote:
> > Hi Shawn,
> >
> > On 28-09-21, 10:19, Shawn Guo wrote:
> > > The series adds missing vdd-supply for QUSB2 PHY which is required for
> > > digital circuit. The driver works right now likely because firmware
> > > already sets it up. Add it to bindings, driver and DTS that miss the
> > > supply.
> > >
> > > It should not cause problem for existing DTBs:
> > > - SC7180, SDM630, SDM845 based platforms already specified vdd-supply
> > > in the DTBs.
> > > - MSM8996 and MSM8998 platform DTBs miss vdd-supply, but dummy regulator
> > > will ensure QUSB2 PHY driver works as before on these platforms.
> >
> > What about the rest.. I checked SM8350 and SM8250 mtp ones are missing
> > this. With the property made mandatory, I guess it would cause these to
> > fail right..
>
> >From what I can see, SM8350 and SM8250 use qcom-snps-femto-v2 PHY
> rather than qcom-qusb2. So they should not be affected by this series.

Right, somehow I seem to have overlooked that part :(

I am applying this now, thanks

--
~Vinod

2021-10-05 07:52:17

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY

On 28-09-21, 10:20, Shawn Guo wrote:
> QUSB2 PHY requires vdd-supply for digital circuit operation. Add it for
> platforms that miss it.


Acked-By: Vinod Koul <[email protected]>

Bjorn, I have picked 1,2 feel free to pick this

--
~Vinod

2021-11-20 23:56:19

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY

On Tue, 28 Sep 2021 10:20:02 +0800, Shawn Guo wrote:
> QUSB2 PHY requires vdd-supply for digital circuit operation. Add it for
> platforms that miss it.
>
>

Applied, thanks!

[3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY
commit: 5663ca59bb4f1dfd2501f2af0bfdca93c4d47b3a

Best regards,
--
Bjorn Andersson <[email protected]>