From patchwork Mon Aug 15 14:51:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Cooper X-Patchwork-Id: 9281185 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 E2FEA60467 for ; Mon, 15 Aug 2016 14:52:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D412E28C09 for ; Mon, 15 Aug 2016 14:52:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C854028C11; Mon, 15 Aug 2016 14:52:49 +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 36A2428C09 for ; Mon, 15 Aug 2016 14:52:49 +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 1bZJEl-0007yF-G7; Mon, 15 Aug 2016 14:51:35 +0000 Received: from pmta2.delivery5.ore.mailhop.org ([54.186.218.12]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZJEh-0007ny-UH for linux-arm-kernel@lists.infradead.org; Mon, 15 Aug 2016 14:51:32 +0000 X-MHO-User: e9a8532b-62f7-11e6-8929-8ded99d5e9d7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 74.99.77.15 X-Mail-Handler: DuoCircle Outbound SMTP Received: from io (unknown [74.99.77.15]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 15 Aug 2016 14:52:39 +0000 (UTC) Received: from triton.lakedaemon.net (triton.lakedaemon.net [10.16.5.27]) by io (Postfix) with ESMTP id CBBE78005E; Mon, 15 Aug 2016 14:51:07 +0000 (UTC) From: Jason Cooper To: Andrew Lunn , Gregory CLEMENT , Thomas Petazzoni , Sebastian Hesselbarth Subject: [PATCH] DT: kirkwood: Fix Openblock A6 external GPIO pins Date: Mon, 15 Aug 2016 14:51:04 +0000 Message-Id: <20160815145104.14135-1-jason@lakedaemon.net> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160815013538.8056-1-jason@lakedaemon.net> References: <20160815013538.8056-1-jason@lakedaemon.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160815_075132_128320_154F7BE4 X-CRM114-Status: UNSURE ( 7.32 ) X-CRM114-Notice: Please train this message. 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: Jason Cooper , Linux ARM Kernel 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 By assigning the pin hog to the pinctrl node, we correctly configure the MPPs. However, they are not available to userspace. Fix this by assigning the hogs to the gpio node. After this, the following works as expected: # echo 28 >/sys/class/gpio/export # echo low >/sys/class/gpio/gpio28/direction Signed-off-by: Jason Cooper Reviewed-by: Andrew Lunn --- After sleeping on it a night, I decided to leave the dip switches alone. arch/arm/boot/dts/kirkwood-openblocks_a6.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts index 0db0e3edc88f..94e49f32d5f9 100644 --- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts @@ -41,7 +41,7 @@ }; pinctrl: pin-controller@10000 { - pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; + pinctrl-0 = <&pmx_dip_switches>; pinctrl-names = "default"; pmx_uart0: pmx-uart0 { @@ -174,3 +174,10 @@ phy-handle = <ðphy0>; }; }; + +&gpio0 { + status = "okay"; + + pinctrl-0 = <&pmx_gpio_header>; + pinctrl-names = "default"; +};