Message ID | 20230529140711.896830-1-hugo@hugovil.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1555374vqr; Mon, 29 May 2023 07:28:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4No+ISOaPMVurSu3k6hHbFf84q4QpJP5nGOcF04ZAJ6K/62ycFszj/SkTF/IS/itIV4JRQ X-Received: by 2002:a17:90a:4987:b0:23f:962e:825d with SMTP id d7-20020a17090a498700b0023f962e825dmr8852071pjh.1.1685370487353; Mon, 29 May 2023 07:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685370487; cv=none; d=google.com; s=arc-20160816; b=rHC6TWIrobTCBedZsXS5M34CagHuHZ5Er/c3xr9liG7a8SOLzxSXFAfqq0I6dKTQSx 1G+55UpRyA8uC8mRfYSjT27b6/g3lfPtAmWWna+yLy9KAxdr7nBdSqEbqUmGCmhWuw0k jRZp+X0ZsJPOMxB8j3HHVa4wVgZU22DhgtbLxG/FhrU/hH62XTeVmsdJGHqDSowugNsr 8hLDf2VlTljQgnXLOYqm7jYCEaH86hH5CigSkyIkkAq/fDmdM51RrKOYUdZ3g9j94uEz S0FYXejJLYXaYNedrx3yQNTRVfWcOSbpGRUgC6xuSI6kYaohUDjY34Oubt9M3NWFS2xC mRNQ== 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 :message-id:date:cc:to:from:dkim-signature; bh=9wWqWVCVdQlNVYDWbbFgx/wemja1yAb3HdOOiloUC8c=; b=Z3JalsTmfR6bqKqsmZYtEKvN9FSD33p3cCJtVOfA5q3lxHM23f6HOYA58Z+VXGXjeO xEXk0FBaukMXrNCvercvLmhNVjQJjQoVe7/SvbAp2Xh+PaU7jnv7LLAwiAGdA8P5yTIU kV/RBXRaNT/Gkw/IbVasGLA6aFpwkSU0ZbDBDn9gwDmPP1/BRnyxm/KmIkSGff7OfkSk vCXwfQiHP30l1coJMPofqxEk2Gj5Rrvf0UXDPZkZRpitqFZg88ue20abMKdIBpz6YPFG X7i13h0Q/2mm3jJaIW/56UadKbS1X5x+BT32TC9dhWRd0kWK+XhCOFBTpIXQMgMD3BDa 6Yuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=TQFv4hFn; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a17090a190600b00250bf29b6d6si3441087pjg.165.2023.05.29.07.27.53; Mon, 29 May 2023 07:28:07 -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=TQFv4hFn; 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 S230300AbjE2OHk (ORCPT <rfc822;zhuangel570@gmail.com> + 99 others); Mon, 29 May 2023 10:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbjE2OHd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 29 May 2023 10:07:33 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C118B9C; Mon, 29 May 2023 07:07:31 -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: Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9wWqWVCVdQlNVYDWbbFgx/wemja1yAb3HdOOiloUC8c=; b=TQFv4hFnTpX5mFX43uNk66S5c1 DCfFhG93xOfmYD1y3ZgbJlYT6EzzMwWmazXpQ+Awp37PRU+T0BXex47AralXR3nASODH12k3hloHa Br4tAQbxH3w/LQXbEUK00k6eR9x+lpdlwCfA5AVCsnPbiXX0GhH9JQdU86JSTE7ij9nw=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:50024 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from <hugo@hugovil.com>) id 1q3dWm-0004Ht-QC; Mon, 29 May 2023 10:07:18 -0400 From: Hugo Villeneuve <hugo@hugovil.com> To: 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 Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com, linux-gpio@vger.kernel.org, Hugo Villeneuve <hvilleneuve@dimonoff.com> Date: Mon, 29 May 2023 10:07:02 -0400 Message-Id: <20230529140711.896830-1-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 70.80.174.168 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: [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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767239044583279837?= X-GMAIL-MSGID: =?utf-8?q?1767239044583279837?= |
Series |
serial: sc16is7xx: fix GPIO regression and rs485 improvements
|
|
Message
Hugo Villeneuve
May 29, 2023, 2:07 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Hello,
this patch series mainly fixes a GPIO regression and improve RS485 flags and
properties detection from DT.
It now also includes various small fixes and improvements that were previously
sent as separate patches, but that made testing everything difficult.
Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values.
Patch 2 introduces a delay after a reset operation to respect datasheet
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 GPIO function
for GPIO pins shared with modem status lines.
Patch 8 allows to read common rs485 device-tree flags and properties.
Patch 9 improves comments about chip variants.
I have tested the changes on a custom board with two SC16IS752 DUART 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 debugging 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 control 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
Comments
Mon, May 29, 2023 at 10:07:02AM -0400, Hugo Villeneuve kirjoitti: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > Hello, > this patch series mainly fixes a GPIO regression and improve RS485 flags and > properties detection from DT. > > It now also includes various small fixes and improvements that were previously > sent as separate patches, but that made testing everything difficult. > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > Patch 2 introduces a delay after a reset operation to respect datasheet > timing recommandations. These two patches are w/o Fixes tag, they should be moved in the series further as I explained before. > 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 GPIO function > for GPIO pins shared with modem status lines. > > Patch 8 allows to read common rs485 device-tree flags and properties. > > Patch 9 improves comments about chip variants. > > I have tested the changes on a custom board with two SC16IS752 DUART using a > Variscite IMX8MN NANO SOM.
Mon, May 29, 2023 at 10:07:02AM -0400, Hugo Villeneuve kirjoitti: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > Hello, > this patch series mainly fixes a GPIO regression and improve RS485 flags and > properties detection from DT. > > It now also includes various small fixes and improvements that were previously > sent as separate patches, but that made testing everything difficult. > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > Patch 2 introduces a delay after a reset operation to respect datasheet > 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 GPIO function > for GPIO pins shared with modem status lines. > > Patch 8 allows to read common rs485 device-tree flags and properties. > > Patch 9 improves comments about chip variants. > > I have tested the changes on a custom board with two SC16IS752 DUART using a > Variscite IMX8MN NANO SOM. In general looks good to me, just some minor things and patch ordering issues. Thank you for doing this!
On Tue, 30 May 2023 01:31:28 +0300 andy.shevchenko@gmail.com wrote: > Mon, May 29, 2023 at 10:07:02AM -0400, Hugo Villeneuve kirjoitti: > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > Hello, > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > properties detection from DT. > > > > It now also includes various small fixes and improvements that were previously > > sent as separate patches, but that made testing everything difficult. > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > timing recommandations. > > These two patches are w/o Fixes tag, they should be moved in the series further > as I explained before. Your explanation was not clear. Anyway, I moved them in position 7 and 8. > > 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 GPIO function > > for GPIO pins shared with modem status lines. > > > > Patch 8 allows to read common rs485 device-tree flags and properties. > > > > Patch 9 improves comments about chip variants. > > > > I have tested the changes on a custom board with two SC16IS752 DUART using a > > Variscite IMX8MN NANO SOM. > > -- > With Best Regards, > Andy Shevchenko
W dniu 29.05.2023 o 16:07, Hugo Villeneuve pisze: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > Hello, > this patch series mainly fixes a GPIO regression and improve RS485 flags and > properties detection from DT. > > It now also includes various small fixes and improvements that were previously > sent as separate patches, but that made testing everything difficult. > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > Patch 2 introduces a delay after a reset operation to respect datasheet > 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 GPIO function > for GPIO pins shared with modem status lines. > > Patch 8 allows to read common rs485 device-tree flags and properties. > > Patch 9 improves comments about chip variants. > > I have tested the changes on a custom board with two SC16IS752 DUART using a > Variscite IMX8MN NANO SOM. > > Thank you. > > Link: [v1] https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967> > [v1] https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777> > [v1] https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780> > [v1] https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785> > [v1] https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311> > [v2] https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516> > [v3] https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7> > > Changes for V3: > - Integrated all patches into single serie to facilitate debugging 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 control 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 <lech.perczak@camlingroup.com> And where applicable - for code patches: Tested-by: Lech Perczak <lech.perczak@camlingroup.com> I tested whole series at the same time. I did my tests on an i.MX6 board with SC16IS760 over SPI, which differs a tiny bit from SC16IS752, and everything works as it should. Thank you for fixing this! > -- > 2.30.2 >
Mon, May 29, 2023 at 10:07:08PM -0400, Hugo Villeneuve kirjoitti: > On Tue, 30 May 2023 01:31:28 +0300 > andy.shevchenko@gmail.com wrote: > > Mon, May 29, 2023 at 10:07:02AM -0400, Hugo Villeneuve kirjoitti: > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > Hello, > > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > > properties detection from DT. > > > > > > It now also includes various small fixes and improvements that were previously > > > sent as separate patches, but that made testing everything difficult. > > > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > > timing recommandations. > > > > These two patches are w/o Fixes tag, they should be moved in the series further > > as I explained before. > > Your explanation was not clear. Sorry if it feels like this. The documentation should have more clarity on the matter. > Anyway, I moved them in position 7 and 8. Thank you, but take also what Greg KH replied to you into consideration. He is the maintainer and seems other patches needs some additional work in the scope of Fixes / backport (see stable kernel patches flow in the kernel documentation, which I also mentioned earlier).
On Tue, 30 May 2023 11:30:07 +0200 Lech Perczak <lech.perczak@camlingroup.com> wrote: > W dniu 29.05.2023 o 16:07, Hugo Villeneuve pisze: > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > Hello, > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > properties detection from DT. > > > > It now also includes various small fixes and improvements that were previously > > sent as separate patches, but that made testing everything difficult. > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > 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 GPIO function > > for GPIO pins shared with modem status lines. > > > > Patch 8 allows to read common rs485 device-tree flags and properties. > > > > Patch 9 improves comments about chip variants. > > > > I have tested the changes on a custom board with two SC16IS752 DUART using a > > Variscite IMX8MN NANO SOM. > > > > Thank you. > > > > Link: [v1] https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967> > > [v1] https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777> > > [v1] https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780> > > [v1] https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785> > > [v1] https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311> > > [v2] https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516> > > [v3] https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7> > > > > Changes for V3: > > - Integrated all patches into single serie to facilitate debugging 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 control 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 <lech.perczak@camlingroup.com> > > And where applicable - for code patches: > Tested-by: Lech Perczak <lech.perczak@camlingroup.com> > > I tested whole series at the same time. > I did my tests on an i.MX6 board with SC16IS760 over SPI, which differs 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.
On Tue, 30 May 2023 14:15:39 +0300 andy.shevchenko@gmail.com wrote: > Mon, May 29, 2023 at 10:07:08PM -0400, Hugo Villeneuve kirjoitti: > > On Tue, 30 May 2023 01:31:28 +0300 > > andy.shevchenko@gmail.com wrote: > > > Mon, May 29, 2023 at 10:07:02AM -0400, Hugo Villeneuve kirjoitti: > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > Hello, > > > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > > > properties detection from DT. > > > > > > > > It now also includes various small fixes and improvements that were previously > > > > sent as separate patches, but that made testing everything difficult. > > > > > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > > > timing recommandations. > > > > > > These two patches are w/o Fixes tag, they should be moved in the series further > > > as I explained before. > > > > Your explanation was not clear. > > Sorry if it feels like this. The documentation should have more clarity > on the matter. > > > Anyway, I moved them in position 7 and 8. > > Thank you, but take also what Greg KH replied to you into consideration. > He is the maintainer and seems other patches needs some additional work > in the scope of Fixes / backport (see stable kernel patches flow in the > kernel documentation, which I also mentioned earlier). Hi, will do. Thank you,. Hugo.
W dniu 30.05.2023 o 15:08, Hugo Villeneuve pisze: > On Tue, 30 May 2023 11:30:07 +0200 > Lech Perczak <lech.perczak@camlingroup.com> wrote: > > > W dniu 29.05.2023 o 16:07, Hugo Villeneuve pisze: > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > Hello, > > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > > properties detection from DT. > > > > > > It now also includes various small fixes and improvements that were previously > > > sent as separate patches, but that made testing everything difficult. > > > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > > 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 GPIO function > > > for GPIO pins shared with modem status lines. > > > > > > Patch 8 allows to read common rs485 device-tree flags and properties. > > > > > > Patch 9 improves comments about chip variants. > > > > > > I have tested the changes on a custom board with two SC16IS752 DUART using a > > > Variscite IMX8MN NANO SOM. > > > > > > Thank you. > > > > > > Link: [v1] https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967> <https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967>> > > > [v1] https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777> <https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777>> > > > [v1] https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780> <https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780>> > > > [v1] https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785> <https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785>> > > > [v1] https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311> <https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311>> > > > [v2] https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516> <https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516>> > > > [v3] https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7> <https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7>> > > > > > > Changes for V3: > > > - Integrated all patches into single serie to facilitate debugging 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 control 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 <lech.perczak@camlingroup.com> > > > > And where applicable - for code patches: > > Tested-by: Lech Perczak <lech.perczak@camlingroup.com> > > > > I tested whole series at the same time. > > I did my tests on an i.MX6 board with SC16IS760 over SPI, which differs 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. Hello Hugo, Just checked - this patch is required, reverting it causes things to fail, so this patch should be marked as a pre-requisite for the actual fix and included in backports. Perhaps using direct write to this register made it work, but it was likely by accident.
On Wed, 31 May 2023 12:43:48 +0200 Lech Perczak <lech.perczak@camlingroup.com> wrote: > W dniu 30.05.2023 o 15:08, Hugo Villeneuve pisze: > > On Tue, 30 May 2023 11:30:07 +0200 > > Lech Perczak <lech.perczak@camlingroup.com> wrote: > > > > > W dniu 29.05.2023 o 16:07, Hugo Villeneuve pisze: > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > Hello, > > > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > > > properties detection from DT. > > > > > > > > It now also includes various small fixes and improvements that were previously > > > > sent as separate patches, but that made testing everything difficult. > > > > > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > > > 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 GPIO function > > > > for GPIO pins shared with modem status lines. > > > > > > > > Patch 8 allows to read common rs485 device-tree flags and properties. > > > > > > > > Patch 9 improves comments about chip variants. > > > > > > > > I have tested the changes on a custom board with two SC16IS752 DUART using a > > > > Variscite IMX8MN NANO SOM. > > > > > > > > Thank you. > > > > > > > > Link: [v1] https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967> <https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967>> > > > > [v1] https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777> <https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777>> > > > > [v1] https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780> <https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780>> > > > > [v1] https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785> <https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785>> > > > > [v1] https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311> <https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311>> > > > > [v2] https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516> <https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516>> > > > > [v3] https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7> <https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7>> > > > > > > > > Changes for V3: > > > > - Integrated all patches into single serie to facilitate debugging 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 control 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 <lech.perczak@camlingroup.com> > > > > > > And where applicable - for code patches: > > > Tested-by: Lech Perczak <lech.perczak@camlingroup.com> > > > > > > I tested whole series at the same time. > > > I did my tests on an i.MX6 board with SC16IS760 over SPI, which differs 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. > > Hello Hugo, > > Just checked - this patch is required, reverting it causes things to fail, so this patch should be marked as a pre-requisite for the actual fix and included in backports. > Perhaps using direct write to this register made it work, but it was likely by accident. Hi Lech, thank you for the test, I will mark it as such in upcoming series V5. Hugo.
On Wed, 31 May 2023 09:56:08 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Wed, 31 May 2023 12:43:48 +0200 > Lech Perczak <lech.perczak@camlingroup.com> wrote: > > > W dniu 30.05.2023 o 15:08, Hugo Villeneuve pisze: > > > On Tue, 30 May 2023 11:30:07 +0200 > > > Lech Perczak <lech.perczak@camlingroup.com> wrote: > > > > > > > W dniu 29.05.2023 o 16:07, Hugo Villeneuve pisze: > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > Hello, > > > > > this patch series mainly fixes a GPIO regression and improve RS485 flags and > > > > > properties detection from DT. > > > > > > > > > > It now also includes various small fixes and improvements that were previously > > > > > sent as separate patches, but that made testing everything difficult. > > > > > > > > > > Patch 1 fixes an issue when debugging IOcontrol register. After testing 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 register values. > > > > > > > > > > Patch 2 introduces a delay after a reset operation to respect datasheet > > > > > 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 GPIO function > > > > > for GPIO pins shared with modem status lines. > > > > > > > > > > Patch 8 allows to read common rs485 device-tree flags and properties. > > > > > > > > > > Patch 9 improves comments about chip variants. > > > > > > > > > > I have tested the changes on a custom board with two SC16IS752 DUART using a > > > > > Variscite IMX8MN NANO SOM. > > > > > > > > > > Thank you. > > > > > > > > > > Link: [v1] https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967> <https://lkml.org/lkml/2023/5/17/967 <https://lkml.org/lkml/2023/5/17/967>> > > > > > [v1] https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777> <https://lkml.org/lkml/2023/5/17/777 <https://lkml.org/lkml/2023/5/17/777>> > > > > > [v1] https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780> <https://lkml.org/lkml/2023/5/17/780 <https://lkml.org/lkml/2023/5/17/780>> > > > > > [v1] https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785> <https://lkml.org/lkml/2023/5/17/785 <https://lkml.org/lkml/2023/5/17/785>> > > > > > [v1] https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311> <https://lkml.org/lkml/2023/5/17/1311 <https://lkml.org/lkml/2023/5/17/1311>> > > > > > [v2] https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516> <https://lkml.org/lkml/2023/5/18/516 <https://lkml.org/lkml/2023/5/18/516>> > > > > > [v3] https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7> <https://lkml.org/lkml/2023/5/25/7 <https://lkml.org/lkml/2023/5/25/7>> > > > > > > > > > > Changes for V3: > > > > > - Integrated all patches into single serie to facilitate debugging 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 control 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 <lech.perczak@camlingroup.com> > > > > > > > > And where applicable - for code patches: > > > > Tested-by: Lech Perczak <lech.perczak@camlingroup.com> > > > > > > > > I tested whole series at the same time. > > > > I did my tests on an i.MX6 board with SC16IS760 over SPI, which differs 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. > > > > Hello Hugo, > > > > Just checked - this patch is required, reverting it causes things to fail, so this patch should be marked as a pre-requisite for the actual fix and included in backports. > > Perhaps using direct write to this register made it work, but it was likely by accident. > > Hi Lech, > thank you for the test, I will mark it as such in upcoming series V5. > > Hugo. Since I reworked a bit patch 5/9 in series 5, I removed your "Tested-by" and "Reviewed-by" tags only for this patch. Please reconfirm these tags when you have tested series 5. Thank you, Hugo.