From patchwork Fri Dec 13 14:22:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Costea X-Patchwork-Id: 13907273 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 B840CE7717D for ; Fri, 13 Dec 2024 14:37:06 +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=222dzC2vXjpjjGgcZahcdE9bxHdHlBOazA7qMVDBJrU=; b=Ojqe1lsW7GJJbP8atOXuysUzAh 7UrOkiwPVf5cQ+kcmER/H0U9H4Exjyo7FnjHupR+2zI8YwdyeYqvAI4on4W+zWEWzjlRLT8lEgAyY vxkblqu5C3BZM6XIRWARApTseh/pzt0tYaDmELShtFsnyRngI16JDkh4OA769u5h2cIAAHiwIqCkN 4sGmxaMYwXSCvTMA6sp2rLJj63nOfJNTtauab6PObN53uhPlR2dF3jCvSTnnsLufOt0Ijgo0JGRIY 2Z5qFsfZsmMG685dfUVishjImyZ4311uhjsZr5rNSt6Fl+rxbeoPSyumH6z+K/X6Owdfmh+kreOf6 A23zZ6sw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tM6ml-000000047Hq-2IRI; Fri, 13 Dec 2024 14:36:55 +0000 Received: from mail-dbaeur03on20606.outbound.protection.outlook.com ([2a01:111:f403:260d::606] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tM6ZY-000000041iz-02dU for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2024 14:23:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=veXNEt9C4UNgHhQJac1ekhwRpJXfamw7i4doxUn8D1NUZFm1pprnhk1jkGdBxekGW6ycbUQvKrDUyyO5wfo0uM3QNfVWwutljzhxoiCzISZkrohEgA5NVFr6gQ4LSs6MSgfRoRqKyaKu+xdqpQS9/zZsDEp9bP6A5mVFMjgM9cGsCz48EfM9AsMs4+ygBJG+E0n4hJJgDMD2sefSJfaM2bR2Nh/utcEr5VTaS6qlmqPAViPNWB703xQiQ22sowLx1WqaK9a+Wf7h4wgjwU3aUolQj4tFw15L+pgN06/XCHpT1c+H00oxSdG/m1PcIbSbIAFTw03oOI0hjCdRFaDoQg== 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=222dzC2vXjpjjGgcZahcdE9bxHdHlBOazA7qMVDBJrU=; b=vWPR19KmzEEggDMDuKZxH0M5s9O/85YklfhVa3hmblQ/F4ZL9IIcOS5MXFWDBhNgcJuhPzI7PK33xmclvPioZ+PGpEuHLgoL3TK6/Ey550rV+CN+p1ipPo55GR2F6IO3MWWbBJymtg+vT7LOmLs3AQ1vZxpkuizBZGY0wzntAtLw28i83+XrITlSFFCL4e6YblFnI7L+UGIhYLWlOx1uLAtK/fkZ3UQaPZ+QivBOvhj9GHXsmEsVz5g1RtMgBmC3JTKQl7XkHCZxizhYixqsyae2Q8omdPPGv1BELOCbAvNl5+hsHCojudGgZrfg8mkyFCtDeZIWlExYmr/JMKNZOg== 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=222dzC2vXjpjjGgcZahcdE9bxHdHlBOazA7qMVDBJrU=; b=NVwSY/dKC4/DCO9oDJeXKhV02hdgfIdNOpTDNpR9oJ5L/Z75iq/RnQZZMAfcIOJV5v8VVEhn71vkNiYF3sD8ogGIch1DVjB3P7kJymoR97ufQNtdLfWTOfI1DH0KBd06qK13ezZEoXuGB/5Kta1V1nsSOT8j1zfALPQtxU0wPIm7REAjl6HN+ks1h2/PnTs5QRgnHe2YrYjTyFXmIWcfIKy+x7FyPYLd5ulfFwGBMSbzH9Dv9ulm2vFU3+OhW9KDjcMsZzAywdRqeAVv1s1/I07iIVwbJcyiVc019mnEBKiEsTk1mRCwHvrophFs3xkxSRxMhF9Xd4P3pol9aOXAhA== 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 AS8PR04MB8037.eurprd04.prod.outlook.com (2603:10a6:20b:2ac::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Fri, 13 Dec 2024 14:23:01 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%2]) with mapi id 15.20.8251.008; Fri, 13 Dec 2024 14:23:01 +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 v2] arm64: dts: s32g: add I2C support Date: Fri, 13 Dec 2024 16:22:50 +0200 Message-ID: <20241213142250.2532559-1-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 X-ClientProxiedBy: AM9P193CA0016.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:21e::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_|AS8PR04MB8037:EE_ X-MS-Office365-Filtering-Correlation-Id: 4592bea3-53c1-496d-cb38-08dd1b81a677 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|1800799024|7416014|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?q?b0zCxoYfVlle+OURcxykoRp/2JjdYZb?= =?utf-8?q?4gXZlLZqxaDGcMaJE73+xukC7/aSGyXUfBnQBOyLNTqhDGL/LZ5/xDE/R0de9h5CS?= =?utf-8?q?OWCVQ2H6m+Yp5MAskCdT3GaodApd9zaO4BQIfkvS0bzDJhq1q8kcuQDQiKfgaM1Hh?= =?utf-8?q?To9h4LaszQ27GnzbRMJRq9O+oSrH7oC9qPxHRkN0obKflFTixlV5oqnUYRYQOuYAE?= =?utf-8?q?BBjZr7kyxsyKchmMN6Y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Z/l+nDoHyp4/o8dzDTp4Ad5u+T5s0TZOX7xLgwIMJKAs/b?= =?utf-8?q?k0vY60C3anty47WIaQf7zOANfZh6bC2z9PCkM1Y7wt7v4gF7aJ9ZBlVeMiQEsdZbF?= =?utf-8?q?oIdrQGlUekrPZSD7eRXrHBwsBLCPHQ4L9kmbmz52POLzFUBADwdxrYzcstv9efTrG?= =?utf-8?q?fpixfjwCe1qqKkED1Og9LtR8bccbOdQcatQ=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)(1800799024)(7416014)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mPEN7ZGzWSPdYW7OepmCySBVD/Q0?= =?utf-8?q?aRsiXz+qaSG6vCFf/HN1BlID84lFbo83ZPir8WkHuuuGH0jn6exvmNqLi4wl4A2m8?= =?utf-8?q?yajlddtBpwAqS2limzcuSX82NQtIIW4E4NAIZM3r+A2Pau2cC8rcwlWA+iq9TpaGA?= =?utf-8?q?TXe9vrF92E/B/fZlIeUOZ/eeZAmbJTxJYBW1hgheNxH0n6PtuuCm3ZK84n7+TLLvu?= =?utf-8?q?ngnrxXp/W3hPIXAK7tc4heBgMNwiAPH/HhoHShSY9Bw9qJ4LKqJqvVOleJ2IdJRMp?= =?utf-8?q?nVdYnJWLT543ESvK3GqbwT7xMbZL8l7pIeQlwUj04y/zBNzFwRzGFIeZtkhQn+dJg?= =?utf-8?q?5fx8FE7TaT2Ta738oGkmCOeqVqGkIQj2ZQ24IzIAkSuRuvHfa59ABVEfqAFBeDnX6?= =?utf-8?q?J+vjLVco9ZERXKOzojtQ3JtelkXcIiIKMC7f//Naebb+F149WeARbv1UtScQ09wPC?= =?utf-8?q?knaL1t+OLQxdXw+a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b8MNCZhk5hc8bY/40yKo/Wuatj/OR3zu0Qkz/U5+WYn1Fb4Zu0gdDnuOIeEA/J/?= =?utf-8?q?RfE4/GKPuKPBAoc0J/Pc+D2cQZ8QL80LQOuH3FcmmGlDyyyJHxnSzn9Lk0h9FyRdo?= =?utf-8?q?tJGJWEq8O9zy/j8F6MxbYoile9n6vSxjsxQKuip5qkR96h8w1lkUonvx5jRD8H66b?= =?utf-8?q?xoCs1fmNBqCEs1j9H445p7e/54llvNiOaw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4592bea3-53c1-496d-cb38-08dd1b81a677 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2024 14:23:01.6426 (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: Q83cU0Kdm8y04G83byD4N+roU35m/JH0ZVvqY0uDkBDwswF5JfxE584USMlh6e2U5uu6HulguriXN4jB6F5qK0dPPby7RsgAg2vsD9J4miU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8037 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241213_062316_202798_E7571B87 X-CRM114-Status: GOOD ( 11.41 ) 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 | 9 ++ .../boot/dts/freescale/s32gxxxa-evb.dtsi | 150 ++++++++++++++++++ .../boot/dts/freescale/s32gxxxa-rdb.dtsi | 126 +++++++++++++++ 7 files changed, 382 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..5f8739c068c6 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,14 @@ &uart1 { status = "okay"; }; +&i2c4 { + 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..50fe6aaa1605 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/s32gxxxa-rdb.dtsi @@ -0,0 +1,126 @@ +// 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 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default", "gpio"; + pinctrl-0 = <&i2c4_pins>; + pinctrl-1 = <&i2c4_gpio_pins>; + status = "okay"; +};