Skip to content

Commit b45e0c3

Browse files
yashshah7paul-walmsley-sifive
authored andcommitted
riscv: dts: Add DT support for SiFive FU540 PWM driver
Add the PWM DT node in SiFive FU540 soc-specific DT file. Enable the PWM nodes in HiFive Unleashed board-specific DT file. Signed-off-by: Yash Shah <yash.shah@sifive.com> Cc: Palmer Dabbelt <palmer@sifive.com> [paul.walmsley@sifive.com: added chip-specific compatible string; dropped reg-names string from pwm1] Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
1 parent b41dae0 commit b45e0c3

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎arch/riscv/boot/dts/sifive/fu540-c000.dtsi‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,24 @@
230230
#size-cells = <0>;
231231
status = "disabled";
232232
};
233+
pwm0: pwm@10020000 {
234+
compatible = "sifive,fu540-c000-pwm", "sifive,pwm0";
235+
reg = <0x0 0x10020000 0x0 0x1000>;
236+
interrupt-parent = <&plic0>;
237+
interrupts = <42 43 44 45>;
238+
clocks = <&prci PRCI_CLK_TLCLK>;
239+
#pwm-cells = <3>;
240+
status = "disabled";
241+
};
242+
pwm1: pwm@10021000 {
243+
compatible = "sifive,fu540-c000-pwm", "sifive,pwm0";
244+
reg = <0x0 0x10021000 0x0 0x1000>;
245+
interrupt-parent = <&plic0>;
246+
interrupts = <46 47 48 49>;
247+
clocks = <&prci PRCI_CLK_TLCLK>;
248+
#pwm-cells = <3>;
249+
status = "disabled";
250+
};
233251

234252
};
235253
};

‎arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,11 @@
8585
reg = <0>;
8686
};
8787
};
88+
89+
&pwm0 {
90+
status = "okay";
91+
};
92+
93+
&pwm1 {
94+
status = "okay";
95+
};

0 commit comments

Comments
 (0)