Linux-mtd Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05
@ 2020-01-06 12:46 Koen Vandeputte
  2020-01-11 15:52 ` Tudor.Ambarus
  0 siblings, 1 reply; 5+ messages in thread
From: Koen Vandeputte @ 2020-01-06 12:46 UTC (permalink / raw)
  To: linux-mtd
  Cc: Richard Weinberger, Tudor Ambarus, Vignesh Raghavendra,
	Koen Vandeputte, Miquel Raynal

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"

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
Cc: Vignesh Raghavendra <vigneshr@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 |
-- 
2.17.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05
  2020-01-06 12:46 [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05 Koen Vandeputte
@ 2020-01-11 15:52 ` Tudor.Ambarus
  2020-01-14  9:13   ` Koen Vandeputte
  0 siblings, 1 reply; 5+ messages in thread
From: Tudor.Ambarus @ 2020-01-11 15:52 UTC (permalink / raw)
  To: linux-mtd; +Cc: richard, vigneshr, koen.vandeputte, miquel.raynal

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@ncentric.com>
> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
> Cc: Vignesh Raghavendra <vigneshr@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 |




______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05
  2020-01-11 15:52 ` Tudor.Ambarus
@ 2020-01-14  9:13   ` Koen Vandeputte
  2020-02-04 14:10     ` Koen Vandeputte
  0 siblings, 1 reply; 5+ messages in thread
From: Koen Vandeputte @ 2020-01-14  9:13 UTC (permalink / raw)
  To: Tudor.Ambarus, linux-mtd; +Cc: richard, vigneshr, miquel.raynal


On 11.01.20 16:52, Tudor.Ambarus@microchip.com wrote:
> 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
Hi Tudor,

Thanks for the guidance here as it's my first patch towards this part of 
the kernel.

I've not only went through the datasheet of this device, but also the 
datasheet from another very similar GD chip carrying the same specs
All features as indicated by the flags are clearly described in both 
datasheets. (like, Single, Dual, Quad modes)

The only delta is the amount of advertised blocks, and some other chip 
package details out-of-scope from electrical performance.

Is this clarification enough to send a V2 with a modified commit msg?

Please advice,
Thanks again,

Koen
>> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
>> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
>> Cc: Richard Weinberger <richard@nod.at>
>> Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
>> Cc: Vignesh Raghavendra <vigneshr@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 |
>
>
>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05
  2020-01-14  9:13   ` Koen Vandeputte
@ 2020-02-04 14:10     ` Koen Vandeputte
  2020-02-05  6:02       ` Vignesh Raghavendra
  0 siblings, 1 reply; 5+ messages in thread
From: Koen Vandeputte @ 2020-02-04 14:10 UTC (permalink / raw)
  To: Tudor.Ambarus, linux-mtd; +Cc: richard, vigneshr, miquel.raynal


On 14.01.20 10:13, Koen Vandeputte wrote:
>
> On 11.01.20 16:52, Tudor.Ambarus@microchip.com wrote:
>> 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
> Hi Tudor,
>
> Thanks for the guidance here as it's my first patch towards this part 
> of the kernel.
>
> I've not only went through the datasheet of this device, but also the 
> datasheet from another very similar GD chip carrying the same specs
> All features as indicated by the flags are clearly described in both 
> datasheets. (like, Single, Dual, Quad modes)
>
> The only delta is the amount of advertised blocks, and some other chip 
> package details out-of-scope from electrical performance.
>
> Is this clarification enough to send a V2 with a modified commit msg?
>
> Please advice,
> Thanks again,
>
> Koen

Friendly ping :-)

Koen


>>> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
>>> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
>>> Cc: Richard Weinberger <richard@nod.at>
>>> Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
>>> Cc: Vignesh Raghavendra <vigneshr@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 |
>>
>>
>>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05
  2020-02-04 14:10     ` Koen Vandeputte
@ 2020-02-05  6:02       ` Vignesh Raghavendra
  0 siblings, 0 replies; 5+ messages in thread
From: Vignesh Raghavendra @ 2020-02-05  6:02 UTC (permalink / raw)
  To: Koen Vandeputte, Tudor.Ambarus, linux-mtd; +Cc: richard, miquel.raynal

Hi

On 04/02/20 7:40 pm, Koen Vandeputte wrote:
> 
> On 14.01.20 10:13, Koen Vandeputte wrote:
>>
>> On 11.01.20 16:52, Tudor.Ambarus@microchip.com wrote:
>>> 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
>> Hi Tudor,
>>
>> Thanks for the guidance here as it's my first patch towards this part
>> of the kernel.
>>
>> I've not only went through the datasheet of this device, but also the
>> datasheet from another very similar GD chip carrying the same specs
>> All features as indicated by the flags are clearly described in both
>> datasheets. (like, Single, Dual, Quad modes)
>>
>> The only delta is the amount of advertised blocks, and some other chip
>> package details out-of-scope from electrical performance.
>>
>> Is this clarification enough to send a V2 with a modified commit msg?
>>

Please add what modes were tested as part of commit message and respin.

BTW, there is GD25D05B and GD25D05C. Which is the flash this that you
have tested with (please add that info to commit message)?

Regards
Vignesh

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 12:46 [PATCH] mtd: spi-nor: add support for GigaDevice GD25D05 Koen Vandeputte
2020-01-11 15:52 ` Tudor.Ambarus
2020-01-14  9:13   ` Koen Vandeputte
2020-02-04 14:10     ` Koen Vandeputte
2020-02-05  6:02       ` Vignesh Raghavendra

Linux-mtd Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mtd/0 linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ https://lore.kernel.org/linux-mtd \
		linux-mtd@lists.infradead.org
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-mtd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git