From patchwork Wed Nov 13 10:10:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13873407 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) (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 917D11FBCAE for ; Wed, 13 Nov 2024 10:12:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731492765; cv=fail; b=Xh6vYbYfa8jHwopz8ozfVCEYA6fq2oS2rPt3M7lpWbh8hHoONkOdriGa1t9q5LbmUeiFanMAo5HfEZDoyv4deylqiceE9W9qymku2OYVH403FZwoToo/V0eVHvQucxp+EnAoLKGOadKYAGkHdsHMfSSjMNWUOI1VjO6FYN84oi4= 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.21.59 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> 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: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: 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?q?Kq30bIlw1+dkqOaN6rhr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BNCdmom3?= =?utf-8?q?KXLQlamUVol0GIYDBCilHYb3Xbl+ViYFns4N/CML7VrRcx+MZWst1rSz8p3JSBgKh?= =?utf-8?q?nRdZBohJcyuHOpnj6f0QP3k6QsTFolyeKDKTdr7Ji7TwIpdKlAtzU0vQ5u1DRPlpo?= =?utf-8?q?YuNtp8PiyDuGwRKHV/LiQFYqCtxv6G/B5NmI9MP2/Matrt/Eb6tBVlKpeigIDSGmr?= =?utf-8?q?pEJ6BuYl+7qZ1Zd0oA27DlUZdA3aw25v0Uk3afnnYw2w24EUWRpxF4E2+gm4YByvA?= =?utf-8?q?XIpQiCw/bYArObayqvkTXMTvu51EMxMxpZ4hRTF/xkk2zB1LtblCnFO2BiTiPZJTi?= =?utf-8?q?Aq6xXYLuhpVvbF6MgBB8Dyes8WIxyGH0My07pIcBQGaNqvqVWuVmA9TSEaP87ZhNj?= =?utf-8?q?+p9wO9rpZgMFReW1KDBEtUMMUtKrGsPi6HFrcY/rbrtu7EE1zXB3re89etESLPUvm?= =?utf-8?q?oVfP+QG8M97wz3zUVO7+H12xxFyWqrgp2w=3D=3D?= 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?q?eDlO63R49o4n/XAFdYj/Y2bduJyd?= =?utf-8?q?1rUrn+tDdKy1D9qeyaaSF94OduEEoxDin9oxZot/d+umaSZWbZNezCORZzVIT1sip?= =?utf-8?q?5fKKks5SktgS/RWx0A3hfMJi29yRcGsFqJilnZb4qqC5brC+xSoIEgClDz1zGbRY5?= =?utf-8?q?ehPoh2U9HtAJ2xsMdCj2nfagTNdCHdayT3wTXwZKgRCj8y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dxH8WzzQ2wFb+c8Q+WmNFgt?= =?utf-8?q?Pfm8SS0T+6Hc0IxidtL94i9VEcVO1PFT22XzOIZTMhsUJVmRyXihTeZ3IgQmmFO6y?= =?utf-8?q?QpoIeeHcjVY05iSNa3IV9jMwgRJY9l5KmuBdBL8pRRLhEeqzKtRoo4FZ5splTQ1e2?= =?utf-8?q?do9cn856rBJR8fx3OKp4pXicG6WQt5me/LytFW43InuXYosOUFiKTHexoLJ9pxkFv?= =?utf-8?q?edij86a5i0B6Oh0NMsmEU6TjDkSxGoCaz7vbHq3HHuP+tJTR/Pu8IUKiXAByEy9TN?= =?utf-8?q?7sJ8cD235ThYoTyrfuH18GyQ6D8T1ShYXJgFrfRzUltp4LHXI1cyQuEjXUbjv/lsU?= =?utf-8?q?IOCXGnJQBP2FZLv+/fZgYXk4wcxkFYSkHjJun60hQ9copER8TsTGJsljFalul9DNB?= =?utf-8?q?ne8fZ8jntM2m56YI+qfbt7kHTyNnRdl9SNBylKy/v5PmQux3YIPBdy03hDXANrVrI?= =?utf-8?q?QkLUkdZqtsN5P6I0Kl64GEqj5rW5TczGbg=3D=3D?= 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 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 = <1>; ranges = <0 0 0 0x80000000>; - pinctrl: pinctrl@4009c240 { - compatible = "nxp,s32g2-siul2-pinctrl"; - /* MSCR0-MSCR101 registers on siul2_0 */ - reg = <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 = "nxp,s32g2-siul2"; + reg = <0x4009c000 0x179c>, + <0x44010000 0x17b0>; + reg-names = "siul20", "siul21"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&siul2 0 0 102>, <&siul2 112 112 79>; + gpio-reserved-ranges = <102 10>, <123 21>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; 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 = <1>; ranges = <0 0 0 0x80000000>; - pinctrl: pinctrl@4009c240 { - compatible = "nxp,s32g2-siul2-pinctrl"; - /* MSCR0-MSCR101 registers on siul2_0 */ - reg = <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 = "nxp,s32g3-siul2"; + reg = <0x4009c000 0x179c>, + <0x44010000 0x17b0>; + reg-names = "siul20", "siul21"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&siul2 0 0 102>, <&siul2 112 112 79>; + gpio-reserved-ranges = <102 10>, <123 21>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; jtag_pins: jtag-pins { jtag-grp0 {