devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 1/4] dt-bindings: thermal-zones: Document critical-action
@ 2023-10-06 18:04 Fabio Estevam
  2023-10-06 18:04 ` [PATCH v10 2/4] thermal_core: Prepare for introduction of thermal reboot Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Fabio Estevam @ 2023-10-06 18:04 UTC (permalink / raw)
  To: daniel.lezcano
  Cc: rafael, krzysztof.kozlowski+dt, robh+dt, conor+dt, linux-pm,
	devicetree, Fabio Estevam, Krzysztof Kozlowski

From: Fabio Estevam <festevam@denx.de>

Document the critical-action property to describe the thermal action
the OS should perform after the critical temperature is reached.

The possible values are "shutdown" and "reboot".

The motivation for introducing the critical-action property is that
different systems may need different thermal actions when the critical
temperature is reached.

For example, in a desktop PC, it is desired that a shutdown happens
after the critical temperature is reached.

However, in some embedded cases, such behavior does not suit well,
as the board may be unattended in the field and rebooting may be a
better approach.

The bootloader may also benefit from this new property as it can check
the SoC temperature and in case the temperature is above the critical
point, it can trigger a shutdown or reboot accordingly.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v9:
- Emphasize that critical-action should be used with care. (Daniel)

 .../bindings/thermal/thermal-zones.yaml          | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
index 4f3acdc4dec0..f88fbafecb01 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@@ -75,6 +75,22 @@ patternProperties:
           framework and assumes that the thermal sensors in this zone
           support interrupts.
 
+      critical-action:
+        $ref: /schemas/types.yaml#/definitions/string
+        description: |
+          The action the OS should perform after the critical temperature is reached.
+          By default the system will shutdown as a safe action to prevent damage
+          to the hardware, if the property is not set.
+          The shutdown action should be always the default and preferred one.
+          Choose 'reboot' with care, as the hardware may be in thermal stress,
+          thus leading to infinite reboots that may cause damage to the hardware.
+          Make sure the firmware/bootloader will act as the last resort and take
+          over the thermal control.
+
+        enum:
+          - shutdown
+          - reboot
+
       thermal-sensors:
         $ref: /schemas/types.yaml#/definitions/phandle-array
         maxItems: 1
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-13 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-06 18:04 [PATCH v10 1/4] dt-bindings: thermal-zones: Document critical-action Fabio Estevam
2023-10-06 18:04 ` [PATCH v10 2/4] thermal_core: Prepare for introduction of thermal reboot Fabio Estevam
2023-10-06 18:04 ` [PATCH v10 3/4] reboot: Introduce thermal_zone_device_critical_reboot() Fabio Estevam
2023-10-06 18:04 ` [PATCH v10 4/4] thermal: thermal_of: Allow rebooting after critical temp Fabio Estevam
2023-10-13 10:39 ` [PATCH v10 1/4] dt-bindings: thermal-zones: Document critical-action Fabio Estevam
2023-10-15 21:54   ` Daniel Lezcano
2023-10-17 12:37     ` Fabio Estevam
2023-11-13 16:03       ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).