News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

TE0720 Linux QSPI Flash programming

Started by pmsoftware, December 11, 2013, 02:06:09 PM

Previous topic - Next topic

pmsoftware

Goodday,
I found some trouble on programming QSPI Flash with Linux.

I encountered those problem:
1) Reading from mtd0,mtd1... (using for example hexdump /dev/mtdX or dd) shows different data compared to one written previously using JTAG+U-BOOT
2) Writing on /dev/mtd0 (using flash_cp or flash_eraseall+dd) generates a corrupted FSBL, BitStream and UBoot.
3) Writing on /dev/mtd2 corrupts FSBL/BitStream/Uboot

I am using a modified DTS based on the TE0720-01-1CF.dts of Trenz git repository and a rebuild 3.9 linux kernel (3.9.0-xilinx-gc56ac42 #2 SMP PREEMPT Fri Oct 4 14:27:48)
I have no problem writing QSPI Flash using U-BOOT.

Had someone success to update flash under Linux?
Since the W25Q256 flash is a 32MB flash requires a patched version of kernel to be used? Some advice to check if clocks and addresses in XPS are correct?

best regards
Paolo


Oleksandr Kiyenko

Hello,
Better to use flashcp command to rewrite flash. This command perform erasing, writing and verifying mtd device.
flashcp -v /mnt/sd/boot.bin  /dev/mtd0
flashcp -v /mnt/sd/uImage   /dev/mtd1
flashcp -v /mnt/sd/devicetree.dtb    /dev/mtd2
flashcp -v /mnt/sd/uramdisk.image.gz  /dev/mtd3

Best Regards
Oleksandr Kiyenko

pmsoftware

Hi Oleksandr,
so you, using flashcp, trenz DTS and trenz kernel 3.9 can update the QSPI memory.
In this case I am making some unknown error.
Regards
Paolo

Oleksandr Kiyenko

Hi Paolo,

I using 3.10 kernel, and flashcp works perfectly. Will test it with 3.9 kernel later.

Best regards
Oleksandr Kiyenko

Oleksandr Kiyenko

Hi Paolo,
Looks like linux 3.9 kernel have some problems with flash driver or this particular flash chip. I got "flashcp: verification mismatch at 0x0" during testing.
Don't think that there is good idea to investigate this issue, as 3.10 already working on this board.
https://wiki.trenz-electronic.de/display/TE0720/Xilinx+repository

Best regards
Oleksandr Kiyenko

Oleksandr Kiyenko

Hi,

I just test latest 3.13 kernel from xilinx repository, and flashcp working as it should.

Best regards
Oleksandr Kiyenko