diff --git a/arch/riscv/boot/dts/bosc/Makefile b/arch/riscv/boot/dts/bosc/Makefile index e22187ae8dc2..4317712a95ba 100644 --- a/arch/riscv/boot/dts/bosc/Makefile +++ b/arch/riscv/boot/dts/bosc/Makefile @@ -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)) diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-16core-uartlite.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-16core-uartlite.dts new file mode 100644 index 000000000000..eadad8df842a --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-16core-uartlite.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-16core.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-16core.dts new file mode 100644 index 000000000000..4b6cfd0f9a26 --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-16core.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-1core-uartlite.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-1core-uartlite.dts index 51cb2ddad20e..3747f7a1b5d9 100644 --- a/arch/riscv/boot/dts/bosc/nanhu-v5-1core-uartlite.dts +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-1core-uartlite.dts @@ -23,10 +23,10 @@ }; }; -&cpu0 { - status = "okay"; -}; - &uart1 { status = "okay"; }; + +&cpu0 { + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-2core-uartlite.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-2core-uartlite.dts new file mode 100644 index 000000000000..dab2b302e7b0 --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-2core-uartlite.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-2core.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-2core.dts new file mode 100644 index 000000000000..73c008f30eb1 --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-2core.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-4core-uartlite.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-4core-uartlite.dts new file mode 100644 index 000000000000..40ec2a948f22 --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-4core-uartlite.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-4core.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-4core.dts new file mode 100644 index 000000000000..205baa006129 --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-4core.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-8core-uartlite.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-8core-uartlite.dts new file mode 100644 index 000000000000..30e6ea6a1950 --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-8core-uartlite.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5-8core.dts b/arch/riscv/boot/dts/bosc/nanhu-v5-8core.dts new file mode 100644 index 000000000000..d3888ea12d3d --- /dev/null +++ b/arch/riscv/boot/dts/bosc/nanhu-v5-8core.dts @@ -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"; +}; diff --git a/arch/riscv/boot/dts/bosc/nanhu-v5.dtsi b/arch/riscv/boot/dts/bosc/nanhu-v5.dtsi index 100de69fc38c..a0be69f6942e 100644 --- a/arch/riscv/boot/dts/bosc/nanhu-v5.dtsi +++ b/arch/riscv/boot/dts/bosc/nanhu-v5.dtsi @@ -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>; }; };