Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ESMT F50D1G41LB(2M) #31

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions src/spi_nand_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
#define _SPI_NAND_DEVICE_ID_GD5F4GQ4UCYIG 0xB4
#define _SPI_NAND_DEVICE_ID_GD5F1GQ5UEYIG 0x51
#define _SPI_NAND_DEVICE_ID_GD5F1GQ5REYIG 0x41
#define _SPI_NAND_DEVICE_ID_F50D1G41LB 0x11
#define _SPI_NAND_DEVICE_ID_F50L512M41A 0x20
#define _SPI_NAND_DEVICE_ID_F50L1G41A0 0x21
#define _SPI_NAND_DEVICE_ID_F50L1G41LB 0x01
Expand Down Expand Up @@ -437,6 +438,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_ESMT,
dev_id: _SPI_NAND_DEVICE_ID_F50D1G41LB,
ptr_name: "ESMT F50D1G41LB(2M)",
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_ESMT,
dev_id: _SPI_NAND_DEVICE_ID_F50L512M41A,
Expand Down Expand Up @@ -2377,7 +2392,8 @@ static SPI_NAND_FLASH_RTN_T ecc_fail_check( u32 page_number )
}
}
else if((ptr_dev_info_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_ESMT) &&
((ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_F50L512M41A) ||
((ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_F50D1G41LB) ||
(ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_F50L512M41A) ||
(ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_F50L1G41A0) ||
(ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_F50L1G41LB) ||
(ptr_dev_info_t->dev_id == _SPI_NAND_DEVICE_ID_F50L2G41LB)))
Expand Down Expand Up @@ -3248,7 +3264,8 @@ 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, "After Unlock all block setup, the status register1 = 0x%x\n", feature);
}
else if(((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_ESMT) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_F50L1G41LB)) ||
else if(((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_ESMT) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_F50D1G41LB)) ||
((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_ESMT) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_F50L1G41LB)) ||
((ptr_device_t->mfr_id == _SPI_NAND_MANUFACTURER_ID_ESMT) && (ptr_device_t->dev_id == _SPI_NAND_DEVICE_ID_F50L2G41LB)))
{
if(((ptr_device_t->feature) & SPI_NAND_FLASH_DIE_SELECT_1_HAVE))
Expand Down