spi_flash_probe returns zero idcodes and hangs
Hello All,
? ? ? ? ? ? ? ? I am using a custom ARM based development board running u-boot from PNOR memory. However, it does not have support for the Micron SPI flash memory (N25Q064A). I have added support for the micron memory in drivers/mtd/spi/stmicro.c file and included the flag CONFIG_SPI_FLASH_STMICRO in the config file and recompiled the u-boot source source. Then, ran it directly through RAM memory. The new u-boot ran from RAM. Now when I run sf probe 0 command I get the following output
Got Idcodes 000000: 00 00 00 00 ?and the code hangs after this.?
Please help me regarding this issue.
Regards,
Amit.
Quoted 4 lines · Amit Mahadik
Hello All,
I am using a custom ARM based development board running u-boot from PNOR memory. However, it does not have support for the Micron SPI flash memory (N25Q064A). I have added support for the micron memory indrivers/mtd/spi/stmicro.cfile and included the flagCONFIG_SPI_FLASH_STMICROin the config file and recompiled the u-boot source source. Then, ran it directly through RAM memory.
The new u-boot ran from RAM. Now when I run sf probe 0 command I get the following output
Got Idcodes 000000: 00 00 00 00 and the code hangs after this.
Looks like your driver itself is not returning any proper idcode.
What id details you added - I think you're using old u-boot no stmicro.c in current u-boot, please re-base to master and try.
thanks!
Signature · 1 line
Jagan.
+ u-boot ML
Quoted 4 lines · Amit Mahadik
Hello Sir,
Please find attached my driver file. The functionspi_flash_alloc_basedeclaration was added toinclude/spi_flash.hand definition todrivers/mtd/spi/spi_flash.c.
Yes - It's looks fine but.
Quoted 5 lines
Regards,
Amit.
Quoted 16 lines
On Saturday, 24 May 2014 10:45 PM, Jagan Teki <[email protected]> wrote:
Quoted 10 lines · Amit Mahadik
Hello All,
I am using a custom ARM based development board running
u-boot from PNOR memory. However, it does not have support for the Micron SPI flash memory (N25Q064A). I have added support for the micron memory indrivers/mtd/spi/stmicro.cfile and included the flagCONFIG_SPI_FLASH_STMICROin the config file and recompiled the u-boot source source. Then, ran it directly through RAM memory.
The new u-boot ran from RAM. Now when I run sf probe 0 command I get the following output
Got Idcodes 000000: 00 00 00 00 and the code hangs after this.
This log should not be all 0's
#ifdef DEBUG
printf("SF: Got idcodes\n");
print_buffer(0, idcode, 1, sizeof(idcode), 0);#endif
The idcode details comes from drivers/spi while reading flash ID code. Check with your driver once and it's good to try to latest u-boot.
Quoted 5 lines
Looks like your driver itself is not returning any proper idcode.
What id details you added - I think you're using old u-boot no
stmicro.cin current u-boot, please re-base to master and try.
thanks!
Signature · 1 line
Jagan.
Amit,
If you can, place a SPI protocol analyzer on the bus and trace its transactions.
I recently debugged a similar symptom and discovered that I was not driving the Tx FIFO consistently enough to maintain the appearance of a single transaction on the ID request to the flash.
How is your SPI device (flash, right?) being selected? If via a GPIO, are you sure you are driving it properly? If it is directly using a controller's slave-select
line, you may need to ensure a full Tx FIFO for both the write and response.
HTH,
jdl
Quoted 18 lines · Jagan Teki
Quoted 4 lines · Amit Mahadik
Hello All,
I am using a custom ARM based development board running u-boot from PNOR memory. However, it does not have support for the Micron SPI flash memory (N25Q064A). I have added support for the micron memory indrivers/mtd/spi/stmicro.cfile and included the flagCONFIG_SPI_FLASH_STMICROin the config file and recompiled the u-boot source source. Then, ran it directly through RAM memory.
The new u-boot ran from RAM. Now when I run sf probe 0 command I get the following output
Got Idcodes 000000: 00 00 00 00 and the code hangs after this.Looks like your driver itself is not returning any proper idcode.
What id details you added - I think you're using old u-boot no
stmicro.cin current u-boot, please re-base to master and try.thanks!
--
Jagan.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot