From patchwork Tue Jan 24 13:43:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92353 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1718278qgi; Tue, 24 Jan 2017 05:43:14 -0800 (PST) X-Received: by 10.55.98.5 with SMTP id w5mr29124757qkb.165.1485265394721; Tue, 24 Jan 2017 05:43:14 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id 103si13179399qkq.81.2017.01.24.05.43.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:43:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 1cW1NP-0000TG-N8; Tue, 24 Jan 2017 13:43:11 +0000 Received: from mail-wm0-f51.google.com ([74.125.82.51]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cW1Ms-00008F-3t for linux-arm-kernel@lists.infradead.org; Tue, 24 Jan 2017 13:42:39 +0000 Received: by mail-wm0-f51.google.com with SMTP id r126so182632091wmr.0 for ; Tue, 24 Jan 2017 05:42:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PXvkWBWBSpJ9VgrPXkPUiD1o+8ZOOHPor2B0RsZk3hY=; b=fhbOfBy1vA0Yyu81tqH2wDoCPfVewXBEes20S65vG71f0BrUSWBtEBFtlFthE41MAr 1IGF3Bi6E/uPjjNGDfoKHJiRvmEfBHz4lbVDNqEacf+VSAzQsRntEA8F+zhxNEe6kQ/p Dka9LjaLZhJhBizij/Y6I88Uxn+ACFniRmRsw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PXvkWBWBSpJ9VgrPXkPUiD1o+8ZOOHPor2B0RsZk3hY=; b=LYH7ynJHxvY56ptwZdJsvsbwfzdBrgx5SOuQOQNnWZfDzoDOjcNxCsiQA0ufNG3xML irePN5PT3DgCVpIqvxaNFifBGD52LG46VFTmX5pyq1M9vXnU0+E8Z5tGrV10CsCQJrEy +va3hxbIlspfpunMM3JRRy6msTEx75kG+yr0hhuP5wEgDqRePaiSEn0YtK3F+CecgJYf luwbh2jIc+FtavgeyJvmSJy9d3GWp4sGtk0FJzC4aat0lxUMzLFCTHek6BHWup+k2zvH olKJKSpnW5XGUrwjGzBR1q2s9VnBJmuVVb8HGP1swX/ydNPGoahLtf4ErLOzC5CixuGB DpIA== X-Gm-Message-State: AIkVDXLguN+B306VHdphCBvTxwWnFdMYd9GpZ7pE+kp0YSroHa2axzyyQr1/10jMLsPOt2Je X-Received: by 10.28.167.5 with SMTP id q5mr19833216wme.15.1485265276319; Tue, 24 Jan 2017 05:41:16 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:15 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/8] serial: st-asc: Ignore the parity error bit if 8-bit mode is enabled Date: Tue, 24 Jan 2017 13:43:03 +0000 Message-Id: <20170124134310.27512-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170124_054238_315851_0677C886 X-CRM114-Status: GOOD ( 12.96 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.82.51 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.51 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.51 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: patrice.chotard@st.com, Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The datasheet states: "If the MODE field selects an 8-bit frame then this [parity error] bit is undefined. Software should ignore this bit when reading 8-bit frames." Signed-off-by: Lee Jones --- drivers/tty/serial/st-asc.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 2.10.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 379e5bd..69e6232 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -287,9 +287,19 @@ static void asc_transmit_chars(struct uart_port *port) static void asc_receive_chars(struct uart_port *port) { struct tty_port *tport = &port->state->port; - unsigned long status; + unsigned long status, mode; unsigned long c = 0; char flag; + bool ignore_pe = false; + + /* + * Datasheet states: If the MODE field selects an 8-bit frame then + * this [parity error] bit is undefined. Software should ignore this + * bit when reading 8-bit frames. + */ + mode = asc_in(port, ASC_CTL) & ASC_CTL_MODE_MSK; + if (mode == ASC_CTL_MODE_8BIT || mode == ASC_CTL_MODE_8BIT_PAR) + ignore_pe = true; if (port->irq_wake) pm_wakeup_event(tport->tty->dev, 0); @@ -299,8 +309,8 @@ static void asc_receive_chars(struct uart_port *port) flag = TTY_NORMAL; port->icount.rx++; - if ((c & (ASC_RXBUF_FE | ASC_RXBUF_PE)) || - status & ASC_STA_OE) { + if (status & ASC_STA_OE || c & ASC_RXBUF_FE || + (c & ASC_RXBUF_PE && !ignore_pe)) { if (c & ASC_RXBUF_FE) { if (c == (ASC_RXBUF_FE | ASC_RXBUF_DUMMY_RX)) { From patchwork Tue Jan 24 13:43:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92354 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1718381qgi; Tue, 24 Jan 2017 05:43:29 -0800 (PST) X-Received: by 10.98.89.21 with SMTP id n21mr39241886pfb.163.1485265409165; Tue, 24 Jan 2017 05:43:29 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p126si19203324pfg.209.2017.01.24.05.43.28; Tue, 24 Jan 2017 05:43:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751146AbdAXNnV (ORCPT + 25 others); Tue, 24 Jan 2017 08:43:21 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:38323 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972AbdAXNlS (ORCPT ); Tue, 24 Jan 2017 08:41:18 -0500 Received: by mail-wm0-f46.google.com with SMTP id r144so209572051wme.1 for ; Tue, 24 Jan 2017 05:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XUYm1776dO3/GxAeGc68Bd4UjRLYuKRKuBg+0C++tm4=; b=CzAng511mV+2lyeERghR0J1kuGBexOT5URnnuqd2xV1e+kuyCpa3mbaFcRa9KGcyX2 IhGLEgcRFv7MyKQYKX3Pf2oVjSPi4Mx82CU0N9opuzeKsHL3wL1PTfgXoJGDxB+h3KwV SnpvpLlZpP2Z7GasSSiyBZ3TrW2zaHRtIXO9o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XUYm1776dO3/GxAeGc68Bd4UjRLYuKRKuBg+0C++tm4=; b=TXxzsgayN//g51r6+AW4tYy1L5+m2jlQXYryYBqFatTJF1tt111K7RP9tHyc+qBpDy XZSq9O1JGhj51Pite8gibBUGswhAb/eI23vMyNOUo2maOxKDjCGminKawR++AZAi+v7b ZohSIMPVv/9Jong7ohnmoPecxnyVnT8RBVNB/Vrc6zSfXzVqgeqA+i4llq2P+3TXZWSV lTfK7s6IzYctIuyWplfOM38gC3o7UqCO9K419+zXPg7Fps3mR0/vOYjyypzOUty4TnXj 8WgzwyaAttf72tSoBrVHHIKCzc1W+MSxlnNJHfajcrquwu75hoCEFRaiuQpU+4RVnlf+ 1gjQ== X-Gm-Message-State: AIkVDXJlfSgLVSZTyduibbL8HJdVDssyvi9oPoUdt6FgU9f+OXLS+nmcyJ29kIsONWQ7ClTr X-Received: by 10.28.92.83 with SMTP id q80mr18828730wmb.69.1485265277347; Tue, 24 Jan 2017 05:41:17 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:16 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 2/8] serial: st-asc: Provide RTS functionality Date: Tue, 24 Jan 2017 13:43:04 +0000 Message-Id: <20170124134310.27512-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Until this point, it has not been possible for userland serial applications (e.g. stty) to toggle the UART RTS line. This can be useful with certain configurations. For example, when using a Mezzanine on a Linaro 96board, RTS line is used to take the on-board microcontroller in and out of reset. Signed-off-by: Lee Jones --- drivers/tty/serial/st-asc.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) -- 2.10.2 Acked-by: Peter Griffin diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 69e6232..397df50 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -30,6 +30,7 @@ #include #include #include +#include #define DRIVER_NAME "st-asc" #define ASC_SERIAL_NAME "ttyAS" @@ -38,6 +39,7 @@ struct asc_port { struct uart_port port; + struct gpio_desc *rts; struct clk *clk; unsigned int hw_flow_control:1; unsigned int force_m1:1; @@ -391,12 +393,27 @@ static unsigned int asc_tx_empty(struct uart_port *port) static void asc_set_mctrl(struct uart_port *port, unsigned int mctrl) { + struct asc_port *ascport = to_asc_port(port); + /* - * This routine is used for seting signals of: DTR, DCD, CTS/RTS - * We use ASC's hardware for CTS/RTS, so don't need any for that. - * Some boards have DTR and DCD implemented using PIO pins, - * code to do this should be hooked in here. + * This routine is used for seting signals of: DTR, DCD, CTS and RTS. + * We use ASC's hardware for CTS/RTS when hardware flow-control is + * enabled, however if the RTS line is required for another purpose, + * commonly controlled using HUP from userspace, then we need to toggle + * it manually, using GPIO. + * + * Some boards also have DTR and DCD implemented using PIO pins, code to + * do this should be hooked in here. */ + + if (!ascport->rts) + return; + + /* If HW flow-control is enabled, we can't fiddle with the RTS line */ + if (asc_in(port, ASC_CTL) & ASC_CTL_CTSENABLE) + return; + + gpiod_set_value(ascport->rts, mctrl & TIOCM_RTS); } static unsigned int asc_get_mctrl(struct uart_port *port) @@ -726,6 +743,8 @@ static struct asc_port *asc_of_get_asc_port(struct platform_device *pdev) "st,hw-flow-control"); asc_ports[id].force_m1 = of_property_read_bool(np, "st,force_m1"); asc_ports[id].port.line = id; + asc_ports[id].rts = NULL; + return &asc_ports[id]; } From patchwork Tue Jan 24 13:43:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92347 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1717607qgi; Tue, 24 Jan 2017 05:41:31 -0800 (PST) X-Received: by 10.99.170.70 with SMTP id x6mr39209223pgo.14.1485265291188; Tue, 24 Jan 2017 05:41:31 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si19215130pgz.5.2017.01.24.05.41.30; Tue, 24 Jan 2017 05:41:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751092AbdAXNlW (ORCPT + 7 others); Tue, 24 Jan 2017 08:41:22 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36536 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbdAXNlU (ORCPT ); Tue, 24 Jan 2017 08:41:20 -0500 Received: by mail-wm0-f51.google.com with SMTP id c85so182149368wmi.1 for ; Tue, 24 Jan 2017 05:41:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cWir8HxzM72vuu3KYEquZlRtVcV1Kl1Yf9P+1k1geP4=; b=idIaECMAAVSkdSbL+9Dz4nQ/j3MG9HNo28DTSooLjNBC6ZiX126LPLyTUKlQ/fGRYT RVP3QjEC8dccMz8+NEpqKHcCGih1t2zfCBpnhb/uwKnaAG1a1B9uIR5bFsNQjFIAqcpv mtGxBCOXEFinfS7xYKKHIGz7An7r/slPQYES8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cWir8HxzM72vuu3KYEquZlRtVcV1Kl1Yf9P+1k1geP4=; b=JmcgDqbKYCzD+YFs1UyeQSho7RrbSOECAf8OmdO5JQ0in5zn8VtiXVpf1a0fGzJc29 jBumewBP2H3atWbJpn7IdinCSbNTfyJkK9jLHpEo/4Z6ipGJ7KOP/lnUmaeejARJgyQ6 YrZ0F1NP+KdF2oS0tAtoc21lc+/dxAuZzVoOvjKAoyIK6KwD+7JEPMadddkI7BbiKSRj ro6NgcEJWFRaSqjDsdXTuEeIqVovCvh7ZS/IkeaexyPFXbbpRFmxCXMODYip3kOkjtzr 3C2pWf816g7p+4g3FAvhuILeesIH0C6/BLf/WqrW0VWBWd3rxY3sf4KUcsCibT3hLk0B gB0w== X-Gm-Message-State: AIkVDXI0nwpjslA7X/2qM8Yl0GmldVjyg1WL8o1CzEDzLuOg0Bnqf7wLfNhsUvVzoQqYH+XL X-Received: by 10.28.12.68 with SMTP id 65mr10735546wmm.100.1485265278575; Tue, 24 Jan 2017 05:41:18 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:17 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 3/8] serial: st-asc: Read in all Pinctrl states Date: Tue, 24 Jan 2017 13:43:05 +0000 Message-Id: <20170124134310.27512-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org There are now 2 possible separate/different Pinctrl states which can be provided from platform data. One which encompasses the lines required for HW flow-control (CTS/RTS) and another which does not specify these lines, such that they can be used via GPIO mechanisms for manually toggling (i.e. from a request by `stty`). Signed-off-by: Lee Jones --- drivers/tty/serial/st-asc.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 397df50..03801ed 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -37,10 +37,16 @@ #define ASC_FIFO_SIZE 16 #define ASC_MAX_PORTS 8 +/* Pinctrl states */ +#define DEFAULT 0 +#define MANUAL_RTS 1 + struct asc_port { struct uart_port port; struct gpio_desc *rts; struct clk *clk; + struct pinctrl *pinctrl; + struct pinctrl_state *states[2]; unsigned int hw_flow_control:1; unsigned int force_m1:1; }; @@ -694,6 +700,7 @@ static int asc_init_port(struct asc_port *ascport, { struct uart_port *port = &ascport->port; struct resource *res; + int ret; port->iotype = UPIO_MEM; port->flags = UPF_BOOT_AUTOCONF; @@ -720,6 +727,27 @@ static int asc_init_port(struct asc_port *ascport, WARN_ON(ascport->port.uartclk == 0); clk_disable_unprepare(ascport->clk); + ascport->pinctrl = devm_pinctrl_get(&pdev->dev); + if (IS_ERR(ascport->pinctrl)) { + ret = PTR_ERR(ascport->pinctrl); + dev_err(&pdev->dev, "Failed to get Pinctrl: %d\n", ret); + } + + ascport->states[DEFAULT] = + pinctrl_lookup_state(ascport->pinctrl, "default"); + if (IS_ERR(ascport->states[DEFAULT])) { + ret = PTR_ERR(ascport->states[DEFAULT]); + dev_err(&pdev->dev, + "Failed to look up Pinctrl state 'default': %d\n", ret); + return ret; + } + + /* "manual-rts" state is optional */ + ascport->states[MANUAL_RTS] = + pinctrl_lookup_state(ascport->pinctrl, "manual-rts"); + if (IS_ERR(ascport->states[MANUAL_RTS])) + ascport->states[MANUAL_RTS] = NULL; + return 0; } From patchwork Tue Jan 24 13:43:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92348 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1717612qgi; Tue, 24 Jan 2017 05:41:31 -0800 (PST) X-Received: by 10.98.112.134 with SMTP id l128mr38537409pfc.81.1485265291709; Tue, 24 Jan 2017 05:41:31 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si19215130pgz.5.2017.01.24.05.41.31; Tue, 24 Jan 2017 05:41:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751127AbdAXNlZ (ORCPT + 25 others); Tue, 24 Jan 2017 08:41:25 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:34035 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075AbdAXNlV (ORCPT ); Tue, 24 Jan 2017 08:41:21 -0500 Received: by mail-wm0-f50.google.com with SMTP id f73so42847538wmf.1 for ; Tue, 24 Jan 2017 05:41:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CECPrWl8MVL1q3FgkGQAnhGVlG1YH6f+CxvFQCMWgqg=; b=DJ9Oloh9CNbr6VEfZblxTo+qmZhDSX7LfK/7BEebnMPAm+nMbXAhHsd9d3F8hShBkO y4X0i/l5fyKMJNy0kVMdiuo7LtXULM0wm6+abkqS2BGGm/4mLf0hlEA6GWelqGtAQTWy on2P0yNhKdl92fHRjt3PF/DgMH+xqJ71ENO+E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CECPrWl8MVL1q3FgkGQAnhGVlG1YH6f+CxvFQCMWgqg=; b=LvK5eH0RvHeo8yvRjBEntaM2EUO2K+bCk3UHn50aaSogBy9yuSPcnAbuZZc7WjEJkY dcAi5SAoDZ3d0/g1ZgWQdaiVhgdWfVvlf6yYVbMksyuDZhcBT91q0UJtM5rXArB4hShz mjWWEH9Ju31Guaun8vRoZymZ6fcEaO+Eh6GQDbgnThjVpHc45/0x/1+l9rQq4rbQzi7m wbymhww2pq5EjZUxk54/9czLqEZhvFwUyUY+49Rg+ppYWPIOnussYcaNazXNUZFOMqBK A4zfzk7vysNYbVgDWE572ju0IQeNnSN31eKhe2pBt76GnIvKGce8QHkCZboX0e8Iq5Qz LzFg== X-Gm-Message-State: AIkVDXK3pR/MYsC3BzrLBG4JWQ4Xvm1OVe3QWSaWJePsOkt5G0MCLth6e0e0FAkpN8n+rznz X-Received: by 10.223.154.109 with SMTP id z100mr28246986wrb.145.1485265279699; Tue, 24 Jan 2017 05:41:19 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:19 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 4/8] serial: st-asc: (De)Register GPIOD and swap Pinctrl profiles Date: Tue, 24 Jan 2017 13:43:06 +0000 Message-Id: <20170124134310.27512-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When hardware flow-control is disabled, manual toggling of the UART's reset line (RTS) using userland applications (e.g. stty) is not possible, since the ASC IP does not provide this functionality in the same was as some other IPs do. Thus, we have to do this manually. This patch ensures that when HW flow-control is disabled the RTS/CTS lines are free to be registered via the GPIO API. It also ensures any registered GPIO lines are unregistered when HW flow-control is requested, allowing the IP to control them automatically. Signed-off-by: Lee Jones --- drivers/tty/serial/st-asc.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) -- 2.10.2 diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 03801ed..2c4b5f5 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -512,6 +512,8 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermios *old) { struct asc_port *ascport = to_asc_port(port); + struct device_node *np = port->dev->of_node; + struct gpio_desc *gpiod; unsigned int baud; u32 ctrl_val; tcflag_t cflag; @@ -555,9 +557,32 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios, ctrl_val |= ASC_CTL_PARITYODD; /* hardware flow control */ - if ((cflag & CRTSCTS)) + if ((cflag & CRTSCTS)) { ctrl_val |= ASC_CTL_CTSENABLE; + /* If flow-control selected, stop handling RTS manually */ + if (ascport->rts) { + devm_gpiod_put(port->dev, ascport->rts); + ascport->rts = NULL; + + pinctrl_select_state(ascport->pinctrl, + ascport->states[DEFAULT]); + } + } else { + /* If flow-control disabled, it's safe to handle RTS manually */ + if (!ascport->rts && ascport->states[MANUAL_RTS]) { + pinctrl_select_state(ascport->pinctrl, + ascport->states[MANUAL_RTS]); + + gpiod = devm_get_gpiod_from_child(port->dev, "rts", + &np->fwnode); + if (!IS_ERR(gpiod)) { + gpiod_direction_output(gpiod, 0); + ascport->rts = gpiod; + } + } + } + if ((baud < 19200) && !ascport->force_m1) { asc_out(port, ASC_BAUDRATE, (port->uartclk / (16 * baud))); } else { From patchwork Tue Jan 24 13:43:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92350 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1717624qgi; Tue, 24 Jan 2017 05:41:32 -0800 (PST) X-Received: by 10.98.88.133 with SMTP id m127mr39247640pfb.155.1485265292512; Tue, 24 Jan 2017 05:41:32 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si19215130pgz.5.2017.01.24.05.41.32; Tue, 24 Jan 2017 05:41:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751149AbdAXNla (ORCPT + 25 others); Tue, 24 Jan 2017 08:41:30 -0500 Received: from mail-wm0-f49.google.com ([74.125.82.49]:36887 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbdAXNl1 (ORCPT ); Tue, 24 Jan 2017 08:41:27 -0500 Received: by mail-wm0-f49.google.com with SMTP id c206so209975492wme.0 for ; Tue, 24 Jan 2017 05:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uq+tDU+448/B+rMmLMP6jaSV8MIfwHWV9n8W/JQfdRg=; b=I9FgRZa339sza0rsq+nnTobz+/9EO6Lb5ygvcNcbcMUK2b1klTngWU9SXczbKCjAIk /bR2MDGktl7ufAzapCZwYBP4zjgjexRKktwwSaTl9j74AahICwKTaZoRVdBGzlhRs8Xx SwshqQAP6oD7Sgs/dKsVOHDkg0YjJDirDR7bw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Uq+tDU+448/B+rMmLMP6jaSV8MIfwHWV9n8W/JQfdRg=; b=HUXPx55L4jQi+K4nmQyEtERqDJlnp+szouYIykMoBXUjlgyVZ6U1SwJ6E/uWmMl09L DZT+6nAbRXYVBiP5x3qMBrEQ04nHn3+Apz6iGDelZmSlDhfSLW0+lm4+KqDNUGp6aqb8 JDGStUBIe+p7cyPnT7q2XAvQo1GR2QGVCSpQukmcd0STHDolRajWLoKsph9VkN0RKQh0 MmGAS19qJJXHSvTTiUiD+qLK1ssabH0aD2BWUWdb3prMdY5fPl322fMaJcSMZA2nrxpq SB9ZrS8tJAdwkGy4XTZeQIZqyV9cLUNpCUxF1lFuJKWiDorPjygsBrtKv94eClv3fFLN DVkQ== X-Gm-Message-State: AIkVDXJpsGcNs1rEx731EzSRzAK0WhLTLgSVoRDKrb+l+U2tq0IxmzeVwIhqkvRrzZ4gDcwx X-Received: by 10.223.129.163 with SMTP id 32mr27909288wra.140.1485265280750; Tue, 24 Jan 2017 05:41:20 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:20 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 5/8] ARM: dts: STiH410-b2260: Identify the UART RTS line Date: Tue, 24 Jan 2017 13:43:07 +0000 Message-Id: <20170124134310.27512-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When hardware flow-control is disabled, manual toggling of the UART's reset line (RTS) using userland applications (e.g. stty) is not possible, since the ASC IP does not provide this functionality in the same was as some other IPs do. Thus, we have to do this manually. This patch configures the UART RTS line as a GPIO for manipulation within the UART driver when HW flow-control is not enabled. Signed-off-by: Lee Jones --- arch/arm/boot/dts/stih410-b2260.dts | 1 + 1 file changed, 1 insertion(+) -- 2.10.2 diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts index 06b0696..fa16aba 100644 --- a/arch/arm/boot/dts/stih410-b2260.dts +++ b/arch/arm/boot/dts/stih410-b2260.dts @@ -63,6 +63,7 @@ uart0: serial@9830000 { label = "LS-UART0"; status = "okay"; + rts-gpios = <&pio17 3 GPIO_ACTIVE_LOW>; }; /* Low speed expansion connector */ From patchwork Tue Jan 24 13:43:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92352 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1717736qgi; Tue, 24 Jan 2017 05:41:48 -0800 (PST) X-Received: by 10.98.99.197 with SMTP id x188mr38406263pfb.179.1485265308859; Tue, 24 Jan 2017 05:41:48 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si19180878pgp.183.2017.01.24.05.41.48; Tue, 24 Jan 2017 05:41:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751159AbdAXNlo (ORCPT + 25 others); Tue, 24 Jan 2017 08:41:44 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36585 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbdAXNlm (ORCPT ); Tue, 24 Jan 2017 08:41:42 -0500 Received: by mail-wm0-f41.google.com with SMTP id c85so182151580wmi.1 for ; Tue, 24 Jan 2017 05:41:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0iJqkfkjgx6WmlisuauV0Tg1/MHMJihvRcNbJauQJbY=; b=A50kX0ren5qUr4oOI4sim6oA9F7NwqZ5Utgn0FdM3tl/A9C2acjhUs657RtJE6fnJF 01xCJuH8ik70W28XpRWTtS+W+xGTLJ9Zt4cg4C/W8lGVo6NpY4QzfvT7/QdXFHyWnO3Q /hv1bSMSeaPH9Qsbr+A7Cb54R2LUmPE8Mt9Gg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0iJqkfkjgx6WmlisuauV0Tg1/MHMJihvRcNbJauQJbY=; b=EJ/UKt07ozd3UY24Jm1hiLQbnZw9BGwMSmKc4ME/usfd8xlTrvMryScju+Dma2RWjP ZCK/2Zyfz33P+EQR0AMXVbN65DCokgK9wUE6cTB6NB5yPRQm8nxfVlkyIDjJExzxvHlU oSj8N3F8scdfUMVFHNZuH4lROerM97hQlfbpm0KRIAJiu516FzulXGse4veh4c3uHjGS q7LNHCOAcsR+Y3vgnQT99nDR/1uH0jZFbAam59fi6hfW48FiFA3FeAww12vMOuyKgLjx eWjqk/CIdsD4UZRtXwZ0tqrKjqzGXuHF07RvRJLyNn4aD1xfucHd2ux9tWCJrtkLOAO/ 8cew== X-Gm-Message-State: AIkVDXIRegrTtkf1cs7vJE9PsYbAxi8SpXgOLU77krNCDEQvM6ezVuA9kQZJu4O8O1HznTcY X-Received: by 10.223.177.18 with SMTP id l18mr28489432wra.96.1485265281776; Tue, 24 Jan 2017 05:41:21 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:21 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 6/8] ARM: dts: STiH407-pinctrl: Add Pinctrl group for HW flow-control Date: Tue, 24 Jan 2017 13:43:08 +0000 Message-Id: <20170124134310.27512-7-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Each serial port which supports HW flow-control should have 2 Pinctrl groups. Once for when HW flow-control is in progress, where the IP will take over controlling the lines and another group which enables the lines to be toggled using GPIO mechanisms. Signed-off-by: Lee Jones --- arch/arm/boot/dts/stih407-pinctrl.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.10.2 diff --git a/arch/arm/boot/dts/stih407-pinctrl.dtsi b/arch/arm/boot/dts/stih407-pinctrl.dtsi index daab16b..fbb7f86 100644 --- a/arch/arm/boot/dts/stih407-pinctrl.dtsi +++ b/arch/arm/boot/dts/stih407-pinctrl.dtsi @@ -465,8 +465,16 @@ serial0 { pinctrl_serial0: serial0-0 { st,pins { - tx = <&pio17 0 ALT1 OUT>; - rx = <&pio17 1 ALT1 IN>; + tx = <&pio17 0 ALT1 OUT>; + rx = <&pio17 1 ALT1 IN>; + }; + }; + pinctrl_serial0_flowctrl: serial0-0_flowctrl { + st,pins { + tx = <&pio17 0 ALT1 OUT>; + rx = <&pio17 1 ALT1 IN>; + cts = <&pio17 2 ALT1 IN>; + rts = <&pio17 3 ALT1 OUT>; }; }; }; From patchwork Tue Jan 24 13:43:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92351 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1717728qgi; Tue, 24 Jan 2017 05:41:48 -0800 (PST) X-Received: by 10.99.56.94 with SMTP id h30mr39766025pgn.23.1485265308489; Tue, 24 Jan 2017 05:41:48 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si19180878pgp.183.2017.01.24.05.41.48; Tue, 24 Jan 2017 05:41:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750877AbdAXNlj (ORCPT + 2 others); Tue, 24 Jan 2017 08:41:39 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35118 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133AbdAXNl3 (ORCPT ); Tue, 24 Jan 2017 08:41:29 -0500 Received: by mail-wm0-f48.google.com with SMTP id r126so182636752wmr.0 for ; Tue, 24 Jan 2017 05:41:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IRoUhfu3lJg3ALAxZMVvZhmmRiLyWGBrcE9FOck7aUk=; b=GFgItONoDLsBWl75Ar1IvvKwI65Hbnx0E3XuTPziQlEnzqksdaIzt6ZNFerLQii+Vr iPGXaCgrhRJIAWIbAg64gHbREw8Qm3pJ4s+ecwkojJETJVsXFfqJuBK0A70MSkw+XE5A 9TBWm4FfGHMz/fFcod0V6/6Q5DHBUA7dgcEjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IRoUhfu3lJg3ALAxZMVvZhmmRiLyWGBrcE9FOck7aUk=; b=RXtKJocVVYVAhNh4FpqSfWbbdNphLg1pQ7tNdckI9yClQlLZ8Yy3KntZUQJ2rRNZYr tfUZJpV4VCg/dgx1aYeebN1+/RM+acOh1b8M8yFHZGTdQ4+TzB5SCbMmSTgHIZEgLmGF OwmfFYDOXjcsKwytfmPqnVu7aEMtKQwFlFmR6FibZLRWE+D4Zo7+Abz0k5Sv9q0vmPvl gJC87euAofHE2i3Tk5YtmbnKNSPaPNMvQAu7bqC7DFS/ue2HN3z/9NH3qhDQDGlNxPi5 lN+Y81WxKVsF4FdMSalejfQuMAs/DEKqXJuayWx8xHtqy4/heLSyDEYvVTCoIOyI4i9L Hxag== X-Gm-Message-State: AIkVDXIxACZk+QgrQ96CqhcKsVzXcRVBsnzpN5Z22uIuLWGIml8aqxiVt9CXfpXWlajaURr0 X-Received: by 10.223.170.221 with SMTP id i29mr35207693wrc.131.1485265282790; Tue, 24 Jan 2017 05:41:22 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:22 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 7/8] ARM: dts: STiH407-family: Use new Pinctrl groups Date: Tue, 24 Jan 2017 13:43:09 +0000 Message-Id: <20170124134310.27512-8-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Having just defined some new Pinctrl groups for when when HW flow- control is {en,dis}abled, let's reference them for use within the driver. Signed-off-by: Lee Jones --- arch/arm/boot/dts/stih407-family.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index c8b2944..9789978 100644 --- a/arch/arm/boot/dts/stih407-family.dtsi +++ b/arch/arm/boot/dts/stih407-family.dtsi @@ -222,8 +222,9 @@ compatible = "st,asc"; reg = <0x9830000 0x2c>; interrupts = ; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_serial0>; + pinctrl-names = "default", "manual-rts"; + pinctrl-0 = <&pinctrl_serial0_flowctrl>; + pinctrl-1 = <&pinctrl_serial0>; clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>; status = "disabled"; From patchwork Tue Jan 24 13:43:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 92349 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1717615qgi; Tue, 24 Jan 2017 05:41:31 -0800 (PST) X-Received: by 10.98.87.27 with SMTP id l27mr38800019pfb.169.1485265291881; Tue, 24 Jan 2017 05:41:31 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si19215130pgz.5.2017.01.24.05.41.31; Tue, 24 Jan 2017 05:41:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751131AbdAXNl0 (ORCPT + 2 others); Tue, 24 Jan 2017 08:41:26 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33468 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbdAXNlZ (ORCPT ); Tue, 24 Jan 2017 08:41:25 -0500 Received: by mail-wm0-f53.google.com with SMTP id d140so42934135wmd.0 for ; Tue, 24 Jan 2017 05:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cq276xMc5tPBDvLby/3g0kGHNrDFB+LIZ9+c62mw97s=; b=ijzXdRGIlY6BcrRPVYTALQwrlUqO2vG++8H3FOHHCqBro/X7Te8qOhTGSng2Fd28Im bmvM4Yd4PSHo2X2C1o7iPPlPD/D+vyuz42Z9WupQqPrFx79IkPYGdUSNHyKG/YEMHd5p Yt4MFYrtRSah5m+uKGmGXALZHGso6dep6agvg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cq276xMc5tPBDvLby/3g0kGHNrDFB+LIZ9+c62mw97s=; b=X5QUD3fzGFSlAPi4y4NeIgdE9KmmMJJVnvV3iDvzffSvkHQYWFXNqlil0in+LS0Vpq BI8is2/6UFO4IgLAgbHwwb4zpgngmaZsX22yjZ7SopkNtpu4zbTYDfmTN82JoaW3hsJh bnmt0PSsM7YsHhLRqyAsPKLPhigG05DlzX4Fv8/srtetzcMjZvIPqKbox+3HJuM+O0Ut GPxIJFYx1ZMu/SKC4zlhNvvJNMEoHb4TnBxv3GkITmPJpJjZ2W1eZxKY54X1QXu29WSP gBitOB/QANtitQhxmqdnSyRUmAEN3N/z+w5aP4Avmcuhr71M7tzJWHiI6TnBxbkJx0QO /o1w== X-Gm-Message-State: AIkVDXL+0nZm0+xgKF1Rmu2czp82DXst0BbU96gjrPSUx+M8ewKl3rXy2v3rgWIqVeJ0mKe6 X-Received: by 10.223.163.75 with SMTP id d11mr28232006wrb.87.1485265283787; Tue, 24 Jan 2017 05:41:23 -0800 (PST) Received: from localhost.localdomain (host81-129-172-30.range81-129.btcentralplus.com. [81.129.172.30]) by smtp.gmail.com with ESMTPSA id d42sm19966165wrd.7.2017.01.24.05.41.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 05:41:23 -0800 (PST) From: Lee Jones To: gregkh@linuxfoundation.org, jslaby@suse.com, linux-serial@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, Lee Jones Subject: [PATCH 8/8] ARM: dts: STiH407-family: Enable HW flow-control Date: Tue, 24 Jan 2017 13:43:10 +0000 Message-Id: <20170124134310.27512-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170124134310.27512-1-lee.jones@linaro.org> References: <20170124134310.27512-1-lee.jones@linaro.org> Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Hardware flow-control capability must be specified at a platform level in order to inform the ASC driver that the platform is capable (i.e. are the lines wired up, etc). STiH4{07,10} devices are indeed capable, so let's provide the property. Signed-off-by: Lee Jones --- arch/arm/boot/dts/stih407-family.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index 9789978..7ada8ea 100644 --- a/arch/arm/boot/dts/stih407-family.dtsi +++ b/arch/arm/boot/dts/stih407-family.dtsi @@ -226,7 +226,7 @@ pinctrl-0 = <&pinctrl_serial0_flowctrl>; pinctrl-1 = <&pinctrl_serial0>; clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>; - + st,hw-flow-control; status = "disabled"; };