我正在开发一个基于 IMX8MP 板的项目,该板具有 Linux 5.10.72,当我尝试读取 thermal_zone0 温度时,出现以下错误
#cat /sys/devices/virtual/thermal/thermal_zone0/temp
cat: /sys/devices/virtual/thermal/thermal_zone0/temp: 参数无效从内核 dmesg 日志中,我发现了以下故障日志
#dmesg | grep -i thermal
[0.048602] thermal_sys: 注册热调控器'step_wise'
[0.048606] thermal_sys: 注册热调控器'power_allocator'
[0.048847] OF: /thermal-zones/soc-thermal/cooling-maps/map0: 找不到phandle
[0.048855]thermal_sys:添加至少一个设备的cooling_device属性
[0.048862]thermal_sys:未能建立热区soc-thermal:-2
[1.686503]i.mx8mm_thermal 30260000.tmu:未能注册热区传感器[1]: 0
[2.669281] i.mx8mm_thermal 30260000.tmu: 未能注册热区传感器 [1]: 0我已将 imx8mp.dtsi 包含在我的主 dts 文件中。此 dtsi 文件已经具有对 cpu-thermal 和 soc-thermal 的热区支持(附在这张票中的 imp8mp.dtsi)。在这两个热区中,定义了冷却图和关联的 phandle。
热区 {
cpu-thermal {
polling-delay-passive = <250>;
轮询延迟= <2000>;
热传感器 = <&tmu 0>;
trips {
cpu_alert0: trip0 {
温度 = <85000>;
迟滞 = <2000>;
类型=“被动”;
};
cpu_crit0: trip1 {
温度 = <95000>;
迟滞 = <2000>;
类型=“关键”;
};
};
冷却图 {
map0 {
trip = <&cpu_alert0>;
冷却设备 =
<&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>;
};
};
};
soc-thermal {
polling-delay-passive = <250>;
轮询延迟= <2000>;
热传感器 = <&tmu 1>;
trips {
soc_alert0: trip0 {
temperature = <85000>;
迟滞 = <2000>;
类型=“被动”;
};
soc_crit0: trip1 {
温度 = <95000>;
迟滞 = <2000>;
类型=“关键”;
};
};
冷却地图 {
map0 {
trip = <&soc_alert0>;
冷却设备 =
<&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>;
};
};
};
};
为什么我会收到上述错误,即使 cpu-thermal 和 soc-thermal 中的冷却设备的 phandles 已经定义?有人可以在这里支持我吗?