blob: 9a988372c44c9f2b496b4e3f75177e08aa74d26d [file] [log] [blame]
Yash Shahe37451f2020-04-23 16:57:15 +05301SiFive PWM controller
2
3Unlike most other PWM controllers, the SiFive PWM controller currently only
4supports one period for all channels in the PWM. All PWMs need to run at
5the same period. The period also has significant restrictions on the values
6it can achieve, which the driver rounds to the nearest achievable period.
7PWM RTL that corresponds to the IP block version numbers can be found
8here:
9
10https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm
11
12Required properties:
13- compatible: Should be "sifive,<chip>-pwm" and "sifive,pwm<version>".
14 Supported compatible strings are: "sifive,fu540-c000-pwm" for the SiFive
15 PWM v0 as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the
16 SiFive PWM v0 IP block with no chip integration tweaks.
17- reg: physical base address and length of the controller's registers
18- clocks: Should contain a clock identifier for the PWM's parent clock.
19- #pwm-cells: Should be 3.
20- interrupts: one interrupt per PWM channel
21
22Examples:
23
24pwm: pwm@10020000 {
25 compatible = "sifive,fu540-c000-pwm", "sifive,pwm0";
26 reg = <0x0 0x10020000 0x0 0x1000>;
27 clocks = <&tlclk>;
28 interrupt-parent = <&plic>;
29 interrupts = <42 43 44 45>;
30 #pwm-cells = <3>;
31};