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 2FEC8C433FE for ; Thu, 26 May 2022 14:40:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7CD398437A; Thu, 26 May 2022 16:39:28 +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="Mg7M9psE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E927A84397; Thu, 26 May 2022 16:38:59 +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 E6FA78437C for ; Thu, 26 May 2022 16:38:53 +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-lf1-x133.google.com with SMTP id y32so2699020lfa.6 for ; Thu, 26 May 2022 07:38:53 -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=Y7oqfCM1SXwJqt+iJG/T/a1OBtN7wMCq54+b1dkKxdU=; b=Mg7M9psEfXCDcZzbjGd06gOtcYOn7VS6pm8+kEAPcUOSAW0ldFTmvmfjjdGi6AKTmj UA6t7ky/pjpL+RSw3BOAl102mzqq4Xt82SbeBSYQeIFzYSe5tMKiEx9kWABE3LT8GNXc cB8inwedSmJ1pv+wIyZQUKe1KpDyQDV7TfH5OD+5s+scWbSFfCt9wLaq2Ym6S+BlpVak H4TxpNlo4o02hdslSiwRJwQPjSf4/SQxL0yJfZfmm93gldco49SN3sN3QSNY2myQXyoM 4OxU73Tzg78AJ/Autjh968CSRrXuDaJEB9iy4oXTeUJQHQub6K2w35+NNLx2U6UbJTSR 2N1w== 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=Y7oqfCM1SXwJqt+iJG/T/a1OBtN7wMCq54+b1dkKxdU=; b=ZZPIs2PX0Pz1MGbnHBFtKAR2IPc9VJAFCdD6jTsVGVg+Ke29UaeGJHfkILtZQkxGze Vd/WZCR2vh+8MsIQQ7w6qjKrnD5ra3sF/bimkuMjvQU+5EhkhGPMirZ78rYLK6VZAlA9 Z9SIHd/bwhU3/72+PiPWDeYjPtQOh0x9iff+n22zWclsH5s2JjGjFk8vmgkDROeE9wy6 681Q3QJtIe+xJjoWmhP53NmYI90WN40u7BiuNY/Cf93mlxCSGkurpMiMF3e8KaT+CKRm wcet8gH/FOzPNR8BDRDIwrP+N7OXF5S+ryLrqjfd2sWTkwV36A/qgn1CB9PmkkV7OF87 VwJQ== X-Gm-Message-State: AOAM530rp9vRuNYM9X9cTWLjsfYvfcEY+F8hg26gzn54EbDM2NsCpAhO 3vL3E9vfVcqQEPOc9zrv3SWgLQ== X-Google-Smtp-Source: ABdhPJyVQJZpH7kHkMWl/tQw3I/IlmSl2iXnDoufAn138vzgxlqAnrT1ManCpopZzCcZSGVzfntsfQ== X-Received: by 2002:a05:6512:32c5:b0:473:cc6d:9eaf with SMTP id f5-20020a05651232c500b00473cc6d9eafmr27344405lfg.90.1653575878102; Thu, 26 May 2022 07:37:58 -0700 (PDT) Received: from panikiel.wifi.semihalf.net ([83.142.187.84]) by smtp.gmail.com with ESMTPSA id s28-20020a05651c049c00b0024f3d1daea2sm464194ljc.42.2022.05.26.07.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 07:37:57 -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 v2 06/11] misc: atsha204a: Increase wake delay by tWHI Date: Thu, 26 May 2022 16:37:10 +0200 Message-Id: <20220526143715.277342-7-pan@semihalf.com> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog In-Reply-To: <20220526143715.277342-1-pan@semihalf.com> References: <20220526143715.277342-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 --- 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.124.g0e6072fb45-goog