From patchwork Sat Feb 8 13:02:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11371653 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 229C792A for ; Sat, 8 Feb 2020 13:08:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0139F22314 for ; Sat, 8 Feb 2020 13:08:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mkmcs25X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0139F22314 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=vI+2qhhQ/ad2gqCbe5hUTYTYVj8IfAamleiL75V5TSM=; b=Mkmcs25XPU2/g+MYM2+Z5LGdJe sPHgcJ9XempqMN6GWa3THRmKDaNxrRnI4ivvtJU7gqw9vUYMHzLb/vRBxUmHkmHiK1WGcHqmhwvu2 a/6KNcqivMgF1ImX2GXOf8HWR3vTJYVIJAIKQ975GJpgPge6Z4mecOOKLbP7x2eI/RJg2ttVIed65 wzrzM2N/lxfLwYJ2KspETjSCXkm1A+Rp6IQhaBlYKSWStC6Cbv7AfVkcEN83Oaf7kXP79I4aFHg+h voggVdS1vznUaWQ76qIluVYRJZuVG5s6GY/yQCoUL55gP4K7aDgzH1ATkjqWW0nKVlFxdjFzAjzoH PUm6ciNw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Pqe-0008OS-Vy; Sat, 08 Feb 2020 13:08:36 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Pqb-0008NV-0d for linux-arm-kernel@lists.infradead.org; Sat, 08 Feb 2020 13:08:34 +0000 Received: from localhost.localdomain ([37.4.249.150]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M58SY-1izJpq1Aiy-0017de; Sat, 08 Feb 2020 14:03:18 +0100 From: Stefan Wahren To: Nicolas Saenz Julienne , Florian Fainelli , Linus Walleij , Ray Jui , Scott Branden Subject: [PATCH 1/4] pinctrl: bcm2835: Drop unused define Date: Sat, 8 Feb 2020 14:02:52 +0100 Message-Id: <1581166975-22949-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> References: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:7poxDZDsc+nCytjwN8LtSgR7ED0PiXCKK7Lt2YkCm/iND1UtSOp QV2LAcQ3kUyNZYVk5rrzHMFzzeUo7t4Q5zJgdk5e7uYCjm90vDnbMBs2nj8cd83exIgCWfe WFLAPllWyFaqlnv7HJzM/XPiJHMqUwBZobMlekxNQzV+XhN4B2+/HC01ZXqV+dGxPilb0A8 Lp4Woi1OYSDZ0tCH4gz9g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:M+C0GAn3G8Y=:YfDIZj14EoC4g6x02lZT4h nqLo7jh41D+mIurwAKwwtBNHF9va2fL8O2F8izXbpBwYlFGpBjeoBN4fqo4sOkQsCfGnnVTtr yuCTsQ1t4+7/OOb95gEPuxLILyXk30JgTg38vbr48UTtZebXURzaK+NK9iwSSdB2lHUaV0N3Z 8UCcFZUmAKEd6L0LM5hwi4W1PF03AIfE2mBeTlBOyMhV8LSfUfOIQr1IGwCx3sRbSsgHUOpje bSl8ZV2YTrO8qYg4M2PeSs3ytZ0Shq5fP1UvQa3pKJT0uSvG11ClDhj/RIeYMHgUcLBBbA49g sTN8ifKY70JUmxyE5qr7A9O3+BAQuG6eRrKM5PFrz0TBicrcY1mrqvTQ1HQuiIIpfuhDL4tHt GOatHkAfxcB6/dcHL6GcDmtuqqO3vdBB5OSh2tdytRxQRAIYuXFTIyKjMRWrRLm/qPskLCacv ZfcqecXbCJiwJVYnYPBiIW9sZf1a2CARk2updCotRrz+nE0MOVRnjzDiQegEpYwEipCyQ0qNa ED0RXVvR51T6OwnMR5Lkug42rnxOZ9kdRfAba6XqrSda8oKNv3hCRtp1NQfrK09k+5ryOapkI m3w1qu9lP0h7K+kRnXcroXT6OGbqIp8pwCAeoObyhKFJanqUYoBkmoL+JlazzkEz1TWt7YJmd nUokrpExypwqWbkmV7U8U3DoouSBNmIttJzfoIT0p3IqjtEp0CAMyuCpLerZNVGl3Xvk7rz5f 5Vmpf4+buD/jd0Ysd/1D5wN5Qt51ZcvFmMrI2HAUw26X6QLjyDGLTz8aPqNK+pcTWDO9d8Ayv I7x+VUO+giK5zNNz1Rc/k2V8v/I6PEnczqILfIqm49/eK7vqWW0CS16TdXZsg7rgp9eLeZs X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200208_050833_353063_76BCB20E X-CRM114-Status: GOOD ( 11.43 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.74 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.74 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There is no usage for this define, so drop it. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 0de1a3a..3fc2638 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -40,9 +40,6 @@ #define BCM2835_NUM_BANKS 2 #define BCM2835_NUM_IRQS 3 -#define BCM2835_PIN_BITMAP_SZ \ - DIV_ROUND_UP(BCM2835_NUM_GPIOS, sizeof(unsigned long) * 8) - /* GPIO register offsets */ #define GPFSEL0 0x0 /* Function Select */ #define GPSET0 0x1c /* Pin Output Set */ From patchwork Sat Feb 8 13:02:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11371631 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4714A92A for ; Sat, 8 Feb 2020 13:03:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F3C2420726 for ; Sat, 8 Feb 2020 13:03:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ieHnvPzB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3C2420726 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=QGVLrClstS03czkSS4OEbJFADlzavJN5vVc0CB1UQ/s=; b=ieHnvPzBDAuOMB9ssBIwoVJhL0 4s0KCF2gSn/pn3dl0TlSTvDXD8j8jGuv8Sk+k0zmBWQ/h27wZsPkgXisxll4VfAy79wZEy+IZVTpo LHteoZQwV1/geYsJaFNdo9dJIj8RZBK4kvOYEgyjP7xbIvn8vMVX9+Es/bzBuOHmgoIa1hCHPgwt8 Nqw3BJpXeIQh5rMbbjv4EkZnVtzbp9QXiu1FsQRqs8f6zhkQzovQ6c7JUV6C2UlOVXRjshkqjX6a3 QfPwqf/ErngwvnqnLq6k1Pq65oOspGsE+dpwu75O3n/RJ1YmtyhHccdaWZodcfpc6K9rXc/pQaFEL +NwabNIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Plr-0005uz-Ll; Sat, 08 Feb 2020 13:03:39 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Pli-0005ol-Sd for linux-arm-kernel@lists.infradead.org; Sat, 08 Feb 2020 13:03:32 +0000 Received: from localhost.localdomain ([37.4.249.150]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N4yNG-1jhDG63lHY-010xUE; Sat, 08 Feb 2020 14:03:19 +0100 From: Stefan Wahren To: Nicolas Saenz Julienne , Florian Fainelli , Linus Walleij , Ray Jui , Scott Branden Subject: [PATCH 2/4] pinctrl: bcm2835: Refactor platform data Date: Sat, 8 Feb 2020 14:02:53 +0100 Message-Id: <1581166975-22949-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> References: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:uGjHYXYsoUjn7jcdElSEse07P4rKkudkAWc75trRLVK7NNyLgPs T+EAYDcjQyv2ng5IJ6G1ooPLNRU+i+UqfAgOlvRghOYExKScy9bWF5hEZx4myvVDgukqtgH G7JJylsxITYmpHfq4pTH1rsrKJG9AOS45G2eaDoGkjJetfFKCb5ZweFPWLLrTfm3falruzr UloZe3+Dimm54S23tCszw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:14f1Up/WEKY=:PT3+SP10fiNt/Lqu2fyEMJ pUI3is9ANn/SR8uU9YwW0DTC5Tz4GiNiiizxtMKocQzqCq+rSZfb9wAze4enakuH/s3/7dZiE JVT3ZMvX/ZtOA8AXx7fN8ckc7QCk1u7LOtZbocCbDEP9HdI6W4SE7LFChl7Ocmu6dMc5SbDHf XSgW/LNEWe2aOuauhIkAlIwnDYA1eDNzdI7q14jezejK4o9Ahj361VDA9STpKg8oVnacQ+uF6 TDWhyTGm/Bam+gMnMnUF1BI3b2bK5MgR6FFTnLxlLa/Q/tDjsIv7DF8iQXqpQ/cYhqU+cbp6y lmYX5KKIue48BSLRtGYB0J8rKs1l75C6IKjhlYNE1C5jE7k2p+9sGiShUA+/N0rTfxIQEC8Js w9sTe7U/eGiBaO+wOxZjg0DJm4IqjelNb/40KO8W+AL7ND0AUpT7BYPH87357k9fmyJ4S+HR5 hkRze67/3Av+R71/m0wzcVA0tJMcrRMh7rO/q8SIVQkhsrWCIuO4xPepVaLCiQgf98dTOchgq 4v97hwAFDFmedW44cqjn0bYhyZcuU4EaS3qQl3jbJW/cxuH9Ypld+S/uePKIIhnVkB4fZqdId hR798M+/mnIbsEBUTj61+Df8CAr2uub2bL/300cmWu35XM9NWY+I6uNSesCNdS/Dy216JR+l2 CyOVQhdQjDSCRGnT7jqFra9F1xl518QQarYCu7LSD/KF3necKcYPz5aUVsSmWtnpawb6e8AVF wTdZQrGwrDoXkVDAyMLtaozQnBPMsuI4XqkcNZoFBXvhjutRJhAX1Z0JA7J5sonetk736e4Zy TrtV7sooEN4qnynOEDi5VHDNQnJyttgqlDl4HzEP0dlaQPeXL2ZM28gkiUiKd7MMii3iiPl X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200208_050331_212091_873A374E X-CRM114-Status: GOOD ( 15.16 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.73 listed in list.dnswl.org] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This prepares the platform data to be easier to extend for more GPIOs. Except of this there is no functional change. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 57 +++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 3fc2638..7f0a9c6 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -82,6 +82,7 @@ struct bcm2835_pinctrl { struct pinctrl_dev *pctl_dev; struct gpio_chip gpio_chip; + struct pinctrl_desc pctl_desc; struct pinctrl_gpio_range gpio_range; raw_spinlock_t irq_lock[BCM2835_NUM_BANKS]; @@ -1051,7 +1052,7 @@ static const struct pinconf_ops bcm2711_pinconf_ops = { .pin_config_set = bcm2711_pinconf_set, }; -static struct pinctrl_desc bcm2835_pinctrl_desc = { +static const struct pinctrl_desc bcm2835_pinctrl_desc = { .name = MODULE_NAME, .pins = bcm2835_gpio_pins, .npins = ARRAY_SIZE(bcm2835_gpio_pins), @@ -1061,19 +1062,47 @@ static struct pinctrl_desc bcm2835_pinctrl_desc = { .owner = THIS_MODULE, }; -static struct pinctrl_gpio_range bcm2835_pinctrl_gpio_range = { +static const struct pinctrl_desc bcm2711_pinctrl_desc = { + .name = MODULE_NAME, + .pins = bcm2835_gpio_pins, + .npins = ARRAY_SIZE(bcm2835_gpio_pins), + .pctlops = &bcm2835_pctl_ops, + .pmxops = &bcm2835_pmx_ops, + .confops = &bcm2711_pinconf_ops, + .owner = THIS_MODULE, +}; + +static const struct pinctrl_gpio_range bcm2835_pinctrl_gpio_range = { .name = MODULE_NAME, .npins = BCM2835_NUM_GPIOS, }; +struct bcm_plat_data { + const struct gpio_chip *gpio_chip; + const struct pinctrl_desc *pctl_desc; + const struct pinctrl_gpio_range *gpio_range; +}; + +static const struct bcm_plat_data bcm2835_plat_data = { + .gpio_chip = &bcm2835_gpio_chip, + .pctl_desc = &bcm2835_pinctrl_desc, + .gpio_range = &bcm2835_pinctrl_gpio_range, +}; + +static const struct bcm_plat_data bcm2711_plat_data = { + .gpio_chip = &bcm2835_gpio_chip, + .pctl_desc = &bcm2711_pinctrl_desc, + .gpio_range = &bcm2835_pinctrl_gpio_range, +}; + static const struct of_device_id bcm2835_pinctrl_match[] = { { .compatible = "brcm,bcm2835-gpio", - .data = &bcm2835_pinconf_ops, + .data = &bcm2835_plat_data, }, { .compatible = "brcm,bcm2711-gpio", - .data = &bcm2711_pinconf_ops, + .data = &bcm2711_plat_data, }, {} }; @@ -1082,6 +1111,7 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; + const struct bcm_plat_data *pdata; struct bcm2835_pinctrl *pc; struct gpio_irq_chip *girq; struct resource iomem; @@ -1108,7 +1138,13 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) if (IS_ERR(pc->base)) return PTR_ERR(pc->base); - pc->gpio_chip = bcm2835_gpio_chip; + match = of_match_node(bcm2835_pinctrl_match, pdev->dev.of_node); + if (!match) + return -EINVAL; + + pdata = match->data; + + pc->gpio_chip = *pdata->gpio_chip; pc->gpio_chip.parent = dev; pc->gpio_chip.of_node = np; @@ -1159,19 +1195,14 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) return err; } - match = of_match_node(bcm2835_pinctrl_match, pdev->dev.of_node); - if (match) { - bcm2835_pinctrl_desc.confops = - (const struct pinconf_ops *)match->data; - } - - pc->pctl_dev = devm_pinctrl_register(dev, &bcm2835_pinctrl_desc, pc); + pc->pctl_desc = *pdata->pctl_desc; + pc->pctl_dev = devm_pinctrl_register(dev, &pc->pctl_desc, pc); if (IS_ERR(pc->pctl_dev)) { gpiochip_remove(&pc->gpio_chip); return PTR_ERR(pc->pctl_dev); } - pc->gpio_range = bcm2835_pinctrl_gpio_range; + pc->gpio_range = *pdata->gpio_range; pc->gpio_range.base = pc->gpio_chip.base; pc->gpio_range.gc = &pc->gpio_chip; pinctrl_add_gpio_range(pc->pctl_dev, &pc->gpio_range); From patchwork Sat Feb 8 13:02:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11371635 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E21B921 for ; Sat, 8 Feb 2020 13:04:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 390BE22314 for ; Sat, 8 Feb 2020 13:04:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ewcix0Jm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 390BE22314 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=037e82hlnxep2shUWL7Uezr52iZ/aFaACGvDnzKHrrY=; b=Ewcix0JmSZ2lxoiyQNr8GCVbEH CTUP1VUaWmgS8OE1NR/v95gJSXQmAG9gDr6zxqKCQ2OOX9s6qPFBsl8Gni0cifzmADc2leyQH3/wx 98yHwYvz4e3hf127Ig2f5VWBJp+uB8lJw7iFhRFx41iDCgmf+KZ+ePtRruD/omQx0VhfPNJHc8Jo8 GS0PnvjXG+hX8PnZzQNWQ9QhoupzJEvthuJHH9rcVQjQNUpRpFnbvqh8Kxy20UNZvY5fzipcvpZbA TOyBYh3eDxNYDp+ob38qTdqlkOmA2WHJafc8xKgk6CKGspN6IXv7ehJeSEfpK+wJbnS1qnxGXFTTo ivLkTwZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0PmI-0006Og-9d; Sat, 08 Feb 2020 13:04:06 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Plk-0005on-NC for linux-arm-kernel@lists.infradead.org; Sat, 08 Feb 2020 13:03:34 +0000 Received: from localhost.localdomain ([37.4.249.150]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MZk1p-1j3Sim1Nfr-00WpfZ; Sat, 08 Feb 2020 14:03:19 +0100 From: Stefan Wahren To: Nicolas Saenz Julienne , Florian Fainelli , Linus Walleij , Ray Jui , Scott Branden Subject: [PATCH 3/4] pinctrl: bcm2835: Add support for all GPIOs on BCM2711 Date: Sat, 8 Feb 2020 14:02:54 +0100 Message-Id: <1581166975-22949-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> References: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:wJFZVLd4LAH2KKoFnRbTI1bwj8OU+7/wamfwGoKhMQQPyMbTOI3 Urk+o+hSYh/HrZhSS88Ip91Bpn2nja8i4que++w4tNYBdQ+jhBq5nfvgqlVvBEhgIIKuMyT dJx+QbZOHFxMI3sXHaoI/BG4+/9CnYEwpOhsqGAzZjZCYzFPyo0di+p7XXLzE7+iooe35h+ 0QfYeMfjL8muoKCtbjZAw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:yZaTjOcI+Uc=:lwSaM89T+roULt9OSy5ZGc o0IsdafnsqzMJJnnvFl+yvn7K0/H2FP9RwGlbV4dOdfgwAfouwl37ZTzQ3qGfu+0SNYhKRAAS i9BqkVQZfbDx8DyOvZrUYLviexZ+T8ygjXRxVHgFdprKjlDkD+LX8XuvK1yqsS45zuo10IIjJ d5ovesXPP7eZd2r1N6KK0iLYs8fLDpfJYSARNbqgMRG+IZMmfyFdcZagtTJm7G7A9+ie7W0es iOVrsgBwN4xWf4HGlAh3QxHbNqwO7lRstMboZoxgbEF1+GSaXjltweUcOaU2molrweVqI6VYj GphWmTklhZjpZgvs1+64mXUMRUc5fpmKJnkt9u1Hg/y7+j+cEq0GfrhZ71CNjsgau5MWvR/Nj Os7nL+71Jk2FBrZj88ZZpdgIP3DD7CmgPBng9LZaFa7QR5q9eMoKBd1mzqpcxrSUURzGYVCDD ied1/pYHs3v/JrEQV52/UNFTgOrd4sLAHz4csVuw2NUAH9mpJUTWBkVR+ye5fEkcCq4p2CunA fYdLE+TqCEkBj+8YOIfwGWZTIZWyrmGzn7NIEIMYPEBV0VIfq0Vkvf4JJaHAue2eSTd6XuLJS Tdlhxx2tIcm+rjfwivm0jYvpFgCp02JUcrT5SScRjbxm8zKlIvJk+RlqavmwdVGmzcDj7Bm4e BJoA61svGPMtfCoaO63DiobbPrYwKlaxvJF4bFxJG05Bzz3tBmsWiL7knF+WzOXPxme0r1Och 8U+Z6Hdlm25/q7DlqPwLsWVJiJb7UR2SdL7JcWdB+szrBxEr9EB/OVNgTH/gFfR0RKlJoYtKi +V29XnEq1UcvIZcuX/cy2kzS72q/quk3vjLrMSlTb7JmsL8lWdRnqNwTjyKmUbJL2JlrzDT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200208_050333_048833_F42E0C03 X-CRM114-Status: GOOD ( 17.66 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [217.72.192.74 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.74 listed in wl.mailspike.net] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The BCM2711 supports 58 GPIOs. So extend pinctrl and GPIOs accordingly. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 54 +++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 7f0a9c6..061e70e 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -37,6 +37,7 @@ #define MODULE_NAME "pinctrl-bcm2835" #define BCM2835_NUM_GPIOS 54 +#define BCM2711_NUM_GPIOS 58 #define BCM2835_NUM_BANKS 2 #define BCM2835_NUM_IRQS 3 @@ -78,7 +79,7 @@ struct bcm2835_pinctrl { /* note: locking assumes each bank will have its own unsigned long */ unsigned long enabled_irq_map[BCM2835_NUM_BANKS]; - unsigned int irq_type[BCM2835_NUM_GPIOS]; + unsigned int irq_type[BCM2711_NUM_GPIOS]; struct pinctrl_dev *pctl_dev; struct gpio_chip gpio_chip; @@ -145,6 +146,10 @@ static struct pinctrl_pin_desc bcm2835_gpio_pins[] = { BCM2835_GPIO_PIN(51), BCM2835_GPIO_PIN(52), BCM2835_GPIO_PIN(53), + BCM2835_GPIO_PIN(54), + BCM2835_GPIO_PIN(55), + BCM2835_GPIO_PIN(56), + BCM2835_GPIO_PIN(57), }; /* one pin per group */ @@ -203,6 +208,10 @@ static const char * const bcm2835_gpio_groups[] = { "gpio51", "gpio52", "gpio53", + "gpio54", + "gpio55", + "gpio56", + "gpio57", }; enum bcm2835_fsel { @@ -353,6 +362,22 @@ static const struct gpio_chip bcm2835_gpio_chip = { .can_sleep = false, }; +static const struct gpio_chip bcm2711_gpio_chip = { + .label = "pinctrl-bcm2711", + .owner = THIS_MODULE, + .request = gpiochip_generic_request, + .free = gpiochip_generic_free, + .direction_input = bcm2835_gpio_direction_input, + .direction_output = bcm2835_gpio_direction_output, + .get_direction = bcm2835_gpio_get_direction, + .get = bcm2835_gpio_get, + .set = bcm2835_gpio_set, + .set_config = gpiochip_generic_config, + .base = -1, + .ngpio = BCM2711_NUM_GPIOS, + .can_sleep = false, +}; + static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc, unsigned int bank, u32 mask) { @@ -399,7 +424,7 @@ static void bcm2835_gpio_irq_handler(struct irq_desc *desc) bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000); bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff); break; - case 2: /* IRQ2 covers GPIOs 46-53 */ + case 2: /* IRQ2 covers GPIOs 46-57 */ bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000); break; } @@ -618,7 +643,7 @@ static struct irq_chip bcm2835_gpio_irq_chip = { static int bcm2835_pctl_get_groups_count(struct pinctrl_dev *pctldev) { - return ARRAY_SIZE(bcm2835_gpio_groups); + return BCM2835_NUM_GPIOS; } static const char *bcm2835_pctl_get_group_name(struct pinctrl_dev *pctldev, @@ -776,7 +801,7 @@ static int bcm2835_pctl_dt_node_to_map(struct pinctrl_dev *pctldev, err = of_property_read_u32_index(np, "brcm,pins", i, &pin); if (err) goto out; - if (pin >= ARRAY_SIZE(bcm2835_gpio_pins)) { + if (pin >= pc->pctl_desc.npins) { dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n", np, pin); err = -EINVAL; @@ -852,7 +877,7 @@ static int bcm2835_pmx_get_function_groups(struct pinctrl_dev *pctldev, { /* every pin can do every function */ *groups = bcm2835_gpio_groups; - *num_groups = ARRAY_SIZE(bcm2835_gpio_groups); + *num_groups = BCM2835_NUM_GPIOS; return 0; } @@ -1055,7 +1080,7 @@ static const struct pinconf_ops bcm2711_pinconf_ops = { static const struct pinctrl_desc bcm2835_pinctrl_desc = { .name = MODULE_NAME, .pins = bcm2835_gpio_pins, - .npins = ARRAY_SIZE(bcm2835_gpio_pins), + .npins = BCM2835_NUM_GPIOS, .pctlops = &bcm2835_pctl_ops, .pmxops = &bcm2835_pmx_ops, .confops = &bcm2835_pinconf_ops, @@ -1063,9 +1088,9 @@ static const struct pinctrl_desc bcm2835_pinctrl_desc = { }; static const struct pinctrl_desc bcm2711_pinctrl_desc = { - .name = MODULE_NAME, + .name = "pinctrl-bcm2711", .pins = bcm2835_gpio_pins, - .npins = ARRAY_SIZE(bcm2835_gpio_pins), + .npins = BCM2711_NUM_GPIOS, .pctlops = &bcm2835_pctl_ops, .pmxops = &bcm2835_pmx_ops, .confops = &bcm2711_pinconf_ops, @@ -1077,6 +1102,11 @@ static const struct pinctrl_gpio_range bcm2835_pinctrl_gpio_range = { .npins = BCM2835_NUM_GPIOS, }; +static const struct pinctrl_gpio_range bcm2711_pinctrl_gpio_range = { + .name = "pinctrl-bcm2711", + .npins = BCM2711_NUM_GPIOS, +}; + struct bcm_plat_data { const struct gpio_chip *gpio_chip; const struct pinctrl_desc *pctl_desc; @@ -1090,9 +1120,9 @@ static const struct bcm_plat_data bcm2835_plat_data = { }; static const struct bcm_plat_data bcm2711_plat_data = { - .gpio_chip = &bcm2835_gpio_chip, + .gpio_chip = &bcm2711_gpio_chip, .pctl_desc = &bcm2711_pinctrl_desc, - .gpio_range = &bcm2835_pinctrl_gpio_range, + .gpio_range = &bcm2711_pinctrl_gpio_range, }; static const struct of_device_id bcm2835_pinctrl_match[] = { @@ -1118,8 +1148,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) int err, i; const struct of_device_id *match; - BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_pins) != BCM2835_NUM_GPIOS); - BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_groups) != BCM2835_NUM_GPIOS); + BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_pins) != BCM2711_NUM_GPIOS); + BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_groups) != BCM2711_NUM_GPIOS); pc = devm_kzalloc(dev, sizeof(*pc), GFP_KERNEL); if (!pc) From patchwork Sat Feb 8 13:02:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11371633 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0565186E for ; Sat, 8 Feb 2020 13:04:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9EBF1217BA for ; Sat, 8 Feb 2020 13:04:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I/Srxm7W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EBF1217BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=kOLNDe8wIlAJCRzP4U5xDCLiAx1bxrjaytYnqPBpfLc=; b=I/Srxm7WyhhiSQ00oKDzWR4hWg e5ayFkUoFdvL3/owFvcBXW1D1Z6XkrDlLhhZ7tbwbNdQ+mBYpgOVtDPSKiFyxGYb7MRUI2Rmqav8X 74eBqrvRnJA4wJEtbuMYLIFG7zSTPkjltykrT3i1t4VVD+CwDD/mw+kLCrcZGZvLAH3qOfrgAyCB+ jle2Cwg79Qx04Q/BagXzD/k4Icw3w6zrliyxKjs+0iiAcliPm/Red2Tykv7ZKLQPBmxCOn9uFnJAA T1x+4QDsD0wPoyDM1y7l8YXtJpdF1bBwyIq0du5pJRrwDrDfK3i8MmZCE8k+FsLSEOGmHUdYSyNAU LGUiskmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Pm8-0006CC-ME; Sat, 08 Feb 2020 13:03:56 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j0Plj-0005oo-Os for linux-arm-kernel@lists.infradead.org; Sat, 08 Feb 2020 13:03:33 +0000 Received: from localhost.localdomain ([37.4.249.150]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mk1BG-1jORvL3bXk-00kOXK; Sat, 08 Feb 2020 14:03:20 +0100 From: Stefan Wahren To: Nicolas Saenz Julienne , Florian Fainelli , Linus Walleij , Ray Jui , Scott Branden Subject: [PATCH 4/4] ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels Date: Sat, 8 Feb 2020 14:02:55 +0100 Message-Id: <1581166975-22949-5-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> References: <1581166975-22949-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:Uf6ddeH+Q5wU3A4iBHbQL6kw6jhHXupWbDnedDbnjV6Sm0OvoL+ 0aiJDtkaX9pxbPkeBOuQ4JmMWw+XD7KZ+F9sU+5aHuZy/6fLbFudCprCJMvvJnOtiIJ3jr1 B+7BL9xVHLGsFROXiW9Wgi09sxB0wh34pzksdAQ5hvcm5AvKiM6t8b0dPd+vOjkjeVl+PHy W7Rl7txfWj9h4O4xX6r8w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:L6KhevTF5eo=:kVi0/hnHVHoDdWEm8JG5c0 Whuq8qda1JXLC+G8nGXZ0o2IeeNV0wpBLvxYUbfUAh44CRunuZK3v12klyoBZ9dJCpxy70Ul7 41EMdotulajfRWzLx+j6ZCwCEbgMIU6h5C28XzmsC9PMPs/z4kOu8m75gC1Y+lgdk4x3umLyp L2SVF3lPNukgvVUkaWhSR90Obf8pKKhJ2sH7awlWJOodxEaotOlApZW1eB1jpqw0rKgbgIG2E BBnC16WnCNdydLgJp1UzokVFUpfW72K8fwdj/SFFuhcWkzGxludPEDZP7y8g+gUhWEebp5OaB /69pIBlKi4z8izFZ52Y4uG5ZVGD6JrqNqwJu1RO5xMkJ577S3n9BorpNKnGfCeSuuxRW96pSr /cCsVIF0E79Rk2g80Q3sYdaYzyAKElDrR6fSBIPrEDAhMXdyhNu3xMrt5GXGVYdrNisg7WzBB qTIpRWxduGLpQvE37HOs88QP6At6sNGaIDS1mCpmSIaskusgw64djCS7h6OwrJh3pmkw1UdpA PavqlbmlEhm+j9N3lkG3PS8iKnfC6VOrpQ5V66a+/urmqLuUlJc9VFWeLNXjZeIqWbmaGHHvY HYby8QaW+oIPhaxUXDaMVYLpvN4IBqXL+5RvnCu/OnBR6T0Gn+DuDONHIR2HhJjWREIvAUF8I /+Nvo3VCQZSg2ErAb53uAP0+x3Q5u5XaAbGIpr55Ko6WqQqZW7dft59cXqElK6iL4eFEP4kB5 HbLPEGKLbOZRbabRcgrvnUxLkX2/NSUsuUMW+rcWLtvxzRbSFDfsXTDDvpewjJJ83p/DdQx0t YUeC4OM5/bf+3g5l4A8wprQrNyXylHtrxfar4+5h7VDbfIzUorTk5wroQy3I8fOz+2+nfpE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200208_050332_092950_3B3FBC6E X-CRM114-Status: GOOD ( 14.27 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.17.13 listed in list.dnswl.org] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This adds the labels for all the SoC GPIOs on the Raspberry Pi 4. Signed-off-by: Stefan Wahren Reviewed-by: Linus Walleij --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 73 +++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index 1b5a835..cb33852 100644 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts @@ -71,6 +71,79 @@ }; }; +&gpio { + /* + * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and + * the official GPU firmware DT blob. + * + * Legend: + * "FOO" = GPIO line named "FOO" on the schematic + * "FOO_N" = GPIO line named "FOO" on schematic, active low + */ + gpio-line-names = "ID_SDA", + "ID_SCL", + "SDA1", + "SCL1", + "GPIO_GCLK", + "GPIO5", + "GPIO6", + "SPI_CE1_N", + "SPI_CE0_N", + "SPI_MISO", + "SPI_MOSI", + "SPI_SCLK", + "GPIO12", + "GPIO13", + /* Serial port */ + "TXD1", + "RXD1", + "GPIO16", + "GPIO17", + "GPIO18", + "GPIO19", + "GPIO20", + "GPIO21", + "GPIO22", + "GPIO23", + "GPIO24", + "GPIO25", + "GPIO26", + "GPIO27", + "RGMII_MDIO", + "RGMIO_MDC", + /* Used by BT module */ + "CTS0", + "RTS0", + "TXD0", + "RXD0", + /* Used by Wifi */ + "SD1_CLK", + "SD1_CMD", + "SD1_DATA0", + "SD1_DATA1", + "SD1_DATA2", + "SD1_DATA3", + /* Shared with SPI flash */ + "PWM0_MISO", + "PWM1_MOSI", + "STATUS_LED_G_CLK", + "SPIFLASH_CE_N", + "SDA0", + "SCL0", + "RGMII_RXCLK", + "RGMII_RXCTL", + "RGMII_RXD0", + "RGMII_RXD1", + "RGMII_RXD2", + "RGMII_RXD3", + "RGMII_TXCLK", + "RGMII_TXCTL", + "RGMII_TXD0", + "RGMII_TXD1", + "RGMII_TXD2", + "RGMII_TXD3"; +}; + &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;