stm32-lptimer.txt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. STMicroelectronics STM32 Low-Power Timer
  2. The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
  3. functions:
  4. - PWM output (with programmable prescaler, configurable polarity)
  5. - Quadrature encoder, counter
  6. - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
  7. Required properties:
  8. - compatible: Must be "st,stm32-lptimer".
  9. - reg: Offset and length of the device's register set.
  10. - clocks: Phandle to the clock used by the LP Timer module.
  11. - clock-names: Must be "mux".
  12. - #address-cells: Should be '<1>'.
  13. - #size-cells: Should be '<0>'.
  14. Optional subnodes:
  15. - pwm: See ../pwm/pwm-stm32-lp.txt
  16. - counter: See ../iio/timer/stm32-lptimer-cnt.txt
  17. - trigger: See ../iio/timer/stm32-lptimer-trigger.txt
  18. Example:
  19. timer@40002400 {
  20. compatible = "st,stm32-lptimer";
  21. reg = <0x40002400 0x400>;
  22. clocks = <&timer_clk>;
  23. clock-names = "mux";
  24. #address-cells = <1>;
  25. #size-cells = <0>;
  26. pwm {
  27. compatible = "st,stm32-pwm-lp";
  28. pinctrl-names = "default";
  29. pinctrl-0 = <&lppwm1_pins>;
  30. };
  31. trigger@0 {
  32. compatible = "st,stm32-lptimer-trigger";
  33. reg = <0>;
  34. };
  35. counter {
  36. compatible = "st,stm32-lptimer-counter";
  37. pinctrl-names = "default";
  38. pinctrl-0 = <&lptim1_in_pins>;
  39. };
  40. };