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 55AC3C00140 for ; Mon, 15 Aug 2022 17:53:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 454B58456D; Mon, 15 Aug 2022 19:53:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="KXmiwFpR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B22328457E; Mon, 15 Aug 2022 19:53:32 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 8776B8401C for ; Mon, 15 Aug 2022 19:53:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 27FHrRPp041059; Mon, 15 Aug 2022 12:53:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1660586007; bh=vzoSAlSYbuLqteaOo1WI7wu50N9oLTH8SA4VUshZomA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=KXmiwFpRIKJeohGkJESEY1UZvT91rfAbyBIyLZq+uJStrm8+wrW498ZSQ8ZXxa9oM 4KPifXYj0JAZIQdRzC9M9deFdjlbJio/qaZNnbG56AMQx/6fPhrEkzFIjHkiByAkbw NLAqLSoFh+aPSqQKL6g1FVaJK7KVKxH6skIgabkA= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 27FHrR9J030795 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Aug 2022 12:53:27 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Mon, 15 Aug 2022 12:53:25 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Mon, 15 Aug 2022 12:53:25 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 27FHrP4D126557; Mon, 15 Aug 2022 12:53:25 -0500 Date: Mon, 15 Aug 2022 12:53:25 -0500 From: Nishanth Menon To: "Matwey V. Kornilov" CC: , , Subject: Re: [BISECTED] BeagleBone Black doesn't boot after a58147c2dbbf Message-ID: <20220815175325.mn4ebpmvow6iicqf@sequence> References: <20220729163256.GR1146598@bill-the-cat> <20220729164628.GS1146598@bill-the-cat> <20220810225202.uegc7jzhecmza3ya@snorkel> <20220815173051.2278-1-matwey.kornilov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220815173051.2278-1-matwey.kornilov@gmail.com> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 On 20:30-20220815, Matwey V. Kornilov wrote: > Hi Nishanth, > > I just reverted 0dba4586 and have the following diff in the config: > > diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig > index b500ed0fdd..b403901879 100644 > --- a/configs/am335x_evm_defconfig > +++ b/configs/am335x_evm_defconfig > @@ -9,6 +9,9 @@ CONFIG_AM335X_USB0=y > CONFIG_AM335X_USB0_PERIPHERAL=y > CONFIG_AM335X_USB1=y > CONFIG_SPL=y > +CONFIG_DEBUG_UART_BASE=0x44e09000 > +CONFIG_DEBUG_UART_CLOCK=48000000 > +CONFIG_DEBUG_UART=y > CONFIG_DISTRO_DEFAULTS=y > CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y > CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 > @@ -102,6 +105,9 @@ CONFIG_DRIVER_TI_CPSW=y > CONFIG_DM_PMIC=y > # CONFIG_SPL_DM_PMIC is not set > CONFIG_PMIC_TPS65217=y > +CONFIG_DEBUG_UART_OMAP=y > +CONFIG_DEBUG_UART_SHIFT=2 > +CONFIG_DEBUG_UART_ANNOUNCE=y > CONFIG_SPI=y > CONFIG_DM_SPI=y > CONFIG_OMAP3_SPI=y > > > I've applied your patch and see the following output now: Thanks. > > > ti_i2c_eeprom_get: 97: rc=0 header=0xee3355aa > ti_i2c_eeprom_get: 101: rc=0 > ti_i2c_eeprom_get: 109: rc=0 > ti_i2c_eeprom_get: 120: header=0xee3355aa 1 byte read operation passed here. so it never enters the 2 byte read op check. Is'nt this supposed to be a 2 byte addressing eeprom device? I wonder if changing that code to: (void)dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); if (hdr_read != header) { to: rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); if (rc || (hdr_read != header) { might help? > ti_i2c_eeprom_get: 138: header=0xee3355aa > ti_i2c_eeprom_get: 143: rc=0 > ti_i2c_eeprom_get: 191: Out OK So the header for sure matched, but not the data, I presume. Can we cross check with the updated debug printf("ep[%d]=0x%02x\n",i, ep[i]); that I added below? > Bad EEPROM or unknown board, cannot configure pinmux. > 8<--- diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index ed34991377ee..34dfc1acb3a0 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -90,13 +90,16 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, int rc; #if CONFIG_IS_ENABLED(DM_I2C) + int i; struct udevice *dev; struct udevice *bus; rc = uclass_get_device_by_seq(UCLASS_I2C, bus_addr, &bus); + printf("%s: %d: rc=%d header=0x%08x\n", __func__, __LINE__, rc, header); if (rc) return rc; rc = dm_i2c_probe(bus, dev_addr, 0, &dev); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; @@ -104,6 +107,7 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, * Read the header first then only read the other contents. */ rc = i2c_set_chip_offset_len(dev, 1); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; @@ -114,6 +118,7 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, * addressing works */ (void)dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); + printf("%s: %d: header=0x%08x\n", __func__, __LINE__, hdr_read); /* Corrupted data??? */ if (hdr_read != header) { @@ -122,24 +127,32 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, * 2 byte address (some newer boards need this..) */ rc = i2c_set_chip_offset_len(dev, 2); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; } + printf("%s: %d: header=0x%08x\n", __func__, __LINE__, hdr_read); if (hdr_read != header) return -1; rc = dm_i2c_read(dev, 0, ep, size); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; + + for (i = 0; i< size; i++) + printf("ep[%d]=0x%02x\n",i, ep[i]); #else u32 byte; gpi2c_init(); rc = ti_i2c_eeprom_init(bus_addr, dev_addr); + printf("%s: %d: rc=%d header=0x%08x\n", __func__, __LINE__, rc, header); if (rc) return rc; @@ -157,6 +170,7 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, (void)i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4); /* Corrupted data??? */ + printf("%s: %d: header=0x%08x\n", __func__, __LINE__, hdr_read); if (hdr_read != header) { /* * read the eeprom header using i2c again, but use only a @@ -165,16 +179,20 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr, byte = 2; rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; } + printf("%s: %d: header=0x%08x\n", __func__, __LINE__, hdr_read); if (hdr_read != header) return -1; rc = i2c_read(dev_addr, 0x0, byte, ep, size); + printf("%s: %d: rc=%d\n", __func__, __LINE__, rc); if (rc) return rc; #endif + printf("%s: %d: Out OK\n", __func__, __LINE__); return 0; } diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index b500ed0fdd8d..b4039018793b 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -9,6 +9,9 @@ CONFIG_AM335X_USB0=y CONFIG_AM335X_USB0_PERIPHERAL=y CONFIG_AM335X_USB1=y CONFIG_SPL=y +CONFIG_DEBUG_UART_BASE=0x44e09000 +CONFIG_DEBUG_UART_CLOCK=48000000 +CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 @@ -102,6 +105,9 @@ CONFIG_DRIVER_TI_CPSW=y CONFIG_DM_PMIC=y # CONFIG_SPL_DM_PMIC is not set CONFIG_PMIC_TPS65217=y +CONFIG_DEBUG_UART_OMAP=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_OMAP3_SPI=y -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D