From patchwork Fri Dec 6 12:31:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Costea X-Patchwork-Id: 13897161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F0B3E77179 for ; Fri, 6 Dec 2024 12:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Ramg/LlFf4bZis+Y58Q4bHkqemVET9h0BhtEsVDgRb8=; b=I6RMGpfIxEg9WEyUm2j9026KLD 9mD2iSq8FYUm2GPgoLuunVJymKjbc6w/Kgod14OHJgKBm1iR+WI/3kMdvPVs6X9rCeO9j6Gwp/Zd7 3l0kNDrfB8CxOQYD5rPoj4DUFS5rxifRwY3vTOUn8I+n0S/jZPsvoxNDwa65f2qw7fwBKizFiaBqG xFtjo9Y+8UUts9bp8uMFDu9ow9FtU6uawFLwLP7/mzNn3UkV0cXNsCK0XouLNShOesaq82chz3gG3 M/2qjKIwUJERRlNp6kefDPLGZZvgUJXbaWHn/lXMkIFTYX/DPZqEP2yifTdw4FjJPBBMzyehGDzMD bj5yPpzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJXVX-00000001Zbu-46qh; Fri, 06 Dec 2024 12:32:31 +0000 Received: from mail-db8eur05on2061f.outbound.protection.outlook.com ([2a01:111:f403:2614::61f] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJXUV-00000001ZTD-2OQq for linux-arm-kernel@lists.infradead.org; Fri, 06 Dec 2024 12:31:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lEBRPWEIK5W8F7CB/q3ukOqH4NKEePPWsOjo5FcVPzdB/wVGXwVRkeNP2Nu04wvyThayGKVJZL+quAKxtqexrPCjQxYM6+kRnzD8LStC39Z3wU5UXaMyKEB8QwtYlAwCy415mc/B1PypidZEalxhVAeuVZ/P7WVTxpFy4yv98SaScL9XqYT3teJtgharB7sCkYjScdy8EI7EuvAtaqqdO666/RLOcGQ0UEu8v0wAW/SQrx7trwv96/Z8okNG5W+KW7eiDrZqDF/9epDwy3Pfs7ktujofmsPpM6n9etRLgGgOauVji8qyEdGNwtHOOohP+Mj9jAPJPaIfYD1x1FDKKA== 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=Ramg/LlFf4bZis+Y58Q4bHkqemVET9h0BhtEsVDgRb8=; b=ZhsSsiEPVS7933bqlb0g2iWQlRB/9R1O1j6ycABk1PWFEVXT/CNYdsrm/WqyBkW1sfUfTBxRuP9C1x0pKe0Ptdk5Rb/LWds6l3btN4ty2LjsRSbjlmh2eRBtR4/uCRfqiDuNmS25MRmFhAKx6Z/IZpLZv3iIC83mwsMGxINrOgQRyb8JcA9laX5WaGx21EoBBTMUKBG+UCQ0Wxs7Dsjw1qrqAGIY34MPu3A3xhFmlnmEEpSnwtyJU0OZyiD5wSmTMvE7gsV2mr23VeDFZEMVWAdr8HGUQFYuaWKQd20i5GYpZiQ01Z+ste1ksFAgm/wR3Wy6KY6IP+uGUV5k/rf/+g== 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=Ramg/LlFf4bZis+Y58Q4bHkqemVET9h0BhtEsVDgRb8=; b=jNQYcUc5tRc88HjjWFRW99H7WjAQtGsWZacdiEd8dTOt6NR7nbqyEb7tgFD1YpgeMZQaijcZ4j0VcB8d+xX/ml59MWIZvLkF1pCTX/nJq1bl6TT5JpOEGkPHDU9M2GLr/62RrzwcxFRLZikn4IJYc5+PhB8+XzRXyZ48rBVg7wOUwOB+K9+CU9TpIRw2eA6FEDR86cb9No9oVMw9v7NO1B1h9jWbKt1fRVYuL0oHtrmRN0IQm02cPqiYAnxS+j6JeVqqFug+UpU6HVvx90xHVGrFsoDKJWw0Pvfmj+aeMgR6vk6YBuhhSP+bvSjLkOF2m8hKlLUHBq4GsnMRlRcUUg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) by VI0PR04MB10439.eurprd04.prod.outlook.com (2603:10a6:800:238::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.11; Fri, 6 Dec 2024 12:31:23 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%6]) with mapi id 15.20.8207.017; Fri, 6 Dec 2024 12:31:23 +0000 From: Ciprian Costea To: Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Shawn Guo , Sascha Hauer , Fabio Estevam , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, NXP S32 Linux , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH] arm64: dts: s32g: add I2C support Date: Fri, 6 Dec 2024 14:31:19 +0200 Message-ID: <20241206123119.1688712-1-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 X-ClientProxiedBy: AM0PR01CA0152.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::21) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|VI0PR04MB10439:EE_ X-MS-Office365-Filtering-Correlation-Id: a24f01b0-1709-432f-adaa-08dd15f1e50b 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|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?TeW+3u5+vXG3wei6fbhINLQ76ll/NZr?= =?utf-8?q?55x+iRiHhe6/IBxEk2EBDU9nvqUL4qVFy5aYKIxQaGC828gW0ObrsZ3+YtwCExFjY?= =?utf-8?q?sbyQDbyNAuatw2HuqKfYNNw4aTVIsJSss/SfbO58MAGmyFLNRUKuhMce/tIPTA9IP?= =?utf-8?q?8pY+DVxcNXUVtOyvcOjRrNZV/nQLff5fX3LtHZBXz/l8OIYuyjWAXP9QQZsCe+Xox?= =?utf-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?= =?utf-8?q?H8f1EyYtyAMz321ENXCOoh7cHHYdZaWpsDF5hP82KqPNArt+IpiSSS1CoXo18l5zY?= =?utf-8?q?+Lma5iZXnyUedEzkywaqQzcWo7ZEXy956ObKOUjaHU3XJb6TLmaSJlTFwdL1paPiv?= =?utf-8?q?VgJmqFfnXOUvH5pKgjaY64Ain2qK6Q7XCjsJLPkTb2+u4BAoJ/qco3qqXA+sk7FKG?= =?utf-8?q?XEQ6gNNYLbK+m94/H9LCs/bDOWh/8PQ4KWg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9251.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ap+kMjcXLlGdM+m0hd/2Sl1P0gjr?= =?utf-8?q?BPwuaT/INS5BgqN40z0NFZXaYVl+JbtD9U/9w8MfU9sj/wDRvsd+8qh8MmyAYqd/M?= =?utf-8?q?1nU2zSrnLRZMIvrAm48DsLpHg4WkA0S6HoWvs9yA7RTFcWy096SXECelrfHITS51q?= =?utf-8?q?yEJUrV5Euqzf7pTHyQVVZvKz1bKmJeeiDvMzcw8N9EElWhxnQmVu6sIzklW5yUUeX?= =?utf-8?q?m1gWpd0AJgXz+e5jVq/c+5FWoNCIiPfGF6mG48KjyarMGruD/XZtdZ4rovoagodTF?= =?utf-8?q?v+e/b6+2S+sJ9pQxs+buG34VsizieSYfpxFVguvJgbTRC9KeX0W64r3lfcuXeL0OA?= =?utf-8?q?qfB70UClek0+Yt1O6WeALqTuVGZxNPyssStrLkvS9W3aI4y4x4CpPyGVKx8nNsd7S?= =?utf-8?q?dU39uBrWAGrnDzuizlKeGinWl7mTQ7ufdz7CfupAAhAgCZrUyGrqbgP0t5V/ToUOr?=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f-8?q?EwX4WkOF96COHK6zI892feG3rQLoGS2cgvkHDHMdGsAr74ON1V6KXKsDDH4/vjdT7?= =?utf-8?q?kcyL97ruqn35NUx3v8jIj4SqNQiFgb/ql0nz5FXp/j7TWrdmpZC7YDuKM2aIz8AxZ?= =?utf-8?q?6yi1vM6nF2QCW3/xK8U0E9AgehEGFhyHZ3hGyXjDYJcJOI9sg/hhaxtHIp0prPTa8?= =?utf-8?q?Bd8+wedRE/uLRkNYrKzVNal4zR1jQgn10A=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a24f01b0-1709-432f-adaa-08dd15f1e50b X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2024 12:31:23.1931 (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: /wpaAwdFb4MfJCsSHv2xNUcg678iq7eSJJp/a0/3NyEQAc4tUJGQtrWdCdbXM+TSwGJRUaJziWrHbb/H9wexiF4u/mnxmp3QRCYOYFW1/i8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10439 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241206_043127_781234_2FC29924 X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ciprian Marian Costea Add the I2C Devicetree nodes and pinmux for S32G2 and S32G3 SoCs. With respect to S32G2/S32G3 SoC based boards, there are multiple RDB (rdb2 vs rdb3) and EVB (for G2 vs for G3) board revisions. These versions are quite similar. The common part for the EVB revisions will be centralized in 's32gxxa-evb.dtsi' file, while the RDB commonalities will be placed in 's32gxxa-rdb.dtsi' file. This refactor will also serve for other modules in the future, such as FlexCAN, DSPI. Signed-off-by: Ciprian Marian Costea --- arch/arm64/boot/dts/freescale/s32g2.dtsi | 45 ++++++ .../arm64/boot/dts/freescale/s32g274a-evb.dts | 1 + .../boot/dts/freescale/s32g274a-rdb2.dts | 1 + arch/arm64/boot/dts/freescale/s32g3.dtsi | 50 ++++++ .../boot/dts/freescale/s32g399a-rdb3.dts | 12 ++ .../boot/dts/freescale/s32gxxxa-evb.dtsi | 150 ++++++++++++++++++ .../boot/dts/freescale/s32gxxxa-rdb.dtsi | 124 +++++++++++++++ 7 files changed, 383 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/s32gxxxa-evb.dtsi create mode 100644 arch/arm64/boot/dts/freescale/s32gxxxa-rdb.dtsi diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi index 7be430b78c83..0e6c847ab0c3 100644 --- a/arch/arm64/boot/dts/freescale/s32g2.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi @@ -333,6 +333,33 @@ uart1: serial@401cc000 { status = "disabled"; }; + i2c0: i2c@401e4000 { + compatible = "nxp,s32g2-i2c"; + reg = <0x401e4000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + + i2c1: i2c@401e8000 { + compatible = "nxp,s32g2-i2c"; + reg = <0x401e8000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + + i2c2: i2c@401ec000 { + compatible = "nxp,s32g2-i2c"; + reg = <0x401ec000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + uart2: serial@402bc000 { compatible = "nxp,s32g2-linflexuart", "fsl,s32v234-linflexuart"; @@ -341,6 +368,24 @@ uart2: serial@402bc000 { status = "disabled"; }; + i2c3: i2c@402d8000 { + compatible = "nxp,s32g2-i2c"; + reg = <0x402d8000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + + i2c4: i2c@402dc000 { + compatible = "nxp,s32g2-i2c"; + reg = <0x402dc000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + usdhc0: mmc@402f0000 { compatible = "nxp,s32g2-usdhc"; reg = <0x402f0000 0x1000>; diff --git a/arch/arm64/boot/dts/freescale/s32g274a-evb.dts b/arch/arm64/boot/dts/freescale/s32g274a-evb.dts index b9a119eea2b7..c4a195dd67bf 100644 --- a/arch/arm64/boot/dts/freescale/s32g274a-evb.dts +++ b/arch/arm64/boot/dts/freescale/s32g274a-evb.dts @@ -7,6 +7,7 @@ /dts-v1/; #include "s32g2.dtsi" +#include "s32gxxxa-evb.dtsi" / { model = "NXP S32G2 Evaluation Board (S32G-VNP-EVB)"; diff --git a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts index aaa61a8ad0da..b5ba51696f43 100644 --- a/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts +++ b/arch/arm64/boot/dts/freescale/s32g274a-rdb2.dts @@ -7,6 +7,7 @@ /dts-v1/; #include "s32g2.dtsi" +#include "s32gxxxa-rdb.dtsi" / { model = "NXP S32G2 Reference Design Board 2 (S32G-VNP-RDB2)"; diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi index 6c572ffe37ca..666e4029e588 100644 --- a/arch/arm64/boot/dts/freescale/s32g3.dtsi +++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi @@ -390,6 +390,36 @@ uart1: serial@401cc000 { status = "disabled"; }; + i2c0: i2c@401e4000 { + compatible = "nxp,s32g3-i2c", + "nxp,s32g2-i2c"; + reg = <0x401e4000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + + i2c1: i2c@401e8000 { + compatible = "nxp,s32g3-i2c", + "nxp,s32g2-i2c"; + reg = <0x401e8000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + + i2c2: i2c@401ec000 { + compatible = "nxp,s32g3-i2c", + "nxp,s32g2-i2c"; + reg = <0x401ec000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + uart2: serial@402bc000 { compatible = "nxp,s32g3-linflexuart", "fsl,s32v234-linflexuart"; @@ -398,6 +428,26 @@ uart2: serial@402bc000 { status = "disabled"; }; + i2c3: i2c@402d8000 { + compatible = "nxp,s32g3-i2c", + "nxp,s32g2-i2c"; + reg = <0x402d8000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + + i2c4: i2c@402dc000 { + compatible = "nxp,s32g3-i2c", + "nxp,s32g2-i2c"; + reg = <0x402dc000 0x1000>; + interrupts = ; + clocks = <&clks 40>; + clock-names = "ipg"; + status = "disabled"; + }; + usdhc0: mmc@402f0000 { compatible = "nxp,s32g3-usdhc", "nxp,s32g2-usdhc"; diff --git a/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts b/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts index 828e353455b5..eb73a5dcebe7 100644 --- a/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts +++ b/arch/arm64/boot/dts/freescale/s32g399a-rdb3.dts @@ -8,6 +8,7 @@ /dts-v1/; #include "s32g3.dtsi" +#include "s32gxxxa-rdb.dtsi" / { model = "NXP S32G3 Reference Design Board 3 (S32G-VNP-RDB3)"; @@ -39,6 +40,17 @@ &uart1 { status = "okay"; }; +&i2c4 { + #address-cells = <1>; + #size-cells = <0>; + + ina231@40 { + compatible = "ti,ina231"; + reg = <0x40>; + shunt-resistor = <1000>; + }; +}; + &usdhc0 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc0>; diff --git a/arch/arm64/boot/dts/freescale/s32gxxxa-evb.dtsi b/arch/arm64/boot/dts/freescale/s32gxxxa-evb.dtsi new file mode 100644 index 000000000000..a44eff28073a --- /dev/null +++ b/arch/arm64/boot/dts/freescale/s32gxxxa-evb.dtsi @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright 2024 NXP + * + * Authors: Ciprian Marian Costea + * Ghennadi Procopciuc + * Larisa Grigore + */ + +&pinctrl { + i2c0_pins: i2c0-pins { + i2c0-grp0 { + pinmux = <0x101>, <0x111>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c0-grp1 { + pinmux = <0x2352>, <0x2362>; + }; + }; + + i2c0_gpio_pins: i2c0-gpio-pins { + i2c0-gpio-grp0 { + pinmux = <0x100>, <0x110>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c0-gpio-grp1 { + pinmux = <0x2350>, <0x2360>; + }; + }; + + i2c1_pins: i2c1-pins { + i2c1-grp0 { + pinmux = <0x131>, <0x141>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c1-grp1 { + pinmux = <0x2cd2>, <0x2ce2>; + }; + }; + + i2c1_gpio_pins: i2c1-gpio-pins { + i2c1-gpio-grp0 { + pinmux = <0x130>, <0x140>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c1-gpio-grp1 { + pinmux = <0x2cd0>, <0x2ce0>; + }; + }; + + i2c2_pins: i2c2-pins { + i2c2-grp0 { + pinmux = <0x151>, <0x161>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c2-grp1 { + pinmux = <0x2cf2>, <0x2d02>; + }; + }; + + i2c2_gpio_pins: i2c2-gpio-pins { + i2c2-gpio-grp0 { + pinmux = <0x150>, <0x160>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c2-gpio-grp1 { + pinmux = <0x2cf0>, <0x2d00>; + }; + }; + + i2c4_pins: i2c4-pins { + i2c4-grp0 { + pinmux = <0x211>, <0x222>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c4-grp1 { + pinmux = <0x2d43>, <0x2d33>; + }; + }; + + i2c4_gpio_pins: i2c4-gpio-pins { + i2c4-gpio-grp0 { + pinmux = <0x210>, <0x220>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c4-gpio-grp1 { + pinmux = <0x2d40>, <0x2d30>; + }; + }; +}; + +&i2c0 { + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c0_pins>; + pinctrl-1 = <&i2c0_gpio_pins>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c1_pins>; + pinctrl-1 = <&i2c1_gpio_pins>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c2_pins>; + pinctrl-1 = <&i2c2_gpio_pins>; + status = "okay"; +}; + +&i2c4 { + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c4_pins>; + pinctrl-1 = <&i2c4_gpio_pins>; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/freescale/s32gxxxa-rdb.dtsi b/arch/arm64/boot/dts/freescale/s32gxxxa-rdb.dtsi new file mode 100644 index 000000000000..d992c0c9e695 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/s32gxxxa-rdb.dtsi @@ -0,0 +1,124 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright 2024 NXP + * + * Authors: Ciprian Marian Costea + * Ghennadi Procopciuc + * Larisa Grigore + */ + +&pinctrl { + i2c0_pins: i2c0-pins { + i2c0-grp0 { + pinmux = <0x1f2>, <0x201>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c0-grp1 { + pinmux = <0x2353>, <0x2363>; + }; + }; + + i2c0_gpio_pins: i2c0-gpio-pins { + i2c0-gpio-grp0 { + pinmux = <0x1f0>, <0x200>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c0-gpio-grp1 { + pinmux = <0x2350>, <0x2360>; + }; + }; + + i2c2_pins: i2c2-pins { + i2c2-grp0 { + pinmux = <0x151>, <0x161>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c2-grp1 { + pinmux = <0x2cf2>, <0x2d02>; + }; + }; + + i2c2_gpio_pins: i2c2-gpio-pins { + i2c2-gpio-grp0 { + pinmux = <0x2cf0>, <0x2d00>; + }; + + i2c2-gpio-grp1 { + pinmux = <0x150>, <0x160>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + }; + + i2c4_pins: i2c4-pins { + i2c4-grp0 { + pinmux = <0x211>, <0x222>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c4-grp1 { + pinmux = <0x2d43>, <0x2d33>; + }; + }; + + i2c4_gpio_pins: i2c4-gpio-pins { + i2c4-gpio-grp0 { + pinmux = <0x210>, <0x220>; + drive-open-drain; + output-enable; + input-enable; + slew-rate = <133>; + }; + + i2c4-gpio-grp1 { + pinmux = <0x2d40>, <0x2d30>; + }; + }; +}; + +&i2c0 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c0_pins>; + pinctrl-1 = <&i2c0_gpio_pins>; + status = "okay"; + + pcal6524: gpio-expander@22 { + compatible = "nxp,pcal6524"; + reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&i2c2 { + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c2_pins>; + pinctrl-1 = <&i2c2_gpio_pins>; + status = "okay"; +}; + +&i2c4 { + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c4_pins>; + pinctrl-1 = <&i2c4_gpio_pins>; + status = "okay"; +};