From patchwork Mon Jun 17 07:29:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13700285 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 C3B6BC27C6E for ; Mon, 17 Jun 2024 07:33:42 +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=5caOLr1i6riPrx5E9Lig+7aN7+MC3exitCHLxv2dhjA=; b=ecgDi0gyQBppVL81wBxkBPz6r5 WY6t3E4pVVnq/RiWqJzaUfEpemyhiSVFS+rAIGCc3BOByuvFHop2vIzSZrjtChs+ZKRNiCpyIk3qO Vwrc4ObWaLPZ72LvYbSZGbME4Cfdid6D/Iuf6OBKvb1yC4qQBg8efLYRC0nFnrq/Jv5xqyr5vXZiU ayAUmfBxCQ3wXo2gs0lCnymJetPh53CCmoNvrNAWlBpVniZiBb/xbJj0G4VOqszy/1EiLdaNMy8Hj upaaAOq4ZtPekaqPs62r6N45m85gjh9xaJcbB7xkW+rZ0f5VMRx2fxy0uro8LFfrAnB7GX7e/IwRW dIzzDaBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJ6rp-00000009fxP-2Net; Mon, 17 Jun 2024 07:33:29 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJ6rT-00000009fiQ-0zyH for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2024 07:33:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gDNxrtFuea9TTkMlmVbWg/Ou7ILkNxJdA7hhwQ0j/DoXZ52d8jjO0X7XCGtvMLWlMJ122ie0FXLIHLwJL36vSGv36+opzWuOjuLW2OscXXzfF8wcO7rA6rKqKZOvv71wksMy+MkiZGb6/KbT6VPQpoK+T5nJmFg7pS6tbrZ5Yr5ph70V1mdegvlhP4lID6xXtRm/ZAUfOt3tpK7pnNwV+D1DArD+y1qdoKPY0Oa7nuCwHdxcd2Nl4xE2i8dfnY9jz9RE+P0dTqghhBRT38sYN2VoUy5W3c9oAbp5859nHsLqx788bl6ifr0xioFc1Bevv6wcMQtLbk1LBUNMIYCnpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=5caOLr1i6riPrx5E9Lig+7aN7+MC3exitCHLxv2dhjA=; b=ijWeJgrg49IIn6/cN9Y5O8P8mno+hUfVtxnZtjbPf1wNJwwGZfxVPE7ffl6Hcgy7d6ShAfZ1c0sqt8O6nNn3zkuI8tJpStOxMc2m3lW2kchXywY3whR9PMF25/9lLKK7ELtoLyGBPOUoSdKuAvsKVrIH5Qn5l9G3evd8p5j/trRyy2pPjbT4AIs5/2896eU+P6phiKeNF/9VLVHH1cbAsbn7rMidgZwUlP9QzZ1zfAxf5zVX90fY+6qvlDL8Hd3J7NM5sL1WqrVHeR19M978sFb7wCV/PbjQYZmEEwi2mihIGKOgf5El4Pm5de4XQQ7Z+9AphV2bm+pR7KtUb+OPrw== 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=5caOLr1i6riPrx5E9Lig+7aN7+MC3exitCHLxv2dhjA=; b=IoAVlu7xZWNr01Ot4D02afGbxA/WxlQlx9Yj3LzHSfw15HJscAd8KwbJag6duKrVomyYxvhLaja3LzGvxIKwC6csGNk4LYIWwjfWGjL6zqzghJ9NMTznZNXJLDmtzOno5mIg0o6iMlzNSQaY/Mo+BGHsE3kvg9TuE52wAy3irAY= 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 PA4PR04MB7982.eurprd04.prod.outlook.com (2603:10a6:102:c4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:33:03 +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.7677.030; Mon, 17 Jun 2024 07:33:03 +0000 From: Pankaj Gupta Date: Mon, 17 Jun 2024 12:59:41 +0530 Subject: [PATCH v3 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20240617-imx-se-if-v3-3-a7d28dea5c4a@nxp.com> References: <20240617-imx-se-if-v3-0-a7d28dea5c4a@nxp.com> In-Reply-To: <20240617-imx-se-if-v3-0-a7d28dea5c4a@nxp.com> To: Jonathan Corbet , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Pankaj Gupta , Rob Herring , Krzysztof Kozlowski 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=1718609402; l=2654; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=tPlMHsyGsirGELOluQidOr10orPzhBbS21AqUGHlWS8=; b=0HU2jB/PU3XFNa6ajgueJBvk5tkEktfT64GhQ4EamfK6KofyUnj9GSISHzf0b3Tdr1QbBvltc UJna6dk+Md6DxOPw8t73SoC5jPrX89q9dYWis+6eKRaOJZVadf2p6Bl X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SI1PR02CA0036.apcprd02.prod.outlook.com (2603:1096:4:1f6::20) To AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8604:EE_|PA4PR04MB7982:EE_ X-MS-Office365-Filtering-Correlation-Id: dc3305f0-bf15-49ce-7541-08dc8e9fb8d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|376011|7416011|1800799021|366013|52116011|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?bUHid5GzFTYuktBfmI3jguZPNFIggxd?= =?utf-8?q?aoT44G2sAkTSw0nRg0DWI1F8MN2/rZPfxmIsXdjB7a4fOhPeBVBljTUkbBTNfJj9j?= =?utf-8?q?peP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1KF9xUwn9T+4VLbej3unSzBf1R7W1ng2t4Lgbl38plxkTCttyTvWUher73e4NRj?= =?utf-8?q?eiv9rN+TGDIjXIwSPJY9x8bjt/9jxNFu3v37Gp7liOOjRxXgL6QBdbWew36yBksd3?= =?utf-8?q?tCxdNPbpTB7oqUB72tqtDP9whOQAvHa4T6mNwGOlwI/Cm0gnDAFWg98B9A76W8otD?= =?utf-8?q?ATjpdRKAnQ8jUNM1kxckSQf7jSGPh56Dv1oRxaNqBzPaljDdjz8KFGRiCA0vuzdta?= =?utf-8?q?eFaKEfQUWXmip5n/pQVvdAwMU3Q/eP/3WQyBTE8mCy/2SXCvXNN87zlZF8MN2Qwvv?= =?utf-8?q?1DLp+9UsFTPdCe8d+gWNAruvLjEPgrMlR8mFwX/H5rJWXkpH0XiuIxav8WVzR5O1G?= =?utf-8?q?28b5ijCwu3UO?= 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:(13230037)(376011)(7416011)(1800799021)(366013)(52116011)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?OMIFTbOoWhbZQtwTnWyXGMbQYk4w?= =?utf-8?q?X2KwWuOL/4LvCsFzX5YMALHd9CVdY3TbgoEhqzRnqIGdFRcZGSdzIpX+VbGfx8bqy?= =?utf-8?q?C+wt77ONwT65fVfhfKPsCe+E91wiYv2SbTdrxpT75cgnovnu7VCQAXNu4XBEAU2k6?= =?utf-8?q?6v4EpFGYNkuu7AF2XAFH/tALCGYVP90B806uqXDINOyya8yfud/BZpZhHH5koOgk1?= =?utf-8?q?WhMHsgZZ5FuBgRCERl6cMbl/nmG2iEoqPk5wk74MzpRlkyQtmhVKHSGR7nf8Eyndj?= =?utf-8?q?tH6zWoGrWCC0UKB6A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sXl23eCijTOps+khkRF35dtfxqKbG34thFpeGUDB5/le5BmFZ/1Ti?= =?utf-8?q?dd65JaR3xjbaL2Nn970wDEWVXUPKeIV7HTJno9YjnBvLz2dWNVKMHCLGvkw1l/PE1?= =?utf-8?q?kIyCD6Ps3iqLqrjuJrr/jA8Yl+JJ4a+bMXL2fes637/GrOb2O+LuELxrBXiTs/Zz8?= =?utf-8?q?R5tUh8U2puaK82fGiBaEmCcxwcj0SehGDSojZpPrNPX2L7XCos2mOQZDYVY/pmFvG?= =?utf-8?q?SKMvY6BgGY0tPZFUOZbfDxrZHwPL6JjXoSJCy+ZmhPiJL9+rbMfLO3q9hPqsbIJ01?= =?utf-8?q?jDsj581+4dZ4ma6KPaPsfj6tUw2xZdiL9YIJ/N/8Hyjnb/Smmrn5S9kkYEsrg9Cxm?= =?utf-8?q?O3JDqliHHQOH?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc3305f0-bf15-49ce-7541-08dc8e9fb8d1 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:33:03.2163 (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: xYO6PV6dE4JGc1J2IEPs1hgWaFzmiNs1Dja5amgzzX4jO8vFDplfH5EHpm5EfuGMYJf3bge91rZZ2Fhrz2Lh/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7982 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240617_003307_474003_3B9D3D34 X-CRM114-Status: GOOD ( 11.71 ) 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 | 14 ++++++++++++-- 2 files changed, 28 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..1725a243521d 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,14 @@ scmi_sensor: protocol@15 { #thermal-sensor-cells = <1>; }; }; + + ele_if0: ele-if@0 { + compatible = "fsl,imx8ulp-se"; + reg = <0x0>; + mbox-names = "tx", "rx"; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + sram = <&sram0>; + }; }; cm33: remoteproc-cm33 {