All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <p.yadav@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 05/13] mtd: spi-nor-ids: add support for Macronix mx25u51245g and mx66u1g45g flash
Date: Wed, 21 Apr 2021 16:45:35 +0530	[thread overview]
Message-ID: <20210421111533.hr62fw7rd3xucdmp@ti.com> (raw)
In-Reply-To: <CAA93ih1njo6pix4Lv7FtqTxp5TOC=trEDKjw4_iotRBE1Y4FFw@mail.gmail.com>

On 21/04/21 11:39AM, Masami Hiramatsu wrote:
> Hello Pratyush,
> 
> 2021?4?19?(?) 17:41 Pratyush Yadav <p.yadav@ti.com>:
> >
> > On 17/04/21 08:38AM, Masami Hiramatsu wrote:
> > > From: Jassi Brar <jaswinder.singh@linaro.org>
> > >
> > > Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
> > > ---
> > >  drivers/mtd/spi/spi-nor-ids.c |    2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
> > > index 2b57797954..30a18b4140 100644
> > > --- a/drivers/mtd/spi/spi-nor-ids.c
> > > +++ b/drivers/mtd/spi/spi-nor-ids.c
> > > @@ -160,9 +160,11 @@ const struct flash_info spi_nor_ids[] = {
> > >       { INFO("mx25l12855e", 0xc22618, 0, 64 * 1024, 256, 0) },
> > >       { INFO("mx25l25635e", 0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> > >       { INFO("mx25u25635f", 0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) },
> > > +     { INFO("mx25u51245g", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> >
> > The flash ID is the same as that of mx66u51235f. Because the ID matching
> > function searches through this array in linear fashion, mx66u51235f can
> > never be detected. This is a regression.
> 
> OK
> 
> >
> > I am seeing a lot of ID collisions on Macronix flashes recently [0]. Not
> > sure how to handle them though. At least in this case both flashes use
> > the same set of flags so it should just change the name of the flash
> > detected.
> 
> Would you mean rename the entry as below?
> 
> { INFO("mx66u51235f/mx25u51245g",...

No, I am saying that your change will make mx66u51235f get detected as 
mx25u51245g, but it won't make any difference in practice because both 
entries have the same flags set.

There have been some ideas on the Linux side about how to handle these 
collisions. One of them being that the SFDP contents can be used to 
differentiate between flashes having the same ID. I would appreciate it 
if you help drive the solution forward on the Linux side, and then it 
can be ported back to U-Boot.

> 
> Thank you,
> 
> >
> > [0] https://lore.kernel.org/linux-mtd/CAEyMn7ZEp9f1SuE6umRDWkr8bVT5hdRi-4F3+G-GP9anuGG1Bw at mail.gmail.com/T/#u
> >
> > >       { INFO("mx25l25655e", 0xc22619, 0, 64 * 1024, 512, 0) },
> > >       { INFO("mx66l51235l", 0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> > >       { INFO("mx66u51235f", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> > > +     { INFO("mx66u1g45g",  0xc2253b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> > >       { INFO("mx66u2g45g",  0xc2253c, 0, 64 * 1024, 4096, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> > >       { INFO("mx66l1g45g",  0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> > >       { INFO("mx25l1633e", 0xc22415, 0, 64 * 1024,   32, SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES | SECT_4K) },
> > >
> >

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.

  reply	other threads:[~2021-04-21 11:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 23:37 [PATCH v2 00/13] arm64: synquacer: Add SynQuacer/DeveloperBox support Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 01/13] ata: ahci-pci: Use scsi_ops to initialize ops Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 02/13] dm: pci: Skip setting VGA bridge bits if parent device is the host bus Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 03/13] efi: Fix to use null handle to create new handle for efi_fmp_raw Masami Hiramatsu
2021-04-16 23:37 ` [PATCH v2 04/13] gpio: Introduce CONFIG_ONLY_GENERIC_GPIO to cleanup #ifdefs Masami Hiramatsu
2021-04-29 16:09   ` Simon Glass
2021-04-30  2:03     ` Masami Hiramatsu
2021-04-30 18:13       ` Simon Glass
2021-05-03 11:51         ` Tom Rini
2021-05-06  2:28           ` Masami Hiramatsu
2021-04-16 23:38 ` [PATCH v2 05/13] mtd: spi-nor-ids: add support for Macronix mx25u51245g and mx66u1g45g flash Masami Hiramatsu
2021-04-19  8:41   ` Pratyush Yadav
2021-04-21  2:39     ` Masami Hiramatsu
2021-04-21 11:15       ` Pratyush Yadav [this message]
2021-04-16 23:38 ` [PATCH v2 06/13] pci: synquacer: Add SynQuacer ECAM based PCIe driver Masami Hiramatsu
2021-04-16 23:38 ` [PATCH v2 07/13] mmc: synquacer: Add SynQuacer F_SDH30 SDHCI driver Masami Hiramatsu
2021-04-19 22:05   ` Jaehoon Chung
2021-04-20  0:59     ` Masami Hiramatsu
2021-04-20  5:35       ` Jaehoon Chung
2021-04-25 22:05     ` Jassi Brar
2021-04-25 23:06       ` Jaehoon Chung
2021-04-16 23:38 ` [PATCH v2 08/13] spi: synquacer: Add HSSPI SPI controller driver for SynQuacer Masami Hiramatsu
2021-04-16 23:38 ` [PATCH v2 09/13] net: synquacer: Add netsec driver Masami Hiramatsu
2021-04-23  0:16   ` Ramon Fried
2021-04-16 23:38 ` [PATCH v2 10/13] ARM: dts: synquacer: Add device trees for DeveloperBox Masami Hiramatsu
2021-04-16 23:39 ` [PATCH v2 11/13] board: synquacer: Add DeveloperBox 96boards EE support Masami Hiramatsu
2021-04-21  2:40   ` Masami Hiramatsu
2021-04-16 23:39 ` [PATCH v2 12/13] doc: qemu: arm64: Fix the documentation of capsule update Masami Hiramatsu
2021-04-17 18:21   ` Heinrich Schuchardt
2021-04-18  8:07     ` Sughosh Ganu
2021-04-19  0:37       ` Takahiro Akashi
2021-04-19  2:24         ` Masami Hiramatsu
2021-04-19  2:35           ` Heinrich Schuchardt
2021-04-20  6:16             ` Takahiro Akashi
2021-04-16 23:39 ` [PATCH v2 13/13] configs: synquacer: Enable EFI capsule update support Masami Hiramatsu

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=20210421111533.hr62fw7rd3xucdmp@ti.com \
    --to=p.yadav@ti.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.