Armada-70x0 Development Board Setup
===================================

The Armada 7040 Development Board (PCB: DB-88F7040-Modular) is a configurable board,
designed to test several combinations of SoC configurations.
U-Boot supports a defined set of those configurations via different device tree files.

.. _fig_a70x0-db:

.. figure:: /images/a70x0-db.*
   :align: center

   Armada-7040 Development Board

This document describes the board modifications required to setup each configuration and the
interfaces supported (or disabled in each one).

To switch board configuration:
1. Modify HW board settings according to the instructions in the "Board Setup" section below.
2. Modify the Device tree file used by U-BOOT during compilation:
   mvebu_db-88f8040_defconfig            - Choose Armada80x0/70x0 general defconfig
   export DEVICE_TREE=<device_tree_name> - Choose specific device-tree

Note:
Booting Linux requires using the same Device Tree configuration as used in U-Boot.

Board Setup Options
~~~~~~~~~~~~~~~~~~~

+---------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|		| 1: A			| 2: B			| 3: C			| 4: D			| 4: E			|
+===============+=======================+=======================+=======================+=======================+=======================+
|Device tree	| armada-7040-db.dts	| armada-7040-db-B.dts	| armada-7040-db-C.dts	| armada-7040-db-D.dts  |armada-7040-db-E.dts	|
+-----+---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
| CP0 | SW1:1	| ON			| OFF			| ON			| ON			| OFF                   |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:2	| OFF			| ON			| OFF			| OFF			| OFF                   |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:3	| ON			| ON			| ON			| ON			| ON                    |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:4	| OFF			| ON			| OFF			| OFF			| OFF                   |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:5	| OFF			| OFF			| OFF			| OFF			| OFF                   |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:6	| ON			| ON			| ON			| ON			| ON                    |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:7	| ON			| ON			| ON			| ON			| ON                    |
|     +---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|     | SW1:8	| OFF			| OFF			| OFF			| OFF			| OFF                   |
+-----+---------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+

DPR Setting
~~~~~~~~~~~

+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
|			| 1: A			| 2: B			| 3: C			| 4: D			| 5: E			|
+=======================+=======================+=======================+=======================+=======================+=======================+
| Mpp Jumper Module	| DPR all = 1-2		| DPR all = 1-2		| DPR 133-143:		| DPR 133,135,136,137:	| DPR133-143:		|
| (SLM1548)		|			|			|   2-3 position	|   N/C			|   1-2 position	|
|			|			|			|			| DPR 134:		| DPR144-147:		|
|			|			|			|			|   2-3 postion		|   2-3 position	|
|			|			|			|			| DPR 138-143:		|			|
|			|			|			|			|   2-3 postion		|			|
+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
| Serdess Jumper Module	| DPR152,153,154,155:	| DPR152,153,154,155:	| DPR152,153,154,155:	| DPR152,153,154,155:	| DPR152,153,154,155:	|
| (SLM1547)		|   1-2 position	|   1-2 position	|   1-2 position	|   1-2 position	|   1-2 position	|
|			| DPR148,149,150,151:	| DPR148,149,150,151:	| DPR148,149,150,151:	| DPR148,149,150,151:	| DPR148,149,150,151:	|
|			|   2-3 position	|   1-2 position	|   1-2 position	|   1-2 position	|   1-2 position	|
+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
| CP0 Serdess module	| SW1:			| SW1:			|  SW1:			| sW1:			| SW1:			|
| (SLM1521)		|   (1,3,6,7)= ON	|   (2,3,4,5,6,7)= ON	|    (1,3,6,7)= ON	|   (1,3,6,7)= ON	|   (3,6,7)= ON		|
|			|   (2,4,5,8)= OFF	|   (1,8)=OFF		|    (2,4,5,8)=OFF	|   (2,4,5,8)= OFF	|   (1,2,4,5,8)=OFF	|
|			| DPR2,3,4,5:		| DPR2,3,4,5:		| DPR2,3,4,5:		| DPR2,3,4,5:		| DPR2,3,4,5:		|
|			|   1-2 position	|    2-3 position	|     1-2 position	|   1-2 position	|   1-2 position	|
|			|			|			|			| Disconnect CON9 (USB3 |			|
|			|			|			|			| host plug type A)	|			|
|			|			|			|			| Connect CON11 (marvell|			|
|			|			|			|			| pn CON641)		|			|
|			|			|			|			| Connect R126,127,119,	|			|
|			|			|			|			| 122, 121, 117		|			|
+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
| Install TDM Module	|			|			| on DB-7040 CON46	|			|			|
| (SLM1448)		|			|			|			|			|			|
+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
| Install Audio Module	|			|			|			| on DB-7040 CON46	|			|
| (SLM1449)		|			|			|			|			|			|
+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+
| DB7040		|			|			|			| wire:			| DPR53-54: 1-2 position|
|			|			|			|			|  from U36-1 to con47-2| DPR61: 2-3 position	|
|			|			|			|			| DPR23 - NC		| DPR10-11 position 1-2	|
|			|			|			|			|			| DPR12-15 position 1-2 |
+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+-----------------------+

The tables below summarizes the interface configuration of each setup

SerDes Configuration
~~~~~~~~~~~~~~~~~~~~

+---------------+---------------+---------------+---------------+---------------+---------------+
| CP0 Lane	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		|
+===============+===============+===============+===============+===============+===============+
| 0		| SGMII1	| PICE0 (x4)	| PCIE0 (x1)    | PCIE0 (x1)    | PCIE0 (x1)	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| 1		| USB3_HOST0	| PCIE0 (x4)	| SATA0		| USB3_DEVICE0  | SATA0		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| 2		| SFI0 (10G)	| PCIE0 (x4)	| SFI0 (10G)    | SFI0 (10G)	| SGMII0 (1G)	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| 3		| SATA1		| PCIE0 (x4)	| SATA1		| SATA1         | SATA1		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| 4		| USB3_HOST1	| USB3_HOST1	| USB3_HOST1    | USB3_HOST1    | USB_HOST1	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| 5		| PCIE2 (x1)	| PCIE2 (x1)	| PCIE2 (x1)    | PCIE2 (x1)    | PCIE2 (x1)	|
+---------------+---------------+---------------+---------------+---------------+---------------+

- USB2_H0 (UTMI only)
- USB2_H1 (UTMI & USB3 SerDes)


Multi-purpose pin configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+---------------+---------------+---------------+---------------+---------------+---------------+
|AP806 pin	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		|
+===============+===============+===============+===============+===============+===============+
|	AP-SDIO | [0-5]		| [0-5]		| [0-5]         | [0-5]		| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+
|	AP-SPI0 | N/C		| N/C		| N/C		| N/C		| [0-3]		|
+---------------+---------------+---------------+---------------+---------------+---------------+
|	AP-I2C	| N/C		| N/C		| N/C		| N/C		| [4,5]		|
+---------------+---------------+---------------+---------------+---------------+---------------+
|	AP-UART0| [11,19]	| [11,19]	| [11,19]       | [11,19]	| [11,19]	|
+---------------+---------------+---------------+---------------+---------------+---------------+

+---------------+---------------+---------------+---------------+---------------+---------------+
|CP0 pin:	| 1: A		| 3: B		| 3: C		| 4: D		| 5: E		|
+===============+===============+===============+===============+===============+===============+
| CP-SPI0	| N/C		| N/C		| [6-11]	| N/C		| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| CP-SPI1	| [13-16]	| [13-16]	| [13-16]	| N/C		| [13-16]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| NAND		| N/C		| N/C		| N/C		| [15-27]	| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| RGMII1	| [0-11]	| [0-11]	| N/C		| N/C		| [0-11]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| RGMII2	| N/C		| [44-55]	| [44-55]	| [44-55]	| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| CP-UART0	| [29-30]	| [29-30]	| [29-30]	| [29-30]	| [29-30]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| CP-UART1	| N/C		| N/C		| N/C		| N/C		| [47,49-51]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| SD		| [56-61]	| [56-61]	| [56-61]	| [56-61]	| [54,56-61]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| GPIO		| [62]		| [62]		| [62]		| [62]		| [62]		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| TDM		| N/C		| N/C		| [0-5]		| N/C		| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| TWSI		| [37-38]	| [37-38]	| [37-38]	| [37-38]	| [37-38]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| SATA0		| N/C		| N/C		| N/C		| N/C		| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| SATA1		| [28]		| [28]		| [28]		| [28]		| [28]		|
+---------------+---------------+---------------+---------------+---------------+---------------+
| SMI		| [32,34]	| [32,34]	| [32,34]	| [32,34]	| [32,34]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| XSMI		| [35-36]	| [35-36]	| [35-36]	| [35-36]	| [35-36]	|
+---------------+---------------+---------------+---------------+---------------+---------------+
| USB_DEV	| N/C		| N/C		| N/C		| [7]		| N/C		|
+---------------+---------------+---------------+---------------+---------------+---------------+

Network configuration
~~~~~~~~~~~~~~~~~~~~~

Setup 1 (A):

+---------------+-------+---------------+---------------+-------------------------------+
| Interface	| CP#	| PPv2 Port	| GMAC Port	| Board Interface		|
+===============+=======+===============+===============+===============================+
| eth0		| CP0	| eth0		| 0		| 10G (Lane 2 connected to SFP) |
+---------------+-------+---------------+---------------+-------------------------------+
| eth1		| CP0	| eth1		| 2		| SGMII1			|
+---------------+-------+---------------+---------------+-------------------------------+
| eth2		| CP0	| eth2		| 3		| RGMII2			|
+---------------+-------+---------------+---------------+-------------------------------+

Setup 2 (B):

+---------------+-------+---------------+---------------+-------------------------------+
| Interface	| CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
+===============+=======+===============+===============+===============================+
| eth0		| CP0   | eth0          | 2             | RGMII1                        |
+---------------+-------+---------------+---------------+-------------------------------+
| eth1		| CP0   | eth1          | 3             | RGMII2                        |
+---------------+-------+---------------+---------------+-------------------------------+

Setup 3 (C):

+---------------+-------+---------------+---------------+-------------------------------+
| Interface	| CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
+===============+=======+===============+===============+===============================+
| eth0		| CP0   | eth0          | 0             | 10G (Lane 2 connected to SFP) |
+---------------+-------+---------------+---------------+-------------------------------+
| eth1		| CP0   | eth1          | 3             | RGMII2                        |
+---------------+-------+---------------+---------------+-------------------------------+

Setup 4 (D):

+---------------+-------+---------------+---------------+-------------------------------+
| Interface	| CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
+===============+=======+===============+===============+===============================+
| eth0		| CP0   | eth0          | 0             | 10G (Lane 2 connected to SFP) |
+---------------+-------+---------------+---------------+-------------------------------+
| eth1		| CP0   | eth1          | 3             | RGMII2                        |
+---------------+-------+---------------+---------------+-------------------------------+

Setup 5 (E)

+---------------+-------+---------------+---------------+-------------------------------+
| Interface	| CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
+===============+=======+===============+===============+===============================+
| eth0		| CP0   | eth0          | 0             | SGMII0 (1G)                   |
+---------------+-------+---------------+---------------+-------------------------------+
| eth1		| CP0   | eth1          | 2             | RGMII1                        |
+---------------+-------+---------------+---------------+-------------------------------+

Notes:
	- Equivalent of this configuration can be viewed in arch/arm64/boot/dts/mvebu/armada-cpn110.dtsi
	- eth0/1/2/3 may in fact be higher numbers, if prior eth_x interfaces already exist.


