1 From 8f053e5616352943e16966f195f5a7a161e6fe7d Mon Sep 17 00:00:00 2001
2 From: Mantas Pucka <mantas@8devices.com>
3 Date: Thu, 25 Jan 2024 11:04:12 +0200
4 Subject: [PATCH] arm64: dts: qcom: ipq6018: add thermal zones
6 Add thermal zones to make use of thermal sensors data. For CPU zone,
7 add cooling device that uses CPU frequency scaling.
9 Signed-off-by: Mantas Pucka <mantas@8devices.com>
10 Link: https://lore.kernel.org/r/1706173452-1017-4-git-send-email-mantas@8devices.com
11 Signed-off-by: Bjorn Andersson <andersson@kernel.org>
13 arch/arm64/boot/dts/qcom/ipq6018.dtsi | 121 ++++++++++++++++++++++++++
14 1 file changed, 121 insertions(+)
16 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi
17 +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
19 #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
20 #include <dt-bindings/reset/qcom,gcc-ipq6018.h>
21 #include <dt-bindings/clock/qcom,apss-ipq.h>
22 +#include <dt-bindings/thermal/thermal.h>
28 operating-points-v2 = <&cpu_opp_table>;
29 cpu-supply = <&ipq6018_s2>;
30 + #cooling-cells = <2>;
36 operating-points-v2 = <&cpu_opp_table>;
37 cpu-supply = <&ipq6018_s2>;
38 + #cooling-cells = <2>;
44 operating-points-v2 = <&cpu_opp_table>;
45 cpu-supply = <&ipq6018_s2>;
46 + #cooling-cells = <2>;
52 operating-points-v2 = <&cpu_opp_table>;
53 cpu-supply = <&ipq6018_s2>;
54 + #cooling-cells = <2>;
64 + polling-delay-passive = <250>;
65 + polling-delay = <1000>;
66 + thermal-sensors = <&tsens 4>;
70 + temperature = <125000>;
71 + hysteresis = <1000>;
78 + polling-delay-passive = <250>;
79 + polling-delay = <1000>;
80 + thermal-sensors = <&tsens 5>;
84 + temperature = <125000>;
85 + hysteresis = <1000>;
91 + wcss-phya0-thermal {
92 + polling-delay-passive = <250>;
93 + polling-delay = <1000>;
94 + thermal-sensors = <&tsens 7>;
97 + wcss-phya0-critical {
98 + temperature = <125000>;
99 + hysteresis = <1000>;
105 + wcss-phya1-thermal {
106 + polling-delay-passive = <250>;
107 + polling-delay = <1000>;
108 + thermal-sensors = <&tsens 8>;
111 + wcss-phya1-critical {
112 + temperature = <125000>;
113 + hysteresis = <1000>;
120 + polling-delay-passive = <250>;
121 + polling-delay = <1000>;
122 + thermal-sensors = <&tsens 13>;
126 + temperature = <125000>;
127 + hysteresis = <1000>;
131 + cpu_alert: cpu-passive {
132 + temperature = <110000>;
133 + hysteresis = <1000>;
140 + trip = <&cpu_alert>;
141 + cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
142 + <&CPU1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
143 + <&CPU2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
144 + <&CPU3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
150 + polling-delay-passive = <250>;
151 + polling-delay = <1000>;
152 + thermal-sensors = <&tsens 14>;
156 + temperature = <125000>;
157 + hysteresis = <1000>;
163 + ddrss-top-thermal {
164 + polling-delay-passive = <250>;
165 + polling-delay = <1000>;
166 + thermal-sensors = <&tsens 15>;
169 + ddrss-top-critical {
170 + temperature = <125000>;
171 + hysteresis = <1000>;
179 compatible = "arm,armv8-timer";
180 interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,