[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210802211947.19715-15-digetx@gmail.com>
Date: Tue, 3 Aug 2021 00:19:46 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Matt Merhar <mattmerhar@...tonmail.com>,
Peter Geis <pgwipeout@...il.com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: [PATCH v2 14/15] ARM: tegra: acer-a500: Improve thermal zones
Use skin temperature for maintaining temperature that is suitable
specifically for A500. Add CPU thermal zone that protects silicon.
All these changes don't make a significant difference, but it is a
more correct definition of thermal zones.
Signed-off-by: Dmitry Osipenko <digetx@...il.com>
---
.../boot/dts/tegra20-acer-a500-picasso.dts | 55 ++++++++++++++++---
1 file changed, 46 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts b/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts
index 87fef4cb630f..2280d75b66ab 100644
--- a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts
+++ b/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts
@@ -1029,11 +1029,48 @@ sound {
};
thermal-zones {
+ /*
+ * NCT1008 has two sensors:
+ *
+ * 0: internal that monitors ambient/skin temperature
+ * 1: external that is connected to the CPU's diode
+ *
+ * Ideally we should use userspace thermal governor,
+ * but it's a much more complex solution. The "skin"
+ * zone is a simpler solution which prevents A500 from
+ * getting too hot from a user's tactile perspective.
+ * The CPU zone is intended to protect silicon from damage.
+ */
+
skin-thermal {
polling-delay-passive = <1000>; /* milliseconds */
- polling-delay = <0>; /* milliseconds */
+ polling-delay = <5000>; /* milliseconds */
thermal-sensors = <&nct1008 0>;
+
+ trips {
+ trip0: skin-alert {
+ /* start throttling at 60C */
+ temperature = <60000>;
+ hysteresis = <200>;
+ type = "passive";
+ };
+
+ trip1: skin-crit {
+ /* shut down at 70C */
+ temperature = <70000>;
+ hysteresis = <2000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ trip = <&trip0>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
};
cpu-thermal {
@@ -1043,24 +1080,24 @@ cpu-thermal {
thermal-sensors = <&nct1008 1>;
trips {
- trip0: cpu-alert0 {
- /* start throttling at 60C */
- temperature = <60000>;
+ trip2: cpu-alert {
+ /* throttle at 85C until temperature drops to 84.8C */
+ temperature = <85000>;
hysteresis = <200>;
type = "passive";
};
- trip1: cpu-crit {
- /* shut down at 70C */
- temperature = <70000>;
+ trip3: cpu-crit {
+ /* shut down at 90C */
+ temperature = <90000>;
hysteresis = <2000>;
type = "critical";
};
};
cooling-maps {
- map0 {
- trip = <&trip0>;
+ map1 {
+ trip = <&trip2>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
--
2.32.0
Powered by blists - more mailing lists