• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 /*
16 GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
17 interrupt signal for determining cable presence. On the original gumstix,
18 this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F,
19 this moves to GPIO17 and GPIO37. */
20 
21 /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
22 has detected a cable insertion; driven low otherwise. */
23 
24 #ifdef CONFIG_ARCH_GUMSTIX_ORIG
25 
26 #define GPIO_GUMSTIX_USB_GPIOn		81
27 #define GPIO_GUMSTIX_USB_GPIOx		83
28 
29 #else
30 
31 #define GPIO_GUMSTIX_USB_GPIOn		35
32 #define GPIO_GUMSTIX_USB_GPIOx		41
33 
34 #endif
35 
36 /* usb state change */
37 #define GUMSTIX_USB_INTR_IRQ		IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn)
38 
39 #define GPIO_GUMSTIX_USB_GPIOn_MD	(GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
40 #define GPIO_GUMSTIX_USB_GPIOx_CON_MD	(GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
41 #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD	(GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
42 
43 /*
44  * SD/MMC definitions
45  */
46 #define GUMSTIX_GPIO_nSD_WP		22 /* SD Write Protect */
47 #define GUMSTIX_GPIO_nSD_DETECT		11 /* MMC/SD Card Detect */
48 #define GUMSTIX_IRQ_GPIO_nSD_DETECT	IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT)
49 
50 /*
51  * SMC Ethernet definitions
52  * ETH_RST provides a hardware reset line to the ethernet chip
53  * ETH is the IRQ line in from the ethernet chip to the PXA
54  */
55 #define GPIO_GUMSTIX_ETH0_RST		80
56 #define GPIO_GUMSTIX_ETH0_RST_MD	(GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
57 #define GPIO_GUMSTIX_ETH1_RST		52
58 #define GPIO_GUMSTIX_ETH1_RST_MD	(GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
59 
60 #define GPIO_GUMSTIX_ETH0		36
61 #define GPIO_GUMSTIX_ETH0_MD		(GPIO_GUMSTIX_ETH0 | GPIO_IN)
62 #define GUMSTIX_ETH0_IRQ		IRQ_GPIO(GPIO_GUMSTIX_ETH0)
63 #define GPIO_GUMSTIX_ETH1		27
64 #define GPIO_GUMSTIX_ETH1_MD		(GPIO_GUMSTIX_ETH1 | GPIO_IN)
65 #define GUMSTIX_ETH1_IRQ		IRQ_GPIO(GPIO_GUMSTIX_ETH1)
66 
67 
68 /* CF reset line */
69 #define GPIO8_RESET			8
70 
71 /* CF slot 0 */
72 #define GPIO4_nBVD1			4
73 #define GPIO4_nSTSCHG			GPIO4_nBVD1
74 #define GPIO11_nCD			11
75 #define GPIO26_PRDY_nBSY		26
76 #define GUMSTIX_S0_nSTSCHG_IRQ		IRQ_GPIO(GPIO4_nSTSCHG)
77 #define GUMSTIX_S0_nCD_IRQ		IRQ_GPIO(GPIO11_nCD)
78 #define GUMSTIX_S0_PRDY_nBSY_IRQ	IRQ_GPIO(GPIO26_PRDY_nBSY)
79 
80 /* CF slot 1 */
81 #define GPIO18_nBVD1			18
82 #define GPIO18_nSTSCHG			GPIO18_nBVD1
83 #define GPIO36_nCD			36
84 #define GPIO27_PRDY_nBSY		27
85 #define GUMSTIX_S1_nSTSCHG_IRQ		IRQ_GPIO(GPIO18_nSTSCHG)
86 #define GUMSTIX_S1_nCD_IRQ		IRQ_GPIO(GPIO36_nCD)
87 #define GUMSTIX_S1_PRDY_nBSY_IRQ	IRQ_GPIO(GPIO27_PRDY_nBSY)
88 
89 /* CF GPIO line modes */
90 #define GPIO4_nSTSCHG_MD		(GPIO4_nSTSCHG | GPIO_IN)
91 #define GPIO8_RESET_MD			(GPIO8_RESET | GPIO_OUT)
92 #define GPIO11_nCD_MD			(GPIO11_nCD | GPIO_IN)
93 #define GPIO18_nSTSCHG_MD		(GPIO18_nSTSCHG | GPIO_IN)
94 #define GPIO26_PRDY_nBSY_MD		(GPIO26_PRDY_nBSY | GPIO_IN)
95 #define GPIO27_PRDY_nBSY_MD		(GPIO27_PRDY_nBSY | GPIO_IN)
96 #define GPIO36_nCD_MD			(GPIO36_nCD | GPIO_IN)
97 
98 /* for expansion boards that can't be programatically detected */
99 extern int am200_init(void);
100 
101