
On Friday, February 11, 2011 11:01:40 pm Albert ARIBAUD wrote:
Le 12/02/2011 07:42, Aaron Williams a écrit :
I've placed the results of the scan below.
The problem is that in 8-bit mode the code that scans the CFI does not follow the specification.
In the specification to read the CFI data you write 0x98 to address 0xAA, not address 0x55 as you do in 16-bit mode. flash_offset_cfi is set to 0x55 which in this case is wrong and won't work. When it tries 16-bit mode then it writes to address 0xAA which causes it to work.
Let us see the specs, then. The specs I have (admittedly not necessarily the latest: I use JESD 68.01, september 1999) state the following:
"Nonvolatile memory devices are assumed to power up in a read-only state. Independent of that assumption, the Query structure contents must be able to be read at the specific address locations following a single system write cycle where: 1) a 98h Query command code is written to 55h address location within the device’s address space (in maximum device buswidth), and 2) the device is in any valid read state, such as “Read Array” or “Read ID Data”.
I read "55h address location within the device’s address space (in maximum device buswidth" as implying that 0x55 is the only address to use but is in device bus terms, and that may mean different CPU addresses for different devices types: for x8 devices, one should access the byte address 0x55 because the device bus is in bytes, whereas for x8/x16 and x16 devices, one should access byte address 0xAA because it translates to x16 device bus address 0x55 -- regardless of actual x8 or x16 mode.
Are we in sync here?
Now it's been a long time since I last looked at my ED Mini V2 Flash, but I should be able to dig it up and do a test within one or two hours.
-Aaron
Here's the results of the scan:
Yes, that's what U-boot *CFI code* does, but I'd like to see what very basic writes and reads give without any detection logic involved.
Amicalement,
I'm looking at the Spansion S29GL-N datasheet from 2008. Look at table 10.3 on page 53.
http://www.spansion.com/Support/Datasheets/S29GL-N_01_12_e.pdf
-Aaron