diff mbox series

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

Message ID 20241104124413.2012794-8-quic_mmanikan@quicinc.com
State New
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

Manikanta Mylavarapu Nov. 6, 2024, 8:47 a.m. UTC | #1
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 | #2
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 | #3
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.
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";
+				};
+			};
+		};
+	};
 };