linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: pm8953: Add thermal zone
@ 2023-06-25 11:13 Luca Weiss
  2023-06-26  9:46 ` Konrad Dybcio
  2023-07-10  5:07 ` Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Weiss @ 2023-06-25 11:13 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Luca Weiss

Define the themal zones using the temperature values found in the
downstream 4.9 sources so that the spmi-temp-alarm driver becomes
active.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
 arch/arm64/boot/dts/qcom/pm8953.dtsi | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8953.dtsi b/arch/arm64/boot/dts/qcom/pm8953.dtsi
index 2268daf27fa7..d2dfc1699174 100644
--- a/arch/arm64/boot/dts/qcom/pm8953.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8953.dtsi
@@ -6,6 +6,37 @@
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/spmi/spmi.h>
 
+/ {
+	thermal-zones {
+		pm8953-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&pm8953_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 {
 	pmic@0 {
 		compatible = "qcom,pm8953", "qcom,spmi-pmic";
@@ -36,7 +67,7 @@ pm8953_resin: resin {
 			};
 		};
 
-		temp-alarm@2400 {
+		pm8953_temp: temp-alarm@2400 {
 			compatible = "qcom,spmi-temp-alarm";
 			reg = <0x2400>;
 			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;

---
base-commit: 8d2be868b42c08290509c60515865f4de24ea704
change-id: 20230625-pm8953-thermal-fc3b2deeeb7b

Best regards,
-- 
Luca Weiss <luca@z3ntu.xyz>


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

* Re: [PATCH] arm64: dts: qcom: pm8953: Add thermal zone
  2023-06-25 11:13 [PATCH] arm64: dts: qcom: pm8953: Add thermal zone Luca Weiss
@ 2023-06-26  9:46 ` Konrad Dybcio
  2023-07-10  5:07 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2023-06-26  9:46 UTC (permalink / raw)
  To: Luca Weiss, ~postmarketos/upstreaming, phone-devel, Andy Gross,
	Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 25.06.2023 13:13, Luca Weiss wrote:
> Define the themal zones using the temperature values found in the
> downstream 4.9 sources so that the spmi-temp-alarm driver becomes
> active.
> 
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/pm8953.dtsi | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm8953.dtsi b/arch/arm64/boot/dts/qcom/pm8953.dtsi
> index 2268daf27fa7..d2dfc1699174 100644
> --- a/arch/arm64/boot/dts/qcom/pm8953.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8953.dtsi
> @@ -6,6 +6,37 @@
>  #include <dt-bindings/input/linux-event-codes.h>
>  #include <dt-bindings/spmi/spmi.h>
>  
> +/ {
> +	thermal-zones {
> +		pm8953-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +
> +			thermal-sensors = <&pm8953_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 {
>  	pmic@0 {
>  		compatible = "qcom,pm8953", "qcom,spmi-pmic";
> @@ -36,7 +67,7 @@ pm8953_resin: resin {
>  			};
>  		};
>  
> -		temp-alarm@2400 {
> +		pm8953_temp: temp-alarm@2400 {
>  			compatible = "qcom,spmi-temp-alarm";
>  			reg = <0x2400>;
>  			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
> 
> ---
> base-commit: 8d2be868b42c08290509c60515865f4de24ea704
> change-id: 20230625-pm8953-thermal-fc3b2deeeb7b
> 
> Best regards,

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

* Re: [PATCH] arm64: dts: qcom: pm8953: Add thermal zone
  2023-06-25 11:13 [PATCH] arm64: dts: qcom: pm8953: Add thermal zone Luca Weiss
  2023-06-26  9:46 ` Konrad Dybcio
@ 2023-07-10  5:07 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2023-07-10  5:07 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, phone-devel, Andy Gross,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Luca Weiss
  Cc: linux-arm-msm, devicetree, linux-kernel


On Sun, 25 Jun 2023 13:13:05 +0200, Luca Weiss wrote:
> Define the themal zones using the temperature values found in the
> downstream 4.9 sources so that the spmi-temp-alarm driver becomes
> active.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: pm8953: Add thermal zone
      commit: 519c47acac28db7cec7ab5d929055a73001ac2d9

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

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

end of thread, other threads:[~2023-07-10  5:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-25 11:13 [PATCH] arm64: dts: qcom: pm8953: Add thermal zone Luca Weiss
2023-06-26  9:46 ` Konrad Dybcio
2023-07-10  5:07 ` Bjorn Andersson

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).