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 7EB5CC3DA7D for ; Tue, 3 Jan 2023 15:44:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 37A0885598; Tue, 3 Jan 2023 16:43:02 +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="W3Kjx8SP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D70084CBD; Tue, 3 Jan 2023 16:42:58 +0100 (CET) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 65582852CE for ; Tue, 3 Jan 2023 16:42:55 +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-qt1-x829.google.com with SMTP id z12so24798200qtv.5 for ; Tue, 03 Jan 2023 07:42:55 -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=qVw0E+FOLPL3QPn5WJmVktnN5GqZca38Q+vaIq6bYyA=; b=W3Kjx8SPM16L5ogDNL2UxEBOHe2tNXt1P1ibvXHR89QWJWtHCHiWFj4AL9ybumIWal 0/w/yENbtW71oIFsLAFAcywrlx8Zhc+VwMMkACru4WeZSuaPNafNZ1HhMf/eFADDMc7L wHKhrFlssJ77fzuR8/EXie6PB5GVAytpfvdKs= 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=qVw0E+FOLPL3QPn5WJmVktnN5GqZca38Q+vaIq6bYyA=; b=EMl6/amj5NMMI8b8v2wZ0ScFaMT7n7ZrR9hYodLuTeZ2d9ZduMYijcIyFdk+xXt8kT IStEUeJzk4hmhbmIq6Rxcv/o+KeQS4c92mUVDbCIe+Id/NORKWHinPCG4AwPYNYVysAo 63T2WcISvFsAQiyfJoyePOux5mMDgiDdYWLodgZBcx7Ah/ngshTCw5antEWBN7MJOto7 LJws5+78Vc+Z0OChNksvue5JkDCV2yqfqQ4YNe6eoc/o4x3IluAmajcaPhUHn2kysyhv yHG2z1+eDXZbZeCeIQbhw6S9iJqkH8cPRDzETokSZLLs68w8H4P4wDLfFXZsRYnp2tCC 88gQ== X-Gm-Message-State: AFqh2krBWaT+VS8fwIIFZ+2n4TOcXEY5+Eaq8bz1GNPuHtWvhdQM/C23 lpNQ0JCOpHdqHYtjpad1hMKpUfK/zyw3t04vp/c= X-Google-Smtp-Source: AMrXdXsOkKu9zk3MaZ1cnD4DBVMqeBQBGCYLglA+qyfBWF3bK4NknVwwooy1g683a4xv3UIQu16Cng== X-Received: by 2002:ac8:75c8:0:b0:3a9:75b9:4b7b with SMTP id z8-20020ac875c8000000b003a975b94b7bmr68002024qtq.39.1672760574165; Tue, 03 Jan 2023 07:42:54 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-f40a-aab8-e211-5b44.res6.spectrum.com. [2603:6081:7b00:6400:f40a:aab8:e211:5b44]) by smtp.gmail.com with ESMTPSA id b6-20020ac86786000000b003a50b9f099esm18806781qtp.12.2023.01.03.07.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 07:42:53 -0800 (PST) Date: Tue, 3 Jan 2023 10:42:51 -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: <20230103154251.GF3787616@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="OGwAHNKGvqLEm33m" 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 --OGwAHNKGvqLEm33m 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) > Tested-By: Matwey V. Kornilov Applied to u-boot/next, thanks! --=20 Tom --OGwAHNKGvqLEm33m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmO0TPsACgkQFHw5/5Y0 tyxHQAv+L1wJvnJFGK2Mbm3UsU3B1PHTy9AbqwDybhlLq5EHhv5K6kfy6Iyp2mPD EZ1xm42omCIGqcMZTosPnLawXmvPnhAp+Tc0GFtgKNEEO4Hq9ryxc6sL3H6XdkD8 gtYGi4UVtiUtZKuJpztNjiJUxW0FQ7n4N3wLUH1D9ytd8u4kqe3PG5XsZI1ZhU7o DcsYsQYZXcK3TClUgtYOsYqxUM1Xt0xllDonCkgmsrAxBOcHKueVw/5495Vuxbg5 8tWYNwope1Itpn5ka0fbsKYddVr32MqFxf/Q2NgghET4MUrh9aM048AvVArn0tJm QoGHb+bq3qyojJCM5o+1dqdAwQ6FwEGbXs4Kb/r7f3tGiwn83Izdwsuxi98Eb3Rv qKh1Ut/QUTF/PUL4UmtVUhTSRlc/pRgwVzujQWcH209uJJUiIo1P7HZnyv4KZqDv 0C45KlidY0MeF43ZdkVP4bB/Stu/IEV1En0H4yMEespKgCZj0u7Y3wpwEliQS5Ja IGdG6RYB =QYOE -----END PGP SIGNATURE----- --OGwAHNKGvqLEm33m--