Does anyone have any code (kernel or user space) for reading the internal die temperature on the MX28? I've read the reference manual and know what registers to read, but thought I would check and see if anyone else has already done this before diving in.
-Bill
Thanks for the kernel patch! I appreciate you sharing it.
-Bill
Pierantonio Tabaro said:
Hi, if someone is interested i have written a driver for having die temp on sysfs.
Is possible to show temp by the command:
root@picomaster ~$ cat /sys/devices/platform/mx_cputemp.0/temp1_*
61
Core 0
root@picomaster ~$
i have duplicated the code for MeasureInternalDieTemperature() and ddi_power_GetDieTemp() because i don't have the battery and related battery module on my kernel.
Hi, if someone is interested i have written a driver for having die temp on sysfs.
Is possible to show temp by the command:
root@picomaster ~$ cat /sys/devices/platform/mx_cputemp.0/temp1_*
61
Core 0
root@picomaster ~$
i have duplicated the code for MeasureInternalDieTemperature() and ddi_power_GetDieTemp() because i don't have the battery and related battery module on my kernel.
Thanks for the patch! i modified it slightly to work with the 3.7.0 kernel. all i did is add two old header files (instead of renaming all of the macros in the C files) and fix a virtual address mapping that has changed in the new kernel. i also made it easier to use with scripts - now it only displays one number (temperature in degrees C) which is an average of 3 readings taken at 200ms intervals. That adds a 0.4s delay to the reading but is a bit more precise.
i've attached the patch for the 3.7.0 kernel.
Hi Dimitar,
Do you plan to upstream this patch?
Dimitar,
If you have not already done so, take a look at the Linux Kernel version 3.8.4. It has a lot of improvements over 3.7.0 (including some lradc support) that might save you some development time.
Thanks for sharing your development efforts.
Somewhat obvious, but I am adding the kernel configuration process for completeness.
1 - Run ./ltib -m config
2 - Press spacebar to [*] Configure the Kernel
3 - Exit, saving changes.
4 - run ./ltib
5 - Press enter to Enter the Device Drivers --->
6 - Highlight < > Hardware Monitoring Support --->
7 - Press spacebar to Select to include <*> Hardware Monitoring Support--->
This is important as the submenu will be empty if this is not done.
8 - Press enter to Enter the Hardware Monitoring Support Submenu--->
9 - Select MX28 CPU temperature sensor (NEW)
10- Exit, saving changes.
Thanks for your efforts.
Thanks, Yuri! I appreciate the pointer to ddi_power_GetDieTemp() and the driver patch!