arm64: dts: imx93: add thermal support
authorPeng Fan <peng.fan@nxp.com>
Sun, 25 Jun 2023 12:25:46 +0000 (20:25 +0800)
committerShawn Guo <shawnguo@kernel.org>
Tue, 18 Jul 2023 03:13:57 +0000 (11:13 +0800)
Add tmu node and thermal-zones

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx93.dtsi

index 8643612ace8c7b444451bafb03bf52bfda5acfba..9aad073b491ec45c97359cdd4f23974bb2b69372 100644 (file)
@@ -8,6 +8,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/fsl,imx93-power.h>
+#include <dt-bindings/thermal/thermal.h>
 
 #include "imx93-pinfunc.h"
 
                interrupt-parent = <&gic>;
        };
 
+       thermal-zones {
+               cpu-thermal {
+                       polling-delay-passive = <250>;
+                       polling-delay = <2000>;
+
+                       thermal-sensors = <&tmu 0>;
+
+                       trips {
+                               cpu_alert: cpu-alert {
+                                       temperature = <80000>;
+                                       hysteresis = <2000>;
+                                       type = "passive";
+                               };
+
+                               cpu_crit: cpu-crit {
+                                       temperature = <90000>;
+                                       hysteresis = <2000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               map0 {
+                                       trip = <&cpu_alert>;
+                                       cooling-device =
+                                               <&A55_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                               <&A55_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                               };
+                       };
+               };
+       };
+
        soc@0 {
                compatible = "simple-bus";
                #address-cells = <1>;
                                reg = <0x44480000 0x10000>;
                        };
 
+                       tmu: tmu@44482000 {
+                               compatible = "fsl,qoriq-tmu";
+                               reg = <0x44482000 0x1000>;
+                               clocks = <&clk IMX93_CLK_TMC_GATE>;
+                               little-endian;
+                               fsl,tmu-range = <0x800000da 0x800000e9
+                                                0x80000102 0x8000012a
+                                                0x80000166 0x800001a7
+                                                0x800001b6>;
+                               fsl,tmu-calibration = <0x00000000 0x0000000e
+                                                      0x00000001 0x00000029
+                                                      0x00000002 0x00000056
+                                                      0x00000003 0x000000a2
+                                                      0x00000004 0x00000116
+                                                      0x00000005 0x00000195
+                                                      0x00000006 0x000001b2>;
+                               #thermal-sensor-cells = <1>;
+                       };
+
+
                        adc1: adc@44530000 {
                                compatible = "nxp,imx93-adc";
                                reg = <0x44530000 0x10000>;