The STM STM32MP25 SOC temperature monitor module features alarm functions that can trigger independent interrupt signals if the temperature rises above a high-temperature threshold or falls below a low-temperature threshold. The temperature threshold is programmable through the device tree.

Kernel configuration

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

  • Moortec Semiconductor MR75203 PVT Controller (CONFIG_SENSORS_MR75203)

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

Kernel driver

File Description

drivers/hwmon/mr75203.c

Moortec Semiconductor MR75203 PVT driver

Device tree bindings and customization

The STM32MP25 thermal device tree binding is documented at Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml

Definition of the thermal monitor unit

STM32MP25 device tree
dts: thermal-sensor@44070000 {
	compatible = "moortec,mr75203";
	reg = <0x44070000 0x80>,
	      <0x44070080 0x180>,
	      <0x44070200 0x200>,
	      <0x44070400 0xc00>;
	reg-names = "common", "ts", "pd", "vm";
	clocks = <&rcc CK_KER_DTS>;
	resets = <&rcc DTS_R>;
	#thermal-sensor-cells = <1>;
};

Usage

CPU temperature

To check the current temperature of the CPU:

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

The command returns the temperature in millicelsius.

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.

The ConnectCore MP25 device tree defines the following trip points:

Trip point type Temperature Hysteresys

Passive

95 °C

10 °C

Critical

105 °C

1 °C

These trip points have been determined on the ConnectCore MP25 Development Kit to guarantee safe operation of the SoM within its thermal specification limits.

Digi recommends you characterize the thermal behavior of your custom design, and adjust the trip points accordingly.

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 device tree only defines one frequency for the CPU, so the cores frequency is not reduced when the SoC temperature reaches the passive trip point.

The device tree defines a hysteresis of 10 °C for the passive trip point. This means that only when the die temperature has gone 10 °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_1_type
passive
# cat /sys/class/thermal/thermal_zone0/trip_point_1_hyst
10000
# cat /sys/class/thermal/thermal_zone0/trip_point_1_temp
95000

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_1_temp
Trip point changes made through the sysfs are not persistent across reboots. To make permanent changes, modify trip point temperatures 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 resets the system to prevent damage to the silicon.

To read the critical trip point parameters:

# cat /sys/class/thermal/thermal_zone0/trip_point_0_type
critical
# cat /sys/class/thermal/thermal_zone0/trip_point_0_temp
105000

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_0_temp
Trip point changes made through the sysfs are not persistent across reboots. To make permanent changes, modify trip point temperatures on the device tree.