summaryrefslogtreecommitdiffstats
path: root/doc/board/xilinx/zynqmp.rst
blob: a035cff1a5bde267f89e17427ce525df45f4e57c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.. SPDX-License-Identifier: GPL-2.0
..  (C) Copyright 2020 Xilinx, Inc.

ZYNQMP
======

About this
----------

This document describes the information about Xilinx Zynq UltraScale+ MPSOC
U-Boot support. Core support is available in arch/arm/mach-zynqmp folder.

ZynqMP boards
-------------

* zcu100 (ultra96 v1), zcu102, zcu104, zcu106 - Evaluation boards
* zc1232 - Characterization boards
* zcu111, zcu208, zcu216 - RFSOC evaluation boards
* zcu1254, zcu1275, zcu1285 - RFSOC characterization boards
* a2197 - System Controller on Versal boards
* mini - Mini U-Boot running out of OCM
* zc1751 - Characterization Processor boards
     - zc1751-xm015-dc1
     - zc1751-xm016-dc2
     - zc1751-xm017-dc3
     - zc1751-xm018-dc4
     - zc1751-xm019-dc5

Building
--------

Configure and build for zcu102 board::

   $ source arm64 toolchain
   $ export DEVICE_TREE=zynqmp-zcu102-revA
   $ make xilinx_zynqmp_virt_defconfig
   $ make

U-Boot SPL flow
---------------

For getting U-Boot SPL flow up and running it is necessary to do some additional
steps because booting device requires external images which are not the part of
U-Boot repository.

PMU firmware
^^^^^^^^^^^^
The Platform Management Unit (PMU) RAM can be loaded with a firmware (PMU
Firmware) at run-time and can be used to extend or customize the functionality
of PMU. The PMU firmware is the part of boot image (boot.bin) and it is
automatically loaded by BootROM. boot.bin can be directly generated by mkimage
tool as the part of make. If you want to create boot.bin with PMU Firmware
include please point CONFIG_PMUFW_INIT_FILE to PMU firmware binary. For example:::

  CONFIG_PMUFW_INIT_FILE="<path>/pmu.bin"

If you see below message you need to load PMU Firmware::

  PMUFW is not found - Please load it!

The second external blob is PMU Configuration object which is object which is
passed from U-Boot SPL to PMU Firmware for initial system configuration. PMU
configuration object is the part of U-Boot SPL image. For pointing to this
object please use CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE symbol. For example:::

  CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE="<path>/pmu_obj.bin"


PMU configuration object
^^^^^^^^^^^^^^^^^^^^^^^^

Object can be obtain in several ways. The easiest way is to take pm_cfg_obj.c
from SDK/Vitis design and build it:::

  $ git clone https://github.com/Xilinx/embeddedsw.git
  $ export EMBEDDED_SW=$PWD/embeddedsw
  $ 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/
  $ objcopy -O binary pm_cfg_obj.o pmu_obj.bin

The second way is to use tools/zynqmp_pm_cfg_obj_convert.py. For more
information about this tool please run it with -h parameter.

The third way is to extract it from Xilinx FSBL elf file. Object is starting at
XPm_ConfigObject symbol.


Arm Trusted Firmware (ATF)
^^^^^^^^^^^^^^^^^^^^^^^^^^

U-Boot itself can run from EL3 to EL1. Without ATF U-Boot runs in EL3. Boot flow
is U-Boot SPL->U-Boot in EL3. When ATF is used U-Boot normally runs in EL2. Boot
flow is U-Boot SPL->ATF->U-Boot in EL2. As the part of build process u-boot.itb
is generated. When BL31 shell variable is present u-boot.itb is generated with
ATF included. You can point to it by:::

  $ export BL31=<path>/bl31.bin

Flashing
--------

SD Card
^^^^^^^

To write an image that boots from a SD card first create a FAT32 partition
and a FAT32 filesystem on the SD card::

        sudo fdisk /dev/sdx
        sudo mkfs.vfat -F 32 /dev/sdx1

Mount the SD card and copy the SPL and U-Boot to the root directory of the
SD card::

        sudo mount -t vfat /dev/sdx1 /mnt
        sudo cp spl/boot.bin /mnt
        sudo cp u-boot.itb /mnt