From patchwork Tue Apr 18 19:25:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 9686105 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 AFC16601C2 for ; Tue, 18 Apr 2017 19:26:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0DB6205AD for ; Tue, 18 Apr 2017 19:26:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 956602837F; Tue, 18 Apr 2017 19:26:17 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1CF90205AD for ; Tue, 18 Apr 2017 19:26:17 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=EXkDI9KrJfhD8Suk5DtO2lhmmIHTcPL7bjPQzWYVmzY=; b=gjKHvd58XyGtjL g5m51ZMXx+n3Zs7RRcCWi6rJeVUvR3x0Kcluy84fXkSGKkhCanu5/HRESXnbjMeV1y2xu27qzj9f8 vGHlEHXxJdTH1rSAA8Q+57rCUm4P17o1X8KTUgfGXjS3fEp+X+Ezq4DECAxlA3tOc7KuMj6RPpP8x G+XTd+DwYHm3Yyp6bG1flpsdoTjZa8o2VdvXrCpyz5K/GGxiymjlUA51DARJIrr0QWFROEDL+hVlk NedJioKEGnfVIaS5BWbUEnHaLcFwbrYXwHjcJEd/YWNWckmrDk5431dnkURLRgtUqt2ku9bODsXR9 Ie6mznTduEBPEi7UwpBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d0YlT-0005IT-T8; Tue, 18 Apr 2017 19:26:15 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0YlQ-0005FR-QZ for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2017 19:26:14 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9C24CAD52; Tue, 18 Apr 2017 19:25:49 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: Maxime Ripard Subject: [PATCH] arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl Date: Tue, 18 Apr 2017 21:25:38 +0200 Message-Id: <20170418192538.24174-1-afaerber@suse.de> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170418053458.phcbp4da3vatejpg@lukather> References: <20170418053458.phcbp4da3vatejpg@lukather> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170418_122613_029273_F58DA238 X-CRM114-Status: UNSURE ( 8.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , =?UTF-8?q?Andreas=20F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org 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 Pine64 exposes all A64 UARTs, not just UART0. Since the pins can be used as GPIO, don't enable the new UART nodes by default, but prepare the pinctrl settings to aid in activating them via overlays, i.e., overriding the status property of &uartX nodes. For UART4 (Euler) the safer route of not including RTS/CTS pins is chosen, whereas for UART1 (Bluetooth) they are included. Add the corresponding pinctrl nodes where missing. Suggested-by: Maxime Ripard Signed-off-by: Andreas Färber --- .../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 29 ++++++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 15 +++++++++++ 2 files changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts index db6c0f36999e..260fb12ac3fc 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts @@ -99,12 +99,41 @@ status = "okay"; }; +/* On Exp and Euler connectors */ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; +/* On Wifi/BT connector, with RTS/CTS */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + status = "disabled"; +}; + +/* On Pi-2 connector */ +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "disabled"; +}; + +/* On Euler connector */ +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; + status = "disabled"; +}; + +/* On Euler connector, RTS/CTS optional */ +&uart4 { + pinctrl-names = "default"; + pinctrl-0 = <&uart4_pins>; + status = "disabled"; +}; + &usb_otg { dr_mode = "host"; status = "okay"; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 133810df06b9..c172c62447e8 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -292,6 +292,21 @@ pins = "PB0", "PB1"; function = "uart2"; }; + + uart3_pins: uart3-pins { + pins = "PD0", "PD1"; + function = "uart3"; + }; + + uart4_pins: uart4-pins { + pins = "PD2", "PD3"; + function = "uart4"; + }; + + uart4_rts_cts_pins: uart4-rts-cts-pins { + pins = "PD4", "PD5"; + function = "uart4"; + }; }; uart0: serial@1c28000 {