From patchwork Thu May 9 00:45:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vabhav Sharma X-Patchwork-Id: 13659299 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2069.outbound.protection.outlook.com [40.107.21.69]) (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 D7A051BDCE for ; Thu, 9 May 2024 00:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715215547; cv=fail; b=XI2vapnbONYKf7GS6yeaWk4WceZYKzXXkhV4segGUvhNxZ7B/xIKd4GgNyI1L5tP9Di3E+RD8ZuC0ZTKDWVEOMFeAKbDLypcYGmaCeNfZPzRx9EF7UeLZBQc8OvBGzw9Uu0f7R+O+xnmdHfXZ2IyGaA3PHe6derBepVn6tmlI3I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715215547; c=relaxed/simple; bh=7ifINYCByfo5Rm2D01X9gpRbpguxgJzH/s1a2oalSGE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=THhzZrvd7QNAEgHAyeXJaKb5dhkib25Uk69OaSA6GxEuqOqAv1+8QyU7paq4mbprey+5aULNiOLzo85w60f+4MxTBZYsgdH6Tq42fv+8w8xReRdR4mlxlkLf9+4mVNfZkDKpwfET08NuFUyJGYzld2/hGp57HrrS4s94zecQMg4= 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 (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=gRMGHo6d; arc=fail smtp.client-ip=40.107.21.69 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 (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="gRMGHo6d" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ewv6KbmbWr2caoRLEj17PizqOnNwmO7LSHXhYp6fbJkAxOHISJcx+rzDNcsdpV2RevupHfeX3AcMERKOsTNoRTkZq+uWsu2wg8rfC9A/sOTm6yaTqx8P0BczJalnUwJgAXR0PmCvmXpc9njSZAwLrx3ddWeyii1PD13Rg7b4wXbfNKALxV2C9DflxV/v4rAgtBJDh8ybnoxCzDmo16i3A6GiXA3g6AiWB/4m3lpGaFPX8c8Y6+ALbTgbgMjTsTce3P+rHXCG+4715zdKkYUekHQXNJB6ZkNjXVs5erTZTISIoJIdqu5T3ladYUradpvzb5tw0z3OpZsq5eirERllvA== 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=ZegWxIa1zIwZXyyTi83e83cwxK2CZBnVEV2ywdhASCQ=; b=Ow9BwA/3JN5RQj8EokaSNIVqX3rxV+YzZtvOr3gVLq1JAzbMcBezUrH2ZaJ4VTsbrTQ9B4rHATxO/Ym5zI5A7oxpsyFbC53LxBafri/4mcY3M3/hba7Bs6u8gCsRz5JTvJVD4It+sFxGot/vqBz7ZQzcTYj5aG7hD1RDAAsov5Dhr4ldbLVZtOMNrJr17jFwIgtDj8+KPUOu8LYhaqsqVYYz37kWZ3frPHmbqJ4VhVuaB2qv1CstXR2wgiXMR+iGR4n32g8WkZFT6wR12DNrIsdupqZkflpDhUSrfl37K67ALCoUmsLPD5VdvsP0vym0hK5HS9NhF6CyYBxSo2A+Gg== 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=ZegWxIa1zIwZXyyTi83e83cwxK2CZBnVEV2ywdhASCQ=; b=gRMGHo6dryrGI4IMsvBT47tqUgQ2RWru2u3TUBbEKmj0apq0vtrdMj/5pItcoPWb06LE5R643xstqXyAqHHvPjqtaQC4Iy7ug8kVnfDpsMwdg9c2ViO36PbZvgGySq3HR+VKC00HyhopOKP1RqEXYqzFnAUK5LV9qUJGhBVpbwM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) by AM9PR04MB8273.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Thu, 9 May 2024 00:45:39 +0000 Received: from AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::d74b:21b6:d315:cb84]) by AS1PR04MB9358.eurprd04.prod.outlook.com ([fe80::d74b:21b6:d315:cb84%4]) with mapi id 15.20.7544.041; Thu, 9 May 2024 00:45:39 +0000 From: Vabhav Sharma Date: Thu, 09 May 2024 02:45:32 +0200 Subject: [PATCH 1/4] dt-bindings: firmware: secvio: Add device tree bindings Message-Id: <20240509-secvio-v1-1-90fbe2baeda2@nxp.com> References: <20240509-secvio-v1-0-90fbe2baeda2@nxp.com> In-Reply-To: <20240509-secvio-v1-0-90fbe2baeda2@nxp.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Franck LENORMAND , Dong Aisheng , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peng Fan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Varun Sethi , Silvano Di Ninno , Pankaj Gupta , frank.li@nxp.com, daniel.baluta@nxp.com, Vabhav Sharma X-Mailer: b4 0.13.0 X-ClientProxiedBy: AS4P190CA0006.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5de::9) To AS1PR04MB9358.eurprd04.prod.outlook.com (2603:10a6:20b:4dc::19) 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: AS1PR04MB9358:EE_|AM9PR04MB8273:EE_ X-MS-Office365-Filtering-Correlation-Id: 5da18fb3-c361-4791-1a91-08dc6fc158f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|52116005|376005|366007|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?1kDTiTlyFbtjUUI3jztDodXlBMKxckR?= =?utf-8?q?Ei+yPDPQx7siLJQUwX4gG5BdTuS4kdluxB4mBIP7qM4utNJlKrECVUSbzjlEgovV2?= =?utf-8?q?dF/H3PmHTVsDVtpaKySVF1C1wcRvhgBNx4i1PYY/B8jHCOYBDE2/thd6LLSXRpHvN?= =?utf-8?q?YI2oPwwbi5+VnRTTegMkCadVZnvJeKWrU5dIOriSveEbPl+SJ4RJzBVVZg8izk34C?= =?utf-8?q?Zj3HN/2DR9IcG7GkbruVQgYIEAasQxdGKuzMNPEG/HGf8adaR5mhM2WKr6tz8yEET?= =?utf-8?q?4/wzjFw8oOJKPSrn//Rf/8piKUay2uMuZTAPNVirhp5dzvn9YU8TQCLoDFxiA663m?= =?utf-8?q?uWwjCGgsNRdFvrl62ZIjqmYbAUrokHkFi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C8=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9358.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(52116005)(376005)(366007)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?GLmxvI8+49OEQDhUtZGTIMab2eSv?= =?utf-8?q?JSuegVf2qPyUuOnUuAiwE5lvWRUvrEId7jAh6E46/0pxb2nipnCxXNTKExxuHOor5?= =?utf-8?q?WDe/m59R66KzYdqPOfUHqEwCVJHrq5RUrLjoOpYp5RLyTklWVwwa7vbl21VEdwT/6?= =?utf-8?q?aMM2FtQncRh64K0mDQQcSB0+XTdwpEQDnojtDrRkYug8cPktOCNphmr8YcuVBBWQx?= =?utf-8?q?2Nw0Vu86LFRNIJPBoBlwFwMxYs6U80Rp1zrVFgnDDfPfxgqJJQxsfQwbKXNufI/TF?= =?utf-8?q?OBdAPoLE1sjP9AsDjpUGWKSh0Oh8t2B/CZ1EgIFkE1ae5Ym8O+lCS/y/bshFYlJCC?= =?utf-8?q?Z7aCWE/Va1E9GozY7Q/QJcM5KHGMFRUHrnXixHpeHKeJVEShfQh2obJToe2nvjn1g?= =?utf-8?q?gCZne4uJNlyohhdMx7dNFZzAZ4IeDzEP6VLlstk9wGeYB5ZaOoh5xQmhSooveDMIn?= =?utf-8?q?lbo+0edSuGfBGBI4Woqh0Ojbb/pwOnmH8fHhCf7nFbfz2NWIR9SocpfiwWmTfGOkL?= =?utf-8?q?2xE3QAtMChbkVnJvIORKdx71f+EFMUpBFa5YF37GVKBz2zeleJ5OQhfQWJQO+Kvv7?= =?utf-8?q?X3t6NLMSzIa7o99EOAKuN4C+dOhfBvmKjCdAFM+b3sA8v7qV3CQYDrzSPY506LClw?= =?utf-8?q?/QfgrF5TV4mMaoeJI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p.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5da18fb3-c361-4791-1a91-08dc6fc158f4 X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9358.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2024 00:45:39.2836 (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: g4AxLtI2odJMYrAoPy3MSqb62RdVvlT3q8YkgwevqdWf/Um79ESyFnkvkNa0enuF8iMiI6YREPLEEWvjAV0Apg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8273 Document the secvio device tree bindings. The tampers are security feature available on i.MX products and managed by SNVS block.The tamper goal is to detect the variation of hardware or physical parameters, which can indicate an attack. The SNVS, which provides secure non-volatile storage, allows to detect some hardware attacks against the SoC.They are connected to the security-violation ports, which send an alert when an out-of-range value is detected. The "imx-secvio-sc" module is designed to report security violations and tamper triggering via SCU firmware to the user. Add the imx-scu secvio sub node and secvio sub node description. Signed-off-by: Franck LENORMAND Signed-off-by: Vabhav Sharma --- .../bindings/arm/freescale/fsl,scu-secvio.yaml | 35 ++++++++++++++++++++++ .../devicetree/bindings/firmware/fsl,scu.yaml | 10 +++++++ 2 files changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu-secvio.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,scu-secvio.yaml new file mode 100644 index 000000000000..30dc1e21f903 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu-secvio.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/freescale/fsl,scu-secvio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX Security Violation driver + +maintainers: + - Franck LENORMAND + +description: | + Receive security violation from the SNVS via the SCU firmware. Allow to + register notifier for additional processing + +properties: + compatible: + enum: + - fsl,imx-sc-secvio + + nvmem: + maxItems: 1 + +required: + - compatible + - nvmem + +additionalProperties: false + +examples: + - | + secvio { + compatible = "fsl,imx-sc-secvio"; + nvmem = <&ocotp>; + }; diff --git a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml index 557e524786c2..b40e127fdc88 100644 --- a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml +++ b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml @@ -129,6 +129,11 @@ properties: RTC controller provided by the SCU $ref: /schemas/rtc/fsl,scu-rtc.yaml + secvio: + description: + Receive security violation from the SNVS via the SCU firmware + $ref: /schemas/arm/freescale/fsl,scu-secvio.yaml + thermal-sensor: description: Thermal sensor provided by the SCU @@ -197,6 +202,11 @@ examples: compatible = "fsl,imx8qxp-sc-rtc"; }; + secvio { + compatible = "fsl,imx-sc-secvio"; + nvmem = <&ocotp>; + }; + keys { compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key"; linux,keycodes = ;