[PATCH] mtd: spi-nor: add support for GigaDevice GD25D05

Tudor.Ambarus at microchip.com Tudor.Ambarus at microchip.com
Sat Jan 11 07:52:27 PST 2020


Hi, Koen,

On Monday, January 6, 2020 2:46:24 PM EET Koen Vandeputte wrote:
> Tested on a MikroTik RB912UAG-5HPnD r2
> 
> [    0.641714] m25p80 spi0.0: found gd25d05, expected m25p80
> [    0.649916] m25p80 spi0.0: gd25d05 (64 Kbytes)
> [    0.655122] Creating 4 MTD partitions on "spi0.0":
> [    0.660164] 0x000000000000-0x00000000c000 : "routerboot"
> [    0.667782] 0x00000000c000-0x00000000d000 : "hard_config"
> [    0.675073] 0x00000000d000-0x00000000e000 : "bios"
> [    0.682613] 0x00000000e000-0x00000000f000 : "soft_config"

I'm afraid that this is not enough. You'll have to test all the flags that you 
advertised. Typically one should do a read, erase, write, read-back test, and 
then to exercise the lock and unlock features. If you want to be exhaustive, 
you can force the controller to do the reads in single, dual or quad modes, 
but if you choose to test just the best supported read mode, it is fine too. 
Please specify in the commit message what you tested.

Cheers,
ta
> 
> Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
> Cc: Miquel Raynal <miquel.raynal at bootlin.com>
> Cc: Richard Weinberger <richard at nod.at>
> Cc: Tudor Ambarus <tudor.ambarus at microchip.com>
> Cc: Vignesh Raghavendra <vigneshr at ti.com>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index f4afe123e9dc..a34fa42d47a2 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -2346,6 +2346,11 @@ static const struct flash_info spi_nor_ids[] = {
>  	{ "mb85rs1mt", INFO(0x047f27, 0, 128 * 1024, 1, SPI_NOR_NO_ERASE) 
},
> 
>  	/* GigaDevice */
> +	{
> +		"gd25d05", INFO(0xc84010, 0, 64 * 1024,  1,
> +			SECT_4K | SPI_NOR_DUAL_READ | 
SPI_NOR_QUAD_READ |
> +			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
> +	},
>  	{
>  		"gd25q16", INFO(0xc84015, 0, 64 * 1024,  32,
>  			SECT_4K | SPI_NOR_DUAL_READ | 
SPI_NOR_QUAD_READ |






More information about the linux-mtd mailing list