summaryrefslogtreecommitdiff
path: root/recipes-kernel
diff options
context:
space:
mode:
authorFrancesco Dolcini <francesco.dolcini@toradex.com>2022-08-30 17:21:57 +0200
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2022-08-30 17:21:57 +0200
commitac0cf193804c32ec93291f193fe36c04aa649084 (patch)
treee647b0864e93cf929e084677e2a3d8bf78cf2532 /recipes-kernel
parente6833972f20c741eb0d8a63f79faa1fd00f98a4e (diff)
linux-toradex-mainline: Add patch to change imx temp threshold
Add a patch to set the critical temperature threshold to the SoC max value. The patch was denied upstream [1] as any other patch trying to solve the same problem in a configurable way [2], [3]. [1] https://lore.kernel.org/all/20220420091300.179753-1-francesco.dolcini@toradex.com/ [2] https://lore.kernel.org/all/20220516190001.147919-1-francesco.dolcini@toradex.com/ [3] https://lore.kernel.org/all/20220617070847.186876-1-francesco.dolcini@toradex.com/ Related-to: ELB-4686 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline-git/0001-thermal-imx-Update-critical-temp-threshold.patch39
-rw-r--r--recipes-kernel/linux/linux-toradex-mainline_git.bb4
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex-mainline-git/0001-thermal-imx-Update-critical-temp-threshold.patch b/recipes-kernel/linux/linux-toradex-mainline-git/0001-thermal-imx-Update-critical-temp-threshold.patch
new file mode 100644
index 0000000..3fbd5e3
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-mainline-git/0001-thermal-imx-Update-critical-temp-threshold.patch
@@ -0,0 +1,39 @@
+From 509dccde2a1cc4ac7d5099ca7aea9ec05c6f7e4f Mon Sep 17 00:00:00 2001
+From: Francesco Dolcini <francesco.dolcini@toradex.com>
+Date: Wed, 20 Apr 2022 11:13:00 +0200
+Subject: [PATCH] thermal: imx: Update critical temp threshold
+
+Increase the critical temperature threshold to the datasheet defined
+value according to the temperature grade of the SoC, increasing the
+actual critical temperature value of 5 degrees.
+
+Without this change the emergency shutdown will trigger earlier then
+required affecting applications that are expected to be working on this
+close to the limit, but yet valid, temperature range.
+
+Upstream-Status: Denied [https://lore.kernel.org/all/20220420091300.179753-1-francesco.dolcini@toradex.com/]
+Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+---
+ drivers/thermal/imx_thermal.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
+index 16663373b682..75a631a23e61 100644
+--- a/drivers/thermal/imx_thermal.c
++++ b/drivers/thermal/imx_thermal.c
+@@ -504,10 +504,10 @@ static void imx_init_temp_grade(struct platform_device *pdev, u32 ocotp_mem0)
+ }
+
+ /*
+- * Set the critical trip point at 5 °C under max
++ * Set the critical trip point at max
+ * Set the passive trip point at 10 °C under max (changeable via sysfs)
+ */
+- data->temp_critical = data->temp_max - (1000 * 5);
++ data->temp_critical = data->temp_max;
+ data->temp_passive = data->temp_max - (1000 * 10);
+ }
+
+--
+2.25.1
+
diff --git a/recipes-kernel/linux/linux-toradex-mainline_git.bb b/recipes-kernel/linux/linux-toradex-mainline_git.bb
index f4e14db..b876381 100644
--- a/recipes-kernel/linux/linux-toradex-mainline_git.bb
+++ b/recipes-kernel/linux/linux-toradex-mainline_git.bb
@@ -26,6 +26,10 @@ SRC_URI = " \
file://defconfig \
"
+SRC_URI:append = " \
+ file://0001-thermal-imx-Update-critical-temp-threshold.patch \
+"
+
LINUX_VERSION ?= "5.19.1"
LINUX_VERSION:use-head-next ?= "5.19"
KBRANCH = "master"