From patchwork Mon Jan 20 16:52:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13945016 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011028.outbound.protection.outlook.com [52.101.70.28]) (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 5AF881DF248 for ; Mon, 20 Jan 2025 11:28:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737372514; cv=fail; b=d10IKmv6+K6jzcIp3q1GoGDDawtuKF/IwF2m1orMesIBKw5yEgVslx1e/+hc+ub2/z4acxNkAs416fScHU6QMeHlkOM5igEIU7VXeFe4ZU5Oc1xFvuib+FAy32/V8j7wBMfpNAvlct/8QcJKf4WVfQPqiG9ddIR7OaAk8ZMZdOE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737372514; c=relaxed/simple; bh=erbSe6B4p0hgVvk6xileiJ/J8PXocChfVcqkpZxv0CA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=MqkHI4YfqbXsjDbFQ76aPqlF5eW/om9aNSt5TG4k5Au/mcTVLymm7uetVVZsF/nTykr/rkICPBwwMxuHSk+6baSp819mCZj30RMnekhRBoUy/RjnbQn7tLzESnv1qJFpm0G31UqNWzSIlxo/Ho2YXnuojVHJddfjPB5CRoGx9QA= 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=m+YL1QeP; arc=fail smtp.client-ip=52.101.70.28 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="m+YL1QeP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=B1ikUQQ9xfYpkukyHM3lcTdAULBKI7V3en3ceY3U9O8yt8j5zhVZXjRfczMISzatZDKRu0fH5eT/qLSA1G/K7hJO0EgQe7SXq25dcWGJxJISRYAs4Hyi5DZ1QQPSLNX2XeYD7DJTUgdrBA6typWlKQ/O1NXHkyQqEdyb2LYhTvsVq870bOYmc1/GvhbhiZbtbGlOU4qdkZkwcTdw90A3HWIXDLww0hcXF5bP1L+zIyYJGtwVh2Fn6eO7c7J+zFmfoJk0MS/eZjHAp2cuqOSFEqviLiAEeFfRq0LWn6gVb2diYmQMXAJI+vhkKQJsOzLgc5XNxOWDUv0znIxYk+rYXQ== 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=xa2l017+wYncDB/W4I/cdpcaPZinY/0ZmofBrgPGdkA=; b=i/3YDKzv06prMSVZ4kYHoXaL30PpHhK20vl6dQN9bBUCb0vyIB9kZvlP62rGr+OGByD/XPFGPvZnI3NC8FkmlJGB97BYrQ/+eO74zHt8KfbyCDTinCDSRuwS8U+8feAgmrynWttqcI2iWaKa0ZJwtPAAm8s1G+IMMBKVxfk5glgRkxZQPDhyA+M2q1mpZTkKbzyJnilJ2ZkCSRFbmZUdY6NgI4P2xHeVKMaqp+WLLfwFl8AH6CzDixnPV9IROdcc7XE6s5P7XmqPTtpTgY4AobZ9nhUlb9PVbYGq6wno49zcWt7Gt1KP5ngLx4GNTEcIioFAxj2hbz6QQjSm+UY7AA== 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=xa2l017+wYncDB/W4I/cdpcaPZinY/0ZmofBrgPGdkA=; b=m+YL1QeP6Z+b4AhkM0Et5HOJmJAERq1gIkbtIx6A1k9Hxast/pmU3mXLIzm7MKgbF7NyiUWxFpBeeVUZqLO7lM0y91NJimykjfUmi8fyPt9fZyj7sGDXqX9hrL33d8PTMMKwZ+itHRnBzcXbR8bHO29DJBYXOsysTcyxFIgqH8OM6XgI62xoBSxSxCuNnDdH2huZYCUGKcbkr8uq242CNkLQvGC0C1EoN3TI709nhD3VaxLQgKDrNlOHcFJYsc5drMP7HSWvrQTfzSY+KvtSV3Faad6ItrMbLe1/YvDBTPIxygeJBSXcdcqYVYId+5uQNBj0ZMh7MF1lRSy0T7Nnvg== 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 AS4PR04MB9551.eurprd04.prod.outlook.com (2603:10a6:20b:4fa::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.18; Mon, 20 Jan 2025 11:28:31 +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.8356.020; Mon, 20 Jan 2025 11:28:31 +0000 From: Pankaj Gupta Date: Mon, 20 Jan 2025 22:22:21 +0530 Subject: [PATCH v12 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20250120-imx-se-if-v12-3-c5ec9754570c@nxp.com> References: <20250120-imx-se-if-v12-0-c5ec9754570c@nxp.com> In-Reply-To: <20250120-imx-se-if-v12-0-c5ec9754570c@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=1737391948; l=2640; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=erbSe6B4p0hgVvk6xileiJ/J8PXocChfVcqkpZxv0CA=; b=ZVhJ8nZSXKyRRHCC1qFJ9LB4qXKF+M0/yAtOPZPkLJ6VzbcykZZD4h71llNsO2DkqTlpMu8fF pH+O1EeVT7IDawWyRzpHC0bym+ia4kaZCKOgrH/jpB3xc9gpNPIJtVn X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SI2PR01CA0051.apcprd01.prod.exchangelabs.com (2603:1096:4:193::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_|AS4PR04MB9551:EE_ X-MS-Office365-Filtering-Correlation-Id: 98f039ad-e3d3-4a2e-2443-08dd39459151 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antisp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j+KnRL5RblpxXET0tB5T9eQBL0fmAGd+1yLjFY9O?= =?utf-8?q?6hEXaQ0RFeBjs8X/hxC7wQPJyBAl/I5EdY3zQxwQuwDorJbn3GPVgIJroTe/BMl2M?= =?utf-8?q?TQBgCEQxwYZp3b8VTKfSBuSDEoZERjjFrMXE4FUdXAW/XphepSQm6zv8OBHUyEWO4?= =?utf-8?q?L4kbOjIBLNwWJ6AwBSRm+//Svygr7Pmj9kVYWaTvca6ekdQd3g5+IdrgqDDkgbvhJ?= =?utf-8?q?c+EDifY9R+PjbLxKoNqGT8vwfzuEPjLMGPfFhEcapRteAPtXS0yTi8vAYYArGv7ho?= =?utf-8?q?pNu4ipQg9Xnejsm11fau6HfWAiVg3xcTJTxFxVW1QD+ZfPlzEzu3fptDBcgMb1iQb?= =?utf-8?q?lE6vtvIgV9Z7rNgJXAtuenscoajchDWWwwRbUo6VF9YvKiFERfgf3JgyRv/iW971M?= =?utf-8?q?JyyIdV785SUKZY7gOGYPBDMRzbQzi0hitCs/IV4XuhVqoRoWuRst38vRe8UjDELW9?= =?utf-8?q?KxoyTo4nlzGlYqcoNamcYCU5/fvLw+BCVAmOsyLRJ/kbd+HO8cev4yvbGyFp82vUA?= =?utf-8?q?YZkeLpkbqMB?= 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)(7416014)(376014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MiInwbzpZIkiRBXQon3Gio1OAJ77?= =?utf-8?q?PsQfOGVBlk+IQemCfZxOh3JnzvubfBREh2pXFZnYvIJqeg4Hkclfiv468+JH9qcuP?= =?utf-8?q?Rwl7yuFqGbOnVYy5WKyIdf+KpYVSFCgZ+uC0NOb68t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XH/K0pkzpPhrFUN/gpTLAJnlRG?= =?utf-8?q?I1BRvsiazkjLr1/67zcvPKoJxEmoWSABPy2G6JyWqK3f3QXOKwNkaI/zU2qL8uNCD?= =?utf-8?q?RspqiRmB1cHMO5OoQg8iAi4MU6mqVOMcSgEDBO7f5ZdW6bnZKcRdyj6HD2L0hcTGM?= =?utf-8?q?4YGDAGz7GzPhOFDWMHOXpsC/hpSd69Lye50PIij1OpJAwLw4PTlcn1LGbCRIZmG7o?= =?utf-8?q?NFXMfap/HtC1ra4i0RT14YUL/NeAHGEjYFWIwLB5Ez5ltAibAUar3zXyg4ui/BXdv?= =?utf-8?q?F8kSCB72U2tNATxWvBS4dAbPJ+SMkEjpeeaXsXK9uBNZbsoUurACR8M5p8u4/P1Os?= =?utf-8?q?5pD9fuXL6fjMvyIe/bdiajKC8bdsduRQl1IsW9e9AFzK1tssGExGXFR+/MzOGkeGB?= =?utf-8?q?nANdDaEXZ9Jl73a1rqNibnpazfjERVomEWp4SN22NzFdqAOgRD9zsLLlfyWar5PJL?= =?utf-8?q?aN/aP8fqlB4tN3L1C6c+R/tkMRkdxyM6FZU0Vwu5DgpvcFFFRFLsAW8QybjR/GxZ6?= =?utf-8?q?jpIphqZF4YQm?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98f039ad-e3d3-4a2e-2443-08dd39459151 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 11:28:31.1356 (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: CAnSZ0ZdRddlh7CEBQFlunl/D0idO4UuRwc/foiLZQI1E+6IO2LYQk72FSDmOYCKxgIhaetDWdeHTZijfc8Iag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9551 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 290a49bea2f7..6e68ede329c3 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/; @@ -24,6 +24,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>; @@ -259,6 +270,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 2562a35286c2..976bdc4eb0b9 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 @@ -154,7 +154,7 @@ sosc: clock-sosc { #clock-cells = <0>; }; - sram@2201f000 { + sram0: sram@2201f000 { compatible = "mmio-sram"; reg = <0x0 0x2201f000 0x0 0x1000>; @@ -169,6 +169,8 @@ scmi_buf: scmi-sram-section@0 { }; firmware { + #address-cells = <1>; + #size-cells = <0>; scmi { compatible = "arm,scmi-smc"; arm,smc-id = <0xc20000fe>; @@ -186,6 +188,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 {