From patchwork Fri Jul 5 13:52:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13725198 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 DCDD7C30658 for ; Fri, 5 Jul 2024 14:12:14 +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=sCUmpo2s1rxaQvZph1haymn+Lxzniat2JXypac0pinY=; b=CFzHDKZmjBwEgIcuypreSxVwPH yOxKp5AnIDskmHdA3Gk/mc7UnB0jT9YPPVeB47hKDUtL2N1mb6NrU69/JeQPUzyBePyMRC8ctadnq JiVbrEvre+hTfeOsbO6RioJQi0xOqGpnogs/hfLT1FGUhyTbrxWLMTAtLxjSCdPrj+ZphwY8gA8Jt ulpXe9HZ51MAowoHc5hQN3MnDatl6D26dRgYSQT98Hdm1fkjcgsQEgJxy5fxQP++jkqO24OEu/5of 6e35VX5tX9mQSVfO2HuLeT0w3O7ZMHEpxNVXTJBgYyTO8gMxPw3Lahr/2R2Se1Usthw6MezAD4W39 PJMT50eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPjfP-0000000GAF3-2dd6; Fri, 05 Jul 2024 14:12:03 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sPjfC-0000000GABw-18cB for linux-arm-kernel@lists.infradead.org; Fri, 05 Jul 2024 14:11:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PQ67YtoaXovsrQjUvisKattQ5A5lFTenFHT2o1l0CoKk/R21EjUbeIuKTVsleQs2b/h5yrDDzm1fRXlUyHgN55A8t7ojULX2VYWgpIREUkUb+7Nu+EKG/QwBpSS2wkwxjZjcabod4Jq9X+KithcFQRxFAtlW5cGZxZrr8zntyLYuREa2F/BM48UFudbifuHGt8YExaS67gs8OWH1R9ERHtt0YEUY5pItCM2fMoMRlPtxmQl8GBIbiDgXu4QV/ZVQhcmCmWBD+jZ0R+LD8s4XWgmdxVaYkgsOEjW4Foq6/QDF2DQtpCATkWtt/Ji/3Rrs3o0mqOGCyhNmWneO636mSw== 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=sCUmpo2s1rxaQvZph1haymn+Lxzniat2JXypac0pinY=; b=E/SFC8yFWBXnjxVSD2rVSrTlhArY7piM0CP25ny/O15ZwWWBoyPBttooIPvt26LCX91PtUoGGgU/8/yGqhHdsQjIlp/xdr9F++++UsOVDFKetpJW50sZB81o3jacbvt0KQ8dsz9d/8tOkXdRNjHSShOyN+B+wbpRserOB4bljLmH0R2gfEuhDrmjISAApb0nOnN4BEEDsKXBM/VE2qy+PW6wmTyU6sY7uvZROwB3/OApBJqfomapqBrhQMcm6dSPCL7n4CLN9laiqx+9Ht+w0EQMaS+Dab6AXTRmhM0kFmtiuakdpkf9skPKBORJHIb1txoL++Ud8DzAhKKFJYcyCA== 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=sCUmpo2s1rxaQvZph1haymn+Lxzniat2JXypac0pinY=; b=o5DN74tkEeRBRh9eVUpmJbiqAcaU/GA8K+QjOCD1vUhWO29OwM6XuZLFWoQNHhPUUQ2LFA3BdDlaI9RloBEmWeyNPsx9W0V/lkCOfNs3VQp9Twd77Balk0yq/Zk4sjRsnQNDoYgHHNipYl7WCHuvUebOVt0Je1nrFuYR1mAfE5Q= 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 DB9PR04MB9260.eurprd04.prod.outlook.com (2603:10a6:10:370::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.23; Fri, 5 Jul 2024 13:56:06 +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.7741.030; Fri, 5 Jul 2024 13:56:06 +0000 From: Pankaj Gupta Date: Fri, 05 Jul 2024 19:22:42 +0530 Subject: [PATCH v4 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20240705-imx-se-if-v4-3-52d000e18a1d@nxp.com> References: <20240705-imx-se-if-v4-0-52d000e18a1d@nxp.com> In-Reply-To: <20240705-imx-se-if-v4-0-52d000e18a1d@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=1720187574; l=2656; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=/nxstPxF3o1S44yVoWukS18LDGly5k3bs7qlPg/JwaQ=; b=xQDVTFJadFwPlv3COL/lM+FmHHvHdjciJcWONJKYb5CvU9gIulPfsF4xZJf0pg/7Y1Rp/rGBp +S6huPcFxZWDL/jwngtYFS7g+wfwJ6fdyMDzXHPAaRePuLQN5UiKf54 X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SI1PR02CA0059.apcprd02.prod.outlook.com (2603:1096:4:1f5::19) To AM9PR04MB8604.eurprd04.prod.outlook.com (2603:10a6:20b:43b::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8604:EE_|DB9PR04MB9260:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c5b6069-a4bb-431b-9f38-08dc9cfa3779 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?LN7/z9zyZskHQGiiA84X/eQ1wmAsabe?= =?utf-8?q?/Dm6f5V6yHQoSMxKBzZVA+NzpXZbq5qmQFj3ZXIyi4++277tU4NeEb3uuat1NVpDD?= =?utf-8?q?PQaABQRjgniaG+yGujzB8erBKgPH8uYO4hhJ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Q+X22GuFPrRPt9v3+E8H?= =?utf-8?q?OItUi9GGMUKEq1pz/mUIehyyuUTwZQl60v7mzqTq2vw+taNV/6icBVqdSvIahY3Uv?= =?utf-8?q?rlbDCu0o6c0Mn+R1ceDloL1dEKvXyqe+NjFfwwLzCHpI1LstNAiF0uEp344L0chuy?= =?utf-8?q?4B7UcJpCeEzZLV9QoDohwYf0G5JCEytGhKuPJQFPovqQ+NJlrB5QrCcLLgZ7V6rzp?= =?utf-8?q?elhbdf6yhSh1YOIqTYC1BaUHjagVZqUqzyQPoEKK2JL+RH6O4gdw0xQfOkCRk30n2?= =?utf-8?q?07QsrsUYniepoVsAfu/8LAgtsAv/1TDbhaQDvOsRxjDK1JxbiCuW+fIfZeJfbWV5b?= =?utf-8?q?B9Vbqm9Og3THfeAwTZ/+/J+Tj0mcVlcg50tkiC9ekAXgs7UWRjFkV2E=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)(7416014)(52116014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ymom4p5CCzFLtVKMzP0KyHgGszSA?= =?utf-8?q?9nbbvFE/dDIgn+49A/zJYQYV/qSBibwLxihuRcgg3a5xbfBuC9ywFOa6bdGiYl8xV?= =?utf-8?q?xsNV3SKVw122lLngRA4STWBrNk4p1nXPEm98wm+zwPxA2MHLdP8bth79v3iIOXmH2?= =?utf-8?q?nMdympBE3I3ui1lrbYedtv+6jiGsINIWIasozqQh0KUFkYIWRLHa2h9OGhiWZaPcQ?= =?utf-8?q?K+vmXLyqYM7FwsCvwrLJXG5+Z5oeb1435qTVWv4DdVP8DEbMJ6QZu9ZUkuB3F3ram?= =?utf-8?q?lRt6q9ihH46i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DiOycaXizUx+xUW2ldUUjgMJTZw1nBHkKNXJmyt81Ep67fQaxScoT+Dv/7qI5M+?= =?utf-8?q?eXqZY3XkuQLdhBPdoJf09pkxMbA1r9TABJ1Q0nKGkjQ8wpPAGry9e55Vd6vDl6Ovz?= =?utf-8?q?LyNR6StfUaCKdd7bv8V0Nu6kIJcweCqoH/kbMYMVOaG00krIzqZnuNo5YY4iJhrv3?= =?utf-8?q?LFA12LRHfAdt+PMUQeu3AIh0mZ7PrQ7mHSCdpRe4R8QRspGfMkeYooBymqVt7dTK8?= =?utf-8?q?aO7tkBoF2I1GUZvmJZ+hi4GLoCQpcjoRxNRMJW9B80bfKLeKwygxTNEeDkh5lIe38?= =?utf-8?q?N2DUl647kxx7oWyWKDDDqM+kRWe72isaAR3TuaUff7xMfW5TeT2haN1QRrN/j1pq4?= =?utf-8?q?OePrwvALnBXa?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c5b6069-a4bb-431b-9f38-08dc9cfa3779 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2024 13:56:06.7130 (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: s4uj6nY+Na1kPiLuyGRFSq1Ee0QCe+vJ9shlzg2vS/YhnCGRahjC5uvDGudshoAOT6hzDkbm+D6s6k7w0UBzIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9260 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240705_071150_327603_086510CA X-CRM114-Status: GOOD ( 12.26 ) 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..cfa6d30a890e 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: firmware@0 { + compatible = "fsl,imx8ulp-se"; + reg = <0x0>; + mbox-names = "tx", "rx"; + mboxes = <&s4muap 0 0>, <&s4muap 1 0>; + sram = <&sram0>; + }; }; cm33: remoteproc-cm33 {