Message ID | 20241212-imx-ocotp-v1-0-198bb0af86a0@nxp.com (mailing list archive) |
---|---|
Headers | show
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2045.outbound.protection.outlook.com [40.107.20.45]) (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 DE12E20E028 for <imx@lists.linux.dev>; Thu, 12 Dec 2024 08:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733991916; cv=fail; b=I3euny0SNapf814AvGqANGzVzWB+xIUVp0tQ4SI/nqcJIRnQM4REGmp8B9MHfdYxKj4aqoCfC/DWIrqSQs9bvropC3HuP/hQftO6GQ5c9Y6VKAl4OoAdBOL9Y2w7Rfv2mtLwmj9R0c8yMGpTrzD/tE/eCIlSPG9bABsjEoIHpKw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733991916; c=relaxed/simple; bh=vQkgEp13+ZiMl1oyt4k1W4F91tSxG45ocpHrJGiJIcw=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=V1KyZqmtSNnyDhwVgwjRY41IH6nJWPLVtta49oemoZwFGr7T1EZaW2fOUeODNchrmYAshjJiDJF6arY7Q4Od3dORJNMNRrUOV3qhV09He/t879mFVIKoyJ2zFCJ5ye51LYPwDNAfePc/aBTqQU9J4dtTnZLA2XAHf51StOl0FJ8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=hfDP5axP; arc=fail smtp.client-ip=40.107.20.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="hfDP5axP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DEPsjqZfsmX3wmVFdjk45whk9ObR3zZ8DgdbMJwh7D1/iDWR1KTJpsPxaYbeg11Hku3paMTEmXAvC2cZcX7eVlGHmHVrUaTa+VDs5yZ9CNlpaVTF8+1pFD9EPhOwJDWka2eMr6Vob3rYKWm4nSbLwqqZ2CgmtDb8e9ll8P6fvtK+vtIZtFkGwq+skLsUmy2DlAtk5LXf+aDJ6nVxSxfBk6SuUPNVCYY8D3V5rjvsSaGmZ1u/tK3RldZvgDb2C7OLbBIl3hQtnrZIhh3jOVWZpVPpig2n6rcgmrBV120FYTq6ZI89NGBwvDyhCDcvcLjvNLogbl+j9LwfTpeFTdwYeg== 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=GLwHe2BcaWVYHFgQPJ7g3oRECUmybv1QGs5tEUQaO8U=; b=KLHPiIMhRDnmCKRW9UWAr/ANMho01G/HiLRnIBL6SZbCe6LdEv3ehpVU5F6Yk+/ACB+nTO6gq34cBKTr5yQz8jWZZWZY8kEKGUOyANTk39IFrR5OZWOa6q/j6qIkYaP+sPK1d7Ig7R+GXL76Jm9lMnGhKWTyZdyM24novQgoGQ2aWQoyJGbQbkXwxKbXxyMuaJPl84jhSE/b6XmatD80pCbf5UiQNCkIRS+gGA/p78+JF1ZqXx0ZUPoi2pAv5iQoaKHLjQ8WF9J5FR6YbAgFyur/Fm93fFlEOQFIcOaeRkjqM8AHrC8jq91tHY7AnztdcV7mmZ+Y4v3WHxdxsynKgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GLwHe2BcaWVYHFgQPJ7g3oRECUmybv1QGs5tEUQaO8U=; b=hfDP5axPjnBSGXdX+3/h1/2xlbrO4QF6bMMsX6/nJsN5kgeGsYZqfM0EdBki3EEk++zlVH9Er7UVyRoLOeVz5FV0DqBZJesfq5yzqno+Ulgsz5zJXxKvAyK2DGKQV9BKzg+I5A987eB09mBM4Q7zVW8wphwGttznk/hTxzdwJFqCVKK9adziz2ZY9LzR8zcJFstQ9V1E26fmeuyfm/h6Y6RLUwm/LpTAf7HTK4mT8uMRGlEsAFjM/SB/UYDGx2Wh584uSTNSWT+LgNzAYC5D8svdiQpQD6VA086VRSWCZQK7jHtgFcjWvxKjJD3qkRt00jxVHbpnPze6uJAgK0SxRA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by PR3PR04MB7323.eurprd04.prod.outlook.com (2603:10a6:102:88::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Thu, 12 Dec 2024 08:25:08 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8251.015; Thu, 12 Dec 2024 08:25:07 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Subject: [PATCH 0/2] Make i.MX9 OCOTP work as accessing controller Date: Thu, 12 Dec 2024 16:24:40 +0800 Message-Id: <20241212-imx-ocotp-v1-0-198bb0af86a0@nxp.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAMidWmcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxNDI0Mj3czcCt385PySAt3kpNQ0YwMTQxODNFMloPqCotS0zAqwWdGxtbU A4DCv5lsAAAA= X-Change-ID: 20241212-imx-ocotp-cbef304140f5 To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com> Cc: devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1733991891; l=1650; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=vQkgEp13+ZiMl1oyt4k1W4F91tSxG45ocpHrJGiJIcw=; b=nLr+EAxkQ+wZjAjWHrK+owR4C+RPBwq33QROJVyRsEGV69/JLDR8eKPya5uzHBCIWF0QU5mlh LkzK1ZL+dZlAakphKFPw5rW3mnnxaTGsO4jryHRog6woO/l8oJ+NeZ7 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:1f6::14) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|PR3PR04MB7323:EE_ X-MS-Office365-Filtering-Correlation-Id: ad202df3-e245-450f-bfd4-08dd1a867cb2 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?SbN7UiDsJ8oLNuOgutuzvh3o+QcQhoL?= =?utf-8?q?yQb6XsemXoTweYCxiRaIlLS8qsRRfDSyPaEcOjlv0VmjHrQQPMw4v3cgJ/QXRuiiq?= =?utf-8?q?F/kTTAksxbJJVIEeUSTKeOYI4/0o2DztYpY9MLOv8Msi9mxKSlCaR8xxR85vKMOj7?= =?utf-8?q?GHsAqx8JCT3lIg3Z+IP6amHOfrU6g1m+VZhGUrqB7xEqlFD4DSBC8EQLoufUlB++p?= =?utf-8?q?OdonAWDBDONxkbLTWCWwRvdNkdxQDBOQ/QH1PuM9LrKbQcxJmS5U/qpgo6JgiWt6G?= =?utf-8?q?0+VnhWWTKxXPLP+2XHGAN/zznIfuQGIyEH3rUoBsHwIYSX1FjKllTJUhjrJsLeAAp?= =?utf-8?q?5ZSmaz87dGi9u0lJ4QBq4Gu8m7nZMmO84URCyQYPu+MwK8cU+SPr8admvbF0VyQ3I?= =?utf-8?q?J83YrZBBTqF0j440PHFxXK8D9We0eOpuRT28FnfgdxaYOsLiroLr65mJ8T8+Sc6ag?= =?utf-8?q?iotPuKNY21WP2PShxZ0deTAkJ5PzpG2yKcBA5GlJ881DJel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-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Lg7frraLZZoBBRdVcjozvSxmVMH4?= =?utf-8?q?fBCZRv4g0/PsIIPAyphbEROG6nQUv90SddC58CFX0wAhHw/JGMC1HMucN95ikmChm?= =?utf-8?q?2Q5vHJ59cPwuzULq8P/cjYemLYV1umFM0fX8CPimFSo48nt9oZD8S0ctOpwtZA4Ys?= =?utf-8?q?xtwmfbOiXkoGuViaGuhsAmOIYUFZ+RxhGZ1q7j8EDPbEpEf5rF8ZMd8srGcDKsH3E?= =?utf-8?q?qi6joo4AfXDb8HS1cUQ7Vb+u+YFf9E9pYTQl4WAD99CPYR2tBAkIqJHGCt/wdCpUK?= =?utf-8?q?XmL0ISBMqKmO6/uyaABruwBXtXCCZMUi4NL4jIb04Vxmq5qp26v4oOsuGm2gvyQOu?= =?utf-8?q?aozkpRQvbEjDaWAum8/X9MMVQ1kFdcHEDyNxGpbSonGhU2hd0+Cg1v5giajiiK66U?= =?utf-8?q?OoA2kwHfSFiRn3KLhQ4pKvWwYS648nOvDnuXENsHbeBS2pzo6Cl+6VWe++xgJ2Jht?= =?utf-8?q?pXv6Wb5ZfTpS+C274CESw7hdS3ZTaUa7tJvmI2E6x/EFHXLwG3iq4PtFLcvX5lOrx?= =?utf-8?q?z8LriyyxmXUr3IXeX1400+dAHJVOjnuSPbb8J7+iyHV5DItzgxY/OX14KMElYpgIW?= =?utf-8?q?D5bzm82bFq8bZplVYWIpHQIi/P9scmbSEh89CSEJ5JKHPgOYH5GCBDwmRytolpehH?= =?utf-8?q?gKZRdE0478EvCpwuft8StUu1S1XMLAoDM4z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ange-CrossTenant-Network-Message-Id: ad202df3-e245-450f-bfd4-08dd1a867cb2 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2024 08:25:07.8616 (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: J/kboJvNYO99hnCWY0XyMkQJ5zfvxK4nsGklPGEKSClhv1wEiF2QCt58smbo/kWzX+CWf4L1LfUFCBKzMLPKlQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7323 |
Series |
Make i.MX9 OCOTP work as accessing controller
|
expand
|
Previously there was discussion on using "feature-controller" or adding a specific node to group the fuse information for U-Boot to parse and update node. But rejected by DT maintainer(Rob). Since the STM32 engineers added access controller concept and landed the support in Linux Kernel, reuse the concept for i.MX. i.MX OCOTP eFuse has some bits to indicate a specific periphral or function is avaiable for current chip, for example i.MX93 has variants that not have NPU. So introduce '#access-controller-cells' for OCOTP, and add "#access-controllers = <&ocotp [gate_index]>" for periphrals that needs accessing control checking. In OCOTP driver, the nodes under "/soc@0" will be iterated, and checked if property "#access-controllers" exsits. If not allow access, detach the node. In the end, cpu nodes should still be handled by bootloader. And I may also update i.MX8M to use same method to support variants if this patchset is good. Signed-off-by: Peng Fan <peng.fan@nxp.com> --- Peng Fan (2): dt-bindings: nvmem: imx-ocotp: Introduce #access-controller-cells nvmem: imx-ocotp-ele: Support accessing controller for i.MX9 .../devicetree/bindings/nvmem/imx-ocotp.yaml | 5 + drivers/nvmem/imx-ocotp-ele.c | 187 ++++++++++++++++++++- include/dt-bindings/nvmem/fsl,imx93-ocotp.h | 24 +++ include/dt-bindings/nvmem/fsl,imx95-ocotp.h | 43 +++++ 4 files changed, 258 insertions(+), 1 deletion(-) --- base-commit: 3e42dc9229c5950e84b1ed705f94ed75ed208228 change-id: 20241212-imx-ocotp-cbef304140f5 Best regards,