]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap2/board-3430sdp.c
USB: Clean-up USB init code for next merge window
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-3430sdp.c
1 /*
2  * linux/arch/arm/mach-omap2/board-3430sdp.c
3  *
4  * Copyright (C) 2007 Texas Instruments
5  *
6  * Modified from mach-omap2/board-generic.c
7  *
8  * Initial code: Syed Mohammed Khasim
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  */
14
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <linux/delay.h>
19 #include <linux/input.h>
20 #include <linux/workqueue.h>
21 #include <linux/err.h>
22 #include <linux/clk.h>
23 #include <linux/spi/spi.h>
24 #include <linux/spi/ads7846.h>
25 #include <linux/i2c/twl4030.h>
26 #include <linux/regulator/machine.h>
27
28 #include <mach/hardware.h>
29 #include <asm/mach-types.h>
30 #include <asm/mach/arch.h>
31 #include <asm/mach/map.h>
32
33 #include <mach/mcspi.h>
34 #include <mach/gpio.h>
35 #include <mach/mux.h>
36 #include <mach/board.h>
37 #include <mach/usb.h>
38 #include <mach/common.h>
39 #include <mach/dma.h>
40 #include <mach/gpmc.h>
41
42 #include <asm/io.h>
43 #include <asm/delay.h>
44 #include <mach/control.h>
45
46 #include "sdram-qimonda-hyb18m512160af-6.h"
47 #include "mmc-twl4030.h"
48
49 #define CONFIG_DISABLE_HFCLK 1
50
51 #define SDP3430_SMC91X_CS       3
52
53 #define ENABLE_VAUX3_DEDICATED  0x03
54 #define ENABLE_VAUX3_DEV_GRP    0x20
55
56
57 #define TWL4030_MSECURE_GPIO 22
58
59 static struct resource sdp3430_smc91x_resources[] = {
60         [0] = {
61                 .flags  = IORESOURCE_MEM,
62         },
63         [1] = {
64                 .start  = 0,
65                 .end    = 0,
66                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
67         },
68 };
69
70 static struct platform_device sdp3430_smc91x_device = {
71         .name           = "smc91x",
72         .id             = -1,
73         .num_resources  = ARRAY_SIZE(sdp3430_smc91x_resources),
74         .resource       = sdp3430_smc91x_resources,
75 };
76
77 static int sdp3430_keymap[] = {
78         KEY(0, 0, KEY_LEFT),
79         KEY(0, 1, KEY_RIGHT),
80         KEY(0, 2, KEY_A),
81         KEY(0, 3, KEY_B),
82         KEY(0, 4, KEY_C),
83         KEY(1, 0, KEY_DOWN),
84         KEY(1, 1, KEY_UP),
85         KEY(1, 2, KEY_E),
86         KEY(1, 3, KEY_F),
87         KEY(1, 4, KEY_G),
88         KEY(2, 0, KEY_ENTER),
89         KEY(2, 1, KEY_I),
90         KEY(2, 2, KEY_J),
91         KEY(2, 3, KEY_K),
92         KEY(2, 4, KEY_3),
93         KEY(3, 0, KEY_M),
94         KEY(3, 1, KEY_N),
95         KEY(3, 2, KEY_O),
96         KEY(3, 3, KEY_P),
97         KEY(3, 4, KEY_Q),
98         KEY(4, 0, KEY_R),
99         KEY(4, 1, KEY_4),
100         KEY(4, 2, KEY_T),
101         KEY(4, 3, KEY_U),
102         KEY(4, 4, KEY_D),
103         KEY(5, 0, KEY_V),
104         KEY(5, 1, KEY_W),
105         KEY(5, 2, KEY_L),
106         KEY(5, 3, KEY_S),
107         KEY(5, 4, KEY_H),
108         0
109 };
110
111 static struct twl4030_keypad_data sdp3430_kp_data = {
112         .rows           = 5,
113         .cols           = 6,
114         .keymap         = sdp3430_keymap,
115         .keymapsize     = ARRAY_SIZE(sdp3430_keymap),
116         .rep            = 1,
117 };
118
119 static int ts_gpio;
120
121 static int __init msecure_init(void)
122 {
123         int ret = 0;
124
125 #ifdef CONFIG_RTC_DRV_TWL4030
126         /* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
127         if (omap_type() == OMAP2_DEVICE_TYPE_GP &&
128                         omap_rev() < OMAP3430_REV_ES2_0) {
129                 void __iomem *msecure_pad_config_reg = omap_ctrl_base_get() +
130                         0xA3C;
131                 int mux_mask = 0x04;
132                 u16 tmp;
133
134                 ret = gpio_request(TWL4030_MSECURE_GPIO, "msecure");
135                 if (ret < 0) {
136                         printk(KERN_ERR "msecure_init: can't"
137                                 "reserve GPIO:%d !\n", TWL4030_MSECURE_GPIO);
138                         goto out;
139                 }
140                 /*
141                  * TWL4030 will be in secure mode if msecure line from OMAP
142                  * is low. Make msecure line high in order to change the
143                  * TWL4030 RTC time and calender registers.
144                  */
145                 tmp = __raw_readw(msecure_pad_config_reg);
146                 tmp &= 0xF8; /* To enable mux mode 03/04 = GPIO_RTC */
147                 tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
148                 __raw_writew(tmp, msecure_pad_config_reg);
149
150                 gpio_direction_output(TWL4030_MSECURE_GPIO, 1);
151         }
152 out:
153 #endif
154         return ret;
155 }
156
157 /**
158  * @brief ads7846_dev_init : Requests & sets GPIO line for pen-irq
159  *
160  * @return - void. If request gpio fails then Flag KERN_ERR.
161  */
162 static void ads7846_dev_init(void)
163 {
164         if (gpio_request(ts_gpio, "ADS7846 pendown") < 0) {
165                 printk(KERN_ERR "can't get ads746 pen down GPIO\n");
166                 return;
167         }
168
169         gpio_direction_input(ts_gpio);
170
171         omap_set_gpio_debounce(ts_gpio, 1);
172         omap_set_gpio_debounce_time(ts_gpio, 0xa);
173 }
174
175 static int ads7846_get_pendown_state(void)
176 {
177         return !gpio_get_value(ts_gpio);
178 }
179
180 /*
181  * This enable(1)/disable(0) the voltage for TS: uses twl4030 calls
182  */
183 static int ads7846_vaux_control(int vaux_cntrl)
184 {
185         int ret = 0;
186
187 #ifdef CONFIG_TWL4030_CORE
188         /* check for return value of ldo_use: if success it returns 0 */
189         if (vaux_cntrl == VAUX_ENABLE) {
190                 if (ret != twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
191                         ENABLE_VAUX3_DEDICATED, TWL4030_VAUX3_DEDICATED))
192                         return -EIO;
193                 if (ret != twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
194                         ENABLE_VAUX3_DEV_GRP, TWL4030_VAUX3_DEV_GRP))
195                         return -EIO;
196         } else if (vaux_cntrl == VAUX_DISABLE) {
197                 if (ret != twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
198                         0x00, TWL4030_VAUX3_DEDICATED))
199                         return -EIO;
200                 if (ret != twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
201                         0x00, TWL4030_VAUX3_DEV_GRP))
202                         return -EIO;
203         }
204 #else
205         ret = -EIO;
206 #endif
207         return ret;
208 }
209
210 static struct ads7846_platform_data tsc2046_config __initdata = {
211         .get_pendown_state      = ads7846_get_pendown_state,
212         .keep_vref_on           = 1,
213         .vaux_control           = ads7846_vaux_control,
214 };
215
216
217 static struct omap2_mcspi_device_config tsc2046_mcspi_config = {
218         .turbo_mode     = 0,
219         .single_channel = 1,  /* 0: slave, 1: master */
220 };
221
222 static struct spi_board_info sdp3430_spi_board_info[] __initdata = {
223         [0] = {
224                 /*
225                  * TSC2046 operates at a max freqency of 2MHz, so
226                  * operate slightly below at 1.5MHz
227                  */
228                 .modalias               = "ads7846",
229                 .bus_num                = 1,
230                 .chip_select            = 0,
231                 .max_speed_hz           = 1500000,
232                 .controller_data        = &tsc2046_mcspi_config,
233                 .irq                    = 0,
234                 .platform_data          = &tsc2046_config,
235         },
236 };
237
238 static struct platform_device sdp3430_lcd_device = {
239         .name           = "sdp2430_lcd",
240         .id             = -1,
241 };
242
243 static struct platform_device *sdp3430_devices[] __initdata = {
244         &sdp3430_smc91x_device,
245         &sdp3430_lcd_device,
246 };
247
248 static inline void __init sdp3430_init_smc91x(void)
249 {
250         int eth_cs;
251         unsigned long cs_mem_base;
252         int eth_gpio = 0;
253
254         eth_cs = SDP3430_SMC91X_CS;
255
256         if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
257                 printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
258                 return;
259         }
260
261         sdp3430_smc91x_resources[0].start = cs_mem_base + 0x300;
262         sdp3430_smc91x_resources[0].end   = cs_mem_base + 0x30f;
263         udelay(100);
264
265         if (omap_rev() > OMAP3430_REV_ES1_0)
266                 eth_gpio = OMAP34XX_ETHR_GPIO_IRQ_SDPV2;
267         else
268                 eth_gpio = OMAP34XX_ETHR_GPIO_IRQ_SDPV1;
269
270         sdp3430_smc91x_resources[1].start = gpio_to_irq(eth_gpio);
271
272         if (gpio_request(eth_gpio, "SMC91x irq") < 0) {
273                 printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
274                         eth_gpio);
275                 return;
276         }
277         gpio_direction_input(eth_gpio);
278 }
279
280 static void __init omap_3430sdp_init_irq(void)
281 {
282         omap2_init_common_hw(hyb18m512160af6_sdrc_params);
283         omap_init_irq();
284         omap_gpio_init();
285         sdp3430_init_smc91x();
286 }
287
288 static struct omap_uart_config sdp3430_uart_config __initdata = {
289         .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
290 };
291
292 static struct omap_lcd_config sdp3430_lcd_config __initdata = {
293         .ctrl_name      = "internal",
294 };
295
296 static struct omap_board_config_kernel sdp3430_config[] __initdata = {
297         { OMAP_TAG_UART,        &sdp3430_uart_config },
298         { OMAP_TAG_LCD,         &sdp3430_lcd_config },
299 };
300
301 static int sdp3430_batt_table[] = {
302 /* 0 C*/
303 30800, 29500, 28300, 27100,
304 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
305 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
306 11600, 11200, 10800, 10400, 10000, 9630,   9280,   8950,   8620,   8310,
307 8020,   7730,   7460,   7200,   6950,   6710,   6470,   6250,   6040,   5830,
308 5640,   5450,   5260,   5090,   4920,   4760,   4600,   4450,   4310,   4170,
309 4040,   3910,   3790,   3670,   3550
310 };
311
312 static struct twl4030_bci_platform_data sdp3430_bci_data = {
313       .battery_tmp_tbl  = sdp3430_batt_table,
314       .tblsize          = ARRAY_SIZE(sdp3430_batt_table),
315 };
316
317 static struct twl4030_hsmmc_info mmc[] = {
318         {
319                 .mmc            = 1,
320                 /* 8 bits (default) requires S6.3 == ON,
321                  * so the SIM card isn't used; else 4 bits.
322                  */
323                 .wires          = 8,
324                 .gpio_wp        = 4,
325         },
326         {
327                 .mmc            = 2,
328                 .wires          = 8,
329                 .gpio_wp        = 7,
330         },
331         {}      /* Terminator */
332 };
333
334 static struct regulator_consumer_supply sdp3430_vmmc1_supply = {
335         .supply                 = "vmmc",
336 };
337
338 static struct regulator_consumer_supply sdp3430_vsim_supply = {
339         .supply                 = "vmmc_dat4..7",
340 };
341
342 static struct regulator_consumer_supply sdp3430_vmmc2_supply = {
343         .supply                 = "vmmc",
344 };
345
346 static int sdp3430_twl_gpio_setup(struct device *dev,
347                 unsigned gpio, unsigned ngpio)
348 {
349         /* gpio + 0 is "mmc0_cd" (input/IRQ),
350          * gpio + 1 is "mmc1_cd" (input/IRQ)
351          */
352         mmc[0].gpio_cd = gpio + 0;
353         mmc[1].gpio_cd = gpio + 1;
354         twl4030_mmc_init(mmc);
355
356         /* link regulators to MMC adapters ... we "know" the
357          * regulators will be set up only *after* we return.
358          */
359         sdp3430_vmmc1_supply.dev = mmc[0].dev;
360         sdp3430_vsim_supply.dev = mmc[0].dev;
361         sdp3430_vmmc2_supply.dev = mmc[1].dev;
362
363         /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
364         gpio_request(gpio + 7, "sub_lcd_en_bkl");
365         gpio_direction_output(gpio + 7, 0);
366
367         /* gpio + 15 is "sub_lcd_nRST" (output) */
368         gpio_request(gpio + 15, "sub_lcd_nRST");
369         gpio_direction_output(gpio + 15, 0);
370
371         return 0;
372 }
373
374 static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
375         .gpio_base      = OMAP_MAX_GPIO_LINES,
376         .irq_base       = TWL4030_GPIO_IRQ_BASE,
377         .irq_end        = TWL4030_GPIO_IRQ_END,
378         .pulldowns      = BIT(2) | BIT(6) | BIT(8) | BIT(13)
379                                 | BIT(16) | BIT(17),
380         .setup          = sdp3430_twl_gpio_setup,
381 };
382
383 static struct twl4030_usb_data sdp3430_usb_data = {
384         .usb_mode       = T2_USB_MODE_ULPI,
385 };
386
387 static struct twl4030_madc_platform_data sdp3430_madc_data = {
388         .irq_line       = 1,
389 };
390
391
392 static struct twl4030_ins __initdata sleep_on_seq[] = {
393 /*
394  * Turn off VDD1 and VDD2.
395  */
396         {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_OFF), 4},
397         {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_OFF), 2},
398 #ifdef CONFIG_DISABLE_HFCLK
399 /*
400  * And also turn off the OMAP3 PLLs and the sysclk output.
401  */
402         {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_OFF), 3},
403         {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_OFF), 3},
404 #endif
405 };
406
407 static struct twl4030_script sleep_on_script __initdata = {
408         .script = sleep_on_seq,
409         .size   = ARRAY_SIZE(sleep_on_seq),
410         .flags  = TRITON_SLEEP_SCRIPT,
411 };
412
413 static struct twl4030_ins wakeup_seq[] __initdata = {
414 #ifndef CONFIG_DISABLE_HFCLK
415 /*
416  * Wakeup VDD1 and VDD2.
417  */
418         {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 4},
419         {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 2},
420 #else
421 /*
422  * Reenable the OMAP3 PLLs.
423  * Wakeup VDD1 and VDD2.
424  * Reenable sysclk output.
425  */
426         {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_ACTIVE), 0x30},
427         {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_ACTIVE), 0x30},
428         {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_ACTIVE), 0x37},
429         {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 3},
430 #endif /* #ifndef CONFIG_DISABLE_HFCLK */
431 };
432
433 static struct twl4030_script wakeup_script __initdata = {
434         .script = wakeup_seq,
435         .size   = ARRAY_SIZE(wakeup_seq),
436         .flags  = TRITON_WAKEUP12_SCRIPT | TRITON_WAKEUP3_SCRIPT,
437 };
438
439 static struct twl4030_ins wrst_seq[] __initdata = {
440 /*
441  * Reset twl4030.
442  * Reset VDD1 regulator.
443  * Reset VDD2 regulator.
444  * Reset VPLL1 regulator.
445  * Enable sysclk output.
446  * Reenable twl4030.
447  */
448         {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_OFF), 2},
449         {MSG_SINGULAR(DEV_GRP_P1, 0xf, RES_STATE_WRST), 15},
450         {MSG_SINGULAR(DEV_GRP_P1, 0x10, RES_STATE_WRST), 15},
451         {MSG_SINGULAR(DEV_GRP_P1, 0x7, RES_STATE_WRST), 0x60},
452         {MSG_SINGULAR(DEV_GRP_P1, 0x19, RES_STATE_ACTIVE), 2},
453         {MSG_SINGULAR(DEV_GRP_NULL, 0x1b, RES_STATE_ACTIVE), 2},
454 };
455 static struct twl4030_script wrst_script __initdata = {
456         .script = wrst_seq,
457         .size   = ARRAY_SIZE(wakeup_seq),
458         .flags  = TRITON_WRST_SCRIPT,
459 };
460
461 static struct twl4030_script *twl4030_scripts[] __initdata = {
462         &sleep_on_script,
463         &wakeup_script,
464         &wrst_script,
465 };
466
467 static struct twl4030_power_data sdp3430_t2scripts_data __initdata = {
468         .scripts        = twl4030_scripts,
469         .size           = ARRAY_SIZE(twl4030_scripts),
470 };
471
472 /*
473  * Apply all the fixed voltages since most versions of U-Boot
474  * don't bother with that initialization.
475  */
476
477 /* VAUX1 for mainboard (irda and sub-lcd) */
478 static struct regulator_init_data sdp3430_vaux1 = {
479         .constraints = {
480                 .min_uV                 = 2800000,
481                 .max_uV                 = 2800000,
482                 .apply_uV               = true,
483                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
484                                         | REGULATOR_MODE_STANDBY,
485                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
486                                         | REGULATOR_CHANGE_STATUS,
487         },
488 };
489
490 /* VAUX2 for camera module */
491 static struct regulator_init_data sdp3430_vaux2 = {
492         .constraints = {
493                 .min_uV                 = 2800000,
494                 .max_uV                 = 2800000,
495                 .apply_uV               = true,
496                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
497                                         | REGULATOR_MODE_STANDBY,
498                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
499                                         | REGULATOR_CHANGE_STATUS,
500         },
501 };
502
503 /* VAUX3 for LCD board */
504 static struct regulator_init_data sdp3430_vaux3 = {
505         .constraints = {
506                 .min_uV                 = 2800000,
507                 .max_uV                 = 2800000,
508                 .apply_uV               = true,
509                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
510                                         | REGULATOR_MODE_STANDBY,
511                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
512                                         | REGULATOR_CHANGE_STATUS,
513         },
514 };
515
516 /* VAUX4 for OMAP VDD_CSI2 (camera) */
517 static struct regulator_init_data sdp3430_vaux4 = {
518         .constraints = {
519                 .min_uV                 = 1800000,
520                 .max_uV                 = 1800000,
521                 .apply_uV               = true,
522                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
523                                         | REGULATOR_MODE_STANDBY,
524                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
525                                         | REGULATOR_CHANGE_STATUS,
526         },
527 };
528
529 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
530 static struct regulator_init_data sdp3430_vmmc1 = {
531         .constraints = {
532                 .valid_modes_mask = REGULATOR_MODE_NORMAL
533                                 | REGULATOR_MODE_STANDBY,
534                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
535                                 | REGULATOR_CHANGE_MODE
536                                 | REGULATOR_CHANGE_STATUS,
537         },
538         .num_consumer_supplies  = 1,
539         .consumer_supplies      = &sdp3430_vmmc1_supply,
540 };
541
542 /* VMMC2 for MMC2 card */
543 static struct regulator_init_data sdp3430_vmmc2 = {
544         .constraints = {
545                 .min_uV                 = 1850000,
546                 .max_uV                 = 1850000,
547                 .apply_uV               = true,
548                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
549                                         | REGULATOR_MODE_STANDBY,
550                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
551                                         | REGULATOR_CHANGE_STATUS,
552         },
553         .num_consumer_supplies  = 1,
554         .consumer_supplies      = &sdp3430_vmmc2_supply,
555 };
556
557 /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
558 static struct regulator_init_data sdp3430_vsim = {
559         .constraints = {
560                 .valid_modes_mask = REGULATOR_MODE_NORMAL
561                                 | REGULATOR_MODE_STANDBY,
562                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
563                                 | REGULATOR_CHANGE_MODE
564                                 | REGULATOR_CHANGE_STATUS,
565         },
566         .num_consumer_supplies  = 1,
567         .consumer_supplies      = &sdp3430_vsim_supply,
568 };
569
570 /* VDAC for DSS driving S-Video */
571 static struct regulator_init_data sdp3430_vdac = {
572         .constraints = {
573                 .min_uV                 = 1800000,
574                 .max_uV                 = 1800000,
575                 .apply_uV               = true,
576                 .valid_modes_mask       = REGULATOR_MODE_NORMAL
577                                         | REGULATOR_MODE_STANDBY,
578                 .valid_ops_mask         = REGULATOR_CHANGE_MODE
579                                         | REGULATOR_CHANGE_STATUS,
580         },
581 };
582
583 static struct twl4030_platform_data sdp3430_twldata = {
584         .irq_base       = TWL4030_IRQ_BASE,
585         .irq_end        = TWL4030_IRQ_END,
586
587         /* platform_data for children goes here */
588         .bci            = &sdp3430_bci_data,
589         .gpio           = &sdp3430_gpio_data,
590         .madc           = &sdp3430_madc_data,
591         .keypad         = &sdp3430_kp_data,
592         .power          = &sdp3430_t2scripts_data,
593         .usb            = &sdp3430_usb_data,
594
595         .vaux1          = &sdp3430_vaux1,
596         .vaux2          = &sdp3430_vaux2,
597         .vaux3          = &sdp3430_vaux3,
598         .vaux4          = &sdp3430_vaux4,
599         .vmmc1          = &sdp3430_vmmc1,
600         .vmmc2          = &sdp3430_vmmc2,
601         .vsim           = &sdp3430_vsim,
602         .vdac           = &sdp3430_vdac,
603 };
604
605 static struct i2c_board_info __initdata sdp3430_i2c_boardinfo[] = {
606         {
607                 I2C_BOARD_INFO("twl4030", 0x48),
608                 .flags = I2C_CLIENT_WAKE,
609                 .irq = INT_34XX_SYS_NIRQ,
610                 .platform_data = &sdp3430_twldata,
611         },
612 };
613
614 static int __init omap3430_i2c_init(void)
615 {
616         /* i2c1 for PMIC only */
617         omap_register_i2c_bus(1, 2600, sdp3430_i2c_boardinfo,
618                         ARRAY_SIZE(sdp3430_i2c_boardinfo));
619         /* i2c2 on camera connector (for sensor control) and optional isp1301 */
620         omap_register_i2c_bus(2, 400, NULL, 0);
621         /* i2c3 on display connector (for DVI, tfp410) */
622         omap_register_i2c_bus(3, 400, NULL, 0);
623         return 0;
624 }
625
626 extern void __init sdp3430_flash_init(void);
627
628 static void __init omap_3430sdp_init(void)
629 {
630         omap3430_i2c_init();
631         platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
632         omap_board_config = sdp3430_config;
633         omap_board_config_size = ARRAY_SIZE(sdp3430_config);
634         if (omap_rev() > OMAP3430_REV_ES1_0)
635                 ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV2;
636         else
637                 ts_gpio = OMAP34XX_TS_GPIO_IRQ_SDPV1;
638         sdp3430_spi_board_info[0].irq = gpio_to_irq(ts_gpio);
639         spi_register_board_info(sdp3430_spi_board_info,
640                                 ARRAY_SIZE(sdp3430_spi_board_info));
641         ads7846_dev_init();
642         sdp3430_flash_init();
643         msecure_init();
644         omap_serial_init();
645         usb_musb_init();
646         usb_ehci_init();
647 }
648
649 static void __init omap_3430sdp_map_io(void)
650 {
651         omap2_set_globals_343x();
652         omap2_map_common_io();
653 }
654
655 MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
656         /* Maintainer: Syed Khasim - Texas Instruments Inc */
657         .phys_io        = 0x48000000,
658         .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
659         .boot_params    = 0x80000100,
660         .map_io         = omap_3430sdp_map_io,
661         .init_irq       = omap_3430sdp_init_irq,
662         .init_machine   = omap_3430sdp_init,
663         .timer          = &omap_timer,
664 MACHINE_END