annotate loadtools/fldevs.c @ 1004:d15d337ac0a9

loadtools/scripts: remove long-deprecated -h gta02 config
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 09 Dec 2023 18:35:30 +0000
parents ad3041e19884
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This module holds the tables of supported flash devices
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include <stdint.h>
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include "flash.h"
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 extern struct flash_cmdset flash_cmdset_amd;
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 extern struct flash_cmdset flash_cmdset_intel;
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 extern struct flash_cmdset flash_cmdset_intel_w30;
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
12 extern int plj_ppb_program_one();
983
0407d14fb854 PL-J flash PPB ops: rework for full verification of lock state
Mychaela Falconia <falcon@freecalypso.org>
parents: 980
diff changeset
13 extern int plj_ppb_program_all();
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
14 extern int plj_ppb_erase_all_single();
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
15 extern int plj_ppb_erase_all_dualbank();
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
16
994
ad3041e19884 fc-loadtool flash: implement PPB ops for Spansion PL-N
Mychaela Falconia <falcon@freecalypso.org>
parents: 992
diff changeset
17 extern int pln_ppb_program_one();
ad3041e19884 fc-loadtool flash: implement PPB ops for Spansion PL-N
Mychaela Falconia <falcon@freecalypso.org>
parents: 992
diff changeset
18 extern int pln_ppb_erase_all();
ad3041e19884 fc-loadtool flash: implement PPB ops for Spansion PL-N
Mychaela Falconia <falcon@freecalypso.org>
parents: 992
diff changeset
19
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 /* flash bank geometries */
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 static struct flash_geom geom_2M_topboot = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 .total_size = 0x200000,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 .nregions = 2,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 .regions = {0x10000, 31, 0x2000, 8},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 .total_sectors = 39,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
29 static struct flash_geom geom_2M_bottomboot = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
30 .total_size = 0x200000,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
31 .nregions = 2,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
32 .regions = {0x2000, 8, 0x10000, 31},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
33 .total_sectors = 39,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
34 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
35
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 static struct flash_geom geom_4M_topboot = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 .total_size = 0x400000,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 .nregions = 2,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 .regions = {0x10000, 63, 0x2000, 8},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 .total_sectors = 71,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
43 static struct flash_geom geom_4M_bottomboot = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
44 .total_size = 0x400000,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
45 .nregions = 2,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
46 .regions = {0x2000, 8, 0x10000, 63},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
47 .total_sectors = 71,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
48 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
49
523
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
50 static struct flash_geom geom_4M_bothends = {
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
51 .total_size = 0x400000,
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
52 .nregions = 3,
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
53 .regions = {0x2000, 8, 0x10000, 62, 0x2000, 8},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
54 .total_sectors = 78,
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
55 };
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
56
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 static struct flash_geom geom_8M_topboot = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 .total_size = 0x800000,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 .nregions = 2,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 .regions = {0x10000, 127, 0x2000, 8},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 .total_sectors = 135,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 static struct flash_geom geom_8M_bottomboot = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 .total_size = 0x800000,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 .nregions = 2,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 .regions = {0x2000, 8, 0x10000, 127},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 .total_sectors = 135,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
553
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
71 static struct flash_geom geom_8M_bothends = {
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
72 .total_size = 0x800000,
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
73 .nregions = 3,
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
74 .regions = {0x2000, 8, 0x10000, 126, 0x2000, 8},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
75 .total_sectors = 142,
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
76 };
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
77
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 static struct flash_geom geom_8M_topboot_big = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 .total_size = 0x800000,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 .nregions = 2,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 .regions = {0x40000, 31, 0x10000, 4},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 .total_sectors = 35,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 static struct flash_geom geom_8M_bottomboot_big = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 .total_size = 0x800000,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 .nregions = 2,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 .regions = {0x10000, 4, 0x40000, 31},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 .total_sectors = 35,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 /* Intel and compatible flash chips */
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 static struct cfi_check intel_2M_topboot_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 {0x13, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 {0x27, 0x15},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 {0x2C, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 {0x2D, 0x1E},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 {0x2F, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 {0x30, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 {0x31, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 {0x33, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 {0x34, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
113 static struct cfi_check intel_2M_bottomboot_cfi[] = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
114 {0x10, 'Q'},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
115 {0x11, 'R'},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
116 {0x12, 'Y'},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
117 {0x13, 0x03},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
118 {0x14, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
119 {0x27, 0x15},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
120 {0x2C, 0x02},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
121 {0x2D, 0x07},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
122 {0x2E, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
123 {0x2F, 0x20},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
124 {0x30, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
125 {0x31, 0x1E},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
126 {0x32, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
127 {0x33, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
128 {0x34, 0x01},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
129 {-1, 0}
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
130 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
131
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 static struct cfi_check intel_4M_topboot_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 {0x13, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 {0x27, 0x16},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 {0x2C, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 {0x2D, 0x3E},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 {0x2F, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 {0x30, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 {0x31, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 {0x33, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 {0x34, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
151 static struct cfi_check intel_4M_bottomboot_cfi[] = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
152 {0x10, 'Q'},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
153 {0x11, 'R'},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
154 {0x12, 'Y'},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
155 {0x13, 0x03},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
156 {0x14, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
157 {0x27, 0x16},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
158 {0x2C, 0x02},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
159 {0x2D, 0x07},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
160 {0x2E, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
161 {0x2F, 0x20},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
162 {0x30, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
163 {0x31, 0x3E},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
164 {0x32, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
165 {0x33, 0x00},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
166 {0x34, 0x01},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
167 {-1, 0}
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
168 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
169
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 static struct cfi_check intel_8M_topboot_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 {0x13, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 {0x27, 0x17},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 {0x2C, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 {0x2D, 0x7E},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 {0x2F, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 {0x30, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 {0x31, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 {0x33, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 {0x34, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 static struct cfi_check intel_8M_bottomboot_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 {0x13, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 {0x27, 0x17},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 {0x2C, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 {0x2D, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 {0x2F, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 {0x30, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 {0x31, 0x7E},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 {0x33, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 {0x34, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
208 /* classic Intel C3 family: found in low-end Mot C1xx models and BenQ M32 */
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
209
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 struct flash_device flashdev_28F160C3T = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 .name = "Intel 28F160C3T",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 .cfi_table = intel_2M_topboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 .bank_geom = {&geom_2M_topboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 .cmdset = &flash_cmdset_intel,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
218 struct flash_device flashdev_28F160C3B = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
219 .name = "Intel 28F160C3B",
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
220 .cfi_table = intel_2M_bottomboot_cfi,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
221 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
222 .bank_geom = {&geom_2M_bottomboot, 0},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
223 .cmdset = &flash_cmdset_intel,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
224 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
225
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 struct flash_device flashdev_28F320C3T = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 .name = "Intel 28F320C3T",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 .cfi_table = intel_4M_topboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 .bank_geom = {&geom_4M_topboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 .cmdset = &flash_cmdset_intel,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
234 struct flash_device flashdev_28F320C3B = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
235 .name = "Intel 28F320C3B",
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
236 .cfi_table = intel_4M_bottomboot_cfi,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
237 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
238 .bank_geom = {&geom_4M_bottomboot, 0},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
239 .cmdset = &flash_cmdset_intel,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
240 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
241
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 struct flash_device flashdev_28F640C3T = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 .name = "Intel 28F640C3T",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 .cfi_table = intel_8M_topboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_8M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 .bank_geom = {&geom_8M_topboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 .cmdset = &flash_cmdset_intel,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 struct flash_device flashdev_28F640C3B = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 .name = "Intel 28F640C3B",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 .cfi_table = intel_8M_bottomboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_8M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 .bank_geom = {&geom_8M_bottomboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 .cmdset = &flash_cmdset_intel,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257
973
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
258 /*
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
259 * Intel W18 and W30 families are equivalent in terms of geometries and
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
260 * relevant quirks, and are distinguishable only by ID codes. We treat them
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
261 * all as W30, based on the latter family being the first one encountered:
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
262 * 28F640W30B is the flash chip used on TI's legendary D-Sample board, and
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
263 * the flash inside Motorola C155/156 is an MCP equivalent of the same.
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
264 */
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
265
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
266 struct flash_device flashdev_28F320W30T = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
267 .name = "Intel 28F320W30T",
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
268 .cfi_table = intel_4M_topboot_cfi,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
269 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
270 .bank_geom = {&geom_4M_topboot, 0},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
271 .cmdset = &flash_cmdset_intel_w30,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
272 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
273
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
274 struct flash_device flashdev_28F320W30B = {
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
275 .name = "Intel 28F320W30B",
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
276 .cfi_table = intel_4M_bottomboot_cfi,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
277 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
278 .bank_geom = {&geom_4M_bottomboot, 0},
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
279 .cmdset = &flash_cmdset_intel_w30,
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
280 };
7c18eac91457 loadtools: round out support for Intel flash families
Mychaela Falconia <falcon@freecalypso.org>
parents: 916
diff changeset
281
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 struct flash_device flashdev_28F640W30T = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 .name = "Intel 28F640W30T",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 .cfi_table = intel_8M_topboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_8M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 .bank_geom = {&geom_8M_topboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 .cmdset = &flash_cmdset_intel_w30,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 struct flash_device flashdev_28F640W30B = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 .name = "Intel 28F640W30B",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 .cfi_table = intel_8M_bottomboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_8M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 .bank_geom = {&geom_8M_bottomboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 .cmdset = &flash_cmdset_intel_w30,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297
553
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
298 /* classic AMD flash chips */
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
299
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
300 static struct cfi_check Am29DL640G_cfi[] = {
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
301 {0x10, 'Q'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
302 {0x11, 'R'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
303 {0x12, 'Y'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
304 {0x13, 0x02},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
305 {0x14, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
306 {0x15, 0x40},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
307 {0x16, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
308 {0x27, 0x17},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
309 {0x2C, 0x03},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
310 {0x2D, 0x07},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
311 {0x2E, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
312 {0x2F, 0x20},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
313 {0x30, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
314 {0x31, 0x7D},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
315 {0x32, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
316 {0x33, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
317 {0x34, 0x01},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
318 {0x35, 0x07},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
319 {0x36, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
320 {0x37, 0x20},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
321 {0x38, 0x00},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
322 {0x40, 'P'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
323 {0x41, 'R'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
324 {0x42, 'I'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
325 {0x43, '1'},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
326 {0x44, '3'},
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
327 {0x49, 0x04},
553
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
328 {-1, 0}
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
329 };
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
330
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
331 static struct amd_lock_info Am29DL640G_lock_info = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
332 .ngroups = 8,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
333 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
334 {0x2000, 8, 0, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
335 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
336 {0x40000, 3, 1, 0, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
337 {0x40000, 12, 1, 1, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
338 {0x40000, 12, 1, 1, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
339 {0x40000, 3, 1, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
340 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
341 {0x2000, 8, 0, 0, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
342 .have_status_word_3 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
343 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
344
553
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
345 struct flash_device flashdev_Am29DL640G = {
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
346 .name = "Am29DL640G",
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
347 .cfi_table = Am29DL640G_cfi,
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
348 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_8M,
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
349 .bank_geom = {&geom_8M_bothends, 0},
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
350 .cmdset = &flash_cmdset_amd,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
351 .lock_info = {&Am29DL640G_lock_info, 0},
553
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
352 };
3886a8a40809 fc-loadtool: added support for old Am29DL640G flash chip
Mychaela Falconia <falcon@freecalypso.org>
parents: 523
diff changeset
353
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 /* Spansion S71PL-J and S71PL-N flash */
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355
559
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
356 static struct cfi_check spansion_PL032J_cfi[] = {
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
357 {0x10, 'Q'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
358 {0x11, 'R'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
359 {0x12, 'Y'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
360 {0x13, 0x02},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
361 {0x14, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
362 {0x15, 0x40},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
363 {0x16, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
364 {0x27, 0x16},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
365 {0x2C, 0x03},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
366 {0x2D, 0x07},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
367 {0x2E, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
368 {0x2F, 0x20},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
369 {0x30, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
370 {0x31, 0x3D},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
371 {0x32, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
372 {0x33, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
373 {0x34, 0x01},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
374 {0x35, 0x07},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
375 {0x36, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
376 {0x37, 0x20},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
377 {0x38, 0x00},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
378 {0x40, 'P'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
379 {0x41, 'R'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
380 {0x42, 'I'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
381 {0x43, '1'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
382 {0x44, '3'},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
383 {-1, 0}
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
384 };
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
385
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
386 struct flash_device flashdev_PL032J = {
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
387 .name = "Spansion S29PL032J",
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
388 .cfi_table = spansion_PL032J_cfi,
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
389 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
390 .bank_geom = {&geom_4M_bothends, 0},
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
391 .cmdset = &flash_cmdset_amd,
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
392 };
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
393
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
394 /*
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
395 * For our purposes, S29PL064J/S71PL064J differs from Am29DL640G only
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
396 * in terms of lock status retrieval and manipulation: the older chip
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
397 * lacks persistent/password mode lock bits and in-system lock/unlock
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
398 * operations. We distinguish them by one byte in CFI.
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
399 */
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
400
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
401 static struct cfi_check spansion_PL064J_cfi[] = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
402 {0x10, 'Q'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
403 {0x11, 'R'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
404 {0x12, 'Y'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
405 {0x13, 0x02},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
406 {0x14, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
407 {0x15, 0x40},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
408 {0x16, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
409 {0x27, 0x17},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
410 {0x2C, 0x03},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
411 {0x2D, 0x07},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
412 {0x2E, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
413 {0x2F, 0x20},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
414 {0x30, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
415 {0x31, 0x7D},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
416 {0x32, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
417 {0x33, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
418 {0x34, 0x01},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
419 {0x35, 0x07},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
420 {0x36, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
421 {0x37, 0x20},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
422 {0x38, 0x00},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
423 {0x40, 'P'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
424 {0x41, 'R'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
425 {0x42, 'I'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
426 {0x43, '1'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
427 {0x44, '3'},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
428 {0x49, 0x07},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
429 {-1, 0}
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
430 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
431
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
432 static struct amd_lock_info PL064J_lock_info = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
433 .ngroups = 8,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
434 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
435 {0x2000, 8, 0, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
436 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
437 {0x40000, 3, 1, 0, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
438 {0x40000, 12, 1, 1, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
439 {0x40000, 12, 1, 1, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
440 {0x40000, 3, 1, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
441 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
442 {0x2000, 8, 0, 0, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
443 .have_status_word_3 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
444 .have_mode_lock_bits = 1,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
445 .ppb_program_one = plj_ppb_program_one,
983
0407d14fb854 PL-J flash PPB ops: rework for full verification of lock state
Mychaela Falconia <falcon@freecalypso.org>
parents: 980
diff changeset
446 .ppb_program_all = plj_ppb_program_all,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
447 .ppb_erase_all = plj_ppb_erase_all_single,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
448 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
449
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
450 struct flash_device flashdev_PL064J = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
451 .name = "Spansion S29PL064J",
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
452 .cfi_table = spansion_PL064J_cfi,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
453 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_8M,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
454 .bank_geom = {&geom_8M_bothends, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
455 .cmdset = &flash_cmdset_amd,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
456 .lock_info = {&PL064J_lock_info, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
457 };
559
f229efbfd581 fc-loadtool: added support for S29PL032J/S71PL032J flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 553
diff changeset
458
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 static struct cfi_check spansion_PL129J_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 {0x13, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 {0x15, 0x40},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 {0x16, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 {0x27, 0x18},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 {0x2C, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 {0x2D, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471 {0x2F, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 {0x30, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 {0x31, 0xFD},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475 {0x33, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 {0x34, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 {0x35, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 {0x36, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 {0x37, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 {0x38, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 {0x40, 'P'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 {0x41, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 {0x42, 'I'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 {0x43, '1'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 {0x44, '3'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
489 static struct amd_lock_info PL129J_lock_info_0 = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
490 .ngroups = 4,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
491 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
492 {0x2000, 8, 0, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
493 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
494 {0x40000, 7, 1, 0, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
495 {0x40000, 24, 1, 1, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
496 .have_status_word_3 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
497 .have_mode_lock_bits = 1,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
498 .ppb_program_one = plj_ppb_program_one,
983
0407d14fb854 PL-J flash PPB ops: rework for full verification of lock state
Mychaela Falconia <falcon@freecalypso.org>
parents: 980
diff changeset
499 .ppb_program_all = plj_ppb_program_all,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
500 .ppb_erase_all = plj_ppb_erase_all_dualbank,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
501 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
502
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
503 static struct amd_lock_info PL129J_lock_info_1 = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
504 .ngroups = 4,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
505 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
506 {0x40000, 24, 1, 1, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
507 {0x40000, 7, 1, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
508 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
509 {0x2000, 8, 0, 0, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
510 .have_status_word_3 = 1,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
511 .ppb_program_one = plj_ppb_program_one,
983
0407d14fb854 PL-J flash PPB ops: rework for full verification of lock state
Mychaela Falconia <falcon@freecalypso.org>
parents: 980
diff changeset
512 .ppb_program_all = plj_ppb_program_all,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
513 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
514
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 struct flash_device flashdev_PL129J = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 .name = "Spansion S29PL129J",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 .cfi_table = spansion_PL129J_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 .required_global_config = FLASH_GLOBAL_CFG_DUAL_8M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 .bank_geom = {&geom_8M_bottomboot, &geom_8M_topboot},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520 .cmdset = &flash_cmdset_amd,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
521 .lock_info = {&PL129J_lock_info_0, &PL129J_lock_info_1},
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 static struct cfi_check spansion_PL129N_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528 {0x13, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530 {0x15, 0x40},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 {0x16, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 {0x27, 0x18},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 {0x2C, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 {0x2D, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 {0x2F, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537 {0x30, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538 {0x31, 0x3D},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540 {0x33, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 {0x34, 0x04},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 {0x35, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 {0x36, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 {0x37, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 {0x38, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 {0x40, 'P'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547 {0x41, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 {0x42, 'I'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 {0x43, '1'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550 {0x44, '4'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
554 static struct amd_lock_info PL129N_lock_info_0 = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
555 .ngroups = 3,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
556 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
557 {0x10000, 4, 0, 1, 0},
980
0a4d19aab608 PL129N lock-state cosmetic: 256 KiB blocks are single sectors
Mychaela Falconia <falcon@freecalypso.org>
parents: 979
diff changeset
558 {0x40000, 7, 0, 0, 1},
0a4d19aab608 PL129N lock-state cosmetic: 256 KiB blocks are single sectors
Mychaela Falconia <falcon@freecalypso.org>
parents: 979
diff changeset
559 {0x40000, 24, 0, 1, 1}},
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
560 .have_status_word_3 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
561 .have_pln_lock_reg = 1,
994
ad3041e19884 fc-loadtool flash: implement PPB ops for Spansion PL-N
Mychaela Falconia <falcon@freecalypso.org>
parents: 992
diff changeset
562 .ppb_program_one = pln_ppb_program_one,
ad3041e19884 fc-loadtool flash: implement PPB ops for Spansion PL-N
Mychaela Falconia <falcon@freecalypso.org>
parents: 992
diff changeset
563 .ppb_erase_all = pln_ppb_erase_all,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
564 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
565
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
566 static struct amd_lock_info PL129N_lock_info_1 = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
567 .ngroups = 3,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
568 .groups = {
980
0a4d19aab608 PL129N lock-state cosmetic: 256 KiB blocks are single sectors
Mychaela Falconia <falcon@freecalypso.org>
parents: 979
diff changeset
569 {0x40000, 24, 0, 1, 1},
0a4d19aab608 PL129N lock-state cosmetic: 256 KiB blocks are single sectors
Mychaela Falconia <falcon@freecalypso.org>
parents: 979
diff changeset
570 {0x40000, 7, 0, 1, 0},
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
571 {0x10000, 4, 0, 0, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
572 .have_status_word_3 = 1,
994
ad3041e19884 fc-loadtool flash: implement PPB ops for Spansion PL-N
Mychaela Falconia <falcon@freecalypso.org>
parents: 992
diff changeset
573 .ppb_program_one = pln_ppb_program_one,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
574 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
575
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 struct flash_device flashdev_PL129N = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 .name = "Spansion S29PL129N",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 .cfi_table = spansion_PL129N_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 .required_global_config = FLASH_GLOBAL_CFG_DUAL_8M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580 .bank_geom = {&geom_8M_bottomboot_big,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 &geom_8M_topboot_big},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 .cmdset = &flash_cmdset_amd,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
583 .lock_info = {&PL129N_lock_info_0, &PL129N_lock_info_1},
506
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 /* Samsung K5A32xxCTM introduced onto the scene by Openmoko */
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 static struct cfi_check samsung_4M_topboot_cfi[] = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 {0x10, 'Q'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 {0x11, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 {0x12, 'Y'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 {0x13, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593 {0x14, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 {0x15, 0x40},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 {0x16, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 {0x27, 0x16},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 {0x2C, 0x02},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 {0x2D, 0x07},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 {0x2E, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 {0x2F, 0x20},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 {0x30, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 {0x31, 0x3E},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 {0x32, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 {0x33, 0x00},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605 {0x34, 0x01},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 {0x40, 'P'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607 {0x41, 'R'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 {0x42, 'I'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 {0x43, '3'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 {0x44, '3'},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 {0x4F, 0x03},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 {-1, 0}
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 };
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 struct flash_device flashdev_K5A32xx_T = {
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 .name = "Samsung K5A32xx_T",
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 .cfi_table = samsung_4M_topboot_cfi,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 .bank_geom = {&geom_4M_topboot, 0},
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 .cmdset = &flash_cmdset_amd,
0dd2c87c1b63 fc-loadtool flash support overhaul
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 };
523
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
622
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
623 /* a different 4 MiB Samsung flash chip used in Huawei GTM900 */
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
624
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
625 static struct cfi_check samsung_4M_bothends_cfi[] = {
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
626 {0x10, 'Q'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
627 {0x11, 'R'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
628 {0x12, 'Y'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
629 {0x13, 0x02},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
630 {0x14, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
631 {0x15, 0x40},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
632 {0x16, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
633 {0x27, 0x16},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
634 {0x2C, 0x03},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
635 {0x2D, 0x07},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
636 {0x2E, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
637 {0x2F, 0x20},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
638 {0x30, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
639 {0x31, 0x3D},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
640 {0x32, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
641 {0x33, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
642 {0x34, 0x01},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
643 {0x35, 0x07},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
644 {0x36, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
645 {0x37, 0x20},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
646 {0x38, 0x00},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
647 {0x40, 'P'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
648 {0x41, 'R'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
649 {0x42, 'I'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
650 {0x43, '0'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
651 {0x44, '0'},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
652 {0x4F, 0x04},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
653 {-1, 0}
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
654 };
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
655
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
656 struct flash_device flashdev_K5L33xx_A = {
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
657 .name = "Samsung K5L33xx_A",
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
658 .cfi_table = samsung_4M_bothends_cfi,
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
659 .required_global_config = FLASH_GLOBAL_CFG_SINGLE_4M,
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
660 .bank_geom = {&geom_4M_bothends, 0},
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
661 .cmdset = &flash_cmdset_amd,
9a478d33b3ca fc-loadtool: added Samsung K5L33xx_A flash support for GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 506
diff changeset
662 };
916
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
663
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
664 /* Samsung equivalent of S71PL129J, found in Sony Ericsson K200/220 phones */
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
665
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
666 static struct cfi_check samsung_PL129J_equiv_cfi[] = {
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
667 {0x10, 'Q'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
668 {0x11, 'R'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
669 {0x12, 'Y'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
670 {0x13, 0x02},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
671 {0x14, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
672 {0x15, 0x40},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
673 {0x16, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
674 {0x27, 0x18},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
675 {0x2C, 0x03},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
676 {0x2D, 0x07},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
677 {0x2E, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
678 {0x2F, 0x20},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
679 {0x30, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
680 {0x31, 0xFD},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
681 {0x32, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
682 {0x33, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
683 {0x34, 0x01},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
684 {0x35, 0x07},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
685 {0x36, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
686 {0x37, 0x20},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
687 {0x38, 0x00},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
688 {0x40, 'P'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
689 {0x41, 'R'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
690 {0x42, 'I'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
691 {0x43, '0'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
692 {0x44, '0'},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
693 {0x4F, 0x04},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
694 {-1, 0}
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
695 };
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
696
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
697 static struct amd_lock_info K5L29_lock_info_0 = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
698 .ngroups = 4,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
699 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
700 {0x2000, 8, 0, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
701 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
702 {0x40000, 7, 1, 0, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
703 {0x40000, 24, 1, 1, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
704 .have_status_word_3 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
705 .have_status_word_7 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
706 .have_mode_lock_bits = 1,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
707 .ppb_program_one = plj_ppb_program_one,
983
0407d14fb854 PL-J flash PPB ops: rework for full verification of lock state
Mychaela Falconia <falcon@freecalypso.org>
parents: 980
diff changeset
708 .ppb_program_all = plj_ppb_program_all,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
709 .ppb_erase_all = plj_ppb_erase_all_dualbank,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
710 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
711
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
712 static struct amd_lock_info K5L29_lock_info_1 = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
713 .ngroups = 4,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
714 .groups = {
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
715 {0x40000, 24, 1, 1, 1},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
716 {0x40000, 7, 1, 1, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
717 {0x10000, 3, 0, 0, 0},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
718 {0x2000, 8, 0, 0, 1}},
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
719 .have_status_word_3 = 1,
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
720 .have_status_word_7 = 1,
979
c5133c3c11b1 fc-loadtool flash: implement PL-J PPB programming functions
Mychaela Falconia <falcon@freecalypso.org>
parents: 978
diff changeset
721 .ppb_program_one = plj_ppb_program_one,
983
0407d14fb854 PL-J flash PPB ops: rework for full verification of lock state
Mychaela Falconia <falcon@freecalypso.org>
parents: 980
diff changeset
722 .ppb_program_all = plj_ppb_program_all,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
723 };
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
724
916
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
725 struct flash_device flashdev_K5L29xx_A = {
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
726 .name = "Samsung K5L29xx_A",
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
727 .cfi_table = samsung_PL129J_equiv_cfi,
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
728 .required_global_config = FLASH_GLOBAL_CFG_DUAL_8M,
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
729 .bank_geom = {&geom_8M_bottomboot, &geom_8M_topboot},
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
730 .cmdset = &flash_cmdset_amd,
976
ff4ce8d5ece4 fc-loadtool flash: definitions for AMD sector lock architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 973
diff changeset
731 .lock_info = {&K5L29_lock_info_0, &K5L29_lock_info_1},
916
54a0bc149d9c fc-loadtool: add support for Samsung K5L29xx_A flash
Mychaela Falconia <falcon@freecalypso.org>
parents: 696
diff changeset
732 };