Received: by 2002:a05:6520:2f93:b029:af:d4db:7a05 with SMTP id 19csp2379618lkf; Fri, 5 Feb 2021 11:36:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCkKKUU5x3A9jIUitp5UfkN0endfo9F0HHJRdULiOYY8F/s9VqCEB8WJ+MNoJ43doECJrV X-Received: by 2002:a17:907:f81:: with SMTP id kb1mr5586833ejc.412.1612553784414; Fri, 05 Feb 2021 11:36:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612553784; cv=none; d=google.com; s=arc-20160816; b=Dhrijn9dXW7M+uF3qO6mxQjLdCQ54ZB4RsvjvJqEY2F5Qu8ZXt5puVtgDkmsc27AYw 0pyky+jsABXn76hO9CGoFEKJGQ1mLF3Xw4yKMrzwZLDobI0FVCKvuGUvhnupq5nzafC1 8WN3I5j80NZR7DFN6L/zHaLMVYaJbZsj+9IjirRmLWHtZ6zLc1Xatx/MfvDpYi0olD5k EszzhfWXjN7FHEhbI8W3KaeR+nbGkCCjKsHywr+nCvzqzAzsBzaiIuMjCnhcOW0Y5PTR /pnXUSWU5xhwc/wsHcVkdNqmpACyUi69snYvEE+DwwGqObUsDfH885pePgAD3ZjL+/SV rytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=T1fEeNLp1BVpoWrUet+AfCmRhuz8m8V4l89rKkNTWxw=; b=wFFRouRjYsMFeLF/pI1FmjecFFQy1UNEMH8g0dEjD3OSwmvR4BqIugxi7jolyW2lQW U2EBSvKWXo/J1NGJMNdbFTzL5/3abn4BpfAGZRsMzicavt3+FN/FBEM32gbBNuNCMzZA ELlQc37/w9DYTu+ZINbr+v82MYpbcOtok0pIYR9/ZxZAAYExlCRzIs7BKzGF1e4wmlSS cfOTG8WsDG2acWiZOkUnrbJ6/m5xmeYh+HI3+Y8pBJBbtQawBzSabT3a8oYDF+Jy8s8c drSHh+1xA3cTMZNkoWTnCW4WHDryw0vpGkGAJkeMCeEsXav4QXuWrdOhTPAmFVrP9aop hQ3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b20si5829725edw.412.2021.02.05.11.35.59; Fri, 05 Feb 2021 11:36:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233297AbhBERw7 (ORCPT + 99 others); Fri, 5 Feb 2021 12:52:59 -0500 Received: from mga11.intel.com ([192.55.52.93]:14562 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233694AbhBERtQ (ORCPT ); Fri, 5 Feb 2021 12:49:16 -0500 IronPort-SDR: RdEa4fB/9XTBb/YIh3spEiAYoOT4ptR63BgTz2ejxxsJnGHw+3DNMLO+3qAC++5klBz3jpOkwf RfiGxeIGCyag== X-IronPort-AV: E=McAfee;i="6000,8403,9886"; a="177973444" X-IronPort-AV: E=Sophos;i="5.81,156,1610438400"; d="scan'208";a="177973444" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2021 11:29:45 -0800 IronPort-SDR: DpOSbIwA7IxUlUq1sd/9m7KtdYqPcf6QM3ZDQ27OsgD9oJrIehxyThk6iggcI+sIXA54QmILiI 5lFQHoEObUow== X-IronPort-AV: E=Sophos;i="5.81,155,1610438400"; d="scan'208";a="373492960" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2021 11:29:43 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l86nT-002Ebh-Un; Fri, 05 Feb 2021 21:29:39 +0200 Date: Fri, 5 Feb 2021 21:29:39 +0200 From: Andy Shevchenko To: Giulio Benetti Cc: Heiko Stuebner , gregkh@linuxfoundation.org, jslaby@suse.com, matwey.kornilov@gmail.com, lukas@wunner.de, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, christoph.muellner@theobroma-systems.com, Heiko Stuebner Subject: Re: [PATCH v3 5/5] serial: 8250_dw: add em485 support Message-ID: References: <20200517215610.2131618-1-heiko@sntech.de> <20200517215610.2131618-6-heiko@sntech.de> <20200518152103.GI1634618@smile.fi.intel.com> <1f7881b5-f900-dbbe-3f8d-f990d2bdf5a7@micronovasrl.com> <9b2a7c4c-2ef1-5198-9aae-83f9fec00289@micronovasrl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b2a7c4c-2ef1-5198-9aae-83f9fec00289@micronovasrl.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2021 at 06:46:56PM +0100, Giulio Benetti wrote: > Il 02/02/2021 12:22, Andy Shevchenko ha scritto: > > On Tue, Feb 02, 2021 at 01:31:17AM +0100, Giulio Benetti wrote: > > > Il 18/05/2020 17:21, Andy Shevchenko ha scritto: > > > > On Sun, May 17, 2020 at 11:56:10PM +0200, Heiko Stuebner wrote: > > > > > From: Giulio Benetti > > > > > > > > > > Need to use rs485 transceiver so let's use existing em485 485 emulation > > > > > layer on top of 8250. > > > > > > > > > > Add rs485_config callback to port and uses the standard em485 start and > > > > > stop helpers. > > > > > > > > Would it prevent to use native RS485 support? > > > > > > 8250_dw doesn't have a native RS485 support, do you mean using hardware > > > RTS assertion? Anyway at the moment it's not present. This would be the > > > first rs485 support added to 8250_dw. > > > > DW v4.0+ has it. > > I have access to datasheet of DW v3, and I don't have access to hardware > with DW v4.0v Uart. > But I could add rs485emu for only UART version < 4.0 and I can find Uart > version by reading UCV register, would it be acceptable? I don't think we need to disable the possibility to have emulation even on v4+ IP since PCB can be designed that way. My point here, that whatever code you add it should not prevent to use HW supported RS485, although I haven't heard about support of it in the upstream (yet?). And for the record, Synopsys hadn't added any bit into CPR to recognize that feature, so only version check can be done in this case... -- With Best Regards, Andy Shevchenko