Re: [PATCH v2 2/2] arm64: dts: qcom: msm8998: Add rpm and regulators for MTP

2018-05-07 Thread Bjorn Andersson
On Mon 07 May 16:04 PDT 2018, Stephen Boyd wrote:

> Quoting Bjorn Andersson (2018-04-27 22:42:48)
> > diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi 
> > b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> > index d6665e4f801f..ccbf6347aacb 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> > @@ -220,6 +220,16 @@
> > method = "smc";
> > };
> >  
> > +   rpm_glink: rpm-glink {
> > +   compatible = "qcom,glink-rpm";
> > +
> > +   interrupts = ;
> > +
> > +   qcom,rpm-msg-ram = <_msg_ram>;
> > +
> > +   mboxes = <_glb 0>;
> 
> Why so many newlines?
> 

No particular reason...

> > +   };
> > +
> > soc: soc {};
> >  };
> >  
> > @@ -337,4 +347,77 @@
> > #interrupt-cells = <4>;
> > cell-index = <0>;
> > };
> > +
> > +   rpm_msg_ram: memory@68000 {
> 
> unit address doesn't match reg property.
> 

Doh...

> > +   compatible = "qcom,rpm-msg-ram";
> > +   reg = <0x778000 0x7000>;
> > +   };
[..]
> > +_glink {
> > +   rpm_requests {
> > +   compatible = "qcom,rpm-msm8998";
> > +   qcom,glink-channels = "rpm_requests";
> > +
> > +   pm8998-regulators {
> > +   compatible = "qcom,rpm-pm8998-regulators";
> > +
> > +   pm8998_s1: s1 {};
[..]
> > +   pm8998_lvs2: lvs2 {};
> 
> What's the benefit to having the nodes here instead of in each board?
> 

That's how we've done it in the previous boards, but I had a discussion
regarding this with Doug the other day and agree that it might make
sense to just leave them out.

In particular Doug wanted to use labels based on names in the schematics
for his board...

> > +   };
> > +
> > +   pmi8998-regulators {
> > +   compatible = "qcom,rpm-pmi8998-regulators";
> > +
> > +   pmi8998_bob: bob {};
> > +   };
> 
> These may be board specific? So each regulator container would need
> status = "disabled" and then status = "okay" in the board file.
> 

Right, we haven't really seen the need for this before, but it seems to
make more sense to move all regulators and their references to the board
file.

Regards,
Bjorn


Re: [PATCH v2 2/2] arm64: dts: qcom: msm8998: Add rpm and regulators for MTP

2018-05-07 Thread Bjorn Andersson
On Mon 07 May 16:04 PDT 2018, Stephen Boyd wrote:

> Quoting Bjorn Andersson (2018-04-27 22:42:48)
> > diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi 
> > b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> > index d6665e4f801f..ccbf6347aacb 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> > @@ -220,6 +220,16 @@
> > method = "smc";
> > };
> >  
> > +   rpm_glink: rpm-glink {
> > +   compatible = "qcom,glink-rpm";
> > +
> > +   interrupts = ;
> > +
> > +   qcom,rpm-msg-ram = <_msg_ram>;
> > +
> > +   mboxes = <_glb 0>;
> 
> Why so many newlines?
> 

No particular reason...

> > +   };
> > +
> > soc: soc {};
> >  };
> >  
> > @@ -337,4 +347,77 @@
> > #interrupt-cells = <4>;
> > cell-index = <0>;
> > };
> > +
> > +   rpm_msg_ram: memory@68000 {
> 
> unit address doesn't match reg property.
> 

Doh...

> > +   compatible = "qcom,rpm-msg-ram";
> > +   reg = <0x778000 0x7000>;
> > +   };
[..]
> > +_glink {
> > +   rpm_requests {
> > +   compatible = "qcom,rpm-msm8998";
> > +   qcom,glink-channels = "rpm_requests";
> > +
> > +   pm8998-regulators {
> > +   compatible = "qcom,rpm-pm8998-regulators";
> > +
> > +   pm8998_s1: s1 {};
[..]
> > +   pm8998_lvs2: lvs2 {};
> 
> What's the benefit to having the nodes here instead of in each board?
> 

That's how we've done it in the previous boards, but I had a discussion
regarding this with Doug the other day and agree that it might make
sense to just leave them out.

In particular Doug wanted to use labels based on names in the schematics
for his board...

> > +   };
> > +
> > +   pmi8998-regulators {
> > +   compatible = "qcom,rpm-pmi8998-regulators";
> > +
> > +   pmi8998_bob: bob {};
> > +   };
> 
> These may be board specific? So each regulator container would need
> status = "disabled" and then status = "okay" in the board file.
> 

Right, we haven't really seen the need for this before, but it seems to
make more sense to move all regulators and their references to the board
file.

Regards,
Bjorn


Re: [PATCH v2 2/2] arm64: dts: qcom: msm8998: Add rpm and regulators for MTP

2018-05-07 Thread Stephen Boyd
Quoting Bjorn Andersson (2018-04-27 22:42:48)
> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi 
> b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> index d6665e4f801f..ccbf6347aacb 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> @@ -220,6 +220,16 @@
> method = "smc";
> };
>  
> +   rpm_glink: rpm-glink {
> +   compatible = "qcom,glink-rpm";
> +
> +   interrupts = ;
> +
> +   qcom,rpm-msg-ram = <_msg_ram>;
> +
> +   mboxes = <_glb 0>;

Why so many newlines?

> +   };
> +
> soc: soc {};
>  };
>  
> @@ -337,4 +347,77 @@
> #interrupt-cells = <4>;
> cell-index = <0>;
> };
> +
> +   rpm_msg_ram: memory@68000 {

unit address doesn't match reg property.

> +   compatible = "qcom,rpm-msg-ram";
> +   reg = <0x778000 0x7000>;
> +   };
> +
> +   apcs_glb: mailbox@982 {

unit address doesn't match reg property.

> +   compatible = "qcom,msm8998-apcs-hmss-global";
> +   reg = <0x17911000 0x1000>;
> +
> +   #mbox-cells = <1>;
> +   };
> +};
> +
> +_glink {
> +   rpm_requests {
> +   compatible = "qcom,rpm-msm8998";
> +   qcom,glink-channels = "rpm_requests";
> +
> +   pm8998-regulators {
> +   compatible = "qcom,rpm-pm8998-regulators";
> +
> +   pm8998_s1: s1 {};
> +   pm8998_s2: s2 {};
> +   pm8998_s3: s3 {};
> +   pm8998_s4: s4 {};
> +   pm8998_s5: s5 {};
> +   pm8998_s6: s6 {};
> +   pm8998_s7: s7 {};
> +   pm8998_s8: s8 {};
> +   pm8998_s9: s9 {};
> +   pm8998_s10: s10 {};
> +   pm8998_s11: s11 {};
> +   pm8998_s12: s12 {};
> +   pm8998_s13: s13 {};
> +   pm8998_l1: l1 {};
> +   pm8998_l2: l2 {};
> +   pm8998_l3: l3 {};
> +   pm8998_l4: l4 {};
> +   pm8998_l5: l5 {};
> +   pm8998_l6: l6 {};
> +   pm8998_l7: l7 {};
> +   pm8998_l8: l8 {};
> +   pm8998_l9: l9 {};
> +   pm8998_l10: l10 {};
> +   pm8998_l11: l11 {};
> +   pm8998_l12: l12 {};
> +   pm8998_l13: l13 {};
> +   pm8998_l14: l14 {};
> +   pm8998_l15: l15 {};
> +   pm8998_l16: l16 {};
> +   pm8998_l17: l17 {};
> +   pm8998_l18: l18 {};
> +   pm8998_l19: l19 {};
> +   pm8998_l20: l20 {};
> +   pm8998_l21: l21 {};
> +   pm8998_l22: l22 {};
> +   pm8998_l23: l23 {};
> +   pm8998_l24: l24 {};
> +   pm8998_l25: l25 {};
> +   pm8998_l26: l26 {};
> +   pm8998_l27: l27 {};
> +   pm8998_l28: l28 {};
> +   pm8998_lvs1: lvs1 {};
> +   pm8998_lvs2: lvs2 {};

What's the benefit to having the nodes here instead of in each board?

> +   };
> +
> +   pmi8998-regulators {
> +   compatible = "qcom,rpm-pmi8998-regulators";
> +
> +   pmi8998_bob: bob {};
> +   };

These may be board specific? So each regulator container would need
status = "disabled" and then status = "okay" in the board file.



Re: [PATCH v2 2/2] arm64: dts: qcom: msm8998: Add rpm and regulators for MTP

2018-05-07 Thread Stephen Boyd
Quoting Bjorn Andersson (2018-04-27 22:42:48)
> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi 
> b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> index d6665e4f801f..ccbf6347aacb 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> @@ -220,6 +220,16 @@
> method = "smc";
> };
>  
> +   rpm_glink: rpm-glink {
> +   compatible = "qcom,glink-rpm";
> +
> +   interrupts = ;
> +
> +   qcom,rpm-msg-ram = <_msg_ram>;
> +
> +   mboxes = <_glb 0>;

Why so many newlines?

> +   };
> +
> soc: soc {};
>  };
>  
> @@ -337,4 +347,77 @@
> #interrupt-cells = <4>;
> cell-index = <0>;
> };
> +
> +   rpm_msg_ram: memory@68000 {

unit address doesn't match reg property.

> +   compatible = "qcom,rpm-msg-ram";
> +   reg = <0x778000 0x7000>;
> +   };
> +
> +   apcs_glb: mailbox@982 {

unit address doesn't match reg property.

> +   compatible = "qcom,msm8998-apcs-hmss-global";
> +   reg = <0x17911000 0x1000>;
> +
> +   #mbox-cells = <1>;
> +   };
> +};
> +
> +_glink {
> +   rpm_requests {
> +   compatible = "qcom,rpm-msm8998";
> +   qcom,glink-channels = "rpm_requests";
> +
> +   pm8998-regulators {
> +   compatible = "qcom,rpm-pm8998-regulators";
> +
> +   pm8998_s1: s1 {};
> +   pm8998_s2: s2 {};
> +   pm8998_s3: s3 {};
> +   pm8998_s4: s4 {};
> +   pm8998_s5: s5 {};
> +   pm8998_s6: s6 {};
> +   pm8998_s7: s7 {};
> +   pm8998_s8: s8 {};
> +   pm8998_s9: s9 {};
> +   pm8998_s10: s10 {};
> +   pm8998_s11: s11 {};
> +   pm8998_s12: s12 {};
> +   pm8998_s13: s13 {};
> +   pm8998_l1: l1 {};
> +   pm8998_l2: l2 {};
> +   pm8998_l3: l3 {};
> +   pm8998_l4: l4 {};
> +   pm8998_l5: l5 {};
> +   pm8998_l6: l6 {};
> +   pm8998_l7: l7 {};
> +   pm8998_l8: l8 {};
> +   pm8998_l9: l9 {};
> +   pm8998_l10: l10 {};
> +   pm8998_l11: l11 {};
> +   pm8998_l12: l12 {};
> +   pm8998_l13: l13 {};
> +   pm8998_l14: l14 {};
> +   pm8998_l15: l15 {};
> +   pm8998_l16: l16 {};
> +   pm8998_l17: l17 {};
> +   pm8998_l18: l18 {};
> +   pm8998_l19: l19 {};
> +   pm8998_l20: l20 {};
> +   pm8998_l21: l21 {};
> +   pm8998_l22: l22 {};
> +   pm8998_l23: l23 {};
> +   pm8998_l24: l24 {};
> +   pm8998_l25: l25 {};
> +   pm8998_l26: l26 {};
> +   pm8998_l27: l27 {};
> +   pm8998_l28: l28 {};
> +   pm8998_lvs1: lvs1 {};
> +   pm8998_lvs2: lvs2 {};

What's the benefit to having the nodes here instead of in each board?

> +   };
> +
> +   pmi8998-regulators {
> +   compatible = "qcom,rpm-pmi8998-regulators";
> +
> +   pmi8998_bob: bob {};
> +   };

These may be board specific? So each regulator container would need
status = "disabled" and then status = "okay" in the board file.



[PATCH v2 2/2] arm64: dts: qcom: msm8998: Add rpm and regulators for MTP

2018-04-27 Thread Bjorn Andersson
This adds the rpm and rpm regulators to the msm8998 platform and mtp.

Signed-off-by: Bjorn Andersson 
---
 arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 142 ++
 arch/arm64/boot/dts/qcom/msm8998.dtsi |  83 +
 2 files changed, 225 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi 
b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
index e30c95f63a05..4780751b560e 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
@@ -18,3 +18,145 @@
status = "okay";
};
 };
+
+_glink {
+   rpm_requests {
+   pm8998-regulators {
+   s2 {
+   regulator-min-microvolt = <1128000>;
+   regulator-max-microvolt = <1128000>;
+   };
+   s3 {
+   regulator-min-microvolt = <1352000>;
+   regulator-max-microvolt = <1352000>;
+   };
+   s4 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   s5 {
+   regulator-min-microvolt = <1904000>;
+   regulator-max-microvolt = <204>;
+   };
+   s7 {
+   regulator-min-microvolt = <90>;
+   regulator-max-microvolt = <1028000>;
+   };
+   s8 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <80>;
+   };
+   l1 {
+   regulator-min-microvolt = <88>;
+   regulator-max-microvolt = <88>;
+   };
+   l2 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   };
+   l3 {
+   regulator-min-microvolt = <100>;
+   regulator-max-microvolt = <100>;
+   };
+   l5 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <80>;
+   };
+   l6 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <1808000>;
+   };
+   l7 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   l8 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   };
+   l9 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <296>;
+   };
+   l10 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <296>;
+   };
+   l11 {
+   regulator-min-microvolt = <100>;
+   regulator-max-microvolt = <100>;
+   };
+   l12 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   l13 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <296>;
+   };
+   l14 {
+   regulator-min-microvolt = <188>;
+   regulator-max-microvolt = <188>;
+   };
+   l15 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   l16 {
+   regulator-min-microvolt = <2704000>;
+   regulator-max-microvolt = <2704000>;
+   };
+   l17 {
+   regulator-min-microvolt = <1304000>;
+   regulator-max-microvolt = <1304000>;
+   };
+   l18 {
+ 

[PATCH v2 2/2] arm64: dts: qcom: msm8998: Add rpm and regulators for MTP

2018-04-27 Thread Bjorn Andersson
This adds the rpm and rpm regulators to the msm8998 platform and mtp.

Signed-off-by: Bjorn Andersson 
---
 arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 142 ++
 arch/arm64/boot/dts/qcom/msm8998.dtsi |  83 +
 2 files changed, 225 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi 
b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
index e30c95f63a05..4780751b560e 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi
@@ -18,3 +18,145 @@
status = "okay";
};
 };
+
+_glink {
+   rpm_requests {
+   pm8998-regulators {
+   s2 {
+   regulator-min-microvolt = <1128000>;
+   regulator-max-microvolt = <1128000>;
+   };
+   s3 {
+   regulator-min-microvolt = <1352000>;
+   regulator-max-microvolt = <1352000>;
+   };
+   s4 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   s5 {
+   regulator-min-microvolt = <1904000>;
+   regulator-max-microvolt = <204>;
+   };
+   s7 {
+   regulator-min-microvolt = <90>;
+   regulator-max-microvolt = <1028000>;
+   };
+   s8 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <80>;
+   };
+   l1 {
+   regulator-min-microvolt = <88>;
+   regulator-max-microvolt = <88>;
+   };
+   l2 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   };
+   l3 {
+   regulator-min-microvolt = <100>;
+   regulator-max-microvolt = <100>;
+   };
+   l5 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <80>;
+   };
+   l6 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <1808000>;
+   };
+   l7 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   l8 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   };
+   l9 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <296>;
+   };
+   l10 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <296>;
+   };
+   l11 {
+   regulator-min-microvolt = <100>;
+   regulator-max-microvolt = <100>;
+   };
+   l12 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   l13 {
+   regulator-min-microvolt = <1808000>;
+   regulator-max-microvolt = <296>;
+   };
+   l14 {
+   regulator-min-microvolt = <188>;
+   regulator-max-microvolt = <188>;
+   };
+   l15 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   };
+   l16 {
+   regulator-min-microvolt = <2704000>;
+   regulator-max-microvolt = <2704000>;
+   };
+   l17 {
+   regulator-min-microvolt = <1304000>;
+   regulator-max-microvolt = <1304000>;
+   };
+   l18 {
+