diff --git a/src/spi_nand_flash.c b/src/spi_nand_flash.c index f05cf91..57c867d 100644 --- a/src/spi_nand_flash.c +++ b/src/spi_nand_flash.c @@ -117,6 +117,7 @@ /* SPI NAND Device ID */ #define _SPI_NAND_DEVICE_ID_GD5F1GQ4UAYIG 0xF1 +#define _SPI_NAND_DEVICE_ID_GD5F1GQ4RB9IG 0xC1 #define _SPI_NAND_DEVICE_ID_GD5F1GQ4UBYIG 0xD1 #define _SPI_NAND_DEVICE_ID_GD5F1GQ4UCYIG 0xB1 #define _SPI_NAND_DEVICE_ID_GD5F2GQ4UBYIG 0xD2 @@ -133,6 +134,8 @@ #define _SPI_NAND_DEVICE_ID_F50L2G41LB 0x0A #define _SPI_NAND_DEVICE_ID_1_W25N01GV 0xAA #define _SPI_NAND_DEVICE_ID_2_W25N01GV 0x21 +#define _SPI_NAND_DEVICE_ID_1_W25N01GW 0xBA +#define _SPI_NAND_DEVICE_ID_2_W25N01GW 0x21 #define _SPI_NAND_DEVICE_ID_1_W25N02KV 0xAA #define _SPI_NAND_DEVICE_ID_2_W25N02KV 0x22 #define _SPI_NAND_DEVICE_ID_1_W25M02GV 0xAB @@ -297,6 +300,20 @@ static const struct SPI_NAND_FLASH_INFO_T spi_nand_flash_tables[] = { feature: SPI_NAND_FLASH_FEATURE_NONE, }, + { + mfr_id: _SPI_NAND_MANUFACTURER_ID_GIGADEVICE, + dev_id: _SPI_NAND_DEVICE_ID_GD5F1GQ4RB9IG, + ptr_name: "GIGADEVICE GD5F1GQ4xBxIG", + device_size: _SPI_NAND_CHIP_SIZE_1GBIT, + page_size: _SPI_NAND_PAGE_SIZE_2KBYTE, + oob_size: _SPI_NAND_OOB_SIZE_128BYTE, + erase_size: _SPI_NAND_BLOCK_SIZE_128KBYTE, + dummy_mode: SPI_NAND_FLASH_READ_DUMMY_BYTE_APPEND, + read_mode: SPI_NAND_FLASH_READ_SPEED_MODE_DUAL, + write_mode: SPI_NAND_FLASH_WRITE_SPEED_MODE_SINGLE, + feature: SPI_NAND_FLASH_FEATURE_NONE, + }, + { mfr_id: _SPI_NAND_MANUFACTURER_ID_GIGADEVICE, dev_id: _SPI_NAND_DEVICE_ID_GD5F1GQ4UBYIG, @@ -508,6 +525,21 @@ static const struct SPI_NAND_FLASH_INFO_T spi_nand_flash_tables[] = { feature: SPI_NAND_FLASH_FEATURE_NONE, }, + { + mfr_id: _SPI_NAND_MANUFACTURER_ID_WINBOND, + dev_id: _SPI_NAND_DEVICE_ID_1_W25N01GW, + dev_id_2: _SPI_NAND_DEVICE_ID_2_W25N01GW, + ptr_name: "WINBOND W25N01G", + device_size: _SPI_NAND_CHIP_SIZE_1GBIT, + page_size: _SPI_NAND_PAGE_SIZE_2KBYTE, + oob_size: _SPI_NAND_OOB_SIZE_64BYTE, + erase_size: _SPI_NAND_BLOCK_SIZE_128KBYTE, + dummy_mode: SPI_NAND_FLASH_READ_DUMMY_BYTE_APPEND, + read_mode: SPI_NAND_FLASH_READ_SPEED_MODE_DUAL, + write_mode: SPI_NAND_FLASH_WRITE_SPEED_MODE_SINGLE, + feature: SPI_NAND_FLASH_FEATURE_NONE, + }, + { mfr_id: _SPI_NAND_MANUFACTURER_ID_WINBOND, dev_id: _SPI_NAND_DEVICE_ID_1_W25N02KV, @@ -2326,6 +2358,7 @@ static SPI_NAND_FLASH_RTN_T ecc_fail_check( u32 page_number ) if((ptr_dev_info_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_GIGADEVICE) && ((ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UAYIG) || + (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4RB9IG) || (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UBYIG) || (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UCYIG) || (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UEYIS) || @@ -2338,6 +2371,7 @@ static SPI_NAND_FLASH_RTN_T ecc_fail_check( u32 page_number ) (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F4GQ4UCYIG))) { if((ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UAYIG) || + (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4RB9IG) || (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UBYIG) || (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UEYIS) || (ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ5UEYIG) || @@ -3145,6 +3179,7 @@ static void spi_nand_manufacute_init( struct SPI_NAND_FLASH_INFO_T *ptr_device_t _SPI_NAND_DEBUG_PRINTF(SPI_NAND_FLASH_DEBUG_LEVEL_1,"SPI NAND Chip Init : Unlock all block and Enable Quad Mode\n"); if(((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_GIGADEVICE) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UAYIG)) || + ((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_GIGADEVICE) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4RB9IG)) || ((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_GIGADEVICE) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UBYIG)) || ((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_GIGADEVICE) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UCYIG)) || ((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_GIGADEVICE) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_GD5F1GQ4UEYIS)) ||