blob: e57f5c724e8a1e18ded7302bb6c7a29bd288c0ab [file] [log] [blame]
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +01001#ifndef _MIOA701_H_
2#define _MIOA701_H_
3
4#define MIO_CFG_IN(pin, af) \
5 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK)) |\
6 (MFP_PIN(pin) | MFP_##af | MFP_DIR_IN))
7
8#define MIO_CFG_OUT(pin, af, state) \
9 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK | MFP_LPM_STATE_MASK)) |\
10 (MFP_PIN(pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state))
11
12/* Global GPIOs */
Robert Jarzmikc96763d2008-11-18 20:23:32 +010013#define GPIO9_CHARGE_EN 9
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010014#define GPIO18_POWEROFF 18
15#define GPIO87_LCD_POWER 87
Robert Jarzmikc96763d2008-11-18 20:23:32 +010016#define GPIO96_AC_DETECT 96
17#define GPIO80_MAYBE_CHARGE_VDROP 80 /* Drop of 88mV */
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010018
19/* USB */
Robert Jarzmikc96763d2008-11-18 20:23:32 +010020#define GPIO13_nUSB_DETECT 13
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010021#define GPIO22_USB_ENABLE 22
22
23/* SDIO bits */
24#define GPIO78_SDIO_RO 78
25#define GPIO15_SDIO_INSERT 15
26#define GPIO91_SDIO_EN 91
27
28/* Bluetooth */
Robert Jarzmikc96763d2008-11-18 20:23:32 +010029#define GPIO14_BT_nACTIVITY 14
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010030#define GPIO83_BT_ON 83
Robert Jarzmikc96763d2008-11-18 20:23:32 +010031#define GPIO77_BT_UNKNOWN1 77
32#define GPIO86_BT_MAYBE_nRESET 86
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010033
34/* GPS */
35#define GPIO23_GPS_UNKNOWN1 23
36#define GPIO26_GPS_ON 26
37#define GPIO27_GPS_RESET 27
38#define GPIO106_GPS_UNKNOWN2 106
39#define GPIO107_GPS_UNKNOWN3 107
40
41/* GSM */
42#define GPIO24_GSM_MOD_RESET_CMD 24
43#define GPIO88_GSM_nMOD_ON_CMD 88
44#define GPIO90_GSM_nMOD_OFF_CMD 90
45#define GPIO114_GSM_nMOD_DTE_UART_STATE 114
46#define GPIO25_GSM_MOD_ON_STATE 25
47#define GPIO113_GSM_EVENT 113
48
49/* SOUND */
50#define GPIO12_HPJACK_INSERT 12
51
52/* LEDS */
53#define GPIO10_LED_nCharging 10
54#define GPIO97_LED_nBlue 97
55#define GPIO98_LED_nOrange 98
56#define GPIO82_LED_nVibra 82
57#define GPIO115_LED_nKeyboard 115
58
59/* Keyboard */
60#define GPIO0_KEY_POWER 0
61#define GPIO93_KEY_VOLUME_UP 93
62#define GPIO94_KEY_VOLUME_DOWN 94
63
Robert Jarzmikc2219e42012-04-22 23:24:00 +020064/* Camera */
65#define GPIO56_MT9M111_nOE 56
66
Robert Jarzmikeda6f6e2008-08-17 09:34:30 +010067extern struct input_dev *mioa701_evdev;
68extern void mioa701_gpio_lpm_set(unsigned long mfp_pin);
69
70/* Assembler externals mioa701_bootresume.S */
71extern u32 mioa701_bootstrap;
72extern u32 mioa701_jumpaddr;
73extern u32 mioa701_bootstrap_lg;
74
75#endif /* _MIOA701_H */