From patchwork Wed May 8 03:32:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13658045 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2070.outbound.protection.outlook.com [40.107.14.70]) (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 CB248134A6 for ; Wed, 8 May 2024 03:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715138678; cv=fail; b=aHX0vU7vKsvwj354RtP40oq9iv30eRiGDr1Iq3+x7MHdMmgobNMPbdW6I50+Ib0aYCvoNLFelrr0f5GgRtc4E0uxwRxXBgsFTQDCL7suIcdl5JbDh25fwODjcEPq0vnPoQ8rJaCIaTHbNBZEoXizJM00FsGy2iPEYtlBTcS1KqA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715138678; c=relaxed/simple; bh=w6vuvA+joW134+3va2V+LhFIyJ6qR33gJVVoAplEiDg=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=tJMq1q/MikIy8/LR6GUciF80zo6gOj+5xiswDk/HFDxJVdjxXEROhNMOSoiKri3Qt+Jg/Hn5OoUDDs7Qs69N76KbPvtqUvubF91rBIe0PqM17CpWBAi3i6gBj8N7ynH5IrHtw8Ku5qPfqtKBrc4y+y0sIsMdaVcCfrBwUCwut9s= 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 (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=jWDlNwE7; arc=fail smtp.client-ip=40.107.14.70 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 (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="jWDlNwE7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEVxo2odehs/FuKmDwKlit/SHx9uh+x06V0zZKUd2/0olH+GYh/g1I5eCd7VuVhK/+CQtuYGMCdDbNRvZjFt1oz5Sxa9J7H2UP78Esne/jdMSSodfLFIGaRtR42NhOjULmRk5y+LAp38FTuo550NrPAIRImkyYz6w0dAYrAy4JP9T27aXT9p/5KZ/uQjvNDdsMuwvE7tWaFJVoCC8rPTyxFezueBdQh0IHn3h2frYfbQ6mw5Li9j2go1DjJCVWkt3Nbyg4PcoFj7sjAVlKV20K9/AiMmoskxH2PeJNdmPmbSWaYAxXoxjryBB+SaCzueaD5Qj67/ySt8jhUpQwFmdw== 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=Tck6u6Bt3DivsxpA2fKbKi4nA22xtzMv/ojU3JtYkMY=; b=AD7r8XjgKlraX4hB7PJWtQzBhy4NCAOdKlsbDtazg2sPFSeSwzzFLcSvWkx54XzQA5r95n9evmcNWK01jsjrMwgSr3yi9h7rXwAQP9hzMbQEdEsGSREeGR4QfgGR5CroHufk+4ih+OBPNH1Nk7HPLPKFvUd14qgLLWdm0DifO0li39alt89rFzXbY/WkWX4zKhfMRVsG0N6pxeanxy+XzA2eIppTCoOecme6ozFjcdawx9J8chD3b5eqb9YT2r/PaYQCoYuZy2RYWHh7lUh+1amzSZWDVeY7rD3iGVrAe1xmSSeiII92+BFK4g2IzBJezU1xI/aUdMSwkwSJ0LkaOw== 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=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tck6u6Bt3DivsxpA2fKbKi4nA22xtzMv/ojU3JtYkMY=; b=jWDlNwE7ofNSkXutdts891LxtaoLzRJSg3e1VrbapCYKoHLrdZ2NkuTWIGa7VJ/aqm10C2QF5J9rOFSNWagf5uQiNGJj2N/Q6+SVhlHo9SPhtdGHCN/CQMyFj/MCKT7QvNRuAaMHLTV2gpiwQsk7QlRH+M4nGcwEZEpx3xuxCso= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AS4PR04MB9243.eurprd04.prod.outlook.com (2603:10a6:20b:4e2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Wed, 8 May 2024 03:24:33 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::d30b:44e7:e78e:662d%4]) with mapi id 15.20.7544.041; Wed, 8 May 2024 03:24:32 +0000 From: "Peng Fan (OSS)" Subject: [PATCH v5 0/3] pinctrl: scmi: support i.MX95 OEM extensions Date: Wed, 08 May 2024 11:32:01 +0800 Message-Id: <20240508-pinctrl-scmi-oem-v3-v5-0-6f2b167f71bc@nxp.com> X-B4-Tracking: v=1; b=H4sIADHyOmYC/33NSwqDMBCA4atI1k3JSzRd9R6li5iMdaAmkkiwi HdvdOOmFGbzD8w3K0kQERK5VSuJkDFh8CXqS0XsYPwLKLrSRDChmBItndDbOb5psiPSACPNknL BJWOSm0Y5Ui6nCD0uh/p4lh4wzSF+jidZ7tv/XhlGwRmpOHSqAXf3y3S1YSS7ltUp1Kz+LagiN FbrXrcadGdOYdu2Lx1651P2AAAA To: Sudeep Holla , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Linus Walleij , Dong Aisheng , Jacky Bai Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-gpio@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715139159; l=4220; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=w6vuvA+joW134+3va2V+LhFIyJ6qR33gJVVoAplEiDg=; b=6OVOe1BBC3lBsg1UBx6ZPIgLDDZ+lbWBhqv5ll8loyz6zCmuf8Du0B7HwR77OmswDkGib/pXN yvwvJlBG51dBqUNgdgJj26Uuq6YqlFGmzx3LVDOkaTELHRYfvT69WwW X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0010.apcprd02.prod.outlook.com (2603:1096:3:17::22) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AS4PR04MB9243:EE_ X-MS-Office365-Filtering-Correlation-Id: 0845db41-428b-4424-029d-08dc6f0e6103 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|366007|52116005|7416005|38350700005|921011; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ABksKDsPYXI4C5gP24tHQjDMa/E6Pfk?= =?utf-8?q?H62tMjibrZreF1FkEWIGAmw65fQBA9rwJ0OZajE5lQrRbHPPvYR5OP69ihcx38DXO?= =?utf-8?q?WdDeSKu7ISPQ1SqBOl6LyVW81Gw9uoc3efy1Q2IuIFfxqBosnINcujISjzW1x92+T?= =?utf-8?q?S9HKTon4/AR3t88hb9wqKUZi45hpUivO3RNtf5qm+vZYdb0nTR8GQUkOOnLrWrRZ2?= =?utf-8?q?ble3tWMA9L9zowwe7tzKjthhb+fgGZ9EDbAaM/Ic1H4moAA/cohuSsHoBRI0F5EPu?= =?utf-8?q?PhEhtasgdBx9lZrbEEV7pSQ/XHtGKc56DQu+oH4qylWIM4Y3KuoozYmgR8xkK2asr?= =?utf-8?q?KE5QmNflgd5opx887fyC2gGcoU6d/qA9YJe/D2KaTo9I4AOBydxKtDZ1fiErdjkNX?= =?utf-8?q?9Ir75QDWOrWz0zcowSMpsj2DfEb1Fssz3RC5fy3ELZQUrrG/Ut2sHcP2MGbga278g?= =?utf-8?q?R6z05fgziR3UDeYAthpeauhbGN/FIqkcQ6dZhTzfHW90y4ZE5juh4tWxQzo2nL1CL?= =?utf-8?q?zqNQPSvcFmCUooF3rra7U1mKF78FHBB3VxbBcigq4rP0gEuRqf5ANKpKUKPKmYUa2?= =?utf-8?q?cDTlQRVYOJvsCYbEuSHgI3wwj2og/VGBIIipn5ajvFv1btCX6sZlXWokXAZ9YTBDs?= =?utf-8?q?smU3fxsMLLz57t9veLMf8Jdrt93QAu9rpQn+W6XdIlgaaft8rc1isAOcvI2Z8bUVs?= =?utf-8?q?TFS7c9YgaDkRDqOUMVW6By6zGHPezapiL9FcH0r4aLr8Ctrdf1kH2+HuDkOq82Odq?= =?utf-8?q?fzEVZwLecZSjOtS/1EwX3hXBFkvcOEAff9Ppce3FcfhX3NF4WjAk8Lxbj2pjJu7D1?= =?utf-8?q?fsIdCiY7w6U8kBUrUpUDdt8bAElmBztcBf0zFC60v59Uv/8dzqc3aTdAnPy2CskNd?= =?utf-8?q?kptrPu6Cz3mZTenwf887EMHs6j43R++P7AjdgoTNd8esae6pvIWIvaPtjHSBvuqfV?= =?utf-8?q?csItEYQ57M3iR68XS6XPv8Cwz0fP/hxNivj+SRo9aHuJfUNLFt8hPUGHeGfIBQLPQ?= =?utf-8?q?4K6/Cebht3PRD4ihfjguda5J1UsC89ISrPctyKgRUxzkmC25/rkGjfmdghQIMnve2?= =?utf-8?q?2JSuziqHsYfKf5dOwiYkI20hS7JkSxdpQQPo8hA5RqzUMpbRctpOfS2Qrj5IhK9Mh?= =?utf-8?q?hHkoEWelEFr7MIwcw9M4dyXmWQsWpfFMW24+vPT6nPj1jojbw4EFgfrIZx+QoIHLq?= =?utf-8?q?JLnZiaQEEnidA62khERtRxq0ZRAL7KKv7MeyputWekI5HlRI95+ZMod2E7OPL6BkK?= =?utf-8?q?qSa+KpByLGUA60cO1zOt5a7ha79waotWG+89IFoXa0t+fMx6RHCOF070=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(52116005)(7416005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2NK40CBvtWaBjfCiK6YPRFxvt1eB?= =?utf-8?q?Ds24Y1UqToLEzD/86qmV3BH19QXe51xsnboErxdnsg3XDCeom3JYD7XMVSOawdT+b?= =?utf-8?q?7NH7KUr85DmNZTIuDr17YH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2jsHZd9WvsGux4zvfcvHdbqLwLTSmggGXVygWedUSB?= =?utf-8?q?7jIh7BN7hv/w3aVoaz2/3uQG80dV7J4VT9h0gznful/mJF0od8jUCoe40MeiPJuqX?= =?utf-8?q?LiwMIPpsqWkg/ApWT6zVfJZmNbInEdZL+gegtzgg7fVJ6aoIX7/QJpcqXyt/8xT+2?= =?utf-8?q?fjXqERX6/rnzqGQQD4bkYXb7VrEDTOc5zNY2UfSokITUBDVi+ikbnFQ0Ba1oNa/RD?= =?utf-8?q?neQvGAKWP4gx+/nvZZXZLYZycXEE51XpHrDpdrNABz8a9zG7oufZkTyuNow5wpdK0?= =?utf-8?q?FS9BZUMx+OyO3gwbyDXi63049nGhDCJccStUVakQ9lfB46PcjDPEeW4+Sy90l2pPI?= =?utf-8?q?TUGFs8bK6mPoZr78wkb37NdHzY8pDywRiQACLD7Xujioi6mALBOO+fhkw0UKm9qk0?= =?utf-8?q?/g/3eUF0psbyzR2qBJw4mD5yztACNEINzAeyRtQdCA2vkB33fYeR5CtmfXpHGoYkx?= =?utf-8?q?DyL7kqzHNp5nkh2E8HnMSHmuqIqW1TNd1E4XGo6aMSdL11fiqJ9CqcKWTvirUiFoC?= =?utf-8?q?ybUotlft8Hfl?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0845db41-428b-4424-029d-08dc6f0e6103 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2024 03:24:32.8951 (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: 1Bt88ySPht1wN9FYQ3noniuw2q4TV6D1wtRgmmY7X45xxP3cfIdpABHSTf9Tpa6m1p4uSMMML5fQgnps2o+wuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9243 ARM SCMI v3.2 Table 24 Pin Configuration Type and Enumerations: '192 -255 OEM specific units'. i.MX95 System Manager FW supports SCMI PINCTRL protocol, but it has zero functions, groups. So pinctrl-scmi.c could not be reused for i.MX95. Because nxp,pin-func, nxp,pin-conf properties are rejected by dt maintainers, so use generic property 'pinmux' which requires a new driver pinctrl-imx-scmi.c The node will be as below: pinctrl_usdhc1: usdhc1-pins { sd1-grp0 { pinmux = ; drive-strength = <0xe>; input-schmitt-enable; bias-pull-down; slew-rate = <0x3>; }; sd1-grp1 { pinmux = ; drive-strength = <0xe>; input-schmitt-enable; bias-pull-up; slew-rate = <0x3>; }; }; Signed-off-by: Peng Fan --- Changes in v5: - Added Rob'r R-b in patch 1 after addressed the comments - Per Rob, use of_machine_compatible_match for patch 2 - Use of_machine_compatible_match for patch 3, and enable COMPILE_TEST - Link to v4: https://lore.kernel.org/r/20240505-pinctrl-scmi-oem-v3-v4-0-7c99f989e9ba@nxp.com Changes in v4: - Rebase to next-20240503 - Add pinctrl-scmi-imx.c itself get pins and scmi pinctrl structure to decouple pinctrl-scmi.c and pinctrl-scmi-imx.c, so drop patch 3,4,5. - Link to v3: https://lore.kernel.org/r/20240428-pinctrl-scmi-oem-v3-v3-0-eda341eb47ed@nxp.com Changes in v3: - patch 2,3,4,5 are new. - Rewrite the binding, drop nxp,pin-x properties, use generic properties as Rob commented. - Switch to using pinmux means pinctrl-scmi.c could not be reused, so add a new driver in patch 6 for i.MX95. But pinctrl_scmi_get_pins and scmi_pinctrl are exported for i.MX95 usage. - Link to v2: https://lore.kernel.org/r/20240418-pinctrl-scmi-oem-v1-v2-0-3a555a3c58c3@nxp.com Changes in v2: - Rename nxp,imx95-pinctrl.yaml to nxp,imx95-scmi-pinctrl.yaml and move to firmware - Merged patch [1,2]/3 v1 into patch 1/2 v2. - nxp,imx95-scmi-pinctrl.yaml only has patterProperties for subnode The pinctrl will be as below for i.MX95. pinctrl_usdhc1: usdhc1-pins { sd1cmd { pins = "sd1cmd"; nxp,func-id = <0>; nxp,pin-conf = <0x138e>; }; sd1data { pins = "sd1data"; nxp,func-id = <0>; nxp,pin-conf = <0x138e>; }; }; - Add pins enum, correct description. - Link to v1: https://lore.kernel.org/r/20240412-pinctrl-scmi-oem-v1-v1-0-704f242544c1@nxp.com --- Peng Fan (3): dt-bindings: firmware: arm,scmi: Add properties for i.MX95 Pinctrl OEM extensions pinctrl: scmi: add blocklist pinctrl: imx: support SCMI pinctrl protocol for i.MX95 .../devicetree/bindings/firmware/arm,scmi.yaml | 9 +- .../bindings/firmware/nxp,imx95-scmi-pinctrl.yaml | 41 ++ drivers/pinctrl/freescale/Kconfig | 9 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 585 +++++++++++++++++++++ drivers/pinctrl/pinctrl-scmi.c | 9 + 6 files changed, 651 insertions(+), 3 deletions(-) --- base-commit: 4db57327adc359a3f9a3481d60104be67c42964f change-id: 20240428-pinctrl-scmi-oem-v3-12130031a74d Best regards,