From patchwork Mon Jul 22 04:51:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13738269 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012045.outbound.protection.outlook.com [52.101.66.45]) (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 016AA199B9 for ; Mon, 22 Jul 2024 04:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721624121; cv=fail; b=LZd1chHegC253YLcMYJ6SNn7Ln8j+vlgm8LeyKu7+AHnhnhdCqdNfURNJl9LASx15DoGEmZ94ucJE+agpfU7vPVzz7G3+ksGF2W81k4uAVY1l2OIFxxZmd/1vjM6hr1tmru9MVLxE0PiRgArUjdOvzfpJhEShDrf7Ja1avmy1D8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721624121; c=relaxed/simple; bh=p01y1F3mtu4/IyjRRrfQFm0niw7DcIt25jToCIAh9cQ=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=cnmZ50leUm/x6xyWTkWJaHi8zAsUBMeXiNG/I8MO8CjPycR6FyU1lgPMmWihHBRI2BBIgjWolSMs458SHSNCk7OL2IAIDgfukFGU6L+iRoU65E/p1cpXyoXqkYnBaMlX3AH8G33h+jXeMxx96ZvTOG3oad7Cgf4TTa+cHjerDCM= 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=jUXsDQwg; arc=fail smtp.client-ip=52.101.66.45 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="jUXsDQwg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pu+cyGp8+RxQcsBJUC8z8BFV9ymGmaAjo/EeVjyq1cLiAnW1oI+nCMZ3WbryiWGBMus1KHzTlL3SXcP8uvEI1Dd3sInum6L5Y46lNhsIc8tMh+b+aMMWcKRERKEyoiCeLNloL32R8/Wyvgjok/3hSPa3fHOxWWUWSgf0mxsY6WjVKU+q62zMWRVOw9td++EY7Twd8hQxWccdcyhvu8lRgf3u9ARoKK3bHplI3JP7a7NSfboOuHjowmxKWLbdsUFMgxPMf+K7gM0J6AeaJOowBqT2/TeEm5YQREEAEguHGRAhfhOVPSrhhCU8MENdyzgn+G62q5oRGiwwIwyZxDM8+Q== 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=vUwG4D//bYdWW65zaoUU+xIqorkaZ+9JNmzPUZxW9jk=; b=OsUgrN+jb0JtgNEPwTgDBmF46P0nRyMBcnaHar1myrwPl2r9IG0eV4BqSS7ryqJaBUCbvThlKqa4Qep8ef4KYt1tDXBntQOEl7R6kMMP8zCIG6iaFnQXy+0RnWDvaPeWR+or7r/Y0uzdFaUncJJYFasWsBv6fwzeskz0watXDQCVh6eRk4OZ2RnIUJt9CLtRRBWVec1T/KdCgbkkNG4tng1V7T+hV1M2QM10BCyJk0eM4549a/RRGp9E+Fnwx46z1V5nbGOGov5ARIAIQngavfstIfRWtztyWFgWod6yDQnoQrtjt8rJHzLmvQ0d2odDaamDIJ/onoLtijNGADoq3A== 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=vUwG4D//bYdWW65zaoUU+xIqorkaZ+9JNmzPUZxW9jk=; b=jUXsDQwgqzcfsu4alWOaxGUceWxeaSFo04rBGzkXWovx2X5J7KwAt7BiS6ffMR7tnZuqlGOv/p58kUUixAcdsZqCk9H9jFM3NsiUahXUbh4eCLH6Ys5vmUy+GT75Q/jVUeVu16hzXtwDO1Fbvnfl4OrHi0icNU1biNkw32cX17c= 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 VI1PR04MB9956.eurprd04.prod.outlook.com (2603:10a6:800:1e1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14; Mon, 22 Jul 2024 04:55:14 +0000 Received: from AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827]) by AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827%3]) with mapi id 15.20.7784.017; Mon, 22 Jul 2024 04:55:14 +0000 From: Pankaj Gupta Date: Mon, 22 Jul 2024 10:21:38 +0530 Subject: [PATCH v6 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20240722-imx-se-if-v6-3-ee26a87b824a@nxp.com> References: <20240722-imx-se-if-v6-0-ee26a87b824a@nxp.com> In-Reply-To: <20240722-imx-se-if-v6-0-ee26a87b824a@nxp.com> To: Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Pankaj Gupta , Rob Herring 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=1721623911; l=2645; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=p01y1F3mtu4/IyjRRrfQFm0niw7DcIt25jToCIAh9cQ=; b=ls33F4ltYc7NeUlz8EpN3sPMwUCwjnxQIDb5EjodE5V4NDHee8eTyOFx6iwSxQ8Ddkk2l8sj4 lzQuIGtawzoCf0zxv6PBftP8zU935trgxd8DmIwfqkgrojw/2ZZdTSh X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SGBP274CA0018.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::30) 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_|VI1PR04MB9956:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d512ef9-28ed-4ed9-78bb-08dcaa0a7947 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?beitens/n4uELlRWwefTLmD4QmPCUKo?= =?utf-8?q?sy2XAKV8Zhfhn51UvMHJTr1zliiwscwK1oGRpFgavjftPASrUoWq/sv355Dh6IIec?= =?utf-8?q?YnXqJZGQOAoHTu9x4S6/uaQV8wZ/TcPe6coEiw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v637eDPxXHd66jTubfSgZho1UaRv/enBUd9d?= =?utf-8?q?mGvOkhl0gh2lAeAx1TVCOtbT8Mb1nhUF5Yio1SQvPBZNxt4F0kavrmr08bElyF7nD?= =?utf-8?q?ZiL7Hmt/WtzPdRLoQcrNZ0nVZN5ZNWkUEb9Pxq0rmXQL7mfbeG2dsIGprZRzPoqMs?= =?utf-8?q?WBFITK0QiS6cn1aSF9q+E9whbakFo6eE8TnFlbmu2Be2fCyXMVzYwL8CM7NuiTCxC?= =?utf-8?q?ZSfMsDJs7uKWY3SY5JtE531tHhzQCnKNoBKUKkkG39PsoyW2FwkDXdLZrByTgn8uH?= =?utf-8?q?X/1lA3NpgB+L8XpAXzXkvIBb6XW+SMgS2GRK7mQVs/L1FoAeq5ybFUemSxo9YfllC?= =?utf-8?q?2mKi+80PfF6mstFIOcI6Ugvw45Oo3c1nnGKvuu9eUX0JAumiK9Vi1UM=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:(13230040)(376014)(366016)(1800799024)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?blsy5VejVP2GMXygIYPGcd0vgTaP?= =?utf-8?q?7gtZAHmzo0du2ivktizuF+hhGlVigdD8FHZ31+hbvvDaY6ZSZMb358RqPzV4ms+/8?= =?utf-8?q?4zL7ggOy2VzfeLJXUNpayMOckwdlwsowj06aU0I3NMQHm3FFSjZ/n2vSjRl+rY4Ge?= =?utf-8?q?gCXKfZBbPXTkE5bYxd+AsTsznj4spasujFYbmQ8LGDPx3VmBGiNSwwn0Bzuh/Idpr?= =?utf-8?q?YhrRc1ij2tPpCyTZTzKifDGnIsNRvlQSuLx8Kq1EArY/NOuadgn335PhumVROelHy?= =?utf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8?q?w0nvLZ7925ZDfxQ3BjjtTTHtDzAK3nZe+MDAQiVCIpKL8+zR/Fr4lWKrP1M0uTQ56?= =?utf-8?q?8V0pc8ppWpRZdfMo9M7HslqW//51j1CPkYs8aXre4YXN8+4Gog1Ph2uLfC4IrdrEe?= =?utf-8?q?6WGx/DZrqul5pjkM0V5ZspXDi3x1W1fnEWtPynr/8ao3tB4i46IYXFQWwG0IME9jc?= =?utf-8?q?Uhf5d/qTQCens1FPLyoQvus9ZKP47J2YXQHYnQekg3gWMIZXDsLEhkaIqXu51nVX4?= =?utf-8?q?9W6cdVsIjJzOepRzIJYUmuCAcrJ+IPBcdJIUXY9Cb0DOmRj8t8oySRRO4qqjs90Jw?= =?utf-8?q?9dBcmB9r/JIOUYdbek+xH5ypSq5UISL7zQmF709zcxrGMQLJfUZD0nPrN7DVYk9gC?= =?utf-8?q?rhi5BfEZ98Ag?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d512ef9-28ed-4ed9-78bb-08dcaa0a7947 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 04:55:14.2699 (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: Jr1YILFJes7gl7XAZKcEcQRrq1JDXDtS0qmmDde7iCk1c/mcqc5Ncq8VSsSu2mEGqK02VK4QPR+KC2IxpNfe4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9956 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 24bb253b938d..ca8958f28a83 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>; @@ -146,6 +157,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 c460afaa76f5..94fd89d18019 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: senclave-firmware@0 { + compatible = "fsl,imx8ulp-se"; + mbox-names = "tx", "rx"; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + sram = <&sram0>; + }; }; cm33: remoteproc-cm33 {