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 79633C4332F for ; Tue, 13 Dec 2022 16:42:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35875854C0; Tue, 13 Dec 2022 17:42:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="imsY4Kpe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 43B15854B7; Tue, 13 Dec 2022 17:42:11 +0100 (CET) Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) (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 A7A6C8542E for ; Tue, 13 Dec 2022 17:42:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vk1-xa32.google.com with SMTP id r3so1809314vkq.13 for ; Tue, 13 Dec 2022 08:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dEehVsrBjqgfP2m/9tQNs0O9shvec3JHqL3yuVJqlNk=; b=imsY4Kpeqy/NLtOUxa6ft14aeamx6ROV0dh8abY6mnh8j3hBlZvcSE4vPYF2gPTZSl yyhbPdxQ7vcT/wGQdzXE8Gq1XAOKEDmp5uOSevgZrbjW1EaGupBRyJPLaB94IKZCZmBF mAaC+q0cK2aXQ98jrL1MSN6dKSlGmKVVqMeGs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dEehVsrBjqgfP2m/9tQNs0O9shvec3JHqL3yuVJqlNk=; b=Kh3K6GjuyBYsPKEuchP0uKyttDd+Ox1Nft2TAsvH+XfE/ExWmjyPDjXiSDbkQYxRP4 6v0jYc4Xoq5l92SlvK7GlY7lhkGIT5qKQ7VlavAA/BM3XEZ3IsCBZKsOTTDLDw7dHU7m vgWtsqVhga000+OJyO2xxQg/RRBvGW+boMBzJ83jADk/HUCwXBTiBbg2VoQ5y6fk9hji T28y/vg4MI+fOdfaa7N6UmbMnYKv5d9AwM/sDY45k7YObtHk+5BzoW9hd1lrcJ7Dq16O 94/acRFuQjL4vNeF7usKuEYthjqP4Rf3GPTGH+G2eL5BHotfE/Zq/HEPp6VdbwJCz3Pv uCcg== X-Gm-Message-State: ANoB5pm0KLJd2YqwiXlnIrlXYOjFBcrr2v7dDCfiwC5JHRT4wD/htzMp ceXb5wMbt3j/wz/5xInkE0G8/A== X-Google-Smtp-Source: AA0mqf6kUCLGq7KtYhEhm4cnKAPLgDV7Rivo+XR8hb3riDxSh9+KPa4q3SkSr09XZkZH1rTuVsCoyQ== X-Received: by 2002:a1f:bd06:0:b0:3c1:1734:4d0d with SMTP id n6-20020a1fbd06000000b003c117344d0dmr1429146vkf.7.1670949727353; Tue, 13 Dec 2022 08:42:07 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-09de-b540-f7da-b28e.res6.spectrum.com. [2603:6081:7b00:6400:9de:b540:f7da:b28e]) by smtp.gmail.com with ESMTPSA id t11-20020a05620a450b00b006eea4b5abcesm8308675qkp.89.2022.12.13.08.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 08:42:06 -0800 (PST) Date: Tue, 13 Dec 2022 11:42:05 -0500 From: Tom Rini To: Neha Malcom Francis Cc: u-boot@lists.denx.de, nm@ti.com, matwey.kornilov@gmail.com, robertcnelson@gmail.com, vigneshr@ti.com Subject: Re: [PATCH v2] board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte Message-ID: <20221213164205.GD3787616@bill-the-cat> References: <20221213062734.10930-1-n-francis@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JvGu3uuCxW+prT44" Content-Disposition: inline In-Reply-To: <20221213062734.10930-1-n-francis@ti.com> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --JvGu3uuCxW+prT44 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 13, 2022 at 11:57:34AM +0530, Neha Malcom Francis wrote: > EEPROM detection logic in ti_i2c_eeprom_get() involves figuring out > whether addressing is 1-byte or 2-byte. There are currently different > behaviours seen across boards as documented in commit bf6376642fe8 > ("board: ti: common: board_detect: Fix EEPROM read quirk"). Adding to > the list, we see that there are 2-byte EEPROMs that read properly > with 1-byte addressing with no offset. >=20 > For ti_i2c_eeprom_am6_get where eeprom parse operation is dynamic, the > earlier commit d2ab2a2bafd5 ("board: ti: common: board_detect: Fix > EEPROM read quirk for AM6 style data") tried to resolve this by running > ti_i2c_eeprom_get() twice. However this commit along with its former > commit fails on J7 platforms where EEPROM successfully return back the > header on 1-byte addressing and continues to do so until an offset is > introduced. So the second read incorrectly determines the EEPROM as > 1-byte addressing. >=20 > A more generic solution is introduced here to solve > this issue: 1-byte read without offset and 1-byte read with offset. If > both passes, it follows 1-byte addressing else we proceed with 2-byte > addressing check. >=20 > Tested on J721E, J7200, DRA7xx, AM64x >=20 > Signed-off-by: Neha Malcom Francis > Fixes: d2ab2a2bafd5 (board: ti: common: board_detect: Fix EEPROM read qui= rk for AM6 style data) > Fixes: bf6376642fe8 (board: ti: common: board_detect: Fix EEPROM read qui= rk) There's not a great choice here between take this now for v2023.01 (when lots of people are going to be busy and not catch a new possible corner case) or put this in -next and have it be in v2023.04 (as places might pick v2023.01 to base on for a while). But, I'm leaning towards putting this in -next since it should be easy to cherry-pick this as needed. --=20 Tom --JvGu3uuCxW+prT44 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOYq1wACgkQFHw5/5Y0 tyxTwQwAkHLcMQ2Aj5QxOLGF64Mgv88wHwlV8l3shzPH38c6JVr96x9qLBUSuSEL O7vzhV66RiIwI2GyR+2I6jJw/5syCQJo0O6pTv4lI3QMXySXa8GtuEe12BSE40z/ TPtyymrMUWVw7pjA7mu3bva/ELmYlY2dkq4xQ9vOcKB/2wWFurazd7nwd4Xu6Hhj 1irSH8/12AveOuCg6j5qmtBOMCR8jCKrCYlW/GrBsOnqUhQHL0kOu4p9LG8BX1Wz ZBJdETWGBnDA10UIU+/SYoATfDs9S9f2+qfSHbvkwigXRYFNt+djQ9zmTxQCJ8oS wkRj7hkfHkLc8khIya0cWbNpYUeqqbINsaq2zMgCMM5shgk62C2yKCe4QUDa2dcO c3eFyFyENf1uTXo4wnACBBCV0uRjQxfvOyQkde6iUZ4Mbkk5z7FcjZVUJ3Jom3Qr cb99qKXlXjBAaRcEVlqlBLoRWF7rQBsu/3NdLNEPpbUuhhg12Ey7Hi8HBuAHtiIK 5PjWIs0+ =Ftt4 -----END PGP SIGNATURE----- --JvGu3uuCxW+prT44--