linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Eric Woudstra <ericwouds@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	Sean Wang <sean.wang@mediatek.com>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Daniel Golle <daniel@makrotopia.org>
Subject: Re: Aw: Re: Re: Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 14:50:42 +0200	[thread overview]
Message-ID: <67107afb-6ed9-9681-6fce-0d52e567ea12@linaro.org> (raw)
In-Reply-To: <trinity-59bd4461-3429-4382-9754-90cf20287cad-1624624111998@3c-app-gmx-bs66>

On 25/06/2021 14:28, Frank Wunderlich wrote:
>> Gesendet: Freitag, 25. Juni 2021 um 13:47 Uhr
>> Von: "Daniel Lezcano" <daniel.lezcano@linaro.org>
> 
>>> but we need to disable the passive trip as cpu-trotteling starts there...the higher temperature trips are currently not reached
>>
>> Sorry, can you rephrase it ? I'm not getting the point.
> 
> the problem currently is that passive is at 47degress Celsius and
> trottles cpu, active (67°C) and hot points are never reached this way.
> so at least we need to change temperatures in dtsi, and maybe disable
> cpu-trotteling on passive trip. imho fan will never start if it is in
> active and cpu is trottled before in passive

Ok, thanks for the clarification.

>>> summary
>>>
>>> moving fan and cpu_thermal-override to bananapi-r64.dts
>>>
>>> passive-trip: cooling-device = <&cpu0/1 0 0> as in erics Patch
>>> active trip: cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>> the other 2 unchanged
>>>
>>> but i suggest changing the temperature points in mt7622 dtsi as this is SoC specific
>>>
>>> so basicly:
>>>
>>> --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>>> +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
>>> @@ -143,13 +143,13 @@ cpu_thermal: cpu-thermal {
>>>
>>>                         trips {
>>>                                 cpu_passive: cpu-passive {
>>> -                                       temperature = <47000>;
>>> +                                       temperature = <70000>;
>>
>> May be increase the passive temp to 75°C.
>>
>>>                                         hysteresis = <2000>;
>>>                                         type = "passive";
>>>                                 };
>>>
>>>                                 cpu_active: cpu-active {
>>> -                                       temperature = <67000>;
>>> +                                       temperature = <80000>;
>>>                                         hysteresis = <2000>;
>>>                                         type = "active";
>>>                                 };
>>
>> Move the active trip 'cpu_active' to mt7622-bananapi-bpi-r64.dts. and
>> set it to 70°C in the mt7622-bananapi-bpi-r64.dts, so the fan will act
>> before the cpu throttling.
>>
>> The behavior should be the following: The temperature reaches 70°C, the
>> fan will start, if the temperature continues to increase, it will
>> increase the speed. If the temperature reaches 75°C, the fan is still
>> rotating at full speed but the cpu begins to be throttled.
> 
> passive to 75 and active lower to 70? is this as intended that active comes before passive?

Yes. So there is a default passive mitigation temp for the SoC at 75°C.
And the bpi has a setup with a fan mitigating before the cpu throttling.

> mt7622-bananapi-bpi-r64.dts:
> 
> &cpu_thermal {
> 	trips {
> 		cpu_passive: cpu-passive {
> 			temperature = <75000>;
> 			hysteresis = <2000>;
> 			type = "passive";
> 		};

No need to add this trip point, it should be changed to 75°C in SoC DT
mt7622.dtsi. This fragment of DT will concatenate with the previous one.

> 		cpu_active: cpu-active {
> 			temperature = <70000>;
> 			hysteresis = <2000>;
> 			type = "active";
> 		};
> 	};
> 
> 	cooling-maps {
> 		map1 {
> 			trip = <&cpu_active>;
> 			cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> 		};
> 	};
> };
> 
> 
>> AFAIU, it is a Cortex-A53 running @1.35GH, so except the board is in a
>> black metal box under the sun, I don't see how we can reach this thermal
>> limits.
>>
>>> @@ -170,8 +170,8 @@ cpu-crit {
>>>                         cooling-maps {
>>>                                 map0 {
>>>                                         trip = <&cpu_passive>;
>>> -                                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
>>> -                                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>>> +                                       cooling-device = <&cpu0 0 0>,
>>> +                                                        <&cpu1 0 0>;
>>
>> You should keep it untouched.
> 
> then cpu is trottled at passive point (currently 47°C) and imho fan does not start at active
> 
>>>                                 };
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

      reply	other threads:[~2021-06-25 12:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 12:19 [PATCH] Fix mt7622.dtsi thermal cpu ericwouds
2021-06-21 18:29 ` Daniel Lezcano
2021-06-23 15:35   ` Eric Woudstra
2021-06-23 15:58     ` Daniel Lezcano
2021-06-23 18:43       ` Eric Woudstra
2021-06-23 20:08         ` Daniel Lezcano
2021-06-24  9:59           ` Eric Woudstra
2021-06-24 10:21             ` Daniel Lezcano
2021-06-24 13:29               ` Eric Woudstra
2021-06-25  8:16                 ` Aw: " Frank Wunderlich
2021-06-25  9:22                   ` Daniel Golle
2021-06-25  9:31                     ` Aw: " Frank Wunderlich
2021-06-25 10:11                       ` Daniel Golle
2021-06-25  9:57                   ` Aw: " Daniel Lezcano
2021-06-25 11:03                     ` Aw: " Frank Wunderlich
2021-06-25 11:07                       ` Eric Woudstra
2021-06-25 11:47                       ` Aw: " Daniel Lezcano
2021-06-25 12:28                         ` Aw: " Frank Wunderlich
2021-06-25 12:50                           ` Daniel Lezcano [this message]

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=67107afb-6ed9-9681-6fce-0d52e567ea12@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=daniel@makrotopia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ericwouds@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.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).