All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Eric Woudstra <ericwouds@gmail.com>,
	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>
Subject: Re: Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 11:22:31 +0200	[thread overview]
Message-ID: <YNWgVxvNbwNcT3B8@makrotopia.org> (raw)
In-Reply-To: <trinity-7580d955-3187-41e5-9297-1ac8f628a9d5-1624609003739@3c-app-gmx-bs66>

On Fri, Jun 25, 2021 at 10:16:43AM +0200, Frank Wunderlich wrote:
> 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

I got Linksys E8450 aka. Belkin RT3200 ( https://fcc.io/K7S-03571 ) as
well as Ubiquiti UniFi 6 LR ( https://fcc.io/SWX-U6LR ). Both got quite
massive customized heatsinks (see internal photos on FCC submission),
which results in much better heat dissipation than just having the
naked chip like on the BPi-R64.
Hence I also can't test the fan approach on boards other than the R64.


> 
> > 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

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Golle <daniel@makrotopia.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Eric Woudstra <ericwouds@gmail.com>,
	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>
Subject: Re: Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 11:22:31 +0200	[thread overview]
Message-ID: <YNWgVxvNbwNcT3B8@makrotopia.org> (raw)
In-Reply-To: <trinity-7580d955-3187-41e5-9297-1ac8f628a9d5-1624609003739@3c-app-gmx-bs66>

On Fri, Jun 25, 2021 at 10:16:43AM +0200, Frank Wunderlich wrote:
> 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

I got Linksys E8450 aka. Belkin RT3200 ( https://fcc.io/K7S-03571 ) as
well as Ubiquiti UniFi 6 LR ( https://fcc.io/SWX-U6LR ). Both got quite
massive customized heatsinks (see internal photos on FCC submission),
which results in much better heat dissipation than just having the
naked chip like on the BPi-R64.
Hence I also can't test the fan approach on boards other than the R64.


> 
> > 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

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Golle <daniel@makrotopia.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: Eric Woudstra <ericwouds@gmail.com>,
	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>
Subject: Re: Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 11:22:31 +0200	[thread overview]
Message-ID: <YNWgVxvNbwNcT3B8@makrotopia.org> (raw)
In-Reply-To: <trinity-7580d955-3187-41e5-9297-1ac8f628a9d5-1624609003739@3c-app-gmx-bs66>

On Fri, Jun 25, 2021 at 10:16:43AM +0200, Frank Wunderlich wrote:
> 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

I got Linksys E8450 aka. Belkin RT3200 ( https://fcc.io/K7S-03571 ) as
well as Ubiquiti UniFi 6 LR ( https://fcc.io/SWX-U6LR ). Both got quite
massive customized heatsinks (see internal photos on FCC submission),
which results in much better heat dissipation than just having the
naked chip like on the BPi-R64.
Hence I also can't test the fan approach on boards other than the R64.


> 
> > 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-06-25  9:40 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 12:19 [PATCH] Fix mt7622.dtsi thermal cpu ericwouds
2021-06-19 12:19 ` ericwouds
2021-06-19 12:19 ` ericwouds
2021-06-21 18:29 ` Daniel Lezcano
2021-06-21 18:29   ` Daniel Lezcano
2021-06-21 18:29   ` Daniel Lezcano
2021-06-23 15:35   ` Eric Woudstra
2021-06-23 15:35     ` Eric Woudstra
2021-06-23 15:35     ` Eric Woudstra
2021-06-23 15:58     ` Daniel Lezcano
2021-06-23 15:58       ` Daniel Lezcano
2021-06-23 15:58       ` Daniel Lezcano
2021-06-23 18:43       ` Eric Woudstra
2021-06-23 18:43         ` Eric Woudstra
2021-06-23 18:43         ` Eric Woudstra
2021-06-23 20:08         ` Daniel Lezcano
2021-06-23 20:08           ` Daniel Lezcano
2021-06-23 20:08           ` Daniel Lezcano
2021-06-24  9:59           ` Eric Woudstra
2021-06-24  9:59             ` Eric Woudstra
2021-06-24  9:59             ` Eric Woudstra
2021-06-24 10:21             ` Daniel Lezcano
2021-06-24 10:21               ` Daniel Lezcano
2021-06-24 10:21               ` Daniel Lezcano
2021-06-24 13:29               ` Eric Woudstra
2021-06-24 13:29                 ` Eric Woudstra
2021-06-24 13:29                 ` Eric Woudstra
2021-06-25  8:16                 ` Aw: " Frank Wunderlich
2021-06-25  8:16                   ` Frank Wunderlich
2021-06-25  8:16                   ` Frank Wunderlich
2021-06-25  9:22                   ` Daniel Golle [this message]
2021-06-25  9:22                     ` Daniel Golle
2021-06-25  9:22                     ` Daniel Golle
2021-06-25  9:31                     ` Aw: " Frank Wunderlich
2021-06-25  9:31                       ` Frank Wunderlich
2021-06-25  9:31                       ` Frank Wunderlich
2021-06-25 10:11                       ` Daniel Golle
2021-06-25 10:11                         ` Daniel Golle
2021-06-25 10:11                         ` Daniel Golle
2021-06-25  9:57                   ` Aw: " Daniel Lezcano
2021-06-25  9:57                     ` Daniel Lezcano
2021-06-25  9:57                     ` Daniel Lezcano
2021-06-25 11:03                     ` Aw: " Frank Wunderlich
2021-06-25 11:03                       ` Frank Wunderlich
2021-06-25 11:03                       ` Frank Wunderlich
2021-06-25 11:07                       ` Eric Woudstra
2021-06-25 11:07                         ` Eric Woudstra
2021-06-25 11:07                         ` Eric Woudstra
2021-06-25 11:47                       ` Aw: " Daniel Lezcano
2021-06-25 11:47                         ` Daniel Lezcano
2021-06-25 11:47                         ` Daniel Lezcano
2021-06-25 12:28                         ` Aw: " Frank Wunderlich
2021-06-25 12:28                           ` Frank Wunderlich
2021-06-25 12:28                           ` Frank Wunderlich
2021-06-25 12:50                           ` Daniel Lezcano
2021-06-25 12:50                             ` Daniel Lezcano
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=YNWgVxvNbwNcT3B8@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=daniel.lezcano@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.