From patchwork Thu May 23 10:49:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13671615 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 7389FC25B75 for ; Thu, 23 May 2024 10:53:15 +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:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=j0rZN0u8+/q4YrCnLaYAORrS4j8j4ZYF1IS8++hDrCE=; b=VmJi3fyQSP6TMphh3+Q3xn6M5F qcaWz6b+R2wqyvz5Qgfc+Ua8yEH1Rw+5V9QODNHYmsKMjXsEC5c3iDGc4eY6fSf9lf1rBaYdCtzD8 px67yfn6lsmDzFxddD64XuKLbFrAGXWY+KMzT8jAGeQou8xVrpuLwBywOVPurZ53EXlLgh9w5PS10 KRB+gXfThjDIIsvfU9jELFQDu6Q3bSFxyCJcEoBGd4TOmgMGvLpWkjWjs67cMqts12G927GbRcfyR c8s1xxrMR+aqlfAuI//HZmzcTe8D97ylLsTEKcvI3HxqCkIB6yT5XIG+kQvm4mjI4ioYIL58Xo/61 a4edaTQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA64I-00000005x3C-1CDz; Thu, 23 May 2024 10:53:06 +0000 Received: from mail-db3eur04on0622.outbound.protection.outlook.com ([2a01:111:f400:fe0c::622] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sA642-00000005wpw-2Dbt for linux-arm-kernel@lists.infradead.org; Thu, 23 May 2024 10:52:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tf5rA2xJssz9gORdVbWpdLPaqXgajtxYuOGtOwOdE8ZnM8MX7zvgoxXa38PqW00zY8iRNVOSCS6Dx0FF/VUPuuPRTmMWO/M6ShEVgcs+1vdhUjwD2xj7yRDK8AkBcVUVs7iIZ0wMp0NgEp5Cke0w6YS0J5eTpX3lGKSD3LcTrci4pz2PWr1POjw8QtD3Yz+aSqR5wOqPlFu6lsCMuDBzolYxqNesklztYwsJeSExI/42MP9sfZagmLeVWzQMJiSiJud+xUPiyspZYgIuqFqevDAoF9zNj2CuuorcwOWeMoScrOzPKr4RS6A0FQv/D/fnsHFe1BLnds3mjD0S3niajA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MZltA1ZA8XBbyBwdEZ4b9dyfEx7WJ7IojPm5PxeAyb0=; b=RkJj8OFvBZQ23o/BvuHJNPhp2fEvdpnQyjczuaoQG0GvTacvf91i3pDvOnqYHMRvwIqhBNOMmOLiZqzK3mSOQK1V/V7eh2I9fWNdrgbFpa0MF6/nMr4UaevWqDrNcBjNjW2YhhftCfUtCztT5uzQtLDnTpvHAbQZzC7rRmDvMPjJHp+22m+ovgsI7ReX0hjZ/F+GmcTBcsu14nBnzAydOIx5Q2M0YxVFhxvKtF/8e0Lz6FWTaaqU+OA6R+H41VDsDmgOFfH6swlZyfy9RGlfJ4BlhfW0ajRIGvC2YZtoiN6Rg6MONpk0XUx+evOTv9Gknc6zXrGsDahM3CapQBEm8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MZltA1ZA8XBbyBwdEZ4b9dyfEx7WJ7IojPm5PxeAyb0=; b=VqF5C9GOtXVBS4/wuZIwfnMFcsA/PP95T90L/sDfTu3FxdsfPPQkUrUaPT4A/ea94WjA0W9Afg3wTvlW47J5M+nDl2TpK04vYbE6nFJyJVG2DwZ6MTbiXyyDolwZogjsFpjMhqI5ue7bARNKvrfojleY4x0AFmBnxP2HNt+5ZMg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) by AM8PR04MB7474.eurprd04.prod.outlook.com (2603:10a6:20b:1d9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Thu, 23 May 2024 10:52:37 +0000 Received: from AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827]) by AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827%4]) with mapi id 15.20.7587.035; Thu, 23 May 2024 10:52:37 +0000 From: Pankaj Gupta Date: Thu, 23 May 2024 16:19:33 +0530 Subject: [PATCH v2 2/5] dt-bindings: arm: fsl: add imx-se-fw binding doc Message-Id: <20240523-imx-se-if-v2-2-5a6fd189a539@nxp.com> References: <20240523-imx-se-if-v2-0-5a6fd189a539@nxp.com> In-Reply-To: <20240523-imx-se-if-v2-0-5a6fd189a539@nxp.com> To: Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Herring , Krzysztof Kozlowski Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Pankaj Gupta X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1716461396; l=5119; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=MuhBVsZUiI5VFPmv9lk7WXE1TbDKt5rB2RVcpcQVO7I=; b=w6fbQBlSTkOflp/dwQjjCb6ENBEUre9TP+QIs3bCen6ZoiCugS2nXXC+vdfMBbVtOebEXxVsQ w38+bL0zmojB4dlkLmptmCvEdZPLugN9fTJkoMcwquQeo2f2kBTwLD1 X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SI2PR01CA0027.apcprd01.prod.exchangelabs.com (2603:1096:4:192::7) To AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8604:EE_|AM8PR04MB7474:EE_ X-MS-Office365-Filtering-Correlation-Id: 6833a1db-9e41-4bc5-8508-08dc7b167565 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|366007|1800799015|52116005|376005|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?tRvVYOOYbcf5zyqFhuNvrGwmPC8Tp+v?= =?utf-8?q?sQvKfGxDAHw5GLAfgiUYI1LuoK1/gsNXAr3ms1Pcfgyzv/0LAAQWuwSdizNW+2o3x?= =?utf-8?q?YQ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gjTApI3a0suQ0EG08O2tZz1vl5Yjp1sSp45itLwTcx5CFdRcepTf?= =?utf-8?q?zxRm7ULI1XnT8vdVWTfQN9qEu4Uok0DhqABb68O82tXg8JKBIcqibbTE2bpdmUfU6?= =?utf-8?q?hNbqTX56ndNxhV/JYyOZgrVns1eRSm0QCww2VYOAAw4RGO0KVIN+vjLUtSoNGugFm?= =?utf-8?q?ESrYDu1YSYvZ7Zc+bfPX6n2E8eb6Qt0zvl4Uw9yyuuivCLpMnO+mDufr0pVQxGIXT?= =?utf-8?q?7KIvyf0g6FDhgQbaMxygx0Hp+/Xoag6sgL8b7CH+ie5xpH3h9i16PbH68=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8604.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(366007)(1800799015)(52116005)(376005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TfkDT0hYC4p4VoszPXWs2Q7PDV3U?= =?utf-8?q?Niuqr8Q2I1PhYpWVa91ZdEMZtY8TzvKhKCOLMgaunhu7cnN1iLJUYQHf+nUuAWLRZ?= =?utf-8?q?bPZrmhI+pX3hjyWqIMZapK7BEdOnFI9tz+KNQIfKxny4VKr2g+60ZONwdcEcsd75V?= =?utf-8?q?AivahJr3C1oUAqrCWU7z1uYM5L/hd6j9ALL9BD/Poz1UVnjy8iyfaNxxK4U0F/RvT?= =?utf-8?q?rygcFKiWoHoiDL9dFRRhzoo2Hq5jQeacRr8xIBuwps/1EbyA8qACRPB9hp3OGbuDx?= =?utf-8?q?gIasK0B2ehLxAMlowj8fr4TfgiSM1JtozhwRlqAGSs5XS48IwYtae0KmjiN6hpESe?= =?utf-8?q?JDHuWupMofX7GFINfVT3RGFPOjuRBi5QiJ76GwqOw11UHtUhvVk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?/aM9D2J8CdWS/NcZd8jSLqY0vZO9AW0B3arhXVoDFtGXwnjBF5OLML5jdqSvK3V/U?= =?utf-8?q?WVxCVreq1i49FQU2z4UxNxRj0arIo+AqpDwrMaZP2kFVyJEPNnZ8jmkp300miGJ6m?= =?utf-8?q?gh9slwCQT9ZtYu3gyQ8Lj+8Yay3+kegWLo/IyrfHQLbK4k+VbzqLmz7uKqvGuYgty?= =?utf-8?q?g+ek2I56GPo8xZur5Bm71EmJCNaSY27KWaUeT+SuBc9F7JtQC0QoT8kGOMgeiLTeM?= =?utf-8?q?t4h3n0kMKo/+?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6833a1db-9e41-4bc5-8508-08dc7b167565 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2024 10:52:37.0689 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2DMusY5Vva3/iwmDYXbwNbiuMSru6hAmlGjR7d7lN6j4Je7jGeEcHn7V5lp/54Mu/CYJPdbWycc0vqupxFSbOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7474 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240523_035250_626531_A1043A0F X-CRM114-Status: GOOD ( 15.70 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 154 +++++++++++++++++++++ 1 file changed, 154 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..b27f84db6f91 --- /dev/null +++ b/Documentation/devicetree/bindings/firmware/fsl,imx-se.yaml @@ -0,0 +1,154 @@ +# 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: + $nodename: + pattern: "^[0-9a-z]*-if@[0-9a-f]+$" + + compatible: + enum: + - fsl,imx8ulp-ele + - fsl,imx93-ele + - fsl,imx95-ele + + reg: + maxItems: 1 + description: Identifier of the communication interface to secure-enclave. + + 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. + +allOf: + # memory-region + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8ulp-ele + - fsl,imx93-ele + then: + required: + - memory-region + else: + not: + required: + - memory-region + + # sram + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8ulp-ele + then: + required: + - sram + else: + not: + required: + - sram + +required: + - compatible + - reg + - mboxes + - mbox-names + +additionalProperties: false + +examples: + - | + firmware { + #address-cells = <1>; + #size-cells = <0>; + ele-if@0 { + compatible = "fsl,imx8ulp-ele"; + reg = <0x0>; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + mbox-names = "tx", "rx"; + sram = <&sram0>; + memory-region = <&ele_reserved>; + }; + }; + - | + firmware { + #address-cells = <1>; + #size-cells = <0>; + ele-if@0 { + compatible = "fsl,imx93-ele"; + reg = <0x0>; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + mbox-names = "tx", "rx"; + memory-region = <&ele_reserved>; + }; + }; + - | + firmware { + #address-cells = <1>; + #size-cells = <0>; + v2x-if@0 { + compatible = "fsl,imx95-v2x"; + reg = <0x0>; + mboxes = <&v2x_mu 0 0>, <&v2x_mu 1 0>; + mbox-names = "tx", "rx"; + }; + v2x-if@1 { + compatible = "fsl,imx95-v2x"; + reg = <0x1>; + mboxes = <&v2x_mu6 0 0>, <&v2x_mu6 1 0>; + mbox-names = "txdb", "rxdb"; + }; + v2x-if@2 { + compatible = "fsl,imx95-v2x"; + reg = <0x2>; + mboxes = <&v2x_mu7 0 0>, <&v2x_mu7 1 0>; + mbox-names = "tx", "rx"; + }; + }; +...