summaryrefslogtreecommitdiffstats
path: root/bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2018-09-26 21:09:43 +0100
committerPeter Robinson <pbrobinson@gmail.com>2018-09-26 21:09:43 +0100
commit49bf49c457f4216a8df24634689bb3e4dea46879 (patch)
tree63544d97ba92513d5e380a65413b0201d6286e96 /bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
parent2b0301e373c42caefa2fc673afa64a4aaeb0b05f (diff)
downloadkernel-49bf49c457f4216a8df24634689bb3e4dea46879.tar.gz
kernel-49bf49c457f4216a8df24634689bb3e4dea46879.tar.xz
kernel-49bf49c457f4216a8df24634689bb3e4dea46879.zip
Add thermal trip to bcm283x (Raspberry Pi) cpufreq
Diffstat (limited to 'bcm2835-cpufreq-add-CPU-frequency-control-driver.patch')
-rw-r--r--bcm2835-cpufreq-add-CPU-frequency-control-driver.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/bcm2835-cpufreq-add-CPU-frequency-control-driver.patch b/bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
index 1ab2c7750..e845e0070 100644
--- a/bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
+++ b/bcm2835-cpufreq-add-CPU-frequency-control-driver.patch
@@ -299,3 +299,98 @@ index 4adb85e66be3..aaefb078f391 100644
--
2.17.1
+From d00bd46b40001d3500b8a7207dcfe1d66600e47e Mon Sep 17 00:00:00 2001
+From: Stefan Wahren <stefan.wahren@i2se.com>
+Date: Wed, 26 Sep 2018 21:13:22 +0200
+Subject: [PATCH] ARM: bcm2837: Use CPU0 as cooling device
+
+Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
+---
+ arch/arm/boot/dts/bcm2837.dtsi | 25 +++++++++++++++++++++++++
+ arch/arm/boot/dts/bcm283x.dtsi | 2 +-
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
+index 9cfc553..1590d94 100644
+--- a/arch/arm/boot/dts/bcm2837.dtsi
++++ b/arch/arm/boot/dts/bcm2837.dtsi
+@@ -1,4 +1,5 @@
+ #include "bcm283x.dtsi"
++#include <dt-bindings/thermal/thermal.h>
+
+ / {
+ compatible = "brcm,bcm2837";
+@@ -47,6 +48,7 @@
+ clocks = <&arm_clk>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu0_opp_table>;
++ #cooling-cells = <2>;
+ };
+
+ cpu1: cpu@1 {
+@@ -58,6 +60,7 @@
+ clocks = <&arm_clk>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu0_opp_table>;
++ #cooling-cells = <2>;
+ };
+
+ cpu2: cpu@2 {
+@@ -69,6 +72,7 @@
+ clocks = <&arm_clk>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu0_opp_table>;
++ #cooling-cells = <2>;
+ };
+
+ cpu3: cpu@3 {
+@@ -80,6 +84,7 @@
+ clocks = <&arm_clk>;
+ clock-names = "cpu";
+ operating-points-v2 = <&cpu0_opp_table>;
++ #cooling-cells = <2>;
+ };
+ };
+
+@@ -117,6 +122,26 @@
+
+ &cpu_thermal {
+ coefficients = <(-538) 412000>;
++
++ trips {
++ cpu_alert0: cpu-alert0 {
++ temperature = <70000>;
++ hysteresis = <0>;
++ type = "passive";
++ };
++ };
++
++ cooling-maps {
++ map0 {
++ trip = <&cpu_alert0>;
++ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
++ };
++
++ map1 {
++ trip = <&cpu_crit>;
++ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
++ };
++ };
+ };
+
+ /* enable thermal sensor with the correct compatible property set */
+diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
+index 31b2964..2def068 100644
+--- a/arch/arm/boot/dts/bcm283x.dtsi
++++ b/arch/arm/boot/dts/bcm283x.dtsi
+@@ -38,7 +38,7 @@
+ thermal-sensors = <&thermal>;
+
+ trips {
+- cpu-crit {
++ cpu_crit: cpu-crit {
+ temperature = <80000>;
+ hysteresis = <0>;
+ type = "critical";
+--
+2.7.4