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
56 - const: sifive,rocket0
58 - const: riscv # Simulator only
60 Identifies that the hart uses the RISC-V instruction set
61 and identifies the type of the hart.
65 Identifies the MMU address translation mode used on this
66 hart. These values originate from the RISC-V Privileged
67 Specification document, available from
68 https://riscv.org/specifications/
69 $ref: /schemas/types.yaml#/definitions/string
77 riscv,cbom-block-size:
78 $ref: /schemas/types.yaml#/definitions/uint32
80 The blocksize in bytes for the Zicbom cache operations.
82 riscv,cboz-block-size:
83 $ref: /schemas/types.yaml#/definitions/uint32
85 The blocksize in bytes for the Zicboz cache operations.
87 # RISC-V has multiple properties for cache op block sizes as the sizes
88 # differ between individual CBO extensions
89 cache-op-block-size: false
90 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
91 timebase-frequency: false
95 additionalProperties: false
96 description: Describes the CPU's local interrupt controller
103 const: riscv,cpu-intc
105 interrupt-controller: true
110 - interrupt-controller
113 $ref: /schemas/types.yaml#/definitions/phandle-array
117 List of phandles to idle state nodes supported
118 by this hart (see ./idle-states.yaml).
122 u32 value representing CPU capacity (see ../cpu/cpu-capacity.txt) in
123 DMIPS/MHz, relative to highest capacity-dmips-mhz
133 riscv,isa-base: [ "riscv,isa-extensions" ]
134 riscv,isa-extensions: [ "riscv,isa-base" ]
137 - interrupt-controller
139 unevaluatedProperties: false
143 // Example 1: SiFive Freedom U540G Development Kit
145 #address-cells = <1>;
147 timebase-frequency = <1000000>;
149 clock-frequency = <0>;
150 compatible = "sifive,rocket0", "riscv";
152 i-cache-block-size = <64>;
153 i-cache-sets = <128>;
154 i-cache-size = <16384>;
156 riscv,isa-base = "rv64i";
157 riscv,isa-extensions = "i", "m", "a", "c";
159 cpu_intc0: interrupt-controller {
160 #interrupt-cells = <1>;
161 compatible = "riscv,cpu-intc";
162 interrupt-controller;
166 clock-frequency = <0>;
167 compatible = "sifive,rocket0", "riscv";
168 d-cache-block-size = <64>;
170 d-cache-size = <32768>;
174 i-cache-block-size = <64>;
176 i-cache-size = <32768>;
179 mmu-type = "riscv,sv39";
182 riscv,isa-base = "rv64i";
183 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
185 cpu_intc1: interrupt-controller {
186 #interrupt-cells = <1>;
187 compatible = "riscv,cpu-intc";
188 interrupt-controller;
194 // Example 2: Spike ISA Simulator with 1 Hart
196 #address-cells = <1>;
201 compatible = "riscv";
202 mmu-type = "riscv,sv48";
203 riscv,isa-base = "rv64i";
204 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
206 interrupt-controller {
207 #interrupt-cells = <1>;
208 interrupt-controller;
209 compatible = "riscv,cpu-intc";