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