From: Yao Zi <me@ziyao.cc>
To: "Frédéric Mahé" <frederic.mahe@cirad.fr>,
"Stephen Boyd" <sboyd@kernel.org>, "Yixun Lan" <dlan@kernel.org>
Cc: Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.co>,
Haylen Chu <heylenay@4d2.org>,
Hung-Chun Tseng <alan.tseng.cs@gmail.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
linux-kernel@vger.kernel.org, Yao Zi <me@ziyao.cc>
Subject: Re: [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan
Date: Wed, 18 Nov 2026 16:02:43 +0000 [thread overview]
Message-ID: <av3MI0wgou3pbab8@pie> (raw)
In-Reply-To: <20261117205951.140146-1-frederic.mahe@cirad.fr>
On Tue, Nov 17, 2026 at 09:59:45PM +0100, Frédéric Mahé wrote:
> The BPI-F3 fan header (J27) has a PWM line driven by an RCPU2 PWM
> (GPIO 79). This series adds the RCPU2 PWM clocks and DT nodes and
> enables the fan on the BPI-F3.
>
> Patch 2 keeps pll1_aud_245p7 enabled: once clk_disable_unused() gates
> it, accesses to the RCPU2 block hang the CPU (the vendor kernel keeps
> it on through its RCPU firmware). It may be better tied to a power
> domain once the K1 power domain driver lands; comments welcome.
>
> Tested on a BPI-F3 on v7.4-rc1 (no fan with a PWM input at hand, so
> with a multimeter on J27 pin 3): 0.86, 1.76, 2.74 and 4.66 V at 25,
> 50, 75 and 100% duty (0.04 V off), as with the vendor kernel, and
> the fan goes to level 1 when the package reaches 40 C under load.
>
> Trees: 1-3 clk, 4-5 SpacemiT DT (4 needs the IDs from 1), 6 riscv
> defconfig. Depends on "reset: spacemit: Fix the RCPU2 PWM reset
> registers" (reset/fixes).
>
> Written with help from Claude (Anthropic); reviewed and tested on
> hardware.
>
> Signed-off-by: Frédéric Mahé <frederic.mahe@cirad.fr>
>
>
> Frédéric Mahé (6):
> dt-bindings: clock: spacemit: k1: Add RCPU2 PWM clocks
> clk: spacemit: k1: Keep pll1_aud_245p7 enabled
> clk: spacemit: k1: Add RCPU2 PWM clocks
> riscv: dts: spacemit: k1: Add RCPU2 PWM nodes
> riscv: dts: spacemit: k1-bananapi-f3: Add PWM fan
> riscv: defconfig: Enable PWM fan support
>
> .../boot/dts/spacemit/k1-bananapi-f3.dts | 63 +++++++++++++
> arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 7 ++
> arch/riscv/boot/dts/spacemit/k1.dtsi | 91 +++++++++++++++++++
> arch/riscv/configs/defconfig | 1 +
> drivers/clk/spacemit/ccu-k1.c | 45 ++++++++-
> .../dt-bindings/clock/spacemit,k1-syscon.h | 12 +++
> 6 files changed, 218 insertions(+), 1 deletion(-)
I think spacemit,k1-syscon.yaml should probably be updated to make
'#clock-cells' property mandatory for rcpu2 node? And probably also
the other blocks capable of clock stuff as fix...
--
Thanks,
Yao Zi
Meow-mrrp-mrow, I'm a cat.
prev parent reply other threads:[~2026-11-18 16:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 20:59 Frédéric Mahé
2026-11-17 20:59 ` [PATCH 1/6] dt-bindings: clock: spacemit: k1: Add RCPU2 PWM clocks Frédéric Mahé
2026-11-17 20:59 ` [PATCH 2/6] clk: spacemit: k1: Keep pll1_aud_245p7 enabled Frédéric Mahé
2026-11-18 11:15 ` Yixun Lan
2026-11-18 15:57 ` Yao Zi
2026-11-17 20:59 ` [PATCH 3/6] clk: spacemit: k1: Add RCPU2 PWM clocks Frédéric Mahé
2026-11-17 20:59 ` [PATCH 4/6] riscv: dts: spacemit: k1: Add RCPU2 PWM nodes Frédéric Mahé
2026-11-17 20:59 ` [PATCH 5/6] riscv: dts: spacemit: k1-bananapi-f3: Add PWM fan Frédéric Mahé
2026-11-17 20:59 ` [PATCH 6/6] riscv: defconfig: Enable PWM fan support Frédéric Mahé
2026-11-17 21:16 ` [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan Frédéric Mahé
2026-11-18 16:02 ` Yao Zi [this message]
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=av3MI0wgou3pbab8@pie \
--to=me@ziyao.cc \
--cc=alan.tseng.cs@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=frederic.mahe@cirad.fr \
--cc=heylenay@4d2.org \
--cc=jbrunet+clk@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.co \
/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
all inboxes | Powered by JetHome®