From patchwork Fri Aug 5 08:06:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 9264879 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3B4E86048B for ; Fri, 5 Aug 2016 08:10:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261CE2842E for ; Fri, 5 Aug 2016 08:10:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A97328434; Fri, 5 Aug 2016 08:10:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A813D2842E for ; Fri, 5 Aug 2016 08:10:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVaAN-0003lv-9R; Fri, 05 Aug 2016 08:07:39 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVaAJ-0003gz-BO for linux-arm-kernel@lists.infradead.org; Fri, 05 Aug 2016 08:07:36 +0000 Received: from zwerg.fritz.box ([31.18.248.238]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MMYZG-1bbe9j0ywY-008FqF; Fri, 05 Aug 2016 10:06:53 +0200 From: Oleksij Rempel To: fixed-term.Oleksij.Rempel@de.bosch.com Subject: [PATCH v2] arm: dts: sun7i-a20-bananapi: name the GPIO lines Date: Fri, 5 Aug 2016 10:06:44 +0200 Message-Id: <1470384404-6796-1-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: X-Provags-ID: V03:K0:g0bsb0D9TZGCKOecFBOsjyelUOVmOOWIjPPv0TMWLr1ERwid2UA 6HMCGWnC3I57JR03K4oyKTj9QDNmnGzXdEleoG/O+d62Qguf7VfpPJKw8BcfaPZ0fKnH/1L e9tQjXtyjmhNvegeDWvA4NhyHfhrdHpPUFTluy/SRW+QrlQMtycJB3OGy487Kyxqxr/QryE yzArSqcbYgJRA9ZaAzRKw== X-UI-Out-Filterresults: notjunk:1; V01:K0:oYwzSkjGzdI=:kY7lGyoOCrGyLhpuCtcHh6 h2w62DgAULjwDsxJIMjxBxJ4FZx/F4HgmtnTuP6JZmJQWbOqz9frPt3CsDKuFzN+RxDF+B2CF 4OtH7FwzCWEuYRMMejz2kWPVtHguHLlRAU47DB6kPHsXYP0oYBP3WmCHE9SQGSTRvh+QBKVIy +6CgDX2SDG2qwRDb6qd8btVTjNv+mQm5TJaHOIVfd+GDb/Zq31qaGJ4Srau5Y1qVE1xCrh+q2 c0g6lgbj4zXmbOqctLekAYc6R2GojCKe8DROPbL7pGqcTeTcBH2Q+CdATWT0zMQPHWOxVyTD1 5qrkg5qzti2xrra+Oh7GsKT7tmRu8kp81SixOkt2eG0D3hDbwCvqVlOJDLD2bY4xd0rDZRACd Z1H0t8KlqOyVdChwYWj6ASK3bSc++nn5L7Y6PXRnRgH8arVYaP+f5oP7vPJhBqpNk7Oq5hs1o hV3V2oE4wScORzGz3JVq4MIVJXDgFdMbj/JSMcCG/Q5Tz3V/VnZ2myPWC/Xu/Qv5incLbUFp2 0w2F43xpzXGc3KpB/SXZOK7lfNOUjoLdxS9o5wOU8FY85kQXh8flVnCHpMUKH8nXzdCPs8H8N iLtofUbDYQw5vNhEo6XlkkV1rSj3di4enrmINKJ34ga5vfsNZIO4MsJ/yT+d53n9dd0gPMnP3 ma0mYPu1Enp7XZx/X1L5FrwsdOqc1p8AoLLBnEzKeahDx3ZhsKcZ9NLIs9Hu7mIinXM509WmK hTVimsU7fpVwx2D8sEnKTHTrVHnvqOOEjvpXnmma1HZPeNoP8bi8hmds7Dg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160805_010735_781130_142175D1 X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Linus Walleij , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, Oleksij Rempel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This names the GPIO lines on the Banana Pi board in accordance with the A20_Banana_Pi v1.4 Specification. This will make these line names reflect through to userspace so that they can easily be identified and used with the new character device ABI. Some care has been taken to name all lines, not just those used by the external connectors, also lines that are muxed into some other function than GPIO: these are named "[FOO]" so that users can see with lsgpio what all lines are used for. Ps: most of the text was taken from Linus Wallej patch. Cc: devicetree@vger.kernel.org Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: Chen-Yu Tsai Signed-off-by: Oleksij Rempel Acked-by: Linus Walleij --- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 58 ++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts index 67c8a76..81ecb89 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts @@ -178,6 +178,64 @@ }; &pio { + /* + * Legend: proper name = the GPIO line is used as GPIO + * NC = not connected (not routed from the SoC) + * "[PER]" = pin is muxed for peripheral (not GPIO) + * "" = no idea, schematic doesn't say, could be + * unrouted (not connected to any external pin) + */ + gpio-line-names = + /* PA */ + "[ERXD3]", "[ERXD2]", "[ERXD1]", "[ERXD0]", "[ETXD3]", + "[ETXD2]", "[ETXD1]", "[ETXD0]", + "[ERXCK]", "[ERXERR]", "[ERXDV]", "[EMDC]", "[EMDIO]", + "[ETXEN]", "[ETXCK]", "[ECRS]", + "[ECOL]", "[ETXERR]", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* PB */ + "[PMU-SCK]", "[PMU-SDA]", "", "", "", "NC", "NC", "NC", + "NC", "USB0-DRV", "NC", "NC", "NC", "NC", "", "", + "", "", "", "", "[SCL]", "[SDA]", "", "", + "", "", "", "", "", "", "", "", + /* PC */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* PD */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* PE */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* PF */ + "[SD0-D1]", "[SD0-D0]", "[SD0-CLK]", "[SD0-CMD]", "[SD0-D3]", + "[SD0-D2]", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* PG */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* PH */ + "TXD0", "RXD0", "IO-1", "IO-8", "USB0-IDDET", "IO-7", "", "", + "", "", "SD0-DET", "", "", "", "", "", + "NC", "", "", "", "IO-4", "IO-5", "NC", "EMAC-PWR-EN", + "LED1", "NC", "NC", "NC", "", "", "", "", + /* PI */ + "", "", "", "[IO-GCLK]", "NC", "NC", "NC", "NC", + "NC", "NC", "[SPI-CE0]", "[SPI-CLK]", "[SPI-MOSI]", + "[SPI-MISO]", "[SPI-CE1]", "NC", + "IO-6", "IO-3", "IO-2", "IO-0", "", "", "", "", + "", "", "", "", "", "", "", ""; + usb0_id_detect_pin: usb0_id_detect_pin@0 { allwinner,pins = "PH4"; allwinner,function = "gpio_in";