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>
14 This document uses some terminology common to the RISC-V community
15 that is not widely used, the definitions of which are listed here:
17 hart: A hardware execution context, which contains all the state
18 mandated by the RISC-V ISA: a PC and some registers. This
19 terminology is designed to disambiguate software's view of execution
20 contexts from any particular microarchitectural implementation
21 strategy. For example, an Intel laptop containing one socket with
22 two cores, each of which has two hyperthreads, could be described as
37 - const: riscv # Simulator only
39 Identifies that the hart uses the RISC-V instruction set
40 and identifies the type of the hart.
44 - $ref: "/schemas/types.yaml#/definitions/string"
50 Identifies the MMU address translation mode used on this
51 hart. These values originate from the RISC-V Privileged
52 Specification document, available from
53 https://riscv.org/specifications/
57 - $ref: "/schemas/types.yaml#/definitions/string"
62 Identifies the specific RISC-V instruction set architecture
63 supported by the hart. These are documented in the RISC-V
64 User-Level ISA document, available from
65 https://riscv.org/specifications/
67 While the isa strings in ISA specification are case
68 insensitive, letters in the riscv,isa string must be all
69 lowercase to simplify parsing.
71 # RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
72 timebase-frequency: false
76 description: Describes the CPU's local interrupt controller
85 interrupt-controller: true
90 - interrupt-controller
94 - interrupt-controller
98 // Example 1: SiFive Freedom U540G Development Kit
100 #address-cells = <1>;
102 timebase-frequency = <1000000>;
104 clock-frequency = <0>;
105 compatible = "sifive,rocket0", "riscv";
107 i-cache-block-size = <64>;
108 i-cache-sets = <128>;
109 i-cache-size = <16384>;
111 riscv,isa = "rv64imac";
112 cpu_intc0: interrupt-controller {
113 #interrupt-cells = <1>;
114 compatible = "riscv,cpu-intc";
115 interrupt-controller;
119 clock-frequency = <0>;
120 compatible = "sifive,rocket0", "riscv";
121 d-cache-block-size = <64>;
123 d-cache-size = <32768>;
127 i-cache-block-size = <64>;
129 i-cache-size = <32768>;
132 mmu-type = "riscv,sv39";
134 riscv,isa = "rv64imafdc";
136 cpu_intc1: interrupt-controller {
137 #interrupt-cells = <1>;
138 compatible = "riscv,cpu-intc";
139 interrupt-controller;
145 // Example 2: Spike ISA Simulator with 1 Hart
147 #address-cells = <1>;
152 compatible = "riscv";
153 riscv,isa = "rv64imafdc";
154 mmu-type = "riscv,sv48";
155 interrupt-controller {
156 #interrupt-cells = <1>;
157 interrupt-controller;
158 compatible = "riscv,cpu-intc";