Zerocat Chipflasher  v0.4.3 (board-edition-1)
Flash free firmware to BIOS chips, kick the Manageability Engine.
chipspec.c
Go to the documentation of this file.
1 /******************************************************************/
34  /*
35  * .name = chip's name, i.e. MX25L1605D.
36  * .id_JEDEC = (MSB) 0x00, Manufacturer ID, Model ID, Device ID (LSB)
37  * .chipsize = total chipsize in bytes
38  * .pagesize = size of a page (in bytes)
39  * .sizeOTP = size of otp area
40  * .cmdset = featured commands, selection
41  * .sr_is_static = true, if status register is not initialized during power-up
42  * .sr_wrmask = status register masks, maskout unused bits of the status registers
43  * .sr_bitnames = status register bit names
44  */
45 
46 
47  /*
48  * unknown chip
49  * ============
50  *
51  *
52  */
53  {
54  .name = "unknown",
55  .id_JEDEC = NOT_APPLICABLE,
56  .chipsize = NOT_APPLICABLE,
57  .pagesize = NOT_APPLICABLE,
58  .sizeOTP = NOT_APPLICABLE,
59  .cmdset = 0 \
60  ,
61  .sr_is_static = {
62  0,
63  0,
64  0
65  },
66  .sr_wrmask = {
67  0,
68  0,
69  0
70  },
71  .sr_bitnames = {
72  "",
73  "",
74  ""
75  },
76  },
77 
78  /*
79  * SST25VF016B
80  * ===========
81  *
82  * Datasheet
83  * ---------
84  *
85  * http://ww1.microchip.com/downloads/en/DeviceDoc/20005044C.pdf
86  *
87  * The JEDEC Read ID instruction is terminated by a low to high transition
88  * on CE# at any time during data output. If no other command is issued
89  * after executing the JEDEC Read-ID instruction, issue a 00H (NOP) command
90  * before going into Standby Mode. --> Our NOP Flag
91  *
92  * Notes
93  * -----
94  *
95  * Commands, not used
96  * ------------------
97  *
98  * Standard SPI:
99  * 0x0b, Read High Frequency
100  * 0x70, Enable SO to output programming status
101  * 0x80, Disable SO to output programming status
102  *
103  */
104  {
105  .name = "SST25VF016B",
106  .id_JEDEC = 0x00bf2541,
107  .chipsize = SIZE_16MBIT,
108  .pagesize = NOT_APPLICABLE,
109  .sizeOTP = NOT_APPLICABLE,
110  .cmdset = 0 \
111  | (1 << X00_NOP) \
112  | (1 << X03_READ) \
113  | (1 << X20_SE) \
114  | (1 << X52_BE32K) \
115  | (1 << XD8_BE64K) \
116  | (1 << X60_CE) \
117  | (1 << XC7_CE) \
118  | (1 << X02_BP) \
119  | (1 << XAD_CP) \
120  | (1 << X06_WREN) \
121  | (1 << X04_WRDI) \
122  | (1 << X50_EWSR) \
123  | (1 << X05_RDSR) \
124  | (1 << X01_WRSR) \
125  | (1 << X9F_RDID) \
126  | (1 << XAB_RES) \
127  | (1 << X90_REMS) \
128  ,
129  .sr_is_static = {
130  0b00000000,
131  0,
132  0
133  },
134  .sr_wrmask = {
135  0b10011100,
136  0,
137  0
138  },
139  .sr_bitnames = {
140  "BPL\tAAI\t-\tBP2\tBP1\tBP0\tWEL\tBUSY\t",
141  },
142  },
143 
144  /*
145  * MX25L1605D
146  * ==========
147  *
148  * Datasheet
149  * ---------
150  *
151  * http://www.macronix.com/Lists/Datasheet/Attachments/4978/MX25L6405D,%203V,%2064Mb,%20v1.5.pdf
152  * Version REV. 1.5, APR. 29, 2009
153  *
154  * Some Bits are greyed out without explication.
155  * This chip seems to NOT have bits CP, BP3 in Status Register.
156  *
157  * Notes
158  * -----
159  *
160  * Command XAD_CP doesn't work.
161  * Bits LDSO and SOTPI in SCUR seem to be always zero.
162  * Commands ENSO and EXSO don't work, is there no OTP region accessible?
163  *
164  * Commands, not used
165  * ------------------
166  *
167  * Standard SPI:
168  * 0x0b, Read High Frequency
169  * 0xad, Continuously Program Mode
170  * 0xb1, Enter Secured OTP
171  * 0xc1, Exit Secured OTP
172  * 0x2b, Read Security Register
173  * 0x2f, Write Security Register
174  * 0x70, Enable SO to output programming status
175  * 0x80, Disable SO to output programming status
176  *
177  * Dual SPI:
178  * 0xbb, Read Dual I/O
179  * 0xef, REMS Dual I/O
180  *
181  */
182  {
183  .name = "MX25L1605D",
184  .id_JEDEC = 0x00c22015,
185  .chipsize = SIZE_16MBIT,
186  .pagesize = SIZE_256,
187  .sizeOTP = NOT_APPLICABLE,
188  .cmdset = 0 \
189  | (1 << X03_READ) \
190  | (1 << X20_SE) \
191  | (1 << XD8_BE64K) \
192  | (1 << X60_CE) \
193  | (1 << XC7_CE) \
194  | (1 << X02_BP) \
195  | (1 << X02_PP) \
196  | (1 << X06_WREN) \
197  | (1 << X04_WRDI) \
198  | (1 << X05_RDSR) \
199  | (1 << X01_WRSR) \
200  | (1 << X9F_RDID) \
201  | (1 << XB9_DP) \
202  | (1 << XAB_RDP) \
203  | (1 << XAB_RES) \
204  | (1 << X90_REMS) \
205  ,
206  .sr_is_static = {
207  0b10011100, //according to datasheet, bit5 is non-volatile?
208  0,
209  0
210  },
211  .sr_wrmask = {
212  0b10011100, //according to datasheet, bit5 should be writable?
213  0,
214  0
215  },
216  .sr_bitnames = {
217  "SRWD\tCP\tBP3\tBP2\tBP1\tBP0\tWEL\tWIP\t",
218  },
219  },
220 
221  /*
222  * MX25L3205D
223  * ==========
224  *
225  * Datasheet
226  * ---------
227  *
228  * Same as MX25L1605D.
229  *
230  *
231  * Notes
232  * -----
233  *
234  * Commands, not used
235  * ------------------
236  *
237  * Standard SPI:
238  * 0x0b, Read High Frequency
239  * 0xb1, Enter Secured OTP
240  * 0xc1, Exit Secured OTP
241  * 0x2b, Read Security Register
242  * 0x2f, Write Security Register
243  * 0x70, Enable SO to output programming status
244  * 0x80, Disable SO to output programming status
245  *
246  * Dual SPI:
247  * 0xbb, Read Dual I/O
248  * 0xef, REMS Dual I/O
249  *
250  */
251  {
252  .name = "MX25L3205D",
253  .id_JEDEC = 0x00c22016,
254  .chipsize = SIZE_32MBIT,
255  .pagesize = SIZE_256,
256  .sizeOTP = NOT_APPLICABLE,
257  .cmdset = 0 \
258  | (1 << X03_READ) \
259  | (1 << X20_SE) \
260  | (1 << XD8_BE64K) \
261  | (1 << X60_CE) \
262  | (1 << XC7_CE) \
263  | (1 << X02_BP) \
264  | (1 << X02_PP) \
265  | (1 << XAD_CP) \
266  | (1 << X06_WREN) \
267  | (1 << X04_WRDI) \
268  | (1 << X05_RDSR) \
269  | (1 << X01_WRSR) \
270  | (1 << X9F_RDID) \
271  | (1 << XB9_DP) \
272  | (1 << XAB_RDP) \
273  | (1 << XAB_RES) \
274  | (1 << X90_REMS) \
275  ,
276  .sr_is_static = {
277  0b10111100,
278  0,
279  0
280  },
281  .sr_wrmask = {
282  0b10111100,
283  0,
284  0
285  },
286  .sr_bitnames = {
287  "SRWD\tCP\tBP3\tBP2\tBP1\tBP0\tWEL\tWIP\t",
288  },
289  },
290 
291  /*
292  * MX25L6405D
293  * ==========
294  *
295  * Datasheet
296  * ---------
297  *
298  * Same as MX25L1605D.
299  *
300  *
301  * Notes
302  * -----
303  *
304  * Commands, not used
305  * ------------------
306  *
307  * Standard SPI:
308  * 0x0b, Read High Frequency
309  * 0xb1, Enter Secured OTP
310  * 0xc1, Exit Secured OTP
311  * 0x2b, Read Security Register
312  * 0x2f, Write Security Register
313  * 0x70, Enable SO to output programming status
314  * 0x80, Disable SO to output programming status
315  *
316  * Dual SPI:
317  * 0xbb, Read Dual I/O
318  * 0xef, REMS Dual I/O
319  *
320  */
321  {
322  .name = "MX25L6405D",
323  .id_JEDEC = 0x00c22017,
324  .chipsize = SIZE_64MBIT,
325  .pagesize = SIZE_256,
326  .sizeOTP = NOT_APPLICABLE,
327  .cmdset = 0 \
328  | (1 << X03_READ) \
329  | (1 << X20_SE) \
330  | (1 << XD8_BE64K) \
331  | (1 << X60_CE) \
332  | (1 << XC7_CE) \
333  | (1 << X02_BP) \
334  | (1 << X02_PP) \
335  | (1 << XAD_CP) \
336  | (1 << X06_WREN) \
337  | (1 << X04_WRDI) \
338  | (1 << X05_RDSR) \
339  | (1 << X01_WRSR) \
340  | (1 << X9F_RDID) \
341  | (1 << XB9_DP) \
342  | (1 << XAB_RDP) \
343  | (1 << XAB_RES) \
344  | (1 << X90_REMS) \
345  ,
346  .sr_is_static = {
347  0b10111100,
348  0,
349  0
350  },
351  .sr_wrmask = {
352  0b10111100,
353  0,
354  0
355  },
356  .sr_bitnames = {
357  "SRWD\tCP\tBP3\tBP2\tBP1\tBP0\tWEL\tWIP\t",
358  },
359  },
360 
361  /*
362  * MX25L8005
363  * =========
364  *
365  * Datasheet
366  * ---------
367  *
368  * Version REV. 2.2, OCT. 23, 2008
369  *
370  * Clock Frequency for READ instructions: min. 1KHz
371  * According to datasheet, the chip supports page programming only.
372  *
373  * Notes
374  * -----
375  *
376  * Commands, not used
377  * ------------------
378  *
379  * Standard SPI:
380  * 0x0b, Read High Frequency
381  * 0x52, Erase Block 32K (would address a 64k block instead)
382  *
383  */
384  {
385  .name = "MX25L8005",
386  .id_JEDEC = 0x00c22014,
387  .chipsize = SIZE_64MBIT,
388  .pagesize = SIZE_256,
389  .sizeOTP = NOT_APPLICABLE,
390  .cmdset = 0 \
391  | (1 << X03_READ) \
392  | (1 << X20_SE) \
393  | (1 << XD8_BE64K) \
394  | (1 << X60_CE) \
395  | (1 << XC7_CE) \
396  | (1 << X02_BP) \
397  | (1 << X02_PP) \
398  | (1 << X06_WREN) \
399  | (1 << X04_WRDI) \
400  | (1 << X05_RDSR) \
401  | (1 << X01_WRSR) \
402  | (1 << X9F_RDID) \
403  | (1 << XB9_DP) \
404  | (1 << XAB_RDP) \
405  | (1 << XAB_RES) \
406  | (1 << X90_REMS) \
407  ,
408  .sr_is_static = {
409  0b10011100,
410  0,
411  0
412  },
413  .sr_wrmask = {
414  0b10011100,
415  0,
416  0
417  },
418  .sr_bitnames = {
419  "SRWD\t-\t-\tBP2\tBP1\tBP0\tWEL\tWIP\t",
420  },
421  },
422 
423  /*
424  * AT26DF161
425  * =========
426  *
427  * Datasheet
428  * ---------
429  *
430  * http://www.gaw.ru/pdf/Atmel/at26/AT26DF161.pdf
431  *
432  *
433  * Notes
434  * -----
435  *
436  * Status Register: Only bit 7 is modifyable by user.
437  *
438  *
439  * Commands, not used
440  * ------------------
441  *
442  * Standard SPI:
443  * 0x0b, Read High Frequency
444  * 0x3c, Read Sector Protection Registers
445  *
446  */
447  {
448  .name = "AT26DF161",
449  .id_JEDEC = ID_JEDEC_AT26DF161,
450  .chipsize = SIZE_16MBIT,
451  .pagesize = SIZE_256,
452  .sizeOTP = NOT_APPLICABLE,
453  .cmdset = 0 \
454  | (1 << X00_NOP) \
455  | (1 << X03_READ) \
456  | (1 << X20_SE) \
457  | (1 << X52_BE32K) \
458  | (1 << XD8_BE64K) \
459  | (1 << X60_CE) \
460  | (1 << XC7_CE) \
461  | (1 << X02_PP) \
462  | (1 << X02_BP) \
463  | (1 << X06_WREN) \
464  | (1 << X04_WRDI) \
465  | (1 << X05_RDSR) \
466  | (1 << X01_WRSR) \
467  | (1 << X9F_RDID) \
468  | (1 << XAB_RDP) \
469  | (1 << XB9_DP) \
470  | (1 << X36_PS) \
471  | (1 << X39_US) \
472  ,
473  .sr_is_static = {
474  0b00000000,
475  0,
476  0
477  },
478  .sr_wrmask = {
479  0b10000000,
480  0,
481  0
482  },
483  .sr_bitnames = {
484  "SPRL\t-\t-\tWPP\tSWP1\tSWP0\tWEL\tBUSY\t",
485  "",
486  ""
487  },
488  },
489 
490  /*
491  * AT26DF321
492  * =========
493  *
494  * Datasheet
495  * ---------
496  *
497  * Version 3633E–DFLASH–10/07
498  *
499  * In a certain percentage of units, the Chip Erase feature may not function
500  * correctly and may adversely affect device operation. Therefore, it is
501  * recommended that the Chip Erase commands (opcodes 60h and C7h) not be used.
502  *
503  *
504  * Notes
505  * -----
506  *
507  * Global protect/unprotect is supported via X01_WRSR & sr_bitmask 0b10111100.
508  * Write 0x00111100 in order to activate global protect.
509  * Write 0x00000000 in order to activate global unprotect.
510  *
511  * NOTE: Only bit 7 of the Status Register will be modified when using
512  * the Write Status Register command.
513  *
514  *
515  * Commands, not used
516  * ------------------
517  *
518  * Standard SPI:
519  * 0x3c, Read Sector Protection Registers
520  * 0x60, Chip Erase
521  * 0xc7, Chip Erase
522  * 0x0b, Read High Frequency
523  *
524  */
525  {
526  .name = "AT26DF321",
527  .id_JEDEC = ID_JEDEC_AT26DF321,
528  .chipsize = SIZE_32MBIT,
529  .pagesize = SIZE_256,
530  .sizeOTP = NOT_APPLICABLE,
531  .cmdset = 0 \
532  | (1 << X03_READ) \
533  | (1 << X20_SE) \
534  | (1 << X52_BE32K) \
535  | (1 << XD8_BE64K) \
536  | (1 << X02_BP) \
537  | (1 << X02_PP) \
538  | (1 << X06_WREN) \
539  | (1 << X04_WRDI) \
540  | (1 << X05_RDSR) \
541  | (1 << X01_WRSR) \
542  | (1 << X9F_RDID) \
543  | (1 << XB9_DP) \
544  | (1 << XAB_RDP) \
545  | (1 << X36_PS) \
546  | (1 << X39_US) \
547  ,
548  .sr_is_static = {
549  0b00000000,
550  0,
551  0
552  },
553  .sr_wrmask = {
554  0b10000000,
555  0,
556  0
557  },
558  .sr_bitnames = {
559  "SPRL\t-\tEPE\tWPP\tSWP1\tSWP0\tWEL\tR/B\t",
560  "",
561  ""
562  },
563  },
564 
565  /*
566  * W25X40
567  * ======
568  *
569  * SERIAL FLASH MEMORY WITH 4KB SECTORS AND DUAL OUTPUT SPI
570  *
571  * Datasheet
572  * ---------
573  *
574  * Publication Release Date: September 22, 2006;
575  * Preliminary - Revision I
576  *
577  * Notes
578  * -----
579  *
580  * Pin #WP has no effect if SRP-Bit is zero (default).
581  * Other Chip Sizes: 1MBit (0xEF3011), 2MBit (0xEF3012), 8MBit (0xEF3014).
582  *
583  * Commands, not used
584  * ------------------
585  *
586  * Standard SPI:
587  * 0x0b, Read High Frequency
588  *
589  * Dual SPI:
590  * 0x3b, Fast Read Dual Output
591  *
592  */
593  {
594  .name = "W25X40",
595  .id_JEDEC = 0x00ef3013,
596  .chipsize = SIZE_4MBIT,
597  .pagesize = SIZE_256,
598  .sizeOTP = NOT_APPLICABLE,
599  .cmdset = 0 \
600  | (1 << X03_READ) \
601  | (1 << X20_SE) \
602  | (1 << XD8_BE64K) \
603  | (1 << XC7_CE) \
604  | (1 << X02_PP) \
605  | (1 << X02_BP) \
606  | (1 << X06_WREN) \
607  | (1 << X04_WRDI) \
608  | (1 << X05_RDSR) \
609  | (1 << X01_WRSR) \
610  | (1 << X9F_RDID) \
611  | (1 << XB9_DP) \
612  | (1 << XAB_RDP) \
613  | (1 << X90_REMS) \
614  ,
615  .sr_is_static = {
616  0b10111100,
617  0,
618  0
619  },
620  .sr_wrmask = {
621  0b10111100,
622  0,
623  0
624  },
625  .sr_bitnames = {
626  "SRP\t-\tTB\tBP2\tBP1\tBP0\tWEL\tBUSY\t",
627  },
628  },
629 
630  /*
631  * W25X64
632  * ======
633  *
634  * Datasheet
635  * ---------
636  *
637  * Notes
638  * -----
639  *
640  * Commands, not used
641  * ------------------
642  *
643  * Standard SPI:
644  * 0x0b, Read High Frequency
645  *
646  */
647  {
648  .name = "W25X64",
649  .id_JEDEC = 0x00ef3017,
650  .chipsize = SIZE_64MBIT,
651  .pagesize = SIZE_256,
652  .sizeOTP = NOT_APPLICABLE,
653  .cmdset = 0 \
654  | (1 << X03_READ) \
655  | (1 << X20_SE) \
656  | (1 << XD8_BE64K) \
657  | (1 << XC7_CE) \
658  | (1 << X02_PP) \
659  | (1 << X02_BP) \
660  | (1 << X06_WREN) \
661  | (1 << X04_WRDI) \
662  | (1 << X05_RDSR) \
663  | (1 << X01_WRSR) \
664  | (1 << X9F_RDID) \
665  | (1 << XB9_DP) \
666  | (1 << XAB_RDP) \
667  | (1 << XAB_RES) \
668  | (1 << X90_REMS) \
669  ,
670  .sr_is_static = {
671  0b10111100,
672  0,
673  0
674  },
675  .sr_wrmask = {
676  0b10111100,
677  0,
678  0
679  },
680  .sr_bitnames = {
681  "SRP\t-\tTB\tBP2\tBP1\tBP0\tWEL\tBUSY\t",
682  },
683  },
684 
685  /*
686  * SST25VF080B
687  * ===========
688  *
689  * Datasheet
690  * ---------
691  *
692  * Version DS20005045C
693  *
694  *
695  * Notes
696  * -----
697  *
698  * After power-up, the BPL bit is reset to 0.
699  * Default at power-up for BP0, BP1 and BP2 is 1.
700  *
701  * The JEDEC Read ID instruction is terminated by a low to high transition
702  * on CE# at any time during data output.
703  *
704  * Commands, not used
705  * ------------------
706  *
707  * Standard SPI:
708  * 0x0b, Read High Frequency
709  * 0x70, Enable SO to output programming status
710  * 0x80, Disable SO to output programming status
711  *
712  */
713  {
714  .name = "SST25VF080B",
715  .id_JEDEC = 0x00bf258e,
716  .chipsize = SIZE_64MBIT,
717  .pagesize = NOT_APPLICABLE,
718  .sizeOTP = NOT_APPLICABLE,
719  .cmdset = 0 \
720  | (1 << X03_READ) \
721  | (1 << X20_SE) \
722  | (1 << X52_BE32K) \
723  | (1 << XD8_BE64K) \
724  | (1 << X60_CE) \
725  | (1 << XC7_CE) \
726  | (1 << X02_BP) \
727  | (1 << XAD_CP) \
728  | (1 << X06_WREN) \
729  | (1 << X04_WRDI) \
730  | (1 << X50_EWSR) \
731  | (1 << X05_RDSR) \
732  | (1 << X01_WRSR) \
733  | (1 << X9F_RDID) \
734  | (1 << XAB_RES) \
735  | (1 << X90_REMS) \
736  ,
737  .sr_is_static = {
738  0b00000000,
739  0,
740  0
741  },
742  .sr_wrmask = {
743  0b10011100,
744  0,
745  0
746  },
747  .sr_bitnames = {
748  "BPL\tAAI\tBP3\tBP2\tBP1\tBP0\tWEL\tBUSY\t",
749  },
750  },
751 
752  /*
753  * W25Q32FV
754  * ========
755  *
756  * V = 2.7V to 3.6V
757  * Q = Green Package with QE=1 in Status Register 2
758  *
759  * Datasheet
760  * ---------
761  *
762  * https://www.winbond.com/resource-files/w25q32fv%20revi%2010202015.pdf
763  *
764  * WARNING: If the /WP or /HOLD pins are tied directly to the power
765  * supply or ground during standard SPI or Dual SPI operation, the QE
766  * bit should never be set to a 1.
767  *
768  * Notes
769  * -----
770  *
771  * We are not using X50_WRSR, thus using static SR bits!
772  *
773  * Commands, not used:
774  * -------------------
775  *
776  * Standard SPI:
777  * 0x0b, Read High Frequency
778  * 0x50, Write Status Register Bits as Volatiles
779  * 0x75, Erase/ Program Suspend
780  * 0x7a, Erase/ Program Resume
781  * 0x7e, Global Block Lock
782  * 0x98, Global Block Unlock
783  * 0x38, Enter QPI Mode
784  * 0x66, Enable Reset
785  * 0x99, Reset Device
786  * 0x4b, Read Unique ID
787  * 0x32, Quad Page Program
788  * 0x5a, Read SFDP Register
789  * 0x44, Erase Security Register
790  * 0x42, Program Security Register
791  * 0x48, Read Security Register
792  * 0x36, Individual Block Lock
793  * 0x39, Individual Block Unlock
794  * 0x3d, Read Block Lock
795  *
796  * Dual SPI:
797  * 0x3b, Read High Frequency Dual Output
798  * 0xbb, Read High Frequency Dual I/O
799  * 0x92, Manufaturer ID, Device ID, Dual I/O
800  *
801  * Quad SPI:
802  * 0x6b, Read High Frequency Quad Output
803  * 0x77, Set Burst With Wrap
804  * 0xeb, Read High Frequency Quad I/O
805  * 0xe7, Word Read Quad I/O
806  * 0xe3, Octal Word Read Quad I/O
807  * 0x94, Manufacturer ID, Device ID, Quad I/O
808  * 0xff, Exit QPI Mode
809  * 0xc0, Set Read Parameters
810  * 0x0c, Burst Read With Wrap
811  *
812  */
813  {
814  .name = "W25Q32FV",
815  .id_JEDEC = 0x00ef4016, //0x00ef6016 in QPI mode
816  .chipsize = SIZE_32MBIT,
817  .pagesize = SIZE_256,
818  .sizeOTP = NOT_APPLICABLE,
819  .cmdset = 0 \
820  | (1 << X03_READ) \
821  | (1 << X20_SE) \
822  | (1 << X52_BE32K) \
823  | (1 << XD8_BE64K) \
824  | (1 << X60_CE) \
825  | (1 << XC7_CE) \
826  | (1 << X02_PP) \
827  | (1 << X06_WREN) \
828  | (1 << X04_WRDI) \
829  | (1 << X05_RDSR) \
830  | (1 << X35_RDSR2) \
831  | (1 << X15_RDSR3) \
832  | (1 << X01_WRSR) \
833  | (1 << X31_WRSR2) \
834  | (1 << X11_WRSR3) \
835  | (1 << X9F_RDID) \
836  | (1 << XB9_DP) \
837  | (1 << XAB_RDP) \
838  | (1 << XAB_RES) \
839  | (1 << X90_REMS) \
840  ,
841  .sr_is_static = {
842  0b11111100,
843  0b01111011, //S13..11 = Non-volatile OTP Writable!
844  0b11100100
845  },
846  .sr_wrmask = {
847  0b11111100,
848  0b01000011, //S15 = SUS, is status only; S13..11 = OTP Lock Bits!
849  0b11100100,
850  },
851  .sr_bitnames = {
852  "SRP0\tSEC\tTB\tBP2\tBP1\tBP0\tWEL\tBUSY\t", //S7..S0
853  "SUS\tCMP\tLB3\tLB2\tLB1\t-\tQE\tSRP1\t", //S15..S8
854  "HLD/RST\tDRV1\tDRV0\t-\t-\tWPS\t-\t-\t", //S23..S16
855  },
856  },
857 
858  /*
859  * W25Q64FV
860  * ========
861  *
862  * V = 2.7V to 3.6V
863  * Q = Green Package with QE=1 in Status Register 2
864  *
865  * Datasheet
866  * ---------
867  *
868  * https://www.winbond.com/resource-files/w25q64fv revr 10262016.pdf
869  *
870  * WARNING: If the /WP or /HOLD pins are tied directly to the power
871  * supply or ground during standard SPI or Dual SPI operation, the QE
872  * bit should never be set to a 1.
873  *
874  * Notes
875  * -----
876  *
877  * We are not using X50_WRSR, thus using static SR bits!
878  *
879  * Commands, not used:
880  * -------------------
881  *
882  * Standard SPI:
883  * 0x0b, Read High Frequency
884  * 0x50, Write Status Register Bits as Volatiles
885  * 0x75, Erase/ Program Suspend
886  * 0x7a, Erase/ Program Resume
887  * 0x4b, Read Unique ID
888  * 0x5a, Read SFDP Register
889  * 0x44, Erase Security Register
890  * 0x42, Program Security Register
891  * 0x48, Read Security Register
892  * 0x38, Enter QPI Mode
893  * 0x66, Enable Reset
894  * 0x99, Reset Device
895  *
896  * Dual SPI:
897  * 0x3b, Read High Frequency Dual Output
898  * 0xbb, Read High Frequency Dual I/O
899  * 0x92, Manufaturer ID, Device ID, Dual I/O
900  *
901  * Quad SPI:
902  * 0x32, Quad Page Program
903  * 0x6b, Read High Frequency Quad Output
904  * 0xeb, Read High Frequency Quad I/O
905  * 0xe7, Word Read Quad I/O
906  * 0xe3, Octal Word Read Quad I/O
907  * 0x77, Set Burst With Wrap
908  * 0x94, Manufacturer ID, Device ID, Quad I/O
909  * 0xc0, Set Read Parameters
910  * 0x0c, Burst Read With Wrap
911  * 0xff, Exit QPI Mode
912  *
913  */
914  {
915  .name = "W25Q64FV",
916  .id_JEDEC = 0x00ef4017, //0x00ef6017 in QPI mode
917  .chipsize = SIZE_64MBIT,
918  .pagesize = SIZE_256,
919  .sizeOTP = NOT_APPLICABLE,
920  .cmdset = 0 \
921  | (1 << X03_READ) \
922  | (1 << X20_SE) \
923  | (1 << X52_BE32K) \
924  | (1 << XD8_BE64K) \
925  | (1 << X60_CE) \
926  | (1 << XC7_CE) \
927  | (1 << X02_PP) \
928  | (1 << X06_WREN) \
929  | (1 << X04_WRDI) \
930  | (1 << X05_RDSR) \
931  | (1 << X35_RDSR2) \
932  | (1 << X01_WRSR) \
933  | (1 << X9F_RDID) \
934  | (1 << XB9_DP) \
935  | (1 << XAB_RDP) \
936  | (1 << XAB_RES) \
937  | (1 << X90_REMS) \
938  ,
939  .sr_is_static = {
940  0b11111100,
941  0b01111011,
942  0
943  },
944  .sr_wrmask = {
945  0b11111100,
946  0b01000011, //S15 = SUS, is status only; S13..11 = OTP Lock Bits
947  0
948  },
949  .sr_bitnames = {
950  "SRP0\tSEC\tTB\tBP2\tBP1\tBP0\tWEL\tBUSY\t", //S7..S0
951  "SUS\tCMP\tLB3\tLB2\tLB1\t-\tQE\tSRP1\t", //S15..S8
952  },
953  },
954 };
X20_SE
#define X20_SE
Definition: chipspec.h:121
X39_US
#define X39_US
Definition: chipspec.h:148
SIZE_32MBIT
#define SIZE_32MBIT
Chipsize 32Mbit.
Definition: chipspec.h:95
X60_CE
#define X60_CE
Definition: chipspec.h:124
X35_RDSR2
#define X35_RDSR2
Definition: chipspec.h:151
SIZE_64MBIT
#define SIZE_64MBIT
Chipsize 64Mbit.
Definition: chipspec.h:96
X50_EWSR
#define X50_EWSR
Definition: chipspec.h:132
X04_WRDI
#define X04_WRDI
Definition: chipspec.h:131
X9F_RDID
#define X9F_RDID
Definition: chipspec.h:140
ARRAY_CHIPSPEC
#define ARRAY_CHIPSPEC
Number of entries in chipspec database.
Definition: chipspec.h:69
tag_chipspec::name
char name[15]
chip's name, i.e. MX25L1605D
Definition: chipspec.h:167
SIZE_4MBIT
#define SIZE_4MBIT
Chipsize 4Mbit.
Definition: chipspec.h:92
chipspec
struct tag_chipspec chipspec[ARRAY_CHIPSPEC]
Database of supported chips. These chips are usually found on motherboards, which are compatible with...
Definition: chipspec.c:33
X05_RDSR
#define X05_RDSR
Definition: chipspec.h:134
XC7_CE
#define XC7_CE
Definition: chipspec.h:125
ID_JEDEC_AT26DF161
#define ID_JEDEC_AT26DF161
Definition: chipspec.h:108
X52_BE32K
#define X52_BE32K
Definition: chipspec.h:122
X03_READ
#define X03_READ
Definition: chipspec.h:118
XAD_CP
#define XAD_CP
Definition: chipspec.h:127
X15_RDSR3
#define X15_RDSR3
Definition: chipspec.h:152
X02_BP
#define X02_BP
Definition: chipspec.h:128
SIZE_256
#define SIZE_256
Usual page size.
Definition: chipspec.h:86
XAB_RDP
#define XAB_RDP
Definition: chipspec.h:142
X90_REMS
#define X90_REMS
Definition: chipspec.h:145
tag_chipspec::sr_is_static
const unsigned char sr_is_static[3]
True, if Status Register is not initialized during Power-Up.
Definition: chipspec.h:173
X01_WRSR
#define X01_WRSR
Definition: chipspec.h:135
X31_WRSR2
#define X31_WRSR2
Definition: chipspec.h:153
X02_PP
#define X02_PP
Definition: chipspec.h:126
X00_NOP
#define X00_NOP
Definition: chipspec.h:138
XB9_DP
#define XB9_DP
Definition: chipspec.h:141
X11_WRSR3
#define X11_WRSR3
Definition: chipspec.h:154
ID_JEDEC_AT26DF321
#define ID_JEDEC_AT26DF321
Definition: chipspec.h:107
NOT_APPLICABLE
#define NOT_APPLICABLE
some chipspec members may not make sense for some chips
Definition: kick.h:70
X06_WREN
#define X06_WREN
Definition: chipspec.h:130
XD8_BE64K
#define XD8_BE64K
Definition: chipspec.h:123
X36_PS
#define X36_PS
Definition: chipspec.h:147
SIZE_16MBIT
#define SIZE_16MBIT
Chipsize 16Mbit.
Definition: chipspec.h:94
tag_chipspec
Chip specifications, provided within the source code.
Definition: chipspec.h:166
XAB_RES
#define XAB_RES
Definition: chipspec.h:144