[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230927-alone-unknown-ae3f2f79378e@spud>
Date: Wed, 27 Sep 2023 17:07:21 +0100
From: Conor Dooley <conor@...nel.org>
To: Chen Wang <unicornxw@...il.com>
Cc: aou@...s.berkeley.edu, chao.wei@...hgo.com,
devicetree@...r.kernel.org, guoren@...nel.org, jszhang@...nel.org,
krzysztof.kozlowski+dt@...aro.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, palmer@...belt.com,
paul.walmsley@...ive.com, robh+dt@...nel.org,
xiaoguang.xing@...hgo.com, apatel@...tanamicro.com,
Inochi Amaoto <inochiama@...look.com>,
Chen Wang <wangchen20@...as.ac.cn>
Subject: Re: [PATCH v3 09/11] riscv: dts: add initial Sophgo SG2042 SoC
device tree
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@...nel.org>
> Acked-by: Chao Wei <chao.wei@...hgo.com>
> Co-developed-by: Xiaoguang Xing <xiaoguang.xing@...hgo.com>
> Signed-off-by: Xiaoguang Xing <xiaoguang.xing@...hgo.com>
> Co-developed-by: Inochi Amaoto <inochiama@...look.com>
> Signed-off-by: Inochi Amaoto <inochiama@...look.com>
> Signed-off-by: Chen Wang <wangchen20@...as.ac.cn>
> Signed-off-by: Chen Wang <unicornxw@...il.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@...hgo.com>
> M: Chen Wang <unicornxw@...il.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>;
> + };
> + };
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists