xref: /freebsd/sys/contrib/device-tree/Bindings/timer/riscv,timer.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/riscv,timer.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: RISC-V timer
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Anup Patel <anup@brainfault.org>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel Vadotdescription: |+
13*cb7aa33aSEmmanuel Vadot  RISC-V platforms always have a RISC-V timer device for the supervisor-mode
14*cb7aa33aSEmmanuel Vadot  based on the time CSR defined by the RISC-V privileged specification. The
15*cb7aa33aSEmmanuel Vadot  timer interrupts of this device are configured using the RISC-V SBI Time
16*cb7aa33aSEmmanuel Vadot  extension or the RISC-V Sstc extension.
17*cb7aa33aSEmmanuel Vadot
18*cb7aa33aSEmmanuel Vadot  The clock frequency of RISC-V timer device is specified via the
19*cb7aa33aSEmmanuel Vadot  "timebase-frequency" DT property of "/cpus" DT node which is described
20*cb7aa33aSEmmanuel Vadot  in Documentation/devicetree/bindings/riscv/cpus.yaml
21*cb7aa33aSEmmanuel Vadot
22*cb7aa33aSEmmanuel Vadotproperties:
23*cb7aa33aSEmmanuel Vadot  compatible:
24*cb7aa33aSEmmanuel Vadot    enum:
25*cb7aa33aSEmmanuel Vadot      - riscv,timer
26*cb7aa33aSEmmanuel Vadot
27*cb7aa33aSEmmanuel Vadot  interrupts-extended:
28*cb7aa33aSEmmanuel Vadot    minItems: 1
29*cb7aa33aSEmmanuel Vadot    maxItems: 4096   # Should be enough?
30*cb7aa33aSEmmanuel Vadot
31*cb7aa33aSEmmanuel Vadot  riscv,timer-cannot-wake-cpu:
32*cb7aa33aSEmmanuel Vadot    type: boolean
33*cb7aa33aSEmmanuel Vadot    description:
34*cb7aa33aSEmmanuel Vadot      If present, the timer interrupt cannot wake up the CPU from one or
35*cb7aa33aSEmmanuel Vadot      more suspend/idle states.
36*cb7aa33aSEmmanuel Vadot
37*cb7aa33aSEmmanuel VadotadditionalProperties: false
38*cb7aa33aSEmmanuel Vadot
39*cb7aa33aSEmmanuel Vadotrequired:
40*cb7aa33aSEmmanuel Vadot  - compatible
41*cb7aa33aSEmmanuel Vadot  - interrupts-extended
42*cb7aa33aSEmmanuel Vadot
43*cb7aa33aSEmmanuel Vadotexamples:
44*cb7aa33aSEmmanuel Vadot  - |
45*cb7aa33aSEmmanuel Vadot    timer {
46*cb7aa33aSEmmanuel Vadot      compatible = "riscv,timer";
47*cb7aa33aSEmmanuel Vadot      interrupts-extended = <&cpu1intc 5>,
48*cb7aa33aSEmmanuel Vadot                            <&cpu2intc 5>,
49*cb7aa33aSEmmanuel Vadot                            <&cpu3intc 5>,
50*cb7aa33aSEmmanuel Vadot                            <&cpu4intc 5>;
51*cb7aa33aSEmmanuel Vadot    };
52*cb7aa33aSEmmanuel Vadot...
53