Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gumstix.h
Go to the documentation of this file.
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 gumstix F,
18 this moves to GPIO17 and GPIO37. */
19 
20 /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
21 has detected a cable insertion; driven low otherwise. */
22 
23 #define GPIO_GUMSTIX_USB_GPIOn 35
24 #define GPIO_GUMSTIX_USB_GPIOx 41
25 
26 /* usb state change */
27 #define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
28 
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 */
38 #define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
39 
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)
52 #define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
53 #define GPIO_GUMSTIX_ETH1 27
54 #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
55 #define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
56 
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
66 #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)
69 
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
75 #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)
78 
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)
87 
88 /* for expansion boards that can't be programatically detected */
89 extern int am200_init(void);
90 extern int am300_init(void);
91