From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Jon Hunter <jonathanh@nvidia.com>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH 01/10] dt-bindings: thermal: tegra: Document throttle temperature
Date: Tue, 18 Apr 2023 18:13:35 +0200 [thread overview]
Message-ID: <df267337-f258-4fbc-0fdb-ddfe31761ffa@linaro.org> (raw)
In-Reply-To: <ZD0KdAXyi0Ex1JOU@orome>
On 17/04/2023 10:59, Thierry Reding wrote:
> On Fri, Apr 14, 2023 at 11:47:56PM +0200, Krzysztof Kozlowski wrote:
>> On 14/04/2023 14:57, Thierry Reding wrote:
>>> From: Thierry Reding <treding@nvidia.com>
>>>
>>> Each throttling configuration needs to specify the temperature threshold
>>> at which it should start throttling. Previously this was tied to a given
>>> trip point as a cooling device and used the temperature specified for
>>> that trip point. This doesn't work well because the throttling mechanism
>>> is not a cooling device in the traditional sense.
>>>
>>> Instead, allow device trees to specify the throttle temperature in the
>>> throttle configuration directly so that the throttle doesn't need to be
>>> exposed as a cooling device.
>>>
>>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>>> ---
>>> .../bindings/thermal/nvidia,tegra124-soctherm.yaml | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
>>> index 4677ad6645a5..37dac851f486 100644
>>> --- a/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
>>> +++ b/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.yaml
>>
>> File does not exist in next and no dependency is mentioned, so tricky to
>> review and figure out context. Without context the comment is:
>
> Apologies, I have a conversion series for these thermal bindings. I'll
> send those out first.
>
>>> @@ -120,6 +120,13 @@ properties:
>>> # high (85%, TEGRA_SOCTHERM_THROT_LEVEL_HIGH)
>>> - 3
>>>
>>> + temperature:
>>> + $ref: /schemas/types.yaml#/definitions/int32
>>
>> Use -millicelsius suffix instead:
>> https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
>
> Okay.
>
>>> + minimum: -273000
>>> + maximum: 200000
>>> + description: The temperature threshold (in millicelsius) that,
>>> + when crossed, will trigger the configured automatic throttling.
>>
>> Don't you want some hysteresis? Or is it already using trips binding?
>> But in that case you should skip the $ref and maximum - they come from
>> thermal-zones, don't they?
>
> We don't use a hysteresis at the moment, but checking the register
> documentation, there's indeed "up" and "down" thresholds, so we can add
> another property for that.
>
> This doesn't use the trips binding and in fact, one of the reasons for
> this change is because we want to make this separate from trip points.
> Trip points are usually associated with cooling devices and this
> throttling mechanism doesn't really fit that concept because it is an
> automatic mechanism that is triggered when a given temperature threshold
> is crossed, rather than a manually activated mechanism, which is what a
> cooling device would be.
OK, I just wasn't sure if the binding already includes trips, which
would mean you should use existing 'temperature' property.
In such case, I think it's better to switch to property with common unit
- millicelsius, either low/high ranges or with hysteresis.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-04-18 16:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 12:57 [PATCH 00/10] thermal: tegra: Do not register cooling device Thierry Reding
2023-04-14 12:57 ` [PATCH 01/10] dt-bindings: thermal: tegra: Document throttle temperature Thierry Reding
2023-04-14 21:47 ` Krzysztof Kozlowski
2023-04-17 8:59 ` Thierry Reding
2023-04-18 16:13 ` Krzysztof Kozlowski [this message]
2023-04-14 12:57 ` [PATCH 02/10] thermal: tegra: Use driver-private data consistently Thierry Reding
2023-04-14 12:57 ` [PATCH 03/10] thermal: tegra: Constify SoC-specific data Thierry Reding
2023-04-14 12:57 ` [PATCH 04/10] thermal: tegra: Do not register cooling device Thierry Reding
2023-04-14 12:57 ` [PATCH 05/10] thermal: tegra: Use unsigned int where appropriate Thierry Reding
2023-04-14 12:57 ` [PATCH 06/10] thermal: tegra: Avoid over-allocation of temporary array Thierry Reding
2023-04-14 12:57 ` [PATCH 07/10] thermal: tegra: Remove gratuitous error assignment Thierry Reding
2023-04-14 12:57 ` [PATCH 08/10] thermal: tegra: Minor stylistic cleanups Thierry Reding
2023-04-14 12:57 ` [PATCH 09/10] arm64: tegra: Rework SOCTHERM on Tegra132 and Tegra210 Thierry Reding
2023-04-17 8:15 ` Daniel Lezcano
2023-04-17 9:06 ` Thierry Reding
2023-04-17 9:15 ` Daniel Lezcano
2023-04-14 12:57 ` [PATCH 10/10] ARM: tegra: Rework SOCTHERM on Tegra124 Thierry Reding
2023-06-19 10:36 ` [PATCH 00/10] thermal: tegra: Do not register cooling device Daniel Lezcano
2023-07-11 8:25 ` Daniel Lezcano
2023-07-11 15:42 ` Thierry Reding
2023-07-12 11:01 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df267337-f258-4fbc-0fdb-ddfe31761ffa@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).