[PATCH] mtd: spi-nor: gigadevice: Add support for gd25lb256e

Tudor.Ambarus at microchip.com Tudor.Ambarus at microchip.com
Mon Mar 8 06:12:00 GMT 2021


On 2/9/21 1:11 PM, Md Sadre Alam wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Add support for gd25lb256e. This device tested on IPQ5018
> platform with dd from/to the flash for read/write respectly,

typo: respectly
> and mtd erase for erasing the flash.
> 
> Signed-off-by: Md Sadre Alam <mdalam at codeaurora.org>
> ---
>  drivers/mtd/spi-nor/gigadevice.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c
> index 447d84b..8f1e7ec 100644
> --- a/drivers/mtd/spi-nor/gigadevice.c
> +++ b/drivers/mtd/spi-nor/gigadevice.c
> @@ -50,6 +50,9 @@ static const struct flash_info gigadevice_parts[] = {
>                            SPI_NOR_4B_OPCODES | SPI_NOR_HAS_LOCK |
>                            SPI_NOR_HAS_TB | SPI_NOR_TB_SR_BIT6)
>                 .fixups = &gd25q256_fixups },
> +       { "gd25lb256e", INFO(0xc86719, 0, 64 * 1024, 512,
> +                         SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
> +                         SPI_NOR_4B_OPCODES) },

The flash doesn't have support for 0x3b command, you can't add the
SPI_NOR_DUAL_READ flag.

I see that the flash name contains info about the generation of the flash.
Is the generation differentiated by a different device ID? If not, we can
strip the "e" from the flash name.

Looks like the flash has support for BP0-3 protection. You can try
to add the flash locking flags and test the support with mtd-utils,
if you're interested in this kind of support.

Cheers,
ta

>  };
> 
>  const struct spi_nor_manufacturer spi_nor_gigadevice = {
> --
> 2.7.4
> 



More information about the linux-mtd mailing list