From patchwork Mon Nov 4 15:18:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13861540 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 3ECF5D132DE for ; Mon, 4 Nov 2024 15:30:55 +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=mt3HIoipKNrXW8ENwMppUNxsT1 FJYNmK+xwW0AZQWElb9ViIUOYwRS9sfxPxy7HXkITHEuGPPR5ObdvCVSxkX3oUTjpsEYS7QwrY1K6 Bq5TAABgfrck8lefM5iPXjHikBl203LPLD7Qoy+WVd4OBn9Ifb0t4FwiNkJagXKrqqx/MmCWbcwzA mFlu02BZTEu+Ut/Tl+rHq70AZa2vwbjLQ3Qmoa/WRiyf/+camKlR9E7v1uA1lcb5Meh89wZeD9bnP si8KfB6x5RREZTNF/bzFE6CqNyeJ4kK9tV712ayB5Y/ajhuqE+rh/zTrfVc+cD75iycqZ3/bWZNdN tE8KM54A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t7z2N-0000000EDBw-1qHY; Mon, 04 Nov 2024 15:30:39 +0000 Received: from mail-am0eur02on20627.outbound.protection.outlook.com ([2a01:111:f403:2606::627] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t7yvc-0000000EBte-0b3O for linux-arm-kernel@lists.infradead.org; Mon, 04 Nov 2024 15:23:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sY8j//p1L7S6TC8RDJ3Ms4kYB8DUi0dV1JR2fErC6vrxDIEvVKsumksxkkHFZBcDB53y+K6Am5m2fHWj3mPEBXZJUDH6DSFIW0YqJqY0FhmmJ4/sRV7rjbbVRGdmOSlnOevbvLDvALOPFMhC4/7AK9erT4PJS/0Z/lmMBD08dGMdTJ+S5dx1iB9N0wmlXXGMp2goqaes98Vzvydy1KJOgpxgq3ODVSF4CSyK0u4bJCBFDcuC9jRdfcchtveTYT7n2yQYkXeUIoyWBMHmSSnQHJ1T0/wzXltB0meHHow8AmxM3UUkW+nhGzjGEWJFyEwmZkZUIisdnGtM9v10ZXp+lg== 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=TQplHTcp0OaMQitjTUt5x3UciwdgUifFC5lE96xWngHVDzk5zC2L4VNN9dlr3aqYH/20+tzwZDdTbudpQSDERMhJZUDEhsEIrB8BiPJt4yz9gtdFIjoarwl169NYXlR5Lcza/At2oUmtbZudWhCeSiLQlHk8F1TMUvdes5Qb5PUA6NYkjZDwV+6dhOqw+nT+PPtOSTV0ooudOmAnlEs531fyIsgho95xAh9bL5YyiN/ge0z1cAPeZ1IytZSAbHy+aMG1yg4bQN0GA+b29sb7QffkthRlE6GPjvLdck23TeTCa8+2MZGIuJV1JfmACybu6LlluLKvyJGxDd0EYcGMBA== 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=iFuD+KaM7XLe7z/QC4HT40LPDlJBJmwVJ1u/6L4aKGwNQymg5D7Bv9iSspYc0xDE9jqc862KygffEhMIrvojaGryNg9pJWWfOnDIcze7YoJ+XBR0QW7eXA25i63B7fVpvhDMh2CrGJYIMSBUPGHGWPpOrojsdEKavU3Hjpuv2qT97H+WJdXWU948yxPLcE9Q7sbs+0Lt0xa2eLzAr79ogTytv1li8uxr0+bndMLOPueZIGzCxlX1Si9NTlx4+Obu1E03EAX9eKOZfre3r8L7YxU+hV6tTC5CPodWZhII4LXaYRr2VIgJnoDxyoK5GVUEPcuiCtb3JdH074DKpuG24g== 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 DB9PR04MB9451.eurprd04.prod.outlook.com (2603:10a6:10:368::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 15:23:38 +0000 Received: from AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827]) by AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827%5]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 15:23:38 +0000 From: Pankaj Gupta Date: Mon, 04 Nov 2024 20:48:40 +0530 Subject: [PATCH v10 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20241104-imx-se-if-v10-3-bf06083cc97f@nxp.com> References: <20241104-imx-se-if-v10-0-bf06083cc97f@nxp.com> In-Reply-To: <20241104-imx-se-if-v10-0-bf06083cc97f@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=1730733536; l=2640; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=mAzNbzRWOh6wFu0SMI2UVtcJ4QuBAqfaQJrwAklpA20=; b=BwtpFkkyOcytse5DDIb/SGMFGXycJT9LT/bawrKHKQfcQ3IQdqFqwE2m8oT1pfwWj5UlHzgtU uk5TxsrqpYHAWb6RqCaM7R/siLtoxu8gZjyUfQYfzO9bxIF4tL7/9pV X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SG2PR06CA0214.apcprd06.prod.outlook.com (2603:1096:4:68::22) To AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8604:EE_|DB9PR04MB9451:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ffb19fe-aae3-4e1f-5d94-08dcfce4a7f6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-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tJ8Q4fewDJHJG2txPKZSVFbAgYDTbHEmtMtvtfM?= =?utf-8?q?tNcHWTaMZchHrx6pmd6POxSmHZoTPHG0wqZoXsbHjBd11HlZaQYKKD96B5jVsFnqJ?= =?utf-8?q?8AZn2dvAdbZXOR74oXpn/eCVo1Nm+nDLsN3Zaht/jwseT5hBzcoBxUhsvYAE3w2CT?= =?utf-8?q?H08+QoGklakJnRySJVEQ7u4ogEz3cvc0SCq/py7xdGw9LOPclgtHWdJV0JyniYLzH?= =?utf-8?q?NQDQi8W98c8iGR5/y+PBwpVd8YOSLbBI8YpXzXW29OvoEWWMVej8RhQjna8hGZgQS?= =?utf-8?q?INX3aGjn+xhWEIlfUqrlpMOst0lx2HrAFyXr/PYXh2u79MbjYyR8Ii9cWFMS9uB4Q?= =?utf-8?q?+yAmQnNE06NawTjUPm7ldYonaez/Da/DAhQZ8AyyWugGgo9f/3QrF+o5zcr5OjwUk?= =?utf-8?q?2vcerHBV8zcJaaOSC3tQl7OaK516Bqi/pjOG5hoZq6w25fjoiN2qhm/4=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)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?YeDdWEm+P1/4LxOvo9WireS80q2B?= =?utf-8?q?JV7yTRhWtJGDToy11fpP5v+f6brDCGB157rHIGYGqNs3K1vHutDa6Zx57MDtAt2na?= =?utf-8?q?ci9O6OBXYwqDIC6dW0M7URQpqZB5qapX0iEsTKC0su1vOoT3SdOEpLHy75zOBMr7/?= =?utf-8?q?/gjUKqJhRU0VeUEQQfEIGZm+rtyrc2kZF9eGmpcbi0l6SXreFjfo3s21LyclH9Reb?= =?utf-8?q?/7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= =?utf-8?q?deFlEK86MNyHZxvIMJvge/sIQfl4K1I1Poaqv/dNTaKe5SA6tEtAgyG0RR81JyFj0?= =?utf-8?q?CsHxPVHCBvxTBN6DMv1XsHiXyIarBJNh5G7DvCcytjC7qp/V6lC4VPPZAllxGjKVB?= =?utf-8?q?MNT7zwrTp1NPNru3VmiajUz+ans4OiLN5RjJRjfScfjshGFL9X8UPe92at1hedh1/?= =?utf-8?q?4t0tY/Mw13+6/Ah3G95L0O1zYSxnzvfkcidCWXfkcBvIKLTJ53MC0sYSY5oLuWIAa?= =?utf-8?q?izPb/EF054gyMgth59hAmB5/rvCwuUQSpSNKycO/w96dxN15VQQ3YwdzyeqPPhoSi?= =?utf-8?q?vDbuapx73X2gNIzNlxNHcTK5BXUrlxOgcZgNQh96alrmDNk2dWlhMQVyj3HLmOWod?= =?utf-8?q?Inz7uAMWTc6LIzcetmAX/2HPOTMHhJ5Ms9jNc1lG+MBtXwYfqbJw/rERdEn5awbCi?= =?utf-8?q?JE5JcNKs6fVl?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ffb19fe-aae3-4e1f-5d94-08dcfce4a7f6 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 15:23:38.7134 (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: 6o6wJw3tPG5x5aWjvGiHXN/oKYGOzmqvKWTEOCQSLt6J7Z+TUZRCs6f1U1rgoilCc6QuqyvWcdLQjPvix6fmiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9451 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241104_072340_230167_E7676D2C X-CRM114-Status: GOOD ( 12.95 ) 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 {