Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1396416rdb; Wed, 20 Sep 2023 08:04:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/L/Qmb4tEosyUj0OLp4/GEFFdhlYNSO2k3zENrqLuU6UcQgC7SpVjuI6Ylwom6t/xMe8i X-Received: by 2002:a17:902:9343:b0:1c3:f4fa:b1a2 with SMTP id g3-20020a170902934300b001c3f4fab1a2mr2842374plp.8.1695222276030; Wed, 20 Sep 2023 08:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695222276; cv=none; d=google.com; s=arc-20160816; b=KpZPpslg75cdoCKk+iaJHkosaoQ94WuqVRR71FlD5hACClBYZEQyDqc2xXu3Tneftv R7DBIjrStsKlrsSdT5IogcQoSZjdxzRmzn4uTRAnWAnhk2mU6gmIQtm397w4WfDzZlT5 12KJCmTvsJeSKUMgpdzE+/Ukdx+vTHQlejs/olejce2AUVSw8b4nkSBJAbNydrMd79mQ 18a/RNzMQCww1Mda1Cw9GIxQwmNsTN8xhXx1LHPrmJruDu0tdXA3i79QdhDUAxs9tczG NaZOZyGaVbHFXhr1cfZX+xY6or5Oa+f48kLmbBWh4bzqR3Pr8lR3F7BLyLVA3Iaqo3GP TYWA== 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=+2j3nces5C2Y6G0w4dr7sRGrgDbYjuDpUw6pC0lKXLQ=; fh=0bzX6xzzn27sqHnzAj8fdXpPmFbusZjXdCvLouUxkvs=; b=XbTTEpJte5wLeg9gyay/zNl/g720usAeAcpNQMDz0tdwF1jN5ItZKvYBmKNn9h4GaE LRhq5AZS6ujJLBZ9bcWdb/zqDpMzcMpJDxbK/eqyo9lUI7WcmXbVwGZdAD9j3pVUChSK gi+va39GDy3q0VrxspW5NDLi8yuttqqYV1fQx7W8NuxqbZJ3WynplL6Jgwm9bVu0okcc /B6PuYSsQzUUg8TpegX6AYA/JKXsJtMe8N9cdh/bGQoAqsUujvOp+uCVerXbZC0V3D3c xC37nMnGsj5WuyrYb735XfsElF4mbVNPLtM3xVNRO3ZBBYbsTsrQb7ZYRVk2aJTTo1Wq XDGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NygEtZrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id w2-20020a1709026f0200b001c3c94d212fsi11584612plk.97.2023.09.20.08.04.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 08:04:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NygEtZrk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 23E6E823FAEF; Wed, 20 Sep 2023 07:52:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234587AbjITOwK (ORCPT + 99 others); Wed, 20 Sep 2023 10:52:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234330AbjITOwJ (ORCPT ); Wed, 20 Sep 2023 10:52:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7939FAD; Wed, 20 Sep 2023 07:52:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0126C433C8; Wed, 20 Sep 2023 14:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695221522; bh=+2j3nces5C2Y6G0w4dr7sRGrgDbYjuDpUw6pC0lKXLQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NygEtZrk84lRg6zKqBNWyp3ecx3eq9+OEYuaKVfg2N7CTM0PFuCY+ay2Nts8XzVf9 q4P86pfVq6bOsFt9RzKQMFNwbNhIRkmKK/+yQxcmlNfb/bwcOf0le3K5HVsWDaus7x 8rG61cADEugt8Xq3G2sh+KU2IF3kD/RDzsV3kbHi3tlwbwEUhyOAI3/FNNgC8WphQG IQTQtfOjcvDjO5g1asyVSoMh/huLKRvq68pCPMiIyIssh7pZgVN2npFfCq6+p2q2i6 29gO3GTdmMadV259kKNdlXHvnW/wCxAYFhp+wR/X5lodXFNBFyRhiuY1kExAraLatu HWAE1QULyRqTA== Date: Wed, 20 Sep 2023 15:51:55 +0100 From: Conor Dooley To: Anup Patel Cc: Inochi Amaoto , Krzysztof Kozlowski , aou@eecs.berkeley.edu, chao.wei@sophgo.com, evicetree@vger.kernel.org, emil.renner.berthing@canonical.com, 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, Chen Wang , Atish Patra Subject: Re: [PATCH v2 06/11] dt-bindings: timer: Add Sophgo sg2042 clint Message-ID: <20230920-992a56b66366f3c0591a6a94@fedora> References: <66b988f0-39fc-2ed3-8f38-151d6a3c9e52@linaro.org> <20230920-8503c6365655d3ef3dadfd53@fedora> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lO3IQKh1/e514qwn" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 07:52:15 -0700 (PDT) --lO3IQKh1/e514qwn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 20, 2023 at 08:08:49PM +0530, Anup Patel wrote: > On Wed, Sep 20, 2023 at 6:28=E2=80=AFPM Conor Dooley w= rote: > > > > On Wed, Sep 20, 2023 at 08:40:07PM +0800, Inochi Amaoto wrote: > > > >On 20/09/2023 14:15, Inochi Amaoto wrote: > > > >>> On 20/09/2023 08:39, Chen Wang wrote: > > > >>>> From: Inochi Amaoto > > > >>>> > > > >>>> Add two new compatible string formatted like `C9xx-clint-xxx` to= identify > > > >>>> the timer and ipi device separately, and do not allow c900-clint= as the > > > >>> > > > >>> Why? > > > >>> > > > >> > > > >> If use the same compatible, SBI will process this twice in both ip= i and > > > >> timer, use different compatible will allow SBI to treat these as d= ifferent. > > > >> AFAIK, the aclint in SBI use the same concepts, which make hard to= use the > > > >> second register range. I have explained in another response. > > > > > > > >What is a SBI? Linux driver? If so, why some intermediate Linux driv= er > > > >choice should affect bindings? > > > >Best regards, > > > >Krzysztof > > > > > > > > > > SBI (Supervisor Binary Interface) is defined by riscv, which is an in= terface > > > between the Supervisor Execution Environment (SEE) and the supervisor= =2E The > > > detailed documentation can be found in [1]. > > > > > > The implement of SBI needs fdt info of the platform, which is provide= d by > > > kernel. So we need a dt-bindings for these devices, and these will be > > > processed by SBI. > > > > > > [1] https://github.com/riscv-non-isa/riscv-sbi-doc > > > > Yeah, this is the unfortunate problem of half-baked bindings (IMO) > > ending up in OpenSBI (which likely means they also ended up in QEMU). > > This T-Head stuff is coming across our (metaphorical) desks, so we are > > obviously going to try to do things correctly. I may end up speaking to > > Anup later today, if I do I will point him at this thread (if he hasn't > > seen it already). >=20 > RISC-V ACLINT is one of those unfortunate non-ISA specs (like > SiFive PLIC) which is implemented by various organizations but > not officially ratified by RVI. Yeah, I brought this stuff up at the weekly pw sync call, and Paul pointed that out. > The SiFive CLINT has flexibility related limitations which makes it > not useful for multi-socket and mult-die systems. The SiFive CLINT > is also not useful for systems with AIA because with AIA M-mode has > a new way of doing M-mode IPIs. Due to this reasons, the RISC-V > ACLINT spec breaks down traditional SiFive CLINT into two separate > devices namely mtimer and mswi. This allows platforms to implement > only the required set of devices. The mtimer as defined by the ACLINT > specifications also allows platforms to place mtime and mtimecmp > registers at different locations. >=20 > Refer, https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc >=20 > We need a separate DT bindings document for ACLINT MTIMER > and ACLINT MSWI because these are separate devices. The > Sophgo sg2042 SoC should add their implementation specific > compatible strings in this document. If the spec isn't frozen, I'm not accepting a binding for the "generic" version of it. Bindings for this specific implemtnation are okay. For sure though, squeezing this into the sifive,plic binding isn't appropriate. What was pointed out, I think by Samuel, that the reason that this may need to be split is the fact that there are many possible MTIMER register ranges & possibly sswi stuff too that would need to be differentiated. >=20 > Regards, > Anup --lO3IQKh1/e514qwn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZQsHCAAKCRB4tDGHoIJi 0oIxAP4l9Y+OWxR43uIh16s9q+QkJcVDOsWIXdpnb0KYX5AOogD/eVTeoiQKQkzL Sdw+Zw7PIgPrS0SkTX280B840uhfswE= =7xPz -----END PGP SIGNATURE----- --lO3IQKh1/e514qwn--