diff mbox series

[09/15] arm64: dts: qcom: sm8450-qrd: enable ufs nodes

Message ID 20211201072915.3969178-10-vkoul@kernel.org (mailing list archive)
State Superseded
Headers show
Series arm64: dts: qcom: Add support for SM8450 SoC and QRD board | expand

Commit Message

Vinod Koul Dec. 1, 2021, 7:29 a.m. UTC
Enable the UFS and phy node and add the regulators used by them.

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Konrad Dybcio Dec. 1, 2021, 3:18 p.m. UTC | #1
On 01.12.2021 08:29, Vinod Koul wrote:
> Enable the UFS and phy node and add the regulators used by them.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> index 218eb3ce1ee5..3e65d662ab8c 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> @@ -5,6 +5,7 @@
>  
>  /dts-v1/;
>  
> +#include <dt-bindings/gpio/gpio.h>

This should probably go to the SoC DTSI, as it's generally used

in every DT if you have anything more than serial console working..


Konrad
Vinod Koul Dec. 6, 2021, 5:58 a.m. UTC | #2
On 01-12-21, 16:18, Konrad Dybcio wrote:
> 
> On 01.12.2021 08:29, Vinod Koul wrote:
> > Enable the UFS and phy node and add the regulators used by them.
> >
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> > index 218eb3ce1ee5..3e65d662ab8c 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> > +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> > @@ -5,6 +5,7 @@
> >  
> >  /dts-v1/;
> >  
> > +#include <dt-bindings/gpio/gpio.h>
> 
> This should probably go to the SoC DTSI, as it's generally used
> 
> in every DT if you have anything more than serial console working..

But arent the gpios added in board dts typically? I am okay either
way... Bjorn where would you like this to be..?
Seems like we have this is both board as well as SoC DTS
> 
> 
> Konrad
Bjorn Andersson Dec. 7, 2021, 3:01 p.m. UTC | #3
On Sun 05 Dec 21:58 PST 2021, Vinod Koul wrote:

> On 01-12-21, 16:18, Konrad Dybcio wrote:
> > 
> > On 01.12.2021 08:29, Vinod Koul wrote:
> > > Enable the UFS and phy node and add the regulators used by them.
> > >
> > > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > > ---
> > >  arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 21 +++++++++++++++++++++
> > >  1 file changed, 21 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> > > index 218eb3ce1ee5..3e65d662ab8c 100644
> > > --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> > > +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
> > > @@ -5,6 +5,7 @@
> > >  
> > >  /dts-v1/;
> > >  
> > > +#include <dt-bindings/gpio/gpio.h>
> > 
> > This should probably go to the SoC DTSI, as it's generally used
> > 
> > in every DT if you have anything more than serial console working..
> 
> But arent the gpios added in board dts typically? I am okay either
> way... Bjorn where would you like this to be..?
> Seems like we have this is both board as well as SoC DTS

I like Konrad's suggestion of putting it in the dtsi, simply because it
saves us from including it in every board file - where it will be needed.

Regards,
Bjorn

> > 
> > 
> > Konrad
> 
> -- 
> ~Vinod
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
index 218eb3ce1ee5..3e65d662ab8c 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts
@@ -5,6 +5,7 @@ 
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm8450.dtsi"
 
@@ -353,3 +354,23 @@  &tlmm {
 &uart7 {
 	status = "okay";
 };
+
+&ufs_mem_hc {
+	status = "okay";
+
+	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&vreg_l7b_2p5>;
+	vcc-max-microamp = <1100000>;
+	vccq-supply = <&vreg_l9b_1p2>;
+	vccq-max-microamp = <1200000>;
+};
+
+&ufs_mem_phy {
+	status = "okay";
+
+	vdda-phy-supply = <&vreg_l5b_0p88>;
+	vdda-pll-supply = <&vreg_l6b_1p2>;
+	vdda-max-microamp = <173000>;
+	vdda-pll-max-microamp = <24900>;
+};