devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: qin shaoqing <qinshaoqing076@gmail.com>,
	paul.walmsley@sifive.com, palmer@dabbelt.com,
	aou@eecs.berkeley.edu, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	wangran@bosc.ac.cn
Subject: Re: [PATCH] riscv: dts: Add the device tree of the XiangShan platform's nanhu soc
Date: Fri, 3 Jan 2025 10:01:50 +0100	[thread overview]
Message-ID: <44f9ead7-16c7-4437-910d-94ad7e7728f0@kernel.org> (raw)
In-Reply-To: <CAMq-bRkwJzn-_rvwreWU646Q64ZP-X61sczA5EG2Nubo9GN0Lw@mail.gmail.com>

On 03/01/2025 09:48, qin shaoqing wrote:
> This patch adds the device tree support for the XiangShan platform's nanhu soc

Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597


> 
> Signed-off-by: qinshaoqing <qinshaoqing@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) 2023-2024 BOSC */
> +
> +/dts-v1/;
> +
> +/ {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + compatible = "bosc,nanhu-v3a";

Please run scripts/checkpatch.pl and fix reported warnings. After that,
run also `scripts/checkpatch.pl --strict` and (probably) fix more
warnings. Some warnings can be ignored, especially from --strict run,
but the code here looks like it needs a fix. Feel free to get in touch
if the warning is not clear.

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Maybe you need to update your dtschema and yamllint. Don't rely on
distro packages for dtschema and be sure you are using the latest
released dtschema.


> +
> + cpus {
> +  #address-cells = <1>;
> +  #size-cells = <0>;
> +  timebase-frequency = <24000000>;

Your patch is corrupted or code is just wrong style. Impossible to review.

Please follow DTS and kernel coding style documents.

Best regards,
Krzysztof

  reply	other threads:[~2025-01-03  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03  8:48 [PATCH] riscv: dts: Add the device tree of the XiangShan platform's nanhu soc qin shaoqing
2025-01-03  9:01 ` Krzysztof Kozlowski [this message]
     [not found] <20250103063040.10817-1-qshaoqing926@163.com>
     [not found] ` <2c75df56-fb55-4dd3-ac63-518233e61c8f.qinshaoqing@bosc.ac.cn>
2025-07-17  2:36   ` 秦少青
2025-07-17  5:57     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44f9ead7-16c7-4437-910d-94ad7e7728f0@kernel.org \
    --to=krzk@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=qinshaoqing076@gmail.com \
    --cc=robh@kernel.org \
    --cc=wangran@bosc.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).