blob: 825f2d1260ae27c7032dd55b487d0a6595d3b895 [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
Arnd Bergmann4c25c5d2015-01-30 10:45:33 +01009#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
Russell Kinga09e64f2008-08-05 16:14:15 +010010
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/*
17GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
Christoph Egger8ae807c2010-07-04 23:27:30 +080018interrupt signal for determining cable presence. On the gumstix F,
Russell Kinga09e64f2008-08-05 16:14:15 +010019this moves to GPIO17 and GPIO37. */
20
21/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
22has detected a cable insertion; driven low otherwise. */
23
Russell Kinga09e64f2008-08-05 16:14:15 +010024#define GPIO_GUMSTIX_USB_GPIOn 35
25#define GPIO_GUMSTIX_USB_GPIOx 41
26
Russell Kinga09e64f2008-08-05 16:14:15 +010027/* usb state change */
Haojian Zhuang6384fda2011-10-10 14:21:08 +080028#define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
Russell Kinga09e64f2008-08-05 16:14:15 +010029
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 Zhuang6384fda2011-10-10 14:21:08 +080039#define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
Russell Kinga09e64f2008-08-05 16:14:15 +010040
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 Zhuang6384fda2011-10-10 14:21:08 +080053#define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
Russell Kinga09e64f2008-08-05 16:14:15 +010054#define GPIO_GUMSTIX_ETH1 27
55#define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
Haojian Zhuang6384fda2011-10-10 14:21:08 +080056#define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
Russell Kinga09e64f2008-08-05 16:14:15 +010057
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 Zhuang6384fda2011-10-10 14:21:08 +080067#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 Kinga09e64f2008-08-05 16:14:15 +010070
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 Zhuang6384fda2011-10-10 14:21:08 +080076#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 Kinga09e64f2008-08-05 16:14:15 +010079
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 Kumar3332b0c2008-12-09 22:14:29 +080088
89/* for expansion boards that can't be programatically detected */
90extern int am200_init(void);
Jaya Kumar4ce255c2009-01-01 17:51:01 +010091extern int am300_init(void);
Jaya Kumar3332b0c2008-12-09 22:14:29 +080092