From patchwork Sat Jan 23 20:37:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 8097951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 46C85BEEE5 for ; Sat, 23 Jan 2016 20:40:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78D812034E for ; Sat, 23 Jan 2016 20:40:56 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 706742034C for ; Sat, 23 Jan 2016 20:40:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aN4wf-0005a8-IR; Sat, 23 Jan 2016 20:38:05 +0000 Received: from emh07.mail.saunalahti.fi ([62.142.5.117]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aN4wa-0005Z3-Mg for linux-arm-kernel@lists.infradead.org; Sat, 23 Jan 2016 20:38:03 +0000 Received: from localhost.localdomain (85-76-167-245-nat.elisa-mobile.fi [85.76.167.245]) by emh07.mail.saunalahti.fi (Postfix) with ESMTP id E0DB93FEE; Sat, 23 Jan 2016 22:37:26 +0200 (EET) From: Aaro Koskinen To: Jason Cooper , Andrew Lunn , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Martin Michlmayr , Rick Thomas Subject: [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration Date: Sat, 23 Jan 2016 22:37:17 +0200 Message-Id: <1453581437-14135-1-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.4.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160123_123800_929462_6967CF50 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.8 (-) 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: Aaro Koskinen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some OpenRD boards have RS-232 and RS-486 connectors wired, but using them needs a custom DTB as the current DTB configures SD card slot instead. This patch adds documentation into the DTS on how to change the configuration. Signed-off-by: Aaro Koskinen Reviewed-by: Andrew Lunn --- arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi index f65b727..24f1d30 100644 --- a/arch/arm/boot/dts/kirkwood-openrd.dtsi +++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi @@ -40,7 +40,7 @@ pinctrl-0 = <&pmx_select28 &pmx_sdio_cd &pmx_select34>; pinctrl-names = "default"; - pmx_select28: pmx-select-rs232-rs484 { + pmx_select28: pmx-select-rs232-rs485 { marvell,pins = "mpp28"; marvell,function = "gpio"; }; @@ -65,10 +65,39 @@ status = "okay"; cd-gpios = <&gpio0 29 9>; }; + gpio@10100 { + p28 { + gpio-hog; + gpios = <28 GPIO_ACTIVE_HIGH>; + /* + * SelRS232or485 selects between RS-232 or RS-485 + * mode for the second UART. + * + * Low: RS-232 + * High: RS-485 + * + * To use the second UART, you need to change also + * the SelUARTorSD. + */ + output-low; + line-name = "SelRS232or485"; + }; + }; gpio@10140 { p2 { gpio-hog; gpios = <2 GPIO_ACTIVE_HIGH>; + /* + * SelUARTorSD selects between the second UART + * (serial@12100) and SD (mvsdio@90000). + * + * Low: UART + * High: SD + * + * When changing this line make sure the newly + * selected device node is enabled and the + * previously selected device node is disabled. + */ output-high; /* Select SD by default */ line-name = "SelUARTorSD"; };