From patchwork Tue Oct 15 09:01:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13835940 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2084.outbound.protection.outlook.com [40.107.249.84]) (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 EDA641E1A1D for ; Tue, 15 Oct 2024 09:05:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728983150; cv=fail; b=VWbv3WQEzhR8ZoqL2Rzo85bdDPzKubyXoiClZb02qrAvzQRfS0Hq9QyFlrkgdVaNxIe46q78IqJte8+++bcunwJrdDSihkBbFR8IA43vw+iOAvdR3ZYFK6rmBUP+8W66wLUj+41XWN0op9Mx3PMtyQMs8/Os4be5pK1PIBulPVk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728983150; c=relaxed/simple; bh=pYE3/Q6exoCLJsnwweUy9J21x6w9vr/mPHeIgg5m5qc=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=N0HECHwaT3G9DX8M3XLh+cSdtb6l1omElQqfv9f+gXE4qzrGIotgTptOmqXGViwb1lH/HOc+xEgCxI6fmTq1naaVLHfNXL5fOP7i3X/+RI31+QGTW33jsGEFcal9Rm8QwRU7a5Mdh1pm886qLfTnL/lKPdntR3wY9Lg4UOp9pCE= 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=Zb1KIIGf; arc=fail smtp.client-ip=40.107.249.84 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="Zb1KIIGf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wqZx+/PlRjQ9OcKmltgYCQ7sqexQGgoOHUok+Hj/x/eTTnQgXOI2xgdn1Aw0VJNpm5zZDVOhyJtvEcJABSXDObHCPZIbRTlvp8A9MquYBSVUm4gF2JsBmI+ICYk5t5eOGzMhq7wymincNCM015qx9BLUU5hja6zas/aDUrHBjk7oDOvOlQ82zmdsSuMEfMiLFwcvc7u6UbV2Te9+sWiAdTAF9ZIPt2rUkSaYx5bkasniqogSruaCYUSmlZjL4Ebed8KeqYQrKmCmgfj6ydBZMW66lEffUHFg5iGTDSOLBXUF/iq2zXwIal7YV6lXug9BbKuxUz+dOit6fl1XBkNjpA== 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=Gtkzixnwb0RPmDgVy9ypv5aH2wWPad0rOTiqgwx/eh8=; b=TEDEelsbInsAPhsoM52Kv8P34q0RM0gAc9/7CtRjUjOHn5bl73fBWfcz+VupfkcinLFVLJCGY3lrk210D4VeXtXb7N4Jntt5QfaIaKyb3kHbjCfXDqNfPQQsxb3Im5kLha3v17bxX7N849BRlSPzbGGfwLa0Kp8ld/6ycED91GnfByc2rccMtdQWAmj0d7vWTqnYV/JP4niXz8JdmAVWjf5XwmQTj7q7T7NMH6OB1rJOfKIwhIS4hWUflSoLhrIXL+o9pq6gnSSGKn+oik4Z/JcdSlHBjj6h2EZ5eGAmNEg1WxQ8jkcV1Kdw2JlAs8XQqdZXFYO1DYRLybjGn2V/hg== 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=Gtkzixnwb0RPmDgVy9ypv5aH2wWPad0rOTiqgwx/eh8=; b=Zb1KIIGfDTbDmorwJGGN9rQZCYd/MnpBCZazKaFnXoqt9F5m1RuNa73Wmd1qte5ogDAFMH/uy99WUGmF4bwXP6DiLePDerrxjL17Y2Ziu0ahsAvRJeR1eoLKOOJ0au0qdFrMsxrKPbDemIgSsIOVqJ++fTLJDG6nRkf0RJ0jAvNMmghXXL+GgRc0jhaVC3QzFIxZlvh9vBy7pNhWQ3oTptdwfTVWLvSrVy/G5NtMCczFvs9usGRnrMJ3FAg/8VTx54eOMZpNGzkAk+rC1tBZbI90GuZ1YNPZpCpuFvS4RCZSAB0/i3clw6GEiT1PpWHheDwG3O87LxenoBLUl7hj5g== 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 PA4PR04MB9223.eurprd04.prod.outlook.com (2603:10a6:102:2a2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17; Tue, 15 Oct 2024 09:05:43 +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.8048.020; Tue, 15 Oct 2024 09:05:43 +0000 From: Pankaj Gupta Date: Tue, 15 Oct 2024 14:31:01 +0530 Subject: [PATCH v8 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20241015-imx-se-if-v8-3-915438e267d3@nxp.com> References: <20241015-imx-se-if-v8-0-915438e267d3@nxp.com> In-Reply-To: <20241015-imx-se-if-v8-0-915438e267d3@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=1728982877; l=2640; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=pYE3/Q6exoCLJsnwweUy9J21x6w9vr/mPHeIgg5m5qc=; b=8e1Z0/Ti8N9KWehTPPydtBSrd+kH5UfAUk8dTrrqfLR6hNLuE4urmzlOxD1HP0pzCTBGeQaE9 O1p6SXtc3sFDWVffxCCWJmfMMLrMeTUDD3vC4zsCJ+2i29clSlNCrgz X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SG2P153CA0019.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::6) 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_|PA4PR04MB9223:EE_ X-MS-Office365-Filtering-Correlation-Id: 5344a3e8-8357-491f-62f5-08dcecf88ca8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|52116014|366016|7416014|921020|38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wAQgcGHWgdqeb3AFe/dUn0fGI6UDl1tqrSsWniC03S23jdW5BuRsP322r9bAm?= =?utf-8?q?KvDUSQpypgObbRIZ/zjy0zENj41J/p7OqBZ6II4nYM9ZFA1GkLZxpnXGxEhTCBOj/?= =?utf-8?q?Ad0gwQB6Vqd4XGHItw+44x+itCj73ttGT7+q+v6HXqYllCzPmDzyqApQqagU/eChv?= =?utf-8?q?Jd+e9emvLWbHxV1jPCMLeG1Iiu4+1PeTicxH+I96Q9TnZUQdV2AyJ/Pyk5l1IV331?= =?utf-8?q?qQAjr1xEdIAlyJrVn3FYlLMG8ZFSvHgzsWMisI8+I1gbtBBWNVnoHRNQLWB30saUi?= =?utf-8?q?NM4qt6LvoQUcoYLFyikdEeaouhkVkwvUOFRnvpDQoW2XOyanXbjRuDTorc93BOKFV?= =?utf-8?q?IjJ3Ek53DbHGHd3NwL5paQV3kBfow3gzFVMKsPs88b0h4zP0fFkhSNDWQBxBg6z0Z?= =?utf-8?q?nfHwjpH7qYrHhjrXB19pyNTIGZRN3binMz/E0gIpqOllUpEriEkPg75s=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)(1800799024)(376014)(52116014)(366016)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6tLFcXLn5ChoelB43+Sh910y8eoS?= =?utf-8?q?DDIYytNCpUpkf+DYaWwxmTBusrgh0VcziqOw4DKckk30OqkWzm5/m4BPd4uTAVw74?= =?utf-8?q?JzSYjToszutHGumxCo7oZ8VJ6YNqRL/5Vo492XDrCAA+06DrKr6mW5SRQWTyTSdas?= =?utf-8?q?lfV1PqRa0dPpIVzsefKIeLAXRr8X+gfpm8B1Y+L3iIro/FaDfIBxwBC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JOrz2QIP+?= =?utf-8?q?d9ASjMo4TEGGo93K1x8qf7v+iRuPSkNmjOM48074ngQIfGnqGMBdjlca9Yh0l6EGC?= =?utf-8?q?HQjFlF6yihBTW297Fqqx/N5VHBA8gKyS5Bxn/mlTCfiDXnXBqjjunkknoa1IQ6qc1?= =?utf-8?q?855WwRTA1eYSt2jyKIOJWBNUX9mgFuFNr9IYU9UeRcTnN/HKTO2hCgTFWXTPH8fhC?= =?utf-8?q?hMA63OUlXO6bkrl4u1YcIpiUOwrpx2ShDGHXkf+dYjB3eKCgpOV2fsTTyIjJptNvB?= =?utf-8?q?ylKG6Z0hUb2c2fVCkXJ1xoRR2kRkBPAAg/U8XD+zfkvp0DWYzKUHiaaGogtQL6bk6?= =?utf-8?q?eMAcjkghc/f4jUZf6reuDFvpgwSWVSpU4MQ/Kn1zzEyvop2wYoUmWcwn2WsojpJa+?= =?utf-8?q?WoNgS9XGUDUailA7R15EmnNtIeyk5TNS/yJURr/WyCDcamKDhiUrEkuF7JX1Mpapp?= =?utf-8?q?Df/mWBRdw2Ho?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5344a3e8-8357-491f-62f5-08dcecf88ca8 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 09:05:43.7099 (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: I9kY+Ucn2PDyUE2N2dIRaq+UjUjt3+7DNKMhJ6DXKn2sYjzVCRIm2hahB3rhX102TYp/5DVL/v/YcYlYMdgcBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9223 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..914d61b2275c 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 {