From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25711C25B10 for ; Fri, 10 May 2024 20:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3iuN893pc/Me7Y0bOmF4lXRqymJdkCbo6oEPzEKSFYg=; b=nSs21XE9M8uHj1 092vAErsenPtO1xf6z37LdikrMF5rtnCcUWQb1IG0GeQdSmGKgF08psZEDw/xuPgeBqK2riJ/kw6m 4vIeA3oThOQFkx3TtyScdED3Kl4nFIMpSxhXNKGHu5/a0i6gH5z2r9t4fmQV1e5RjbRzuOX5mScLW WfjKUOcExlTeieadmXImwkq3Qu7/lOMw1+t0OqRNPa4o3rSVR5pvCTZ0RxOxosroz7bJJ1AGnHGAc MFKa1FIK5Y7ulVrYiOfvbUxbCQXSPwmhUTlUTBlR9Hyjtp1Ndmt/S5JMR2gAEV9N+y8WT1XiqTAyp v/IwDD/gIqXOcI8p0rWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5WYL-00000006Lo3-1XZM; Fri, 10 May 2024 20:09:13 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5WYF-00000006Llv-47pr for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2024 20:09:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 4ECE2CE1EC3; Fri, 10 May 2024 20:09:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 300EAC113CC; Fri, 10 May 2024 20:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715371745; bh=WbY0QNkzU5FHLjWQNa5GB+HlPBZoGMhX888ryhFyDBc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TB6vkmI6rFllxSJs8EHd0yoIgd0lapuu5TAuXQ2LflMUEDDpyNzx+T/I/YG236rQq aUQuwWa7DFKFyYRFVZ8So9IASCbEwkphWQHb9YWA+hu6b5WUP7sSNgNI2GJnU+vB7A dkBKJB8/FFvKV8yHYEAoPRiJPheHjc66p3dg+L0o3940G1GCyN2EMklIkyHcGBQFhF se8Utg8w6oSjUDQ+eop1vWT34TEyL8Z4uEk25GFKuvMVsbefe+Oz8LF1eiuXTb0orZ zZ8DgP3iwaC9L+L7+mnjJi4tdK9jj+ham/mwihAnUCKono3YPqi+ljfPryWrqoMYNa qyQl+ET7CntbQ== Date: Fri, 10 May 2024 15:09:03 -0500 From: Rob Herring To: Pankaj Gupta Cc: Jonathan Corbet , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/4] dt-bindings: arm: fsl: add imx-se-fw binding doc Message-ID: <20240510200903.GA628922-robh@kernel.org> References: <20240510-imx-se-if-v1-0-27c5a674916d@nxp.com> <20240510-imx-se-if-v1-2-27c5a674916d@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240510-imx-se-if-v1-2-27c5a674916d@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240510_130908_404593_5ACD9237 X-CRM114-Status: GOOD ( 27.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 10, 2024 at 06:57:28PM +0530, Pankaj Gupta wrote: > The NXP security hardware IP(s) like: i.MX EdgeLock Enclave, V2X etc., > creates an embedded secure enclave within the SoC boundary to enable > features like: > - HSM > - SHE > - V2X > > Secure-Enclave(s) communication interface are typically via message > unit, i.e., based on mailbox linux kernel driver. This driver enables > communication ensuring well defined message sequence protocol between > Application Core and enclave's firmware. > > Driver configures multiple misc-device on the MU, for multiple > user-space applications, to be able to communicate over single MU. > > It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93 etc. > > Signed-off-by: Pankaj Gupta > --- > .../devicetree/bindings/firmware/fsl,imx-se.yaml | 186 +++++++++++++++++++++ > 1 file changed, 186 insertions(+) > > diff --git a/Documentation/devicetree/bindings/firmware/fsl,imx-se.yaml b/Documentation/devicetree/bindings/firmware/fsl,imx-se.yaml > new file mode 100644 > index 000000000000..a858ef6965cb > --- /dev/null > +++ b/Documentation/devicetree/bindings/firmware/fsl,imx-se.yaml > @@ -0,0 +1,186 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/firmware/fsl,imx-se.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP i.MX HW Secure Enclave(s) EdgeLock Enclave > + > +maintainers: > + - Pankaj Gupta > + > +description: | > + NXP's SoC may contain one or multiple embedded secure-enclave HW > + IP(s) like i.MX EdgeLock Enclave, V2X etc. These NXP's HW IP(s) > + enables features like > + - Hardware Security Module (HSM), > + - Security Hardware Extension (SHE), and > + - Vehicular to Anything (V2X) > + > + Communication interface to the secure-enclaves is based on the > + messaging unit(s). > + > +properties: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + compatible: > + enum: > + - fsl,imx8ulp-ele > + - fsl,imx93-ele You basically have 0 properties in the parent node. What's the point of it? Either just get rid of it and define the child nodes independently or make the parent contain all the resources. > + > +patternProperties: > + "^[0-9a-z]*-if@[0-9]+$": unit-addresses are hex. > + type: object > + description: > + Communication interface to secure-enclave node, that defines hardware > + properties to required to establish the communication. There can be > + multiple interfaces to the same secure-enclave. Each interface is > + enumerated with reg property. It optionally defines properties > + depending on the compatible string and interface enum identifier. > + > + properties: > + reg: > + maxItems: 1 > + description: Identifier of the communication interface to secure-enclave. What are the identifiers based on? Is the value significant to s/w? Kind of looks like you just made up indices. How many child nodes do you have? Is it fixed per SoC? > + > + mboxes: > + description: contain a list of phandles to mailboxes. > + items: > + - description: Specify the mailbox used to send message to se firmware > + - description: Specify the mailbox used to receive message from se firmware > + > + mbox-names: > + items: > + - const: tx > + - const: rx > + - const: txdb > + - const: rxdb > + minItems: 2 > + > + memory-region: > + description: contains a list of phandles to reserved external memory. > + items: > + - description: It is used by secure-enclave firmware. It is an optional > + property based on compatible and identifier to communication interface. > + (see bindings/reserved-memory/reserved-memory.txt) > + > + sram: > + description: contains a list of phandles to sram. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + - description: Phandle to the device SRAM. It is an optional property > + based on compatible and identifier to communication interface. > + > + required: > + - reg > + - mboxes > + - mbox-names > + > +allOf: > + # memory-region > + - if: > + properties: > + compatible: > + contains: > + enum: > + - fsl,imx8ulp-ele > + - fsl,imx93-ele What else would they contain? Those are the only compatibles defined here. > + then: > + patternProperties: > + "^[0-9a-z]*-if@[0-9]+$": > + allOf: > + - if: These conditionals are hard to follow. Probably a sign some of this needs to be separate or simplified. > + properties: > + reg: > + items: > + - enum: > + - 0 > + then: > + required: > + - memory-region > + else: > + not: > + required: > + - memory-region > + # sram > + - if: > + properties: > + compatible: > + contains: > + enum: > + - fsl,imx8ulp-ele > + then: > + patternProperties: > + "^[0-9a-z]*-if@[0-9]+$": > + allOf: > + - if: > + properties: > + reg: > + items: > + - enum: > + - 0 > + then: > + required: > + - sram > + else: > + not: > + required: > + - sram > + > +additionalProperties: false _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel