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

--
http://www.hailfinger.org/

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.