From patchwork Thu Dec 19 18:57:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Gupta X-Patchwork-Id: 13915091 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2054.outbound.protection.outlook.com [40.107.21.54]) (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 A73C5225416 for ; Thu, 19 Dec 2024 13:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734615224; cv=fail; b=q57oj6DF6g2sFx0qGvoiQgH2TfbMM7AGTjmd9N2ez+CWEer8XmQEkNOCPb8N3w7mKXqWk6aJMQXRnVTg+9WM3YFeUhEt6cTZZrfndxAttt4W4cZHaGCgg/nVym59asVULjXlRSKAov7v0pGH5lK/cXx6Z9MFtPSWzgiyHwBednc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734615224; c=relaxed/simple; bh=mAzNbzRWOh6wFu0SMI2UVtcJ4QuBAqfaQJrwAklpA20=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=t2NHWVMoQSDiHdmq/Hf98dK4nDZMC8yuEMjJTypOSQY2YY1+EouO4CoEsdYfTpCmhtCmROfYSj9bVsKi0N/XZ5jNagWsXUVwcXCcEEKDPEU29kk57Y8DGCVLhU+mZlkQmoCc5dFQ1cawoe2QbmSoaBfVe6TOjkbXwCdwbdVJdSE= 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=RXDx1Pgz; arc=fail smtp.client-ip=40.107.21.54 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="RXDx1Pgz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cS/CpqPd0wfj2v1mY1vYaaU6eyJmyRYE9Er27Tx0v8wJpC0PmFPYTy8kkh/vqma9rOeliMIn9h4V9GI/r6TGfGvwJXH7N9t4tEfjgbHUcIBGGvN1l2YcnfQa68gboQQJxLXq0w/OYsHh6rZtV/tS3QScrFJGToa3BkiYJ4BrczOdO/sZUwmoakhz/PvSFPJ0iuU6HHNEocxlQ4akkZb+sKh5OvmOecUQI3q3mW+TPCbjenG+UbwbujhrUfF7yhL+OGJzakertZ1LlPfVbiF80huWA31Whb2XO6mLGk1ksRWInMja5GK9xwhq7k+4C/qNcggwznFKB6za1AMK+jtUYQ== 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=wK/QCHsvwxI5jajMDK5bmLW2wqApLKVfmMXXvNmjNTE=; b=iJVvFFIMOaFqQq1umNxmjl2RAawlRvv/6CcV83y6wWdwrFxeUSOJR5enPuQ+RCMB6rT3x2XsKW/gLxA1I5YS1cZ9gawNn80PlzMxTkbNU9wasFWK8Gs26ND2e9cVcmZ1zpp+weA0e83u0bruLscMiFb3lwm8kFGkjQIRKM4G4q5+M11igH02LeGMJxRhPwTEX7xAaJm3KQYRg+7msNj47yNrqVERUZD44bC6OhtxwoAvO2PC+WPA+aRROUqnU/+7kxKtNZo/iJ27sUmIAoKmDRBNmtVpB6UrAgjjeQ3Luo520jVed/IMXIjDp8Af29dB0CzOx0+VYntVwQ49YTPM7w== 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=wK/QCHsvwxI5jajMDK5bmLW2wqApLKVfmMXXvNmjNTE=; b=RXDx1PgzxQst3N9czrEYrT5mFuuVjKwLCvhHq457qUtBVPLo269avDrXkrp6dUEOiyYnAWw1gs+sgL6SY48LykSqgy+k4j9eEHu3Jxi4mWXLI/Hrz6YibFbA8IAAAfIPQk8H8znAaeP3wgct5C8NmYjft3kPdLFfWQy04zYieA3+/Ma7oszy1lG6VeGF96X1mU0F+z+rKgUyDO4vTE5HYFOBDIZEPpZtBL0bC1jKs1ebWJu2VxZBhmlxxIvAFO9m8agwl6iCYXdN8AXjS5HLVp/aYTD4pwfKoTJL30Z3M0pmEZeyHPyHQJl5z7AKMESCdoj9h+gDV7t320zN0cLoqw== 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 DUZPR04MB9919.eurprd04.prod.outlook.com (2603:10a6:10:4d9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.13; Thu, 19 Dec 2024 13:33:40 +0000 Received: from AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827]) by AM9PR04MB8604.eurprd04.prod.outlook.com ([fe80::e751:223e:aa3d:5827%4]) with mapi id 15.20.8272.013; Thu, 19 Dec 2024 13:33:39 +0000 From: Pankaj Gupta Date: Fri, 20 Dec 2024 00:27:24 +0530 Subject: [PATCH v11 3/5] arm64: dts: imx8ulp-evk: add nxp secure enclave firmware Message-Id: <20241220-imx-se-if-v11-3-0c7e65d7ae7b@nxp.com> References: <20241220-imx-se-if-v11-0-0c7e65d7ae7b@nxp.com> In-Reply-To: <20241220-imx-se-if-v11-0-0c7e65d7ae7b@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=1734634652; l=2640; i=pankaj.gupta@nxp.com; s=20240523; h=from:subject:message-id; bh=mAzNbzRWOh6wFu0SMI2UVtcJ4QuBAqfaQJrwAklpA20=; b=D69ghsza+3fqjFdbQ/2Jt1XXY29m8aWZFIPUjWGn2Gf5k057rT8Suquc3XtiiP9PpapJjli6l k1F9RYGpCgtAZqD5piVd1SzKL0LX3i54lb/WpNDg7gDLu/jB5ER0ysr X-Developer-Key: i=pankaj.gupta@nxp.com; a=ed25519; pk=OA0pBQoupy5lV0XfKzD8B0OOBVB6tpAoIf+0x1bYGRg= X-ClientProxiedBy: SG2P153CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096::22) 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_|DUZPR04MB9919:EE_ X-MS-Office365-Filtering-Correlation-Id: 00a87e63-aa67-41eb-efd0-08dd2031bf4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014; X-Microsoft-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Vl0gbgLQizxHSsltulZsWyV37xBzqxOCnWGryMqze?= =?utf-8?q?cSjLlatPI71c2C7so1+VcYvDmEtu2MW8xnrSEc5aQIKD7D3zM+ywrEZ9WH6TviQSp?= =?utf-8?q?6WZXhyKRmQUnoKvsmLNtrcS8ZFP8UV39LMEi3M7n2t4+lQamlqrJsYuqhBUUYRnSD?= =?utf-8?q?WnsJYqGKJRXy1AAdkJl0CdMxALo2dtSlRDO9D2yRYK9CMSMsUkOjBBCzedRNb+lu2?= =?utf-8?q?ww6OCqBASiEmCK3Qtkv5/c0rrKJaJEXSthNJhV7ZSL0USYTUl04/2kBVtiOOOq09q?= =?utf-8?q?CfT5ChCBYIcaAi/AKa34U+7YprwBl3e0/hoL3yfg50zaBs0B7q8rIE2cdcfdqqID5?= =?utf-8?q?NnWtF7EdxZ1ZYLeGXE+MyCqbsGiuuD+Phb1sTh13wIs6hbnVTFsl76ot+/Ze5BVb2?= =?utf-8?q?IcePtiCgIzpqVLuqx2qxpgVekXpO94TCFbzvMxrLZXizunZFkVwaKIg74w1G5jeiI?= =?utf-8?q?ceBZEyIaGKE1VhzOuciWccsC9WyAq/gNkDHQ2mvP41qH1tlfcxVgD1fOjPoTGpbN2?= =?utf-8?q?GIYN7L+wcGI?= 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)(52116014)(7416014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iccVqGE4EcmoEAIGPlsoPH2WmFgb?= =?utf-8?q?tP3rRjZYQmS8UqFGXEKBXRuphwEDcqIYrtv4DozRof2L4CQgJFA24G90o/lulYXH/?= =?utf-8?q?nW6Yod1AHOKmeL2vxp89L/DC95C6X2su9g8BUDhGtzOl/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lhWLWg8fgWFQPqq2NVQ93Br5JS?= =?utf-8?q?Jhjh+xxDPCrBO9Om/NnBCkxgP2XnAs6/2faXjROkBn9Is4xgHnv4TIVaYjOk8bBSk?= =?utf-8?q?CDNKbApiBLUJ8pEAapzervXcGasH8Qr4d166SibEpDh138bjqQw4t3TztxUIL451K?= =?utf-8?q?2q3vWlHFI/WYT7s3uzS5/F2MupruoJe1urb+Mc6aoHlsE9d/2tc1f8q2HqbU1p2N2?= =?utf-8?q?0KgM/l8WVWaAMa5JiqQHSm/6xnKurfcd3FraI+TO4FKO1EtCFvmd1qvft+/b2zv/y?= =?utf-8?q?MDIJa2N0XST9X09gRAbi3wwfhmKqAR16i/0PPd7XnrlfKuau3hMLeyjxCrBcT3fu+?= =?utf-8?q?noi8ui+mPd/d1Bh/Wt6R+JYFCxpfpVW2XNbzxWmBhol774SQp0mCPY/jjIar37g2x?= =?utf-8?q?nESLHv00t4FqzmYipM5q2wXZPF/ujyZNzyGWCwE1NyVa6wz4k4yAGekJnYm+z12es?= =?utf-8?q?7vCMCh344M9PXj6RPRxS8COPsUPZo2SywfLLRLV1Xv2NOogSTt5eGfX04owAY4ABm?= =?utf-8?q?a7SOO7Hfv2JK?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00a87e63-aa67-41eb-efd0-08dd2031bf4a X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8604.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 13:33:39.2590 (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: 0HgpmLA50sPUGNszbU/x+vdGntIIAiDWPY5HO1ZHV2A1NNwSQLltB0Up5zseu0OCL6H/1c1Q+spcyoECDyE5qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9919 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 e937e5f8fa8b..f5963f4043c4 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>; @@ -204,6 +215,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 e32d5afcf4a9..f98629b7f4cc 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 {