Armada7040 development board setup:
--------------------------------------

the Armada 7040 development board (PCB: DB-88F7040-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
------------
For A7040 A revision SoC - Please use armada-7040-db configuration,

|		| 	1: default (A)	|	2:B		|	3:C		|       4:D             |       4:E             |
|---------------|-----------------------|-----------------------|-----------------------|-----------------------|-----------------------|
|Device tree	|armada-7040-db.dtb	|armada-7040-db-B.dtb	|armada-7040-db-C.dtb	|armada-7040-db-D.dtb   |armada-7040-db-E.dtb	|
|CP0-SW1:1	| ON			| OFF			| ON			| ON 			| OFF                   |
|CP0-SW1:2	| OFF			| ON			| OFF			| OFF 			| OFF                   |
|CP0-SW1:3	| ON			| ON			| ON			| ON			| ON                    |
|CP0-SW1:4	| OFF			| ON			| OFF			| OFF			| OFF                   |
|CP0-SW1:5	| OFF			| ON			| OFF			| OFF			| OFF                   |
|CP0-SW1:6	| ON			| ON			| ON			| ON			| ON                    |
|CP0-SW1:7	| ON			| ON			| ON			| ON			| ON                    |
|CP0-SW1:8	| OFF			| OFF			| OFF			| OFF			| OFF                   |
----------------------------------------------------------------------------------------------------------------------------------------|

DPR Setting
------------
|					| 	1: default (A)			 |	2: B:                             |
|---------------------------------------|----------------------------------------|----------------------------------------|
| Mpp Jumper Module (SLM1548)		| Default release (ALL DPRs 1-2 position)| Default release (ALL DPRs 1-2 position)|
| Serdess Jumper Module (SLM1547)	| DPR152,153,154,155 - 1-2 position	 | DPR152,153,154,155 - 1-2 position      |
|					| DPR148,149,150,151 - 2-3 position	 | DPR148,149,150,151 - 1-2 position      |
| CP0 Serdess module (SLM1521)		| SW1 - (1,3,6,7)= ON,  (2,4,5,8)=OFF	 | SW1 - (2,3,4,5,6,7)= ON,  (1,8)=OFF    |
| 					| DPR2,3,4,5 - 1-2 position		 | DPR2,3,4,5 - 2-3 position              |
----------------------------------------|----------------------------------------|----------------------------------------|
|					| 	3: C				 |	4:D					       |	5:E                                          |
|---------------------------------------|----------------------------------------|-----------------------------------------------------|-----------------------------------------------------|
| Mpp Jumper Module (SLM1548)		| DPR133 - 143  2-3 position		 | DPR138 - 143  2-3 position,DPR133-137 not connect   | DPR133 -143  1-2 position , DPR144-147 2-3 position |
| Serdess Jumper Module (SLM1547)	| DPR152,153,154,155 - 1-2 position	 | DPR152,153,154,155 - 1-2 position                   | DPR152,153,154,155 - 1-2 position                   |
|					| DPR148,149,150,151 - 1-2 position	 | DPR148,149,150,151 - 1-2 position		       | DPR148,149,150,151 - 1-2 position                   |
| CP0 Serdess module (SLM1521)		| SW1 - (1,3,6,7)= ON,  (2,4,5,8)=OFF	 | SW1 - (1,3,6,7)= ON,  (1,2,4,5,8)=OFF               | SW1 - (3,6,7)= ON,  (1,2,4,5,8)=OFF                 |
| 					| DPR2,3,4,5 - 1-2 position		 | DPR2,3,4,5 - 1-2 position                           | DPR2,3,4,5 - 1-2 position                           |
|					|					 | CON9 not connect , CON10 connect,                   |                                                     |
|					|					 | R77 R79 R81-82 R84-85 connect                       |                                                     |
| Install TDM Module (SLM1448)		| on DB-7040 CON46			 | -                                                   | -                                                   |
|					|					 |                                                     |                                                     |
| Install Audio Module (SLM1449)	| - 					 | on DB-7040 CON46.                                   | -                                                   |
|					|					 |                                                     |                                                     |
|					|					 |                                                     |                                                     |
| DB-4070 Modular (SLM1546)		| - 					 | wire from U36-1 to con47-2, DPR23 -NC               | DPR53-54 1-2 position , DPR61 2-3 position          |
|					| 					 |                                                     | 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: default (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		| SFI (10G)		| PCIE0 (x4)	| SFI (10G)       |  SFI (1G)  	  | 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
--------------------------------

Setup  #	|	1	|	2	|       3       |	4	|	5	|
Name   #	|  default (A) 	|	B	|       C       |	D	|	E	|
-------------------------------------------------------------------------------------------------
AP806:				|		|		|		|		|
-------------------------------------------------------------------------------------------------
	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]	|
-------------------------------------------------------------------------------------------------
CP:				|		|		|		|		|
-------------------------------------------------------------------------------------------------
	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		|
	RGMII0	| N/C		| [44-55]	| [0-11]	| N/C		| [0-11]	|
	RGMII1	| [0-11]	| [0-11]	| [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]		|
	USB_DEV | N/C 		| N/C 		| N/C		| [7]		| N/C		|
-------------------------------------------------------------------------------------------------

Network configuration
---------------------
1: default (A):
 Interface	| CP#	| PPv2 Port	| GMAC Port	| Board Interface		|
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0		| CP0	| eth0		| 0		| SFI (10G)			|
 eth1		| CP0	| eth1		| 2		| SGMII1			|
 eth2		| CP0	| eth2		| 3		| RGMII1			|
 ----------------------------------------------------------------------------------------

2: B:
 Interface      | CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0           | CP0   | eth0          | 2             | RGMII0                        |
 eth1           | CP0   | eth1          | 3             | RGMII1                        |
 ----------------------------------------------------------------------------------------

3: C:
 Interface      | CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0           | CP0   | eth0          | 0             | SFI (10G)                     |
 eth1           | CP0   | eth1          | 3             | RGMII1                        |
 ----------------------------------------------------------------------------------------
4: D:
 Interface      | CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0           | CP0   | eth0          | 0             | SFI (10G)                     |
 eth1           | CP0   | eth1          | 3             | RGMII1                        |
 ----------------------------------------------------------------------------------------

5: E:
 Interface      | CP#   | PPv2 Port     | GMAC Port     | Board Interface               |
 ---------------|-------|---------------|---------------|-------------------------------|
 eth0           | CP0   | eth0          | 0             | SGMII0 (1G)                   |
 eth1           | CP0   | eth1          | 2             | RGMII0                        |
 ----------------------------------------------------------------------------------------

I2C IO expander0 GPIO pin configuration
--------------------------------------
PIN[15] - GPIO regulator of cp0-vccq-sd0
