summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/timer/ti,timer-dm.yaml
blob: acbb6f8997ee4001e46d8b0ef84e49ef7b33d109 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/timer/ti,timer-dm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI dual-mode timer

maintainers:
  - Tony Lindgren <tony@atomide.com>

description: |
  The TI dual-mode timer is a general purpose timer with PWM capabilities.

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - ti,am335x-timer
              - ti,am335x-timer-1ms
              - ti,am654-timer
              - ti,dm814-timer
              - ti,dm816-timer
              - ti,omap2420-timer
              - ti,omap3430-timer
              - ti,omap4430-timer
              - ti,omap5430-timer
      - items:
          - const: ti,am4372-timer
          - const: ti,am335x-timer
      - items:
          - const: ti,am4372-timer-1ms
          - const: ti,am335x-timer-1ms

  reg:
    items:
      - description: IO address
      - description: L3 to L4 mapping for omap4/5 L4 ABE
    minItems: 1

  clocks:
    items:
      - description: Functional clock
      - description: System clock for omap4/5 and dra7
    minItems: 1

  clock-names:
    items:
      - const: fck
      - const: timer_sys_ck
    minItems: 1

  power-domains:
    description:
      Power domain if available
    maxItems: 1

  interrupts:
    description:
      Interrupt if available. The timer PWM features may be usable
      in a limited way even without interrupts.
    maxItems: 1

  ti,timer-alwon:
    description:
      Timer is always enabled when the SoC is powered. Note that some SoCs like
      am335x can suspend to PM coprocessor RTC only mode and in that case the
      SoC power is cut including timers.
    type: boolean

  ti,timer-dsp:
    description:
      Timer is routable to the DSP in addition to the operating system.
    type: boolean

  ti,timer-pwm:
    description:
      Timer has been wired for PWM capability.
    type: boolean

  ti,timer-secure:
    description:
      Timer access has been limited to secure mode only.
    type: boolean

  ti,hwmods:
    description:
      Name of the HWMOD associated with timer. This is for legacy
      omap2/3 platforms only.
    $ref: /schemas/types.yaml#/definitions/string
    deprecated: true

required:
  - compatible
  - reg

additionalProperties: false

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: ti,am654-timer
    then:
      required:
        - power-domains
    else:
      required:
        - interrupts

  - if:
      not:
        properties:
          compatible:
            contains:
              enum:
                - ti,omap3430-timer
                - ti,omap4430-timer
                - ti,omap5430-timer
    then:
      properties:
        reg:
          maxItems: 1
        clocks:
          maxItems: 1
        clock-names:
          maxItems: 1

  - if:
      properties:
        compatible:
          contains:
            enum:
              - ti,dm814-timer
              - ti,dm816-timer
              - ti,omap2420-timer
              - ti,omap3430-timer
    then:
      properties:
        ti,hwmods:
          items:
            - pattern: "^timer([1-9]|1[0-2])$"
    else:
      properties:
        ti,hwmods: false

examples:
  - |
    timer1: timer@0 {
      compatible = "ti,am335x-timer-1ms";
      reg = <0x0 0x400>;
      interrupts = <67>;
      ti,timer-alwon;
      clocks = <&timer1_fck>;
      clock-names = "fck";
    };
...