From: Piotr Dymacz Date: Tue, 2 May 2017 15:50:07 +0000 (+0200) Subject: Add support for GigaDevice SPI NOR chips X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=28294e4d8844f8136e17a579b2e7340c2916d5df;p=oweals%2Fu-boot_mod.git Add support for GigaDevice SPI NOR chips --- diff --git a/u-boot/common/flash.c b/u-boot/common/flash.c index ee8e01a..03b9e34 100644 --- a/u-boot/common/flash.c +++ b/u-boot/common/flash.c @@ -14,18 +14,20 @@ flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* List of supported and known SPI NOR FLASH chips */ -static char VENDOR_ATMEL[] = "Atmel"; -static char VENDOR_EON[] = "EON"; -static char VENDOR_MACRONIX[] = "Macronix"; -static char VENDOR_MICRON[] = "Micron"; -static char VENDOR_SPANSION[] = "Spansion"; -static char VENDOR_WINBOND[] = "Winbond"; +static char VENDOR_ATMEL[] = "Atmel"; +static char VENDOR_EON[] = "EON"; +static char VENDOR_GIGADEVICE[] = "GigaDevice"; +static char VENDOR_MACRONIX[] = "Macronix"; +static char VENDOR_MICRON[] = "Micron"; +static char VENDOR_SPANSION[] = "Spansion"; +static char VENDOR_WINBOND[] = "Winbond"; const spi_nor_ids_info_t spi_nor_ids[] = { /* 4 MiB */ { "AT25DF321", 0x1F4700, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "EN25Q32", 0x1C3016, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "EN25F32", 0x1C3116, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, + { "GD25Q32", 0xC84016, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "MX25L320", 0xC22016, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "M25P32", 0x202016, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "S25FL032P", 0x010215, SIZE_4MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, @@ -34,6 +36,7 @@ const spi_nor_ids_info_t spi_nor_ids[] = { /* 8 MiB */ { "AT25DF641", 0x1F4800, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "EN25Q64", 0x1C3017, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, + { "GD25Q64", 0xC84017, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "MX25L64", 0xC22017, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "MX25L64", 0xC22617, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "M25P64", 0x202017, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, @@ -41,6 +44,7 @@ const spi_nor_ids_info_t spi_nor_ids[] = { { "W25Q64", 0xEF4017, SIZE_8MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, /* 16 MiB */ + { "GD25Q128", 0xC84018, SIZE_16MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "MX25L128", 0xC22018, SIZE_16MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "MX25L128", 0xC22618, SIZE_16MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, { "N25Q128", 0x20BA18, SIZE_16MiB, SIZE_64KiB, 256, SPI_FLASH_CMD_ES_64KB }, @@ -60,6 +64,9 @@ const char *flash_manuf_name(u32 jedec_id) case FLASH_VENDOR_JEDEC_EON: return VENDOR_EON; break; + case FLASH_VENDOR_JEDEC_GIGADEVICE: + return VENDOR_GIGADEVICE; + break; case FLASH_VENDOR_JEDEC_MACRONIX: return VENDOR_MACRONIX; break; diff --git a/u-boot/include/flash.h b/u-boot/include/flash.h index fe4bcfd..3a22656 100644 --- a/u-boot/include/flash.h +++ b/u-boot/include/flash.h @@ -94,6 +94,7 @@ extern u32 write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt); /* FLASH vendors IDs */ #define FLASH_VENDOR_JEDEC_ATMEL 0x1F #define FLASH_VENDOR_JEDEC_EON 0x1C +#define FLASH_VENDOR_JEDEC_GIGADEVICE 0xC8 #define FLASH_VENDOR_JEDEC_MACRONIX 0xC2 #define FLASH_VENDOR_JEDEC_MICRON 0x20 #define FLASH_VENDOR_JEDEC_SPANSION 0x01