linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Wunderlich <frank-w@public-files.de>
To: Eric Woudstra <ericwouds@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	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: Aw: Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 10:16:43 +0200	[thread overview]
Message-ID: <trinity-7580d955-3187-41e5-9297-1ac8f628a9d5-1624609003739@3c-app-gmx-bs66> (raw)
In-Reply-To: <3dd22cf2-1186-4870-aa49-e5cddc18c6e9@gmail.com>

Hi,

> Gesendet: Donnerstag, 24. Juni 2021 um 15:29 Uhr
> Von: "Eric Woudstra" <ericwouds@gmail.com>
> The SOC runs unthrotlled slowly to 80 degrees. This takes minutes. Polling interval 1 second or less does not matter much when looking at these temperature rise times 
> 
> After that in more then an hour it slowly creeps up to 85. I believe the design is so that the SOC, under normal circumstances, can run at 1.35 GHz without throttling frequency, without heatsink. It just needs a safeguard for different circumstances.
> 
> Most of these SOCs can also run in industrial grade circumstances, which means up to 85 degrees ambient temperature already . If not industrial then this would be 60 degrees ambient already 
> 
> But only someone at Mediatek can confirm this 

maybe Matthias knows anybody?
get_maintainers-script shows no mtk employee for mtk_thermal driver, added Sean and Ryder as common Linux-Contacts...

Daniel from openwrt have some other mt7622 Boards maybe he can test the Fan approach below

> On Jun 24, 2021, 12:21 PM, at 12:21 PM, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> >Found that:
> >
> >https://download.kamami.pl/p579344-MT7622A_Datasheet_for_BananaPi_Only%281%29.pdf
> >
> >Chapter 3.3 - Thermal Characteristics
> >
> >Given the values I suggest:
> >
> > - Passive - 80°C
> >
> > - Hot - 90°C
> >
> > - Critical - 100°C

maybe adding FAN (r64, don't know for other mt7622 boards) for lower 2 trips (with adjusted temperature points) and cpu-throtteling for upper 2 trips

something like this (used the 70/80 trip points discussed before):

--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -134,6 +134,13 @@
 		};
 	};
 
+	fan0: pwm-fan {
+		compatible = "pwm-fan";
+		#cooling-cells = <2>;
+		pwms = <&pwm 2 10000 0>;
+		cooling-levels = <0 102 170 230>;
+	};
+
 	thermal-zones {
 		cpu_thermal: cpu-thermal {
 			polling-delay-passive = <1000>;
@@ -143,13 +150,13 @@
 
 			trips {
 				cpu_passive: cpu-passive {
-					temperature = <47000>;
+					temperature = <70000>;
 					hysteresis = <2000>;
 					type = "passive";
 				};
 
 				cpu_active: cpu-active {
-					temperature = <67000>;
+					temperature = <80000>;
 					hysteresis = <2000>;
 					type = "active";
 				};
@@ -170,14 +177,12 @@
 			cooling-maps {
 				map0 {
 					trip = <&cpu_passive>;
-					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+					cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
 
 				map1 {
 					trip = <&cpu_active>;
-					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-							 <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+					cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
 
 				map2 {
@@ -428,6 +433,7 @@
 	pwm: pwm@11006000 {
 		compatible = "mediatek,mt7622-pwm";
 		reg = <0 0x11006000 0 0x1000>;
+		#pwm-cells = <3>;
 		interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
 		clocks = <&topckgen CLK_TOP_PWM_SEL>,
 			 <&pericfg CLK_PERI_PWM_PD>,


regards Frank

  reply	other threads:[~2021-06-25  8:17 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                 ` Frank Wunderlich [this message]
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

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=trinity-7580d955-3187-41e5-9297-1ac8f628a9d5-1624609003739@3c-app-gmx-bs66 \
    --to=frank-w@public-files.de \
    --cc=daniel.lezcano@linaro.org \
    --cc=daniel@makrotopia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ericwouds@gmail.com \
    --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).