sync hh.org
[hh.org.git] / include / asm-arm / arch-pxa / htcapache-gpio.h
blobbdb8153e47a72d39c0410b1edded38acd3ca89f1
1 /* HTC Apache GPIOs */
2 #ifndef _HTCAPACHE_GPIO_H_
3 #define _HTCAPACHE_GPIO_H_
6 /****************************************************************
7 * EGPIO
8 ****************************************************************/
10 int htcapache_egpio_isset(int bit);
11 void htcapache_egpio_set(int bit);
12 void htcapache_egpio_clear(int bit);
13 int htcapache_egpio_init(void);
14 #define GPIO_NR_HTCAPACHE_EGPIO_IRQ 15
15 #define IRQ_EGPIO(x) (IRQ_BOARD_START + (x))
18 /****************************************************************
19 * Power
20 ****************************************************************/
22 void htcapache_power_init(void);
23 #define EGPIO_NR_HTCAPACHE_PWR_IN_PWR 0
24 #define EGPIO_NR_HTCAPACHE_PWR_IN_HIGHPWR 7
25 #define EGPIO_NR_HTCAPACHE_PWR_CHARGE 40
26 #define EGPIO_NR_HTCAPACHE_PWR_HIGHCHARGE 39
29 /****************************************************************
30 * Sound
31 ****************************************************************/
33 #define EGPIO_NR_HTCAPACHE_SND_POWER 21 // XXX - not sure
34 #define EGPIO_NR_HTCAPACHE_SND_RESET 24 // XXX - not sure
35 #define EGPIO_NR_HTCAPACHE_SND_PWRJACK 23
36 #define EGPIO_NR_HTCAPACHE_SND_PWRSPKR 22
37 #define EGPIO_NR_HTCAPACHE_SND_IN_JACK 2
40 /****************************************************************
41 * Touchscreen
42 ****************************************************************/
44 #define GPIO_NR_HTCAPACHE_TS_PENDOWN 36
45 #define GPIO_NR_HTCAPACHE_TS_DAV 114
46 #define GPIO_NR_HTCAPACHE_TS_ALERT 20 // XXX - not sure
49 /****************************************************************
50 * BlueTooth
51 ****************************************************************/
53 #define EGPIO_NR_HTCAPACHE_BT_POWER 27
54 #define EGPIO_NR_HTCAPACHE_BT_RESET 26
57 /****************************************************************
58 * Wifi
59 ****************************************************************/
61 #define EGPIO_NR_HTCAPACHE_WIFI_POWER1 20
62 #define EGPIO_NR_HTCAPACHE_WIFI_POWER2 17
63 #define EGPIO_NR_HTCAPACHE_WIFI_POWER3 16
64 #define EGPIO_NR_HTCAPACHE_WIFI_RESET 19
65 #define EGPIO_NR_HTCAPACHE_WIFI_IN_IRQ 5
68 /****************************************************************
69 * Mini-SD card
70 ****************************************************************/
72 #define GPIO_NR_HTCAPACHE_SD_CARD_DETECT_N 13
73 #define GPIO_NR_HTCAPACHE_SD_POWER_N 89
76 /****************************************************************
77 * USB
78 ****************************************************************/
80 #define GPIO_NR_HTCAPACHE_USB_PUEN 99
81 #define EGPIO_NR_HTCAPACHE_USB_PWR 37
84 /****************************************************************
85 * Buttons on side
86 ****************************************************************/
88 #define GPIO_NR_HTCAPACHE_BUTTON_POWER 0
89 #define GPIO_NR_HTCAPACHE_BUTTON_RECORD 95
90 #define GPIO_NR_HTCAPACHE_BUTTON_VOLUP 9
91 #define GPIO_NR_HTCAPACHE_BUTTON_VOLDOWN 10
92 #define GPIO_NR_HTCAPACHE_BUTTON_BROWSER 94
93 #define GPIO_NR_HTCAPACHE_BUTTON_CAMERA 93
96 /****************************************************************
97 * Pull out keyboard
98 ****************************************************************/
100 #define GPIO_NR_HTCAPACHE_KP_MKIN0 100
101 #define GPIO_NR_HTCAPACHE_KP_MKIN1 101
102 #define GPIO_NR_HTCAPACHE_KP_MKIN2 102
103 #define GPIO_NR_HTCAPACHE_KP_MKIN3 37
104 #define GPIO_NR_HTCAPACHE_KP_MKIN4 38
105 #define GPIO_NR_HTCAPACHE_KP_MKIN5 90
106 #define GPIO_NR_HTCAPACHE_KP_MKIN6 91
108 #define GPIO_NR_HTCAPACHE_KP_MKOUT0 103
109 #define GPIO_NR_HTCAPACHE_KP_MKOUT1 104
110 #define GPIO_NR_HTCAPACHE_KP_MKOUT2 105
111 #define GPIO_NR_HTCAPACHE_KP_MKOUT3 106
112 #define GPIO_NR_HTCAPACHE_KP_MKOUT4 107
113 #define GPIO_NR_HTCAPACHE_KP_MKOUT5 108
114 #define GPIO_NR_HTCAPACHE_KP_MKOUT6 40
116 #define GPIO_NR_HTCAPACHE_KP_MKIN0_MD (GPIO_NR_HTCAPACHE_KP_MKIN0 | GPIO_ALT_FN_1_IN)
117 #define GPIO_NR_HTCAPACHE_KP_MKIN1_MD (GPIO_NR_HTCAPACHE_KP_MKIN1 | GPIO_ALT_FN_1_IN)
118 #define GPIO_NR_HTCAPACHE_KP_MKIN2_MD (GPIO_NR_HTCAPACHE_KP_MKIN2 | GPIO_ALT_FN_1_IN)
119 #define GPIO_NR_HTCAPACHE_KP_MKIN3_MD (GPIO_NR_HTCAPACHE_KP_MKIN3 | GPIO_ALT_FN_3_IN)
120 #define GPIO_NR_HTCAPACHE_KP_MKIN4_MD (GPIO_NR_HTCAPACHE_KP_MKIN4 | GPIO_ALT_FN_2_IN)
121 #define GPIO_NR_HTCAPACHE_KP_MKIN5_MD (GPIO_NR_HTCAPACHE_KP_MKIN5 | GPIO_ALT_FN_1_IN)
122 #define GPIO_NR_HTCAPACHE_KP_MKIN6_MD (GPIO_NR_HTCAPACHE_KP_MKIN6 | GPIO_ALT_FN_1_IN)
124 #define GPIO_NR_HTCAPACHE_KP_MKOUT0_MD (GPIO_NR_HTCAPACHE_KP_MKOUT0 | GPIO_ALT_FN_2_OUT)
125 #define GPIO_NR_HTCAPACHE_KP_MKOUT1_MD (GPIO_NR_HTCAPACHE_KP_MKOUT1 | GPIO_ALT_FN_2_OUT)
126 #define GPIO_NR_HTCAPACHE_KP_MKOUT2_MD (GPIO_NR_HTCAPACHE_KP_MKOUT2 | GPIO_ALT_FN_2_OUT)
127 #define GPIO_NR_HTCAPACHE_KP_MKOUT3_MD (GPIO_NR_HTCAPACHE_KP_MKOUT3 | GPIO_ALT_FN_2_OUT)
128 #define GPIO_NR_HTCAPACHE_KP_MKOUT4_MD (GPIO_NR_HTCAPACHE_KP_MKOUT4 | GPIO_ALT_FN_2_OUT)
129 #define GPIO_NR_HTCAPACHE_KP_MKOUT5_MD (GPIO_NR_HTCAPACHE_KP_MKOUT5 | GPIO_ALT_FN_2_OUT)
130 #define GPIO_NR_HTCAPACHE_KP_MKOUT6_MD (GPIO_NR_HTCAPACHE_KP_MKOUT6 | GPIO_ALT_FN_1_OUT)
132 #endif