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