From patchwork Sun Apr 28 05:07:46 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: 793166 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2042.outbound.protection.outlook.com [40.107.6.42]) (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 A109C1FA5; Sun, 28 Apr 2024 05:00:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.6.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714280403; cv=fail; b=uwdMtRc8j0/jicq++nZ+GB7sG7qpE9FgGdyQ2gcZzBOX9f6/osLp1JRiNsVZeotg5Qk0JtfQcAet03AXEyR08mSs7k8V7wnJJsGN/31GPNDk2WLPlWNQ4iVix2cfLZ31tHjsN0hpIOOxcTzi1XoW0ii2/0al2rUgKl+aC5+07oc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714280403; c=relaxed/simple; bh=vOKo7/odR8hekhkyhiWX0k9Gmh7OQi14krTibbn3X7s=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=VIHo4zGO4dyWNTHW+wBIdEESuA7aD63oX2hfFeOQ6rrQtp85NhaX9gI1hRB8MnXeSz8uoXjibZnU8PDAHdduxBAZCN98bBBmN/pwdFlu0s7IS4XxLswrJI9LpG9y+rtsT+XMu2wtnt105i4S1dmAQpSD5fRPEJVLVuzV4ApZkRs= 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=WMyZgSBf; arc=fail smtp.client-ip=40.107.6.42 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="WMyZgSBf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ESaptvpZpSZnz8OmboQnqTn9GAmwemj4lvvWA2bsN997FqNsqzQ9Dw33gRIyHtdojB63ZIIwwIItTPtP1I/mWn9qwrvW7ow5Hf0prxDj8AwDuFVSTTqNEB+F3WJ+mYZ9KC+HZT7UOrN53AbM+5/Gdj4Vn4PQwbDHyjVYsL7v3Y4azUHgkXY6qwnK6aO53QL4G2JwsmXKUng7ol7TrUWjZYazi0qzfOSgt5Qo/r4CzXTXs3kPJdWrnpDkTqCT8mhOQW80rgMQXsj2vhd+sWbrjGuMoQZCIk6w+BS4zZ5UF6+GD8K5OkIXPNdMurC4hF2nbzeyYXaBmvDH3A56wM9gvw== 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=3KDJYz/RaM7+x0Uj5LtEf7dYd8i1b80eON+juDLerWA=; b=N6pHmge8m26Yr/pUXEyKiwS2aSESmqc9Iq4XOFy1ynAkXHDqv9cQ0br/Sfoh9twkvYpFbdMY/qOkKTrfxqWTNCmSOujk/hV3T2vmjc+qsT3AXgIDh22Az0Na3ckGFAPOpOSGl+/4/XMJO4HEsyDvizSEMuGvhxbxyjCBObZQzULl5XtTLkaT8fg42q2IktLVYHCGhJ9daynjbM+Pi738ADTX8sTsojfAXRF++r5c2t188QwimGuh0ybvIYD/yUlFwZt/+5/ZU4Yjwds+hvUaN/mEzMJmttDXCzrC/e1saVc6jBXdrgmWgij04nCyB5IAuQUjqI1kPqMrc5In6wlYkA== 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=3KDJYz/RaM7+x0Uj5LtEf7dYd8i1b80eON+juDLerWA=; b=WMyZgSBfHv8JOkIX3Y7PQyLen2d/7yeQKmeI9EBNGqPGie1exweZxFsKZ67gYDon+qwthuVD5mQVrtZXaDBLNoiPdyP8pkW8PGzTse86ZlyO/dIM8QvjR9qrNpN2S1E9Xf9+hfLCt6iDO3A4dNJaCdoJdcuwPrO+H3bBD3DFO4Q= 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 DU2PR04MB8552.eurprd04.prod.outlook.com (2603:10a6:10:2d7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.32; Sun, 28 Apr 2024 04:59:57 +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.7519.031; Sun, 28 Apr 2024 04:59:56 +0000 From: "Peng Fan (OSS)" Subject: [PATCH v3 0/6] pinctrl: scmi: support i.MX95 OEM extensions Date: Sun, 28 Apr 2024 13:07:46 +0800 Message-Id: <20240428-pinctrl-scmi-oem-v3-v3-0-eda341eb47ed@nxp.com> X-B4-Tracking: v=1; b=H4sIAKPZLWYC/x3MTQqAIBBA4avErBvwD4quEi1EpxooCw0JxLsnL b/FewUSRaYEU1cgUubEV2jQfQdut2EjZN8MSigjjBrx5uCeeGByJ+NFJ2aNUkkthJZ2MB5aeUd a+f2v81LrBxXHCO9lAAAA 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=1714280885; l=3915; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=vOKo7/odR8hekhkyhiWX0k9Gmh7OQi14krTibbn3X7s=; b=mgHPmv0Apm6V1enrdtwj8U0J2a41tRJDvI1ly6q9PcBk+KF4vdQEarKOCEx15x+g8jhifOm+x 7Rc13a3b5HXBgDqMLgyfe8AiRQUv3JgZdCcYL9bEBwCDDLX4RiAB5pJ X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0245.apcprd06.prod.outlook.com (2603:1096:4:ac::29) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|DU2PR04MB8552:EE_ X-MS-Office365-Filtering-Correlation-Id: b90c64fc-118e-4499-756f-08dc67400c75 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|52116005|7416005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?q?62hq3j98kYGrHOK2F6s4sLUMrSlnNi8?= =?utf-8?q?B2B0ymXEZFDYZaU1g2X5yGeK4sjua95+480XLwjIl8GgZjY+LuMAnTLfBCX7LCzuX?= =?utf-8?q?Vo7I5AvQtTzbekBb2PWI4fgangXEgJ8v8kLnybKY9p/XhK2tv/l22mv4twsiGqRnt?= =?utf-8?q?ZTZXIh7xgUWiu3qqFy7dS882ibVyiJy98zmeGUeWePYCmjYQZWgi57p0CX1w0B0CI?= =?utf-8?q?V32knumYkunnO8K+wCtjTfa1oFVfi+fGOnk6x5dUCTJWJCS8prj8hEmPn3odfF21b?= =?utf-8?q?CEdDBjZ/pwfiV2g93nLOaU8e0TRFGWHCIbatNLHuebwOTYb4/VoXX+07PAoHHKqaJ?= =?utf-8?q?GbrhmEtrGk88gJZVgmdyv2P8KY3PrUhFhhJCQSNp2IA8XBjtKUZLkwPiS6HVsxuso?= =?utf-8?q?QbbZ3pXB1rvvbZgiTzTHXroWkNOXW61M9OJV1m0AljmiEqkvG2YF70HjI2abjPy8e?= =?utf-8?q?/PE//xrTUp5E1dMfPHIb95YaFNFRxcb95Ub3p34U0Uv7Via3IQD1PvAv60sMKizCa?= =?utf-8?q?2bbHZKIkf2/fxh8dDtumn6w0KXDMCQ87bjN+42XBX1lIkodMDr1QjXEQ5wCsQEj0d?= =?utf-8?q?N6iWUCxALddQCiMaM9D7Pv2qgiAjJ9uQuMZINiQ6z9eSMrXYbYL3leECVyXcx8T1m?= =?utf-8?q?l9lK1tThqhIWzyveysLhAyXvWwb7f1Bq34WyzDA/9DR4iPYcorDRKtIb32GZ2mP25?= =?utf-8?q?tnj8w+cGm5YLJ6MgVqGngihqCXOPg49qQvuRl2/dpNgCSuO61Sn044MpuX/HXwQa5?= =?utf-8?q?P88NylgpAdg0Gxs64CcvB3x3vaoHeKAbHoXCmefFnnYybHpOuCXSZjtEcZn4TGErF?= =?utf-8?q?/mfoC3O+UqKJkjmzRm4NT7REhdTy4e820aQItyKCM1DkvBjMsyk901NcJOK8FvfFk?= =?utf-8?q?mHMvX4cc9oauXtT8rby71H1cL9vNctDHPFlvDEwg2U5AJpcNlpIX55mZpQvI67ZXl?= =?utf-8?q?jxa+K/3O7BHV4HPfcmJ+VDeNwkUv2dBO8R54hMYCvWtGs9Um7OoAwn/tQVyS7WR/Z?= =?utf-8?q?zxUn4BgXLo0dy6/EiYoLfaa0c9KbaOvbenMPfxBWO1uTV1WOlZtBi7Oloh6Qto3u1?= =?utf-8?q?0EdceaPZH+y9mRWcuGNc8pehP41T+YyrNFrAss4brTwEMpuQQ/tKm1R8DeqQ8YDgf?= =?utf-8?q?CZl3NpWqPQ3Wm4Ewnr83ekyD+l++goGL113+5m6rst/C2yKZF3T7sL+q+Om4dbCDr?= =?utf-8?q?7LidnTpYM6Dpsmau/WUYtFvCuatJgtkC3js9/WaKIRv74uCWXAXvJ0Ulk=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)(52116005)(7416005)(366007)(921011)(38350700005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?U7p8j4dbuCmiNXVrC9DRW0iIzTFM?= =?utf-8?q?+R/KXOyFDQlP4APXfVqe8xy4gR2Y+giBux5Rc5JS1oQMejg9LXxv5KRx5KEBw8g3B?= =?utf-8?q?BTDPKfcdVAS73GqzFapAf2xG5UE+qN8AgE15inoKAHTv1wM5dHujV1XUgsJ0OCy84?= =?utf-8?q?KjrQ/2fQjIjqExx7aND8yIL/djV9/fwcAomUilF8/q7rBneOsGwO5HWh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XRaCxX4CpmM5KgfwpVxbGidpig?= =?utf-8?q?sj1bLyHgCxoM09T9OCHAZA4WE2mD7AY+FCZ88XeRQSOaZfGby+KmiTrIECrTWyAsN?= =?utf-8?q?mlvNshxbUr2HPnY5uANGE1yNGGtJvYi9hbybQt3vFTnGCsnk9agy+Oin/DUijklVT?= =?utf-8?q?UiXqT8VBspeETtuP4UYfSTk2kzYhU+gUGjeBehgGWLEzsucknXvpSMc9ETln8eCZo?= =?utf-8?q?EXHVVU+xOTLPUToR6ujNZshFcczmkh/5ag0R+6G7O4zkZG1iv+BgP7TfHftXdV9AG?= =?utf-8?q?mZVEnuduuSZyi2sPKcCh2YXeu4+ljX3xeBy6chMXqgEXdwEmaTM2QgMOyeIs5xa5f?= =?utf-8?q?Xl3/eYqPsGYO1YANqGTnzlmlDKlDRrFa5Le7wpHcRDp5OSDzzdqJecVLmmRj5ikRf?= =?utf-8?q?3ZDScucyTJhkazIuD9d+zOg1PQ/rv6lsaeW+R18o4wLQKv7c8PkJmKj1Z193GMobj?= =?utf-8?q?8btn70Xh7HLZ?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b90c64fc-118e-4499-756f-08dc67400c75 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2024 04:59:56.7778 (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: WE891r9i5KZkKgzSvFgrVb2yGBGH1Uc9NrvVXCNvB6DwC8PHwMvgM1Jbl23gWtp1PTtkpgyggWj40ovU8SuPTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8552 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 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 (6): dt-bindings: firmware: arm,scmi: Add properties for i.MX95 Pinctrl OEM extensions pinctrl: scmi: move pinctrl_ops to scmi_pinctrl pinctrl: core: guard with __PINCTRL_CORE_H pinctrl: scmi: export pinctrl_scmi_get_pins 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 | 37 ++ drivers/pinctrl/core.h | 4 + drivers/pinctrl/freescale/Kconfig | 7 + drivers/pinctrl/freescale/Makefile | 1 + drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 574 +++++++++++++++++++++ drivers/pinctrl/pinctrl-scmi.c | 60 +-- drivers/pinctrl/pinctrl-scmi.h | 30 ++ 8 files changed, 689 insertions(+), 33 deletions(-) --- base-commit: bb7a2467e6beef44a80a17d45ebf2931e7631083 change-id: 20240428-pinctrl-scmi-oem-v3-12130031a74d Best regards,