Michal Simek | bbda59e | 2020-09-16 15:16:37 +0200 | [diff] [blame^] | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | .. (C) Copyright 2020 Xilinx, Inc. |
| 3 | |
| 4 | ZYNQMP |
| 5 | ====== |
| 6 | |
| 7 | About this |
| 8 | ---------- |
| 9 | |
| 10 | This document describes the information about Xilinx Zynq UltraScale+ MPSOC |
| 11 | U-Boot support. Core support is available in arch/arm/mach-zynqmp folder. |
| 12 | |
| 13 | ZynqMP boards |
| 14 | ------------- |
| 15 | |
| 16 | * zcu100 (ultra96 v1), zcu102, zcu104, zcu106 - Evaluation boards |
| 17 | * zc1232 - Characterization boards |
| 18 | * zcu111, zcu208, zcu216 - RFSOC evaluation boards |
| 19 | * zcu1254, zcu1275, zcu1285 - RFSOC characterization boards |
| 20 | * a2197 - System Controller on Versal boards |
| 21 | * mini - Mini U-Boot running out of OCM |
| 22 | * zc1751 - Characterization Processor boards |
| 23 | - zc1751-xm015-dc1 |
| 24 | - zc1751-xm016-dc2 |
| 25 | - zc1751-xm017-dc3 |
| 26 | - zc1751-xm018-dc4 |
| 27 | - zc1751-xm019-dc5 |
| 28 | |
| 29 | Building |
| 30 | -------- |
| 31 | |
| 32 | Configure and build for zcu102 board:: |
| 33 | |
| 34 | $ source arm64 toolchain |
| 35 | $ export DEVICE_TREE=zynqmp-zcu102-revA |
| 36 | $ make xilinx_zynqmp_virt_defconfig |
| 37 | $ make |
| 38 | |
| 39 | U-Boot SPL flow |
| 40 | --------------- |
| 41 | |
| 42 | For getting U-Boot SPL flow up and running it is necessary to do some additional |
| 43 | steps because booting device requires external images which are not the part of |
| 44 | U-Boot repository. |
| 45 | |
| 46 | PMU firmware |
| 47 | ^^^^^^^^^^^^ |
| 48 | The Platform Management Unit (PMU) RAM can be loaded with a firmware (PMU |
| 49 | Firmware) at run-time and can be used to extend or customize the functionality |
| 50 | of PMU. The PMU firmware is the part of boot image (boot.bin) and it is |
| 51 | automatically loaded by BootROM. boot.bin can be directly generated by mkimage |
| 52 | tool as the part of make. If you want to create boot.bin with PMU Firmware |
| 53 | include please point CONFIG_PMUFW_INIT_FILE to PMU firmware binary. For example::: |
| 54 | |
| 55 | CONFIG_PMUFW_INIT_FILE="<path>/pmu.bin" |
| 56 | |
| 57 | If you see below message you need to load PMU Firmware:: |
| 58 | |
| 59 | PMUFW is not found - Please load it! |
| 60 | |
| 61 | The second external blob is PMU Configuration object which is object which is |
| 62 | passed from U-Boot SPL to PMU Firmware for initial system configuration. PMU |
| 63 | configuration object is the part of U-Boot SPL image. For pointing to this |
| 64 | object please use CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE symbol. For example::: |
| 65 | |
| 66 | CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE="<path>/pmu_obj.bin" |
| 67 | |
| 68 | |
| 69 | PMU configuration object |
| 70 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 71 | |
| 72 | Object can be obtain in several ways. The easiest way is to take pm_cfg_obj.c |
| 73 | from SDK/Vitis design and build it::: |
| 74 | |
| 75 | $ git clone https://github.com/Xilinx/embeddedsw.git |
| 76 | $ export EMBEDDED_SW=$PWD/embeddedsw |
| 77 | $ gcc -c pm_cfg_obj.c -I ${EMBEDDED_SW}/lib/bsp/standalone/src/common/ -I ${EMBEDDED_SW}/lib/sw_services/xilpm/src/zynqmp/client/common/ |
| 78 | $ objcopy -O binary pm_cfg_obj.o pmu_obj.bin |
| 79 | |
| 80 | The second way is to use tools/zynqmp_pm_cfg_obj_convert.py. For more |
| 81 | information about this tool please run it with -h parameter. |
| 82 | |
| 83 | The third way is to extract it from Xilinx FSBL elf file. Object is starting at |
| 84 | XPm_ConfigObject symbol. |
| 85 | |
| 86 | |
| 87 | Arm Trusted Firmware (ATF) |
| 88 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 89 | |
| 90 | U-Boot itself can run from EL3 to EL1. Without ATF U-Boot runs in EL3. Boot flow |
| 91 | is U-Boot SPL->U-Boot in EL3. When ATF is used U-Boot normally runs in EL2. Boot |
| 92 | flow is U-Boot SPL->ATF->U-Boot in EL2. As the part of build process u-boot.itb |
| 93 | is generated. When BL31 shell variable is present u-boot.itb is generated with |
| 94 | ATF included. You can point to it by::: |
| 95 | |
| 96 | $ export BL31=<path>/bl31.bin |
| 97 | |
| 98 | Flashing |
| 99 | -------- |
| 100 | |
| 101 | SD Card |
| 102 | ^^^^^^^ |
| 103 | |
| 104 | To write an image that boots from a SD card first create a FAT32 partition |
| 105 | and a FAT32 filesystem on the SD card:: |
| 106 | |
| 107 | sudo fdisk /dev/sdx |
| 108 | sudo mkfs.vfat -F 32 /dev/sdx1 |
| 109 | |
| 110 | Mount the SD card and copy the SPL and U-Boot to the root directory of the |
| 111 | SD card:: |
| 112 | |
| 113 | sudo mount -t vfat /dev/sdx1 /mnt |
| 114 | sudo cp spl/boot.bin /mnt |
| 115 | sudo cp u-boot.itb /mnt |