sync hh.org
[hh.org.git] / include / asm-arm / arch-pxa / h5400-gpio.h
blob117c90a9b189151dca3e5956439a6d1951ee4c75
1 #ifndef _H5400_GPIO_H_
2 #define _H5400_GPIO_H_
4 #define GET_H5400_GPIO(gpio) \
5 (GPLR(GPIO_NR_H5400_ ## gpio) & GPIO_bit(GPIO_NR_H5400_ ## gpio))
7 #define SET_H5400_GPIO(gpio, setp) \
8 do { \
9 if (setp) \
10 GPSR(GPIO_NR_H5400_ ## gpio) = GPIO_bit(GPIO_NR_H5400_ ## gpio); \
11 else \
12 GPCR(GPIO_NR_H5400_ ## gpio) = GPIO_bit(GPIO_NR_H5400_ ## gpio); \
13 } while (0)
15 #define SET_H5400_GPIO_N(gpio, setp) \
16 do { \
17 if (setp) \
18 GPCR(GPIO_NR_H5400_ ## gpio) = GPIO_bit(GPIO_NR_H5400_ ## gpio); \
19 else \
20 GPSR(GPIO_NR_H5400_ ## gpio) = GPIO_bit(GPIO_NR_H5400_ ## gpio); \
21 } while (0)
23 #define H5400_IRQ(gpio) \
24 IRQ_GPIO(GPIO_NR_H5400_ ## gpio)
26 #define GPIO_NR_H5400_POWER_BUTTON 0
27 #define GPIO_NR_H5400_RESET_BUTTON_N 1
28 #define GPIO_NR_H5400_OPT_INT 2
29 #define GPIO_NR_H5400_BACKUP_POWER 3
30 #define GPIO_NR_H5400_ACTION_BUTTON 4
31 #define GPIO_NR_H5400_COM_DCD_SOMETHING 5 /* what is this really ? */
32 /* 6 not connected */
33 #define GPIO_NR_H5400_RESET_BUTTON_AGAIN_N 7 /* connected to gpio 1 as well */
34 /* 8 not connected */
35 #define GPIO_NR_H5400_RSO_N 9 /* reset output from max1702 which regulates 3.3 and 2.5 */
36 #define GPIO_NR_H5400_ASIC_INT_N 10 /* from companion asic */
37 #define GPIO_NR_H5400_BT_ENV_0 11 /* to LMX9814, set to 1 according to regdump */
38 /* 12 not connected */
39 #define GPIO_NR_H5400_BT_ENV_1 13 /* to LMX9814, set to 1 according to regdump */
40 #define GPIO_NR_H5400_BT_WU 14 /* from LMX9814, Defined as HOST_WAKEUP in the LMX9820 data sheet */
41 /* 15 is CS1# */
42 /* 16 not connected */
43 /* 17 not connected */
44 /* 18 is pcmcia ready */
45 /* 19 is dreq1 */
46 /* 20 is dreq0 */
47 #define GPIO_NR_H5400_OE_RD_NWR 21 /* output enable on rd/nwr signal to companion asic */
48 /* 22 is not connected */
49 #define GPIO_NR_H5400_OPT_SPI_CLK 23 /* to extension pack */
50 #define GPIO_NR_H5400_OPT_SPI_CS_N 24 /* to extension pack */
51 #define GPIO_NR_H5400_OPT_SPI_DOUT 25 /* to extension pack */
52 #define GPIO_NR_H5400_OPT_SPI_DIN 26 /* to extension pack */
53 /* 27 not connected */
54 #define GPIO_NR_H5400_I2S_BITCLK 28 /* connected to AC97 codec */
55 #define GPIO_NR_H5400_I2S_DATAOUT 29 /* connected to AC97 codec */
56 #define GPIO_NR_H5400_I2S_DATAIN 30 /* connected to AC97 codec */
57 #define GPIO_NR_H5400_I2S_LRCLK 31 /* connected to AC97 codec */
58 #define GPIO_NR_H5400_I2S_SYSCLK 32 /* connected to AC97 codec */
59 /* 33 is CS5# */
60 #define GPIO_NR_H5400_COM_RXD 34 /* connected to cradle/cable connector */
61 #define GPIO_NR_H5400_COM_CTS 35 /* connected to cradle/cable connector */
62 #define GPIO_NR_H5400_COM_DCD 36 /* connected to cradle/cable connector */
63 #define GPIO_NR_H5400_COM_DSR 37 /* connected to cradle/cable connector */
64 #define GPIO_NR_H5400_COM_RI 38 /* connected to cradle/cable connector */
65 #define GPIO_NR_H5400_COM_TXD 39 /* connected to cradle/cable connector */
66 #define GPIO_NR_H5400_COM_DTR 40 /* connected to cradle/cable connector */
67 #define GPIO_NR_H5400_COM_RTS 41 /* connected to cradle/cable connector */
69 #define GPIO_NR_H5400_BT_RXD 42 /* connected to BT (LMX9814) */
70 #define GPIO_NR_H5400_BT_TXD 43 /* connected to BT (LMX9814) */
71 #define GPIO_NR_H5400_BT_CTS 44 /* connected to BT (LMX9814) */
72 #define GPIO_NR_H5400_BT_RTS 45 /* connected to BT (LMX9814) */
74 #define GPIO_NR_H5400_IRDA_RXD 46
75 #define GPIO_NR_H5400_IRDA_TXD 47
77 #define GPIO_NR_H5400_POE_N 48 /* used for pcmcia */
78 #define GPIO_NR_H5400_PWE_N 49 /* used for pcmcia */
79 #define GPIO_NR_H5400_PIOR_N 50 /* used for pcmcia */
80 #define GPIO_NR_H5400_PIOW_N 51 /* used for pcmcia */
81 #define GPIO_NR_H5400_PCE1_N 52 /* used for pcmcia */
82 #define GPIO_NR_H5400_PCE2_N 53 /* used for pcmcia */
83 #define GPIO_NR_H5400_PSKTSEL 54 /* used for pcmcia */
84 #define GPIO_NR_H5400_PREG_N 55 /* used for pcmcia */
85 #define GPIO_NR_H5400_PWAIT_N 56 /* used for pcmcia */
86 #define GPIO_NR_H5400_IOIS16_N 57 /* used for pcmcia */
88 #define GPIO_NR_H5400_IRDA_SD 58 /* to hsdl3002 sd */
89 /* 59 not connected */
90 #define GPIO_NR_H5400_POWER_SD_N 60 /* controls power to SD */
91 #define GPIO_NR_H5400_POWER_RS232_N 61 /* inverted FORCEON to rs232 transceiver */
92 #define GPIO_NR_H5400_POWER_ACCEL_N 62 /* controls power to accel */
93 /* 63 is not connected */
94 #define GPIO_NR_H5400_OPT_NVRAM 64 /* controls power to expansion pack */
95 #define GPIO_NR_H5400_CHG_EN 65 /* to sc801 en */
96 #define GPIO_NR_H5400_USB_PULLUP 66 /* USB d+ pullup via 1.5K resistor */
97 #define GPIO_NR_H5400_BT_2V8_N 67 /* 2.8V used by bluetooth */
98 #define GPIO_NR_H5400_EXT_CHG_RATE 68 /* enables external charging rate */
99 /* 69 is not connected */
100 #define GPIO_NR_H5400_CIR_RESET 70 /* consumer IR reset */
101 #define GPIO_NR_H5400_POWER_LIGHT_SENSOR_N 71
102 #define GPIO_NR_H5400_BT_M_RESET 72
103 #define GPIO_NR_H5400_STD_CHG_RATE 73
104 #define GPIO_NR_H5400_SD_WP_N 74
105 #define GPIO_NR_H5400_MOTOR_ON_N 75 /* external pullup on this */
106 #define GPIO_NR_H5400_HEADPHONE_DETECT 76
107 #define GPIO_NR_H5400_USB_CHG_RATE 77 /* select rate for charging via usb */
108 /* 78 is CS2# */
109 /* 79 is CS3# */
110 /* 80 is CS4# */
112 #define IRQ_GPIO_H5400_ASIC_INT IRQ_GPIO(GPIO_NR_H5400_ASIC_INT_N)
114 #endif /* _H5400_GPIO_H */