From patchwork Fri Sep 13 08:29:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13803101 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 84B6CFA372B for ; Fri, 13 Sep 2024 08:32:54 +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=2azDZqodn8AAhlAQVoBzAcvBGio6aTaqiLcdDGJ007E=; b=wzP6Q5u1wA91ISfXlttfAKskgV jpU9CV1khyqQH30PXPb7G/xBIk2rVMs0D5Qld3NV8Jtb872f+ywLKkbZe+bTbOKRbmpmR//tyAuXC z3813+oNBV+cgddrc/7NVs0dcuEipY5gNgQreSW2yIjEq4k2np0MKqq6cY+5gzIBF8+hH3As1fIyo 7I8tUUF1C6dIkH0V3ROrwJaSmLbWyp8yMF+U7GJx3TSUuyBGO7vrAo1qYMRbPIZff5r7sSEhE+YFF U1F9dGXCQD2+TEv9nrSkDBp5QXo9iF3tGdlrVgMFpdmolZ0gmpW0RMVbQfRVeSrpTuWDa1Rh1RXxl D5AsmDBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1jL-0000000FLmZ-1DI5; Fri, 13 Sep 2024 08:32:39 +0000 Received: from mail-am6eur05on20616.outbound.protection.outlook.com ([2a01:111:f403:2612::616] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1hI-0000000FLF5-2Tnu for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2024 08:30:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u57hf/hok5Uzu+ptxvjoTeKAuB4+hRiUlt82HOmC6+SQPfmF/gWzXv9IIkoO1uzR1SeHBW34ET4GpQIOLB1Y6k3UHAs8zCszcI1IWUaKjTILzeVd/vu9tPleaN/3z1RVlpLdTMYdG5XHEyBeKoqyhIouAhbdGz5POkoojcvZM2t5eWrpzCipWoe7/Sdfpv/lWjUFpBUFaV+mItB4HMI7/0d+BFO/YIVl8c6BoyFqcs2oq205bLnM0zsgbItbL1eGvi+NDf+KyTchT2AqER+AZHXUhg3zKHF2ApL7chS5ixMEfqUw3oM8vwr1WmIWjNpFOylQxhIPaRNraBDcPvKcog== 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=2azDZqodn8AAhlAQVoBzAcvBGio6aTaqiLcdDGJ007E=; b=R67aC3I8rRet9H9mVLO4W9F7kKTdt3G7KnAKdDRjJf+GkQptcZkGNhssYyVza39sjcb8bfCT+8om/PWpFmbh0HJqU4yYaaftj+yecoBNkUa1ckzfISyOMsbN/OCARmFKpM/P9C/dA42E0nMKB99bFQ7UgzYVXTgjsis5eMmKZrKioSy0F5ugo0mf8FWFqBlMA60nro0JHIPsEdcMv61Gqg9CkuaTPYugnHjseATjUJBC/qxACepy95EAAtPoKEjHwNeeAiBuYQQtE5vyzMjjLxyzE+C50legQMV7eR+M6H0vWdSV21JqBxaiMiXZg9IMTCh2EYKWOsJXJvMLIV/xkg== 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=2azDZqodn8AAhlAQVoBzAcvBGio6aTaqiLcdDGJ007E=; b=REffQhBtfuo2iX7Ra6TtHFJECszgacgZoRJ5nKOJMO6ydbNSr4JVi5sjcwWX2JXaYRPh2GzGtj3mYtu1zaTSOrLuIBr1jA0eyMIq+TYtk3sh9KzOTog8WhQIggkP1IPcyHty1h61H/6Lrx6o+KUDMdopEpFMtdRWARFj2nD1UOvKVCjv8gZtY8rt1e7C7Gio3XR5we5ywdqn/9bXWwhGYdwE45XJKWoDZjUwEswpr9EkccX0Q36BB9iZglpw9JrvWZFRKR4ASRum+1GmHneU3JEnBm+XOPoL3BxMO3aqpzKZYuu++a7qdhkNa5OAMT9ew57QJbIuyB6VeQkRwTHAVw== 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 AS8PR04MB8403.eurprd04.prod.outlook.com (2603:10a6:20b:3f7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Fri, 13 Sep 2024 08:30:27 +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.018; Fri, 13 Sep 2024 08:30:27 +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 v2 1/4] drivers: provide devm_platform_get_and_ioremap_resource_byname() Date: Fri, 13 Sep 2024 11:29:32 +0300 Message-ID: <20240913082937.444367-2-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> References: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0134.eurprd02.prod.outlook.com (2603:10a6:20b:28c::31) 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_|AS8PR04MB8403:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d70aecf-562f-4401-c174-08dcd3ce51e3 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|52116014|376014|7416014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Ctfl9c9Sn1O64LJFIoETVtVChcb7H80?= =?utf-8?q?4btr6tzsZ74z7zJu7KY44PuvQmg0uPnr8Yb9NIm6zflsPAAwg1i/Hvm0Pwl1uj9wF?= =?utf-8?q?aWG4iEMeqwDHod56OTLPERwhYo4JJV5XLl8tGQs2YCz9Hax6xyFopqbANwPpZ2MYZ?= =?utf-8?q?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8dHqHGOMaVrsnAv3dqNRgIvnjs43NmynbMyOY80dYSGjl?= =?utf-8?q?UkIa1LEjAQPHqKLgKXcgNvpvy/dEzQzuqAjDPKq3F3WfOpX9JwhgVdR5+0MLPhpyU?= =?utf-8?q?735VORrmXK8AqM+OblcJE/rWZ5kw1GSUVYtdWrKP37gZ6Mb29J1D7AwZHmnzChCjR?= =?utf-8?q?Bge3GRS+omIv5sH+aOXdnZrcMJh+aUrD2l/HHcn563R+0cNYjXIr6MLESzafDpxur?= =?utf-8?q?ClF0BwxU4M2VVs8ydij2Swt8u+YJcopWkQqTC6udu+7BnBYsZhNQXq8fbRjEHnvPW?= =?utf-8?q?We9UV7tYenYw9QdCan4IDiuQ0Etv5VGq4w=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)(52116014)(376014)(7416014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dijk7M+I2MWmsShmPy94vc8ZSfhh?= =?utf-8?q?8a0F9NchJxxCpJZiwIOGYAO2PN0eP276jzbTxL8ZwMSVJdn8N7yZg0AUVhaWHCIzw?= =?utf-8?q?JWIFzYe1QS1fLfB0RtQKHIwm6rRpDa0Tf3mSxsgv4g4l96fVnty8P1w7b47ub9g9A?= =?utf-8?q?Pfk+VZAg0rao8qOSdwc9IFtPCUQScd+ctrPbziFs2X93Ps03WfHT1O+YtfRQOzWzg?= =?utf-8?q?ei0JizoBtPVphF2FxZWgaOULgT2ZYPIPtWrDFv6ec34pWmKgTWuaivDfw6HpcfOXp?= =?utf-8?q?s21jLW+TuAnssVvl0uVyL1NNLHOCh9ojM6FWTNoyCO4Utnv7kU7xm/xW++Go5MVx5?= =?utf-8?q?ak34SO5folDEZ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/Bq630pGPx5jb+5IbrEbgsVqXGjzJ4Fp2B0Z1zNL1ZU9ZnqdWz3sC0krzmyhx?= =?utf-8?q?qiZmGjW3qaXrveAbZmbbesyvOWuEBumNz7J4onroWoIEkQ04BrqJ5Ci9QJQ+RaDKF?= =?utf-8?q?RgEsBXwgNIpK6qWRGSsVbDpDraDt0Af7p2+rmY8dOZUppk5E5l/IAPVZWtjZL7HKZ?= =?utf-8?q?zsOiMIg5IHl5ikdou04biYosS5g4aPpLeBpZaC6fG5G8gJLWoWlDOt+kYcnPV8R5m?= =?utf-8?q?0nyyNmIh30pkAP4lKOm8emhy65u+P/+fEUcnCWV3edR0tZgBNXSUTZC84n9qF//0p?= =?utf-8?q?DAxt/N1ndXczPM/VRDJpwpEb0ugX9YZKeQ=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d70aecf-562f-4401-c174-08dcd3ce51e3 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 08:30:27.2310 (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: 3jJrLIKY/8Q2qBU3t8bfbIvUnwCW9dffIpkBGoCowRPVYoxTn0MDqNJaZLeEZbs3p2EE2K9OLCRaYP9kHYAhZ2RrrddZKn+tiU/RIkDOfOI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8403 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240913_013032_682947_071051EC X-CRM114-Status: GOOD ( 14.97 ) 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 Signed-off-by: Andrei Stefanescu Reviewed-by: Matthias Brugger --- drivers/base/platform.c | 28 ++++++++++++++++++++++++++++ include/linux/platform_device.h | 13 +++++++++++++ 2 files changed, 41 insertions(+) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4c3ee6521ba5..ab48c02fcb2c 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -108,6 +108,34 @@ 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 instead + * of the index + * + * @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 Fri Sep 13 08:29:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13803102 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 D7CB2FA372E for ; Fri, 13 Sep 2024 08:33:58 +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=X5dDRoWfvkCG13zFwyXpkOObBGZ1HJIYXLS5QmuFios=; b=r5dVgjOYpAGW+BPMObYc7BnXsi F//YdLae3eqvG09seNC7bAySaVjUSNTcUjgdAczTZ/cbnK1ylqXRi6KZKLjclzewKdIWUqxwpFHBN 0AUVaDn92ObkzLO9DwTlYFRF+DwEbJppSofro0I72K8Ve4lgQmU99oQOd1YUA2uvOtSYjOaHhMFhA gmTdwh6e2yyBFPr1JcW38opYJo47mB3W1nUaMT9uY4B5v6FW4dlddL8ewcywR5iD1OWIKQ4+DAgTW zfNRJKYTJdH0flfG6Zwk9NfXnMecIs9P4LvvMzGz+Ou6HezQVNQf69JWru/4+PTF1bAY4ymnS6F44 mrMXXi3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1kO-0000000FLyu-1D76; Fri, 13 Sep 2024 08:33:44 +0000 Received: from mail-dbaeur03on20609.outbound.protection.outlook.com ([2a01:111:f403:260d::609] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1hN-0000000FLHj-3XXg for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2024 08:30:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TKX/A4LddseDVyIVnRMjVII3dzLb8bz5LyB0mxVUvtdkZo8E7QDAM1nfaplagtEeEADW6/tdf4dpQOO0gesh5smZPxIRsrhRqcy0jxOq+svHWCiS+ck8BcduYBxRRrCBBxzHxBumM1RtiILOudsH6AnOVKQPoQ1Ux/Q76Xa6qrxd5OQHC09SM/hE0O9J8/iNP878B5ko6D7n8MShDcoBNi1zTgMfsUs+uDSBIw9oUk7BNetGgEEWekN4GAU5TnhocyHviDFDhS2aocoNaPZ2VWI7R5B708Lr3N4FfLJIdsgYvpvXUQLEjhGugnBFhkFK9erYcH+C9dWcyYg4DmSu4Q== 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=X5dDRoWfvkCG13zFwyXpkOObBGZ1HJIYXLS5QmuFios=; b=MC1TDIL4L8OtEtIL4Ugesd8G4/1D1kNM4OdBWHXGWCEfSEFg7sD+Geq3UoYaVPtSVgzZtFMLzSC38e9HcBx9k6ZjXXC3qZsKRL2ZAV45HD/0x8CASValn5TBHlpMZSCoaNWK/fV8BeIqFRjj4+U+6OuF0TFjSllNvtuhhRZ8/P2fmEJOZnoiMJSFwhNhjZnoxDkA1vvK6DzAk7KbJV49TgH2rK3ynBuryn9Xyn44KLQneRetpbjLlmnCxNC4n3vLpZEjTG+Za8ptH4AS3HrtuRC8l3aqB01SPWn5o3UP5DiGM2x+9p4vC6ZYAsPvhmaRmblkH3xBlg5f2ymqLjTyqA== 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=X5dDRoWfvkCG13zFwyXpkOObBGZ1HJIYXLS5QmuFios=; b=ROGp2xCbva8ELc3yp85evt8Ekf5Cxm9KS6blJj2ojrCF3MFUCr1pSiA2DRcmv1IuVZXeYzogfiks0W6hCTE9NhV86G6I6zgkl5zGqNzNwyzHlnaGlxDGWMkCcSpHd/eSIvMwNVCrh+a4A7CPjX+QKE15w7XJOb4ChQb1N8nkYNdNIDvEjySqw0m2ZVFKl25KPTYa4TKc456OGoi2oOCd8kan5xnX1RWIj8SU7b4/bwJeGhRlICFzhP/fu4+xFKP+sohvPHX/LP1zje850whahW9vXx9fTrstOmZ1I3Kir7zWBljfcEHbmlPdCcY8ZkfWHuJYdaz8TaBFlHz6z3NtWA== 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 AS8PR04MB8403.eurprd04.prod.outlook.com (2603:10a6:20b:3f7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Fri, 13 Sep 2024 08:30:32 +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.018; Fri, 13 Sep 2024 08:30:32 +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 v2 2/4] dt-bindings: gpio: add support for NXP S32G2/S32G3 SoCs Date: Fri, 13 Sep 2024 11:29:33 +0300 Message-ID: <20240913082937.444367-3-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> References: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0134.eurprd02.prod.outlook.com (2603:10a6:20b:28c::31) 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_|AS8PR04MB8403:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c4466c5-0f8c-4d98-789c-08dcd3ce552a 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|52116014|376014|7416014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?mV3c0pXIv91S1oHCYKVBVyr3vOZis+u?= =?utf-8?q?QaB2hN3lSIRceAjLdBTd8BSbetlQx345UGC6LDPHg8jU9lufZML8fjfZjXkwS52RL?= =?utf-8?q?SMO3NdvrQsGwdQ/awmae6N+Q2il+3MWJ/4GrB65S1OTh0aNUEWgMBOsmgSxW/P1JM?= =?utf-8?q?OVyLIFkQjNSBhgZeA3/DXGK+IHWbG4iQwakzIyVBx2bNkf+GZT9V6HRL6tYtc2KJ8?= =?utf-8?q?XcA8Va14Evsv0osmZoEmfcQcWbaj2DWFMML/qMncVSGVY1Z4kikJdIuf8FfLD2qUa?= =?utf-8?q?FkDvx+aO6d33pJQ3fansTNbNrtzB+trC6bQig2VOp7H4Ac2b5SmMMnyMh7d1vrWjO?= =?utf-8?q?ch6Q6MstDK5fYSg1GAox2X1j2bRogaV/Z4P+RFBoJMnB0PGh8aknxev9eb291bfjk?= =?utf-8?q?t5DLQrlI2c8tEVICldst4eNdSfT2H2uYOciHPGpaPp6EXL3Zf27LnIXp5gKwUI6so?= =?utf-8?q?QfOEkK6jGnrb/vO9fFVqg5YgbPUykH+MvSLoTq6l5KPL2pVSSOYLM0MnhJfNd5VNE?= =?utf-8?q?TjAwJfzs1auD7rQxjf8zSdhobsj8qWPA6o/rmtKrukpyc5e6eah1ia4K/y+GP1NIV?= =?utf-8?q?2saxqwdc5S+BGe+k6VX/7yTaCTHN42EkTzeGKWPNKoA5i110BTGXar/i0evq6HTnm?= =?utf-8?q?eWNzqO6F/4Z67CB/tR+k/1VO2CCIqJe03D0A49c2/PkIwfPuYqQJ9mz/ifPiG41kY?= =?utf-8?q?cAKI3ymmB6eggrrjYBvvYF6mXRkMaMQCW795U7mnuNUss/42VmlFEi8r7/W8B4xTA?= =?utf-8?q?jKz6DHLQ0ZS/foh3tYl8AtHWO44wMO3ttesG/IZhXHkHBjRx1SJHwqXsFgI9e1mXE?= =?utf-8?q?yC+8FEulBPadbMcgBgtgP7n2H8VoTdsQgcLPZfgPUOObo0sOT/Rt0mZhivL7Ys5nm?= =?utf-8?q?oonTcs5KH7O2xdLMppA6lk/THZpYkgsEVBsAJytZ2XgXmjRTfaKYtfI2VF3LGk52Y?= =?utf-8?q?mFyMxHm2MPyLx0lzsbBVD02i8ZmFoTTI/LtkSVcynGtNdh4tc504LUfkvAD4c5VYf?= =?utf-8?q?zIrrcAvzyCgK6n3OnxUcq880DCDJBiAWqP8hLbHVDHD8R8YY0HUSQ3JKkfdrWS78w?= =?utf-8?q?bYFxYGhMwy9uTRnakFR/u6dVW+YNGw5/W8jTf5JFLADY9u5KBFcrfIC+LHWOJ/Lfp?= =?utf-8?q?7VJx9kZ4qpOjyOJUAo1zk3bsikEuTXyumcbe3hB4YmOGVHTVXC7rsOPNSq/w0HS9G?= =?utf-8?q?RLhp5Hco5kWdvli2hDUtkShxes1+4/unyc8Lx/oYzYKRrRiAj4Wnif7M26kOW/4ht?= =?utf-8?q?urq8SqlDUYKOQM8AVDGIpWJqUcez+AlOc0EEz2fWtdtprwa0zRGyC5h8=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)(52116014)(376014)(7416014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FhTH5Nm/ggq7oDEgP5JITViZjvbx?= =?utf-8?q?0i4gDr79afYdbATe/Z8PLNDu1k9iVbGKFnpp/atwPuwYWVWFqnbQ3JXgYmZNP7fLX?= =?utf-8?q?RY2vkwv5PkkLfBgsOqDtv66HJ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sm52FPcMcRqAI413WRtjsHgGuLOTe?= =?utf-8?q?5Iz+XJDWhVizucvnnmth37IHrDN/iedl962fr2wMXwdPJmefaeM26BLyFnV3uPZcD?= =?utf-8?q?4fC8npUPf4yGfsYYbs3QWZReBUdn+x0vo4P6WxrL23xJo9cD3TRL+LPzDWIBomX5x?= =?utf-8?q?hPcvMTjX8T+mN9iYgDeiArNuE6YwIlEepWK1oJtmBTEVzGgP019o2aSWZiHUpO5oZ?= =?utf-8?q?Ke4l7j4jjnMFKdDCOr2hMKD+zrsSSg1sqV8dRUzEc0nPjVHyqsbrd0TQYpXl0k1vp?= =?utf-8?q?sX7GunLP8X24MaJReUkhnMjsj+a70BhMqE9QL8zpL8cCTMCAwP9/wnrxEKGMqSUZ0?= =?utf-8?q?UGcaekXEeq0Zn+IsbG7WMtlGQnokU9n8JcqPdB1xhXwG9UyfgXkcpGWoZjT8SjuX9?= =?utf-8?q?kpDtD4AoT4poJYeHXeiJ1FD/oE3rRwVxjk0dt2F+ZjIRUzGmPTpXr9ubZtwrauBIE?= =?utf-8?q?6aJIsad7YQYPrOEWpzPm96ekL1KBBcrokw8LhTJ69v67Lklls51vZh+lrZlCmAsmD?= =?utf-8?q?LEQdCTx6fYYAI0Q42lh0DBxlwujqI6sGcQ=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c4466c5-0f8c-4d98-789c-08dcd3ce552a X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 08:30:32.6834 (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: zCkoLu3OvC4vq9agKAjPVvwmSbrQLm4IdCw+oWMfFVkhlk6UFnCqqn3UUNjHr3sZ6KfL908nyJ0DYsS6lz1b7u0RJEtRMXVZ7Fuo5wfghXQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8403 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240913_013037_919447_B8915B33 X-CRM114-Status: GOOD ( 16.17 ) 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 | 106 ++++++++++++++++++ 1 file changed, 106 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..8be8eb3a971d --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nxp,s32g2-siul2-gpio.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause +# Copyright 2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/nxp,gpio-siul2-s32g2.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 + + 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: siul2-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 Fri Sep 13 08:29:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13803123 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 1D7D7FA372B for ; Fri, 13 Sep 2024 08:35: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=/T1rLla+D6DfujtTtzBu7C0IpGMDpAsMtcKH5kh9sUw=; b=a7mYI2Re5HAbG5RewjmHO6TJB2 0IN0ILXndy7URKwMWVPjNJxYThBtI+hY8Ib2dHOPPjwuvR6N8tTGOnNXwmkATBYTnYrcugJDyUzEs dg2fo9FeW1MAZCj7JYSvCOE0Ragy/pG/7oB2eM8YO3PIDEg1jJw3VJEbMV8M9Do5TxbMOnVx53g3k DVZsawNK9kWB2F12s/oF8vLriN3OUoFUpnpN1kDPpxFvkZXce2JvEhGDuVt0S8K8mcFtFS5ktclSB recFUV5xU7WSRxfWqgAHwm/hVAvPRMnFLVj6E9R2bdWaBQMbAw06u80kJnrV9+aH/jXRUmR5rwm0R rlai6yPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1lP-0000000FM5i-2Uki; Fri, 13 Sep 2024 08:34:47 +0000 Received: from mail-am6eur05on2061d.outbound.protection.outlook.com ([2a01:111:f403:2612::61d] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1hR-0000000FLIy-1XaV for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2024 08:30:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H26lUhUpEjAcT+SNbfm5CZxgOVV9OdMX0wJBzB1rUT6iWUG+5dkF6yaFxMG3m7WEox+OKluUP+ITKgHXDqsh+ztZLHsm4z7ZPQnsdBrISlRTaTf8sAZJva0xKl9xlXwNi3H1daaCDZhrZ5PoVflu5S/TK0+3HzBkEU1NzwBlDAB8MeTqmQufsk4YKT9oWzc8tozC0rl0hwVJLeU6mZOnHoS96hoV+6bAWEOb0mCiwjzG8atsFThOl4DBXj8N5Yt1ZLxjzba+rfBbp0E4vfiH9+gdMDur5kOJqGUC9pb8tMDr/vt0gcsKr3cvM4TtqzZKg4gxTYu6wYxU+3oBdrZqIg== 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=/T1rLla+D6DfujtTtzBu7C0IpGMDpAsMtcKH5kh9sUw=; b=mJSsncikqNzTc5XMyhzV6S8BJZ1WrKuc+MrW8Rcbr4KEo8dcqqKlK9NIk5sGWDQeHRxnAOID6NMqFAhm+2hoadGZeoJ5OIqL+jmyhiX8iWLWHRqNdyT2x6pdpYavyHjttwWQQeqMln/Dyx3WtmpeNFpLgZSy7Dp3XAxFyLDulDqj+uJ1eSx4rMC+VNFMScj3Fa0quNIgprOgpBsLC0D0FnXrzcykr+Wg5Acv+NToXIC4HQsmBYjVymcGF23mL2xW331sem9ALJ+nfb251m1nhxUud8lDMrRDAFRPNsAMeVRKtbCF3c85/M8nPVjBXve2nAdNEGCSTfaFquqwsAWFLg== 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=/T1rLla+D6DfujtTtzBu7C0IpGMDpAsMtcKH5kh9sUw=; b=iIs0TzH9SPUcMeofEUlzkIojbFcALGu8s++5J6ce1xyFHfqGO/ghbtspD228DSBEkT/RHDK4/WarisXVxSxAw7ZNYUM2rDhdP7JpTsVT5oW/YSDKv5s3OTs2qEB6DVe7hd4BeJrOqz6eJWl/JYGl23qLnmIbmc8T5StaBTgoYfLP78JkoECKxX3fsgr4YL9eKq42lQ7fTvSqPR+DDdSfHPgdEMphRkHaWzxuFun602iqR2Dde6fRvOoDWJczWDIRVJxUUNZm7Npzlv6wgfzX0dFr2ox8sDPXszcwYSPfVPOoMLQxWp4knMfco2iMxvY+FbT3qguG4gwTDbLvRBheQg== 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 AS8PR04MB8403.eurprd04.prod.outlook.com (2603:10a6:20b:3f7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Fri, 13 Sep 2024 08:30:35 +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.018; Fri, 13 Sep 2024 08:30:35 +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 v2 3/4] gpio: siul2-s32g2: add NXP S32G2/S32G3 SoCs support Date: Fri, 13 Sep 2024 11:29:34 +0300 Message-ID: <20240913082937.444367-4-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> References: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0134.eurprd02.prod.outlook.com (2603:10a6:20b:28c::31) 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_|AS8PR04MB8403:EE_ X-MS-Office365-Filtering-Correlation-Id: 96f6c686-1b68-4887-60e2-08dcd3ce56f0 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|52116014|376014|7416014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?jXjUSz/pD4EEDxkroKFfD2bVEX4cQPO?= =?utf-8?q?fKPIthZU/XOX2TXy2gDjrIv039jDE53Mv/4/oOvpgmmjW4q1IjfqRKdBofypKkTjO?= =?utf-8?q?KAJl8f+9g1A/0zVKYI5on5qbh8zqCEI8iOHFSezJdsj71CabpxCF6Neht0Ki8KAGR?= =?utf-8?q?GrMXPXzLoI1fWvQHtpjiMmhCKi8UM4QLoLOl0NqWdrYKfB9yLdY0xVevdsdS+nSpC?= =?utf-8?q?uL3XWBKVxuUPypmQCQOZKypzbEFq+psl4zK/LbIyZi0MPLBKq9mg7YLsSuEy7n3vu?= =?utf-8?q?mvlMstRzxUxYSGfd4U2zOEd5G3+5eVgNFyUsgS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NAlKB49BrNy/XK3diS3?= =?utf-8?q?gOOmPnPQIm9aPnAJucSYJD8ZCNmCGun6+NkFFKmu6RhJltpwlCTBHcAaROJoDI5z4?= =?utf-8?q?2VqW++3NNlheZlSs7ruKbSHh568ErD6d24ZkDUzwMK5cWTSVLFNZ0kdMD/qJb439v?= =?utf-8?q?PgC1WnmMoTsPMeMmwg/rzbGvsmXGgo6ygg=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)(52116014)(376014)(7416014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lvMr5GjpKWJ2NBILacqgpiwzI3kV?= =?utf-8?q?p3E91IA0pI3fIhYRH1rAdb7DsnW7NMkyM4nBnnrZP5X7N/1jfEtibMro3NSDCigQS?= =?utf-8?q?jvff8n+ELgiV9H+KIyI8DPVmnjxkYQF8jTtjEO4yueha0FzVx56eWjJBA0yxpmVER?= =?utf-8?q?yyIA0p6nNMKVZT+NPnz9TFYr1O4Cn+KacJZtdc/OqDv6HaR4wPplXOhkXNdhpfAqg?= =?utf-8?q?dT3Uw8owt4KedJB2KW/7KlJe7kT8ax8oQzXoARBaQ/lfX3LAFSuLaBkP7VhZs6AJk?= =?utf-8?q?rFUjz9zkDzHbiy7cpi/5VmY9GKNwvNHgpIoAHuPmTifAKxcQjFQYIpbTMwEvpjGHx?= =?utf-8?q?CiagINoBCCiKc0Bs+1xRWMjTPQqk0meg8n7GlwpEkYvVl8AeQHGeeq/R8aXjB+aCW?= =?utf-8?q?9aYOVBkZ63D53FtKWzXVvbTbu52bsPwNa+6JkVPr2RV9OOmIRamX6T6kNyTFG6CLu?= =?utf-8?q?mCBUVBvq0wbfBn2gWB155NDeAi8IGIMOb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lAZTThDlJmQ14lIgTTYy7bD81P?= =?utf-8?q?1fzsqp2UU664aySHdqCywOb7ueJJKwmThbhP9o1vUEsr++dJC5KsM64zuiFXaRF/W?= =?utf-8?q?IZZLZD7eZPV5hZNhh0a6QUBiBsvZqJZZBz5NLK2O57bGXqj/LHSvvQu3lGOG1RD8B?= =?utf-8?q?HR80+NgNJgeL7dROPBPRiElzhdjmBRM7WA=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96f6c686-1b68-4887-60e2-08dcd3ce56f0 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 08:30:35.6788 (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: AHWbQwxUvfaD2rNI4Uz17mlEXeQ3+i4igBP4AdmMh1fs31qV6oryhMYcWk/p6psjwW0bEyaEH8Mg7zHLcUvZCD2eqKdebDZcPqvCNtxLBLI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8403 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240913_013041_600568_B51764E5 X-CRM114-Status: GOOD ( 21.49 ) 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 | 581 ++++++++++++++++++++++++++++++++ 3 files changed, 592 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..205a1a4d216d --- /dev/null +++ b/drivers/gpio/gpio-siul2-s32g2.c @@ -0,0 +1,581 @@ +// 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) +{ + unsigned long flags; + + raw_spin_lock_irqsave(&dev->lock, flags); + + if (dir == GPIO_LINE_DIRECTION_IN) + __clear_bit(gpio, dev->pin_dir_bitmap); + else + __set_bit(gpio, dev->pin_dir_bitmap); + + raw_spin_unlock_irqrestore(&dev->lock, flags); +} + + +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 Fri Sep 13 08:29:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Stefanescu X-Patchwork-Id: 13803124 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 0B251FA372B for ; Fri, 13 Sep 2024 08:36:05 +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=QjCSUOOZVM71QFpr7noHcDioZNtuSHZqJ2aVZ5bo8cg=; b=GCksNGJD0ls5P2o/3nxCgydqp4 BYLZw0S1dYlQpKjQkUY/eGkbSciRZ55ZvqwVqxyW8reGiNyTHGUcby+acfNej+Yf+v1rWCrNgAA01 mYcpEXNNL9HnmHPfurtKJ3L9BGvB069iaOGrxFdbFRJrM42PLkKNIwjfbQT6vWHzDKfvUjZxOSyYy EiBcBMr6LVwsOYIigOghQcQnncchR+fwn+6TJaOIv9ph+fVyRISdticU1ojb3E9Ag6/hvrnPXaFy3 DLguQhv32NWiO7e2RzK9Zdz/bk9d63nlrfhKDTJ9UW3m/MhvUIIRItnvK6gVUvwwB0KGWGw80bBz4 uZ+xmIRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1mS-0000000FMFC-1mhU; Fri, 13 Sep 2024 08:35:52 +0000 Received: from mail-am6eur05on2061d.outbound.protection.outlook.com ([2a01:111:f403:2612::61d] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp1hT-0000000FLIy-2slP for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2024 08:30:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iVflI63bHIcvsVSs1Jg303Mz4liab3xcNnw2UpXEjqzMXvpMFpBCDwmLd97WsvleUvMFyVzDCOXjYC4orn3UPK93VrOCo9C2YhVF8TAZNYcepRRtzgts3pTlfEd0v9z6vuW88GQytu8awoa1VcCOtwLMDewX6cojN/WteF1pRx7fh98C2cxzgtKwvCl/vPdZqjxYvirEgb7/qdluf0Qr26bd54LuwdxqLCPxxIGrVuLZ7/kwvAnR6sA2hTAiX63KuU7It4oPModqrDECqsZN/ZnLrIhFFO/noCQQQM0QJ2NcvgDIaQZERqHl1S2IN9UAaHDp+ortTUSW/wLDMq0ZYA== 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=QjCSUOOZVM71QFpr7noHcDioZNtuSHZqJ2aVZ5bo8cg=; b=AUOiXG13TK27GS38DS8XW3r3YrYyb4WcmyHJ3iTBNHtUf0YmMxug/giXjpZJhoz1oKHh1+4ZflHe56cYm1modO7k/IH+5uk/etopiiPL7PhY3PLlTSqU1rH7kk5UAjw6lekVAuhVsWASGu0xWHolAo5L+3KedxbNqJp8PqLsIZlYjb8TjzDS2Rd/dYhtflSYD2AtwIDRWcI2O+anjRfXQLCvLv/HMFPzive46awObfsaJaln74qACtUwbXRaA5YHbYYY2dPV7eBKof4uKzvg/BrDpSM/i8kviIOF+KqpGYcj1b58mnXr2tuBK1x98exwuAaBIqMpeZJBsD77rzj4dg== 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=QjCSUOOZVM71QFpr7noHcDioZNtuSHZqJ2aVZ5bo8cg=; b=wApw0FDv3bVW270zogDJmQfC+jPO/EiJS56AcFpxGxIbc/wJS5daDWO8R8ehEXkxkru6n8ddtcuPA0EzWddXJVftZ60rFCRx3upmwzDHBUVe4hxdbMD3CGZ9xOwQv8AKeEHe8g/P6alxz4l1wtxCEEFIfd1LJkFlKVfkR7SAeUi78Gat4impnBOlNpAqLgWy/BWRY5w6EbrYzsGNnZZqHl7dka2SIDW0LUd5iLzJb2rO6g13TarzgxC5q90Nbw2ActHrFtWPvTzpqYKwJUN57O+bHK10EBamApFFL/xFPlqOW8+r5AEPBBQyfc1O8g2Gc+HD0t6BXTo/yCr9pqOdeg== 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 AS8PR04MB8403.eurprd04.prod.outlook.com (2603:10a6:20b:3f7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Fri, 13 Sep 2024 08:30:39 +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.018; Fri, 13 Sep 2024 08:30:39 +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 v2 4/4] MAINTAINERS: add MAINTAINER for S32G2 SIUL2 GPIO driver Date: Fri, 13 Sep 2024 11:29:35 +0300 Message-ID: <20240913082937.444367-5-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> References: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0134.eurprd02.prod.outlook.com (2603:10a6:20b:28c::31) 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_|AS8PR04MB8403:EE_ X-MS-Office365-Filtering-Correlation-Id: 2857b8fc-9a75-4aec-16f4-08dcd3ce58d6 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|52116014|376014|7416014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?FT8vH5f74nRPfns1U6pNnwHSnjLEyaH?= =?utf-8?q?B8m0fu6dVSzAoTSwf7qMICRv9YSpIqWBtb4VBcuh65thVAt7jJEMNQV7nyWCi6Kea?= =?utf-8?q?rLygEwAAfGEuJfz6Mu5S7ww1o9NgcyVM+LsuR2SVIPX0hph/oVnJnrfFbzyNDdHSG?= =?utf-8?q?ChnxM9zbj0d60ItV1UL4shQuhXuRQlyHvyxnZXw9sRMDlLfL5De/cNkbUKr8gw5gR?= =?utf-8?q?emkQe25FoOKvYR4+ZNComfWPDKUgIaljm0fqUqILrbsEtLFBETWqw8kA/IZnmfygX?= =?utf-8?q?EUAXRZD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U84HLGqeXrc26bz5K7pshYeCBiB+VBTDaQAGD67CTnqu9?= =?utf-8?q?ytphrmjBnHwXAp52Xl72k8SpWd8uORRDyRzWiVk8t/hLDFJVtLTr17bmVEYfzr35U?= =?utf-8?q?f0o0WXbftuML7UgIojl8H2YOo98BT7ebNcg+SkIQP87adWBt/QF/j6rLyyuxb/T2b?= =?utf-8?q?cbutTS0qMTCeg9FPua2ptgCEDLZSvbvckg=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)(52116014)(376014)(7416014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mwzPPhaxMd3MJOaNiRZogMaP0j0Y?= =?utf-8?q?VJw1/JY6lURLN4ayN/qq95erPNmmdXZXEY9XSp5lEDm2PoMApWUD9mTQoHfqZ3MiT?= =?utf-8?q?Z1uBOp9mc4rX+WVu6h4gQcXciu9wfbHy0h6OzTzX6YPDl6MmThaK/emKhCBs0kwIy?= =?utf-8?q?93dCBrcuLZbyi3RHBMmSNwbZfwbzGa0lpv1FN8AG5tiDB27DRhW5wf+ufkwZsBdzi?= =?utf-8?q?yQdv+yPEWDM/8ySf0CKBinVQlkAlZYsuQtmsXHHN1DqIo0bgPI7LkmAZf4H85cDy4?= =?utf-8?q?q3SZ4ZMoTq4p0pPGo4Aw+BMy9jvCp3BprYNaFsdESA5D55kPIrYieYcSrKSFnaIEO?= =?utf-8?q?JrtYt9pwUK6HjY8CPsJ8UDDJp9ttC50CDXqj522/pgnEYMMDTtxUZhXloAElCINYP?= =?utf-8?q?eo/erlUP3DMGJRWJqSgVgkb1XUz8UrDllFcQ0ax7VEaEToiMMCcgc+BmCho0TUMkq?= =?utf-8?q?K6UTe90T8wjmb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VoLculImGvIF0XkLKRJR4e2tRFI0I2zlHAmC+HJB4lUQQt?= =?utf-8?q?gvKlRU0oGQxv/YEGjd6uQMKQ7rpCQfsKtWME/l5ox9zU9/6dbx/eJ+KI+txk8nC/Z?= =?utf-8?q?Hm51b7ecYdapG0oIkw/PV1Nowlk9Fpkcyo4znHrHEKIoheykjLB8VO3pcFLeUGvhB?= =?utf-8?q?AFrRJ6hCS8EPZUlt+U7KBGu/VBNTyzoolw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2857b8fc-9a75-4aec-16f4-08dcd3ce58d6 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 08:30:39.1276 (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: gei5Cdu9Q30NR/HquIN3C67VYjWM55ayCJFajOfReBwj6M71hfWeDOCaUKuOr0+5NlOuLK+2XVwCCqd51ddzAJm6pFY+AibmwcLi61nU194= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8403 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240913_013043_751677_92F29763 X-CRM114-Status: GOOD ( 10.34 ) 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 Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 10430778c998..e23c4369b6e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2689,10 +2689,12 @@ ARM/NXP S32G ARCHITECTURE R: Chester Lin R: Matthias Brugger R: Ghennadi Procopciuc +R: Andrei Stefanescu L: NXP S32 Linux Team L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained 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