kvm tools, setup: Create private directory
[linux-2.6/next.git] / arch / arm / mach-ux500 / board-mop500-pins.c
blobfd4cf1ca5efd06c4a6367edc1c6cae332a6ea785
1 /*
2 * Copyright (C) ST-Ericsson SA 2010
4 * License terms: GNU General Public License (GPL) version 2
5 */
7 #include <linux/kernel.h>
8 #include <linux/init.h>
9 #include <linux/gpio.h>
11 #include <asm/mach-types.h>
12 #include <plat/pincfg.h>
13 #include <mach/hardware.h>
15 #include "pins-db8500.h"
17 static pin_cfg_t mop500_pins_common[] = {
18 /* I2C */
19 GPIO147_I2C0_SCL,
20 GPIO148_I2C0_SDA,
21 GPIO16_I2C1_SCL,
22 GPIO17_I2C1_SDA,
23 GPIO10_I2C2_SDA,
24 GPIO11_I2C2_SCL,
25 GPIO229_I2C3_SDA,
26 GPIO230_I2C3_SCL,
28 /* MSP0 */
29 GPIO12_MSP0_TXD,
30 GPIO13_MSP0_TFS,
31 GPIO14_MSP0_TCK,
32 GPIO15_MSP0_RXD,
34 /* MSP2: HDMI */
35 GPIO193_MSP2_TXD,
36 GPIO194_MSP2_TCK,
37 GPIO195_MSP2_TFS,
38 GPIO196_MSP2_RXD | PIN_OUTPUT_LOW,
40 /* Touch screen INTERFACE */
41 GPIO84_GPIO | PIN_INPUT_PULLUP, /* TOUCH_INT1 */
43 /* STMPE1601/tc35893 keypad IRQ */
44 GPIO218_GPIO | PIN_INPUT_PULLUP,
46 /* MMC0 (MicroSD card) */
47 GPIO18_MC0_CMDDIR | PIN_OUTPUT_HIGH,
48 GPIO19_MC0_DAT0DIR | PIN_OUTPUT_HIGH,
49 GPIO20_MC0_DAT2DIR | PIN_OUTPUT_HIGH,
51 GPIO22_MC0_FBCLK | PIN_INPUT_NOPULL,
52 GPIO23_MC0_CLK | PIN_OUTPUT_LOW,
53 GPIO24_MC0_CMD | PIN_INPUT_PULLUP,
54 GPIO25_MC0_DAT0 | PIN_INPUT_PULLUP,
55 GPIO26_MC0_DAT1 | PIN_INPUT_PULLUP,
56 GPIO27_MC0_DAT2 | PIN_INPUT_PULLUP,
57 GPIO28_MC0_DAT3 | PIN_INPUT_PULLUP,
59 /* SDI1 (SDIO) */
60 GPIO208_MC1_CLK | PIN_OUTPUT_LOW,
61 GPIO209_MC1_FBCLK | PIN_INPUT_NOPULL,
62 GPIO210_MC1_CMD | PIN_INPUT_PULLUP,
63 GPIO211_MC1_DAT0 | PIN_INPUT_PULLUP,
64 GPIO212_MC1_DAT1 | PIN_INPUT_PULLUP,
65 GPIO213_MC1_DAT2 | PIN_INPUT_PULLUP,
66 GPIO214_MC1_DAT3 | PIN_INPUT_PULLUP,
68 /* MMC2 (On-board DATA INTERFACE eMMC) */
69 GPIO128_MC2_CLK | PIN_OUTPUT_LOW,
70 GPIO129_MC2_CMD | PIN_INPUT_PULLUP,
71 GPIO130_MC2_FBCLK | PIN_INPUT_NOPULL,
72 GPIO131_MC2_DAT0 | PIN_INPUT_PULLUP,
73 GPIO132_MC2_DAT1 | PIN_INPUT_PULLUP,
74 GPIO133_MC2_DAT2 | PIN_INPUT_PULLUP,
75 GPIO134_MC2_DAT3 | PIN_INPUT_PULLUP,
76 GPIO135_MC2_DAT4 | PIN_INPUT_PULLUP,
77 GPIO136_MC2_DAT5 | PIN_INPUT_PULLUP,
78 GPIO137_MC2_DAT6 | PIN_INPUT_PULLUP,
79 GPIO138_MC2_DAT7 | PIN_INPUT_PULLUP,
81 /* MMC4 (On-board STORAGE INTERFACE eMMC) */
82 GPIO197_MC4_DAT3 | PIN_INPUT_PULLUP,
83 GPIO198_MC4_DAT2 | PIN_INPUT_PULLUP,
84 GPIO199_MC4_DAT1 | PIN_INPUT_PULLUP,
85 GPIO200_MC4_DAT0 | PIN_INPUT_PULLUP,
86 GPIO201_MC4_CMD | PIN_INPUT_PULLUP,
87 GPIO202_MC4_FBCLK | PIN_INPUT_NOPULL,
88 GPIO203_MC4_CLK | PIN_OUTPUT_LOW,
89 GPIO204_MC4_DAT7 | PIN_INPUT_PULLUP,
90 GPIO205_MC4_DAT6 | PIN_INPUT_PULLUP,
91 GPIO206_MC4_DAT5 | PIN_INPUT_PULLUP,
92 GPIO207_MC4_DAT4 | PIN_INPUT_PULLUP,
94 /* SKE keypad */
95 GPIO153_KP_I7,
96 GPIO154_KP_I6,
97 GPIO155_KP_I5,
98 GPIO156_KP_I4,
99 GPIO157_KP_O7,
100 GPIO158_KP_O6,
101 GPIO159_KP_O5,
102 GPIO160_KP_O4,
103 GPIO161_KP_I3,
104 GPIO162_KP_I2,
105 GPIO163_KP_I1,
106 GPIO164_KP_I0,
107 GPIO165_KP_O3,
108 GPIO166_KP_O2,
109 GPIO167_KP_O1,
110 GPIO168_KP_O0,
112 /* UART */
113 GPIO0_U0_CTSn | PIN_INPUT_PULLUP,
114 GPIO1_U0_RTSn | PIN_OUTPUT_HIGH,
115 GPIO2_U0_RXD | PIN_INPUT_PULLUP,
116 GPIO3_U0_TXD | PIN_OUTPUT_HIGH,
118 GPIO29_U2_RXD | PIN_INPUT_PULLUP,
119 GPIO30_U2_TXD | PIN_OUTPUT_HIGH,
120 GPIO31_U2_CTSn | PIN_INPUT_PULLUP,
121 GPIO32_U2_RTSn | PIN_OUTPUT_HIGH,
123 /* Display & HDMI HW sync */
124 GPIO68_LCD_VSI0 | PIN_INPUT_PULLUP,
125 GPIO69_LCD_VSI1 | PIN_INPUT_PULLUP,
128 static pin_cfg_t mop500_pins_default[] = {
129 /* SSP0 */
130 GPIO143_SSP0_CLK,
131 GPIO144_SSP0_FRM,
132 GPIO145_SSP0_RXD | PIN_PULL_DOWN,
133 GPIO146_SSP0_TXD,
136 GPIO217_GPIO | PIN_INPUT_PULLUP, /* TC35892 IRQ */
138 /* SDI0 (MicroSD card) */
139 GPIO21_MC0_DAT31DIR | PIN_OUTPUT_HIGH,
141 /* UART */
142 GPIO4_U1_RXD | PIN_INPUT_PULLUP,
143 GPIO5_U1_TXD | PIN_OUTPUT_HIGH,
144 GPIO6_U1_CTSn | PIN_INPUT_PULLUP,
145 GPIO7_U1_RTSn | PIN_OUTPUT_HIGH,
148 static pin_cfg_t mop500_pins_hrefv60[] = {
149 /* WLAN */
150 GPIO4_GPIO | PIN_INPUT_PULLUP,/* WLAN_IRQ */
151 GPIO85_GPIO | PIN_OUTPUT_LOW,/* WLAN_ENA */
153 /* XENON Flashgun INTERFACE */
154 GPIO6_IP_GPIO0 | PIN_INPUT_PULLUP,/* XENON_FLASH_ID */
155 GPIO7_IP_GPIO1 | PIN_INPUT_PULLUP,/* XENON_READY */
156 GPIO170_GPIO | PIN_OUTPUT_LOW, /* XENON_CHARGE */
158 /* Assistant LED INTERFACE */
159 GPIO21_GPIO | PIN_OUTPUT_LOW, /* XENON_EN1 */
160 GPIO64_IP_GPIO4 | PIN_OUTPUT_LOW, /* XENON_EN2 */
162 /* Magnetometer */
163 GPIO31_GPIO | PIN_INPUT_PULLUP, /* magnetometer_INT */
164 GPIO32_GPIO | PIN_INPUT_PULLDOWN, /* Magnetometer DRDY */
166 /* Display Interface */
167 GPIO65_GPIO | PIN_OUTPUT_LOW, /* DISP1 RST */
168 GPIO66_GPIO | PIN_OUTPUT_LOW, /* DISP2 RST */
170 /* Touch screen INTERFACE */
171 GPIO143_GPIO | PIN_OUTPUT_LOW,/*TOUCH_RST1 */
173 /* Touch screen INTERFACE 2 */
174 GPIO67_GPIO | PIN_INPUT_PULLUP, /* TOUCH_INT2 */
175 GPIO146_GPIO | PIN_OUTPUT_LOW,/*TOUCH_RST2 */
177 /* ETM_PTM_TRACE INTERFACE */
178 GPIO70_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA23 */
179 GPIO71_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA22 */
180 GPIO72_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA21 */
181 GPIO73_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA20 */
182 GPIO74_GPIO | PIN_OUTPUT_LOW,/* ETM_PTM_DATA19 */
184 /* NAHJ INTERFACE */
185 GPIO76_GPIO | PIN_OUTPUT_LOW,/* NAHJ_CTRL */
186 GPIO216_GPIO | PIN_OUTPUT_HIGH,/* NAHJ_CTRL_INV */
188 /* NFC INTERFACE */
189 GPIO77_GPIO | PIN_OUTPUT_LOW, /* NFC_ENA */
190 GPIO144_GPIO | PIN_INPUT_PULLDOWN, /* NFC_IRQ */
191 GPIO142_GPIO | PIN_OUTPUT_LOW, /* NFC_RESET */
193 /* Keyboard MATRIX INTERFACE */
194 GPIO90_MC5_CMD | PIN_OUTPUT_LOW, /* KP_O_1 */
195 GPIO87_MC5_DAT1 | PIN_OUTPUT_LOW, /* KP_O_2 */
196 GPIO86_MC5_DAT0 | PIN_OUTPUT_LOW, /* KP_O_3 */
197 GPIO96_KP_O6 | PIN_OUTPUT_LOW, /* KP_O_6 */
198 GPIO94_KP_O7 | PIN_OUTPUT_LOW, /* KP_O_7 */
199 GPIO93_MC5_DAT4 | PIN_INPUT_PULLUP, /* KP_I_0 */
200 GPIO89_MC5_DAT3 | PIN_INPUT_PULLUP, /* KP_I_2 */
201 GPIO88_MC5_DAT2 | PIN_INPUT_PULLUP, /* KP_I_3 */
202 GPIO91_GPIO | PIN_INPUT_PULLUP, /* FORCE_SENSING_INT */
203 GPIO92_GPIO | PIN_OUTPUT_LOW, /* FORCE_SENSING_RST */
204 GPIO97_GPIO | PIN_OUTPUT_LOW, /* FORCE_SENSING_WU */
206 /* DiPro Sensor Interface */
207 GPIO139_GPIO | PIN_INPUT_PULLUP, /* DIPRO_INT */
209 /* HAL SWITCH INTERFACE */
210 GPIO145_GPIO | PIN_INPUT_PULLDOWN,/* HAL_SW */
212 /* Audio Amplifier Interface */
213 GPIO149_GPIO | PIN_OUTPUT_LOW, /* VAUDIO_HF_EN */
215 /* GBF INTERFACE */
216 GPIO171_GPIO | PIN_OUTPUT_LOW, /* GBF_ENA_RESET */
218 /* MSP : HDTV INTERFACE */
219 GPIO192_GPIO | PIN_INPUT_PULLDOWN,
221 /* ACCELEROMETER_INTERFACE */
222 GPIO82_GPIO | PIN_INPUT_PULLUP, /* ACC_INT1 */
223 GPIO83_GPIO | PIN_INPUT_PULLUP, /* ACC_INT2 */
225 /* Proximity Sensor */
226 GPIO217_GPIO | PIN_INPUT_PULLUP,
231 void __init mop500_pins_init(void)
233 nmk_config_pins(mop500_pins_common,
234 ARRAY_SIZE(mop500_pins_common));
235 if (machine_is_hrefv60())
236 nmk_config_pins(mop500_pins_hrefv60,
237 ARRAY_SIZE(mop500_pins_hrefv60));
238 else
239 nmk_config_pins(mop500_pins_default,
240 ARRAY_SIZE(mop500_pins_default));