pwm-st.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. STMicroelectronics PWM driver bindings
  2. --------------------------------------
  3. Required parameters:
  4. - compatible : "st,pwm"
  5. - #pwm-cells : Number of cells used to specify a PWM. First cell
  6. specifies the per-chip index of the PWM to use and the
  7. second cell is the period in nanoseconds - fixed to 2
  8. for STiH41x.
  9. - reg : Physical base address and length of the controller's
  10. registers.
  11. - pinctrl-names: Set to "default".
  12. - pinctrl-0: List of phandles pointing to pin configuration nodes
  13. for PWM module.
  14. For Pinctrl properties, please refer to [1].
  15. - clock-names: Valid entries are "pwm" and/or "capture".
  16. - clocks: phandle of the clock used by the PWM module.
  17. For Clk properties, please refer to [2].
  18. - interrupts: IRQ for the Capture device
  19. Optional properties:
  20. - st,pwm-num-chan: Number of available PWM channels. Default is 0.
  21. - st,capture-num-chan: Number of available Capture channels. Default is 0.
  22. [1] Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
  23. [2] Documentation/devicetree/bindings/clock/clock-bindings.txt
  24. Example:
  25. pwm1: pwm@fe510000 {
  26. compatible = "st,pwm";
  27. reg = <0xfe510000 0x68>;
  28. #pwm-cells = <2>;
  29. pinctrl-names = "default";
  30. pinctrl-0 = <&pinctrl_pwm1_chan0_default
  31. &pinctrl_pwm1_chan1_default
  32. &pinctrl_pwm1_chan2_default
  33. &pinctrl_pwm1_chan3_default>;
  34. clocks = <&clk_sysin>;
  35. clock-names = "pwm";
  36. st,pwm-num-chan = <4>;
  37. st,capture-num-chan = <2>;
  38. };