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 E35A0C10F1B for ; Wed, 21 Dec 2022 13:54:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A07308547D; Wed, 21 Dec 2022 14:54:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=mistralsolutions.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=mistralsolutions.com header.i=@mistralsolutions.com header.b="MPS/U7cR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5216585450; Wed, 21 Dec 2022 14:53:46 +0100 (CET) Received: from egress-ip33b.ess.de.barracuda.com (egress-ip33b.ess.de.barracuda.com [18.185.115.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C15668543B for ; Wed, 21 Dec 2022 14:53:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=mistralsolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sinthu.raja@mistralsolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx-outbound19-55.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Dec 2022 13:53:37 +0000 Received: by mail-pl1-f199.google.com with SMTP id u6-20020a170903124600b00188cd4769bcso11284907plh.0 for ; Wed, 21 Dec 2022 05:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mistralsolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UbAI2BSJfjihD9IoXhvSp0cbi1JcMqhFDd8/eYCQdkc=; b=MPS/U7cRShwcTW56miZK7Hx0WkSnWkqhJEpX97gh3IKPJJnDNR/yLeCUVTIkaF3Zi/ xpYn1WhuwGsT7b5unnIaqW2GFAYwMmwzV8xb4yM7ttwJw1756RJoqvTCAbVBJjNK7nsv L0RUtzJ8RKkbrRjb0Xjmhp48zc77IOt7qDUaA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UbAI2BSJfjihD9IoXhvSp0cbi1JcMqhFDd8/eYCQdkc=; b=0NuoVZJqFqCeDXUiuJ2bGqB0309ljE8Goqr4ESYAIvk8GOucyVl3fnIxOjbZaJGsqX hLOkDMzCpPyAcPY2s3orgo+Hgk7MXCMbsAw3WMMddtLtBdAlJWGOhzpyuf/93yeAQUu0 i29s4DCmzkb6RJvOFqKXXfy/1IPLgK6rEiGYfHSabvyc4mU/yhQCoPrl8XVs49F/V1bL 48VY8wKJSyrWep7kwm+nhGuOPaUzqSDhO0az2kHUoSpCClh9QTI8LEV5DIJD891YLK5k 5wORBHYmHqmdMVaJ9KnI5R1DAJSNIEzuIliFV/i6tCdArbs4elucd55sQUa6MXo9FVOi zahA== X-Gm-Message-State: AFqh2kqNJWzcQZPdO0/sTkclrHLYEdnCYO9jMVwAn8kJ7w34vy98Zo1b 2Q9d/J7eMJvKT9Qc/mqg1DgmSMnldF1EEBtl0Devse+skxixmHkQzG+cWM6otIZNCp+ctcVcAUY h9yX8NOKWk6EaXdExFeOZq27h5DL0WGssWq9kAcnilyLx+b8fRg== X-Received: by 2002:a17:902:7291:b0:189:6b31:dc50 with SMTP id d17-20020a170902729100b001896b31dc50mr1639507pll.31.1671630816689; Wed, 21 Dec 2022 05:53:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXvQxl2aYCTkilMLvekgAroRqiXr+3gJQLbWWnQylQzjkK8m0rl01FKPLzbRmhsifweHMyyrcQ== X-Received: by 2002:a17:902:7291:b0:189:6b31:dc50 with SMTP id d17-20020a170902729100b001896b31dc50mr1639493pll.31.1671630816372; Wed, 21 Dec 2022 05:53:36 -0800 (PST) Received: from LAP568U.mistral.in ([106.51.227.150]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b00189f2fdc178sm11474891plc.177.2022.12.21.05.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 05:53:35 -0800 (PST) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: u-boot@lists.denx.de, Tom Rini , Marcel Ziswiler , Marek Vasut , Vignesh Raghavendra Cc: Sinthu Raja Subject: [PATCH V2 05/12] board: ti: j721s2: Enable support for reading EEPROM at next alternate address Date: Wed, 21 Dec 2022 19:22:12 +0530 Message-Id: <20221221135219.24702-6-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221221135219.24702-1-sinthu.raja@ti.com> References: <20221221135219.24702-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1671630808-304919-5383-11870-2 X-BESS-VER: 2019.1_20221214.2106 X-BESS-Apparent-Source-IP: 209.85.214.199 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.244945 [from cloudscan10-74.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, BSF_SC0_MISMATCH_TO X-BESS-BRTS-Status: 1 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 From: Sinthu Raja J721S2 EVM has EEPROM populated at 0x50. AM68 SK has EEPROM populated at next address 0x51 in order to be compatible with RPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51. Signed-off-by: Sinthu Raja --- board/ti/j721s2/evm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c index de885085b3..88470e4d71 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -113,9 +113,15 @@ int do_board_detect(void) ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS, CONFIG_EEPROM_CHIP_ADDRESS); - if (ret) - pr_err("Reading on-board EEPROM at 0x%02x failed %d\n", - CONFIG_EEPROM_CHIP_ADDRESS, ret); + if (ret) { + printf("EEPROM not available at 0x%02x, trying to read at 0x%02x\n", + CONFIG_EEPROM_CHIP_ADDRESS, CONFIG_EEPROM_CHIP_ADDRESS + 1); + ret = ti_i2c_eeprom_am6_get_base(CONFIG_EEPROM_BUS_ADDRESS, + CONFIG_EEPROM_CHIP_ADDRESS + 1); + if (ret) + pr_err("Reading on-board EEPROM at 0x%02x failed %d\n", + CONFIG_EEPROM_CHIP_ADDRESS + 1, ret); + } return ret; } -- 2.36.1