aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Serpell <daniel.serpell@gmail.com>2023-01-24 23:54:43 -0300
committerAntonio Borneo <borneo.antonio@gmail.com>2023-02-03 22:45:20 +0000
commit9d97cace0e95437137e3c57e40347dfcce39ebc9 (patch)
treee1298d01ae7f16820bc49eb517f587fb80ce932d /src
parent0b6f53e94cd81ee9c85ddc122004fa403b9cc454 (diff)
downloadriscv-openocd-9d97cace0e95437137e3c57e40347dfcce39ebc9.zip
riscv-openocd-9d97cace0e95437137e3c57e40347dfcce39ebc9.tar.gz
riscv-openocd-9d97cace0e95437137e3c57e40347dfcce39ebc9.tar.bz2
flash/nor/spi: Add some zbit flash chips.
I have a RP2020 board from aliexpress that uses the ZB25VQ32 flash, this allows openocd to correctly identify it with the full flash size. I also added other models, the datasheets can be found at: Link: https://datasheet.lcsc.com/lcsc/2203210916_Zbit-Semi-ZB25VQ16ASIG_C2982491.pdf Link: https://datasheet.lcsc.com/lcsc/2003141132_Zbit-Semi-ZB25VQ32BSIG_C495744.pdf Link: https://datasheet.lcsc.com/lcsc/2003141132_Zbit-Semi-ZB25VQ64ASIG_C495745.pdf Link: https://datasheet.lcsc.com/lcsc/2006151421_Zbit-Semi-ZB25VQ128ASIG_C609616.pdf As noted by Andreas Bolsch, the devices supporting QSPI have different ID in QPI mode than SPI, so two entries are needed in the table for each one. Use 0x0B as qread command, as this does not need the dummy M7-0 parameters. Signed-off-by: Daniel Serpell <daniel.serpell@gmail.com> Change-Id: Id99187b1963b02ac1a786b66bb352f5f48ed0ac2 Reviewed-on: https://review.openocd.org/c/openocd/+/7445 Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/spi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/flash/nor/spi.c b/src/flash/nor/spi.c
index 373a9a1..9a606d5 100644
--- a/src/flash/nor/spi.c
+++ b/src/flash/nor/spi.c
@@ -112,6 +112,13 @@ const struct flash_device flash_devices[] = {
FLASH_ID("gd gd25q128c", 0x03, 0xeb, 0x02, 0xd8, 0xc7, 0x001840c8, 0x100, 0x10000, 0x1000000),
FLASH_ID("gd gd25q256c", 0x13, 0x00, 0x12, 0xdc, 0xc7, 0x001940c8, 0x100, 0x10000, 0x2000000),
FLASH_ID("gd gd25q512mc", 0x13, 0x00, 0x12, 0xdc, 0xc7, 0x002040c8, 0x100, 0x10000, 0x4000000),
+ FLASH_ID("zbit zb25vq16", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0015605e, 0x100, 0x10000, 0x200000),
+ FLASH_ID("zbit zb25vq32", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0016405e, 0x100, 0x10000, 0x400000),
+ FLASH_ID("zbit zb25vq32", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0016605e, 0x100, 0x10000, 0x400000), /* QPI mode */
+ FLASH_ID("zbit zb25vq64", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0017405e, 0x100, 0x10000, 0x800000),
+ FLASH_ID("zbit zb25vq64", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0017605e, 0x100, 0x10000, 0x800000), /* QPI mode */
+ FLASH_ID("zbit zb25vq128", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0018405e, 0x100, 0x10000, 0x1000000),
+ FLASH_ID("zbit zb25vq128", 0x03, 0x0b, 0x02, 0xd8, 0xc7, 0x0018605e, 0x100, 0x10000, 0x1000000), /* QPI mode */
FLASH_ID("issi is25lq040b", 0x03, 0xeb, 0x02, 0x20, 0xc7, 0x0013409d, 0x100, 0x1000, 0x80000),
FLASH_ID("issi is25lp032", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0016609d, 0x100, 0x10000, 0x400000),
FLASH_ID("issi is25lp064", 0x03, 0x00, 0x02, 0xd8, 0xc7, 0x0017609d, 0x100, 0x10000, 0x800000),