dts: set the riscv,isa property for virt-based targets

This commit makes the devicetrees of the targets that are based on the QEMU
`virt` machine more consistent with the rest of the RISC-V targets in
Zephyr by:
* adding the `riscv,isa` property
* adding a compatible string which uniquely identifies the `virt` core

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit is contained in:
Filip Kokosinski 2024-04-25 13:18:46 +02:00 committed by Alberto Escolar
commit 00b2ef8744
9 changed files with 112 additions and 13 deletions

View file

@ -2,7 +2,7 @@
/dts-v1/; /dts-v1/;
#include <virt.dtsi> #include <qemu/virt-riscv32.dtsi>
/ { / {
chosen { chosen {

View file

@ -2,7 +2,7 @@
/dts-v1/; /dts-v1/;
#include <virt.dtsi> #include <qemu/virt-riscv32.dtsi>
/ { / {
chosen { chosen {

View file

@ -7,7 +7,7 @@
/dts-v1/; /dts-v1/;
#include <virt.dtsi> #include <qemu/virt-riscv32.dtsi>
/ { / {
chosen { chosen {

View file

@ -3,7 +3,7 @@
/dts-v1/; /dts-v1/;
#include <virt.dtsi> #include <qemu/virt-riscv64.dtsi>
/ { / {
chosen { chosen {

View file

@ -3,7 +3,7 @@
/dts-v1/; /dts-v1/;
#include <virt.dtsi> #include <qemu/virt-riscv64.dtsi>
/ { / {
chosen { chosen {

View file

@ -0,0 +1,9 @@
# Copyright (c) 2024 Antmicro <www.antmicro.com>
#
# SPDX-License-Identifier: Apache-2.0
description: QEMU RISC-V virt machine CPU node
compatible: "qemu,riscv-virt"
include: riscv,cpus.yaml

View file

@ -41,7 +41,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x00 >; reg = < 0x00 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic0: interrupt-controller { hlic0: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -55,7 +55,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x01 >; reg = < 0x01 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic1: interrupt-controller { hlic1: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -69,7 +69,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x02 >; reg = < 0x02 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic2: interrupt-controller { hlic2: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -83,7 +83,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x03 >; reg = < 0x03 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic3: interrupt-controller { hlic3: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -97,7 +97,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x04 >; reg = < 0x04 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic4: interrupt-controller { hlic4: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -111,7 +111,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x05 >; reg = < 0x05 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic5: interrupt-controller { hlic5: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -125,7 +125,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x06 >; reg = < 0x06 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic6: interrupt-controller { hlic6: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";
@ -139,7 +139,7 @@
device_type = "cpu"; device_type = "cpu";
reg = < 0x07 >; reg = < 0x07 >;
status = "okay"; status = "okay";
compatible = "riscv"; compatible = "qemu,riscv-virt", "riscv";
hlic7: interrupt-controller { hlic7: interrupt-controller {
compatible = "riscv,cpu-intc"; compatible = "riscv,cpu-intc";

View file

@ -0,0 +1,45 @@
/*
* Copyright (c) 2024 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <qemu/virt-riscv.dtsi>
/ {
cpus {
cpu@0 {
riscv,isa = "rv32gc";
};
cpu@1 {
riscv,isa = "rv32gc";
};
cpu@2 {
riscv,isa = "rv32gc";
};
cpu@3 {
riscv,isa = "rv32gc";
};
cpu@4 {
riscv,isa = "rv32gc";
};
cpu@5 {
riscv,isa = "rv32gc";
};
cpu@6 {
riscv,isa = "rv32gc";
};
cpu@7 {
riscv,isa = "rv32gc";
};
};
};

View file

@ -0,0 +1,45 @@
/*
* Copyright (c) 2024 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <qemu/virt-riscv.dtsi>
/ {
cpus {
cpu@0 {
riscv,isa = "rv64gc";
};
cpu@1 {
riscv,isa = "rv64gc";
};
cpu@2 {
riscv,isa = "rv64gc";
};
cpu@3 {
riscv,isa = "rv64gc";
};
cpu@4 {
riscv,isa = "rv64gc";
};
cpu@5 {
riscv,isa = "rv64gc";
};
cpu@6 {
riscv,isa = "rv64gc";
};
cpu@7 {
riscv,isa = "rv64gc";
};
};
};