[PATCH] dt-bindings: mtd: jedec,spi-nor: Document support for more MT25QU parts

Michael Walle michael at walle.cc
Fri Sep 22 00:59:08 PDT 2023


Am 2023-09-22 09:10, schrieb Geert Uytterhoeven:
> On Thu, Sep 21, 2023 at 7:01 PM Geert Uytterhoeven 
> <geert at linux-m68k.org> wrote:
>> On Thu, Sep 21, 2023 at 6:01 PM Michael Walle <michael at walle.cc> 
>> wrote:
>> > >> We won't break compatibility with older DTBs if we use a list of
>> > >> compatibles. First the vendor specific one which will use some quirks,
>> > >> and if that's not available, have as second the generic jedec,spi-nor
>> > >> to
>> > >> fallback to.
>> > >
>> > > Sure, you should use a list.
>> > >
>> > > But the current recommended practice is to not have a list,
>> > > but just "jedec,spi-nor" (using a list with a new FLASH part name
>> > > causes checkpatch and dtbs_check warnings). Hence if you follow that
>> > > recommendation, you will run into compatibility issues with older DTBs
>> > > when you discover the quirk later, and decide to add it to the list.
>> >
>> > The SPI NOR flashes should be auto discoverable. Why do you need a
>> > compatible string? Quirks can be added to the flash_info database.
>> 
>> This assumes you don't need the quirk before you can identify the 
>> part.
>> I'm not sure that is always the case.

Yes, but that seems a reasonable assumption.

> Reminder where this is apparently not the case:
> https://lore.kernel.org/r/OS0PR01MB5922A4F16DE8923373AA5DD886F7A@OS0PR01MB5922.jpnprd01.prod.outlook.com/

I think that one is still under discussion and there is something
strange going on there. In any case, the "read id" operation is done
with just single bit I/O, IOW, RDID should work. Unless there is a
hardware bug and the SPI controller (!) will hold the flash in reset
by pulling down IO3. I'd argue, that simply looking at the flash
compatible is the wrong approach here.

-michael



More information about the linux-mtd mailing list