Hello, some weeks ago I asked carldani what I could do to help the flashrom project, and he mentioned that they could really use someone to go thru all the chips in flashchips.c and get the voltage range and form factor(s) for each chip listed there.
This is the result of that project: a spreadsheet with the chip name, voltage range, form factors, connector type (pins, leads, etc). This covers all the chips as of v1143. If anyone else is interested, I also have a short text file with all of the form factor acronyms I came across and what they mean (I grabbed the definition from the datasheet).
There's a few missing chips, and some values that I wasn't quite sure about. Comments would be greatly appreciated.
Hi Steven,
thanks a lot for this comprehensive list of flash chip voltages and form factors..
On 13.10.2010 01:49, Steven Zakulec wrote:
Hello, some weeks ago I asked carldani what I could do to help the flashrom project, and he mentioned that they could really use someone to go thru all the chips in flashchips.c and get the voltage range and form factor(s) for each chip listed there.
This is the result of that project: a spreadsheet with the chip name, voltage range, form factors, connector type (pins, leads, etc). This covers all the chips as of v1143. If anyone else is interested, I also have a short text file with all of the form factor acronyms I came across and what they mean (I grabbed the definition from the datasheet).
There's a few missing chips, and some values that I wasn't quite sure about. Comments would be greatly appreciated.
I thought I had seen some SPI chips which were available for disjoint voltage ranges, e.g. 1.8-2.5V and 2.7-3.6V. Maybe the names were different for the various versions with different voltages. I hope I'll stumble over such a datasheet again.
OK, now the next question is how we can store this info in struct flashchip. Suggestion:
struct voltage { uint8_t minvoltage_decivolt; uint8_t maxvoltage_decivolt; };
Values would be in 1/10 volts. I haven't seen any flash chip datasheets with greater precision, and with such an encoding even 12V can be expressed.
For the form factor, I'd just use a large bitfield with one bit per available form factor. uint32_t formfactors;
#define PLCC32 (1 << 0) #define TSOP32 (1 << 1) #define TSOP40 (1 << 2) ...
Example:
{ .vendor = "SST", .name = "SST49LF008A", .bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */ .manufacture_id = SST_ID, .model_id = SST_SST49LF008A, .total_size = 1024, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, .probe = probe_jedec, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, .block_erase = erase_sector_jedec, }, { .eraseblocks = { {64 * 1024, 16} }, .block_erase = erase_block_jedec, }, { .eraseblocks = { {1024 * 1024, 1} }, .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, .printlock = printlock_sst_fwhub, .unlock = unlock_sst_fwhub, .write = write_jedec_1, .read = read_memmapped, .voltages = { 30, 36 }, .formfactors = TSOP32|TSOP40|PLCC32, },
Regards, Carl-Daniel
On Tue, Oct 12, 2010 at 8:51 PM, Carl-Daniel Hailfinger < c-d.hailfinger.devel.2006@gmx.net> wrote:
Hi Steven,
thanks a lot for this comprehensive list of flash chip voltages and form factors..
On 13.10.2010 01:49, Steven Zakulec wrote:
Hello, some weeks ago I asked carldani what I could do to help the flashrom project, and he mentioned that they could really use someone to go thru all the chips in flashchips.c and get the voltage range and form factor(s) for each chip listed there.
This is the result of that project: a spreadsheet with the chip name, voltage range, form factors, connector type (pins, leads, etc). This covers all the chips as of v1143. If anyone else is interested, I also have a short text file with all of the form factor acronyms I came across and what they mean (I grabbed the definition from the datasheet).
There's a few missing chips, and some values that I wasn't quite sure about. Comments would be greatly appreciated.
I thought I had seen some SPI chips which were available for disjoint voltage ranges, e.g. 1.8-2.5V and 2.7-3.6V. Maybe the names were different for the various versions with different voltages. I hope I'll stumble over such a datasheet again.
OK, now the next question is how we can store this info in struct flashchip. Suggestion:
struct voltage { uint8_t minvoltage_decivolt; uint8_t maxvoltage_decivolt; };
Values would be in 1/10 volts. I haven't seen any flash chip datasheets with greater precision, and with such an encoding even 12V can be expressed.
For the form factor, I'd just use a large bitfield with one bit per available form factor. uint32_t formfactors;
#define PLCC32 (1 << 0) #define TSOP32 (1 << 1) #define TSOP40 (1 << 2) ...
Example:
{ .vendor = "SST", .name = "SST49LF008A", .bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */ .manufacture_id = SST_ID, .model_id = SST_SST49LF008A, .total_size = 1024, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP |
FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, .probe = probe_jedec, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, .block_erase = erase_sector_jedec, }, { .eraseblocks = { {64 * 1024, 16} }, .block_erase = erase_block_jedec, }, { .eraseblocks = { {1024 * 1024, 1} }, .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, .printlock = printlock_sst_fwhub, .unlock = unlock_sst_fwhub, .write = write_jedec_1, .read = read_memmapped, .voltages = { 30, 36 }, .formfactors = TSOP32|TSOP40|PLCC32, },
Regards, Carl-Daniel
I've included a patch (not working currently) that does pretty much what
you indicated above (just the voltage part). It fails to compile correctly, and has the struct called voltage instead of voltages, but should otherwise be identical to what you proposed. While filling in what I had, I did come across some chips that offered separate ranges (usually 5 V +-10% and a 12V fast erase or program). I've listed those in comments next to the voltage field.
The form-factor half is more complicated- in my original spreadsheet, there's 29 form factors- I listed the pins/etc separate from the form factor, so there are a very large amount of form factors consequently. Ideas on how to handle this would be appreciated.
Am 22.03.2011 01:22 schrieb Steven Zakulec:
On Tue, Oct 12, 2010 at 8:51 PM, Carl-Daniel Hailfinger wrote:
Hi Steven,
thanks a lot for this comprehensive list of flash chip voltages and form factors..
On 13.10.2010 01:49, Steven Zakulec wrote:
Hello, some weeks ago I asked carldani what I could do to help the flashrom project, and he mentioned that they could really use someone to go thru all the chips in flashchips.c and get the voltage range and form factor(s) for each chip listed there.
This is the result of that project: a spreadsheet with the chip name, voltage range, form factors, connector type (pins, leads, etc). This covers all the chips as of v1143. If anyone else is interested, I also have a short text file with all of the form factor acronyms I came across and what they mean (I grabbed the definition from the datasheet).
There's a few missing chips, and some values that I wasn't quite sure about. Comments would be greatly appreciated.
I thought I had seen some SPI chips which were available for disjoint voltage ranges, e.g. 1.8-2.5V and 2.7-3.6V. Maybe the names were different for the various versions with different voltages. I hope I'll stumble over such a datasheet again.
OK, now the next question is how we can store this info in struct flashchip. Suggestion:
struct voltage { uint8_t minvoltage_decivolt; uint8_t maxvoltage_decivolt; };
Values would be in 1/10 volts. I haven't seen any flash chip datasheets with greater precision, and with such an encoding even 12V can be expressed.
For the form factor, I'd just use a large bitfield with one bit per available form factor. uint32_t formfactors;
#define PLCC32 (1<< 0) #define TSOP32 (1<< 1) #define TSOP40 (1<< 2) ...
Example:
{ .vendor = "SST", .name = "SST49LF008A", .bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */ .manufacture_id = SST_ID, .model_id = SST_SST49LF008A, .total_size = 1024, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP |
FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, .probe = probe_jedec, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, .block_erase = erase_sector_jedec, }, { .eraseblocks = { {64 * 1024, 16} }, .block_erase = erase_block_jedec, }, { .eraseblocks = { {1024 * 1024, 1} }, .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, .printlock = printlock_sst_fwhub, .unlock = unlock_sst_fwhub, .write = write_jedec_1, .read = read_memmapped, .voltages = { 30, 36 }, .formfactors = TSOP32|TSOP40|PLCC32, },
Regards, Carl-Daniel
I've included a patch (not working currently) that does pretty much what
you indicated above (just the voltage part). It fails to compile correctly, and has the struct called voltage instead of voltages, but should otherwise be identical to what you proposed. While filling in what I had, I did come across some chips that offered separate ranges (usually 5 V +-10% and a 12V fast erase or program). I've listed those in comments next to the voltage field.
Right. Please note that those chips usually can't handle 12V on data/address pins, and have a separate pin for supplying 12V for write/erase.
So it is correct to list them like other 5V chips, and add a comment about separate 12V programming voltage (please be precise if you describe when the chip needs 12V). So far I've seen the following ways of using 12V: - never/optional/always for erase - never/optional/always for write We could handle that either with feature bits or with separate voltage feature bits. Not sure. A comment will suffice for now until we can actually handle this.
The form-factor half is more complicated- in my original spreadsheet, there's 29 form factors- I listed the pins/etc separate from the form factor, so there are a very large amount of form factors consequently. Ideas on how to handle this would be appreciated.
Can we postpone form factors and concentrate on voltages first?
Index: flash.h
--- flash.h (revision 1282) +++ flash.h (working copy) @@ -138,7 +138,12 @@ int (*unlock) (struct flashchip *flash); int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len); int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len);
- struct voltage {
uint8_t minvoltage_decivolt;
uint8_t maxvoltage_decivolt;
};
Please remove one tab above so the } is below s of struct voltage.
By the way, I'd prefer
+ struct { + uint8_t min; + uint8_t max; + } voltage;
We do not use long variable names elsewhere. And yes, I know that I suggested this code some time ago. Since then I have learned a few things about the usefulness of short code. And please move the word "voltage" to the end of the struct declaration so it works.
No additional empty line.
/* Some flash devices have an additional register space. */ chipaddr virtual_memory; chipaddr virtual_registers;
Index: flashchips.c
--- flashchips.c (revision 1282) +++ flashchips.c (working copy) @@ -54,6 +54,7 @@ * .unlock = Chip unlock function * .write = Chip write function * .read = Chip read function
* .voltage = Voltage min and max range
Voltage min and max range in decivolt
*/
{ @@ -111,6 +113,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 50 },
If this chip indeed has zero tolerance, please write {50, 50} explicitly.
},
{
@@ -1283,6 +1313,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 23, 36 }, /* Datasheet says 2.3-3.6V or 2.7-3.6V */
Another feature bit maybe? FEATURE_VOLTAGE_SUBRANGE or something like that. You can postpone this.
},
{ @@ -1320,6 +1351,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 23, 36 }, /* Datasheet says 2.3-3.6V or 2.7-3.6V */
Stylistic choice: All other data in curly brackets has no space after { and no space before }.
},
{ @@ -1357,6 +1389,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 17, 19 }, /* Datasheet says range is 1.65-1.95 V */
Maybe use 16,20 instead?
},
{
@@ -2144,6 +2204,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Really 0.5V or did you mean 5.0V here?
},
{ @@ -2175,6 +2236,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Same.
},
{ @@ -2206,6 +2268,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Same.
},
{
@@ -3460,6 +3560,7 @@ }, .write = write_82802ab, .read = read_memmapped,
.voltage = { 114, 126 } /*Offers 5V read in addition, some chips offer 12V +-10% read/write */
Are you sure the chip is a pure 12V chip? Most "12V" chips I know are actually 5V chips and the 12V is only required for write/erase and sometimes special forms of ID.
},
{ @@ -3483,6 +3584,7 @@ .unlock = unlock_28f004s5, .write = write_82802ab, .read = read_memmapped,
.voltage = { 5, 5 }, /*Also offers 12V write */
Please use the same phrasing as for the other chips: "Also has 12V fast program"
},
{
Looks good otherwise. Some of my comments apply to multiple lines, but I picked only one line for each to keep the mail short.
Please resend this with the comments addressed and a Signed-off-by statement. Then we just need someone to cross-check the voltage values and we're good to go.
Regards, Carl-Daniel
On Wed, Mar 30, 2011 at 8:16 PM, Carl-Daniel Hailfinger < c-d.hailfinger.devel.2006@gmx.net> wrote:
Am 22.03.2011 01:22 schrieb Steven Zakulec:
On Tue, Oct 12, 2010 at 8:51 PM, Carl-Daniel Hailfinger wrote:
Hi Steven,
thanks a lot for this comprehensive list of flash chip voltages and form factors..
On 13.10.2010 01:49, Steven Zakulec wrote:
Hello, some weeks ago I asked carldani what I could do to help the flashrom project, and he mentioned that they could really use someone to go thru all the chips in flashchips.c and get the voltage range and form factor(s) for each chip listed there.
This is the result of that project: a spreadsheet with the chip name, voltage range, form factors, connector type (pins, leads, etc). This covers all the chips as of v1143. If anyone else is interested, I also have a short text file with all of the form factor acronyms I came across and what they mean (I grabbed the definition from the datasheet).
There's a few missing chips, and some values that I wasn't quite sure about. Comments would be greatly appreciated.
I thought I had seen some SPI chips which were available for disjoint voltage ranges, e.g. 1.8-2.5V and 2.7-3.6V. Maybe the names were different for the various versions with different voltages. I hope I'll stumble over such a datasheet again.
OK, now the next question is how we can store this info in struct flashchip. Suggestion:
struct voltage { uint8_t minvoltage_decivolt; uint8_t maxvoltage_decivolt; };
Values would be in 1/10 volts. I haven't seen any flash chip datasheets with greater precision, and with such an encoding even 12V can be expressed.
For the form factor, I'd just use a large bitfield with one bit per available form factor. uint32_t formfactors;
#define PLCC32 (1<< 0) #define TSOP32 (1<< 1) #define TSOP40 (1<< 2) ...
Example:
{ .vendor = "SST", .name = "SST49LF008A", .bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */ .manufacture_id = SST_ID, .model_id = SST_SST49LF008A, .total_size = 1024, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP |
FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, .probe = probe_jedec, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, .block_erase = erase_sector_jedec, }, { .eraseblocks = { {64 * 1024, 16} }, .block_erase = erase_block_jedec, }, { .eraseblocks = { {1024 * 1024, 1} }, .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, .printlock = printlock_sst_fwhub, .unlock = unlock_sst_fwhub, .write = write_jedec_1, .read = read_memmapped, .voltages = { 30, 36 }, .formfactors = TSOP32|TSOP40|PLCC32, },
Regards, Carl-Daniel
I've included a patch (not working currently) that does pretty much what
you indicated above (just the voltage part). It fails to compile correctly, and has the struct called voltage instead of voltages, but should otherwise be identical to what you proposed. While filling in what I had, I did come across some chips that offered separate ranges (usually 5 V +-10% and a 12V fast erase or program). I've listed those in comments next to the voltage field.
Right. Please note that those chips usually can't handle 12V on data/address pins, and have a separate pin for supplying 12V for write/erase.
So it is correct to list them like other 5V chips, and add a comment about separate 12V programming voltage (please be precise if you describe when the chip needs 12V). So far I've seen the following ways of using 12V:
- never/optional/always for erase
- never/optional/always for write
We could handle that either with feature bits or with separate voltage feature bits. Not sure. A comment will suffice for now until we can actually handle this.
The form-factor half is more complicated- in my original spreadsheet,
there's 29 form factors- I listed the pins/etc separate from the form factor, so there are a very large amount of form factors consequently. Ideas on how to handle this would be appreciated.
Can we postpone form factors and concentrate on voltages first?
Index: flash.h
=================================================================== --- flash.h (revision 1282) +++ flash.h (working copy) @@ -138,7 +138,12 @@ int (*unlock) (struct flashchip *flash); int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len); int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len);
struct voltage {
uint8_t minvoltage_decivolt;
uint8_t maxvoltage_decivolt;
};
Please remove one tab above so the } is below s of struct voltage.
By the way, I'd prefer
struct {
uint8_t min;
uint8_t max;
} voltage;
We do not use long variable names elsewhere. And yes, I know that I suggested this code some time ago. Since then I have learned a few things about the usefulness of short code. And please move the word "voltage" to the end of the struct declaration so it works.
No additional empty line.
/* Some flash devices have an additional register space. */
chipaddr virtual_memory; chipaddr virtual_registers;
Index: flashchips.c
=================================================================== --- flashchips.c (revision 1282) +++ flashchips.c (working copy) @@ -54,6 +54,7 @@ * .unlock = Chip unlock function * .write = Chip write function * .read = Chip read function
* .voltage = Voltage min and max range
Voltage min and max range in decivolt
*/
{
@@ -111,6 +113,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 50 },
If this chip indeed has zero tolerance, please write {50, 50} explicitly.
},
{
@@ -1283,6 +1313,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 23, 36 }, /* Datasheet says 2.3-3.6V
or 2.7-3.6V */
Another feature bit maybe? FEATURE_VOLTAGE_SUBRANGE or something like that. You can postpone this.
},
{
@@ -1320,6 +1351,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 23, 36 }, /* Datasheet says 2.3-3.6V
or 2.7-3.6V */
Stylistic choice: All other data in curly brackets has no space after { and no space before }.
},
{
@@ -1357,6 +1389,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 17, 19 }, /* Datasheet says range is
1.65-1.95 V */
Maybe use 16,20 instead?
},
{
@@ -2144,6 +2204,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Really 0.5V or did you mean 5.0V here?
},
{
@@ -2175,6 +2236,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Same.
},
{
@@ -2206,6 +2268,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Same.
},
{
@@ -3460,6 +3560,7 @@
}, .write = write_82802ab, .read = read_memmapped,
.voltage = { 114, 126 } /*Offers 5V read in
addition, some chips offer 12V +-10% read/write */
Are you sure the chip is a pure 12V chip? Most "12V" chips I know are actually 5V chips and the 12V is only required for write/erase and sometimes special forms of ID.
},
{
@@ -3483,6 +3584,7 @@ .unlock = unlock_28f004s5, .write = write_82802ab, .read = read_memmapped,
.voltage = { 5, 5 }, /*Also offers 12V write */
Please use the same phrasing as for the other chips: "Also has 12V fast program"
},
{
Looks good otherwise. Some of my comments apply to multiple lines, but I picked only one line for each to keep the mail short.
Please resend this with the comments addressed and a Signed-off-by statement. Then we just need someone to cross-check the voltage values and we're good to go.
Regards, Carl-Daniel
I believe I've addressed all the comments. Signed-off-by: Steven Zakulec spzakulec@gmail.com
On Sun, Apr 3, 2011 at 10:27 PM, Steven Zakulec spzakulec@gmail.com wrote:
On Wed, Mar 30, 2011 at 8:16 PM, Carl-Daniel Hailfinger < c-d.hailfinger.devel.2006@gmx.net> wrote:
Am 22.03.2011 01:22 schrieb Steven Zakulec:
On Tue, Oct 12, 2010 at 8:51 PM, Carl-Daniel Hailfinger wrote:
Hi Steven,
thanks a lot for this comprehensive list of flash chip voltages and form factors..
On 13.10.2010 01:49, Steven Zakulec wrote:
Hello, some weeks ago I asked carldani what I could do to help the flashrom project, and he mentioned that they could really use someone to go thru all the chips in flashchips.c and get the voltage range and form factor(s) for each chip listed there.
This is the result of that project: a spreadsheet with the chip name, voltage range, form factors, connector type (pins, leads, etc). This covers all the chips as of v1143. If anyone else is interested, I also have a short text file with all of the form factor acronyms I came across and what they mean (I grabbed the definition from the datasheet).
There's a few missing chips, and some values that I wasn't quite sure about. Comments would be greatly appreciated.
I thought I had seen some SPI chips which were available for disjoint voltage ranges, e.g. 1.8-2.5V and 2.7-3.6V. Maybe the names were different for the various versions with different voltages. I hope I'll stumble over such a datasheet again.
OK, now the next question is how we can store this info in struct flashchip. Suggestion:
struct voltage { uint8_t minvoltage_decivolt; uint8_t maxvoltage_decivolt; };
Values would be in 1/10 volts. I haven't seen any flash chip datasheets with greater precision, and with such an encoding even 12V can be expressed.
For the form factor, I'd just use a large bitfield with one bit per available form factor. uint32_t formfactors;
#define PLCC32 (1<< 0) #define TSOP32 (1<< 1) #define TSOP40 (1<< 2) ...
Example:
{ .vendor = "SST", .name = "SST49LF008A", .bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */ .manufacture_id = SST_ID, .model_id = SST_SST49LF008A, .total_size = 1024, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP |
FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, .probe = probe_jedec, .probe_timing = 1, /* 150 ns */ .block_erasers = { { .eraseblocks = { {4 * 1024, 256} }, .block_erase = erase_sector_jedec, }, { .eraseblocks = { {64 * 1024, 16} }, .block_erase = erase_block_jedec, }, { .eraseblocks = { {1024 * 1024, 1} }, .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */ } }, .printlock = printlock_sst_fwhub, .unlock = unlock_sst_fwhub, .write = write_jedec_1, .read = read_memmapped, .voltages = { 30, 36 }, .formfactors = TSOP32|TSOP40|PLCC32, },
Regards, Carl-Daniel
I've included a patch (not working currently) that does pretty much what
you indicated above (just the voltage part). It fails to compile correctly, and has the struct called voltage instead of voltages, but should otherwise be identical to what you proposed. While filling in what I had, I did come across some chips that offered separate ranges (usually 5 V +-10% and a 12V fast erase or program). I've listed those in comments next to the voltage field.
Right. Please note that those chips usually can't handle 12V on data/address pins, and have a separate pin for supplying 12V for write/erase.
So it is correct to list them like other 5V chips, and add a comment about separate 12V programming voltage (please be precise if you describe when the chip needs 12V). So far I've seen the following ways of using 12V:
- never/optional/always for erase
- never/optional/always for write
We could handle that either with feature bits or with separate voltage feature bits. Not sure. A comment will suffice for now until we can actually handle this.
The form-factor half is more complicated- in my original spreadsheet,
there's 29 form factors- I listed the pins/etc separate from the form factor, so there are a very large amount of form factors consequently. Ideas on how to handle this would be appreciated.
Can we postpone form factors and concentrate on voltages first?
Index: flash.h
=================================================================== --- flash.h (revision 1282) +++ flash.h (working copy) @@ -138,7 +138,12 @@ int (*unlock) (struct flashchip *flash); int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len); int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len);
struct voltage {
uint8_t minvoltage_decivolt;
uint8_t maxvoltage_decivolt;
};
Please remove one tab above so the } is below s of struct voltage.
By the way, I'd prefer
struct {
uint8_t min;
uint8_t max;
} voltage;
We do not use long variable names elsewhere. And yes, I know that I suggested this code some time ago. Since then I have learned a few things about the usefulness of short code. And please move the word "voltage" to the end of the struct declaration so it works.
No additional empty line.
/* Some flash devices have an additional register space. */
chipaddr virtual_memory; chipaddr virtual_registers;
Index: flashchips.c
=================================================================== --- flashchips.c (revision 1282) +++ flashchips.c (working copy) @@ -54,6 +54,7 @@ * .unlock = Chip unlock function * .write = Chip write function * .read = Chip read function
* .voltage = Voltage min and max range
Voltage min and max range in decivolt
*/
{
@@ -111,6 +113,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 50 },
If this chip indeed has zero tolerance, please write {50, 50} explicitly.
},
{
@@ -1283,6 +1313,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 23, 36 }, /* Datasheet says 2.3-3.6V
or 2.7-3.6V */
Another feature bit maybe? FEATURE_VOLTAGE_SUBRANGE or something like that. You can postpone this.
},
{
@@ -1320,6 +1351,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 23, 36 }, /* Datasheet says 2.3-3.6V
or 2.7-3.6V */
Stylistic choice: All other data in curly brackets has no space after { and no space before }.
},
{
@@ -1357,6 +1389,7 @@ .unlock = spi_disable_blockprotect_at25df, .write = spi_chip_write_256, .read = spi_chip_read,
.voltage = { 17, 19 }, /* Datasheet says range is
1.65-1.95 V */
Maybe use 16,20 instead?
},
{
@@ -2144,6 +2204,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Really 0.5V or did you mean 5.0V here?
},
{
@@ -2175,6 +2236,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Same.
},
{
@@ -2206,6 +2268,7 @@
}, .write = write_jedec_1, .read = read_memmapped,
.voltage = { 5, 5 },
Same.
},
{
@@ -3460,6 +3560,7 @@
}, .write = write_82802ab, .read = read_memmapped,
.voltage = { 114, 126 } /*Offers 5V read in
addition, some chips offer 12V +-10% read/write */
Are you sure the chip is a pure 12V chip? Most "12V" chips I know are actually 5V chips and the 12V is only required for write/erase and sometimes special forms of ID.
},
{
@@ -3483,6 +3584,7 @@ .unlock = unlock_28f004s5, .write = write_82802ab, .read = read_memmapped,
.voltage = { 5, 5 }, /*Also offers 12V write */
Please use the same phrasing as for the other chips: "Also has 12V fast program"
},
{
Looks good otherwise. Some of my comments apply to multiple lines, but I picked only one line for each to keep the mail short.
Please resend this with the comments addressed and a Signed-off-by statement. Then we just need someone to cross-check the voltage values and we're good to go.
Regards, Carl-Daniel
I believe I've addressed all the comments. Signed-off-by: Steven Zakulec spzakulec@gmail.com
Hi, this is the latest version of the patch, taking into account Peter's request to me to change the struct to uint16_t and the values to milliwatts. Signed-off-by: Steven Zakulec spzakulec@gmail.com
Steven Zakulec wrote:
Hi, this is the latest version of the patch, taking into account Peter's request to me to change the struct to uint16_t and the values to milliwatts. Signed-off-by: Steven Zakulec spzakulec@gmail.com
Acked-by: Peter Stuge peter@stuge.se
On Mon, 30 May 2011 11:59:57 -0400 Steven Zakulec spzakulec@gmail.com wrote:
Hi, this is the latest version of the patch, taking into account Peter's request to me to change the struct to uint16_t and the values to milliwatts. Signed-off-by: Steven Zakulec spzakulec@gmail.com
hello steven (what a nice name! ;)
your patch does not compile: flashchips.c:1335: error: expected expression before ‘,’ token flashchips.c:1373: error: expected expression before ‘,’ token
if you look at it, it is quite obvious ;) probably some copy & paste mistake or regex going berserk.
since you have to revise it anyway i have a few nitpicking comments and two important notes to make:
Index: flash.h
--- flash.h (revision 1322) +++ flash.h (working copy) @@ -145,6 +145,10 @@ int (*unlock) (struct flashchip *flash); int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len); int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len);
- struct {
uint16_t min;
uint16_t max;
- }voltage;
}<space>voltage; is our usual style afaics
Index: flashchips.c
--- flashchips.c (revision 1322) +++ flashchips.c (working copy) @@ -54,6 +54,7 @@ * .unlock = Chip unlock function * .write = Chip write function * .read = Chip read function
* .voltage = Voltage min and max range in decivolt
this is no longer correct.
{ @@ -3285,6 +3379,7 @@ }, .write = write_m29f400bt, .read = read_memmapped,
.voltage = {4750, 5250}, /*5.0V +-5% for -55 model, +-10% for rest */
<space> after /*
{ @@ -3483,6 +3583,7 @@ }, .write = write_82802ab, .read = read_memmapped,
},.voltage = {4500, 5500}, /*5.0V +-10% read, 12V fast program & erase- +-5% standard, +-10% option */
<space> after /*
{ @@ -6653,6 +6841,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
},.voltage = {4500, 5500}, /* Datasheet says some are only 4.75-5.25 V */
i havent looked at the datasheet, but if so then we should use the tightest range i.e. 4750, 5250 imho.
{ @@ -6684,6 +6873,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
},.voltage = {4500, 5500}, /* Datasheet says some are only 4.75-5.25 V */
same
looks good to me otherwise, thanks a lot! i have not checked the datasheets or the spreadsheet you made though.</decline of responsibility> ;)
On Thu, Jun 2, 2011 at 2:12 AM, Stefan Tauner < stefan.tauner@student.tuwien.ac.at> wrote:
On Mon, 30 May 2011 11:59:57 -0400 Steven Zakulec spzakulec@gmail.com wrote:
Hi, this is the latest version of the patch, taking into account Peter's request to me to change the struct to uint16_t and the values to
milliwatts.
Signed-off-by: Steven Zakulec spzakulec@gmail.com
hello steven (what a nice name! ;)
your patch does not compile: flashchips.c:1335: error: expected expression before ‘,’ token flashchips.c:1373: error: expected expression before ‘,’ token
if you look at it, it is quite obvious ;) probably some copy & paste mistake or regex going berserk.
since you have to revise it anyway i have a few nitpicking comments and two important notes to make:
Index: flash.h
--- flash.h (revision 1322) +++ flash.h (working copy) @@ -145,6 +145,10 @@ int (*unlock) (struct flashchip *flash); int (*write) (struct flashchip *flash, uint8_t *buf, int start, int
len);
int (*read) (struct flashchip *flash, uint8_t *buf, int start, int
len);
struct {
uint16_t min;
uint16_t max;
}voltage;
}<space>voltage; is our usual style afaics
Index: flashchips.c
--- flashchips.c (revision 1322) +++ flashchips.c (working copy) @@ -54,6 +54,7 @@ * .unlock = Chip unlock function * .write = Chip write function * .read = Chip read function
* .voltage = Voltage min and max range in decivolt
this is no longer correct.
{
@@ -3285,6 +3379,7 @@ }, .write = write_m29f400bt, .read = read_memmapped,
.voltage = {4750, 5250}, /*5.0V +-5% for -55 model,
+-10% for rest */ <space> after /*
{
@@ -3483,6 +3583,7 @@ }, .write = write_82802ab, .read = read_memmapped,
.voltage = {4500, 5500}, /*5.0V +-10% read, 12V fast
program & erase- +-5% standard, +-10% option */
},
<space> after /*
{
@@ -6653,6 +6841,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
.voltage = {4500, 5500}, /* Datasheet says some are
only 4.75-5.25 V */
},
i havent looked at the datasheet, but if so then we should use the tightest range i.e. 4750, 5250 imho.
{
@@ -6684,6 +6873,7 @@ }, .write = write_jedec_1, .read = read_memmapped,
.voltage = {4500, 5500}, /* Datasheet says some are
only 4.75-5.25 V */
},
same
looks good to me otherwise, thanks a lot! i have not checked the datasheets or the spreadsheet you made though.</decline of responsibility> ;)
-- Kind regards/Mit freundlichen Grüßen, Stefan Tauner
All issues fixed.
On Thu, 2 Jun 2011 19:04:02 -0400 Steven Zakulec spzakulec@gmail.com wrote:
All issues fixed.
thanks. there are three mini-changes that i would apply before committing: - remove "min and max" from the .voltage comment... a range is always min max imho. - missing space in comment (AMD_AM29F002BB) - trailing space after comment (INTEL_28F002T)
i have made this changes already locally and will commit it, when carldani gives his ok to me. thanks a lot for your work!
Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Stefan Tauner wrote:
All issues fixed.
thanks. there are three mini-changes that i would apply before committing:
- remove "min and max" from the .voltage comment... a range is always min max imho.
- missing space in comment (AMD_AM29F002BB)
- trailing space after comment (INTEL_28F002T)
i have made this changes already locally and will commit it, when carldani gives his ok to me.
That's nonsense.
thanks a lot for your work! Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
There is signoff and two acks. Please just commit already.
//Peter
i have added printing of the voltage ranges. sample output below, patch attached.
steven: do you plan to add the missing values in the future? and what are the plans for the form factors/chip packages? aaaand do we want the voltage ranges in the wiki (output) too?
Vendor Device Tested Known Size [kB] Type Voltage range [V] OK Broken
(P = PROBE, R = READ, E = ERASE, W = WRITE)
AMD Am29F010A/B P R E 128 Parallel 4.500, 5.500 AMD Am29F002(N)BB 256 Parallel 4.750, 5.250 AMD Am29F002(N)BT 256 Parallel not specified AMD Am29F016D 2048 Parallel 4.500, 5.500 AMD Am29F040B 512 Parallel 4.500, 5.500 AMD Am29F080B 1024 Parallel 4.500, 5.500 AMD Am29LV001BB P R E W 128 Parallel not specified AMD Am29LV001BT 128 Parallel not specified AMD Am29LV002BB 256 Parallel not specified
On Fri, Jun 3, 2011 at 3:21 AM, Stefan Tauner < stefan.tauner@student.tuwien.ac.at> wrote:
i have added printing of the voltage ranges. sample output below, patch attached.
steven: do you plan to add the missing values in the future? and what are the plans for the form factors/chip packages? aaaand do we want the voltage ranges in the wiki (output) too?
Vendor Device Tested Known Size [kB] Type Voltage range [V] OK Broken
(P = PROBE, R = READ, E = ERASE, W = WRITE)
AMD Am29F010A/B P R E 128 Parallel 4.500, 5.500 AMD Am29F002(N)BB 256 Parallel 4.750, 5.250 AMD Am29F002(N)BT 256 Parallel not specified AMD Am29F016D 2048 Parallel 4.500, 5.500 AMD Am29F040B 512 Parallel 4.500, 5.500 AMD Am29F080B 1024 Parallel 4.500, 5.500 AMD Am29LV001BB P R E W 128 Parallel not specified AMD Am29LV001BT 128 Parallel not specified AMD Am29LV002BB 256 Parallel not specified
-- Kind regards/Mit freundlichen Grüßen, Stefan Tauner
I do plan to add the rest of the missing voltages in the near future (except for the chips marked .REMS- no clue about those.) Peter had some ideas on how to condense and present the form-factors.
On Fri, 3 Jun 2011 07:39:16 -0400 Steven Zakulec spzakulec@gmail.com wrote:
I do plan to add the rest of the missing voltages in the near future (except for the chips marked .REMS- no clue about those.)
cool :) rems is one of the two major identification schemes used for spi flashes (the other one is rdid). you can treat them as if they were named normally regarding voltages afaik.
Am 03.06.2011 09:21 schrieb Stefan Tauner:
i have added printing of the voltage ranges. sample output below, patch attached.
Can we somehow fit this in 80 columns?
steven: do you plan to add the missing values in the future? and what are the plans for the form factors/chip packages? aaaand do we want the voltage ranges in the wiki (output) too?
Makes sense for the wiki, but I'd say voltage is not interesting for normal users of -L by default, so I'd make voltage in the listing depend on the verbosity level.
Vendor Device Tested Known Size [kB] Type Voltage range [V] AMD Am29F010A/B P R E 128 Parallel 4.500, 5.500 AMD Am29F002(N)BB 256 Parallel 4.750, 5.250 AMD Am29F002(N)BT 256 Parallel not specified
I had asked Steven to use decivolt precision to avoid wasting lots of space. Did some magic chips appear which require millivolt precision?
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
I had asked Steven to use decivolt precision to avoid wasting lots of space.
Oh dear.
Did some magic chips appear which require millivolt precision?
One chip specs voltage with .05 V precision. It's a good idea to use SI standard units. It's a bad idea to use anything else. uint_16t also fits well for the so far only user of this information; the USB flashing protocol Stefan and I have worked on.
//Peter
Am 04.06.2011 00:40 schrieb Peter Stuge:
Carl-Daniel Hailfinger wrote:
I had asked Steven to use decivolt precision to avoid wasting lots of space.
Oh dear.
Oh well. I hope he's not disappointed by having had to change this twice.
Did some magic chips appear which require millivolt precision?
One chip specs voltage with .05 V precision. It's a good idea to use SI standard units. It's a bad idea to use anything else. uint_16t also fits well for the so far only user of this information; the USB flashing protocol Stefan and I have worked on.
We'll see how it works out. I don't think a conversion to decivolts of already checked in code makes sense now, and I'd say we close this issue until we have serious problems with the size of the flashchip support table. My constification patch provided a 99% reduction for the .data section, so the immediate effect of a flashchip array shrink would only hit .rodata which is less of an issue.
Regards, Carl-Daniel
On Sat, 4 Jun 2011 00:40:17 +0200 Peter Stuge peter@stuge.se wrote:
Carl-Daniel Hailfinger wrote:
I had asked Steven to use decivolt precision to avoid wasting lots of space.
Oh dear.
Did some magic chips appear which require millivolt precision?
One chip specs voltage with .05 V precision. It's a good idea to use SI standard units. It's a bad idea to use anything else. uint_16t also fits well for the so far only user of this information; the USB flashing protocol Stefan and I have worked on.
deci IS an SI prefix, as well as centi, deca and hecto (i.e. 10^+/-1, 10^+/-2), but i have to agree with peter: it does not make a lot of sense to be that petty on (constant/text segment) space usage imho. if that information is deemed too big, then it should not be in there at all. where/when do you think it gets in the way of using flashrom? we could use a macro similar to the ones used for hiding certain board information triggered by CONFIG_PRINT_WIKI in print.c for flashchips.c this could actually be a good idea, because we could then create different macros for different bus types and ensure that all important fields for that bustype are initialised.
On Sat, 04 Jun 2011 00:34:42 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
Am 03.06.2011 09:21 schrieb Stefan Tauner:
i have added printing of the voltage ranges. sample output below, patch attached.
Can we somehow fit this in 80 columns?
hm. ill take a look what can be done... since we are now scaling the columns according to the names and values in the table that is a bit of a contradicting requirement of course, but i see your point.
steven: do you plan to add the missing values in the future? and what are the plans for the form factors/chip packages? aaaand do we want the voltage ranges in the wiki (output) too?
Makes sense for the wiki, but I'd say voltage is not interesting for normal users of -L by default, so I'd make voltage in the listing depend on the verbosity level.
using the verbosity level is logical, but i am not sure the users would get that immediately... maybe an additional hint to the usage message (which does not even gives a hint -VV)?
i can combine those if you like, but i guess small patches ease review. 1. is trival 2. is logically independent rest is the real stuff, sample output comes in a seperate mail because i have no idea how to send attachments with git :)
Stefan Tauner (4): change all occurrences of printf to msg_ginfo in print.c fix memleaks due to incorrect usage of flashbuses_to_text add printing of chip voltage ranges to print.c add printing of chip voltage ranges to print_wiki.c
chipset_enable.c | 5 +- flashrom.c | 18 ++-- print.c | 281 ++++++++++++++++++++++++++++++++--------------------- print_wiki.c | 51 +++++++--- 4 files changed, 220 insertions(+), 135 deletions(-)