Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: pmsoftware on December 11, 2013, 02:06:09 PM

Title: TE0720 Linux QSPI Flash programming
Post by: pmsoftware on December 11, 2013, 02:06:09 PM
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

Title: Re: TE0720 Linux QSPI Flash programming
Post by: Oleksandr Kiyenko on December 13, 2013, 10:50:26 AM
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
Title: Re: TE0720 Linux QSPI Flash programming
Post by: pmsoftware on December 13, 2013, 12:13:25 PM
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
Title: Re: TE0720 Linux QSPI Flash programming
Post by: Oleksandr Kiyenko on December 13, 2013, 02:07:45 PM
Hi Paolo,

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

Best regards
Oleksandr Kiyenko
Title: Re: TE0720 Linux QSPI Flash programming
Post by: Oleksandr Kiyenko on December 18, 2013, 05:21:22 PM
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
Title: Re: TE0720 Linux QSPI Flash programming
Post by: Oleksandr Kiyenko on May 06, 2014, 10:31:36 AM
Hi,

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

Best regards
Oleksandr Kiyenko