imx6 tempmon device tree

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

imx6 tempmon device tree

Jump to solution
982 Views
habib_farahani
Contributor II

Hello all,

 

I am going through a Linux kernel bump for an imx6q based product from 3.0.35 to 5.10.  I was wondering if any one has a sample, and can point me to Thermal related device tree elements.  I have found some information on iMx8, but was wondering whether the memory maps are the same

TIA

HDF

0 Kudos
1 Solution
961 Views
joanxie
NXP TechSupport
NXP TechSupport

i.mx6 is different thermal driver from imx8, I don't find dts define this for imx6 in 5.10 bsp

The thermal driver can be accessed through the following interface:

/sys/bus/platform/drivers/imx_thermal for i.MX 6 and i.MX 7.

/sys/class/thermal/thermal_zoneX for i.MX 8 and i.MX 8X.

/sys/bus/platform/drivers/qoriq_thermal for i.MX 8M Quad.

/sys/class/thermal/thermal_zone0/temp for i.MX 8M Mini.

View solution in original post

0 Kudos
5 Replies
924 Views
habib_farahani
Contributor II

Thank you.

0 Kudos
962 Views
joanxie
NXP TechSupport
NXP TechSupport

i.mx6 is different thermal driver from imx8, I don't find dts define this for imx6 in 5.10 bsp

The thermal driver can be accessed through the following interface:

/sys/bus/platform/drivers/imx_thermal for i.MX 6 and i.MX 7.

/sys/class/thermal/thermal_zoneX for i.MX 8 and i.MX 8X.

/sys/bus/platform/drivers/qoriq_thermal for i.MX 8M Quad.

/sys/class/thermal/thermal_zone0/temp for i.MX 8M Mini.

0 Kudos
728 Views
emptyfridge
Contributor III

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

 

0 Kudos
532 Views
christianreich
Contributor I

@emptyfridgeany news on this? we're basically facing the same situation here and i just cam across this thread.

any help would be appreciated

kind regards

christian

0 Kudos
523 Views
emptyfridge
Contributor III

hi @christianreich ,

In fact we were able to solve the issue, yes.

   definition of tempmon in dtsi changed from kernel 4 to 5
   tempmon now uses nvmem to access temperature data.
   This needs NVMEM_IMX_OCOTP and ARM_IMX6Q_CPUFREQ in .config

so what we changed is this in our .config file for the kernel 5.10.y:

 

diff --git a/arch/arm/configs/xxx_defconfig b/arch/arm/configs/xxx_defconfig
index 84d9c30db9de..1ac48e4f3d35 100644
--- a/arch/arm/configs/xxx_defconfig
+++ b/arch/arm/configs/xxx_defconfig
@@ -39,6 +39,7 @@ CONFIG_CMDLINE="noinitrd console=ttymxc0,115200"
 CONFIG_KEXEC=y
 CONFIG_CPU_FREQ=y
 CONFIG_CPUFREQ_DT=y
+CONFIG_ARM_IMX6Q_CPUFREQ=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
 CONFIG_ARM_CPUIDLE=y
@@ -271,6 +272,7 @@ CONFIG_MAILBOX=y
 # CONFIG_IMX_GPCV2_PM_DOMAINS is not set
 CONFIG_PWM=y
 CONFIG_PWM_IMX27=y
+CONFIG_NVMEM_IMX_OCOTP=y
 CONFIG_TEE=y
 CONFIG_OPTEE=y
 CONFIG_MXC_IPU=y

 

 

best regards

tom

 

 

 

 

0 Kudos