Skip to contentSkip to conversation

of: Add bindings of hw-trip-points for soctherm

PATCH Superseded Wei Ni 2 participants 3 messages Jan 25, 2016 – Jan 26, 2016

Subsystems (3)

v4 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Wei Ni

author
#0 lore raw

PATCH v4 7/11 of: Add bindings of hw-trip-points for soctherm

Add hw-trips sub-node for soctherm, which is
used to describe the hardware trip points for
each soctherm sensors.

---
 .../devicetree/bindings/thermal/tegra-soctherm.txt | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
Documentation/devicetree/bindings/thermal/tegra-soctherm.txt +24 -0
index 6b68cd150405..75dc9dbe7e1a 100644
@@ -26,6 +26,15 @@ Required properties :
     of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a
     list of valid values when referring to thermal sensors.
 
+Optional properties:
+- hw-trip-points : A sub-node which is a container of hardware trip points
+    for each sensors.
+  * sensors: Sub-nodes which are used to describe the HW trip points info,
+        must be named as "cpu", "gpu", "mem", "pll".
+      Properties:
+      - thermtrip-temperature : Shutdown or reset temperature in millicelsius,
+        once the temperature of this sensor is higher than the
+        thermtrip-temperature, the system will be shutdown or reset.
 
 Example :
 
@@ -40,6 +49,21 @@ Example :
 		reset-names = "soctherm";
 
 		#thermal-sensor-cells = <1>;
+
+		hw-trip-points {
+			cpu {
+				thermtrip-temperature = <103000>;
+			};
+			gpu {
+				thermtrip-temperature = <103500>;
+			};
+			mem {
+				thermtrip-temperature = <103500>;
+			};
+			pll {
+				thermtrip-temperature = <105000>;
+			};
+		};
 	};
 
 Example: referring to thermal sensors :
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 3 lines · Wei Ni

Add hw-trips sub-node for soctherm, which is
used to describe the hardware trip points for
each soctherm sensors.

This seems like something that should be common. There was a hwmon binding just the other day with temperature set points.

Quoted 12 lines
---
 .../devicetree/bindings/thermal/tegra-soctherm.txt | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
Documentation/devicetree/bindings/thermal/tegra-soctherm.txt +0 -0
index 6b68cd150405..75dc9dbe7e1a 100644
@@ -26,6 +26,15 @@ Required properties :
     of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a
     list of valid values when referring to thermal sensors.

Documentation/devicetree/bindings/thermal/tegra-soctherm.txt Required properties : · line 37

Quoted 10 lines
Documentation/devicetree/bindings/thermal/tegra-soctherm.txt +9 -0
 
+Optional properties:
+- hw-trip-points : A sub-node which is a container of hardware trip points
+    for each sensors.
+  * sensors: Sub-nodes which are used to describe the HW trip points info,
+        must be named as "cpu", "gpu", "mem", "pll".
+      Properties:
+      - thermtrip-temperature : Shutdown or reset temperature in millicelsius,
+        once the temperature of this sensor is higher than the
+        thermtrip-temperature, the system will be shutdown or reset.

Append units and temperature is a bit redundant. Something like thermtrip-mC or thermtrip-milliC

You could easily have multiple levels of trip points, so perhaps the name needs to reflect the action (i.e. shutdown).

Rob

author
#2 lore raw
Quoted 7 lines · Rob Herring
Quoted 3 lines · Wei Ni

Add hw-trips sub-node for soctherm, which is
used to describe the hardware trip points for
each soctherm sensors.

This seems like something that should be common. There was a hwmon binding just the other day with temperature set points.

I have checked the thermal_hwmon.c, but we can't use it. Because we use of-thermal to register thermal zone, but it doesn't support to register to hwmon. And it only support to show the critical temperature.
I think this sub-node is used for Tegra's soctherm specifically. And it's not only for shutdown/reset, it also will be used to describe the hw-throttle function in next serial patches (I'm preparing it, didn't send out yet).

BTW, I didn't find the hwmon binding to introduce the hw trips in TOT kernel-next, could you show me it?

Quoted 14 lines
Quoted 14 lines
---
 .../devicetree/bindings/thermal/tegra-soctherm.txt | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
Documentation/devicetree/bindings/thermal/tegra-soctherm.txt +0 -0
index 6b68cd150405..75dc9dbe7e1a 100644
@@ -26,6 +26,15 @@ Required properties :
     of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a
     list of valid values when referring to thermal sensors.
 
Quoted 12 lines

Documentation/devicetree/bindings/thermal/tegra-soctherm.txt Required properties : · line 37

Quoted 9 lines
Documentation/devicetree/bindings/thermal/tegra-soctherm.txt +9 -0
+Optional properties:
+- hw-trip-points : A sub-node which is a container of hardware trip points
+    for each sensors.
+  * sensors: Sub-nodes which are used to describe the HW trip points info,
+        must be named as "cpu", "gpu", "mem", "pll".
+      Properties:
+      - thermtrip-temperature : Shutdown or reset temperature in millicelsius,
+        once the temperature of this sensor is higher than the
+        thermtrip-temperature, the system will be shutdown or reset.

Append units and temperature is a bit redundant. Something like thermtrip-mC or thermtrip-milliC

Hmm, got it, will change it in next version.

Quoted 3 lines

You could easily have multiple levels of trip points, so perhaps the name needs to reflect the action (i.e. shutdown).

This temperature can trigger shutdown or reset, it depends on the platform design, and the Tegra's SPEC call it as thermtrip, so I use this name. I prefer to use "thermtgrip-mC".

Quoted 3 lines

Rob