Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp229483rdf; Tue, 21 Nov 2023 00:29:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IExm40mgSb1btrQ50HDykrUEwod2ZE38RZLoDESLis+tKHY/NOUsnT0BuP9Phsv2SzNEWxc X-Received: by 2002:a05:6830:22f0:b0:6d6:490f:f027 with SMTP id t16-20020a05683022f000b006d6490ff027mr10097129otc.37.1700555370617; Tue, 21 Nov 2023 00:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700555370; cv=none; d=google.com; s=arc-20160816; b=WhBdsVyqGHXDXA3wKq+CAU4uZ9mLUpuV/28cZAZntnxaJQUrZADZTZa3BE5+P8IBVf 3kAk+C55N6b2WgNa1oWcw0dTi74WF/C0QSMKbG0oshNXAP13Gjpgj5Idyb1iwN5Gwcna 3dFsQZ9oT+GapiSxSLW9d6myCpX8S9AAWK7MZGK2ITs1UCDq2Hu24jgL+stsNA6UsJnw 5rJ4XK5ZafdX/+JA7e2I+4jA8HsejhXkmLovdhjttTtSjS6a7pzgc6dB+kaeIzBVyCFw sphEPpPAKeMYi7i9g9m2jb4Z51FlS85R7hUanVINAwhqkacReRY4qh3+GBfpU9bimqYP /fAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=mqky3k19T0P2MCRPH6CIBr7V91/rccfoXJK3y1NnIu8=; fh=+LDUt46xKOlz0KxJNRfsyu63SOOiJSfYawkr8H6XyAw=; b=iCOosSYOgHDz5+/kuwvSYRfNz6z0TnJhA4yqTdiZrnjuJ4JVw5EYbY/yZXOaMpQ7mZ 8sx93it8AShSDhvP4LFEHIfAH9vPExb2uJwJ4z5Pj21upOWTRKqUcv53li7fwTSC2rdS bvjNRIyehxe+0OhoZWIVBCufIx8VELRYpDPByohdAfmHraSm+RDaMnOBOGqq0iirvYKU FieX+OnguFPXe8wx1ZBb5LiUWsYep4TkgfnUsVInaElq1Yz53sil9Ixv7CFC7Az5ws5X Hy1BfwEwXkC20B+56y0qNanhifYX81cwJFZdh//0PSD6BgusSjr0E70lUg0lF15dKviU AVUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=RXoBwfeh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c1-20020a63da01000000b005aaab9e7bcfsi10296729pgh.388.2023.11.21.00.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 00:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=RXoBwfeh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 46D44806CC22; Tue, 21 Nov 2023 00:27:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbjKUI1L (ORCPT + 99 others); Tue, 21 Nov 2023 03:27:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjKUI1K (ORCPT ); Tue, 21 Nov 2023 03:27:10 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24B87ED for ; Tue, 21 Nov 2023 00:27:06 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-507e85ebf50so6888782e87.1 for ; Tue, 21 Nov 2023 00:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1700555224; x=1701160024; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mqky3k19T0P2MCRPH6CIBr7V91/rccfoXJK3y1NnIu8=; b=RXoBwfehoJeAAb/T8P5AZOycCs9u/0JqoVsUak2sN+0067mnfQ1AfKWpPoA0h2H/Wm Gvqyv3IyRTjhWIzM+gyO3nnHGti4jUUqtPlXs6db13IBlyDO8kBVTooXalGTarVC3Wtm OzV47uDPgoZ7NUNZQMEvbkRHZNr0TdGXtnwZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700555224; x=1701160024; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mqky3k19T0P2MCRPH6CIBr7V91/rccfoXJK3y1NnIu8=; b=Tymy/ughdEAOEV9mtXDIrJREoWocE73RxR+e0nAuSvVJrcHJvy43NdqWukobTs+xhw BNYcqEUlILccXp6E/zvhjm+BdrHdJ5LwkxvcGTFqZX/LQ1bRnIoLCdacBOrYX7cR6y+/ 6BBbos1FD5GE+yckR5cblVl4E/WFrFkMrOywRWFWovrDhBsI/yGnuJ3LYZe2G3jw3f5w wm983m8GXaonYKUMc1jsCILqVQ+kkrIYreV013Za5RmG+ZuGy5qjn45XgLxOnp0BV8hA dcogWumJHDEL26RAyNi6qeU8MwbfUaSyJ9nRNrYz5dPS7qIefX/EoBSn16jTHrwkHN6i c0Ew== X-Gm-Message-State: AOJu0Yw9n30KXkrFiXWE0P0CkgMQAzdkust+pImF/wckX4rrNXCS+TcS b3QYjjTx3A9EAJdwn9eCBRCd/Q== X-Received: by 2002:a19:f60d:0:b0:50a:5df2:f322 with SMTP id x13-20020a19f60d000000b0050a5df2f322mr7380823lfe.13.1700555224253; Tue, 21 Nov 2023 00:27:04 -0800 (PST) Received: from [172.16.11.116] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id fc14-20020a056512138e00b0050aa8602e7dsm970575lfb.181.2023.11.21.00.27.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 00:27:03 -0800 (PST) Message-ID: <1c016987-da88-47f2-bc1b-fcbe4c71a5c9@rasmusvillemoes.dk> Date: Tue, 21 Nov 2023 09:27:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] dt-bindings: serial: rs485: add rs485-mux-gpios binding Content-Language: en-US, da To: Krzysztof Kozlowski , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, Andy Shevchenko , Lukas Wunner , Rob Herring , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org References: <20231120151056.148450-1-linux@rasmusvillemoes.dk> <20231120151056.148450-2-linux@rasmusvillemoes.dk> From: Rasmus Villemoes In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 00:27:13 -0800 (PST) On 21/11/2023 08.52, Krzysztof Kozlowski wrote: > On 20/11/2023 16:10, Rasmus Villemoes wrote: >> Some boards are capable of both rs232 and rs485, and control which >> external terminals are active via a gpio-controlled mux. Allow >> describing that gpio in DT so that the kernel can transparently handle >> the proper setting when the uart is switched between rs232 and rs485 >> modes. >> >> Signed-off-by: Rasmus Villemoes >> --- >> Documentation/devicetree/bindings/serial/rs485.yaml | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/serial/rs485.yaml b/Documentation/devicetree/bindings/serial/rs485.yaml >> index 9418fd66a8e9..e8136c7d22ed 100644 >> --- a/Documentation/devicetree/bindings/serial/rs485.yaml >> +++ b/Documentation/devicetree/bindings/serial/rs485.yaml >> @@ -61,6 +61,11 @@ properties: >> the active state enables RX during TX. >> maxItems: 1 >> >> + rs485-mux-gpios: >> + description: GPIO pin to control muxing of the SOC signals to the RS485 >> + transceiver. >> + maxItems: 1 > > Aren't you duplicating > https://lore.kernel.org/all/3Nk.ZZrp.5w3Yn0Ecy5C.1bMzDp@seznam.cz/ ? Hadn't seen that, but no, this is not at all the same. That patch seems to define an input pin to tell whether to enable rs485 mode or not (sort of early run-time version of the linux,rs485-enabled-at-boot-time). > Anyway, similar comments: this does not look like generic RS485 > property. Are you saying that standard defines such GPIO? No, I'm saying that several boards that exist in the wild have the RX/TX/CTS etc. pins routed to a multiplexer, which in turn routes those signals to either a rs485 transceiver or an rs232 driver (and those in turn are connected to different screw terminals). So no, it's not a property of the rs485 protocol itself, but very much related to making use of rs485 (and rs232, though of course not simultaneously) on such boards. Would a link to a schematic help? Rasmus