From: Conor Dooley <conor@kernel.org>
To: Chen Wang <unicornxw@gmail.com>
Cc: aou@eecs.berkeley.edu, chao.wei@sophgo.com,
devicetree@vger.kernel.org, guoren@kernel.org,
jszhang@kernel.org, krzysztof.kozlowski+dt@linaro.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org,
xiaoguang.xing@sophgo.com, apatel@ventanamicro.com,
Inochi Amaoto <inochiama@outlook.com>,
Chen Wang <wangchen20@iscas.ac.cn>
Subject: Re: [PATCH v3 09/11] riscv: dts: add initial Sophgo SG2042 SoC device tree
Date: Wed, 27 Sep 2023 17:07:21 +0100 [thread overview]
Message-ID: <20230927-alone-unknown-ae3f2f79378e@spud> (raw)
In-Reply-To: <e71955fb3a7bb9ed9b6cab0cc81fd60d05d3310a.1695804418.git.unicornxw@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3678 bytes --]
Hey,
On Wed, Sep 27, 2023 at 05:02:26PM +0800, Chen Wang wrote:
> Milk-V Pioneer motherboard is powered by SG2042.
>
> SG2042 is server grade chip with high performance, low power
> consumption and high data throughput.
> Key features:
> - 64 RISC-V cpu cores
> - 4 cores per cluster, 16 clusters on chip
> - More info is available at [1].
>
> Link: https://en.sophgo.com/product/introduce/sg2042.html [1]
Link: tags go into the signoff/trailers block below.
> Currently only support booting into console with only uart,
> other features will be added soon later.
>
> Reviewed-by: Guo Ren <guoren@kernel.org>
> Acked-by: Chao Wei <chao.wei@sophgo.com>
> Co-developed-by: Xiaoguang Xing <xiaoguang.xing@sophgo.com>
> Signed-off-by: Xiaoguang Xing <xiaoguang.xing@sophgo.com>
> Co-developed-by: Inochi Amaoto <inochiama@outlook.com>
> Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
> Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
> Signed-off-by: Chen Wang <unicornxw@gmail.com>
> ---
> MAINTAINERS | 1 +
> arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi | 1880 +++++++++++++++++++
> arch/riscv/boot/dts/sophgo/sg2042.dtsi | 325 ++++
> 3 files changed, 2206 insertions(+)
> create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi
> create mode 100644 arch/riscv/boot/dts/sophgo/sg2042.dtsi
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 3fed8e3d273f..08f8fabb54b1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -20067,6 +20067,7 @@ SOPHGO DEVICETREES
> M: Chao Wei <chao.wei@sophgo.com>
> M: Chen Wang <unicornxw@gmail.com>
> S: Maintained
> +F: arch/riscv/boot/dts/sophgo/
> F: Documentation/devicetree/bindings/interrupt-controller/sophgo,sg2042-clint-mswi.yaml
> F: Documentation/devicetree/bindings/riscv/sophgo.yaml
> F: Documentation/devicetree/bindings/timer/sophgo,sg2042-clint-mtimer.yaml
> diff --git a/arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi b/arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi
> new file mode 100644
> index 000000000000..d2348acea527
> --- /dev/null
> +++ b/arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi
> @@ -0,0 +1,1880 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +/*
> + * Copyright (C) 2022 Sophgo Technology Inc. All rights reserved.
> + */
> +
> +/*
> + * c920 declares "rv64gcv", but the version of it's v-ext
> + * is 0.7.1. It's not supported by kernel so we remove "v".
> + */
This is incorrect, v needs to be removed because the version of vector
does not match that in the ratified standard, as defined by the
dt-binding. Even if the comment was correct, it'd be a statement of
the obvious and should be removed.
> +#define ISA_BASE "rv64i"
> +#define ISA_EXTENSIONS \
> + "i", "m", "a", "f", "d", "c", "zicntr", "zicsr", "zifencei", "zihpm"
Why do these as macros but leave the riscv,isa property not as one? TBH,
I'd rather these were not macros to make my life easier while grepping
through stuff etc.
Cheers,
Conor.
> + cpu0: cpu@0 {
> + compatible = "thead,c920", "riscv";
> + device_type = "cpu";
> + riscv,isa = "rv64imafdc";
> + riscv,isa-base = ISA_BASE;
> + riscv,isa-extensions = ISA_EXTENSIONS;
> + reg = <0>;
> + i-cache-block-size = <64>;
> + i-cache-size = <65536>;
> + i-cache-sets = <512>;
> + d-cache-block-size = <64>;
> + d-cache-size = <65536>;
> + d-cache-sets = <512>;
> + next-level-cache = <&l2_cache0>;
> + mmu-type = "riscv,sv39";
> +
> + cpu0_intc: interrupt-controller {
> + compatible = "riscv,cpu-intc";
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + };
> + };
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-09-27 16:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 8:54 [PATCH v3 00/11] Add Milk-V Pioneer RISC-V board support Chen Wang
2023-09-27 8:58 ` [PATCH v3 01/11] riscv: Add SOPHGO SOC family Kconfig support Chen Wang
2023-09-27 9:00 ` [PATCH v3 02/11] dt-bindings: vendor-prefixes: add milkv/sophgo Chen Wang
2023-09-27 9:00 ` [PATCH v3 03/11] dt-bindings: riscv: add sophgo sg2042 bindings Chen Wang
2023-09-27 9:01 ` [PATCH v3 04/11] dt-bindings: riscv: Add T-HEAD C920 compatibles Chen Wang
2023-09-27 9:01 ` [PATCH v3 05/11] dt-bindings: interrupt-controller: Add Sophgo SG2042 PLIC Chen Wang
2023-09-27 9:01 ` [PATCH v3 06/11] dt-bindings: timer: Add Sophgo sg2042 CLINT timer Chen Wang
2023-09-27 16:01 ` Conor Dooley
2023-09-28 0:34 ` Inochi Amaoto
2023-09-28 6:27 ` Conor Dooley
2023-09-28 8:24 ` Inochi Amaoto
2023-09-28 9:03 ` Conor Dooley
2023-09-28 9:39 ` Inochi Amaoto
2023-09-28 9:55 ` Conor Dooley
2023-09-27 9:01 ` [PATCH v3 07/11] dt-bindings: interrupt-controller: Add Sophgo sg2042 CLINT mswi Chen Wang
2023-09-27 16:01 ` Conor Dooley
2023-09-27 9:02 ` [PATCH v3 08/11] MAINTAINERS: add two files to sophgo devicetrees entry Chen Wang
2023-09-27 9:02 ` [PATCH v3 09/11] riscv: dts: add initial Sophgo SG2042 SoC device tree Chen Wang
2023-09-27 16:07 ` Conor Dooley [this message]
2023-09-27 9:02 ` [PATCH v3 10/11] riscv: dts: sophgo: add Milk-V Pioneer board " Chen Wang
2023-09-27 9:02 ` [PATCH v3 11/11] riscv: defconfig: enable SOPHGO SoC Chen Wang
2023-09-27 16:09 ` [PATCH v3 00/11] Add Milk-V Pioneer RISC-V board support Conor Dooley
2023-09-27 23:39 ` Chen Wang
2023-09-28 7:48 ` Chen Wang
2023-09-28 7:54 ` Conor Dooley
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=20230927-alone-unknown-ae3f2f79378e@spud \
--to=conor@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=chao.wei@sophgo.com \
--cc=devicetree@vger.kernel.org \
--cc=guoren@kernel.org \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=unicornxw@gmail.com \
--cc=wangchen20@iscas.ac.cn \
--cc=xiaoguang.xing@sophgo.com \
/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).