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 24849C433EF for ; Fri, 1 Apr 2022 13:43:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4D8BB842CD; Fri, 1 Apr 2022 15:42:29 +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.20210112.gappssmtp.com header.i=@semihalf-com.20210112.gappssmtp.com header.b="t4vqM6PW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CEB04842B1; Fri, 1 Apr 2022 14:44:26 +0200 (CEST) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 D83BB842BD for ; Fri, 1 Apr 2022 14:44:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=semihalf.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=pan@semihalf.com Received: by mail-wr1-x42a.google.com with SMTP id u3so4111378wrg.3 for ; Fri, 01 Apr 2022 05:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RLvSeyZGaMmXaX3ntvOBc7JCzC1kUswg/bfPNfkIrh4=; b=t4vqM6PWbKG6h0fUZFqc5PccCplkTl0b9C8NTjkzQqzMruFz4dAF9/Ytkq5k3gV4zB /l79XLUsflGvZbn2YsFHhXO5GjTm0HR5KqK6Bvi3KsS6jndjgwROb3YhI4knfK9N2rlg H4EX+hAf3q4O8FJVayzrxKFRkSq4RMzIC3fy5VKa8u9LXUt9SGnzIu35IXD8p5SmTpSy PAzAXkCZIA55elu3a9OFEAS4Hala69Ua85XQVcsV446+GpsTeys5L2d5wgdX2GecIgwO rK4W3CFL7Kse8my/bO2MYrVmPrrnogl4NIw8VidxthIK+E/InBmyv7ltXDFukCE0Hlbh X/oQ== 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=RLvSeyZGaMmXaX3ntvOBc7JCzC1kUswg/bfPNfkIrh4=; b=PpmQMJS9FiAU7LTuyCrIfHesIyLVn9lJHS3dbldHB476Jh72vUxN7I1LUVVmP8y623 td+kxid3gJC0lArjHICRZK1M/P8zrTLzJvMuFNFDDDaaBqcyCMFIWCiX/WfFKDHbD2Zb pLvqQ0/e9cfaGMLW83F/4lfKjI2+U8yaWCTrHRWQlqRG+MbgUQ66dFjsxVjUe+TBvz3N r28OP89IBvnBxYHWtCsxJ/ObrqjiqLYnkBcM1hEKNh1kZqbPoRi69g/KK1IYh/vqbpJI ctQgIm5GZdKGoOkbNvNIDB/kg3WWVrH17hfhQLaxyk1/nRUIYJK6Wm3u8/2uodUsKWEw tP1Q== X-Gm-Message-State: AOAM5322Qm/ycGEG1r8aTPtgIFUudTOV6DFA/wltOImFde2xwdyv7lwW i0pjTL8/3Q1xqrKdwfFl/IOAQw== X-Google-Smtp-Source: ABdhPJyj7bFIqFNPcsV6IAzCzHpqLAxYR0c/TUlEDDJimUlvz1oSwkXvPEg2ofkmaCq/v11NzdwC3A== X-Received: by 2002:adf:a498:0:b0:205:8ffc:3c8f with SMTP id g24-20020adfa498000000b002058ffc3c8fmr7870421wrb.134.1648817050439; Fri, 01 Apr 2022 05:44:10 -0700 (PDT) Received: from localhost.localdomain ([85.191.191.191]) by smtp.gmail.com with ESMTPSA id o10-20020a5d47ca000000b00203fb25165esm2478175wrc.6.2022.04.01.05.44.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 05:44:10 -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, mw@semihalf.com, =?UTF-8?q?Pawe=C5=82=20Anikiel?= Subject: [PATCH 06/11] misc: atsha204a: Increase wake delay by tWHI Date: Fri, 1 Apr 2022 14:43:20 +0200 Message-Id: <20220401124325.1810108-7-pan@semihalf.com> X-Mailer: git-send-email 2.35.1.1094.g7c7d902a7c-goog In-Reply-To: <20220401124325.1810108-1-pan@semihalf.com> References: <20220401124325.1810108-1-pan@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 01 Apr 2022 15:42:19 +0200 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 --- 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 b89463babb..ba2ae3d85a 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -20,7 +20,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 @@ -225,7 +226,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.35.1.1094.g7c7d902a7c-goog