Browse Source

mtd:spi-nor-ids: Add support for GD25LQ256D

Adds support for GigaDevice's spi nor flash

Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
yanhong.wang 2 years ago
parent
commit
1cf900b761
2 changed files with 6 additions and 0 deletions
  1. 1 0
      drivers/mtd/spi/spi-nor-core.c
  2. 5 0
      drivers/mtd/spi/spi-nor-ids.c

+ 1 - 0
drivers/mtd/spi/spi-nor-core.c

@@ -636,6 +636,7 @@ static int set_4byte(struct spi_nor *nor, const struct flash_info *info,
 	switch (JEDEC_MFR(info)) {
 	case SNOR_MFR_ST:
 	case SNOR_MFR_MICRON:
+	case SNOR_MFR_GIGADEVICE:
 		/* Some Micron need WREN command; all will accept it */
 		need_wren = true;
 	case SNOR_MFR_ISSI:

+ 5 - 0
drivers/mtd/spi/spi-nor-ids.c

@@ -122,6 +122,11 @@ const struct flash_info spi_nor_ids[] = {
 			SECT_4K | SPI_NOR_DUAL_READ |
 			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
 	},
+	{
+		INFO("gd25lq256d", 0xc86019, 0, 64 * 1024, 512,
+			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
+			SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
+	},
 #endif
 #ifdef CONFIG_SPI_FLASH_ISSI		/* ISSI */
 	/* ISSI */