On 15/5/19 12:10, Ahmad Fatoum wrote: > From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> > > The datasheet is publically available at > http://www.issi.com/WW/pdf/IS25LP032-064-128.pdf. The parameters fit to > what is already available for IS25LP128/256. Unfortunately, this doesn't apply to barebox, where is25lp128 was first added without the SECT_4K. Adding it now after the fact, would break barebox state if it were located on such a flash under the precondition that barebox is configured with CONFIG_MTD_SPI_NOR_USE_4K_SECTORS, but Linux isn't. Having inconsistent values between kernel and barebox for CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is wrong anyway, but I am wary of making it worse, so I refrained here from changing the flags parameter. I intend to correct this when the barebox state binding is extended to support a backend-erasesize property in the device tree. Three more NOR flashes are affected[1] by the same problem of lacking SECT_4K in barebox, but not in kernel: en25s64, n25q128a11, n25q128a13 If no one beats me to it, I will see if I can find time to add backend-erasesize next month. [1]: wdiff $BAREBOXdrivers/mtd/spi-nor/spi-nor.c \ $LINUX/drivers/mtd/spi-nor/spi-nor.c | grep '{+.*4K.*+} Cheers Ahmad > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> > Reviewed-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx> > Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxx> > Origin: Linux v5.0-rc1, commit:4cc106f8f245bae0c458224804733240cb22394d > Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> > --- > drivers/mtd/spi-nor/spi-nor.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c > index b142197b65b6..d95c1b156c9f 100644 > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > @@ -671,6 +671,8 @@ static const struct spi_device_id spi_nor_ids[] = { > { "640s33b", INFO(0x898913, 0, 64 * 1024, 128, 0) }, > > /* ISSI */ > + { "is25lp032", INFO(0x9d6016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_DUAL_READ) }, > + { "is25lp064", INFO(0x9d6017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ) }, > { "is25lp128", INFO(0x9d6018, 0, 64 * 1024, 256, 0) }, > > /* Macronix */ > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox