Skip to content

Commit 30cdd62

Browse files
Anson-HuangShawn Guo
authored andcommitted
arm64: dts: imx8mp: Add thermal zones support
i.MX8MP has a TMU inside which supports two thermal zones, add support for them. Signed-off-by: Anson Huang <[email protected]> Reviewed-by: Amit Kucheria <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent f5ac5ac commit 30cdd62

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

arch/arm64/boot/dts/freescale/imx8mp.dtsi

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <dt-bindings/gpio/gpio.h>
88
#include <dt-bindings/input/input.h>
99
#include <dt-bindings/interrupt-controller/arm-gic.h>
10+
#include <dt-bindings/thermal/thermal.h>
1011

1112
#include "imx8mp-pinfunc.h"
1213

@@ -43,6 +44,7 @@
4344
clocks = <&clk IMX8MP_CLK_ARM>;
4445
enable-method = "psci";
4546
next-level-cache = <&A53_L2>;
47+
#cooling-cells = <2>;
4648
};
4749

4850
A53_1: cpu@1 {
@@ -53,6 +55,7 @@
5355
clocks = <&clk IMX8MP_CLK_ARM>;
5456
enable-method = "psci";
5557
next-level-cache = <&A53_L2>;
58+
#cooling-cells = <2>;
5659
};
5760

5861
A53_2: cpu@2 {
@@ -63,6 +66,7 @@
6366
clocks = <&clk IMX8MP_CLK_ARM>;
6467
enable-method = "psci";
6568
next-level-cache = <&A53_L2>;
69+
#cooling-cells = <2>;
6670
};
6771

6872
A53_3: cpu@3 {
@@ -73,6 +77,7 @@
7377
clocks = <&clk IMX8MP_CLK_ARM>;
7478
enable-method = "psci";
7579
next-level-cache = <&A53_L2>;
80+
#cooling-cells = <2>;
7681
};
7782

7883
A53_L2: l2-cache0 {
@@ -127,6 +132,68 @@
127132
method = "smc";
128133
};
129134

135+
thermal-zones {
136+
cpu-thermal {
137+
polling-delay-passive = <250>;
138+
polling-delay = <2000>;
139+
thermal-sensors = <&tmu 0>;
140+
trips {
141+
cpu_alert0: trip0 {
142+
temperature = <85000>;
143+
hysteresis = <2000>;
144+
type = "passive";
145+
};
146+
147+
cpu_crit0: trip1 {
148+
temperature = <95000>;
149+
hysteresis = <2000>;
150+
type = "critical";
151+
};
152+
};
153+
154+
cooling-maps {
155+
map0 {
156+
trip = <&cpu_alert0>;
157+
cooling-device =
158+
<&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
159+
<&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
160+
<&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
161+
<&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
162+
};
163+
};
164+
};
165+
166+
soc-thermal {
167+
polling-delay-passive = <250>;
168+
polling-delay = <2000>;
169+
thermal-sensors = <&tmu 1>;
170+
trips {
171+
soc_alert0: trip0 {
172+
temperature = <85000>;
173+
hysteresis = <2000>;
174+
type = "passive";
175+
};
176+
177+
soc_crit0: trip1 {
178+
temperature = <95000>;
179+
hysteresis = <2000>;
180+
type = "critical";
181+
};
182+
};
183+
184+
cooling-maps {
185+
map0 {
186+
trip = <&soc_alert0>;
187+
cooling-device =
188+
<&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
189+
<&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
190+
<&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
191+
<&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
192+
};
193+
};
194+
};
195+
};
196+
130197
timer {
131198
compatible = "arm,armv8-timer";
132199
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
@@ -215,6 +282,13 @@
215282
gpio-ranges = <&iomuxc 0 114 30>;
216283
};
217284

285+
tmu: tmu@30260000 {
286+
compatible = "fsl,imx8mp-tmu";
287+
reg = <0x30260000 0x10000>;
288+
clocks = <&clk IMX8MP_CLK_TSENSOR_ROOT>;
289+
#thermal-sensor-cells = <1>;
290+
};
291+
218292
wdog1: watchdog@30280000 {
219293
compatible = "fsl,imx8mp-wdt", "fsl,imx21-wdt";
220294
reg = <0x30280000 0x10000>;

0 commit comments

Comments
 (0)