<div dir="ltr">On Wed, Feb 6, 2013 at 4:35 AM, Николай Николаев <span dir="ltr"><<a href="mailto:evrinoma@gmail.com" target="_blank">evrinoma@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi  Stefan <br><br>Sorry but i don't want disprove you, i just have a many free time and i want to improve this project. But the dispute burning truth. 8) <br>

All time from my last mail i'm searching spi flash chips documentation and I found about 445 chips different brand and sorted them. <br>
 May be it will be useful for all community. We will made host with SPI(Parallel and other) flash chips documentations and add link on wiki page.<br>for example <br>Eon EN25Q64(link to pdf) 8192 SPI ? ? ? ? 2.700 3.600<br>


<br>Studied documentation i regularity see that all chips has a support standard OPcodes like this<br>WR DATA 0X02<br>READ DATA 0X03<br>WR DIS 0X04<br> READ STATUS 0X05<br>WR ENA 0X06<br> ...<br>exclude 10 Atmel chips from amount 445 and for him we will must write special driver<br>


<br>and special OPcodes like a<br>Fast Dual read 0x3B<br>Auto Address increment 0xAD<br>and others - that codes is a different fetches spi flash chips<br><br>What does this mean. This mean that a spi controller has a standard OPcodes for all flash chips and special OPcodes for each one flash chip. But if we will change flash chip on other flash chip with different special OPcodes that we will must replace special OPcodes. If we will not do it that we can't use special OPcodes, but we can use standard OPcodes. <br>


 So, for more compatibility we will must verify - Does flash chip support special OPcodes?. And if chip will support them that we will use them, but if chip will not support them that we will use a standard OPcodes.<br>for example:<br>


 MX25L6405<br>The function write chip used standard OPcodes flash chip called function spi_chip_write_256<br>SST25VF016B <br>The function write chip used fetches OPcodes flash chip called function spi_aai_write<br>If we can't change OPcodes in registers our SPI controller that we will not write data to chip if we replace them.<br>


 But we will make a program check supporting OPcodes and switch a function from spi_aai_write on spi_chip_write_256<br>After that we can easy write to flash <br>or fast - our SPI controller has supporting fetches OPcodes<br>


 or slow - our SPI controller hasn't supporting fetches OPcodes<br></blockquote><div><br></div><div style>We usually use the .feature_bits member to distinguish these capabilities. The feature you describe uses "FEATURE_ADDR_AAA" and corresponds to spi_aai_write().</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Also i want to suggest exclude from struct flashchip {} parameters voltage, name and add array of struct like a chipdata. <br>

The struct chipdata contains information about all possible chip names and various parameters<br>
 Because looked chips documents i see chips that have a one model_id but have a various chips name, various voltage and various capacity <br>for example<br>MX25U6435F and MX25L6439E </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

MX25L12805D and MX25L25835E<br></blockquote><div><br></div><div style>You're correct about the naming of similar chips. We introduced a schema to work with this last year to try and deal with the naming: <a href="http://www.flashrom.org/pipermail/flashrom/2012-July/009598.html">http://www.flashrom.org/pipermail/flashrom/2012-July/009598.html</a><br>

</div><div style><br></div><div style>I think adding an array of structs struct inside of the flashchip struct would be more effort than it is worth. It would make working with the flashchip data structure more complicated, and we'd need to add nested loops whenever we iterate over the flashchip array. It would also require flexible arrays which may cause problems with certain compilers. </div>

<div style><br></div><div style>The MX25L25835E actually should look the same as MX25L12805D from a software perspective. The difference is that MX25L25835E is stacked (two 128Mbit flash memories). Each bank is selected by a different chip-select line (referred to as CS#1 and CS#2 in the datasheet).</div>

</div><div class="gmail_extra"><br></div>HTH!<br clear="all"><div><br></div>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.
</div></div>