Hi there,
We are struggling with that topic as well.
We've updated your system from yocto (3.0.3, zeus) to yocto (4.0.8, kirkstone), which is the kernel update from 4.14.98 -> 5.10.72 in our case. Updates are done on platforms i.MX6, i.MXSX6, i.MX8.
Since we have the 5.10.72, we are missing the /sys/devices/virtual/thermal/thermal_zone0/temp on the i.MX6 and i.MXSX6, which was present with the 4.14.98 version.
With i.MX8 it's fine. there we have it. Of course we recognized that i.MX8 is implemented in a different way for thermal stuff. devicetree + drivers/thermal/imx8mm_thermal.c.
kernel config was merged from 4.14.98 to 5.10.72 and should bi fine:
imx8:
CONFIG_SCHED_THERMAL_PRESSURE=y
CONFIG_THERMAL=y
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_OF=y
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_CPU_THERMAL=y
CONFIG_CPU_FREQ_THERMAL=y
CONFIG_THERMAL_EMULATION=y
CONFIG_IMX_SC_THERMAL=y
CONFIG_IMX8MM_THERMAL=y
CONFIG_DEVICE_THERMAL=y
imx6:
CONFIG_SCHED_THERMAL_PRESSURE=y
CONFIG_THERMAL=y
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_OF=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_CPU_THERMAL=y
CONFIG_CPU_FREQ_THERMAL=y
CONFIG_IMX_THERMAL=y
CONFIG_DEVICE_THERMAL=y
imxsx6:
CONFIG_SCHED_THERMAL_PRESSURE=y
CONFIG_THERMAL=y
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_OF=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_CPU_THERMAL=y
CONFIG_CPU_FREQ_THERMAL=y
CONFIG_IMX_THERMAL=y
CONFIG_DEVICE_THERMAL=y
Can you please give as a hint how we can bring the sysfs interface "temp" back to our i.MX6 and i.MXSX6 version, like we had it with 4.14.98 kernel? Or is there at least a way to get the same data out?
that would be our goal:
cat /sys/devices/virtual/thermal/thermal_zone0/temp
62494
i.MX8, this is still possible. But not anymore on the others.
We started to modify the devicetree for i.MX6 and i.MXSX6, but without success so far.
thanks for your help!
regards
tom