All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
To: Nishanth Menon <nm@ti.com>
Cc: u-boot@lists.denx.de, robertcnelson@gmail.com, trini@konsulko.com
Subject: Re: [BISECTED] BeagleBone Black doesn't boot after a58147c2dbbf
Date: Mon, 15 Aug 2022 21:12:42 +0300	[thread overview]
Message-ID: <CAJs94EZu53Y_3+qZVdZ6g=sstNm+BfZR9s0cG4U6O5uTZg2daQ@mail.gmail.com> (raw)
In-Reply-To: <20220815175325.mn4ebpmvow6iicqf@sequence>

пн, 15 авг. 2022 г. в 20:53, Nishanth Menon <nm@ti.com>:
>
> 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.
>
> >
> > <debug_uart>
> > 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;
>  }


<debug_uart>
ti_i2c_eeprom_get: 98: rc=0 header=0xee3355aa
ti_i2c_eeprom_get: 102: rc=0
ti_i2c_eeprom_get: 110: rc=0
ti_i2c_eeprom_get: 121: header=0xee3355aa
ti_i2c_eeprom_get: 139: header=0xee3355aa
ti_i2c_eeprom_get: 144: rc=0
ep[0]=0xff
ep[1]=0xff
ep[2]=0xff
ep[3]=0xff
ep[4]=0xff
ep[5]=0xff
ep[6]=0xff
ep[7]=0xff
ep[8]=0xff
ep[9]=0xff
ep[10]=0xff
ep[11]=0xff
ep[12]=0xff
ep[13]=0xff
ep[14]=0xff
ep[15]=0xff
ep[16]=0xff
ep[17]=0xff
ep[18]=0xff
ep[19]=0xff
ep[20]=0xff
ep[21]=0xff
ep[22]=0xff
ep[23]=0xff
ep[24]=0xff
ep[25]=0xff
ep[26]=0xff
ep[27]=0xff
ep[28]=0xff
ep[29]=0xff
ep[30]=0xff
ep[31]=0xff
ep[32]=0xff
ep[33]=0xff
ep[34]=0xff
ep[35]=0xff
ep[36]=0xff
ep[37]=0xff
ep[38]=0xff
ep[39]=0xff
ep[40]=0xff
ep[41]=0xff
ep[42]=0xff
ep[43]=0xff
ep[44]=0xff
ep[45]=0xff
ep[46]=0xff
ep[47]=0xff
ep[48]=0xff
ep[49]=0xff
ep[50]=0xff
ep[51]=0xff
ep[52]=0xff
ep[53]=0xff
ep[54]=0xff
ep[55]=0xff
ep[56]=0xff
ep[57]=0xff
ep[58]=0xff
ep[59]=0xff
ep[60]=0xff
ep[61]=0xff
ep[62]=0xff
ep[63]=0xff
ep[64]=0xff
ep[65]=0xff
ep[66]=0xff
ep[67]=0xff
ep[68]=0xff
ep[69]=0xff
ep[70]=0xff
ep[71]=0xff
ep[72]=0xff
ep[73]=0xff
ep[74]=0xff
ep[75]=0xff
ep[76]=0xff
ep[77]=0xff
ti_i2c_eeprom_get: 195: Out OK
Bad EEPROM or unknown board, cannot configure pinmux.


>
> 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



-- 
With best regards,
Matwey V. Kornilov

  reply	other threads:[~2022-08-15 18:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 16:20 [BISECTED] BeagleBone Black doesn't boot after a58147c2dbbf Matwey V. Kornilov
2022-07-29 16:32 ` Tom Rini
2022-07-29 16:38   ` Matwey V. Kornilov
2022-07-29 16:46     ` Tom Rini
2022-07-29 17:06       ` Matwey V. Kornilov
2022-08-02  7:46         ` Matwey V. Kornilov
2022-08-05 15:00         ` Robert Nelson
2022-08-07  8:40           ` Matwey V. Kornilov
2022-08-10 22:52             ` Nishanth Menon
2022-08-11  6:56               ` Matwey V. Kornilov
2022-08-11  7:47                 ` Matwey V. Kornilov
2022-08-11 12:46                   ` Tom Rini
2022-08-11 12:53                     ` Alex Kiernan
2022-08-11 16:11                       ` Matwey V. Kornilov
2022-08-13 15:31                         ` Matwey V. Kornilov
2022-08-13 15:42                           ` Tom Rini
2022-08-13 15:50               ` Matwey V. Kornilov
     [not found]                 ` <20220815121657.nvjae4zjjftfo4gb@matcher>
2022-08-15 17:30                   ` Matwey V. Kornilov
2022-08-15 17:53                     ` Nishanth Menon
2022-08-15 18:12                       ` Matwey V. Kornilov [this message]
     [not found]                         ` <20220815195644.l6or6z6hg5igxzzm@humbly>
     [not found]                           ` <CAJs94EbKW3OLKXxTUX7PANWkY5QEOC0DREfhxP6fTOVEFydbdA@mail.gmail.com>
     [not found]                             ` <CAJs94Ea-2n56j-=gu4VyjQMro9nQFCj7JtRQVTGSSoAc+CqbVw@mail.gmail.com>
     [not found]                               ` <CAJs94EbReuKoq_28jrdrdHQDmpAn9zW0YS=9s20yS=p_mF5pNA@mail.gmail.com>
     [not found]                                 ` <20220816012722.bt2xcizturouc4fi@nursing>
2022-08-16 14:18                                   ` Matwey V. Kornilov
2022-08-18  8:28                                     ` Matwey V. Kornilov
2022-08-19  9:30                                       ` Nishanth Menon
2022-08-19 13:56                                         ` Robert Nelson
2022-08-23  3:54                                           ` Nishanth Menon
2022-08-23  5:47                                             ` Matwey V. Kornilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJs94EZu53Y_3+qZVdZ6g=sstNm+BfZR9s0cG4U6O5uTZg2daQ@mail.gmail.com' \
    --to=matwey.kornilov@gmail.com \
    --cc=nm@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.