1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/img,pistachio-gptimer.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Pistachio general-purpose timer
8
9maintainers:
10  - Ezequiel Garcia <ezequiel.garcia@imgtec.com>
11
12properties:
13  compatible:
14    const: img,pistachio-gptimer
15
16  reg:
17    maxItems: 1
18
19  interrupts:
20    items:
21      - description: Timer0 interrupt
22      - description: Timer1 interrupt
23      - description: Timer2 interrupt
24      - description: Timer3 interrupt
25
26  clocks:
27    items:
28      - description: Fast counter clock
29      - description: Slow counter clock
30      - description: Interface clock
31
32  clock-names:
33    items:
34      - const: fast
35      - const: slow
36      - const: sys
37
38  img,cr-periph:
39    description: Peripheral control syscon phandle
40    $ref: /schemas/types.yaml#/definitions/phandle
41
42required:
43  - compatible
44  - reg
45  - interrupts
46  - clocks
47  - clock-names
48  - img,cr-periph
49
50additionalProperties: false
51
52examples:
53  - |
54    #include <dt-bindings/interrupt-controller/mips-gic.h>
55    #include <dt-bindings/clock/pistachio-clk.h>
56
57    timer@18102000 {
58        compatible = "img,pistachio-gptimer";
59        reg = <0x18102000 0x100>;
60        interrupts = <GIC_SHARED 60 IRQ_TYPE_LEVEL_HIGH>,
61                     <GIC_SHARED 61 IRQ_TYPE_LEVEL_HIGH>,
62                     <GIC_SHARED 62 IRQ_TYPE_LEVEL_HIGH>,
63                     <GIC_SHARED 63 IRQ_TYPE_LEVEL_HIGH>;
64        clocks = <&clk_periph PERIPH_CLK_COUNTER_FAST>,
65                 <&clk_periph PERIPH_CLK_COUNTER_SLOW>,
66                 <&cr_periph SYS_CLK_TIMER>;
67        clock-names = "fast", "slow", "sys";
68        img,cr-periph = <&cr_periph>;
69    };
70