1 # SPDX-License-Identifier: (GPL-2.0 OR MIT)
4 $id: http://devicetree.org/schemas/riscv/cpus.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Paul Walmsley <paul.walmsley@sifive.com>
11 - Palmer Dabbelt <palmer@sifive.com>
12 - Conor Dooley <conor@kernel.org>
15 This document uses some terminology common to the RISC-V community
16 that is not widely used, the definitions of which are listed here:
18 hart: A hardware execution context, which contains all the state
19 mandated by the RISC-V ISA: a PC and some registers. This
20 terminology is designed to disambiguate software's view of execution
21 contexts from any particular microarchitectural implementation
22 strategy. For example, an Intel laptop containing one socket with
23 two cores, each of which has two hyperthreads, could be described as
27 - $ref: /schemas/cpu.yaml#
28 - $ref: extensions.yaml
55 - const: sifive,rocket0
57 - const: riscv # Simulator only
59 Identifies that the hart uses the RISC-V instruction set
60 and identifies the type of the hart.
64 Identifies the MMU address translation mode used on this
65 hart. These values originate from the RISC-V Privileged
66 Specification document, available from
67 https://riscv.org/specifications/
68 $ref: /schemas/types.yaml#/definitions/string
76 riscv,cbom-block-size:
77 $ref: /schemas/types.yaml#/definitions/uint32
79 The blocksize in bytes for the Zicbom cache operations.
81 riscv,cboz-block-size:
82 $ref: /schemas/types.yaml#/definitions/uint32
84 The blocksize in bytes for the Zicboz cache operations.
86 # RISC-V has multiple properties for cache op block sizes as the sizes
87 # differ between individual CBO extensions
88 cache-op-block-size: false
89 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
90 timebase-frequency: false
94 description: Describes the CPU's local interrupt controller
101 const: riscv,cpu-intc
103 interrupt-controller: true
108 - interrupt-controller
111 $ref: /schemas/types.yaml#/definitions/phandle-array
115 List of phandles to idle state nodes supported
116 by this hart (see ./idle-states.yaml).
120 u32 value representing CPU capacity (see ../cpu/cpu-capacity.txt) in
121 DMIPS/MHz, relative to highest capacity-dmips-mhz
131 riscv,isa-base: [ "riscv,isa-extensions" ]
132 riscv,isa-extensions: [ "riscv,isa-base" ]
135 - interrupt-controller
137 unevaluatedProperties: false
141 // Example 1: SiFive Freedom U540G Development Kit
143 #address-cells = <1>;
145 timebase-frequency = <1000000>;
147 clock-frequency = <0>;
148 compatible = "sifive,rocket0", "riscv";
150 i-cache-block-size = <64>;
151 i-cache-sets = <128>;
152 i-cache-size = <16384>;
154 riscv,isa-base = "rv64i";
155 riscv,isa-extensions = "i", "m", "a", "c";
157 cpu_intc0: interrupt-controller {
158 #interrupt-cells = <1>;
159 compatible = "riscv,cpu-intc";
160 interrupt-controller;
164 clock-frequency = <0>;
165 compatible = "sifive,rocket0", "riscv";
166 d-cache-block-size = <64>;
168 d-cache-size = <32768>;
172 i-cache-block-size = <64>;
174 i-cache-size = <32768>;
177 mmu-type = "riscv,sv39";
180 riscv,isa-base = "rv64i";
181 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
183 cpu_intc1: interrupt-controller {
184 #interrupt-cells = <1>;
185 compatible = "riscv,cpu-intc";
186 interrupt-controller;
192 // Example 2: Spike ISA Simulator with 1 Hart
194 #address-cells = <1>;
199 compatible = "riscv";
200 mmu-type = "riscv,sv48";
201 riscv,isa-base = "rv64i";
202 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
204 interrupt-controller {
205 #interrupt-cells = <1>;
206 interrupt-controller;
207 compatible = "riscv,cpu-intc";