Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp231636rdf; Tue, 21 Nov 2023 00:34:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHz5V4YUyjETO7h6rF7Bsbmp8HUYkLqlI6tkCT2qvbb5HovW0INOOd4lR9o9a8ARyXbIosM X-Received: by 2002:a17:90a:b785:b0:280:2422:d2b4 with SMTP id m5-20020a17090ab78500b002802422d2b4mr7960549pjr.22.1700555671838; Tue, 21 Nov 2023 00:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700555671; cv=none; d=google.com; s=arc-20160816; b=KROumvublw7rdqsBplSVJp1iGxv25mHiupKw604Ygimq9dDX2WAtFSb3CbGu5R9Bar Ih2CGRaj0Bq+RTGb2PU7zGp6XanBOhNONtNIaPvjHcdOwmQZ1i8LI2OmCn4Pxf/nHFvU p3kau0mZ3/V7iRF8BX4lOJB6tlVcWhJAdXhkcsjNgt9YzbSWHBvaQn2bYM8RIia6sfBZ ZYkRWpaoUrffQUVD3w5O63aDc+SMCtdADQqml42PqEQnGY9yYltjHuhq/ehCZ+9+5sVM GqB/OTa20zb+YtsUYpmhtQOnPQtQbG6WczmXAGC95HSkoLi+spAin56vQPG790uoaAfO T6ZA== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=KrMj19vsl0kSqsf6FPK0QmlAMs/Qdk3cNg78FESN9s8=; fh=4cV6OWqRd2cRSziA1xKaIxod4/7RllFRyP1ATox8slI=; b=d5LIGvY2dOlyBMcs1svTsPXWKh4Zz1S3CVwR9ETlZHIfZAzBY+ml8hzO6o382aWnQf Wi3LsGwvuM9IKdYyTBPEtJ4FDyO8I6P4dl2MXxrvyLJOSY3ZyPDmomybdJ3pc8njlGbJ jfLhP6RnlFlQBkBiqBKvLUvTkFw8Pj19MMa9/eoqajyhBFPTfKN/F2jKMy0ygdVmekDH RJr6KIRH8TnLJfejR1TkN5VfiV5DU3X7/fwD8mhRpD48L1+T9uP6R0AN90Gy/pNIelnn UGzi9j0VwPm3UgEGHNRlfqbhvGLsceGEIY7x4jrmtfBIw8NSUL4lxruyBWi4lfFOTApk ekag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nldNHXPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d5-20020a17090b004500b0028023efb800si10364372pjt.18.2023.11.21.00.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 00:34:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nldNHXPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B8373805A7EE; Tue, 21 Nov 2023 00:34:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230243AbjKUIeN (ORCPT + 99 others); Tue, 21 Nov 2023 03:34:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbjKUIeK (ORCPT ); Tue, 21 Nov 2023 03:34:10 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4234310C for ; Tue, 21 Nov 2023 00:34:06 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c5087d19a6so64080921fa.0 for ; Tue, 21 Nov 2023 00:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700555644; x=1701160444; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KrMj19vsl0kSqsf6FPK0QmlAMs/Qdk3cNg78FESN9s8=; b=nldNHXPVlEgsCL88QLbz9iLr8lqpgu9vdurQ/mzV3ZnnUKPFM/ireox792ET7G4NVH nG+rsiIHdxbf4dVz8xboHkT2OLwcE/87AyEwEnUYvQjt07ns0XGZpnYpL10xpF+d2eSt 2mqt2NmAxU2fKx8MX9hr1qqJb5PPAAI1h+ATrK4Nme7Vb3nGYIPl1MBGErlxv1eY66Av fllcP7upj5f137yS+bV5WWdzB4nHD1zmm/uOxaq1aFpe+A+7Zvjtp2NfRcmb+G8Khd1c RShxRirTgCR1je5hsXL5i1KSTE65pOiyKKJsqJ7BHUaB6h07NuCJsYbXoLgJzGcfw2Gv XGMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700555644; x=1701160444; h=content-transfer-encoding:in-reply-to:autocrypt: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=KrMj19vsl0kSqsf6FPK0QmlAMs/Qdk3cNg78FESN9s8=; b=AGhGWb2ClS7sHBPLm6sgDTt0Ba7Uo2lKF8BimDug7W3ExUkOEXdcjyawwYvwJw4Omr xU7J/88BPMG8WA6k1gu7JEJYQJcvPCXHrCvhvbS/J2U5ROqwUY0N74Qk68kv/NOH1SRM 5nMTWfK8ObtnLivYC3tXwVIgZQql6VqpyPpA28gNtBFroP0sCbzyt0nj7/7foPFEYPjy tBjRRSIcRP0sVEhSisX1qtSVgIYQFweWQjLfBxryKfrDTduloCO8VeOU6DY+94LxJjwL 7DeIQ15fSiQXzfRPBrsUqKibrn1gMn6ps7XbxuKNN0FybnaljEbi3/V0vv7ygWRcE4hk 1gHg== X-Gm-Message-State: AOJu0YxpWtphBorkS8uWJ09brPujWTx4mOZdg2hLoCPxKUt8MvYdJUJy AL+NKZpj0Hb3Dm6cMox/kbEciQ== X-Received: by 2002:a2e:3e17:0:b0:2c5:1bd3:5658 with SMTP id l23-20020a2e3e17000000b002c51bd35658mr7020225lja.28.1700555644416; Tue, 21 Nov 2023 00:34:04 -0800 (PST) Received: from [192.168.1.20] ([178.197.222.11]) by smtp.gmail.com with ESMTPSA id s5-20020a5d6a85000000b0032d9f32b96csm13765372wru.62.2023.11.21.00.34.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 00:34:03 -0800 (PST) Message-ID: <67a2cea0-f2de-4e7d-bc9d-ae29885f9210@linaro.org> Date: Tue, 21 Nov 2023 09:34:02 +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 To: Rasmus Villemoes , 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> <1c016987-da88-47f2-bc1b-fcbe4c71a5c9@rasmusvillemoes.dk> From: Kr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DxT7tjKXqBQEscVODaFicsUkjheOD4BfWEcVUqa+XdUEciwG/SgNyxBZepj41oVq FPSVE+Ni2tNrW/e16b8mgXNngHSnbsr6pAIXZH3qFW+4TKPMGZ2rZ6zITrMip+12jgw4mGjy 5y06JZvA02rZT2k9aa7i9dUUFggaanI09jNGbRA/ABEBAAHCwXwEGAEKACYCGwwWIQSb0H4O DFH41ZZ3t1Qbk0N9O0FimwUCYDzvagUJFF+UtgAKCRAbk0N9O0Fim9JzD/0auoGtUu4mgnna oEEpQEOjgT7l9TVuO3Qa/SeH+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <1c016987-da88-47f2-bc1b-fcbe4c71a5c9@rasmusvillemoes.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 00:34:29 -0800 (PST) On 21/11/2023 09:27, Rasmus Villemoes wrote: > 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. Which upstream boards use it? To me it looks like specific to each controller, not to RS485. > > Would a link to a schematic help? Yes, always :) Best regards, Krzysztof