Thermal driver with 5.4 kernel issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Thermal driver with 5.4 kernel issues

Jump to solution
2,836 Views
dmhaller
Contributor I

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

Labels (1)
0 Kudos
Reply
1 Solution
2,747 Views
nxf63675
NXP TechSupport
NXP TechSupport

Hi @dmhaller ,

 

Device tree needs to be adapted for the chip configuration that you use.

This means removing references to cores not present.

Please let me know if this information is enough.

 

Regards,

Israel H.

View solution in original post

0 Kudos
Reply
2 Replies
2,748 Views
nxf63675
NXP TechSupport
NXP TechSupport

Hi @dmhaller ,

 

Device tree needs to be adapted for the chip configuration that you use.

This means removing references to cores not present.

Please let me know if this information is enough.

 

Regards,

Israel H.

0 Kudos
Reply
2,732 Views
dmhaller
Contributor I

Yeah, that's kinda the first thing that came to my mind.

So take this issue just for informational purposes.

 

Regards

Dominik

0 Kudos
Reply