dts: nanhu-v5: Add multiple cpu platforms

Signed-off-by: Ran Wang <wangran@bosc.ac.cn>
This commit is contained in:
Ran Wang
2025-07-22 14:00:09 +08:00
parent d6822ff65b
commit 7ab90af048
11 changed files with 748 additions and 7 deletions
+9 -1
View File
@@ -23,6 +23,14 @@ dtb-$(CONFIG_SOC_XIANGSHAN) += \
kmh-v2-16core-uartlite.dtb \
kmh-v2-nemu.dtb \
nanhu-v5-1core.dtb \
nanhu-v5-1core-uartlite.dtb
nanhu-v5-2core.dtb \
nanhu-v5-4core.dtb \
nanhu-v5-8core.dtb \
nanhu-v5-16core.dtb \
nanhu-v5-1core-uartlite.dtb \
nanhu-v5-2core-uartlite.dtb \
nanhu-v5-4core-uartlite.dtb \
nanhu-v5-8core-uartlite.dtb \
nanhu-v5-16core-uartlite.dtb
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
@@ -0,0 +1,88 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-16core-uartlite";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&uart1 {
status = "okay";
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&cpu2 {
status = "okay";
};
&cpu3 {
status = "okay";
};
&cpu4 {
status = "okay";
};
&cpu5 {
status = "okay";
};
&cpu6 {
status = "okay";
};
&cpu7 {
status = "okay";
};
&cpu8 {
status = "okay";
};
&cpu9 {
status = "okay";
};
&cpu10 {
status = "okay";
};
&cpu11 {
status = "okay";
};
&cpu12 {
status = "okay";
};
&cpu13 {
status = "okay";
};
&cpu14 {
status = "okay";
};
&cpu15 {
status = "okay";
};
@@ -0,0 +1,88 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-16core";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&cpu2 {
status = "okay";
};
&cpu3 {
status = "okay";
};
&cpu4 {
status = "okay";
};
&cpu5 {
status = "okay";
};
&cpu6 {
status = "okay";
};
&cpu7 {
status = "okay";
};
&cpu8 {
status = "okay";
};
&cpu9 {
status = "okay";
};
&cpu10 {
status = "okay";
};
&cpu11 {
status = "okay";
};
&cpu12 {
status = "okay";
};
&cpu13 {
status = "okay";
};
&cpu14 {
status = "okay";
};
&cpu15 {
status = "okay";
};
&uart0 {
status = "okay";
};
@@ -23,10 +23,10 @@
};
};
&cpu0 {
status = "okay";
};
&uart1 {
status = "okay";
};
&cpu0 {
status = "okay";
};
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-2core-uartlite";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&uart1 {
status = "okay";
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-2core";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&uart0 {
status = "okay";
};
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-4core-uartlite";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&uart1 {
status = "okay";
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&cpu2 {
status = "okay";
};
&cpu3 {
status = "okay";
};
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-4core";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&cpu2 {
status = "okay";
};
&cpu3 {
status = "okay";
};
&uart0 {
status = "okay";
};
@@ -0,0 +1,56 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-8core-uartlite";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&uart1 {
status = "okay";
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&cpu2 {
status = "okay";
};
&cpu3 {
status = "okay";
};
&cpu4 {
status = "okay";
};
&cpu5 {
status = "okay";
};
&cpu6 {
status = "okay";
};
&cpu7 {
status = "okay";
};
@@ -0,0 +1,56 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2025 BOSC */
/dts-v1/;
#include "nanhu-v5.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
compatible = "bosc,nanhu-v5-dev";
model = "bosc,nanhu-v5-8core";
chosen {
bootargs = "console=hvc0 earlycon=sbi loglevel=8";
opensbi-config {
compatible = "opensbi,config";
cold-boot-harts = <&cpu0>;
};
};
};
&cpu0 {
status = "okay";
};
&cpu1 {
status = "okay";
};
&cpu2 {
status = "okay";
};
&cpu3 {
status = "okay";
};
&cpu4 {
status = "okay";
};
&cpu5 {
status = "okay";
};
&cpu6 {
status = "okay";
};
&cpu7 {
status = "okay";
};
&uart0 {
status = "okay";
};
+303 -2
View File
@@ -31,6 +31,291 @@
interrupt-controller;
};
};
cpu1: cpu@1 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x1>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu1: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu2: cpu@2 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x2>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu2: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu3: cpu@3 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x3>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu3: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu4: cpu@4 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x4>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu4: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu5: cpu@5 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x5>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu5: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu6: cpu@6 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x6>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu6: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu7: cpu@7 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x7>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu7: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu8: cpu@8 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x8>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu8: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu9: cpu@9 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0x9>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu9: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu10: cpu@10 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0xa>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu10: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu11: cpu@11 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0xb>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu11: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu12: cpu@12 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0xc>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu12: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu13: cpu@13 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0xd>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu13: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu14: cpu@14 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0xe>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu14: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu15: cpu@15 {
compatible = "bosc,nanhu-v5", "riscv";
device_type = "cpu";
mmu-type = "riscv,sv48";
reg = <0xf>;
riscv,isa = "rv64imafdc";
riscv,isa-base = "rv64i";
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
"sstc";
status = "disabled";
intc_cpu15: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
};
soc {
@@ -42,7 +327,23 @@
clint: timer@38000000 {
compatible = "riscv,clint0";
reg = <0x0 0x38000000 0x0 0x10000>;
interrupts-extended = <&intc_cpu0 3>, <&intc_cpu0 7>;
interrupts-extended =
<&intc_cpu0 3>, <&intc_cpu0 7>,
<&intc_cpu1 3>, <&intc_cpu1 7>,
<&intc_cpu2 3>, <&intc_cpu2 7>,
<&intc_cpu3 3>, <&intc_cpu3 7>,
<&intc_cpu4 3>, <&intc_cpu4 7>,
<&intc_cpu5 3>, <&intc_cpu5 7>,
<&intc_cpu6 3>, <&intc_cpu6 7>,
<&intc_cpu7 3>, <&intc_cpu7 7>,
<&intc_cpu8 3>, <&intc_cpu8 7>,
<&intc_cpu9 3>, <&intc_cpu9 7>,
<&intc_cpu10 3>, <&intc_cpu10 7>,
<&intc_cpu11 3>, <&intc_cpu11 7>,
<&intc_cpu12 3>, <&intc_cpu12 7>,
<&intc_cpu13 3>, <&intc_cpu13 7>,
<&intc_cpu14 3>, <&intc_cpu14 7>,
<&intc_cpu15 3>, <&intc_cpu15 7>;
};
uart0: serial@310b0000 {
@@ -71,6 +372,6 @@
memory: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x80000000 >;
reg = <0x0 0x80000000 0x04 0x0>;
};
};