GT

Gennaro Tortone homepage

0%

Enclustra XU5

Hardware

Carrier: PE1-300
SOM: XU5-2EG-1I

Mercury XU5 Reference Design:
https://download.enclustra.com/public_files/SoC_Modules/Mercury_XU5/Mercury_XU5_Reference_Design_for_Mercury_PE1_V6.2.zip

Mercury XU5 Schematic:
https://download.enclustra.com/public_files/SoC_Modules/Mercury_XU5/Mercury_XU5-R1-2_User_Schematics_V5.pdf

Mercury XU5 FPGA pinout:
https://download.enclustra.com/public_files/SoC_Modules/Mercury_XU5/Mercury_XU5-R1_FPGA_Pinout.xlsx

Mercury XU5 User Manual:
https://download.enclustra.com/public_files/SoC_Modules/Mercury_XU5/Mercury_XU5_User_Manual_V07.pdf

Enclustra build howto:
https://www.enclustra.com/assets/scripts/download.php?f=Enclustra_Build_Environment_HowToGuide_V02.pdf

Mercury+ PE1 Schematic:
https://download.enclustra.com/public_files/Base_Boards/Mercury+_PE1/Mercury_PE1-R4-5_User_Schematics_V0.pdf

Mercury+ PE1 FMC pinout:
https://download.enclustra.com/public_files/Base_Boards/Mercury+_PE1/Mercury_PE1-R4-3_User_Schematics_V1_FMC_Pinout.pdf

Mercury+ PE1 User Manual:
https://download.enclustra.com/public_files/Base_Boards/Mercury+_PE1/Mercury_PE1_User_Manual_V05.pdf

Vivado reference project

  • Vivado release: 2018.3
1
cd <reference-design-directory>
  • Edit scripts/settings.tcl and modify FPGA type:
1
set fpga_part xczu2eg-sfvc784-2-i
  • Edit scripts/MercuryXU5_bd_PE1.tcl
1
2
3
4
5
set scripts_vivado_version 2018.3

assign_bd_address -offset 0x80000000 -range 0x00010000 -target_address_space [get_bd_addr_spaces zynq_ultra_ps_e_0/Data] [get_bd_addr_segs axi_gpio_0/S_AXI/Reg]
assign_bd_address -offset 0x000400000000 -range 0x20000000 -target_address_space [get_bd_addr_spaces zynq_ultra_ps_e_0/Data] [get_bd_addr_segs ddr4_0/C0_DDR4_MEMORY_MAP/C0_DDR4_ADDRESS_BLOCK]
assign_bd_address -offset 0x80010000 -range 0x00010000 -target_address_space [get_bd_addr_spaces zynq_ultra_ps_e_0/Data] [get_bd_addr_segs system_management_wiz_0/S_AXI_LITE/Reg]
  • Create project
1
vivado -mode batch -source scripts/create_project.tcl

Output project: Vivado_PE1/MercuryXU5_PE1.xpr

Note

To compile project enable “Specify MMCM M and D on Advanced Clocking Page…” on DDR4 SDRAM (MIG)

Kernel build

1
git checkout v1.8.2
  • Build Linux kernel
1
2
3
4
5
6
7
export PATH=/opt/aarch64-none-linux-gnueabi/bin:\$PATH
export CROSS_COMPILE=aarch64-none-linux-gnueabi-

make ARCH=arm64 xilinx_zynqmp_defconfig
make ARCH=arm64 menuconfig
make ARCH=arm64 -j5 Image dtbs modules
make ARCH=arm64 -j5 modules_install INSTALL_MOD_PATH=/media/tortone/ROOTFS/

Output file: arch/arm64/boot/Image

Device Tree

  • Checkout release 2018.3
1
git checkout xilinx-v2018.3
  • Generate a device tree from reference Vivado project
1
2
3
4
5
6
7
8
9
hsi

open_hw_design MercuryXU5_PE1.sdk/system_top.hdf

set_repo_path /home/tortone/devel/training/zynq-linux/device-tree-xlnx

create_sw_design device-tree -os device_tree -proc psu_cortexa53_0

generate_target -dir my_dts
  • Compile device tree blob (.dtb) from device tree source (.dts)
1
2
3
4
5
6
7
8
cd my_dts
cp deployment/device-tree/* .

cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp xu5.dts > system-top-preproc.dts
or
cpp -nostdinc -I /home/tortone/devel/training/Enclustra-XU5/XU5-linux-adi/include -I arch -undef -x assembler-with-cpp xu5.dts > system-top-preproc.dts

dtc -I dts -O dtb system-top-preproc.dts -o devicetree.dtb

Output file: my_dts/devicetree.dtb

U-Boot

1
2
3
4
5
6
export PATH=/opt/aarch64-none-linux-gnueabi/bin:\$PATH
export CROSS_COMPILE=aarch64-none-linux-gnueabi-

make enclustra_zynqmp_mercury_xu5_defconfig
make menuconfig
make -j5

Output file: u-boot.elf

Important

Verify that bootargs parameter contains ‘clk_ignore_unused’ otherwise ETH1 will not work !!!

U-Boot scripts

In u-boot-xlnx/bscripts there are .scr files (U-Boot scripts) to boot from different devices

FSBL, PMU and BL31

boot.bin

Boot from SD

  • U-Boot script for boot from SD
1
2
3
4
5
6
7
8
9
10
setenv autoload no
load mmc 0 ${kernel_loadaddr} ${kernel_image}
dhcp && tftpboot ${devicetree_loadaddr} 10.1.3.1:devicetree.dtb
fdt addr ${devicetree_loadaddr}
setexpr mmcdev ${mmcdev} + 1 || exit;
setexpr mmcdev ${mmcdev} % 2;
setexpr mmcdev sub 0x '';
run mmc_args
setenv bootargs ${bootargs} earlycon clk_ignore_unused
booti ${kernel_loadaddr} - ${devicetree_loadaddr}