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 additionalProperties: false
95 description: Describes the CPU's local interrupt controller
102 const: riscv,cpu-intc
104 interrupt-controller: true
109 - interrupt-controller
112 $ref: /schemas/types.yaml#/definitions/phandle-array
116 List of phandles to idle state nodes supported
117 by this hart (see ./idle-states.yaml).
121 u32 value representing CPU capacity (see ../cpu/cpu-capacity.txt) in
122 DMIPS/MHz, relative to highest capacity-dmips-mhz
132 riscv,isa-base: [ "riscv,isa-extensions" ]
133 riscv,isa-extensions: [ "riscv,isa-base" ]
136 - interrupt-controller
138 unevaluatedProperties: false
142 // Example 1: SiFive Freedom U540G Development Kit
144 #address-cells = <1>;
146 timebase-frequency = <1000000>;
148 clock-frequency = <0>;
149 compatible = "sifive,rocket0", "riscv";
151 i-cache-block-size = <64>;
152 i-cache-sets = <128>;
153 i-cache-size = <16384>;
155 riscv,isa-base = "rv64i";
156 riscv,isa-extensions = "i", "m", "a", "c";
158 cpu_intc0: interrupt-controller {
159 #interrupt-cells = <1>;
160 compatible = "riscv,cpu-intc";
161 interrupt-controller;
165 clock-frequency = <0>;
166 compatible = "sifive,rocket0", "riscv";
167 d-cache-block-size = <64>;
169 d-cache-size = <32768>;
173 i-cache-block-size = <64>;
175 i-cache-size = <32768>;
178 mmu-type = "riscv,sv39";
181 riscv,isa-base = "rv64i";
182 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
184 cpu_intc1: interrupt-controller {
185 #interrupt-cells = <1>;
186 compatible = "riscv,cpu-intc";
187 interrupt-controller;
193 // Example 2: Spike ISA Simulator with 1 Hart
195 #address-cells = <1>;
200 compatible = "riscv";
201 mmu-type = "riscv,sv48";
202 riscv,isa-base = "rv64i";
203 riscv,isa-extensions = "i", "m", "a", "f", "d", "c";
205 interrupt-controller {
206 #interrupt-cells = <1>;
207 interrupt-controller;
208 compatible = "riscv,cpu-intc";