Document revision: v1.2Issue date: October 05, 2016
CONTENTS
1 First Steps 11.1 About this Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Required Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Steps for Setting up the EVK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Using the EVK 42.1 About this Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Board Layout Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Powering the Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Booting from an SD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.5 Connecting to the Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.6 Installing a Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.7 Using the External Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3 So�ware Guide 253.1 About this Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Compiling Kernel and Bootloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3 Building the root �lesystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.4 Deploying on SD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.5 Deploying on On-Board eMMC storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.6 Compiling Linux Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.7 Serial Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.8 MAC Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4 Hardware Guide 354.1 About this Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 Qseven Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page i
4.3 Connector Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.4 Signal Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.5 On-board Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.6 Electrical Speci�cation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.7 Mechanical Speci�cation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5 Acronyms and Abbreviations 52
6 Revision History 53
Index 55
v1.2Page ii
CHAPTER
ONE
FIRST STEPS
Note: �e latest version of this manual and related resources can always be found on our website at the following address:
https://www.theobroma-systems.com/a80-q7
1.1 About this Chapter
�is chapter provides instructions for getting the the A80 Q7 EVK running a�er opening the box.
1.2 Required Tools
• PZ1 (Pozidriv) screwdriver
1.3 Steps for Setting up the EVK
1.3.1 Mount the Thermal Pad
Peel o� the protective foil on one side and mount the thermal pad as shown below on the heatsink. Place it close to the
holes on the le� without overlapping them.
Now, peel o� the protective foil o� the other side.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 1
Figure 1.1: �ermal pad mounting
1.3.2 Mount Module and Heatsink
Insert the A80 Q7module at a 45 degree angle into the connector in the base board. Once fully inserted, push it down until
it rests on the stando�s.
Place the heatsink on the module and screw it down very gently using four screws of 10mm length.
Figure 1.2: Screws used for mounting heatsink and A80 Q7 module
1.3.3 Mount the Fan (optional)
Note: �e fan is only neccessary in exceptionally high ambient temperatures. Under normal conditions, the A80 Q7
operates passively cooled.
v1.2Page 2
Place the fan on the heatsink and screw it down using four 19 mm long screws.
Figure 1.3: Screws used for mounting the fan
1.3.4 Insert SD Card & Power Up
Insert the enclosed SD card into the slot on the base board. �e slot is marked with the SD logo.
Connect the power supply to the base board.
Press the “Power” button on the base board. �e module will boot up. You will see the boot progress and get a login prompt
on the RS-232 interface.
For further details, see the sections Booting from an SD Card, Powering the Board and Board Layout Overview.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 3
CHAPTER
TWO
USING THE EVK
2.1 About this Chapter
�is chapter provides instructions for using the EvaluationKit, such as booting and how to con�gure and use I/O peripheals
(e.g. serial console, Ethernet).
2.2 Board Layout Overview
�e board provides connectors for external I/O devices (top row in the image below), for data storage (top-le� corner)
and for internal connections (bottom row). Two means of supplying the board are provided (right row), as well as power
control functionality, both on-board and extendable (via the CTRL connector) (bottom-le� corner).
2.3 Powering the Board
�e baseboard can operate with a single 12V DC power supply.
Alternatively, the baseboard also provides an 24-pin ATX connector. �e DC connector takes precendence if both are
connected.
Note: When using ATX power, the A80 Q7 module can only boot from the on-board eMMCmemory as the ATX power
supply does not supply the SD card while booting.
Power can be controlled manually from the board using the power control buttons and switches, located on the le� side of
the board (see Board Layout Overview).
v1.2Page 4
RS23
2
Ethe
rnet
Audi
o
2x U
SB H
ost
USB
Dev
ice
USB
Hos
t
HD
MI
12V
Pow
er
SD-CardSlot
SATA
Battery
Boot SW
Lid SW
Power SW
Power
SleepResetWake
USB Audio SMBUS/THERM
CAN GPIO I²C/SPI/1WIRE
FANLVDS
JTAG
Buzzer
24-p
in A
TX P
ower
Q7 Module
Figure 2.1: �e base board for to A80 Q7 module
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 5
Figure 2.2: 12V power connector
v1.2Page 6
Figure 2.3: ATX power connector
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 7
2.3.1 Control Buttons
�e control buttons provide Power, Reset, Sleep and Wake functionality. �e Power button can be disabled by setting
the Power Switch to Force On. �is means the board will boot as soon as it receives power.
2.3.2 The Control Connector
�e control connector provides an interface for accessing the control features of the board from outside (for example, from
buttons placed conveniently on the front-panel of a case).
HD
DLE
D+
HD
DLE
D-
RESE
T+
RESE
T- 5V
PWRB
TN-
PWRB
TN+
PWRL
ED-
PWRL
ED+
Figure 2.4: CTRL conncetor
�e connector provides Power and Reset functionality, as well as pins for the power LED and HDD activity LED.
2.3.3 Connecting the CPU Fan
Operation in high environmental temperatures may require a CPU fan. �e fan connector is located next to the bottom-
right corner of the uQ7 expansion area (see board overview).
Note: �e fan is only neccessary in high ambient temperatures. Under normal conditions, the A80 Q7 operates passively
cooled.
v1.2Page 8
2.4 Booting from an SD Card
For information on preparing an SD card for the A80 Q7 board, have a look at the So�ware Guide.
�e SD card has to be inserted in the card slot on the baseboard (see image below).
Figure 2.5: SD Card slot
On power up, A80 Q7 module will normally try to boot from the internal �ash. If this fails, it will attempt to boot from the
SD card. If this fails as well, it will go into USB recovery mode.
�e board can be forced to boot from the SD card by setting the slider labeled SW2 on the board to the BIOS Disable
position. �is will tell the A80 Q7 module to skip booting from the internal �ash and boot from the SD card.
2.5 Connecting to the Board
�e A80 Q7 module supports serial and network connections, local connected input devices and HDMI output. �e fol-
lowing sections explain how to use them.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 9
2.5.1 Connecting to the Board via RS-232
To connect via RS-232, plug the included USB-serial cable into the RS-232 connector on the base board and connect it to a
USB port of your host.
Note: �e USB-RS232 cable that comes bundled with the EVK works without installing additional drivers on Windows
and Linux. Mac OS X users �nd the driver (PL2303) on the included USB �ash drive.
Figure 2.6: RS-232 connector
Picocom can be used to connect via the serial line (considering the USB is connected to USB0 on the host machine):
picocom -b 115200 /dev/ttyUSB0
A�er successful system bootup, the login console appears on the terminal:
a80-q7 login:
You can login as root with password root or as user user with password user.
2.5.2 Connecting and Coníguring Ethernet
�e board has Gigabit Ethernet support. You can use either the on-board Ethernet adapter or one (or more) external USB
Ethernet adapters.
v1.2Page 10
Figure 2.7: Ethernet port
Using DHCP
For convenience, the board can be con�gured to use DHCP (if not already done when you have set up your �lesystem).
Open the �le /etc/systemd/network/eth.network in your editor of choice and add the following lines:
[Match]
Name=eth0
[Network]
DHCP=yes
And restart networking and check that the settings applied:
systemctl restart systemd-networkd
ifconfig
eth0 Link encap:Ethernet HWaddr 02:51:09:06:88:8a
inet addr:10.2.9.46 Bcast:10.2.255.255 Mask:255.255.0.0
inet6 addr: fe80::51:9ff:fe06:888a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:329 errors:0 dropped:0 overruns:0 frame:0
....
If you plug in a USB adapter, it will be mapped to some other name (eth1, for instance), so you have to change these lines
accordingly (or add new con�guration lines in the eth.network �le). To see all your network adapters, use:
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 11
ifconfig -a
Using a Static IP
If you want a static IP instead of DHCP, use this con�guration in /etc/systemd/network/eth.network:
[Match]
Name=eth0
[Network]
Address=192.168.0.7/24
Gateway=192.168.0.1
DNS=192.168.0.1
And restart the network daemon:
systemctl restart systemd-networkd
2.5.3 Connecting to the Board via SSH
If the network interface is running and there is a network cable plugged in, you should be able to connect to the board via
ssh:
[email protected]’s password:
Where xx.xx.xx.xx is your board’s IP address.
Note that root login via sshmight be disabled (or only available with an ssh key, not with a password). If you want to change
this, open the sshd_con�g �le (/etc/ssh/sshd_config) and set PermitRootLogin to yes:
PermitRootLogin yes
�en restart the sshd service:
service ssh restart
2.5.4 Connecting USB Devices
USB keyboard, mouse and data sticks should work out of the box, just connect them to one of USB ports.
v1.2Page 12
Figure 2.8: USB host ports
2.5.5 Connecting an HDMI Monitor
Before powering the board up, connect the monitor to the HDMI port. �e monitor should be automatically discovered
by U-Boot and you should see output both from U-Boot and from the Linux kernel. You will be able to use a mouse with
a desktop environment if it is already installed. See the next chapter for how to install a desktop environment.
2.6 Installing a Desktop Environment
Note: �e SD card that is packaged with the EVK already has Xfce preinstalled.
Xfce is a lightweight desktop environment recommended for use on the A80 Q7.
To install Xfce, do the following:
tasksel install xfce-desktop --new-install
�e option --new-install ensures that we end up with what Debian Installer would have installed.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 13
Figure 2.9: HDMI port
2.7 Using the External Interfaces
�e board supports I2C, SPI and SATA, and provides a real time clock (RTC). �is section explains how to use these
capabilities.
2.7.1 Connecting an External USB Drive
To connect a USB drive, plug it into the desired USB port. �e system should recognize the drive imediatelly. Check the
kernel log to �nd the device name:
journalctl -k -10
You will be able to mount its partitions (assuming mapping to /dev/sdb1):
mkdir /mnt/pendrive
mount /dev/sdb1 /mnt/pendrive
cd /mnt/pendrive
ls
v1.2Page 14
2.7.2 Connecting a SATA Drive
Plug the SATA drive into the SATA connector and power it from the power connector which is adjacent.
Figure 2.10: SATA data and power connectors
�e system should recognise the drive imediatelly (just like a USB drive) and you will be able to mount its partitions:
mkdir /mnt/drive1
mount /dev/sda1 /mnt/drive1
cd /mnt/drive1
ls
In this example, it is assumed the drive will be mapped to /dev/sda1. �is is because the SD card is mapped to some
device of the form /dev/mmc1blk1, so the hard drive should be automatically assigned the name sdax. Any new devices
will be assigned names such as sdbx and so on, but you can check this with journalctl:
journalctl -k -n 10
...
[417845.765419] sd 7:0:0:0: [sda] Attached SCSI removable disk
...
2.7.3 Setting the RTC
�e RTC is read by the kernel on bootup and used to set the system clock.
To check the RTC value, use hwclock:
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 15
hwclock
Thu 30 Apr 2015 03:51:20 PM CEST -0.826662 seconds
�e RTCwill be set automatically to the system clock on shutdown, so you can set the system clock using the date command
and reboot to update the RTC:
date --set 2015-04-20
date --set 03:51:30
You can also update the RTC immediately, again with hwclock:
hwclock -v
You can set up an NTP client so the time will always be updated from the Internet. Install the client �rst:
apt-get install ntp
Feel free to change the /etc/ntp.conf �le to use more local time sources (change servers from pool.ntp.org to use a
server from your country, such as at.pool.ntp.org).
2.7.4 Using I2C and SPI
�e �rst I2C (i2c-0) and SPI interfaces are both available on the base board (on the same connector). �e following table
contains the pinout (which is also printed on the board, next to the I2C/SPI/1WIRE connector):
PIN Function Function PIN1 SPI_CS0# SPI_CS1# 10
2 SPI_SCK SPI_MISO 9
3 SPI_MOSI 1WIRE 8
4 I2C_CLK I2C_DATA 7
5 3V3 GND 6
�e second I2C (i2c-1) connector is located on the SMBUS/TERM connector on the baseboard (SMB_DAT and SMB_CLKpins):
PIN Function Function PIN1 SMB_ALERT# THERM# 10
2 SMB_DAT NC 9
3 SMB_CLK THERMTRIP# 8
4 3V3 GND 7
5 3V3 GND 6
For I2C, there is the package i2c-tools available in Debian:
v1.2Page 16
apt-get install i2c-tools
For more information on the package, have a look at the Debian page on i2c-tools.
I2C Connectors
�e image below shows the location of the I2C pins.
GN
D
GN
D
DAT
A
CLK
3V3
3V3
I2C1
GN
D
GN
D
ALE
RTn
DAT
A
CLK
3V3
3V3
I2C2
Figure 2.11: I2C headers
SPI connectors
�e image below shows the location of the SPI pins.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 17
GN
D
MIS
O
CS0
SCK
MO
SI
3V3
CS1
Figure 2.12: SPI header
I2C Example - Using a Touch Keyboard
�is example uses the Atmel AT42QT2160 touch keyboard (see datasheet).
First, make sure the I2C is active in the device tree. In armadillo-linux edit the device tree source (arch/arm/boot/dts/sun61-a80-armadillo.dts) and look for the entry for �rst I2C device (&i2c0) and set status to okay:
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
};
Next, make sure the driver is installed viamenucon�g:
make menuconfig
Navigate to Device Drivers -> Input device support -> Keyboards and check the ATMEL AT42QT2160 Touch Sensor Chip.We must recompile the kernel and deploy it to the SD card (see So�ware Guide).
v1.2Page 18
2.7.5 Connecting the 1-Wire Bus
�e 1-Wire connector is located in the same group with the �rst I2C (labeled I2C/SPI/1WIRE.
GN
D
1WIR
E
3V3
Figure 2.13: 1-Wire header
2.7.6 Using the GPIOs
�e GPIO interface is available on the base board and provides the following pins:
Pin Qseven signal Qseven signal Pin1 GPIO0 GPIO1 10
2 GPIO2 GPIO3 9
3 GPIO4 GPIO5 8
4 GPIO7 GPIO6 7
5 3V3 GND 6
�e location on the board is displayed below:
�e GPIO numbers displayed printed on the board (and on the table above) are not the same as the ones used in Linux -
i.e. /sys/class/gpio. You can �nd the Linux GPIO # in the following table:
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 19
GN
D
GPI
O3
GPI
O0
GPI
O2
GPI
O4
3V3
GPI
O1
GPI
O5
GPI
O6
GPI
O7
Figure 2.14: GPIO header
Qseven sginal CPU pin Linux GPIO #GPIO0 PG0 192
GPIO1 PG1 193
GPIO2 PG2 194
GPIO3 PG3 195
GPIO4 PG4 196
GPIO5 PG17 209
GPIO6 PG18 210
GPIO7 PG5 197
To calculate the GPIO # from the chip pin, use the following formula:
offset = block_number * 32 + index
Where:
• block_number: the alphabetincal index of the block name, minus 1
• index: the pin number within the block
For example, for GPIO_1 the pin is PG1. G has an alphabetical index of 7, so the block number is 6. Since the pin is PG1,
v1.2Page 20
the index is 1 so we add 1 to the o�set:
offset = 32 * 6 + 1 = 193
To enable a GPIO, echo the GPIO number (“o�set”) to export:
echo 192 > /sys/class/gpio/export
ls /sys/class/gpio/gpio192
cat /sys/class/gpio/gpio192/direction
in
cat /sys/class/gpio/gpio192/value
0
To set the direction to output, write out in the GPIO’s direction �le:
echo out > /sys/class/gpio/gpio192/direction
echo 1 > /sys/class/gpio/gpio192/value
�e GPIO will be set to a value of 1 (high at 3.3V).
2.7.7 Connecting Audio
�e board provides two jack audio connectors for input and output.
Figure 2.15: Audio input/output port
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 21
Aditionally, an expansion connector for audio is available on the bottom row of the board:
IN2
RIG
HT
IN3
RIG
HT
HP
RIG
HT
GN
D
GN
D3V
3
3V3
HP
LEFT
IN3
LEFT
IN2
LEFT
Figure 2.16: Connecting to the audio expansion connector
2.7.8 Connecting Additional USB Ports
�e USB expansion connector is available on the bottom row of the board.
2.7.9 Connecting the SMBUS/THERM Connector
2.7.10 Connecting the CAN Bus
�e board provides a CAN connector on the bottom row.
v1.2Page 22
GN
D
USB
2 D
+
USB
2 D
-
5V5VU
SB3
D-
USB
3 D
+
GN
D
Figure 2.17: USB expansion header
GN
D
GN
D
THER
M T
RIPn
THER
Mn
ALE
RTn
DAT
A
CLK
3V3
3V3
Figure 2.18: SMBUS/THERM header
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 23
CAN
H
CAN
L
GN
D
Figure 2.19: CAN header
v1.2Page 24
CHAPTER
THREE
SOFTWARE GUIDE
3.1 About this Chapter
�e So�ware Guide provides instructions for building and deploying the BSP so�ware: the U-Boot bootloader and the
Linux operating system to the Q7 board.
�e section “Compiling Linux Applications” provides guidance for compiling applications for the Pangolin.
3.2 Compiling Kernel and Bootloader
3.2.1 Prerequisites
You need a recent x86_64 Linux installation to run the cross-compiler on. �e cross-compiler requires libc version 2.19.
Distributions shipping this version are, among others:
• Ubuntu 14.04 “Trusty”
• Debian 8 “Jessie”
We recommend Debian 8. Please install the following packages to set up the generic build infrastructure:
sudo apt-get install device-tree-compiler u-boot-tools build-essential git bc
3.2.2 Compiler Setup
For both the U-Boot bootloader and the Linux kernel, a bare-metal arm cross-compiler is required. Note that a bare-metal
compiler is only suitable for compiling kernel and bootloader. It will not generate applications that run under Linux.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 25
You can download precompiled binaries from Linaro: http://releases.linaro.org/14.11/components/toolchain/binaries/arm-
none-eabi/gcc-linaro-4.9-2014.11-x86_64_arm-eabi.tar.xz
Extract the archive in /opt .
�en, set up environment variables to make use of the new compiler:
export ARCH=arm
export CROSS_COMPILE=/opt/gcc-linaro-4.9-2014.11-x86_64_arm-eabi/bin/arm-none-eabi-
3.2.3 Building U-Boot
U-Boot (Universal Bootloader) is an open source, primary boot loader used in embedded devices to package the instruc-
tions to boot the device’s operating system kernel.
�e boot loader source code can be cloned from https://git.theobroma-systems.com/armadillo-u-boot.git/:
git clone https://git.theobroma-systems.com/armadillo-u-boot.git
Compile using:
cd armadillo-u-boot
make A80_Armadillo_defconfig
make
�e resulting u-boot image will be saved as u-boot-sunxi-with-spl.bin in the armadillo-u-boot directory.
3.2.4 Building the Boot Script
�e U-Boot boot sequence is controlled by a �le called boot.scr. �is �le is generated from a plain-text �le called
boot.cmd.
You can clone this �le from https://git.theobroma-systems.com/armadillo-tools.git:
git clone https://git.theobroma-systems.com/armadillo-tools.git
Generate boot.scr using:
cd armadillo-tools
make
v1.2Page 26
3.2.5 Building the Linux Kernel
�e kernel source code can be cloned from https://git.theobroma-systems.com/armadillo-linux.git/:
git clone https://git.theobroma-systems.com/armadillo-linux.git
Compile using:
cd armadillo-linux
make armadillo_defconfig
make uImage sun9i-a80-armadillo.dtb LOADADDR=0x40008000
�is will create the two �les needed for booting with U-Boot (paths are relative to the armadillo-linux directory):
• �e device tree: arch/arm/boot/dts/sun9i-a80-armadillo.dtb
• �e u-boot image: arch/arm/boot/uImage
3.3 Building the root ílesystem
A �lesystem can be created using Debootstrap, specifying armhf as architecture in the command line.
Install support packages on the x86_64 Debian:
sudo apt-get install qemu-user-static debootstrap binfmt-support
Supposing the target dir is called a80-uq7-rootfs and the chosen distro is jessie (recommended):
export targetdir=/opt/a80-uq7-rootfs
export distro=jessie
mkdir -p $targetdir
sudo debootstrap --arch=armhf --foreign $distro $targetdir
Next, copy the qemu-arm-static binary into the right place for the binfmt packages to �nd it and copy the resolf.conf �le
from the host system:
sudo cp /usr/bin/qemu-arm-static $targetdir/usr/bin/
sudo cp /etc/resolv.conf $targetdir/etc
�is will provide a very basic armhf rootfs in the targetdir. For the next stages, we chroot to the target dir and set up the
environment again:
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 27
sudo chroot $targetdir
export distro=jessie
export LANG=C
Second stage of debootstrap inside the new root dir:
/debootstrap/debootstrap --second-stage
Setting up apt sources:
cat << EOT > /etc/apt/sources.list
deb http://httpredir.debian.org/debian $distro main contrib non-free
deb-src http://httpredir.debian.org/debian $distro main contrib non-free
deb http://httpredir.debian.org/debian $distro-updates main contrib non-free
deb-src http://httpredir.debian.org/debian $distro-updates main contrib non-free
deb http://security.debian.org/debian-security $distro/updates main contrib non-free
deb-src http://security.debian.org/debian-security $distro/updates main contrib non-free
EOT
cat << EOT > /etc/apt/apt.conf.d/71-no-recommends
APT::Install-Recommends "0";
APT::Install-Suggests "0";
EOT
We can now pull the latest apt database from the Debianmirrors and install the locales package (in jessie the dialog package
might be needed as well):
apt-get update
apt-get install locales dialog
dpkg-reconfigure locales
Install any additional packages inside the chroot. An ssh server and sudo are recommended:
apt-get install openssh-server sudo
Set the root password for logging in via console or ssh:
passwd
root login over ssh is not permitted by default (set to no), or permitted only with public key (set to without-password).
To verify that, run:
cat /etc/ssh/sshd_config | grep "PermitRootLogin"
PermitRootLogin without-password
v1.2Page 28
Open the �le /etc/ssh/sshd_config in your editor of choice and set PermitRootLogin to yes.
A better option would be to create a user besides root:
adduser user
Optionally, you can add it to the sudo list:
adduser user sudo
Set up a basic network con�guration �le with DHCP via eth0:
cat << EOT >> /etc/systemd/network/eth.network
[Match]
Name=eth0
[Network]
DHCP=yes
EOT
systemctl enable systemd-networkd
systemctl enable systemd-resolved
Set the hostname:
echo a80-uq7 > /etc/hostname
For distros older than jessie (wheezy and earlier), the serial console has to be enabled manually. In jessie, this is handled
automatically.:
echo T0:2345:respawn:/sbin/getty -L ttyS1 115200
vt100 >> /etc/inittab
We can now exit and cleanup the support �les:
exit
sudo rm $targetdir/etc/resolv.conf
sudo rm $targetdir/usr/bin/qemu-arm-static
We now have a root �lesystem which can be deployed to the SD card.
3.4 Deploying on SD Card
3.4.1 Partition Setup
Both U-Boot and Linux will be located on the same SD card. �e layout of the card is as follows:
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 29
Oéset Contents0 Partition table
8kiB U-Boot bootloader
544kiB U-Boot environment variables
1MiB Partition 1 (ext4 - Linux root fs)
Partitions can be created using fdisk (assuming the SD card is mapped to /dev/sdX) and has no partitions (this can be
checked using the p command):
sudo fdisk /dev/sdX
> p
�is should show an empty partition table, for example:
Disk /dev/sdX: 3980 MB, 3980394496 bytes
123 heads, 62 sectors/track, 1019 cylinders, total 7774208 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdbbd45c7
Device Boot Start End Blocks Id System
If there are partitions on the sdcard, they can be deleted with d.
�e required partition can be created with the command n, then accepting the defaults:
> n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): <ENTER>
Partition number (1-4, default 1): <ENTER>
First sector (2048-7774207, default 2048): <ENTER>
Last sector, +sectors or +size{K,M,G} (...): <ENTER>
> w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
�is will create a primary partition at o�set 1MiB.
Now, to format the partition as ext4:
v1.2Page 30
sudo /sbin/mkfs.ext4 -E lazy_itable_init=0 /dev/sdX1
�e option lazy_itable_init=0 speeds up the �rst boot because it initializes the inode tables in advance.
�e SD card is now ready to have the U-Boot bootloader and Linux deployed.
3.4.2 Deploying U-Boot
�eU-Boot image u-boot-sunxi-with-spl.bin is written to the SD card. Assuming the SD card ismapped to /dev/sdX:
sudo dd if=armadillo-u-boot/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8K seek=1 conv=fsync,nocreat
3.4.3 Deploying the Linux Kernel and the Root Filesystem
Mount the SD card partition and copy the rootfs (assuming that the rootfs is located at /opt/a80-uq7-rootfs and the
sd card at /dev/sdX1):
sudo mkdir -p /mnt/sdcard
sudo mount /dev/sdX1 /mnt/sdcard
sudo cp -av /opt/a80-uq7-rootfs/* /mnt/sdcard
Copy kernel image, device tree and boot script into the boot directory:
sudo cp armadillo-linux/arch/arm/boot/dts/sun9i-a80-armadillo.dtb \
armadillo-linux/arch/arm/boot/uImage armadillo-tools/boot.scr \
/mnt/sdcard/boot
Finally, unmount the SD card:
sudo umount /mnt/sdcard
�e SD card is ready for booting.
3.4.4 U-Boot Environment
�e boot sequence is handled by the boot script /boot/boot.scr. Unless you want to customize the sequence, no further
action is required.
If you want to step through the sequencemanually or customize it, you can execute the following commands on the U-Boot
prompt:
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 31
setenv bootargs console=tty0 console=ttyS2,115200 root=/dev/mmcblk1p1 rw rootwait
ext4load mmc 0:1 0x40008000 boot/uImage
ext4load mmc 0:1 0x40000000 boot/sun9i-a80-armadillo.dtb
bootm 0x40008000 - 0x40000000
Optionally, these commands can be compiled together in a single command and saved so it is performed on every subse-
quent boot:
setenv boot_sd "ext4load mmc 0:1 0x40008000 boot/uImage
ext4load mmc 0:1 0x40000000 boot/sun9i-a80-armadillo.dtb
bootm 0x40008000 - 0x40000000"
setenv bootcmd "run boot_sd"
saveenv
To reset the U-Boot settings to default, execute:
env default -f -a
saveenv
3.5 Deploying on On-Board eMMC storage
As the eMMC storage is only accessible from the module itself, you must �rst boot the A80 Q7 from SD card.
Partion and format the eMMC storage as described in Partition Setup, but using the device /dev/mmcblk0.
Mount the eMMC partition and copy the contents of the SD card to the eMMC storage. �e copy process will take about
30 seconds:
sudo mkdir -p /mnt/emmc
sudo mount /dev/mmcblk0p1 /mnt/emmc
sudo cp -ax / /mnt/emmc
sudo umount /mnt/emmc
�e �nal step is copying the bootloader from the SD card to the eMMC:
sudo dd if=/dev/mmcblk1 of=/dev/mmcblk0 bs=8K skip=1 seek=1 count=64 conv=fsync,nocreat
Shut down the board (poweroff command) and remove the SD card. Make sure the boot selector switch Boot SW is set
to “Normal Boot”. �e next boot will run U-Boot o� the internal eMMC storage.
v1.2Page 32
3.6 Compiling Linux Applications
�e easiest option is to compile your applications directly on a running A80 Q7 module. Just install the gcc package and
related utilities and you are good to go:
sudo apt-get install build-essential
�e second option is to cross-compile your applications. �at means running a cross-compiler on an x86_64 Linux instal-
lation.
You can download precompiled binaries of the cross-compile toolchain from Linaro:
http://releases.linaro.org/14.11/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2014.11-x86_64_arm-
linux-gnueabihf.tar.xz
Note that this toolchain is only suitable for compiling Linux user-space applications. It will not compile the Linux kernel
itself or the bootloader.
3.7 Serial Number
Each A80 Q7 module has a unique serial number that can be read by so�ware.
In U-Boot, the serial number is contained in the environment variable serial#. You can print it using the command:
printenv serial#
Under Linux, it is represented by a simple text �le in /sys:
cat /sys/firmware/devicetree/base/serial-number
�e serial number is �xed in hardware (derived from the eMMC Product Serial Number) and can not be modi�ed.
3.8 MAC Address
By default, the MAC address of each A80 Q7 module is a random value derived from the serial number. �e properties of
this default MAC address are:
• It is a Locally Administered Address: �e U/L bit of the MAC address is set to 1
• It is not guaranteed to be globally unique
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 33
• �e address is �xed for each A80 Q7 module. It stays constant across reboots as it is deterministically derived from
the serial number
To set your own Universally Administered Address, you overwrite the U-Boot environment variable ethaddr. On the U-
Boot prompt, with XX:XX:XX:XX:XX:XX replaced by your MAC address:
setenv ethaddr XX:XX:XX:XX:XX:XX
saveenv
�e MAC address can be queried from the U-Boot prompt using:
printenv ethaddr
To reset the MAC address to the default value, run:
env delete ethaddr
saveenv
v1.2Page 34
CHAPTER
FOUR
HARDWARE GUIDE
4.1 About this Chapter
�is Hardware Guide provides information about the features, connectors and signals available on the A80 Q7 module.
Note: �is chapter describes the Q7 module itself. See chapter Using the EVK for details on the baseboard.
4.2 Qseven Implementation
Qseven has mandatory and optional features. Following table shows the feature set of the A80 Q7 module compared to the
minimum ARM/RISC based and maximum con�guration.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 35
System I/O Interface ARM/RISC Based MinimumConíguration
A80 Q7 MaximumConíguration
PCI Express lanes 0 0 4
Serial ATA channels 0 1 2
USB 2.0 ports 3 8 8
USB 3.0 ports 0 1 2
LVDS channels embedded
DisplayPort
0 Dual Channel LVDS
Single eDP
Dual Channel 2
DisplayPort, TMDS 0 1 (HDMI) 1
High De�nition Audio / AC‘97 /
I2S
0 0/0/1 1
Ethernet 10/100 Mbit/Gigabit 0 1 (Gigabit) 1 (Gigabit)
UART 0 1 1
Low Pin Count bus / GPIO 0 0/8 (GPIO) 1
Secure Digital I/O 8-bit for
SD/MMC cards
0 1 (4-bit SD-Card) 1
System Management Bus 0 1 1
I2C Bus 1 1 1
SPI Bus 0 1 1
CAN Bus 0 1 1
Watchdog Trigger 1 1 1
Power Button 1 1 1
Power Good 1 1 1
Reset Button 1 1 1
LID Button 0 1 1
Sleep Button 0 1 1
Suspend To RAM (S3 mode) 0 1 1
Wake 0 1 1
Battery low alarm 0 1 1
�ermal control 0 1 1
FAN control 0 1 1
Note: �e A80 Q7 module is available in di�erent variants. �is document describes the maximum con�guration. For
details about orderable variants please refer to the the order-code document.
4.3 Connector Description
�e following table shows the signals on the edge connector of the A80 Q7 module.
v1.2Page 36
Empty cells are not connected (NC) pins.
Pin Signal Pin Signal1 GND 2 GND
3 GBE_MDI3- 4 GBE_MDI2-
5 GBE_MDI3+ 6 GBE_MDI2+
7 GBE_LINK100# 8 GBE_LINK1000#
9 GBE_MDI1- 10 GBE_MDIO0-
11 GBE_MDI1+ 12 GBE_MDIO0+
13 GBE_LINK# 14 GBE_ACT#
15 GBE_CTREF 16 SUS_S5#
17 WAKE# 18 SUS_S3#
19 GP0 20 PWRBTN#
21 SLP_BTN# 22 LID_BTN#
23 GND 24 GND
25 GND 26 PWGIN
27 BATLOW# 28 RSTBTN#
29 SATA0_TX+ 30
31 SATA0_TX- 32
33 SATA_ACT# 34 GND
35 SATA0_RX+ 36
37 SATA0_RX- 38
39 GND 40 GND
41 BIOS_DISABLE# / BOOT_ALT# 42 SDIO_CLK#
43 SDIO_CD# 44 SDIO_LED
45 SDIO_CMD 46 SDIO_WP
47 SDIO_PWR# 48 SDIO_DAT1
49 SDIO_DAT0 50 SDIO_DAT3
51 SDIO_DAT2 52
53 54
55 56 USB_OTG_PEN
57 GND 58 GND
59 I2S_WS 60 SMB_CLK / GP1_I2C_CLK
61 I2S_RST# 62 SMB_DAT / GP1_I2C_DAT
63 I2S_CLK 64 SMB_ALERT#
65 I2S_SDI 66 GP0_I2C_CLK
67 I2S_SDO 68 GP0_I2C_DAT
69 THRM# 70 WDTRIG#
71 THRMTRIP# 72 WDOUT
Continued on next page
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 37
Table 4.1 – continued from previous pagePin Signal Pin Signal73 GND 74 GND
75 USB_P7- 76 USB_P6-
77 USB_P7+ 78 USB_P6+
79 USB_6_7_OC# 80
81 USB_SSTX1- 82 USB_SSRX1-
83 USB_SSTX1+ 84 USB_SSRX1+
85 USB_2_3_OC# 86
87 USB_P3- 88 USB_P2-
89 USB_P3+ 90 USB_P2+
91 USB_CC 92 USB_ID
93 USB_P1- 94 USB_P0-
95 USB_P1+ 96 USB_P0+
97 GND 98 GND
99 LVDS_A0+ / eDP0_TX0+ 100 LVDS_B0+
101 LVDS_A0- / eDP0_TX0- 102 LVDS_B0-
103 LVDS_A1+ / eDP0_TX1+ 104 LVDS_B1+
105 LVDS_A1- / eDP0_TX1- 106 LVDS_B1-
107 LVDS_A2+ / eDP0_TX2+ 108 LVDS_B2+
109 LVDS_A2- / eDP0_TX2- 110 LVDS_B2-
111 LVDS_PPEN 112 LVDS_BLEN
113 LVDS_A3+ / eDP0_TX3+ 114 LVDS_B3+
115 LVDS_A3- / eDP0_TX3- 116 LVDS_B3-
117 GND 118 GND
119 LVDS_A_CLK+ / eDP0_AUX+ 120 LVDS_B_CLK+
121 LVDS_A_CLK- / eDP0_AUX- 122 LVDS_B_CLK-
123 LVDS_BLT_CTRL / GP_PWM_OUT0 124 GP_1-Wire_Bus
125 GP2_I2C_DAT / LVDS_DID_DAT 126 LVDS_BLC_DAT / eDP0_HPD#
127 GP2_I2C_CLK / LVDS_DID_CLK 128 LVDS_BLC_CLK
129 CAN0_TX 130 CAN0_RX
131 TMDS_CLK+ 132
133 TMDS_CLK- 134
135 GND 136 GND
137 TMDS_LANE1+ 138
139 TMDS_LANE1- 140
141 GND 142 GND
143 TMDS_LANE0+ 144
145 TMDS_LANE0- 146
Continued on next page
v1.2Page 38
Table 4.1 – continued from previous pagePin Signal Pin Signal147 GND 148 GND
149 TMDS_LANE2+ 150 HDMI_CTRL_DAT
151 TMDS_LANE2- 152 HDMI_CTRL_CLK
153 DP_HDMI_HPD# 154 RSVD
155 156
157 158
159 GND 160 GND
161 162
163 164
165 GND 166 GND
167 168
169 170
171 UART0_TX 172 UART0_RTS#
173 174
175 176
177 UART0_RX 178 UART0_CTS#
179 180
181 182
183 GND 184 GND
185 GPIO0 186 GPIO1
187 GPIO2 188 GPIO3
189 GPIO4 190 GPIO5
191 GPIO6 192 GPIO7
193 VCC_RTC 194 SPKR / GP_PWM_OUT2
195 FAN_TACHOIN / GP_TIMER_IN 196 FAN_PWMOUT / GP_PWM_OUT1
197 GND 198 GND
199 SPI_MOSI 200 SPI_CS0#
201 SPI_MISO 202 SPI_CS1#
203 SPI_SCK 204 RSVD
205 VCC_5V_SB 206 VCC_5V_SB
207 JTAG_TCK 208 JTAG_TDI
209 JTAG_TDO 210 JTAG_TMS
211 212
213 214
215 216
217 218
219 VCC 220 VCC
Continued on next page
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 39
Table 4.1 – continued from previous pagePin Signal Pin Signal221 VCC 222 VCC
223 VCC 224 VCC
225 VCC 226 VCC
227 VCC 228 VCC
229 VCC 230 VCC
4.4 Signal Description
4.4.1 Ethernet
Signal Type SignalLevel
Description
GBE_MDI[0:3]+
GBE_MDI[0:3]-
I/O Analog Gigabit Ethernet Controller: Media Dependent Interface Di�erential
Pairs 0,1,2,3. �eMDI can operate in 1000, 100 and 10Mbit/sec modes
GBE_ACT# OC 3.3V Gigabit Ethernet Controller activity indicator, active low
GBE_LINK# OC 3.3V Gigabit Ethernet Controller link indicator, active low
GBE_LINK100# OC 3.3V Internaly connected to GBE_LINK#
GBE_LINK1000# OC 3.3V Internaly connected to GBE_LINK#
GBE_CTREF REF Analog Center Tap Voltage
4.4.2 SATA
Signal Type SignalLevel
Description
SATA0_TX+
SATA0_TX
O SATA Serial ATA Channel 0 di�erential transmit pair
SATA0_RX+
SATA0_RX
I SATA Serial ATA Channel 0 di�erential receive pair
SATA_ACT# O 3.3V Serial ATA Activity LED
v1.2Page 40
4.4.3 USB
Signal Type SignalLevel
Description
USB_P0+ USB_P0- I/O USB Universal Serial Bus Port 0 di�erential pair
USB_P1+ USB_P1- I/O USB Universal Serial Bus Port 1 di�erential pair
USB_P2+ USB_P2- I/O USB Universal Serial Bus Port 2 di�erential pair
USB_P3+ USB_P3- I/O USB Universal Serial Bus Port 3 di�erential pair
USB_SSRX1+
USB_SSRX1-
I/O USB Universal Serial Bus Port 1 Superspeed receive di�erential pair
USB_SSTX1+
USB_SSTX1-
I/O USB Universal Serial Bus Port 1 Superspeed transmit di�erential pair
USB_P6+ USB_P6- I/O USB Universal Serial Bus Port 6 di�erential pair
USB_P7+ USB_P7- I/O USB Universal Serial Bus Port 7 di�erential pair
USB_2_3_OC# I 3.3V Over current detect input 1. �is pin is used tomonitor the USB power
over current of the USB Ports 2 and 3
USB_6_7_OC# I 3.3V Over current detect input 1. �is pin is used tomonitor the USB power
over current of the USB Ports 6 and 7
USB_ID I 3.3V Con�gures the mode of the USB Port 1. If the signal is active high
the Port will be con�gured as USB Client
USB_CC I 3.3V USB Client Connect pin (VBUS). Must be level-shi�ed to 3.3V on the
baseboard.
USB_OTG_PEN O 3.3V USB Power enable for OTG port USB 1
4.4.4 SDIO
Signal Type SignalLevel
Description
SDIO_CD# I 3.3V SDIO Card Detect. �is signal indicates when a SDIO/MMC card is
present
SDIO_CLK O 3.3V SDIO Clock
SDIO_CMD I/O 3.3V SDIO Command/Response
SDIO_LED O 3.3V SDIO LED. Used to drive an external LED to indicate transfers on the
bus
SDIO_WP I 3.3V SDIOWrite Protect
SDIO_PWR# O 3.3V SDIO Power Enable. �is signal is used to enable the power being sup-
plied to a SD/MMC card device
SDIO_DAT0-4 I/O 3.3V SDIO Data lines
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 41
4.4.5 I2S
Signal Type SignalLevel
Description
I2S_RST# O 3.3V I2S Codec Reset
I2S_WS O 3.3V I2S Word Select
I2S_CLK O 3.3V I2S Serial Data Clock
I2S_SDO O 3.3V I2S Serial Data Output
I2S_SDI I 3.3V I2S Serial Data Input
v1.2Page 42
4.4.6 LVDS
Signal Type SignalLevel
Description
LVDS_PPEN O 3.3V Controls panel power enable
LVDS_BLEN O 3.3V Controls panel backlight enable
LVDS_BLT_CTRL
/GP_PWM_OUT0
O 3.3V Primary functionality is to control the panel backlight brightness via
pulsewidthmodulation (PWM).Whennot in use for this primary pur-
pose it can be used as General Purpose PWMOutput
LVDS_A0+
LVDS_A0-
O LVDS LVDS primary channel di�erential pair 0
LVDS_A1+
LVDS_A1-
O LVDS LVDS primary channel di�erential pair 1
LVDS_A2+
LVDS_A2-
O LVDS LVDS primary channel di�erential pair 2
LVDS_A3+
LVDS_A3-
O LVDS LVDS primary channel di�erential pair 3
LVDS_A_CLK+
LVDS_A_CLK-
O LVDS LVDS primary channel di�erential pair clock lines
LVDS_B0+
LVDS_B0-
O LVDS LVDS secondary channel di�erential pair 0
LVDS_B1+
LVDS_B1-
O LVDS LVDS secondary channel di�erential pair 1
LVDS_B2+
LVDS_B2-
O LVDS LVDS secondary channel di�erential pair 2
LVDS_B3+
LVDS_B3-
O LVDS LVDS secondary channel di�erential pair 3
LVDS_B_CLK+
LVDS_B_CLK-
O LVDS LVDS secondary channel di�erential pair clock lines
LVDS_DID_CLK
/GP2_I2C_CLK
O 3.3V Primary functionality is DisplayID DDC clock line used for LVDS �at
panel detection. If the primary functionality is not used, it can be used
as a General Purpose I2C bus clock line
LVDS_DID_CLK
/GP2_I2C_CLK
O 3.3V Primary functionality is DisplayID DDC data line used for LVDS �at
panel detection. If the primary functionality is not used, it can be used
as a General Purpose I2C bus data line
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 43
4.4.7 HDMI
Signal Type SignalLevel
Description
TMDS_CLK+
TMDS_CLK-
O TMDS TMDS di�erential pair clock lines
TMDS_LANE0+
TMDS_LANE0-
O TMDS TMDS di�erential pair lane 0
TMDS_LANE1+
TMDS_LANE1-
O TMDS TMDS di�erential pair lane 1
TMDS_LANE2+
TMDS_LANE2-
O TMDS TMDS di�erential pair lane 2
HDMI_CTRL_CLK O 3.3V DDC based control signal (clock) for HDMI device
HDMI_CTRL_DAT I/O 3.3V DDC based control signal (data) for HDMI device
DP_HDMI_HPD# I 3.3V Hot plug detection signal that serves as an interrupt request
4.4.8 eDP
Signal Type SignalLevel
Description
eDP0_TX0+
eDP0_TX0-
O eDP embedded DisplayPort di�erential pair 0
eDP0_TX1+
eDP0_TX1-
O eDP embedded DisplayPort di�erential pair 1
eDP0_TX2+
eDP0_TX2-
O eDP embedded DisplayPort di�erential pair 2
eDP0_TX3+
eDP0_TX3-
O eDP embedded DisplayPort di�erential pair 3
eDP0_AUX+
eDP0_AUX-
I/O eDP embedded DisplayPort auxiliary channel
DP_HDMI_HPD# I 3.3V Hot plug detection signal that serves as an interrupt request
4.4.9 GPIO
Signal Type SignalLevel
Description
GPIO0-7 I/O 3.3V General purpose input/output 0-7
v1.2Page 44
4.4.10 CAN
Signal Type SignalLevel
Description
CAN0_TX O 3.3V CAN (Controller Area Network) TX output for CAN Bus channel 0
CAN0_RX I 3.3V CAN (Controller Area Network) RX inpufor CAN Bus channel 0
4.4.11 SPI
Signal Type SignalLevel
Description
SPI_MOSI O 3.3V Master serial output/Slave serial input signal
SPI_MISO I 3.3V Master serial input/Slave serial output signal
SPI_SCK O 3.3V SPI clock output
SPI_CS0# O 3.3V SPI chip select 0 output
SPI_CS1# O 3.3V SPI chip select 1 output (used when two devices are connected)
4.4.12 UART
Signal Type SignalLevel
Description
UART0_TX O 3.3V Serial data transmit
UART0_RX I 3.3V Serial data recieve
UART0_CTS# I 3.3V Handshake signal: ready to send data
UART0_RTS# O 3.3V Handshake signal: ready to receive data
4.4.13 JTAG
Signal Type SignalLevel
Description
JTAG_TCK I 3.3V Test clock
JTAG_TDO O 3.3V Test data out
JTAG_TDI I 3.3V Test data in
JTAG_TMS I 3.3V Test mode select
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 45
4.4.14 Misc
Signal Type SignalLevel
Description
WDTRIG# I 3.3V Watchdog trigger signal
WDOUT O 3.3V Watchdog event indicator
GP0_I2C_CLK O 3.3V I2C Bus 0 clock line
GP0_I2C_DAT I/O 3.3V I2C Bus 0 data line
SMB_CLK
GP1_I2C_CLK
O 3.3V Clock line of System Management Bus. Alternate function I2C Bus 1
clock line
SMB_DAT
GP1_I2C_DAT
I/O 3.3V Data line of System Management Bus. Alternate function I2C Bus 1
data line
SMB_ALERT# I 3.3V System Management Bus Alert input
SPKR
GP_PWM_OUT2
O 3.3V Audio enunciator output. Alternate function general purpose PWM
output
BIOS_DISABLE#
/BOOT_ALT#
I 3.3V Disables the onboard bootloader and uses the one the SD card instead.
If no bootloader is available on the SD card it falls back toUSB recovery
mode
GP_1-Wire_Bus I/O 3.3V General Purpose 1-Wire bus interface
THRM# I 3.3V �ermal Alarm active low signal generated by the external hardware
to indicate an over temperature situation. �is signal can be used to
initiate thermal throttling
THRMTRIP# O 3.3V �ermal Trip indicates an overheating condition of the processor. If
‘THRMTRIP#’ goes active the system immediately transitions to the
S5 State (So� O�)
FAN_PWMOUT
/GP_PWM_OUT1
O 3.3V PWMoutput for fan speed control. Alternate function general purpose
PWM output. Function based on microcontroller �rmware
FAN_TACHOIN
/GP_TIMER_IN
I 3.3V Fan tachometer input. Alternate function general purpose timer input.
Function based on microcontroller �rmware
v1.2Page 46
4.4.15 Power Managment
Signal Type SignalLevel
Description
RSTBTN# I 3.3V Reset button input. An active low signal resets the module
BATLOW# I 3.3V Battery low input
WAKE# I 3.3V External system wake event. An active low signal wakes the module
from a sleep state
SUS_S3# O 3.3V Indicated that the system is in suspend to ram (S3)
SUS_S5# O 3.3V Indicated that the system is in so�-o� state (S5)
SLP_BTN# I 3.3V Sleep button. Signals the system with an falling edge to transition into
sleep or wake from a sleep state
LID_BTN# I 3.3V LID button. Low active signal to detect a LID switch to transition into
sleep or wake from a sleep state
4.4.16 Power
Signal Nominal Input DescriptionVCC 5V Main supply for the module
VCC_5V_SB 5V Additional supply rail for standby functionality. If standby functionality is not
needed connect to VCC
VCC_RTC 3V Backup supply for the RTC. If not used it can be le� unconnected
4.5 On-board Devices
4.5.1 Power-Manager
�e X-Powers AXP809 and AXP806 is connected to the CPU via RSB and an interrupt line:
AXP Pin Function CPU Pin44 SCL PN0
45 SDA PN1
11 IRQ NMI (ball C24)
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 47
4.5.2 DDR3
• 1GB of DDR3 RAM
4.5.3 eMMC
• eMMC connected through 8-bit wide SDIO interface
Signal CPU Pin Linux GPIO #CMD SDC2-CMD
CLK SDC2-CLK
D0 ... D7 SDC2-D0 ... D7
RESET PC16 80
4.5.4 NOR
• 512 kiB serial NOR �ash
• Connected to the CPU via SPI:
Signal CPU PinCLK PC2 / SPIO-CLK
MOSI PC0 / SPI0-MOSI
MISO PC1 / SPIO-MSIO
CS PC19 / SPI0-CS0
4.5.5 Cortex-M0
�e on-board microcontroller provides additional features to the CPU, exposed via I2C and USB. It emulates standard ICs
and does not need custom drivers in Linux.
Feature CPUConnection
Emulated IC Qseven Pins
RTC I2C ISL1208 none
Temperature sensor and fan
controller
I2C AMC6821 FAN_TACHOIN,
FAN_PWMOUT
CAN USB �eobroma Systems
UCAN
CAN0_TX, CAN0_RX
v1.2Page 48
�e microcontroller can be �ashed from the CPU by taking it into DFUmode (USB recovery). Pull BOOT0 high and cycle
reset (GPIOs listed below). �e microcontroller will appear as a new USB device in Linux.
Function CPU Pin Linux GPIO #NRST PE0 128
BOOT0 PE1 129
4.5.6 USB
�e Cypress CY7C65632 provides four additional USB 2.0 high-speed ports. �e routing of Qseven signals to CPU and/or
hub ports is shown below.
Qseven Port # Speed Connected to Port # NotesUSB_P0 USB 2.0 Hi-Speed CPU 2
USB_SS USB 3.0 SuperSpeed CPU 0 Dual-Role (OTG)
USB_P2 USB 2.0 Hi-Speed Hub 1
USB_P3 USB 2.0 Hi-Speed Hub 3
USB_P6 USB 2.0 Hi-Speed Hub 6
USB_P7 USB 2.0 Hi-Speed Hub 7
�e routing of the hub reset signal is shown below.
Hub signal CPU Pin Linux GPIO #RESET PE15 143
4.5.7 SATA
�e Genesys Logic GL830 provides the SATA interface. It interfaces to Linux as a USB mass-storage device and does not
need a special driver. �e signal routing is shown in the following table.
SATA controller signal Connected to Linux GPIO #SATA TX/RX Qseven SATA0
SATA activity Qseven SATA_ACT
USB 2.0 Hi-Speed USB3503 hub port 3
RESET CPU PG0 192
4.5.8 Ethernet-PHY
�e Micrel KSZ9031RNX is connected to the CPU via RGMII and MDIO.�e connections are shown below.
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 49
PHY signal Connected to Linux GPIO #RGMII CPU GRX, GTX
RESET CPU PA14 14
MDIO CPU PA16
MDC CPU PA17
LED1 Qseven GBE_LINK1000 and GBE_LINK100 and GBE_LINK (tied together)
LED2 Qseven GBE_ACT
4.6 Electrical Speciícation
4.6.1 Power Supply
�e power supply requirements are listed in the table below and are identical to the Qseven speci�cation.
If the base board does not provide standby power, VCC_5V_SB must be tied to VCC.
Rail Description Nominal voltage ToleranceVCC Main power supply 5V 4.75 ... 5.25V
VCC_5V_SB Standby power supply 5V 4.75 ... 5.25V
VCC_RTC Backup battery 3V 2.4 ... 3.3V
4.7 Mechanical Speciícation
4.7.1 Module Dimensions
�e mechanical dimensions of the module are shown below.
v1.2Page 50
Figure 4.1: Module dimensions (all values in mm)
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 51
CHAPTER
FIVE
ACRONYMS AND ABBREVIATIONS
ARM Advanced RISC Machine
CAN Controller Area Network
GCC GNU Compiler Collection
HDMI High De�nition Multimedia Interface
I2C Inter-Integrated Circuit Bus
JTAG Joint Test Action Group
NTP Network Time Protocol
SATA Serial ATA
SPI Serial Parallel Interface
U-Boot Universal Bootloader
USB Universal Serial Bus
v1.2Page 52
CHAPTER
SIX
REVISION HISTORY
Date Revision ChangesOctober 5, 2016 v1.2 Correct Ethernet PHY RESET GPIO #
September 26, 2016 v1.1 Fix typo in U-Boot build instructions
August 31, 2016 v1 Initial release
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 53
v1.2Page 54
INDEX
AARM, 52
CCAN, 52
GGCC, 52
HHDMI, 52
II2C, 52
JJTAG, 52
NNTP, 52
SSATA, 52SPI, 52
UU-Boot, 52USB, 52
A80 Q7 User Manual© Theobroma Systems Design und Consulting GmbH
v1.2Page 55