devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone
@ 2024-06-25 20:16 Dmitry Baryshkov
  2024-06-25 21:43 ` Bryan O'Donoghue
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-06-25 20:16 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

Define the themal zones using the temperature values in stage1 for this
platform so that the spmi-temp-alarm driver becomes active.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8916.dtsi | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index 4b2e8fb47d2d..2def48f2d101 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -4,8 +4,37 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
 
-&spmi_bus {
+/ {
+	thermal-zones {
+		pm8150-thermal {
+			polling-delay-passive = <100>;
+
+			thermal-sensors = <&pm8916_temp>;
+
+			trips {
+				trip0 {
+					temperature = <105000>;
+					hysteresis = <0>;
+					type = "passive";
+				};
+
+				trip1 {
+					temperature = <125000>;
+					hysteresis = <0>;
+					type = "hot";
+				};
+
+				trip2 {
+					temperature = <145000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+		};
+	};
+};
 
+&spmi_bus {
 	pm8916_0: pmic@0 {
 		compatible = "qcom,pm8916", "qcom,spmi-pmic";
 		reg = <0x0 SPMI_USID>;

---
base-commit: 62c97045b8f720c2eac807a5f38e26c9ed512371
change-id: 20240625-pm8916-tz-c8dd606940dc

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone
  2024-06-25 20:16 [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone Dmitry Baryshkov
@ 2024-06-25 21:43 ` Bryan O'Donoghue
  2024-06-26  4:30 ` Bjorn Andersson
  2024-06-26  9:40 ` Konrad Dybcio
  2 siblings, 0 replies; 5+ messages in thread
From: Bryan O'Donoghue @ 2024-06-25 21:43 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 25/06/2024 21:16, Dmitry Baryshkov wrote:
> Define the themal zones using the temperature values in stage1 for this
> platform so that the spmi-temp-alarm driver becomes active.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/pm8916.dtsi | 31 ++++++++++++++++++++++++++++++-
>   1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> index 4b2e8fb47d2d..2def48f2d101 100644
> --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> @@ -4,8 +4,37 @@
>   #include <dt-bindings/interrupt-controller/irq.h>
>   #include <dt-bindings/spmi/spmi.h>
>   
> -&spmi_bus {
> +/ {
> +	thermal-zones {
> +		pm8150-thermal {
> +			polling-delay-passive = <100>;
> +
> +			thermal-sensors = <&pm8916_temp>;
> +
> +			trips {
> +				trip0 {
> +					temperature = <105000>;
> +					hysteresis = <0>;
> +					type = "passive";
> +				};
> +
> +				trip1 {
> +					temperature = <125000>;
> +					hysteresis = <0>;
> +					type = "hot";
> +				};
> +
> +				trip2 {
> +					temperature = <145000>;
> +					hysteresis = <0>;
> +					type = "critical";
> +				};
> +			};
> +		};
> +	};
> +};
145 c seemed amazingly hot to me but apparently this is the more 
conservative of the possible set.

https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.9.c26/Documentation/devicetree/bindings/thermal/qpnp-temp-alarm.txt?ref_type=heads#L28

Heating up even typing this email..

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone
  2024-06-25 20:16 [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone Dmitry Baryshkov
  2024-06-25 21:43 ` Bryan O'Donoghue
@ 2024-06-26  4:30 ` Bjorn Andersson
  2024-06-26  9:40 ` Konrad Dybcio
  2 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2024-06-26  4:30 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Dmitry Baryshkov
  Cc: linux-arm-msm, devicetree, linux-kernel


On Tue, 25 Jun 2024 23:16:18 +0300, Dmitry Baryshkov wrote:
> Define the themal zones using the temperature values in stage1 for this
> platform so that the spmi-temp-alarm driver becomes active.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: pm8916: add temp-alarm thermal zone
      commit: b7a28d8a7b80dd5630a72d8d8cb9f2d1bde6a1ad

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone
  2024-06-25 20:16 [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone Dmitry Baryshkov
  2024-06-25 21:43 ` Bryan O'Donoghue
  2024-06-26  4:30 ` Bjorn Andersson
@ 2024-06-26  9:40 ` Konrad Dybcio
  2024-06-26  9:41   ` Dmitry Baryshkov
  2 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2024-06-26  9:40 UTC (permalink / raw)
  To: Dmitry Baryshkov, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 25.06.2024 10:16 PM, Dmitry Baryshkov wrote:
> Define the themal zones using the temperature values in stage1 for this
> platform so that the spmi-temp-alarm driver becomes active.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/pm8916.dtsi | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> index 4b2e8fb47d2d..2def48f2d101 100644
> --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi

hmm

> @@ -4,8 +4,37 @@
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/spmi/spmi.h>
>  
> -&spmi_bus {
> +/ {
> +	thermal-zones {
> +		pm8150-thermal {

hmm

Konrad

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone
  2024-06-26  9:40 ` Konrad Dybcio
@ 2024-06-26  9:41   ` Dmitry Baryshkov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-06-26  9:41 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel

On Wed, 26 Jun 2024 at 12:40, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 25.06.2024 10:16 PM, Dmitry Baryshkov wrote:
> > Define the themal zones using the temperature values in stage1 for this
> > platform so that the spmi-temp-alarm driver becomes active.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/pm8916.dtsi | 31 ++++++++++++++++++++++++++++++-
> >  1 file changed, 30 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> > index 4b2e8fb47d2d..2def48f2d101 100644
> > --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
>
> hmm
>
> > @@ -4,8 +4,37 @@
> >  #include <dt-bindings/interrupt-controller/irq.h>
> >  #include <dt-bindings/spmi/spmi.h>
> >
> > -&spmi_bus {
> > +/ {
> > +     thermal-zones {
> > +             pm8150-thermal {
>
> hmm

Will fix in v2..

>
> Konrad



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-26  9:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 20:16 [PATCH] arm64: dts: qcom: pm8916: add temp-alarm thermal zone Dmitry Baryshkov
2024-06-25 21:43 ` Bryan O'Donoghue
2024-06-26  4:30 ` Bjorn Andersson
2024-06-26  9:40 ` Konrad Dybcio
2024-06-26  9:41   ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).