From: "Frédéric Mahé" <frederic.mahe@cirad.fr>
To: 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,
"Frédéric Mahé" <frederic.mahe@cirad.fr>
Subject: [PATCH 4/6] riscv: dts: spacemit: k1: Add RCPU2 PWM nodes
Date: Tue, 17 Nov 2026 21:59:49 +0100 [thread overview]
Message-ID: <20261117205951.140146-5-frederic.mahe@cirad.fr> (raw)
In-Reply-To: <20261117205951.140146-1-frederic.mahe@cirad.fr>
Add the ten PWM controllers of the RCPU2 block, and make the RCPU2
system controller a clock provider for them.
Written with help from Claude (Anthropic); reviewed and tested on hardware.
Signed-off-by: Frédéric Mahé <frederic.mahe@cirad.fr>
---
arch/riscv/boot/dts/spacemit/k1.dtsi | 91 ++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index 542bfc0d1..3339ff56c 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -456,9 +456,100 @@ syscon_rcpu: system-controller@c0880000 {
syscon_rcpu2: system-controller@c0888000 {
compatible = "spacemit,k1-syscon-rcpu2";
reg = <0x0 0xc0888000 0x0 0x28>;
+ #clock-cells = <1>;
#reset-cells = <1>;
};
+ rpwm0: pwm@c0888100 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888100 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM0>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM0>;
+ status = "disabled";
+ };
+
+ rpwm1: pwm@c0888200 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888200 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM1>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM1>;
+ status = "disabled";
+ };
+
+ rpwm2: pwm@c0888300 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888300 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM2>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM2>;
+ status = "disabled";
+ };
+
+ rpwm3: pwm@c0888400 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888400 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM3>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM3>;
+ status = "disabled";
+ };
+
+ rpwm4: pwm@c0888500 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888500 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM4>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM4>;
+ status = "disabled";
+ };
+
+ rpwm5: pwm@c0888600 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888600 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM5>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM5>;
+ status = "disabled";
+ };
+
+ rpwm6: pwm@c0888700 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888700 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM6>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM6>;
+ status = "disabled";
+ };
+
+ rpwm7: pwm@c0888800 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888800 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM7>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM7>;
+ status = "disabled";
+ };
+
+ rpwm8: pwm@c0888900 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888900 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM8>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM8>;
+ status = "disabled";
+ };
+
+ rpwm9: pwm@c0888a00 {
+ compatible = "spacemit,k1-pwm", "marvell,pxa910-pwm";
+ reg = <0x0 0xc0888a00 0x0 0x10>;
+ #pwm-cells = <3>;
+ clocks = <&syscon_rcpu2 CLK_RCPU2_PWM9>;
+ resets = <&syscon_rcpu2 RESET_RCPU2_PWM9>;
+ status = "disabled";
+ };
+
usbphy2: phy@c0a30000 {
compatible = "spacemit,k1-usb2-phy";
reg = <0x0 0xc0a30000 0x0 0x200>;
--
2.47.3
next prev parent reply other threads:[~2026-11-17 21:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 20:59 [PATCH 0/6] riscv: spacemit: k1: RCPU2 PWM clocks and the BPI-F3 fan 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-17 20:59 ` [PATCH 3/6] clk: spacemit: k1: Add RCPU2 PWM clocks Frédéric Mahé
2026-11-17 20:59 ` Frédéric Mahé [this message]
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é
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=20261117205951.140146-5-frederic.mahe@cirad.fr \
--to=frederic.mahe@cirad.fr \
--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=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®