xref: /freebsd/sys/contrib/device-tree/Bindings/timer/sifive,clint.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/sifive,clint.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: SiFive Core Local Interruptor
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Palmer Dabbelt <palmer@dabbelt.com>
11c66ec88fSEmmanuel Vadot  - Anup Patel <anup.patel@wdc.com>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription:
14c66ec88fSEmmanuel Vadot  SiFive (and other RISC-V) SOCs include an implementation of the SiFive
15c66ec88fSEmmanuel Vadot  Core Local Interruptor (CLINT) for M-mode timer and M-mode inter-processor
16c66ec88fSEmmanuel Vadot  interrupts. It directly connects to the timer and inter-processor interrupt
17c66ec88fSEmmanuel Vadot  lines of various HARTs (or CPUs) so RISC-V per-HART (or per-CPU) local
18c66ec88fSEmmanuel Vadot  interrupt controller is the parent interrupt controller for CLINT device.
19c66ec88fSEmmanuel Vadot  The clock frequency of CLINT is specified via "timebase-frequency" DT
20c66ec88fSEmmanuel Vadot  property of "/cpus" DT node. The "timebase-frequency" DT property is
21c66ec88fSEmmanuel Vadot  described in Documentation/devicetree/bindings/riscv/cpus.yaml
22c66ec88fSEmmanuel Vadot
23cb7aa33aSEmmanuel Vadot  T-Head C906/C910 CPU cores include an implementation of CLINT too, however
24cb7aa33aSEmmanuel Vadot  their implementation lacks a memory-mapped MTIME register, thus not
25cb7aa33aSEmmanuel Vadot  compatible with SiFive ones.
26cb7aa33aSEmmanuel Vadot
27c66ec88fSEmmanuel Vadotproperties:
28c66ec88fSEmmanuel Vadot  compatible:
297ef62cebSEmmanuel Vadot    oneOf:
307ef62cebSEmmanuel Vadot      - items:
315def4c47SEmmanuel Vadot          - enum:
32f126890aSEmmanuel Vadot              - canaan,k210-clint       # Canaan Kendryte K210
33f126890aSEmmanuel Vadot              - sifive,fu540-c000-clint # SiFive FU540
34f126890aSEmmanuel Vadot              - starfive,jh7100-clint   # StarFive JH7100
35f126890aSEmmanuel Vadot              - starfive,jh7110-clint   # StarFive JH7110
36*8d13bc63SEmmanuel Vadot              - starfive,jh8100-clint   # StarFive JH8100
37f126890aSEmmanuel Vadot          - const: sifive,clint0        # SiFive CLINT v0 IP block
387ef62cebSEmmanuel Vadot      - items:
39cb7aa33aSEmmanuel Vadot          - enum:
40cb7aa33aSEmmanuel Vadot              - allwinner,sun20i-d1-clint
4184943d6fSEmmanuel Vadot              - sophgo,cv1800b-clint
42*8d13bc63SEmmanuel Vadot              - sophgo,cv1812h-clint
43f126890aSEmmanuel Vadot              - thead,th1520-clint
44cb7aa33aSEmmanuel Vadot          - const: thead,c900-clint
45cb7aa33aSEmmanuel Vadot      - items:
467ef62cebSEmmanuel Vadot          - const: sifive,clint0
477ef62cebSEmmanuel Vadot          - const: riscv,clint0
487ef62cebSEmmanuel Vadot        deprecated: true
497ef62cebSEmmanuel Vadot        description: For the QEMU virt machine only
50c66ec88fSEmmanuel Vadot
51c66ec88fSEmmanuel Vadot    description:
52f126890aSEmmanuel Vadot      Should be "<vendor>,<chip>-clint", followed by "sifive,clint<version>"
53f126890aSEmmanuel Vadot      when compatible with a SiFive CLINT.  Please refer to
54f126890aSEmmanuel Vadot      sifive-blocks-ip-versioning.txt for details regarding the latter.
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadot  reg:
57c66ec88fSEmmanuel Vadot    maxItems: 1
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel Vadot  interrupts-extended:
60c66ec88fSEmmanuel Vadot    minItems: 1
61c9ccf3a3SEmmanuel Vadot    maxItems: 4095
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel VadotadditionalProperties: false
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel Vadotrequired:
66c66ec88fSEmmanuel Vadot  - compatible
67c66ec88fSEmmanuel Vadot  - reg
68c66ec88fSEmmanuel Vadot  - interrupts-extended
69c66ec88fSEmmanuel Vadot
70c66ec88fSEmmanuel Vadotexamples:
71c66ec88fSEmmanuel Vadot  - |
72c66ec88fSEmmanuel Vadot    timer@2000000 {
73c66ec88fSEmmanuel Vadot      compatible = "sifive,fu540-c000-clint", "sifive,clint0";
74c9ccf3a3SEmmanuel Vadot      interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>,
75c9ccf3a3SEmmanuel Vadot                            <&cpu2intc 3>, <&cpu2intc 7>,
76c9ccf3a3SEmmanuel Vadot                            <&cpu3intc 3>, <&cpu3intc 7>,
77c9ccf3a3SEmmanuel Vadot                            <&cpu4intc 3>, <&cpu4intc 7>;
78c66ec88fSEmmanuel Vadot       reg = <0x2000000 0x10000>;
79c66ec88fSEmmanuel Vadot    };
80c66ec88fSEmmanuel Vadot...
81