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: 13838641 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2060.outbound.protection.outlook.com [40.107.105.60]) (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 C64F42101A8 for ; Wed, 16 Oct 2024 16:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729095821; cv=fail; b=IL0mtP+vO25x/kkJRvegia6elxhp/OrwUGncXiNQNPHvfHTh+aFwXcGrONw2imugwslx/DRsAlqh4x0EXl5hEfHAhCyDPbl/WFpr5Wo1BjmmNJR1NzeNmhdxeWrwxsvnDe0l1XlsoTtVp6wMvMpY77+WPfMsCWbez+Nq/sPsuE4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729095821; c=relaxed/simple; bh=mAzNbzRWOh6wFu0SMI2UVtcJ4QuBAqfaQJrwAklpA20=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=VJc7q+qeW2vO+23H82IJWk6HPt4dZkXu8LCpe5Cj+vW/INLKTX8OBtZoSzmo6kP9ZXzBYLG3w3WIHNljcOCKcaSGMTQviEPGQGF0Grz1jOOnu2tuXnSsbZi0rTv9bDCG9CiuUmYZ+G3Us7SupBCcPEuM4kE+LBZEcon6dyPfNfw= 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 (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=O2OWtURB; arc=fail smtp.client-ip=40.107.105.60 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 (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="O2OWtURB" 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) 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: 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-8?q?N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JyA1RGJxXF4CApMLGikxewCZbpBz?= =?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/OyE7x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iZ/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 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 {