Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp133465rdb; Tue, 5 Dec 2023 00:21:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQY5YtP6zn82bIgC6PyJERpECpmLKaJZbt4jfj8rw+oEIL20qQpyU5aiifRyB305xBgPUg X-Received: by 2002:a05:6358:d193:b0:170:17eb:2046 with SMTP id ka19-20020a056358d19300b0017017eb2046mr7450324rwb.47.1701764496553; Tue, 05 Dec 2023 00:21:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701764496; cv=pass; d=google.com; s=arc-20160816; b=xEI5R52PKMn9IqqAeDmDtIvjtlofdKYVo2gkrbBs1iiLx0kE5afImHwZsryYfWXS8f xU6X3mQ75QjFLNz3ERT6vn+sCaFA5oCJMFsPRa2UAAMHI9Rh06mnk6xIZxxJ+zO/AYwl CyRdXNmgk8TWiLP0sicvOLiD6Q2uBIoMUjTgMJpcl3g3uugyrQHu2R0xaXOzUlLC/euk 9gZC78ujWUwbRzC43wC+LNBsapFaSrKBcm8rJe8lzlpXi1DooTtzFkpHEvrQUr+1mYWP X9DRhRTEqcHC/youJTW+exjYN59ZmRWk+jgltoBeFB/EqwbpmuUGCjhUrAaRoUPVZj4P IrNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:dkim-signature; bh=UIo0LOPdZ0hyfaT46apt2R+skxOQe6f0X6bP3Ofjdmg=; fh=XF1ltB8ZFmZT0GjHMVQMaw+B17FBm+ZDJ7P+CGE5oME=; b=u8tLQXk1u1FXQ+TV46h4KIdNQ1Ui9dOUvggWvViHIAeBXVrYOs0AQMhZneHVXCgm7P F6BVzbI7O2GGo3r7D3eu9jdV+F65LTPDm7mLnb8uhwwu3rjrqH+FeP8ex5raccAC5hNT hkfcWnnV2FDMoBOb0JQhCVrTyaUaGFJZMj4mvlDGAINS0m7PizM3FpIgiPAbaFy4E7VW pNnp5eH4Yq9NSNlQ9m3w6/MLh2gRVHBnvJ/dc+tehYsVdA1qTvgMb1CMdnR1RaKmjy3V a+/a/ExPY+pELwG6FA9RQLozcKrLji/nDuxxTaNh63b1MIDs1mePXZezX5yefv0J1QPt y2rA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=VAyu8YqD; dkim=neutral (no key) header.i=@goldelico.com header.s=strato-dkim-0003 header.b=rgYhknTN; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w17-20020a056a0014d100b0069342eade87si9478996pfu.18.2023.12.05.00.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 00:21:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=VAyu8YqD; dkim=neutral (no key) header.i=@goldelico.com header.s=strato-dkim-0003 header.b=rgYhknTN; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BEC2880AEB11; Tue, 5 Dec 2023 00:21:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344704AbjLEIVM (ORCPT + 99 others); Tue, 5 Dec 2023 03:21:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjLEIVK (ORCPT ); Tue, 5 Dec 2023 03:21:10 -0500 X-Greylist: delayed 155 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 05 Dec 2023 00:21:14 PST Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC4ABA; Tue, 5 Dec 2023 00:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701764287; cv=none; d=strato.com; s=strato-dkim-0002; b=ZvhTPWrGAUnbqzvxi8/d3zjqsh+hsJYfbQQ/aCNX0i56rGUT+GmHvt/IyHHXnv2mC1 Wf4lPGYCFEe/Dt1hdLJrnaB25KCybSR6F3Pt1xUHMjFfnxqPDOsLwr38+bgvPrDoTk/e BBmw5bYvt0bsP2uFP26kHz/+9TVFHf7MNokwZj7HFGa1w8XpiCJUzfpyZ1WKnv3Wwxb/ ypP2g8bTv/kY2Zest1H/QsdlAYzIhbDIk7hKDdz86oApFqYc6psLRoh3iWvBJDQD8BNp 3EI3lHuFjpFrTi6JS95SxLiDYghzELX+SPCYZCKmcT/RbRrX2Ryevx1FTxRqsJI9wglk 4jvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1701764287; s=strato-dkim-0002; d=strato.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=UIo0LOPdZ0hyfaT46apt2R+skxOQe6f0X6bP3Ofjdmg=; b=pvyDzRRqEYeQ9UdOYHX7KNAPulbro+Cobexf4aN9Y30cRASdaH/3J+DtQWMS4Sk27c hRaf7IjUSJgOLiLaap40Zg/zWgek99PL0bheS962TrWxielYyLC2We8I4eKF90qJM18q Ek9TkXGIsq41GrrFCk//0nkltPWUxs3BG9/yEnssiLn4TgYKkDC36wzyp2HFG7/kNiD0 ODXRNTL2MpPw0G5F64jqkT+/M7KqZKx3jhxPxvl2lNsZ05odTC/T13IqCc9ui5vqsvv+ StV57mIcp4ejul4nmfWCv/racqWHviyLu+eWQ1IfewEcnSV1vElp3/TqllUx6oPcqBTw lKIQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1701764287; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=UIo0LOPdZ0hyfaT46apt2R+skxOQe6f0X6bP3Ofjdmg=; b=VAyu8YqDdjKNbEQTXnYxR1ebcPLEXhh6f3WGHMBLQvXBL9skMjBrPj3m4bH+/qeeLt 4LCmDvs5psTBzQbCbfg/kCK4JI/URUSLw2mhhyyTTsQm5kvmBvyl3FXBgCAUpxk9/Pbf Zsw0z4rWuEPaX+OMJSjhuRWo2LZYF5MerOds63H+J0+VI/J0vvt9i+4oiHycdCsS7cDj 95bhd3C+MNeZt8t1Gxwybmi3jx5vfkNaoS13vzhfAEN/FmzcNdqvOIjE4vrJmDSmEfWn keFdEjORWwqn07wyzT7bselji3UGwGh5LvQl/5BBXHxdlIHA6Ik2+T0F/mjNwT+enF09 WoKg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1701764287; s=strato-dkim-0003; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=UIo0LOPdZ0hyfaT46apt2R+skxOQe6f0X6bP3Ofjdmg=; b=rgYhknTN5kCYaoTzgdf1Yza6aNg2Tj0Q7tTNZ4nlkxBC+ERBsoO5q6s7UMCLgwqFaL 913GtbkyINUxDNaU5ICA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj5Apz9PSN6LgsXcGeonQ=" Received: from smtpclient.apple by smtp.strato.de (RZmta 49.9.7 DYNA|AUTH) with ESMTPSA id 6c76e8zB58I5OvJ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Tue, 5 Dec 2023 09:18:05 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: [PATCH RFC 01/10] dt-bindings: gpu: Add PowerVR Series5 SGX GPUs From: "H. Nikolaus Schaller" In-Reply-To: <20231204182245.33683-2-afd@ti.com> Date: Tue, 5 Dec 2023 09:17:55 +0100 Cc: Frank Binns , Donald Robson , Matt Coster , Adam Ford , Ivaylo Dimitrov , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , =?utf-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Paul Cercueil , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-omap@vger.kernel.org, linux-mips@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20231204182245.33683-1-afd@ti.com> <20231204182245.33683-2-afd@ti.com> To: Andrew Davis X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 00:21:23 -0800 (PST) Hi Andrew, > Am 04.12.2023 um 19:22 schrieb Andrew Davis : >=20 > The Imagination PowerVR Series5 "SGX" GPU is part of several SoCs from > multiple vendors. Great and thanks for the new attempt to get at least the Device Tree = side upstream. Really appreciated! > Describe how the SGX GPU is integrated in these SoC, > including register space and interrupts. > Clocks, reset, and power domain > information is SoC specific. Indeed. This makes it understandable why you did not directly take our scheme from the openpvrsgx project. >=20 > Signed-off-by: Andrew Davis > --- > .../devicetree/bindings/gpu/img,powervr.yaml | 69 +++++++++++++++++-- > 1 file changed, 63 insertions(+), 6 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/gpu/img,powervr.yaml = b/Documentation/devicetree/bindings/gpu/img,powervr.yaml > index a13298f1a1827..9f036891dad0b 100644 > --- a/Documentation/devicetree/bindings/gpu/img,powervr.yaml > +++ b/Documentation/devicetree/bindings/gpu/img,powervr.yaml > @@ -11,11 +11,33 @@ maintainers: > - Frank Binns >=20 > properties: > + $nodename: > + pattern: '^gpu@[a-f0-9]+$' > + > compatible: > - items: > - - enum: > - - ti,am62-gpu > - - const: img,img-axe # IMG AXE GPU model/revision is fully = discoverable > + oneOf: > + - items: > + - enum: > + - ti,am62-gpu > + - const: img,img-axe # IMG AXE GPU model/revision is fully = discoverable > + - items: > + - enum: > + - ti,omap3430-gpu # Rev 121 > + - ti,omap3630-gpu # Rev 125 Is the "Rev 121" and "Rev 125" a property of the SoC integration = (clock/reset/power hookup etc.) or of the integrated SGX core? In my understanding the Revs are different variants of the SGX core = (errata fixes, instruction set, pipeline size etc.). And therefore the current = driver code has to be configured by some macros to handle such cases. So the Rev should IMHO be part of the next line: > + - const: img,powervr-sgx530 + - enum: + - img,powervr-sgx530-121 + - img,powervr-sgx530-125 We have a similar definition in the openpvrsgx code. Example: compatible =3D "ti,omap3-sgx530-121", "img,sgx530-121", = "img,sgx530"; (I don't mind about the powervr- prefix). This would allow a generic and universal sgx driver (loaded through just = matching "img,sgx530") to handle the errata and revision specifics at runtime = based on the compatible entry ("img,sgx530-121") and know about SoC integration = ("ti,omap3-sgx530-121"). And user-space can be made to load the right firmware variant based on = "img,sgx530-121" I don't know if there is some register which allows to discover the = revision long before the SGX subsystem is initialized and the firmware is up and = running. What I know is that it is possible to read out the revision after = starting the firmware but it may just echo the version number of the firmware binary provided = from user-space. > + - items: > + - enum: > + - ingenic,jz4780-gpu # Rev 130 > + - ti,omap4430-gpu # Rev 120 > + - const: img,powervr-sgx540 > + - items: > + - enum: > + - allwinner,sun6i-a31-gpu # MP2 Rev 115 > + - ti,omap4470-gpu # MP1 Rev 112 > + - ti,omap5432-gpu # MP2 Rev 105 > + - ti,am5728-gpu # MP2 Rev 116 > + - ti,am6548-gpu # MP1 Rev 117 > + - const: img,powervr-sgx544 >=20 > reg: > maxItems: 1 > @@ -40,8 +62,6 @@ properties: > required: > - compatible > - reg > - - clocks > - - clock-names > - interrupts >=20 > additionalProperties: false > @@ -56,6 +76,43 @@ allOf: > properties: > clocks: > maxItems: 1 > + required: > + - clocks > + - clock-names > + - if: > + properties: > + compatible: > + contains: > + const: ti,am654-sgx544 > + then: > + properties: > + power-domains: > + minItems: 1 > + required: > + - power-domains > + - if: > + properties: > + compatible: > + contains: > + const: allwinner,sun6i-a31-gpu > + then: > + properties: > + clocks: > + minItems: 2 > + clock-names: > + minItems: 2 > + required: > + - clocks > + - clock-names > + - if: > + properties: > + compatible: > + contains: > + const: ingenic,jz4780-gpu > + then: > + required: > + - clocks > + - clock-names >=20 > examples: > - | > --=20 > 2.39.2 >=20 BR and thanks, Nikolaus=