From patchwork Wed Jan 17 09:44:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Palacios X-Patchwork-Id: 763392 Received: from outbound-ip24a.ess.barracuda.com (outbound-ip24a.ess.barracuda.com [209.222.82.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B06C12B84; Wed, 17 Jan 2024 09:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.206 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484770; cv=fail; b=HNgT5jTnOzQwtXkSJ+TzESS8Fp1GN3c4H8d085DiiBzA7gs+OMT6UiC5RJXD6wtNt5HN6MyUqWMZ9yYdtCBCl36gyvrY/WttrWplSbvQf1VeOrlvZz9Q3h2amEIvsTu49GxW+Tj9+ZWJi2ajLKVg96Ha7ZwxgSgfs3wTDNmAjY4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484770; c=relaxed/simple; bh=9uIXFzRNQrOO0XTQ4/fQQjMbWCDEGa+uqspccC5N2sQ=; h=Received:ARC-Message-Signature:ARC-Authentication-Results: DKIM-Signature:Received:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy: MIME-Version:X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-BESS-ID: X-BESS-VER:X-BESS-Apparent-Source-IP:X-BESS-Parts: X-BESS-Outbound-Spam-Score:X-BESS-Outbound-Spam-Report: X-BESS-Outbound-Spam-Status:X-BESS-BRTS-Status; b=QzeBr2dnzmkmY8Vsgpc0Z2ZiLlKvF7KD7g8NGFIEKzHGrg6H2EioWNVhTk7LUsa4V47f/9dsvOdkUSe1hQCjk3Bc+gp5UXPNzLmi3PYz6pMv01TC7vnui9mmlb3uboFqmhED042SfPGGrABL3AoGKAG0uw8rxoWXvYwd+bBN8gc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=digi.com; spf=pass smtp.mailfrom=digi.com; dkim=pass (2048-bit key) header.d=digi.com header.i=@digi.com header.b=S3I2d4eR; arc=fail smtp.client-ip=209.222.82.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=digi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=digi.com header.i=@digi.com header.b="S3I2d4eR" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mx-outbound14-151.us-east-2a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Jan 2024 09:45:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=blNAIA4VVShr+iz2nV3mC01B+MCL9XIz/N9wI5+Ll5j0VPuEmoJ/4StRKFbsrDh5uuWuk1ohKeYw+yI9jOyZFwMIOzH1tG3szravd1MIrLtTKpsi0rDWV0qpHGpMVUKyYjXkq/moJeu5uK5aeF73aykp/jLYt6dewiVWfo5Uo0cB1Ulthls2fnGZiyaaQuJP7wrbDSQGL9Arq8BbEXFpgtHu7UmJjzUflMOEvolaw3HjsKOuc7OWqNMWppR8J6n+h8B2V2Dt09qMRzg5y8/ce9C/+OL7LhmD6NX1Bwa3mkBB7oear+Qnonn8gWdHCOCwNTSiHqnxwd8RlDfr/j1i+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=BkuVsJ4MI5Iv3aJ9M9nMJrRDQMgFjWmaV1lGuSIaAlw=; b=F2J7rTKppBIijwTeK/qrCyopymJEuklvqFGmZUxNx18nRcEv3EMT3TGTN0QRIGUankuNrprrSN2xilnDqVHTAYQ25updJH5y3AiV5qlxiiQpQef/5bNfCpRNdc50BZrixxkNrE+pZaWTim4MXg6ltc8MeQ4V/+TqnQVNigh+zw4wRZJBaFLUuyegqVedC7XDweN+cIVYDsRWDxZYRqw9SRJbxfsgpGa0A/0/3Vl3cZ/2aFjhCOConjNgE3oWdX5TE9v12o0Z16p7Nvi8xaoF47Ctk1myqXi7aTsZzZ+7PO90WUYOX5RfAYwU4A3gz04EyBSscWzZbwf+rt9S0uN7IQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BkuVsJ4MI5Iv3aJ9M9nMJrRDQMgFjWmaV1lGuSIaAlw=; b=S3I2d4eRZ6BDQPYA+RfmLD3Vv5R48Cc3rJIuJKO/lGVwu6i81qzUHZ0KfrH7jLa/etx67sHtxxVOHCG6JADuqRv35/MDZafeudtzwoUzYdQb3YoZjb9HYTekGRpNgYbB4LnIvldFqra1NrxqC+FHAQ3bbBZdl0gU7C5Zq41xsfTDBCNLQC2UureKdYsDJpNdt7wmAv34b6mk19nhnyLHKqS6doCC0IVDGz23eTg5ToyFYhKQjXMghPIO0ieSBc6rBfNRWyjjMEnME5W8JWyJmYJDeaEv7IlmIZ9CFDDAUzOuqJ2EUj0ik3X8EwAmZth/c2Zw2ykgw4e8yGdcA88ltA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from BY5PR10MB4370.namprd10.prod.outlook.com (2603:10b6:a03:20b::19) by MN2PR10MB4317.namprd10.prod.outlook.com (2603:10b6:208:199::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Wed, 17 Jan 2024 09:45:32 +0000 Received: from BY5PR10MB4370.namprd10.prod.outlook.com ([fe80::283b:b934:7a82:c8c7]) by BY5PR10MB4370.namprd10.prod.outlook.com ([fe80::283b:b934:7a82:c8c7%7]) with mapi id 15.20.7181.026; Wed, 17 Jan 2024 09:45:32 +0000 From: Hector Palacios To: linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: andy@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, stefan@agner.ch, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hector.palacios@digi.com Subject: [PATCH v4 1/3] gpio: vf610: add support to DT 'ngpios' property Date: Wed, 17 Jan 2024 10:44:51 +0100 Message-Id: <20240117094453.100518-2-hector.palacios@digi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240117094453.100518-1-hector.palacios@digi.com> References: <20240117094453.100518-1-hector.palacios@digi.com> X-ClientProxiedBy: VI1PR06CA0108.eurprd06.prod.outlook.com (2603:10a6:803:8c::37) To BY5PR10MB4370.namprd10.prod.outlook.com (2603:10b6:a03:20b::19) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4370:EE_|MN2PR10MB4317:EE_ X-MS-Office365-Filtering-Correlation-Id: ebd8788a-34d8-42ab-60a6-08dc17410c16 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hJ4zCcqPv6aiym5texLvQGhY/EPi6i0paaeg5YXkWypgJRg87J1kQqtSoh1Vy/wHOCR8jTTcZQrIgqNMqrMpAsxYW95r3tLUhrfP2FiKb8DIG5vwzhSYDL3wo0zYPcnaUyO0TE1zA3JZGasHurDE3ENdbRHl7VyHC8L4+J/k/wSKaevsnf4x0Xb6JLmqvF0czQ7WTM73bT+pCvsmeN2p7+ny9s1bJpsJJoNqNi5AwQJuO6n3vnIkr4ewsbfqrJpsMwNmLJ+NF+Pi4Sq7EVJdgckDmCDKr5wBTuS7PlmS9KmJYytthYCjpVti1OnJLjtmejiM9/i8XH7unxgfj6s6opGeqc2LkFPMigpnQEaOlR9P/p057lG4qYvjRFKf6r28X8bMyLK0tv9KNv7X5Y5Bl3gpgpWZutXQeAJmRORMAii3L4BmHNUrWZFMPmXGB8d6bVVRQkTr1f+U9MLLEWpC/3cWntJrTWTFeQvB/rTg4S5NWYj3HP7XfbE9IsmVHaaPqlP6AHtQOhcy6yAQYJe4bPgWwYvhEv9GQSxRlvKGCFGtU8CL+C4iIAdjcKjIsRRRCxb4B4x4K7AZCiM/3eikK0nvvfvI0qshuTMYFKIfC01soYVHEG6eXIyqLZtEPGNp X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR10MB4370.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(396003)(376002)(366004)(346002)(136003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(6506007)(478600001)(52116002)(6512007)(26005)(1076003)(107886003)(2616005)(38350700005)(38100700002)(36756003)(41300700001)(44832011)(2906002)(4326008)(83380400001)(5660300002)(316002)(66556008)(8676002)(7416002)(86362001)(66476007)(66946007)(8936002)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3CeeQZVD9bSnEPJaDLSa5yJsXfegmypIS3cHhvgZFNtwZnWuAROLeLF7JcT42dZ+TuktISd7Yy7VkwEm6OKMcUdII2SpBAAMcx1046OtIRUDE0uDpd5sndlEa6yRNJgUy3b1P1uXg2j0Ejikl+H0iQqeiWAuSjf3Fiv6z02R8Bih54R/Y9OFAKvRfawFDPWxd9l7hsajMcojqeQ9EBpagncihMaPcmP4EQvkZmjN8uKO/J+CtbseyuCXMipmlJZV/GFA1gPsIGzHhcSD/EGH/Sppq5l+/VXpPJy14p8fCKqOr5vtEOB2n1CoX49ivYt1sDFpEmT8vDjISGjIbLsB6e7tzyzpqm13U0Zfiv9gum/h3rs2hlS1PPsJDvsEl8fFVnI+sN94hhDo8QrnMF2yVHsjYulrnwFoOmYXztTIcfUn494nnU8Z1/X2Z8xevA0P0zEU9aFJuXi3EexOp7GyEsAkEqBh8jC2qd+v36UwqP+D9SkaRLz07AGaV0OaeSM6uUVKajcDTOdM3ZIFK2xxhsZgyeGaU1QI/6iDvKErUmAoMvqfhWNtckS15wC1MGO4kCR3hrFNW5vYC9BmCIozwgUvvPlUOvfbNwxUQ8V0pFyrxV4goKz8lUKYOjkx6m1Az55GuDBSklsogRQDpGyoobCP+ENqvDKCb/5Mfam4xJcKjs9qdDQAxt57yjuJBe0EcGljNZklkqeIVJQZwea+ZFzSxKSHHbIiZxv+K8xGk63+7JXeaLkyYaQer05ayR+It92ajeTFbG5RMcRHOKFfeVrdJJ7HMw+YrdHSIkvanCHNjRSEZBDNThgVo03Tk+KRjQ+FF3ad+COZMW2fvShridvFtJ4OlEvAWrLSC0NvxReX3PaaagzG53AUqFAjQcBj03BgGlhIzTLYxwB0RzyjLNn63gzK7h+39ZL8e02+ZuNV70CR0wDUKmtBJ6YYCVvYeHfQBjbrg6zGPa62W+hyPtcEeGT8COVW0fMWyLMsuTex5/QbLjTX9S7oBm5+o7hRhszExVmc7NnVU1PASKLU9a8Yi++5SSUAS4K53Bwyx6+7srZ8hUCO/S/5q56Efw+0aN/XBCh1L+49Rp4/4FDacvKkUCQW1SYM1JJVzAwJaiwOoNR5FUF0iHy9Aoop8ZPnW2ZHzuyBkuYPTGvRAqqqyspNbqhZvRF39yMZ/LQApls72Tjc4bJ3s+6Dv9CA7ss4S/+plfkQIuiZDdo/9WhqGTYgDSJg9kJIT4T0AhlooRiUe8MoV9OG/K5EirT7YbPCZKMu0kwtaU5aoFmLTdsKn66ruYsYYbn9r5zosFmjq8VYgN2I6RiCGB3A63uv9v164arBI8xjBLQBz/MFyNIyIPDlLuHWqZ5UZc3UHToEv20b78GEPIUGtx1dHh3XJBClEBERB2bhfk8blRNMkKAIWlaVL/dpVEkp4R2eM7/XDuvi6k37mrw+Bcz9U6tSAhhX7dJlAS90WXjx8LxSFFBZDSXsMz5BeePMn2arm4iLG9dhOuHaF5KYzDNUS+WudrfFBcSgPy7iNqik50HGZVt4TC0qUceBMcg2M2LeQea7QvpBO0zvP8FS/dRqU1EVmKTt X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebd8788a-34d8-42ab-60a6-08dc17410c16 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4370.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2024 09:45:32.6660 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fTAxFRVTIOk+u5/KZWVw9jX/cnL9PAayKJsrz2e0GAVJuqLSX7w7sq0TukFUtdsI9DWIw3K9LdW/0etyqyt6yA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4317 X-BESS-ID: 1705484730-103735-22813-55859-2 X-BESS-VER: 2019.1_20240103.1634 X-BESS-Apparent-Source-IP: 104.47.58.168 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZGRmZAVgZQMCU5ycTMINnIOD nJ1NDEMjExKSXVMinJLMXUyCDNKNlMqTYWAAp2iIxBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.253576 [from cloudscan13-0.us-east-2a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Some SoCs, such as i.MX93, don't have all 32 pins available per port. Allow optional generic 'ngpios' property to be specified from the device tree and default to VF610_GPIO_PER_PORT (32) if the property does not exist. Signed-off-by: Hector Palacios Reviewed-by: Linus Walleij --- drivers/gpio/gpio-vf610.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index 07e5e6323e86..4abdf75e9a0a 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -276,6 +276,7 @@ static int vf610_gpio_probe(struct platform_device *pdev) struct vf610_gpio_port *port; struct gpio_chip *gc; struct gpio_irq_chip *girq; + u32 ngpios; int i; int ret; bool dual_base; @@ -353,7 +354,11 @@ static int vf610_gpio_probe(struct platform_device *pdev) gc = &port->gc; gc->parent = dev; gc->label = dev_name(dev); - gc->ngpio = VF610_GPIO_PER_PORT; + ret = device_property_read_u32(dev, "ngpios", &ngpios); + if (ret || ngpios > VF610_GPIO_PER_PORT) + gc->ngpio = VF610_GPIO_PER_PORT; + else + gc->ngpio = (u16)ngpios; gc->base = -1; gc->request = gpiochip_generic_request; From patchwork Wed Jan 17 09:44:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Palacios X-Patchwork-Id: 763798 Received: from outbound-ip8a.ess.barracuda.com (outbound-ip8a.ess.barracuda.com [209.222.82.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E901E14004; Wed, 17 Jan 2024 09:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.175 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484791; cv=fail; b=H+JJYB0H+q948Oq80Du92AvY//TMUczFGGOdqcBbMgTzB78bQQkbV2ES9F9pE0UKaFsYglNaF/VNp8aELM4Mc5NxWff9ti8bNYoJ1dZrRi8fF1zbVf98qYHQ5tW9JSrrjWPz6tXK5Z8tnK8JgV8yDpfIlNCSEkn6pKk/nM0fgEc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484791; c=relaxed/simple; bh=RVXxxArC9eRrJEsad5t6W6Ei4tBOWla+krm3odpqWtQ=; h=Received:ARC-Message-Signature:ARC-Authentication-Results: DKIM-Signature:Received:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy: MIME-Version:X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-BESS-ID: X-BESS-VER:X-BESS-Apparent-Source-IP:X-BESS-Parts: X-BESS-Outbound-Spam-Score:X-BESS-Outbound-Spam-Report: X-BESS-Outbound-Spam-Status:X-BESS-BRTS-Status; b=Bii0Q0UMzt7Y9pZGV43ouDx4JQLJD8N0Oy5kGMrwOgfvgn8LxazFJQeHL+U8ebggbcDC63u0CF2H9Y41jdjJ9hrBfF3efiqH7+0Ycm/TctzwDiO3dEseFh3hK1gOF4+R7FiOB76qSSHVhI2L3agKKt13uDwZG6fSTiqdopHvAio= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=digi.com; spf=pass smtp.mailfrom=digi.com; dkim=pass (2048-bit key) header.d=digi.com header.i=@digi.com header.b=QxLloSYE; arc=fail smtp.client-ip=209.222.82.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=digi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=digi.com header.i=@digi.com header.b="QxLloSYE" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mx-outbound14-151.us-east-2a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Jan 2024 09:46:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f9T5NXZol22wsWNrOfoUPsbVGaBSUXfiuS09XisX7W5rR3S+4HExZlWMedCFuB7Iv5Ly2xDHbe7Am1N6M+D+98Ph3LhnabdFCYEZWuoVkMdcNglsPGBKFh/wvpFuBMCbEOawwecrFhQVyGXmvN3eAPj22pNF0VNe43lPqVK8xEbmi4T1I5DFz0NK9vInxT7z3fKROKKOS9fTI9SEtD+Kkrl8fctMVpfPFvIzHfEPQwRY6lf5Ct2u1kkPjvp3cJUf3eBUl5g75z9ZFQi4biNeGPHIRsUWftA4IVTaRip3oP1rGTSIJ5DQwaX/FrI6ufEel0FAmU+OtGsGeJh3jyBsvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JC867L+c+Oq+CL58TGFeSo5XhBwdPXesZY5memBqF+A=; b=gRla/BnSDkSOaofVUq9DfSxZmBDl3u57fgfhU6wumB8h7OBuxIq++HfkPi9JGWXBctRL1ahHMZZDrOvFlq0fjCNTbE9puLjx3mLvhVR/J2Nc+0GkiKOXrxaPd1u5Ol3DpwRDTRFmf4/lhjo+gq1uXsy2BR2cJZUVCBEnrXYtezLN0A5XXLTBhIQJlS5SEZAnYjh7czxVGfEUsEdrqjJBxkMz9s+bXZnmiZErY8t4+ddssdj9/uqcDxVoiUZNe0eh7tZwf1OSVYJVFfqlYXO9hx44XRr3fkgGwnM85LbnPZwif2er/DOpay9T2jokCPvmyMTUQRggKBup3JeVcWEHgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JC867L+c+Oq+CL58TGFeSo5XhBwdPXesZY5memBqF+A=; b=QxLloSYEis8vbRf+TGnK90HaHoePCL5P7r5AWihh0eK1xohpFcWWLgQWMxOGoAFFtcchQWc5/llVGy2ls225QgP0tDMMtWXUaIZcie+nyv+IBsQCKB3UIJPvx41dRW0ukJ/MyQlUpXgQfKH9g+X/8q0wydTWCtqXdfXLGAUJNiMAdQs+SxOefXTvEKhnuOqzQjj7Fcx4SuVI6J4bQrSyE+TBrO18GlAqU8GXpCrgD2JW3JO717Z3dEP+RKsonMs29ExIqKMcDhVXYVNKlWuXnrOHAjcMd0Ogr9jbfGRrmvKnwBhdjiqqIUDUlewHRI0srnVB+oYCJ1bg4gDRUC4pZQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from BY5PR10MB4370.namprd10.prod.outlook.com (2603:10b6:a03:20b::19) by MN2PR10MB4317.namprd10.prod.outlook.com (2603:10b6:208:199::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Wed, 17 Jan 2024 09:45:37 +0000 Received: from BY5PR10MB4370.namprd10.prod.outlook.com ([fe80::283b:b934:7a82:c8c7]) by BY5PR10MB4370.namprd10.prod.outlook.com ([fe80::283b:b934:7a82:c8c7%7]) with mapi id 15.20.7181.026; Wed, 17 Jan 2024 09:45:37 +0000 From: Hector Palacios To: linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: andy@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, stefan@agner.ch, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hector.palacios@digi.com Subject: [PATCH v4 2/3] dt-bindings: gpio: vf610: add optional 'ngpios' Date: Wed, 17 Jan 2024 10:44:52 +0100 Message-Id: <20240117094453.100518-3-hector.palacios@digi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240117094453.100518-1-hector.palacios@digi.com> References: <20240117094453.100518-1-hector.palacios@digi.com> X-ClientProxiedBy: VI1PR06CA0108.eurprd06.prod.outlook.com (2603:10a6:803:8c::37) To BY5PR10MB4370.namprd10.prod.outlook.com (2603:10b6:a03:20b::19) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4370:EE_|MN2PR10MB4317:EE_ X-MS-Office365-Filtering-Correlation-Id: 8559e260-2104-4fd4-d376-08dc17410efe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wJjHt/1tbD8ElC+7kcvfEsQoVxM+Ch5aLMdFDekkXVW4nu/IKvEiENegiqTOo1ARyz0WFOccuSl/h8abZBqoU/5ObAnulLqU1Lfwy1DQXBxGLPZ6GvR1VzzdBkgn9hNQy9awaseTWRdK6RuXdED0ttmn+P8wSBEvp2jzNn6lPNVji+LPKtCQmcyEEYdOd+kCFo82w2XXFzzCVndVwAT9ZMlnhSQq4FDbMZHTAz+f+5NXIz9XmfC3K2kd4EzaOnqVomy27OQgWZ0SX+ZWZKkrB3rpCd9lLr0Kk+j9ITeeq3G0r7nZ4fB3pb1gtXlxiSGvQmdtrkcwGi8Z++w4bGeMYsM2oeob0JdFs392+5IMoW0J89XaqlblSJopaKI5+tmxfqgGjznubci3Vwj3A2Bf91YLg36OaphFgn3pRzQ9qGu7EwvqiCIifgwzGCUg7ZY6zQPYosmnHeYAddPVhw6DdT1h/RLjRB4pv/WhDtpyN+ckOfq4OTPPegBaMEUSc9HeY7c8ppXTgaW5tvLcchw1XjjBq4UIY/tX8tzmXSDU/4zCofStnhOwVvmRJHgUIpfda6xk1epPwrDNOPRPOBiQvX0ui0Y/QM6KVPYpH0llgh08sLLvS0usFbamxXig2xBu X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR10MB4370.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(396003)(376002)(366004)(346002)(136003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(6506007)(478600001)(52116002)(6512007)(26005)(1076003)(107886003)(2616005)(38350700005)(38100700002)(36756003)(41300700001)(44832011)(2906002)(4326008)(4744005)(5660300002)(316002)(66556008)(8676002)(7416002)(86362001)(66476007)(66946007)(8936002)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: T3j4vV240ZJEfIaVAOA4Ks3TVHJpI6MFRRGYxM+Yisk+fbzAF2U8z2BMvb5Fse7OREdsuTfAKL/kbAs1a5Yl2MlWwOQVreaUEX5n9N8do5aKJwCwWf99VXbSFUCR6RNLYWyqnL2nRrt9pGP+fbYx0a3DBHBip80PcX16U/V0rxusDOLK0Gh3U8598/vU/HzcgIVU8Qzf7Jbsu0LEMoDrHkau9JtpKnrRZynTmxw6Xe7saW5vcyuRgntWa20v3rxV+WLLwhtJOmPJUxWW6ntl2PTPWvuRP3yFG8Lar5hLKT9Fpa0SP4sMKeekthRXQF4YMUDOAzHkQlLRciJ3bNgUIX/IqUSrxmSjtlZpvOvsCLqKozfOlVHY/cJa4I77UFdcO0MjM1gK6rYk/wPPH2YtciEvH0jw9T558J3Y8eaypxsxem2Luf2M0S7A9kx1vdsOvpbrTZcB8r7i7mV05WioDGhWZncIeOtydPgwqu0r5I+/+IAldg5aaUba+23DNMM2IQd7zI4v6EyyG+XfbIyPnV07FfhIA2uAcq4wTtZXPiSc1Jhh4cQbb8dYQpUq45O8arjSPMpB1nEIPeCwy7uvx3iox6Yz8SrGf54o4WDjS+f+dt4RYHoG78ai5R+M2Nn7Pv6nQFo7+RfAjqWWXJ/O5htFchWnxL3RXRDuL1/yOK28FO0iQtnos4ikKHhDAQzCJWYkG+HM/lQc4aZdqakDq5CEwu8NOfK1XOvDj69W3wTDH3OUO7lci8sKk2acGgqwAhzb+vrRTquCB/r8YVhQSuM7q8pLmpOgavwaKBzN1qGa8EuIEn1ZasIMz7oRsZB1wkxVQTWyYM5PHAUWsk7ZkI8ZgJbOiEc5zMbM3oypM9rfka7CZxPJUrvgCl3XKt3RaFxwsIybqYKurKwr5/dv3AKeliAUCurY4D1BUs8HiLD9YahzBx+sJGqlU3Wcm3s6VvrDyLM5RfgNAsWc7JdKMWblIcuLjBzcXu4mYYwdlhhxwi4lXGX7/A6j3ghjdDzxhrDhgI6vZsy+eub+A+0Ekq14Bty8WQt5SImAQ0rdcNv4zNAm5faNLLpZVim6gnA8K6Y+zI0nDQKMwC9LwLgwPvrvE1/iLA7G9Pbq7ztX9LbUJJes+ooB+n2WLNUskgCXoyySN5iX9fzvnfjmw1d2A52A3yXJ7tew7OMFX7My83SGYdNHQzz9YLwOp6/nD9u4UWtEZu9/yXPkXYDHknOM7A2Kl6Kw/2Xuj+OINvecmY2byZkpRfx57LXBXQxXzTLKTWX1wmQyDexy55a81l1mYCjFQ233qIerxmGxZExHbtIVuH9lRcwgxVW22tIpuf7tdP5zfXrzEF1Gop1XojKZStaHbqPQY8cagyxHeZzc1NmAK6cMJMVOPOfAJV45pQUFex23/TMKTNv3l9nQWa/21XozgusuIFGRK0TPu2s1jvDHk5RJFRh/Yg0D9MNfhYHhDvV3b0o/HFlTyOJ8n1RhOqU79g/PIirWsAEipbpmsnj8ElX/DzmIDZbvSfULrgM5aXwiLAMS2nBQm7PXxSB1nyxlmyrJZZmEDFVFOWjr4MEQNhTwlLmSlm8OEKg63bmk X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8559e260-2104-4fd4-d376-08dc17410efe X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4370.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2024 09:45:37.4731 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 17fvfE+HHMgciNLUs4DSIGbeyn7k6xY7NA26+ZqfTxOAHUxlGIBhIgS7w6qeGd7OHzQh/a+3i3rj5GPL6CTM5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4317 X-BESS-ID: 1705484730-103735-22813-55859-3 X-BESS-VER: 2019.1_20240103.1634 X-BESS-Apparent-Source-IP: 104.47.58.168 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVhYmhkBGBlAsLc3IMNUixcjEwN DI0NjMwMIkOS3NIDU1NSnR3DTVKE2pNhYAA+umjUAAAAA= X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.253576 [from cloudscan9-187.us-east-2a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Some SoCs, such as i.MX93, don't have all 32 pins available per port. Allow optional generic 'ngpios' property to be specified from the device tree and default to 32 if the property does not exist. Signed-off-by: Hector Palacios --- Documentation/devicetree/bindings/gpio/gpio-vf610.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml index a27f92950257..1702aff5e0e9 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml @@ -65,6 +65,11 @@ properties: minItems: 1 maxItems: 4 + ngpios: + minimum: 1 + maximum: 32 + default: 32 + patternProperties: "^.+-hog(-[0-9]+)?$": type: object From patchwork Wed Jan 17 09:44:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Palacios X-Patchwork-Id: 763391 Received: from outbound-ip24a.ess.barracuda.com (outbound-ip24a.ess.barracuda.com [209.222.82.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B57E14004; Wed, 17 Jan 2024 09:46:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=209.222.82.206 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484807; cv=fail; b=IcTeu+h6+7JbB4iOOv6fIRh1byVMm5HH3EADyzLTgY08U2yjwudsvNLBMmvrDDzFj5JdcrZ0NrrFMUdfvWRElRk6iZn7AH1Bi6F/g2kF7hpoTZcGZF1gnUxKJwGXsnKHcRB5Ivyg4ehD065gLUIZYvzIOj25MJPO0u32FRUXjpA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484807; c=relaxed/simple; bh=pXDBHRevEql/IeA5iatwabWIlzO7mvprZrqFBYbdktQ=; h=Received:ARC-Message-Signature:ARC-Authentication-Results: DKIM-Signature:Received:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:In-Reply-To:References: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy: MIME-Version:X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-BESS-ID: X-BESS-VER:X-BESS-Apparent-Source-IP:X-BESS-Parts: X-BESS-Outbound-Spam-Score:X-BESS-Outbound-Spam-Report: X-BESS-Outbound-Spam-Status:X-BESS-BRTS-Status; b=ajaTLrPEh8JYclXOZcdsNdXiB69tUD7oTz5X21cvYhUH8bcuCHQboT9abtJq7bekstiRggjEDYJljtPQltlpYwCforPGBdgMGvqLNca+U8Ktc1WGrlv+0giC2wvnad0TWLcou3yyUeuCmjJW+Id07VU3mh85d6lQcJ6awKTtBqE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=digi.com; spf=pass smtp.mailfrom=digi.com; dkim=pass (2048-bit key) header.d=digi.com header.i=@digi.com header.b=UlN1riqJ; arc=fail smtp.client-ip=209.222.82.206 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=digi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=digi.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=digi.com header.i=@digi.com header.b="UlN1riqJ" Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mx-outbound14-151.us-east-2a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Jan 2024 09:46:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7FYbL3lJVi4HlmPcJhbM30QGhCwOaCNNtNvkVPuP6yBA2IOi2SnwArXbSVeGn8l6CjHHquyeJ2GC+rrvdPOcu4pXlkw4MJWeJGipPgP65wlyg3Zhes45wNfzyju1OCUB9Bw4s7iC4zfQs1s66dnJVeSLKA8f290rsjmBviwo/28w7faPrUj1D1qDDFFe1w4PZL79jR5lXZ3/jwxF1qYC63njsIb4+UjJUghKx2Ccfi5EZb50z1FgLVytQFqpNaYR1GqfCt6yTuuQ29RO8CVljurgacbd8hZCVFUJy+5tfrtzqFs/Aks5J2O+PCFBJkFG3p2QaWagND8Ga64MJNNrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=U66kNV+nxEwPq6JzmRc7XVuiSHyrKSzuiysTkD3mYJ4=; b=hoQQuJOtwxcbrzMlPxU/iL28QWUOCvYSd6NAE8CqX/S/A2su0nvRrMCtE3AaqFZHS3ieGOxSt2hKAinbijTBnUTHJJPIv1qR3CwyOC+6MrAqrSvjnGpUXihzBdIcBQ+b69nEOtSAjy1VUhNBR0G8i/4zFPrWxJ/DVr6YcdyfKxl344HCskRq3uRLR/R+AzFKKnly3DAO3Y4/fe8wFJ56wyj5kjhV6FeaZpuisJFR/tIUJYX66JZqcrH8TkdL7aMu6RlUblc/NG97VzvV9lBbsOjeBFqJvayDRZFqNEMVhGr1uMJUngANHY9Zj5j9DC52X5LoebtHIKnev7AJTWQ4sA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=digi.com; dmarc=pass action=none header.from=digi.com; dkim=pass header.d=digi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digi.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U66kNV+nxEwPq6JzmRc7XVuiSHyrKSzuiysTkD3mYJ4=; b=UlN1riqJklUJIrEff6QDTIyAykcMYCZuk+b24IK0gJvLu1a60ZOP5X6maAbLxw31h8Of34m+Dx5yxA5m8Dov5eLUfSuJ1d7w3qVbXVDRoHmVlokLtUqsDTyGAVFjb0fqTDViTrfpG7Hwu0qBctlYmcGnmDWmYrXyCDJUs05Cbu57GJZvKf+Tm1YwoW10pGMCubrk9yA2+k3JonJ7uAXLiJOmxPjExetzmlV9NLsiSZQ0dMfZAT7hGc+rEVxfMbJW3ymB76buNETjpeJ469omH7FBwXkpas3UGJbvOKpQVIvW2glFLrq5WS4z8+1nGZ608kpM45cKn3S1Bp9iEwUSiA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=digi.com; Received: from BY5PR10MB4370.namprd10.prod.outlook.com (2603:10b6:a03:20b::19) by MN2PR10MB4317.namprd10.prod.outlook.com (2603:10b6:208:199::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.21; Wed, 17 Jan 2024 09:45:42 +0000 Received: from BY5PR10MB4370.namprd10.prod.outlook.com ([fe80::283b:b934:7a82:c8c7]) by BY5PR10MB4370.namprd10.prod.outlook.com ([fe80::283b:b934:7a82:c8c7%7]) with mapi id 15.20.7181.026; Wed, 17 Jan 2024 09:45:42 +0000 From: Hector Palacios To: linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: andy@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, stefan@agner.ch, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hector.palacios@digi.com Subject: [PATCH v4 3/3] arm64: dts: imx93: specify available 'ngpios' per GPIO port Date: Wed, 17 Jan 2024 10:44:53 +0100 Message-Id: <20240117094453.100518-4-hector.palacios@digi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240117094453.100518-1-hector.palacios@digi.com> References: <20240117094453.100518-1-hector.palacios@digi.com> X-ClientProxiedBy: VI1PR06CA0108.eurprd06.prod.outlook.com (2603:10a6:803:8c::37) To BY5PR10MB4370.namprd10.prod.outlook.com (2603:10b6:a03:20b::19) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4370:EE_|MN2PR10MB4317:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b83c18b-e93b-4d2b-409d-08dc174111d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Dt17TonVqWXxdjjn7oE1kCNG6YoPub/omAwfCr0jpK5unb25DJnn5Nlt0DvFC7NvudaOFLiMy4g6ruhpMiaK7A775en0E3nRoJ/Rh3wrYYGQtaYTTuX8orM4YphiemQ8kZ9QVeJCiCKLr3mhel+czyhVdHaKqIHSiNqmyqCxNaFW/BTF0Tq+drx2h+6o8uXXPDk2msmUBU2Ak9IeKrYQRKP30FL+wBuUFDTn6GmPIZK3P5OodQ8r4+YpWJEY6xr9VtKnp1tpGzwSRAZoVwJiTAyHK7uqfwJUFVBx64tDBZqeHEaA72w38fiOIL/x0u8RN2XLqkZ4lCQTD64WXXtid7l1krp5snvqvU1Z7dMGM0k1GvuYtrihyzZnUeADTpW5hJJxZoUERyXPN6Orz4//50z4EPp0crsNBDgfq2VYhLehU97+ge8TU9B5KiwtSLArBItjA0Qrqvzpa4yP1n5MoH784EYBcJx2mSyoSkw4RRXuBxdr27r5UUq61387gtqUaCpErySVUuBCHM6JlUujm4KJVase8Ks6tdl3WryPIz6FDvhRWTiAdBWpcSAYH4ILmTqKVI0y+dk1eAkdRpW7U/YsrorfTii4YuC4sDiS3Bpwps1umnVZxvXNJekwkGQ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR10MB4370.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(396003)(376002)(366004)(346002)(136003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(6666004)(6506007)(478600001)(52116002)(6512007)(26005)(1076003)(107886003)(2616005)(38350700005)(38100700002)(36756003)(41300700001)(44832011)(2906002)(4326008)(83380400001)(5660300002)(316002)(66556008)(8676002)(7416002)(86362001)(66476007)(66946007)(8936002)(6486002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rcPau9fZBJk6iWcKc0vQLWJpVBnvJPfJf5I5k6jjtUb+X5RdLv0PC6EeFAW4QjJTk7O/2ZvFz7oqnmoXmXZqoz87Sq7iclPqGs5NAGcceVypoBfKwsSu8kW5mfvFZgO9RGPsP6SHsswwnlXZXP6S+CtXof9U/+9ht6zfOrkA6mG2d415okFuE40CZPMpFsweBoNvN/gtb7E8/d6NfqVZBp3Hqy06eCFFE+Lciv3ujKIXFcxmJ+mQoP2v7z9XdYakHRGi1GvcaRmSRLpM+r4MK+ykzrnvczEnVcT+q5Vl41/bkmFYo6fDszQ9g1L2iTdx19mFEDIknGlj0+gpM0JB99jQE3Ov8X4UfzW+2B8vEQs0P0jzAr8cbfTOoZ7J0tuGjfKuejqWf2Wk2C2FuMuVOfU+Lpz20OD1v9oe1nsnQHX+awZGNzBDfgIdMLwH7oAY1S9QY/ZgyLQj9c3tVGTWb2xAMSKPFPXD+mNqf9H+NGJ3WcnZKcevO99EYurHBIqJD0Jmv1hfNlT9d45q5NveNyyeJcT46Zc338/+wVIKfeAeC9yI71YuKL9EgMBe02dpnhBguArLeJKKjmOT0bK+68ibjj0dHew9NwbWOTrcU2ilNiqwTM9m06b+mjWsmC3u0M1gHPUsMvbkbTjpFnHKF+fqUp8HL7L5ox0TKYEOvuiFrJO5Hz+fkxdn5Jb5H5zDsVBmODwiJ9BnmHdGtCIZXHu8YnUvyclItaKOh1tDww2MkLdYA/wQOzBK0/RrmrnVP2z213Sifnf+Pgu0+x5fKlmO2NNwkVIVNGQixb0FEKVTLYUnksAxQFEIllib44KqZt1C2BtDN92XXHTGRQxAudmSa7t+R7MaewyIUV91V6XMtpFO8wX6glhWEdsfV8sYmLzGJePYX0Oq9tVsapLVtLJdA/FORRbfFE0qLCLiQRQjiHUfyz4sYI+eQRQgoA1uWhasW2TQvXwsRWlsugNinRBxPy+F8x1ifXV0Lwi4nhm4docTLgo3fyx3U8nXhkCMhF0Lou7cL8NYSolfhgpqFfXC1ivs11W4HetuSA2uJrxRS9HYAuG1lUMivze0fsMAgKDe1tDQmtS5aP+Km3rDJ7QGfHpHLB630cE9M4J9MJ214HBpRq+ZcUt2g1W0fWhq9RpEvyINoc/d89iff+utRrVr2a41a+XFe0V1Ck1VkVnrBRu+mZXXP1c0AZRSW3VKAr5iFiQkCcn351zFSkMBJTSc8qAjehqP/OtsnBZuaugimiAYrmV/iGXXC1Dh9lSNm+4MvLNxblUpS7WepWyq1w0eTPW8I3D+a0UBY/8i/p3jZ2xVXUrCwKFFTUrt8t1X/l2uSJT1+Sww5j65uOsR+IWRs0NvvTcEtmFgDLJxtWnhi8MrRumekIqFRLAP5bQ1r/6GcvTDkcJ6LblEdgvnGkZ6KrzSsm33JM5qyfX/ikuoAnhyQToUSUsF70bVgmIzhriJAbiVsIBhqm7WJVRrQh7nWTBJNlAUX2lrNEIm4L30hDF09sdTJRr/N4inlwCCr2LG0whMsrgQ2/P4T2sW0RwBqNIcwro7i/unNyJPOCgDvK7eOUK7PraJF9BB70UI X-OriginatorOrg: digi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b83c18b-e93b-4d2b-409d-08dc174111d9 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4370.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2024 09:45:42.1955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: abb4cdb7-1b7e-483e-a143-7ebfd1184b9e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5dZ7KHAE3Di7jvJlBihxPESgRpqdagq17uvigXo9KNnOdcKHRRQ0UvhQXyJjd0QetxaPJGqFOC3FN/2/dS+N5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4317 X-BESS-ID: 1705484730-103735-22813-55859-4 X-BESS-VER: 2019.1_20240103.1634 X-BESS-Apparent-Source-IP: 104.47.58.168 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYmhsZAVgZQ0NQixdLI1DDR0M DS3NTQ0tQkNdk0EQQNE1MNTZItlGpjAVpic8VBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.253576 [from cloudscan14-82.us-east-2a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS112744 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 According to NXP HRM for i.MX93, the following GPIO pins are available: - GPIO1: 16 pins (0..15) - GPIO2: 30 pins (0..29) - GPIO3: 32 pins (0..31) - GPIO4: 30 pins (0..29) Signed-off-by: Hector Palacios --- arch/arm64/boot/dts/freescale/imx93.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi index 34c0540276d1..7eb2cab7c749 100644 --- a/arch/arm64/boot/dts/freescale/imx93.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi @@ -970,6 +970,7 @@ gpio2: gpio@43810000 { <&clk IMX93_CLK_GPIO2_GATE>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc 0 4 30>; + ngpios = <30>; }; gpio3: gpio@43820000 { @@ -986,6 +987,7 @@ gpio3: gpio@43820000 { clock-names = "gpio", "port"; gpio-ranges = <&iomuxc 0 84 8>, <&iomuxc 8 66 18>, <&iomuxc 26 34 2>, <&iomuxc 28 0 4>; + ngpios = <32>; }; gpio4: gpio@43830000 { @@ -1001,6 +1003,7 @@ gpio4: gpio@43830000 { <&clk IMX93_CLK_GPIO4_GATE>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc 0 38 28>, <&iomuxc 28 36 2>; + ngpios = <30>; }; gpio1: gpio@47400000 { @@ -1016,6 +1019,7 @@ gpio1: gpio@47400000 { <&clk IMX93_CLK_GPIO1_GATE>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc 0 92 16>; + ngpios = <16>; }; ocotp: efuse@47510000 {