stm32-timers.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. STM32 Timers driver bindings
  2. This IP provides 3 types of timer along with PWM functionality:
  3. - advanced-control timers consist of a 16-bit auto-reload counter driven by a programmable
  4. prescaler, break input feature, PWM outputs and complementary PWM ouputs channels.
  5. - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a
  6. programmable prescaler and PWM outputs.
  7. - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler.
  8. Required parameters:
  9. - compatible: must be "st,stm32-timers"
  10. - reg: Physical base address and length of the controller's
  11. registers.
  12. - clock-names: Set to "int".
  13. - clocks: Phandle to the clock used by the timer module.
  14. For Clk properties, please refer to ../clock/clock-bindings.txt
  15. Optional parameters:
  16. - resets: Phandle to the parent reset controller.
  17. See ../reset/st,stm32-rcc.txt
  18. - dmas: List of phandle to dma channels that can be used for
  19. this timer instance. There may be up to 7 dma channels.
  20. - dma-names: List of dma names. Must match 'dmas' property. Valid
  21. names are: "ch1", "ch2", "ch3", "ch4", "up", "trig",
  22. "com".
  23. Optional subnodes:
  24. - pwm: See ../pwm/pwm-stm32.txt
  25. - timer: See ../iio/timer/stm32-timer-trigger.txt
  26. Example:
  27. timers@40010000 {
  28. #address-cells = <1>;
  29. #size-cells = <0>;
  30. compatible = "st,stm32-timers";
  31. reg = <0x40010000 0x400>;
  32. clocks = <&rcc 0 160>;
  33. clock-names = "int";
  34. pwm {
  35. compatible = "st,stm32-pwm";
  36. pinctrl-0 = <&pwm1_pins>;
  37. pinctrl-names = "default";
  38. };
  39. timer@0 {
  40. compatible = "st,stm32-timer-trigger";
  41. reg = <0>;
  42. };
  43. };
  44. Example with all dmas:
  45. timer@40010000 {
  46. ...
  47. dmas = <&dmamux1 11 0x400 0x0>,
  48. <&dmamux1 12 0x400 0x0>,
  49. <&dmamux1 13 0x400 0x0>,
  50. <&dmamux1 14 0x400 0x0>,
  51. <&dmamux1 15 0x400 0x0>,
  52. <&dmamux1 16 0x400 0x0>,
  53. <&dmamux1 17 0x400 0x0>;
  54. dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig", "com";
  55. ...
  56. child nodes...
  57. };