Open essele opened 3 years ago
Hi @essele,
we switched the LiteX-Boards to LiteSPI core snce then (https://github.com/litex-hub/litespi), would you mind testing with it and report if you still have troubles?
Hi ... a few issues with the new approach (I think):
The new modules seem to put a "spiflash_core" and "spiflash_phy" in the csr.json file rather than "spiflash" ... so tools/litex_json2dts_linux.py doesn't pick it up and therefore the dts/dtb files are incorrect.
After manually fixing (or fixing json2dts) then it appears to build and boot, however the flash device isn't recognised at all...
[17.295830] litex-spiflash f0005800.spiflash: unrecognized JEDEC id bytes: 00 00 00 00 00 00
[17.299836] litex-spiflash f0005800.spiflash: SPI_NOR_SCAN FAILED
[17.304125] litex-spiflash: probe of f0005800.spiflash failed with error -2
EDIT: Actually I may be being an idiot ... is there a different linux driver for this? I'm using the same kernel image so that could be the problem ... will investigate.
Lee.
@mateusz-holenko
It might be a driver problem. @kgugala could you take a look at that?
I've just tried a new kernel, a full rebuild from buildroot as per the instructions and it's exactly the same.
Interestingly I'm also seeing fairly erratic behaviour as to whether the sdcard works ... I'm still trying to work out the pattern, I did think it was timing related, as it changes even with the exact same build parameters, but I'm not sure.
Further info ... the problem with json2dts meant that I had my devicetree incorrect (the address has changed), however looking at csr.csv I can see that there are a different set of registers. The linux driver litex-spiflash.c still seems to expect the old style!
I'm still seeing the same issue @essele describes on the current version of the linux driver. Any updates on how to proceed with spiflash in Linux.
Hi,
I'm trying to build support for the muselabs icesugar_pro which is an ECP5 device, I can get everything running nicely on the sdcard and have just been experimenting with the spiflash. I have setup two partitions, one 2M for the FPGA bitstream and another 28M to experiment with jffs etc.
However whenever I read data (either from mtd0 or mtd1) I get the bitstream .. it actually looks like I get the same 128k of data repeated.
flash_erase on mtd1 appears to complete ok, but doesn't change the read behaviour, it's certainly not erased (or it could be, but I'm not reading valid data!)
The nor flash is a W25Q256 and is obviously working fine from a bitstream read perspective.
Here's my addition to the make.py file:
And the relevant section from the litex platform file:
And the device tree bits to support partitions:
And relevant boot messages, which seem to be ok...
And mtdinfo output...
Any help greatly appreciated.
Lee.