Message ID | 20241223-imx-ocotp-v4-0-f504c1420640@nxp.com (mailing list archive) |
---|---|
Headers | show
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2083.outbound.protection.outlook.com [40.107.22.83]) (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 54DBD539A for <imx@lists.linux.dev>; Mon, 23 Dec 2024 00:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734914812; cv=fail; b=uNpUFtHgj3RX7hEws6aDfVnZgMsrfx+AxMxA/2ejM6dAzI7m41pB7BZU7WJvwJCmsJ8xq4yZS9YFY50P9rESYtHABxHFtebE5zZoEaWV5gZYiKhQj75ZOUieokEYAjWvfQAaTJuVaWU9LyKbMZ5p/629AZD8rmHWzBM1fAGeKiM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734914812; c=relaxed/simple; bh=M135gGqHkVhoSlOrBmr5Bo3AjgJo1bmJm2/1nIOc0mE=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=ny9rQKjyiztoe7Oqubj9dBEQfG9dRCAi4rMyCgKDbCT9eca7ilpVDPE9WESo3NIxzJGPBfhHpUzhf8Z2Rp5qCY5jkad3rRINjb3uvVmYBpxtIGGJ7n+M2MSwMm7+pWYEfz3ScagQGc627odsSdtugk6B2U3EWV66fBWKuC9mjmg= 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=vvAw0ljf; arc=fail smtp.client-ip=40.107.22.83 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="vvAw0ljf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kZStlbLwsjy0OP/bGcqtHfNk6QKlwGIuveQ4Ts2QiegjvLlJWNgh+4tWJr7PPW6+sOPvXIe6ugoa9rrZ5PNqwgJ9tAlG/Lu7XI/9xYuALUwsvaKaVv4/BMnA2rTO9fU93JzYg3FkFLoWTP5Z0jH6Hry2+s+YVo2OVidtzolFB3XttcmiOHUcPEPoGTYP9x3bHJLQdvDlUDYJ/Un9p7TfT4fCxijkdgt+lQ3ISeMN2NZgSNXq5Weo0JUu/I+mJA5uSiuHSxkGR8JBagODQTgMnpd0JuS27QXQs4jhTbHZjPZW7P5t/1K6il1aXCAop3QdLiLi+UeEdC9O8yhkQ/FHVw== 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=Fhrf9Bu0AlmngK1cMVMeCSZrhIJPB54Sv2hXwfH6HUE=; b=LsBgoC/Qq4Odzf1VLeCxQ6HQzBtJ84V47PvbEzwEkOLRsjUc35fuxCel5IpbcBOKyPVh7utusCZQtxoNB2LJrWhxfCyAw4Y/0HY1pAlWsioy5v5vO9QVsb9D3plcj6jPXVxOpFl5k67dHdrLl5waZFa9yLWIF50PCVKATDhNtKptl3nuQ6djQzDjtbWVIrPUsbsrgfCbX12RHWQ7++QmzlvHclq3WzuR6sfStPhGUg5f4Xj2ZSrCzjSO4LWjbnbT8KnKEX+7BGbmjj8eV6eyqqKPAesH+KbSqeCnaBXrGIDa9QPB0QCRX1Hz6LvGlHFq/N8P/fkjUiGtA2lnnX1JEQ== 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=Fhrf9Bu0AlmngK1cMVMeCSZrhIJPB54Sv2hXwfH6HUE=; b=vvAw0ljfdXpio1DssYf5MFTbgd+jmzWdiVTCnQHdG3N9VQ4n61dg6l8hsqDz3EbsRyQCvoEotKYzzDeEsWlsyglH16/qjkkKWC0e/4OMr1wjkxqn9zL+HRw4771Oh8I4YasflAH4KxsTUERn8Mhs0o49xfeUvj00xgeDA78NbmmCu0dTF2sLIsnNvbRfLDyJc8Vq2LEANYnBDDecLR6rqN60ZF1cL+kfFiLgIYJzUdpguMu1AInnJDomgG0T0nayHU8X/SB7DOCfClPMPAyZ018E9F+1y2MN4sRbyoY5haHc5rpCmDvv2mVi2SrqvSl5VL1aOgoAcYzfN9hee+gYkg== 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 AS8PR04MB8995.eurprd04.prod.outlook.com (2603:10a6:20b:42e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 00:46:41 +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.8272.013; Mon, 23 Dec 2024 00:46:41 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Subject: [PATCH v4 0/2] Make i.MX9 OCOTP work as accessing controller Date: Mon, 23 Dec 2024 08:46:12 +0800 Message-Id: <20241223-imx-ocotp-v4-0-f504c1420640@nxp.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIANSyaGcC/23MTQ7CIBCG4as0rMUwA/bHlfcwLgDBsmhpoCE1T e8u7UZMXH6Ted6VRBOcieRarSSY5KLzYx7iVBHdy/FlqHvmTZChAASkblio136eqFbGciZAMHs h+X8KxrrlaN0fefcuzj68j3SC/fqvkoAyCl2rFJO2rSW7jct01n4geyNh6ZrSYXbcSllrZa0A9 et46brS8ewUIm+AdS1r4Ou2bfsAQM7dxRABAAA= 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>, Frank Li <Frank.Li@nxp.com>, Conor Dooley <conor.dooley@microchip.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734914780; l=2461; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=M135gGqHkVhoSlOrBmr5Bo3AjgJo1bmJm2/1nIOc0mE=; b=UegpPg/2TrKumb4Ga56cr2gsFtCjeiNtGyPtnJrccyPBJXVjMXFAt94llrDWPpJWDvuQ1S86r EAqjSduoJgGD3LYnxUxgvH4tpOvKj6w07d19kN7UuCuPy0QzXwZkURa X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) 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_|AS8PR04MB8995:EE_ X-MS-Office365-Filtering-Correlation-Id: 8618d8cc-b28a-4179-79db-08dd22eb4440 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|52116014|376014|7416014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?pozoXUQ8MDJHbK2+IZUqftnVqBc3ZvX?= =?utf-8?q?1vcOnYj9py9R5ndnfUEYliVUqcdNO/Jco10FGeUFaWOGE1Qa9fk5DuP5kbn5ubIr/?= =?utf-8?q?U0VKNQX+L+CwGL1py8slEkFsmOAQ9PIBJCuhxvx2Vcd2cPAR97Jr/LI+pFUfKDAVS?= =?utf-8?q?6f4X7nHWzy99UimZXMmj5rzBg7J9iAXWg/XjjP37hEMk/iVgdRcEJk0EvLy2iHozf?= =?utf-8?q?QduA1uAEPVBdhl9AjAZ4fz1wDGEyRzH3zzw138BxNH8XXFCdEHRSMb3Q9Cur3u7SY?= =?utf-8?q?i0kfMH3RdHUNTa/jurb+ECvBlzTyWh+i02thmmT+gtu11T/ZpVcj3W61kCAigYQ8Z?= =?utf-8?q?uNiegB+9qFmU/crAiZXBsAVERE0idpivaSzp8ks9k9VYlJ8AUxPlbNoCAiBS7Ox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gSQIkWU?= =?utf-8?q?HSGpb2stDpuMEnVfLEo67Xlbofjphs/ezxLesZeta9fTAIT2IKXC99Omu78Fqbaer?= =?utf-8?q?Bq87EzKvsOhHG+hIbQEHcJS/XAnBwi2L1TtH8AvPxocXZL2gEindwQnyo6Vd7L8lh?= =?utf-8?q?PAJSC4fJgYfj1tRgAfognkWK8ZGZsC1zw=3D=3D?= X-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)(52116014)(376014)(7416014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HKwh20g1A5U8FkRCkZWehjduMQqg?= =?utf-8?q?/soOq3hU9rBUshpjnh0fAQTao5bIqqx4W4ErJVWGo0W1pdXIeuBadIriceGfQIO1z?= =?utf-8?q?MEd0vnnqsOvfu0ed82I9drUpCE9rS17bPSmn3kaxgP7IiYAsDs09J15G4VsXv6wop?= =?utf-8?q?IaTFrhYS2OLcMBhtB/SzBn+yRdznBhvRIv4CHAdSETrpGBQAPirt9WD5YvhL4U4/0?= =?utf-8?q?2LBWhWNDcpZvx+9TrEnVe5wy9cw0Ki1Y+UR3TMQg2qNVxf01E82yk3D9JEZPbnOCN?= =?utf-8?q?rVTC1e6MuoDOiuLWcO3hvamnZ1y3+cucoJHZYLtQD8218m6mACqFxndEVsZL696Wy?= =?utf-8?q?B/7rThEsS8KTeFoQqDvpLjwKqsAQ+O0+bsK1vmTHlbBWsJ7bwgVPPeJf2VK4jJd1b?= =?utf-8?q?DdfcRYa4/28PM1z7C2zF5lVv7SGnMuFYan9EZD/sOBf6w/jgO8awlEqRsUwEj/kKm?= =?utf-8?q?yn2cSznTp7viOG66pfIp60HM92SehcFbZIzZbfar/0JHZgEtZa9POF/hvtP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f-8?q?132rCTSjPvz9pSKlM53Bqo78/VC98TxwC5qj1LL2O/RuxfXbjXDXlp+hqfxCQzBPj?= =?utf-8?q?8tN9jausDgV1tL5udIOi5BpNzS5PbDsl7zmlKho1A5zf3j3RanjV/5pWNvazvwxCW?= =?utf-8?q?B3KcTjFGZhwo?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8618d8cc-b28a-4179-79db-08dd22eb4440 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 00:46:41.6194 (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: 4/CYcpqRLPCKTJFU9hQdEvZyEuVApq3n0bDdbgRoPxGeTEFZPiyx0/kge5+q/VOsTzP+c4sCTlZNh+Ja1lQvQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8995 |
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 "/" 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> --- Changes in v4: - Add missing of_node_put(provider) - Typo fix in commit log - Link to v3: https://lore.kernel.org/r/20241219-imx-ocotp-v3-0-b22371098071@nxp.com Changes in v3: - Add A-b for patch 1 - Use scoped API when iterate nodes and address build warning in patch 2 - I am also thinking that to drop patch 2 to let bootloader to iterate the nodes that have access-controllers property and update the nodes before booting the kernel. Then just need patch 1 for the binding updates. Anyway, comments are welcomed. - Link to v2: https://lore.kernel.org/r/20241217-imx-ocotp-v2-0-3faa6cbff41b@nxp.com Changes in v2: - Add R-b for patch 1 - Use '/' root node instead of '/soc' or '/soc@0' for patch 2 - Link to v1: https://lore.kernel.org/r/20241212-imx-ocotp-v1-0-198bb0af86a0@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 | 184 ++++++++++++++++++++- include/dt-bindings/nvmem/fsl,imx93-ocotp.h | 24 +++ include/dt-bindings/nvmem/fsl,imx95-ocotp.h | 43 +++++ 4 files changed, 255 insertions(+), 1 deletion(-) --- base-commit: 6d13015b67d58ddba56631c56e0a6f376ade0867 change-id: 20241212-imx-ocotp-cbef304140f5 Best regards,