GNU Linux-libre 5.19-rc6-gnu
[releases.git] / Documentation / devicetree / bindings / timer / ti,timer-dm.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/timer/ti,timer-dm.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: TI dual-mode timer
8
9 maintainers:
10   - Tony Lindgren <tony@atomide.com>
11
12 description: |
13   The TI dual-mode timer is a general purpose timer with PWM capabilities.
14
15 properties:
16   compatible:
17     oneOf:
18       - items:
19           - enum:
20               - ti,am335x-timer
21               - ti,am335x-timer-1ms
22               - ti,am654-timer
23               - ti,dm814-timer
24               - ti,dm816-timer
25               - ti,omap2420-timer
26               - ti,omap3430-timer
27               - ti,omap4430-timer
28               - ti,omap5430-timer
29       - items:
30           - const: ti,am4372-timer
31           - const: ti,am335x-timer
32       - items:
33           - const: ti,am4372-timer-1ms
34           - const: ti,am335x-timer-1ms
35
36   reg:
37     items:
38       - description: IO address
39       - description: L3 to L4 mapping for omap4/5 L4 ABE
40     minItems: 1
41
42   clocks:
43     items:
44       - description: Functional clock
45       - description: System clock for omap4/5 and dra7
46     minItems: 1
47
48   clock-names:
49     items:
50       - const: fck
51       - const: timer_sys_ck
52     minItems: 1
53
54   interrupts:
55     description:
56       Interrupt if available. The timer PWM features may be usable
57       in a limited way even without interrupts.
58     maxItems: 1
59
60   ti,timer-alwon:
61     description:
62       Timer is always enabled when the SoC is powered. Note that some SoCs like
63       am335x can suspend to PM coprocessor RTC only mode and in that case the
64       SoC power is cut including timers.
65     type: boolean
66
67   ti,timer-dsp:
68     description:
69       Timer is routable to the DSP in addition to the operating system.
70     type: boolean
71
72   ti,timer-pwm:
73     description:
74       Timer has been wired for PWM capability.
75     type: boolean
76
77   ti,timer-secure:
78     description:
79       Timer access has been limited to secure mode only.
80     type: boolean
81
82   ti,hwmods:
83     description:
84       Name of the HWMOD associated with timer. This is for legacy
85       omap2/3 platforms only.
86     $ref: /schemas/types.yaml#/definitions/string
87     deprecated: true
88
89 required:
90   - compatible
91   - reg
92
93 additionalProperties: false
94
95 allOf:
96   - if:
97       not:
98         properties:
99           compatible:
100             contains:
101               const: ti,am654-timer
102     then:
103       required:
104         - interrupts
105
106   - if:
107       not:
108         properties:
109           compatible:
110             contains:
111               enum:
112                 - ti,omap3430-timer
113                 - ti,omap4430-timer
114                 - ti,omap5430-timer
115     then:
116       properties:
117         reg:
118           maxItems: 1
119         clocks:
120           maxItems: 1
121         clock-names:
122           maxItems: 1
123
124   - if:
125       properties:
126         compatible:
127           contains:
128             enum:
129               - ti,dm814-timer
130               - ti,dm816-timer
131               - ti,omap2420-timer
132               - ti,omap3430-timer
133     then:
134       properties:
135         ti,hwmods:
136           items:
137             - pattern: "^timer([1-9]|1[0-2])$"
138     else:
139       properties:
140         ti,hwmods: false
141
142 examples:
143   - |
144     timer1: timer@0 {
145       compatible = "ti,am335x-timer-1ms";
146       reg = <0x0 0x400>;
147       interrupts = <67>;
148       ti,timer-alwon;
149       clocks = <&timer1_fck>;
150       clock-names = "fck";
151     };
152 ...