Hello,
following issue occurs on a board using IMX8MNSL using the drivers/thermal/imx8mm_thermal.c thermal driver (though it should affect all i.MX 8M Mini/Nano/Mplus non quadcore variants):
root@phyboard-polis-imx8mn-1:~# dmesg | grep tmu
[ 2.905043] platform 30260000.tmu: Retrying from deferred list
[ 2.905596] bus: 'platform': driver_probe_device: matched device 30260000.tmu with driver i.mx8mm_thermal
[ 2.905603] bus: 'platform': really_probe: probing driver i.mx8mm_thermal with device 30260000.tmu
[ 2.905620] i.mx8mm_thermal 30260000.tmu: no pinctrl handle
[ 2.905710] i.mx8mm_thermal 30260000.tmu: failed to register thermal zone sensor[0]: 0
Which can be traced back to drivers/thermal/of-thermal.c:
count = of_count_phandle_with_args(np, "cooling-device",
"#cooling-cells");count is -22 EINVAL.
In the SoC dtsi devicetree file arch/arm64/boot/dts/freescale/imx8mn.dtsi the cooling map0 contains four cooling devices linked to the four A53 cpu cores:
cooling-maps {
map0 {
trip = <&cpu_alert0>;
cooling-device =
<&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&A53_2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&A53_3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};However in case of a single core or dual core CPU the boatloader U-Boot deletes the unused CPU nodes but doesn't update the the cooling map. This results in the described error.
Possible solutions are either add just one cooling device for the first CPU-core in the devicetree SoC-file for all CPU-variants like it's used to be in the 4.19 kernel versions
cooling-maps {
map0 {
trip = <&cpu_alert0>;
cooling-device =
<&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};or add a function to update the cooling map in U-Boot similar to the one deleting the CPU-core nodes.
Thank you
Dominik