From patchwork Tue Nov 2 14:05:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinthu Raja X-Patchwork-Id: 1549747 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mistralsolutions.com header.i=@mistralsolutions.com header.a=rsa-sha256 header.s=google header.b=b+sbR/fV; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HkBvW0gx7z9sS8 for ; Wed, 3 Nov 2021 01:23:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2BAA835EA; Tue, 2 Nov 2021 15:22:18 +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="b+sbR/fV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1BBA782D88; Tue, 2 Nov 2021 15:10:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from egress-ip4b.ess.de.barracuda.com (egress-ip4b.ess.de.barracuda.com [18.185.115.208]) (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 6251382E67 for ; Tue, 2 Nov 2021 15:10:28 +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-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx-outbound16-237.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 02 Nov 2021 14:10:26 +0000 Received: by mail-pg1-f200.google.com with SMTP id w5-20020a654105000000b002692534afceso11955248pgp.8 for ; Tue, 02 Nov 2021 07:10:27 -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=zsVYBWDtmtSN56X5wP3rXTgQmDDzyxOekPnrkojeFRg=; b=b+sbR/fVvVG1KqC9pV4sK7lZWwpTmObQknwzWQ3DJ/HJ/6CBxSsIcvBl2x2qcVaYkI G8FRtXha5S6bZkxozx+EQUa0QQvCJEjBIHVTV+aDdnXYaaOsLxArLC8CescHVxbRNWF1 eJfkpqWXfEFTYcBCJKpeVLJA+EvsOxwa6oBqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zsVYBWDtmtSN56X5wP3rXTgQmDDzyxOekPnrkojeFRg=; b=M0f47zVWF2hXYfXeltfhcieAsCqUv0sjisVrdjqq3w0zS3ZlQJhkqvAyzGomAMXQlu ij56U5yFBeG3v304wOzLE307UoNu4Qb3ZuCscFWSzaQRAz1JnJWgQcSPvmSrJLCtkfZ8 ZnWZWKBAkkqR4EA1zEDxzpWqOPXGgUb82Aqz27D2a6hiSlzSgm3oCl08geUSvXNcmt4Q IFvamzY4FG2zzob7YgMWl89+2+o1ffPFpk1TUBCECauP3Es9ZFcrSOXGDjD8+U02Zjr7 sLTuO0Hr1S9BjSGSoN9NXtZC5QBgBnH2ki/qqYdFcXPmQLXE8IA4358E9niFF5A75c0v 9tRg== X-Gm-Message-State: AOAM532V3ge/ZPMUUJWqF3D6pGVF6bS3cIMIoxpb3BblFNA3LCIP1z+D Hhde0PgTxL23uJUZDrEKdRUj0tKjuiGCfMunsHu7/kksKRHrurat2UAjZx/fy1JPrHtQ4XepAFA ahs3mNJn82MpeFsIav05ozri2w52udnyi0Tq38PP8noGRELuAbQ== X-Received: by 2002:a05:6a00:168c:b0:44c:dc5a:7ee0 with SMTP id k12-20020a056a00168c00b0044cdc5a7ee0mr37276143pfc.40.1635862225580; Tue, 02 Nov 2021 07:10:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHnw35x2wAJCx/orNR5r/L0Byusrg0J33ym/iWrnn/uEJwG0W06TOEVvaUPoZw/m+fAmU35Q== X-Received: by 2002:a05:6a00:168c:b0:44c:dc5a:7ee0 with SMTP id k12-20020a056a00168c00b0044cdc5a7ee0mr37276107pfc.40.1635862225311; Tue, 02 Nov 2021 07:10:25 -0700 (PDT) Received: from LAP568U.mistral.in ([106.51.227.150]) by smtp.gmail.com with ESMTPSA id z22sm17985689pfa.214.2021.11.02.07.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 07:10:24 -0700 (PDT) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: u-boot@lists.denx.de Cc: Praneeth Bajjuri , Sinthu Raja Subject: [PATCH V2 05/17] board: ti: j721e: Enable support for reading EEPROM at next alternate address Date: Tue, 2 Nov 2021 19:35:46 +0530 Message-Id: <20211102140558.32460-6-sinthu.raja@ti.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211102140558.32460-1-sinthu.raja@ti.com> References: <20211102140558.32460-1-sinthu.raja@ti.com> MIME-Version: 1.0 X-BESS-ID: 1635862226-304333-5392-12519-1 X-BESS-VER: 2019.1_20211101.1855 X-BESS-Apparent-Source-IP: 209.85.215.200 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.235584 [from cloudscan12-202.eu-central-1a.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: Tue, 02 Nov 2021 15:22:01 +0100 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: Sinthu Raja J721E EVM has EEPROM populated at 0x50. J721E SK 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: Sinthu Raja --- No changes in V2. 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 9cdb963221..989e15e666 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -152,9 +152,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; }