aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Schlehofer <pepe.schlehofer@gmail.com>2021-07-27 13:20:43 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-08-08 20:42:01 +0200
commit4b2dc4dbbf9e34af9828e2ccf8d2121f88ad9ab9 (patch)
treefea701cbeca0624ac37f303fa3015abceb56fcdc
parent0dcb03dc63ebe6477a3bf19347b340564ade82e0 (diff)
downloadupstream-4b2dc4dbbf9e34af9828e2ccf8d2121f88ad9ab9.tar.gz
upstream-4b2dc4dbbf9e34af9828e2ccf8d2121f88ad9ab9.tar.bz2
upstream-4b2dc4dbbf9e34af9828e2ccf8d2121f88ad9ab9.zip
mvebu: armada-37xx: add patch to forbid cpufreq for 1.2 GHz
This patch is backported from linux-arm-kernel [1] to improve situation, when it was reported that 1.2 GHz variant is unstable with DFS. It waits to be accepted upstream, however, it waits for Marvell people to respond. [1] https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210630225601.6372-1-kabel@kernel.org/ Fixes: 7b868fe04a89 ("Revert "mvebu: 5.4 fix DVFS caused random boot crashes"") Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
-rw-r--r--target/linux/mvebu/patches-5.10/101-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-5.10/101-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch b/target/linux/mvebu/patches-5.10/101-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch
new file mode 100644
index 0000000000..6a5b8220f8
--- /dev/null
+++ b/target/linux/mvebu/patches-5.10/101-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch
@@ -0,0 +1,39 @@
+From: =?utf-8?q?Marek_Beh=C3=BAn?= <kabel@kernel.org>
+Subject: [PATCH v2] cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant
+Date: Thu, 1 Jul 2021 00:56:01 +0200
+
+The 1.2 GHz variant of the Armada 3720 SOC is unstable with DVFS: when
+the SOC boots, the WTMI firmware sets clocks and AVS values that work
+correctly with 1.2 GHz CPU frequency, but random crashes occur once
+cpufreq driver starts scaling.
+
+We do not know currently what is the reason:
+- it may be that the voltage value for L0 for 1.2 GHz variant provided
+ by the vendor in the OTP is simply incorrect when scaling is used,
+- it may be that some delay is needed somewhere,
+- it may be something else.
+
+The most sane solution now seems to be to simply forbid the cpufreq
+driver on 1.2 GHz variant.
+
+Signed-off-by: Marek BehĂșn <kabel@kernel.org>
+Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx")
+---
+ drivers/cpufreq/armada-37xx-cpufreq.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/cpufreq/armada-37xx-cpufreq.c
++++ b/drivers/cpufreq/armada-37xx-cpufreq.c
+@@ -102,7 +102,11 @@ struct armada_37xx_dvfs {
+ };
+
+ static struct armada_37xx_dvfs armada_37xx_dvfs[] = {
+- {.cpu_freq_max = 1200*1000*1000, .divider = {1, 2, 4, 6} },
++ /*
++ * The cpufreq scaling for 1.2 GHz variant of the SOC is currently
++ * unstable because we do not know how to configure it properly.
++ */
++ /* {.cpu_freq_max = 1200*1000*1000, .divider = {1, 2, 4, 6} }, */
+ {.cpu_freq_max = 1000*1000*1000, .divider = {1, 2, 4, 5} },
+ {.cpu_freq_max = 800*1000*1000, .divider = {1, 2, 3, 4} },
+ {.cpu_freq_max = 600*1000*1000, .divider = {2, 4, 5, 6} },