All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Wunderlich <frank-w@public-files.de>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
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: Aw: Re:  Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 13:03:16 +0200	[thread overview]
Message-ID: <trinity-2eb7c0ac-d9dc-446c-8907-69b5f4df6838-1624618996538@3c-app-gmx-bs66> (raw)
In-Reply-To: <8b27246b-721e-fa0e-5c2b-b1b4b4d6fdd3@linaro.org>

Hi

> Gesendet: Freitag, 25. Juni 2021 um 11:57 Uhr
> Von: "Daniel Lezcano" <daniel.lezcano@linaro.org>

> You should not add the fan in the mt7622.dtsi itself but in the board
> specific file where there is a fan output on it. mt7622.dtsi is supposed
> to be the SoC itself AFAICT.
>
> For instance:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi#n39
>
> https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi#n164

> > @@ -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>;
> >  				};
>
> fan == active trip point
>
> This is referring to the passive trip point. So it should point to the
> CPU as it is now. Note the order of mitigation is inverted regarding the
> proposal description.

but we need to disable the passive trip as cpu-trotteling starts there...the higher temperature trips are currently not reached

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>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };

                                cpu_active: cpu-active {
-                                       temperature = <67000>;
+                                       temperature = <80000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
@@ -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>;
                                };

                                map1 {
@@ -428,6 +428,7 @@ uart3: serial@11005000 {
        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>,

--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -37,6 +37,13 @@ cpu@1 {
                };
        };

+       fan0: pwm-fan {
+               compatible = "pwm-fan";
+               #cooling-cells = <2>;
+               pwms = <&pwm 2 10000 0>;
+               cooling-levels = <0 102 170 230>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";

@@ -582,6 +589,29 @@ &u3phy {
        status = "okay";
 };

+&cpu_thermal {
+       cooling-maps {
+               map1 {
+                       trip = <&cpu_active>;
+                       cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins>;


WARNING: multiple messages have this Message-ID (diff)
From: Frank Wunderlich <frank-w@public-files.de>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
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: Aw: Re:  Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 13:03:16 +0200	[thread overview]
Message-ID: <trinity-2eb7c0ac-d9dc-446c-8907-69b5f4df6838-1624618996538@3c-app-gmx-bs66> (raw)
In-Reply-To: <8b27246b-721e-fa0e-5c2b-b1b4b4d6fdd3@linaro.org>

Hi

> Gesendet: Freitag, 25. Juni 2021 um 11:57 Uhr
> Von: "Daniel Lezcano" <daniel.lezcano@linaro.org>

> You should not add the fan in the mt7622.dtsi itself but in the board
> specific file where there is a fan output on it. mt7622.dtsi is supposed
> to be the SoC itself AFAICT.
>
> For instance:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi#n39
>
> https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi#n164

> > @@ -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>;
> >  				};
>
> fan == active trip point
>
> This is referring to the passive trip point. So it should point to the
> CPU as it is now. Note the order of mitigation is inverted regarding the
> proposal description.

but we need to disable the passive trip as cpu-trotteling starts there...the higher temperature trips are currently not reached

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>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };

                                cpu_active: cpu-active {
-                                       temperature = <67000>;
+                                       temperature = <80000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
@@ -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>;
                                };

                                map1 {
@@ -428,6 +428,7 @@ uart3: serial@11005000 {
        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>,

--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -37,6 +37,13 @@ cpu@1 {
                };
        };

+       fan0: pwm-fan {
+               compatible = "pwm-fan";
+               #cooling-cells = <2>;
+               pwms = <&pwm 2 10000 0>;
+               cooling-levels = <0 102 170 230>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";

@@ -582,6 +589,29 @@ &u3phy {
        status = "okay";
 };

+&cpu_thermal {
+       cooling-maps {
+               map1 {
+                       trip = <&cpu_active>;
+                       cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins>;


_______________________________________________
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: Frank Wunderlich <frank-w@public-files.de>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
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: Aw: Re:  Re: [PATCH] Fix mt7622.dtsi thermal cpu
Date: Fri, 25 Jun 2021 13:03:16 +0200	[thread overview]
Message-ID: <trinity-2eb7c0ac-d9dc-446c-8907-69b5f4df6838-1624618996538@3c-app-gmx-bs66> (raw)
In-Reply-To: <8b27246b-721e-fa0e-5c2b-b1b4b4d6fdd3@linaro.org>

Hi

> Gesendet: Freitag, 25. Juni 2021 um 11:57 Uhr
> Von: "Daniel Lezcano" <daniel.lezcano@linaro.org>

> You should not add the fan in the mt7622.dtsi itself but in the board
> specific file where there is a fan output on it. mt7622.dtsi is supposed
> to be the SoC itself AFAICT.
>
> For instance:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi#n39
>
> https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi#n164

> > @@ -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>;
> >  				};
>
> fan == active trip point
>
> This is referring to the passive trip point. So it should point to the
> CPU as it is now. Note the order of mitigation is inverted regarding the
> proposal description.

but we need to disable the passive trip as cpu-trotteling starts there...the higher temperature trips are currently not reached

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>;
                                        hysteresis = <2000>;
                                        type = "passive";
                                };

                                cpu_active: cpu-active {
-                                       temperature = <67000>;
+                                       temperature = <80000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
@@ -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>;
                                };

                                map1 {
@@ -428,6 +428,7 @@ uart3: serial@11005000 {
        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>,

--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -37,6 +37,13 @@ cpu@1 {
                };
        };

+       fan0: pwm-fan {
+               compatible = "pwm-fan";
+               #cooling-cells = <2>;
+               pwms = <&pwm 2 10000 0>;
+               cooling-levels = <0 102 170 230>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";

@@ -582,6 +589,29 @@ &u3phy {
        status = "okay";
 };

+&cpu_thermal {
+       cooling-maps {
+               map1 {
+                       trip = <&cpu_active>;
+                       cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins>;


_______________________________________________
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 11:03 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
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                     ` Frank Wunderlich [this message]
2021-06-25 11:03                       ` Aw: " 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=trinity-2eb7c0ac-d9dc-446c-8907-69b5f4df6838-1624618996538@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 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.