Skip to contentSkip to conversation

mtd: spi-nor: support GigaDevice gd25lq64c

PATCH Superseded Brian Norris 2 participants 4 messages May 6, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: spi-nor: support GigaDevice gd25lq64c

Also note the GigaDevice JEDEC ID.

No write-protect support yet, since this flash uses a different status register layout.

Cc Ezequiel Garcia <[email protected]>
---
 drivers/mtd/spi-nor/spi-nor.c | 1 +
 include/linux/mtd/spi-nor.h   | 1 +
 2 files changed, 2 insertions(+)
drivers/mtd/spi-nor/spi-nor.c +1 -0
index 157841dc3e99..0422fd3aae0c 100644
@@ -832,6 +832,7 @@ static const struct flash_info spi_nor_ids[] = {
 	/* GigaDevice */
 	{ "gd25q32", INFO(0xc84016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) },
+	{ "gd25lq64c", INFO(0xc86017, 0, 64 * 1024, 128, SECT_4K | SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) },
 
 	/* Intel/Numonyx -- xxxs33b */
include/linux/mtd/spi-nor.h +1 -0
index 3c36113a88e1..7f041bd88b82 100644
@@ -21,6 +21,7 @@
  * Sometimes these are the same as CFI IDs, but sometimes they aren't.
  */
 #define SNOR_MFR_ATMEL		CFI_MFR_ATMEL
+#define SNOR_MFR_GIGADEVICE	0xc8
 #define SNOR_MFR_INTEL		CFI_MFR_INTEL
 #define SNOR_MFR_MICRON		CFI_MFR_ST /* ST Micro <--> Micron */
 #define SNOR_MFR_MACRONIX	CFI_MFR_MACRONIX
Signature · 1 line
2.8.0.rc3.226.g39d4020
#1 lore raw

drivers/mtd/spi-nor/spi-nor.c static const struct flash_info spi_nor_ids[] = { · line 835

Quoted 7 lines · Brian Norris
drivers/mtd/spi-nor/spi-nor.c +1 -0
@@ -832,6 +832,7 @@ static const struct flash_info spi_nor_ids[] = {
 	/* GigaDevice */
 	{ "gd25q32", INFO(0xc84016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) },
+	{ "gd25lq64c", INFO(0xc86017, 0, 64 * 1024, 128, SECT_4K | SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

It's enough to use one SECT_4K , it will work just fine :-)

Quoted 1 line
drivers/mtd/spi-nor/spi-nor.c +0 -0
 	{ "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) },
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw
Quoted 10 lines · Marek Vasut

drivers/mtd/spi-nor/spi-nor.c static const struct flash_info spi_nor_ids[] = { · line 835

Quoted 7 lines · Brian Norris
drivers/mtd/spi-nor/spi-nor.c +1 -0
@@ -832,6 +832,7 @@ static const struct flash_info spi_nor_ids[] = {
 	/* GigaDevice */
 	{ "gd25q32", INFO(0xc84016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) },
+	{ "gd25lq64c", INFO(0xc86017, 0, 64 * 1024, 128, SECT_4K | SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

It's enough to use one SECT_4K , it will work just fine :-)

Of course :) Maybe I should read my own patch next time. Will send v2 shortly.

Thanks,
Brian

Quoted 6 lines
Quoted 1 line
drivers/mtd/spi-nor/spi-nor.c +0 -0
 	{ "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) },
Signature · 2 lines
Best regards,
Marek Vasut
#3 lore raw
Quoted 12 lines · Brian Norris
Quoted 10 lines · Marek Vasut

drivers/mtd/spi-nor/spi-nor.c static const struct flash_info spi_nor_ids[] = { · line 835

Quoted 7 lines · Brian Norris
drivers/mtd/spi-nor/spi-nor.c +1 -0
@@ -832,6 +832,7 @@ static const struct flash_info spi_nor_ids[] = {
 	/* GigaDevice */
 	{ "gd25q32", INFO(0xc84016, 0, 64 * 1024,  64, SECT_4K) },
 	{ "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) },
+	{ "gd25lq64c", INFO(0xc86017, 0, 64 * 1024, 128, SECT_4K | SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

It's enough to use one SECT_4K , it will work just fine :-)

Quoted 2 lines

Of course :) Maybe I should read my own patch next time. Will send v2 shortly.

You can see Linus's law in action here though ;-)

Quoted 9 lines

Thanks,
Brian

Quoted 6 lines
Quoted 1 line
drivers/mtd/spi-nor/spi-nor.c +0 -0
 	{ "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) },
Signature · 2 lines
Best regards,
Marek Vasut
Signature · 2 lines
Best regards,
Marek Vasut