summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/mpp.h
blob: 290e610dc012adc777e639a93f8c2bfe99edc29d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef __ARCH_ORION5X_MPP_H
#define __ARCH_ORION5X_MPP_H

enum orion5x_mpp_type {
	/*
	 * This MPP is unused.
	 */
	MPP_UNUSED,

	/*
	 * This MPP pin is used as a generic GPIO pin.  Valid for
	 * MPPs 0-15 and device bus data pins 16-31.  On 5182, also
	 * valid for MPPs 16-19.
	 */
	MPP_GPIO,

	/*
	 * This MPP is used as PCIe_RST_OUTn pin.  Valid for
	 * MPP 0 only.
	 */
	MPP_PCIE_RST_OUTn,

	/*
	 * This MPP is used as PCI arbiter pin (REQn/GNTn).
	 * Valid for MPPs 0-7 only.
	 */
	MPP_PCI_ARB,

	/*
	 * This MPP is used as PCI_PMEn pin.  Valid for MPP 2 only.
	 */
	MPP_PCI_PMEn,

	/*
	 * This MPP is used as GigE half-duplex (COL, CRS) or GMII
	 * (RXERR, CRS, TXERR, TXD[7:4], RXD[7:4]) pin.  Valid for
	 * MPPs 8-19 only.
	 */
	MPP_GIGE,

	/*
	 * This MPP is used as NAND REn/WEn pin.  Valid for MPPs
	 * 4-7 and 12-17 only, and only on the 5181l/5182/5281.
	 */
	MPP_NAND,

	/*
	 * This MPP is used as a PCI clock output pin.  Valid for
	 * MPPs 6-7 only, and only on the 5181l.
	 */
	MPP_PCI_CLK,

	/*
	 * This MPP is used as a SATA presence/activity LED.
	 * Valid for MPPs 4-7 and 12-15 only, and only on the 5182.
	 */
	MPP_SATA_LED,

	/*
	 * This MPP is used as UART1 RXD/TXD/CTSn/RTSn pin.
	 * Valid for MPPs 16-19 only.
	 */
	MPP_UART,
};

struct orion5x_mpp_mode {
	int			mpp;
	enum orion5x_mpp_type	type;
};

void orion5x_mpp_conf(struct orion5x_mpp_mode *mode);


#endif