flashchips: Update GigaDevice 1.8V family up to GD25LQ128
These chips all are supposed to support volatile status-register writes
and feature the most usual block-protection bits. The 1.695V limit looks
certainly like a typo. All datasheets found start at 1.65V.
Datasheets used:
https://treetoptech.com/Resources/Datasheets/GD25LQ32C_Rev1.3.pdf
https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20220714/DS-00230-GD25LQ32D-Rev2.2.pdf
https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20240902/DS-00543-GD25LQ32E-Rev1.6.pdf
https://www.mouser.com/datasheet/2/870/gd25lq64c_rev3_4_20190615-2486443.pdf
https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20240729/DS-00593-GD25LQ64E-Rev1.4.pdf
https://www.tme.com/Document/3677f0b602f733a6800806f5bd7a79f9/gd25lq128c.pdf
https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20220714/DS-00291-GD25LQ128D-Rev1.9.pdf
https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20240729/DS-00533-GD25LQ128E-Rev1.2.pdf
Change-Id: I581c3936fbae43f13b01ebf01bf94e68c3150efd
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/302
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/flashchips.c b/flashchips.c
index d7814a5..7fb4f21 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -7262,8 +7262,8 @@
.model_id = GIGADEVICE_GD25LQ128CD,
.total_size = 16384,
.page_size = 256,
- /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
- .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
+ /* OTP: 3x 512B, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
+ .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
.dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
.tested = TEST_OK_PREWB,
.probe = probe_spi_rdid,
@@ -7291,7 +7291,7 @@
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
.write = spi_chip_write_256,
.read = spi_chip_read,
- .voltage = {1695, 1950},
+ .voltage = {1650, 1950},
.reg_bits =
{
.qe = {STATUS2, 1, RW},
@@ -7429,8 +7429,8 @@
.model_id = GIGADEVICE_GD25LQ32,
.total_size = 4096,
.page_size = 256,
- /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
- .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
+ /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
+ .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
.dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
@@ -7454,15 +7454,25 @@
.block_erase = spi_block_erase_c7,
}
},
- .reg_bits =
- {
- .qe = {STATUS2, 1, RW},
- },
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
.write = spi_chip_write_256,
.read = spi_chip_read,
- .voltage = {1695, 1950},
+ .voltage = {1650, 1950},
+ .reg_bits =
+ {
+ .qe = {STATUS2, 1, RW},
+ .srp = {STATUS1, 7, RW},
+ .srl = {STATUS2, 0, RW},
+ .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
+ .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
+ .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
+ .cmp = {STATUS2, 6, RW},
+ },
+ .wp_write_cfg = spi_wp_write_cfg,
+ .wp_read_cfg = spi_wp_read_cfg,
+ .wp_get_ranges = spi_wp_get_available_ranges,
+ .decode_range = decode_range_spi25,
.prepare_access = spi_prepare_io,
.finish_access = spi_finish_io,
},
@@ -7531,8 +7541,8 @@
.model_id = GIGADEVICE_GD25LQ64,
.total_size = 8192,
.page_size = 256,
- /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
- .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
+ /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
+ .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
.dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
.tested = TEST_OK_PREWB,
.probe = probe_spi_rdid,
@@ -7559,8 +7569,8 @@
.printlock = spi_prettyprint_status_register_bp4_srwd,
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
.write = spi_chip_write_256,
- .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
- .voltage = {1695, 1950},
+ .read = spi_chip_read,
+ .voltage = {1650, 1950},
.reg_bits =
{
.qe = {STATUS2, 1, RW},