Thermal driver with 5.4 kernel issues

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Thermal driver with 5.4 kernel issues

跳至解决方案
3,000 次查看
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

标签 (1)
0 项奖励
回复
1 解答
2,911 次查看
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 项奖励
回复
2 回复数
2,912 次查看
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 项奖励
回复
2,896 次查看
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 项奖励
回复