Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1774669pxp; Mon, 7 Mar 2022 02:01:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxD1e5Xnx480wUaLSHgBI2d7a5ENGw7oRcEv5kNgvfl9UBbgbH0h6bu1v90YVX0yIsT60EG X-Received: by 2002:a17:90b:4b4b:b0:1be:fd9a:c279 with SMTP id mi11-20020a17090b4b4b00b001befd9ac279mr24413472pjb.83.1646647295334; Mon, 07 Mar 2022 02:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646647295; cv=none; d=google.com; s=arc-20160816; b=LG+2pc6ZfShQqbmmWM1voKFDmIJev8pDuk34tZV7iUeZruwMaxrJyMPQ13KJgBUpk4 3OHIPdoPH+O05cIThGh/AecC+zy92v3YP+8Lj647QafPrNsxq2dOG2FpLS4UXVthMn9I Qi0ZJZn0JS/bek7KSbUMGiFkw8FHXYhuVDmIDEyJ8k04V56cXkNH5q8JEjIRvgYd6dKg ahlFRUiclWIaIeN7RNRhfErYcjX2FJD/mNdJi93NQeCH9i6csiFjDhspeSTllLr3pXyU LtpDbQuMTiWE+GoavvEXsDdLe9TM/2PI3Nm1BmbsDKEqaP2uiG6fXFVM/wXwq5iX00xl Lu+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=9z0SIvZp4Av9+YZ2QwOdbdm5qXNLmYkBWgXtt+/dfZ4=; b=Kfqnrx9M+hXPAazUSS7Z5FGg3chiclDv12oHvmhmMXaFJNExNkSxCcPgSVpEd7LNJV y2pHVKdINhHa1sP2QFyZDUiZRlfzCcdFsgPBgXzBRui9LjLoFR31qaoO9Nx8SKefS17M YLMIqgwscsTquYnqXdwvRO2IWr9fvuKs33YMpLROMmLK/k05gG4BhJ3+V3u4jR8FEwpU fYMf5s+RT8SV4PFNww59VQ9owMHp0jlXzIsyhA0nAXtBR0YHj4ef8cSxZqMzloFwGjfH r6HXeRxwjK0j1ScHf1TyUSCZK7mfAYdDuSyu3RP86N3SRwnBt/0ACQo2ROZmuwNM8suy bwxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bRdsM6Tn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a170902dac200b00151e02d9710si4852944plx.37.2022.03.07.02.01.19; Mon, 07 Mar 2022 02:01:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bRdsM6Tn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236405AbiCGJWF (ORCPT + 99 others); Mon, 7 Mar 2022 04:22:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236562AbiCGJVk (ORCPT ); Mon, 7 Mar 2022 04:21:40 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4992E541AA; Mon, 7 Mar 2022 01:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646644808; x=1678180808; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=wGeDKaASQDCyWy0awRd7jeAVQdDX7gR/VgWstKH88gA=; b=bRdsM6TncrMoQcN60/Ak8xegmd7mcKX+Pqa8Kyc82ckHH9l7VZxyrdXi Qy+zUsRJuFFR+cK9tox0P3uCJsH7FSOyacQUOynSSMYX8jASZqHYYEgCZ 9PhlRRdkCXmJ8VTHsPYhUnaDmdcaTDEwgx0BAaXraBCGOnDcrhcSpvt9c 8FzO/VaNY6odrH64Hv4W0Z+BJXFD381Aa044QfYUSVRYkivDfYpyLTDv6 vMK3OYXohgaLAONqF7burNZKksnfgphTb4PUVb/m7BONykTYRvRzDI5l4 GOGN528riicFYlgTCZezfw1SQu07sr2hTZcp1Qn/lza2jNgBSw3yfsYE/ w==; X-IronPort-AV: E=McAfee;i="6200,9189,10278"; a="254536717" X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="254536717" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 01:20:07 -0800 X-IronPort-AV: E=Sophos;i="5.90,161,1643702400"; d="scan'208";a="537042104" Received: from rabl-mobl2.ger.corp.intel.com ([10.252.54.114]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2022 01:20:04 -0800 Date: Mon, 7 Mar 2022 11:19:59 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Andy Shevchenko cc: Lukas Wunner , "open list:SERIAL DRIVERS" , Jiri Slaby , Greg Kroah-Hartman , Linux Kernel Mailing List , Johan Hovold , Andy Shevchenko , Heikki Krogerus , Raymond Tan , Heiko Stuebner Subject: Re: [PATCH 1/7] serial: 8250_dwlib: RS485 HW half duplex support In-Reply-To: Message-ID: References: <20220302095606.14818-1-ilpo.jarvinen@linux.intel.com> <20220302095606.14818-2-ilpo.jarvinen@linux.intel.com> <20220306184857.GA19394@wunner.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1881166460-1646644807=:1677" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1881166460-1646644807=:1677 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Mon, 7 Mar 2022, Andy Shevchenko wrote: > On Mon, Mar 7, 2022 at 12:00 AM Lukas Wunner wrote: > > On Wed, Mar 02, 2022 at 11:56:00AM +0200, Ilpo Järvinen wrote: > > ... > > > Does the DesignWare UART use dedicated DE and RE pins instead of > > the RTS pin? That would be quite unusual. > > They are muxed with other UART pins on SoC level, but I don't remember > by heart which ones. According to the Synopsys datasheet they are > separate signals. It might be that I'm missing something, since the > last time I looked was last year. Unusual or not, there is a pin for both DE and RE. DE is muxed with RTS. > > > + d->hw_rs485_support = device_property_read_bool(p->dev, "snps,rs485-interface-en"); > > > + if (d->hw_rs485_support) > > > + p->rs485_config = dw8250_rs485_config; > > > + > > > > You wrote in the commit message that rs485 support is present from > > version 4.0 onward. Can't we just check the IP version and enable > > rs485 support for >= 4.0? That would seem more appropriate instead > > of introducing yet another new property. > > AFAIU this is dependent on the IP syntheses. I.o.w. version 4.0+ is a > prerequisite, but doesn't automatically mean that there is a support. > Unfortunately there is no way to tell this clearly in the IP > configuration register. And the IP synthesis only part of the picture, in general case, it'd also matter that there's something connected to that RE (i.e., an RS485 transceiver). On the board I'm testing with, I can also turn RS485 on/off from BIOS which makes the pins (mainly RE) behave differently. I initially had additional version check here while developing this patch series but it seemed to not provide any added value due those other factors that need to be considered. -- i. --8323329-1881166460-1646644807=:1677--