2019-06-04 16:11:33 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2008-03-15 12:11:07 +08:00
|
|
|
/*
|
2008-08-05 23:14:15 +08:00
|
|
|
* arch/arm/mach-pxa/include/mach/gumstix.h
|
2008-03-15 12:11:07 +08:00
|
|
|
*/
|
|
|
|
|
2015-01-30 17:45:33 +08:00
|
|
|
#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
|
2008-03-15 12:11:07 +08:00
|
|
|
|
|
|
|
/* BTRESET - Reset line to Bluetooth module, active low signal. */
|
|
|
|
#define GPIO_GUMSTIX_BTRESET 7
|
|
|
|
#define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
|
2010-07-04 23:27:30 +08:00
|
|
|
interrupt signal for determining cable presence. On the gumstix F,
|
2008-03-15 12:11:07 +08:00
|
|
|
this moves to GPIO17 and GPIO37. */
|
|
|
|
|
|
|
|
/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
|
|
|
|
has detected a cable insertion; driven low otherwise. */
|
|
|
|
|
|
|
|
#define GPIO_GUMSTIX_USB_GPIOn 35
|
|
|
|
#define GPIO_GUMSTIX_USB_GPIOx 41
|
|
|
|
|
|
|
|
/* usb state change */
|
2011-10-10 14:21:08 +08:00
|
|
|
#define GUMSTIX_USB_INTR_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_USB_GPIOn)
|
2008-03-15 12:11:07 +08:00
|
|
|
|
|
|
|
#define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
|
|
|
|
#define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
|
|
|
|
#define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* SD/MMC definitions
|
|
|
|
*/
|
|
|
|
#define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
|
|
|
|
#define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
|
2011-10-10 14:21:08 +08:00
|
|
|
#define GUMSTIX_IRQ_GPIO_nSD_DETECT PXA_GPIO_TO_IRQ(GUMSTIX_GPIO_nSD_DETECT)
|
2008-03-15 12:11:07 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* SMC Ethernet definitions
|
|
|
|
* ETH_RST provides a hardware reset line to the ethernet chip
|
|
|
|
* ETH is the IRQ line in from the ethernet chip to the PXA
|
|
|
|
*/
|
|
|
|
#define GPIO_GUMSTIX_ETH0_RST 80
|
|
|
|
#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
|
|
|
|
#define GPIO_GUMSTIX_ETH1_RST 52
|
|
|
|
#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
|
|
|
|
|
|
|
|
#define GPIO_GUMSTIX_ETH0 36
|
|
|
|
#define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
|
2011-10-10 14:21:08 +08:00
|
|
|
#define GUMSTIX_ETH0_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH0)
|
2008-03-15 12:11:07 +08:00
|
|
|
#define GPIO_GUMSTIX_ETH1 27
|
|
|
|
#define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
|
2011-10-10 14:21:08 +08:00
|
|
|
#define GUMSTIX_ETH1_IRQ PXA_GPIO_TO_IRQ(GPIO_GUMSTIX_ETH1)
|
2008-03-15 12:11:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
/* CF reset line */
|
|
|
|
#define GPIO8_RESET 8
|
|
|
|
|
|
|
|
/* CF slot 0 */
|
|
|
|
#define GPIO4_nBVD1 4
|
|
|
|
#define GPIO4_nSTSCHG GPIO4_nBVD1
|
|
|
|
#define GPIO11_nCD 11
|
|
|
|
#define GPIO26_PRDY_nBSY 26
|
2011-10-10 14:21:08 +08:00
|
|
|
#define GUMSTIX_S0_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO4_nSTSCHG)
|
|
|
|
#define GUMSTIX_S0_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO11_nCD)
|
|
|
|
#define GUMSTIX_S0_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO26_PRDY_nBSY)
|
2008-03-15 12:11:07 +08:00
|
|
|
|
|
|
|
/* CF slot 1 */
|
|
|
|
#define GPIO18_nBVD1 18
|
|
|
|
#define GPIO18_nSTSCHG GPIO18_nBVD1
|
|
|
|
#define GPIO36_nCD 36
|
|
|
|
#define GPIO27_PRDY_nBSY 27
|
2011-10-10 14:21:08 +08:00
|
|
|
#define GUMSTIX_S1_nSTSCHG_IRQ PXA_GPIO_TO_IRQ(GPIO18_nSTSCHG)
|
|
|
|
#define GUMSTIX_S1_nCD_IRQ PXA_GPIO_TO_IRQ(GPIO36_nCD)
|
|
|
|
#define GUMSTIX_S1_PRDY_nBSY_IRQ PXA_GPIO_TO_IRQ(GPIO27_PRDY_nBSY)
|
2008-03-15 12:11:07 +08:00
|
|
|
|
|
|
|
/* CF GPIO line modes */
|
|
|
|
#define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
|
|
|
|
#define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
|
|
|
|
#define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
|
|
|
|
#define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
|
|
|
|
#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
|
|
|
|
#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
|
|
|
|
#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
|
2008-12-09 22:14:29 +08:00
|
|
|
|
|
|
|
/* for expansion boards that can't be programatically detected */
|
|
|
|
extern int am200_init(void);
|
2009-01-02 00:51:01 +08:00
|
|
|
extern int am300_init(void);
|
2008-12-09 22:14:29 +08:00
|
|
|
|