Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2705347rdh; Wed, 27 Sep 2023 10:08:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGi77jzEwWfK+LebwZYp0L+mNTR60iTGvemB2lUzRKxlSEwjMwauSEjTiORd0uIjY8Q1GNm X-Received: by 2002:a05:6358:6f08:b0:135:99fa:5040 with SMTP id r8-20020a0563586f0800b0013599fa5040mr2465429rwn.12.1695834483160; Wed, 27 Sep 2023 10:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695834483; cv=none; d=google.com; s=arc-20160816; b=h5MdCsaBiIDCosQtEjc2L5N7y3ZIQG/2IWN1UqxqKESxWx3c4xlTBTPhfPAEoO5RvC GKc+F3y+/BJLVI24i/vGdJN5ztokRjVDSx3fLwPN5CQsczVqGj2FP81425dTAgbb5RHP jbSY0x9+CXrh6hMTHszXHebIRdzvj4SGIMeIiFm8Uw+W4s27bm7Fpa+loaGQ6ZzKDwGM e8WewaQHLtMyq40Uub+PSiMjhzpNZwYWl4JI8vGo6z8O7dwIawmYY886hNfe+XdDV7Ms pY+n1mHSrTgjoESSo/863ylGwS+rsF8gnRAIndUSunFFHg1OtAMP8HrvTQgO+I/J11BO VSOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=A+7lwym+XQMIXzYnyJfpRFqKTJLGD40WvzvFbGFbf/o=; fh=hqWmibN7CNfRi2cuFps1G/txHS2UJ80/DBWiR+Fa1PM=; b=ZSubJXtF5mP+P0RpgOSYWWq8qJ/X/baz5JfSAmlnVwYH0VThtIwNajXyYxR72IGg0S HxR7Dxudwy1QTZkHAKMlYe8HcsCcRPhf/g9Ow4xr9JYWWvyLIA29qsR4wrLZKgnCWHgt 7y6P4uZt+lS0Upml1cdnse6VE9Kakis/jqo9RLlQlFIvzCm3VtjxUfMZPZJoYcfFCoZY yTgjRW0Ow0lI9AtnFvEfNTBrXt1N6s/A4jV9VS0Mrv7gsbH12+HHmq8GPw0eQU00aM+0 zwq+KCjwdx8JqVt3s7UEKZoj7C6tH417rVYB7uHjrADXOXf+UZrgThuIza07fu28B5Se jqYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YLiMB/CF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q83-20020a632a56000000b005702257f32esi15418519pgq.185.2023.09.27.10.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 10:08:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YLiMB/CF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id C7AB08062906; Wed, 27 Sep 2023 09:07:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbjI0QHa (ORCPT + 99 others); Wed, 27 Sep 2023 12:07:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbjI0QH2 (ORCPT ); Wed, 27 Sep 2023 12:07:28 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 960F091 for ; Wed, 27 Sep 2023 09:07:27 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27CADC433C8; Wed, 27 Sep 2023 16:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695830847; bh=vREQr+TR53h6caEkfQ4IrnqEtO45twz+uZ9hCc2obu0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YLiMB/CF/b7ES5Ch2rtb1yTyMNVz4fc6XLByrXzpRVoo3XAVJ/3Dp276EU2D+aXjW cBTYq16kabwv0jrrygFKoBIdQ2vLK+XShJ1LjYEmVXRU3y/M9MSwmD6YWM8PQ2yRZJ KCQOyk7kwcBLWNjaKBqrqd/fc6AnqZdntyN86zqCOgknH9HgKJTIBhX2eMwEp7V8gH aeUXHWoKgGh4TpBOYrSiuA7dWIoVN6LzvdpxIwGALhl16LteDgrnhofQNZmCuvwBjC wF8JwC3B4uWk/1Y4aR/mj+gNC1RjeTF1QVduJA25Rs4sYAHmxuSw04TSAnkfV8VAta pMvchpJ7Fdjwg== Date: Wed, 27 Sep 2023 17:07:21 +0100 From: Conor Dooley To: Chen Wang 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 , Chen Wang Subject: Re: [PATCH v3 09/11] riscv: dts: add initial Sophgo SG2042 SoC device tree Message-ID: <20230927-alone-unknown-ae3f2f79378e@spud> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="U5cY2nKFUhtXEW0P" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 27 Sep 2023 09:07:39 -0700 (PDT) --U5cY2nKFUhtXEW0P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Wed, Sep 27, 2023 at 05:02:26PM +0800, Chen Wang wrote: > Milk-V Pioneer motherboard is powered by SG2042. >=20 > 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]. >=20 > 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. >=20 > Reviewed-by: Guo Ren > Acked-by: Chao Wei > Co-developed-by: Xiaoguang Xing > Signed-off-by: Xiaoguang Xing > Co-developed-by: Inochi Amaoto > Signed-off-by: Inochi Amaoto > Signed-off-by: Chen Wang > Signed-off-by: Chen Wang > --- > 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 >=20 > diff --git a/MAINTAINERS b/MAINTAINERS > index 3fed8e3d273f..08f8fabb54b1 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -20067,6 +20067,7 @@ SOPHGO DEVICETREES > M: Chao Wei > M: Chen Wang > 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.ya= ml > diff --git a/arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi b/arch/riscv/boo= t/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 =3D "thead,c920", "riscv"; > + device_type =3D "cpu"; > + riscv,isa =3D "rv64imafdc"; > + riscv,isa-base =3D ISA_BASE; > + riscv,isa-extensions =3D ISA_EXTENSIONS; > + reg =3D <0>; > + i-cache-block-size =3D <64>; > + i-cache-size =3D <65536>; > + i-cache-sets =3D <512>; > + d-cache-block-size =3D <64>; > + d-cache-size =3D <65536>; > + d-cache-sets =3D <512>; > + next-level-cache =3D <&l2_cache0>; > + mmu-type =3D "riscv,sv39"; > + > + cpu0_intc: interrupt-controller { > + compatible =3D "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells =3D <1>; > + }; > + }; --U5cY2nKFUhtXEW0P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZRRTOQAKCRB4tDGHoIJi 0tuuAQDLkuOIMgSTkDqdEzlhV9cUgxCWJjvRW7p6NMKaLb+4lQD+POy4IPtSAsle sg4/VmVfMhRWEOlHvRoHAU1jS+TgNwQ= =xdKV -----END PGP SIGNATURE----- --U5cY2nKFUhtXEW0P--