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

Manikanta Mylavarapu posted 7 patches 2 weeks, 6 days ago
Only 6 patches received!
There is a newer version of this series
[PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Manikanta Mylavarapu 2 weeks, 6 days ago
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(+)

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";
+				};
+			};
+		};
+	};
 };
-- 
2.34.1
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Konrad Dybcio 2 weeks, 6 days ago
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
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Manikanta Mylavarapu 2 weeks, 4 days ago

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.
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Konrad Dybcio 2 weeks, 4 days ago

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
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Manikanta Mylavarapu 2 weeks, 4 days ago

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.
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Konrad Dybcio 2 weeks, 3 days ago
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
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Manikanta Mylavarapu 1 week, 6 days ago

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.
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Konrad Dybcio 1 week, 5 days ago

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
Re: [PATCH v6 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes
Posted by Manikanta Mylavarapu 1 week, 2 days ago

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.