Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 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 | |
Arnd Bergmann | 4c25c5d | 2015-01-30 10:45:33 +0100 | [diff] [blame] | 9 | #include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */ |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 10 | |
| 11 | /* BTRESET - Reset line to Bluetooth module, active low signal. */ |
| 12 | #define GPIO_GUMSTIX_BTRESET 7 |
| 13 | #define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT) |
| 14 | |
| 15 | |
| 16 | /* |
| 17 | GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean |
Christoph Egger | 8ae807c | 2010-07-04 23:27:30 +0800 | [diff] [blame] | 18 | interrupt signal for determining cable presence. On the gumstix F, |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 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 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 24 | #define GPIO_GUMSTIX_USB_GPIOn 35 |
| 25 | #define GPIO_GUMSTIX_USB_GPIOx 41 |
| 26 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 27 | /* usb state change */ |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 28 | #define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 29 | |
| 30 | #define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN) |
| 31 | #define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT) |
| 32 | #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN) |
| 33 | |
| 34 | /* |
| 35 | * SD/MMC definitions |
| 36 | */ |
| 37 | #define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */ |
| 38 | #define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */ |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 39 | #define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 40 | |
| 41 | /* |
| 42 | * SMC Ethernet definitions |
| 43 | * ETH_RST provides a hardware reset line to the ethernet chip |
| 44 | * ETH is the IRQ line in from the ethernet chip to the PXA |
| 45 | */ |
| 46 | #define GPIO_GUMSTIX_ETH0_RST 80 |
| 47 | #define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT) |
| 48 | #define GPIO_GUMSTIX_ETH1_RST 52 |
| 49 | #define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT) |
| 50 | |
| 51 | #define GPIO_GUMSTIX_ETH0 36 |
| 52 | #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN) |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 53 | #define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 54 | #define GPIO_GUMSTIX_ETH1 27 |
| 55 | #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN) |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 56 | #define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 57 | |
| 58 | |
| 59 | /* CF reset line */ |
| 60 | #define GPIO8_RESET 8 |
| 61 | |
| 62 | /* CF slot 0 */ |
| 63 | #define GPIO4_nBVD1 4 |
| 64 | #define GPIO4_nSTSCHG GPIO4_nBVD1 |
| 65 | #define GPIO11_nCD 11 |
| 66 | #define GPIO26_PRDY_nBSY 26 |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 67 | #define GUMSTIX_S0_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO4_nSTSCHG) |
| 68 | #define GUMSTIX_S0_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO11_nCD) |
| 69 | #define GUMSTIX_S0_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO26_PRDY_nBSY) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 70 | |
| 71 | /* CF slot 1 */ |
| 72 | #define GPIO18_nBVD1 18 |
| 73 | #define GPIO18_nSTSCHG GPIO18_nBVD1 |
| 74 | #define GPIO36_nCD 36 |
| 75 | #define GPIO27_PRDY_nBSY 27 |
Haojian Zhuang | 6384fda | 2011-10-10 14:21:08 +0800 | [diff] [blame] | 76 | #define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG) |
| 77 | #define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD) |
| 78 | #define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 79 | |
| 80 | /* CF GPIO line modes */ |
| 81 | #define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN) |
| 82 | #define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT) |
| 83 | #define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN) |
| 84 | #define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN) |
| 85 | #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) |
| 86 | #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) |
| 87 | #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) |
Jaya Kumar | 3332b0c | 2008-12-09 22:14:29 +0800 | [diff] [blame] | 88 | |
| 89 | /* for expansion boards that can't be programatically detected */ |
| 90 | extern int am200_init(void); |
Jaya Kumar | 4ce255c | 2009-01-01 17:51:01 +0100 | [diff] [blame] | 91 | extern int am300_init(void); |
Jaya Kumar | 3332b0c | 2008-12-09 22:14:29 +0800 | [diff] [blame] | 92 | |