All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: dts: qcom: sm8350-sagami: UFS phy - add 'vdda-pll-supply' & 'vdda-phy-supply'
@ 2022-04-14 12:29 Bhupesh Sharma
  2022-04-14 14:11 ` Marijn Suijten
  0 siblings, 1 reply; 3+ messages in thread
From: Bhupesh Sharma @ 2022-04-14 12:29 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: bhupesh.sharma, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, bjorn.andersson, konrad.dybcio, Vinod Koul

As suggested by Bjorn during review of [1], the vdda-pll-supply' &
'vdda-phy-supply' supplies denote the power for the bus and the
clock of the UFS PHY.

For pdx215 to have a functional UFS, these two supplies seem mandatory.
So, its safe to assume that the two regulators are the same as on
the MTP. So let's wire them up in the same way as the MTP.

In absence of the same 'make dtbs_check' leads to following warnings:

arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dt.yaml:
 phy-wrapper@88e9000: 'vdda-phy-supply' is a required property

arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dt.yaml:
 phy-wrapper@88e9000: 'vdda-pll-supply' is a required property

[1]. https://lore.kernel.org/lkml/20220228123019.382037-9-bhupesh.sharma@linaro.org/

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: konrad.dybcio@somainline.org
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
 .../dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index 90b13cbe2fa6..238ac9380ca2 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -3,6 +3,7 @@
  * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
  */
 
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm8350.dtsi"
 #include "pm8350.dtsi"
 #include "pm8350b.dtsi"
@@ -75,6 +76,27 @@ ramoops@ffc00000 {
 	};
 };
 
+&apps_rsc {
+	pm8350-rpmh-regulators {
+		compatible = "qcom,pm8350-rpmh-regulators";
+		qcom,pmic-id = "b";
+
+		vreg_l1b_0p88: ldo1 {
+			regulator-name = "vreg_l1b_0p88";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <920000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6b_1p2: ldo6 {
+			regulator-name = "vreg_l6b_1p2";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1208000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+};
+
 &adsp {
 	status = "okay";
 	firmware-name = "qcom/adsp.mbn";
@@ -256,4 +278,7 @@ &usb_1_hsphy {
 
 &usb_1_qmpphy {
 	status = "okay";
+
+	vdda-phy-supply = <&vreg_l6b_1p2>;
+	vdda-pll-supply = <&vreg_l1b_0p88>;
 };
-- 
2.35.1


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

* Re: [PATCH 1/1] arm64: dts: qcom: sm8350-sagami: UFS phy - add 'vdda-pll-supply' & 'vdda-phy-supply'
  2022-04-14 12:29 [PATCH 1/1] arm64: dts: qcom: sm8350-sagami: UFS phy - add 'vdda-pll-supply' & 'vdda-phy-supply' Bhupesh Sharma
@ 2022-04-14 14:11 ` Marijn Suijten
  2022-04-18 10:39   ` Bhupesh Sharma
  0 siblings, 1 reply; 3+ messages in thread
From: Marijn Suijten @ 2022-04-14 14:11 UTC (permalink / raw)
  To: Bhupesh Sharma
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, bjorn.andersson, konrad.dybcio, Vinod Koul,
	AngeloGioacchino Del Regno, Martin Botka

On 2022-04-14 17:59:28, Bhupesh Sharma wrote:
> As suggested by Bjorn during review of [1], the vdda-pll-supply' &
> 'vdda-phy-supply' supplies denote the power for the bus and the
> clock of the UFS PHY.
> 
> For pdx215 to have a functional UFS [..] safe to assume [..]

By "functional" you are referring to sending a certain UFS command that
accidentally wipes the bootloader [1] [2], turning the device into a
_very_ expensive (+$1000) paperweight?

[1]: https://lore.kernel.org/lkml/20211111184630.605035-1-konrad.dybcio@somainline.org/
[2]: https://github.com/kholk/kernel/commit/2e7a9ee1c91a016baa0b826a7752ec45663a0561

> In absence of the same 'make dtbs_check' leads to following warnings:
> 
> arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dt.yaml:
>  phy-wrapper@88e9000: 'vdda-phy-supply' is a required property
> 
> arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dt.yaml:
>  phy-wrapper@88e9000: 'vdda-pll-supply' is a required property
> 
> [1]. https://lore.kernel.org/lkml/20220228123019.382037-9-bhupesh.sharma@linaro.org/
> 
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: konrad.dybcio@somainline.org
> Cc: Vinod Koul <vkoul@kernel.org>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> ---
>  .../dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 25 +++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> index 90b13cbe2fa6..238ac9380ca2 100644
> --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
>   */
>  
> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>  #include "sm8350.dtsi"
>  #include "pm8350.dtsi"
>  #include "pm8350b.dtsi"
> @@ -75,6 +76,27 @@ ramoops@ffc00000 {
>  	};
>  };
>  
> +&apps_rsc {
> +	pm8350-rpmh-regulators {
> +		compatible = "qcom,pm8350-rpmh-regulators";
> +		qcom,pmic-id = "b";
> +
> +		vreg_l1b_0p88: ldo1 {
> +			regulator-name = "vreg_l1b_0p88";
> +			regulator-min-microvolt = <912000>;
> +			regulator-max-microvolt = <920000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +
> +		vreg_l6b_1p2: ldo6 {
> +			regulator-name = "vreg_l6b_1p2";
> +			regulator-min-microvolt = <1200000>;
> +			regulator-max-microvolt = <1208000>;
> +			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> +		};
> +	};
> +};
> +
>  &adsp {
>  	status = "okay";
>  	firmware-name = "qcom/adsp.mbn";
> @@ -256,4 +278,7 @@ &usb_1_hsphy {
>  
>  &usb_1_qmpphy {
>  	status = "okay";
> +
> +	vdda-phy-supply = <&vreg_l6b_1p2>;
> +	vdda-pll-supply = <&vreg_l1b_0p88>;

I'm probably understanding your patch wrong, but this is the USB phy,
not the UFS phy?  The warning from dtbs_check on `phy-wrapper@88e9000`
is also the `qmp-usb3-phy`, not the `qmp-ufs-phy` - seems this patch has
little to do with UFS after all?

>  };
> -- 
> 2.35.1
> 

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

* Re: [PATCH 1/1] arm64: dts: qcom: sm8350-sagami: UFS phy - add 'vdda-pll-supply' & 'vdda-phy-supply'
  2022-04-14 14:11 ` Marijn Suijten
@ 2022-04-18 10:39   ` Bhupesh Sharma
  0 siblings, 0 replies; 3+ messages in thread
From: Bhupesh Sharma @ 2022-04-18 10:39 UTC (permalink / raw)
  To: Marijn Suijten
  Cc: linux-arm-msm, bhupesh.linux, agross, linux-kernel, devicetree,
	robh+dt, bjorn.andersson, konrad.dybcio, Vinod Koul,
	AngeloGioacchino Del Regno, Martin Botka

On Thu, 14 Apr 2022 at 19:41, Marijn Suijten
<marijn.suijten@somainline.org> wrote:
>
> On 2022-04-14 17:59:28, Bhupesh Sharma wrote:
> > As suggested by Bjorn during review of [1], the vdda-pll-supply' &
> > 'vdda-phy-supply' supplies denote the power for the bus and the
> > clock of the UFS PHY.
> >
> > For pdx215 to have a functional UFS [..] safe to assume [..]
>
> By "functional" you are referring to sending a certain UFS command that
> accidentally wipes the bootloader [1] [2], turning the device into a
> _very_ expensive (+$1000) paperweight?
>
> [1]: https://lore.kernel.org/lkml/20211111184630.605035-1-konrad.dybcio@somainline.org/
> [2]: https://github.com/kholk/kernel/commit/2e7a9ee1c91a016baa0b826a7752ec45663a0561
>
> > In absence of the same 'make dtbs_check' leads to following warnings:
> >
> > arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dt.yaml:
> >  phy-wrapper@88e9000: 'vdda-phy-supply' is a required property
> >
> > arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami-pdx215.dt.yaml:
> >  phy-wrapper@88e9000: 'vdda-pll-supply' is a required property
> >
> > [1]. https://lore.kernel.org/lkml/20220228123019.382037-9-bhupesh.sharma@linaro.org/
> >
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: konrad.dybcio@somainline.org
> > Cc: Vinod Koul <vkoul@kernel.org>
> > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
> > ---
> >  .../dts/qcom/sm8350-sony-xperia-sagami.dtsi   | 25 +++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> > index 90b13cbe2fa6..238ac9380ca2 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> > @@ -3,6 +3,7 @@
> >   * Copyright (c) 2021, Konrad Dybcio <konrad.dybcio@somainline.org>
> >   */
> >
> > +#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
> >  #include "sm8350.dtsi"
> >  #include "pm8350.dtsi"
> >  #include "pm8350b.dtsi"
> > @@ -75,6 +76,27 @@ ramoops@ffc00000 {
> >       };
> >  };
> >
> > +&apps_rsc {
> > +     pm8350-rpmh-regulators {
> > +             compatible = "qcom,pm8350-rpmh-regulators";
> > +             qcom,pmic-id = "b";
> > +
> > +             vreg_l1b_0p88: ldo1 {
> > +                     regulator-name = "vreg_l1b_0p88";
> > +                     regulator-min-microvolt = <912000>;
> > +                     regulator-max-microvolt = <920000>;
> > +                     regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> > +             };
> > +
> > +             vreg_l6b_1p2: ldo6 {
> > +                     regulator-name = "vreg_l6b_1p2";
> > +                     regulator-min-microvolt = <1200000>;
> > +                     regulator-max-microvolt = <1208000>;
> > +                     regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> > +             };
> > +     };
> > +};
> > +
> >  &adsp {
> >       status = "okay";
> >       firmware-name = "qcom/adsp.mbn";
> > @@ -256,4 +278,7 @@ &usb_1_hsphy {
> >
> >  &usb_1_qmpphy {
> >       status = "okay";
> > +
> > +     vdda-phy-supply = <&vreg_l6b_1p2>;
> > +     vdda-pll-supply = <&vreg_l1b_0p88>;
>
> I'm probably understanding your patch wrong, but this is the USB phy,
> not the UFS phy?  The warning from dtbs_check on `phy-wrapper@88e9000`
> is also the `qmp-usb3-phy`, not the `qmp-ufs-phy` - seems this patch has
> little to do with UFS after all?

Indeed, it should be the qmp USB3 phy, instead.. my bad.. I will fix it in v2.

Do you see any issues with enabling these two regulators in the
'sm8350-sony-xperia-sagami-pdx215' dts?

Thanks,
Bhupesh

> >  };
> > --
> > 2.35.1
> >

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

end of thread, other threads:[~2022-04-18 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14 12:29 [PATCH 1/1] arm64: dts: qcom: sm8350-sagami: UFS phy - add 'vdda-pll-supply' & 'vdda-phy-supply' Bhupesh Sharma
2022-04-14 14:11 ` Marijn Suijten
2022-04-18 10:39   ` Bhupesh Sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.