From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8C347C433EF for ; Fri, 17 Jun 2022 10:49:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B3B688431E; Fri, 17 Jun 2022 12:48:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=semihalf.com header.i=@semihalf.com header.b="neBceN5y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 323D78440C; Fri, 17 Jun 2022 12:48:00 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3B4A4843D4 for ; Fri, 17 Jun 2022 12:47:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pan@semihalf.com Received: by mail-lf1-x133.google.com with SMTP id t25so6333778lfg.7 for ; Fri, 17 Jun 2022 03:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dabF5BEOiEFKUgRAOhf6bmuoFEWh/2PfWKkd6AIZa+g=; b=neBceN5yQdn7UNcEgcmz5j1/Zh3+GAl5U/MvRyoAZYjI/WnkxZZK3jkhSnsjan1dom iLe5vua21x3XhedsvHcGQyZxz2bDYvkXM2YF52AwdOzinfXrRVHC5keQXQcpLQHcdHGC VaR5Gd1shpNm6hkueiRWSvwj6ElUCG9N/hYPg1zSrmwofLm9zL9L9wSw02yFBDWqWYuF ox6voVXDrWSW7gjuSrW4uaVRdyxHYD4rTNcAo70tN7WqDn4x4P67ylFUkQxKT6fY9STh M++3EtjcWQYde27owJYlLGIMoB0+7eTCDL3VscWoUNIDoJWJdgPxJsEJU56sRL4iv1uw W2gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dabF5BEOiEFKUgRAOhf6bmuoFEWh/2PfWKkd6AIZa+g=; b=kCidMEsZ5UT3JtBJLaHhz/NYBKvyIEBvQcxjgubokCI3yla5xEhSrDykXI992I6yrE twYe7Vd0P4xepsCfxJeFTq77hLrBIrnpSIKVh3tE5uqOb2iAo/n2SeMzHC0/bNs+8Pez +/STTLYHWErYS5SJkgjbo+YWTTeBw84aEvF0m7l5gMWeW0iFsM7CYW1ExYBgCLkKEJeE Moq8sOJOffvRDK30Z1UvtUmp182CPcAFHQ6tg5DBM35Xk986fbMj+/TJRQyX5yDTtpAl si4SL9kaH+Se5dG+w4eNSbqV6b+0xd2w0dTVU47qarH9LrM8YvGfQW65LqEXfdf/7S2y HcnQ== X-Gm-Message-State: AJIora9+I6dbbNg6I6mXvlSQ9vurDP08TqsJc5W552t+S0SnkUsMxpCS c2letBER9vHVQ445CPiGdqzuRQ== X-Google-Smtp-Source: AGRyM1sCedJNKXYceZneoY45cC6/X/0B4LC49BJjTZ0TI6tfqMbEBWWgiMQ2L7xqeW/cgabMDvtl1g== X-Received: by 2002:a05:6512:6c6:b0:47d:b651:daeb with SMTP id u6-20020a05651206c600b0047db651daebmr5104704lff.360.1655462872398; Fri, 17 Jun 2022 03:47:52 -0700 (PDT) Received: from panikiel.roam.corp.google.com (staticline-31-182-204-250.toya.net.pl. [31.182.204.250]) by smtp.gmail.com with ESMTPSA id a17-20020ac25e71000000b00479342519e5sm592379lfr.210.2022.06.17.03.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 03:47:51 -0700 (PDT) From: =?UTF-8?q?Pawe=C5=82=20Anikiel?= To: marex@denx.de, simon.k.r.goldschmidt@gmail.com, tien.fong.chee@intel.com, michal.simek@xilinx.com Cc: u-boot@lists.denx.de, sjg@chromium.org, festevam@denx.de, jagan@amarulasolutions.com, andre.przywara@arm.com, narmstrong@baylibre.com, pbrobinson@gmail.com, tharvey@gateworks.com, paul.liu@linaro.org, christianshewitt@gmail.com, adrian.fiergolski@fastree3d.com, marek.behun@nic.cz, wd@denx.de, elly.siew.chin.lim@intel.com, upstream@semihalf.com, amstan@chromium.org, =?UTF-8?q?Pawe=C5=82=20Anikiel?= Subject: [PATCH v3 06/11] misc: atsha204a: Increase wake delay by tWHI Date: Fri, 17 Jun 2022 12:47:21 +0200 Message-Id: <20220617104726.158688-7-pan@semihalf.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220617104726.158688-1-pan@semihalf.com> References: <20220617104726.158688-1-pan@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean >From the ATSHA204A datasheet (document DS40002025A): Wake: If SDA is held low for a period greater than tWLO, the device exits low-power mode and, after a delay of tWHI, is ready to receive I2C commands. tWHI value can be found in table 7-2. Signed-off-by: Paweł Anikiel Reviewed-by: Simon Glass --- drivers/misc/atsha204a-i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index aa6acf0f9a..81ecb5b617 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -21,7 +21,8 @@ #include #include -#define ATSHA204A_TWLO 60 +#define ATSHA204A_TWLO_US 60 +#define ATSHA204A_TWHI_US 2500 #define ATSHA204A_TRANSACTION_TIMEOUT 100000 #define ATSHA204A_TRANSACTION_RETRY 5 #define ATSHA204A_EXECTIME 5000 @@ -109,7 +110,7 @@ int atsha204a_wakeup(struct udevice *dev) continue; } - udelay(ATSHA204A_TWLO); + udelay(ATSHA204A_TWLO_US + ATSHA204A_TWHI_US); res = atsha204a_recv_resp(dev, &resp); if (res) { -- 2.36.1.476.g0c4daa206d-goog