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 - NAND boot support

Started by moritz.ulmer, June 07, 2016, 04:05:12 PM

Previous topic - Next topic

moritz.ulmer

Hi,

I am currently trying to find support for working with the h26m31002gpr sk hynix NAND. The board being used is the TE0720. The NAND is not the same as mentioned on the product page https://wiki.trenz-electronic.de/display/TE0720/TE0720+User+Manual.

The first problem is that it is not recognized as a device by linux. This means that the following does not work https://wiki.trenz-electronic.de/display/TE0720/eMMC.

The aim is to use it as the secondary boot device since adding packages to the ramdisk causes it to grow over the available disk space provided by the QSPI.

Please advise what steps to take for the bringup, the flashing, the build configuration and the boot process itself. The final aim is to use Yocto to build our custom distribution.

Kind regards,
Moritz Ulmer

Oleksandr Kiyenko

Hi,

eMMC on TE0720, can't be used as secondary boot device for Zynq, because it connected to SD1 controller (Only SD0 can be used as boot device). But you can use it as
linux filesystem for packages, data etc. To use it SD1 should be enabled in Zynq I/O Periperals "SD1 MIO46..51". Then boot linux and format device by wiki tutorial. Please note that
linux device name depend on system configuration, so if SD0 not enabled, SD1 become  /dev/mmcblk0, if SD0 enabled SD1 become  /dev/mmcblk1, enumeration also can be changed in linux device tree settings.
Also linux should contain modules and packages for working with selected filesystem.
Warning. Don't forget to unmount filesystem before switch off module!

Best regards
Oleksandr Kiyenko

Antti Lukats

Quote from: moritz.ulmer on June 07, 2016, 04:05:12 PM
Hi,

I am currently trying to find support for working with the h26m31002gpr sk hynix NAND. The board being used is the TE0720. The NAND is not the same as mentioned on the product page https://wiki.trenz-electronic.de/display/TE0720/TE0720+User+Manual.

The first problem is that it is not recognized as a device by linux. This means that the following does not work https://wiki.trenz-electronic.de/display/TE0720/eMMC.

The aim is to use it as the secondary boot device since adding packages to the ramdisk causes it to grow over the available disk space provided by the QSPI.

Please advise what steps to take for the bringup, the flashing, the build configuration and the boot process itself. The final aim is to use Yocto to build our custom distribution.

Kind regards,
Moritz Ulmer

Xilinx Zynq-7000 family does not support eMMC as primaty boot option in ROM code. So for eMMC boot the FSBL at least is always loaded from SPI, and eMMC is used as secondary boot. FSBL support eMMC, but only when eMMC is on SDIO1, so if you want to immediatly start loading form eMMC, the FSBL has to be patched. If you load u-boot from Flash, then there is no patching needed, uboot can load from eMMC on SDIO1 as well.

moritz.ulmer

Thank you for the quick replies.

First off, is the booting u-boot and the kernel supported from SD0 or SD1? Your answers are contadictory.

Secondly, the TE0720 does not have an SD/MicroSD card slot, only a built-in NAND from SK Hynix. The Zedboard and co. have SD card slots. Do you mean to say that the NAND is treated as an SD card?

When trying to format the NAND, only the built-in QSPI is shown. The output of fdisk -l shows a total of 32MB. The NAND with 4GB is not shown.


Disk /dev/mtdblock0: 16 MB, 16777216 bytes
255 heads, 63 sectors/track, 2 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/mtdblock1: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock1 doesn't contain a valid partition table

Disk /dev/mtdblock2: 11 MB, 11010048 bytes
255 heads, 63 sectors/track, 1 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock2 doesn't contain a valid partition table

Disk /dev/mtdblock3: 5 MB, 5636096 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mtdblock3 doesn't contain a valid partition table


Kind regards,
Moritz Ulmer

Antti Lukats

please use precise names

NAND - is memory technology usually with specific NAND interface. Zynq does support direct NAND boot, but there is no NAND device on TE0720 (there is embedded eMMC that has inside NAND memory).
eMMC is "embedded SD Card" that internally uses NAND memory technology but outside looks very similar to SD Card.

Zynq BOOTROM only supports direct boot from one selected SDIO0 interface and only with SD card, not with eMMC card or embedded eMMC.

FSBL supports (without c code patch) eMMC as secondary boot if the eMMC is on SDIO0

so if you want to load bitstream and uboot from eMMC then FSBL has to be patched to change boot device to SDIO1
if you can load at least uboot from SPI, then uboot can load from SDIO0, or SDIO1, be it then SD card or eMMC



moritz.ulmer

So that means that I would have to flash the eMMC NAND with the kernel, the device tree and the RAM disk.

Am i correct to understand that to use the eMMC NAND, the zynq_fsbl, u-boot and Petalinux generated with the TE0720-02-refplnx.bsp can not be used? Where can a current BSP to create a Petalinux project be found that supports the TE0720? The HDF file provided in test_board did not create a u-boot that has access to the eMMC NAND.

1. How to work with the flash?
A. How can the eMMC NAND be flashed from the computer? Using program_flash commands A and B resulted the errors "Problem in running uboot" and "cannot access DDR" respectively.
B. How can the eMMC NAND be accessed from U-Boot? Running the command mmcinfo resulted in: Card did not respond to voltage select!
C. How is the eMMC NAND represented by the linux kernel? The instructions stated for the eMMC do not work since there is no mmcblk0 in /dev/: https://wiki.trenz-electronic.de/display/TE0720/eMMC

program_flash commands:
A. program_flash -f nand_boot.mcs -flash_type nand_8 -fsbl zynq_fsbl.elf -cable type xilinx_tcf url tcp:localhost:3121
B. program_flash -f nand_boot.mcs -flash_type nand_8 -fsbl u-boot.elf -cable type xilinx_tcf url tcp:localhost:3121

Kind regards,
Moritz Ulmer

Antti Lukats

Quote from: moritz.ulmer on June 08, 2016, 02:35:50 PM
So that means that I would have to flash the eMMC NAND with the kernel, the device tree and the RAM disk.

Am i correct to understand that to use the eMMC NAND, the zynq_fsbl, u-boot and Petalinux generated with the TE0720-02-refplnx.bsp can not be used? Where can a current BSP to create a Petalinux project be found that supports the TE0720? The HDF file provided in test_board did not create a u-boot that has access to the eMMC NAND.

1. How to work with the flash?
A. How can the eMMC NAND be flashed from the computer? Using program_flash commands A and B resulted the errors "Problem in running uboot" and "cannot access DDR" respectively.
B. How can the eMMC NAND be accessed from U-Boot? Running the command mmcinfo resulted in: Card did not respond to voltage select!
C. How is the eMMC NAND represented by the linux kernel? The instructions stated for the eMMC do not work since there is no mmcblk0 in /dev/: https://wiki.trenz-electronic.de/display/TE0720/eMMC

program_flash commands:
A. program_flash -f nand_boot.mcs -flash_type nand_8 -fsbl zynq_fsbl.elf -cable type xilinx_tcf url tcp:localhost:3121
B. program_flash -f nand_boot.mcs -flash_type nand_8 -fsbl u-boot.elf -cable type xilinx_tcf url tcp:localhost:3121

Kind regards,
Moritz Ulmer

Please read again what I wrote. NAND flash (not eMMC) is supported by Zynq, but TE0720 does not have NAND, it has eMMC.
program_flash can only write NAND flash, and not eMMC !!

eMMC on TE0720 is just like second SD card on SDIO1, so if you enabled SDIO1 in Vivado, then you have HDF where eMMC is enabled.

uboot does not autmatically enable second SDIOx, this has to be done manually.








moritz.ulmer

Could you please post a link with the HDF file?

Antti Lukats