From patchwork Tue May 12 12:40:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 1288418 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=wunner.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49LyJR1Rg6z9sSg for ; Tue, 12 May 2020 22:47:51 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729645AbgELMru (ORCPT ); Tue, 12 May 2020 08:47:50 -0400 Received: from mailout3.hostsharing.net ([176.9.242.54]:54785 "EHLO mailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729626AbgELMru (ORCPT ); Tue, 12 May 2020 08:47:50 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mailout3.hostsharing.net (Postfix) with ESMTPS id B829C101C01C0; Tue, 12 May 2020 14:47:47 +0200 (CEST) Received: from localhost (unknown [87.130.102.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 14486627549D; Tue, 12 May 2020 14:47:46 +0200 (CEST) X-Mailbox-Line: From 3d32e182ebefce6144844adf12fe481a35580633 Mon Sep 17 00:00:00 2001 Message-Id: <3d32e182ebefce6144844adf12fe481a35580633.1589285874.git.lukas@wunner.de> In-Reply-To: References: From: Lukas Wunner Date: Tue, 12 May 2020 14:40:03 +0200 Subject: [PATCH v2 3/4] dt-bindings: serial: Add binding for rs485 bus termination GPIO To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring Cc: "Matwey V. Kornilov" , Giulio Benetti , Heiko Stuebner , Andy Shevchenko , Christoph Muellner , linux-serial@vger.kernel.org, devicetree@vger.kernel.org Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Commit e8759ad17d41 ("serial: uapi: Add support for bus termination") introduced the ability to enable rs485 bus termination from user space. So far the feature is only used by a single driver, 8250_exar.c, using a hardcoded GPIO pin specific to Siemens IOT2040 products. Provide for a more generic solution by allowing specification of an rs485 bus termination GPIO pin in the device tree. An upcoming commit implements support for this pin for any 8250 driver. The binding is used in device trees of the "Revolution Pi" PLCs offered by KUNBUS. [Heiko Stuebner converted the binding to YAML, hence his Signed-off-by.] Signed-off-by: Heiko Stuebner Signed-off-by: Lukas Wunner Cc: Jan Kiszka --- Documentation/devicetree/bindings/serial/rs485.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/rs485.yaml b/Documentation/devicetree/bindings/serial/rs485.yaml index d4beaf11222d..a9ad17864889 100644 --- a/Documentation/devicetree/bindings/serial/rs485.yaml +++ b/Documentation/devicetree/bindings/serial/rs485.yaml @@ -43,3 +43,7 @@ properties: rs485-rx-during-tx: description: enables the receiving of data even while sending data. $ref: /schemas/types.yaml#/definitions/flag + + rs485-term-gpios: + description: GPIO pin to enable RS485 bus termination. + maxItems: 1