Skip to content

Commit 8d01f74

Browse files
littleqypConchuOD
authored andcommitted
riscv: dts: starfive: jh7110: Add PWM node and pins configuration
Add OpenCores PWM controller node and add PWM pins configuration on VisionFive 2 board. Signed-off-by: William Qiu <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent 5e598b9 commit 8d01f74

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,12 @@
323323
};
324324
};
325325

326+
&pwm {
327+
pinctrl-names = "default";
328+
pinctrl-0 = <&pwm_pins>;
329+
status = "okay";
330+
};
331+
326332
&spi0 {
327333
pinctrl-names = "default";
328334
pinctrl-0 = <&spi0_pins>;
@@ -513,6 +519,22 @@
513519
};
514520
};
515521

522+
pwm_pins: pwm-0 {
523+
pwm-pins {
524+
pinmux = <GPIOMUX(46, GPOUT_SYS_PWM_CHANNEL0,
525+
GPOEN_SYS_PWM0_CHANNEL0,
526+
GPI_NONE)>,
527+
<GPIOMUX(59, GPOUT_SYS_PWM_CHANNEL1,
528+
GPOEN_SYS_PWM0_CHANNEL1,
529+
GPI_NONE)>;
530+
bias-disable;
531+
drive-strength = <12>;
532+
input-disable;
533+
input-schmitt-disable;
534+
slew-rate = <0>;
535+
};
536+
};
537+
516538
spi0_pins: spi0-0 {
517539
mosi-pins {
518540
pinmux = <GPIOMUX(52, GPOUT_SYS_SPI0_TXD,

arch/riscv/boot/dts/starfive/jh7110.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,15 @@
829829
status = "disabled";
830830
};
831831

832+
pwm: pwm@120d0000 {
833+
compatible = "starfive,jh7110-pwm", "opencores,pwm-v1";
834+
reg = <0x0 0x120d0000 0x0 0x10000>;
835+
clocks = <&syscrg JH7110_SYSCLK_PWM_APB>;
836+
resets = <&syscrg JH7110_SYSRST_PWM_APB>;
837+
#pwm-cells = <3>;
838+
status = "disabled";
839+
};
840+
832841
sfctemp: temperature-sensor@120e0000 {
833842
compatible = "starfive,jh7110-temp";
834843
reg = <0x0 0x120e0000 0x0 0x10000>;

0 commit comments

Comments
 (0)