WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / mfd / st,stm32-lptimer.yaml
blob8bcea8dd7d908acf952614fa797b558ac08de402
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/st,stm32-lptimer.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 Low-Power Timers bindings
9 description: |
10   The STM32 Low-Power Timer (LPTIM) is a 16-bit timer that provides several
11   functions
12    - PWM output (with programmable prescaler, configurable polarity)
13    - Trigger source for STM32 ADC/DAC (LPTIM_OUT)
14    - Several counter modes:
15      - quadrature encoder to detect angular position and direction of rotary
16        elements, from IN1 and IN2 input signals.
17      - simple counter from IN1 input signal.
19 maintainers:
20   - Fabrice Gasnier <fabrice.gasnier@st.com>
22 properties:
23   compatible:
24     const: st,stm32-lptimer
26   reg:
27     maxItems: 1
29   clocks:
30     maxItems: 1
32   clock-names:
33     items:
34       - const: mux
36   interrupts:
37     maxItems: 1
39   "#address-cells":
40     const: 1
42   "#size-cells":
43     const: 0
45   wakeup-source: true
47   pwm:
48     type: object
50     properties:
51       compatible:
52         const: st,stm32-pwm-lp
54       "#pwm-cells":
55         const: 3
57     required:
58       - "#pwm-cells"
59       - compatible
61 patternProperties:
62   "^trigger@[0-9]+$":
63     type: object
65     properties:
66       compatible:
67         const: st,stm32-lptimer-trigger
69       reg:
70         description: Identify trigger hardware block.
71         items:
72           minimum: 0
73           maximum: 2
75     required:
76       - compatible
77       - reg
79   counter:
80     type: object
82     properties:
83       compatible:
84         const: st,stm32-lptimer-counter
86     required:
87       - compatible
89   timer:
90     type: object
92     properties:
93       compatible:
94         const: st,stm32-lptimer-timer
96     required:
97       - compatible
99 required:
100   - "#address-cells"
101   - "#size-cells"
102   - compatible
103   - reg
104   - clocks
105   - clock-names
107 additionalProperties: false
109 examples:
110   - |
111     #include <dt-bindings/clock/stm32mp1-clks.h>
112     #include <dt-bindings/interrupt-controller/arm-gic.h>
113     timer@40002400 {
114       compatible = "st,stm32-lptimer";
115       reg = <0x40002400 0x400>;
116       clocks = <&timer_clk>;
117       clock-names = "mux";
118       interrupts-extended = <&exti 47 IRQ_TYPE_LEVEL_HIGH>;
119       #address-cells = <1>;
120       #size-cells = <0>;
122       pwm {
123         compatible = "st,stm32-pwm-lp";
124         #pwm-cells = <3>;
125       };
127       trigger@0 {
128         compatible = "st,stm32-lptimer-trigger";
129         reg = <0>;
130       };
132       counter {
133         compatible = "st,stm32-lptimer-counter";
134       };
136       timer {
137         compatible = "st,stm32-lptimer-timer";
138       };
139     };