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 CD08AFA3742 for ; Thu, 27 Oct 2022 11:15:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2CE90850CA; Thu, 27 Oct 2022 13:14:24 +0200 (CEST) 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="fDGN+g9G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE0DB850B4; Thu, 27 Oct 2022 12:49:17 +0200 (CEST) Received: from egress-ip4a.ess.de.barracuda.com (egress-ip4a.ess.de.barracuda.com [18.184.203.227]) (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 3BACF850B7 for ; Thu, 27 Oct 2022 12:49:15 +0200 (CEST) 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-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx-outbound42-114.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 27 Oct 2022 10:49:14 +0000 Received: by mail-pg1-f198.google.com with SMTP id 7-20020a630007000000b0045bb8a49ae6so570000pga.9 for ; Thu, 27 Oct 2022 03:49:14 -0700 (PDT) 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=7ogGIxhAAtN9ypfQhnMZqz2jiA+vKciB2dRDCm9urJE=; b=fDGN+g9GDR/B+q1TuIc90JK0ooIOrL64zC90vkr2UaQBtPzwgiZH4hwdeU3lGjr9Rq 5i5MrSl4B6GHAQCVZ19UgudIyUw83qnoth8i/whqJfEAVy/rId86YqbaI0EYiJFDwF4z IaQTvrzszU1LHuISszPxvRYstj2WiB5FzFO8M= 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=7ogGIxhAAtN9ypfQhnMZqz2jiA+vKciB2dRDCm9urJE=; b=4bFIqFmX5l3GKIyEWenJpGIQUK14WmX/FTcK/Jkj8qScgxwsRi8PImxzPG1g+Esiva xGernWm/OFmf+BA2EB2bYoFNtn9uwrVkXLim8+5iAO5CwhX0yIp+N8kaKAVfJh35DQV2 x2g8XTxC2StWdYMQFhrlYcaLCuctGrRr0R0loEUAAn71cD3kcInO/Xq/RKwVvspnRIpS Mm2Xdl/28gG1bF8oH6A2L0pDfqH4xouq6NrybBiUIt4cL0ZZDFdzpn5clZLcnMzgY4/L OL+3rIWzqhcctkojEkgsajiU7ZSv5MPp5hyviDJKTkiJ+XC2/fpqEmxatMy+6VMwWy4l nQLA== X-Gm-Message-State: ACrzQf3soZDo68keMOLW5rDmzkL+4XErz2fYK7+e6m+CjXRWrfichJt6 hmK50XQJdiIxs4dQhZ9wjr+S1WezG3JZFhelPkRfyLwgOqeGDtt6/q81MM2Kw0wQLHgSk9OahYr WBqVEB6orLMPEqRt8+gb5LJm0EpAKl1u5EH8ZkM7V+UOG1Ia/6w== X-Received: by 2002:a17:903:447:b0:186:b945:c0b2 with SMTP id iw7-20020a170903044700b00186b945c0b2mr16183515plb.25.1666867752131; Thu, 27 Oct 2022 03:49:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HmmGvFRNA3AbT+8KWfz/by+hUHnu92mggY4nUlMCkhMzxo1O1nWUK+fdeWQlLMnep97Q3dg== X-Received: by 2002:a17:903:447:b0:186:b945:c0b2 with SMTP id iw7-20020a170903044700b00186b945c0b2mr16183485plb.25.1666867751837; Thu, 27 Oct 2022 03:49:11 -0700 (PDT) Received: from LAP568U.mistral.in ([106.51.69.35]) by smtp.gmail.com with ESMTPSA id 20-20020a630e54000000b0045ccc30e469sm815370pgo.25.2022.10.27.03.49.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 03:49:11 -0700 (PDT) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: u-boot@lists.denx.de, Simon Glass , Marcel Ziswiler , Marek Vasut , Vignesh Raghavendra Cc: Sinthu Raja Subject: [PATCH 05/11] board: ti: j721s2: Enable support for reading EEPROM at next alternate address Date: Thu, 27 Oct 2022 16:18:40 +0530 Message-Id: <20221027104846.11820-6-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221027104846.11820-1-sinthu.raja@ti.com> References: <20221027104846.11820-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1666867753-310866-5377-5982-1 X-BESS-VER: 2019.1_20221024.2147 X-BESS-Apparent-Source-IP: 209.85.215.198 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.243747 [from cloudscan10-212.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-Mailman-Approved-At: Thu, 27 Oct 2022 13:13:53 +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.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 e3c75b35b6..8ada924e3f 100644 --- a/board/ti/j721s2/evm.c +++ b/board/ti/j721s2/evm.c @@ -109,9 +109,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