blob: 470250cdee165e0dcd0c3bee19a49417c870068c [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Russell Kinga09e64f2008-08-05 16:14:15 +01002/*
3 * arch/arm/mach-pxa/include/mach/gumstix.h
Russell Kinga09e64f2008-08-05 16:14:15 +01004 */
5
Arnd Bergmann4c25c5d2015-01-30 10:45:33 +01006#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
Russell Kinga09e64f2008-08-05 16:14:15 +01007
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/*
14GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
Christoph Egger8ae807c2010-07-04 23:27:30 +080015interrupt signal for determining cable presence. On the gumstix F,
Russell Kinga09e64f2008-08-05 16:14:15 +010016this moves to GPIO17 and GPIO37. */
17
18/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
19has detected a cable insertion; driven low otherwise. */
20
Russell Kinga09e64f2008-08-05 16:14:15 +010021#define GPIO_GUMSTIX_USB_GPIOn 35
22#define GPIO_GUMSTIX_USB_GPIOx 41
23
Russell Kinga09e64f2008-08-05 16:14:15 +010024/* usb state change */
Haojian Zhuang6384fda2011-10-10 14:21:08 +080025#define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
Russell Kinga09e64f2008-08-05 16:14:15 +010026
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 Zhuang6384fda2011-10-10 14:21:08 +080036#define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
Russell Kinga09e64f2008-08-05 16:14:15 +010037
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 Zhuang6384fda2011-10-10 14:21:08 +080050#define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
Russell Kinga09e64f2008-08-05 16:14:15 +010051#define GPIO_GUMSTIX_ETH1 27
52#define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
Haojian Zhuang6384fda2011-10-10 14:21:08 +080053#define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
Russell Kinga09e64f2008-08-05 16:14:15 +010054
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 Zhuang6384fda2011-10-10 14:21:08 +080064#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 Kinga09e64f2008-08-05 16:14:15 +010067
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 Zhuang6384fda2011-10-10 14:21:08 +080073#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 Kinga09e64f2008-08-05 16:14:15 +010076
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 Kumar3332b0c2008-12-09 22:14:29 +080085
86/* for expansion boards that can't be programatically detected */
87extern int am200_init(void);
Jaya Kumar4ce255c2009-01-01 17:51:01 +010088extern int am300_init(void);
Jaya Kumar3332b0c2008-12-09 22:14:29 +080089