Re: [PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-12-04 Thread Eduardo Valentin
On Tue, Dec 04, 2018 at 04:56:15PM +0530, Amit Kucheria wrote:
> On Thu, Nov 29, 2018 at 10:27 PM Eduardo Valentin  wrote:
> >
> > On Tue, Nov 27, 2018 at 09:59:07PM +0530, Amit Kucheria wrote:
> > > qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
> > > zone for each of those sensors to expose the temperature of each zone.
> > >
> > > Signed-off-by: Amit Kucheria 
> > > Reviewed-by: Vinod Koul 
> > > Tested-by: Vinod Koul 
> > > ---
> > >  arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
> > >  1 file changed, 206 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
> > > b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > > index 57d14d8f0c90..cbc3fd378893 100644
> > > --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > > @@ -30,6 +30,7 @@
> > >   reg = <0x100>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   CPU1: cpu@101 {
> > > @@ -38,6 +39,7 @@
> > >   reg = <0x101>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   CPU2: cpu@102 {
> > > @@ -46,6 +48,7 @@
> > >   reg = <0x102>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   CPU3: cpu@103 {
> > > @@ -54,6 +57,7 @@
> > >   reg = <0x103>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   L2_0: l2-cache {
> > > @@ -507,4 +511,206 @@
> > >   #interrupt-cells = <2>;
> > >   };
> > >   };
> > > +
> > > + thermal-zones {
> > > + aoss-thermal {
> > > + polling-delay-passive = <250>;
> > > + polling-delay = <1000>;
> > > +
> > > + thermal-sensors = < 0>;
> > > +
> > > + trips {
> > > + aoss_alert: trip0 {
> > > + temperature = <75000>;
> > > + hysteresis = <2000>;
> > > + type = "passive";
> >
> >
> > A passive trip and yet no cooling map associate to it..
> 
> Oops, was waiting for cpufreq to be enabled on the platform. I'll get
> rid of the trips for now.

Well, the expectation is to have a fully defined thermal zone. Without
trips or cooling maps they are not complete.

> 
> >
> > > + };
> > > + aoss_crit: trip1 {
> > > + temperature = <95000>;
> > > + hysteresis = <2000>;
> > > + type = "critical";
> > > + };
> > > + };
> > > + };
> > > +
> > > + dsp-thermal {
> > > + polling-delay-passive = <250>;
> > > + polling-delay = <1000>;
> > > +
> > > + thermal-sensors = < 1>;
> > > +
> > > + trips {
> > > + dsp_alert: trip0 {
> > > + temperature = <75000>;
> > > + hysteresis = <2000>;
> > > + type = "passive";
> > > + };
> > > + dsp_crit: trip1 {
> > > + temperature = <95000>;
> > > + hysteresis = <2000>;
> > > + type = "critical";
> > > + };
> > > + };
> > > + };
> > > +
> > > + lpass-thermal {
> > > + polling-delay-passive = <250>;
> > > + polling-delay = <1000>;
> > > +
> > > + thermal-sensors = < 2>;
> > > +
> > > + trips {
> > > + lpass_alert: trip0 {
> > > + temperature = <75000>;
> > > + hysteresis = <2000>;
> > > + type = "passive";
> > > + };
> > > + lpass_crit: trip1 {
> > > + temperature = <95000>;
> > > + hysteresis = <2000>;
> > > + type = "critical";
> 

Re: [PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-12-04 Thread Eduardo Valentin
On Tue, Dec 04, 2018 at 04:56:15PM +0530, Amit Kucheria wrote:
> On Thu, Nov 29, 2018 at 10:27 PM Eduardo Valentin  wrote:
> >
> > On Tue, Nov 27, 2018 at 09:59:07PM +0530, Amit Kucheria wrote:
> > > qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
> > > zone for each of those sensors to expose the temperature of each zone.
> > >
> > > Signed-off-by: Amit Kucheria 
> > > Reviewed-by: Vinod Koul 
> > > Tested-by: Vinod Koul 
> > > ---
> > >  arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
> > >  1 file changed, 206 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
> > > b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > > index 57d14d8f0c90..cbc3fd378893 100644
> > > --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > > @@ -30,6 +30,7 @@
> > >   reg = <0x100>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   CPU1: cpu@101 {
> > > @@ -38,6 +39,7 @@
> > >   reg = <0x101>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   CPU2: cpu@102 {
> > > @@ -46,6 +48,7 @@
> > >   reg = <0x102>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   CPU3: cpu@103 {
> > > @@ -54,6 +57,7 @@
> > >   reg = <0x103>;
> > >   enable-method = "psci";
> > >   next-level-cache = <_0>;
> > > + #cooling-cells= <2>;
> > >   };
> > >
> > >   L2_0: l2-cache {
> > > @@ -507,4 +511,206 @@
> > >   #interrupt-cells = <2>;
> > >   };
> > >   };
> > > +
> > > + thermal-zones {
> > > + aoss-thermal {
> > > + polling-delay-passive = <250>;
> > > + polling-delay = <1000>;
> > > +
> > > + thermal-sensors = < 0>;
> > > +
> > > + trips {
> > > + aoss_alert: trip0 {
> > > + temperature = <75000>;
> > > + hysteresis = <2000>;
> > > + type = "passive";
> >
> >
> > A passive trip and yet no cooling map associate to it..
> 
> Oops, was waiting for cpufreq to be enabled on the platform. I'll get
> rid of the trips for now.

Well, the expectation is to have a fully defined thermal zone. Without
trips or cooling maps they are not complete.

> 
> >
> > > + };
> > > + aoss_crit: trip1 {
> > > + temperature = <95000>;
> > > + hysteresis = <2000>;
> > > + type = "critical";
> > > + };
> > > + };
> > > + };
> > > +
> > > + dsp-thermal {
> > > + polling-delay-passive = <250>;
> > > + polling-delay = <1000>;
> > > +
> > > + thermal-sensors = < 1>;
> > > +
> > > + trips {
> > > + dsp_alert: trip0 {
> > > + temperature = <75000>;
> > > + hysteresis = <2000>;
> > > + type = "passive";
> > > + };
> > > + dsp_crit: trip1 {
> > > + temperature = <95000>;
> > > + hysteresis = <2000>;
> > > + type = "critical";
> > > + };
> > > + };
> > > + };
> > > +
> > > + lpass-thermal {
> > > + polling-delay-passive = <250>;
> > > + polling-delay = <1000>;
> > > +
> > > + thermal-sensors = < 2>;
> > > +
> > > + trips {
> > > + lpass_alert: trip0 {
> > > + temperature = <75000>;
> > > + hysteresis = <2000>;
> > > + type = "passive";
> > > + };
> > > + lpass_crit: trip1 {
> > > + temperature = <95000>;
> > > + hysteresis = <2000>;
> > > + type = "critical";
> 

Re: [PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-12-04 Thread Amit Kucheria
On Thu, Nov 29, 2018 at 10:27 PM Eduardo Valentin  wrote:
>
> On Tue, Nov 27, 2018 at 09:59:07PM +0530, Amit Kucheria wrote:
> > qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
> > zone for each of those sensors to expose the temperature of each zone.
> >
> > Signed-off-by: Amit Kucheria 
> > Reviewed-by: Vinod Koul 
> > Tested-by: Vinod Koul 
> > ---
> >  arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
> >  1 file changed, 206 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
> > b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > index 57d14d8f0c90..cbc3fd378893 100644
> > --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > @@ -30,6 +30,7 @@
> >   reg = <0x100>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   CPU1: cpu@101 {
> > @@ -38,6 +39,7 @@
> >   reg = <0x101>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   CPU2: cpu@102 {
> > @@ -46,6 +48,7 @@
> >   reg = <0x102>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   CPU3: cpu@103 {
> > @@ -54,6 +57,7 @@
> >   reg = <0x103>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   L2_0: l2-cache {
> > @@ -507,4 +511,206 @@
> >   #interrupt-cells = <2>;
> >   };
> >   };
> > +
> > + thermal-zones {
> > + aoss-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 0>;
> > +
> > + trips {
> > + aoss_alert: trip0 {
> > + temperature = <75000>;
> > + hysteresis = <2000>;
> > + type = "passive";
>
>
> A passive trip and yet no cooling map associate to it..

Oops, was waiting for cpufreq to be enabled on the platform. I'll get
rid of the trips for now.

>
> > + };
> > + aoss_crit: trip1 {
> > + temperature = <95000>;
> > + hysteresis = <2000>;
> > + type = "critical";
> > + };
> > + };
> > + };
> > +
> > + dsp-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 1>;
> > +
> > + trips {
> > + dsp_alert: trip0 {
> > + temperature = <75000>;
> > + hysteresis = <2000>;
> > + type = "passive";
> > + };
> > + dsp_crit: trip1 {
> > + temperature = <95000>;
> > + hysteresis = <2000>;
> > + type = "critical";
> > + };
> > + };
> > + };
> > +
> > + lpass-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 2>;
> > +
> > + trips {
> > + lpass_alert: trip0 {
> > + temperature = <75000>;
> > + hysteresis = <2000>;
> > + type = "passive";
> > + };
> > + lpass_crit: trip1 {
> > + temperature = <95000>;
> > + hysteresis = <2000>;
> > + type = "critical";
> > + };
> > + };
> > + };
> > +
> > + wlan-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 3>;
> > +
> > + trips {
> > + wlan_alert: trip0 {
> > +   

Re: [PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-12-04 Thread Amit Kucheria
On Thu, Nov 29, 2018 at 10:27 PM Eduardo Valentin  wrote:
>
> On Tue, Nov 27, 2018 at 09:59:07PM +0530, Amit Kucheria wrote:
> > qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
> > zone for each of those sensors to expose the temperature of each zone.
> >
> > Signed-off-by: Amit Kucheria 
> > Reviewed-by: Vinod Koul 
> > Tested-by: Vinod Koul 
> > ---
> >  arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
> >  1 file changed, 206 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
> > b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > index 57d14d8f0c90..cbc3fd378893 100644
> > --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > @@ -30,6 +30,7 @@
> >   reg = <0x100>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   CPU1: cpu@101 {
> > @@ -38,6 +39,7 @@
> >   reg = <0x101>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   CPU2: cpu@102 {
> > @@ -46,6 +48,7 @@
> >   reg = <0x102>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   CPU3: cpu@103 {
> > @@ -54,6 +57,7 @@
> >   reg = <0x103>;
> >   enable-method = "psci";
> >   next-level-cache = <_0>;
> > + #cooling-cells= <2>;
> >   };
> >
> >   L2_0: l2-cache {
> > @@ -507,4 +511,206 @@
> >   #interrupt-cells = <2>;
> >   };
> >   };
> > +
> > + thermal-zones {
> > + aoss-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 0>;
> > +
> > + trips {
> > + aoss_alert: trip0 {
> > + temperature = <75000>;
> > + hysteresis = <2000>;
> > + type = "passive";
>
>
> A passive trip and yet no cooling map associate to it..

Oops, was waiting for cpufreq to be enabled on the platform. I'll get
rid of the trips for now.

>
> > + };
> > + aoss_crit: trip1 {
> > + temperature = <95000>;
> > + hysteresis = <2000>;
> > + type = "critical";
> > + };
> > + };
> > + };
> > +
> > + dsp-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 1>;
> > +
> > + trips {
> > + dsp_alert: trip0 {
> > + temperature = <75000>;
> > + hysteresis = <2000>;
> > + type = "passive";
> > + };
> > + dsp_crit: trip1 {
> > + temperature = <95000>;
> > + hysteresis = <2000>;
> > + type = "critical";
> > + };
> > + };
> > + };
> > +
> > + lpass-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 2>;
> > +
> > + trips {
> > + lpass_alert: trip0 {
> > + temperature = <75000>;
> > + hysteresis = <2000>;
> > + type = "passive";
> > + };
> > + lpass_crit: trip1 {
> > + temperature = <95000>;
> > + hysteresis = <2000>;
> > + type = "critical";
> > + };
> > + };
> > + };
> > +
> > + wlan-thermal {
> > + polling-delay-passive = <250>;
> > + polling-delay = <1000>;
> > +
> > + thermal-sensors = < 3>;
> > +
> > + trips {
> > + wlan_alert: trip0 {
> > +   

Re: [PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-11-29 Thread Eduardo Valentin
On Tue, Nov 27, 2018 at 09:59:07PM +0530, Amit Kucheria wrote:
> qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
> zone for each of those sensors to expose the temperature of each zone.
> 
> Signed-off-by: Amit Kucheria 
> Reviewed-by: Vinod Koul 
> Tested-by: Vinod Koul 
> ---
>  arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
>  1 file changed, 206 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
> b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> index 57d14d8f0c90..cbc3fd378893 100644
> --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> @@ -30,6 +30,7 @@
>   reg = <0x100>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   CPU1: cpu@101 {
> @@ -38,6 +39,7 @@
>   reg = <0x101>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   CPU2: cpu@102 {
> @@ -46,6 +48,7 @@
>   reg = <0x102>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   CPU3: cpu@103 {
> @@ -54,6 +57,7 @@
>   reg = <0x103>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   L2_0: l2-cache {
> @@ -507,4 +511,206 @@
>   #interrupt-cells = <2>;
>   };
>   };
> +
> + thermal-zones {
> + aoss-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 0>;
> +
> + trips {
> + aoss_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";


A passive trip and yet no cooling map associate to it..

> + };
> + aoss_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> +
> + dsp-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 1>;
> +
> + trips {
> + dsp_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> + dsp_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> +
> + lpass-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 2>;
> +
> + trips {
> + lpass_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> + lpass_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> +
> + wlan-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 3>;
> +
> + trips {
> + wlan_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> + wlan_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type 

Re: [PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-11-29 Thread Eduardo Valentin
On Tue, Nov 27, 2018 at 09:59:07PM +0530, Amit Kucheria wrote:
> qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
> zone for each of those sensors to expose the temperature of each zone.
> 
> Signed-off-by: Amit Kucheria 
> Reviewed-by: Vinod Koul 
> Tested-by: Vinod Koul 
> ---
>  arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
>  1 file changed, 206 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
> b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> index 57d14d8f0c90..cbc3fd378893 100644
> --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> @@ -30,6 +30,7 @@
>   reg = <0x100>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   CPU1: cpu@101 {
> @@ -38,6 +39,7 @@
>   reg = <0x101>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   CPU2: cpu@102 {
> @@ -46,6 +48,7 @@
>   reg = <0x102>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   CPU3: cpu@103 {
> @@ -54,6 +57,7 @@
>   reg = <0x103>;
>   enable-method = "psci";
>   next-level-cache = <_0>;
> + #cooling-cells= <2>;
>   };
>  
>   L2_0: l2-cache {
> @@ -507,4 +511,206 @@
>   #interrupt-cells = <2>;
>   };
>   };
> +
> + thermal-zones {
> + aoss-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 0>;
> +
> + trips {
> + aoss_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";


A passive trip and yet no cooling map associate to it..

> + };
> + aoss_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> +
> + dsp-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 1>;
> +
> + trips {
> + dsp_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> + dsp_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> +
> + lpass-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 2>;
> +
> + trips {
> + lpass_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> + lpass_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type = "critical";
> + };
> + };
> + };
> +
> + wlan-thermal {
> + polling-delay-passive = <250>;
> + polling-delay = <1000>;
> +
> + thermal-sensors = < 3>;
> +
> + trips {
> + wlan_alert: trip0 {
> + temperature = <75000>;
> + hysteresis = <2000>;
> + type = "passive";
> + };
> + wlan_crit: trip1 {
> + temperature = <95000>;
> + hysteresis = <2000>;
> + type 

[PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-11-27 Thread Amit Kucheria
qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
zone for each of those sensors to expose the temperature of each zone.

Signed-off-by: Amit Kucheria 
Reviewed-by: Vinod Koul 
Tested-by: Vinod Koul 
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
 1 file changed, 206 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
b/arch/arm64/boot/dts/qcom/qcs404.dtsi
index 57d14d8f0c90..cbc3fd378893 100644
--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
@@ -30,6 +30,7 @@
reg = <0x100>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
CPU1: cpu@101 {
@@ -38,6 +39,7 @@
reg = <0x101>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
CPU2: cpu@102 {
@@ -46,6 +48,7 @@
reg = <0x102>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
CPU3: cpu@103 {
@@ -54,6 +57,7 @@
reg = <0x103>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
L2_0: l2-cache {
@@ -507,4 +511,206 @@
#interrupt-cells = <2>;
};
};
+
+   thermal-zones {
+   aoss-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 0>;
+
+   trips {
+   aoss_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   aoss_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   dsp-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 1>;
+
+   trips {
+   dsp_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   dsp_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   lpass-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 2>;
+
+   trips {
+   lpass_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   lpass_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   wlan-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 3>;
+
+   trips {
+   wlan_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   wlan_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   cluster-thermal {
+   polling-delay-passive = <250>;
+   

[PATCH v3 4/4] arm64: dts: qcom: qcs404: Add thermal zones for each sensor

2018-11-27 Thread Amit Kucheria
qcs404 has 10 sensors connected to the single TSENS IP. Define a thermal
zone for each of those sensors to expose the temperature of each zone.

Signed-off-by: Amit Kucheria 
Reviewed-by: Vinod Koul 
Tested-by: Vinod Koul 
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 206 +++
 1 file changed, 206 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi 
b/arch/arm64/boot/dts/qcom/qcs404.dtsi
index 57d14d8f0c90..cbc3fd378893 100644
--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
@@ -30,6 +30,7 @@
reg = <0x100>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
CPU1: cpu@101 {
@@ -38,6 +39,7 @@
reg = <0x101>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
CPU2: cpu@102 {
@@ -46,6 +48,7 @@
reg = <0x102>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
CPU3: cpu@103 {
@@ -54,6 +57,7 @@
reg = <0x103>;
enable-method = "psci";
next-level-cache = <_0>;
+   #cooling-cells= <2>;
};
 
L2_0: l2-cache {
@@ -507,4 +511,206 @@
#interrupt-cells = <2>;
};
};
+
+   thermal-zones {
+   aoss-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 0>;
+
+   trips {
+   aoss_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   aoss_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   dsp-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 1>;
+
+   trips {
+   dsp_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   dsp_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   lpass-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 2>;
+
+   trips {
+   lpass_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   lpass_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   wlan-thermal {
+   polling-delay-passive = <250>;
+   polling-delay = <1000>;
+
+   thermal-sensors = < 3>;
+
+   trips {
+   wlan_alert: trip0 {
+   temperature = <75000>;
+   hysteresis = <2000>;
+   type = "passive";
+   };
+   wlan_crit: trip1 {
+   temperature = <95000>;
+   hysteresis = <2000>;
+   type = "critical";
+   };
+   };
+   };
+
+   cluster-thermal {
+   polling-delay-passive = <250>;
+