Merge branch 'elan-i2c' into next
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / mfd / st,stm32-lptimer.yaml
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#
6
7 title: STMicroelectronics STM32 Low-Power Timers bindings
8
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.
18
19 maintainers:
20   - Fabrice Gasnier <fabrice.gasnier@st.com>
21
22 properties:
23   compatible:
24     const: st,stm32-lptimer
25
26   reg:
27     maxItems: 1
28
29   clocks:
30     maxItems: 1
31
32   clock-names:
33     items:
34       - const: mux
35
36   "#address-cells":
37     const: 1
38
39   "#size-cells":
40     const: 0
41
42   wakeup-source: true
43
44   pwm:
45     type: object
46
47     properties:
48       compatible:
49         const: st,stm32-pwm-lp
50
51       "#pwm-cells":
52         const: 3
53
54     required:
55       - "#pwm-cells"
56       - compatible
57
58 patternProperties:
59   "^trigger@[0-9]+$":
60     type: object
61
62     properties:
63       compatible:
64         const: st,stm32-lptimer-trigger
65
66       reg:
67         description: Identify trigger hardware block.
68         items:
69          minimum: 0
70          maximum: 2
71
72     required:
73       - compatible
74       - reg
75
76   counter:
77     type: object
78
79     properties:
80       compatible:
81         const: st,stm32-lptimer-counter
82
83     required:
84       - compatible
85
86   timer:
87     type: object
88
89     properties:
90       compatible:
91         const: st,stm32-lptimer-timer
92
93     required:
94       - compatible
95
96 required:
97   - "#address-cells"
98   - "#size-cells"
99   - compatible
100   - reg
101   - clocks
102   - clock-names
103
104 additionalProperties: false
105
106 examples:
107   - |
108     #include <dt-bindings/clock/stm32mp1-clks.h>
109     timer@40002400 {
110       compatible = "st,stm32-lptimer";
111       reg = <0x40002400 0x400>;
112       clocks = <&timer_clk>;
113       clock-names = "mux";
114       #address-cells = <1>;
115       #size-cells = <0>;
116
117       pwm {
118         compatible = "st,stm32-pwm-lp";
119         #pwm-cells = <3>;
120       };
121
122       trigger@0 {
123         compatible = "st,stm32-lptimer-trigger";
124         reg = <0>;
125       };
126
127       counter {
128         compatible = "st,stm32-lptimer-counter";
129       };
130
131       timer {
132         compatible = "st,stm32-lptimer-timer";
133       };
134     };
135
136 ...