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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
This README file contains information on building and booting
Yocto for the Xilinx ZC702 board.
SOC & board features
Feature Support Notes
UP yes
SMP yes
TTC yes 3-channel timer
UART yes only second UART via CP2103 USB converter
PL330 yes DMA controller
SLCR yes clock control, reset and MIO (pin mux)
GPIO yes
DEVCFG yes PL control and bitstream upload; untested
EMAC yes Ethernet controller
88E1116R yes Ethernet PHY (Marvell); on board
SDHCI yes
QSPI yes
N25Q128A yes QSPI flash; on board
SPI no driver included; no devices connected
NAND no driver included; no devices connected
I2C yes
PCA9548 yes I2C mux; on board
Si570 yes I2C programmable oscillator; on board
ADV7511 no I2C HDMI transmitter; on board
TCA6416 yes I2C GPIO ; on board
UCD9248 no I2C 3x Digital PWM System Controller; on board
RTC8564 yes I2C Real Time Clock; on board
M24C08 no I2C EEPROM; on board
RevB boards have a PCB layout issue, should
work on fixed board as there is a driver in
the kernel
USB yes host, device and OTG modes
XADC yes only internal sensors (temp, supply voltages)
and dedicated external channel supported
Building
In order to build Yocto for the ZC702 board, you need to add the meta-zynq layer
to your bblayers.conf file (variable BBLAYERS) and set MACHINE = "zynq" in the local.conf
file. You can then use the following bitbake targets:
- core-image-minimal, to build a root image suitable for ramdisk (ext2.bz2) or QSPI flash
(jffs2). This image contains mtd-utils in addition to the standard core-image-minimal
packages, but no modules. It is limited to 8MB in size.
- core-image-zynq, to build a root image suitable for SD-card or USB (ext3). This image
contains a lot of extra utilities, as well as the kernel modules.
- linux-yocto, to build a kernel in uImage format as well as a device tree.
Booting from SD card
The jumper configuration for booting from SD card is: J20 2-3, J21 2-3, J22 1-2, J25 1-2,
J26 2-3, J27 1-2, J28 1-2. The ROM bootloader looks for a BOOT.BIN file in the root
of the first partition of the card, loads it and executes it. The partition has to
be in VFAT format. The card that comes with the board contains an U-Boot loader in
the BOOT.BIN file.
Booting from QSPI flash
The jumper configuration for booting from the QSPI flash is: J20 2-3, J21 2-3, J22 2-3,
J25 1-2, J26 2-3, J27 1-2, J28 1-2. The ROM bootloader loads the secondary bootloader
from the start of the QSPI flash device and executes it. You can write the BOOT.BIN
file that comes with the SD card with the following sequence of U-Boot commands,
before setting the jumpers for QSPI boot:
mmcinfo
fatload mmc 0 0x100000 BOOT.BIN
sf probe 0
sf write 0x100000 0 ${filesize}
Booting the core-image-minimal image as a ramdisk
The devicetree node "chosen" is used to set the boot line for the kernel. Load the correct dtb
file from the boot media. The following example uses network loading, if you want to
load the files from the SD card or the QSPI flash please consult the U-Boot documentation.
The files referenced can be found in tmp/deploy/images and are assumed to be copied to the
root location used by the TFTP server.
setenv ipaddr 10.0.0.2
setenv serverip 10.0.0.1
tftp 0x1000000 uImage-zynq-zc702_ram.dtb
tftp 0x2000000 core-image-minimal-zynq.ext2.bz2
tftp tftp 0x1010000 uImage-zynq.bin
bootm 0x1010000 - 0x1000000
Booting the core-image-minimal image as a JFFS2 volume
The devicetree node "chosen" is used to set the boot line for the kernel. Load the correct dtb
file (uImage-zynq-zc702_qspi.dtb) from the boot media. If you don't have the correct
dtb file, you can modify the one you have in U-Boot :
tftp 0x1000000 uImage-zynq-zc702_ram.dtb
fdt addr 0x1000000
fdt print /chosen
setenv bootargs console=ttyPS0,115200 earlyprintk root=/dev/mtdblock6 rw rootfstype=jffs2 rootwait
fdt chosen
fdt print /chosen
The root image can be programmed directly from U-Boot:
tftp 0x2000000 core-image-minimal-zynq.jffs2
sf probe 0
sf erase 0x800000 0x800000
sf write 0x2000000 0x800000 ${filesize}
You only need to do this once. Afterwards, you can either load the correct dtb or
modify the old dtb, load the uImage and do
bootm 0x1010000 - 0x1000000
Booting the core-image-zynq as a SD card partition
See instructions above. The correct dtb file is uImage-zynq-zc702_sd.dtb and the boot line is:
console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 ro rootwait
This assumes that the root partition is the second one, as the first one might be used for the
bootloader. You can write the core-image-zynq-zynq.ext3 file directly to the partition
using dd or cat. Save the content of the initial partition first, resize it or erase it
then create a small VFAT partition and a Linux partition at least 256MB in size. Format
the first partition as VFAT and write BOOT.BIN to the first partition as a file then
write the ext3 image to the second partition. You can also format the second partition
with your favorite settings, mount it and untar core-image-zynq-zynq.tar.bz2
USB interface
The USB interface on the ZC702 board can work in host, peripheral and otg mode. The jumper
configuration for host (default) mode is: J7 ON, J33 2-3, J34 2-3, J35 1-2, J36 1-2.
For device mode, remove J7 and move J33 to 1-2. For OTG mode, remove J34. If you don't
have a cable with the ID pin grounded for starting in host mode, ground J34 pin 2. Also,
you need to modify the devicetree property dr_mode of /amba/usb/ :
tftp 0x1000000 uImage-zynq.dtb
fdt addr 0x1000000
fdt set /amba/usb dr_mode peripheral
or
fdt set /amba/usb dr_mode otg
You can also modify the devicetree permanently, by editing the devicetree source file zc702.dtsi
and using the dtc program to compile a dtb:
dtc -I dts -O dtb zc702_ram.dts > uImage-zynq-zc702_sd.dtb
You can access the dtc program within the devshell:
bitbake linux-yocto -c devshell
|