From: Drew Fustini <dfustini@oss.tenstorrent.com>
Add device tree source describing the Tenstorrent Blackhole SoC and the
Blackhole P100 and P150 PCIe cards. There are no differences between
the P100 and P150 cards from the perspective of an OS kernel like Linux
running on the X280 cores.
Link: https://github.com/tenstorrent/tt-isa-documentation/blob/main/BlackholeA0/
Signed-off-by: Drew Fustini <dfustini@oss.tenstorrent.com>
---
MAINTAINERS | 1 +
arch/riscv/boot/dts/Makefile | 1 +
arch/riscv/boot/dts/tenstorrent/Makefile | 2 +
arch/riscv/boot/dts/tenstorrent/blackhole-card.dts | 14 +++
arch/riscv/boot/dts/tenstorrent/blackhole.dtsi | 104 +++++++++++++++++++++
5 files changed, 122 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 125b5498c3bf8e689adc665fc6e975b05a484abf..b3a2a347f835da952c33b0faf09d560eb1285c32 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21748,6 +21748,7 @@ L: linux-riscv@lists.infradead.org
S: Maintained
T: git https://github.com/tenstorrent/linux.git
F: Documentation/devicetree/bindings/riscv/tenstorrent.yaml
+F: arch/riscv/boot/dts/tenstorrent/
RISC-V THEAD SoC SUPPORT
M: Drew Fustini <fustini@kernel.org>
diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
index 3b99e91efa25be2d6ca5bc173342c24a72f87187..0624199867065dbb5eb62d660f950b4aa3a7abd7 100644
--- a/arch/riscv/boot/dts/Makefile
+++ b/arch/riscv/boot/dts/Makefile
@@ -8,4 +8,5 @@ subdir-y += sifive
subdir-y += sophgo
subdir-y += spacemit
subdir-y += starfive
+subdir-y += tenstorrent
subdir-y += thead
diff --git a/arch/riscv/boot/dts/tenstorrent/Makefile b/arch/riscv/boot/dts/tenstorrent/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..2c81faaba46235821470b077392ebfebd37ef55a
--- /dev/null
+++ b/arch/riscv/boot/dts/tenstorrent/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_TENSTORRENT) += blackhole-card.dtb
diff --git a/arch/riscv/boot/dts/tenstorrent/blackhole-card.dts b/arch/riscv/boot/dts/tenstorrent/blackhole-card.dts
new file mode 100644
index 0000000000000000000000000000000000000000..c595f7eddcf860d18193d6b18eb4fd1c0c6c684d
--- /dev/null
+++ b/arch/riscv/boot/dts/tenstorrent/blackhole-card.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/dts-v1/;
+
+#include "blackhole.dtsi"
+
+/ {
+ model = "Tenstorrent Blackhole SoC PCIe card";
+ compatible = "tenstorrent,blackhole-card", "tenstorrent,blackhole";
+
+ memory@400030000000 {
+ device_type = "memory";
+ reg = <0x4000 0x30000000 0x1 0x00000000>;
+ };
+};
diff --git a/arch/riscv/boot/dts/tenstorrent/blackhole.dtsi b/arch/riscv/boot/dts/tenstorrent/blackhole.dtsi
new file mode 100644
index 0000000000000000000000000000000000000000..dc6ac953c34b1efeec231b339251058fac5172d5
--- /dev/null
+++ b/arch/riscv/boot/dts/tenstorrent/blackhole.dtsi
@@ -0,0 +1,104 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+// Copyright 2025 Tenstorrent AI ULC
+/dts-v1/;
+
+/ {
+ compatible = "tenstorrent,blackhole";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ cpus {
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ timebase-frequency = <50000000>;
+
+ cpu@0 {
+ compatible = "sifive,x280", "sifive,rocket0", "riscv";
+ device_type = "cpu";
+ reg = <0>;
+ mmu-type = "riscv,sv57";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicsr",
+ "zifencei", "zfh", "zba", "zbb", "sscofpmf";
+ cpu0_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
+ cpu@1 {
+ compatible = "sifive,x280", "sifive,rocket0", "riscv";
+ device_type = "cpu";
+ reg = <1>;
+ mmu-type = "riscv,sv57";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicsr",
+ "zifencei", "zfh", "zba", "zbb", "sscofpmf";
+ cpu1_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
+ cpu@2 {
+ compatible = "sifive,x280", "sifive,rocket0", "riscv";
+ device_type = "cpu";
+ reg = <2>;
+ mmu-type = "riscv,sv57";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicsr",
+ "zifencei", "zfh", "zba", "zbb", "sscofpmf";
+ cpu2_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
+ cpu@3 {
+ compatible = "sifive,x280", "sifive,rocket0", "riscv";
+ device_type = "cpu";
+ reg = <3>;
+ mmu-type = "riscv,sv57";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicsr",
+ "zifencei", "zfh", "zba", "zbb", "sscofpmf";
+ cpu3_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+ };
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "simple-bus";
+ ranges;
+
+ clint0: timer@2000000 {
+ compatible = "tenstorrent,blackhole-clint", "sifive,clint0";
+ reg = <0x0 0x2000000 0x0 0x10000>;
+ interrupts-extended = <&cpu0_intc 0x3>, <&cpu0_intc 0x7>,
+ <&cpu1_intc 0x3>, <&cpu1_intc 0x7>,
+ <&cpu2_intc 0x3>, <&cpu2_intc 0x7>,
+ <&cpu3_intc 0x3>, <&cpu3_intc 0x7>;
+ };
+
+ plic0: interrupt-controller@c000000 {
+ compatible = "tenstorrent,blackhole-plic", "sifive,plic-1.0.0";
+ reg = <0x0 0x0c000000 0x0 0x04000000>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>,
+ <&cpu2_intc 11>, <&cpu2_intc 9>,
+ <&cpu3_intc 11>, <&cpu3_intc 9>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ #address-cells = <0>;
+ riscv,ndev = <128>;
+ };
+ };
+};
--
2.34.1
On 07/10/2025 06:21, Drew Fustini wrote:
> From: Drew Fustini <dfustini@oss.tenstorrent.com>
>
> Add device tree source describing the Tenstorrent Blackhole SoC and the
> Blackhole P100 and P150 PCIe cards. There are no differences between
> the P100 and P150 cards from the perspective of an OS kernel like Linux
> running on the X280 cores.
>
> Link: https://github.com/tenstorrent/tt-isa-documentation/blob/main/BlackholeA0/
> Signed-off-by: Drew Fustini <dfustini@oss.tenstorrent.com>
> ---
> MAINTAINERS | 1 +
> arch/riscv/boot/dts/Makefile | 1 +
> arch/riscv/boot/dts/tenstorrent/Makefile | 2 +
> arch/riscv/boot/dts/tenstorrent/blackhole-card.dts | 14 +++
> arch/riscv/boot/dts/tenstorrent/blackhole.dtsi | 104 +++++++++++++++++++++
> 5 files changed, 122 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 125b5498c3bf8e689adc665fc6e975b05a484abf..b3a2a347f835da952c33b0faf09d560eb1285c32 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21748,6 +21748,7 @@ L: linux-riscv@lists.infradead.org
> S: Maintained
> T: git https://github.com/tenstorrent/linux.git
> F: Documentation/devicetree/bindings/riscv/tenstorrent.yaml
> +F: arch/riscv/boot/dts/tenstorrent/
>
> RISC-V THEAD SoC SUPPORT
> M: Drew Fustini <fustini@kernel.org>
> diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
> index 3b99e91efa25be2d6ca5bc173342c24a72f87187..0624199867065dbb5eb62d660f950b4aa3a7abd7 100644
> --- a/arch/riscv/boot/dts/Makefile
> +++ b/arch/riscv/boot/dts/Makefile
> @@ -8,4 +8,5 @@ subdir-y += sifive
> subdir-y += sophgo
> subdir-y += spacemit
> subdir-y += starfive
> +subdir-y += tenstorrent
> subdir-y += thead
> diff --git a/arch/riscv/boot/dts/tenstorrent/Makefile b/arch/riscv/boot/dts/tenstorrent/Makefile
> new file mode 100644
> index 0000000000000000000000000000000000000000..2c81faaba46235821470b077392ebfebd37ef55a
> --- /dev/null
> +++ b/arch/riscv/boot/dts/tenstorrent/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0
> +dtb-$(CONFIG_ARCH_TENSTORRENT) += blackhole-card.dtb
> diff --git a/arch/riscv/boot/dts/tenstorrent/blackhole-card.dts b/arch/riscv/boot/dts/tenstorrent/blackhole-card.dts
> new file mode 100644
> index 0000000000000000000000000000000000000000..c595f7eddcf860d18193d6b18eb4fd1c0c6c684d
> --- /dev/null
> +++ b/arch/riscv/boot/dts/tenstorrent/blackhole-card.dts
> @@ -0,0 +1,14 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/dts-v1/;
> +
> +#include "blackhole.dtsi"
> +
> +/ {
> + model = "Tenstorrent Blackhole SoC PCIe card";
> + compatible = "tenstorrent,blackhole-card", "tenstorrent,blackhole";
> +
> + memory@400030000000 {
> + device_type = "memory";
> + reg = <0x4000 0x30000000 0x1 0x00000000>;
> + };
> +};
> diff --git a/arch/riscv/boot/dts/tenstorrent/blackhole.dtsi b/arch/riscv/boot/dts/tenstorrent/blackhole.dtsi
> new file mode 100644
> index 0000000000000000000000000000000000000000..dc6ac953c34b1efeec231b339251058fac5172d5
> --- /dev/null
> +++ b/arch/riscv/boot/dts/tenstorrent/blackhole.dtsi
> @@ -0,0 +1,104 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +// Copyright 2025 Tenstorrent AI ULC
> +/dts-v1/;
> +
> +/ {
> + compatible = "tenstorrent,blackhole";
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + cpus {
> + #address-cells = <0x1>;
> + #size-cells = <0x0>;
Cells are not hex. Please use decimal everywhere.
> + timebase-frequency = <50000000>;
> +
> + cpu@0 {
> + compatible = "sifive,x280", "sifive,rocket0", "riscv";
> + device_type = "cpu";
> + reg = <0>;
> + mmu-type = "riscv,sv57";
> + riscv,isa-base = "rv64i";
> + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicsr",
> + "zifencei", "zfh", "zba", "zbb", "sscofpmf";
Blank line
> + cpu0_intc: interrupt-controller {
> + compatible = "riscv,cpu-intc";
> + #interrupt-cells = <1>;
> + interrupt-controller;
> + };
> + };
...
> +
> + plic0: interrupt-controller@c000000 {
> + compatible = "tenstorrent,blackhole-plic", "sifive,plic-1.0.0";
> + reg = <0x0 0x0c000000 0x0 0x04000000>;
> + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
> + <&cpu1_intc 11>, <&cpu1_intc 9>,
> + <&cpu2_intc 11>, <&cpu2_intc 9>,
> + <&cpu3_intc 11>, <&cpu3_intc 9>;
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + #address-cells = <0>;
> + riscv,ndev = <128>;
You should have at least serial or any other interface, otherwise I
don't see how this can be used at this stage.
Best regards,
Krzysztof
On Tue, Oct 07, 2025 at 10:20:43AM +0900, Krzysztof Kozlowski wrote:A
> On 07/10/2025 06:21, Drew Fustini wrote:
> > From: Drew Fustini <dfustini@oss.tenstorrent.com>
> >
> > Add device tree source describing the Tenstorrent Blackhole SoC and the
> > Blackhole P100 and P150 PCIe cards. There are no differences between
> > the P100 and P150 cards from the perspective of an OS kernel like Linux
> > running on the X280 cores.
> >
> > Link: https://github.com/tenstorrent/tt-isa-documentation/blob/main/BlackholeA0/
> > Signed-off-by: Drew Fustini <dfustini@oss.tenstorrent.com>
Thanks for the review.
[snip]
> > + cpus {
> > + #address-cells = <0x1>;
> > + #size-cells = <0x0>;
>
> Cells are not hex. Please use decimal everywhere.
Okay, I'll change.
> > + timebase-frequency = <50000000>;
> > +
> > + cpu@0 {
> > + compatible = "sifive,x280", "sifive,rocket0", "riscv";
> > + device_type = "cpu";
> > + reg = <0>;
> > + mmu-type = "riscv,sv57";
> > + riscv,isa-base = "rv64i";
> > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicsr",
> > + "zifencei", "zfh", "zba", "zbb", "sscofpmf";
>
> Blank line
Ack.
[snip]
>
> You should have at least serial or any other interface, otherwise I
> don't see how this can be used at this stage.
The goal for upstreaming this minimal device tree is to make it possible
to boot mainline kernel builds. I attended the KernelCI workshop after
ELC-EU and learned there are not many RISC-V boards doing boot tests. We
already have Blackhole cards in servers that could be used for CI, so my
goal is to enable mainline to boot on Blackhole.
I had an explanation about the serial console in the cover letter but
I'll change the commit message in this patch for the next rev:
-------------------------------------------------
From: Drew Fustini <dfustini@oss.tenstorrent.com>
Add device tree source describing the Tenstorrent Blackhole SoC and the
Blackhole P100 and P150 PCIe cards. There are no differences between
the P100 and P150 cards from the perspective of an OS kernel like Linux
running on the X280 cores.
There is a virtual UART implemented in OpenSBI firmware that allows a
console program on the PCIe host to communicate through shared memory
with Linux running on the Blackhole card. CONFIG_HVC_RISCV_SBI needs to
be enabled. The boot script on the host adds 'console=hvc0' so that the
full boot output appears in the console program on the host.
Link: https://github.com/tenstorrent/opensbi/
Link: https://github.com/tenstorrent/tt-bh-linux
Signed-off-by: Drew Fustini <dfustini@oss.tenstorrent.com>
-------------------------------------------------
Thanks,
Drew
On Tue, 7 Oct 2025 at 11:50, Krzysztof Kozlowski <krzk@kernel.org> wrote: > You should have at least serial or any other interface, otherwise I > don't see how this can be used at this stage. If you read the cover letter it explains how it is used: > The HVC SBI console is sufficient for boot testing.
On 07/10/2025 11:56, Joel Stanley wrote: > On Tue, 7 Oct 2025 at 11:50, Krzysztof Kozlowski <krzk@kernel.org> wrote: >> You should have at least serial or any other interface, otherwise I >> don't see how this can be used at this stage. > > If you read the cover letter it explains how it is used: We usually do not read cover letters, except when looking for changelog... Commits should stand on their own. > > > The HVC SBI console is sufficient for boot testing. Best regards, Krzysztof
© 2016 - 2025 Red Hat, Inc.