]> asedeno.scripts.mit.edu Git - linux.git/commit
ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420
authorKrzysztof Kozlowski <krzk@kernel.org>
Sat, 11 Feb 2017 20:14:56 +0000 (22:14 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Tue, 7 Mar 2017 20:06:44 +0000 (22:06 +0200)
commit28928a3ce142b2e4e5a7a0f067cefb41a3d2c3f9
tree6dc6fa5a62d67e6097561434c80a59d7e0e5d0f5
parent2c221f5d41662e1b4a26d09fb953bbe4f4b025b3
ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420

In Odroid XU3 Lite board, the temperature levels reported for thermal
zone 0 were weird. In warm room:
/sys/class/thermal/thermal_zone0/temp:32000
/sys/class/thermal/thermal_zone1/temp:51000
/sys/class/thermal/thermal_zone2/temp:55000
/sys/class/thermal/thermal_zone3/temp:54000
/sys/class/thermal/thermal_zone4/temp:51000

Sometimes after booting the value was even equal to ambient temperature
which is highly unlikely to be a real temperature of sensor in SoC.

The thermal sensor's calibration (trimming) is based on fused values.
In case of the board above, the fused values are: 35, 52, 43, 58 and 43
(corresponding to each TMU device).  However driver defined a minimum value
for fused data as 40 and for smaller values it was using a hard-coded 55
instead.  This lead to mapping data from sensor to wrong temperatures
for thermal zone 0.

Various vendor 3.10 trees (Hardkernel's based on Samsung LSI, Artik 10)
do not impose any limits on fused values.  Since we do not have any
knowledge about these limits, use 0 as a minimum accepted fused value.
This should essentially allow accepting any reasonable fused value thus
behaving like vendor driver.

The exynos5420-tmu-sensor-conf.dtsi is copied directly from existing
exynos4412 with one change - the samsung,tmu_min_efuse_value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi [new file with mode: 0644]
arch/arm/boot/dts/exynos5420.dtsi