diff mbox series

[v6,7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes

Message ID 20241104124413.2012794-8-quic_mmanikan@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add TSENS support for IPQ5332, IPQ5424 | expand

Commit Message

Manikanta Mylavarapu Nov. 4, 2024, 12:44 p.m. UTC
Add thermal zone nodes for sensors present in IPQ5424.

Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq5424.dtsi | 124 ++++++++++++++++++++++++++
 1 file changed, 124 insertions(+)

Comments

Konrad Dybcio Nov. 4, 2024, 1:51 p.m. UTC | #1
On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
> Add thermal zone nodes for sensors present in IPQ5424.
> 
> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
> ---
[...]

> +
> +		cpu3-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;
> +			thermal-sensors = <&tsens 13>;
> +
> +			trips {
> +				cpu-critical {
> +					temperature = <120000>;
> +					hysteresis = <9000>;
> +					type = "critical";
> +				};
> +
> +				cpu-passive {
> +					temperature = <110000>;
> +					hysteresis = <9000>;
> +					type = "passive";

You have a passive trip point without passive polling

> +				};
> +			};
> +		};
> +
> +		wcss-tile2-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <0>;

These are the defaults

> +			thermal-sensors = <&tsens 9>;
> +
> +			trips {
> +				wcss_tile2-critical {

Node names must not contain underscores

Konrad
Manikanta Mylavarapu Nov. 6, 2024, 8:47 a.m. UTC | #2
On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>> Add thermal zone nodes for sensors present in IPQ5424.
>>
>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>> ---
> [...]
> 
>> +
>> +		cpu3-thermal {
>> +			polling-delay-passive = <0>;
>> +			polling-delay = <0>;
>> +			thermal-sensors = <&tsens 13>;
>> +
>> +			trips {
>> +				cpu-critical {
>> +					temperature = <120000>;
>> +					hysteresis = <9000>;
>> +					type = "critical";
>> +				};
>> +
>> +				cpu-passive {
>> +					temperature = <110000>;
>> +					hysteresis = <9000>;
>> +					type = "passive";
> 
> You have a passive trip point without passive polling
> 

Okay, will remove this.

>> +				};
>> +			};
>> +		};
>> +
>> +		wcss-tile2-thermal {
>> +			polling-delay-passive = <0>;
>> +			polling-delay = <0>;
> 
> These are the defaults
> 

Okay, sure. I will remove.

>> +			thermal-sensors = <&tsens 9>;
>> +
>> +			trips {
>> +				wcss_tile2-critical {
> 
> Node names must not contain underscores
> 

Okay, sure. I will remove.

Thanks & Regards,
Manikanta.
Konrad Dybcio Nov. 6, 2024, 9:12 a.m. UTC | #3
On 11/6/24 09:47, Manikanta Mylavarapu wrote:
> 
> 
> On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
>> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>>> Add thermal zone nodes for sensors present in IPQ5424.
>>>
>>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>>> ---
>> [...]
>>
>>> +
>>> +		cpu3-thermal {
>>> +			polling-delay-passive = <0>;
>>> +			polling-delay = <0>;
>>> +			thermal-sensors = <&tsens 13>;
>>> +
>>> +			trips {
>>> +				cpu-critical {
>>> +					temperature = <120000>;
>>> +					hysteresis = <9000>;
>>> +					type = "critical";
>>> +				};
>>> +
>>> +				cpu-passive {
>>> +					temperature = <110000>;
>>> +					hysteresis = <9000>;
>>> +					type = "passive";
>>
>> You have a passive trip point without passive polling
>>
> 
> Okay, will remove this.

You most likely want to preserve it, while keeping a sensible
polling frequency, so that userspace will be aware of the current
CPU temperature. <100> sounds like a sensible value here.

Konrad
Manikanta Mylavarapu Nov. 6, 2024, 10:25 a.m. UTC | #4
On 11/6/2024 2:42 PM, Konrad Dybcio wrote:
> 
> 
> On 11/6/24 09:47, Manikanta Mylavarapu wrote:
>>
>>
>> On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
>>> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>>>> Add thermal zone nodes for sensors present in IPQ5424.
>>>>
>>>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>>>> ---
>>> [...]
>>>
>>>> +
>>>> +        cpu3-thermal {
>>>> +            polling-delay-passive = <0>;
>>>> +            polling-delay = <0>;
>>>> +            thermal-sensors = <&tsens 13>;
>>>> +
>>>> +            trips {
>>>> +                cpu-critical {
>>>> +                    temperature = <120000>;
>>>> +                    hysteresis = <9000>;
>>>> +                    type = "critical";
>>>> +                };
>>>> +
>>>> +                cpu-passive {
>>>> +                    temperature = <110000>;
>>>> +                    hysteresis = <9000>;
>>>> +                    type = "passive";
>>>
>>> You have a passive trip point without passive polling
>>>
>>
>> Okay, will remove this.
> 
> You most likely want to preserve it, while keeping a sensible
> polling frequency, so that userspace will be aware of the current
> CPU temperature. <100> sounds like a sensible value here.
> 
> Konrad

Temperature sensor's present in IPQ5424 supports interrupts.
Hence no need to configure polling frequency.
I will remove polling-delay-passive/polling-delay.

Thanks & Regards,
Manikanta.
Konrad Dybcio Nov. 7, 2024, 2:47 p.m. UTC | #5
On 6.11.2024 11:25 AM, Manikanta Mylavarapu wrote:
> 
> 
> On 11/6/2024 2:42 PM, Konrad Dybcio wrote:
>>
>>
>> On 11/6/24 09:47, Manikanta Mylavarapu wrote:
>>>
>>>
>>> On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
>>>> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>>>>> Add thermal zone nodes for sensors present in IPQ5424.
>>>>>
>>>>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>>>>> ---
>>>> [...]
>>>>
>>>>> +
>>>>> +        cpu3-thermal {
>>>>> +            polling-delay-passive = <0>;
>>>>> +            polling-delay = <0>;
>>>>> +            thermal-sensors = <&tsens 13>;
>>>>> +
>>>>> +            trips {
>>>>> +                cpu-critical {
>>>>> +                    temperature = <120000>;
>>>>> +                    hysteresis = <9000>;
>>>>> +                    type = "critical";
>>>>> +                };
>>>>> +
>>>>> +                cpu-passive {
>>>>> +                    temperature = <110000>;
>>>>> +                    hysteresis = <9000>;
>>>>> +                    type = "passive";
>>>>
>>>> You have a passive trip point without passive polling
>>>>
>>>
>>> Okay, will remove this.
>>
>> You most likely want to preserve it, while keeping a sensible
>> polling frequency, so that userspace will be aware of the current
>> CPU temperature. <100> sounds like a sensible value here.
>>
>> Konrad
> 
> Temperature sensor's present in IPQ5424 supports interrupts.

Correct.

> Hence no need to configure polling frequency.

No, that interrupt firing signifies crossing the temp threshold (meaning
no updates beyond that) or the tsens watchdog barking.

Konrad
Manikanta Mylavarapu Nov. 11, 2024, 11:51 a.m. UTC | #6
On 11/7/2024 8:17 PM, Konrad Dybcio wrote:
> On 6.11.2024 11:25 AM, Manikanta Mylavarapu wrote:
>>
>>
>> On 11/6/2024 2:42 PM, Konrad Dybcio wrote:
>>>
>>>
>>> On 11/6/24 09:47, Manikanta Mylavarapu wrote:
>>>>
>>>>
>>>> On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
>>>>> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>>>>>> Add thermal zone nodes for sensors present in IPQ5424.
>>>>>>
>>>>>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>>>>>> ---
>>>>> [...]
>>>>>
>>>>>> +
>>>>>> +        cpu3-thermal {
>>>>>> +            polling-delay-passive = <0>;
>>>>>> +            polling-delay = <0>;
>>>>>> +            thermal-sensors = <&tsens 13>;
>>>>>> +
>>>>>> +            trips {
>>>>>> +                cpu-critical {
>>>>>> +                    temperature = <120000>;
>>>>>> +                    hysteresis = <9000>;
>>>>>> +                    type = "critical";
>>>>>> +                };
>>>>>> +
>>>>>> +                cpu-passive {
>>>>>> +                    temperature = <110000>;
>>>>>> +                    hysteresis = <9000>;
>>>>>> +                    type = "passive";
>>>>>
>>>>> You have a passive trip point without passive polling
>>>>>
>>>>
>>>> Okay, will remove this.
>>>
>>> You most likely want to preserve it, while keeping a sensible
>>> polling frequency, so that userspace will be aware of the current
>>> CPU temperature. <100> sounds like a sensible value here.
>>>
>>> Konrad
>>
>> Temperature sensor's present in IPQ5424 supports interrupts.
> 
> Correct.
> 
>> Hence no need to configure polling frequency.
> 
> No, that interrupt firing signifies crossing the temp threshold (meaning
> no updates beyond that) or the tsens watchdog barking.
> 
> Konrad

An interrupt fires when the temperature crosses a threshold.

Thanks & Regards,
Manikanta.
Konrad Dybcio Nov. 12, 2024, 11:02 a.m. UTC | #7
On 11-Nov-24 12:51, Manikanta Mylavarapu wrote:
> 
> 
> On 11/7/2024 8:17 PM, Konrad Dybcio wrote:
>> On 6.11.2024 11:25 AM, Manikanta Mylavarapu wrote:
>>>
>>>
>>> On 11/6/2024 2:42 PM, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 11/6/24 09:47, Manikanta Mylavarapu wrote:
>>>>>
>>>>>
>>>>> On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
>>>>>> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>>>>>>> Add thermal zone nodes for sensors present in IPQ5424.
>>>>>>>
>>>>>>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>>>>>>> ---
>>>>>> [...]
>>>>>>
>>>>>>> +
>>>>>>> +        cpu3-thermal {
>>>>>>> +            polling-delay-passive = <0>;
>>>>>>> +            polling-delay = <0>;
>>>>>>> +            thermal-sensors = <&tsens 13>;
>>>>>>> +
>>>>>>> +            trips {
>>>>>>> +                cpu-critical {
>>>>>>> +                    temperature = <120000>;
>>>>>>> +                    hysteresis = <9000>;
>>>>>>> +                    type = "critical";
>>>>>>> +                };
>>>>>>> +
>>>>>>> +                cpu-passive {
>>>>>>> +                    temperature = <110000>;
>>>>>>> +                    hysteresis = <9000>;
>>>>>>> +                    type = "passive";
>>>>>>
>>>>>> You have a passive trip point without passive polling
>>>>>>
>>>>>
>>>>> Okay, will remove this.
>>>>
>>>> You most likely want to preserve it, while keeping a sensible
>>>> polling frequency, so that userspace will be aware of the current
>>>> CPU temperature. <100> sounds like a sensible value here.
>>>>
>>>> Konrad
>>>
>>> Temperature sensor's present in IPQ5424 supports interrupts.
>>
>> Correct.
>>
>>> Hence no need to configure polling frequency.
>>
>> No, that interrupt firing signifies crossing the temp threshold (meaning
>> no updates beyond that) or the tsens watchdog barking.
>>
>> Konrad
> 
> An interrupt fires when the temperature crosses a threshold.

Which means you can't monitor the temperature at runtime
without polling..

Konrad
Manikanta Mylavarapu Nov. 15, 2024, 10:38 a.m. UTC | #8
On 11/12/2024 4:32 PM, Konrad Dybcio wrote:
> 
> 
> On 11-Nov-24 12:51, Manikanta Mylavarapu wrote:
>>
>>
>> On 11/7/2024 8:17 PM, Konrad Dybcio wrote:
>>> On 6.11.2024 11:25 AM, Manikanta Mylavarapu wrote:
>>>>
>>>>
>>>> On 11/6/2024 2:42 PM, Konrad Dybcio wrote:
>>>>>
>>>>>
>>>>> On 11/6/24 09:47, Manikanta Mylavarapu wrote:
>>>>>>
>>>>>>
>>>>>> On 11/4/2024 7:21 PM, Konrad Dybcio wrote:
>>>>>>> On 4.11.2024 1:44 PM, Manikanta Mylavarapu wrote:
>>>>>>>> Add thermal zone nodes for sensors present in IPQ5424.
>>>>>>>>
>>>>>>>> Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
>>>>>>>> ---
>>>>>>> [...]
>>>>>>>
>>>>>>>> +
>>>>>>>> +        cpu3-thermal {
>>>>>>>> +            polling-delay-passive = <0>;
>>>>>>>> +            polling-delay = <0>;
>>>>>>>> +            thermal-sensors = <&tsens 13>;
>>>>>>>> +
>>>>>>>> +            trips {
>>>>>>>> +                cpu-critical {
>>>>>>>> +                    temperature = <120000>;
>>>>>>>> +                    hysteresis = <9000>;
>>>>>>>> +                    type = "critical";
>>>>>>>> +                };
>>>>>>>> +
>>>>>>>> +                cpu-passive {
>>>>>>>> +                    temperature = <110000>;
>>>>>>>> +                    hysteresis = <9000>;
>>>>>>>> +                    type = "passive";
>>>>>>>
>>>>>>> You have a passive trip point without passive polling
>>>>>>>
>>>>>>
>>>>>> Okay, will remove this.
>>>>>
>>>>> You most likely want to preserve it, while keeping a sensible
>>>>> polling frequency, so that userspace will be aware of the current
>>>>> CPU temperature. <100> sounds like a sensible value here.
>>>>>
>>>>> Konrad
>>>>
>>>> Temperature sensor's present in IPQ5424 supports interrupts.
>>>
>>> Correct.
>>>
>>>> Hence no need to configure polling frequency.
>>>
>>> No, that interrupt firing signifies crossing the temp threshold (meaning
>>> no updates beyond that) or the tsens watchdog barking.
>>>
>>> Konrad
>>
>> An interrupt fires when the temperature crosses a threshold.
> 
> Which means you can't monitor the temperature at runtime
> without polling..
> 
> Konrad

Hi Konrad,

I got the point. Will configure polling-delay-passive with 100.

Thanks & Regards,
Manikanta.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
index e97cf6529dd7..568f61c33fb5 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi
@@ -375,4 +375,128 @@  timer {
 			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>,
 			     <GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>;
 	};
+
+	thermal_zones: thermal-zones {
+		cpu0-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 14>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <9000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu1-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 12>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <9000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu2-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 11>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <9000>;
+					type = "passive";
+				};
+			};
+		};
+
+		cpu3-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 13>;
+
+			trips {
+				cpu-critical {
+					temperature = <120000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+
+				cpu-passive {
+					temperature = <110000>;
+					hysteresis = <9000>;
+					type = "passive";
+				};
+			};
+		};
+
+		wcss-tile2-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 9>;
+
+			trips {
+				wcss_tile2-critical {
+					temperature = <125000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+			};
+		};
+
+		wcss-tile3-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 10>;
+
+			trips {
+				wcss_tile3-critical {
+					temperature = <125000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+			};
+		};
+
+		top-glue-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <0>;
+			thermal-sensors = <&tsens 15>;
+
+			trips {
+				top-glue-critical {
+					temperature = <125000>;
+					hysteresis = <9000>;
+					type = "critical";
+				};
+			};
+		};
+	};
 };