Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp991837rwd; Wed, 31 May 2023 08:06:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Kikb+UOqVQQlNC9Cf5VnJTsRqJuk4yAQEHYnTGMW2DPFO4aNugl+G+6Ysl2qFHp2V/rVh X-Received: by 2002:a05:6a20:7d89:b0:10e:5c1f:660f with SMTP id v9-20020a056a207d8900b0010e5c1f660fmr6116966pzj.35.1685545584461; Wed, 31 May 2023 08:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685545584; cv=none; d=google.com; s=arc-20160816; b=E7hueh0Zs4KTHL116PKJz/moEUxlyHRo+AMaltFaz+IBmz8oj+2JboIlzxk3E953GM qUmp7qphPvL9og6X77226qCwK5pX5NRuLSrTnxkpodqhBWmzSBYOuxksSlIA5lJHGWLR otO4zaTctEkXhxuvDmAHcYejWPkHKihJVpOk6aDtIuhvR+neEnvQ3rjEWoDgEmzYoLU7 jM8Okz9tN91yrt3kHCR6zYVZPcaPU159oV+811zo6NWKFMYR2n0bjj0XdCXNUo03T0qf esQbHDdKEFc4GmSMEobg6iBkauqwicGJoL4RXthY3ePPb7f7+3FJBN2u3hRCCTI8zcQg 0KBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=t8QJwDf3mZID2T9DPgkl1+dJxRUwSZ5+A++Qcf/Rniw=; b=RcRteiwtF5oH7OD+mnVpKRqmInDik2S39NerWq1lmxS6gxPjOQan9iRpkIXkSun6AM D0rte1usm5RzZaxu5riQ4C6hKKpqWcLK8v1NMYSp8XLdnE8J92qU95zS4vwjasY7wq9U MWzsZe3c7ApdJI2nPl5Q6B5Dlgw1GHwKsNqbcxVELKg0Z5lncSSIfwyskoXzXqCnviDf 3adAd2AI51hq2nwgYfu6QxJNK7q9/pyGjQNybka3vFu6ENOh7YfTrw8EwDxT/U85yJKd v7AwLdA8C3YTq5G++pwGD9fWGorvuucdDvaR/+QUrJOT9o4f48Cjdr/DMlAZGPVYMyaz Dong== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=xX61yxXx; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t72-20020a63784b000000b0053f41380baesi1125873pgc.322.2023.05.31.08.06.10; Wed, 31 May 2023 08:06:24 -0700 (PDT) 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=fail header.i=@hugovil.com header.s=x header.b=xX61yxXx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233471AbjEaPAQ (ORCPT + 99 others); Wed, 31 May 2023 11:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233365AbjEaPAP (ORCPT ); Wed, 31 May 2023 11:00:15 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74341C0; Wed, 31 May 2023 08:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Content-Type:Mime-Version: References:In-Reply-To:Message-Id:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=t8QJwDf3mZID2T9DPgkl1+dJxRUwSZ5+A++Qcf/Rniw=; b=xX61yxXxpOjNlrMJw13F5RNmue 8irpmpzggpyfC9GePxX8T4/eRJUYTw80VsHb7r51qBMFINBS8cr24ZVuWpNYhAcDFZKuu2PqXETVy Iy4oWFmbZq/1uvAnc4kn9gMrXsIS758jUs0XvnNpZXwWWh1PpzBLtsFNV8S0JR0dRKwQ=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:34748 helo=debian-acer) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q4NIy-0001AW-O7; Wed, 31 May 2023 11:00:05 -0400 Date: Wed, 31 May 2023 11:00:03 -0400 From: Hugo Villeneuve To: Hugo Villeneuve Cc: Lech Perczak , gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, l.perczak@camlintechnologies.com, tomasz.mon@camlingroup.com, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Hugo Villeneuve Message-Id: <20230531110003.86b96815986db3bef7b72635@hugovil.com> In-Reply-To: <20230531095608.e1b4358549562b8e1bdf5cb4@hugovil.com> References: <20230529140711.896830-1-hugo@hugovil.com> <20230530090836.27b8d080d6b6c022b303ac9e@hugovil.com> <20230531095608.e1b4358549562b8e1bdf5cb4@hugovil.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH v4 0/9] serial: sc16is7xx: fix GPIO regression and rs485 improvements X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 31 May 2023 09:56:08 -0400 Hugo Villeneuve wrote: > On Wed, 31 May 2023 12:43:48 +0200 > Lech Perczak wrote: >=20 > > W dniu 30.05.2023 o=A015:08, Hugo Villeneuve pisze: > > > On Tue, 30 May 2023 11:30:07 +0200 > > > Lech Perczak wrote: > > > > > > > W dniu 29.05.2023 o=A016:07, Hugo Villeneuve pisze: > > > > > From: Hugo Villeneuve > > > > > > > > > > Hello, > > > > > this patch series mainly fixes a GPIO regression and improve RS48= 5 flags and > > > > > properties detection from DT. > > > > > > > > > > It now also includes various small fixes and improvements that we= re previously > > > > > sent as separate patches, but that made testing everything diffic= ult. > > > > > > > > > > Patch 1 fixes an issue when debugging IOcontrol register. After t= esting the GPIO > > > > > regression patches (patches 6 and 7, tests done by Lech Perczak),= it appers that > > > > > this patch is also necessary for having the correct IOcontrol reg= ister values. > > > > > > > > > > Patch 2 introduces a delay after a reset operation to respect dat= asheet > > > > > timing recommandations. > > > > > > > > > > Patch 3 fixes an issue with init of first port during probing. > > > > > > > > > > Patch 4 fixes a bug with the output value when first setting the = GPIO direction. > > > > > > > > > > Patch 5 is a refactor of GPIO registration code. > > > > > > > > > > Patches 6 and 7 fix a GPIO regression by (re)allowing to choose G= PIO function > > > > > for GPIO pins shared with modem status lines. > > > > > > > > > > Patch 8 allows to read common rs485 device-tree flags and propert= ies. > > > > > > > > > > Patch 9 improves comments about chip variants. > > > > > > > > > > I have tested the changes on a custom board with two SC16IS752 DU= ART using a > > > > > Variscite IMX8MN NANO SOM. > > > > > > > > > > Thank you. > > > > > > > > > > Link: [v1] https://lkml.org/lkml/2023/5/17/967 > > > > > > [v1] https://lkml.org/lkml/2023/5/17/777 > > > > > > [v1] https://lkml.org/lkml/2023/5/17/780 > > > > > > [v1] https://lkml.org/lkml/2023/5/17/785 > > > > > > [v1] https://lkml.org/lkml/2023/5/17/1311 > > > > > > [v2] https://lkml.org/lkml/2023/5/18/516 > > > > > > [v3] https://lkml.org/lkml/2023/5/25/7 > > > > > > > > > > > Changes for V3: > > > > > - Integrated all patches into single serie to facilitate debuggin= g and tests. > > > > > - Reduce number of exported GPIOs depending on new property > > > > > nxp,modem-control-line-ports > > > > > - Added additional example in DT bindings > > > > > > > > > > Changes for V4: > > > > > - Increase reset post delay to relax scheduler. > > > > > - Put comments patches at the end. > > > > > - Remove Fixes tag for patch "mark IOCONTROL register as volatile= ". > > > > > - Improve commit messages after reviews. > > > > > - Fix coding style issues after reviews. > > > > > - Change GPIO registration to always register the maximum number = of GPIOs > > > > > supported by the chip, but maks-out GPIOs declared as modem contr= ol lines. > > > > > - Add patch to refactor GPIO registration. > > > > > - Remove patch "serial: sc16is7xx: fix syntax error in comments". > > > > > - Remove patch "add dump registers function" > > > > > > > > > > Hugo Villeneuve (9): > > > > > serial: sc16is7xx: mark IOCONTROL register as volatile > > > > > serial: sc16is7xx: add post reset delay > > > > > serial: sc16is7xx: fix broken port 0 uart init > > > > > serial: sc16is7xx: fix bug when first setting GPIO direction > > > > > serial: sc16is7xx: refactor GPIO controller registration > > > > > dt-bindings: sc16is7xx: Add property to change GPIO function > > > > > serial: sc16is7xx: fix regression with GPIO configuration > > > > > serial: sc16is7xx: add call to get rs485 DT flags and properties > > > > > serial: sc16is7xx: improve comments about variants > > > > > > > > > > .../bindings/serial/nxp,sc16is7xx.txt | 46 ++++++ > > > > > drivers/tty/serial/sc16is7xx.c | 150 +++++++++++++----- > > > > > 2 files changed, 156 insertions(+), 40 deletions(-) > > > > > > > > > > > > > > > base-commit: 8b817fded42d8fe3a0eb47b1149d907851a3c942 > > > > > > > > It would be a lot of sending, to do that for every patch separately= , so for whole series: > > > > Reviewed-by: Lech Perczak > > > > > > > > And where applicable - for code patches: > > > > Tested-by: Lech Perczak > > > > > > > > I tested whole series at the same time. > > > > I did my tests on an i.MX6 board with SC16IS760 over SPI, which dif= fers a tiny bit from SC16IS752, > > > > and everything works as it should. > > > > Thank you for fixing this! > > > > > > Hi Lech, > > > thank for your feedback. > > > > > > You mentioned before that without the patch "mark IOCONTROL register = as volatile", things were not working properly for you. Could you retest by= removing this patch and see if things are still working? > > > > > > Thank you, Hugo. > >=20 > > Hello Hugo, > >=20 > > Just checked - this patch is required, reverting it causes things to fa= il, so this patch should be marked as a pre-requisite for the actual fix an= d included in backports. > > Perhaps using direct write to this register made it work, but it was li= kely by accident. >=20 > Hi Lech, > thank you for the test, I will mark it as such in upcoming series V5. >=20 > Hugo. Since I reworked a bit patch 5/9 in series 5, I removed your "Tested-by" an= d "Reviewed-by" tags only for this patch. Please reconfirm these tags when = you have tested series 5. Thank you, Hugo. --=20 Hugo Villeneuve