From patchwork Fri May 10 13:27:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13661606 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2042.outbound.protection.outlook.com [40.107.6.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 054C312C805 for ; Fri, 10 May 2024 13:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715347811; cv=fail; b=ugQtGYW4Do9z2ExxOpTZ4TLEKpIMbv5Q+9FvQpnFFgysjkYpgJt7UA6m9D/cm5PEkgxCDvKfi7Oe3X18HpTCX7CodXmHli/2O/xWH5Me3P/2XVh/J1ebE5C2StEXGwVR9tZxb2wikCki2R6FE1EIeA0MtBg2280siq3jue5PhoQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715347811; c=relaxed/simple; bh=q/vJk9WIp0Y1YCLwr9690Qj5FxRUgQ2QUu0wvEUbLAI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=eJr8xff97Qsndiu8mJZiKwVGgbRzSn1Gm4zAT0sjSITrukWkCrs1wgQHs4QcCQJWiX3GuQAbBbxjj87dK+YRXHHX+AUrKb3pEjttv7n8QYxo1ygX//XLoNEcTglwfRrRca9Qr2Uw7WPZpHutthED3+YE5lJOU/6Vw7m9hQ8F9c4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=CUxtgCYS; arc=fail smtp.client-ip=40.107.6.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="CUxtgCYS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CuvDNjWMxSFPC5EXN7GK2aVqHtc2rC2RrzZ6JkEv/P+/HOUyCGqcpRzQggvm2NWlOb8kKt5DzKeNn4AnmFD2X2we8GhWSWN/GwVOugo1W/vXcvAuiy6z32CHRb3f94PGUrFPEhu/36lSu8OxIZxp1d/EafmPsebevsUe7T9gzI2peqoXHaEfCUrzGakYMdwvOlinaTze2yW31uTiGUglp2A52MXW3mQ+d6/vyD+PM4pUkyH+Jrx2FZJstGsHB+Q9m0W4F7ZStzEjknQsfL3kQiil/+DLazStbp6yh//v7WTGyDE83NdHS6LJM489D3ZBKq2hHsBkxJpxlEvJTKLyDw== 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=whpSzr5QValKfJvwH6j2OVVLtMbWNG+lF6xqAjzhzIk=; b=QS1lZ56NJ4/kQfsyLvOwQ9eznfBTVbVotDgHohDTrEIwD8vnx1Pg6xchFWYwqmpYEFaRKkk4PMtlbaCaANa3enENgPO41G1ipty5CjoZ6yFslUYeMO8ni/tj1B5vt1utWZIg9XZKQGQL2S970fPvzA6XDDgVRY0ID53lw/L4Epz9yiIdxgdBiDsRwxtB2AoPRKjopmch1tsJr4ER3w4lqPx15QHpTCEVfeNGNSvCz0jUsuw5tYnQv380aoru3BfFeszRqN7qP9eWwlUw/ldrSYCMUju5lcNpseeKnjTLOYN5wt+/xxxSQkm5FFjO5Sc2PPBrzIAQ07lKrXyIbaISqA== 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=whpSzr5QValKfJvwH6j2OVVLtMbWNG+lF6xqAjzhzIk=; b=CUxtgCYSB8x1Ma5sehEKiYPh/AM9aHVTyDEyvMW+AAHhCTKYCASnjK06Q0jaMWcsDkyN0eNDB5RguH72UGbLM/MLPJF8i/+wznbeFFpVPqSq6KUb6+GyPM6XgwrMR9ai1XTbIsx/WwN7ME8CR0kYT2Msa+fP+EMU7gbOvPcqVcg= 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 AS5PR04MB10041.eurprd04.prod.outlook.com (2603:10a6:20b:67c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.49; Fri, 10 May 2024 13:30:06 +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.7544.048; Fri, 10 May 2024 13:30:06 +0000 From: Pankaj Gupta Date: Fri, 10 May 2024 18:57:28 +0530 Subject: [PATCH 2/4] dt-bindings: arm: fsl: add imx-se-fw binding doc Message-Id: <20240510-imx-se-if-v1-2-27c5a674916d@nxp.com> References: <20240510-imx-se-if-v1-0-27c5a674916d@nxp.com> In-Reply-To: <20240510-imx-se-if-v1-0-27c5a674916d@nxp.com> To: Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam 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-ClientProxiedBy: SI2PR06CA0003.apcprd06.prod.outlook.com (2603:1096:4:186::14) To AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8604:EE_|AS5PR04MB10041:EE_ X-MS-Office365-Filtering-Correlation-Id: 6308109b-22d1-4324-fe3f-08dc70f54e39 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|7416005|376005|52116005|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?/sJmA2MflYIgDGu5zeFobAGEVxnzdgH?= =?utf-8?q?y7K11ZXDEKZO8fhfvgHf5Qzjtft17I4gN6NfRvEz1Lt1X2F7hDTBKkOm7l8wjasgT?= =?utf-8?q?mOhTe894jYsbDXIr4LYQgoZiowQmH7cKmn+NaCdhaJZs+YAIeEzQRICXZTQIOMb4r?= =?utf-8?q?yaea6SoVYXHkQZ5HRAQx/ZLpeBXFARsO8cCV3G6c1lsvqjFuG4NwvKzmQtr/lUfg5?= =?utf-8?q?DYMMmSSDnwYeInNgw1R3hubVl4DlQR1N4AuuUIiTdK7G3Ge1N3Xi6IaHqEi5q13NB?= =?utf-8?q?eYIUtdm7YsPR0/nTIr2sxJ6FE3EAKVSIdkTss9fdyW0ZQSuYTBt3iKGky+vtOmUMj?= =?utf-8?q?rWscOFwbFqFpcsc9F/iFCGKpwHen401E8g4vc3wm8TCZdIDvX5olRQEGRdtF/iIp1?= =?utf-8?q?e/j21rVecc8RNUiMXjjxbkrngUktlM+5k/kK7StEXdB0KjO1iBXmSzgUBZ+hALWq5?= =?utf-8?q?tqPcRAHgXFMwYOo7PywkUi0UdW0Lab7a51khRI81qQaZcsY8cVU6uEhrZ/w7DzRz3?= =?utf-8?q?UcebGroBxRQyLir7zpRil9WmkfYn/sHFfn+7NL0cYgWkbct0b0N57qu0dgWch6l71?= =?utf-8?q?Hu9WKepc4kh6Cq2OCJpgFTR7i119xmxr1IqiES4L/2JzMwCEs46mv3RcqZhrqOU1T?= =?utf-8?q?E0K7q3+/QcJVkzzDbDZXbMiRDRI/khab8Iw47wl+lBsKBeu16BG6YrYS7mEpgJgdA?= =?utf-8?q?7lq0A7L7WVboVnm7Az68AfpF+A94nyNhoNhpMkd+pToUGAd3N6IxmlxpeJ69VOfbh?= =?utf-8?q?JAATBkEAJ1vnJkYqTYii2/JDynW+O+vQGi3ENFiiND5+Ky8Voccu6j5/WflfGWADd?= =?utf-8?q?JCQJ4RqZtvy6KtqxPLGRLD9aMupdxgOero0TZlUp+WZFK4THBJgFQE8vCf+tJpQy5?= =?utf-8?q?afsu+ue0+GccB4KswOPYi8YWKNZcC6u4smbfJJWCjSZYIBMwaTOyULo1S/S7RLMw1?= =?utf-8?q?GRVa3n8gxny+cKQD8BJsXryXE+mLtM+7ExFGIoXlb7H5yUppdd9ct9n8dJTJuI+wg?= =?utf-8?q?/20aiJQbj/AvD+zJFNmjFYOBJNAbp/gaCBE0lKt29S8WDXIHRvecris+sRa5NQjV8?= =?utf-8?q?eYkyONrfv8iib4qIpcXwa4bV3tpsxav/CjGLxNEpedQP496QXKMIiWsAakMSVBmpB?= =?utf-8?q?YUHkXaskejebVg0eIr9GOiZ69V8GYZ4y3QrfRBlDNrjXurj+xKdMOMJf4jYIlNcx/?= =?utf-8?q?O+9w3ZxoKDZ3FyCAHaHGI9YRLl7NxD5kOz5w2KTY6irnGUzMCPBZst9AQ=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)(366007)(1800799015)(7416005)(376005)(52116005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xa/HlCZ+B9y36a169ExBZ/aKul6w?= =?utf-8?q?kW0PVy2LYAfVXPAZ2xKF5Yt/QWC0ZtBis2U09bhzZABWYbfUuzDc3HDLHbk52JiCQ?= =?utf-8?q?tGublRmGa3q1DFAKS8ucUQilE1qRwPcxADpeFCSrUd0otCsOXSU+JpDCnc9VUT/y9?= =?utf-8?q?+y60Pjiyt7LoH+Xx0q1Induiq1/aMa2KqeAHMWZH77zwJZmrFr+nPkOEa4sXD7scc?= =?utf-8?q?9eXdLEwHPo36Y0gwCt72f2smPj87xRkbW3eaAXgC4mpMRIhoikGxi0OcGC8dAc5kd?= =?utf-8?q?wxG8pjYVhDjIM57UbW3HvxND4qo0+PRmbfOh85NYWq7wTdagPh+CBpDnfqZ2cLCqN?= =?utf-8?q?yfiZ2ipCMjqBQZ5VKZpFn9lXwUNFjqTNaiucC9j9Bgr+e5Qzw00hNQQ4zfkLeVroF?= =?utf-8?q?N/hIB7sP8XBdSFKroa4nAt5n9r0vQ6irCy2ELjvy5jAewOZU9zdH5z1kYIKf4/4rJ?= =?utf-8?q?7h3uVwtTELfrDGkNxZegKNVkgBsWgOSywII1Z2bHTshPGZXYkv+PwhXP4I3ovmaCs?= =?utf-8?q?CZTGPdTktanS69ubi/efoaAUy36+TTnUyOXi3axwm8g6darTGhbf9JzqDPXdfad8c?= =?utf-8?q?sdWK+7CIwMAFTk42HwcLdEnyVInVjxX0RRZQobDoyVRfYxMC82dzP1QhFDLMJ/fnm?= =?utf-8?q?8GD4LLYX1ZQad2HkkHZ7zSGA7WCEPXiOlBrJ3d3vDLbwHxPABtmCjVOz0TU6vdO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22d1-4324-fe3f-08dc70f54e39 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2024 13:30:06.2312 (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: UzyJjZopCdLvfw6qKmxLxO3z0kgngRJWkkvcq/4Knbju8UB6j+b7/ULj3w6Hv7RhnSdeddtGdrxd43Nzrqkotw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR04MB10041 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 + +patternProperties: + "^[0-9a-z]*-if@[0-9]+$": + 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. + + 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 + then: + patternProperties: + "^[0-9a-z]*-if@[0-9]+$": + allOf: + - if: + 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 + +examples: + - | + ele { + compatible = "fsl,imx8ulp-ele"; + #address-cells = <1>; + #size-cells = <0>; + + ele-if@0 { + reg = <0x0>; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + mbox-names = "tx", "rx"; + sram = <&sram0>; + memory-region = <&ele_reserved>; + }; + }; + - | + ele { + compatible = "fsl,imx93-ele"; + #address-cells = <1>; + #size-cells = <0>; + + ele-if@0 { + reg = <0x0>; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + mbox-names = "tx", "rx"; + memory-region = <&ele_reserved>; + }; + }; + - | + v2x { + compatible = "fsl,imx95-v2x"; + #address-cells = <1>; + #size-cells = <0>; + + v2x-if@0 { + reg = <0x0>; + mboxes = <&v2x_mu 0 0>, <&v2x_mu 1 0>; + mbox-names = "tx", "rx"; + }; + v2x-if@1 { + reg = <0x1>; + mboxes = <&v2x_mu6 0 0>, <&v2x_mu6 1 0>; + mbox-names = "txdb", "rxdb"; + }; + v2x-if@2 { + reg = <0x2>; + mboxes = <&v2x_mu7 0 0>, <&v2x_mu7 1 0>; + mbox-names = "tx", "rx"; + }; + }; +...