From: Hal Feng <hal.feng@starfivetech.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor@kernel.org>,
"Emil Renner Berthing" <emil.renner.berthing@canonical.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Paul Walmsley" <pjw@kernel.org>,
"Albert Ou" <aou@eecs.berkeley.edu>
Cc: Changhuang Liang <changhuang.liang@starfivetech.com>,
Hal Feng <hal.feng@starfivetech.com>,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v18 2/3] riscv: dts: starfive: Correct pwm nodes
Date: Fri, 15 May 2026 13:47:21 +0800 [thread overview]
Message-ID: <20260515054723.25024-3-hal.feng@starfivetech.com> (raw)
In-Reply-To: <20260515054723.25024-1-hal.feng@starfivetech.com>
Each of the StarFive JH7100/JH7110 SoCs has 8 OpenCores PTC IP
cores. One OpenCores PTC IP core can output one PWM channel.
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
---
.../boot/dts/starfive/jh7100-common.dtsi | 28 ++++++--
arch/riscv/boot/dts/starfive/jh7100.dtsi | 69 ++++++++++++++++++-
.../boot/dts/starfive/jh7110-common.dtsi | 27 ++++++--
.../boot/dts/starfive/jh7110-milkv-mars.dts | 6 +-
.../dts/starfive/jh7110-milkv-marscm.dtsi | 6 +-
.../dts/starfive/jh7110-pine64-star64.dts | 6 +-
.../jh7110-starfive-visionfive-2-lite.dtsi | 6 +-
.../jh7110-starfive-visionfive-2.dtsi | 6 +-
arch/riscv/boot/dts/starfive/jh7110.dtsi | 69 ++++++++++++++++++-
9 files changed, 200 insertions(+), 23 deletions(-)
diff --git a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
index ae1a6aeb0aea..85106545090e 100644
--- a/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
@@ -199,13 +199,23 @@ GPO_I2C2_PAD_SDA_OEN,
};
};
- pwm_pins: pwm-0 {
- pwm-pins {
+ pwm0_pins: pwm0-0 {
+ pwm0-pins {
pinmux = <GPIOMUX(7,
GPO_PWM_PAD_OUT_BIT0,
GPO_PWM_PAD_OE_N_BIT0,
- GPI_NONE)>,
- <GPIOMUX(5,
+ GPI_NONE)>;
+ bias-disable;
+ drive-strength = <35>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+
+ pwm1_pins: pwm1-0 {
+ pwm1-pins {
+ pinmux = <GPIOMUX(5,
GPO_PWM_PAD_OUT_BIT1,
GPO_PWM_PAD_OE_N_BIT1,
GPI_NONE)>;
@@ -359,9 +369,15 @@ &osc_aud {
clock-frequency = <27000000>;
};
-&pwm {
+&pwm0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0_pins>;
+ status = "okay";
+};
+
+&pwm1 {
pinctrl-names = "default";
- pinctrl-0 = <&pwm_pins>;
+ pinctrl-0 = <&pwm1_pins>;
status = "okay";
};
diff --git a/arch/riscv/boot/dts/starfive/jh7100.dtsi b/arch/riscv/boot/dts/starfive/jh7100.dtsi
index 7de0732b8eab..4629e9747307 100644
--- a/arch/riscv/boot/dts/starfive/jh7100.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi
@@ -360,9 +360,72 @@ watchdog@12480000 {
<&rstgen JH7100_RSTN_WDT>;
};
- pwm: pwm@12490000 {
- compatible = "starfive,jh7100-pwm", "opencores,pwm-v1";
- reg = <0x0 0x12490000 0x0 0x10000>;
+ pwm0: pwm@12490000 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12490000 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm1: pwm@12490010 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12490010 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm2: pwm@12490020 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12490020 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm3: pwm@12490030 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12490030 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm4: pwm@12498000 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12498000 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm5: pwm@12498010 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12498010 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm6: pwm@12498020 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12498020 0x0 0x10>;
+ clocks = <&clkgen JH7100_CLK_PWM_APB>;
+ resets = <&rstgen JH7100_RSTN_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm7: pwm@12498030 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x12498030 0x0 0x10>;
clocks = <&clkgen JH7100_CLK_PWM_APB>;
resets = <&rstgen JH7100_RSTN_PWM_APB>;
#pwm-cells = <3>;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
index 8cfe8033305d..5aa225b8bca8 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
@@ -351,9 +351,14 @@ uboot@100000 {
};
};
-&pwm {
+&pwm0 {
pinctrl-names = "default";
- pinctrl-0 = <&pwm_pins>;
+ pinctrl-0 = <&pwm0_pins>;
+};
+
+&pwm1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm1_pins>;
};
&spi0 {
@@ -553,12 +558,22 @@ GPOEN_ENABLE,
};
};
- pwm_pins: pwm-0 {
- pwm-pins {
+ pwm0_pins: pwm0-0 {
+ pwm0-pins {
pinmux = <GPIOMUX(46, GPOUT_SYS_PWM_CHANNEL0,
GPOEN_SYS_PWM0_CHANNEL0,
- GPI_NONE)>,
- <GPIOMUX(59, GPOUT_SYS_PWM_CHANNEL1,
+ GPI_NONE)>;
+ bias-disable;
+ drive-strength = <12>;
+ input-disable;
+ input-schmitt-disable;
+ slew-rate = <0>;
+ };
+ };
+
+ pwm1_pins: pwm1-0 {
+ pwm1-pins {
+ pinmux = <GPIOMUX(59, GPOUT_SYS_PWM_CHANNEL1,
GPOEN_SYS_PWM0_CHANNEL1,
GPI_NONE)>;
bias-disable;
diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
index 21873612d993..54013c70f4b4 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
@@ -68,7 +68,11 @@ &phy0 {
motorcomm,tx-clk-adj-enabled;
};
-&pwm {
+&pwm0 {
+ status = "okay";
+};
+
+&pwm1 {
status = "okay";
};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi b/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi
index 025471061d43..31afac27b86d 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi
@@ -87,7 +87,11 @@ &phy0 {
motorcomm,tx-clk-adj-enabled;
};
-&pwm {
+&pwm0 {
+ status = "okay";
+};
+
+&pwm1 {
status = "okay";
};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts
index aec7ae3d1f5b..a9e82f25efde 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts
@@ -95,7 +95,11 @@ &phy1 {
motorcomm,tx-clk-100-inverted;
};
-&pwm {
+&pwm0 {
+ status = "okay";
+};
+
+&pwm1 {
status = "okay";
};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-lite.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-lite.dtsi
index f8797a666dbf..85b56a72dff7 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-lite.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-lite.dtsi
@@ -74,7 +74,11 @@ &phy0 {
tx-internal-delay-ps = <1500>;
};
-&pwm {
+&pwm0 {
+ status = "okay";
+};
+
+&pwm1 {
status = "okay";
};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
index edc8f4588133..35208f95cd3d 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -73,7 +73,11 @@ &pcie1 {
status = "okay";
};
-&pwm {
+&pwm0 {
+ status = "okay";
+};
+
+&pwm1 {
status = "okay";
};
diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
index 6e56e9d20bb0..e6b9b02bf8b2 100644
--- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
@@ -846,9 +846,72 @@ i2stx1: i2s@120c0000 {
status = "disabled";
};
- pwm: pwm@120d0000 {
- compatible = "starfive,jh7110-pwm", "opencores,pwm-v1";
- reg = <0x0 0x120d0000 0x0 0x10000>;
+ pwm0: pwm@120d0000 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d0000 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm1: pwm@120d0010 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d0010 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm2: pwm@120d0020 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d0020 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm3: pwm@120d0030 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d0030 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm4: pwm@120d8000 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d8000 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm5: pwm@120d8010 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d8010 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm6: pwm@120d8020 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d8020 0x0 0x10>;
+ clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
+ resets = <&syscrg JH7110_SYSRST_PWM_APB>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm7: pwm@120d8030 {
+ compatible = "opencores,pwm-v1";
+ reg = <0x0 0x120d8030 0x0 0x10>;
clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
resets = <&syscrg JH7110_SYSRST_PWM_APB>;
#pwm-cells = <3>;
--
2.43.2
next prev parent reply other threads:[~2026-05-15 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 5:47 [PATCH v18 0/3] Add OpenCores PTC PWM support Hal Feng
2026-05-15 5:47 ` [PATCH v18 1/3] dt-bindings: pwm: opencores: Drop starfive compatibles and update maintainers Hal Feng
2026-05-15 5:47 ` Hal Feng [this message]
2026-05-15 5:47 ` [PATCH v18 3/3] pwm: Add OpenCores PTC PWM driver Hal Feng
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=20260515054723.25024-3-hal.feng@starfivetech.com \
--to=hal.feng@starfivetech.com \
--cc=aou@eecs.berkeley.edu \
--cc=changhuang.liang@starfivetech.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=emil.renner.berthing@canonical.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=ukleinek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox