diff mbox series

mtd: spi-nor: gigadevice: add GD25LQ80C

Message ID 20200921184754.4010068-1-stijn@linux-ipv6.be
State Changes Requested
Delegated to: Vignesh R
Headers show
Series mtd: spi-nor: gigadevice: add GD25LQ80C | expand

Commit Message

Stijn Tintel Sept. 21, 2020, 6:47 p.m. UTC
Tested on a TP-Link OC200.

Datasheet: https://www.gigadevice.com/datasheet/gd25lq80c/

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
 drivers/mtd/spi-nor/gigadevice.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Vignesh Raghavendra Sept. 25, 2020, 11:36 a.m. UTC | #1
Hi,

On 9/22/20 12:17 AM, Stijn Tintel wrote:
> Tested on a TP-Link OC200.
> 

But what was tested? Dual and quad mode tested (as you enable those
flags)? And lock/unlock as well?

Could you add this info to commit message?

> Datasheet: https://www.gigadevice.com/datasheet/gd25lq80c/
> 
> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
> ---
>  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 447d84bb2128..840fa9f90a67 100644
> --- a/drivers/mtd/spi-nor/gigadevice.c
> +++ b/drivers/mtd/spi-nor/gigadevice.c
> @@ -24,6 +24,9 @@ static struct spi_nor_fixups gd25q256_fixups = {
>  };
>  
>  static const struct flash_info gigadevice_parts[] = {
> +	{ "gd25lq80c", INFO(0xc86014, 0, 64 * 1024, 16,
> +			   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 |
>  			  SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
> 

Regards
Vignesh
Stijn Tintel Sept. 25, 2020, 11:39 a.m. UTC | #2
On 25/09/2020 14:36, Vignesh Raghavendra wrote:
> Hi,
>
> On 9/22/20 12:17 AM, Stijn Tintel wrote:
>> Tested on a TP-Link OC200.
>>
> But what was tested? Dual and quad mode tested (as you enable those
> flags)? And lock/unlock as well?
>
> Could you add this info to commit message?
I tested read and write with dd, verified the written image afterwards.
I enabled those flags based on what's in the datasheet. If this is not
enough, please advise an acceptable way to test those flags.
>
>> Datasheet: https://www.gigadevice.com/datasheet/gd25lq80c/
>>
>> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
>> ---
>>  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 447d84bb2128..840fa9f90a67 100644
>> --- a/drivers/mtd/spi-nor/gigadevice.c
>> +++ b/drivers/mtd/spi-nor/gigadevice.c
>> @@ -24,6 +24,9 @@ static struct spi_nor_fixups gd25q256_fixups = {
>>  };
>>  
>>  static const struct flash_info gigadevice_parts[] = {
>> +	{ "gd25lq80c", INFO(0xc86014, 0, 64 * 1024, 16,
>> +			   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 |
>>  			  SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
>>
> Regards
> Vignesh

Thanks,
Stijn
Vignesh Raghavendra Sept. 25, 2020, 12:01 p.m. UTC | #3
On 9/25/20 5:09 PM, Stijn Tintel wrote:
> On 25/09/2020 14:36, Vignesh Raghavendra wrote:
>> Hi,
>>
>> On 9/22/20 12:17 AM, Stijn Tintel wrote:
>>> Tested on a TP-Link OC200.
>>>
>> But what was tested? Dual and quad mode tested (as you enable those
>> flags)? And lock/unlock as well?
>>
>> Could you add this info to commit message?
> I tested read and write with dd, verified the written image afterwards.
> I enabled those flags based on what's in the datasheet. If this is not
> enough, please advise an acceptable way to test those flags.
>>

We want to make sure that entries being added are actually tested on a
real HW especially wrt quad mode. Can you confirm quad mode is being
used to reading image from the flash?
(you could put prints in spi_nor_read() file and see the opcode being
used for read and compare with Datasheet to know the mode).

If you are unable to test quad/dual mode due to limitations then please
do not add the flag just based on datasheet.

Regards
Vignesh

>>> Datasheet: https://www.gigadevice.com/datasheet/gd25lq80c/
>>>
>>> Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
>>> ---
>>>  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 447d84bb2128..840fa9f90a67 100644
>>> --- a/drivers/mtd/spi-nor/gigadevice.c
>>> +++ b/drivers/mtd/spi-nor/gigadevice.c
>>> @@ -24,6 +24,9 @@ static struct spi_nor_fixups gd25q256_fixups = {
>>>  };
>>>  
>>>  static const struct flash_info gigadevice_parts[] = {
>>> +	{ "gd25lq80c", INFO(0xc86014, 0, 64 * 1024, 16,
>>> +			   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 |
>>>  			  SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
>>>
>> Regards
>> Vignesh
> 
> Thanks,
> Stijn
>
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/gigadevice.c b/drivers/mtd/spi-nor/gigadevice.c
index 447d84bb2128..840fa9f90a67 100644
--- a/drivers/mtd/spi-nor/gigadevice.c
+++ b/drivers/mtd/spi-nor/gigadevice.c
@@ -24,6 +24,9 @@  static struct spi_nor_fixups gd25q256_fixups = {
 };
 
 static const struct flash_info gigadevice_parts[] = {
+	{ "gd25lq80c", INFO(0xc86014, 0, 64 * 1024, 16,
+			   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 |
 			  SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },