Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8A63C49EA5 for ; Sat, 26 Jun 2021 15:06:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 594A061C3A for ; Sat, 26 Jun 2021 15:06:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 594A061C3A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=mistralsolutions.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7F07682C4F; Sat, 26 Jun 2021 17:05: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="VaaI/d+e"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C25BD82C30; Sat, 26 Jun 2021 16:59:22 +0200 (CEST) Received: from egress-ip33a.ess.de.barracuda.com (egress-ip33a.ess.de.barracuda.com [18.185.115.192]) (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 16F0A82C29 for ; Sat, 26 Jun 2021 16:59:20 +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-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx-outbound47-108.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 26 Jun 2021 14:59:19 +0000 Received: by mail-pf1-f200.google.com with SMTP id k2-20020a056a001342b029030577f46001so7427886pfu.6 for ; Sat, 26 Jun 2021 07:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mistralsolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pLmnXCK+5Y0ERVnt/PBIEyxXtPRGyQCV01bT/ZyOb7k=; b=VaaI/d+eBvHdZcYXl//0hefH/QRjwTy6qWjxHuuT3LAGk3Yl8uzewL7RlynXfJUT3h nLMkNlrc7wu8M7m7zoRyck1XFKP6F407ltT3hbVDBW1pHpC1TjOTyyxwEjg1W/RDZtV7 tXNgJ9Y393RtC/8wZMOaPwhXuIiEndlkGJpZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pLmnXCK+5Y0ERVnt/PBIEyxXtPRGyQCV01bT/ZyOb7k=; b=mB/Mwq72L9IpV10I9dzgbfyhM4R7HXtbIKe2GIGtxPrUFaqvK1wsXrc7K48+EMClr6 OozJjysWVBA4vxHKNgd9ZuFTO+p8Ozf00Dcg9h+Eqgb8mK7o+lbHfL0pkilbcBHyXSAH VXE5O8LzdM1RkRABdLuV1OfvD7uMx+xaUtKXuIivZ7WVr9rf5jKfMlcLQ4Hh7NQN/hxG 1N9VoPu9rglAvXoL+qx12O7cv/DmZKOBCKjB5P1AD+PhXHBcVZt40UUDeQiTS+Pg0XqS 2GtMY5i36BkWbpBRuDBwSQGXyn5e1YRKzPsgijM1ed7EN2qiRTM2sOfftBJxrC1z2pe2 1HhA== X-Gm-Message-State: AOAM531EINChvpokCjnXI6Jq6ACVwFXkPmHl6hHhzxtsk1B4XUSZRajv WHb2KZ2TKl8hegEY7cXQnEZqxA5OZDNUbunb0Zm9RNZgi/AzMxqU3vbdywwYsvRTIGBJCrL7AbN aAH4RLNEOcY7LYT9EvLKMdqJN6x6fPzYonjcB9Lap/dCbFfVMPg== X-Received: by 2002:a17:902:8e88:b029:11e:b703:83f1 with SMTP id bg8-20020a1709028e88b029011eb70383f1mr13853597plb.79.1624719557662; Sat, 26 Jun 2021 07:59:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzA/HNovsLJYxSR+TQGaIVYwx2rZ8/KEcL7EROnjg1pSY/B5jE75p7YrD7LEndzMcNqZs3R2g== X-Received: by 2002:a17:902:8e88:b029:11e:b703:83f1 with SMTP id bg8-20020a1709028e88b029011eb70383f1mr13853578plb.79.1624719557429; Sat, 26 Jun 2021 07:59:17 -0700 (PDT) Received: from localhost.localdomain ([49.207.221.44]) by smtp.gmail.com with ESMTPSA id g18sm8769245pfi.199.2021.06.26.07.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Jun 2021 07:59:17 -0700 (PDT) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: u-boot@lists.denx.de Cc: Praneeth Bajjuri , Vutla Lokesh , Amarnath MB , Sinthu Raja Subject: [PATCH 05/17] board: ti: j721e: Enable support for reading EEPROM at next alternate address Date: Sat, 26 Jun 2021 20:25:50 +0530 Message-Id: <20210626145602.15702-6-sinthu.raja@ti.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210626145602.15702-1-sinthu.raja@ti.com> References: <20210626145602.15702-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1624719558-312140-3419-28680-1 X-BESS-VER: 2019.1_20210623.1648 X-BESS-Apparent-Source-IP: 209.85.210.200 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.233199 [from cloudscan22-52.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-Mailman-Approved-At: Sat, 26 Jun 2021 17:05:02 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Amarnath MB J721E EVM has EEPROM populated at 0x50. J721E EAIK has EEPROM populated at next address 0x51 in order to be compatible with RBPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51. Signed-off-by: Amarnath MB Signed-off-by: Sinthu Raja --- board/ti/j721e/evm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index 23e739bcd3..b618325627 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -150,9 +150,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.31.1