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: dts@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>;
	power-domains = <&CLUSTER_PD>;
	#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 STM32MP25 thermal driver defines one trip point at a given threshold below the maximum temperature supported by the SOC:

Trip point type Temperature

Critical

<max>

where <max>, the maximum temperature supported by the chip, depends on the thermal grade of the SOC:

  • Industrial: 120 °C

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
120000