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 82F5BC54EBC for ; Tue, 10 Jan 2023 15:49:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9EBF3855B8; Tue, 10 Jan 2023 16:49:21 +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="T4XTcc1B"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 669BA8553D; Tue, 10 Jan 2023 16:48:34 +0100 (CET) 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 CD1E685505 for ; Tue, 10 Jan 2023 16:48:22 +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-outbound46-71.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jan 2023 15:48:21 +0000 Received: by mail-pl1-f199.google.com with SMTP id s14-20020a17090302ce00b00192d831a155so8643477plk.11 for ; Tue, 10 Jan 2023 07:48:21 -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=1TxKsNXeIJCMo8EVVbpw6ju37O2M2Y7lAzZM/lMrie0=; b=T4XTcc1Bbst/NhIOBBckFCkoaTiIoXohaFuJnfK9IDESa8EBZCMSspan9s0IN85NEL yiPKimLAjQqwVdQUY6t8MEu2SnYaHCP3wEpNW2vF0QchLI4cQ6t+NKIsNb3/xkDK4nsx WYAp0XbOwZ7y1AHTAj1dT0Dd3MG6jYLmUlhS0= 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=1TxKsNXeIJCMo8EVVbpw6ju37O2M2Y7lAzZM/lMrie0=; b=OgptMcXEEPpECNYEy83yGqwWPXVdCYj5kU1y+Ew3gRfbBFf/IZb1epVjBVM8u97bRy ulwVt8lbyXxlC2gb+QEEis8K0kknIWXU/wT6DIPU5OhKczuOBZpFn30GAGmozE+mSIUD Wn5pFD+wvJjzLa9uFE69cGyGXHMktM1nE82aNKLyGAOcfbrBBlDNXSLFCslsHFveBVGG /mLgNEbiN2kAHXsP+Bxh7OlFyRjd5BQGIfKL8Mza0Ce3YR94MJM+i4vGgHA09FWqp4Pw x0/lJeihrUiybV5G9SlZQ25yzAfq8nqLJ8AbLUZWKR6hCI9AU/kBWnIU1YztrT09jkDg 7o+w== X-Gm-Message-State: AFqh2kqJZHe6Dmvl1Py+he8EonUrjnGjpAwy0ibgkeC/r40OKDFsvwQR MMDZJFQwUmSEvusgrdZRiOTiDsxYbSLjSEpa9gI3Kv9EB/LZZM3t7txI2Vl+JLXH1nKC/m1eNIH qW04/HLdG+E4xvp/Tcb33U5XOomVs/YXPTWRIoXpMHxDgj/oZ+w== X-Received: by 2002:a17:902:9b90:b0:192:8cd1:5e79 with SMTP id y16-20020a1709029b9000b001928cd15e79mr49286549plp.41.1673365700507; Tue, 10 Jan 2023 07:48:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXvCLLjMURKMjHn2hnkj+pUSWS/0gPRYom3VAgpjr2xSeOaemJLON520TMUfq8ZfUhq7SGCasA== X-Received: by 2002:a17:902:9b90:b0:192:8cd1:5e79 with SMTP id y16-20020a1709029b9000b001928cd15e79mr49286534plp.41.1673365700175; Tue, 10 Jan 2023 07:48:20 -0800 (PST) Received: from localhost.localdomain ([49.207.204.53]) by smtp.gmail.com with ESMTPSA id z18-20020a63e112000000b004767bc37e03sm7047976pgh.39.2023.01.10.07.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 07:48:19 -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: [RESEND PATCH V5 05/12] board: ti: j721s2: Enable support for reading EEPROM at next alternate address Date: Tue, 10 Jan 2023 21:17:51 +0530 Message-Id: <20230110154758.16256-6-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230110154758.16256-1-sinthu.raja@ti.com> References: <20230110154758.16256-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1673365690-311847-5642-15325-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.245375 [from cloudscan8-85.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header 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_SC0_MISMATCH_TO, BSF_BESS_OUTBOUND 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 Reviewed-by: Tom Rini --- Changes in V5: ============= Add Reviewed-by tag 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 063fc8c688..db69aa1507 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