linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY
@ 2021-09-28  2:19 Shawn Guo
  2021-09-28  2:20 ` [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Shawn Guo @ 2021-09-28  2:19 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Jeffrey Hugo,
	Jami Kettunen, linux-phy, devicetree, linux-arm-msm,
	linux-kernel, Shawn Guo

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


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

* [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
  2021-09-28  2:19 [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
@ 2021-09-28  2:20 ` Shawn Guo
  2021-10-04 18:24   ` Rob Herring
  2021-09-28  2:20 ` [PATCH v2 2/3] phy: qcom-qusb2: Add missing vdd supply Shawn Guo
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Shawn Guo @ 2021-09-28  2:20 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Jeffrey Hugo,
	Jami Kettunen, linux-phy, devicetree, linux-arm-msm,
	linux-kernel, Shawn Guo

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 <shawn.guo@linaro.org>
---
 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


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

* [PATCH v2 2/3] phy: qcom-qusb2: Add missing vdd supply
  2021-09-28  2:19 [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2021-09-28  2:20 ` [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
@ 2021-09-28  2:20 ` Shawn Guo
  2021-09-28  2:20 ` [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2021-10-01  8:16 ` [PATCH v2 0/3] " Vinod Koul
  3 siblings, 0 replies; 10+ messages in thread
From: Shawn Guo @ 2021-09-28  2:20 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Jeffrey Hugo,
	Jami Kettunen, linux-phy, devicetree, linux-arm-msm,
	linux-kernel, Shawn Guo

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 <shawn.guo@linaro.org>
---
 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


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

* [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY
  2021-09-28  2:19 [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2021-09-28  2:20 ` [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
  2021-09-28  2:20 ` [PATCH v2 2/3] phy: qcom-qusb2: Add missing vdd supply Shawn Guo
@ 2021-09-28  2:20 ` Shawn Guo
  2021-10-05  7:49   ` Vinod Koul
  2021-11-20 23:55   ` (subset) " Bjorn Andersson
  2021-10-01  8:16 ` [PATCH v2 0/3] " Vinod Koul
  3 siblings, 2 replies; 10+ messages in thread
From: Shawn Guo @ 2021-09-28  2:20 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: AngeloGioacchino Del Regno, Konrad Dybcio, Jeffrey Hugo,
	Jami Kettunen, linux-phy, devicetree, linux-arm-msm,
	linux-kernel, Shawn Guo

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

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 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


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

* Re: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY
  2021-09-28  2:19 [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
                   ` (2 preceding siblings ...)
  2021-09-28  2:20 ` [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
@ 2021-10-01  8:16 ` Vinod Koul
  2021-10-04  3:01   ` Shawn Guo
  3 siblings, 1 reply; 10+ messages in thread
From: Vinod Koul @ 2021-10-01  8:16 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Bjorn Andersson, AngeloGioacchino Del Regno, Konrad Dybcio,
	Jeffrey Hugo, Jami Kettunen, linux-phy, devicetree,
	linux-arm-msm, linux-kernel

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

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

* Re: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY
  2021-10-01  8:16 ` [PATCH v2 0/3] " Vinod Koul
@ 2021-10-04  3:01   ` Shawn Guo
  2021-10-05  7:47     ` Vinod Koul
  0 siblings, 1 reply; 10+ messages in thread
From: Shawn Guo @ 2021-10-04  3:01 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Bjorn Andersson, AngeloGioacchino Del Regno, Konrad Dybcio,
	Jeffrey Hugo, Jami Kettunen, linux-phy, devicetree,
	linux-arm-msm, linux-kernel

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

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

* Re: [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
  2021-09-28  2:20 ` [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
@ 2021-10-04 18:24   ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2021-10-04 18:24 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Jami Kettunen, Jeffrey Hugo, AngeloGioacchino Del Regno,
	linux-arm-msm, devicetree, Konrad Dybcio, linux-phy,
	Bjorn Andersson, linux-kernel, Vinod Koul

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 <shawn.guo@linaro.org>
> ---
>  Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY
  2021-10-04  3:01   ` Shawn Guo
@ 2021-10-05  7:47     ` Vinod Koul
  0 siblings, 0 replies; 10+ messages in thread
From: Vinod Koul @ 2021-10-05  7:47 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Bjorn Andersson, AngeloGioacchino Del Regno, Konrad Dybcio,
	Jeffrey Hugo, Jami Kettunen, linux-phy, devicetree,
	linux-arm-msm, linux-kernel

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

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

* Re: [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY
  2021-09-28  2:20 ` [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
@ 2021-10-05  7:49   ` Vinod Koul
  2021-11-20 23:55   ` (subset) " Bjorn Andersson
  1 sibling, 0 replies; 10+ messages in thread
From: Vinod Koul @ 2021-10-05  7:49 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Bjorn Andersson, AngeloGioacchino Del Regno, Konrad Dybcio,
	Jeffrey Hugo, Jami Kettunen, linux-phy, devicetree,
	linux-arm-msm, linux-kernel

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 <vkoul@kernel.org>

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

-- 
~Vinod

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

* Re: (subset) [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY
  2021-09-28  2:20 ` [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2021-10-05  7:49   ` Vinod Koul
@ 2021-11-20 23:55   ` Bjorn Andersson
  1 sibling, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2021-11-20 23:55 UTC (permalink / raw)
  To: Vinod Koul, Shawn Guo
  Cc: linux-arm-msm, Konrad Dybcio, linux-kernel, devicetree,
	Jami Kettunen, Jeffrey Hugo, AngeloGioacchino Del Regno,
	linux-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 <bjorn.andersson@linaro.org>

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

end of thread, other threads:[~2021-11-20 23:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  2:19 [PATCH v2 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
2021-09-28  2:20 ` [PATCH v2 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
2021-10-04 18:24   ` Rob Herring
2021-09-28  2:20 ` [PATCH v2 2/3] phy: qcom-qusb2: Add missing vdd supply Shawn Guo
2021-09-28  2:20 ` [PATCH v2 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
2021-10-05  7:49   ` Vinod Koul
2021-11-20 23:55   ` (subset) " Bjorn Andersson
2021-10-01  8:16 ` [PATCH v2 0/3] " Vinod Koul
2021-10-04  3:01   ` Shawn Guo
2021-10-05  7:47     ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).