From patchwork Wed Oct 16 16:19:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13838665 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 BB7FCD2A533 for ; Wed, 16 Oct 2024 16:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: 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=wK/QCHsvwxI5jajMDK5bmLW2wqApLKVfmMXXvNmjNTE=; b=kfIufDLZAPwLC1CTn2a5K//snw M0nOV9N3Iy/HcUOrtXAWon6vi6h+glxuryj7+7dabdcMzzzef52ymvyeEAnk5HX0HBMSyOQG8rtGW yGBojFbvazme1Gb4hNURnzWhAmxb6uYY8RVBB9C0LlZ+y65/OAd5mRGzgb3F8SFyBFOaGM+vGeect 08vXhG/e/hmz1Gf7bCHkFgEjbEAxbWdIOnLNCUmlwq0gODBQp6UZ9mkmFIOhPEA7o8bbp7ZxGs3Qr 5cosEYrmimwzVZHOaFmI1n4LoyZF7sguZhABHgD0Ux+05AZ/Bm/DidtOSHxa5t2jgkezL4vt2z8Vx 9TIzr3Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t17E5-0000000CTs8-1Bwf; Wed, 16 Oct 2024 16:50:21 +0000 Received: from mail-am0eur02on2060d.outbound.protection.outlook.com ([2a01:111:f403:2606::60d] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1720-0000000CRlP-0I99 for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 16:39:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XI7BUKbmcKjDU3XQo5CfNAY4vODpey+khXOF9rzQDT5XaqfQwCptRcRRjDJouOiEDDOHYPyo0gRcb4kDnDsL/98cLFN1frCRbwZeAyhCXE47L3TVolKeqk3goQ7RRyo0IBaTAZTp3eubC3qfNvYcIuT/ygx19UJ+wNlzxnflwZEkBvTTTt9OB3h+4eZX24SW5S4y47mytrw9NPyb+dfPMElpiZdF9K9uiUTCykTmZxmM5PKrcrq8+rFqUZbwhaUfYj0MKo5K7bszIdRYzafvqTByhxITQSWQq2WXEawqwTN3h9QEo71nfyUzyST44VIhcmJwXIyPyZ/oxV9+9RkqgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wK/QCHsvwxI5jajMDK5bmLW2wqApLKVfmMXXvNmjNTE=; b=k74SUytHIWZrvJlTxJC6B+uY+6B0DwR22wwBo1x2sNGV1Lt5MJog8OFhjLncwnOMoYM0lbdF7P93ugPS+a9Y8jRkjI719QFWKZXWZbkrucjg2gnakvV9sxthFxCL6cKsdO0dmwAe4BoZPDHKt5JBBXM5oqXOMPCbrDgcSpyV8mjfC9tEMLwhZphV897a66n8UCGXHOMISzxpRBLREdG3Zvco0eSD8lf5jX/ObeBxKHFTK6evXPQfn8HkbdXlnxYUTErvVdI6aMo6BtfHg0Aw372NGSUsBke7vLNogb2s5wKdbVPe0cMleQHc7sTSbhWeqDbDdYwKECGo6QQDZjQGuQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wK/QCHsvwxI5jajMDK5bmLW2wqApLKVfmMXXvNmjNTE=; b=O2OWtURB3AMFQBNkBGr8QVXjzLsMEJIKKwkEfZ7tXSqHjaxCQhB8jvouQvdKIFLU+5DWxyqKXYmn2IW1d7E3T1gbom5NqBvF7OzHns6plAxHId33SJ200ij+Zor83jPcIgx6C9rQdqwNeT52Fk5Od/1duLLd50sT1TJhcTBusvqBKhR5T615hXmox3ez+MqAPbmRF1Vk+mWw6e88htfo9OiD3PSTkm8NwZqGooJMqMk1GiVF4uhDuOpr2xzKQ9ouUJhFQZ0aRjhqSkDp+PYE/enCFlavZienhMkOyujlx+p8ORH25IX5oKHLV5GxjFE7vjPrlRpTq8HfJYzcNOJkZQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8599.eurprd04.prod.outlook.com (2603:10a6:10:2da::7) by AM0PR04MB6884.eurprd04.prod.outlook.com (2603:10a6:208:183::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 16:23:36 +0000 Received: from DU2PR04MB8599.eurprd04.prod.outlook.com ([fe80::763:eb3b:6607:1e72]) by DU2PR04MB8599.eurprd04.prod.outlook.com ([fe80::763:eb3b:6607:1e72%5]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 16:23:36 +0000 From: Pankaj Gupta Date: Wed, 16 Oct 2024 21:49:00 +0530 Subject: [PATCH v9 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20241016-imx-se-if-v9-3-fd8fa0c04eab@nxp.com> References: <20241016-imx-se-if-v9-0-fd8fa0c04eab@nxp.com> In-Reply-To: <20241016-imx-se-if-v9-0-fd8fa0c04eab@nxp.com> To: Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Pankaj Gupta 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 X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1729095547; l=2640; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=mAzNbzRWOh6wFu0SMI2UVtcJ4QuBAqfaQJrwAklpA20=; b=XikNrMjx4ba9m2jWXnH7XQggr85by1m8IpTAqNEHBkPeXvLvIJJjUIylRPKyTTRfdOvpB7xpj a4GpNKjoTpmA5cmfMFh05L/5BCewZI6iabxXbSZ6N8UPGllezrdkVGl X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SG2PR02CA0037.apcprd02.prod.outlook.com (2603:1096:3:18::25) To DU2PR04MB8599.eurprd04.prod.outlook.com (2603:10a6:10:2da::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8599:EE_|AM0PR04MB6884:EE_ X-MS-Office365-Filtering-Correlation-Id: f04b428f-e1c5-4431-3618-08dcedfee2fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-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M/8FMJyA1RGJxXF4CApMLGikxewCZbpBz?= =?utf-8?q?j0lay1pzzdLJ2cEqbFIuBOQSuQ5NlIFo5mIMhjs+JUAY76+kgg74RTrWherI9Kw3D?= =?utf-8?q?Sw3IWziKs+yohJXITSyqNud1eHtBPnXu1zElI9g4YEvbbmODWkN0yBtY8RzlydpSJ?= =?utf-8?q?+qyZZpzKfBQWgpEclYD8k2NUiDbRE3Vgs1OMeBoUjOGcEEpAdjqmB1F//n2F1wE31?= =?utf-8?q?LxvBlPAmXfKHoZ3XCbfaFRNFITUr4VfJenS4wL5NKZWkbaJINHngscqe5IFJKKPEE?= =?utf-8?q?U3TDDcZO3tk05CAwCN5nkX28ItUHoJZUGGG17gPwe3wwWkMJvdA8A9DIPfPfpJVPF?= =?utf-8?q?9ssEYDT31qO4UzGuJeyf1BELzvDQwueUHNKhzQQeN3ZgDTsIbUkfdbEVfYpasGWQl?= =?utf-8?q?WJh9Fj9AhYnBiLDn6AVuv4maxDP+vpoyRLw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8599.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(1800799024)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CV63gcsVeDUm+LzFr3Fb1J6VmhCs?= =?utf-8?q?cUzOvv6WazXV0sR4RkOw3W+Se11bLbG4K2QXs/Ro35z3hbiDYPmmxU3sx+X5VM5Lr?= =?utf-8?q?ZCRTo3Xq+AlGB8dUHQtwuHsGrjUfzcRbEk/nFrIQHcEkkHLTUQdRQ7dx+vJemIS8c?= =?utf-8?q?a05MVuvEHx0HlUlRITbV7sbtDfEVJkjKL77mhQDloHWXTkMdg0wDjUguHNJ1cy64t?= =?utf-8?q?CLq6cQbpEObTU/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i8JxqiZ/CBSZnHf45/fo2lFjzz0C5Ybajbp9EUMNjyV46bLWe8?= =?utf-8?q?O6SV4g369YK0c1uOEmNOLepnDIQA4GeRIJDzYGMmxossiF0O2vXypLHUaSBw92Xs6?= =?utf-8?q?XZHdW4bhHG+3dClhmSiWWi3joDMekYh+sv5npajNQG/CPyLetkDSfnEdRII4t8ajY?= =?utf-8?q?4AooB/c6B5JCKBNOZwWPMLM97hLHJrEAaBC/qsGjOAe67HtkUCp0AuoaMYcSsqpdn?= =?utf-8?q?Li+SfY57zJxQ4tuIFTGypn702iPYJ3pxHiAXV2FLObAcfFyYg+hXiSMmFP2SItesQ?= =?utf-8?q?zoXsqVP+X1G5oWBAxKxFsVFE5G/dvnbh+HcZYRIyc1hjj1NWwkfqr/dp11TDkIbJj?= =?utf-8?q?npUCCRkVEMusn2YsAAhpBZPT/pgphYwbp/YqV2HZ/61K5vOvDD/zXnqSCWjK+kpsO?= =?utf-8?q?jqHFlfzIBBxZ?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f04b428f-e1c5-4431-3618-08dcedfee2fb X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8599.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 16:23:36.6488 (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: O6AH+CQnqBYKvyk9u2b6FBb+InMbU/uiVSVe8opbmffUANrLZzKC1jdgc/pSJsNh1MIzvmw40UsjayieSh1YSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6884 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_093752_123000_E12167E0 X-CRM114-Status: GOOD ( 12.48 ) 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 Add support for NXP secure enclave called EdgeLock Enclave firmware (se-fw) for imx8ulp-evk. EdgeLock Enclave has a hardware limitation of restricted access to DDR address: 0x80000000 to 0xAFFFFFFF, so reserve 1MB of DDR memory region from 0x80000000. Signed-off-by: Pankaj Gupta --- arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 17 ++++++++++++++++- arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 +++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts index e937e5f8fa8b..f5963f4043c4 100644 --- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* - * Copyright 2021 NXP + * Copyright 2021, 2024 NXP */ /dts-v1/; @@ -19,6 +19,17 @@ memory@80000000 { device_type = "memory"; reg = <0x0 0x80000000 0 0x80000000>; }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + ele_reserved: ele-reserved@90000000 { + compatible = "shared-dma-pool"; + reg = <0 0x90000000 0 0x100000>; + no-map; + }; + }; reserved-memory { #address-cells = <2>; @@ -204,6 +215,10 @@ &usdhc0 { status = "okay"; }; +&ele_if0 { + memory-region = <&ele_reserved>; +}; + &fec { pinctrl-names = "default", "sleep"; pinctrl-0 = <&pinctrl_enet>; diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi index e32d5afcf4a9..f98629b7f4cc 100644 --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* - * Copyright 2021 NXP + * Copyright 2021, 2024 NXP */ #include @@ -152,7 +152,7 @@ sosc: clock-sosc { #clock-cells = <0>; }; - sram@2201f000 { + sram0: sram@2201f000 { compatible = "mmio-sram"; reg = <0x0 0x2201f000 0x0 0x1000>; @@ -167,6 +167,8 @@ scmi_buf: scmi-sram-section@0 { }; firmware { + #address-cells = <1>; + #size-cells = <0>; scmi { compatible = "arm,scmi-smc"; arm,smc-id = <0xc20000fe>; @@ -184,6 +186,13 @@ scmi_sensor: protocol@15 { #thermal-sensor-cells = <1>; }; }; + + ele_if0: secure-enclave { + compatible = "fsl,imx8ulp-se"; + mbox-names = "tx", "rx"; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + sram = <&sram0>; + }; }; cm33: remoteproc-cm33 {