how to get temperature for imx6s (in linux 4.1.15)

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

how to get temperature for imx6s (in linux 4.1.15)

1,764 Views
才俊欧
Contributor III

I tried to get the temperature of imx6s chip but failed!

First I config the kernel: 

   Device Drivers Generic Thermal sysfs driver > Temperature sensor driver for Freescale i.MX SoCs

The i.MX Linux® Reference Manual said that the thermal driver implements the SoC temperature monitor function and protection and it creates a sys file interface of /sys/class/thermal/thermal_zone0/ for user. But I see nothing via command "ls /sys/class/thermal/".

While I find some device infomation about tempmon in /sys/bus/platform/devices:

$ find /sys/bus/platform/devices/2000000.aips-bus:tempmon/
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/power
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/power/control
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/power/runtime_active_time
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/power/autosuspend_delay_ms
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/power/runtime_status
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/power/runtime_suspended_time
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/driver_override
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/modalias
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/subsystem
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/of_node
  /sys/bus/platform/devices/2000000.aips-bus:tempmon/uevent

I also preferred to the following link and it cannot solve my problem:

   "Get the temperature of i.mx6 https://community.nxp.com/message/398431#comment-398442 ". 

But with the same board, I get the temperature data using the linux 3.14.28 kernel:

 $ ls /sys/class/thermal/
    cooling_device0 cooling_device1 thermal_zone0

 $ ls /sys/class/thermal/thermal_zone0/
    cdev0 cdev1 mode power temp trip_point_0_type trip_point_1_type uevent
    cdev0_trip_point cdev1_trip_point policy subsystem trip_point_0_temp trip_point_1_temp type

So what's wrong with my linux 4 kernel?

Labels (3)
0 Kudos
2 Replies

801 Views
shibowan
Contributor I

I can't find  "/sys/class/thermal/thermal_zone0/" too.

I add debug infomaton in drivers/thermal/cpu_cooling.c,I found this log:

      __cpufreq_cooling_register: CPUFreq table not found

 I don't know what that means ,please help me,thanks~

0 Kudos

801 Views
igorpadykov
NXP Employee
NXP Employee

Hi Joe

please test with Demo Images from

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0_MX6QDLSOLO&appType=license&location=null 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos