Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3822827ybz; Mon, 20 Apr 2020 10:04:31 -0700 (PDT) X-Google-Smtp-Source: APiQypJ6vUMI7owwlE9lahyBVUi8rokk3wL9FTOmlQGOT3ofYFhebZXXIZ9p1d84AEAznBUYE+CL X-Received: by 2002:aa7:d745:: with SMTP id a5mr15630290eds.43.1587402271339; Mon, 20 Apr 2020 10:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587402271; cv=none; d=google.com; s=arc-20160816; b=IPPdx1tmpAR5gGW+ymcVuH4HjzZH2u/OCb/OXZNL9w9JJLHPO4TDDoILWYdVVZ4M0h SDqqks0EbU8yhSNZuNJsMthkb7pcsOmYLUJb3mGuu8KaY/jcHMXecXC9zLLj+MmFKshw sxVKwiz49A274bj0OSxGbtCNuODT8krCi081Gct7F/j6rO3xYSZd9uULwJjuCXDUjmTp UDk798nmB58HNM7+4R196q0iRhsR0MkpC2p2d9uLpfO6ijxin5YvDhPxyRMfd4n/KOE2 8BerwSi6LWvYrmzJVbIBoN3LVX6Od3CS5WrdMBF1fvVIYZ7U6yxYDjPyYcu2YAqhA34u mHZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=TlocUE/w/wO+NlEVTCCiYwNvgP4sxSNKcXR8OOw6x1w=; b=AxREFjrdzfC+9fSbCbfCubUNhweMTdZrfq+stLo7v+EebvZgNAN3UOk6J0G7CU+EvR 1G1m9hOSsf6YvO7r7kXHjgUsiILz2HCdS5l/EJycT0tjP3oUDlpJ5JOtqOe6N3R1rhDj GoAkEPx6lLWv+Eznu5FI0T7I2gPsjJ4EB1qaxg7oW2RmQ2idNGcpGD9qHYzLYnUvsoeR hnBhfkp1xWLLNfW+1XqP2oUSq3b1tROJNm6I61+fQ7rUCoGkw0PGZUyRnXiWkW+psvHE Z9LrAD9dwAsmgd5w8T9WwWfoVlYa6Ag5Bi4+OuAAlisQZGMDtoHlzOOr+NJ1bbI0JiYn gARQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bM5TEFM6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i15si899679ejc.172.2020.04.20.10.04.07; Mon, 20 Apr 2020 10:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bM5TEFM6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726460AbgDTRCS (ORCPT + 99 others); Mon, 20 Apr 2020 13:02:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:38260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725784AbgDTRCS (ORCPT ); Mon, 20 Apr 2020 13:02:18 -0400 Received: from localhost.localdomain (unknown [157.46.94.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2FB820CC7; Mon, 20 Apr 2020 17:02:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587402137; bh=aksiYpWTvag3k42u0M1b1NrjxY8yKocMPEw91TQYxEU=; h=From:To:Cc:Subject:Date:From; b=bM5TEFM6C5MJE7Kcy6aNRoG0fjnGHLSHqXpkrnuuYUVe4H9Ivr7WigZ0IzlLMZ5R6 ggHj/GRUmCAAiaBJmz95FdNW6UpXR1wn4Io//QLjuSabgrWzfYKpzwBhnFUWkdRS0S 7PcmuXjFHlv/Vt6tf5kpQEzocBySnhWsaLV7oqtE= From: mani@kernel.org To: gregkh@linuxfoundation.org, robh+dt@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@st.com, andy.shevchenko@gmail.com, Manivannan Sadhasivam Subject: [PATCH v3 0/2] Add CTS/RTS gpio support to STM32 UART Date: Mon, 20 Apr 2020 22:32:02 +0530 Message-Id: <20200420170204.24541-1-mani@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Manivannan Sadhasivam Hello, This patchset adds CTS/RTS gpio support to STM32 UART controller. Eventhough the UART controller supports using dedicated CTS/RTS gpios, sometimes we need to use different set of gpios for flow control. This is necessary for the upcoming STM32MP1 based board called Stinger96 IoT-Box. On that board, a bluetooth chip is connected to one of the UART controller but the CTS/RTS lines got swapped mistakenly. So this patchset serves as a workaround for that hardware bug and also supports the usecase of using any gpio for CTS/RTS functionality. As per the sugggestion provided by Andy for v1, I've now switched to mctrl_gpio driver. This patchset has been validated with Stinger96 IoT-Box connected to Murata WiFi-BT combo chip. Thanks, Mani Changes in v3: * Added Andy's reviewed-by tag * Fixed minor issues spotted by Fabrice Changes in v2: As per the review by Andy: * Switched to mctrl_gpio driver instead of using custom CTS/RTS implementation * Removed the use of software flow control terminology. Manivannan Sadhasivam (2): dt-bindings: serial: Document CTS/RTS gpios in STM32 UART tty: serial: Add modem control gpio support for STM32 UART .../bindings/serial/st,stm32-uart.yaml | 14 +++++ drivers/tty/serial/Kconfig | 1 + drivers/tty/serial/stm32-usart.c | 53 ++++++++++++++++++- drivers/tty/serial/stm32-usart.h | 1 + 4 files changed, 67 insertions(+), 2 deletions(-) -- 2.17.1