xref: /linux/Documentation/devicetree/bindings/timer/xlnx,xps-timer.yaml (revision f643490e1bf941600f6105e4d27c49054fb6d562)
1*f643490eSSean Anderson# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2*f643490eSSean Anderson%YAML 1.2
3*f643490eSSean Anderson---
4*f643490eSSean Anderson$id: http://devicetree.org/schemas/timer/xlnx,xps-timer.yaml#
5*f643490eSSean Anderson$schema: http://devicetree.org/meta-schemas/core.yaml#
6*f643490eSSean Anderson
7*f643490eSSean Andersontitle: Xilinx LogiCORE IP AXI Timer Device Tree Binding
8*f643490eSSean Anderson
9*f643490eSSean Andersonmaintainers:
10*f643490eSSean Anderson  - Sean Anderson <sean.anderson@seco.com>
11*f643490eSSean Anderson
12*f643490eSSean Andersonproperties:
13*f643490eSSean Anderson  compatible:
14*f643490eSSean Anderson    contains:
15*f643490eSSean Anderson      const: xlnx,xps-timer-1.00.a
16*f643490eSSean Anderson
17*f643490eSSean Anderson  clocks:
18*f643490eSSean Anderson    maxItems: 1
19*f643490eSSean Anderson
20*f643490eSSean Anderson  clock-names:
21*f643490eSSean Anderson    const: s_axi_aclk
22*f643490eSSean Anderson
23*f643490eSSean Anderson  interrupts:
24*f643490eSSean Anderson    maxItems: 1
25*f643490eSSean Anderson
26*f643490eSSean Anderson  reg:
27*f643490eSSean Anderson    maxItems: 1
28*f643490eSSean Anderson
29*f643490eSSean Anderson  '#pwm-cells': true
30*f643490eSSean Anderson
31*f643490eSSean Anderson  xlnx,count-width:
32*f643490eSSean Anderson    $ref: /schemas/types.yaml#/definitions/uint32
33*f643490eSSean Anderson    enum: [8, 16, 32]
34*f643490eSSean Anderson    default: 32
35*f643490eSSean Anderson    description:
36*f643490eSSean Anderson      The width of the counter(s), in bits.
37*f643490eSSean Anderson
38*f643490eSSean Anderson  xlnx,one-timer-only:
39*f643490eSSean Anderson    $ref: /schemas/types.yaml#/definitions/uint32
40*f643490eSSean Anderson    enum: [ 0, 1 ]
41*f643490eSSean Anderson    description:
42*f643490eSSean Anderson      Whether only one timer is present in this block.
43*f643490eSSean Anderson
44*f643490eSSean Andersonrequired:
45*f643490eSSean Anderson  - compatible
46*f643490eSSean Anderson  - reg
47*f643490eSSean Anderson  - xlnx,one-timer-only
48*f643490eSSean Anderson
49*f643490eSSean AndersonallOf:
50*f643490eSSean Anderson  - if:
51*f643490eSSean Anderson      required:
52*f643490eSSean Anderson        - '#pwm-cells'
53*f643490eSSean Anderson    then:
54*f643490eSSean Anderson      allOf:
55*f643490eSSean Anderson        - required:
56*f643490eSSean Anderson            - clocks
57*f643490eSSean Anderson        - properties:
58*f643490eSSean Anderson            xlnx,one-timer-only:
59*f643490eSSean Anderson              const: 0
60*f643490eSSean Anderson    else:
61*f643490eSSean Anderson      required:
62*f643490eSSean Anderson        - interrupts
63*f643490eSSean Anderson  - if:
64*f643490eSSean Anderson      required:
65*f643490eSSean Anderson        - clocks
66*f643490eSSean Anderson    then:
67*f643490eSSean Anderson      required:
68*f643490eSSean Anderson        - clock-names
69*f643490eSSean Anderson
70*f643490eSSean AndersonadditionalProperties: false
71*f643490eSSean Anderson
72*f643490eSSean Andersonexamples:
73*f643490eSSean Anderson  - |
74*f643490eSSean Anderson    timer@800e0000 {
75*f643490eSSean Anderson        clock-names = "s_axi_aclk";
76*f643490eSSean Anderson        clocks = <&zynqmp_clk 71>;
77*f643490eSSean Anderson        compatible = "xlnx,xps-timer-1.00.a";
78*f643490eSSean Anderson        reg = <0x800e0000 0x10000>;
79*f643490eSSean Anderson        interrupts = <0 39 2>;
80*f643490eSSean Anderson        xlnx,count-width = <16>;
81*f643490eSSean Anderson        xlnx,one-timer-only = <0x0>;
82*f643490eSSean Anderson    };
83*f643490eSSean Anderson
84*f643490eSSean Anderson    timer@800f0000 {
85*f643490eSSean Anderson        #pwm-cells = <0>;
86*f643490eSSean Anderson        clock-names = "s_axi_aclk";
87*f643490eSSean Anderson        clocks = <&zynqmp_clk 71>;
88*f643490eSSean Anderson        compatible = "xlnx,xps-timer-1.00.a";
89*f643490eSSean Anderson        reg = <0x800e0000 0x10000>;
90*f643490eSSean Anderson        xlnx,count-width = <32>;
91*f643490eSSean Anderson        xlnx,one-timer-only = <0x0>;
92*f643490eSSean Anderson    };
93