mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances
@ 2024-02-06 23:51 Bjorn Andersson
  2024-02-07  0:34 ` Konrad Dybcio
  2024-02-07  4:46 ` Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-02-06 23:51 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold,
	Johan Hovold, Bjorn Andersson

The SC8280XP contains two additional tsens instances, providing among
other things thermal measurements for the GPU.

Add these and a GPU thermal-zone.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
Changes in v3:
- Sorted tsens nodes by address.
- Link to v2: https://lore.kernel.org/r/20240126-sc8280xp-tsens2_3-v2-1-8504d18828de@quicinc.com

Changes in v2:
- Drop TM/SROT comments
- Remove polling delays, rely on interrupts
- Link to v1: https://lore.kernel.org/r/20240118-sc8280xp-tsens2_3-v1-1-e86bce14f6bf@quicinc.com
---
 arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 37 ++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
index febf28356ff8..38ecf6768b1a 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi
@@ -4011,6 +4011,28 @@ pdc: interrupt-controller@b220000 {
 			interrupt-controller;
 		};
 
+		tsens2: thermal-sensor@c251000 {
+			compatible = "qcom,sc8280xp-tsens", "qcom,tsens-v2";
+			reg = <0 0x0c251000 0 0x1ff>,
+			      <0 0x0c224000 0 0x8>;
+			#qcom,sensors = <11>;
+			interrupts-extended = <&pdc 122 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 124 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow", "critical";
+			#thermal-sensor-cells = <1>;
+		};
+
+		tsens3: thermal-sensor@c252000 {
+			compatible = "qcom,sc8280xp-tsens", "qcom,tsens-v2";
+			reg = <0 0x0c252000 0 0x1ff>,
+			      <0 0x0c225000 0 0x8>;
+			#qcom,sensors = <5>;
+			interrupts-extended = <&pdc 123 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 125 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow", "critical";
+			#thermal-sensor-cells = <1>;
+		};
+
 		tsens0: thermal-sensor@c263000 {
 			compatible = "qcom,sc8280xp-tsens", "qcom,tsens-v2";
 			reg = <0 0x0c263000 0 0x1ff>, /* TM */
@@ -5212,6 +5234,21 @@ cpu-crit {
 			};
 		};
 
+		gpu-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+
+			thermal-sensors = <&tsens2 2>;
+
+			trips {
+				cpu-crit {
+					temperature = <110000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
 		mem-thermal {
 			polling-delay-passive = <250>;
 			polling-delay = <1000>;

---
base-commit: 943b9f0ab2cfbaea148dd6ac279957eb08b96904
change-id: 20240118-sc8280xp-tsens2_3-a5fd9a48d655

Best regards,
-- 
Bjorn Andersson <quic_bjorande@quicinc.com>


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

* Re: [PATCH v3] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances
  2024-02-06 23:51 [PATCH v3] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances Bjorn Andersson
@ 2024-02-07  0:34 ` Konrad Dybcio
  2024-02-07  4:46 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2024-02-07  0:34 UTC (permalink / raw)
  To: Bjorn Andersson, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold, Johan Hovold

On 7.02.2024 00:51, Bjorn Andersson wrote:
> The SC8280XP contains two additional tsens instances, providing among
> other things thermal measurements for the GPU.
> 
> Add these and a GPU thermal-zone.
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---

[...]

>  
> +		gpu-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +
> +			thermal-sensors = <&tsens2 2>;
> +
> +			trips {
> +				cpu-crit {

I assume you'll fix that up when applying!

Konrad

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

* Re: [PATCH v3] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances
  2024-02-06 23:51 [PATCH v3] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances Bjorn Andersson
  2024-02-07  0:34 ` Konrad Dybcio
@ 2024-02-07  4:46 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2024-02-07  4:46 UTC (permalink / raw)
  To: Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson
  Cc: linux-arm-msm, devicetree, linux-kernel, Johan Hovold, Johan Hovold


On Tue, 06 Feb 2024 15:51:11 -0800, Bjorn Andersson wrote:
> The SC8280XP contains two additional tsens instances, providing among
> other things thermal measurements for the GPU.
> 
> Add these and a GPU thermal-zone.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances
      commit: 014bbc990e27043e2d0c152bf63f8918b9c347c2

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

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

end of thread, other threads:[~2024-02-07  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 23:51 [PATCH v3] arm64: dts: qcom: sc8280xp: Introduce additional tsens instances Bjorn Andersson
2024-02-07  0:34 ` Konrad Dybcio
2024-02-07  4:46 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®