From nobody Sat Nov 23 09:07:59 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2051.outbound.protection.outlook.com [40.107.105.51]) (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 503551FB8B5; Wed, 13 Nov 2024 10:12:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492760; cv=fail; b=MiKAH/Afvr4NxvgLqXGQFwm8Uo205wmCdijaq/iUo0W8YVqehc1FYYRJJvA61/37QcRVb/lEGLe6YRofIDVhlYrYhmwhCAzbKfrZa3F0MOpjw233uyDco4m4BOvCsyMoNGm9u5V9xyWRcZVMizUs4LfiiTMfCmTG2j5DNtecu9g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492760; c=relaxed/simple; bh=FRPrjdr+xuu/myXoZJW8WBf0xGo4kJxUmsFFubcL25E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=QVYrEj7m+6JWEJ8yYlKh7giFJqsMyReg6Ap5pUvnYjvfcl1s8SoACVN2nxdguunL48yQMhtfoRJQS5H+etGIYN+wLaHnYMyoTomVS5jb90sJebHo2XMyMD+30GYIlIBw0WHfm8wOahDrK4nSV/mktChcjCgKLrV4i+V8/hDjF/o= 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=OHXGO76f; arc=fail smtp.client-ip=40.107.105.51 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="OHXGO76f" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gSTHBWv12uvx2jtK377mVuhBSpBontOdL6GZiDYjXOk5Ggr2AddJrugK3ujOYgp/mX7gGvHyG3yQY9U+Z2EoTNQunijm+Xm+fR+A7SO6RBgkCHDSeot00MQgLUReI6MoRbKuJegbq2P5Xkj+yR+OWHIkCbHR/ElmTcgJB4EVgOFobjUaJhQGbwCOxeftmBhZ1HnaGEJHtumaSG+Ku692vD9qhTqpVi8MtoygHA+K5TMGbEkyzV+CggpCB6iPbjBLfwAOKBxF6FyoS2l9kM8TtoNyDR2cLj04Axs/mc8KED5r5SGM79Yv/lc/CypWG9TlabP1PWrlKU6Jy3MeNxvcSw== 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=2JMsIrNOcncD1mnEjvXrGMCWkZcNE+wVT8B+C65EkpU=; b=p/u6ONMpUxVTqOlPD3XIA0ga7bGeHdpcCFu+pgFplyDPTckkJccpCFg9E8Cd59jiObitml5ABb6v3pln34Sg3vTh7na59XcfZglqJ2gzn9yNWRjKcharGX+DH/81kOcjJPfH0b8hUVbBYgMICsbm4us2fRCTycMnhdL5/dc4wNRL94+epfoyxvRGJ2miE5YIFdGBOx1pipsOyBx23basDJ0oyGtLv3oLwXP4THsb9Nwk274sLzgMdQEDeTYI7uXUVxgksEIFfR5pAjB2qwGmvTqtiuQN7YtN6GAlcg+J020HHF5m+bMEOItuTYzVnbblal8qEuGxuBVPjD45bzgkxA== 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=2JMsIrNOcncD1mnEjvXrGMCWkZcNE+wVT8B+C65EkpU=; b=OHXGO76f1ots/rmt2qUrocFxFhqD/Uou703B5EPbFYc1H1g/z7biUqu1ZTEBAfiSVXDo/XKcfPGAGAWftNIpE8ZTBWUy6f6jWJuQyTn+Lt5crVzEu1a2nGcyhex9StVK7g9nBSWWqdThvdmQLXFIbQ+XVsvKlehIvtPeQTxyLdBwFu2RfZ0t+FdegCav1EVNfU+jgIrRAjWDhSyYo+lcVQkEErLj67yp+875nI0dx1ZyoGm9t8SmOejA4NVMTzPAO+Gq09gKY//GQ3F9Hgzzf/rp8EgHBDyISSqUeEVmudwoQ9522nBfK+1TPhKkGSL0oIvCfbPbEd9gnxsDnKg0UQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by PA2PR04MB10129.eurprd04.prod.outlook.com (2603:10a6:102:3ff::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Wed, 13 Nov 2024 10:12:34 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:34 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 1/7] dt-bindings: mfd: add support for the NXP SIUL2 module Date: Wed, 13 Nov 2024 12:10:53 +0200 Message-ID: <20241113101124.1279648-2-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|PA2PR04MB10129:EE_ X-MS-Office365-Filtering-Correlation-Id: d88f97dc-57ef-432d-2b5e-08dd03cbb0d9 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|366016|7416014|376014|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MlRuV1hwb24rQSs3Z1BtaU52VkJnazF6VWo1NHZaT3l0WS91UUt5bVl4a2ts?= =?utf-8?B?RzAvSWhTWTJhMmYydDBQL3BmVU80VDg2ej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IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(52116014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ek5mcmNDcTVZSDFJTlV4L3MxZWtoRTUveDkyMTJ2M1c5dXNPUmtMRnY3dVpq?= =?utf-8?B?Lzdkd1R3UmVmK1dvZ1QvemtLV2VvM3NsN0VZTGlxejNyeG1OVGx1OXhpMWtX?= =?utf-8?B?cmh5K1FNVk9EYTZ6Q1JWU2g3OFVqVFIzN0h0Wm9pQ096Q2k1bHd4L1lHV0Vo?= =?utf-8?B?bnQza29vUzZXalpyaG9JdmZDbmNEMnFMOE9jdUFTYU15ZnhUaW1VTTVRQkha?= =?utf-8?B?RGNrd05PV25zYU5xZHpNbjFjSE1FYU5RZlhVUWcyUWNmUDY2b0tNWGZYbnlS?= =?utf-8?B?RTRBSTRHa3lXMkpHeFZ4ZWI4bmVmak1ncjQvNUREdzVUeGZKcTVuc0FLQXNs?= =?utf-8?B?SzFIeFZPNlhld0hIRThPME9xdW10c2l0dm5iWHkyUklwWmFPdzBmUncraUtZ?= =?utf-8?B?cHpUZWs1WHE3NDVNZG9yMk1lT0U1N29Pa2Y5aTZuSklja2J2M2JsMkZ1eXZa?= =?utf-8?B?S2t5aDdvUDlYNnhueFJlcnIrRHhIUFd2L1NVRnN3VkdyTC9GUlhCNU83N0Vt?= =?utf-8?B?ZmJ1ek83WCt6RjEwWldMMFVKdVJ0Uk5jNW1DTmc2amp3L1ZDekk3NE1Da3BW?= =?utf-8?B?dVhTYU9lc3E4UXlXTVdnV1V1RWluSmo1VlpCd1JCUmliRXZ1Qy91RHUyQmJ2?= =?utf-8?B?TU1hdE9GNGlHR1JINFhnb2luSDlDQlZIVzVSRktOR0VTdjJ5RzYreCtCU1ph?= =?utf-8?B?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= =?utf-8?B?aW1DanBVci8rd29FR1NBc3FyZXZ4TnlkbmV6V1Fuc1BmekRKOGpCUTl5aWxl?= =?utf-8?B?RWIyZzNNeFBjN1FnYWp5WFUwalpNM2FYZVRzWjJPbktqd0lUWVI2bFhjN1Zq?= =?utf-8?B?WlJmeWZQNEJvWmZLaDI0dDhvTGVOY1BtOVBGVll5OG8rLzFteHVRc0RvZDNG?= =?utf-8?B?cDZsVk1WZEp0ZzZZRjA4T2xvZXRvbEdaenFOMXBGVXU2RG8vYjRSMUxNblZT?= =?utf-8?B?RVl4SDFWVnMrTlI2TVBDY2luU0ZYMEsvanh6ZTFPNDFhNzFaSzNYTlRnMHZH?= =?utf-8?B?ZTlTTThJZDlLdzgzbnRHa2lWUmd6cUhDdTc1b3BoaFlpMGxrbXlVeDUyMXBE?= =?utf-8?B?UEppVGpkNjR4STVIYjFHL2JZS2J4T0trbUVyOWtmUG9zVzNheDVsQ28vM1h5?= =?utf-8?B?L2k2WmFSN1VUblhjZXhJZXU3MndqMUt4WWl5NThmVDZLOHZQVUdJKzV5dGxM?= =?utf-8?B?dXlSZ3NCKzdwYWpHVkpuUzZHdjZyTTZ4ZWUzcVV3dU9lRUJmbm44Nisxb01w?= =?utf-8?B?Mmc9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d88f97dc-57ef-432d-2b5e-08dd03cbb0d9 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:34.0488 (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: jfbJhVdVpySr2Bb8JPaJpnpLiHT6ihksQpO8ziY5yAZb8OW/JsEtKN7hCbicmJ5/XYYna7tSEdVhVePEnFhLggid1mx/HJLzVZIywNWWeWs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10129 Content-Type: text/plain; charset="utf-8" Add the dt-bindings for the NXP SIUL2 module which is a multi function device. It can export information about the SoC, configure the pinmux&pinconf for pins and it is also a GPIO controller with interrupt capability. Signed-off-by: Andrei Stefanescu --- .../bindings/mfd/nxp,s32g2-siul2.yaml | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/nxp,s32g2-siul2.y= aml diff --git a/Documentation/devicetree/bindings/mfd/nxp,s32g2-siul2.yaml b/D= ocumentation/devicetree/bindings/mfd/nxp,s32g2-siul2.yaml new file mode 100644 index 000000000000..a8edbea75bb6 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/nxp,s32g2-siul2.yaml @@ -0,0 +1,165 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/nxp,s32g2-siul2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32 System Integration Unit Lite2 (SIUL2) + +maintainers: + - Andrei Stefanescu + +description: | + SIUL2 is a hardware block which implements pinmuxing, + pinconf, GPIOs (some with interrupt capability) and + registers which contain information about the SoC. + There are generally two SIUL2 modules whose functionality + is grouped together. For example interrupt configuration + registers are part of SIUL2_1 even though interrupts are + also available for SIUL2_0 pins. + + The following register types are exported by SIUL2: + - MIDR (MCU ID Register) - information related to the SoC + - interrupt configuration registers + - MSCR (Multiplexed Signal Configuration Register) - pinmuxing and pin= conf + - IMCR (Input Multiplexed Signal Configuration Register)- pinmuxing + - PGPDO (Parallel GPIO Pad Data Out Register) - GPIO output value + - PGPDI (Parallel GPIO Pad Data In Register) - GPIO input value + + Most registers are 32bit wide with the exception of PGPDO/PGPDI which are + 16bit wide. + +properties: + compatible: + enum: + - nxp,s32g2-siul2 + - nxp,s32g3-siul2 + + reg: + maxItems: 2 + + reg-names: + items: + - const: siul20 + - const: siul21 + + gpio-controller: true + + "#gpio-cells": + const: 2 + + gpio-ranges: + maxItems: 2 + + gpio-reserved-ranges: + maxItems: 2 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + nvmem-layout: + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml# + description: + This container may reference an NVMEM layout parser. + +patternProperties: + "-hog(-[0-9]+)?$": + required: + - gpio-hog + + "-pins$": + type: object + additionalProperties: false + + patternProperties: + "-grp[0-9]$": + type: object + allOf: + - $ref: /schemas/pinctrl/pinmux-node.yaml# + - $ref: /schemas/pinctrl/pincfg-node.yaml# + description: + Pinctrl node's client devices specify pin muxes using subnodes, + which in turn use the standard properties below. + + properties: + bias-disable: true + bias-high-impedance: true + bias-pull-up: true + bias-pull-down: true + drive-open-drain: true + input-enable: true + output-enable: true + + pinmux: + description: | + An integer array for representing pinmux configurations of + a device. Each integer consists of a PIN_ID and a 4-bit + selected signal source(SSS) as IOMUX setting, which is + calculated as: pinmux =3D (PIN_ID << 4 | SSS) + + slew-rate: + description: Supported slew rate based on Fmax values (MHz) + enum: [83, 133, 150, 166, 208] + required: + - pinmux + + additionalProperties: false + +required: + - compatible + - reg + - reg-names + - gpio-controller + - "#gpio-cells" + - gpio-ranges + - gpio-reserved-ranges + - interrupts + - interrupt-controller + - "#interrupt-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + siul2@4009c000 { + compatible =3D "nxp,s32g2-siul2"; + reg =3D <0x4009c000 0x179c>, + <0x44010000 0x17b0>; + reg-names =3D "siul20", "siul21"; + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&siul2 0 0 102>, <&siul2 112 112 79>; + gpio-reserved-ranges =3D <102 10>, <123 21>; + interrupt-controller; + #interrupt-cells =3D <2>; + interrupts =3D ; + + jtag_pins: jtag-pins { + jtag-grp0 { + pinmux =3D <0x0>; + input-enable; + bias-pull-up; + slew-rate =3D <166>; + }; + }; + + nvmem-layout { + compatible =3D "fixed-layout"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + soc-major@0 { + reg =3D <0 0x4>; + }; + }; + }; +... --=20 2.45.2 From nobody Sat Nov 23 09:07:59 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2051.outbound.protection.outlook.com [40.107.105.51]) (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 AF69E1FBC88; Wed, 13 Nov 2024 10:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492763; cv=fail; b=CLeZfJ52SQab7/upewqEl9qLJpNZ4L1xmedtANO2Rbbiij0gjVRfUndQKo8Q/VUuX8JeIpdcMDAo1FSnL4aRDmBwQZUGqNgLvbCWEckn0WT0X+O2R1CqkMcUolUKhh+UwBZt9X6wfcyhZH86Y3K1oi3bU5+FP5uhAVO4kHC1tjo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492763; c=relaxed/simple; bh=C8dXkibmUw1yapXhteSlfYaNcIUC87kKnuZBfVDZUJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=F80JDGuC3G58gK/OeCrxddeNBy6c5Dqe55wc/TVfID7QVmi3aLEBi9j1TXbQeVNZmUfGo3TEuTNpzrJp1Sdok2j8WTsj6YRoB/HpkfioZiUPyc4W3ibQ3kjWuLmv4EnjzjiXE9TZQpuXOAOtxZ+vp1vqCfFS0hhr4y4ERCOu1D4= 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=ujhtVSCd; arc=fail smtp.client-ip=40.107.105.51 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="ujhtVSCd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LawweWnjj4x++eNajQ1zzpJKUU6XAorJKXjXu2V6FPyFVpW7dNLvatyQYWwvGoBOcBUp/1QOXmOg8zo7RPJ2nD6/mrMfdg7cDKYKbZllIaNnWUHjuesW+LAGCMNf3X/YZoi0PGydq34NAqL6xNqkNblZO7/MnNrT7FGIaUBw2J1M7BJs0HUxn7DNP6XgZAXZ9wNogkAuWIoWKuyxMbFZ8HgaYFIlkMWj+roqB1mH5TlxETrAk3AjKJGoI8cHYjlFXLfLM+MRAEgHYVchVwFwhB5JanylKlm7tBqsQPx3Vbfhw/0Ij/++LLtHx9QB3cCT0XUryeYxPVBcb7GCbNnnoA== 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=nHX5hYTYU5Vx0dDy8P8XmUqnrwWHmblGMTu8xZWtmV4=; b=RgxE214KgHUw2XXL6Z2MNArxtjfeFDSPLJbHJxqreZV7iBp+p9i+U/UJQyL/euf0VfFTYM2Uj/OAb60QCxk8X1THx7nwEcVBuVtA8UkfZyEUD2Kp0VeT9bx22bRlm/4cS5eNWG+ahEN8fP08CooVbIzKWahD0U/eAmiGQ4a7cCl027rT+1chASM7LH6SAjyUuNbQg8WZScd5xI3qX0pm6lYcaTvDdVRntdotorDReB56MCNg5ZqmgmIyvsTS8XnXFroxvxYU/uq9RIx9qg+lxrIRizvH41wtWWBHdLa4HTj2gfcq9tb/P8zbjv/3Hztcf7rPdE8nH4q375lDv+rIqQ== 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=nHX5hYTYU5Vx0dDy8P8XmUqnrwWHmblGMTu8xZWtmV4=; b=ujhtVSCdM7bbHn+yY3TJDdNkUwNiQo4baEyvU73Bhh6zE3taubNqY8AWxZOLVQAVID7EDhRn2mKhh4gcoJEHek03bPlslJMl17SGWPFUmuLrJo9Z+kL6x5+ccM3SFgbUVr/f5dNjLWKMM44T0VOdYaUddjb3X76Lqi/4tPTRauKXp5ovDWY9HwGkcTZMN5kbWzeF47NX5odAhpSrjJzFc0lLHiA14V3iKmPFJoXZALxCiU13aLIJyJLpbZR/eBlV/CWG3CCMyt+8gTL/+SdaPL+MsQkr9cYCHsQIAzd7FeE9rqIzEjQVguZxA6ta/RyyK/jwCOEAeP4A1mml7em4Wg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by PA2PR04MB10129.eurprd04.prod.outlook.com (2603:10a6:102:3ff::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Wed, 13 Nov 2024 10:12:36 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:35 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 2/7] mfd: nxp-siul2: add support for NXP SIUL2 Date: Wed, 13 Nov 2024 12:10:54 +0200 Message-ID: <20241113101124.1279648-3-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|PA2PR04MB10129:EE_ X-MS-Office365-Filtering-Correlation-Id: c6591fdf-9b8e-41bb-99e7-08dd03cbb1fa 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|366016|7416014|376014|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?QjZJcC9FSnk1eDNncnEyUTcwcW9ycWF1L0RGVEJ1S1VTQzBCQ2x5c0E0Qzk5?= =?utf-8?B?ZUxjRFFDR1hjMkxLdmtaQnhnSERGVHV2ci9Td002VzJMTmRYcUpmdTZqRmk4?= =?utf-8?B?TnpYOEVhM2sycXJaRnhpMVZjRThRZDd5Q081VjhQMlRyY3Fib0EvVUUwT2Q5?= =?utf-8?B?dHhxd1haWFlXMWtkU3NQaVBYT3I0bkp4YWRaY2wydlVGWUo3bWxZNjlzd2Nv?= =?utf-8?B?QVdkZkhaTmZXUWo2QnE0RHhlRVhNdEV2OFNsYWNqQUVaMndBcW5VSDlscFVR?= =?utf-8?B?eURyYTFmQkZqcmE5cXkxWnZKTXVUMlRlU3BxYzY5TlBJN2daU2hjaHh3d2J6?= =?utf-8?B?YTNQQVJRcXNtb1habmc1dUhqZ3h4cmYrZC9aMWhLZ3M0bFhOZlQrV0tGMjRi?= =?utf-8?B?NlJ0bkxqMkVONEgyMDkrdXFoRnhyc3ExU1VpbS95d2dKUFJXcTh2OC8vbUFE?= =?utf-8?B?eUtKQnIwL04zMmsxV1VzeGtERWlzbkxVRUs4cFRiRWFORy9qanpKOFhYeU5L?= =?utf-8?B?VzBzS2lNbDhUTzRqd0d4ZHJRZEVRU2IxZE00WVVFQ0Jsd2Fxb1YyeW9HeU9E?= =?utf-8?B?TjViWitYTjBreTlEelludTJDajYyMnRrY3h3TWI2MGY3Tm1hK3lXK3ZFRHRq?= =?utf-8?B?MlovaFdZcEtoekpwekowT1NacGRqRW5vdzVCUUVkaTBpVkpiSGlJU0U1NWU4?= =?utf-8?B?S2pxbkxEeVY4K0VXYU1QWmxyRzVLYnhpT3JTaG5vS05TbkFEa0l5SUNzRldx?= =?utf-8?B?THJxWUxVbmpSNmFMb09OdXM5WkFGSjF0L1VtTTFpM05BM1VYUDFvWDNBa2Zt?=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L09FKzJOVEdGL2pBNkI0NFVP?= =?utf-8?B?emEzZGkySDJucWZ3TmJTQU41VnpYV2p5Wk9tZXVKZ0daWTNiRFV1QUtlcEw1?= =?utf-8?B?WGJqbmhEQmxPd09QT1h4ZUJkMWdPNGhiUDFkZHMrcUdncnQvT0w0Z0gycVFD?= =?utf-8?Q?fZsanlTGdvX6o?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(52116014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eHhBbHZlTkVMaGNpMXd0RDQrVTQ3dFBhVDhxc1VRQzlOOW9xQnl4ZlJZamNu?= =?utf-8?B?V3hiQ0QzL1gzMnVhd3BSM0xZZlJ1ZjRyUE1OOUs4SFBPUmJaL0FlUDFtdldG?= =?utf-8?B?M1JmdTJsYTUzTkNjNG1SWlRvakV2aDdVcUNqTTRQQzJHSVRPZDh3aGxHbU5X?= =?utf-8?B?dE5aand3SWtNSHI2a3cyNkNNbVZQOTU4NHJNQVY4T25LRVM1RkNhd1F4a3hi?= =?utf-8?B?RXFHRDR0NjJteTkyeENydlVlYkNJZTE4c2dlTzgzRkh6S210UkdPMHNqUHFr?= =?utf-8?B?c2VHMThweXAvT2hGcEo1K2g5b0hCVGJnWkdyZDY4R3dwWXVOcG5zWmY2VytV?= =?utf-8?B?akFzNXRnK2lNT0tlRVQ0MFZjMVlDaFBVZE9QT3Q1OFV3N2ZMbk5BQTB6QWFH?= =?utf-8?B?NG91aUZwQ0s5OXpRMWhOZUlUYWdud0dOb013Wk1lUk1KbTQ0SDRVWEVUTVNG?= =?utf-8?B?V2FibHNaSVN0SVU3UEdKTmRMY01UN3dXdGNQdlNjY2tOYW9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tV3dtN0NLM2luRWtYaTYydXkxalhSVG43UnND?= =?utf-8?B?RUFWUnJsU2R4dTg1d1Z3ZkVwejIyc1o2WnJPSzhvT2N5QmxneEJsSSs3bXNS?= =?utf-8?B?SVk4WlpZODhRMGlSL1RvckNLWE45dU8zMUJ2M1d4dUM0Znp0RDlncnJMNVZt?= =?utf-8?B?cHdvV01Ub2VVVGQ0K0FjR0dTdUtYcFhIYlNqY1NuTDJIbzJmYnhjRmYwV1Zv?= =?utf-8?B?RlVlajZWbTQwY1pYaHN6MXVEc0Z1WSszaFJXQVBUVktrSEZ3MWtZVVhwWEFW?= =?utf-8?B?dk8zM2h3NnBwbWNRTlM5TlRDbDNaZitvSDd6UHI2TjQ4ckozZitqdjZVK2dE?= =?utf-8?B?R3N5RUFiLzNWOGJ5cDRqVFdyaEVnSXVjUGVqMERsMHdSN0UvY2FqdmtodDFY?= =?utf-8?B?SXFLVFFac24xVmw3MmpQVWMxOEFRellLT3NwV20wL3VORmZ1eWhMQk9SM081?= =?utf-8?B?UUQ3aVZSMEtpbzM0UU1vd3U4dFdDWkk3L0JvMy9DSHA5NkM5cCtocWgyVERu?= =?utf-8?B?aks5Q2tHcG1kMmlYZzNuYWswWU82VXFlQkJraitZRlF6ZW9WbW1IM0ZZNzZN?= =?utf-8?B?ZGVnL1J3OFg2a3Z1My9TeFM2cWx4OGtSaldZZlY3dVZYbTVoUXpXcm90MHlB?= =?utf-8?B?Si8rb2tDSldnU3lEaG00YlFxckM0TXNBQ2p0OWkwRjhYeXE4akxOMVlxTWN5?= =?utf-8?B?eHpHRDBYRTFJYStKdWVBSUlEYXRVeEdVUERwbjZFc2NhbnJRUDVUNGFYL04y?= =?utf-8?B?elE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6591fdf-9b8e-41bb-99e7-08dd03cbb1fa X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:35.8989 (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: N98eUuO9MRg+cz4uQsJMiN+o09PIFSV/DvKnKNlmwob+GEOVuTopebgn2ZjbXdwlhAZTGli3y05mB4P6wxtnf0oPiTMvIlQ+p+L2WH9nfKw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10129 Content-Type: text/plain; charset="utf-8" SIUL2 (System Integration Unit Lite) is a hardware module which implements various functionalities: - reading SoC information - pinctrl - GPIO (including interrupts) This commit only adds support for pinctrl&GPIO(one cell). Further commits will add nvmem functionality(a second cell). There are multiple register types in the SIUL2 module: - MIDR (MCU ID Register) * contains information about the SoC. - Interrupt related registers * There are 32 interrupts named EIRQ. An EIRQ may be routed to one or more GPIOs. Not all GPIOs have EIRQs associated with them - MSCR (Multiplexed Signal Configuration Register) * handle pinmuxing and pinconf - IMCR (Input Multiplexed Signal Configuration Register) * are part of pinmuxing - PGPDO/PGPDI (Parallel GPIO Pad Data Out/In Register) * Write/Read the GPIO value There are two SIUL2 modules in the S32G SoC. This driver handles both because functionality is shared between them. For example: some GPIOs in SIUL2_0 have interrupt capability but the registers configuring this are in SIUL2_1. Signed-off-by: Andrei Stefanescu --- drivers/mfd/Kconfig | 12 + drivers/mfd/Makefile | 1 + drivers/mfd/nxp-siul2.c | 410 ++++++++++++++++++++++++++++++++++ include/linux/mfd/nxp-siul2.h | 55 +++++ 4 files changed, 478 insertions(+) create mode 100644 drivers/mfd/nxp-siul2.c create mode 100644 include/linux/mfd/nxp-siul2.h diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index f9325bcce1b9..fc590789e8b3 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1098,6 +1098,18 @@ config MFD_NTXEC certain e-book readers designed by the original design manufacturer Netronix. =20 +config MFD_NXP_SIUL2 + tristate "NXP SIUL2 MFD driver" + select MFD_CORE + select REGMAP_MMIO + depends on ARCH_S32 || COMPILE_TEST + help + Select this to get support for the NXP SIUL2 (System Integration + Unit Lite) module. This hardware block contains registers for + SoC information, pinctrl and GPIO functionality. This will + probe a MFD driver which will contain cells for a combined + pinctrl&GPIO driver and nvmem drivers for the SoC information. + config MFD_RETU tristate "Nokia Retu and Tahvo multi-function device" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 2a9f91e81af8..7b19ea014221 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -226,6 +226,7 @@ obj-$(CONFIG_MFD_INTEL_PMC_BXT) +=3D intel_pmc_bxt.o obj-$(CONFIG_MFD_PALMAS) +=3D palmas.o obj-$(CONFIG_MFD_VIPERBOARD) +=3D viperboard.o obj-$(CONFIG_MFD_NTXEC) +=3D ntxec.o +obj-$(CONFIG_MFD_NXP_SIUL2) +=3D nxp-siul2.o obj-$(CONFIG_MFD_RC5T583) +=3D rc5t583.o rc5t583-irq.o obj-$(CONFIG_MFD_RK8XX) +=3D rk8xx-core.o obj-$(CONFIG_MFD_RK8XX_I2C) +=3D rk8xx-i2c.o diff --git a/drivers/mfd/nxp-siul2.c b/drivers/mfd/nxp-siul2.c new file mode 100644 index 000000000000..7751992e4df3 --- /dev/null +++ b/drivers/mfd/nxp-siul2.c @@ -0,0 +1,410 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * SIUL2(System Integration Unit Lite) MFD driver + * + * Copyright 2024 NXP + */ +#include +#include +#include +#include +#include + +#define S32G_NUM_SIUL2 2 + +#define S32_REG_RANGE(start, end, name, access) \ + { \ + .reg_name =3D (name), \ + .reg_start_offset =3D (start), \ + .reg_end_offset =3D (end), \ + .reg_access =3D (access), \ + .valid =3D true, \ + } + +#define S32_INVALID_REG_RANGE \ + { \ + .reg_name =3D NULL, \ + .reg_access =3D NULL, \ + .valid =3D false, \ + } + +static const struct mfd_cell nxp_siul2_devs[] =3D { + { + .name =3D "s32g-siul2-pinctrl", + } +}; + +/** + * struct nxp_siul2_reg_range_info: a register range in SIUL2 + * @reg_name: the name for the register range + * @reg_start_offset: the first valid register offset + * @reg_end_offset: the last valid register offset + * @reg_access: the read/write access tables if not NULL + * @valid: whether the register range is valid or not + */ +struct nxp_siul2_reg_range_info { + const char *reg_name; + unsigned int reg_start_offset; + unsigned int reg_end_offset; + const struct regmap_access_table *reg_access; + bool valid; +}; + +static const struct regmap_range s32g2_siul2_0_imcr_reg_ranges[] =3D { + /* IMCR0 - IMCR1 */ + regmap_reg_range(0, 4), + /* IMCR3 - IMCR61 */ + regmap_reg_range(0xC, 0xF4), + /* IMCR68 - IMCR83 */ + regmap_reg_range(0x110, 0x14C) +}; + +static const struct regmap_access_table s32g2_siul2_0_imcr =3D { + .yes_ranges =3D s32g2_siul2_0_imcr_reg_ranges, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_0_imcr_reg_ranges) +}; + +static const struct regmap_range s32g2_siul2_0_pgpd_reg_ranges[] =3D { + /* PGPD*0 - PGPD*5 */ + regmap_reg_range(0, 0xA), + /* PGPD*6 - PGPD*6 */ + regmap_reg_range(0xE, 0xE), +}; + +static const struct regmap_access_table s32g2_siul2_0_pgpd =3D { + .yes_ranges =3D s32g2_siul2_0_pgpd_reg_ranges, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_0_pgpd_reg_ranges) +}; + +static const struct regmap_range s32g2_siul2_1_irq_reg_ranges[] =3D { + /* DISR0 */ + regmap_reg_range(0x10, 0x10), + /* DIRER0 */ + regmap_reg_range(0x18, 0x18), + /* DIRSR0 */ + regmap_reg_range(0x20, 0x20), + /* IREER0 */ + regmap_reg_range(0x28, 0x28), + /* IFEER0 */ + regmap_reg_range(0x30, 0x30), +}; + +static const struct regmap_access_table s32g2_siul2_1_irq =3D { + .yes_ranges =3D s32g2_siul2_1_irq_reg_ranges, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_1_irq_reg_ranges), +}; + +static const struct regmap_range s32g2_siul2_1_irq_volatile_reg_range[] = =3D { + /* DISR0 */ + regmap_reg_range(0x10, 0x10) +}; + +static const struct regmap_access_table s32g2_siul2_1_irq_volatile =3D { + .yes_ranges =3D s32g2_siul2_1_irq_volatile_reg_range, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_1_irq_volatile_reg_range), +}; + +static const struct regmap_range s32g2_siul2_1_mscr_reg_ranges[] =3D { + /* MSCR112 - MSCR122 */ + regmap_reg_range(0, 0x28), + /* MSCR144 - MSCR190 */ + regmap_reg_range(0x80, 0x138) +}; + +static const struct regmap_access_table s32g2_siul2_1_mscr =3D { + .yes_ranges =3D s32g2_siul2_1_mscr_reg_ranges, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_1_mscr_reg_ranges), +}; + +static const struct regmap_range s32g2_siul2_1_imcr_reg_ranges[] =3D { + /* IMCR119 - IMCR121 */ + regmap_reg_range(0, 8), + /* IMCR128 - IMCR129 */ + regmap_reg_range(0x24, 0x28), + /* IMCR143 - IMCR151 */ + regmap_reg_range(0x60, 0x80), + /* IMCR153 - IMCR161 */ + regmap_reg_range(0x88, 0xA8), + /* IMCR205 - IMCR212 */ + regmap_reg_range(0x158, 0x174), + /* IMCR224 - IMCR225 */ + regmap_reg_range(0x1A4, 0x1A8), + /* IMCR233 - IMCR248 */ + regmap_reg_range(0x1C8, 0x204), + /* IMCR273 - IMCR274 */ + regmap_reg_range(0x268, 0x26C), + /* IMCR278 - IMCR281 */ + regmap_reg_range(0x27C, 0x288), + /* IMCR283 - IMCR286 */ + regmap_reg_range(0x290, 0x29C), + /* IMCR288 - IMCR294 */ + regmap_reg_range(0x2A4, 0x2BC), + /* IMCR296 - IMCR302 */ + regmap_reg_range(0x2C4, 0x2DC), + /* IMCR304 - IMCR310 */ + regmap_reg_range(0x2E4, 0x2FC), + /* IMCR312 - IMCR314 */ + regmap_reg_range(0x304, 0x30C), + /* IMCR316 */ + regmap_reg_range(0x314, 0x314), + /* IMCR 318 */ + regmap_reg_range(0x31C, 0x31C), + /* IMCR322 - IMCR340 */ + regmap_reg_range(0x32C, 0x374), + /* IMCR343 - IMCR360 */ + regmap_reg_range(0x380, 0x3C4), + /* IMCR363 - IMCR380 */ + regmap_reg_range(0x3D0, 0x414), + /* IMCR383 - IMCR393 */ + regmap_reg_range(0x420, 0x448), + /* IMCR398 - IMCR433 */ + regmap_reg_range(0x45C, 0x4E8), + /* IMCR467 - IMCR470 */ + regmap_reg_range(0x570, 0x57C), + /* IMCR473 - IMCR475 */ + regmap_reg_range(0x588, 0x590), + /* IMCR478 - IMCR480*/ + regmap_reg_range(0x59C, 0x5A4), + /* IMCR483 - IMCR485 */ + regmap_reg_range(0x5B0, 0x5B8), + /* IMCR488 - IMCR490 */ + regmap_reg_range(0x5C4, 0x5CC), + /* IMCR493 - IMCR495 */ + regmap_reg_range(0x5D8, 0x5E0), +}; + +static const struct regmap_access_table s32g2_siul2_1_imcr =3D { + .yes_ranges =3D s32g2_siul2_1_imcr_reg_ranges, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_1_imcr_reg_ranges) +}; + +static const struct regmap_range s32g2_siul2_1_pgpd_reg_ranges[] =3D { + /* PGPD*7 */ + regmap_reg_range(0xC, 0xC), + /* PGPD*9 */ + regmap_reg_range(0x10, 0x10), + /* PDPG*10 - PGPD*11 */ + regmap_reg_range(0x14, 0x16), +}; + +static const struct regmap_access_table s32g2_siul2_1_pgpd =3D { + .yes_ranges =3D s32g2_siul2_1_pgpd_reg_ranges, + .n_yes_ranges =3D ARRAY_SIZE(s32g2_siul2_1_pgpd_reg_ranges) +}; + +static const struct nxp_siul2_reg_range_info +s32g2_reg_ranges[S32G_NUM_SIUL2][SIUL2_NUM_REG_TYPES] =3D { + /* SIUL2_0 */ + { + [SIUL2_MPIDR] =3D S32_REG_RANGE(4, 8, "SIUL2_0_MPIDR", NULL), + /* Interrupts are to be controlled from SIUL2_1 */ + [SIUL2_IRQ] =3D S32_INVALID_REG_RANGE, + [SIUL2_MSCR] =3D S32_REG_RANGE(0x240, 0x3D4, "SIUL2_0_MSCR", + NULL), + [SIUL2_IMCR] =3D S32_REG_RANGE(0xA40, 0xB8C, "SIUL2_0_IMCR", + &s32g2_siul2_0_imcr), + [SIUL2_PGPDO] =3D S32_REG_RANGE(0x1700, 0x170E, + "SIUL2_0_PGPDO", + &s32g2_siul2_0_pgpd), + [SIUL2_PGPDI] =3D S32_REG_RANGE(0x1740, 0x174E, + "SIUL2_0_PGPDI", + &s32g2_siul2_0_pgpd), + }, + /* SIUL2_1 */ + { + [SIUL2_MPIDR] =3D S32_REG_RANGE(4, 8, "SIUL2_1_MPIDR", NULL), + [SIUL2_IRQ] =3D S32_REG_RANGE(0x10, 0xC0, "SIUL2_1_IRQ", + &s32g2_siul2_1_irq), + [SIUL2_MSCR] =3D S32_REG_RANGE(0x400, 0x538, "SIUL2_1_MSCR", + &s32g2_siul2_1_mscr), + [SIUL2_IMCR] =3D S32_REG_RANGE(0xC1C, 0x11FC, "SIUL2_1_IMCR", + &s32g2_siul2_1_imcr), + [SIUL2_PGPDO] =3D S32_REG_RANGE(0x1700, 0x1716, + "SIUL2_1_PGPDO", + &s32g2_siul2_1_pgpd), + [SIUL2_PGPDI] =3D S32_REG_RANGE(0x1740, 0x1756, + "SIUL2_1_PGPDI", + &s32g2_siul2_1_pgpd), + }, +}; + +static const struct regmap_config nxp_siul2_regmap_irq_conf =3D { + .val_bits =3D 32, + .val_format_endian =3D REGMAP_ENDIAN_LITTLE, + .reg_bits =3D 32, + .reg_stride =3D 4, + .cache_type =3D REGCACHE_FLAT, + .use_raw_spinlock =3D true, + .volatile_table =3D &s32g2_siul2_1_irq_volatile, +}; + +static const struct regmap_config nxp_siul2_regmap_generic_conf =3D { + .val_bits =3D 32, + .val_format_endian =3D REGMAP_ENDIAN_LITTLE, + .reg_bits =3D 32, + .reg_stride =3D 4, + .cache_type =3D REGCACHE_FLAT, + .use_raw_spinlock =3D true, +}; + +static const struct regmap_config nxp_siul2_regmap_pgpdo_conf =3D { + .val_bits =3D 16, + .val_format_endian =3D REGMAP_ENDIAN_LITTLE, + .reg_bits =3D 32, + .reg_stride =3D 2, + .cache_type =3D REGCACHE_FLAT, + .use_raw_spinlock =3D true, +}; + +static const struct regmap_config nxp_siul2_regmap_pgpdi_conf =3D { + .val_bits =3D 16, + .val_format_endian =3D REGMAP_ENDIAN_LITTLE, + .reg_bits =3D 32, + .reg_stride =3D 2, + .cache_type =3D REGCACHE_NONE, + .use_raw_spinlock =3D true, +}; + +static int nxp_siul2_init_regmap(struct platform_device *pdev, + void __iomem *base, unsigned int siul) +{ + const struct regmap_config *regmap_configs[SIUL2_NUM_REG_TYPES] =3D { + [SIUL2_MPIDR] =3D &nxp_siul2_regmap_generic_conf, + [SIUL2_IRQ] =3D &nxp_siul2_regmap_irq_conf, + [SIUL2_MSCR] =3D &nxp_siul2_regmap_generic_conf, + [SIUL2_IMCR] =3D &nxp_siul2_regmap_generic_conf, + [SIUL2_PGPDO] =3D &nxp_siul2_regmap_pgpdo_conf, + [SIUL2_PGPDI] =3D &nxp_siul2_regmap_pgpdi_conf, + }; + const struct nxp_siul2_reg_range_info *tmp_range; + struct regmap_config tmp_conf; + struct nxp_siul2_info *info; + struct nxp_siul2_mfd *priv; + void __iomem *reg_start; + int i; + + priv =3D platform_get_drvdata(pdev); + info =3D &priv->siul2[siul]; + + for (i =3D 0; i < SIUL2_NUM_REG_TYPES; i++) { + if (!s32g2_reg_ranges[siul][i].valid) + continue; + + tmp_range =3D &s32g2_reg_ranges[siul][i]; + tmp_conf =3D *regmap_configs[i]; + tmp_conf.name =3D tmp_range->reg_name; + tmp_conf.max_register =3D + tmp_range->reg_end_offset - tmp_range->reg_start_offset; + + if (tmp_conf.cache_type !=3D REGCACHE_NONE) + tmp_conf.num_reg_defaults_raw =3D + tmp_conf.max_register / tmp_conf.reg_stride; + + if (tmp_range->reg_access) { + tmp_conf.wr_table =3D tmp_range->reg_access; + tmp_conf.rd_table =3D tmp_range->reg_access; + } + + reg_start =3D base + tmp_range->reg_start_offset; + info->regmaps[i] =3D devm_regmap_init_mmio(&pdev->dev, reg_start, + &tmp_conf); + if (IS_ERR(info->regmaps[i])) + return dev_err_probe(&pdev->dev, + PTR_ERR(info->regmaps[i]), + "regmap %d init failed: %ld\n", i, + PTR_ERR(info->regmaps[i])); + } + + return 0; +} + +static int nxp_siul2_parse_dtb(struct platform_device *pdev) +{ + struct device_node *np =3D pdev->dev.of_node; + struct of_phandle_args pinspec; + struct nxp_siul2_mfd *priv; + void __iomem *base; + char reg_name[16]; + int i, ret; + + priv =3D platform_get_drvdata(pdev); + + for (i =3D 0; i < priv->num_siul2; i++) { + ret =3D snprintf(reg_name, ARRAY_SIZE(reg_name), "siul2%d", i); + if (ret < 0 || ret >=3D ARRAY_SIZE(reg_name)) + return ret; + + base =3D devm_platform_ioremap_resource_byname(pdev, reg_name); + if (IS_ERR(base)) + return dev_err_probe(&pdev->dev, PTR_ERR(base), + "Failed to get MEM resource: %s\n", + reg_name); + + ret =3D nxp_siul2_init_regmap(pdev, base, i); + if (ret) + return ret; + + ret =3D of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, + i, &pinspec); + if (ret) + return ret; + + of_node_put(pinspec.np); + + if (pinspec.args_count !=3D 3) + return dev_err_probe(&pdev->dev, -EINVAL, + "Invalid pinspec count: %d\n", + pinspec.args_count); + + priv->siul2[i].gpio_base =3D pinspec.args[1]; + priv->siul2[i].gpio_num =3D pinspec.args[2]; + } + + return 0; +} + +static int nxp_siul2_probe(struct platform_device *pdev) +{ + struct nxp_siul2_mfd *priv; + int ret; + + priv =3D devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->num_siul2 =3D S32G_NUM_SIUL2; + priv->siul2 =3D devm_kcalloc(&pdev->dev, priv->num_siul2, + sizeof(*priv->siul2), GFP_KERNEL); + if (!priv->siul2) + return -ENOMEM; + + platform_set_drvdata(pdev, priv); + ret =3D nxp_siul2_parse_dtb(pdev); + if (ret) + return ret; + + return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, + nxp_siul2_devs, ARRAY_SIZE(nxp_siul2_devs), + NULL, 0, NULL); +} + +static const struct of_device_id nxp_siul2_dt_ids[] =3D { + { .compatible =3D "nxp,s32g2-siul2" }, + { .compatible =3D "nxp,s32g3-siul2" }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, nxp_siul2_dt_ids); + +static struct platform_driver nxp_siul2_mfd_driver =3D { + .driver =3D { + .name =3D "nxp-siul2-mfd", + .of_match_table =3D nxp_siul2_dt_ids, + }, + .probe =3D nxp_siul2_probe, +}; + +module_platform_driver(nxp_siul2_mfd_driver); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("NXP SIUL2 MFD driver"); +MODULE_AUTHOR("Andrei Stefanescu "); diff --git a/include/linux/mfd/nxp-siul2.h b/include/linux/mfd/nxp-siul2.h new file mode 100644 index 000000000000..238c812dba29 --- /dev/null +++ b/include/linux/mfd/nxp-siul2.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * + * S32 SIUL2 core definitions + * + * Copyright 2024 NXP + */ + +#ifndef __DRIVERS_MFD_NXP_SIUL2_H +#define __DRIVERS_MFD_NXP_SIUL2_H + +#include + +/** + * enum nxp_siul2_reg_type - an enum for SIUL2 reg types + * @SIUL2_MPIDR - SoC info + * @SIUL2_IRQ - IRQ related registers, only valid in SIUL2_1 + * @SIUL2_MSCR - used for pinmuxing and pinconf + * @SIUL2_IMCR - used for pinmuxing + * @SIUL2_PGPDO - writing the GPIO value + * @SIUL2_PGPDI - reading the GPIO value + */ +enum nxp_siul2_reg_type { + SIUL2_MPIDR, + SIUL2_IRQ, + SIUL2_MSCR, + SIUL2_IMCR, + SIUL2_PGPDO, + SIUL2_PGPDI, + + SIUL2_NUM_REG_TYPES +}; + +/** + * struct nxp_siul2_info - details about one SIUL2 hardware instance + * @regmaps: the regmaps for each register type for a SIUL2 hardware insta= nce + * @gpio_base: the first GPIO in this SIUL2 module + * @gpio_num: the number of GPIOs in this SIUL2 module + */ +struct nxp_siul2_info { + struct regmap *regmaps[SIUL2_NUM_REG_TYPES]; + u32 gpio_base; + u32 gpio_num; +}; + +/** + * struct nxp_siul2_mfd - driver data + * @siul2: info about the SIUL2 modules present + * @num_siul2: number of siul2 modules + */ +struct nxp_siul2_mfd { + struct nxp_siul2_info *siul2; + u8 num_siul2; +}; + +#endif /* __DRIVERS_MFD_NXP_SIUL2_H */ --=20 2.45.2 From nobody Sat Nov 23 09:07:59 2024 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2051.outbound.protection.outlook.com [40.107.105.51]) (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 748671FBC8B; Wed, 13 Nov 2024 10:12:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492765; cv=fail; b=XqyKg0bt8u749FAsuaCTHG7MzVXZLkc6VtkRmaATW0CLNe9Tafv4QB+FH3ZlDDaEu7GrCcaxuRBjGbhNCeCn1fXK2IwnisABoUYmsKbJpWP03zej+Q+z0FEiUNFvgxKQ5e2YCvfRQTMQMeZZ9rjKtjeT70X2h0tLe57lAvn6bsQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492765; c=relaxed/simple; bh=UBamIN52E4M9Fboe9FKaI0ot2Z0A6deyBH3QyaH1GAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=IUyTR92euG+9XUgx+C9jPCkPozlmMCnXIde/jAbGJTm9MnMWrScbSelOtSodOAoH0+bCV/vUbSMky/DbqPunFJBYIf5Grx/+Ta5Uf8YUgu2rJa7BtX/226LS8K0yXhsO++Y0AMha+KGFIA8JTorlodbTy1I3I+vayU/lhcjrwes= 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=XmAXm5FZ; arc=fail smtp.client-ip=40.107.105.51 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="XmAXm5FZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pzt2+mQQqvfSZaPg2URoY2ZZU0TD+SVLESgKAafre2VPeLmRW+6HbQ+WWO8/jL8wi7fMd/TDULjlWGs4PpJwWposEzY4zaBCe6bQl8uuTvQ7Kk+qIQbWZOvBZrBO67VPtqw8mNN4AgDsijih9ifvCk+OCdvwTw/XxfRdkHG0UuCi/cFTewSghOhBufGcvUT1zk2N0AS50SW7AqnPewKw6EkJGv2D4dUoYLvObSjfTPztJgTsjRiaAgKE0FDxeS+XrQJ6esPxIyrdPp/va9VHmhTbR69KySIMLi1EhXYJrI0Wxlv+5uslPqJQyAPyVvmulwrrneIJNEv+OyViJ6GNig== 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=2Kzz7QtLVI+Cdc28fXOJnGYj1Ph+zENPv3rBRnyqP2Q=; b=dqxeil0j1hn3tCZKPajzENCbr3zUt2HK2LI9WTkoXNbI1dtCpspxqMyeqIHD0YNOCozxzA1BhpuXK3H1jCe/ueorYmt/zghwANqNv1Updm4Z4864LkihlLe44qfU4is4nKHcBWzyE45IYMeZSqP2Z0ChQYOiOVCzA2sxQMA2KiV7P49N8ZMbG5szC3uWhPniHJDUt5AmoJ9AMP1hgqJ6zuXLVkVGrlaTQmxIQ/+/o8DK+OpCR4hBI4dqOGer92cyCerHVFMLSf0mYZaivCmfMcO8fZfxZCxC01ZkkDVfncyWUZCfdZG7V6Bb00cvzZzLCd6kjwryphPkOcxp9RErNw== 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=2Kzz7QtLVI+Cdc28fXOJnGYj1Ph+zENPv3rBRnyqP2Q=; b=XmAXm5FZHJCNcaJQDsBBvD+9k7dlE4XTMatjfxDGQ99QOvgyEnkUGrogaSnS+Hr1bxeJsSl6xRveQwrZ0iQK/fiTB7RwdnYOxtasVCzVw08dwz+uMwifVdtA+fREW3FIt2ZtOJqHIMf7XiPCcynYf8al2NFBimPZyWOJIIAVX2JcvLcqvpi0VpTnzsNtYAuVBHbHuj+l7hNmNtSKqFstNPffxyG1f4pY+2GoLxO0SCCXLUFlhxnngMtgbxYO7VqC1t5MLqmwY44QsXTT/QLuZQllnL+2JOOrQpUV06vlFRXy2fSk2n+de361BFRZnjNTYx2W34RaujAuLUM/Phi0iQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by PA2PR04MB10129.eurprd04.prod.outlook.com (2603:10a6:102:3ff::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Wed, 13 Nov 2024 10:12:38 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:38 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 3/7] arm64: dts: s32g: make pinctrl part of mfd node Date: Wed, 13 Nov 2024 12:10:55 +0200 Message-ID: <20241113101124.1279648-4-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|PA2PR04MB10129:EE_ X-MS-Office365-Filtering-Correlation-Id: f5ecfd34-d9d6-4de6-75b5-08dd03cbb358 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|366016|7416014|376014|52116014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?S3EzMGJJbHcxK2RrcU9hTjZyaHJxM1l0WUJTRUhud3UwUkNNSG1LYjhiRCtF?= =?utf-8?B?cGs1TWkvQ1NtY2ZySU1YRTducTJxRXZmSHhwZmh2TVRCODBXMm1lT2l3WmlQ?= =?utf-8?B?L1hsckhTaTNFWmN4Sis5d3ZOcVhFTFVUc2RPZjF1dEZEZTFpb2h0UmpXbTRW?= =?utf-8?B?eHFZL09yRXlxUDdrVXFQRTFwOXY2Y3JSUnZ0L2Q0M0N2REZDR0RwTWlBY040?= =?utf-8?B?L3VxU3d5bmRORkN3RUlNUS9PMmJJbGVORHl4b1JDcVhMQ3VBclJXMk5GSGVy?= =?utf-8?B?S01OU2ZkdzB1d20xb0xhTDJzQWYzSFhmN0ZnTWd0azlGWVNzQmNhK3Vrdld0?= =?utf-8?B?NnUzZFlMR2p3cjVPbjdZRVBGVkxBcmo3WEZoZ25jSkZ4QXJSQ2w3dGRiMk5V?= =?utf-8?B?OVN2ZjZBYlAyNEl5KzNjalpoN0F4Q3hIcHNoc2JuSTNEa0E3ajhtMXl5b1JG?= =?utf-8?B?dmE3SnhFU3YrR2wwSTVNUHJPMmNRWnRrc05tYmZkWmo4OENIUkFjYTI1Y3Bu?= =?utf-8?B?b3pLZkRndkNQRDUwSUY0NmloVG52TlZOaEhHbTRXMmt2WVlQUW9wOU12Vjd6?= =?utf-8?B?YVVBaUZLa25kUXlCQXNxaV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?utf-8?B?S3BlaWdJRFNHbXJwRUo2QnVZbCs3cVoxWmQwb0EyN0RsVVpkQTNhdzI1djBV?= =?utf-8?B?azNhZm5uWXcydzI0RVVXUnB4RjRFMitnbTRZQnl2QVhJcFFpQ3cvYllBck9i?= =?utf-8?B?YXlxdmtUWE1UdnU1MUVNeE14cFo0aFJURi94a2syekIxTHRibENuRk8yQmlU?= =?utf-8?B?aVBaSlRpQXE2eFhZTHVocFZ2YkY2TWdCQjhEeWVzOFdJeHlHSDBNeTA3cElj?= =?utf-8?B?QlFHYU5xdnFWV3VWbUE5VFNFYVA4N1poTmorcDl3TzlycFpnTUZSZVcxS0RC?= =?utf-8?B?RXRVTU1VdEtyR3NQaTZIRnJjWS9yYnJ0dTdFRTF6WEIzcmU4OWV0RVNMUFV2?= =?utf-8?B?bW9WZlArUUc4TTk3d3ozelVWTzcrSDEyeHhGeVdxcmdwMnc9PQ==?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(52116014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZURsTzYzUjQ5bzRuL1hBRmRZai9ZMmJkdUp5ZDFyVXJuK3REZEt5MUQ5cWV5?= =?utf-8?B?YWFTRjk0T2R1RUVveERpbjlveFpvdC9kK3VtYVNaV2JaTmV6Q09SWnpWSVQx?= =?utf-8?B?c2lwNWZLS2tzNVNrdGdTL1JXeDBBM2hmTUppMjl5UmNHc0ZxSmlsblpiNHFx?= =?utf-8?B?QzVickMreFNvSUVnQ2xEejF6R2JSWTVlaFBvaDJVOUh0QUoyeHNNZENqMm5m?= =?utf-8?B?YWdUTmRDSGRheVQzd1RYd1pLZ1JDajh5MEFub3QrRlNiTW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3a0hUeU5uUmRsOVNOQnlsS3kvdjVQbVF1eDNZSVBC?= =?utf-8?B?ZHkwM2hEWEFOclZySVFrTFVrZFpxdHNONVA2STBLbDY0R0VxajVyVzVUY3pH?= =?utf-8?B?Ymc9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5ecfd34-d9d6-4de6-75b5-08dd03cbb358 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:38.0439 (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: lKcmuNPZdAr8O+nBHuc12A7VoNo1bsnzHX3JVBTvDu44eYA4d7W4YOFXIO2yN94n1AGtTClluaSPq04qjJYQhK/X52Zsdz51LeDLggUpwpI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10129 Content-Type: text/plain; charset="utf-8" SIUL2 is now represented as an mfd device. Therefore, the old pinctrl node is deprecated. Move the pinctrl related properties inside the new "nxp-siul2" node. The latter one is now used to represent the mfd device. This change came as a result of upstream review in the following series: https://lore.kernel.org/linux-gpio/a924bbb6-96ec-40be-9d82-a76b2ab73afd@oss= .nxp.com/ https://lore.kernel.org/all/20240926143122.1385658-3-andrei.stefanescu@oss.= nxp.com/ The SIUL2 module has multiple capabilities. It has support for reading SoC information, pinctrl and GPIO. All of this functionality is part of the same register space. The initial pinctrl driver treated the pinctrl functionality as separate from the GPIO one. However, they do rely on common registers and a long, detailed and specific register range list would be required for pinctrl&GPIO (carving out the necessary memory for each function). Moreover, in some cases this wouldn't be enough. For example reading a GPIO's direction would require a read of the MSCR register corresponding to that pin. This would not be possible in the GPIO driver because all of the MSCR registers are referenced by the pinctrl driver. Signed-off-by: Andrei Stefanescu --- arch/arm64/boot/dts/freescale/s32g2.dtsi | 26 +++++++++++------------- arch/arm64/boot/dts/freescale/s32g3.dtsi | 26 +++++++++++------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts= /freescale/s32g2.dtsi index fa054bfe7d5c..e14ce5503e1f 100644 --- a/arch/arm64/boot/dts/freescale/s32g2.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi @@ -114,20 +114,18 @@ soc@0 { #size-cells =3D <1>; ranges =3D <0 0 0 0x80000000>; =20 - pinctrl: pinctrl@4009c240 { - compatible =3D "nxp,s32g2-siul2-pinctrl"; - /* MSCR0-MSCR101 registers on siul2_0 */ - reg =3D <0x4009c240 0x198>, - /* MSCR112-MSCR122 registers on siul2_1 */ - <0x44010400 0x2c>, - /* MSCR144-MSCR190 registers on siul2_1 */ - <0x44010480 0xbc>, - /* IMCR0-IMCR83 registers on siul2_0 */ - <0x4009ca40 0x150>, - /* IMCR119-IMCR397 registers on siul2_1 */ - <0x44010c1c 0x45c>, - /* IMCR430-IMCR495 registers on siul2_1 */ - <0x440110f8 0x108>; + siul2: siul2@4009c000 { + compatible =3D "nxp,s32g2-siul2"; + reg =3D <0x4009c000 0x179c>, + <0x44010000 0x17b0>; + reg-names =3D "siul20", "siul21"; + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&siul2 0 0 102>, <&siul2 112 112 79>; + gpio-reserved-ranges =3D <102 10>, <123 21>; + interrupt-controller; + #interrupt-cells =3D <2>; + interrupts =3D ; =20 jtag_pins: jtag-pins { jtag-grp0 { diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts= /freescale/s32g3.dtsi index b4226a9143c8..fa43d036686f 100644 --- a/arch/arm64/boot/dts/freescale/s32g3.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi @@ -171,20 +171,18 @@ soc@0 { #size-cells =3D <1>; ranges =3D <0 0 0 0x80000000>; =20 - pinctrl: pinctrl@4009c240 { - compatible =3D "nxp,s32g2-siul2-pinctrl"; - /* MSCR0-MSCR101 registers on siul2_0 */ - reg =3D <0x4009c240 0x198>, - /* MSCR112-MSCR122 registers on siul2_1 */ - <0x44010400 0x2c>, - /* MSCR144-MSCR190 registers on siul2_1 */ - <0x44010480 0xbc>, - /* IMCR0-IMCR83 registers on siul2_0 */ - <0x4009ca40 0x150>, - /* IMCR119-IMCR397 registers on siul2_1 */ - <0x44010c1c 0x45c>, - /* IMCR430-IMCR495 registers on siul2_1 */ - <0x440110f8 0x108>; + siul2: siul2@4009c000 { + compatible =3D "nxp,s32g3-siul2"; + reg =3D <0x4009c000 0x179c>, + <0x44010000 0x17b0>; + reg-names =3D "siul20", "siul21"; + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&siul2 0 0 102>, <&siul2 112 112 79>; + gpio-reserved-ranges =3D <102 10>, <123 21>; + interrupt-controller; + #interrupt-cells =3D <2>; + interrupts =3D ; =20 jtag_pins: jtag-pins { jtag-grp0 { --=20 2.45.2 From nobody Sat Nov 23 09:07:59 2024 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012060.outbound.protection.outlook.com [52.101.66.60]) (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 D1BC01FBCB4; Wed, 13 Nov 2024 10:12:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492766; cv=fail; b=JGjAQtx/GXaf2uydeFsyUitFy4+9/mmkZbr5ZQaoLiG+jZD6JnYXd2fWWs/HfVXnfbLfAOEOa2RcU5z8UsOdpL+GsmTiNUMbayhiHG4tXa5eg5K87a4l8yz8tM91N5tAChH40Aep6QcQ4HPqiTfAHNygwTdO29DWmLYVQztrpgg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492766; c=relaxed/simple; bh=3bSU/+/WEI2ll/hwHogFmrw+KjzUx9DhteQpkl9m5hc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=orRv4ly6YRj9amjuSqBMmo5m5ZcWclVYu1hfr83JYsJozjx36T0sA7AcvoiRydLKnYfCgjCsRpsmyU7CDDjqO51DclDI+Ww2guvYMTC/GeBYig04C3QaH4HpWNOYrzcq7/EV+y3DnHzxiY+qk6TxTCwAd4LHn/Ur6hyPvX5rzu4= 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=uAfgl4za; arc=fail smtp.client-ip=52.101.66.60 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="uAfgl4za" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nSNC1+Xi8XpBxLcl4OKPhRshaTPWgiTIUaOvqRWJOkA+RNW0JssTMu17JriFjFowC1ZEDfYr1blSBaMIulhyX0Rz32J/jyC8098NkCniOMUXNXXXJOETU7pPjzK3NXApgfIBC7v/1VWALxETaIXmNsgSkCTVjFTFAGnO4xuNMIDwXLKxyPbxMlraa0ikUf8hVs4fZphJpq7QLxPA4L8FpPkUYC+L51E/oQ6R5nmrJWe8PVLmb0w6x+EJtSlAX2mR3gfwiErtcwhTIGTx9y7yZTETNVpxfRHOPLi1AJmbNZRzdfxiq/ZJqhJg7EnVtP9PaKHVivvSEaWWaJe3q3U/3g== 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=PZEz9b3B1i1ILao0v9v90lW1lAX8gf1SnYxp2LX+RRs=; b=GHE6zC0t5AZ6Jz0subwe25Vl2wt27adUuiGefC+Bct2nqvIAJ9Wao3WK0akqELJxAq4OftuJQsOV2542OqNzPutN6fAghEQsP60Um7r0oGcKYRoZBA4eOv7MRyM7aitG1BVPOLlJ/Pz4JCvx7s7qMwwnRrLNJby25x++N4/IeKYDu1XvbvaOHzxqo0hNu8uLkH3Cjt/5gxMiv/YD+s9pL51e785ilGo4Bq1WkF78WTrUD8VEVxjFXv0wd+jcQ0slA4BREaYnKAGwnnsEPiyFXIOfal7XOL9QOkw8Fk0yt2kXXo0UpssCs977swqkw+dt/RHq7rw12ktJYbqKMuKlyw== 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=PZEz9b3B1i1ILao0v9v90lW1lAX8gf1SnYxp2LX+RRs=; b=uAfgl4zaJsFZGxQ7+JwPBfniGm11WgXuc1YwtSoEwwiFB5iK0TE6wO2qWhTzfndEnfYCQYvEDyMEmJu5izcldxSrEzwENfsqPxYtdhpeLrQeAX/K4ncbq/kohykHWt/w1hnq0B68lPQvZp8BSJnvLsdoGfBDwQmL5IVLf/Pk07n73ok6GRnEJJEUnyDEYKU1/+rS0sw1W5gYdMncQ6muojvDgiXNG2Z+ieW3XTGxIzcS5Ei/r+4pZsdm3nnlUWmqSkQpPFaYnA0SUJQmyZYkX+SvvXZWrMVlOwXfNtREKeUlyoTD1XPB8NuF9LkDfYxoVdi+YCEeegWi8p3/ZWRpqg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by DBBPR04MB7739.eurprd04.prod.outlook.com (2603:10a6:10:1eb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Wed, 13 Nov 2024 10:12:39 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:39 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 4/7] pinctrl: s32: convert the driver into an mfd cell Date: Wed, 13 Nov 2024 12:10:56 +0200 Message-ID: <20241113101124.1279648-5-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|DBBPR04MB7739:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a8deaf5-cd19-4692-0620-08dd03cbb458 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|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?L3UrTXpMdFhKSFZXYmJaK3VqZjVudVNHbzMrQy9sS0tUZk9ramFjbkxGL2Zq?= =?utf-8?B?TXRqUE1TZFZLSW1mbVZKcml0Vm1XY1JrV0xxNzJ2Q1BJMzVOR0lYbzQ0VXFS?= =?utf-8?B?YjNVRnRvak5qQkFtcmhoNGJlYXVOR3pxbCtXSC9pYktWcnU5UmtWRm1sSEVX?= =?utf-8?B?bmFFOFNlVzE0NzhUclV5SDJDSll0Y1VHMGppeXllWjdlSk1yVU9JcEwvbFlN?= =?utf-8?B?QStUQXEzampyZkJHaDB6QzdoUGdDdmpSZVNVSE1WSGhPeXdFVkRNaUw3N3Rw?= =?utf-8?B?VDROekxMR0QrUFBkSFc0cjdCZnlLdDJYL25FWVhaTXRnUm1uVFdWMTBwYVRq?= =?utf-8?B?MTlwNjEybmRJcnI1WlR5YUpQZWNqVWJYMXN4amFRZ1VuNDU4Rk9hYkJPcjVH?= =?utf-8?B?VmIvaTdWaTlpdVV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utf-8?B?SGNPZ0xDaFRqS3hpWDJrYWIzeHNmVUlPVXR3UU1NMTNTSXlGbmxFNjJtVS93?= =?utf-8?B?STJ1Uzk0d0VTT3hhaERmdjdJVElQSHFEM01YQ1pRY1R6L0lsODFGcVA2MFM3?= =?utf-8?B?eXNJRGN1bkhjVjd5bFRrZThlRHpJWU9mSVRSdVBnRTZEQS9LOHNQTDVHQk94?= =?utf-8?B?ZEFjK1cxRWpKOEtKUGNHRkh3N0lYcUVBMzJqRGEvK0RCY3pGMXJWNlJ1S2FN?= =?utf-8?B?NzZVdlRKMVJUcGowbnVDcnoxT2JuZnVJbzdqZCtVTzB3VFdsd0xjckJ5VEJS?= =?utf-8?B?UHVvSEcvNHNvdVNJckpXZWNvQk9FdXBqekppbStKVGVpcW9Bc2M2RVB4Wmlq?= =?utf-8?B?SDl4MGNROTVydU5ndmV2RDc1OGRPMENFODlyYW5SZlBUVUxrbTduTUpFTXRC?= =?utf-8?B?K0YvYSt6V0hCMU5UZHJMazBZWENDRUoyWGNXWGc3RDVMcDF6eUhhNjZlbFU1?= =?utf-8?B?U2lDUkF4eW9SODFLLzdaT0V3ZExWOCtqcCs1c0ptdGlZcTdvSnlvRCttMjB6?= =?utf-8?B?ckRrTVhSZnJmVnpFeFpzbkcvbFpzbmR1T0JwNmdpdVBNN3c9PQ==?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TlAzcWhPNzdxb2l1aGh6SGxkelUxL08wc2FrSG4xVlI2SElLTkM3RGhRbCsx?= =?utf-8?B?YW9rdStERXJTQlNKN0pBckhielNIa00vdEtoUjRGQmF2L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liTHZncklTQitxNVlaVEthZ3AyUlF4bkJoRlBrUVRoSHho?= =?utf-8?B?NmdxUTBBSFV3QTVTUDdJbXVtLzlvT003NnUxd3FYRThCZEdqdU0xS3Y3TVkw?= =?utf-8?B?Sy9xeGx2YU13QU54eHhsK1A2R1Zna1BhSTM5RWFCQUprRFRPYTFYOWNuTFN1?= =?utf-8?B?bkVkckJIdGlvZDl6QjJkVVpvOEh5WkgyWVBDRHpSakUxc2V2Z0FWcFl0bUlj?= =?utf-8?B?b1RrV21JbmRnVm9rKzRLK3dIdC90RnZMN0YxR1hxMmdIUHhTRlNsZ3JRMzRG?= =?utf-8?B?T3c9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a8deaf5-cd19-4692-0620-08dd03cbb458 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:39.7823 (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: /OiMOghpUL9OMQJawkpIYjyziNr+0GdT5RTBLZscsRvJwVQkpT7MgQyNrY2iXcUEF/IBmPpJe2h8gda2wgj0XIvBhem3uL8+hSX10QIDWyE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7739 Content-Type: text/plain; charset="utf-8" The SIUL2 module is now represented as an mfd device. The pinctrl driver is now an mfd_cell. Therefore, remove its compatible and adjust its probing in order to get the necessary information from its mfd parent. This change came as a result of upstream review in the following series: https://lore.kernel.org/linux-gpio/a924bbb6-96ec-40be-9d82-a76b2ab73afd@oss= .nxp.com/ https://lore.kernel.org/all/20240926143122.1385658-3-andrei.stefanescu@oss.= nxp.com/ The SIUL2 module has multiple capabilities. It has support for reading SoC information, pinctrl and GPIO. All of this functionality is part of the same register space. The initial pinctrl driver treated the pinctrl functionality as separate from the GPIO one. However, they do rely on common registers and a long, detailed and specific register range list would be required for pinctrl&GPIO (carving out the necessary memory for each function). Moreover, in some cases this wouldn't be enough. For example reading a GPIO's direction would require a read of the MSCR register corresponding to that pin. This would not be possible in the GPIO driver because all of the MSCR registers are referenced by the pinctrl driver. Acked-by: Linus Walleij Signed-off-by: Andrei Stefanescu --- drivers/pinctrl/nxp/pinctrl-s32.h | 3 +- drivers/pinctrl/nxp/pinctrl-s32cc.c | 143 ++++++++++++---------------- drivers/pinctrl/nxp/pinctrl-s32g2.c | 25 +---- 3 files changed, 66 insertions(+), 105 deletions(-) diff --git a/drivers/pinctrl/nxp/pinctrl-s32.h b/drivers/pinctrl/nxp/pinctr= l-s32.h index add3c77ddfed..d52c6f814de8 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32.h +++ b/drivers/pinctrl/nxp/pinctrl-s32.h @@ -2,7 +2,7 @@ * * S32 pinmux core definitions * - * Copyright 2016-2020, 2022 NXP + * Copyright 2016-2020, 2022, 2024 NXP * Copyright (C) 2022 SUSE LLC * Copyright 2015-2016 Freescale Semiconductor, Inc. * Copyright (C) 2012 Linaro Ltd. @@ -38,6 +38,7 @@ struct s32_pinctrl_soc_data { const struct pinctrl_pin_desc *pins; unsigned int npins; const struct s32_pin_range *mem_pin_ranges; + const struct regmap **regmaps; unsigned int mem_regions; }; =20 diff --git a/drivers/pinctrl/nxp/pinctrl-s32cc.c b/drivers/pinctrl/nxp/pinc= trl-s32cc.c index 501eb296c760..bb2f8127c2b7 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32cc.c +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -44,12 +45,6 @@ enum s32_write_type { S32_PINCONF_OVERWRITE, }; =20 -static struct regmap_config s32_regmap_config =3D { - .reg_bits =3D 32, - .val_bits =3D 32, - .reg_stride =3D 4, -}; - static u32 get_pin_no(u32 pinmux) { return (pinmux & S32_PIN_ID_MASK) >> S32_PIN_ID_SHIFT; @@ -85,14 +80,15 @@ struct s32_pinctrl_context { unsigned int *pads; }; =20 -/* +/** + * struct s32_pinctrl - private driver data * @dev: a pointer back to containing device * @pctl: a pointer to the pinctrl device structure * @regions: reserved memory regions with start/end pin * @info: structure containing information about the pin * @gpio_configs: Saved configurations for GPIO pins - * @gpiop_configs_lock: lock for the `gpio_configs` list - * @s32_pinctrl_context: Configuration saved over system sleep + * @gpio_configs_lock: lock for the `gpio_configs` list + * @saved_context: Configuration saved over system sleep */ struct s32_pinctrl { struct device *dev; @@ -123,14 +119,13 @@ s32_get_region(struct pinctrl_dev *pctldev, unsigned = int pin) return NULL; } =20 -static inline int s32_check_pin(struct pinctrl_dev *pctldev, - unsigned int pin) +static int s32_check_pin(struct pinctrl_dev *pctldev, unsigned int pin) { return s32_get_region(pctldev, pin) ? 0 : -EINVAL; } =20 -static inline int s32_regmap_read(struct pinctrl_dev *pctldev, - unsigned int pin, unsigned int *val) +static int s32_regmap_read(struct pinctrl_dev *pctldev, unsigned int pin, + unsigned int *val) { struct s32_pinctrl_mem_region *region; unsigned int offset; @@ -145,7 +140,7 @@ static inline int s32_regmap_read(struct pinctrl_dev *p= ctldev, return regmap_read(region->map, offset, val); } =20 -static inline int s32_regmap_write(struct pinctrl_dev *pctldev, +static int s32_regmap_write(struct pinctrl_dev *pctldev, unsigned int pin, unsigned int val) { @@ -163,7 +158,7 @@ static inline int s32_regmap_write(struct pinctrl_dev *= pctldev, =20 } =20 -static inline int s32_regmap_update(struct pinctrl_dev *pctldev, unsigned = int pin, +static int s32_regmap_update(struct pinctrl_dev *pctldev, unsigned int pin, unsigned int mask, unsigned int val) { struct s32_pinctrl_mem_region *region; @@ -236,10 +231,10 @@ static int s32_dt_group_node_to_map(struct pinctrl_de= v *pctldev, } =20 ret =3D pinconf_generic_parse_dt_config(np, pctldev, &cfgs, &n_cfgs); - if (ret) { - dev_err(dev, "%pOF: could not parse node property\n", np); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, + "%pOF: could not parse node property\n", + np); =20 if (n_cfgs) reserve++; @@ -321,7 +316,7 @@ static int s32_pmx_set(struct pinctrl_dev *pctldev, uns= igned int selector, /* Check beforehand so we don't have a partial config. */ for (i =3D 0; i < grp->data.npins; i++) { if (s32_check_pin(pctldev, grp->data.pins[i]) !=3D 0) { - dev_err(info->dev, "invalid pin: %u in group: %u\n", + dev_err(info->dev, "Invalid pin: %u in group: %u\n", grp->data.pins[i], group); return -EINVAL; } @@ -475,8 +470,8 @@ static int s32_get_slew_regval(int arg) return -EINVAL; } =20 -static inline void s32_pin_set_pull(enum pin_config_param param, - unsigned int *mask, unsigned int *config) +static void s32_pin_set_pull(enum pin_config_param param, + unsigned int *mask, unsigned int *config) { switch (param) { case PIN_CONFIG_BIAS_DISABLE: @@ -762,15 +757,15 @@ static int s32_pinctrl_parse_groups(struct device_nod= e *np, grp->data.name =3D np->name; =20 npins =3D of_property_count_elems_of_size(np, "pinmux", sizeof(u32)); - if (npins < 0) { - dev_err(dev, "Failed to read 'pinmux' property in node %s.\n", - grp->data.name); - return -EINVAL; - } - if (!npins) { - dev_err(dev, "The group %s has no pins.\n", grp->data.name); - return -EINVAL; - } + if (npins < 0) + return dev_err_probe(dev, -EINVAL, + "Failed to read 'pinmux' in node %s\n", + grp->data.name); + + if (!npins) + return dev_err_probe(dev, -EINVAL, + "The group %s has no pins\n", + grp->data.name); =20 grp->data.npins =3D npins; =20 @@ -811,11 +806,9 @@ static int s32_pinctrl_parse_functions(struct device_n= ode *np, /* Initialise function */ func->name =3D np->name; func->ngroups =3D of_get_child_count(np); - if (func->ngroups =3D=3D 0) { - dev_err(info->dev, "no groups defined in %pOF\n", np); - return -EINVAL; - } - + if (func->ngroups =3D=3D 0) + return dev_err_probe(info->dev, -EINVAL, + "No groups defined in %pOF\n", np); groups =3D devm_kcalloc(info->dev, func->ngroups, sizeof(*func->groups), GFP_KERNEL); if (!groups) @@ -838,57 +831,42 @@ static int s32_pinctrl_parse_functions(struct device_= node *np, static int s32_pinctrl_probe_dt(struct platform_device *pdev, struct s32_pinctrl *ipctl) { + struct nxp_siul2_mfd *mfd =3D dev_get_drvdata(pdev->dev.parent); struct s32_pinctrl_soc_info *info =3D ipctl->info; - struct device_node *np =3D pdev->dev.of_node; - struct resource *res; - struct regmap *map; - void __iomem *base; - unsigned int mem_regions =3D info->soc_data->mem_regions; + unsigned int mem_regions; + struct device_node *np; + u32 nfuncs =3D 0, i =3D 0, j; + u8 regmap_type; int ret; - u32 nfuncs =3D 0; - u32 i =3D 0; =20 + np =3D pdev->dev.parent->of_node; if (!np) return -ENODEV; =20 - if (mem_regions =3D=3D 0 || mem_regions >=3D 10000) { - dev_err(&pdev->dev, "mem_regions is invalid: %u\n", mem_regions); - return -EINVAL; - } + /* one MSCR and one IMCR region per SIUL2 module */ + mem_regions =3D info->soc_data->mem_regions; + if (mem_regions !=3D mfd->num_siul2 * 2) + return dev_err_probe(&pdev->dev, -EINVAL, + "Mem_regions is invalid: %u\n", + mem_regions); =20 ipctl->regions =3D devm_kcalloc(&pdev->dev, mem_regions, sizeof(*ipctl->regions), GFP_KERNEL); if (!ipctl->regions) return -ENOMEM; =20 + /* Order is MSCR regions first, then IMCR ones */ for (i =3D 0; i < mem_regions; i++) { - base =3D devm_platform_get_and_ioremap_resource(pdev, i, &res); - if (IS_ERR(base)) - return PTR_ERR(base); - - snprintf(ipctl->regions[i].name, - sizeof(ipctl->regions[i].name), "map%u", i); - - s32_regmap_config.name =3D ipctl->regions[i].name; - s32_regmap_config.max_register =3D resource_size(res) - - s32_regmap_config.reg_stride; - - map =3D devm_regmap_init_mmio(&pdev->dev, base, - &s32_regmap_config); - if (IS_ERR(map)) { - dev_err(&pdev->dev, "Failed to init regmap[%u]\n", i); - return PTR_ERR(map); - } - - ipctl->regions[i].map =3D map; + regmap_type =3D i < mem_regions / 2 ? SIUL2_MSCR : SIUL2_IMCR; + j =3D i % mfd->num_siul2; + ipctl->regions[i].map =3D mfd->siul2[j].regmaps[regmap_type]; ipctl->regions[i].pin_range =3D &info->soc_data->mem_pin_ranges[i]; } =20 nfuncs =3D of_get_child_count(np); - if (nfuncs <=3D 0) { - dev_err(&pdev->dev, "no functions defined\n"); - return -EINVAL; - } + if (nfuncs <=3D 0) + return dev_err_probe(&pdev->dev, -EINVAL, + "No functions defined\n"); =20 info->nfunctions =3D nfuncs; info->functions =3D devm_kcalloc(&pdev->dev, nfuncs, @@ -918,18 +896,17 @@ static int s32_pinctrl_probe_dt(struct platform_devic= e *pdev, int s32_pinctrl_probe(struct platform_device *pdev, const struct s32_pinctrl_soc_data *soc_data) { - struct s32_pinctrl *ipctl; - int ret; - struct pinctrl_desc *s32_pinctrl_desc; - struct s32_pinctrl_soc_info *info; #ifdef CONFIG_PM_SLEEP struct s32_pinctrl_context *saved_context; #endif + struct pinctrl_desc *s32_pinctrl_desc; + struct s32_pinctrl_soc_info *info; + struct s32_pinctrl *ipctl; + int ret; =20 - if (!soc_data || !soc_data->pins || !soc_data->npins) { - dev_err(&pdev->dev, "wrong pinctrl info\n"); - return -EINVAL; - } + if (!soc_data || !soc_data->pins || !soc_data->npins) + return dev_err_probe(&pdev->dev, -EINVAL, + "Wrong pinctrl info\n"); =20 info =3D devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); if (!info) @@ -964,17 +941,15 @@ int s32_pinctrl_probe(struct platform_device *pdev, s32_pinctrl_desc->owner =3D THIS_MODULE; =20 ret =3D s32_pinctrl_probe_dt(pdev, ipctl); - if (ret) { - dev_err(&pdev->dev, "fail to probe dt properties\n"); - return ret; - } + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Failed to probe dt properties\n"); =20 ipctl->pctl =3D devm_pinctrl_register(&pdev->dev, s32_pinctrl_desc, ipctl); if (IS_ERR(ipctl->pctl)) return dev_err_probe(&pdev->dev, PTR_ERR(ipctl->pctl), - "could not register s32 pinctrl driver\n"); - + "Could not register s32 pinctrl driver\n"); #ifdef CONFIG_PM_SLEEP saved_context =3D &ipctl->saved_context; saved_context->pads =3D diff --git a/drivers/pinctrl/nxp/pinctrl-s32g2.c b/drivers/pinctrl/nxp/pinc= trl-s32g2.c index 440ff1879424..27669991c339 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32g2.c +++ b/drivers/pinctrl/nxp/pinctrl-s32g2.c @@ -3,13 +3,14 @@ * NXP S32G pinctrl driver * * Copyright 2015-2016 Freescale Semiconductor, Inc. - * Copyright 2017-2018, 2020-2022 NXP + * Copyright 2017-2018, 2020-2022, 2024 NXP * Copyright (C) 2022 SUSE LLC */ =20 #include #include #include +#include #include #include #include @@ -713,12 +714,10 @@ static const struct pinctrl_pin_desc s32_pinctrl_pads= _siul2[] =3D { static const struct s32_pin_range s32_pin_ranges_siul2[] =3D { /* MSCR pin ID ranges */ S32_PIN_RANGE(0, 101), - S32_PIN_RANGE(112, 122), - S32_PIN_RANGE(144, 190), + S32_PIN_RANGE(112, 190), /* IMCR pin ID ranges */ S32_PIN_RANGE(512, 595), - S32_PIN_RANGE(631, 909), - S32_PIN_RANGE(942, 1007), + S32_PIN_RANGE(631, 1007), }; =20 static const struct s32_pinctrl_soc_data s32_pinctrl_data =3D { @@ -728,22 +727,9 @@ static const struct s32_pinctrl_soc_data s32_pinctrl_d= ata =3D { .mem_regions =3D ARRAY_SIZE(s32_pin_ranges_siul2), }; =20 -static const struct of_device_id s32_pinctrl_of_match[] =3D { - { - .compatible =3D "nxp,s32g2-siul2-pinctrl", - .data =3D &s32_pinctrl_data, - }, - { /* sentinel */ } -}; -MODULE_DEVICE_TABLE(of, s32_pinctrl_of_match); - static int s32g_pinctrl_probe(struct platform_device *pdev) { - const struct s32_pinctrl_soc_data *soc_data; - - soc_data =3D of_device_get_match_data(&pdev->dev); - - return s32_pinctrl_probe(pdev, soc_data); + return s32_pinctrl_probe(pdev, &s32_pinctrl_data); } =20 static const struct dev_pm_ops s32g_pinctrl_pm_ops =3D { @@ -753,7 +739,6 @@ static const struct dev_pm_ops s32g_pinctrl_pm_ops =3D { static struct platform_driver s32g_pinctrl_driver =3D { .driver =3D { .name =3D "s32g-siul2-pinctrl", - .of_match_table =3D s32_pinctrl_of_match, .pm =3D pm_sleep_ptr(&s32g_pinctrl_pm_ops), .suppress_bind_attrs =3D true, }, --=20 2.45.2 From nobody Sat Nov 23 09:07:59 2024 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012060.outbound.protection.outlook.com [52.101.66.60]) (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 9AD701FBF66; Wed, 13 Nov 2024 10:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492768; cv=fail; b=U2inCHS9gaRhGEZ0wZ7MmOLjlYj2jiKxilMPDZK0Fq41MQ9aRrzcZEWKKnpWhbEJcRsKXOuRanWIMIq6E/ZmfjKPn+N01Wgd6tSTEa2lsO/Q2pf2f4Ikhpk+YpehC4nZ/4zYkK6mq05y0dHwthKZt2EtgkWn1Gscn29wtLaAZ98= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492768; c=relaxed/simple; bh=uzdA015KYQl/2xmqSJmjcQRItTpI1vR5P6TwGEo6hUY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=F3ggNkMzalD2zns9TC7uCblpTapNlnZOAI5Q5vteld6eDTDH0JmtsZt7z6wQeGbXFIvjy7KQLOJ1Ctp+FOPzHSvL4D7LQDv0y/DERINQnNhrHJXPs6gEJA72xCLST3MGMjnRkHlLoQMoFjGiILJxxC+FnTe50bDdvVP5tUqbEX8= 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=rNYCsnJu; arc=fail smtp.client-ip=52.101.66.60 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="rNYCsnJu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PlyvtZgkBQG8riDQ4fne9SwjZZ58bAAt8esD3UCBISFWMzCRPqMcGNn0EvRMA3gO5sm1hd1MiwyDxayu5MNDiOihIGl7n78QOG9i5pU+3bQTQq7LqydY3rOPtMebwPq8VGgJL3tm9xlCPe1hRKWSnCI3atBJ/mbx39mTEAsFHuIN6z8D6K5+jrtskIr2xESTFlykpxzqI94pCouTfmsTt0LQ+oYgjihRefGB8xg/n10fGxjTPy1YJ6cqkP3z9LFlidVzouIHUDCqPgZt0dops/JBgrZ2+8fk0mmUXSnV4uwFq0LhdG7LV4ojnnatlc/EwQGO2ofisWjlTpmUVNDhgA== 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=wiP7UIlersJYQQUVj+ieic4nekKdRvNUeyEKCnitCJ0=; b=COXsKyOOJ+GxP9z4b9zmSKdLnpLEIDWk+Z+oWzEuBuvibmWWiR1VNkT/+ZLLfaOtmboRHvXsCAogV1ZcIrZouSCCiboIZKaYoalt/zOBYjO95A+QZAND+1jvoefsJo2HR1MbWJT+9xY/M8gjsuAapLmIZpjLGIlOPiYpU0i0zbYOc0Oh0ZbFr26GZHbQbchBf8CuHzoSe5yNiwgSBu/Idwzy07gdaWrQ8Qv13+jQ+m3j6g22qdgvatzJ1LHWLqkWLebdfcaamH1AHyPV1bshpDrjnkYCNXlXs9kgtFOc8NTew/6/JUK7mNNokVgKuVWpXzzOgiI8sAJ4fD1pDrhrqg== 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=wiP7UIlersJYQQUVj+ieic4nekKdRvNUeyEKCnitCJ0=; b=rNYCsnJueXYyWrXQtUumILy9XocCHHU540x+Rna/ZxtRD5nfZE+pWTe7bakN3kFeJBg32p3USljYuEh0EmGwuIXlXcJzQYSlJ23xK2Zh05Xm4lmMHe8meVZ5qOnP6QI34/kBK8XIu7cj1GxDH1vcfJiu4THRW9Z7sC9aiv01s66T3lXtcN9wWHmAzfa6+YJFnqfu+AcA+T70dTVb8I2/zIs+pEyWPnMj3gvXKYsHE6jyfrpu75WP3zmH2+JVj57mfaRjK350lz+w+sw3BQyQblG6jnzYdp43cIQJaJNJeroSxhIoJvlttKLIi4wDsmg5bVqGG+uU8lhKcFny+YdMDw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by DBBPR04MB7739.eurprd04.prod.outlook.com (2603:10a6:10:1eb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Wed, 13 Nov 2024 10:12:41 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:41 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 5/7] pinctrl: s32cc: change to "devm_pinctrl_register_and_init" Date: Wed, 13 Nov 2024 12:10:57 +0200 Message-ID: <20241113101124.1279648-6-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|DBBPR04MB7739:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d6e7a88-10e5-460a-83f2-08dd03cbb560 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|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Y1J0N1NLRWczZkNLMWRMWEJlVjdKRFNHc2ppNUkzSmV2SFU1bTF1aGltSWdV?= =?utf-8?B?cFhMZkQ2d25GVnl0cU1jK0VacVNaVUJCQVZqWS9jRm85SHpveFNpaUNrOUFx?= =?utf-8?B?WXpMQURhbmw2U1g5MllmeUdFb2hpOEhBcnQ1YlRUZ3VacFBFUVZZbWc0ZElE?= =?utf-8?B?V2w4OWZNb044WVpMbDVoTkxITWVpYUZkcTRHM2dFU1EzSHdTNjNNQjNnTkxr?= =?utf-8?B?eVcrTjlhV2NhK2htSGtVR284blU1K3BJZy9yakNyY0xaUlhyWTFhOGhIMEp0?= =?utf-8?B?WEFWU0hDTVhSaWZXb3hLNU8zTEVyRlRlaG1UM2tqSW5RVlBidzByaXZBL2Q4?= =?utf-8?B?cjVZRlczRWZySUI4TDA4V3BVTUZCa3F1WVJTcFcyWkxuc3o3Z29JaUlzMVFH?= =?utf-8?B?aGNLZUR0bzc5TGN6eE83SnlqOXFONUU2VnB4cG1XcEYyTE5WMEZqcEFhVXI4?= =?utf-8?B?V3phQkFsa05ZbXlwcmFFdDVHdXVnUUFPczRiVjgrNVd6RVRqdkdrZ2ltZ09V?= =?utf-8?B?TGpiSnFZOFRhKzV1NjEydXB4WjhnUENIcW1STi85bmwvZ3plK2JaUmdSNTRH?= =?utf-8?B?TmxxY0cyZzdYTWg3RkdkTUk3eS9RU3dza25URVFoejhsWiswb3FDQkNXQ1hT?= =?utf-8?B?VjlrRDRJSlp3cU9pVDltN1kxQno3NDRKZU8zZ3NpWEY3WTUzVHgwUU5UOHF1?= =?utf-8?B?Nm9wTzRoMWJNY1NqNzdNbjh0Q2VURlNaY1lZeXpjbHprRXlkS2gveTA2YVEx?= =?utf-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OaUR6UkRmcCsy?= =?utf-8?B?eG9meWRwUzhrdzZvMGtHSG96VS9Yc0ZKbklnOXlVOGpUeUlnTkxwSzNDaTR5?= =?utf-8?B?eEZndnlGZTJMcDBteFR1R3FCYXRFeDU4bzhjM1ZxRjZ4NGd3NHJ1dVpjdmo2?= =?utf-8?B?Z1BVMGU3dHBNNUl4bUxsWUE3QlNlenVzNE11endVQy83bzJ6KzJHd1RFZW1u?= =?utf-8?Q?e0eqsN318yNZr?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M3RSa3VXWGlZYzNFMm12OTNjelBBcXgzRHFabDBlQVJneDUvMWQ3ZjNSL3Bu?= =?utf-8?B?K2FFc1hHQ3RtaS9zS0MvTjVQMk5FRG5RN1h5bGJwN2hqTE1WZEoreE9oTkRt?= =?utf-8?B?N0xCMmN2NjBRR1FtQXlDeEh5M0FPc1NQZStVUkRtZm9kMWZBa0FNdWcrODlY?= =?utf-8?B?S2lDU0lKejJvM2FkRjF3S3NNLzduREVsMjB0T2ZTMkloZTJCVkdKeEExNTBK?= =?utf-8?B?TnB5dTZ1VlpiRUpoMlpBTkFXckZnZ3RydDFpUHhtM21WR2pRMnc5S2w1SElT?= =?utf-8?B?ZG5wbjhHTHlwRVFuaWZVd0VhWDJ2Mnl4ejhPYmtmQ2pvZnA4bkxMNnFzRy83?= =?utf-8?B?d2x2c3dTQkxxMWlHdHNqQUlhZXIxYUtzNDdKRlc5QmJjZTJ3THlsVUtjbW02?= =?utf-8?B?YUdhQ2NYckMwNGFPbEZwQlVjbngyTk9ycy9VdWxub2RUOG9CaHNIM0NGT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S-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:41.5003 (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: iO/RC+jiMN4+/vvKy/cisJUWVaTO6ydFbYgXfOcuaErhSdGAn3Wp/wROEbitjvj37gQBbWDK5LDNP7ztrVlwXGNM/CRlrPahTWsQ0RuBkvM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7739 Content-Type: text/plain; charset="utf-8" Switch from "devm_pinctrl_register" to "devm_pinctrl_register_and_init" and "pinctrl_enable" since this is the recommended way. Reviewed-by: Linus Walleij Signed-off-by: Andrei Stefanescu --- drivers/pinctrl/nxp/pinctrl-s32cc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/nxp/pinctrl-s32cc.c b/drivers/pinctrl/nxp/pinc= trl-s32cc.c index bb2f8127c2b7..0b79c7445929 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32cc.c +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c @@ -945,10 +945,10 @@ int s32_pinctrl_probe(struct platform_device *pdev, return dev_err_probe(&pdev->dev, ret, "Failed to probe dt properties\n"); =20 - ipctl->pctl =3D devm_pinctrl_register(&pdev->dev, s32_pinctrl_desc, - ipctl); - if (IS_ERR(ipctl->pctl)) - return dev_err_probe(&pdev->dev, PTR_ERR(ipctl->pctl), + ret =3D devm_pinctrl_register_and_init(&pdev->dev, s32_pinctrl_desc, + ipctl, &ipctl->pctl); + if (ret) + return dev_err_probe(&pdev->dev, ret, "Could not register s32 pinctrl driver\n"); #ifdef CONFIG_PM_SLEEP saved_context =3D &ipctl->saved_context; @@ -960,7 +960,12 @@ int s32_pinctrl_probe(struct platform_device *pdev, return -ENOMEM; #endif =20 - dev_info(&pdev->dev, "initialized s32 pinctrl driver\n"); + ret =3D pinctrl_enable(ipctl->pctl); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Failed to enable pinctrl\n"); + + dev_info(&pdev->dev, "Initialized s32 pinctrl driver\n"); =20 return 0; } --=20 2.45.2 From nobody Sat Nov 23 09:07:59 2024 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012060.outbound.protection.outlook.com [52.101.66.60]) (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 DC0EC1FB8A9; Wed, 13 Nov 2024 10:12:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492771; cv=fail; b=GBVUrAU9d1BGrFSXDXUgSBpDkIt5deDTn7VT+iByRkyH3drHLUeyDl9sMkXman9RUkefoaA2gl5nkBAaCeeRyrP8PA8O6PaoIsMQ1U9usuKETpaT85WbN/V3CES0ohsbcJ1G7X/gfNvbse217Jv1G74xQLYMfwuBgpIEth1PJ9s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492771; c=relaxed/simple; bh=kF8Nr8hIBNh1rtPdDeE/GfQ/g573NEXdWCPfpGxzTL0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=TAagBfdxgkTIueU8ASWj8W6ICmyRMk6ueoK5hFteyrhtFiHOo687DW7ot3c2yKI8X1t7ZyrOjo3nD3oxd9jyCw89A/QEhO6+Zy4YYyH/YCcXiD7jY7qK2Tj9Hp422yWzHvoauNmcCnYs2oM7tZ1NXt8+5XD1PTib0UxPuTrtNBc= 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=KYtIXwD9; arc=fail smtp.client-ip=52.101.66.60 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="KYtIXwD9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uP4zjWBVZwDojD1Yvhe6PJ9CECthvggq3Yy7PtM1ZN97tIAzbM9WR8qd+0JW+GOZjAmVi1cbsf9axG0+gkblY8ROgctMUO5NEDBkYOsexPWMTyMHH5qz+xShWtz7kGodDNh1cNnQZ1lq6ibagqOqGlNZ5CfagIjRTNM4ZxMVTb+gGLBTIKKmYU//E0ThCEgtKoeSmOgE5CVJrlSFeNUmPIX6bRvDfu7uQvtxum267QWou2zXcG+BWzx+Avk3ZI1ri+7uk+/2GUZmabN2ZXbJt3MkDr9m4upwjv8iJ1r6mUPJWMrIK3aA9pBjoxmrjlZ0orLjw6AH/vmyVbrEzBTIlQ== 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=+54voebqoeKg4PDvduKb7kbojQ1Q0j2NGqVvHwKT85I=; b=NG/zewrueEkYdVdkKEKAyZCFfnkrstQSfgEj4wTgztzk0hkgSVgSAQPXYZkXm8wNDZtORw73vBhySWOaiG3dq7+Dx3uj2M6qnOCsaNaQBiGGftpar0EmGfXT8rNXlLA6tP5tozXO87NOWnAxzvp9JTxWs/LPhGeDBV0qgv+0YcfZfQfqa9B1rT7jrYz7zIuR1h7VitsW+H4kEgsqDgACSfUpKZR2cIGeo7Rl2s3gS9Pzp8egp5qiL3YvcJKMUy8voebV/g2zAvEvr44laDh2IGDptx1wJQTDLlyh9eZmYSpZbQMlhkpF8mz06AKsQUOR5WZF61oZjF8SUVkqMzwO4g== 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=+54voebqoeKg4PDvduKb7kbojQ1Q0j2NGqVvHwKT85I=; b=KYtIXwD9DJydHpGvp5awOFWvKECoIhi4FReSg7P+uzGV5Hg5byarPiiO64B8KuqyDuYBmBI6O8zDRUpSk2MpHFkkcW2YXUVlKcrYpr/uEp7PrJ25XlLOCX1MJV0euDF8Cx71le8wu6xr9xmfVRlBkZZBdmGZGQDYWmlm2p7Qs1hJtchfacLDhjz/vVONPAqDfoRBM78bKtvManiyxCZXXet3rKXGP40wXFUpt2fybWozfttCBmylPDGbePj8xBX9uOlc8DEpnQwEOd5cMryp2NqHfMYhS1RpVCGkMeUGDZIQ+BWDtfzfH4UnwsDvcY8Nrp3zoOmCT+5eUwoGKlYR1A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by DBBPR04MB7739.eurprd04.prod.outlook.com (2603:10a6:10:1eb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Wed, 13 Nov 2024 10:12:43 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:43 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 6/7] pinctrl: s32cc: implement GPIO functionality Date: Wed, 13 Nov 2024 12:10:58 +0200 Message-ID: <20241113101124.1279648-7-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|DBBPR04MB7739:EE_ X-MS-Office365-Filtering-Correlation-Id: 2cbab589-f131-46f2-47f9-08dd03cbb66d 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|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Qlhwd1hyRm14dnRESFFvY0pyTExmVmhkTmNob2tjbitwNEZ4ak02RUhPeFI2?= =?utf-8?B?U3JIT25FSlM1b0xzTDRMUjkzWnB2OGhqZi9PMUFFSnV1SnFBalJVREpIclZh?= =?utf-8?B?RXBkdmdpTG5BOVZOcFJkK0ZNUFdodmE5TFJMcnBFYVZUb1NoODhZb1luVEMz?= =?utf-8?B?ektzOTJMRXc2TVAxZm83OFlISWp4QWRuRDFxTWlaZDNXRkFOdWV5eW1rV0tv?= =?utf-8?B?UFVka0NEVFArbkMycjNlK05kdkFLV2Y4cE45aFViVnNsVG9Pekl0ZnU0OFRk?= =?utf-8?B?Y00veHNBajZSQ0ZtVmxoOEpJVU9JVkJMRDNrYmdKNGpRa2tpRmhZaGc1cHFE?= =?utf-8?B?Zi83ZzBPRmRXOTFCVnBPNXVwY0lYZXZtUEZBMnduQVN0Q1o0OWo2VVMwWFBw?= =?utf-8?B?STY5MFZ6K0VWRENUZGRNdEVjT3cvUk44U0RhUkV1QTRlN3JSQnJMRUVveisv?= =?utf-8?B?cWg4ZmI5QlIxZzFnWkhLb3RsT1JMR2Z6d1J2YVhaL2gzOC9pbFpvV2dZRjRp?= =?utf-8?B?cnFSamJUVEt5Q2luTThIbmt0YTd6bTNXYWZlZlBYVzRhN0lXMDJ2ZWk3RHE1?= =?utf-8?B?OEFGblRuNllObXcxN25zYS9ycWxYMS85dVFSZ1JDQkZFR1Fld1ZnRWRTL2No?= =?utf-8?B?VEQxa1JKeXFJNzI0OVc4dGRURzhIZUduS2h0K01HY1o3OWIxK2FDTytLSkpy?= =?utf-8?B?cVNFYVQySFZ1alo5aVpVb1VNd3h2UzNrZzJJcjZzblhC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1QUFIrT1lnVzliUUE1UU4zNUlrdzZXSVdBMXE3?= =?utf-8?B?MzZxaE0vZjdJTytrTUJKdTJuT0NUbHkxaEN4NDlDMGJqakZoOHVWYXFPbWww?= =?utf-8?B?RC9kaUJGM1AxUjJXN3J1a3JoVDd0eWJUU2p1N1d1Zm9MWkw2YWZDb0FoL2pD?= =?utf-8?B?VFA2YVA2U2NGNEc1NmlKc3VMTVdIVTJjZG1UcmNOWHI0MmYxM1B5THFQS3lK?= =?utf-8?Q?O1MxXAMobhlx5?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V0I3UlNrak01S3BKYmFTbzA5SmJQY2xnOWNicE5YVW0rdGhoTGMyckFnaHc0?= =?utf-8?B?QUtDVlBiMlBpSkpwQU0wSFB0N0xhLytrbHpVQjVVU3ZpYVcwU3ppMnBreC9D?= =?utf-8?B?MUl6UTRPRSt5Qllyc29Ra2NYTVZCREYrcUNMdXZkUGhLVWtaSkhlZFArdWVh?= =?utf-8?B?V2tIeVRiZEVYMytYeEV4NC9qU3JON0pvdk5GSGJuUFNPRGhaL1hVbHlYRnFD?= =?utf-8?B?aGxwby9xVmQrRWRRazU5Q2NUWlVQL0xSTyt2dWtOcnZpVy9KOVZuTzM5dzR1?= =?utf-8?B?QVBMOWtZYVYvL09kMHFud1Z5K0RDMzJ5NHZEU21IL3J1V1BnLzhBZmFpYWM3?= =?utf-8?B?WG0vNnR4bTdEUTJNTEpkMXY0U1ZCeHVDTFN2elZJcE9SNTREdzJWQ1o5MG4z?= =?utf-8?B?V1c5NlEycW4vWHRQeGlyeE9Pc0VtQlhWMG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ab589-f131-46f2-47f9-08dd03cbb66d X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:43.3145 (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: 7B1WWiva/XvoHxAKtmUy/Pd6LiKQABV9Ni8MJVtJkttSO6klW4OyApsJTnS8BrE4Eg8hnqjy/rDs9RTZVJWVFc61PndrzfbUJh99wKVe1fU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7739 Add basic GPIO functionality (request, free, get, set) for the existing pinctrl SIUL2 driver since the hardware for pinctrl&GPIO is tightly coupled. Also, remove pinmux_ops which are no longer needed. Signed-off-by: Andrei Stefanescu --- drivers/pinctrl/nxp/pinctrl-s32cc.c | 406 +++++++++++++++++++++++----- 1 file changed, 344 insertions(+), 62 deletions(-) diff --git a/drivers/pinctrl/nxp/pinctrl-s32cc.c b/drivers/pinctrl/nxp/pinc= trl-s32cc.c index 0b79c7445929..e213a910d958 100644 --- a/drivers/pinctrl/nxp/pinctrl-s32cc.c +++ b/drivers/pinctrl/nxp/pinctrl-s32cc.c @@ -40,6 +40,14 @@ #define S32_MSCR_ODE BIT(20) #define S32_MSCR_OBE BIT(21) =20 +/* PGPDOs are 16bit registers that come in big endian + * order if they are grouped in pairs of two. + * + * For example, the order is PGPDO1, PGPDO0, PGPDO3, PGPDO2... + */ +#define S32_PGPD(N) (((N) ^ 1) * 2) +#define S32_PGPD_SIZE 16 + enum s32_write_type { S32_PINCONF_UPDATE_ONLY, S32_PINCONF_OVERWRITE, @@ -84,6 +92,7 @@ struct s32_pinctrl_context { * struct s32_pinctrl - private driver data * @dev: a pointer back to containing device * @pctl: a pointer to the pinctrl device structure + * @gc: a pointer to the gpio_chip * @regions: reserved memory regions with start/end pin * @info: structure containing information about the pin * @gpio_configs: Saved configurations for GPIO pins @@ -93,6 +102,7 @@ struct s32_pinctrl_context { struct s32_pinctrl { struct device *dev; struct pinctrl_dev *pctl; + struct gpio_chip gc; struct s32_pinctrl_mem_region *regions; struct s32_pinctrl_soc_info *info; struct list_head gpio_configs; @@ -366,66 +376,6 @@ static int s32_pmx_get_groups(struct pinctrl_dev *pctl= dev, return 0; } =20 -static int s32_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, - struct pinctrl_gpio_range *range, - unsigned int offset) -{ - struct s32_pinctrl *ipctl =3D pinctrl_dev_get_drvdata(pctldev); - struct gpio_pin_config *gpio_pin; - unsigned int config; - unsigned long flags; - int ret; - - ret =3D s32_regmap_read(pctldev, offset, &config); - if (ret) - return ret; - - /* Save current configuration */ - gpio_pin =3D kmalloc(sizeof(*gpio_pin), GFP_KERNEL); - if (!gpio_pin) - return -ENOMEM; - - gpio_pin->pin_id =3D offset; - gpio_pin->config =3D config; - - spin_lock_irqsave(&ipctl->gpio_configs_lock, flags); - list_add(&gpio_pin->list, &ipctl->gpio_configs); - spin_unlock_irqrestore(&ipctl->gpio_configs_lock, flags); - - /* GPIO pin means SSS =3D 0 */ - config &=3D ~S32_MSCR_SSS_MASK; - - return s32_regmap_write(pctldev, offset, config); -} - -static void s32_pmx_gpio_disable_free(struct pinctrl_dev *pctldev, - struct pinctrl_gpio_range *range, - unsigned int offset) -{ - struct s32_pinctrl *ipctl =3D pinctrl_dev_get_drvdata(pctldev); - struct gpio_pin_config *gpio_pin, *tmp; - unsigned long flags; - int ret; - - spin_lock_irqsave(&ipctl->gpio_configs_lock, flags); - - list_for_each_entry_safe(gpio_pin, tmp, &ipctl->gpio_configs, list) { - if (gpio_pin->pin_id =3D=3D offset) { - ret =3D s32_regmap_write(pctldev, gpio_pin->pin_id, - gpio_pin->config); - if (ret !=3D 0) - goto unlock; - - list_del(&gpio_pin->list); - kfree(gpio_pin); - break; - } - } - -unlock: - spin_unlock_irqrestore(&ipctl->gpio_configs_lock, flags); -} - static int s32_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, struct pinctrl_gpio_range *range, unsigned int offset, @@ -449,8 +399,6 @@ static const struct pinmux_ops s32_pmx_ops =3D { .get_function_name =3D s32_pmx_get_func_name, .get_function_groups =3D s32_pmx_get_groups, .set_mux =3D s32_pmx_set, - .gpio_request_enable =3D s32_pmx_gpio_request_enable, - .gpio_disable_free =3D s32_pmx_gpio_disable_free, .gpio_set_direction =3D s32_pmx_gpio_set_direction, }; =20 @@ -669,6 +617,311 @@ static const struct pinconf_ops s32_pinconf_ops =3D { .pin_config_group_dbg_show =3D s32_pinconf_group_dbg_show, }; =20 +static struct s32_pinctrl *to_s32_pinctrl(struct gpio_chip *chip) +{ + return container_of(chip, struct s32_pinctrl, gc); +} + +static struct regmap *s32_gpio_get_pgpd_regmap(struct gpio_chip *chip, + unsigned int pin, + bool output) +{ + struct s32_pinctrl *ipctl =3D to_s32_pinctrl(chip); + struct nxp_siul2_mfd *mfd; + u32 base, num; + int i; + + mfd =3D dev_get_drvdata(ipctl->dev->parent); + + for (i =3D 0; i < mfd->num_siul2; i++) { + base =3D mfd->siul2[i].gpio_base; + num =3D mfd->siul2[i].gpio_num; + + if (pin >=3D base && pin < base + num) + return output ? mfd->siul2[i].regmaps[SIUL2_PGPDO] : + mfd->siul2[i].regmaps[SIUL2_PGPDI]; + } + + return NULL; +} + +static int s32_gpio_request(struct gpio_chip *gc, unsigned int gpio) +{ + struct s32_pinctrl *ipctl =3D to_s32_pinctrl(gc); + struct pinctrl_dev *pctldev =3D ipctl->pctl; + struct gpio_pin_config *gpio_pin; + unsigned int config; + int ret; + + ret =3D s32_regmap_read(pctldev, gpio, &config); + if (ret) + return ret; + + /* Save current configuration */ + gpio_pin =3D kmalloc(sizeof(*gpio_pin), GFP_KERNEL); + if (!gpio_pin) + return -ENOMEM; + + gpio_pin->pin_id =3D gpio; + gpio_pin->config =3D config; + + scoped_guard(spinlock_irqsave, &ipctl->gpio_configs_lock) + list_add(&gpio_pin->list, &ipctl->gpio_configs); + + /* GPIO pin means SSS =3D 0 */ + config &=3D ~S32_MSCR_SSS_MASK; + + return s32_regmap_write(pctldev, gpio, config); +} + +static void s32_gpio_free(struct gpio_chip *gc, unsigned int gpio) +{ + struct s32_pinctrl *ipctl =3D to_s32_pinctrl(gc); + struct pinctrl_dev *pctldev =3D ipctl->pctl; + struct gpio_pin_config *gpio_pin, *tmp; + unsigned long flags; + int ret; + + spin_lock_irqsave(&ipctl->gpio_configs_lock, flags); + + list_for_each_entry_safe(gpio_pin, tmp, &ipctl->gpio_configs, list) { + if (gpio_pin->pin_id =3D=3D gpio) { + ret =3D s32_regmap_write(pctldev, gpio_pin->pin_id, + gpio_pin->config); + if (ret !=3D 0) + goto unlock; + + list_del(&gpio_pin->list); + kfree(gpio_pin); + break; + } + } + +unlock: + spin_unlock_irqrestore(&ipctl->gpio_configs_lock, flags); +} + +static int s32_gpio_get_dir(struct gpio_chip *chip, unsigned int gpio) +{ + struct s32_pinctrl *ipctl =3D to_s32_pinctrl(chip); + unsigned int reg_value; + int ret; + + ret =3D s32_regmap_read(ipctl->pctl, gpio, ®_value); + if (ret) + return ret; + + if (!(reg_value & S32_MSCR_IBE)) + return -EINVAL; + + return reg_value & S32_MSCR_OBE ? GPIO_LINE_DIRECTION_OUT : + GPIO_LINE_DIRECTION_IN; +} + +static unsigned int s32_pin2pad(unsigned int pin) +{ + return pin / S32_PGPD_SIZE; +} + +static u16 s32_pin2mask(unsigned int pin) +{ + /** + * From Reference manual : + * PGPDOx[PPDOy] =3D GPDO(x =C3=97 16) + (15 - y)[PDO_(x =C3=97 16) + (15= - y)] + */ + return BIT(S32_PGPD_SIZE - 1 - pin % S32_PGPD_SIZE); +} + +static struct regmap *s32_gpio_get_regmap_offset_mask(struct gpio_chip *ch= ip, + unsigned int gpio, + unsigned int *reg_offset, + u16 *mask, + bool output) +{ + struct regmap *regmap; + unsigned int pad; + + regmap =3D s32_gpio_get_pgpd_regmap(chip, gpio, output); + if (!regmap) + return NULL; + + *mask =3D s32_pin2mask(gpio); + pad =3D s32_pin2pad(gpio); + + *reg_offset =3D S32_PGPD(pad); + + return regmap; +} + +static void s32_gpio_set_val(struct gpio_chip *chip, unsigned int gpio, + int value) +{ + unsigned int reg_offset; + struct regmap *regmap; + u16 mask; + + regmap =3D s32_gpio_get_regmap_offset_mask(chip, gpio, ®_offset, + &mask, true); + if (!regmap) + return; + + value =3D value ? mask : 0; + + regmap_update_bits(regmap, reg_offset, mask, value); +} + +static void s32_gpio_set(struct gpio_chip *chip, unsigned int gpio, + int value) +{ + if (s32_gpio_get_dir(chip, gpio) !=3D GPIO_LINE_DIRECTION_OUT) + return; + + s32_gpio_set_val(chip, gpio, value); +} + +static int s32_gpio_get(struct gpio_chip *chip, unsigned int gpio) +{ + unsigned int reg_offset, value; + struct regmap *regmap; + u16 mask; + int ret; + + if (s32_gpio_get_dir(chip, gpio) !=3D GPIO_LINE_DIRECTION_IN) + return -EINVAL; + + regmap =3D s32_gpio_get_regmap_offset_mask(chip, gpio, ®_offset, + &mask, false); + if (!regmap) + return -EINVAL; + + ret =3D regmap_read(regmap, reg_offset, &value); + if (ret) + return ret; + + return !!(value & mask); +} + +static int s32_gpio_dir_out(struct gpio_chip *chip, unsigned int gpio, + int val) +{ + struct s32_pinctrl *ipctl =3D to_s32_pinctrl(chip); + + s32_gpio_set_val(chip, gpio, val); + + return s32_pmx_gpio_set_direction(ipctl->pctl, NULL, gpio, false); +} + +static int s32_gpio_dir_in(struct gpio_chip *chip, unsigned int gpio) +{ + struct s32_pinctrl *ipctl =3D to_s32_pinctrl(chip); + + return s32_pmx_gpio_set_direction(ipctl->pctl, NULL, gpio, true); +} + +static int s32_gpio_gen_names(struct device *dev, unsigned int cnt, char *= *names, + char *ch_index, unsigned int *num_index) +{ + unsigned int i; + + for (i =3D 0; i < cnt; i++) { + if (i !=3D 0 && !(*num_index % 16)) + (*ch_index)++; + + names[i] =3D devm_kasprintf(dev, GFP_KERNEL, "P%c_%02d", + *ch_index, 0xFU & (*num_index)++); + if (!names[i]) + return -ENOMEM; + } + + return 0; +} + +static int s32_gpio_remove_reserved_names(struct device *dev, + struct s32_pinctrl *ipctl, + char **names) +{ + struct device_node *np =3D dev->of_node; + u32 base_gpio, num_gpio, tmp; + int num_ranges, i, j, ret; + + /* Parse the gpio-reserved-ranges to know which GPIOs to exclude. */ + + num_ranges =3D of_property_count_u32_elems(dev->of_node, + "gpio-reserved-ranges"); + + /* The "gpio-reserved-ranges" is optional. */ + if (num_ranges < 0) + return 0; + num_ranges /=3D 2; + + for (i =3D 0; i < num_ranges; i++) { + ret =3D of_property_read_u32_index(np, "gpio-reserved-ranges", + i * 2, &base_gpio); + if (ret) + return dev_err_probe(dev, ret, + "Cannot parse start GPIO: %d\n", + ret); + + ret =3D of_property_read_u32_index(np, "gpio-reserved-ranges", + i * 2 + 1, &num_gpio); + if (ret) + return dev_err_probe(dev, ret, + "Cannot parse num. GPIOs: %d\n", + ret); + + if (check_add_overflow(base_gpio, num_gpio, &tmp) || + base_gpio + num_gpio > ipctl->gc.ngpio) + return dev_err_probe(dev, -EINVAL, + "Invalid reserved GPIOs\n"); + + /* Remove names set for reserved GPIOs. */ + for (j =3D base_gpio; j < base_gpio + num_gpio; j++) { + devm_kfree(dev, names[j]); + names[j] =3D NULL; + } + } + + return 0; +} + +static int s32_gpio_populate_names(struct device *dev, + struct s32_pinctrl *ipctl) +{ + struct nxp_siul2_mfd *mfd =3D dev_get_drvdata(ipctl->dev->parent); + unsigned int num_index =3D 0; + char ch_index =3D 'A'; + char **names; + int i, ret; + + names =3D devm_kcalloc(dev, ipctl->gc.ngpio, sizeof(*names), + GFP_KERNEL); + if (!names) + return -ENOMEM; + + for (i =3D 0; i < mfd->num_siul2; i++) { + if (mfd->siul2[i].gpio_base % 16 =3D=3D 0) + num_index =3D 0; + + ret =3D s32_gpio_gen_names(dev, mfd->siul2[i].gpio_num, + names + mfd->siul2[i].gpio_base, + &ch_index, &num_index); + if (ret) + return dev_err_probe(dev, ret, + "Error setting SIUL2_%d names\n", + i); + + ch_index++; + } + + ret =3D s32_gpio_remove_reserved_names(dev, ipctl, names); + if (ret) + return ret; + + ipctl->gc.names =3D (const char *const *)names; + + return 0; +} + #ifdef CONFIG_PM_SLEEP static bool s32_pinctrl_should_save(struct s32_pinctrl *ipctl, unsigned int pin) @@ -896,12 +1149,14 @@ static int s32_pinctrl_probe_dt(struct platform_devi= ce *pdev, int s32_pinctrl_probe(struct platform_device *pdev, const struct s32_pinctrl_soc_data *soc_data) { + struct nxp_siul2_mfd *mfd =3D dev_get_drvdata(pdev->dev.parent); #ifdef CONFIG_PM_SLEEP struct s32_pinctrl_context *saved_context; #endif struct pinctrl_desc *s32_pinctrl_desc; struct s32_pinctrl_soc_info *info; struct s32_pinctrl *ipctl; + struct gpio_chip *gc; int ret; =20 if (!soc_data || !soc_data->pins || !soc_data->npins) @@ -967,5 +1222,32 @@ int s32_pinctrl_probe(struct platform_device *pdev, =20 dev_info(&pdev->dev, "Initialized s32 pinctrl driver\n"); =20 + gc =3D &ipctl->gc; + gc->parent =3D &pdev->dev; + gc->label =3D dev_name(&pdev->dev); + gc->base =3D -1; + /* In some cases, there is a gap between the SIUL GPIOs. */ + gc->ngpio =3D mfd->siul2[mfd->num_siul2 - 1].gpio_base + + mfd->siul2[mfd->num_siul2 - 1].gpio_num; + ret =3D s32_gpio_populate_names(&pdev->dev, ipctl); + if (ret) + return ret; + + gc->set =3D s32_gpio_set; + gc->get =3D s32_gpio_get; + gc->set_config =3D gpiochip_generic_config; + gc->request =3D s32_gpio_request; + gc->free =3D s32_gpio_free; + gc->direction_output =3D s32_gpio_dir_out; + gc->direction_input =3D s32_gpio_dir_in; + gc->get_direction =3D s32_gpio_get_dir; + + ret =3D devm_gpiochip_add_data(&pdev->dev, gc, ipctl); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Unable to add gpiochip\n"); + + dev_info(&pdev->dev, "Initialized s32 GPIO functionality\n"); + return 0; } --=20 2.45.2 From nobody Sat Nov 23 09:07:59 2024 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012060.outbound.protection.outlook.com [52.101.66.60]) (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 A05751FB88B; Wed, 13 Nov 2024 10:12:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492773; cv=fail; b=lB4Eu3EZckubrUMBTBzRPnvDHMd/AFESCl6yqOpwkL79KOQUXUHg6OkFLhFSlNJIkfalhzHrv7YhIrw8/FFp0kr31TvwJ3ehPbLdByrgJfxDixwW/jndNRRkeNCmu35MHJr0MGNeFwhA6Ga5cMjYzGPP+Yni/akGbSsd+zadIYQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492773; c=relaxed/simple; bh=Iq1DHLajzm/1aUJCcgGzQoUkVF1yC/LNegicjqZQ1Mk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=jPwGo65MKGmSHl3z5QsntXKxUrHIPP0hqTTPcCozlwRYcV/aGBJcf9QgskriWBAgQY+twgALKVbq/UUlZP9x64QAQ+AjT2foQhLFgcV6SMf+TyHXJer+nCLXbrLPJCvSK0ExhuhFInvyGnUj7p9xCEc2tvxfkmISO7Ze6EMgAQE= 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=ZvHQ81fd; arc=fail smtp.client-ip=52.101.66.60 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="ZvHQ81fd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Devs/9wZtRbazkamS1f3iI5L1XeJQxx7P3uElr1n5kKUlyrG5k6LDc9e3QqPTYtaqpidubcgYtIrj1sDdgDlDKFXBONLBTonXyymMKBgsP/gqx+DeoNMWyKfpeCM8+5XdNJXcfFnDclArNiphQkhLdjUf9rgZK6BMbv8Siot8qhdqh460h/oFWjMdyumUM2R/waN58MPbDz3vk8Vv1F45gLUqqd6DggbStqW43QCKBenyyDUuTkQGDHbD/0a3NwL51yptSqHPGZFvetMSwUqJVJN6W5tzmJ022sbkMda86m8QsbjubA8dKzlgev9LA6Qu3+Tc4hL5y2hCq4w8HEmgQ== 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=LhuoVUdlxKCIAUVq6j+EX8ECSiAZSLCgHoHWNam5lQo=; b=gNIBODEumuexhO0Q7JPfxpoosGKdSkvyOeq473Ucxh5rS/5TqrOHZn0PNlmB45DyfvmvSfS56X0nrpnbnj79rtS8lNIoasuvlSAcQw++BLeUaS+aJ9AAweWPo9/4U9JO7d6uvMNiA8ieWSpiYRH0N6Y2Z7qQKnJEXEkc7XNyn9nexoBY4L3jGtI5Lkfei7pzHBDcDSU8YobvMAzLFdAS9+qvHLYAVy8XJJ2zkV+mtNsdd7Yb2Hc5zKWHipLRbb0GBo73s8A+TeeWjX6aqeqWWLOksKiIoNIWYncjCj4xgGVspphC/IdW0KMVVnmW2JFIK+BBrB3OF8jABnVwgyYfSw== 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=LhuoVUdlxKCIAUVq6j+EX8ECSiAZSLCgHoHWNam5lQo=; b=ZvHQ81fdeGoMj2jgG1A/upAMAmnG1OrLgv/G1yn8/EJpzmY9Q/0gS8AUdkM07OO1PAs6VAqU+bWONIATZV3kOx8YP+Sg2LIVFzhus94benqicqv7rUNPSfrEmmGGe8kOrDHBwEELiVP2tTXKvTCB+3hmaK5BXKl1eBvVbjkYzmbicg7emy7IxSmNnvVgvWX3WyIDd1mltF8T91LsqBet7e6geLg49u2Bj/3VyImvPqKh2LBBQ4PzDRWFjkkr/Psx1kpz96zQeA+hdVBkK3sS75EJtK2oSXwDJamSlZ+uP6yROAZtlIDRsKkKa8U+ksyWpU2mjxhCM1ONvVm5RgRbwg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by DBBPR04MB7739.eurprd04.prod.outlook.com (2603:10a6:10:1eb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.29; Wed, 13 Nov 2024 10:12:45 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%4]) with mapi id 15.20.8158.013; Wed, 13 Nov 2024 10:12:45 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Larisa Grigore , Greg Kroah-Hartman , "Rafael J. Wysocki" , Lee Jones , Shawn Guo , Sascha Hauer , Fabio Estevam , Dong Aisheng , Jacky Bai Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Pengutronix Kernel Team , imx@lists.linux.dev, Andrei Stefanescu Subject: [PATCH v6 7/7] MAINTAINERS: add MAINTAINER for NXP SIUL2 MFD driver Date: Wed, 13 Nov 2024 12:10:59 +0200 Message-ID: <20241113101124.1279648-8-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> References: <20241113101124.1279648-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM8P251CA0005.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:21b::10) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@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: AM9PR04MB8487:EE_|DBBPR04MB7739:EE_ X-MS-Office365-Filtering-Correlation-Id: 49d6c7aa-8b90-4792-2ef5-08dd03cbb7a5 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|7416014|376014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?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?S3BiY05qOWhWL3lUSE1xaVQxWFBHdUFhTExMZjdaMFRvSzIxem5KTzlPalBM?= =?utf-8?B?b1U2Qmo0TGRKdGRmU3JDR0RnZ1B4RkZEVDdoTmlDUE1IZ1dLS3Bmd2NBQkRw?= =?utf-8?Q?rwtKgSuMa2Bz6?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S0dhc0hqTXd5VlBHYWNpY1NNY0ZkRlRiQkUxZlE3bjIzQURVOVVKUGl4bk9U?= =?utf-8?B?bXhFb3Arcm1lcmRSNFJaV1JySlhDVGNWSGJvS29KV1FjczZHbHBacElrMmtL?= =?utf-8?B?YUF2L1Nhd20wS1lKZFpwVmk1YStPd1RHbkIrWVpVYTZlRU53aGk2K2pqblpB?= =?utf-8?B?Zk5GaUFZNTJKRUdSQVU5cWlwK0N2citXNStnaVRSUzJTaGw2alpZZHNqNkVj?= =?utf-8?B?SjRiU052WFJTU3R5Vi9WYzZRV1VwNy9ZbHVIdVgvNU5yU3RNQ1A3ZGVOekli?= =?utf-8?B?VWV5RWxHbUw2K1kvdDg5TCttZ1Mwei9aZVlmYjRJQXBRWlFUNDVOeU5lQy8v?= =?utf-8?B?a01uMlZlQzJyNWd1aWVSYXFReVhia0g0RmZMK2pPcnU0dk8yTkZOeVUycTIx?= =?utf-8?B?eUNBOXBJNHpnbHpzbmFwR0IrUkp5bEN1bnlUTURoNWI0SmlpcWIxN2cycUFF?= =?utf-8?B?L0dKVUFzbWo3SThOK2RKTzhqYzNVbGZ2UGZWUGd5YXJTR094ZXg3YXFIWDFS?= =?utf-8?B?QTVmTEM0RTl0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B?MThueFE0ZENibzVsclJVRUdzTnVwc053aG9RUzlETGJoSW5hN01ycUdlMUcv?= =?utf-8?B?SUdEek5GL3lTNWRubGpkYjZtQzBXSmFYTFg5UStyV1NPSWNJUVpOOTRYdjNU?= =?utf-8?B?UHhXN1BtRWh3c0lsZHpvVzU2WUFIbk1sT2hnd2RaQW9aTGtKVFp5OG1kcXMr?= =?utf-8?B?ZXRFdTRtejlibmJ1U003RXh2c0R2QzV3VDNtQmFyejZkQjFxSERSZWVYZm9w?= =?utf-8?B?SGFhYW53K0RFOGZqK0pldmNGcjc5dm9LT1c2anVFTy8xMHg4bElIdWltR0dq?= =?utf-8?B?bTBYcHVPY2xjVG5UZmxIQU96MHNRUTNPY3ZyS3gwR2RLUDNIRTNzcm1Ybmlm?= =?utf-8?B?OENsVXFmbjlIWnJJSktNZzNqczArdytMVy9pZXczZUlJbTZYYVlsSVBDQnFQ?= =?utf-8?B?am4vcFVYclc0WEp1Yzk1VGY1VFY5Q0VOOE9JNHB2bGdJZUFLSXUvaThCVzRV?= =?utf-8?B?MkhOeVdlWWRqaXJLZzJsSjFhUzFEWFk1cDdlNW1DcksyMnc2TktEZEFMTkdx?= =?utf-8?B?V0x6WjRpZW1KTmR0aEo0MFV4dzA0dnEwV0piMndreHNZbERWR0FWL3lpUktO?= =?utf-8?B?OFRNRE1jdFB3QXZiR0hPc2ZBS2NVYTJWdWl6U202U1RYeGRkalFzWkJWNmw0?= =?utf-8?B?STVFV0VqdHQ3ZVhPUUR2SFE3UXNZYm1Rd3NKK1ptalRncFpJTUhoSXp0UDR4?= =?utf-8?B?SlE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49d6c7aa-8b90-4792-2ef5-08dd03cbb7a5 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 10:12:45.3041 (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: kqIJUzeX81GRNy61KL29ZHPyGdnoXIYpAQV6eOcoBvc0syd9AWfnlJnMidaoum7PbdZuGgLyxKmfY1H9eW3lZbyLX7gylMTZYW819UPkPGE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7739 Content-Type: text/plain; charset="utf-8" Add the new MFD driver for the SIUL2 module under the NXP S32G existing entry. This MFD driver currently has one cell for a combined pinctrl&GPIO driver and will, in the future, contain another cell for an NVMEM driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bdae0faf000c..cfbaceea5f40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2787,7 +2787,9 @@ R: Ghennadi Procopciuc L: NXP S32 Linux Team L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained +F: Documentation/devicetree/bindings/mfd/nxp,siul2.yaml F: arch/arm64/boot/dts/freescale/s32g*.dts* +F: drivers/mfd/nxp-siul2.c F: drivers/pinctrl/nxp/ =20 ARM/Orion SoC/Technologic Systems TS-78xx platform support --=20 2.45.2