[PATCH] riscv: dts: Add the device tree of the XiangShan platform's nanhu soc
Krzysztof Kozlowski
krzk at kernel.org
Wed Jul 16 22:57:30 PDT 2025
On 17/07/2025 04:36, 秦少青 wrote:
>
>
> This patch adds the device tree support for the XiangShan platform's nanhu soc
Please read submitting patches document. It will also tell you which
tools you must also run.
>
> Signed-off-by: qinshaoqing <qinshaoqing at bosc.ac.cn>
> ---
> arch/riscv/Kconfig.socs | 5 +
> arch/riscv/boot/dts/Makefile | 1 +
> arch/riscv/boot/dts/xiangshan/Makefile | 2 +
> arch/riscv/boot/dts/xiangshan/nanhu-v3a.dts | 226 ++++++++++++++++++++
> 4 files changed, 234 insertions(+)
> create mode 100644 arch/riscv/boot/dts/xiangshan/Makefile
> create mode 100644 arch/riscv/boot/dts/xiangshan/nanhu-v3a.dts
>
> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> index f51bb24bc84c..89c80fd493fb 100644
> --- a/arch/riscv/Kconfig.socs
> +++ b/arch/riscv/Kconfig.socs
> @@ -80,4 +80,9 @@ config SOC_CANAAN_K210
> help
> This enables support for Canaan Kendryte K210 SoC platform hardware.
>
> +config SOC_XIANGSHAN
> + bool "XiangShan SoCs"
> + help
> + This enables support for XiangShan SoC platform hardware
> +
> endmenu # "SoC selection"
> diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
> index fdae05bbf556..43a79cc9dd7c 100644
> --- a/arch/riscv/boot/dts/Makefile
> +++ b/arch/riscv/boot/dts/Makefile
> @@ -7,5 +7,6 @@ subdir-y += sifive
> subdir-y += sophgo
> subdir-y += starfive
> subdir-y += thead
> +subdir-y += xiangshan
>
> obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
> diff --git a/arch/riscv/boot/dts/xiangshan/Makefile b/arch/riscv/boot/dts/xiangshan/Makefile
> new file mode 100644
> index 000000000000..41e585490a97
> --- /dev/null
> +++ b/arch/riscv/boot/dts/xiangshan/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0
> +dtb-$(CONFIG_SOC_XIANGSHAN) += nanhu-v3a.dtb
> diff --git a/arch/riscv/boot/dts/xiangshan/nanhu-v3a.dts b/arch/riscv/boot/dts/xiangshan/nanhu-v3a.dts
> new file mode 100644
> index 000000000000..560de7c7f22e
> --- /dev/null
> +++ b/arch/riscv/boot/dts/xiangshan/nanhu-v3a.dts
> @@ -0,0 +1,226 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/* Copyright (c) 2024-2025 BOSC */
> +
> +/dts-v1/;
> +
> +/ {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + compatible = "bosc,nanhu-v3a";
Please follow kernel and DTS coding style.
Once you fix all the warnings, please paste dtbs_check W=1 report.
Best regards,
Krzysztof
More information about the linux-riscv
mailing list