linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Enable TSENS and thermal zone for QCS615 SoC
@ 2025-06-11  6:37 Gaurav Kohli
  2025-06-11  6:37 ` [PATCH v2 1/2] dt-bindings: thermal: tsens: Add QCS615 compatible Gaurav Kohli
  2025-06-11  6:37 ` [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC Gaurav Kohli
  0 siblings, 2 replies; 7+ messages in thread
From: Gaurav Kohli @ 2025-06-11  6:37 UTC (permalink / raw)
  To: amitk, daniel.lezcano, robh, krzk+dt, andersson, konradybcio
  Cc: devicetree, linux-kernel, linux-arm-msm, quic_manafm,
	Gaurav Kohli

Adding compatible string in TSENS dt-bindings, device node
for TSENS controller and Thermal zone support.

---
Changes in v2:
- Drop the passive trip point and add critical for CPU thermal zones.
- Rearrange the tsens dt node and fix the address part.
- Fix the commit subject with target name.
- Link to v1: https://lore.kernel.org/linux-devicetree/cover.1744292503.git.quic_gkohli@quicinc.com/
---
Gaurav Kohli (2):
  dt-bindings: thermal: tsens: Add QCS615 compatible
  arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC

 .../bindings/thermal/qcom-tsens.yaml          |   1 +
 arch/arm64/boot/dts/qcom/qcs615.dtsi          | 217 ++++++++++++++++++
 2 files changed, 218 insertions(+)

-- 
2.34.1


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

* [PATCH v2 1/2] dt-bindings: thermal: tsens: Add QCS615 compatible
  2025-06-11  6:37 [PATCH v2 0/2] Enable TSENS and thermal zone for QCS615 SoC Gaurav Kohli
@ 2025-06-11  6:37 ` Gaurav Kohli
  2025-06-11  6:37 ` [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC Gaurav Kohli
  1 sibling, 0 replies; 7+ messages in thread
From: Gaurav Kohli @ 2025-06-11  6:37 UTC (permalink / raw)
  To: amitk, daniel.lezcano, robh, krzk+dt, andersson, konradybcio
  Cc: devicetree, linux-kernel, linux-arm-msm, quic_manafm,
	Gaurav Kohli

Add compatibility string for the thermal sensors on QCS615 platform.

Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
---
 Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
index f9d8012c8cf5..de9b667a79d3 100644
--- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
+++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
@@ -52,6 +52,7 @@ properties:
               - qcom,msm8996-tsens
               - qcom,msm8998-tsens
               - qcom,qcm2290-tsens
+              - qcom,qcs615-tsens
               - qcom,sa8255p-tsens
               - qcom,sa8775p-tsens
               - qcom,sar2130p-tsens
-- 
2.34.1


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

* [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC
  2025-06-11  6:37 [PATCH v2 0/2] Enable TSENS and thermal zone for QCS615 SoC Gaurav Kohli
  2025-06-11  6:37 ` [PATCH v2 1/2] dt-bindings: thermal: tsens: Add QCS615 compatible Gaurav Kohli
@ 2025-06-11  6:37 ` Gaurav Kohli
  2025-06-11 14:08   ` Konrad Dybcio
  1 sibling, 1 reply; 7+ messages in thread
From: Gaurav Kohli @ 2025-06-11  6:37 UTC (permalink / raw)
  To: amitk, daniel.lezcano, robh, krzk+dt, andersson, konradybcio
  Cc: devicetree, linux-kernel, linux-arm-msm, quic_manafm,
	Gaurav Kohli

Add TSENS and thermal devicetree node for QCS615 SoC.

Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>
---
 arch/arm64/boot/dts/qcom/qcs615.dtsi | 217 +++++++++++++++++++++++++++
 1 file changed, 217 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi
index edfb796d8dd3..bbc132a1df46 100644
--- a/arch/arm64/boot/dts/qcom/qcs615.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi
@@ -3668,6 +3668,17 @@ usb_2_dwc3: usb@a800000 {
 				maximum-speed = "high-speed";
 			};
 		};
+
+		tsens0: tsens@c222000 {
+			compatible = "qcom,qcs615-tsens", "qcom,tsens-v2";
+			reg = <0x0 0x0c263000 0x0 0x1ff>,
+				<0x0 0x0c222000 0x0 0x8>;
+			interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "uplow", "critical";
+			#qcom,sensors = <16>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 
 	arch_timer: timer {
@@ -3677,4 +3688,210 @@ arch_timer: timer {
 			     <GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 0 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
 	};
+
+	thermal-zones {
+		aoss-thermal {
+			thermal-sensors = <&tsens0 0>;
+
+			trips {
+				trip-point0 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpuss-0-thermal {
+			thermal-sensors = <&tsens0 1>;
+
+			trips {
+				cpuss0-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpuss-1-thermal {
+			thermal-sensors = <&tsens0 2>;
+
+			trips {
+				cpuss1-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpuss-2-thermal {
+			thermal-sensors = <&tsens0 3>;
+
+			trips {
+				cpuss2-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpuss-3-thermal {
+			thermal-sensors = <&tsens0 4>;
+
+			trips {
+				cpuss3-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu-1-0-thermal {
+			thermal-sensors = <&tsens0 5>;
+
+			trips {
+				cpu-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu-1-1-thermal {
+			thermal-sensors = <&tsens0 6>;
+
+			trips {
+				cpu-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu-1-2-thermal {
+			thermal-sensors = <&tsens0 7>;
+
+			trips {
+				cpu-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu-1-3-thermal {
+			thermal-sensors = <&tsens0 8>;
+
+			trips {
+				cpu-critical {
+					temperature = <115000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+		};
+
+		gpu-thermal {
+			thermal-sensors = <&tsens0 9>;
+
+			trips {
+				trip-point0 {
+					temperature = <105000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+
+				trip-point1 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+
+		q6-hvx-thermal {
+			thermal-sensors = <&tsens0 10>;
+
+			trips {
+				trip-point0 {
+					temperature = <105000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+
+				trip-point1 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+
+		mdm-core-thermal {
+			thermal-sensors = <&tsens0 11>;
+
+			trips {
+				trip-point0 {
+					temperature = <110000>;
+					hysteresis = <10000>;
+					type = "passive";
+				};
+			};
+		};
+
+		camera-thermal {
+			thermal-sensors = <&tsens0 12>;
+
+			trips {
+				trip-point0 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+
+		wlan-thermal {
+			thermal-sensors = <&tsens0 13>;
+
+			trips {
+				trip-point0 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+
+		display-thermal {
+			thermal-sensors = <&tsens0 14>;
+
+			trips {
+				trip-point0 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+
+		video-thermal {
+			thermal-sensors = <&tsens0 15>;
+
+			trips {
+				trip-point0 {
+					temperature = <110000>;
+					hysteresis = <5000>;
+					type = "passive";
+				};
+			};
+		};
+	};
 };
-- 
2.34.1


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

* Re: [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC
  2025-06-11  6:37 ` [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC Gaurav Kohli
@ 2025-06-11 14:08   ` Konrad Dybcio
  2025-06-11 14:19     ` Dmitry Baryshkov
  0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2025-06-11 14:08 UTC (permalink / raw)
  To: Gaurav Kohli, amitk, daniel.lezcano, robh, krzk+dt, andersson,
	konradybcio
  Cc: devicetree, linux-kernel, linux-arm-msm, quic_manafm

On 6/11/25 8:37 AM, Gaurav Kohli wrote:
> Add TSENS and thermal devicetree node for QCS615 SoC.
> 
> Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>
> ---

[...]

> +	thermal-zones {
> +		aoss-thermal {
> +			thermal-sensors = <&tsens0 0>;
> +
> +			trips {
> +				trip-point0 {
> +					temperature = <110000>;
> +					hysteresis = <5000>;
> +					type = "passive";

All of the passive trip points you added that aren't bound to any
cooling devices should be critical instead (otherwise they're not
doing anything)

otherwise, looks good

Konrad

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

* Re: [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC
  2025-06-11 14:08   ` Konrad Dybcio
@ 2025-06-11 14:19     ` Dmitry Baryshkov
  2025-06-11 14:47       ` Konrad Dybcio
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-06-11 14:19 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Gaurav Kohli, amitk, daniel.lezcano, robh, krzk+dt, andersson,
	konradybcio, devicetree, linux-kernel, linux-arm-msm, quic_manafm

On Wed, Jun 11, 2025 at 04:08:57PM +0200, Konrad Dybcio wrote:
> On 6/11/25 8:37 AM, Gaurav Kohli wrote:
> > Add TSENS and thermal devicetree node for QCS615 SoC.
> > 
> > Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>
> > ---
> 
> [...]
> 
> > +	thermal-zones {
> > +		aoss-thermal {
> > +			thermal-sensors = <&tsens0 0>;
> > +
> > +			trips {
> > +				trip-point0 {
> > +					temperature = <110000>;
> > +					hysteresis = <5000>;
> > +					type = "passive";
> 
> All of the passive trip points you added that aren't bound to any
> cooling devices should be critical instead (otherwise they're not
> doing anything)
> 
> otherwise, looks good

Don't we need cooling-maps for CPU thermal zones?

-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC
  2025-06-11 14:19     ` Dmitry Baryshkov
@ 2025-06-11 14:47       ` Konrad Dybcio
  2025-06-12 10:42         ` Gaurav Kohli
  0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2025-06-11 14:47 UTC (permalink / raw)
  To: Dmitry Baryshkov, Konrad Dybcio
  Cc: Gaurav Kohli, amitk, daniel.lezcano, robh, krzk+dt, andersson,
	konradybcio, devicetree, linux-kernel, linux-arm-msm, quic_manafm

On 6/11/25 4:19 PM, Dmitry Baryshkov wrote:
> On Wed, Jun 11, 2025 at 04:08:57PM +0200, Konrad Dybcio wrote:
>> On 6/11/25 8:37 AM, Gaurav Kohli wrote:
>>> Add TSENS and thermal devicetree node for QCS615 SoC.
>>>
>>> Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>
>>> ---
>>
>> [...]
>>
>>> +	thermal-zones {
>>> +		aoss-thermal {
>>> +			thermal-sensors = <&tsens0 0>;
>>> +
>>> +			trips {
>>> +				trip-point0 {
>>> +					temperature = <110000>;
>>> +					hysteresis = <5000>;
>>> +					type = "passive";
>>
>> All of the passive trip points you added that aren't bound to any
>> cooling devices should be critical instead (otherwise they're not
>> doing anything)
>>
>> otherwise, looks good
> 
> Don't we need cooling-maps for CPU thermal zones?

no, we have lmh

Konrad

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

* Re: [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC
  2025-06-11 14:47       ` Konrad Dybcio
@ 2025-06-12 10:42         ` Gaurav Kohli
  0 siblings, 0 replies; 7+ messages in thread
From: Gaurav Kohli @ 2025-06-12 10:42 UTC (permalink / raw)
  To: Konrad Dybcio, Dmitry Baryshkov
  Cc: amitk, daniel.lezcano, robh, krzk+dt, andersson, konradybcio,
	devicetree, linux-kernel, linux-arm-msm, quic_manafm



On 6/11/2025 8:17 PM, Konrad Dybcio wrote:
> On 6/11/25 4:19 PM, Dmitry Baryshkov wrote:
>> On Wed, Jun 11, 2025 at 04:08:57PM +0200, Konrad Dybcio wrote:
>>> On 6/11/25 8:37 AM, Gaurav Kohli wrote:
>>>> Add TSENS and thermal devicetree node for QCS615 SoC.
>>>>
>>>> Signed-off-by: Gaurav Kohli <quic_gkohli@quicinc.com>
>>>> ---
>>>
>>> [...]
>>>
>>>> +	thermal-zones {
>>>> +		aoss-thermal {
>>>> +			thermal-sensors = <&tsens0 0>;
>>>> +
>>>> +			trips {
>>>> +				trip-point0 {
>>>> +					temperature = <110000>;
>>>> +					hysteresis = <5000>;
>>>> +					type = "passive";
>>>
>>> All of the passive trip points you added that aren't bound to any
>>> cooling devices should be critical instead (otherwise they're not
>>> doing anything)
>>>
>>> otherwise, looks good
>>
thanks for the review & comment, let me send 3rd patch with critical for 
all trips.
>> Don't we need cooling-maps for CPU thermal zones?
> 
> no, we have lmh
> 
> Konrad


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

end of thread, other threads:[~2025-06-12 10:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11  6:37 [PATCH v2 0/2] Enable TSENS and thermal zone for QCS615 SoC Gaurav Kohli
2025-06-11  6:37 ` [PATCH v2 1/2] dt-bindings: thermal: tsens: Add QCS615 compatible Gaurav Kohli
2025-06-11  6:37 ` [PATCH v2 2/2] arm64: dts: qcom: qcs615: Enable TSENS support for QCS615 SoC Gaurav Kohli
2025-06-11 14:08   ` Konrad Dybcio
2025-06-11 14:19     ` Dmitry Baryshkov
2025-06-11 14:47       ` Konrad Dybcio
2025-06-12 10:42         ` Gaurav Kohli

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