2 * arch/arm/mach-pxa/include/mach/gumstix.h
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
9 #if !defined(__ASM_ARCH_MFP_PXA27X_H) && !defined(__ASM_ARCH_MFP_PXA25X_H)
10 #error You need to include either mfp-pxa27x.h or mfp-pxa25x.h
13 /* BTRESET - Reset line to Bluetooth module, active low signal. */
14 #define GPIO_GUMSTIX_BTRESET 7
15 #define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
19 GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
20 interrupt signal for determining cable presence. On the original gumstix,
21 this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F,
22 this moves to GPIO17 and GPIO37. */
24 /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
25 has detected a cable insertion; driven low otherwise. */
27 #ifdef CONFIG_ARCH_GUMSTIX_ORIG
29 #define GPIO_GUMSTIX_USB_GPIOn 81
30 #define GPIO_GUMSTIX_USB_GPIOx 83
34 #ifndef CONFIG_MACH_GUMSTIX_VERDEX
36 #define GPIO_GUMSTIX_USB_GPIOn 35
37 #define GPIO_GUMSTIX_USB_GPIOx 41
41 #define GPIO_GUMSTIX_USB_GPIOn 100
42 #define GPIO_GUMSTIX_USB_GPIOx 27
48 /* usb state change */
49 #define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn)
51 #define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
52 #define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
53 #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
58 #define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
59 #define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
60 #define GUMSTIX_IRQ_GPIO_nSD_DETECT IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT)
63 * SMC Ethernet definitions
64 * ETH_RST provides a hardware reset line to the ethernet chip
65 * ETH is the IRQ line in from the ethernet chip to the PXA
67 #ifndef CONFIG_MACH_GUMSTIX_VERDEX
68 #define GPIO_GUMSTIX_ETH0_RST 80
69 #define GPIO_GUMSTIX_ETH0 36
71 #define GPIO_GUMSTIX_ETH0_RST 107
72 #define GPIO_GUMSTIX_ETH0 99
74 #define GPIO_GUMSTIX_ETH1_RST 52
75 #define GPIO_GUMSTIX_ETH1 27
77 #define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
78 #define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
79 #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
80 #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
82 #define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0)
83 #define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1)
86 #define GPIO8_CF_RESET 8
87 #define GPIO97_CF_RESET 97
88 #define GPIO110_CF_RESET 110
90 #ifndef CONFIG_MACH_GUMSTIX_VERDEX
91 #define GPIO_GUMSTIX_CF_RESET GPIO8_CF_RESET
93 #define GPIO_GUMSTIX_CF_RESET GPIO97_CF_RESET
96 #define GPIO_GUMSTIX_CF_OLD_RESET GPIO110_CF_RESET
98 /* CF signals shared by both sockets */
99 #define GPIO_GUMSTIX_nPOE 48
100 #define GPIO_GUMSTIX_nPWE 49
101 #define GPIO_GUMSTIX_nPIOR 50
102 #define GPIO_GUMSTIX_nPIOW 51
104 #ifndef CONFIG_MACH_GUMSTIX_VERDEX
105 #define GPIO_GUMSTIX_nPCE_1 52
106 #define GPIO_GUMSTIX_nPCE_2 53
107 #define GPIO_GUMSTIX_pSKTSEL 54
109 #define GPIO_GUMSTIX_nPCE_1 102
110 #define GPIO_GUMSTIX_nPCE_2 105
111 #define GPIO_GUMSTIX_pSKTSEL 79
114 #define GPIO_GUMSTIX_nPREG 55
115 #define GPIO_GUMSTIX_nPWAIT 56
116 #define GPIO_GUMSTIX_nIOIS16 57
118 /* Pin mode definitions correspond to mfp-pxa2[57]x.h */
119 #define GPIO_GUMSTIX_nPOE_MD GPIO48_nPOE
120 #define GPIO_GUMSTIX_nPWE_MD GPIO49_nPWE
121 #define GPIO_GUMSTIX_nPIOR_MD GPIO50_nPIOR
122 #define GPIO_GUMSTIX_nPIOW_MD GPIO51_nPIOW
124 #ifndef CONFIG_MACH_GUMSTIX_VERDEX
125 #define GPIO_GUMSTIX_nPCE_1_MD GPIO52_nPCE_1
126 #define GPIO_GUMSTIX_nPCE_2_MD GPIO53_nPCE_2
127 #define GPIO_GUMSTIX_pSKTSEL_MD GPIO54_pSKTSEL
129 #define GPIO_GUMSTIX_nPCE_1_MD GPIO102_nPCE_1
130 #define GPIO_GUMSTIX_nPCE_2_MD GPIO105_nPCE_2
131 #define GPIO_GUMSTIX_pSKTSEL_MD GPIO79_pSKTSEL
134 #define GPIO_GUMSTIX_nPREG_MD GPIO55_nPREG
135 #define GPIO_GUMSTIX_nPWAIT_MD GPIO56_nPWAIT
136 #define GPIO_GUMSTIX_nIOIS16_MD GPIO57_nIOIS16
139 #define GPIO4_nBVD1_0 4
140 #define GPIO4_nSTSCHG_0 GPIO4_nBVD1_0
141 #define GPIO11_nCD_0 11
142 #define GPIO26_PRDY_nBSY_0 26
144 #define GPIO111_nBVD1_0 111
145 #define GPIO111_nSTSCHG_0 GPIO111_nBVD1_0
146 #define GPIO104_nCD_0 104
147 #define GPIO96_PRDY_nBSY_0 96
148 #define GPIO109_PRDY_nBSY_0 109
150 #ifndef CONFIG_MACH_GUMSTIX_VERDEX
151 #define GPIO_GUMSTIX_nBVD1_0 GPIO4_nBVD1_0
152 #define GPIO_GUMSTIX_nSTSCHG_0 GPIO4_nSTSCHG_0
153 #define GPIO_GUMSTIX_nCD_0 GPIO11_nCD_0
154 #define GPIO_GUMSTIX_PRDY_nBSY_0 GPIO26_PRDY_nBSY_0
156 #define GPIO_GUMSTIX_nBVD1_0 GPIO111_nBVD1_0
157 #define GPIO_GUMSTIX_nSTSCHG_0 GPIO111_nSTSCHG_0
158 #define GPIO_GUMSTIX_nCD_0 GPIO104_nCD_0
159 #define GPIO_GUMSTIX_PRDY_nBSY_0 GPIO96_PRDY_nBSY_0
162 #define GPIO_GUMSTIX_PRDY_nBSY_0_OLD GPIO109_PRDY_nBSY_0
164 #define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO_GUMSTIX_nSTSCHG_0)
165 #define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO_GUMSTIX_nCD_0)
166 #define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO_GUMSTIX_PRDY_nBSY_0)
167 #define GUMSTIX_S0_PRDY_nBSY_OLD_IRQ IRQ_GPIO(GPIO_GUMSTIX_PRDY_nBSY_0_OLD)
170 #define GPIO18_nBVD1_1 18
171 #define GPIO18_nSTSCHG_1 GPIO18_nBVD1_1
172 #define GPIO36_nCD_1 36
173 #define GPIO27_PRDY_nBSY_1 27
175 #define GPIO_GUMSTIX_nBVD1_1 GPIO18_nBVD1_1
176 #define GPIO_GUMSTIX_nSTSCHG_1 GPIO18_nSTSCHG_1
177 #define GPIO_GUMSTIX_nCD_1 GPIO36_nCD_1
178 #define GPIO_GUMSTIX_PRDY_nBSY_1 GPIO27_PRDY_nBSY_1
180 #define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO_GUMSTIX_nSTSCHG_1)
181 #define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO_GUMSTIX_nCD_1)
182 #define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(GPIO_GUMSTIX_PRDY_nBSY_1)
184 /* CF GPIO line modes - correspond to mfp-pxa2[57]x.h */
185 #define GPIO_GUMSTIX_CF_RESET_MD ( GPIO_GUMSTIX_CF_RESET | GPIO_OUT )
186 #define GPIO_GUMSTIX_CF_OLD_RESET_MD ( GPIO_GUMSTIX_CF_OLD_RESET | GPIO_OUT )
188 #define GPIO_GUMSTIX_nSTSCHG_0_MD GPIO111_GPIO
189 #define GPIO_GUMSTIX_nCD_0_MD GPIO104_GPIO
191 #define GPIO_GUMSTIX_PRDY_nBSY_0_MD GPIO96_GPIO
192 #define GPIO_GUMSTIX_PRDY_nBSY_0_OLD_MD GPIO109_GPIO
194 #define GPIO_GUMSTIX_nSTSCHG_1_MD GPIO18_GPIO
195 #define GPIO_GUMSTIX_nCD_1_MD GPIO36_GPIO
196 #define GPIO_GUMSTIX_PRDY_nBSY_1_MD GPIO27_GPIO
198 /* for expansion boards that can't be programatically detected */
199 extern int am200_init(void);
200 extern int am300_init(void);