diff mbox series

[1/2] mtd: spi-nor: Add support for EON EN25Q128

Message ID 20181209170342.9554-2-hauke@hauke-m.de
State Changes Requested
Delegated to: Ambarus Tudor
Headers show
Series mtd: spi-nor: Add two spi nor flash chips | expand

Commit Message

Hauke Mehrtens Dec. 9, 2018, 5:03 p.m. UTC
From: Piotr Dymacz <pepe2k@gmail.com>

The datasheet can be found here:
https://tonyho.github.io/static/SPINorFlash/docs/EN25Q128.pdf

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tudor Ambarus Jan. 11, 2019, 8:33 a.m. UTC | #1
Hi, Hauke,

On 12/09/2018 07:03 PM, Hauke Mehrtens wrote:
> From: Piotr Dymacz <pepe2k@gmail.com>
> 
> The datasheet can be found here:
> https://tonyho.github.io/static/SPINorFlash/docs/EN25Q128.pdf

I wouldn't add links to personal sites.

It would be nice to specify how you tested this memory.

> 
> Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>

You should add your SoB as you are sending a patch that is not from you.

> ---
>  drivers/mtd/spi-nor/spi-nor.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index 0e9bbde30be0..a21b1a26130d 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -1286,6 +1286,7 @@ static const struct flash_info spi_nor_ids[] = {
>  	{ "en25q32b",   INFO(0x1c3016, 0, 64 * 1024,   64, 0) },
>  	{ "en25p64",    INFO(0x1c2017, 0, 64 * 1024,  128, 0) },
>  	{ "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
> +	{ "en25q128",   INFO(0x1c3018, 0, 64 * 1024,  256, SECT_4K) },

The flash supports SPINOR_OP_READ_1_1_2, SPINOR_OP_READ_1_2_2 and
SPINOR_OP_READ_1_4_4, but doesn't support SPINOR_OP_READ_1_1_4. I would advise
to set SPI_NOR_DUAL_READ so that you'll benefit of the SPINOR_OP_READ_1_1_2.
Looks like the flash doesn't have support for BFPT, unfortunately as of now you
can't benefit of read-1-4-4. Please set SPI_NOR_DUAL_READ and test if
SPINOR_OP_READ_1_1_2 works correctly and if so, submit a new patch.

Cheers,
ta
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 0e9bbde30be0..a21b1a26130d 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1286,6 +1286,7 @@  static const struct flash_info spi_nor_ids[] = {
 	{ "en25q32b",   INFO(0x1c3016, 0, 64 * 1024,   64, 0) },
 	{ "en25p64",    INFO(0x1c2017, 0, 64 * 1024,  128, 0) },
 	{ "en25q64",    INFO(0x1c3017, 0, 64 * 1024,  128, SECT_4K) },
+	{ "en25q128",   INFO(0x1c3018, 0, 64 * 1024,  256, SECT_4K) },
 	{ "en25qh32",   INFO(0x1c7016, 0, 64 * 1024,   64, 0) },
 	{ "en25qh128",  INFO(0x1c7018, 0, 64 * 1024,  256, 0) },
 	{ "en25qh256",  INFO(0x1c7019, 0, 64 * 1024,  512, 0) },