From patchwork Mon Jan 22 05:04:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 864152 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQ07r70V8z9s82 for ; Mon, 22 Jan 2018 16:18:16 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQ07r5cc0zF0Zc for ; Mon, 22 Jan 2018 16:18:16 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmx.net (client-ip=212.227.17.22; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zPzyH6Sk7zF0ZB for ; Mon, 22 Jan 2018 16:09:59 +1100 (AEDT) Received: from localhost.localdomain ([88.153.6.51]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mhdex-1eQTph1xtT-00Mqbc; Mon, 22 Jan 2018 06:04:26 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/6] resource: Extend the PPC32 reserved memory hack Date: Mon, 22 Jan 2018 06:04:06 +0100 Message-Id: <20180122050411.32460-2-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122050411.32460-1-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:vTHIJJXWQJuMqm7WTzeOWf00hH8opX7HjobMki9Y4ZZjgST5I5l PYiiM+e9u6cOELN+4tRZlD5y2xhq50f3LeJuvS+kVDWu+Xh+3MiLrcMuRLfLHN2moB+nkFU uTDM76Pxnh7Wxh027tOO5jYkN2avH8gSyUMj08bnJK2FExGE1ZXVwoPrx18USpptCENq6xI BgZZKyVDJaYYGWGK28HqA== X-UI-Out-Filterresults: notjunk:1; V01:K0:6UZi7Vwzo7k=:tr9d7qU2gRMVabcZ08QoQF /aodOkp+meO0bSMLlIdeBef9CB45P5r1Y/kk9db/YEsuPgsiMw690d+8f0J8HG6Y6s7NvpqO9 ynVUCtQPzejsXGvpBuj5QdFScgMTuOWuadBUkk96sgn2nXSMoWN9dRLANVtXcJshRNXoS9X47 Wz3q/WTKRL9NHQ+IG+DsBCXGzgvsuRtB9yP1BmvusC3HEvvXzXZybO79K33jBCbDhDMYT9uvv LIykGMqxFZPqfGvoDwn+01Lv+FltGe5QrK5/EUEeNR6kmxZgalYM8tZqMzLSWG/MV6M+4Byio c3Jy/VwNC/4yjuiuJmwaNkvMF+tMXQUWlDysb7MZUbTUP8ZIX0z7w5W0Wok0uABDWb7Ayvlce NR8qfzYAwSA4GfbM005hXV2JkO/bbR1/MDzXd2sY8ZefGXpryqOOBPOilKjOxoiHf1ZFXYljo XPPOt81rrw5zHBMFT3yh0wsGrm8kIT8DC1kT1QXmm3McXmbswHGkhhQGP+p307Qnjlc2kNbNu 1p7bBetfNljT/ikzrY1kmAIsTWlFM9RTTis1aVhFBQX6Dcx08jUghk2QwkrzOGP+xODBrlXmK 3hlIZHXK1spI0q8zHPcX5YccOgoSGtO9OE1PgoZFSdSkwz9+p/echqezMf9vXkQXk7bZfoEF3 PgwRbyXlQcMv4CJB37EV49QfAMPAVbAq9TjovZUb4HG+zlGDlkBx8fsoerXlAtgnIehB9tGj3 PY2aEQyDB2MArJ/Llxbuilq0HdtzH87A4b/dg7eBC8iH9oHHkojps4xEaJOPguJN8pa51qKz9 q452EwlOqEArhbMUqYjwuTVrMviDBspkG8zY3CbR1oUEevOR5M= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Brijesh Singh , devicetree@vger.kernel.org, Albert Herranz , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , linux-gpio@vger.kernel.org, Thomas Gleixner , Borislav Petkov , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On the Nintendo Wii, there are two ranges of physical memory, and MMIO in between, but Linux on ppc32 doesn't support discontiguous memory. Therefore a hack was introduced in commit c5df7f775148 ("powerpc: allow ioremap within reserved memory regions") and commit de32400dd26e ("wii: use both mem1 and mem2 as ram"): - Treat the area from the start of the first memory area (MEM1) to the end of the second (MEM2) as one big memory area, but mark the part that doesn't belong to MEM1 or MEM2 as reserved. - Only on the Wii, allow ioremap to be used on reserved memory. This hack, however, doesn't account for the "resource"-based API in kernel/resource.c, because __request_region performs its own checks. Extend the hack to kernel/resource.c, to allow more drivers to allocate their MMIO regions on the Wii. Signed-off-by: Jonathan Neuschäfer Cc: Albert Herranz --- v2: - CC Albert Herranz, who introduced this hack in 2009. --- kernel/resource.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/kernel/resource.c b/kernel/resource.c index 54ba6de3757c..bb3d329329da 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -1134,6 +1134,24 @@ resource_size_t resource_alignment(struct resource *res) static DECLARE_WAIT_QUEUE_HEAD(muxed_resource_wait); +/* + * On some ppc32 platforms (Nintendo Wii), reserved memory is used to work + * around the fact that Linux doesn't support discontiguous memory (all memory + * is treated as one large area with holes punched in it), and reserved memory + * is allowed to be allocated. + */ +#ifdef CONFIG_PPC32 +static bool conflict_ignored(struct resource *conflict) +{ + extern int __allow_ioremap_reserved; + + return __allow_ioremap_reserved && + (conflict->flags & IORESOURCE_SYSRAM); +} +#else +static bool conflict_ignored(struct resource *conflict) { return false; } +#endif + /** * __request_region - create a new busy resource region * @parent: parent resource descriptor @@ -1166,8 +1184,9 @@ struct resource * __request_region(struct resource *parent, res->desc = parent->desc; conflict = __request_resource(parent, res); - if (!conflict) + if (!conflict || conflict_ignored(conflict)) break; + if (conflict != parent) { if (!(conflict->flags & IORESOURCE_BUSY)) { parent = conflict; From patchwork Mon Jan 22 05:04:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 864153 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQ09j1rbQz9s82 for ; Mon, 22 Jan 2018 16:19:53 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQ09j0h2VzF0S8 for ; Mon, 22 Jan 2018 16:19:53 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmx.net (client-ip=212.227.17.20; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zPzyc5kKjzF0ZJ for ; Mon, 22 Jan 2018 16:10:16 +1100 (AEDT) Received: from localhost.localdomain ([88.153.6.51]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MPYqL-1ehb0p3x0z-004lWY; Mon, 22 Jan 2018 06:04:31 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/6] powerpc: wii: Explicitly configure GPIO owner for poweroff pin Date: Mon, 22 Jan 2018 06:04:07 +0100 Message-Id: <20180122050411.32460-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122050411.32460-1-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:ipEcxI650fqJqLRTlEyk0Ce/9hzbUDHR/tAd6LhSK/yl8aTtQa4 GpD6UpndgicEmMfcrxcb5q7ZGfT5GMXawN0/Xksmid95bfsZMN6rFrVSkGhRC9Ohxch3yML A1J5StMlXQyXiCm8Q3z4Ty8L48ZpDXaIxmAhTzJBT3RPLfRxf2thb5tFTnqgj5hd3ITDKnt 8INL8kGqlYV7RLxtsQuTg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Z7bTE7sZgWY=:BY75wS8yDFg5hcJhHD7Wp0 t0bcWGw+XtHcIoTTmDGv0KWTaCABDcJkwO2jJxZljnN2UYRzumWtFb/dANuVUuq0YLkyP5+9t uYTYD8VoK+MdshWPtd34OYYnzHR/NeDqIe8DLSkorgkT6BUAAnYMnbDxAfSrT+V95Eboeno56 L614HJ27sPSC0lKqR+qXRmOxBsAqnuiQM2Re2YPo0VP7A3OEMnhhQmx+5xXQjxnx/uZp/MiDV k8jbddcP+m8XC7f4zAR5pyx2bo1D2uz7gWhy+6NPIEU6lsqr4VwsBvDzsp+xdaBqycLrNyoUD 88aRDtCIQhvWhjd3YeULqGeOy4v+b23K938Vjd1DYx/3A5bgidxUe+HQFrK5XqxLFS4lJu43h h6T8zHUcKsccZBQcxy8ENgvov0r3ukzFhV9ISWc3/QoirW39YUS0k5RdONjIW6K391sHyQv0j vslxGg/m5CoYKKb7GJuga5ZM6GA+gQ+2yJWwllsTvc7s96PcRI1+Bt9X/fcy5wamRsVdSuU4z 5xHOYnjaaMZzWTFR0XZcJbhDAbrXu8vwFDtvgWfD1uP5P7zhyf2WFjWo9Tqvp/S3SqYhYQLHY d9gzkLJQ+TowR5qKCeLpGfcGboGFkJSRoCzGVe+zj8ISMLsQaXOfF4V6+TDyExSXNfOS9eBPc P8Y8eA7DRJiiJZk6nVAx+Wb9hL3r6z0ya30OVA2bQ6dh3blyMRq8jfj7a2/8mHw8vDA5j2n84 fxnp7wRS0p4JeKb2DPpCXLwqCF8hW8etm/d+9J1ajv3xmCXhlhqdSUrgusMfisxTm9yPpjnpz JZ3cYGqnOdU3tt8TbPLilj8gDMAiKaGD7C7tSChGgHcsjxsGa8= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , linux-gpio@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The Hollywood chipset's GPIO controller has two sets of registers: One for access by the PowerPC CPU, and one for access by the ARM coprocessor (but both are accessible from the PPC because the memory firewall (AHBPROT) is usually disabled when booting Linux, today). The wii_power_off function currently assumes that the poweroff GPIO pin is configured for use via the ARM side, but the upcoming GPIO driver configures all pins for use via the PPC side, breaking poweroff. Configure the owner register explicitly in wii_power_off to make wii_power_off work with and without the new GPIO driver. I think the Wii can be switched to the generic gpio-poweroff driver, after the GPIO driver is merged. Signed-off-by: Jonathan Neuschäfer --- v2: - no change --- arch/powerpc/platforms/embedded6xx/wii.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 79a1fe54ebc9..6e6db1e16d71 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c @@ -45,6 +45,7 @@ #define HW_GPIO_BASE(idx) (idx * 0x20) #define HW_GPIO_OUT(idx) (HW_GPIO_BASE(idx) + 0) #define HW_GPIO_DIR(idx) (HW_GPIO_BASE(idx) + 4) +#define HW_GPIO_OWNER (HW_GPIO_BASE(1) + 0x1c) #define HW_GPIO_SHUTDOWN (1<<1) #define HW_GPIO_SLOT_LED (1<<5) @@ -177,6 +178,12 @@ static void wii_power_off(void) local_irq_disable(); if (hw_gpio) { + /* + * set the owner of the shutdown pin to ARM, because it is + * accessed through the registers for the ARM, below + */ + clrbits32(hw_gpio + HW_GPIO_OWNER, HW_GPIO_SHUTDOWN); + /* make sure that the poweroff GPIO is configured as output */ setbits32(hw_gpio + HW_GPIO_DIR(1), HW_GPIO_SHUTDOWN); From patchwork Mon Jan 22 05:04:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 864150 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQ02p2m5mz9s82 for ; Mon, 22 Jan 2018 16:13:54 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQ02p1hJjzF0Yr for ; Mon, 22 Jan 2018 16:13:54 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmx.net (client-ip=212.227.17.20; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zPzyC6YTKzF0ch for ; Mon, 22 Jan 2018 16:09:55 +1100 (AEDT) Received: from localhost.localdomain ([88.153.6.51]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Li0dC-1f8vHX3GdO-00nD93; Mon, 22 Jan 2018 06:04:33 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 3/6] gpio: Add GPIO driver for Nintendo Wii Date: Mon, 22 Jan 2018 06:04:08 +0100 Message-Id: <20180122050411.32460-4-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122050411.32460-1-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:ibEeOxCOZl9oNbKcAJkfcgUJVUu/7MTDSaqSu6AcZBz+yAzFe6f y2iE3HKAYmVahSUqQ01sjABMeFM+8OUwcxi61MkSverbzbFhclJfF0gwVDqborfbzxerw6g DH1eNKND+u0yIZvSdFqt4VGOuxWUkugyFlmcp7vonYZGlLjQ/FxxylCxNgqCHVaOgsvhq/X P8VUrNW/frU4BQU6vLAxw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Dn5i1eDkyqM=:WG9jqNy09o9D3TObrxLHka f+9uBYaEBejBWYzoJDpY3/nNn0k9BsLS1g6NK5fzy9xUuC+InM6HjRJKx0/Ou99cKvSN+/okU zYcZARgbAL4hG8nOx9F6KtjGAvVZC6STJ7Grdku5mfqXoHovHXtoMNXa8fQCWJU5NLBUkYE/V 2OgVCbH6tlKrUOqOl3aO5QfYy8WIkk3OQdzaK/9vwbw/4fS/7KFUcCC9E1EFt2LO58ejKuAb3 uQRdY2RHPOyf04hXdu66HxfnXecDtY5pGXBR9ttpXciwuEg71aiatrSMJuSLe/65HAc3tAB79 D2y0TWzMesaVUVCIjhOgANd6l/Qnv9guiWFG+8Iae60MdiDYXQhSTphKHtyI2ZddY1Bo95mSJ 7OIRUIqzbru6Gpmg+V/OhO0G+z33twMM7Nm5EsWKSnNUqFSxBRMf2YYWxC1XLDkvP8VjqNqzV cmxJfxMU/PvbMPUVPGJw+bkc5emnAJioBI9ya9sHf919hcapzDlt12xKKJrlaS/NXL42yQYGs xIHUVNLPLklYy8XGp34uLp1U56ELzW1ggWHFLb5Wg/QZ7QQENXpOrqPm6MeDGC+a4BDwIvyK6 SZm3kxFqY1sdCemhQ1ai7pIU7XG5cBrVEoYMgMxC99oF+DHMSM8zKRlxUy/9Uqm8Z2gQN5cVi DgqJsKjqhqRp4t6m13uhu6++ErVM/LIOiH+Su+WqIQmCdD+wb4+bgJoCpl9g2TF1mUDOeCtyt Mo/HRO5yogAgRWcjQmnaMI0kcFN81JXUOAt415Jj9i5BO+3smtFFZSGnH3IVRUoM1H8UMJQHm 1B0tWauZv7XmVisuan+DqTMdz/sUVsg8+b+pPAW3X4RahDjlwQ= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Albert Herranz , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , linux-gpio@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Linus Walleij Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller that supports a configurable number of pins (up to 32), interrupts, and some special mechanisms to share the controller between the system's security processor (an ARM926) and the PowerPC CPU. Pin multiplexing is not supported. This patch adds a basic driver for this GPIO controller. Interrupt support will come in a later patch. This patch is based on code developed by Albert Herranz and the GameCube Linux Team, file arch/powerpc/platforms/embedded6xx/hlwd-gpio.c, available at https://github.com/DeltaResero/GC-Wii-Linux-Kernels, but has grown quite dissimilar. Signed-off-by: Jonathan Neuschäfer Cc: Albert Herranz Cc: Segher Boessenkool --- v2: - Change hlwd_gpio_driver.driver.name to "gpio-hlwd" to match the filename (was "hlwd_gpio") - Remove unnecessary include of linux/of_gpio.h, as suggested by Linus Walleij. - Add struct device pointer to context struct to make it possible to use dev_info(hlwd->dev, "..."), as suggested by Linus Walleij - Use the GPIO_GENERIC library to reduce code size, as suggested by Linus Walleij - Use iowrite32be instead of __raw_writel for big-endian MMIO access, as suggested by Linus Walleij - Remove commit message paragraph suggesting to diff against the original driver, because it's so different now --- drivers/gpio/Kconfig | 9 ++++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-hlwd.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 drivers/gpio/gpio-hlwd.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index d6a8e851ad13..47606dfe06cc 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -229,6 +229,15 @@ config GPIO_GRGPIO Select this to support Aeroflex Gaisler GRGPIO cores from the GRLIB VHDL IP core library. +config GPIO_HLWD + tristate "Nintendo Wii (Hollywood) GPIO" + depends on OF_GPIO + select GPIO_GENERIC + help + Select this to support the GPIO controller of the Nintendo Wii. + + If unsure, say N. + config GPIO_ICH tristate "Intel ICH GPIO" depends on PCI && X86 diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 4bc24febb889..492f62d0eb59 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -54,6 +54,7 @@ obj-$(CONFIG_GPIO_FTGPIO010) += gpio-ftgpio010.o obj-$(CONFIG_GPIO_GE_FPGA) += gpio-ge.o obj-$(CONFIG_GPIO_GPIO_MM) += gpio-gpio-mm.o obj-$(CONFIG_GPIO_GRGPIO) += gpio-grgpio.o +obj-$(CONFIG_GPIO_HLWD) += gpio-hlwd.o obj-$(CONFIG_HTC_EGPIO) += gpio-htc-egpio.o obj-$(CONFIG_GPIO_ICH) += gpio-ich.o obj-$(CONFIG_GPIO_INGENIC) += gpio-ingenic.o diff --git a/drivers/gpio/gpio-hlwd.c b/drivers/gpio/gpio-hlwd.c new file mode 100644 index 000000000000..cf3f05a1621c --- /dev/null +++ b/drivers/gpio/gpio-hlwd.c @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright (C) 2008-2009 The GameCube Linux Team +// Copyright (C) 2008,2009 Albert Herranz +// Copyright (C) 2017-2018 Jonathan Neuschäfer +// +// Nintendo Wii (Hollywood) GPIO driver + +#include +#include +#include +#include +#include +#include +#include + +/* + * Register names and offsets courtesy of WiiBrew: + * https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs + * + * Note that for most registers, there are two versions: + * - HW_GPIOB_* Is always accessible by the Broadway PowerPC core, but does + * always give access to all GPIO lines + * - HW_GPIO_* Is only accessible by the Broadway PowerPC code if the memory + * firewall (AHBPROT) in the Hollywood chipset has been configured to allow + * such access. + * + * The ownership of each GPIO line can be configured in the HW_GPIO_OWNER + * register: A one bit configures the line for access via the HW_GPIOB_* + * registers, a zero bit indicates access via HW_GPIO_*. This driver uses + * HW_GPIOB_*. + */ +#define HW_GPIOB_OUT 0x00 +#define HW_GPIOB_DIR 0x04 +#define HW_GPIOB_IN 0x08 +#define HW_GPIOB_INTLVL 0x0c +#define HW_GPIOB_INTFLAG 0x10 +#define HW_GPIOB_INTMASK 0x14 +#define HW_GPIOB_INMIR 0x18 +#define HW_GPIO_ENABLE 0x1c +#define HW_GPIO_OUT 0x20 +#define HW_GPIO_DIR 0x24 +#define HW_GPIO_IN 0x28 +#define HW_GPIO_INTLVL 0x2c +#define HW_GPIO_INTFLAG 0x30 +#define HW_GPIO_INTMASK 0x34 +#define HW_GPIO_INMIR 0x38 +#define HW_GPIO_OWNER 0x3c + + +struct hlwd_gpio { + struct gpio_chip gpioc; + void __iomem *regs; + struct device *dev; +}; + +static int hlwd_gpio_probe(struct platform_device *pdev) +{ + struct hlwd_gpio *hlwd; + struct resource *regs_resource; + u32 ngpios; + int res; + + hlwd = devm_kzalloc(&pdev->dev, sizeof(*hlwd), GFP_KERNEL); + if (!hlwd) + return -ENOMEM; + + /* Save the struct device pointer so dev_info, etc. can be used. */ + hlwd->dev = &pdev->dev; + + regs_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (IS_ERR(regs_resource)) + return PTR_ERR(regs_resource); + + hlwd->regs = devm_ioremap_resource(&pdev->dev, regs_resource); + if (IS_ERR(hlwd->regs)) + return PTR_ERR(hlwd->regs); + + /* + * Claim all GPIOs using the OWNER register. This will not work on + * systems where the AHBPROT memory firewall hasn't been configured to + * permit PPC access to HW_GPIO_*. + * + * Note that this has to happen before bgpio_init reads the + * HW_GPIOB_OUT and HW_GPIOB_DIR, because otherwise it reads the wrong + * values. + */ + iowrite32be(0xffffffff, hlwd->regs + HW_GPIO_OWNER); + + res = bgpio_init(&hlwd->gpioc, &pdev->dev, 4, + hlwd->regs + HW_GPIOB_IN, hlwd->regs + HW_GPIOB_OUT, + NULL, hlwd->regs + HW_GPIOB_DIR, NULL, + BGPIOF_BIG_ENDIAN_BYTE_ORDER); + + if (res < 0) { + dev_warn(hlwd->dev, "bgpio_init failed: %d\n", res); + return res; + } + + if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) + ngpios = 32; + hlwd->gpioc.ngpio = ngpios; + + return devm_gpiochip_add_data(&pdev->dev, &hlwd->gpioc, hlwd); +} + +static const struct of_device_id hlwd_gpio_match[] = { + { .compatible = "nintendo,hollywood-gpio", }, + {}, +}; +MODULE_DEVICE_TABLE(of, hlwd_gpio_match); + +static struct platform_driver hlwd_gpio_driver = { + .driver = { + .name = "gpio-hlwd", + .of_match_table = hlwd_gpio_match, + }, + .probe = hlwd_gpio_probe, +}; +module_platform_driver(hlwd_gpio_driver); + +MODULE_AUTHOR("Jonathan Neuschäfer "); +MODULE_DESCRIPTION("Nintendo Wii GPIO driver"); +MODULE_LICENSE("GPL"); From patchwork Mon Jan 22 05:04:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 864154 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQ0D50VZyz9s82 for ; Mon, 22 Jan 2018 16:21:57 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQ0D467LZzF0cn for ; Mon, 22 Jan 2018 16:21:56 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmx.net (client-ip=212.227.17.21; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zPzyq03qtzF0bB for ; Mon, 22 Jan 2018 16:10:26 +1100 (AEDT) Received: from localhost.localdomain ([88.153.6.51]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M97Nh-1eVUap2ilh-00CUD4; Mon, 22 Jan 2018 06:04:38 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 4/6] dt-bindings: gpio: Add binding for Wii GPIO controller Date: Mon, 22 Jan 2018 06:04:09 +0100 Message-Id: <20180122050411.32460-5-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122050411.32460-1-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:EJbVWWO41fMC1/OKS3FD40xAEE5Q5hJ43RCQmExKD31oZ9Oldwb N+fMxxJ7oeuf5Vfx2jcdJxQfuisE6PdUmgWFXp9nnYiC4L1HkOc0rF0c2wN9WuaaLB3CmFn JV8hXoGJDCeZJPgSJVl4mUzKBSZ7yIbTlqsxtQCm/2NqhAHN34iuxMcS9zLF6XYK7nPimx/ pzodc3y2PphYb0QvL167g== X-UI-Out-Filterresults: notjunk:1; V01:K0:r2sSucqb+QY=:Qz7KxgF4srPqg/QY23Vssb sWCiWx+zsDyFeREu5hjV9Y32EYnZ1Uzt7gyHE39L69CCfhoLjIZcFiokOvn/ulwlYKlpxtHjj AZS9gFnf/ff1RNjZVp7xi8IVcX1toq665+ThqiC+DPi3mRlDs7+P8feXD/399/HlcJNiXFjSS MtzWXf3RrONgs17B197abnWYvmAhmM+Gb+VeWU9BZ0XaeoEHXbVJPYPs8R0dpauctY2IeWE++ 4VhnTwhUSW/bmkroqMp2G3rnqRpKxQD7pIdwDbh7YyXoJziYOQVIxKIgNfo74LN4EvVLDJ+I+ ZFZ51wdYw21Y/yJwDFFcYHxHBMc8rqIxw1cfnSuand8ZXZZye2tDmirFwiHDc+cWne39Q4vLL N7ZqCA48gNgDZorEDxbNTAVJIVSM5FMhtUDVYe8PjE9MhVpQ0z9RqcxkXISXnmeAafEqXeGzx 1aLoBiSmYH9widmM5DXmoCF3bzNbfiUMfW0LKdOkLmE2EFmYWamgUfocjQXfTtibytD6SBKem S/q7+GD3a0Vp9wvZE3Tn4ANONKj4EUMbKkve58rjB8w/Vz6HsJjEpwN/6/FmPhB5G6DUmJfWM L+6rhBZqg/vhlcXD8sRydMZJ6ZyddMqBPiMlCs9Csmzo5EhXQ9eIyg0cYOwTnVHHGRCvv1l9j CZCVbhk7a85Fn0HfdhZA2wmXbp1yb5KbpTEkbbTsm2M8d9l6fWFN2UempULzXZ+xtpyH4QMgH 3qkRFtXtAG2wuH/SKuWYI2IXsXB8dLHEMxd6OuDTpohiy/pyiG5XN7TOTEgZvGA7945feAy33 GAMU46p8yNSKVXLEtQZvLlHoPAbmtkPibLIR4L/Xf/NwW2JC+I= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Linus Walleij , =?utf-8?q?Jonathan_Neusch=C3=A4fe?= =?utf-8?q?r?= , linux-gpio@vger.kernel.org, Rob Herring , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The Nintendo Wii game console has a GPIO controller, which is used for the optical disk slot LED, buttons, poweroff, etc. This patch adds a binding for this GPIO controller. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring --- v2: - Drop the leading zero in the example, as suggested by Rob Herring - Add some text to the commit message, as suggested by Linus Walleij --- .../bindings/gpio/nintendo,hollywood-gpio.txt | 27 ++++++++++++++++++++++ .../devicetree/bindings/powerpc/nintendo/wii.txt | 9 +------- 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt diff --git a/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt b/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt new file mode 100644 index 000000000000..20fc72d9e61e --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt @@ -0,0 +1,27 @@ +Nintendo Wii (Hollywood) GPIO controller + +Required properties: +- compatible: "nintendo,hollywood-gpio +- reg: Physical base address and length of the controller's registers. +- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Should be <2>. The first cell is the pin number and the + second cell is used to specify optional parameters: + - bit 0 specifies polarity (0 for normal, 1 for inverted). + +Optional properties: +- ngpios: see Documentation/devicetree/bindings/gpio/gpio.txt +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Should be two. +- interrupts: Interrupt specifier for the controller's Broadway (PowerPC) + interrupt. +- interrupt-parent: phandle of the parent interrupt controller. + +Example: + + GPIO: gpio@d8000c0 { + #gpio-cells = <2>; + compatible = "nintendo,hollywood-gpio"; + reg = <0x0d8000c0 0x40>; + gpio-controller; + ngpios = <24>; + } diff --git a/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt b/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt index 36afa322b04b..a3dc4b9fa11a 100644 --- a/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt +++ b/Documentation/devicetree/bindings/powerpc/nintendo/wii.txt @@ -152,14 +152,7 @@ Nintendo Wii device tree 1.l) The General Purpose I/O (GPIO) controller node - Represents the dual access 32 GPIO controller interface. - - Required properties: - - - #gpio-cells : <2> - - compatible : should be "nintendo,hollywood-gpio" - - reg : should contain the IPC registers location and length - - gpio-controller + see Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt 1.m) The control node From patchwork Mon Jan 22 05:04:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 864155 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQ0GM4fp9z9s82 for ; Mon, 22 Jan 2018 16:23:55 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQ0GM3JtWzF0VS for ; Mon, 22 Jan 2018 16:23:55 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmx.net (client-ip=212.227.17.21; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zQ07N2ZR4zF0Xc for ; Mon, 22 Jan 2018 16:17:51 +1100 (AEDT) Received: from localhost.localdomain ([88.153.6.51]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LrrRi-1enz9F1sXW-013czh; Mon, 22 Jan 2018 06:04:39 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 5/6] powerpc: wii.dts: Add ngpios property Date: Mon, 22 Jan 2018 06:04:10 +0100 Message-Id: <20180122050411.32460-6-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122050411.32460-1-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:0SmFcly0PElC3DyMFKiX2orhzgFhCzaez4KcxwFf2pK+zMXxvBc cIJtbBkmQLAOssJwJmpm28rFQOUKWGkzlWH78BmmCSsA+iAIEQy4lgOJSC5+PMQUD4om68Q 2uCxZMYyVHS4Z7mFp+Q0ypND3sJQJ5+t1QSBdBMoj1yxxwCFwFdw7q8a6zpWDddN+DzbdT1 2EK2Q3g/dqKv/AfqrXR1g== X-UI-Out-Filterresults: notjunk:1; V01:K0:xII40qLAGMo=:T159mfwm310rSNiy+ixWzh cIsBjys5h7E91sGRRZXgclVnGXv56wPGepmyuCegOYqWUA2pYjT7RYj28UoIBu+0DbFP/eFGh IGC9dX28oqLAq6fgfPQDnJI/52gVDg3C7yB60O4tmjizXvxvIWTMueNkzHw4f2gznpzWu+xd9 3bgbrBPanMh5CGHWpWF28gJtv99oBHkmmKLKJz7NZrlfFqfv1w1hpFYKSqOQk3Tdks7bL7SGn MwL37nDY5pmJI0rTfLxUMCt/XWqK1m+N2aGQ8DNxayM+fFmO9unyoGJ+8I9JANsuz73umqdSp 1ClbFQS01Cvm70KD7vGSp11LKbxelrzXX8yomDXwis+nH09TQkbOQ38tBkSnrTPlR17x3jJIs zzwcOom3oLRRrwhTrydDm2sO3NLfII7VqU3L7Rup2NT1wwkJXW+0nnpsx3ax4aOnoM6mYITlB B6SzPgoTt/e6Y4bScC9sGMIx4KpZKjwKth52XwKKCW6bhQUtW887+XYy2DY51I5o0hqgEeK30 ovk5oYL42wXDSfVGpR7QWQQLgi50yWxMDl11gKgz/5kjU6nv9oK+8sIvBcjZw0jO4alC0vpIH FJgeRjAnwpZzlgOvCSR4Ldk7kSX1Z0JZ0i0wvB3oCbURM65CL0bSssnu7Jzk0jN50AH7jNhCJ v3CI6mmbCnlvNb25JTF/VH+6KkqfdE2p591G4+TZwqyL8JWxfAHDTugFgtjLAoSFFAvI8pwfs UW2tcHeDV+yJiXkXNR5642Oq4wCHVI77SKEisG567P77eUGq43/RQqOrotuGbiDvoBAS3aaM+ SDpgyqy/B3/F9r7vurxHy+wK5bXDiV7KSoRYc+Xe7zqkdFN9KY= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , linux-gpio@vger.kernel.org, Rob Herring , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The Hollywood GPIO controller supports 32 GPIOs, but on the Wii, only 24 are used. Signed-off-by: Jonathan Neuschäfer --- v2: - no change --- arch/powerpc/boot/dts/wii.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts index 40b324b6391e..7235e375919c 100644 --- a/arch/powerpc/boot/dts/wii.dts +++ b/arch/powerpc/boot/dts/wii.dts @@ -176,6 +176,7 @@ compatible = "nintendo,hollywood-gpio"; reg = <0x0d8000c0 0x40>; gpio-controller; + ngpios = <24>; /* * This is commented out while a standard binding From patchwork Mon Jan 22 05:04:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 864151 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zQ05v2VCbz9s0g for ; Mon, 22 Jan 2018 16:16:35 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zQ05v0fD9zF0Vr for ; Mon, 22 Jan 2018 16:16:35 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmx.net (client-ip=212.227.17.22; helo=mout.gmx.net; envelope-from=j.neuschaefer@gmx.net; receiver=) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zPzyH14HTzF0Z2 for ; Mon, 22 Jan 2018 16:09:58 +1100 (AEDT) Received: from localhost.localdomain ([88.153.6.51]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LguAU-1f7pM61Ada-00oJ4b; Mon, 22 Jan 2018 06:04:40 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] powerpc: wii.dts: Add GPIO line names Date: Mon, 22 Jan 2018 06:04:11 +0100 Message-Id: <20180122050411.32460-7-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180122050411.32460-1-j.neuschaefer@gmx.net> References: <20180122050411.32460-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K0:WvuPvgKBfnySAxbXAbhIuv9leDNDanTr9LYGHWTfasMIGKgLwcH JVtskc3Lft8+KmmThKHoHIOue2yxaJOhHMDjIm88A7Wqoa1W8nYx24v42rxPBSIqla+4wFI 3j5l7DpUxYRVbcVfsiYLLVraFKRJrGB4DeMpknpd7E5qhy036zZXLFM08H+106n8AkLCzAD 9lLgFv2CICvGVxjxnd9RQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:DH7A77W9Ptg=:w1rtNFhgZ0ge/U+pzRwifQ gvDsW/GVVMUdpHFq7BND4EAiLAc3h+WmgY5oaZBADQpe0rERStypdtnRP92NECLaKWSVWsCQZ K2okjGtyrSn4IWWgHc0sASdk1EwHUifR3JVqe3TSGiVdO8o+1hXQiKsBi5suCVUNag9fO90Ej Aea2FThWoLrJpxcvX7+uI/vOxupZ/bXtnwODioMCY27F25ff3aUvEcRwq++/WTm6ELw2kIqhJ kS/j86KS+L5QSYh9dA7XdnFRpvQ3ejGnT4flM8ACPFQKzQBjkB03tockMnl46nxHpw5CD6Leg OKLxgoq4rvMiTifwvA/eCHdaeS6jEmp5b9boxQfQweJtP91vW3duXoAC8rvI4PHFZnoctROm2 QlV/wfyG/DHWj+I4uVTkJu0oT0fObYgJhExcVNxD+z9Qnngxg0Llywxz19OVgxV+ufBUckZnB wz+/n9WYhiorJjWNc4o1hgLeQ1VMhBuitGZaCfvIf0825gC10RdK5cJtnOUUd7eML4h9v1fLO Flhlt/c4JhmWzCVOsvZjvs18BFP3lX/o0bxcvYHezak0JA/plaAKnreIAXcOoNWg+vCZriFQd XszVLxsimP//vCBplEU/J/wBFixDtmmoRqUxgLeLLyPwBO2kTbsf/ru+pqSpoqNxjrFnP/3yW Fm95yV4cv+nfUJrAhvMyy3QOsjO1wY+lwLhaldImand/wza+qANkN0rzBwy+sA5ZiwaNxQ39G FHWwBbhDQb8ztJpxe9AG+UwY8fBabTdrce9evcL3kG6Ix58e6qHZy2qCIFHmWg2sxK6cWOGe8 1cmUqLC8qXKKyB0snFmKuk8Ul3M5i3rda2NmQYnRNVgVEKW9+8= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , linux-gpio@vger.kernel.org, Rob Herring , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" These are the GPIO line names on a Nintendo Wii, as documented in: https://wiibrew.org/wiki/Hardware/Hollywood_GPIOs Signed-off-by: Jonathan Neuschäfer --- v2: - no change --- arch/powerpc/boot/dts/wii.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts index 7235e375919c..07d5e84e98b1 100644 --- a/arch/powerpc/boot/dts/wii.dts +++ b/arch/powerpc/boot/dts/wii.dts @@ -178,6 +178,14 @@ gpio-controller; ngpios = <24>; + gpio-line-names = + "POWER", "SHUTDOWN", "FAN", "DC_DC", + "DI_SPIN", "SLOT_LED", "EJECT_BTN", "SLOT_IN", + "SENSOR_BAR", "DO_EJECT", "EEP_CS", "EEP_CLK", + "EEP_MOSI", "EEP_MISO", "AVE_SCL", "AVE_SDA", + "DEBUG0", "DEBUG1", "DEBUG2", "DEBUG3", + "DEBUG4", "DEBUG5", "DEBUG6", "DEBUG7"; + /* * This is commented out while a standard binding * for i2c over gpio is defined.