blob: dba14b6503ad17008660d23f81306db42c72119c [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
2 * arch/arm/mach-pxa/include/mach/gumstix.h
3 *
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.
7 */
8
9
10/* BTRESET - Reset line to Bluetooth module, active low signal. */
11#define GPIO_GUMSTIX_BTRESET 7
12#define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
13
14
15/*
16GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
Christoph Egger8ae807c2010-07-04 23:27:30 +080017interrupt signal for determining cable presence. On the gumstix F,
Russell Kinga09e64f2008-08-05 16:14:15 +010018this moves to GPIO17 and GPIO37. */
19
20/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
21has detected a cable insertion; driven low otherwise. */
22
Russell Kinga09e64f2008-08-05 16:14:15 +010023#define GPIO_GUMSTIX_USB_GPIOn 35
24#define GPIO_GUMSTIX_USB_GPIOx 41
25
Russell Kinga09e64f2008-08-05 16:14:15 +010026/* usb state change */
Haojian Zhuang6384fda2011-10-10 14:21:08 +080027#define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
Russell Kinga09e64f2008-08-05 16:14:15 +010028
29#define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
30#define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
31#define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
32
33/*
34 * SD/MMC definitions
35 */
36#define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
37#define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
Haojian Zhuang6384fda2011-10-10 14:21:08 +080038#define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
Russell Kinga09e64f2008-08-05 16:14:15 +010039
40/*
41 * SMC Ethernet definitions
42 * ETH_RST provides a hardware reset line to the ethernet chip
43 * ETH is the IRQ line in from the ethernet chip to the PXA
44 */
45#define GPIO_GUMSTIX_ETH0_RST 80
46#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
47#define GPIO_GUMSTIX_ETH1_RST 52
48#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
49
50#define GPIO_GUMSTIX_ETH0 36
51#define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
Haojian Zhuang6384fda2011-10-10 14:21:08 +080052#define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
Russell Kinga09e64f2008-08-05 16:14:15 +010053#define GPIO_GUMSTIX_ETH1 27
54#define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
Haojian Zhuang6384fda2011-10-10 14:21:08 +080055#define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
Russell Kinga09e64f2008-08-05 16:14:15 +010056
57
58/* CF reset line */
59#define GPIO8_RESET 8
60
61/* CF slot 0 */
62#define GPIO4_nBVD1 4
63#define GPIO4_nSTSCHG GPIO4_nBVD1
64#define GPIO11_nCD 11
65#define GPIO26_PRDY_nBSY 26
Haojian Zhuang6384fda2011-10-10 14:21:08 +080066#define GUMSTIX_S0_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO4_nSTSCHG)
67#define GUMSTIX_S0_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO11_nCD)
68#define GUMSTIX_S0_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO26_PRDY_nBSY)
Russell Kinga09e64f2008-08-05 16:14:15 +010069
70/* CF slot 1 */
71#define GPIO18_nBVD1 18
72#define GPIO18_nSTSCHG GPIO18_nBVD1
73#define GPIO36_nCD 36
74#define GPIO27_PRDY_nBSY 27
Haojian Zhuang6384fda2011-10-10 14:21:08 +080075#define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG)
76#define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD)
77#define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY)
Russell Kinga09e64f2008-08-05 16:14:15 +010078
79/* CF GPIO line modes */
80#define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
81#define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
82#define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
83#define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
84#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
85#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
86#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
Jaya Kumar3332b0c2008-12-09 22:14:29 +080087
88/* for expansion boards that can't be programatically detected */
89extern int am200_init(void);
Jaya Kumar4ce255c2009-01-01 17:51:01 +010090extern int am300_init(void);
Jaya Kumar3332b0c2008-12-09 22:14:29 +080091