Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6213917rwb; Mon, 5 Dec 2022 09:15:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ZRMmP8bVPEpzOkdpGRN6NMaygRlDseVNp56siGpzBIPW3oBvIt1DmHcmkDE8YNHs1kEQ7 X-Received: by 2002:a05:6402:a52:b0:46b:d3b3:669f with SMTP id bt18-20020a0564020a5200b0046bd3b3669fmr19283241edb.414.1670260517214; Mon, 05 Dec 2022 09:15:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670260517; cv=none; d=google.com; s=arc-20160816; b=UWx3LKizrwDmVBAG1xRN8vzQ7has0bJE/gcLcSOkokscP6E7W0beueLqIcWRyJ2Rdv 8FBvooTKZA6QCF7cZgZf/W58Cg3mK+RQdIcPzYBW13PQaXY2bnrpsaXp4mLAW0j1jAD4 KArNjNtrnpyiwfALPFnyriycpaQvELJ8hBbifEoayld0CKk71I4n9S1QnEkobylm5uXP UILf0XcZbVPGOET/EADgyhXqmDEFylEVa1JQc/TyO158tco2hstUR8Y60Y5ifmDCIyob nVIhF5v8yp2sQM06ZxdUwB8RIGAORJ4UkevccMuFj08TzCf1GTsjQuEEIYBIbQ7kZY1/ 91pA== 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 :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature; bh=8BXqDKQEGhK85bBV9PqvuptFk8jDXft+wx34YVG0dT8=; b=0OoZw8FvrZuLBdIzNzuxWYEtI+VrPALuQz4Ktk9dHbmjXbPN8rG6Bjkut0pfaRvDc0 NQAw/uA9nXtoIlvfM7+7g3Bd39OM03WiaWQA4QonbilkM7MottquL/Un3V5gYuGqzEdI hjwkydZSDxZS21DIXVOBG3PEV1CsChQxInXkq6SYKiNnRJDwi/woc1tMELtygGCRWtrf LzBZ2RONH6tBS2zyPjYDuclIx7uvTtjStT4b+S7zufgqhWCUFkFoOXVmXiHQ+sc+3I5b 1jBogGV8Sjq7yC/TAHlMDv2EXE0GWWYJVhQgALdb8lbwj3gFZzeTfGqJaTqtGdYbN/96 u3Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JnXgqlzL; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd17-20020a1709069b9100b007b28c6790edsi270374ejc.205.2022.12.05.09.14.57; Mon, 05 Dec 2022 09:15:17 -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=@kernel.org header.s=k20201202 header.b=JnXgqlzL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231483AbiLEQ4j (ORCPT + 82 others); Mon, 5 Dec 2022 11:56:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231601AbiLEQzt (ORCPT ); Mon, 5 Dec 2022 11:55:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE95218A4; Mon, 5 Dec 2022 08:54:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6E1C9611F8; Mon, 5 Dec 2022 16:54:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49641C433C1; Mon, 5 Dec 2022 16:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670259293; bh=8BXqDKQEGhK85bBV9PqvuptFk8jDXft+wx34YVG0dT8=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=JnXgqlzLbN9ScbMN51sTOc1hORuahCUYcmrvyRCfypUj0dSHUxz4WWLbqWQzixEFb Ngznul2rHCClPEsGF5/Hgg3gUaFOojr6uXPic0gqDSoenHv2T8WBbTAqZC14d88RML dDfeBQ24o7fPJKsDDsh86i8oyAezrzEc3ShMP6xFQJLIYdWCuF1dVsDH4PrHaydyzv /U/gHqqzTJWFBigGfb7Yj8+ZLa0o3SWnjGFWh3bQsY2bTr01hj49KQKhf8+e6MS1Yr aRymfrXFJA8m9L7hs0aahq5NhiBpyPk/ODrV+4ILyzzcJNmjUnj39h4QM0p6eFBjrW +aJSI5po+GLGQ== Date: Mon, 05 Dec 2022 16:54:48 +0000 From: Conor Dooley To: Icenowy Zheng , Conor Dooley CC: Rob Herring , Krzysztof Kozlowski , Marc Zyngier , Krzysztof Kozlowski , Palmer Dabbelt , Paul Walmsley , Daniel Lezcano , Jisheng Zhang , Samuel Holland , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_2/3=5D_dt-bindings=3A_timer=3A_si?= =?US-ASCII?Q?five=2Cclint=3A_add_compatible_for_OpenC906?= User-Agent: K-9 Mail for Android In-Reply-To: <879345cd8609cddccbf7bcf230923139af320b17.camel@icenowy.me> References: <20221121041757.418645-3-uwu@icenowy.me> <98005150-83a7-5439-0db1-d93d459c3809@linaro.org> <81C2234E-C92D-4F78-8295-7C6DD0A9BBC4@icenowy.me> <20221130181330.GA2544489-robh@kernel.org> <4ad56fa249a30167844abcedac53d198606511d8.camel@icenowy.me> <75a3ef9a175b16c46b57b2829ecbe4f97737de8a.camel@icenowy.me> <879345cd8609cddccbf7bcf230923139af320b17.camel@icenowy.me> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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: X-Mailing-List: linux-kernel@vger.kernel.org On 5 December 2022 15:59:44 GMT, Icenowy Zheng wrote: >=E5=9C=A8 2022-12-05=E6=98=9F=E6=9C=9F=E4=B8=80=E7=9A=84 15:05 +0000=EF= =BC=8CConor Dooley=E5=86=99=E9=81=93=EF=BC=9A >> On Mon, Dec 05, 2022 at 07:03:17PM +0800, Icenowy Zheng wrote: >> > =E5=9C=A8 2022-12-05=E6=98=9F=E6=9C=9F=E4=B8=80=E7=9A=84 10:36 +0000= =EF=BC=8CConor Dooley=E5=86=99=E9=81=93=EF=BC=9A >>=20 >> > > You lot all know the situation here a lot more than I do=2E=2E=2E >> > > I don't think "letting" people use the bare "thead,c900-foo" >> > > makes >> > > much >> > > sense as it gives us no chance to deal with quirks down the line=2E >> >=20 >> > Well, after rechecking the manual, I found it possible to handle >> > quirks >> > -- T-Head has a custom "mcpuid" CSR (@ RISC-V CSR 0xFC0), which can >> > be >> > used to retrieve some identification info of the core, including >> > its >> > model ID, version, etc; and the T-Head PLIC/CLINT are part of their >> > C906 SoC design that there's another "mapbaddr" CSR that could be >> > used >> > to retrieve the base address of them=2E >> >=20 >> > So I think it okay to just use "thead,c900-clint" here, and when >> > necessary, try to retrieve mcpuid for dealing with quirks=2E >>=20 >> I'm not super sure I follow=2E What's the relevance of "mapbaddr" here? >> We've got a reg property, so I don't think we need "mapbaddr"? > >Yes, it's not relevant to us here, it's only to prove that PLIC/CLINT >is part of C906 "Core Complex"=2E > >>=20 >> For "mcpuid", can you be sure that implementers will not omit setting >> that value to something unique? I'd be happier if we were overly >> clear >> now rather than have some headaches later=2E Have I missed something? > >These values are set by T-Head instead of individual SoC implementers >as a CPU CSR, and it's not for uniqueness, but it's for identification >of the CPU core revision (thus the PLIC/CLINT that come with it)=2E I really am missing something here that must be obvious to you=2E Let me try and explain where my gap in understanding is=2E If someone takes the open cores & makes a minor tweak in the plic how does= knowing mcpuid help us identify that that plic is marginally different? I must have missed something that should be apparent and look like an eeji= t right now! > >>=20 >> > > I don't think that using "thead,openc906-clint", "thead,c900- >> > > clint" >> > > makes all that much sense either, in case someone does something >> > > wacky >> > > with the open-source version of the core=2E >> > >=20 >> > > That leaves us with either: >> > > "vendor,soc-clint", "thead,openc906-clint", "thead,c900-clint" >> > > or: >> > > "vendor,soc-clint", "thead,c900-clint" >> > > right? >> > >=20 >> > > The first one seems like possibly the better option as you'd >> > > kinda >> > > expect that, in a perfect word, all of the open-source IP >> > > implementations would share quirks etc? >>=20 >