]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Mar 2019 12:57:26 +0000 (05:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Mar 2019 12:57:26 +0000 (05:57 -0700)
added patches:
arm-dts-exynos-do-not-ignore-real-world-fuse-values-for-thermal-zone-0-on-exynos5420.patch

queue-4.9/arm-dts-exynos-do-not-ignore-real-world-fuse-values-for-thermal-zone-0-on-exynos5420.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/arm-dts-exynos-do-not-ignore-real-world-fuse-values-for-thermal-zone-0-on-exynos5420.patch b/queue-4.9/arm-dts-exynos-do-not-ignore-real-world-fuse-values-for-thermal-zone-0-on-exynos5420.patch
new file mode 100644 (file)
index 0000000..0271fb4
--- /dev/null
@@ -0,0 +1,126 @@
+From 28928a3ce142b2e4e5a7a0f067cefb41a3d2c3f9 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzk@kernel.org>
+Date: Sat, 11 Feb 2017 22:14:56 +0200
+Subject: ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420
+
+From: Krzysztof Kozlowski <krzk@kernel.org>
+
+commit 28928a3ce142b2e4e5a7a0f067cefb41a3d2c3f9 upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi |   25 ++++++++++++++++++++++
+ arch/arm/boot/dts/exynos5420.dtsi                 |   10 ++++----
+ 2 files changed, 30 insertions(+), 5 deletions(-)
+
+--- /dev/null
++++ b/arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
+@@ -0,0 +1,25 @@
++/*
++ * Device tree sources for Exynos5420 TMU sensor configuration
++ *
++ * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com>
++ * Copyright (c) 2017 Krzysztof Kozlowski <krzk@kernel.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <dt-bindings/thermal/thermal_exynos.h>
++
++#thermal-sensor-cells = <0>;
++samsung,tmu_gain = <8>;
++samsung,tmu_reference_voltage = <16>;
++samsung,tmu_noise_cancel_mode = <4>;
++samsung,tmu_efuse_value = <55>;
++samsung,tmu_min_efuse_value = <0>;
++samsung,tmu_max_efuse_value = <100>;
++samsung,tmu_first_point_trim = <25>;
++samsung,tmu_second_point_trim = <85>;
++samsung,tmu_default_temp_offset = <50>;
++samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>;
+--- a/arch/arm/boot/dts/exynos5420.dtsi
++++ b/arch/arm/boot/dts/exynos5420.dtsi
+@@ -694,7 +694,7 @@
+                       interrupts = <0 65 0>;
+                       clocks = <&clock CLK_TMU>;
+                       clock-names = "tmu_apbif";
+-                      #include "exynos4412-tmu-sensor-conf.dtsi"
++                      #include "exynos5420-tmu-sensor-conf.dtsi"
+               };
+               tmu_cpu1: tmu@10064000 {
+@@ -703,7 +703,7 @@
+                       interrupts = <0 183 0>;
+                       clocks = <&clock CLK_TMU>;
+                       clock-names = "tmu_apbif";
+-                      #include "exynos4412-tmu-sensor-conf.dtsi"
++                      #include "exynos5420-tmu-sensor-conf.dtsi"
+               };
+               tmu_cpu2: tmu@10068000 {
+@@ -712,7 +712,7 @@
+                       interrupts = <0 184 0>;
+                       clocks = <&clock CLK_TMU>, <&clock CLK_TMU>;
+                       clock-names = "tmu_apbif", "tmu_triminfo_apbif";
+-                      #include "exynos4412-tmu-sensor-conf.dtsi"
++                      #include "exynos5420-tmu-sensor-conf.dtsi"
+               };
+               tmu_cpu3: tmu@1006c000 {
+@@ -721,7 +721,7 @@
+                       interrupts = <0 185 0>;
+                       clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>;
+                       clock-names = "tmu_apbif", "tmu_triminfo_apbif";
+-                      #include "exynos4412-tmu-sensor-conf.dtsi"
++                      #include "exynos5420-tmu-sensor-conf.dtsi"
+               };
+               tmu_gpu: tmu@100a0000 {
+@@ -730,7 +730,7 @@
+                       interrupts = <0 215 0>;
+                       clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>;
+                       clock-names = "tmu_apbif", "tmu_triminfo_apbif";
+-                      #include "exynos4412-tmu-sensor-conf.dtsi"
++                      #include "exynos5420-tmu-sensor-conf.dtsi"
+               };
+               sysmmu_g2dr: sysmmu@0x10A60000 {
index aca9cf3e56e18c47448426a52e4bd3fc6c2945dd..481dc6108b2f8b5abd83c79fc7c2f5cfa92918fb 100644 (file)
@@ -90,3 +90,4 @@ arm-dts-exynos-fix-pinctrl-definition-for-emmc-rtsn-line-on-odroid-x2-u3.patch
 arm-dts-exynos-add-minimal-clkout-parameters-to-exynos3250-pmu.patch
 drm-disable-uncached-dma-optimization-for-arm-and-ar.patch
 arm-8781-1-fix-thumb-2-syscall-return-for-binutils-2.patch
+arm-dts-exynos-do-not-ignore-real-world-fuse-values-for-thermal-zone-0-on-exynos5420.patch