mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: spi-nor: fix ISSI nor flash name
@ 2019-05-15 10:10 Ahmad Fatoum
  2019-05-15 10:10 ` [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064 Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2019-05-15 10:10 UTC (permalink / raw)
  To: barebox

The is25lq128 has a device ID of 0x9d1648 [1],
while the listed 0x9d6018 identifies the is25lp128 [2].

The commit that added this line only mentions the is25lp128,
so fix the typo.

[1]: http://www.issi.com/WW/pdf/IS25LQ128.pdf , Table 12
[2]: http://www.issi.com/WW/pdf/IS25LP128.pdf , Table 8.4

Fixes: 10e5a7a9e9 ("mtd: spi-nor: add manufacturer IDs for ISSI and Winbond")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mtd/spi-nor/spi-nor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 43bd402f9ff2..b142197b65b6 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -671,7 +671,7 @@ static const struct spi_device_id spi_nor_ids[] = {
 	{ "640s33b",  INFO(0x898913, 0, 64 * 1024, 128, 0) },
 
 	/* ISSI */
-	{ "is25lq128", INFO(0x9d6018,  0,  64 * 1024, 256, 0) },
+	{ "is25lp128", INFO(0x9d6018,  0,  64 * 1024, 256, 0) },
 
 	/* Macronix */
 	{ "mx25l2005a",  INFO(0xc22012, 0, 64 * 1024,   4, SECT_4K) },
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064
  2019-05-15 10:10 [PATCH 1/2] mtd: spi-nor: fix ISSI nor flash name Ahmad Fatoum
@ 2019-05-15 10:10 ` Ahmad Fatoum
  2019-05-15 10:33   ` Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2019-05-15 10:10 UTC (permalink / raw)
  To: barebox

From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Origin: Linux v5.0-rc1, commit:4cc106f8f245bae0c458224804733240cb22394d
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 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 */
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064
  2019-05-15 10:10 ` [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064 Ahmad Fatoum
@ 2019-05-15 10:33   ` Ahmad Fatoum
  0 siblings, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-05-15 10:33 UTC (permalink / raw)
  To: barebox; +Cc: uol

On 15/5/19 12:10, Ahmad Fatoum wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> 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@pengutronix.de>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> Origin: Linux v5.0-rc1, commit:4cc106f8f245bae0c458224804733240cb22394d
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-15 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15 10:10 [PATCH 1/2] mtd: spi-nor: fix ISSI nor flash name Ahmad Fatoum
2019-05-15 10:10 ` [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064 Ahmad Fatoum
2019-05-15 10:33   ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox