From patchwork Wed Sep 4 10:51:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13790499 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010019.outbound.protection.outlook.com [52.101.69.19]) (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 05E6A1D096C for ; Wed, 4 Sep 2024 10:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.19 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725447347; cv=fail; b=drXk/pdMSB40llUzF71aXWfXpmGsMNjK+EfIuuFXq7RlSXv56e9W6X2+ZQcGiOme9IiEzy5nJZmH98upTg2znMeuVF9cRy91o86Ljdcb/tyeRhOAP5rabOJc/Ihxz4+/ppndAlnUFO5Np6r+9ARhKsZoTwXHA7jbPDoVr7uh8C4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725447347; c=relaxed/simple; bh=pYE3/Q6exoCLJsnwweUy9J21x6w9vr/mPHeIgg5m5qc=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=pPTbp1V315ksDquOk55TygyaS2CTPyzVt46YIBakDwu9LuGNgRgj2609vm2Ri33SW7PGFkawn0+0aSQwA2QYEfDY68UwCash2kuxGsW4uxBxw9rUcoKbmG08iQ2XJ3fHltYx9FooqVN8/7koaMCLDv1drqqDTRafDPUnnePHaek= 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=Zap9wGih; arc=fail smtp.client-ip=52.101.69.19 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="Zap9wGih" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=chDoTEBiUL9sDWzMZ55Ur1Izp+F550SP9XQSTNJ2BgoHyfcKt/vhyVgU7qqbi/0g/bkhxJL2oKD+zUMheuRuJPHum0GUQofTbrrAxtAfQ8OQ/cm5mEg67xM9FcJvz+LWYuxVbJTi6KCaqiaR/of08xx0EmkSx0gXNiiP96k/Zd9TaBT9yEtkjtfU8yUlUdF32+FyBWokzgfNGc3K9gJOWkd7MDlVJmxgLk3n/bhGWpL0+aneaLlY7qg4CQihlLOgQTITegMOJ6umI/m0UIJTqm3SWXkpcvofeqsexBpPvWwMY6eHixFCFAWCHJy2Z3b8SbMtB9zArk2rzXQEsSDnzQ== 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=xBDuXzy3b9dN9pKP7XhVSTCSQs5h8rHqQXAXzeSJ1tV9bLC3u1c9bENWjW8GtdeyQ2FgU4Aw6qBoF/X7SzHH7vuV/MYwBtkheq56doZKdhwnyy+Gmw7Sq++Dnz9klWUmG8pPFaGxQqJ+onb/gpgjVUZy8+uRziCQt64TQSIcifY7btIpqKGhKRz9inTADrnji6ZerJrjvvD8nSBThJpB6yQIP6hhM17Te0whXPetT6UX6ivORZm326Wx8x+uPPr3Jt896eN+IPS78rh9hYFaNEJoAiLQUWDmfrRNER7i8xfFuukxpyMqeU9BRZYZFe4Okg0/yOERxi8m1j/G7RadTA== 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=Zap9wGih+d8+qWSvbuOYbnEhJ4IRrPmHaobAKYzCgdKgB9wutsVS2fnsT4cdLt4t+jDq0N8LdOjvErOKgRAqH9372fy0wu0qH4+VkobY3rMsCa1A2COnb80OY96YhDOjWtoksplIgmgZV02giKgRO/72orJP4Vy5vUkEh9SApYvZRS6XEQIRFRe5FUj8mQ5ZXU8rG5QVLPjSLz3JyG6GYTG0m7d7PjqyhnjIYOV1OBPNu9u4qKTsM7/AkGl0htpa42Qsiirmu1PfT3nED+UzuMR3HyqbBcTrc6pGpz6U2y8zqZ1kSxje3JFVnrCz8Fsjgv/m2BE5/zJN4vMZp3bdIA== 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 DU2PR04MB8583.eurprd04.prod.outlook.com (2603:10a6:10:2da::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Wed, 4 Sep 2024 10:55:42 +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.7918.024; Wed, 4 Sep 2024 10:55:42 +0000 From: Pankaj Gupta Date: Wed, 04 Sep 2024 16:21:19 +0530 Subject: [PATCH v7 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20240904-imx-se-if-v7-3-5afd2ab74264@nxp.com> References: <20240904-imx-se-if-v7-0-5afd2ab74264@nxp.com> In-Reply-To: <20240904-imx-se-if-v7-0-5afd2ab74264@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=1725447104; l=2640; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=pYE3/Q6exoCLJsnwweUy9J21x6w9vr/mPHeIgg5m5qc=; b=UL3ulq3TkHxNvSP+HNajTVdPRsTkBvaVlb6Os9z8TSYJ2SUsKI4LlMqFkQVXzp5NweQ94Yd1z 6R2YfrDBXPeDLeIgpWnAblg7AAuE1pLrMCEeazqgsdLYuYjNF3exS8D X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SG2PR04CA0152.apcprd04.prod.outlook.com (2603:1096:4::14) 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_|DU2PR04MB8583:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c650328-a7dd-4a86-dc73-08dcccd01dd4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-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YJ9Mt79BNr8nwZIq0+bTgJCmQbc2lXCddE?= =?utf-8?q?J+PpxVbj/9+OiOdnKGuxyn7F5D5a7icMlctgvZ+qJIhhtOCi/ZPqkMPdU1PrpDvNF?= =?utf-8?q?yWujNf22BH37cEMnDtcg23AWcTtcCZVllDW8A8AFwNqyZX+NPPpJHMnUbUz5YIBQN?= =?utf-8?q?Ya1aJX3LwzjrH9S0bDxaoviM6dj9bbGckQtUEYYhm3Tow5RvPhOPtiIMN6H4lFjxW?= =?utf-8?q?dhdlp3QMYbs1TsXxX3ahwYRrxl5pi5LsbTDIObmtUvvNhg+poowDfG/VrHXF5ZShP?= =?utf-8?q?wyt/Ik+o0KQwaVwt1O0dHFFbzX6iX4hOYvZmr9uQ0Z6WhJmcwySZSYOoTNUeNS1Sv?= =?utf-8?q?Th3QXBmJ07GGP9PLskgjxiEllTJp/91rGhnlMTbGfc1geRpQNao44TBFJvLgfJNmL?= =?utf-8?q?QkTljzKa7isJ/yDJCdf6ikTVAglTVPAbcDXTBh6q/3tpubJgapXU++AGPXygFhtmC?= =?utf-8?q?VM6CMfajveiIH+N+I26XjUxrhcjfs5IsijXOZQR4ut5YTcoJdFzumP4=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)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0PYXaf9tuf5aoDtaABtZZH9DTAFo?= =?utf-8?q?Rbz98NMKqd1iQlJSB2D1vIQ6yrU23jAH7ZhFVjdGeVrzYC5WWOUtWxRGxTw+2OIe1?= =?utf-8?q?D+WKFZI2RyZ+zj9YUv6L+VaSsDX/IcXkS3EbUi8QO7wrfEDk24Iliv0lwvRuQAOk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-8?q?JQxBNg+VFZMV7/syWFaHCoE/b8RnUsgVTWWroOPNgtlax3mE+BU4JStOF5iv11toc?= =?utf-8?q?X5vUKVlhKB4njc7/x1BKuzKQXFvTYOzPdpEJmt+eMd1Y5ggU+c+Xk1l7wxjwj9zJo?= =?utf-8?q?ac18Sd0DOHQYY/sTzbBaFNhPzTMdo8ZSBZ1nc0m7CapLQkggkELmP8AJoCY3TrwlC?= =?utf-8?q?44xl74MZT4JHugC1Imq9wO9dQLlxyK+pAKOS0m5BQZRZCVH1Jr2m5T4bnqdW/3MnJ?= =?utf-8?q?Vpvfx4WG+6HDMM43kx7cJOGGvqqWCvbFemZ+qhVS3nOJ+DdEt2zilKpiG0UsffTrk?= =?utf-8?q?ERj3ldFTbYPnZHzN2k7kMAK+97VUlM6hYKEu3nHBbqkvKXXy3GFZs/pvYrdgx6ELA?= =?utf-8?q?+8iyfUT4kP8Q0J8hADKGOcDnLDiDzPjTE3evoHYzlyfsbzNYuHBMHzTo3D0d6MVl1?= =?utf-8?q?3jTx0xhq1VJEtM1jbvZSqdBx/hdMNOi92tehK4Rkhro1q4zreYKDh80Q4L6v2yDyC?= =?utf-8?q?WSy7PXdaRK27?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c650328-a7dd-4a86-dc73-08dcccd01dd4 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2024 10:55:41.9395 (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: DUH/X+wyQ6Wd9JP7efpZh2lZ5wJgetGLtSEeVe8c7bQrWMfroLuGaQrEAfrwU5wigazunGLI7Wsss9IoLxj55Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8583 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 {