Author: uwe
Date: Sat Apr 14 23:59:23 2012
New Revision: 1520
URL: http://flashrom.org/trac/flashrom/changeset/1520

Log:
Add GigaDevice GD25QXX series support.

http://www.gigadevice.com/Product/SPI.php?WebPageTypeId=98&WebPageTypeId2=151&WebPageTypeId3=134

The GD25Q80 has been successfully tested, the other ones are marked as
untested for now.

http://www.flashrom.org/pipermail/flashrom/2012-March/009028.html

Signed-off-by: Justin Chevrier <[email protected]>
Acked-by: Uwe Hermann <[email protected]>

Modified:
   trunk/flashchips.c
   trunk/flashchips.h

Modified: trunk/flashchips.c
==============================================================================
--- trunk/flashchips.c  Sat Apr 14 23:06:31 2012        (r1519)
+++ trunk/flashchips.c  Sat Apr 14 23:59:23 2012        (r1520)
@@ -3709,6 +3709,268 @@
        },
 
        {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q20",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q20,
+               .total_size     = 256,
+               .page_size      = 256,
+               .feature_bits   = FEATURE_WRSR_WREN,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 64} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 8} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 4} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {256 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {256 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q40",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q40,
+               .total_size     = 512,
+               .page_size      = 256,
+               .feature_bits   = FEATURE_WRSR_WREN,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 128} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 16} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 8} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {512 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {512 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q80",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q80,
+               .total_size     = 1024,
+               .page_size      = 256,
+               /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42 */
+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,
+               .tested         = TEST_OK_PREW,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 256} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 32} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 16} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q16",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q16,
+               .total_size     = 2048,
+               .page_size      = 256,
+               /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42 */
+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 512} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 64} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 32} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {2 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {2 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q32",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q32,
+               .total_size     = 4096,
+               .page_size      = 256,
+               /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42 */
+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 1024} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 128} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 64} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {4 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {4 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q64",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q64,
+               .total_size     = 8192,
+               .page_size      = 256,
+               /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42 */
+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 2048} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 256} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 128} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {8 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {8 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+       },
+
+       {
+               .vendor         = "GigaDevice",
+               .name           = "GD25Q128",
+               .bustype        = BUS_SPI,
+               .manufacture_id = GIGADEVICE_ID,
+               .model_id       = GIGADEVICE_GD25Q128,
+               .total_size     = 16384,
+               .page_size      = 256,
+               /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42 */
+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 4096} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 512} },
+                               .block_erase = spi_block_erase_52,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 256} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {16 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {16 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read,
+       },
+
+       {
                .vendor         = "Hyundai",
                .name           = "HY29F002T",
                .bustype        = BUS_PARALLEL,

Modified: trunk/flashchips.h
==============================================================================
--- trunk/flashchips.h  Sat Apr 14 23:06:31 2012        (r1519)
+++ trunk/flashchips.h  Sat Apr 14 23:59:23 2012        (r1520)
@@ -290,6 +290,15 @@
 #define FUJITSU_MBM29LV800BA   0x5B    /* Same as MBM29LV800BE */
 #define FUJITSU_MBM29LV800TA   0xDA    /* Same as MBM29LV800TE */
 
+#define GIGADEVICE_ID          0xC8    /* GigaDevice */
+#define GIGADEVICE_GD25Q20     0x4012
+#define GIGADEVICE_GD25Q40     0x4013
+#define GIGADEVICE_GD25Q80     0x4014
+#define GIGADEVICE_GD25Q16     0x4015
+#define GIGADEVICE_GD25Q32     0x4016
+#define GIGADEVICE_GD25Q64     0x4017
+#define GIGADEVICE_GD25Q128    0x4018
+
 #define HYUNDAI_ID             0xAD    /* Hyundai */
 #define HYUNDAI_HY29F400T      0x23    /* Same as HY29F400AT */
 #define HYUNDAI_HY29F800B      0x58    /* Same as HY29F800AB */

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to