[2/2] arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node

Message ID 20221116125112.2788318-3-abel.vesa@linaro.org
State New
Headers
Series arm64: dts: qcom: sm8550: Add UFS HC and PHY |

Commit Message

Abel Vesa Nov. 16, 2022, 12:51 p.m. UTC
  Enable UFS host controller and PHY node on SM8550 MTP board.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
  

Comments

Konrad Dybcio Nov. 16, 2022, 12:56 p.m. UTC | #1
On 16/11/2022 13:51, Abel Vesa wrote:
> Enable UFS host controller and PHY node on SM8550 MTP board.
> 
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
> index d4c8d5b2497e..fef7793a7dec 100644
> --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
> @@ -417,3 +417,25 @@ data-pins {
>   &uart7 {
>   	status = "okay";
>   };
> +
> +&ufs_mem_hc {
> +	status = "okay";
Status last, please.

> +
> +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
> +
> +	vcc-supply = <&vreg_l17b_2p5>;
> +	vcc-max-microamp = <1300000>;
All these -microamp properties are downstream and do not exist in the 
mainline kernel. Remove them.

Konrad
> +	vccq-supply = <&vreg_l1g_1p2>;
> +	vccq-max-microamp = <1200000>;
> +	vccq2-supply = <&vreg_l3g_1p2>;
> +	vccq2-max-microamp = <100>;
> +};
> +
> +&ufs_mem_phy {
> +	status = "okay";
> +
> +	vdda-phy-supply = <&vreg_l1d_0p88>;
> +	vdda-phy-max-microamp = <188000>;
> +	vdda-pll-supply = <&vreg_l3e_1p2>;
> +	vdda-pll-max-microamp = <18300>;
> +};
  
Abel Vesa Nov. 22, 2022, 8:51 p.m. UTC | #2
On 22-11-16 13:56:36, Konrad Dybcio wrote:
> 
> 
> On 16/11/2022 13:51, Abel Vesa wrote:
> > Enable UFS host controller and PHY node on SM8550 MTP board.
> > 
> > Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> > ---
> >   arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 22 ++++++++++++++++++++++
> >   1 file changed, 22 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
> > index d4c8d5b2497e..fef7793a7dec 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
> > +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
> > @@ -417,3 +417,25 @@ data-pins {
> >   &uart7 {
> >   	status = "okay";
> >   };
> > +
> > +&ufs_mem_hc {
> > +	status = "okay";
> Status last, please.

Yep. Will do.

> 
> > +
> > +	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
> > +
> > +	vcc-supply = <&vreg_l17b_2p5>;
> > +	vcc-max-microamp = <1300000>;
> All these -microamp properties are downstream and do not exist in the
> mainline kernel. Remove them.
> 

Actually, ufshcd-qcom complains if they are missing:

[    3.287836] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: unable
to find vcc-max-microamp
[    3.331904] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: unable
to find vccq-max-microamp
[    3.346766] ufshcd-qcom 1d84000.ufshc: ufshcd_populate_vreg: unable
to find vccq2-max-microamp

> Konrad
> > +	vccq-supply = <&vreg_l1g_1p2>;
> > +	vccq-max-microamp = <1200000>;
> > +	vccq2-supply = <&vreg_l3g_1p2>;
> > +	vccq2-max-microamp = <100>;
> > +};
> > +
> > +&ufs_mem_phy {
> > +	status = "okay";
> > +
> > +	vdda-phy-supply = <&vreg_l1d_0p88>;
> > +	vdda-phy-max-microamp = <188000>;

These ones from PHY I can drop, since the driver won't complain.

> > +	vdda-pll-supply = <&vreg_l3e_1p2>;
> > +	vdda-pll-max-microamp = <18300>;
> > +};
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
index d4c8d5b2497e..fef7793a7dec 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
@@ -417,3 +417,25 @@  data-pins {
 &uart7 {
 	status = "okay";
 };
+
+&ufs_mem_hc {
+	status = "okay";
+
+	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&vreg_l17b_2p5>;
+	vcc-max-microamp = <1300000>;
+	vccq-supply = <&vreg_l1g_1p2>;
+	vccq-max-microamp = <1200000>;
+	vccq2-supply = <&vreg_l3g_1p2>;
+	vccq2-max-microamp = <100>;
+};
+
+&ufs_mem_phy {
+	status = "okay";
+
+	vdda-phy-supply = <&vreg_l1d_0p88>;
+	vdda-phy-max-microamp = <188000>;
+	vdda-pll-supply = <&vreg_l3e_1p2>;
+	vdda-pll-max-microamp = <18300>;
+};