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#
7 title: RISC-V bindings for 'cpus' DT nodes
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
47 - const: sifive,rocket0
49 - const: riscv # Simulator only
51 Identifies that the hart uses the RISC-V instruction set
52 and identifies the type of the hart.
56 Identifies the MMU address translation mode used on this
57 hart. These values originate from the RISC-V Privileged
58 Specification document, available from
59 https://riscv.org/specifications/
60 $ref: "/schemas/types.yaml#/definitions/string"
67 riscv,cbom-block-size:
68 $ref: /schemas/types.yaml#/definitions/uint32
70 The blocksize in bytes for the Zicbom cache operations.
74 Identifies the specific RISC-V instruction set architecture
75 supported by the hart. These are documented in the RISC-V
76 User-Level ISA document, available from
77 https://riscv.org/specifications/
79 While the isa strings in ISA specification are case
80 insensitive, letters in the riscv,isa string must be all
81 lowercase to simplify parsing.
82 $ref: "/schemas/types.yaml#/definitions/string"
83 pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[a-z])+)?(?:_[hsxz](?:[a-z])+)*$
85 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
86 timebase-frequency: false
90 description: Describes the CPU's local interrupt controller
99 interrupt-controller: true
104 - interrupt-controller
107 $ref: '/schemas/types.yaml#/definitions/phandle-array'
111 List of phandles to idle state nodes supported
112 by this hart (see ./idle-states.yaml).
116 - interrupt-controller
118 additionalProperties: true
122 // Example 1: SiFive Freedom U540G Development Kit
124 #address-cells = <1>;
126 timebase-frequency = <1000000>;
128 clock-frequency = <0>;
129 compatible = "sifive,rocket0", "riscv";
131 i-cache-block-size = <64>;
132 i-cache-sets = <128>;
133 i-cache-size = <16384>;
135 riscv,isa = "rv64imac";
136 cpu_intc0: interrupt-controller {
137 #interrupt-cells = <1>;
138 compatible = "riscv,cpu-intc";
139 interrupt-controller;
143 clock-frequency = <0>;
144 compatible = "sifive,rocket0", "riscv";
145 d-cache-block-size = <64>;
147 d-cache-size = <32768>;
151 i-cache-block-size = <64>;
153 i-cache-size = <32768>;
156 mmu-type = "riscv,sv39";
158 riscv,isa = "rv64imafdc";
160 cpu_intc1: interrupt-controller {
161 #interrupt-cells = <1>;
162 compatible = "riscv,cpu-intc";
163 interrupt-controller;
169 // Example 2: Spike ISA Simulator with 1 Hart
171 #address-cells = <1>;
176 compatible = "riscv";
177 riscv,isa = "rv64imafdc";
178 mmu-type = "riscv,sv48";
179 interrupt-controller {
180 #interrupt-cells = <1>;
181 interrupt-controller;
182 compatible = "riscv,cpu-intc";