xref: /freebsd/sys/contrib/device-tree/Bindings/timer/actions,owl-timer.yaml (revision 5f62a964e9f8abc6a05d8338273fadd154f0a206)
1*5f62a964SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*5f62a964SEmmanuel Vadot%YAML 1.2
3*5f62a964SEmmanuel Vadot---
4*5f62a964SEmmanuel Vadot$id: http://devicetree.org/schemas/timer/actions,owl-timer.yaml#
5*5f62a964SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5f62a964SEmmanuel Vadot
7*5f62a964SEmmanuel Vadottitle: Actions Semi Owl timer
8*5f62a964SEmmanuel Vadot
9*5f62a964SEmmanuel Vadotmaintainers:
10*5f62a964SEmmanuel Vadot  - Andreas Färber <afaerber@suse.de>
11*5f62a964SEmmanuel Vadot
12*5f62a964SEmmanuel Vadotdescription:
13*5f62a964SEmmanuel Vadot  Actions Semi Owl SoCs provide 32bit and 2Hz timers.
14*5f62a964SEmmanuel Vadot  The 32bit timers support dynamic irq, as well as one-shot mode.
15*5f62a964SEmmanuel Vadot
16*5f62a964SEmmanuel Vadotproperties:
17*5f62a964SEmmanuel Vadot  compatible:
18*5f62a964SEmmanuel Vadot    enum:
19*5f62a964SEmmanuel Vadot      - actions,s500-timer
20*5f62a964SEmmanuel Vadot      - actions,s700-timer
21*5f62a964SEmmanuel Vadot      - actions,s900-timer
22*5f62a964SEmmanuel Vadot
23*5f62a964SEmmanuel Vadot  clocks:
24*5f62a964SEmmanuel Vadot    maxItems: 1
25*5f62a964SEmmanuel Vadot
26*5f62a964SEmmanuel Vadot  interrupts:
27*5f62a964SEmmanuel Vadot    minItems: 1
28*5f62a964SEmmanuel Vadot    maxItems: 6
29*5f62a964SEmmanuel Vadot
30*5f62a964SEmmanuel Vadot  interrupt-names:
31*5f62a964SEmmanuel Vadot    minItems: 1
32*5f62a964SEmmanuel Vadot    maxItems: 6
33*5f62a964SEmmanuel Vadot    items:
34*5f62a964SEmmanuel Vadot      enum:
35*5f62a964SEmmanuel Vadot        - 2hz0
36*5f62a964SEmmanuel Vadot        - 2hz1
37*5f62a964SEmmanuel Vadot        - timer0
38*5f62a964SEmmanuel Vadot        - timer1
39*5f62a964SEmmanuel Vadot        - timer2
40*5f62a964SEmmanuel Vadot        - timer3
41*5f62a964SEmmanuel Vadot
42*5f62a964SEmmanuel Vadot  reg:
43*5f62a964SEmmanuel Vadot    maxItems: 1
44*5f62a964SEmmanuel Vadot
45*5f62a964SEmmanuel Vadotrequired:
46*5f62a964SEmmanuel Vadot  - compatible
47*5f62a964SEmmanuel Vadot  - clocks
48*5f62a964SEmmanuel Vadot  - interrupts
49*5f62a964SEmmanuel Vadot  - interrupt-names
50*5f62a964SEmmanuel Vadot  - reg
51*5f62a964SEmmanuel Vadot
52*5f62a964SEmmanuel VadotallOf:
53*5f62a964SEmmanuel Vadot  - if:
54*5f62a964SEmmanuel Vadot      properties:
55*5f62a964SEmmanuel Vadot        compatible:
56*5f62a964SEmmanuel Vadot          contains:
57*5f62a964SEmmanuel Vadot            enum:
58*5f62a964SEmmanuel Vadot              - actions,s500-timer
59*5f62a964SEmmanuel Vadot    then:
60*5f62a964SEmmanuel Vadot      properties:
61*5f62a964SEmmanuel Vadot        interrupts:
62*5f62a964SEmmanuel Vadot          minItems: 4
63*5f62a964SEmmanuel Vadot          maxItems: 4
64*5f62a964SEmmanuel Vadot        interrupt-names:
65*5f62a964SEmmanuel Vadot          items:
66*5f62a964SEmmanuel Vadot            - const: 2hz0
67*5f62a964SEmmanuel Vadot            - const: 2hz1
68*5f62a964SEmmanuel Vadot            - const: timer0
69*5f62a964SEmmanuel Vadot            - const: timer1
70*5f62a964SEmmanuel Vadot
71*5f62a964SEmmanuel Vadot  - if:
72*5f62a964SEmmanuel Vadot      properties:
73*5f62a964SEmmanuel Vadot        compatible:
74*5f62a964SEmmanuel Vadot          contains:
75*5f62a964SEmmanuel Vadot            enum:
76*5f62a964SEmmanuel Vadot              - actions,s700-timer
77*5f62a964SEmmanuel Vadot              - actions,s900-timer
78*5f62a964SEmmanuel Vadot    then:
79*5f62a964SEmmanuel Vadot      properties:
80*5f62a964SEmmanuel Vadot        interrupts:
81*5f62a964SEmmanuel Vadot          minItems: 1
82*5f62a964SEmmanuel Vadot          maxItems: 1
83*5f62a964SEmmanuel Vadot        interrupt-names:
84*5f62a964SEmmanuel Vadot          items:
85*5f62a964SEmmanuel Vadot            - const: timer1
86*5f62a964SEmmanuel Vadot
87*5f62a964SEmmanuel VadotadditionalProperties: false
88*5f62a964SEmmanuel Vadot
89*5f62a964SEmmanuel Vadotexamples:
90*5f62a964SEmmanuel Vadot  - |
91*5f62a964SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
92*5f62a964SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
93*5f62a964SEmmanuel Vadot    soc {
94*5f62a964SEmmanuel Vadot      #address-cells = <1>;
95*5f62a964SEmmanuel Vadot      #size-cells = <1>;
96*5f62a964SEmmanuel Vadot      timer@b0168000 {
97*5f62a964SEmmanuel Vadot        compatible = "actions,s500-timer";
98*5f62a964SEmmanuel Vadot        reg = <0xb0168000 0x100>;
99*5f62a964SEmmanuel Vadot        clocks = <&hosc>;
100*5f62a964SEmmanuel Vadot        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
101*5f62a964SEmmanuel Vadot                     <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
102*5f62a964SEmmanuel Vadot                     <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
103*5f62a964SEmmanuel Vadot                     <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
104*5f62a964SEmmanuel Vadot        interrupt-names = "2hz0", "2hz1", "timer0", "timer1";
105*5f62a964SEmmanuel Vadot      };
106*5f62a964SEmmanuel Vadot    };
107*5f62a964SEmmanuel Vadot...
108