summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500-pins.c
blob: 12f6506902271f138214901abdb22a0b5f838a5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
/*
 * Copyright (C) ST-Ericsson SA 2010
 *
 * License terms: GNU General Public License (GPL) version 2
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/io.h>
#include <linux/string.h>

#include <asm/mach-types.h>
#include <plat/pincfg.h>
#include <linux/gpio/nomadik.h>

#include <mach/hardware.h>

#include "pins-db8500.h"
#include "pins.h"

#include "board-pins-sleep-force.h"

enum custom_pin_cfg_t {
	PINS_FOR_DEFAULT,
	PINS_FOR_U9500,
};

static enum custom_pin_cfg_t pinsfor;

static pin_cfg_t mop500_pins_common[] = {
	/* MSP0 */
	GPIO12_MSP0_TXD,
	GPIO13_MSP0_TFS,
	GPIO14_MSP0_TCK,
	GPIO15_MSP0_RXD,

	/* MSP2: HDMI */
	GPIO193_MSP2_TXD,
	GPIO194_MSP2_TCK,
	GPIO195_MSP2_TFS,
	GPIO196_MSP2_RXD | PIN_OUTPUT_LOW,

	/* LCD TE0 */
	GPIO68_LCD_VSI0	| PIN_INPUT_PULLUP,

	/* Touch screen INTERFACE */
	GPIO84_GPIO	| PIN_INPUT_PULLUP, /* TOUCH_INT1 */

	/* STMPE1601/tc35893 keypad  IRQ */
	GPIO218_GPIO	| PIN_INPUT_PULLUP,

	/* UART */
	/* uart-0 pins gpio configuration should be
	 * kept intact to prevent glitch in tx line
	 * when tty dev is opened. Later these pins
	 * are configured to uart mop500_pins_uart0
	 *
	 * It will be replaced with uart configuration
	 * once the issue is solved.
	 */
	GPIO0_GPIO	| PIN_INPUT_PULLUP,
	GPIO1_GPIO	| PIN_OUTPUT_HIGH,
	GPIO2_GPIO	| PIN_INPUT_PULLUP,
	GPIO3_GPIO	| PIN_OUTPUT_HIGH,

	GPIO29_U2_RXD	| PIN_INPUT_PULLUP,
	GPIO30_U2_TXD	| PIN_OUTPUT_HIGH,
	GPIO31_U2_CTSn	| PIN_INPUT_PULLUP,
	GPIO32_U2_RTSn	| PIN_OUTPUT_HIGH,

	/* HSI */
	GPIO219_HSIR_FLA0,
	GPIO220_HSIR_DAT0,
	GPIO221_HSIR_RDY0,
	GPIO222_HSIT_FLA0,
	GPIO223_HSIT_DAT0,
	GPIO224_HSIT_RDY0,
	GPIO225_GPIO	| PIN_INPUT_PULLDOWN, /* CA_WAKE0 */
};

static pin_cfg_t mop500_pins_default[] = {
	/* SSP0 */
	GPIO143_SSP0_CLK,
	GPIO144_SSP0_FRM,
	GPIO145_SSP0_RXD | PIN_PULL_DOWN,
	GPIO146_SSP0_TXD,

	/* XENON Flashgun INTERFACE */
	GPIO6_IP_GPIO0	| PIN_INPUT_PULLUP,/* XENON_FLASH_ID */
	GPIO7_IP_GPIO1	| PIN_INPUT_PULLUP,/* XENON_READY */

	GPIO217_GPIO	| PIN_INPUT_PULLUP, /* TC35892 IRQ */

	/* sdi0 (removable MMC/SD/SDIO cards) not handled by pm_runtime */
	GPIO21_MC0_DAT31DIR	| PIN_OUTPUT_HIGH,

	/* UART */
	GPIO4_U1_RXD	| PIN_INPUT_PULLUP,
	GPIO5_U1_TXD	| PIN_OUTPUT_HIGH,
	GPIO6_U1_CTSn	| PIN_INPUT_PULLUP,
	GPIO7_U1_RTSn	| PIN_OUTPUT_HIGH,
};

static pin_cfg_t mop500_pins_hrefv60[] = {
	/* WLAN */
	GPIO85_GPIO		| PIN_OUTPUT_LOW,/* WLAN_ENA */

	/* XENON Flashgun INTERFACE */
	GPIO6_IP_GPIO0	| PIN_INPUT_PULLUP,/* XENON_FLASH_ID */
	GPIO7_IP_GPIO1	| PIN_INPUT_PULLUP,/* XENON_READY */

	/* Assistant LED INTERFACE */
	GPIO21_GPIO | PIN_OUTPUT_LOW,  /* XENON_EN1 */
	GPIO64_IP_GPIO4 | PIN_OUTPUT_LOW,  /* XENON_EN2 */

	/* Magnetometer */
	GPIO31_GPIO | PIN_INPUT_PULLUP,  /* magnetometer_INT */
	GPIO32_GPIO | PIN_INPUT_PULLDOWN, /* Magnetometer DRDY */

	/* Display Interface */
	GPIO65_GPIO		| PIN_OUTPUT_HIGH, /* DISP1 NO RST */
	GPIO66_GPIO		| PIN_OUTPUT_LOW, /* DISP2 RST */

	/* Touch screen INTERFACE */
	GPIO143_GPIO	| PIN_OUTPUT_LOW,/*TOUCH_RST1 */

	/* Touch screen INTERFACE 2 */
	GPIO67_GPIO	| PIN_INPUT_PULLUP, /* TOUCH_INT2 */
	GPIO146_GPIO	| PIN_OUTPUT_LOW,/*TOUCH_RST2 */

	/* ETM_PTM_TRACE INTERFACE */
	GPIO70_GPIO	| PIN_OUTPUT_LOW,/* ETM_PTM_DATA23 */
	GPIO71_GPIO	| PIN_OUTPUT_LOW,/* ETM_PTM_DATA22 */
	GPIO72_GPIO	| PIN_OUTPUT_LOW,/* ETM_PTM_DATA21 */
	GPIO73_GPIO	| PIN_OUTPUT_LOW,/* ETM_PTM_DATA20 */
	GPIO74_GPIO	| PIN_OUTPUT_LOW,/* ETM_PTM_DATA19 */

	/* NAHJ INTERFACE */
	GPIO76_GPIO	| PIN_OUTPUT_LOW,/* NAHJ_CTRL */
	GPIO216_GPIO	| PIN_OUTPUT_HIGH,/* NAHJ_CTRL_INV */

	/* NFC INTERFACE */
	GPIO77_GPIO	| PIN_OUTPUT_LOW, /* NFC_ENA */
	GPIO144_GPIO	| PIN_INPUT_PULLDOWN, /* NFC_IRQ */
	GPIO142_GPIO	| PIN_OUTPUT_LOW, /* NFC_RESET */

	/* Keyboard MATRIX INTERFACE */
	GPIO90_MC5_CMD	| PIN_OUTPUT_LOW, /* KP_O_1 */
	GPIO87_MC5_DAT1	| PIN_OUTPUT_LOW, /* KP_O_2 */
	GPIO86_MC5_DAT0	| PIN_OUTPUT_LOW, /* KP_O_3 */
	GPIO96_KP_O6	| PIN_OUTPUT_LOW, /* KP_O_6 */
	GPIO94_KP_O7	| PIN_OUTPUT_LOW, /* KP_O_7 */
	GPIO93_MC5_DAT4	| PIN_INPUT_PULLUP, /* KP_I_0 */
	GPIO89_MC5_DAT3	| PIN_INPUT_PULLUP, /* KP_I_2 */
	GPIO88_MC5_DAT2	| PIN_INPUT_PULLUP, /* KP_I_3 */
	GPIO91_GPIO	| PIN_INPUT_PULLUP, /* FORCE_SENSING_INT */
	GPIO92_GPIO	| PIN_OUTPUT_LOW, /* FORCE_SENSING_RST */
	GPIO97_GPIO	| PIN_OUTPUT_LOW, /* FORCE_SENSING_WU */

	/* DiPro Sensor Interface */
	GPIO139_GPIO	| PIN_INPUT_PULLUP, /* DIPRO_INT */

	/* HAL SWITCH INTERFACE */
	GPIO145_GPIO	| PIN_INPUT_PULLDOWN,/* HAL_SW */

	/* Audio Amplifier Interface */
	GPIO149_GPIO	| PIN_OUTPUT_HIGH, /* VAUDIO_HF_EN, enable MAX8968 */

	/* GBF INTERFACE */
	GPIO171_GPIO	| PIN_OUTPUT_LOW, /* GBF_ENA_RESET */

	/* MSP : HDTV INTERFACE */
	GPIO192_GPIO	| PIN_INPUT_PULLDOWN,

	/* ACCELEROMETER_INTERFACE */
	GPIO82_GPIO		| PIN_INPUT_PULLUP, /* ACC_INT1 */
	GPIO83_GPIO		| PIN_INPUT_PULLUP, /* ACC_INT2 */

	/* Proximity Sensor */
	GPIO217_GPIO		| PIN_INPUT_PULLUP,

	/* SD card detect */
	GPIO95_GPIO	| PIN_INPUT_PULLUP,
};

static pin_cfg_t u9500_pins[] = {
	GPIO4_U1_RXD    | PIN_INPUT_PULLUP,
	GPIO5_U1_TXD    | PIN_OUTPUT_HIGH,
	GPIO144_GPIO	| PIN_INPUT_PULLUP,/* WLAN_IRQ */
	GPIO226_GPIO	| PIN_OUTPUT_HIGH, /* HSI AC_WAKE0 */
};

static pin_cfg_t u8500_pins[] = {
	GPIO226_GPIO	| PIN_OUTPUT_LOW, /* WLAN_PMU_EN */
	GPIO4_GPIO		| PIN_INPUT_PULLUP,/* WLAN_IRQ */
};

static pin_cfg_t snowball_pins[] = {
	/* SSP0, to AB8500 */
	GPIO143_SSP0_CLK,
	GPIO144_SSP0_FRM,
	GPIO145_SSP0_RXD	| PIN_PULL_DOWN,
	GPIO146_SSP0_TXD,

	/* MMC0: MicroSD card */
	GPIO21_MC0_DAT31DIR     | PIN_OUTPUT_HIGH,

	/* MMC2: LAN */
	GPIO86_SM_ADQ0,
	GPIO87_SM_ADQ1,
	GPIO88_SM_ADQ2,
	GPIO89_SM_ADQ3,
	GPIO90_SM_ADQ4,
	GPIO91_SM_ADQ5,
	GPIO92_SM_ADQ6,
	GPIO93_SM_ADQ7,

	GPIO94_SM_ADVn,
	GPIO95_SM_CS0n,
	GPIO96_SM_OEn,
	GPIO97_SM_WEn,

	GPIO128_SM_CKO,
	GPIO130_SM_FBCLK,
	GPIO131_SM_ADQ8,
	GPIO132_SM_ADQ9,
	GPIO133_SM_ADQ10,
	GPIO134_SM_ADQ11,
	GPIO135_SM_ADQ12,
	GPIO136_SM_ADQ13,
	GPIO137_SM_ADQ14,
	GPIO138_SM_ADQ15,

	/* RSTn_LAN */
	GPIO141_GPIO		| PIN_OUTPUT_HIGH,

	/*  Accelerometer/Magnetometer */
	GPIO163_GPIO		| PIN_INPUT_PULLUP, /* ACCEL_IRQ1 */
	GPIO164_GPIO		| PIN_INPUT_PULLUP, /* ACCEL_IRQ2 */
	GPIO165_GPIO		| PIN_INPUT_PULLUP, /* MAG_DRDY */

	/* WLAN/GBF */
	GPIO171_GPIO		| PIN_OUTPUT_HIGH,/* GBF_ENA */
	GPIO215_GPIO		| PIN_OUTPUT_LOW,/* WLAN_ENA */
	GPIO216_GPIO		| PIN_INPUT_PULLUP,/* WLAN_IRQ */
};

/*
 * I2C
 */

static UX500_PINS(mop500_pins_i2c0,
	GPIO147_I2C0_SCL,
	GPIO148_I2C0_SDA,
);

static UX500_PINS(mop500_pins_i2c1,
	GPIO16_I2C1_SCL,
	GPIO17_I2C1_SDA,
);

static UX500_PINS(mop500_pins_i2c2,
	GPIO10_I2C2_SDA,
	GPIO11_I2C2_SCL,
);

static UX500_PINS(mop500_pins_i2c3,
	GPIO229_I2C3_SDA,
	GPIO230_I2C3_SCL,
);

static UX500_PINS(mop500_pins_mcde_dpi,
	GPIO64_LCDB_DE,
	GPIO65_LCDB_HSO,
	GPIO66_LCDB_VSO,
	GPIO67_LCDB_CLK,
	GPIO70_LCD_D0,
	GPIO71_LCD_D1,
	GPIO72_LCD_D2,
	GPIO73_LCD_D3,
	GPIO74_LCD_D4,
	GPIO75_LCD_D5,
	GPIO76_LCD_D6,
	GPIO77_LCD_D7,
	GPIO153_LCD_D24,
	GPIO154_LCD_D25,
	GPIO155_LCD_D26,
	GPIO156_LCD_D27,
	GPIO157_LCD_D28,
	GPIO158_LCD_D29,
	GPIO159_LCD_D30,
	GPIO160_LCD_D31,
	GPIO161_LCD_D32,
	GPIO162_LCD_D33,
	GPIO163_LCD_D34,
	GPIO164_LCD_D35,
	GPIO165_LCD_D36,
	GPIO166_LCD_D37,
	GPIO167_LCD_D38,
	GPIO168_LCD_D39,
);

static UX500_PINS(mop500_pins_mcde_tvout,
	GPIO78_LCD_D8,
	GPIO79_LCD_D9,
	GPIO80_LCD_D10,
	GPIO81_LCD_D11,
	GPIO150_LCDA_CLK,
);

static UX500_PINS(mop500_pins_mcde_hdmi,
	GPIO69_LCD_VSI1	| PIN_INPUT_PULLUP,
);

static UX500_PINS(mop500_pins_ske,
	GPIO153_KP_I7 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO154_KP_I6 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO155_KP_I5 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO156_KP_I4 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO161_KP_I3 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO162_KP_I2 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO163_KP_I1 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO164_KP_I0 | PIN_INPUT_PULLDOWN | PIN_SLPM_INPUT_PULLUP,
	GPIO157_KP_O7 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO158_KP_O6 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO159_KP_O5 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO160_KP_O4 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO165_KP_O3 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO166_KP_O2 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO167_KP_O1 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
	GPIO168_KP_O0 | PIN_INPUT_PULLUP | PIN_SLPM_OUTPUT_LOW,
);

/* sdi0 (removable MMC/SD/SDIO cards) */
static UX500_PINS(mop500_pins_sdi0,
	GPIO18_MC0_CMDDIR	| PIN_OUTPUT_HIGH,
	GPIO19_MC0_DAT0DIR	| PIN_OUTPUT_HIGH,
	GPIO20_MC0_DAT2DIR	| PIN_OUTPUT_HIGH,

	GPIO22_MC0_FBCLK	| PIN_INPUT_NOPULL,
	GPIO23_MC0_CLK		| PIN_OUTPUT_LOW,
	GPIO24_MC0_CMD		| PIN_INPUT_PULLUP,
	GPIO25_MC0_DAT0		| PIN_INPUT_PULLUP,
	GPIO26_MC0_DAT1		| PIN_INPUT_PULLUP,
	GPIO27_MC0_DAT2		| PIN_INPUT_PULLUP,
	GPIO28_MC0_DAT3		| PIN_INPUT_PULLUP,
);

/* sdi1 (WLAN CW1200) */
static UX500_PINS(mop500_pins_sdi1,
	GPIO208_MC1_CLK		| PIN_OUTPUT_LOW,
	GPIO209_MC1_FBCLK	| PIN_INPUT_NOPULL,
	GPIO210_MC1_CMD		| PIN_INPUT_PULLUP,
	GPIO211_MC1_DAT0	| PIN_INPUT_PULLUP,
	GPIO212_MC1_DAT1	| PIN_INPUT_PULLUP,
	GPIO213_MC1_DAT2	| PIN_INPUT_PULLUP,
	GPIO214_MC1_DAT3	| PIN_INPUT_PULLUP,
);

/* sdi2 (POP eMMC) */
static UX500_PINS(mop500_pins_sdi2,
	GPIO128_MC2_CLK		| PIN_OUTPUT_LOW,
	GPIO129_MC2_CMD		| PIN_INPUT_PULLUP,
	GPIO130_MC2_FBCLK	| PIN_INPUT_NOPULL,
	GPIO131_MC2_DAT0	| PIN_INPUT_PULLUP,
	GPIO132_MC2_DAT1	| PIN_INPUT_PULLUP,
	GPIO133_MC2_DAT2	| PIN_INPUT_PULLUP,
	GPIO134_MC2_DAT3	| PIN_INPUT_PULLUP,
	GPIO135_MC2_DAT4	| PIN_INPUT_PULLUP,
	GPIO136_MC2_DAT5	| PIN_INPUT_PULLUP,
	GPIO137_MC2_DAT6	| PIN_INPUT_PULLUP,
	GPIO138_MC2_DAT7	| PIN_INPUT_PULLUP,
);

/* sdi4 (PCB eMMC) */
static UX500_PINS(mop500_pins_sdi4,
	GPIO197_MC4_DAT3	| PIN_INPUT_PULLUP,
	GPIO198_MC4_DAT2	| PIN_INPUT_PULLUP,
	GPIO199_MC4_DAT1	| PIN_INPUT_PULLUP,
	GPIO200_MC4_DAT0	| PIN_INPUT_PULLUP,
	GPIO201_MC4_CMD		| PIN_INPUT_PULLUP,
	GPIO202_MC4_FBCLK	| PIN_INPUT_NOPULL,
	GPIO203_MC4_CLK		| PIN_OUTPUT_LOW,
	GPIO204_MC4_DAT7	| PIN_INPUT_PULLUP,
	GPIO205_MC4_DAT6	| PIN_INPUT_PULLUP,
	GPIO206_MC4_DAT5	| PIN_INPUT_PULLUP,
	GPIO207_MC4_DAT4	| PIN_INPUT_PULLUP,
);

/* USB */
static UX500_PINS(mop500_pins_usb,
	GPIO256_USB_NXT,
	GPIO257_USB_STP		| PIN_OUTPUT_HIGH,
	GPIO258_USB_XCLK,
	GPIO259_USB_DIR,
	GPIO260_USB_DAT7,
	GPIO261_USB_DAT6,
	GPIO262_USB_DAT5,
	GPIO263_USB_DAT4,
	GPIO264_USB_DAT3,
	GPIO265_USB_DAT2,
	GPIO266_USB_DAT1,
	GPIO267_USB_DAT0,
);

/* SPI2 */
static UX500_PINS(mop500_pins_spi2,
	GPIO216_GPIO    | PIN_OUTPUT_HIGH,
	GPIO218_SPI2_RXD        | PIN_INPUT_PULLDOWN,
	GPIO215_SPI2_TXD        | PIN_OUTPUT_LOW,
	GPIO217_SPI2_CLK        | PIN_OUTPUT_LOW,
);

static struct ux500_pin_lookup mop500_pins[] = {
	PIN_LOOKUP("mcde-dpi", &mop500_pins_mcde_dpi),
	PIN_LOOKUP("mcde-tvout", &mop500_pins_mcde_tvout),
	PIN_LOOKUP("av8100-hdmi", &mop500_pins_mcde_hdmi),
	PIN_LOOKUP("nmk-i2c.0", &mop500_pins_i2c0),
	PIN_LOOKUP("nmk-i2c.1", &mop500_pins_i2c1),
	PIN_LOOKUP("nmk-i2c.2", &mop500_pins_i2c2),
	PIN_LOOKUP("nmk-i2c.3", &mop500_pins_i2c3),
	PIN_LOOKUP("ske", &mop500_pins_ske),
	PIN_LOOKUP("sdi0", &mop500_pins_sdi0),
	PIN_LOOKUP("sdi1", &mop500_pins_sdi1),
	PIN_LOOKUP("sdi2", &mop500_pins_sdi2),
	PIN_LOOKUP("sdi4", &mop500_pins_sdi4),
	PIN_LOOKUP("ab8500-usb.0", &mop500_pins_usb),
	PIN_LOOKUP("spi2", &mop500_pins_spi2),
};

/*
 * passing "pinsfor=" in kernel cmdline allows for custom
 * configuration of GPIOs on u8500 derived boards.
 */
static int __init early_pinsfor(char *p)
{
	pinsfor = PINS_FOR_DEFAULT;

	if (strcmp(p, "u9500-21") == 0)
		pinsfor = PINS_FOR_U9500;

	return 0;
}
early_param("pinsfor", early_pinsfor);

int pins_for_u9500(void)
{
	if (pinsfor == PINS_FOR_U9500)
		return 1;

	return 0;
}

void __init mop500_pins_init(void)
{
	nmk_config_pins(mop500_pins_common,
				ARRAY_SIZE(mop500_pins_common));

	ux500_pins_add(mop500_pins, ARRAY_SIZE(mop500_pins));

	if (machine_is_hrefv60())
		nmk_config_pins(mop500_pins_hrefv60,
				ARRAY_SIZE(mop500_pins_hrefv60));
	else if (machine_is_snowball())
		nmk_config_pins(snowball_pins,
				ARRAY_SIZE(snowball_pins));
	else
		nmk_config_pins(mop500_pins_default,
				ARRAY_SIZE(mop500_pins_default));

	switch (pinsfor) {
	case PINS_FOR_U9500:
		nmk_config_pins(u9500_pins, ARRAY_SIZE(u9500_pins));
		break;

	case PINS_FOR_DEFAULT:
		nmk_config_pins(u8500_pins, ARRAY_SIZE(u8500_pins));
	default:
		break;
	}
}