[PATCH 4/7] mtd: spi-nor: macronix: Handle ID collision b/w MX25L12805D and MX25L12835F

Heiko Thiery heiko.thiery at gmail.com
Mon Jul 5 03:45:03 PDT 2021


Hi Tudor,

Am Mo., 5. Juli 2021 um 09:51 Uhr schrieb <Tudor.Ambarus at microchip.com>:
>
> On 7/2/21 5:41 PM, Tudor Ambarus wrote:
> > +     { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, SPI_NOR_PARSE_SFDP |
> > +                           SECT_4K | SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP)
>
> I should have removed SECT_4K, since 4k erase should be set when parsing SFDP.
> If SFDP is wrong, we can amend it in the post_bfpt hook.

But what about the 4K support for the "old" mx25l12805d that does not
support reading SFDP? As far as I understand, the post_bfpt hook is
only called when the SFDP was successfully read and this would mean
the "old" one would never get this setting.

> Heiko, can you test 4k erase with SECT_4K removed? Also, would you please dump the
> SFDP tables using Michael's sysfs patches? They were applied. Every new flash addition
> should have the SFDP tables dumped in the patch's comment section, under the --- line.
> I don't have the flash, so I'll need your help.

Nevertheless I removed the SECT_4K entry from the info table. After
that the correct value still was set due to the parsing of the SFDP
data.
# cat /sys/devices/platform/soc at 0/30800000.bus/30bb0000.spi/spi_master/spi0/spi0
.0/mtd/mtd0/erasesize
4096

And here is the requested dump:

# cat /sys/devices/platform/soc at 0/30800000.bus/30bb0000.spi/spi_master/spi0/spi0
.0/spi-nor/sfdp | xxd -p
53464450000101ff00000109300000ffc2000104600000ffffffffffffff
ffffffffffffffffffffffffffffffffffffe520f1ffffffff0744eb086b
083b04bbfeffffffffff00ffffff44eb0c200f5210d800ffffffffffffff
ffffffffffff003600279df9c06485cbffffffffffff

Thanks
-- 
Heiko



More information about the linux-mtd mailing list