From patchwork Thu Sep 19 13:47: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: 13807775 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 11D9CCF3942 for ; Thu, 19 Sep 2024 13:51:33 +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=bxbXJ1DcVbuU6ml5U141n0/9xg u7/jg3RUjVX0sJNe/tZzzvi9Tc3afcVnGCAyHoKjSIVp+lUJ8rofSIxQLQnZKVfjlvcqTaBWr+kIs YcfMtb1+UPhNKrs5qjV6Ab+JbRGudeOLP5NQAvyQagqEHkJxlXSD/Ufa/+vnLdSsYI1mIQiHuO8Fz M0NybDIBEo7c7kpVRsWeSZz9ysk38gI/Dld8ZNiRXiXpb2EDxArnHJsR7jdAKgghqcC2TXaT03QAo T8xp/cuQwtgXflvmMqiZDtdQjLkPiTuKyZsD2lxvrhDJAq07/u2ttDpBnXOgRBFnZ1THEBHScfPqT R4UnRb7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srHZ5-0000000ANcN-1Hen; Thu, 19 Sep 2024 13:51:23 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srHWp-0000000AN8m-3Spn for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2024 13:49:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h3RTtupFJhDBM5slP9UfkwO8XkY2GekZeQ171kDvc/BX44yVys1CMYyD0Bp7L0FXt/hKeclPO0p4URT8YnZqCuXjdVMRjqMC7nA2SCDbJUwLjthdX3tNQmelzRAW0SEm4b+jmVEtpwE+PwjBT9goe62+lOyjP7V9sZO0DxzQ7UaFlg1uc1eQSyTAVj6OijuBrXVg5Az7SyQdhF9guZ8OJPeSgRZHccMOZ8f72wwiQzZMYjommFOlbRwZDULdfnYC70uSsvaua+cppl5ya7U96WbQp2BEmUhwBiJfyVlp7M3TUiRxfjarDhCwp7N0LEZttzu6BV7qXnBeNcTaVKL6BA== 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=GBl22elodIIPnPrOGf7yhuAzioodqVBfhuXV/1C2ZvuOmgJJF12qBwV9qq8GuxV6wCII5oTtepbYTTP/qTHQbRz6J6J5TCu97tQpiIYhsxG7W25VF9sWZed8wr4Er4gNWQ/gd+nUJR5ovQFbkTBm/rAqKJPUZKoaOiMkA2OXxz2Wq11DYp8T+WqHFVAnCnNKucGE6LgKvmBvhmpYIckihvhShicxYH3Ya5Kjg86m0frgaBISsamiMFplPusSpmsgCWRbsAvvHUM+qCMYemu3SyYNdX/AQ0rTGque71NrTXiFR7b5VhsKjc+TDjhwjxZwpJ6TuebygOtpTetl1z0OYw== 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=LAulT4G9v1KEzUWcvfStcaEZjMsl6ugV8dSWuyn8uHknzWq5mBcFy3wQI3ukLxyYn+AzZBYTyp6Gb7gy7IMoA59es77Spzufd6QWikX9BuVMEylJSbYZS3jV6yN1lj1uaRUFVhmEKI0bPr/zZxvI548JKOn0b4fCyE0tfQpEUgTlBGOAEyA5KE8P/vd1zWsJVCcYF03h1rV0BlkspMiL+m7THS2HO8jYwlOseL7uLEPQJZg+B2h+eecpyeQRoNIs15COzLNF/pziBup42Rm5Z/wNgnuu2+5+ksNp9Jx2w4XpqYoy6a4FmNtt4G6fuuugR3z6tBotv4ervrXIH9HlQg== 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 VI2PR04MB10267.eurprd04.prod.outlook.com (2603:10a6:800:225::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Thu, 19 Sep 2024 13:48:51 +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, 19 Sep 2024 13:48:50 +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 , Andrei Stefanescu , Krzysztof Kozlowski Subject: [PATCH v3 1/4] drivers: provide devm_platform_get_and_ioremap_resource_byname() Date: Thu, 19 Sep 2024 16:47:21 +0300 Message-ID: <20240919134732.2626144-2-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> References: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0109.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::26) 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_|VI2PR04MB10267:EE_ X-MS-Office365-Filtering-Correlation-Id: 43152e2d-79fa-4372-2929-08dcd8b1cb04 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|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?yEg/CjfDZ6i6d0DUME00GYcrt9Def4l?= =?utf-8?q?EyycLChiPPNOHMPEb0y7UDwskCUbpkSo3/VkYYs6imYbPgypy6efKJIa8/+anmEtE?= =?utf-8?q?bxXrqR7CQlm3KOsGRwxHQl6BuOUCs+enZ9PQydxu8COVqfEMxVS6npItskWO2iaIL?= =?utf-8?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B4+2jlQgtUboDPUFPErwMhMy0F0JMoaugd5m2MnsXUYysczMAAL8LUY?= =?utf-8?q?oGAf0ndeoHeaU5WH4S9WisJapUUQE0P5ZPnXPPIjWEcg+EplYrG2tsVM6etU3MSa9?= =?utf-8?q?qsd/vF0rf5ONs2oj2gCtp+XY7WA9kIMcvCjC4lanG+u5ZXlmqxGOlTbShSmHk736V?= =?utf-8?q?RlhCboazN6y1FsViDtDvHtSJ9brQG5I1M2xMteX/iz439nyFSS1UwRyuG9Gc7IbsG?= =?utf-8?q?OJ+2sUhYoExcwKoQUbnTjeDYqq2gmM8nFKGGyaJcipV18aRrWeS1s54nCfd0p/Cjj?= =?utf-8?q?ld8UXIdYP9DpSctjUjQ+XRWoaxlxNVEqiA=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)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gCLlUU+k76f+yBs7UM73Bm9hc7f0?= =?utf-8?q?Ore/jEJqJ7lhMWXivRqmmTy+pb42RndHCsgEKEdDATz6cG78Bv8+BeEOcV42G8yBX?= =?utf-8?q?DmOmYehpp0M9BaTY1C8LYfT/v8JWWs1QF42hSy5NXBsliN56BNJXVaufpQNkApQcW?= =?utf-8?q?1akKt4t0DKJzRFHgnwhby5varuz7iv3FOeLbqQ7wwignhTkf7nf33ODZ2WqfAUsXO?= =?utf-8?q?5eqZfAmO+YkFSt2AqgztSVC/TAJXnQDu2UgEXstryyNOi5vbsW00gi5h2hB5f/cyX?= =?utf-8?q?iV3YImf4CI8TuB4ARCLSDwDQQjorUf4RV0IF28JJBFYCsJWOtaB2CiZzzphTMbOzF?= =?utf-8?q?DT4AUunP8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675OrD0cu3VCaEz/hdXITLVolgc0r7Ac8g5nILIKTFlOUg0P5M?= =?utf-8?q?S8EZ4lm9u6iJkfm9iC021SdddSwRcRL717pxr/X6b7Kk3YbtWepNLW3anfa/N7CJu?= =?utf-8?q?IFwgE8z8hgdysTgOzsi6FU616S6SRyPJrdUropWbtW2UuIT2RzRQe6AloGW/wSfb3?= =?utf-8?q?pCLxFd3++BCo7Wz2RgM8/Rsb7V4sMjUy+TFy0dYOFjV5AV3xGMaPi7GN9KYOuTTOA?= =?utf-8?q?xg+njsUVlGzj/yR/CRKyOPuV3ostJtOnmAvGxjD0PaXeYZME5PkEyaGoik4FzKx28?= =?utf-8?q?dvR3KaUs0omCHYE3p4T49dm3YwXVoQNi8w=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 43152e2d-79fa-4372-2929-08dcd8b1cb04 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 13:48:50.8422 (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: Md9XLRUwzCxo7ePUyx4nV86hJZb+0NzUWMcNYQINp2hG1LTn/eFp+VuEp0GI+qyfTjmxegFfecnFd7xWu3qQ5yUO9OLzU93LIUFrADcvLwE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10267 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240919_064903_906194_0F26009D X-CRM114-Status: GOOD ( 15.51 ) 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 19 13:47:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13807776 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 175EECF3942 for ; Thu, 19 Sep 2024 13:52:45 +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=4LRUHxrXT55ElFUST4jrMCGemrPsb/goitpTKPzmHNA=; b=DU5i1nXAcVce9wlYS6GCkuMJ6z GekOheMpZc0iDic1C5HGFVHHRCZLbOHbfloIw3WkRadCwPqs/YD8o6E+oLTj8jz0X/ASeB8P/SQVF 25hNGBGlZvHNN7iuGcbn1+KFuXnFf8HMWxRnTddHzINzDN2LxzRI7teB2AWMkwWfG5BY6lwdeOSc1 /hlxLhv2+Iz46ehw6SEU6Pmzp70HKd2ux6j8iE+9FOAp8Kc3pKE8bMKTz1KkWOXOOgtR5sOpBgKiv +7qQer807FeXZJL45Q+po3AwNiwsONmN7avisrx/mDM567Qjy93opOI00Vv4ee9WFOw1ZvALCe5x9 MrJjUbSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srHaA-0000000ANkZ-341K; Thu, 19 Sep 2024 13:52:30 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srHWr-0000000AN8m-31Ol for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2024 13:49:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=drgWBANLxOjHJVbTW3x3ihL8B5Jx/ElC3r3HoOWFWHLnMHwxZjW1D6eoShzoCDbCnQe58skpXmgLMy5ddXIhHA1tsEyAgNzWH2+rv+/tTbuDNRznHDLkVMsqAkV6qecZRe2NyaBpFBsjDS5Xy8dyqcvHTiKLgdTeZF+gcnXvn9eaNQO840AXh2JnGQajueytiB2a6N1dcabA64GBhvXpPk+B/RaQrgUoySaSk//f9pal3PNzhV67z1RwbtS9MdfEkA0HU3bjjp2QAjjzXXuCi1UYOr21mIBSn99F2bG2613K1vytUcFgiJqx9MpXUXxHmgE208rdjGEdHl9d5M9nyg== 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=4LRUHxrXT55ElFUST4jrMCGemrPsb/goitpTKPzmHNA=; b=zPP/hPGIFzQQejovB3+F1N9Oz12Htpj2y9kP+KBzqlXSKKarguYHt+wIB8tXY2p5M+DGbgwDrXgk3nDbWtZNlFu9z4PIMIJcrHD5izb8KZqL1HXJKp5+oWmfAue9KQAyFbrUUaIRN1p0SbaEk+PuzXrJTSOCA2ymH63ssaBAfy+FmlTvRxJuKsI7bMqUruuQSdOE0aWifmXnG4N1a4NT2a1yRv5zH34i0IYyEvTAf3w5SCwR6kL2MkeJeJhW5fegsHXGgSKavwSvNpmHd4USbItPVuuZvmaVwsRRlM8qkiiuhpFu5WiadvYpgocXz9W9sgCXLCokTZuXMe+sKeTLmw== 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=4LRUHxrXT55ElFUST4jrMCGemrPsb/goitpTKPzmHNA=; b=Np/5Lte2sM2z0hJy1zWhJ2WUMGAAw4+YD5eyy9jUV3y7sVW2McrUIVUx9V5vItW1IXfU/bIpmOhiT8Z6xV6gjYxYxt82YHZN8VBG974ePcdNCxKa+wSgK4bkm0ZWT1MjrH0CwlPoVOkUaZ0HJL1gsDdeSYiHs/wm/OsYxbGxLK+6XoaR7nK+hBctrv9H3RYmxSy9jZ5Va1oGg6BFtfXWMIe9h0SPMaFf17u4MFRcAdOrT8Np7sk6WO1geBHKWyawl95Hd6FUApdheMMcJd5zsG82unKJiDczUKPY5pk4QhY+9FmBXY/L96zYE+i3COsIYb8J4qYgw7HZaU3wo6YdgA== 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 VI2PR04MB10267.eurprd04.prod.outlook.com (2603:10a6:800:225::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Thu, 19 Sep 2024 13:48: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, 19 Sep 2024 13:48: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 , Andrei Stefanescu Subject: [PATCH v3 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs Date: Thu, 19 Sep 2024 16:47:22 +0300 Message-ID: <20240919134732.2626144-3-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> References: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0109.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::26) 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_|VI2PR04MB10267:EE_ X-MS-Office365-Filtering-Correlation-Id: fef8b8ce-e709-4084-5419-08dcd8b1cc24 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|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?lVyjqeppbz4QB5FjlMBX+7Nq4ftNQZG?= =?utf-8?q?DgL3mfDQ7YJSYYm3J3hvEmEt3b4XrqgGGDn4oG6s78y905EsVGmSPCsUxQYKHkR8C?= =?utf-8?q?Cj579vxx5wSZfN+dCibI6qGnFr5yQlhtMa+YyPj42v/8PyjFN/hznkkeR8+duo9KP?= =?utf-8?q?1n8Z6bafjHctgk0o7lzHpXnZkLhSMyVl9R0Kp3RsFYQERhnbGAx/B7enAgW2T/9/h?= =?utf-8?q?JJMPTzLduYFlGXifWhewIUoaZD5bd2aYRW66uA7rpBytVN9Cfv0dHQpvKaNQsc4nM?= =?utf-8?q?gUzT3TRzPgGz7Di839tDU5FKSTKQEDaXRuL7pEvnPaYPyx+34EF/IuGjF2nVFGkS+?= =?utf-8?q?lspq6H/FeX52RECT+NjHqDxjF8RzEGPTiXhv0vTsGLz0iNdMJAhuidCEYLV56IFep?= =?utf-8?q?PXqYN4XKKBvse9oYbAp7Dbqncxbzx81nbE8jOpUNxC8RMx8WzFCRXhmhYjQ5CD5Ih?= =?utf-8?q?xPc0y8KKKwX4F+yyRor/CoEQDHfTodCn1IkF3ct2Vm4f77Ko1/ugDalb9egYWJ0wU?= =?utf-8?q?GXGivvGmSUPbyPwaIxVTEnxbsVb0XgMDuqy/DocVFRzWNcmlp+TY4knmL7rCprcIM?= =?utf-8?q?3NdXxSY6G4LCL+SkYYRNkdy4eJNZ6H87B6E02svp7kBZYUNADq82JXt5tG83Cg3dh?= =?utf-8?q?1IF3d1ixW93xSuFNCdotIkuWw+tRGihk6FZ5fTcmdR2Un5PElTtykW0sW+WWMUnJY?= =?utf-8?q?MakpQCgiMkzxXXRdFGqi+u04Z2OftwLI63ybwRdeqKbHYrCw4ry3kpgbMvfdgWGHM?= =?utf-8?q?RLW2Kv55Ob8F76stBX3EU98hDCFrCJg/DSqk3Si5HGBy8KFegM1C3fR4iHfPUp6pU?= =?utf-8?q?q9WiTrB3kXKWSMYnMZ0UgWrYCMEQex+zGTRO9WJhr2LDbTekjcpiB/8SJ4Fq4iUKH?= =?utf-8?q?dB8zHtwBXeIV7UYT65HGPnfB/uIeO5qRa3H+ivEuK+1mDh2sDdbthkJEkG5iBpwpA?= =?utf-8?q?VLY6JhxR12f7L+k58aBshlSjN7FQKWNTAKMuGsxej/dmO9Yu1h0rQU+FxLG8LyQSb?= =?utf-8?q?7CMNQBDboyQNrmR7YTVpIMdHc4wv5Z8ecGhbK4pbqvfsI5/ksBU4gMBd4THAomzFC?= =?utf-8?q?4VrS1NzWm16EcQmw5750rt91ILepZgOYZ91YJOELPi4AsMUMdJqen+zLaaQh6XoNz?= =?utf-8?q?dkdjPg+NDBp29KjP2zELKwNde5ssHd+SswEI+rgPkiXZhkw4bqre/TY97KZi1L69t?= =?utf-8?q?oWyvZ7PBd4UDZvRM2IFMMNiEiTgnzlDJpVy2OKWNFeSacT88QATdJx5uDJ8W7kCzV?= =?utf-8?q?Xcyuw1/vxQR3yLYsyz77Gs6y8UbfYnnkSf7cK74cN5UrTaI5VbdWeLOg=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)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MHeHqvmK1k6G2lHXIiBdcCdUfWXD?= =?utf-8?q?0B5oNRRJ/8RUTvKaOII8TVKnDrwcYrv3+IaGmrAvf1b2xFRPjIuPvl2QcfjaUUb1v?= =?utf-8?q?KdHIx1eOEX6KxfRRwDOE7q5ze+x9zbmx9V9aVSH2L1jDLVvIHbvagwi0C4M3r2ihZ?= =?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= =?utf-8?q?csgw39rVXMzPULdQlez+GOXg5k6aWsqr6PK5LExbJzSAIxRS/5j1+0FTq9AKMLNop?= =?utf-8?q?jppXwRPbGq3Z7J5djJCV4jGTHU2l9M8YqKdtZXgyWvaR5ekESf/O9iisyV/yF+ks+?= =?utf-8?q?larDVUoo+aPH/hu3ftZ52GeFyovhM5msv8AsFuFfJKVv/ZBq5YHJdx6m5cApY0XNV?= =?utf-8?q?pO/r4EjQrWWoF7MdRbNUmicSj9iC9OWKDqGaeOQ9nzlg8bhwFer4n5B3URvWjlIxP?= =?utf-8?q?zyTkgR30RM6pK/9PcI05LjzOa5IbdddTYp8u0y32TGUfcMkZ+vaq/7Bm8oMMbOG/G?= =?utf-8?q?NKNp3kmKrrePANMNCKPNz3HkYu+vR4xKJLGS51uFKDZO08fZv8WMCy04wZHmFmI4f?= =?utf-8?q?yoazOheDoo8PbNPfki3c5ta4e9hYYl1AqX4rhze3fcn3GTEFJEDkDOV0xW4TCa1+6?= =?utf-8?q?9q/aYWBuju+/M6A6zHnxBFuxaJGWRNDGJ2Twl6bAJQDb/KmxMaDGfi+eA0W7n3d7d?= =?utf-8?q?KqcRzC1BPJa9q1kkjT0tpCWUPOC3s1vsIw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fef8b8ce-e709-4084-5419-08dcd8b1cc24 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 13:48:52.6950 (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: ZfKCK1e6GDlauGEQLoXoCKJ+Ko3UxbB0OTs4Q4KfG2MoUg0w6SUPSTwnSLQGCkcE/vEI9Ul2EiWMqIbnSAlBaRUPSN/Jwdh+mIZBrzRW8y4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10267 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240919_064906_015842_1DBB07BB X-CRM114-Status: GOOD ( 16.99 ) 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 --- .../bindings/gpio/nxp,s32g2-siul2-gpio.yaml | 107 ++++++++++++++++++ 1 file changed, 107 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..0548028e6745 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml @@ -0,0 +1,107 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-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: + items: + - 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 19 13:47:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13807777 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 8E43ACF3942 for ; Thu, 19 Sep 2024 13:53:49 +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=MQi7i+4aEouje7mWUyll8Elatm3DJMHU6rtOOmUPpnU=; b=HOg1ST5Vpg4tpwc9vpJyo4Hhxo eUQUZLwjcF44y3qWav5cg/R1PseWyCp0Thls8j/APo2kX2nNntdQTScn1ML4rjl+7ieDOvFEt2+Bn JqlqTa1uzcaeTETJNArmF5PEya0K/X67pGgdX4mxVhtAGo+iELIBRd+KKxQth+pulnLeNa7gZRyql b3kxCE+WNDUi656BwhXHNtEpYUR/D1M/H+1sYJhfJ+CRyGvp+gE+pJ0F8vCGDfyLOHE8xU67Gu+xy dVNftEgphnVuJn41myDI00v6cE89ifwbTbgS+I1CJmXkLO+EWijQxxYiWOWsyhT6tvh4rZqk6a3zO ty8omUzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srHbF-0000000ANsj-1a38; Thu, 19 Sep 2024 13:53:37 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srHWt-0000000AN8m-3bGL for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2024 13:49:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pwm/jql5QADeHVEBipTQzh1cVg1waQS9ZnvlczvAgJhP8XV05zl3/EX7JMz4fwmitfPMiYtW/aLbJWVTbAYfmuxq8FE5JdZ7bDGBfOE177uMkM35L4zGdZ4mVasDAC0Ollawn3iOtWegnrdelFIFEVF1DB5LaGue5boFqWcGVXxce3vSSoBe4a4hZ7eB37Q89E4/qaKpG50E5ewgyYUaevGPa2sRtuinR1LInSdG9qd8aj3QkPWugzaoWpfn2jwvCmbJuh8Bhddvm3gAQl0SUz0oMIyBMj3rcYScukvE8FPC/6PgMyE9Q5yz2p7Tr/Eo/vCMJq+5svh4bDDfR9FOtg== 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=MQi7i+4aEouje7mWUyll8Elatm3DJMHU6rtOOmUPpnU=; b=u4zT7az/mJk/Axp8/+NQrlCsDq4Zaoh/WMl8feS0uuJ5kudSch56LbV56jZyNaxhZE+CvyAt7NeqMNxsCz59dJDMhc/lREDRG6lMbkdsbMztGXWvstxW/YV4XgdEfKBWLmgir4MnstSw4mgx926PORBGknaYBhg3qpBJf6IiY0id7ziN/taQQyfzmgqqpHTchaA0J/wQgJOP7aLhptE7YRbgTn3VF51qQ2ElMoq2x1N8tG8kHU/rko9aAyCmsUBrusnwThA/oMemVeiYizlnJE9Z/MdFyrUikQfx0LeESXQlssa0vf9Z24O39LSbUy6vQBX5VeI63+jjGPIaLVhknw== 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=MQi7i+4aEouje7mWUyll8Elatm3DJMHU6rtOOmUPpnU=; b=rXUvkjc2aL/jvx8Mlk769IjpwW0KGd+ay65JMpBkJG5HFrUF5/llMPt5eYxusivzpIq1XiNKdL4zhDnzQCE/C8HwiZ4YbQS/s1fb5bo64UJH4JaqKOLKdjDwgPC1gmy9o6Ra4Dx2p+/6Zoit7besN7RUeccUAaN1IEQ39EFXelGG0GuIY/nvgsu3HQkTH9TEoWjuN9enDNbN7X+KXzYmhnOT8erAU709/YhsZrncKrs4Daah7XHqCZPVtiuPsNNaS+YqKSGjB6L+iMTRiiHTMQgIcEmpmUccT1YwaGF63ko5hoqF3ETzNB/XCMAATvXUjP65ofaRALFwWGeQhSQO6Q== 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 VI2PR04MB10267.eurprd04.prod.outlook.com (2603:10a6:800:225::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Thu, 19 Sep 2024 13:48: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, 19 Sep 2024 13:48: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 , Andrei Stefanescu Subject: [PATCH v3 3/4] gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support Date: Thu, 19 Sep 2024 16:47:23 +0300 Message-ID: <20240919134732.2626144-4-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> References: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0109.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::26) 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_|VI2PR04MB10267:EE_ X-MS-Office365-Filtering-Correlation-Id: d49c1b87-c674-419b-183e-08dcd8b1cd21 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|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?kCWe0kPPX/jnJifMF6HenMw3Af6Tusd?= =?utf-8?q?0Hoxip6lAjIg6kUZVtvSIpdLmH5rj29ayC1hU6G1ssgIu/Zs7XFDpNeGK2QtoBKXw?= =?utf-8?q?cfI2W0GDG/BuEskjfwRFbldjNzpBepfuz5FalaAmEVxBABfUkWZsNV2wjaccmVzpK?= =?utf-8?q?7RgDcEON3oNcMZGWBlBbwxryeJQj59UULgHspAlHfWEu8D4sP3MQjh46TBybXC6aT?= =?utf-8?q?aBYgqVUppizmrGvg6PtYkqn61w7oAJ8v/OJsJKt+GoKZKXJjL38dXJNePFXLzz/7u?= =?utf-8?q?N6tTJM4HZr1OzB1L/Xv2tMninHvhC8kCb1+g9aOpR9EFNc4Dw7aZ20m5eac2JJ0vq?= =?utf-8?q?VJuy8t4yOP5Yd02XnT5dzfvsLq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BB4iuNzTVqsDMRvDIBqmGEsj74VBXuAGX7pTKsK8k4C?= =?utf-8?q?52fQ+lTBklHxjyrH0m/Iu2Lg3h1ZRfJusA7f+cS9KA22tayQ24LNUpmb0ke4TEscp?= =?utf-8?q?XTgKdtWC8K5NcOfPfQqo2KCb4mnL+UQ4DQ=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)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?q8n24dS8lLuVIKKy46DxZuFB9Ie/?= =?utf-8?q?UJTLD6MYsKEK5Wj4IhM4zivSNtVlaoK2AEadXEhLjr4OQAHC2MIh7PQsFh3KFqzXg?= =?utf-8?q?dRvu2LgFIKHjHPDBWr6MZIhKKXD678+st3FhqLABNevqJZIE3yMLSB0jnV9jn5wq7?= =?utf-8?q?mP4h2rPQxEFY3H/Larx+xyhJ7O3zfd6E1prLuIu0iopxmmE2GoqkYt/bMxdVRhVc/?= =?utf-8?q?FCJM79/rK10nIlhoRXdEb5Qrdw+xZ3DVrNs2sVVkpSfauBREFOk4zNGRIYu6zJjRS?= =?utf-8?q?Ao5YJ1Jzsnq0WzYXjBqKJZmfm4wUTic7kKTEyIpHPsSzQoLPpeyLVs8TeqtnqqVRb?= =?utf-8?q?Gbqm1/2Lkj7pQA+s0RGZebnyN/AelnmRqpZ/l7ix3L/I6+ec9adg3e9aap9NbwSLc?= =?utf-8?q?VlDhAo0pxskvwviUmLsn5i8GoeJ3PlwxxsG+MyE4iiV1llyWwJGzjooHCDKGbAVlN?= =?utf-8?q?QEDBskOnjUPWiIUo5nPmXGHqOhP7vuzgylRfTLAPY8DSLj9bGK4fD4HdKgGolUeap?= =?utf-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f-8?q?KtC88+Y8sZRAZecDgQQp5U07hZ5LlNBUBxISkCr/KxChcfc+0ehq/P3aCqKq9pOhV?= =?utf-8?q?N1IrnY9bewnlvp3LHDKi1QRqQR+X0M3pgQiL8j4gM42Cea2pgULk1CruNHMUCwu5Q?= =?utf-8?q?dL+r61p/F1IoHIFIsaxa4Ppe0g5HDle44w=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d49c1b87-c674-419b-183e-08dcd8b1cd21 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 13:48:54.3706 (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: bxIzTghbWeyFM9cQPchyU66HWdhqCOuUOlBIYwXP1WoLs9MV9t5laZ9cp+DK+NtZvs469alT8pEy2RmB3j7Hgbzio/jcdnEsQ8ruIZiTPs8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10267 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240919_064907_995407_B5F7DBE2 X-CRM114-Status: GOOD ( 22.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 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 58f43bcced7c..75a6ca60ebc7 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 64dd6d9d730d..fb6e770a64b9 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -149,6 +149,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..a69cbb3bcfaf --- /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 = 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 19 13:47:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13807779 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 EA309CF3942 for ; Thu, 19 Sep 2024 13:55:00 +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=Ty0jPpd6KG9GHfJpRmF6LhWq9lq8U/PuHPpZO7NbLfI=; b=WAJ6PXrCvP5JwCT6ch3mtkx9dF 5LqYv95ETNphxShD+u+96hhEdajUmHh1+1q1RahM++XX1O7PsYB58WMfBf3nz7E237ncZs8q+3czv HYMPx32G0x9MoaWd3m8TsNIW3AbutAL7B84tl+rvimtSVoINV88VXAM0bU106foIAAE0gHtdGXXwR L4L+Mkrmj9uR/KZ0BcoTQSEyoDoc/RVhI440c0bX0JS5zpF6x0Y1nBvnLsWU4wtJC1VVt6WQTcOML R3FTc/xL/rHKLy9E/RdnKigV8WlRVWo2HVY7IbNJ8eRXkEM1ROzCDDDd0/DRUgcrCZ0VVELLEAnvk aS6bMFMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srHcM-0000000AO5m-30bY; Thu, 19 Sep 2024 13:54:46 +0000 Received: from mail-westeuropeazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c201::] helo=AM0PR83CU005.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srHWw-0000000AN8m-0Puo for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2024 13:49:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wJaxtyj0tUw98PHfj+hlDt5IkJH9Pk3vqbUyV7gYULztzMTBMxl/mY0rzAPPWqh5wcwSjufCXlL1eCaLsFe2Vcidi9rFCH4xKlghlaty1P3pR41L8CyCBJMHvZ/Up1F6sAIi84SkA5IWgzODGjItMXMq5oZcA7rtjBFkcWVDQ6xAjV67eGT/Rl9XZJ3ysA16fD4YWneD10h+F0BKk8jdir0Dcm896XmrkfIyXAMkTixGBs9scyN+EdInCYEnTv+8HaV++GPAB4tuYKIHitYgP7YohugKzZ3ekd4L8V8hPs2Cru7B5YJVVN+vk5o7MxhrCirlXLB3rYO5gHS6UDv5Wg== 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=Ty0jPpd6KG9GHfJpRmF6LhWq9lq8U/PuHPpZO7NbLfI=; b=RzD8N7TtmeuA4Lla0yBWQbr8FkTc+47uTdZKH6giYVLHmjIlz8lKuRLp8l7+9wc8PkV1bNO21nZ2bYzhpdPHSN+DJQFqJOOgcKf46T+pfdkQ1NZ0J5oOslaaSVAKXY5j/8v2KpgXADwn2dBmMIevobAjv/TJF69YJy9zDWE5X5Id2KscizEgm4ssMfamg1ptaHCMbEo/s7L/9DIMzMywXzqSRnwafxnyj8m0H+pGfrfkNx/RkNIZ/l6R118HqeSDp+Kd+ameTUBuGdzJ5PX0YeOYkWYntqhJXcVsz3XSUAJFbVSke8fJlLlvqffHWvWSuDgkpFJdLt72VEpo99RrcA== 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=Ty0jPpd6KG9GHfJpRmF6LhWq9lq8U/PuHPpZO7NbLfI=; b=jqeZ103ZFyvPpKdFQOFmgXpKibChZMZnDDm/zzL7YlNFlr7tNQnaxBD+2TAYQRvN5H0SgjhyJWsoyrIYgkAmW1JwILRoixcKi28xGdMW/Vh/nZv+T6E7fAjGjXrjWSVN155mlS05h7vQjfA6E0tTEj8yyyGrzQ4WXD911qKKFUkFtD7zhp+U5ADRh/3vbAcV5CmHaMWaXmSlXA/ZYCvYFyRSmh+lfFQAJCaEtNIM0zHBBWQxtPr6uPvu8nQDc3dLIhKlmSXrMbJWR2gSPTjDxQo2aq6Uj5djJs4Ubps2wlJzla+f3YmyhFFpwlqXMnGJkJUsNHrKeCUAaO0+Nq9b4w== 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 VI2PR04MB10267.eurprd04.prod.outlook.com (2603:10a6:800:225::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Thu, 19 Sep 2024 13:48: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, 19 Sep 2024 13:48: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 , Andrei Stefanescu Subject: [PATCH v3 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver Date: Thu, 19 Sep 2024 16:47:24 +0300 Message-ID: <20240919134732.2626144-5-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> References: <20240919134732.2626144-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR10CA0109.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::26) 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_|VI2PR04MB10267:EE_ X-MS-Office365-Filtering-Correlation-Id: 554d5ef2-dc84-44cd-5b20-08dcd8b1ce1c 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|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?BNLz9Dk3XPol+OIwNXB+pQ8/GiTIkVK?= =?utf-8?q?CSyFj4+OqBqbb3lnZPvwnaNY9mhyf98KK3XK980fr0bK1I1kCnIgDAE9n5GMyXUUs?= =?utf-8?q?GAQeKYOeKCVbTGf58saRvK/wnvqEWo8fT9etn2GutNlWbqA8/s1+1FbJu6XLQ3m0P?= =?utf-8?q?gA6mFXvR5CGDzMAle65WX2ls2yDb5w7u3MdGrblVRBi7/xS2Lufij8z31uKyt6eXL?= =?utf-8?q?bb3aMLfK88/57E4b+jOrvPsj7T5eSSr3GCtY7kZa9ShEIychAe5t6JSCtZ+CR1gSA?= =?utf-8?q?O5sfzh50gCmlTWYL5eBKE8EYBgjTKScv3SF7l4k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?utf-8?q?n2gwiJEe/IggKlYUQMOIrAG3jeWxyOzdJjsb0uq5gxfO0WBKdqcD9cqcpFJHI+d5k?= =?utf-8?q?lsxRy70KP7E3Zw/Y3mkRnXJay48wbR1EihDxojH3sverCTytv7lC+neGVeAddfiEd?= =?utf-8?q?CTJ9FoxcvURjPltGnNnTUr/L+4yuWQNJlA=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)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?bN0xkC8oK0t/lk9mpqibeF6j5HxA?= =?utf-8?q?w+CwiUZupYzlgffRFvMGVbSTAQmhEGQbMGI/v2BtMUDcz914/coi//O4ZYQwHvpfq?= =?utf-8?q?YlAi3BR7Yhzj87tND29lp5lhEr4r/bCcUD9Boe2W+wRzzbxwxoGrU6PXx/LYpPNWm?= =?utf-8?q?AnfA6V2HEqi8ieIP0VLUK/1ZigC41uaju901jTx8mmdJWBDoWE8833CKrgKxf59We?= =?utf-8?q?n0Y0gG3jObjYaVzH71DjVXfUMADa0hwGvZuzxE61tOLDJhH4Y/cYhGE+ZJW4UWTs4?= =?utf-8?q?yqayUbak4crxhueAfyqzst2C6KPY2QtfTOUzEHNTcQHG0EcEa4JysMGsWQaLOwyTc?= =?utf-8?q?hvI4rZSI5skW60XSSqGuYVWUYWKiZPnoRdlxJUc0NBBNdF9AiYeudwIMi13AupKdM?= =?utf-8?q?dBo3PQpksMzCZaeRWvHcyfD0zTZAyggmuvbiWjxIMv26texQf1/hwWUL0zyCRs0Ee?= =?utf-8?q?2nvdTGiOjBbXNWHyh+DYboZ0H72UVNB5DZD61Y6dN8ihcS1n31s5TmKXXWudU0WUc?= =?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?q?LNOPHZ4cdFmeLsftbX6vHTvP3zz4xKBd8VaHSlGD1ZTKBc870xPUtuHY/+k8lnX8T?= =?utf-8?q?1i0cRWB/NEPg+7BzhO4k9ZdndjXME/Kexb5+0RXOoX8Wz7nHN0WTzWbi0WdaAIv3U?= =?utf-8?q?u1aLfsbXnhKYP9r0DQ0kaoGx3L259V6A1Q=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 554d5ef2-dc84-44cd-5b20-08dcd8b1ce1c X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 13:48:55.9872 (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: eDEu7Uk+WqGhH41FDzvyZtwtB9fcf+8JBVj8knCvGN4uZy6sQFjkzFhkmPVDQ9nz1G+sLZwsnDgviI8cdtoQOpov6CMNKASBPjodRH7l5vU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10267 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240919_064910_175341_6281E4E9 X-CRM114-Status: GOOD ( 11.37 ) 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 42d2d950877c..f47bdcb2c1c7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16585,6 +16585,13 @@ S: Maintained F: Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml F: sound/soc/codecs/sgtl5000* +NXP SIUL2 GPIO DRIVER +M: Andrei Stefanescu +L: NXP S32 Linux Team +S: Maintained +F: Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml +F: drivers/gpio/gpio-siul2-s32g2.c + NXP SJA1105 ETHERNET SWITCH DRIVER M: Vladimir Oltean L: linux-kernel@vger.kernel.org