The Thermal Monitoring Unit (TMU) in the i.MX93 SOC has a sensor that can measure the die temperature and uses software calibration.

Kernel configuration

You can manage the thermal support through the kernel configuration option:

  • QorIQ Thermal Monitoring Unit (CONFIG_QORIQ_THERMAL)

This option is enabled as built-in on the default ConnectCore 93 kernel configuration file.

Kernel driver

File Description

drivers/thermal/qoriq_thermal.c

Thermal driver

Trip points

A trip point describes a point in the temperature domain at which the system takes an action. This node describes just the point, not the action.

The Linux thermal subsystem establishes several types of trip points:

  • passive: a trip point to enable passive cooling (such as decreasing clock frequency).

  • active: a trip point to enable active cooling (such as activating fans).

  • hot: a trip point to indicate that an emergency temperature threshold has been reached.

  • critical: a trip point where hardware is at risk.

Device tree bindings and customization

Definition of the thermal sensor of the SoC

i.MX93 device tree
	tmu: tmu@44482000 {
		compatible = "fsl,imx93-tmu";
		reg = <0x44482000 0x1000>;
		clocks = <&clk IMX93_CLK_TMC_GATE>;
		little-endian;
		fsl,tmu-calibration = <0x0000000e 0x800000da
					0x00000029 0x800000e9
					0x00000056 0x80000102
					0x000000a2 0x8000012a
					0x00000116 0x80000166
					0x00000195 0x800001a7
					0x000001b2 0x800001b6>;
		#thermal-sensor-cells = <1>;
	};

Definition of the thermal zones, trip points, and cooling devices

The i.MX93 device tree defines default trip points and sets the CPU cores as cooling devices. On top of it, the ConnectCore 93 device tree, adjusts the thermal trip points for the SOM:

Combined i.MX93 and ConnectCore 93 device tree
thermal-zones {
	cpu-thermal {
		polling-delay-passive = <250>;
		polling-delay = <2000>;

		thermal-sensors = <&tmu 0>;

		trips {
			cpu_alert: cpu-alert {
				temperature = <85000>;
				hysteresis = <2000>;
				type = "passive";
			};

			cpu_crit: cpu-crit {
				temperature = <100000>;
				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>;
			};
		};
	};
};

The device tree defines two trip points:

Trip point type Temperature

Passive

85 °C

Critical

100 °C

The maximum temperature supported by the chip, depends on the thermal grade of the SOC:

  • Consumer: 95 °C

  • Industrial: 105 °C

Check the thermal grade of your SOC on the U-Boot banner during boot.

Usage

CPU temperature

To check the current temperature of the CPU (thermal zone 0):

# cat /sys/class/thermal/thermal_zone0/temp
42700

The command returns the temperature in millicelsius.

Passive trip point

When the temperature in the SOC reaches the passive trip point temperature, the SOC generates an interrupt and the driver sends a notification. Other drivers may subscribe to such notifications in order to trigger cooling actions, such as reducing their clock frequency.

Besides subscriptions, devices declared on the device tree as cooling devices and linked to this trip point will take passive actions.

The current NXP BSP does not support CPU frequency scaling, so the CPU cores frequency is not reduced when the SoC temperature reaches the passive trip point.

The device tree defines a hysteresis of 2 °C for the passive trip point. This means that only when the die temperature has gone 2 °C below the passive trip point, the system is considered within normal parameters and the cooling actions can be cancelled.

To read the passive trip point parameters:

# cat /sys/class/thermal/thermal_zone0/trip_point_0_type
passive
# cat /sys/class/thermal/thermal_zone0/trip_point_0_hyst
2000
# cat /sys/class/thermal/thermal_zone0/trip_point_0_temp
85000

To set a different temperature for the passive trip point, write the new temperature (in millicelsius) to the trip point temperature descriptor:

# echo 65000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
Changes to the trip points done through the sysfs are not persistent across reboots. To make permanent changes, modify the trip points temperature on the device tree.

Critical trip point

When the SOC temperature reaches the critical trip point temperature, the SOC generates an interrupt and the driver shuts down the system to prevent damage to the silicon.

To read the critical trip point parameters:

# cat /sys/class/thermal/thermal_zone0/trip_point_1_type
critical
# cat /sys/class/thermal/thermal_zone0/trip_point_1_hyst
2000
# cat /sys/class/thermal/thermal_zone0/trip_point_1_temp
100000

To set a different temperature for the critical trip point, write the new temperature (in millicelsius) to the trip point temperature descriptor:

# echo 90000 > /sys/class/thermal/thermal_zone0/trip_point_1_temperature
Changes to the trip points done through the sysfs are not persistent across reboots. To make permanent changes, modify the trip points temperature on the device tree.