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 2B403C433F5 for ; Wed, 9 Feb 2022 09:38:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 87FE883E4C; Wed, 9 Feb 2022 10:37:57 +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="SnN5/ouI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D9BD583DAA; Wed, 9 Feb 2022 10:37:34 +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 8AF5183DDE for ; Wed, 9 Feb 2022 10:37:25 +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-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx-outbound17-217.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 09 Feb 2022 09:37:22 +0000 Received: by mail-pl1-f197.google.com with SMTP id z3-20020a170903408300b0014d891103aaso1433461plc.0 for ; Wed, 09 Feb 2022 01:37:22 -0800 (PST) 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=o2T7ev6ohpYoHHYfiTTIBYQqsPZvRwIay06oQFHiL6Y=; b=SnN5/ouIVlO7caV6unCuWVJccBEixZClUZAbwTL+x/SxRoghz0Gr1ptXrMuIVkHJ8o cqzlwJLmnZ+5OpjWOXW1Quiw8YN7/4zynIdLrBnBx9S8iMJ7EGMLG9T8XBIquokWDO3A 6VXiumTpTdQ3Tg5sWNF3lEb4HeGNW8tqX7pfg= 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=o2T7ev6ohpYoHHYfiTTIBYQqsPZvRwIay06oQFHiL6Y=; b=AjktWW0HlAHO6V/Ga0KI7eTdyuA7uBrQHRUCPG/z/WmNS3i7MPMoUQ/0bw1UE10HiJ 1nihjN0uO4utVdths7PDW3gFh+HuoOPwFyXWxkEkfqQ4SYE9Kag9uQ5xjEecFctNqT10 LgwBXOZgBowlO/kG2SY1UDq4aJI/G4eovw1AAZw5aSyuIw9kfYMiODZlaTBeLwIMf4q+ VlLwofOaOoH6iuf9fE4d3Y5foDjJ9B8HL3ae/Rn7l4gKJIFocs97bvr2vXX8OkLpt30U 3xz9vn0v7q0P8iwGXrRlrwPfs6+/ym0vQhd7ZFrEJF4BP7mcxwlshzo4bcet7uv3DlXw zIkg== X-Gm-Message-State: AOAM533B5wKq48Mjx7bWyy7YBvwUZIP1qEvGR5c+F9vdJW7ML59k0FEM Pa99iSRJH6wES5HogH2mS0xaeQgrFExQU15cA3I5mactF4haEJiEi5jxOX3RkghVyjlE89d2Yos Q/R4zshQG5Ni1qGl6vAeEOPi6tuw7PNxsu7LMvGH67CFE/DMVNg== X-Received: by 2002:a63:2322:: with SMTP id j34mr1192859pgj.583.1644399441209; Wed, 09 Feb 2022 01:37:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuexL+onnJwAoUWireq3JRGv2nonHrVJrnSHTvUZXEFcPHK2fj7bcoD+zPTYmYCtbLydrOOQ== X-Received: by 2002:a63:2322:: with SMTP id j34mr1192847pgj.583.1644399440940; Wed, 09 Feb 2022 01:37:20 -0800 (PST) Received: from LAP568U.mistral.in ([106.51.69.35]) by smtp.gmail.com with ESMTPSA id g4sm18964255pfv.63.2022.02.09.01.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:37:20 -0800 (PST) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: u-boot@lists.denx.de Cc: Praneeth Bajjuri , Sinthu Raja Subject: [PATCH V3 04/16] board: ti: j721e: Enable support for reading EEPROM at next alternate address Date: Wed, 9 Feb 2022 15:06:49 +0530 Message-Id: <20220209093701.16693-5-sinthu.raja@ti.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220209093701.16693-1-sinthu.raja@ti.com> References: <20220209093701.16693-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1644399442-304569-5576-9005-1 X-BESS-VER: 2019.1_20220208.1721 X-BESS-Apparent-Source-IP: 209.85.214.197 X-BESS-Outbound-Spam-Score: 0.40 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.237841 [from cloudscan12-54.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.40 BSF_SC0_SA085b META: Custom Rule SA085b X-BESS-Outbound-Spam-Status: SCORE=0.40 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, BSF_SC0_SA085b 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.5 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 RPi. So start looking for TI specific EEPROM at 0x50, if not found look for EEPROM at 0x51. Signed-off-by: Sinthu Raja --- Changes in V3: Updated Commit description as per review comments. V2: https://patchwork.ozlabs.org/project/uboot/patch/20211102140558.32460-6-sinthu.raja@ti.com/ 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 e924321557..dc1c310861 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; } -- 2.35.0