linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add missing vdd-supply for QUSB2 PHY
@ 2021-09-27  4:48 Shawn Guo
  2021-09-27  4:48 ` [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Shawn Guo @ 2021-09-27  4:48 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: Manu Gautam, 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.


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] 6+ messages in thread

* [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
  2021-09-27  4:48 [PATCH 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
@ 2021-09-27  4:48 ` Shawn Guo
  2021-09-27 12:23   ` Rob Herring
  2021-09-27 12:30   ` Shawn Guo
  2021-09-27  4:48 ` [PATCH 2/3] phy: qcom-qusb2: Add missing vdd supply Shawn Guo
  2021-09-27  4:48 ` [PATCH 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2 siblings, 2 replies; 6+ messages in thread
From: Shawn Guo @ 2021-09-27  4:48 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: Manu Gautam, 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 48ae604b2194..96e31f582fc9 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
@@ -51,6 +51,10 @@ properties:
       - const: ref
       - const: iface
 
+  vdda-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.
@@ -157,6 +161,7 @@ required:
   - "#phy-cells"
   - clocks
   - clock-names
+  - vdd-supply
   - vdda-pll-supply
   - vdda-phy-dpdm-supply
   - resets
@@ -175,6 +180,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] 6+ messages in thread

* [PATCH 2/3] phy: qcom-qusb2: Add missing vdd supply
  2021-09-27  4:48 [PATCH 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2021-09-27  4:48 ` [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
@ 2021-09-27  4:48 ` Shawn Guo
  2021-09-27  4:48 ` [PATCH 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2021-09-27  4:48 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: Manu Gautam, 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 ae063a8b3e28..7a8e4333babe 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] 6+ messages in thread

* [PATCH 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY
  2021-09-27  4:48 [PATCH 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
  2021-09-27  4:48 ` [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
  2021-09-27  4:48 ` [PATCH 2/3] phy: qcom-qusb2: Add missing vdd supply Shawn Guo
@ 2021-09-27  4:48 ` Shawn Guo
  2 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2021-09-27  4:48 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: Manu Gautam, 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] 6+ messages in thread

* Re: [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
  2021-09-27  4:48 ` [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
@ 2021-09-27 12:23   ` Rob Herring
  2021-09-27 12:30   ` Shawn Guo
  1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2021-09-27 12:23 UTC (permalink / raw)
  To: Shawn Guo
  Cc: devicetree, Vinod Koul, Jami Kettunen, Konrad Dybcio,
	Jeffrey Hugo, linux-phy, Bjorn Andersson, linux-arm-msm,
	AngeloGioacchino Del Regno, Manu Gautam, linux-kernel

On Mon, 27 Sep 2021 12:48:22 +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(+)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.example.dt.yaml: phy@7411000: 'vdd-supply' does not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1533177

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


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

* Re: [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply
  2021-09-27  4:48 ` [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
  2021-09-27 12:23   ` Rob Herring
@ 2021-09-27 12:30   ` Shawn Guo
  1 sibling, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2021-09-27 12:30 UTC (permalink / raw)
  To: Vinod Koul, Bjorn Andersson
  Cc: Manu Gautam, AngeloGioacchino Del Regno, Konrad Dybcio,
	Jeffrey Hugo, Jami Kettunen, linux-phy, devicetree,
	linux-arm-msm, linux-kernel

On Mon, Sep 27, 2021 at 12:48:22PM +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(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> index 48ae604b2194..96e31f582fc9 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml
> @@ -51,6 +51,10 @@ properties:
>        - const: ref
>        - const: iface
>  
> +  vdda-supply:

Oops, it should be `vdd-supply`.  Will fix it in v2.

Shawn

> +    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.
> @@ -157,6 +161,7 @@ required:
>    - "#phy-cells"
>    - clocks
>    - clock-names
> +  - vdd-supply
>    - vdda-pll-supply
>    - vdda-phy-dpdm-supply
>    - resets
> @@ -175,6 +180,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	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-27 12:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27  4:48 [PATCH 0/3] Add missing vdd-supply for QUSB2 PHY Shawn Guo
2021-09-27  4:48 ` [PATCH 1/3] dt-bindings: phy: qcom,qusb2: Add missing vdd-supply Shawn Guo
2021-09-27 12:23   ` Rob Herring
2021-09-27 12:30   ` Shawn Guo
2021-09-27  4:48 ` [PATCH 2/3] phy: qcom-qusb2: Add missing vdd supply Shawn Guo
2021-09-27  4:48 ` [PATCH 3/3] arm64: dts: qcom: Add missing vdd-supply for QUSB2 PHY Shawn Guo

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