Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1932615rwd; Thu, 18 May 2023 21:04:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6QMXBGhI1Y010lwub9zrOgpvoSQlRcI4cdrw7Ru+JfykZl22uf2DCj3NEjZIOZv3FzV1rJ X-Received: by 2002:a05:6a00:1988:b0:64d:2c58:f881 with SMTP id d8-20020a056a00198800b0064d2c58f881mr1505653pfl.17.1684469088975; Thu, 18 May 2023 21:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684469088; cv=none; d=google.com; s=arc-20160816; b=jPBMDS8H/V7mQbJwYm5D46n6qOPOWKa9e3u0kg/x2ry3U/Qo04DyjAux+yP+LMp1kB Iyydmsn9vuMbiYH70N9BIfi7g1qVuUQlrcVGLRTVdIkZkXDoQ56wI1XbEOEt0Dh0LPX2 2ziUvdxVoyh4mwNsu3dxEZYq6WLRZY+lx8cTl7Hs/KRhP+Zoc3DFcZyZRyrOvwHh8sB6 OBbV7iyA3VUVlbb4ww8ocwJmJsPYKdz4gUSlPbSQp79cfDTU4pTGeQOH30rTP5K4rRXt 0+HAor7z46oh3xK89sfI2j1ymwLMpTp8F68NzZDdK1K1aa1hFBRbOexjdBPIhv6uSUkf CwXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:feedback-id:dkim-signature:dkim-signature; bh=Po/ogvPWUOXjRWtD3eSRZTMYszH7hxYjNm1SSZFz8Ag=; b=J9xjWEex6XX9RQjqJUX1LAH0PVgZ5Gpi5t8PKa8YifFZ8q+auFpDSlzzA5pl87e1JV dpBlpQHiSFd+ZSfmBl1tj0pnniHpW6+BERVry6ftOLySD5kyy372NrfdYX0BrjMv+zAd +p4xrBiRd+X4YcgnQFhYmfmUSFdST3Xuh9O/HqtfXNzw3x2OlOu8cfRSVcH419joeHRj 3Fu3HYD49m9hEcJfJVwThLPwdlnKH7AYxBsABgkTQ6NlJbKGPGSgNAzqTPOepK+1lM1m 7n5AlIwA6AN8bf2tKwxvRxAC4a07MctUYnpDLtb/QV5k1SBSXQQPATbnn3Fd4ocWCVww dXPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=A0R0m+TS; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=n+V2uXd6; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a29-20020aa794bd000000b0063c56e46f9esi3198227pfl.294.2023.05.18.21.04.36; Thu, 18 May 2023 21:04:48 -0700 (PDT) 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=A0R0m+TS; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=n+V2uXd6; 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 S229643AbjESDbo (ORCPT + 99 others); Thu, 18 May 2023 23:31:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjESDbm (ORCPT ); Thu, 18 May 2023 23:31:42 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAC0012F; Thu, 18 May 2023 20:31:41 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9FAA332007D7; Thu, 18 May 2023 23:31:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 18 May 2023 23:31:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:content-type:content-type: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= 1684467097; x=1684553497; bh=Po/ogvPWUOXjRWtD3eSRZTMYszH7hxYjNm1 SSZFz8Ag=; b=A0R0m+TSMqktHrkPrL9VqAT3f4aINfWvUXypjlxWTDx6o1QY+vM WLi8SlvdHxvtXzqUtaIVznbwomt3JX2/k5tde3bKkZDM1WpxLJMtyVvYHPuRlQRy ghISHthfBF+22z4nihxbKYAJ3A22uWF1GmZc5Y1xGCeIWCmirqlIHbZNXWBGKK68 67ZuvbAQOC+GSzo1a3dHo3KJhYO9AW0pJz2RKZbkLyMxmj6bN+YdxvjEFCh+e8Ma vxeW39/Hgk7RPC2un7r40jimbb828m4Osdx/Wr4w5fRQOycCHcqt/K+oDgsVI6Cs ABuxm6LL9RAoOXZR9+bqbxlj8FybWFD8Vvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type: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= 1684467097; x=1684553497; bh=Po/ogvPWUOXjRWtD3eSRZTMYszH7hxYjNm1 SSZFz8Ag=; b=n+V2uXd6XU9+8SwnC3Wd8UEeF0CsUodCgjU2IRdzaqnaKeCJP2F DrhigMLjcoBlyoLJRKk9cl15JuNzBG5gVqAliuHavCyFiTI6Koh621of5+HHbp8q hPpQEalIl5faa6SokhJcnCDgXOjXgsKdwtE+crYLDhsgLPXH1i8IauDB4nChk0b/ mk3QaapXq0bCW63rFVvRlHpsnpgy3/lOxaXOXqCxSVwyDWVp7ggBZpeQ4h6LzXdq poRhGcq3bSUIvmnjXwnNDpreikmpVZ1qRwVW8xiT/gf4i10HWjPidUcJymKdkAhw Y7uBsKLKhHPlK4HfmNhGsOZXdil6WpxsoAQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeigedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfvfevfhfhufgjtgfgsehtjeertddtfeejnecuhfhrohhmpefurghm uhgvlhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenuc ggtffrrghtthgvrhhnpeekheegueeiteeghfehvefgkeefgefhtefhgfdukeekueffkeei fefhffeliedtfeenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgpdhgihhthh husgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 May 2023 23:31:35 -0400 (EDT) Message-ID: Date: Thu, 18 May 2023 22:31:35 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux ppc64le; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: Jisheng Zhang , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, Palmer Dabbelt , Conor Dooley , Thomas Gleixner , Marc Zyngier , Palmer Dabbelt , Paul Walmsley , Albert Ou , Greg Kroah-Hartman , Jiri Slaby References: <20230518152244.2178-1-jszhang@kernel.org> <20230518152244.2178-7-jszhang@kernel.org> From: Samuel Holland Subject: Re: [PATCH v4 06/10] dt-bindings: riscv: Add bouffalolab bl808 board compatibles In-Reply-To: <20230518152244.2178-7-jszhang@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jisheng, DT maintainers, On 5/18/23 10:22, Jisheng Zhang wrote: > Several SoMs and boards are available that feature the Bouffalolab > bl808 SoC. Document the compatible strings. > > Signed-off-by: Jisheng Zhang > Acked-by: Palmer Dabbelt > Reviewed-by: Conor Dooley > --- > .../bindings/riscv/bouffalolab.yaml | 29 +++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100644 Documentation/devicetree/bindings/riscv/bouffalolab.yaml > > diff --git a/Documentation/devicetree/bindings/riscv/bouffalolab.yaml b/Documentation/devicetree/bindings/riscv/bouffalolab.yaml > new file mode 100644 > index 000000000000..3b25d1a5d04a > --- /dev/null > +++ b/Documentation/devicetree/bindings/riscv/bouffalolab.yaml > @@ -0,0 +1,29 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/riscv/bouffalolab.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bouffalo Lab Technology SoC-based boards > + > +maintainers: > + - Jisheng Zhang > + > +description: > + Bouffalo Lab Technology SoC-based boards > + > +properties: > + $nodename: > + const: '/' > + compatible: > + oneOf: > + - description: Carrier boards for the Sipeed M1s SoM > + items: > + - enum: > + - sipeed,m1s-dock > + - const: sipeed,m1s > + - const: bouffalolab,bl808 As mentioned in the message for patch 5, "The Bouffalolab bl808 SoC contains three riscv CPUs, namely M0, D0 and LP. The D0 is 64bit RISC-V GC compatible, so can run linux." I have also been running U-Boot and NOMMU Linux on the less powerful, but still quite fast, "M0" core. However, this core needs a different DTB because: 1) The CPU is different (T-HEAD E907 instead of C906). 2) The interrupt routing is completely different. a. The M0 core contains a CLIC instead of a PLIC. b. The peripherals in the SoC are split between two buses. Those on one bus have their IRQs directly connected to M0, and share a multiplexed IRQ connection to D0; and vice versa for the other bus. So each bus's interrupt-parent needs to be swapped. Using some preprocessor magic like we did for Allwinner and Renesas, I was able to share most of the SoC and board DTs between the cores[1]. However, this still ends up with two DTs for each board. So here are my questions: - Is this acceptable? - Is there precedent for how we should name the two board DTs? - How does this affect the board and SoC compatible strings? - Should there be a separate "bouffalolab,bl808-d0" in addition to "bouffalolab,bl808"? - Is it acceptable to use the same board compatible string for both, since the _board_ part of the DT does not change, only things inside the SoC? It would be possible to avoid having two DTs per board by guarding all of the differences behind "#ifdef CONFIG_64BIT", but that seems wrong because you would end up with two totally incompatible DTBs named the same thing, depending on how the DTB was built. Thoughts? Regards, Samuel [1]: https://github.com/openbouffalo/u-boot/commit/3ca800850f30