imx6 tempmon device tree

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6 tempmon device tree

ソリューションへジャンプ
1,032件の閲覧回数
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 件の賞賛
返信
1 解決策
1,011件の閲覧回数
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 件の賞賛
返信
5 返答(返信)
974件の閲覧回数
habib_farahani
Contributor II

Thank you.

0 件の賞賛
返信
1,012件の閲覧回数
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 件の賞賛
返信
778件の閲覧回数
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 件の賞賛
返信
582件の閲覧回数
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 件の賞賛
返信
573件の閲覧回数
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 件の賞賛
返信