* [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm
@ 2016-01-29 8:47 Wei Ni
[not found] ` <1454057260-16412-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Wei Ni @ 2016-01-29 8:47 UTC (permalink / raw)
To: thierry.reding, rui.zhang
Cc: MLongnecker, swarren, mikko.perttunen, linux-tegra, linux-kernel,
devicetree, Wei Ni
Add hw-trips sub-node for soctherm, which is
used to describe the hardware trip points for
each soctherm sensors.
Signed-off-by: Wei Ni <wni@nvidia.com>
---
.../devicetree/bindings/thermal/tegra-soctherm.txt | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt b/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt
index 6b68cd150405..fb397191faa7 100644
--- a/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt
+++ b/Documentation/devicetree/bindings/thermal/tegra-soctherm.txt
@@ -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-mC : Shutdown or reset temperature in millicelsius,
+ once the temperature of this sensor is higher than it, 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-mC = <103000>;
+ };
+ gpu {
+ thermtrip-mC = <103500>;
+ };
+ mem {
+ thermtrip-mC = <103500>;
+ };
+ pll {
+ thermtrip-mC = <105000>;
+ };
+ };
};
Example: referring to thermal sensors :
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1454057260-16412-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm [not found] ` <1454057260-16412-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> @ 2016-02-12 14:42 ` Rob Herring [not found] ` <CAL_JsqKwQOxkWyYPcv6sBe8ELUuPx4N+iUF94J8R63bRxsGK4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Rob Herring @ 2016-02-12 14:42 UTC (permalink / raw) To: Wei Ni Cc: Thierry Reding, Zhang Rui, MLongnecker-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren, Mikko Perttunen, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote: > Add hw-trips sub-node for soctherm, which is > used to describe the hardware trip points for > each soctherm sensors. I still don't understand why you are doing something custom here. What's wrong with what is defined in: Documentation/devicetree/bindings/thermal/thermal.txt Rob ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAL_JsqKwQOxkWyYPcv6sBe8ELUuPx4N+iUF94J8R63bRxsGK4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm [not found] ` <CAL_JsqKwQOxkWyYPcv6sBe8ELUuPx4N+iUF94J8R63bRxsGK4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-02-15 7:15 ` Wei Ni 2016-02-15 7:19 ` Wei Ni 2016-02-17 9:46 ` Wei Ni 0 siblings, 2 replies; 6+ messages in thread From: Wei Ni @ 2016-02-15 7:15 UTC (permalink / raw) To: Rob Herring, Sascha Hauer Cc: Thierry Reding, Zhang Rui, MLongnecker-DDmLM1+adcrQT0dZR+AlfA, Stephen Warren, Mikko Perttunen, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hi, Rob On 2016年02月12日 22:42, Rob Herring wrote: > On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote: >> Add hw-trips sub-node for soctherm, which is >> used to describe the hardware trip points for >> each soctherm sensors. > > I still don't understand why you are doing something custom here. > What's wrong with what is defined in: > > Documentation/devicetree/bindings/thermal/thermal.txt In current thermal framework, it support to set trip points for the thermal zones, but this trip point is handled by SW, doesn't have callbacks to program the hardware. There had patches: [PATCH 12/16] thermal: thermal: Add support for hardware-tracked trip points, http://lists.infradead.org/pipermail/linux-mediatek/2015-May/000866.html, which can support to program hardware to set trip points, but it seems this series didn't be taken. So I add this hw-trip-points sub-node for soctherm. Hi, Sascha Hauer Thanks. Wei. > > Rob > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm 2016-02-15 7:15 ` Wei Ni @ 2016-02-15 7:19 ` Wei Ni 2016-02-17 9:46 ` Wei Ni 1 sibling, 0 replies; 6+ messages in thread From: Wei Ni @ 2016-02-15 7:19 UTC (permalink / raw) To: Sascha Hauer Cc: Rob Herring, Thierry Reding, Zhang Rui, MLongnecker, Stephen Warren, Mikko Perttunen, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org On 2016年02月15日 15:15, Wei Ni wrote: > Hi, Rob > > On 2016年02月12日 22:42, Rob Herring wrote: >> On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni <wni@nvidia.com> wrote: >>> Add hw-trips sub-node for soctherm, which is >>> used to describe the hardware trip points for >>> each soctherm sensors. >> >> I still don't understand why you are doing something custom here. >> What's wrong with what is defined in: >> >> Documentation/devicetree/bindings/thermal/thermal.txt > > In current thermal framework, it support to set trip points for the thermal > zones, but this trip point is handled by SW, doesn't have callbacks to program > the hardware. > There had patches: > [PATCH 12/16] thermal: thermal: Add support for hardware-tracked trip points, > http://lists.infradead.org/pipermail/linux-mediatek/2015-May/000866.html, > which can support to program hardware to set trip points, but it seems this > series didn't be taken. > So I add this hw-trip-points sub-node for soctherm. > > Hi, Sascha Hauer Hi, Sasha Sorry, I forgot to type messages in previous mail. I noticed that you submitted "[PATCH 12/16] thermal: thermal: Add support for hardware-tracked trip points" long time ago, I think it's very useful, do you know why it didn't be taken? > > Thanks. > Wei. > >> >> Rob >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm 2016-02-15 7:15 ` Wei Ni 2016-02-15 7:19 ` Wei Ni @ 2016-02-17 9:46 ` Wei Ni 2016-02-17 20:52 ` Matt Longnecker 1 sibling, 1 reply; 6+ messages in thread From: Wei Ni @ 2016-02-17 9:46 UTC (permalink / raw) To: Rob Herring Cc: Sascha Hauer, Thierry Reding, Zhang Rui, MLongnecker, Stephen Warren, Mikko Perttunen, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Hi, Rob On 2016年02月15日 15:15, Wei Ni wrote: > Hi, Rob > > On 2016年02月12日 22:42, Rob Herring wrote: >> On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni <wni@nvidia.com> wrote: >>> Add hw-trips sub-node for soctherm, which is >>> used to describe the hardware trip points for >>> each soctherm sensors. >> >> I still don't understand why you are doing something custom here. >> What's wrong with what is defined in: >> >> Documentation/devicetree/bindings/thermal/thermal.txt I think it's better to add a .set_trip_temp for of-thermal's thermal_zone_of_device_ops{}, so that we can set trip points on hardware. I'm preparing patches, and will send out next version. Thanks for your comments. > > In current thermal framework, it support to set trip points for the thermal > zones, but this trip point is handled by SW, doesn't have callbacks to program > the hardware. > There had patches: > [PATCH 12/16] thermal: thermal: Add support for hardware-tracked trip points, > http://lists.infradead.org/pipermail/linux-mediatek/2015-May/000866.html, > which can support to program hardware to set trip points, but it seems this > series didn't be taken. > So I add this hw-trip-points sub-node for soctherm. > > Hi, Sascha Hauer > > Thanks. > Wei. > >> >> Rob >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm 2016-02-17 9:46 ` Wei Ni @ 2016-02-17 20:52 ` Matt Longnecker 0 siblings, 0 replies; 6+ messages in thread From: Matt Longnecker @ 2016-02-17 20:52 UTC (permalink / raw) To: Wei Ni, Rob Herring Cc: Sascha Hauer, Thierry Reding, Zhang Rui, Stephen Warren, Mikko Perttunen, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-pm (cc += linux-pm) Rob, The Linux thermal framework makes a sharp distinction between "thermal zones" and "cooling devices". thermal_zones are aware of temperatures and have trip points. cooling_devices are unaware of temperatures -- they just have a state variable. The thermal framework binds thermal zones at particular temperatures to particular cooling devices. It does so *in software* The SOC_THERM IP block doesn't fit neatly in that paradigm. Yes, it provides the ability to read temperatures and raise interrupts at temperatures. However, it also has the ability to take cooling action _in hardware_ at particular temperatures. It can throttle the CPU & GPU clock and it can shut down the SOC. Neither of those are graceful actions, but they are valuable in practice. In previous incarnations of this driver we have implemented an unholy mash-up of a cooling device and a thermal zone for configuring the hardware thermal actions. It was a mess. This patchset from Wei takes a simpler approach -- allow the thermal hardware cooling actions to be configured directly via DT. It's simple but it's good enough in practice. I like it. -Matt On 02/17/2016 01:46 AM, Wei Ni wrote: > On 2016年02月15日 15:15, Wei Ni wrote: >> >Hi, Rob >> > >> >On 2016年02月12日 22:42, Rob Herring wrote: >>> >>On Fri, Jan 29, 2016 at 2:47 AM, Wei Ni<wni@nvidia.com> wrote: >>>> >>>Add hw-trips sub-node for soctherm, which is >>>> >>>used to describe the hardware trip points for >>>> >>>each soctherm sensors. >>> >> >>> >>I still don't understand why you are doing something custom here. >>> >>What's wrong with what is defined in: >>> >> >>> >>Documentation/devicetree/bindings/thermal/thermal.txt > I think it's better to add a .set_trip_temp for of-thermal's > thermal_zone_of_device_ops{}, so that we can set trip points on hardware. I'm > preparing patches, and will send out next version. > Thanks for your comments. > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-17 20:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-29 8:47 [PATCH V5 07/11] of: Add bindings of hw-trip-points for soctherm Wei Ni
[not found] ` <1454057260-16412-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-12 14:42 ` Rob Herring
[not found] ` <CAL_JsqKwQOxkWyYPcv6sBe8ELUuPx4N+iUF94J8R63bRxsGK4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-15 7:15 ` Wei Ni
2016-02-15 7:19 ` Wei Ni
2016-02-17 9:46 ` Wei Ni
2016-02-17 20:52 ` Matt Longnecker
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox