mbox series

[0/5] qcom: pm8150: add support for thermal monitoring

Message ID 20200621193549.2070434-1-dmitry.baryshkov@linaro.org
Headers show
Series qcom: pm8150: add support for thermal monitoring | expand

Message

Dmitry Baryshkov June 21, 2020, 7:35 p.m. UTC
This patch serie adds support for thermal monitoring block on Qualcomm's
PMIC5 chips. PM8150{,b,l} and sm8250-mtp board device trees are extended
to support thermal zones provided by this thermal monitoring block.

-- 
With best wishes
Dmitry

Comments

Rob Herring (Arm) June 29, 2020, 9:57 p.m. UTC | #1
On Sun, 21 Jun 2020 22:35:45 +0300, Dmitry Baryshkov wrote:
> Add bindings for thermal monitor, part of Qualcomm PMIC5 chips. It is a

> close counterpart of VADC part of those PMICs.

> 

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---

>  .../bindings/thermal/qcom-spmi-adc-tm5.yaml   | 143 ++++++++++++++++++

>  1 file changed, 143 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml

> 



My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml:  while scanning a block scalar
  in "<unicode string>", line 114, column 5
found a tab character where an indentation space is expected
  in "<unicode string>", line 115, column 1
Documentation/devicetree/bindings/Makefile:20: recipe for target 'Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.example.dts' failed
make[1]: *** [Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.example.dts] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:1347: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2


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

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

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.
Amit Kucheria June 30, 2020, 5:06 a.m. UTC | #2
Hi Dmitry,

On Mon, Jun 22, 2020 at 1:06 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>

> Port thermal zones definitions from msm-4.19 tree. Enable and add

> channel configuration to PMIC's ADC-TM definitions. Declare thermal

> zones and respective trip points.

>

> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---

>  arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 237 ++++++++++++++++++++++++

>  1 file changed, 237 insertions(+)

>

> diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts


IMO, this should be separated in the pmic dts file like we do for
other QC platforms since the PMICs tend to be used in multiple
platforms.

> index aa37eb112d85..78f0cf582a9a 100644

> --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts

> +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts

> @@ -24,6 +24,104 @@ chosen {

>                 stdout-path = "serial0:115200n8";

>         };

>

> +       thermal-zones {

> +               xo-therm {

> +                       polling-delay-passive = <0>;

> +                       polling-delay = <0>;

> +                       thermal-sensors = <&pm8150_adc_tm 0>;

> +                       trips {

> +                               active-config0 {

> +                                       temperature = <125000>;

> +                                       hysteresis = <1000>;

> +                                       type = "passive";

> +                               };

> +                       };

> +               };

> +
Dmitry Baryshkov June 30, 2020, 12:10 p.m. UTC | #3
Hi,

On Tue, 30 Jun 2020 at 08:06, Amit Kucheria <amit.kucheria@verdurent.com> wrote:
> On Mon, Jun 22, 2020 at 1:06 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> >
> > Port thermal zones definitions from msm-4.19 tree. Enable and add
> > channel configuration to PMIC's ADC-TM definitions. Declare thermal
> > zones and respective trip points.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 237 ++++++++++++++++++++++++
> >  1 file changed, 237 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
>
> IMO, this should be separated in the pmic dts file like we do for
> other QC platforms since the PMICs tend to be used in multiple
> platforms.

Unlike other PMIC/tsens thermal zones, these definitions are quite
specific to the board from my point of view.

> > index aa37eb112d85..78f0cf582a9a 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
> > +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts
> > @@ -24,6 +24,104 @@ chosen {
> >                 stdout-path = "serial0:115200n8";
> >         };
> >
> > +       thermal-zones {
> > +               xo-therm {
> > +                       polling-delay-passive = <0>;
> > +                       polling-delay = <0>;
> > +                       thermal-sensors = <&pm8150_adc_tm 0>;
> > +                       trips {
> > +                               active-config0 {
> > +                                       temperature = <125000>;
> > +                                       hysteresis = <1000>;
> > +                                       type = "passive";
> > +                               };
> > +                       };
> > +               };
> > +
Amit Kucheria July 1, 2020, 6:05 a.m. UTC | #4
On Tue, Jun 30, 2020 at 5:40 PM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>

> Hi,

>

> On Tue, 30 Jun 2020 at 08:06, Amit Kucheria <amit.kucheria@verdurent.com> wrote:

> > On Mon, Jun 22, 2020 at 1:06 AM Dmitry Baryshkov

> > <dmitry.baryshkov@linaro.org> wrote:

> > >

> > > Port thermal zones definitions from msm-4.19 tree. Enable and add

> > > channel configuration to PMIC's ADC-TM definitions. Declare thermal

> > > zones and respective trip points.

> > >

> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> > > ---

> > >  arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 237 ++++++++++++++++++++++++

> > >  1 file changed, 237 insertions(+)

> > >

> > > diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts

> >

> > IMO, this should be separated in the pmic dts file like we do for

> > other QC platforms since the PMICs tend to be used in multiple

> > platforms.

>

> Unlike other PMIC/tsens thermal zones, these definitions are quite

> specific to the board from my point of view.


How so? Can you describe what is different about this PMIC?

> > > index aa37eb112d85..78f0cf582a9a 100644

> > > --- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts

> > > +++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts

> > > @@ -24,6 +24,104 @@ chosen {

> > >                 stdout-path = "serial0:115200n8";

> > >         };

> > >

> > > +       thermal-zones {

> > > +               xo-therm {

> > > +                       polling-delay-passive = <0>;

> > > +                       polling-delay = <0>;

> > > +                       thermal-sensors = <&pm8150_adc_tm 0>;

> > > +                       trips {

> > > +                               active-config0 {

> > > +                                       temperature = <125000>;

> > > +                                       hysteresis = <1000>;

> > > +                                       type = "passive";

> > > +                               };

> > > +                       };

> > > +               };

> > > +