Add support for GigaDevice SPI NOR chips
authorPiotr Dymacz <pepe2k@gmail.com>
Tue, 2 May 2017 15:50:07 +0000 (17:50 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Tue, 2 May 2017 15:50:07 +0000 (17:50 +0200)
u-boot/common/flash.c
u-boot/include/flash.h

index ee8e01ae75a950e95e8bf0525f949b7b09142c8e..03b9e34e76678bbbecfa51d238e98ab52b47c272 100644 (file)
 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;
index fe4bcfd25f22c4635a82fdaf5cf5d5956e9d759f..3a226568a86cf8ce70389e90f2e422ee4e781bc3 100644 (file)
@@ -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