Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396625 > unrolled thread
| Started by | Wei Ni <wni@nvidia.com> |
|---|---|
| First post | 2016-05-09 09:00 +0200 |
| Last post | 2016-05-09 09:00 +0200 |
| Articles | 6 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v4 00/11] Add HW throttle for Tegra soctherm Wei Ni <wni@nvidia.com> - 2016-05-09 09:00 +0200
[PATCH v4 08/11] arm64: tegra: set hot trips for Tegra132 Wei Ni <wni@nvidia.com> - 2016-05-09 09:00 +0200
[PATCH v4 06/11] arm64: tegra: use tegra132-soctherm for Tegra132 Wei Ni <wni@nvidia.com> - 2016-05-09 09:00 +0200
[PATCH v4 07/11] arm64: tegra: set critical trips for Tegra132 Wei Ni <wni@nvidia.com> - 2016-05-09 09:00 +0200
[PATCH v4 04/11] arm: tegra: set critical trips for Tegra124 Wei Ni <wni@nvidia.com> - 2016-05-09 09:00 +0200
[PATCH v4 11/11] arm64: tegra: set hot trips for Tegra210 Wei Ni <wni@nvidia.com> - 2016-05-09 09:00 +0200
| From | Wei Ni <wni@nvidia.com> |
|---|---|
| Date | 2016-05-09 09:00 +0200 |
| Subject | [PATCH v4 00/11] Add HW throttle for Tegra soctherm |
| Message-ID | <rwNkC-7Aw-3@gated-at.bofh.it> |
This series add following functions for Tegra soctherm: 1. add HW throttle function. 2. enable soctherm node for Tegra124, Tegra132, Tegra210, and set "critical", "hot" trips for them. Main changes from v3: 1. change some properties'name and descriptions, per Rob's comments. 2. change the corresponding driver codes. Main changes from v2: 1. improve the of-binding, per Eduardo's comments, and change the corresponding driver codes. 2. move two setting critical trip patches in this series, 3. fix some bugs in dts changes. Main changes from v1: 1. use readl/writel instead of __raw_readl/__raw_writel. 2. rebase on the linux-next. The v1 series is in: https://lkml.org/lkml/2016/3/31/230 The v2 series is in: https://lkml.org/lkml/2016/4/26/1577 The v3 series is in: https://lkml.org/lkml/2016/5/3/274 Wei Ni (11): of: Add bindings of hw throttle for Tegra soctherm thermal: tegra: add hw-throttle function thermal: tegra: add hw-throttle for Tegra132 arm: tegra: set critical trips for Tegra124 arm: tegra: set hot trips for Tegra124 arm64: tegra: use tegra132-soctherm for Tegra132 arm64: tegra: set critical trips for Tegra132 arm64: tegra: set hot trips for Tegra132 arm64: tegra: add soctherm node for Tegra210 arm64: tegra: set critical trips for Tegra210 arm64: tegra: set hot trips for Tegra210 .../bindings/thermal/nvidia,tegra124-soctherm.txt | 121 ++- arch/arm/boot/dts/tegra124-jetson-tk1.dts | 18 +- arch/arm/boot/dts/tegra124.dtsi | 83 +- arch/arm64/boot/dts/nvidia/tegra132.dtsi | 119 ++- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 127 ++++ drivers/thermal/tegra/soctherm.c | 842 ++++++++++++++++++++- drivers/thermal/tegra/soctherm.h | 10 + drivers/thermal/tegra/tegra124-soctherm.c | 18 + drivers/thermal/tegra/tegra132-soctherm.c | 18 + drivers/thermal/tegra/tegra210-soctherm.c | 18 + include/dt-bindings/thermal/tegra124-soctherm.h | 5 + 11 files changed, 1344 insertions(+), 35 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Wei Ni <wni@nvidia.com> |
|---|---|
| Date | 2016-05-09 09:00 +0200 |
| Subject | [PATCH v4 08/11] arm64: tegra: set hot trips for Tegra132 |
| Message-ID | <rwNkD-7Aw-25@gated-at.bofh.it> |
| In reply to | #1396625 |
Enable throttle function for SOC_THERM.
Set "hot" trips for cpu and gpu thermal zones, which
can trigger the SOC_THERM hardware throttle.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
arch/arm64/boot/dts/nvidia/tegra132.dtsi | 41 +++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra132.dtsi b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
index a3889e930010..63ec3a9c4e04 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
@@ -729,7 +729,9 @@
soctherm: thermal-sensor@700e2000 {
compatible = "nvidia,tegra132-soctherm";
- reg = <0x0 0x700e2000 0x0 0x600>;
+ reg = <0x0 0x700e2000 0x0 0x600 /* 0: SOC_THERM reg_base */
+ 0x0 0x70040000 0x0 0x200>; /* 2: CCROC reg_base */
+ reg-names = "soctherm-reg", "ccroc-reg";
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
<&tegra_car TEGRA124_CLK_SOC_THERM>;
@@ -737,6 +739,15 @@
resets = <&tegra_car 78>;
reset-names = "soctherm";
#thermal-sensor-cells = <1>;
+
+ throttle-cfgs {
+ throttle_heavy: nvidia,heavy {
+ nvidia,priority = <100>;
+ nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
+
+ #cooling-cells = <2>;
+ };
+ };
};
thermal-zones {
@@ -753,13 +764,19 @@
hysteresis = <1000>;
type = "critical";
};
+
+ cpu_throttle_trip: throttle-trip {
+ temperature = <102000>;
+ hysteresis = <1000>;
+ type = "hot";
+ };
};
cooling-maps {
- /*
- * There are currently no cooling maps,
- * because there are no cooling devices.
- */
+ map0 {
+ trip = <&cpu_throttle_trip>;
+ cooling-device = <&throttle_heavy 1 1>;
+ };
};
};
mem {
@@ -797,13 +814,19 @@
hysteresis = <1000>;
type = "critical";
};
+
+ gpu_throttle_trip: throttle-trip {
+ temperature = <99000>;
+ hysteresis = <1000>;
+ type = "hot";
+ };
};
cooling-maps {
- /*
- * There are currently no cooling maps,
- * because there are no cooling devices.
- */
+ map0 {
+ trip = <&gpu_throttle_trip>;
+ cooling-device = <&throttle_heavy 1 1>;
+ };
};
};
pllx {
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Wei Ni <wni@nvidia.com> |
|---|---|
| Date | 2016-05-09 09:00 +0200 |
| Subject | [PATCH v4 06/11] arm64: tegra: use tegra132-soctherm for Tegra132 |
| Message-ID | <rwNkD-7Aw-29@gated-at.bofh.it> |
| In reply to | #1396625 |
The Tegra132 has the specific settings for soctherm,
so change to use campatible "nvidia,tegra132-soctherm" for it.
And adds cpu, gpu, mem and pllx thermal zones.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
arch/arm64/boot/dts/nvidia/tegra132.dtsi | 36 ++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra132.dtsi b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
index 2013f8916084..e41d8e82d7ed 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
@@ -4,6 +4,7 @@
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
#include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/thermal/tegra124-soctherm.h>
/ {
compatible = "nvidia,tegra132", "nvidia,tegra124";
@@ -727,8 +728,8 @@
};
soctherm: thermal-sensor@700e2000 {
- compatible = "nvidia,tegra124-soctherm";
- reg = <0x0 0x700e2000 0x0 0x1000>;
+ compatible = "nvidia,tegra132-soctherm";
+ reg = <0x0 0x700e2000 0x0 0x600>;
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
<&tegra_car TEGRA124_CLK_SOC_THERM>;
@@ -738,6 +739,37 @@
#thermal-sensor-cells = <1>;
};
+ thermal-zones {
+ cpu {
+ polling-delay-passive = <1000>;
+ polling-delay = <0>;
+
+ thermal-sensors =
+ <&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
+ };
+ mem {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors =
+ <&soctherm TEGRA124_SOCTHERM_SENSOR_MEM>;
+ };
+ gpu {
+ polling-delay-passive = <1000>;
+ polling-delay = <0>;
+
+ thermal-sensors =
+ <&soctherm TEGRA124_SOCTHERM_SENSOR_GPU>;
+ };
+ pllx {
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+
+ thermal-sensors =
+ <&soctherm TEGRA124_SOCTHERM_SENSOR_PLLX>;
+ };
+ };
+
ahub@70300000 {
compatible = "nvidia,tegra124-ahub";
reg = <0x0 0x70300000 0x0 0x200>,
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Wei Ni <wni@nvidia.com> |
|---|---|
| Date | 2016-05-09 09:00 +0200 |
| Subject | [PATCH v4 07/11] arm64: tegra: set critical trips for Tegra132 |
| Message-ID | <rwNkD-7Aw-31@gated-at.bofh.it> |
| In reply to | #1396625 |
Set general "critical" trip temperatures for cpu, gpu, mem and pllx
thermal zones on Tegra132, these trips can trigger shut down or reset.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
arch/arm64/boot/dts/nvidia/tegra132.dtsi | 60 ++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra132.dtsi b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
index e41d8e82d7ed..a3889e930010 100644
--- a/arch/arm64/boot/dts/nvidia/tegra132.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra132.dtsi
@@ -746,6 +746,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
+
+ trips {
+ cpu_shutdown_trip {
+ temperature = <105000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
mem {
polling-delay-passive = <0>;
@@ -753,6 +768,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_MEM>;
+
+ trips {
+ mem_shutdown_trip {
+ temperature = <101000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
gpu {
polling-delay-passive = <1000>;
@@ -760,6 +790,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_GPU>;
+
+ trips {
+ gpu_shutdown_trip {
+ temperature = <101000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
pllx {
polling-delay-passive = <0>;
@@ -767,6 +812,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_PLLX>;
+
+ trips {
+ pllx_shutdown_trip {
+ temperature = <105000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
};
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Wei Ni <wni@nvidia.com> |
|---|---|
| Date | 2016-05-09 09:00 +0200 |
| Subject | [PATCH v4 04/11] arm: tegra: set critical trips for Tegra124 |
| Message-ID | <rwNkD-7Aw-27@gated-at.bofh.it> |
| In reply to | #1396625 |
Set general "critical" trip temperatures for cpu, gpu, mem and pllx
thermal zones for all Tegra124 platform, these trips can trigger
shut down or reset.
Tegra124 Jetson TK1 was already set "critical" trips before, so it
can overwrite the general values.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
arch/arm/boot/dts/tegra124-jetson-tk1.dts | 18 ++--------
arch/arm/boot/dts/tegra124.dtsi | 60 +++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 15 deletions(-)
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
index 941f36263c8f..40ad62c9c62e 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -2049,44 +2049,32 @@
thermal-zones {
cpu {
trips {
- trip@0 {
+ cpu-shutdown-trip {
temperature = <101000>;
hysteresis = <0>;
type = "critical";
};
};
-
- cooling-maps {
- /* There are currently no cooling maps because there are no cooling devices */
- };
};
mem {
trips {
- trip@0 {
+ mem-shutdown-trip {
temperature = <101000>;
hysteresis = <0>;
type = "critical";
};
};
-
- cooling-maps {
- /* There are currently no cooling maps because there are no cooling devices */
- };
};
gpu {
trips {
- trip@0 {
+ gpu-shutdown-trip {
temperature = <101000>;
hysteresis = <0>;
type = "critical";
};
};
-
- cooling-maps {
- /* There are currently no cooling maps because there are no cooling devices */
- };
};
};
};
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index ea4811870de2..08c7f85ea2c8 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -1149,6 +1149,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_CPU>;
+
+ trips {
+ cpu-shutdown-trip {
+ temperature = <103000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
mem {
@@ -1157,6 +1172,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_MEM>;
+
+ trips {
+ mem-shutdown-trip {
+ temperature = <103000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
gpu {
@@ -1165,6 +1195,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_GPU>;
+
+ trips {
+ gpu-shutdown-trip {
+ temperature = <101000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
pllx {
@@ -1173,6 +1218,21 @@
thermal-sensors =
<&soctherm TEGRA124_SOCTHERM_SENSOR_PLLX>;
+
+ trips {
+ pllx-shutdown-trip {
+ temperature = <103000>;
+ hysteresis = <0>;
+ type = "critical";
+ };
+ };
+
+ cooling-maps {
+ /*
+ * There are currently no cooling maps,
+ * because there are no cooling devices.
+ */
+ };
};
};
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Wei Ni <wni@nvidia.com> |
|---|---|
| Date | 2016-05-09 09:00 +0200 |
| Subject | [PATCH v4 11/11] arm64: tegra: set hot trips for Tegra210 |
| Message-ID | <rwNkD-7Aw-33@gated-at.bofh.it> |
| In reply to | #1396625 |
Enable throttle function for SOC_THERM.
Set "hot" trips for cpu and gpu thermal zones, which
can trigger the SOC_THERM hardware throttle.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
arch/arm64/boot/dts/nvidia/tegra210.dtsi | 41 +++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index e55589c8a561..b364153ae7e9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -808,7 +808,9 @@
soctherm: thermal-sensor@700e2000 {
compatible = "nvidia,tegra210-soctherm";
- reg = <0x0 0x700e2000 0x0 0x1000>;
+ reg = <0x0 0x700e2000 0x0 0x600 /* SOC_THERM reg_base */
+ 0x0 0x60006000 0x0 0x400>; /* CAR reg_base */
+ reg-names = "soctherm-reg", "car-reg";
interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA210_CLK_TSENSOR>,
<&tegra_car TEGRA210_CLK_SOC_THERM>;
@@ -816,6 +818,15 @@
resets = <&tegra_car 78>;
reset-names = "soctherm";
#thermal-sensor-cells = <1>;
+
+ throttle-cfgs {
+ throttle_heavy: nvidia,heavy {
+ nvidia,priority = <100>;
+ nvidia,cpu-throt-percent = <85>;
+
+ #cooling-cells = <2>;
+ };
+ };
};
thermal-zones {
@@ -832,13 +843,19 @@
hysteresis = <0>;
type = "critical";
};
+
+ cpu_throttle_trip: throttle-trip {
+ temperature = <98500>;
+ hysteresis = <1000>;
+ type = "hot";
+ };
};
cooling-maps {
- /*
- * There are currently no cooling maps,
- * because there are no cooling devices.
- */
+ map0 {
+ trip = <&cpu_throttle_trip>;
+ cooling-device = <&throttle_heavy 1 1>;
+ };
};
};
mem {
@@ -876,13 +893,19 @@
hysteresis = <0>;
type = "critical";
};
+
+ gpu_throttle_trip: throttle-trip {
+ temperature = <100000>;
+ hysteresis = <1000>;
+ type = "hot";
+ };
};
cooling-maps {
- /*
- * There are currently no cooling maps,
- * because there are no cooling devices.
- */
+ map0 {
+ trip = <&gpu_throttle_trip>;
+ cooling-device = <&throttle_heavy 1 1>;
+ };
};
};
pllx {
--
1.9.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web