All of lore.kernel.org
 help / color / mirror / Atom feed
From: FUKAUMI Naoki <naoki@radxa.com>
To: heiko@sntech.de
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	dsimic@manjaro.org, devicetree@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	FUKAUMI Naoki <naoki@radxa.com>
Subject: [PATCH v6 2/7] arm64: dts: rockchip: Use a longer PWM period for the fan on Radxa ROCK 5C
Date: Mon, 23 Dec 2024 01:39:21 +0000	[thread overview]
Message-ID: <20241223013926.1134-3-naoki@radxa.com> (raw)
In-Reply-To: <20241223013926.1134-1-naoki@radxa.com>

The fan on Radxa ROCK 5C is driven via an AO3416 MOSFET, which has a
total switch-on time of 0,6us and a total switch-off time of 6us [1],
meaning that the current PWM period of just 10us is too short for
fine-grained fan speed control. Increase the PWM period to 60us, so
that the switch-on and switch-off time of the MOSFET fall within a
more reasonable ~10% of the full period, thus making lower PWM duty
cycles meaningful.

[1] https://www.aosmd.com/pdfs/datasheet/AO3416.pdf

Fixes: 3ddf5cdb77e6 ("arm64: dts: rockchip: add Radxa ROCK 5C")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
---
Changes in v6:
- none
Changes in v5:
- Reword commit message (Alexey Charkov)
Changes in v4:
- none
Changes in v3:
- none
Changes in v2:
- Reword commit message
---
 arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
index 23e9b447b6f0..910ec67bd4eb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
@@ -73,7 +73,7 @@ fan {
 		#cooling-cells = <2>;
 		cooling-levels = <0 64 128 192 255>;
 		fan-supply = <&vcc_5v0>;
-		pwms = <&pwm3 0 10000 0>;
+		pwms = <&pwm3 0 60000 0>;
 	};
 
 	pcie2x1l2_3v3: regulator-pcie2x1l2-3v3 {
-- 
2.43.0


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

WARNING: multiple messages have this Message-ID (diff)
From: FUKAUMI Naoki <naoki@radxa.com>
To: heiko@sntech.de
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	dsimic@manjaro.org, devicetree@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	FUKAUMI Naoki <naoki@radxa.com>
Subject: [PATCH v6 2/7] arm64: dts: rockchip: Use a longer PWM period for the fan on Radxa ROCK 5C
Date: Mon, 23 Dec 2024 01:39:21 +0000	[thread overview]
Message-ID: <20241223013926.1134-3-naoki@radxa.com> (raw)
In-Reply-To: <20241223013926.1134-1-naoki@radxa.com>

The fan on Radxa ROCK 5C is driven via an AO3416 MOSFET, which has a
total switch-on time of 0,6us and a total switch-off time of 6us [1],
meaning that the current PWM period of just 10us is too short for
fine-grained fan speed control. Increase the PWM period to 60us, so
that the switch-on and switch-off time of the MOSFET fall within a
more reasonable ~10% of the full period, thus making lower PWM duty
cycles meaningful.

[1] https://www.aosmd.com/pdfs/datasheet/AO3416.pdf

Fixes: 3ddf5cdb77e6 ("arm64: dts: rockchip: add Radxa ROCK 5C")
Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
---
Changes in v6:
- none
Changes in v5:
- Reword commit message (Alexey Charkov)
Changes in v4:
- none
Changes in v3:
- none
Changes in v2:
- Reword commit message
---
 arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
index 23e9b447b6f0..910ec67bd4eb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
@@ -73,7 +73,7 @@ fan {
 		#cooling-cells = <2>;
 		cooling-levels = <0 64 128 192 255>;
 		fan-supply = <&vcc_5v0>;
-		pwms = <&pwm3 0 10000 0>;
+		pwms = <&pwm3 0 60000 0>;
 	};
 
 	pcie2x1l2_3v3: regulator-pcie2x1l2-3v3 {
-- 
2.43.0


  parent reply	other threads:[~2024-12-23  1:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-23  1:39 [PATCH v6 0/7] arm64: dts: rockchip: Refine dts for Radxa ROCK 5C FUKAUMI Naoki
2024-12-23  1:39 ` FUKAUMI Naoki
2024-12-23  1:39 ` [PATCH v6 1/7] arm64: dts: rockchip: Change the function of the blue LED " FUKAUMI Naoki
2024-12-23  1:39   ` FUKAUMI Naoki
2024-12-23  1:39 ` FUKAUMI Naoki [this message]
2024-12-23  1:39   ` [PATCH v6 2/7] arm64: dts: rockchip: Use a longer PWM period for the fan on " FUKAUMI Naoki
2024-12-23 10:33   ` Dragan Simic
2024-12-23 10:33     ` Dragan Simic
2024-12-23  1:39 ` [PATCH v6 3/7] arm64: dts: rockchip: Remove the RTC and related nodes for " FUKAUMI Naoki
2024-12-23  1:39   ` FUKAUMI Naoki
2024-12-23  1:39 ` [PATCH v6 4/7] arm64: dts: rockchip: Add cd-gpios for sdmmc " FUKAUMI Naoki
2024-12-23  1:39   ` FUKAUMI Naoki
2024-12-23  1:39 ` [PATCH v6 5/7] arm64: dts: rockchip: Fix the properties of the PMIC regulators " FUKAUMI Naoki
2024-12-23  1:39   ` FUKAUMI Naoki
2024-12-23  1:39 ` [PATCH v6 6/7] arm64: dts: rockchip: Trivial changes " FUKAUMI Naoki
2024-12-23  1:39   ` FUKAUMI Naoki
2024-12-23  1:39 ` [PATCH v6 7/7] arm64: dts: rockchip: Sort nodes " FUKAUMI Naoki
2024-12-23  1:39   ` FUKAUMI Naoki
2024-12-27 15:18 ` [PATCH v6 0/7] arm64: dts: rockchip: Refine dts " Rob Herring (Arm)
2024-12-27 15:18   ` Rob Herring (Arm)

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=20241223013926.1134-3-naoki@radxa.com \
    --to=naoki@radxa.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dsimic@manjaro.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    /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.