1.. SPDX-License-Identifier: GPL-2.0
2..  (C) Copyright 2020 Xilinx, Inc.
3
4ZYNQMP
5======
6
7About this
8----------
9
10This document describes the information about Xilinx Zynq UltraScale+ MPSOC
11U-Boot support. Core support is available in arch/arm/mach-zynqmp folder.
12
13ZynqMP 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
29Building
30--------
31
32Configure 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
39U-Boot SPL flow
40---------------
41
42For getting U-Boot SPL flow up and running it is necessary to do some additional
43steps because booting device requires external images which are not the part of
44U-Boot repository.
45
46PMU firmware
47^^^^^^^^^^^^
48The Platform Management Unit (PMU) RAM can be loaded with a firmware (PMU
49Firmware) at run-time and can be used to extend or customize the functionality
50of PMU. The PMU firmware is the part of boot image (boot.bin) and it is
51automatically loaded by BootROM. boot.bin can be directly generated by mkimage
52tool as the part of make. If you want to create boot.bin with PMU Firmware
53include please point CONFIG_PMUFW_INIT_FILE to PMU firmware binary. For example:::
54
55  CONFIG_PMUFW_INIT_FILE="<path>/pmu.bin"
56
57If you see below message you need to load PMU Firmware::
58
59  PMUFW is not found - Please load it!
60
61The second external blob is PMU Configuration object which is object which is
62passed from U-Boot SPL to PMU Firmware for initial system configuration. PMU
63configuration object is the part of U-Boot SPL image. For pointing to this
64object 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
69PMU configuration object
70^^^^^^^^^^^^^^^^^^^^^^^^
71
72Object can be obtain in several ways. The easiest way is to take pm_cfg_obj.c
73from 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
80The second way is to use tools/zynqmp_pm_cfg_obj_convert.py. For more
81information about this tool please run it with -h parameter.
82
83The third way is to extract it from Xilinx FSBL elf file. Object is starting at
84XPm_ConfigObject symbol.
85
86
87Arm Trusted Firmware (ATF)
88^^^^^^^^^^^^^^^^^^^^^^^^^^
89
90U-Boot itself can run from EL3 to EL1. Without ATF U-Boot runs in EL3. Boot flow
91is U-Boot SPL->U-Boot in EL3. When ATF is used U-Boot normally runs in EL2. Boot
92flow is U-Boot SPL->ATF->U-Boot in EL2. As the part of build process u-boot.itb
93is generated. When BL31 shell variable is present u-boot.itb is generated with
94ATF included. You can point to it by:::
95
96  $ export BL31=<path>/bl31.bin
97
98Flashing
99--------
100
101SD Card
102^^^^^^^
103
104To write an image that boots from a SD card first create a FAT32 partition
105and a FAT32 filesystem on the SD card::
106
107        sudo fdisk /dev/sdx
108        sudo mkfs.vfat -F 32 /dev/sdx1
109
110Mount the SD card and copy the SPL and U-Boot to the root directory of the
111SD card::
112
113        sudo mount -t vfat /dev/sdx1 /mnt
114        sudo cp spl/boot.bin /mnt
115        sudo cp u-boot.itb /mnt
116