I'm using Linux 4.8.17 from this commit: GitHub - Freescale/linux-fslc at 35ef7950aaf7caa28afae35160bda0734ecfeba7
My device tree has this:
status = "okay";
fsl,ave-ctrl = <4>;
fsl,ave-delay = <2>;
fsl,settling = <10>;
Using sysfs to access the LRADC's temperature channel:
# cat /sys/devices/soc0/80000000.apb/80040000.apbx/80050000.lradc/iio\:device0/in_temp8_raw
It gives values only -2 to 2 (with multiple runs).
The manual has relevant section 38.2.2 Internal Die Temperature Sensing.
The mxs-lradc driver has code that looks like it matches the manual description quite well.
The sysfs scale is: 0.253000
The sysfs offset is: -1079.644268 (to convert Kelvin to C)
The sysfs raw output multiplied by the scale should be in Kelvin, so it is reading around 0 Kelvin.
It seems like the raw should be reading around 1200 or more: (1200 - 1079.6) * 0.253 = 30.46C, which is low but in the right region.
The mxs-lradc driver looks like it is setting the TEMPSENSE flag correctly at the beginning.
Is this a known problem? What might be the cause?