* [PATCH v3] arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed
@ 2025-05-26 12:31 Mikhail Kshevetskiy
2025-05-26 14:20 ` Frank Wunderlich
0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Kshevetskiy @ 2025-05-26 12:31 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Frank Wunderlich
Cc: Mikhail Kshevetskiy
Popular cheap PWM fans for this machine, like the ones coming in
heatsink+fan combos will not work properly at the currently defined
medium speed. Trying different pwm setting using a command
echo $value > /sys/devices/platform/pwm-fan/hwmon/hwmon1/pwm1
I found:
pwm1 value fan rotation speed cpu temperature notes
-----------------------------------------------------------------
0 maximal 31.5 Celsius too noisy
40 optimal 35.2 Celsius no noise hearable
95 minimal
above 95 does not rotate 55.5 Celsius
-----------------------------------------------------------------
Thus only cpu-active-high and cpu-active-low modes are usable.
I think this is wrong.
This patch fixes cpu-active-medium settings for bpi-r3 board.
I know, the patch is not ideal as it can break pwm fan for some users.
Likely this is the only official mt7986-bpi-r3 heatsink+fan solution
available on the market.
This patch may not be enough. Users may wants to tweak their thermal_zone0
trip points, thus tuning fan rotation speed depending on cpu temperature.
That can be done on the base of the following example:
=== example =========
# cpu temperature below 25 Celsius degrees, no rotation
echo 25000 > /sys/class/thermal/thermal_zone0/trip_point_4_temp
# cpu temperature in [25..32] Celsius degrees, normal rotation speed
echo 32000 > /sys/class/thermal/thermal_zone0/trip_point_3_temp
# cpu temperature above 50 Celsius degrees, max rotation speed
echo 50000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp
=====================
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
---
From Frank Wunderlich <frank-w@public-files.de>
Date: 04.03.2025
>
> sorry for delay
>
> i have the fan from sinovoip and that was working for me, but if your fan only works with new values, i have no point against this change.
Frank, does it means that you are signed off this patch?
Changes from v1 to v2:
* improve patch description
Changes from v2 to v3:
* added question to Frank Wunderlich
---
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
index ed79ad1ae871..b0cc0cbdff0f 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
@@ -42,7 +42,7 @@ fan: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
/* cooling level (0, 1, 2) - pwm inverted */
- cooling-levels = <255 96 0>;
+ cooling-levels = <255 40 0>;
pwms = <&pwm 0 10000>;
status = "okay";
};
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed
2025-05-26 12:31 [PATCH v3] arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed Mikhail Kshevetskiy
@ 2025-05-26 14:20 ` Frank Wunderlich
2025-07-29 7:56 ` [PATCH v4] " Mikhail Kshevetskiy
0 siblings, 1 reply; 4+ messages in thread
From: Frank Wunderlich @ 2025-05-26 14:20 UTC (permalink / raw)
To: Mikhail Kshevetskiy, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
Am 26. Mai 2025 14:31:23 MESZ schrieb Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>:
>Popular cheap PWM fans for this machine, like the ones coming in
>heatsink+fan combos will not work properly at the currently defined
>medium speed. Trying different pwm setting using a command
>
> echo $value > /sys/devices/platform/pwm-fan/hwmon/hwmon1/pwm1
>
>I found:
>
> pwm1 value fan rotation speed cpu temperature notes
> -----------------------------------------------------------------
> 0 maximal 31.5 Celsius too noisy
> 40 optimal 35.2 Celsius no noise hearable
> 95 minimal
> above 95 does not rotate 55.5 Celsius
> -----------------------------------------------------------------
>
>Thus only cpu-active-high and cpu-active-low modes are usable.
>I think this is wrong.
>
>This patch fixes cpu-active-medium settings for bpi-r3 board.
>
>I know, the patch is not ideal as it can break pwm fan for some users.
>Likely this is the only official mt7986-bpi-r3 heatsink+fan solution
>available on the market.
>
>This patch may not be enough. Users may wants to tweak their thermal_zone0
>trip points, thus tuning fan rotation speed depending on cpu temperature.
>That can be done on the base of the following example:
>
> === example =========
> # cpu temperature below 25 Celsius degrees, no rotation
> echo 25000 > /sys/class/thermal/thermal_zone0/trip_point_4_temp
> # cpu temperature in [25..32] Celsius degrees, normal rotation speed
> echo 32000 > /sys/class/thermal/thermal_zone0/trip_point_3_temp
> # cpu temperature above 50 Celsius degrees, max rotation speed
> echo 50000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp
> =====================
>
>Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
>
>---
>From Frank Wunderlich <frank-w@public-files.de>
>Date: 04.03.2025
>>
>> sorry for delay
>>
>> i have the fan from sinovoip and that was working for me, but if your fan only works with new values, i have no point against this change.
>
>Frank, does it means that you are signed off this patch?
Let it count as
Acked-by: Frank Wunderlich <frank-w@public-files.de>
Because i cannot test these values,as i only have 1 pwm fan for r3 in my main router :p
Maybe R4 fan works too,but not yet tested.
Not sure if the complete testcase has to be in the commit description,but this is maintainers decision.
>Changes from v1 to v2:
> * improve patch description
>
>Changes from v2 to v3:
> * added question to Frank Wunderlich
>---
> arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
>index ed79ad1ae871..b0cc0cbdff0f 100644
>--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
>+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
>@@ -42,7 +42,7 @@ fan: pwm-fan {
> compatible = "pwm-fan";
> #cooling-cells = <2>;
> /* cooling level (0, 1, 2) - pwm inverted */
>- cooling-levels = <255 96 0>;
>+ cooling-levels = <255 40 0>;
> pwms = <&pwm 0 10000>;
> status = "okay";
> };
regards Frank
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4] arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed
2025-05-26 14:20 ` Frank Wunderlich
@ 2025-07-29 7:56 ` Mikhail Kshevetskiy
2025-07-29 10:13 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Kshevetskiy @ 2025-07-29 7:56 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Frank Wunderlich
Cc: Mikhail Kshevetskiy
Popular cheap PWM fans for this machine, like the ones coming in
heatsink+fan combos will not work properly at the currently defined
medium speed. Trying different pwm setting using a command
echo $value > /sys/devices/platform/pwm-fan/hwmon/hwmon1/pwm1
I found:
pwm1 value fan rotation speed cpu temperature notes
-----------------------------------------------------------------
0 maximal 31.5 Celsius too noisy
40 optimal 35.2 Celsius no noise hearable
95 minimal
above 95 does not rotate 55.5 Celsius
-----------------------------------------------------------------
Thus only cpu-active-high and cpu-active-low modes are usable.
I think this is wrong.
This patch fixes cpu-active-medium settings for bpi-r3 board.
I know, the patch is not ideal as it can break pwm fan for some users.
Likely this is the only official mt7986-bpi-r3 heatsink+fan solution
available on the market.
This patch may not be enough. Users may wants to tweak their thermal_zone0
trip points, thus tuning fan rotation speed depending on cpu temperature.
That can be done on the base of the following example:
=== example =========
# cpu temperature below 25 Celsius degrees, no rotation
echo 25000 > /sys/class/thermal/thermal_zone0/trip_point_4_temp
# cpu temperature in [25..32] Celsius degrees, normal rotation speed
echo 32000 > /sys/class/thermal/thermal_zone0/trip_point_3_temp
# cpu temperature above 50 Celsius degrees, max rotation speed
echo 50000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp
=====================
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Acked-by: Frank Wunderlich <frank-w@public-files.de>
---
Changes from v1 to v2:
* improve patch description
Changes from v2 to v3:
* added question to Frank Wunderlich
Changes from v3 to v4:
* Acked by Frank Wunderlich
---
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
index ed79ad1ae871..b0cc0cbdff0f 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts
@@ -42,7 +42,7 @@ fan: pwm-fan {
compatible = "pwm-fan";
#cooling-cells = <2>;
/* cooling level (0, 1, 2) - pwm inverted */
- cooling-levels = <255 96 0>;
+ cooling-levels = <255 40 0>;
pwms = <&pwm 0 10000>;
status = "okay";
};
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4] arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed
2025-07-29 7:56 ` [PATCH v4] " Mikhail Kshevetskiy
@ 2025-07-29 10:13 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-07-29 10:13 UTC (permalink / raw)
To: Mikhail Kshevetskiy, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Frank Wunderlich
Il 29/07/25 09:56, Mikhail Kshevetskiy ha scritto:
> Popular cheap PWM fans for this machine, like the ones coming in
> heatsink+fan combos will not work properly at the currently defined
> medium speed. Trying different pwm setting using a command
>
> echo $value > /sys/devices/platform/pwm-fan/hwmon/hwmon1/pwm1
>
> I found:
>
> pwm1 value fan rotation speed cpu temperature notes
> -----------------------------------------------------------------
> 0 maximal 31.5 Celsius too noisy
> 40 optimal 35.2 Celsius no noise hearable
> 95 minimal
> above 95 does not rotate 55.5 Celsius
> -----------------------------------------------------------------
>
> Thus only cpu-active-high and cpu-active-low modes are usable.
> I think this is wrong.
>
> This patch fixes cpu-active-medium settings for bpi-r3 board.
>
> I know, the patch is not ideal as it can break pwm fan for some users.
> Likely this is the only official mt7986-bpi-r3 heatsink+fan solution
> available on the market.
>
> This patch may not be enough. Users may wants to tweak their thermal_zone0
> trip points, thus tuning fan rotation speed depending on cpu temperature.
> That can be done on the base of the following example:
>
> === example =========
> # cpu temperature below 25 Celsius degrees, no rotation
> echo 25000 > /sys/class/thermal/thermal_zone0/trip_point_4_temp
> # cpu temperature in [25..32] Celsius degrees, normal rotation speed
> echo 32000 > /sys/class/thermal/thermal_zone0/trip_point_3_temp
> # cpu temperature above 50 Celsius degrees, max rotation speed
> echo 50000 > /sys/class/thermal/thermal_zone0/trip_point_2_temp
> =====================
>
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
> Acked-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-29 10:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-26 12:31 [PATCH v3] arm64: dts: mediatek: mt7986-bpi-r3: Change fan PWM value for mid speed Mikhail Kshevetskiy
2025-05-26 14:20 ` Frank Wunderlich
2025-07-29 7:56 ` [PATCH v4] " Mikhail Kshevetskiy
2025-07-29 10:13 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox