Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3468415ybb; Mon, 23 Mar 2020 01:27:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvyLxf1AZGewxIhJhenVVPz1ekPs+QuE9pUXInBHxxiXzr1R+qPxNS8cO+3HdP+99K851sr X-Received: by 2002:a9d:6186:: with SMTP id g6mr16703065otk.236.1584952022259; Mon, 23 Mar 2020 01:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584952022; cv=none; d=google.com; s=arc-20160816; b=K5TiDuyi/SzAN/+pwJ9r9Dvrb2uNB1ph6OOZ4WtQSm23xT1IAKY7HsS8I8gNe7uLvF +R3/d7WJB2kJr6+fcgl/X58E62Iq97YnCMzCw8YJE3gruJOoqoJzhVKqVW+mv9H+sCHF itNtLanLqGi4YxdLnVPpiZUg4GcfpB7HdGoqv0U0v8FQV7S8JuJ1xpy02hgVdl2bXguH T7c6fvKOFxHKhgLf2kdJMtITV8tlD2wSDsKciHZrHgqLie0/VTyzoeKg61RUJFqkhLox /NCUpIseUHDI3cAKfzaaDZGHCTgx7PlfW7P50ecz0pHPOYk36MWKXWhVKeBSsXV+KRC3 e7Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CBOp6ehSgvgL5+hapu0pN649UAyH5MeAeKnhToJ78Nw=; b=DHls6AfxaYJEvY33SkWO+wDh0OvdQXwTSxwkrtZ4eH9vT5dDLQAWvvCOhzdOzoMAmP /em9WLMc1tgOP83yOlrLrUHkhhGLhCNZMhECOBReVdez/6U7it38Zrk6fi2btPSCNZ4S R8UJUzMlK4+qSaomyKQFgajt2P6PkRpJaMsL34CqXIfL6G8jLH1uM1t5pe7JS9tiWmOQ psFjwu6TUPkpWNBEmgJdFPWVYevvM3SAIBYB7tVVEhCvgHelWZUcYXQPFJ6vdWWj4D70 UQRksNL/Rsk+VPkOrL+w/cKZsUQgBSIoqeEAGlnmGg353rJFSMXb+/jcV71ByKuTIk2Q 95pg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si814325otp.314.2020.03.23.01.26.49; Mon, 23 Mar 2020 01:27:02 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbgCWI0Q convert rfc822-to-8bit (ORCPT + 99 others); Mon, 23 Mar 2020 04:26:16 -0400 Received: from gloria.sntech.de ([185.11.138.130]:46924 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbgCWI0P (ORCPT ); Mon, 23 Mar 2020 04:26:15 -0400 Received: from ip5f5a5d2f.dynamic.kabel-deutschland.de ([95.90.93.47] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jGIPH-0001s8-19; Mon, 23 Mar 2020 09:25:59 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Lukas Wunner Cc: Andy Shevchenko , gregkh@linuxfoundation.org, jslaby@suse.com, matwey.kornilov@gmail.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/7] serial: 8250: Add rs485 emulation to 8250_dw Date: Mon, 23 Mar 2020 09:25:57 +0100 Message-ID: <6241816.LpgjcNKrfa@diego> In-Reply-To: <20200319054034.dyq7yydqi6yg7jhf@wunner.de> References: <20200318142640.982763-1-heiko@sntech.de> <5640842.EtOnNDtpGh@diego> <20200319054034.dyq7yydqi6yg7jhf@wunner.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Am Donnerstag, 19. M?rz 2020, 06:40:34 CET schrieb Lukas Wunner: > On Wed, Mar 18, 2020 at 07:49:08PM +0100, Heiko St?bner wrote: > > Looking at tty-next I notice that you're right. When I started working > > on this I only found the stuff from 2018 I linked to but didn't imagine > > that in that exact moment someone else would also work on that area. > > There are some more patches in the pipeline for the next cycle > to add support for an rs485 bus termination GPIO. They're on > the tip of this branch: > > https://github.com/RevolutionPi/linux/commits/revpi-4.19 > > Just so you know in advance and duplicate work is avoided. do you plan on submitting these soonish? Because looking at your termination-gpio change makes me want to do something similar for my RE-gpio ... instead of trying to mangle this into the DTR thingy. > > > The DTR-for-RE thing seems a bit nonstandard, I'm not sure if this is > > > eligible for mainline or if it's something that should be kept in your > > > downstream tree. But no harm in submitting it to the list. > > > > I'm fine either way - maybe I also get a pointer on what may be a better > > approach ;-) > > > > At least DTR as "Data Terminal Ready" did sound somewhat matching for > > the "Receive Enable" of RS485 (and it's also the only other output pin > > in the mctrl gpio list). > > Some UARTs allow disabling the receiver, this can be taken advantage of > to implement half-duplex mode. It's what I did in 8250_bcm2835aux.c. > > On the Revolution Pi devices, !RE is usually connected to ground, so > reception is always enabled and it cannot be disabled in software > except by turning off the UART receiver. > > There are also boards out there which connect !RE to RTS. Then only > half-duplex mode is supported by the hardware and there's no way for > software to work around it. yep and on our board we have DE and RE on separate gpios, so I guess it makes sense to use that pin how it was intended ;-) . So I guess having that as rs485-re-gpios property might be the best way. Heiko