From patchwork Thu Sep 26 14:31:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13813423 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 74659CDE00B for ; Thu, 26 Sep 2024 14:35:43 +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:References:In-Reply-To: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:List-Owner; bh=HEHYVemPzQDfpMdhfbuzyQ4zV5E9zOILEQA8q0JwEiU=; b=n6PY6768ZdL3bCTpVR2WM+LDAQ DqVQiJ8qe2sbj6riewn6dAoXTKAToUIrB00VSc8MGCHu5hq2Rz3CbkoBEODF1W0Rkxpcab4uvaO1v yJTbT1rwzJMQVuT5Le+jdgbeL6i57vYEB+8NBwT3w9k9zsEGkJ5ZzbMVkOwHY22ZKwMNpIw7EvRkB 2UFUWcN3ki3/RG2htbx9LvqDL3mOL2RglWWP29QtP2InlWpF5o6/NdAJD6SvioQCd8erFhAZjEJCT Yx8Y34JUvKq6HD4y/u5YLU+f7oAOg4V0mwTYpPUTDfFwIeyS8G8SBsKSBrnnTD9Xf7QT6Tit+VKcP ma+PJ3Vw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stpaf-00000008cZv-2Qa4; Thu, 26 Sep 2024 14:35:33 +0000 Received: from mail-db5eur02on20603.outbound.protection.outlook.com ([2a01:111:f403:2608::603] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stpXJ-00000008btR-0GT0 for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 14:32:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EE7p91owIunjYham61i3wuc8vLQkJ06ENzIwjCdD33i3X5/rI1g6Wd7RbecOFy80KxxDj1ehELI+8qM4TcdG0EwB4rDWXcXpCYPtaylzBLQMqt7XQoLxFLurRJuCMeoMo6z30U9ahhCWSpwLMCN5qnUu9IE2C4sNtsQznGjUpaXwypjxor67aQsN0Zn9Mb4wPvdcMUdZxtjSPqnAFP3a7awIB/FXid3uilteGUa2fE0U/SwWejQ55Q9ZwcyT4BQ6WtobBDLjZDG5enMNjQRw2irhXHWl/pclFsBHOBT78JojvCf5NDVAWj91e9TFi4Hr6BI26q4EiOta1EQlesXB4Q== 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=HEHYVemPzQDfpMdhfbuzyQ4zV5E9zOILEQA8q0JwEiU=; b=b/KSQwKbycKb8HI8OSkpvNTv6PgipAqoVxUPG+i8Al7AriwjDWdpOI37ZEoZfZ4iokIdK1wKSfey2tYaig/639fyMHYkqzMcAHg98T/Jna9cpdQEaMN8JgqPbzzGIglQvI+0ZIN/9uq81yr7PEI/2CbSF14E7t2/lonjZHcPIyuMgDrZIwfbv1CnR5YlBr5YBk+4wRAQBhde2ua0vq9f+V1qXkPPPtIj+FFqpePQK5PR6e3ykdGreuJ5HnwfsyZDxp+uTLUraIvLYkvXvjTW8OXQOTbQw7Kj1eu+x/bS7f2Mj+NYCMOxOu1wEAqGcI9bs1GYQsmYsxSNqljoj1nrNQ== 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=HEHYVemPzQDfpMdhfbuzyQ4zV5E9zOILEQA8q0JwEiU=; b=JRC5ROS7l8dw/uBRp8lwMgaoZZ13ZLmkTikgpHQXwEod/eKLJNw0clX9m5V8ZPrc72/GrGt2qzJFQe0yoQ0EoJLmmlQR3XpEB2QLrd9uCQSK7V1Hu0zT+I+KyEnQ1fAhFQwO/LUEUR55u1FVPiRFa1T/yEHpgcnYQ41kS38EchyWjcK00XrP4elCDDl2BkdZCJ/+iICFNoZbMwW6rNOxG8i0Q4p9WvjSQOh0oL7xbw63eZzj8Cg6rVxsYZND4MRlR463cRwes5sIBP/L8BeWFtXxxXDpln/D/A2QLPd1ef7d0UQxXvyKf9ovYfY3wkpjnNDhurs0NRSTLdY+9dJgTw== 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 GV1PR04MB10485.eurprd04.prod.outlook.com (2603:10a6:150:1d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Thu, 26 Sep 2024 14:31:49 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%5]) with mapi id 15.20.7962.022; Thu, 26 Sep 2024 14:31:49 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Greg Kroah-Hartman , "Rafael J. Wysocki" 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 , Andrei Stefanescu , Krzysztof Kozlowski Subject: [PATCH v4 1/4] drivers: provide devm_platform_get_and_ioremap_resource_byname() Date: Thu, 26 Sep 2024 17:31:18 +0300 Message-ID: <20240926143122.1385658-2-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> References: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0101.eurprd02.prod.outlook.com (2603:10a6:208:154::42) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8487:EE_|GV1PR04MB10485:EE_ X-MS-Office365-Filtering-Correlation-Id: b47601cf-143f-4d45-3fa9-08dcde37f4e7 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|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Zx6ZfeX0HAv4FYokkZz+IoQaskERXS8?= =?utf-8?q?RyNGhU5EOMiQG0BNYqAwrVwfp/cUcRZDZNJjILDEezTKiMef7CTonQOhko7pNMGpW?= =?utf-8?q?bkojXFFTdiqF6l6z16LvvNHH4P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rc8ofuFaOv10ewlTkeIjD55YOiVof5Wt2WFTim+fdMpafRFW?= =?utf-8?q?G9f14Z6tDYG20me7AwjlijI+lpj2MdHWPi4t2oHkvqejrk7u455aWX9rBgFJpxOMJ?= =?utf-8?q?FOmX2uHQZ21JTpGvNkn9r1ULDON13gbuTBGE48UvGQCmUXdDZnhKHL75cWzGWVSFr?= =?utf-8?q?Sqd7TI774+I0yOsWjW9m5PwdnL5Wb8yCvayehDft66T7YpOeybpjldBprCm6AdEja?= =?utf-8?q?BtSvoqjphXX8y8LqI4o2IUfi+R1xep2BR/mYgtMsivAWug+dqkPAXz/X8sjDAcW/5?= =?utf-8?q?2TZP0tbSUejWPJRrhfNtx3yXs/GWFU35T+vEbzB/XkMbwxDr6hvd21TRrLachQWg+?= =?utf-8?q?ISMwBEAVQc6L+GTkoeLgl6YVdsmEarqS2Q=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)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1h230QhbSjY9seyc8kM7deinIEGI?= =?utf-8?q?xS/dCstWsXDRhFSzyCkYlUWf4FisRnqRxZ3d1YUXb4vpOm4GCuu0C25rkLdX4Y61k?= =?utf-8?q?DuzJUraOn9ClZvPqNgOcwg8fx0wKH8qx0ItQv8BaXlR+4PDnQ3VL0WnhOKajIqRuN?= =?utf-8?q?BWdWLdzDKGpfUeUULdz2ZRJ3flUbeQQ/yocpV6wSYzi7rRFxiK9DwZUVVx0ulGJdD?= =?utf-8?q?pfUK3kGAAPWupuwf/uFmX9BN/gM4G4PeSRK4c870/oFyTYysBSPiMRWfXy/tKxSNw?= =?utf-8?q?gjkP9b7ysQmtjyq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6KmwB2sdWAlZwNXc0W0ZalJXRIEjME/IkL4zhZubjtAvKI6mJuRyZvk/?= =?utf-8?q?PD/MZb5zmiem7vEGK7HB3h9X9Ji0K6+1BUtkA4dc6QQkaw0/2d4p9JHCuC6wJ7xdG?= =?utf-8?q?lqk/n1+ehUKA6o/zH2Gxeu1lqxRI9rgQ88wnkstA6+sIz+UqRsGR+v8O8LMH/mpJ5?= =?utf-8?q?n7a16JkemWyHMGtxxeB1jarFp/M4lHxm0SKAesxn8bg4wfCWBp4ATY/9k21EfnURY?= =?utf-8?q?9XpkLEOjM95Z7XegSinNzqKQsPq9FWdN6bWdurcHeOsIB6sUroHbIJ+cpauzhgb/C?= =?utf-8?q?v0XpJ6WfXQZoQU4V7tc4AV+tQ0T9JOhUVmkmW+hg81CBSdamM9uDHDlinIESnibCq?= =?utf-8?q?+n6+3SR37bDajV+TbQNi7fhmK3Q/pwI7Fg=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b47601cf-143f-4d45-3fa9-08dcde37f4e7 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2024 14:31:49.5412 (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: J6dh7ApVk6bfBmGDmHtAMwk8x3rRxVQF1grl/stalq3eiNF0ugYzF132S8l0HrqTXuN2MYqF/P0q2UyXpw651TxAI5S2AI+zuKiOf7vXoLU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10485 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_073205_135204_231E9C00 X-CRM114-Status: GOOD ( 14.42 ) 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 Similar to commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()") add a wrapper for "platform_get_resource_byname" and "devm_ioremap_resource". This new wrapper also returns the resource, if any, via a pointer. Suggested-by: Krzysztof Kozlowski Reviewed-by: Matthias Brugger Signed-off-by: Andrei Stefanescu --- drivers/base/platform.c | 27 +++++++++++++++++++++++++++ include/linux/platform_device.h | 13 +++++++++++++ 2 files changed, 40 insertions(+) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4c3ee6521ba5..da6827f9462a 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -108,6 +108,33 @@ devm_platform_get_and_ioremap_resource(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(devm_platform_get_and_ioremap_resource); +/** + * devm_platform_get_and_ioremap_resource_byname - call devm_ioremap_resource() + * for a platform device and get + * a resource by its name + * + * @pdev: platform device to use both for memory resource lookup as well as + * resource management + * @name: resource name + * @res: optional output parameter to store a pointer to the obtained resource. + * + * Return: a pointer to the remapped memory or an ERR_PTR() encoded error code + * on failure. + */ +void __iomem * +devm_platform_get_and_ioremap_resource_byname(struct platform_device *pdev, + const char *name, + struct resource **res) +{ + struct resource *r; + + r = platform_get_resource_byname(pdev, IORESOURCE_MEM, name); + if (res) + *res = r; + return devm_ioremap_resource(&pdev->dev, r); +} +EXPORT_SYMBOL_GPL(devm_platform_get_and_ioremap_resource_byname); + /** * devm_platform_ioremap_resource - call devm_ioremap_resource() for a platform * device diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index d422db6eec63..ab7f33f3c426 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -68,6 +68,12 @@ platform_find_device_by_driver(struct device *start, extern void __iomem * devm_platform_get_and_ioremap_resource(struct platform_device *pdev, unsigned int index, struct resource **res); + +extern void __iomem * +devm_platform_get_and_ioremap_resource_byname(struct platform_device *pdev, + const char *name, + struct resource **res); + extern void __iomem * devm_platform_ioremap_resource(struct platform_device *pdev, unsigned int index); @@ -83,6 +89,13 @@ devm_platform_get_and_ioremap_resource(struct platform_device *pdev, return ERR_PTR(-EINVAL); } +static inline void __iomem * +devm_platform_get_and_ioremap_resource_byname(struct platform_device *pdev, + const char *name, + struct resource **res) +{ + return ERR_PTR(-EINVAL); +} static inline void __iomem * devm_platform_ioremap_resource(struct platform_device *pdev, From patchwork Thu Sep 26 14:31:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13813424 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 761ACCDE00D for ; Thu, 26 Sep 2024 14:36:59 +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:References:In-Reply-To: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:List-Owner; bh=adzHJ1u+haq0OopMnC/hgMBYg+qqVAhJEhzx5nEN5VI=; b=ZIHTN1I9M7RrI4xdbYfeLzAkMH /zLKmwqAZ3g0+wVVsJScwBnBD4bO/Ij8ZjnLzpd63FbVu/A8JmdYy9gQk3cB8iZAWNFcytjANlQzZ t1TsGcQzw0rKIA2s/CqsYvlvFsBg7+d4/XVLP8dQlXICg0G/NEyxfOQ9l5bjvQ6zbneX+bav/3RU9 cRx2WzyJCWYgJl/3nKpM7Y0zl2sv/KGmbi7gFpaup/PsB65mYB6Mo3JS8iMaeLrc9EgiVwqs2AHUp +rAGZfeTXEjggZ0N+hrRMx3cqaqT14Pa1U+GFesFR0Dno/YcycSdDeLZbONaa7N63/ZyAuNcbrMWu e2S+0tWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stpbp-00000008cnC-25qg; Thu, 26 Sep 2024 14:36:45 +0000 Received: from mail-db5eur02on20603.outbound.protection.outlook.com ([2a01:111:f403:2608::603] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stpXK-00000008btR-3SFa for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 14:32:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZEAXzThOUDLN8qRXLWhOjNlLQfMU4l2QNVAZEWYF2oiYy7Cvo5XvhCi6DRSZrPaDRaC252FHiuSqwk1zCk7mbzWvRGNL3ooc3ZOcl/lwaSU5XsXLmIK7DokTvrCJOjvPu0smGaXVBOIgE6PqcJgS40sHom4WyaFMxLMB84AEIs8gr3F7/LfsSYBr3HRK6n30Admk8YIU03l2jAAkCIN3JDjTwvk4TDKZ3EZImJTYDAvMhBoHVg6tQ6Wb6VX/4CDcxfSFBMQC8qtPhaUnxlo4kywAUnV4B7g2vaqT7+dKyzF5966sOuyTQz0GIULIQNYmPze68TR9zdXylW78qR1juw== 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=adzHJ1u+haq0OopMnC/hgMBYg+qqVAhJEhzx5nEN5VI=; b=Do3h+e2DgQAyFi8wJY10VNYpkRoinPp8kYLGULknSkFOSLPFJWFjnrxUaWBP8rVmOq8b48RiPmYmRs0Bksrw6DO0+qAoFB8ngV64zdzhHwWhgEyGh3Vfw1H8KgGnZFao8WNdeKgY7ra61QB0Ab3iZ2hIhVmUukNiK1M+4799Ou1oomCxwlmmMCT27rirxPFt0HOkl/QcBVtyyMcG6uwnG85CtmcHDGsBq6zQLd2SgXsvhzd+MPst84K+B/rFY4Mh1VG+Ivvxr5UyuW7Cci9ppcffCs6Angy3MCx3nufVHNEiBhFky3T6drZZ2bIytNXAPUO8U8zEeeZmNax/TtjXog== 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=adzHJ1u+haq0OopMnC/hgMBYg+qqVAhJEhzx5nEN5VI=; b=ng/5ItqxOWvq1qiDURaeChZ9LqDrpzZnwRarVBzYc1RuG39q8iOmwD4to28Cd/wK/8JlfPdQLwqPm1Akcfqcb+G8JWBlFcquUYykZFjZgteT13uu/k8S//GAeg/6h95xlEvYdQTkZGeStEkQHDdyEap5KogatfG1CUGpWrae2U6vy1Hv/Kx4euxHcTysTpPhA3lNWXewt2u9KjI3MzmE97r3zjX8s73mc7UlRgGcRgDT8Kn2Qcrj9WosmPqWGOr3q0jkVxyiSfvSlvOmlRWMliMh+2Uv1/D18EFPaE7lp13iQAQBJWWWOPzgmvDSTrrqKSZ9Idd3YlAD5WiuecHTbw== 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 GV1PR04MB10485.eurprd04.prod.outlook.com (2603:10a6:150:1d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Thu, 26 Sep 2024 14:31:52 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%5]) with mapi id 15.20.7962.022; Thu, 26 Sep 2024 14:31:52 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Greg Kroah-Hartman , "Rafael J. Wysocki" 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 , Andrei Stefanescu Subject: [PATCH v4 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs Date: Thu, 26 Sep 2024 17:31:19 +0300 Message-ID: <20240926143122.1385658-3-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> References: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0101.eurprd02.prod.outlook.com (2603:10a6:208:154::42) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8487:EE_|GV1PR04MB10485:EE_ X-MS-Office365-Filtering-Correlation-Id: 529dfb3d-41d8-4c50-ea2c-08dcde37f65f 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|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?n5Jjwy0tlhuLtOMKjG7lSOFlFqTL1+i?= =?utf-8?q?RkPzcPfczITkAjeH8TWP0/MdwU1xjoyqXTLXAQaRFD6u07sAzyI1v/FDxYPtdP0yH?= =?utf-8?q?mS+616C7uTmZDm/fmqcVKGRpKWwiyWL9Gb2h9zaspqNHAut5acUzQ9CEuoc9reWAv?= =?utf-8?q?e+XUBBemJ7dnz5zMqw/L1j6z+Bffs6XENUyym1J7PC90ZCAxPEQi4QgAWWl0aCjtK?= =?utf-8?q?O0ulqgyfiRHdiiJ4OIe4zYan2wu65aN13cpSGOlCpam9wCMWswWEN1pdIh1f7xxd2?= =?utf-8?q?XuPjwXh3LUiX/ONa0fqlP70aM1RZB92vFLhW/QTDn2uODUuTYmAqmvf9arDDDOadD?= =?utf-8?q?qU8uFlz0hg4n1TVCgVcFO66ArtARsVp5Y848T0mQ7BC1uwbu/OTSHJTNUHd6mK7JZ?= =?utf-8?q?VL1Zw39FFb7jbs9QptlaNvokzceOg+pOqvE9qFgnaVzJFkt2uAra4lUwUCJPVUV6B?= =?utf-8?q?W5FiUgUYavpw5emY8BE8oBxLMHhGhUMSW4ejWt9dXPd+WXVE/eOAy06x5g1PioOq5?= =?utf-8?q?+4MKnL8OwB5F3t9CbS0NohuUHL0BqsNJbSQt6CKN7Y3w7D2I/lM2S0vNewzBeO/l0?= =?utf-8?q?heqOFxY23sK6x3/N3gEbM8Jdfku05IffBwSGCWZC+N4Q73tDLQRyv3YaNYDMRhneQ?= =?utf-8?q?BXpldccUh3+0/13IcRx7JU/PkAuu8eU2CZZ/BTmMfI0edtRT8hFz1nTXFevEHH/sJ?= =?utf-8?q?XwYG7XqD24A8Z/zPWqqK8WzKmDipFQ6cPI0u0CFKoeFata6No8M1NkAfZ/Lsw1KbL?= =?utf-8?q?2+9NL5fJMSL0/leQLXKKp1+yNiBI1bmabDyd5+0hs4OhTTT8XVp58tFMcQDMH5kac?= =?utf-8?q?Bq+pns3lLWltIVmjomMBbXAGRaav/BAc6zfVzy7sPatBVJe0CrLvDnF42w9AxNdGC?= =?utf-8?q?3QJOfCmU1HEcXWOUH/lZe+3EeGNS3NA6h5fDHJxa6wG6VSTnTdhTIuVxmO1lmXWYl?= =?utf-8?q?iKCVBQeFZFqhKOSAU81y0WMNMQrlGjQj23Ccc5t8UXW6RU1WzveA0jQjr0JqiIqxE?= =?utf-8?q?55IbW+OiQcGNvZo8lZTpcD6o42Q4ZJ2m2lmWPi+7qeBs/yMm7WJGOo6II2C/o7Xes?= =?utf-8?q?uvELg5ZbPSzjrcF9gFrhbWiGMuHFFKpf43V7DUn860ZQrOZu3B7bGx2/7VNQVKiSw?= =?utf-8?q?Rko7IbhEe/TKbA/j0aAZb6jDQ0r8RuX6fu0chW3hu0Utv8p0O1c+84uX1K98XDsUn?= =?utf-8?q?Kx57Tq67Sk/yfCw9h7FtMFrfuIsngzIRRvjSo6DWN75MAiiRCLE1pD1CqRichbqDQ?= =?utf-8?q?gPjgjvYg0L/a1hb3qKXvsaTkW8KD2fsWUNpNXeW9EmaxfTD+4g1g7vlAhXK11+d4M?= =?utf-8?q?b4+JoYBP92tdJhW4nA5PJQvY2lEOAEkaqFA5fK3g4+FvB/CHQ51wnbE=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)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 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pgY3FeMhTwnSvP5STd8/uxcJTQHOkhcUoO07/Ke3Qpr6uelHsOpPGNEsK?= =?utf-8?q?9PAirjs889Evth+PdMvAoF5zEn5Wuzov+v5cFQ22KhZs0k4pn2Sa4TAoAfAqP15E6?= =?utf-8?q?ebSrjPZv0fyknt86onfhCJLXElGOtU0tSm3+a6PMK16fIAJau/gUF3lIuNIjqcbgr?= =?utf-8?q?vrqjp6mVYFQyw4pCcTqBmj7YvM6i4+fvhNv+mQzr20YaQA767qhHip21E/UqdxxXi?= =?utf-8?q?mJgu34X6UEOaIuAuG1fYYpJ7Nfod+Uri6w3XEvLl2mETFm/wPJnJ1RdhsPK/evUJh?= =?utf-8?q?KIrrvbjCMPMRdreWelk+Vk9i4ll3qtKOhpCheNew8XTdFImwCgdW/5TJp8nwuR5A7?= =?utf-8?q?4DVSumSWmOhsMwcRZk37fclz6ccMjSJLEaL6Kg4D98bGbeMhet/qvZt3cn49n6h1L?= =?utf-8?q?Ejc+FgTlaqEiRKYDtUD2nC2fzMBdHsrEpabIAto0yDI06CA6ZYJ8ctGc1Tsrjm3UF?= =?utf-8?q?TAaW/Pv14Cp/CepvC5ZVMlYSYxZy5hQGvMMXXVUYw889dKuqd+kElcfnszm8EaCjJ?= =?utf-8?q?7wSEBCXXv8bFBMY2gQKox86c94/T5CVQaWZO5uLOetR3ZT4VKVGo5XRMOTreO4T+F?= =?utf-8?q?pC8X4dzh8RCP27sws/beYcJSirSjaqK85E77H43axagkyhb77CuFhO17r4grWdQaM?= =?utf-8?q?253czWpCIc2bGOdEhTZjukmTTXN756p8oQ=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 529dfb3d-41d8-4c50-ea2c-08dcde37f65f X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2024 14:31:51.9238 (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: PUW2VS0RayO2Sef/gkdBcjMuMmzoCsmkngcvxIMchyFufrU/dJJn1+aUeMOw6GJXGXuBJ/0r8qYfxUbZpOOhkcxBIhl9CQ3B4GeSZ/VRr5c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10485 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_073207_018569_BE9E8E90 X-CRM114-Status: GOOD ( 16.09 ) 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 Add support for the GPIO driver of the NXP S32G2/S32G3 SoCs. Signed-off-by: Phu Luu An Signed-off-by: Larisa Grigore Signed-off-by: Ghennadi Procopciuc Signed-off-by: Andrei Stefanescu Signed-off-by: Phu Luu An Signed-off-by: Larisa Grigore Signed-off-by: Ghennadi Procopciuc Signed-off-by: Andrei Stefanescu --- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml diff --git a/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml b/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml new file mode 100644 index 000000000000..4556505ee9c9 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +# Copyright 2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,s32g2-siul2-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32G2 SIUL2 GPIO controller + +maintainers: + - Ghennadi Procopciuc + - Larisa Grigore + - Andrei Stefanescu + +description: + Support for the SIUL2 GPIOs found on the S32G2 and S32G3 + chips. It includes an IRQ controller for all pins which have + an EIRQ associated. + +properties: + compatible: + oneOf: + - const: nxp,s32g2-siul2-gpio + - items: + - const: nxp,s32g3-siul2-gpio + - const: nxp,s32g2-siul2-gpio + + reg: + items: + - description: PGPDO (output value) registers for SIUL2_0 + - description: PGPDO (output value) registers for SIUL2_1 + - description: PGPDI (input value) registers for SIUL2_0 + - description: PGPDI (input value) registers for SIUL2_1 + - description: EIRQ (interrupt) configuration registers from SIUL2_1 + - description: EIRQ IMCR registers for interrupt muxing between pads + + reg-names: + items: + - const: opads0 + - const: opads1 + - const: ipads0 + - const: ipads1 + - const: eirqs + - const: eirq-imcrs + + gpio-controller: true + + '#gpio-cells': + const: 2 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + gpio-ranges: + minItems: 2 + maxItems: 2 + + gpio-reserved-ranges: + minItems: 2 + +patternProperties: + "-hog(-[0-9]+)?$": + required: + - gpio-hog + +required: + - compatible + - reg + - reg-names + - gpio-controller + - "#gpio-cells" + - gpio-ranges + - gpio-reserved-ranges + - interrupts + - interrupt-controller + - "#interrupt-cells" + +additionalProperties: false + +examples: + - | + #include + #include + + gpio@4009d700 { + compatible = "nxp,s32g2-siul2-gpio"; + reg = <0x4009d700 0x10>, + <0x44011700 0x18>, + <0x4009d740 0x10>, + <0x44011740 0x18>, + <0x44010010 0xb4>, + <0x44011078 0x80>; + reg-names = "opads0", "opads1", "ipads0", + "ipads1", "eirqs", "eirq-imcrs"; + gpio-controller; + #gpio-cells = <2>; + /* GPIO 0-101 */ + gpio-ranges = <&pinctrl 0 0 102>, + /* GPIO 112-190 */ + <&pinctrl 112 112 79>; + gpio-reserved-ranges = <102 10>, <123 21>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <2>; + }; From patchwork Thu Sep 26 14:31:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13813425 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 2A5A8CDE00D for ; Thu, 26 Sep 2024 14:38: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:References:In-Reply-To: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:List-Owner; bh=Yhl0SuY9l/7AQdpfne3J5b4/aU7cNlKV/TWXWcyG85U=; b=RJ1k08lKw2E78jv8AtUBmFncSE olH/ja4uEuiYWmvOZaGMa8xpVFQRyl0fiKT7nriJeSmDwzd4DcdJoKnwWm+OZzCXTFbNhKmO+6hRK +9Mw8Z2EiPJpzbY5725O9dsVEI6PQNjcCSYQZKmFfN0HdkPaelvK9KjTwPEuJozcwO3hqawNasCgt Y3XUSZj821Zd/7mi1h3j6FxVHMe/OWe3xEz3OfgESn+TkcVPX71/bREpLG/mtoGFcbldUtFK+mnIR SA0muEhyIav9yK2rdjiR2HzIE6XN+TtFDy9McoS+au9X49yzXPsWwIT97RhlD0IzVNFbdVicjewNP 7ubPgY2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stpcy-00000008cvM-0tGt; Thu, 26 Sep 2024 14:37:56 +0000 Received: from mail-db5eur02on20603.outbound.protection.outlook.com ([2a01:111:f403:2608::603] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stpXN-00000008btR-1hAc for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 14:32:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ES9AOA+FIi4v4QUFVfvrH9Eq0aeAe20G+6LazsyjBWhp51PcrOrct4lmoWhqaAxibkJpFlLn2Agrfni0wPJHn4UT+ZEp0/SmIDIvUkX1RdeBx439msZUNzsHqIdF7dgPaxbQYsu4B1fzvosGpXi7CyRA5Q4qMTMUGTUZmMiK5NtZd/mhmPtyxC1XCc+4okUR4+HP9o+LxcuOdj7x4NcY9NjmS946K9nTAUjTGnzq5eCXsEvs+PgmeJexYXKLU+NMKF37Q4IO4vBbKWh/7w18Q2OKnifru95letQRpgXFs0Z74WAh8icrcd1SlRiXvJlwj9Vv4ATfuupufS0s+RgmzQ== 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=Yhl0SuY9l/7AQdpfne3J5b4/aU7cNlKV/TWXWcyG85U=; b=Z0OYgCBxCwEjRbvuCeXHeFBfI1THzLYlClEbzy1YLx8l7B45pxa/IWcmS0jzZrLts8zQ/Pm4YciGp29rqzK+DLl5j+qvWZoDyKnJx1GapIKNOgs+AN2OJPscYhJpDcbWs9avZs8e+J/GcDZ4DWR3o+0Na0cHMft004lKBX1x7xtj3t0j07Lv9bzIN6EC/bj9OKwmq/YIb96grQurGuZt1PzIDCTcNRwpE8Qg8Az/U98lC7ulbcIxUy82/f/usNKEL93Oz23plcaSv0Idjt49bqkg2QYxvStEXubn/DVY5MvrBnpOewsLsOQ73Scv+FzvUOV3OL2Yoe9x7UbvHqwuYQ== 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=Yhl0SuY9l/7AQdpfne3J5b4/aU7cNlKV/TWXWcyG85U=; b=Zp4HPmk4qznIfCLL5FUoRyoZdsQ03KHLUZhVn0EGKQkiqfD++Wesd1yP8WnqyF4cAr7ffPZUCPV7mYfybb8WoWv6Ex6Vn2HXIKlvPILDl9wJ3LcMRq48ae4UbPaHy9cevGTbGDIB86luhgG8XtAp6nlzTUd6oZeswEFF+ptbxc7H6ulQS3hEoZGm+kjjgNWavW0sYSIgbQFkU8RyMuZq4e2ZSQ1CiqgRFH3/4idx3y2KzaraC5ipB0jWKI8eL1nU65CRgeIzTlUULm5pI213qAl2UHnCJYojlICkXGyLXlN4bPyt0d84it27HYXdD8N6YpQv7J66yI5p3faxm1Wpvg== 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 GV1PR04MB10485.eurprd04.prod.outlook.com (2603:10a6:150:1d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Thu, 26 Sep 2024 14:31:54 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%5]) with mapi id 15.20.7962.022; Thu, 26 Sep 2024 14:31:54 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Greg Kroah-Hartman , "Rafael J. Wysocki" 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 , Andrei Stefanescu Subject: [PATCH v4 3/4] gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support Date: Thu, 26 Sep 2024 17:31:20 +0300 Message-ID: <20240926143122.1385658-4-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> References: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0101.eurprd02.prod.outlook.com (2603:10a6:208:154::42) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8487:EE_|GV1PR04MB10485:EE_ X-MS-Office365-Filtering-Correlation-Id: b0e7123e-929a-4f40-5a4f-08dcde37f79d 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|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?jMX3PBBEBNSgYiGhIJr7W7baPak3JoN?= =?utf-8?q?jH9NgZKO2w4Xw10V3BZkoDBB5BW17riI80tQ0zUIol09g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RILCe/sP2D9KlL+mv6WqXFBHss9V8SH?= =?utf-8?q?CKk5cSSuOd0xjNPxjN6MMzH1EZOSl08rHBFpR/JrCsW4Wa4LkvUgYH34ox22JTudj?= =?utf-8?q?87XgBJU5W9AEY9IkRtlj0EFhQ0iZxQwB/18SctQMPOurRjMDua3+XMZz4Mzi55Y06?= =?utf-8?q?bkP0B/gzyhFuU8DvWRinKNuJYSPoQc7YbAIl14hAh8jBBARBb9uliQZy7Y7nfHoXX?= =?utf-8?q?RylnYI1tSE1mHvgfylzO+VDZtoPOuGKr9kf/gkqD5OvYJuAWjbJ/jh1WBHKdAsx8v?= =?utf-8?q?47csN+mP6vSArMBu1qRNIV7hiSDIFwtcCZYLFI9BVgKBhS+tSOey1mmuSRwPz3wUH?= =?utf-8?q?OzDF1CtsX71Z1GmZE/5OeBOPis8hgG5azu+vQ4y8ShywyRQfpeU1xXUE/sWJTyPKm?= =?utf-8?q?y+zt42V2PNKDXFuQudc/VGDQFHuI6ilAug=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)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CBKo9l9WzVrus6GsNH9KPDBYF3yf?= =?utf-8?q?4BgcZi+or7iGdhu5Cg6NnsuC5srcxZWu+wCN1fTcbJPF1ZUcfy6O1Z9mbmTiYL0cQ?= =?utf-8?q?ACnRvkCY4aTXvymJtKPjlrGBpYXrBKeje0DP9XiQKg8cAaFCB3Rfn8GoEOG+xxQ24?= =?utf-8?q?gl24vyNqh+sJcPbR5y+Cvk4BVbAqB7yNEvuc9LJwupkkircJ9U+DMKbeSQVVVsAQ6?= =?utf-8?q?NRp+OUKbnV5Ot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sjFt46poZ11JNDLS/L2W9P4WLDZBkZMVAInbW70ygPawqbxzIy?= =?utf-8?q?Hv+fpVyRLpzOdLd4AIhk305lGwYxxanlPJJ+fOC2RhQCSjANDo+c655wwqySZMLKm?= =?utf-8?q?juJUUqNb+l9AF4sos6TO+j5FWKSUxqzvQHVvXrNCccfo7oZZlRLhpDoKPnKTvAhEc?= =?utf-8?q?Ulh6ajAR0Pgvt4mK++8uYHOVC40rU7mNMP3vZ02WURKbCUi6fKOjEHe0TsqY+ikSR?= =?utf-8?q?cJgqqMo1uUweOnwfDoayoEvcNEhIrBGVeJJKIby/d0LBZImANqcBPZ37ncjV9YgSt?= =?utf-8?q?xfyi4EtPteQ1qRmirCMSrThlNYKLXhbc9TwqG+lwlo9sezpIjejhsBbSx4UofsbjM?= =?utf-8?q?7TUgPZp/7RLKkKPmg0zfagDo2Kk6lVytIPAwQepFEQl90BDuCw7V/uH63SR50UJ2f?= =?utf-8?q?Y1p4MtDYMT+qUUSkgFwwx45V1MJk2ckKIg=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0e7123e-929a-4f40-5a4f-08dcde37f79d X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2024 14:31:54.0406 (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: SA65Rw8T30HIj0wx8Ob4xjuM+HBinyFg6qzO/T5pVBVMJw9ajRsbQMVd7aT5LOBuFeBf5zA00QrS/TpR2H0e0JK+uhdDdd1K91pVtDEWIMw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10485 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_073209_486602_35059351 X-CRM114-Status: GOOD ( 21.20 ) 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 Add the GPIO driver for S32G2/S32G3 SoCs. This driver uses the SIUL2 (System Integration Unit Lite2) hardware module. There are two SIUL2 hardware modules present, SIUL2_0(controlling GPIOs 0-101) and SIUL2_1 for the rest. The GPIOs are not fully contiguous, there are some gaps: - GPIO102 up to GPIO111(inclusive) are invalid - GPIO123 up to GPIO143(inclusive) are invalid Some GPIOs are input only(i.e. GPI182) though this restriction is not yet enforced in code. This patch adds basic GPIO functionality(no interrupts, no suspend/resume functions). Signed-off-by: Ghennadi Procopciuc Signed-off-by: Larisa Grigore Signed-off-by: Phu Luu An Signed-off-by: Andrei Stefanescu --- drivers/gpio/Kconfig | 10 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-siul2-s32g2.c | 576 ++++++++++++++++++++++++++++++++ 3 files changed, 587 insertions(+) create mode 100644 drivers/gpio/gpio-siul2-s32g2.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index d93cd4f722b4..ae6aa6f64db3 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -643,6 +643,16 @@ config GPIO_SIOX Say yes here to support SIOX I/O devices. These are units connected via a SIOX bus and have a number of fixed-direction I/O lines. +config GPIO_SIUL2_S32G2 + tristate "GPIO driver for S32G2/S32G3" + depends on ARCH_S32 || COMPILE_TEST + depends on OF_GPIO + select REGMAP_MMIO + help + This enables support for the SIUL2 GPIOs found on the S32G2/S32G3 + chips. Say yes here to enable the SIUL2 to be used as an GPIO + controller for S32G2/S32G3 platforms. + config GPIO_SNPS_CREG bool "Synopsys GPIO via CREG (Control REGisters) driver" depends on ARC || COMPILE_TEST diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 1429e8c0229b..8d5f35689fed 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -150,6 +150,7 @@ obj-$(CONFIG_GPIO_SCH) += gpio-sch.o obj-$(CONFIG_GPIO_SIFIVE) += gpio-sifive.o obj-$(CONFIG_GPIO_SIM) += gpio-sim.o obj-$(CONFIG_GPIO_SIOX) += gpio-siox.o +obj-$(CONFIG_GPIO_SIUL2_S32G2) += gpio-siul2-s32g2.o obj-$(CONFIG_GPIO_SL28CPLD) += gpio-sl28cpld.o obj-$(CONFIG_GPIO_SLOPPY_LOGIC_ANALYZER) += gpio-sloppy-logic-analyzer.o obj-$(CONFIG_GPIO_SODAVILLE) += gpio-sodaville.o diff --git a/drivers/gpio/gpio-siul2-s32g2.c b/drivers/gpio/gpio-siul2-s32g2.c new file mode 100644 index 000000000000..d9c04aacb3cc --- /dev/null +++ b/drivers/gpio/gpio-siul2-s32g2.c @@ -0,0 +1,576 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * SIUL2 GPIO support. + * + * Copyright (c) 2016 Freescale Semiconductor, Inc. + * Copyright 2018-2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* 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 SIUL2_PGPDO(N) (((N) ^ 1) * 2) +#define S32G2_SIUL2_NUM 2 +#define S32G2_PADS_DTS_TAG_LEN 7 + +#define SIUL2_GPIO_16_PAD_SIZE 16 + +/** + * struct siul2_device_data - platform data attached to the compatible. + * @pad_access: access table for I/O pads, consists of S32G2_SIUL2_NUM tables. + * @reset_cnt: reset the pin name counter to zero when switching to SIUL2_1. + */ +struct siul2_device_data { + const struct regmap_access_table **pad_access; + const bool reset_cnt; +}; + +/** + * struct siul2_desc - describes a SIUL2 hw module. + * @pad_access: array of valid I/O pads. + * @opadmap: the regmap of the Parallel GPIO Pad Data Out Register. + * @ipadmap: the regmap of the Parallel GPIO Pad Data In Register. + * @gpio_base: the first GPIO pin. + * @gpio_num: the number of GPIO pins. + */ +struct siul2_desc { + const struct regmap_access_table *pad_access; + struct regmap *opadmap; + struct regmap *ipadmap; + u32 gpio_base; + u32 gpio_num; +}; + +/** + * struct siul2_gpio_dev - describes a group of GPIO pins. + * @platdata: the platform data. + * @siul2: SIUL2_0 and SIUL2_1 modules information. + * @pin_dir_bitmap: the bitmap with pin directions. + * @gc: the GPIO chip. + * @lock: mutual access to bitmaps. + */ +struct siul2_gpio_dev { + const struct siul2_device_data *platdata; + struct siul2_desc siul2[S32G2_SIUL2_NUM]; + unsigned long *pin_dir_bitmap; + struct gpio_chip gc; + raw_spinlock_t lock; +}; + +static const struct regmap_range s32g2_siul20_pad_yes_ranges[] = { + regmap_reg_range(SIUL2_PGPDO(0), SIUL2_PGPDO(0)), + regmap_reg_range(SIUL2_PGPDO(1), SIUL2_PGPDO(1)), + regmap_reg_range(SIUL2_PGPDO(2), SIUL2_PGPDO(2)), + regmap_reg_range(SIUL2_PGPDO(3), SIUL2_PGPDO(3)), + regmap_reg_range(SIUL2_PGPDO(4), SIUL2_PGPDO(4)), + regmap_reg_range(SIUL2_PGPDO(5), SIUL2_PGPDO(5)), + regmap_reg_range(SIUL2_PGPDO(6), SIUL2_PGPDO(6)), +}; + +static const struct regmap_access_table s32g2_siul20_pad_access_table = { + .yes_ranges = s32g2_siul20_pad_yes_ranges, + .n_yes_ranges = ARRAY_SIZE(s32g2_siul20_pad_yes_ranges), +}; + +static const struct regmap_range s32g2_siul21_pad_yes_ranges[] = { + regmap_reg_range(SIUL2_PGPDO(7), SIUL2_PGPDO(7)), + regmap_reg_range(SIUL2_PGPDO(9), SIUL2_PGPDO(9)), + regmap_reg_range(SIUL2_PGPDO(10), SIUL2_PGPDO(10)), + regmap_reg_range(SIUL2_PGPDO(11), SIUL2_PGPDO(11)), +}; + +static const struct regmap_access_table s32g2_siul21_pad_access_table = { + .yes_ranges = s32g2_siul21_pad_yes_ranges, + .n_yes_ranges = ARRAY_SIZE(s32g2_siul21_pad_yes_ranges), +}; + +static const struct regmap_access_table *s32g2_pad_access_table[] = { + &s32g2_siul20_pad_access_table, + &s32g2_siul21_pad_access_table +}; + +static_assert(ARRAY_SIZE(s32g2_pad_access_table) == S32G2_SIUL2_NUM); + +static const struct siul2_device_data s32g2_device_data = { + .pad_access = s32g2_pad_access_table, + .reset_cnt = true, +}; + +static int siul2_get_gpio_pinspec(struct platform_device *pdev, + struct of_phandle_args *pinspec, + unsigned int range_index) +{ + struct device_node *np = pdev->dev.of_node; + + return of_parse_phandle_with_fixed_args(np, "gpio-ranges", 3, + range_index, pinspec); +} + +static struct regmap *siul2_offset_to_regmap(struct siul2_gpio_dev *dev, + unsigned int offset, + bool input) +{ + struct siul2_desc *siul2; + size_t i; + + for (i = 0; i < ARRAY_SIZE(dev->siul2); i++) { + siul2 = &dev->siul2[i]; + if (offset >= siul2->gpio_base && + offset - siul2->gpio_base < siul2->gpio_num) + return input ? siul2->ipadmap : siul2->opadmap; + } + + return NULL; +} + +static void siul2_gpio_set_direction(struct siul2_gpio_dev *dev, + unsigned int gpio, int dir) +{ + guard(raw_spinlock_irqsave)(&dev->lock); + + if (dir == GPIO_LINE_DIRECTION_IN) + __clear_bit(gpio, dev->pin_dir_bitmap); + else + __set_bit(gpio, dev->pin_dir_bitmap); +} + +static int siul2_get_direction(struct siul2_gpio_dev *dev, + unsigned int gpio) +{ + return test_bit(gpio, dev->pin_dir_bitmap) ? GPIO_LINE_DIRECTION_OUT : + GPIO_LINE_DIRECTION_IN; +} + +static struct siul2_gpio_dev *to_siul2_gpio_dev(struct gpio_chip *chip) +{ + return container_of(chip, struct siul2_gpio_dev, gc); +} + +static int siul2_gpio_dir_in(struct gpio_chip *chip, unsigned int gpio) +{ + struct siul2_gpio_dev *gpio_dev; + int ret = 0; + + ret = pinctrl_gpio_direction_input(chip, gpio); + if (ret) + return ret; + + gpio_dev = to_siul2_gpio_dev(chip); + siul2_gpio_set_direction(gpio_dev, gpio, GPIO_LINE_DIRECTION_IN); + + return 0; +} + +static int siul2_gpio_get_dir(struct gpio_chip *chip, unsigned int gpio) +{ + return siul2_get_direction(to_siul2_gpio_dev(chip), gpio); +} + +static unsigned int siul2_pin2pad(unsigned int pin) +{ + return pin / SIUL2_GPIO_16_PAD_SIZE; +} + +static u16 siul2_pin2mask(unsigned int pin) +{ + /** + * From Reference manual : + * PGPDOx[PPDOy] = GPDO(x × 16) + (15 - y)[PDO_(x × 16) + (15 - y)] + */ + return BIT(SIUL2_GPIO_16_PAD_SIZE - 1 - pin % SIUL2_GPIO_16_PAD_SIZE); +} + +static void siul2_gpio_set_val(struct gpio_chip *chip, unsigned int offset, + int value) +{ + struct siul2_gpio_dev *gpio_dev = to_siul2_gpio_dev(chip); + unsigned int pad, reg_offset; + struct regmap *regmap; + u16 mask; + + mask = siul2_pin2mask(offset); + pad = siul2_pin2pad(offset); + + reg_offset = SIUL2_PGPDO(pad); + regmap = siul2_offset_to_regmap(gpio_dev, offset, false); + if (!regmap) + return; + + value = value ? mask : 0; + + regmap_update_bits(regmap, reg_offset, mask, value); +} + +static int siul2_gpio_dir_out(struct gpio_chip *chip, unsigned int gpio, + int val) +{ + struct siul2_gpio_dev *gpio_dev; + int ret = 0; + + gpio_dev = to_siul2_gpio_dev(chip); + siul2_gpio_set_val(chip, gpio, val); + + ret = pinctrl_gpio_direction_output(chip, gpio); + if (ret) + return ret; + + siul2_gpio_set_direction(gpio_dev, gpio, GPIO_LINE_DIRECTION_OUT); + + return 0; +} + +static void siul2_gpio_set(struct gpio_chip *chip, unsigned int offset, + int value) +{ + struct siul2_gpio_dev *gpio_dev = to_siul2_gpio_dev(chip); + + if (!gpio_dev) + return; + + if (siul2_get_direction(gpio_dev, offset) == GPIO_LINE_DIRECTION_IN) + return; + + siul2_gpio_set_val(chip, offset, value); +} + +static int siul2_gpio_get(struct gpio_chip *chip, unsigned int offset) +{ + struct siul2_gpio_dev *gpio_dev = to_siul2_gpio_dev(chip); + unsigned int mask, pad, reg_offset, data = 0; + struct regmap *regmap; + + mask = siul2_pin2mask(offset); + pad = siul2_pin2pad(offset); + + reg_offset = SIUL2_PGPDO(pad); + regmap = siul2_offset_to_regmap(gpio_dev, offset, true); + if (!regmap) + return -EINVAL; + + regmap_read(regmap, reg_offset, &data); + + return !!(data & mask); +} + +static const struct regmap_config siul2_regmap_conf = { + .val_bits = 32, + .reg_bits = 32, + .reg_stride = 4, + .cache_type = REGCACHE_FLAT, +}; + +static struct regmap *common_regmap_init(struct platform_device *pdev, + struct regmap_config *conf, + const char *name) +{ + struct device *dev = &pdev->dev; + struct resource *res; + resource_size_t size; + void __iomem *base; + + base = devm_platform_get_and_ioremap_resource_byname(pdev, name, &res); + if (IS_ERR(base)) { + dev_err(&pdev->dev, "Failed to get MEM resource: %s\n", name); + return ERR_PTR(-EINVAL); + } + + size = resource_size(res); + conf->val_bits = conf->reg_stride * 8; + conf->max_register = size - conf->reg_stride; + conf->name = name; + conf->use_raw_spinlock = true; + + if (conf->cache_type != REGCACHE_NONE) + conf->num_reg_defaults_raw = do_div(size, conf->reg_stride); + + return devm_regmap_init_mmio(dev, base, conf); +} + +static bool not_writable(__always_unused struct device *dev, + __always_unused unsigned int reg) +{ + return false; +} + +static struct regmap *init_padregmap(struct platform_device *pdev, + struct siul2_gpio_dev *gpio_dev, + int selector, bool input) +{ + const struct siul2_device_data *platdata = gpio_dev->platdata; + struct regmap_config regmap_conf = siul2_regmap_conf; + char dts_tag[S32G2_PADS_DTS_TAG_LEN]; + int err; + + regmap_conf.reg_stride = 2; + + if (selector != 0 && selector != 1) + return ERR_PTR(-EINVAL); + + regmap_conf.rd_table = platdata->pad_access[selector]; + + err = snprintf(dts_tag, ARRAY_SIZE(dts_tag), "%cpads%d", + input ? 'i' : 'o', selector); + if (err < 0) + return ERR_PTR(-EINVAL); + + if (input) { + regmap_conf.writeable_reg = not_writable; + regmap_conf.cache_type = REGCACHE_NONE; + } else { + regmap_conf.wr_table = platdata->pad_access[selector]; + } + + return common_regmap_init(pdev, ®map_conf, dts_tag); +} + +static int siul2_gpio_pads_init(struct platform_device *pdev, + struct siul2_gpio_dev *gpio_dev) +{ + struct device *dev = &pdev->dev; + size_t i; + + for (i = 0; i < ARRAY_SIZE(gpio_dev->siul2); i++) { + gpio_dev->siul2[i].opadmap = init_padregmap(pdev, gpio_dev, i, + false); + if (IS_ERR(gpio_dev->siul2[i].opadmap)) { + dev_err(dev, + "Failed to initialize opad2%zu regmap config\n", + i); + return PTR_ERR(gpio_dev->siul2[i].opadmap); + } + + gpio_dev->siul2[i].ipadmap = init_padregmap(pdev, gpio_dev, i, + true); + if (IS_ERR(gpio_dev->siul2[i].ipadmap)) { + dev_err(dev, + "Failed to initialize ipad2%zu regmap config\n", + i); + return PTR_ERR(gpio_dev->siul2[i].ipadmap); + } + } + + return 0; +} + +static int siul2_gen_names(struct device *dev, unsigned int cnt, char **names, + char *ch_index, unsigned int *num_index) +{ + unsigned int i; + + for (i = 0; i < cnt; i++) { + if (i != 0 && !(*num_index % 16)) + (*ch_index)++; + + names[i] = devm_kasprintf(dev, GFP_KERNEL, "P%c_%02d", + *ch_index, 0xFU & (*num_index)++); + if (!names[i]) + return -ENOMEM; + } + + return 0; +} + +static int siul2_gpio_remove_reserved_names(struct device *dev, + struct siul2_gpio_dev *gpio_dev, + char **names) +{ + struct device_node *np = dev->of_node; + int num_ranges, i, j, ret; + u32 base_gpio, num_gpio; + + /* Parse the gpio-reserved-ranges to know which GPIOs to exclude. */ + + num_ranges = 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 /= 2; + + for (i = 0; i < num_ranges; i++) { + ret = of_property_read_u32_index(np, "gpio-reserved-ranges", + i * 2, &base_gpio); + if (ret) { + dev_err(dev, "Could not parse the start GPIO: %d\n", + ret); + return ret; + } + + ret = of_property_read_u32_index(np, "gpio-reserved-ranges", + i * 2 + 1, &num_gpio); + if (ret) { + dev_err(dev, "Could not parse num. GPIOs: %d\n", ret); + return ret; + } + + if (base_gpio + num_gpio > gpio_dev->gc.ngpio) { + dev_err(dev, "Reserved GPIOs outside of GPIO range\n"); + return -EINVAL; + } + + /* Remove names set for reserved GPIOs. */ + for (j = base_gpio; j < base_gpio + num_gpio; j++) { + devm_kfree(dev, names[j]); + names[j] = NULL; + } + } + + return 0; +} + +static int siul2_gpio_populate_names(struct device *dev, + struct siul2_gpio_dev *gpio_dev) +{ + unsigned int num_index = 0; + char ch_index = 'A'; + char **names; + int i, ret; + + names = devm_kcalloc(dev, gpio_dev->gc.ngpio, sizeof(*names), + GFP_KERNEL); + if (!names) + return -ENOMEM; + + for (i = 0; i < S32G2_SIUL2_NUM; i++) { + ret = siul2_gen_names(dev, gpio_dev->siul2[i].gpio_num, + names + gpio_dev->siul2[i].gpio_base, + &ch_index, &num_index); + if (ret) { + dev_err(dev, "Could not set names for SIUL2_%d GPIOs\n", + i); + return ret; + } + + if (gpio_dev->platdata->reset_cnt) + num_index = 0; + + ch_index++; + } + + ret = siul2_gpio_remove_reserved_names(dev, gpio_dev, names); + if (ret) + return ret; + + gpio_dev->gc.names = (const char *const *)names; + + return 0; +} + +static int siul2_gpio_probe(struct platform_device *pdev) +{ + struct siul2_gpio_dev *gpio_dev; + struct device *dev = &pdev->dev; + struct of_phandle_args pinspec; + size_t i, bitmap_size; + struct gpio_chip *gc; + int ret = 0; + + gpio_dev = devm_kzalloc(dev, sizeof(*gpio_dev), GFP_KERNEL); + if (!gpio_dev) + return -ENOMEM; + + gpio_dev->platdata = &s32g2_device_data; + + for (i = 0; i < S32G2_SIUL2_NUM; i++) + gpio_dev->siul2[i].pad_access = + gpio_dev->platdata->pad_access[i]; + + ret = siul2_gpio_pads_init(pdev, gpio_dev); + if (ret) + return ret; + + gc = &gpio_dev->gc; + + platform_set_drvdata(pdev, gpio_dev); + + raw_spin_lock_init(&gpio_dev->lock); + + for (i = 0; i < ARRAY_SIZE(gpio_dev->siul2); i++) { + ret = siul2_get_gpio_pinspec(pdev, &pinspec, i); + if (ret) { + dev_err(dev, + "unable to get pinspec %zu from device tree\n", + i); + return -EINVAL; + } + + of_node_put(pinspec.np); + + if (pinspec.args_count != 3) { + dev_err(dev, "Invalid pinspec count: %d\n", + pinspec.args_count); + return -EINVAL; + } + + gpio_dev->siul2[i].gpio_base = pinspec.args[1]; + gpio_dev->siul2[i].gpio_num = pinspec.args[2]; + } + + gc->base = -1; + + /* In some cases, there is a gap between the SIUL GPIOs. */ + gc->ngpio = gpio_dev->siul2[S32G2_SIUL2_NUM - 1].gpio_base + + gpio_dev->siul2[S32G2_SIUL2_NUM - 1].gpio_num; + + ret = siul2_gpio_populate_names(&pdev->dev, gpio_dev); + if (ret) + return ret; + + bitmap_size = BITS_TO_LONGS(gc->ngpio) * + sizeof(*gpio_dev->pin_dir_bitmap); + gpio_dev->pin_dir_bitmap = devm_kzalloc(dev, bitmap_size, GFP_KERNEL); + if (!gpio_dev->pin_dir_bitmap) + return -ENOMEM; + + gc->parent = dev; + gc->label = dev_name(dev); + + gc->set = siul2_gpio_set; + gc->get = siul2_gpio_get; + gc->set_config = gpiochip_generic_config; + gc->request = gpiochip_generic_request; + gc->free = gpiochip_generic_free; + gc->direction_output = siul2_gpio_dir_out; + gc->direction_input = siul2_gpio_dir_in; + gc->get_direction = siul2_gpio_get_dir; + gc->owner = THIS_MODULE; + + ret = devm_gpiochip_add_data(dev, gc, gpio_dev); + if (ret) + return dev_err_probe(dev, ret, "unable to add gpiochip\n"); + + return 0; +} + +static const struct of_device_id siul2_gpio_dt_ids[] = { + { .compatible = "nxp,s32g2-siul2-gpio" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, siul2_gpio_dt_ids); + +static struct platform_driver siul2_gpio_driver = { + .driver = { + .name = "s32g2-siul2-gpio", + .of_match_table = siul2_gpio_dt_ids, + }, + .probe = siul2_gpio_probe, +}; + +module_platform_driver(siul2_gpio_driver); + +MODULE_AUTHOR("NXP"); +MODULE_DESCRIPTION("NXP SIUL2 GPIO"); +MODULE_LICENSE("GPL"); From patchwork Thu Sep 26 14:31:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13813426 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 28CB1CDE00E for ; Thu, 26 Sep 2024 14:39:19 +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:References:In-Reply-To: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:List-Owner; bh=dLpP5QUy3RPA5HM3eGobmtdB4jHgEYO2Nzl73CnK638=; b=Mw7XHkIIXFHfk1DXRc8lI7vCko 5elvz67TaJqxggSTRjJYHzRLIjcdDjxhXoRNbPSxcIu8ihN/ctFkqwcAFe/7FHvXtDI/N7S4O0eC3 7H+uBEuIwQUixBJleyTsZDCvCJWa8a2LiEBcNxNiA4MY1YMtbr47sT9P0J2e7FolUoOAHRY6cb3XL zI2ZoztHfF34DNO3mnY26FbGjspdOOCQDIEPmgodABtiSV8vtvzDH83lVetz5hTFx4zmQ3CKn9Il1 jW+HJZaCLAEbGKrnCp8c75GdM+trslQinlLg3Pp8+TyJd9czvIatma5PhYWMwiR+I1m79LtFdBzun WEVppIeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stpe6-00000008d3R-0aKJ; Thu, 26 Sep 2024 14:39:06 +0000 Received: from mail-db5eur02on20603.outbound.protection.outlook.com ([2a01:111:f403:2608::603] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stpXP-00000008btR-2GOb for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 14:32:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GVkT0kuoY0uPMF6OwW8muXm6CaUj2LYsw9ZSQBb66YdobF3yTrCbDEXytw74sk8TCcbS1iYzvSp2tlhzCFnHLK7E2crGjO5kwmZEfi3Yq5h2A3wI6KqJZboez7ht9eJNeK2Fvv3eL2gGgJG7kiDryMnyd74uc4TizzsigbPDbBBXeAZHQ1XVgT/eA3ubiQ6OGjXn2sGTrghGBLh6CUdb6NXcetnMZl61dz6TSALB+602xcksya1y8pnYIhDknFNR5tvIDT5r8vwCG2sYCfolWIgg8tOvr/HScxsSuvwDQK4iEVDPdaWHsiEAYaZdPR8VXSnOfW3AsNdXsVWBFvEs9Q== 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=dLpP5QUy3RPA5HM3eGobmtdB4jHgEYO2Nzl73CnK638=; b=C4Agoet6rS0VGlzO4ACGEZWsbVydV8FlpAUyPIksssFLm32fo9wsyw1okX+Miy0Ba0K290HeK/KNSUiP7On3hI7tDcnUVIAFiCtvGxkDL76ByrC7WTFPOtiFDr1RHD6kuKemszaKlkTFHrYApv3ILE5m4Tp/yr68f3RWB4Br0rcHMiypmGQFfZw2wB6egVShPPLhZZtnz/+8DOIz+hlDTVO0gkU3JhpAQJEqvy5sycRHnzKwSri+1Pm75pjigEpE0RKLk9utgFiQwXSwK/9H/vCBGfJK0rsueY12K/md3efColuNbW9VbjWFhHgUD4oiRjOSeUNzPfWg15bQJW6Bew== 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=dLpP5QUy3RPA5HM3eGobmtdB4jHgEYO2Nzl73CnK638=; b=EZxKl7u8rpef28o8mkTr9xxpw4emy275VGqfbRKgemU9lXJ3VdFO8oua6/4BCGEXNuO52IOS2mcZt0lqOsz88yqQNyeZIv2nYUb49R7F6q0WoeARi+3C296d3SN+nA+ZnvA37SH1f4Id51rw6ijKOVS9y+h83x+xSPYx8t4OBctyL5uIveJCmv8kJ475L5aCeSTAsaileHLSHa6zSIeLlsqsdRsFP0RHhy6l2Nm+4rHFaSSWnV3YcJHxjvvOmES2277ZT6UGZyr3FKBFU9LFaZYJK7tqMwv4OzzZ+wDMjigRWeeX1uVaCS57Roy0N4rnKo/dXW4gQOi0K3FOQYBv2Q== 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 GV1PR04MB10485.eurprd04.prod.outlook.com (2603:10a6:150:1d4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Thu, 26 Sep 2024 14:31:56 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%5]) with mapi id 15.20.7962.022; Thu, 26 Sep 2024 14:31:56 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Greg Kroah-Hartman , "Rafael J. Wysocki" 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 , Andrei Stefanescu Subject: [PATCH v4 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver Date: Thu, 26 Sep 2024 17:31:21 +0300 Message-ID: <20240926143122.1385658-5-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> References: <20240926143122.1385658-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0101.eurprd02.prod.outlook.com (2603:10a6:208:154::42) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8487:EE_|GV1PR04MB10485:EE_ X-MS-Office365-Filtering-Correlation-Id: 83009dc9-5420-40fd-4e79-08dcde37f8d9 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|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xWgqcFVxgI+W6Vzd5aZQOLg4kfcL7Ko?= =?utf-8?q?YS9y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8?q?+qr36k7UorceOpdAEkOQ88icb6ogVT5Y5ex43fxZjKosQpUk/0NPzJAF8OGtJoi4h?= =?utf-8?q?ZLVlB3GdXlBitWcHUriTppJblIvNxmuagVkpGkmCsn4In7Tika/tEg5eDVUbjCSJ6?= =?utf-8?q?p5L2zCjKPDvPD03BP3gmubFa00hp2oUPIC+EwalvUp6Nm0t1a1Co6j4CWbR2WH8HJ?= =?utf-8?q?EzDjm22kvjJlgtS46COpmjTsKrvHntbc9wdm2siVUPNSe3bvlMbCBSmhlFvD6Np2d?= =?utf-8?q?ZHfr04LWFSvEuq3IsHFT5MpvrRy/We6Pg5NEtT8t+MWaHgUkMW3DIhu9aj0TmbPRx?= =?utf-8?q?Qm/aXYEDCmwUmG49cKCFdzgIzH4FJVcHF4GeDbeW8ycZvstjmL5FBV8qZ1au/+jUV?= =?utf-8?q?mcxK3N4qj9bmZDFWH1HLNDvvZ9BuD7UK7Mjy2jb5DjsJQj9ANPASlrf2k7Bu11SIL?= =?utf-8?q?895JG2/WPaBMbYqUzKGCbrs2QvRfmgA4ww=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)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?OsNrg02mxstpFh/YEBlwOwuQRTrd?= =?utf-8?q?ls8Ncj8KS94EjELF7OwxuW0AXNC2+P5acxblxhc1h8Jsf/woDu2stehwkeX8pBWrG?= =?utf-8?q?U0tE6nEXVyG+0Xt1Cj2B/8O5d769JfO1LZ+TUklYivjL0M+dHpjhjnKbtedriknQS?= =?utf-8?q?npb+nQwHrrSvBmkKlN6xf1Xbz1qNgpM7/3/wHxe+JbdehYy3wCAfL982K8ELZ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JNGLHKZbsf?= =?utf-8?q?b/IMiEhPoPP/TeYuWGleLekBgEilr8Vx89htkGUUwctsEYa9w/UbxKgvGgPpRl6G4?= =?utf-8?q?tEtjSGNuN1L76odE2SowiVOo+wK/5UqLIZIXQ9uP9gelevjeArWveRIsx7ioP9cTM?= =?utf-8?q?mjX1duPlo2OQQLvfgmSnZAH6JYLVOCsCexo/Qos3XWSoPHFYn2KbhbZT78XD+/8vk?= =?utf-8?q?/dkm16GsWOXuM05nAoV2uCq5NnAmKpQe3OO4pkV0fCSU806qAnVS/5ZHOO9IFd8U2?= =?utf-8?q?JmbfQLwclPg55bbBEpNq6FUGNto+rPoh1Dlu5P7UTX/gN7n9Is7UW4S1Tk42PaLtP?= =?utf-8?q?RboL0TQakD/iMs56kZAxHR/Pd/rtLUj+3gtj7wB+sk97ODD/4WN59mx7oiESR3czB?= =?utf-8?q?FvRyBo+WLmLHFXuUsvBATS3QjKxdeQKl9EM847EDSMPjC3l5/T/bqNBmyxHZiHRUN?= =?utf-8?q?gZeihtWJOD1dbL/Yka28bazD0URMMU8KPw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83009dc9-5420-40fd-4e79-08dcde37f8d9 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2024 14:31:56.1167 (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: PYsCix92zFBf52PVSeOhVQYlv+RcfC1TB74ziktNfXutXqTWBJWlJDZZCa6+f2Pq0OYQsmuxxD3O0WFheihHKFp8CllzoYb/5EEutiKbZfQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10485 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_073211_609110_18445B4A X-CRM114-Status: GOOD ( 11.24 ) 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 Add myself as a maintainer for the S32G2 SIUL2 GPIO driver and the NXP S32 mailing list for reviews. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7bfef98226d9..1201f284b0b5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2763,7 +2763,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/gpio/nxp,s32g2-siul2-gpio.yaml F: arch/arm64/boot/dts/freescale/s32g*.dts* +F: drivers/gpio/gpio-siul2-s32g2.c F: drivers/pinctrl/nxp/ ARM/Orion SoC/Technologic Systems TS-78xx platform support