Message ID | 20221125234656.47306-12-samuel@sholland.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4356473wrr; Fri, 25 Nov 2022 15:49:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf61FfJUjqbc1rZ57dk287fZxpQ7AGr/d7CrOVlRbSv6IuE+9IskFJETOelbDxEgojYn77th X-Received: by 2002:a17:902:7682:b0:182:6c84:7ff4 with SMTP id m2-20020a170902768200b001826c847ff4mr31935436pll.25.1669420164159; Fri, 25 Nov 2022 15:49:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669420164; cv=none; d=google.com; s=arc-20160816; b=pr7CY+cweoqSS/mOV44ruKncWxt3D0dzgNEihVtKdb6L+2gwk4A5t0Vp0homz9S105 RVzVoVFRuWe3pGGM2bw4poRUEzJCsB1lcxQTvR0856mHAtUMZ5N3geUUAAWNrxbc859L DaE/CjD+Zy3RAOYxBvdy39YVj4fOqcT1nTMlx6FzqZIGEmBfLb3ck1gCaZ8OflVlKa/2 Mh1o838FMwL+NlMs30GT+oGChrfa9Cp4S3I6asnsjvbfeKmvErQmny+G7phRLznmSj5Y cW4ar7+19HO88yBDfj2eKYeEFGcAMGe6Q/6SBaYBRiJI4XRiaRyh8xQiI9w/q04wvgtV xJaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=jW7hMrs2yRGXm4ZrKeCsDCSPx2KNwLZpuisfRrm55zw=; b=Klkay5XgS1t2R5UG/pgeNwWh1zagRhEaXu/RS462O/dlz1Fg84qErR8arFTt6PQDEL x/aTZKw59QiDTEPm5FMAJclcwuBGcoRdnrzDyOotc+e4UD3+pvgMLdtxjgg2YTVcvHOJ jjXw7BdCArWBzJFL8G9nhZhLnJVgBcrwABt464uX46oVOwlnCX/AGBotjpcD572yMhJC iVY/ri5kRDi2XRX1Bfa47JavQ6cesLeMmhokmENURvJHsNtGQgF9m8XW2+rzGgGMB9cm acYg478P47GdKdikeuzE0Y2yQ0hftdwGu+SAtEbA5sgImd/VXv1evEl74zBu9i6SMY/S zQMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=OeuzKKVN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=UU5loxuN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a655b46000000b00476f2af54f6si6113828pgr.47.2022.11.25.15.49.11; Fri, 25 Nov 2022 15:49:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=OeuzKKVN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=UU5loxuN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbiKYXsQ (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Fri, 25 Nov 2022 18:48:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbiKYXrp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 25 Nov 2022 18:47:45 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3829D5B5BD; Fri, 25 Nov 2022 15:47:18 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A2CDE5C00FF; Fri, 25 Nov 2022 18:47:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 25 Nov 2022 18:47:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1669420037; x=1669506437; bh=jW 7hMrs2yRGXm4ZrKeCsDCSPx2KNwLZpuisfRrm55zw=; b=OeuzKKVNueXBL9qRWe xkukNPLU1E8j9LIRjH5AitYJgKpXdYIZ/4KJF6Ee59NoB1XLhVJD+IZ8hRjNuG2m TWPODTp6GwClWvP8V/BVrBFva9kAOyp1+lJJL5xRGcfbk6c8ga/haW0kU9PVNEB+ Kx3xrvkF93GKAY3PAN7L52BOPNwcCdJs/OBVp000tcUasdt5LIp2QL9vUiEqi93R fYiYhe0O2Wiu4f6nAZ3nE08ia0Lon3OCt0LjwqIrskNL9HNxdyz3f9JWS4D5+QVR uSJwDeXxQVtd2whXjxcWLA1AjrLw6r5Y1LNJzEKY103Q8i3lX7yb4j57yNsTP7TR /0gw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1669420037; x=1669506437; bh=jW7hMrs2yRGXm 4ZrKeCsDCSPx2KNwLZpuisfRrm55zw=; b=UU5loxuNG/twZMBBUxC111manfA76 MGyVRpu7EOUngJRiJePYXZNA0z5lrPHqukJUn94BySc5GKIW0QYJUrPRRo4M6Uyr buKnSz2Fjvk1cIGeIwloYTTJ5yixyVGFeW9cbAU7B6pA3Odtk0MD6nUOn7WLwY+N URZ2bDUsjjcoqEUUKIq2W6jpb5Er5VzUOa5qpBuATjxr74Nslu+OmFkzgvqLO3Tm OEY/JUVvp2pUeSqXv6tCeI518ruk402gC3oHf2/CSIpep1RahrWlDqrw4vGbPk0T imQjo2/bjXD312MSRMy54/L+LmXu8Hb+r2q2dTUv7jGgZTJrINA/EqeiQ== X-ME-Sender: <xms:BVSBY8oniJrbjUlpcGGJBsUo8xJZhy7nj5hYzK6Wm0yuO--KCSg5Ng> <xme:BVSBYyqJ5kH4kaB6OO1uYV0u8aVaIcN_59Ydc9c1AoO-LV8fuhqH9xynIgRI8T-Aj LCu5p-3KGMoL3z4TQ> X-ME-Received: <xmr:BVSBYxN7fASOmEDti3aGwY95LuZXLmePt0_OlMn9FVH2fVQ5v6SV87OLR-8nkZaZVc9WNL_82y1DaJSW3X3gzwJoORi8EpRhz_3Xjsc8lgjdPZKLk_1w9214iUSmOVQLsBelmQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieeigdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeehgfdu feeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: <xmx:BVSBYz7l-vNlG8FPvZN9W0ImRwnB_ciCE3rczOs0l3RsEuiDDm3-Cg> <xmx:BVSBY74TNaEc-kw2TmA-b1vZoKZwOJFzI0OcCwfMBHRvgyL7-jsXCQ> <xmx:BVSBYzi4ZMsmU8Pxh8QwstW8F63Nb4Hi7KauWwqB0MaXXSzUPacc0g> <xmx:BVSBYyJWiVwGJNTMpmR_-ZEV_9RjiJp2gk25ly3LFqU_TbCdmP8Snw> Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Nov 2022 18:47:16 -0500 (EST) From: Samuel Holland <samuel@sholland.org> To: Chen-Yu Tsai <wens@csie.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, linux-sunxi@lists.linux.dev, Palmer Dabbelt <palmer@dabbelt.com>, Conor Dooley <conor@kernel.org>, linux-riscv@lists.infradead.org Cc: devicetree@vger.kernel.org, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Heiko Stuebner <heiko@sntech.de>, Jisheng Zhang <jszhang@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andre Przywara <andre.przywara@arm.com>, Samuel Holland <samuel@sholland.org>, Albert Ou <aou@eecs.berkeley.edu>, Anup Patel <apatel@ventanamicro.com>, Atish Patra <atishp@rivosinc.com>, Christian Hewitt <christianshewitt@gmail.com>, Conor Dooley <conor.dooley@microchip.com>, Guo Ren <guoren@kernel.org>, Heinrich Schuchardt <heinrich.schuchardt@canonical.com>, Linus Walleij <linus.walleij@linaro.org>, Paul Walmsley <paul.walmsley@sifive.com>, Stanislav Jakubek <stano.jakubek@gmail.com> Subject: [PATCH v2 11/12] riscv: Add the Allwinner SoC family Kconfig option Date: Fri, 25 Nov 2022 17:46:55 -0600 Message-Id: <20221125234656.47306-12-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221125234656.47306-1-samuel@sholland.org> References: <20221125234656.47306-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750513918096258632?= X-GMAIL-MSGID: =?utf-8?q?1750513918096258632?= |
Series |
riscv: Allwinner D1/D1s platform support
|
|
Commit Message
Samuel Holland
Nov. 25, 2022, 11:46 p.m. UTC
Allwinner manufactures the sunxi family of application processors. This includes the "sun8i" series of ARMv7 SoCs, the "sun50i" series of ARMv8 SoCs, and now the "sun20i" series of 64-bit RISC-V SoCs. The first SoC in the sun20i series is D1, containing a single T-HEAD C906 core. D1s is a low-pin-count variant of D1 with co-packaged DRAM. Most peripherals are shared across the entire chip family. In fact, the ARMv7 T113 SoC is pin-compatible and almost entirely register-compatible with the D1s. This means many existing device drivers can be reused. To facilitate this reuse, name the symbol ARCH_SUNXI, since that is what the existing drivers have as their dependency. Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Samuel Holland <samuel@sholland.org> --- Changes in v2: - Sort Kconfig as if we had done s/SOC_/ARCH_/ for future-proofing arch/riscv/Kconfig.socs | 9 +++++++++ 1 file changed, 9 insertions(+)
Comments
Reviewed-by: Guo Ren <guoren@kernel.org> On Sat, Nov 26, 2022 at 7:47 AM Samuel Holland <samuel@sholland.org> wrote: > > Allwinner manufactures the sunxi family of application processors. This > includes the "sun8i" series of ARMv7 SoCs, the "sun50i" series of ARMv8 > SoCs, and now the "sun20i" series of 64-bit RISC-V SoCs. > > The first SoC in the sun20i series is D1, containing a single T-HEAD > C906 core. D1s is a low-pin-count variant of D1 with co-packaged DRAM. > > Most peripherals are shared across the entire chip family. In fact, the > ARMv7 T113 SoC is pin-compatible and almost entirely register-compatible > with the D1s. > > This means many existing device drivers can be reused. To facilitate > this reuse, name the symbol ARCH_SUNXI, since that is what the existing > drivers have as their dependency. > > Reviewed-by: Heiko Stuebner <heiko@sntech.de> > Tested-by: Heiko Stuebner <heiko@sntech.de> > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > > Changes in v2: > - Sort Kconfig as if we had done s/SOC_/ARCH_/ for future-proofing > > arch/riscv/Kconfig.socs | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs > index 69774bb362d6..4c1dc2ca11f9 100644 > --- a/arch/riscv/Kconfig.socs > +++ b/arch/riscv/Kconfig.socs > @@ -26,6 +26,15 @@ config SOC_STARFIVE > help > This enables support for StarFive SoC platform hardware. > > +config ARCH_SUNXI > + bool "Allwinner sun20i SoCs" > + select ERRATA_THEAD if MMU && !XIP_KERNEL > + select SIFIVE_PLIC > + select SUN4I_TIMER > + help > + This enables support for Allwinner sun20i platform hardware, > + including boards based on the D1 and D1s SoCs. > + > config SOC_VIRT > bool "QEMU Virt Machine" > select CLINT_TIMER if RISCV_M_MODE > -- > 2.37.4 >
On Fri, Nov 25, 2022 at 05:46:55PM -0600, Samuel Holland wrote: > Allwinner manufactures the sunxi family of application processors. This > includes the "sun8i" series of ARMv7 SoCs, the "sun50i" series of ARMv8 > SoCs, and now the "sun20i" series of 64-bit RISC-V SoCs. > > The first SoC in the sun20i series is D1, containing a single T-HEAD > C906 core. D1s is a low-pin-count variant of D1 with co-packaged DRAM. > > Most peripherals are shared across the entire chip family. In fact, the > ARMv7 T113 SoC is pin-compatible and almost entirely register-compatible > with the D1s. > > This means many existing device drivers can be reused. To facilitate > this reuse, name the symbol ARCH_SUNXI, since that is what the existing > drivers have as their dependency. > > Reviewed-by: Heiko Stuebner <heiko@sntech.de> > Tested-by: Heiko Stuebner <heiko@sntech.de> > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > > Changes in v2: > - Sort Kconfig as if we had done s/SOC_/ARCH_/ for future-proofing > > arch/riscv/Kconfig.socs | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs > index 69774bb362d6..4c1dc2ca11f9 100644 > --- a/arch/riscv/Kconfig.socs > +++ b/arch/riscv/Kconfig.socs > @@ -26,6 +26,15 @@ config SOC_STARFIVE > help > This enables support for StarFive SoC platform hardware. > > +config ARCH_SUNXI > + bool "Allwinner sun20i SoCs" > + select ERRATA_THEAD if MMU && !XIP_KERNEL Does this need to have the if MMU? I thought it only needed the !XIP_KERNEL since the PMU errata does not depend on MMU. Or have a missed some patch elsewhere that'll change that? > + select SIFIVE_PLIC This is v6.3 material right? One of the things that should be going for v6.3 is all of these select SIFIVE_PLICs. Palmer suggested putting up an immutable branch for any of that cleanup that intersects with new platforms, so I'll probably send one out at some stage. Thanks, Conor. > + select SUN4I_TIMER > + help > + This enables support for Allwinner sun20i platform hardware, > + including boards based on the D1 and D1s SoCs. > + > config SOC_VIRT > bool "QEMU Virt Machine" > select CLINT_TIMER if RISCV_M_MODE > -- > 2.37.4 >
Am Sonntag, 27. November 2022, 12:31:15 CET schrieb Guo Ren: > On Sun, Nov 27, 2022 at 12:36 AM Conor Dooley <conor@kernel.org> wrote: > > > > On Fri, Nov 25, 2022 at 05:46:55PM -0600, Samuel Holland wrote: > > > Allwinner manufactures the sunxi family of application processors. This > > > includes the "sun8i" series of ARMv7 SoCs, the "sun50i" series of ARMv8 > > > SoCs, and now the "sun20i" series of 64-bit RISC-V SoCs. > > > > > > The first SoC in the sun20i series is D1, containing a single T-HEAD > > > C906 core. D1s is a low-pin-count variant of D1 with co-packaged DRAM. > > > > > > Most peripherals are shared across the entire chip family. In fact, the > > > ARMv7 T113 SoC is pin-compatible and almost entirely register-compatible > > > with the D1s. > > > > > > This means many existing device drivers can be reused. To facilitate > > > this reuse, name the symbol ARCH_SUNXI, since that is what the existing > > > drivers have as their dependency. > > > > > > Reviewed-by: Heiko Stuebner <heiko@sntech.de> > > > Tested-by: Heiko Stuebner <heiko@sntech.de> > > > Signed-off-by: Samuel Holland <samuel@sholland.org> > > > --- > > > > > > Changes in v2: > > > - Sort Kconfig as if we had done s/SOC_/ARCH_/ for future-proofing > > > > > > arch/riscv/Kconfig.socs | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > > > > > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs > > > index 69774bb362d6..4c1dc2ca11f9 100644 > > > --- a/arch/riscv/Kconfig.socs > > > +++ b/arch/riscv/Kconfig.socs > > > @@ -26,6 +26,15 @@ config SOC_STARFIVE > > > help > > > This enables support for StarFive SoC platform hardware. > > > > > > +config ARCH_SUNXI > > > + bool "Allwinner sun20i SoCs" > > > + select ERRATA_THEAD if MMU && !XIP_KERNEL > > depend on MMU > depend on !XIP_KERNEL > select ERRATA_THEAD That sounds like a better variant. The D1 / C906 _needs_ the errata for the memory handling and the other alternative constraints require the !XIP With the select, a xip-kernel would not boot at all on a D1 Heiko
diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs index 69774bb362d6..4c1dc2ca11f9 100644 --- a/arch/riscv/Kconfig.socs +++ b/arch/riscv/Kconfig.socs @@ -26,6 +26,15 @@ config SOC_STARFIVE help This enables support for StarFive SoC platform hardware. +config ARCH_SUNXI + bool "Allwinner sun20i SoCs" + select ERRATA_THEAD if MMU && !XIP_KERNEL + select SIFIVE_PLIC + select SUN4I_TIMER + help + This enables support for Allwinner sun20i platform hardware, + including boards based on the D1 and D1s SoCs. + config SOC_VIRT bool "QEMU Virt Machine" select CLINT_TIMER if RISCV_M_MODE