Armada8040 development board setup:
--------------------------------------

The Armada 8040 development board (PCB: DB-88F8040-Modular) is a configurable board,
designed to test several combinations of SoC configurations.
linux supports a defined set of those configurations via different device tree files.

This document describes the board modifications required to set up 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. Use appropriate Device Tree file for booting Linux.
3. Same Device Tree selection is required also in U-Boot (to initialize requested comphy SerDes lanes).
   Modify the Device Tree file used by U-BOOT, by running the U-BOOT command "fdt_config",
   and select the appropriate configuration entry.


Board Setup
------------
|		| 1: A			| 2: B			| 3: C			| 4: D			| 5: E			| 6: F			| 7: G			| 8: H			|
|---------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
|Device tree	|armada-8040-db.dtb	|armada-8040-db-B.dtb	|armada-8040-db-C.dtb	|armada-8040-db-D.dtb	|armada-8040-db-E.dtb	|armada-8040-db-F.dtb	|armada-8040-db-G.dtb	|armada-8040-db-H.dtb	|
|CP0-SW1:1	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP0-SW1:2	| OFF			| ON			| OFF			| OFF			| OFF			| OFF			| ON			| ON			|
|CP0-SW1:3	| OFF			| ON			| OFF			| OFF			| OFF			| OFF			| ON			| OFF			|
|CP0-SW1:4	| OFF			| ON			| OFF			| OFF			| OFF			| OFF			| ON			| ON			|
|CP0-SW1:5	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP0-SW1:6	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP0-SW1:7	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP0-SW1:8	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			|
|CP1-SW1:1	| OFF			| ON			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP1-SW1:2	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			| ON			|
|CP1-SW1:3	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			| OFF			|
|CP1-SW1:4	| OFF			| OFF			| OFF			| OFF			| OFF			| ON			| ON			| ON			|
|CP1-SW1:5	| ON			| ON			| ON			| ON			| ON			| OFF			| OFF			| ON			|
|CP1-SW1:6	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP1-SW1:7	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| ON			|
|CP1-SW1:8	| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			| OFF			|

DPR Setting
------------
|						| 1: A		| 2: B			| 3: C						|
|-----------------------------------------------|---------------|-----------------------|-----------------------------------------------|
| Jumper-module (CON44): SLM1564		| DPR all = 1-2	| DPR all = 1-2		| DPR 96-101, 103-108 = 2-3, DPR 102 = 1-2	|
| Serdes CP0 site module (CON42): SLM1521	| DPR 2-5 = 1-2	| DPR 2-5 = 2-3		| DPR 2-5 = 1-2					|
| Serdes CP1 site module (CON41): SLM1521	| DPR 2-5 = 1-2	| DPR 2-5 = 1-2		| DPR 2-5 = 1-2					|
| DB8040					|		|			| DPR 84 = 2-3					|
|						|		|			| TDM module (CON51): SLM1448			|

|						| 4: D						| 5: E					|
|-----------------------------------------------|-----------------------------------------------|---------------------------------------|
| Jumper-module (CON44): SLM1564		| DPR 96-101,103-108 = 2-3, DPR 102 = 1-2	| DPR 109-112 = 2-3, others = 1-2	|
| Serdes CP0 site module (CON42): SLM1521	| DPR 2-5 = 1-2					| DPR 2-5 = 1-2				|
| Serdes CP1 site module (CON41): SLM1521	| DPR 2-5 = 1-2					| DPR 2-5 = 1-2				|
| DB8040					| DPR 76 = 1-2, DPR 87-88 = 2-3			| DPR 81 = 2-3, DPR 23-26,119,121 =1-2	|
|						| Audio module (CON51): SLM1449			|					|

|						| 6: F		| 7: G			| 8: H			|
|-----------------------------------------------|---------------|-----------------------|-----------------------|
| Jumper-module (CON44): SLM1564		| DPR all = 1-2	| DPR all = 1-2		| DPR all = 1-2		|
| Serdes CP0 site module (CON42): SLM1521	| DPR 2-5 = 1-2	| DPR 2-5 = 2-3		| DPR 2-5 = 1-2	(V2)	|
| Serdes CP1 site module (CON41): SLM1521	| DPR 2-5 = 1-2	| DPR 2-5 = 1-2		| DPR 2-5 = 1-2	(V2)	|
| DB8040					|		|			| 			|
|						|		|			| 			|

The tables below summarizes the interface configuration of each setup

SerDes Configuration
------------------------

 CP0 Lane	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		| 6: F		| 6: G		| 7: H		|
----------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|
 0		| PCIe0 (x1)	| PCIe0 (x4)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x4)	| PCIe0 (x4)	|
 1		| SATA0		| PCIe0 (x4)	| SATA0		| SATA0		| SATA0		| SATA0		| PCIe0 (x4)	| PCIe0 (x4)	|
 2		| SFI (10G)	| PCIe0 (x4)	| SFI (10G)	| SFI (10G)	| SFI (10G)	| AP (802.3 AN)	| PCIe0 (x4)	| PCIe0 (x4)	|
 3		| SATA1		| PCIe0 (x4)	| SATA1		| SATA1		| SATA1		| SATA1		| PCIe0 (x4)	| PCIe0 (x4)	|
 4		| USB3_HOST1	| USB3_HOST1	| USB3_HOST1	| USB3_HOST1	| USB3_HOST1	| USB3_HOST1	| USB3_HOST1	| SFI (10G)	|
 5		| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	|

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

 CP1 Lane	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		| 6: F		| 6: G		| 7: H		|
----------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|
 0		| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x1)	| PCIe0 (x4)	| PCIe0 (x4)	|
 1		| SATA0		| USB3_HOST0	| SATA0		| SATA0		| SATA0		| SATA0		| PCIe0 (x4)	| PCIe0 (x4)	|
 2		| SFI (10G)	| SFI (10G)	| SFI (10G)	| SGMII0	| SGMII0 (2.5G)	| AP (802.3 AN)	| PCIe0 (x4)	| PCIe0 (x4)	|
 3		| SATA1		| SATA1		| SATA1		| SATA1		| SATA1		| SATA1		| PCIe0 (x4)	| PCIe0 (x4)	|
 4		| PCIe1 (x1)	| PCIe1 (x1)	| PCIe1 (x1)	| PCIe1 (x1)	| PCIe1 (x1)	| PCIe1 (x1)	| USB3_HOST1	| SFI (10G)	|
 5		| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	| PCIe2 (x1)	|

- USB2_H0 (UTMI only)


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

 AP806 pin	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		| 6: F		| 7: G		| 7: H		|
----------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|
    AP-SDIO	| [0-10]	| [0-10]	| [0-10]	| [0-10]	| N/C		| [0-10]	| [0-10]	| [0-10]	|
    I2C0	| N/C		| N/C		| N/C		| N/C		| N/C		| N/C		| N/C		| N/C		|
    AP-SPI0	| N/C		| N/C		| N/C		| N/C		| [0,3]		| N/C		| N/C		| N/C		|
    AP-UART0	| [11,19]	| [11,19]	| [11,19]	| [11,19]	| [11,19]	| [11,19]	| [11,19]	| [11,19]	|

 CP0 pin	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		| 6: F		| 7: G		| 7: H		|
----------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|
    CP0-SMI	| [32,34]	| [32,34]	| [32,34]	| [32,34]	| N/C		| [32,34]	| [32,34]	| [32,34]	|
    CP0-XSMI	| [42-43]	| [42-43]	| [42-43]	| [42-43]	| [42-43]	| [42-43]	| [42-43]	| [42-43]	|
    CP0-TWSI	| [37-38]	| [37-38]	| [37-38]	| [37-38]	| [37-38]	| [37-38]	| [37-38]	| [37-38]	|
    CP0-SATA1	| [40]		| [40]		| [40]		| [40]		| [40]		| [40]		| [40]		| [40]		|
    CP0-SATA0	| [41]		| [41]		| [41]		| [41]		| [41]		| [41]		| [41]		| [41]		|
    CP0-RGMII1	| [44-55]	| [44-55]	| [44-55]	| [44-55]	| N/C		| [44-55]	| [44-55]	| [44-55]	|
    CP0-SD	| [56-62]	| [56-62]	| [56-62]	| [56-62]	| [56-62]	| [56-62]	| [56-62]	| [56-62]	|
    CP0-PTP_CLK	| [39]		| [39]		| [39]		| [39]		| [39]		| [39]		| [39]		| [39]		|
    CP0-TWSI1	| N/C		| N/C		| N/C		| N/C		| [35-36]	| N/C		| N/C		| N/C		|
    CP0-UART1	| N/C		| N/C		| N/C		| N/C		| [47,49]	| N/C		| N/C		| N/C		|
    CP0-UART2	| N/C		| N/C		| N/C		| N/C		| [50-51]	| N/C		| N/C		| N/C		|

GPIOS:
	- 33: GPIO: GE_INT#/push button/Wake
	- 35: MSS_GPIO[3]: MSS_PWDN (only in configuration 1,3,4,5)
	- 36: MSS_GPIO[5]: MSS_VTT_EN (only in configuration 1,3,4,5)

 CP1 pin	| 1: A		| 2: B		| 3: C		| 4: D		| 5: E		| 6: F		| 7: G		| 7: H		|
----------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|---------------|
    CP1-RGMII0	| [0-11]	| [0-11]	| N/C		| N/C		| [0-11]	| [0-11]	| [0-11]	| [0-11]	|
    CP1-SMI	| [27,31]	| [27,31]	| N/C		| N/C		| [27,31]	| [27,31]	| [27,31]	| [27,31]	|
    CP1-SPI1	| [13-16]	| [13-16]	| [13-16]	| N/C		| [13-16]	| [13-16]	| [13-16]	| [13-16]	|
    CP1-UART0	| [29-30]	| [29-30]	| [29-30]	| [29-30]	| [29-30]	| [29-30]	| [29-30]	| [29-30]	|
    CP1-SATA1	| [28]		| [28]		| [28]		| [28]		| [28]		| [28]		| [28]		| [28]		|
    CP1-SATA0	| N/C		| N/C		| [27]		| N/C		| N/C		| N/C		| N/C		| N/C		|
    CP1-AU	| N/C		| N/C		| N/C		| [0-5]		| N/C		| N/C		| N/C		| N/C		|
    CP1-NAND	| N/C		| N/C		| N/C		| [13,15-27]	| N/C		| N/C		| N/C		| N/C		|
    CP1-TDM	| N/C		| N/C		| [0-11]	| N/C		| N/C		| N/C		| N/C		| N/C		|

Network configuration
---------------------
1: A:
 Interface	| CPN#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 0		| 0		| 10G (Lane 2 connected to SFP)	|
 eth1		| 0	| 2		| 3		| RGMII1			|
 eth2		| 1	| 0		| 0		| 10G (Lane 2 connected to SFP)	|
 eth3		| 1	| 1		| 2		| RGMII0			|

2: B:
 Interface	| CPN#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 2		| 3		| RGMII1			|
 eth1		| 1	| 0		| 0		| SFI (10G Lane 2 connected to SFP)
 eth2		| 1	| 1		| 2		| RGMII0			|

3: C:
 Interface	| CPN#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 0		| 0		| 10G (Lane 2 connected to SFP)	|
 eth1		| 0	| 2		| 3		| RGMII1			|
 eth2		| 1	| 0		| 0		| 10G (Lane 2 connected to SFP)	|

4: D:
 Interface	| CPN#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 0		| 0		| 10G (Lane 2 connected to SFP)	|
 eth1		| 0	| 2		| 3		| RGMII1			|
 eth2		| 1	| 0		| 0		| SGMII0			|

5: E:
 Interface	| CPN#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 0		| 0		| 10G (Lane 2 connected to SFP)	|
 eth1		| 1	| 0		| 0		| 1000base-x HS_SGMII0, speed=2500
 eth2		| 1	| 1		| 2		| RGMII0			|

6: F:
 Interface	| CP#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 0		| 0		| AP (Lane 2 left for 802.3 AN)	|
 eth1		| 0	| 2		| 3		| RGMII1			|
 eth2		| 1	| 0		| 0		| 10G (Lane 2 connected to SFI)	|
 eth3		| 1	| 1		| 2		| RGMII0			|

7: G:
 Interface	| CP#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 2		| 3		| RGMII1			|
 eth1		| 1	| 1		| 2		| RGMII0			|

8: H:
 Interface	| CP#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| 0	| 0		| 0		| 10G (Lane 4 connected to SFP)	|
 eth1		| 0	| 2		| 3		| RGMII1			|
 eth2		| 1	| 0		| 0		| 10G (Lane 4 connected to SFP)	|
 eth3		| 1	| 1		| 2		| RGMII0			|


Notes:
	- eth0/1/2/3 may in fact be higher numbers, if prior eth_x interfaces already exist.
