Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3223459rwd; Mon, 29 May 2023 07:24:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5OxJYwbhrErk57jjnRoqn7cGcA6tBb1T4Isrlp1r6LZ6obMxf5Fe+TkLLUAC/ye86vIryx X-Received: by 2002:a17:90b:30cb:b0:247:8029:fb30 with SMTP id hi11-20020a17090b30cb00b002478029fb30mr10539111pjb.42.1685370250422; Mon, 29 May 2023 07:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685370250; cv=none; d=google.com; s=arc-20160816; b=0OFOmrdAWCKufAZ7TWs+FBzhBfX38krQWEp6tUU8SW5+SUAJTS0Jz9BMbUQhR0XdZv 6vHEEvtjkvEXXe45I/RgzTw6DhW++g5Bm6V0PvZ+jsJ7Ald/EJ5CiaIHpqCC4Sfmo2Lb dZ6zwVd+qvVYjSRuGf3N261/3F68WM7zaX3zdt9k+AqHdSKK80lXu8vhHBRdrEiJdj1b QAWAg6VmePt+z+d9yj8S36y3HnsNwGziEMc8DQt/rGWBvM42UFPe/SHGMO82tkefV/sF 7BvVMCIsK+/jWtsPOaan0zywqITx3B3o5T1OEX8ES93YDCKOYifC9l+BtOvtFNUjw+mH s3Vg== 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:date:cc:to:from:dkim-signature; bh=j06j0xxAnTBWbm+RR07Ahwjb4COk2ZLwxArCeTG3Zrw=; b=G5lHH/Bt32/3jsHW1EDboh2r6HqOiKObaTJwJS236+fGCPBih5vWsXkoxoCRcsUOgE tppyEuDpcQ6Bt4Xqh4+vhaq2JOo2SPtKhm+Oi53vQ6yFgT3ks3hcH4KmbqICSEYz7oex 4IjorI1E0CQICTftYPwykftiCEKRdhArVBj4P2+VkmXz3S8f70m89QZadizZ/Y3WPvV5 suUoRf0M/kdHgGzVsJs3v9bq9NaDCMEcWnk/Ls7KcPw4l5RH3Xmrtvtm1DA5oqBKMX++ 8JXERQiLjDSV7tCD/2db9A0WdxZ7cbf4oUtzRdAhG/rVIFivYg+kSbur8q0/LFDpk4OC hAog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b="FK/zyz5j"; 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 pc16-20020a17090b3b9000b0025023111538si7642954pjb.36.2023.05.29.07.23.56; Mon, 29 May 2023 07:24:10 -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="FK/zyz5j"; 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 S230304AbjE2OHm (ORCPT + 99 others); Mon, 29 May 2023 10:07:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230273AbjE2OHe (ORCPT ); Mon, 29 May 2023 10:07:34 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C20A8; 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:MIME-Version:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: 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=j06j0xxAnTBWbm+RR07Ahwjb4COk2ZLwxArCeTG3Zrw=; b=FK/zyz5jag1Oy1osJK5trnHLQv 131njOxu9Pw+MPoeXBq0qYCpBW3PXRcd9e3Z7NCv0VsWNC9MrLGzudi2cHD7qRONDOyFDp2Lgahi+ rP0ZOWekuepnjJtBIoqi+RyJczMdAHsE+EFprDPI1j0coDhQuM3JjfusJ/6WK/kzo8vI=; 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 ) id 1q3dWq-0004Ht-Gu; Mon, 29 May 2023 10:07:21 -0400 From: Hugo Villeneuve 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 Date: Mon, 29 May 2023 10:07:04 -0400 Message-Id: <20230529140711.896830-3-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230529140711.896830-1-hugo@hugovil.com> References: <20230529140711.896830-1-hugo@hugovil.com> MIME-Version: 1.0 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 2/9] serial: sc16is7xx: add post reset delay 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 From: Hugo Villeneuve Make sure we wait at least 3us before initiating communication with the device after reset. Signed-off-by: Hugo Villeneuve --- drivers/tty/serial/sc16is7xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index fbaadec557d8..24c9336f6ab2 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1428,6 +1428,12 @@ static int sc16is7xx_probe(struct device *dev, regmap_write(s->regmap, SC16IS7XX_IOCONTROL_REG << SC16IS7XX_REG_SHIFT, SC16IS7XX_IOCONTROL_SRESET_BIT); + /* + * After reset, the host must wait at least 3us before initializing a + * communication with the device. + */ + usleep_range(5, 10); + for (i = 0; i < devtype->nr_uart; ++i) { s->p[i].line = i; /* Initialize port data */ -- 2.30.2