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
57 - const: sifive,rocket0
59 - const: riscv # Simulator only
61 Identifies that the hart uses the RISC-V instruction set
62 and identifies the type of the hart.
66 Identifies the largest MMU address translation mode supported by
67 this hart. These values originate from the RISC-V Privileged
68 Specification document, available from
69 https://riscv.org/specifications/
70 $ref: /schemas/types.yaml#/definitions/string
80 The hart ID of this CPU node.
82 riscv,cbom-block-size:
83 $ref: /schemas/types.yaml#/definitions/uint32
85 The blocksize in bytes for the Zicbom cache operations.
87 riscv,cbop-block-size:
88 $ref: /schemas/types.yaml#/definitions/uint32
90 The blocksize in bytes for the Zicbop cache operations.
92 riscv,cboz-block-size:
93 $ref: /schemas/types.yaml#/definitions/uint32
95 The blocksize in bytes for the Zicboz cache operations.
97 # RISC-V has multiple properties for cache op block sizes as the sizes
98 # differ between individual CBO extensions
99 cache-op-block-size: false
100 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
101 timebase-frequency: false
103 interrupt-controller:
105 additionalProperties: false
106 description: Describes the CPU's local interrupt controller
113 const: riscv,cpu-intc
115 interrupt-controller: true
120 - interrupt-controller
123 $ref: /schemas/types.yaml#/definitions/phandle-array
127 List of phandles to idle state nodes supported
128 by this hart (see ./idle-states.yaml).
132 u32 value representing CPU capacity (see ../cpu/cpu-capacity.txt) in
133 DMIPS/MHz, relative to highest capacity-dmips-mhz
143 riscv,isa-base: [ "riscv,isa-extensions" ]
144 riscv,isa-extensions: [ "riscv,isa-base" ]
147 - interrupt-controller
149 unevaluatedProperties: false
153 // Example 1: SiFive Freedom U540G Development Kit
155 #address-cells = <1>;
157 timebase-frequency = <1000000>;
159 clock-frequency = <0>;
160 compatible = "sifive,rocket0", "riscv";
162 i-cache-block-size = <64>;
163 i-cache-sets = <128>;
164 i-cache-size = <16384>;
166 riscv,isa-base = "rv64i";
167 riscv,isa-extensions = "i", "m", "a", "c";
169 cpu_intc0: interrupt-controller {
170 #interrupt-cells = <1>;
171 compatible = "riscv,cpu-intc";
172 interrupt-controller;
176 clock-frequency = <0>;
177 compatible = "sifive,rocket0", "riscv";
178 d-cache-block-size = <64>;
180 d-cache-size = <32768>;
184 i-cache-block-size = <64>;
186 i-cache-size = <32768>;
189 mmu-type = "riscv,sv39";
192 riscv,isa-base = "rv64i";
193 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
195 cpu_intc1: interrupt-controller {
196 #interrupt-cells = <1>;
197 compatible = "riscv,cpu-intc";
198 interrupt-controller;
204 // Example 2: Spike ISA Simulator with 1 Hart
206 #address-cells = <1>;
211 compatible = "riscv";
212 mmu-type = "riscv,sv48";
213 riscv,isa-base = "rv64i";
214 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
216 interrupt-controller {
217 #interrupt-cells = <1>;
218 interrupt-controller;
219 compatible = "riscv,cpu-intc";