1*c66ec88fSEmmanuel VadotSiFive PWM controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotUnlike most other PWM controllers, the SiFive PWM controller currently only
4*c66ec88fSEmmanuel Vadotsupports one period for all channels in the PWM. All PWMs need to run at
5*c66ec88fSEmmanuel Vadotthe same period. The period also has significant restrictions on the values
6*c66ec88fSEmmanuel Vadotit can achieve, which the driver rounds to the nearest achievable period.
7*c66ec88fSEmmanuel VadotPWM RTL that corresponds to the IP block version numbers can be found
8*c66ec88fSEmmanuel Vadothere:
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel Vadothttps://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel VadotRequired properties:
13*c66ec88fSEmmanuel Vadot- compatible: Should be "sifive,<chip>-pwm" and "sifive,pwm<version>".
14*c66ec88fSEmmanuel Vadot  Supported compatible strings are: "sifive,fu540-c000-pwm" for the SiFive
15*c66ec88fSEmmanuel Vadot  PWM v0 as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the
16*c66ec88fSEmmanuel Vadot  SiFive PWM v0 IP block with no chip integration tweaks.
17*c66ec88fSEmmanuel Vadot  Please refer to sifive-blocks-ip-versioning.txt for details.
18*c66ec88fSEmmanuel Vadot- reg: physical base address and length of the controller's registers
19*c66ec88fSEmmanuel Vadot- clocks: Should contain a clock identifier for the PWM's parent clock.
20*c66ec88fSEmmanuel Vadot- #pwm-cells: Should be 3. See pwm.yaml in this directory
21*c66ec88fSEmmanuel Vadot  for a description of the cell format.
22*c66ec88fSEmmanuel Vadot- interrupts: one interrupt per PWM channel
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotExamples:
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel Vadotpwm:  pwm@10020000 {
27*c66ec88fSEmmanuel Vadot	compatible = "sifive,fu540-c000-pwm", "sifive,pwm0";
28*c66ec88fSEmmanuel Vadot	reg = <0x0 0x10020000 0x0 0x1000>;
29*c66ec88fSEmmanuel Vadot	clocks = <&tlclk>;
30*c66ec88fSEmmanuel Vadot	interrupt-parent = <&plic>;
31*c66ec88fSEmmanuel Vadot	interrupts = <42 43 44 45>;
32*c66ec88fSEmmanuel Vadot	#pwm-cells = <3>;
33*c66ec88fSEmmanuel Vadot};
34