Zc702 Linux

Zc702 Linux

The purpose of this page is to describe how to use the ZC702 board with u-boot and Linux. The items on this page are intended to be specific details about the ZC702 rather than general u-boot / Linux information.

Board Support Package (BSP) Files

please refer to the Releases page for detailed information.

GPIOs and LEDs (>=14.1)

The DS23 LED on the ZC702 is working with Linux. The Linux kernel is setup so that the GPIO can be used through sysfs to control the LED.
Create a GPIO corresponding to MIO 10 and then configure GPIO 10 so that it is an output.
Turn on LED DS23.
Turn off LED DS23.

The following commands can be used to conifgure MIO 8 as GPIO, such that it can be used control the DS12 LED.

I2C Devices (>=14.2)

All of the following devices are connected to the I2C bus through a 1:8 mux/switch. I2C Bus 0 is the mux

I2C EEPROM

The I2C EEPROM can be read and written from sysfs such that is can be used programmatically or from a bash script. The device is on the 3rd virtual I2C bus off of the mux.

View the contents of the 1KB EEPROM.

A 1KB data file of random data can be generated and then written to the I2C EEPROM.

The contents of the I2C EEPROM can be read back and compared to the data written in the previous command to verify it was successful.

Real Time Clock (RTC)

A real time clock device is located on the I2C bus. The device is on the 5th virtual I2C bus off of the mux.

Read the date and time from the RTC.

Networking

The network is setup by default with a static IP address as described on Zynq Release.
The network supports 10/100/1000 rates.

QSPI Flash Memory

The QSPI flash memory on the board can be read and written thru the MTD file system of Linux.

The following command displays the partitions for the QSPI flash memory.

MTD devices are setup for each of the partitions with block (/dev/mtdblockX) and character devices (/dev/mtdX).

The prebuilt images for a release can be written from the SD card to the QSPI easily. The following command mounts the SD card into the /mnt directory so that files on it are accessible.

Note: Before proceeding, please note that the partitions used in the following sections could be different based on the release such that the correct partition (mtdX) should be specified.

Copy the images (FSBL/u-boot, Linux kernel, the device tree, and the ramdisk) from the SD card to the QSPI flash memory partitions. The flashcp command erases the flash, writes it, and verifies it. After the following command are completed, the board can be booted from QSPI flash memory after setting the boot mode jumpers.

The following command will umount the SD card.

SD Card

The SD card is accessible thru the MMC subsystem of Linux.

The following command will format the SD card with a FAT file system and then mount it. Note that any files contained on the SD card will be lost. The SD card can not be mounted already as done in previous commands.

The following commands copy each MTD partition from QSPI flash memory onto the SD card assuming that the QSPI flash memory was previously written with the files as done in the QSPI flash memory section above.

The board can now be rebooted in SD boot mode and it should boot into Linux. Note that the files that were created are the size of the MTD partition from which they were read.

Unmount the SD card using the following command.

USB Host

The default setup for the USB port is host mode based on the jumpers. A USB memory stick is the easiest way to exercise the functionality. A USB memory stick emulates a SCSI device in Linux using device nodes /dev/sdX where the 1st device is /dev/sda.

The following commands will format a USB memory stick which is plugged into the USB port with a FAT file system. Note that any files contained on the USB memory stick will be lost.

Files can be copied from the SD card to the USB memory stick using the following commands.