Merge branch 'depends/rmk/memory_h' into next/cleanup2
[pandora-kernel.git] / arch / arm / mach-exynos4 / mach-nuri.c
1 /*
2  * linux/arch/arm/mach-exynos4/mach-nuri.c
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 #include <linux/platform_device.h>
12 #include <linux/serial_core.h>
13 #include <linux/input.h>
14 #include <linux/i2c.h>
15 #include <linux/i2c/atmel_mxt_ts.h>
16 #include <linux/i2c-gpio.h>
17 #include <linux/gpio_keys.h>
18 #include <linux/gpio.h>
19 #include <linux/power/max8903_charger.h>
20 #include <linux/power/max17042_battery.h>
21 #include <linux/regulator/machine.h>
22 #include <linux/regulator/fixed.h>
23 #include <linux/mfd/max8997.h>
24 #include <linux/mfd/max8997-private.h>
25 #include <linux/mmc/host.h>
26 #include <linux/fb.h>
27 #include <linux/pwm_backlight.h>
28
29 #include <video/platform_lcd.h>
30
31 #include <asm/mach/arch.h>
32 #include <asm/mach-types.h>
33
34 #include <plat/adc.h>
35 #include <plat/regs-fb-v4.h>
36 #include <plat/regs-serial.h>
37 #include <plat/exynos4.h>
38 #include <plat/cpu.h>
39 #include <plat/devs.h>
40 #include <plat/fb.h>
41 #include <plat/sdhci.h>
42 #include <plat/ehci.h>
43 #include <plat/clock.h>
44 #include <plat/gpio-cfg.h>
45 #include <plat/iic.h>
46 #include <plat/mfc.h>
47 #include <plat/pd.h>
48
49 #include <mach/map.h>
50
51 /* Following are default values for UCON, ULCON and UFCON UART registers */
52 #define NURI_UCON_DEFAULT       (S3C2410_UCON_TXILEVEL |        \
53                                  S3C2410_UCON_RXILEVEL |        \
54                                  S3C2410_UCON_TXIRQMODE |       \
55                                  S3C2410_UCON_RXIRQMODE |       \
56                                  S3C2410_UCON_RXFIFO_TOI |      \
57                                  S3C2443_UCON_RXERR_IRQEN)
58
59 #define NURI_ULCON_DEFAULT      S3C2410_LCON_CS8
60
61 #define NURI_UFCON_DEFAULT      (S3C2410_UFCON_FIFOMODE |       \
62                                  S5PV210_UFCON_TXTRIG256 |      \
63                                  S5PV210_UFCON_RXTRIG256)
64
65 enum fixed_regulator_id {
66         FIXED_REG_ID_MMC = 0,
67         FIXED_REG_ID_MAX8903,
68 };
69
70 static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = {
71         {
72                 .hwport         = 0,
73                 .ucon           = NURI_UCON_DEFAULT,
74                 .ulcon          = NURI_ULCON_DEFAULT,
75                 .ufcon          = NURI_UFCON_DEFAULT,
76         },
77         {
78                 .hwport         = 1,
79                 .ucon           = NURI_UCON_DEFAULT,
80                 .ulcon          = NURI_ULCON_DEFAULT,
81                 .ufcon          = NURI_UFCON_DEFAULT,
82         },
83         {
84                 .hwport         = 2,
85                 .ucon           = NURI_UCON_DEFAULT,
86                 .ulcon          = NURI_ULCON_DEFAULT,
87                 .ufcon          = NURI_UFCON_DEFAULT,
88         },
89         {
90                 .hwport         = 3,
91                 .ucon           = NURI_UCON_DEFAULT,
92                 .ulcon          = NURI_ULCON_DEFAULT,
93                 .ufcon          = NURI_UFCON_DEFAULT,
94         },
95 };
96
97 /* eMMC */
98 static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = {
99         .max_width              = 8,
100         .host_caps              = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
101                                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
102                                 MMC_CAP_DISABLE | MMC_CAP_ERASE),
103         .cd_type                = S3C_SDHCI_CD_PERMANENT,
104         .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
105 };
106
107 static struct regulator_consumer_supply emmc_supplies[] = {
108         REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
109         REGULATOR_SUPPLY("vmmc", "dw_mmc"),
110 };
111
112 static struct regulator_init_data emmc_fixed_voltage_init_data = {
113         .constraints            = {
114                 .name           = "VMEM_VDD_2.8V",
115                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
116         },
117         .num_consumer_supplies  = ARRAY_SIZE(emmc_supplies),
118         .consumer_supplies      = emmc_supplies,
119 };
120
121 static struct fixed_voltage_config emmc_fixed_voltage_config = {
122         .supply_name            = "MASSMEMORY_EN (inverted)",
123         .microvolts             = 2800000,
124         .gpio                   = EXYNOS4_GPL1(1),
125         .enable_high            = false,
126         .init_data              = &emmc_fixed_voltage_init_data,
127 };
128
129 static struct platform_device emmc_fixed_voltage = {
130         .name                   = "reg-fixed-voltage",
131         .id                     = FIXED_REG_ID_MMC,
132         .dev                    = {
133                 .platform_data  = &emmc_fixed_voltage_config,
134         },
135 };
136
137 /* SD */
138 static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = {
139         .max_width              = 4,
140         .host_caps              = MMC_CAP_4_BIT_DATA |
141                                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
142                                 MMC_CAP_DISABLE,
143         .ext_cd_gpio            = EXYNOS4_GPX3(3),      /* XEINT_27 */
144         .ext_cd_gpio_invert     = 1,
145         .cd_type                = S3C_SDHCI_CD_GPIO,
146         .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
147 };
148
149 /* WLAN */
150 static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = {
151         .max_width              = 4,
152         .host_caps              = MMC_CAP_4_BIT_DATA |
153                                 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
154         .cd_type                = S3C_SDHCI_CD_EXTERNAL,
155         .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
156 };
157
158 static void __init nuri_sdhci_init(void)
159 {
160         s3c_sdhci0_set_platdata(&nuri_hsmmc0_data);
161         s3c_sdhci2_set_platdata(&nuri_hsmmc2_data);
162         s3c_sdhci3_set_platdata(&nuri_hsmmc3_data);
163 }
164
165 /* GPIO KEYS */
166 static struct gpio_keys_button nuri_gpio_keys_tables[] = {
167         {
168                 .code                   = KEY_VOLUMEUP,
169                 .gpio                   = EXYNOS4_GPX2(0),      /* XEINT16 */
170                 .desc                   = "gpio-keys: KEY_VOLUMEUP",
171                 .type                   = EV_KEY,
172                 .active_low             = 1,
173                 .debounce_interval      = 1,
174         }, {
175                 .code                   = KEY_VOLUMEDOWN,
176                 .gpio                   = EXYNOS4_GPX2(1),      /* XEINT17 */
177                 .desc                   = "gpio-keys: KEY_VOLUMEDOWN",
178                 .type                   = EV_KEY,
179                 .active_low             = 1,
180                 .debounce_interval      = 1,
181         }, {
182                 .code                   = KEY_POWER,
183                 .gpio                   = EXYNOS4_GPX2(7),      /* XEINT23 */
184                 .desc                   = "gpio-keys: KEY_POWER",
185                 .type                   = EV_KEY,
186                 .active_low             = 1,
187                 .wakeup                 = 1,
188                 .debounce_interval      = 1,
189         },
190 };
191
192 static struct gpio_keys_platform_data nuri_gpio_keys_data = {
193         .buttons                = nuri_gpio_keys_tables,
194         .nbuttons               = ARRAY_SIZE(nuri_gpio_keys_tables),
195 };
196
197 static struct platform_device nuri_gpio_keys = {
198         .name                   = "gpio-keys",
199         .dev                    = {
200                 .platform_data  = &nuri_gpio_keys_data,
201         },
202 };
203
204 /* Frame Buffer */
205 static struct s3c_fb_pd_win nuri_fb_win0 = {
206         .win_mode = {
207                 .left_margin    = 64,
208                 .right_margin   = 16,
209                 .upper_margin   = 64,
210                 .lower_margin   = 1,
211                 .hsync_len      = 48,
212                 .vsync_len      = 3,
213                 .xres           = 1280,
214                 .yres           = 800,
215                 .refresh        = 60,
216         },
217         .max_bpp        = 24,
218         .default_bpp    = 16,
219         .virtual_x      = 1280,
220         .virtual_y      = 800,
221 };
222
223 static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
224         .win[0]         = &nuri_fb_win0,
225         .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
226                           VIDCON0_CLKSEL_LCD,
227         .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
228         .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
229 };
230
231 static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power)
232 {
233         int gpio = EXYNOS4_GPE1(5);
234
235         gpio_request(gpio, "LVDS_nSHDN");
236         gpio_direction_output(gpio, power);
237         gpio_free(gpio);
238 }
239
240 static int nuri_bl_init(struct device *dev)
241 {
242         int ret, gpio = EXYNOS4_GPE2(3);
243
244         ret = gpio_request(gpio, "LCD_LDO_EN");
245         if (!ret)
246                 gpio_direction_output(gpio, 0);
247
248         return ret;
249 }
250
251 static int nuri_bl_notify(struct device *dev, int brightness)
252 {
253         if (brightness < 1)
254                 brightness = 0;
255
256         gpio_set_value(EXYNOS4_GPE2(3), 1);
257
258         return brightness;
259 }
260
261 static void nuri_bl_exit(struct device *dev)
262 {
263         gpio_free(EXYNOS4_GPE2(3));
264 }
265
266 /* nuri pwm backlight */
267 static struct platform_pwm_backlight_data nuri_backlight_data = {
268         .pwm_id                 = 0,
269         .pwm_period_ns          = 30000,
270         .max_brightness         = 100,
271         .dft_brightness         = 50,
272         .init                   = nuri_bl_init,
273         .notify                 = nuri_bl_notify,
274         .exit                   = nuri_bl_exit,
275 };
276
277 static struct platform_device nuri_backlight_device = {
278         .name                   = "pwm-backlight",
279         .id                     = -1,
280         .dev                    = {
281                 .parent         = &s3c_device_timer[0].dev,
282                 .platform_data  = &nuri_backlight_data,
283         },
284 };
285
286 static struct plat_lcd_data nuri_lcd_platform_data = {
287         .set_power              = nuri_lcd_power_on,
288 };
289
290 static struct platform_device nuri_lcd_device = {
291         .name                   = "platform-lcd",
292         .id                     = -1,
293         .dev                    = {
294                 .platform_data  = &nuri_lcd_platform_data,
295         },
296 };
297
298 /* I2C1 */
299 static struct i2c_board_info i2c1_devs[] __initdata = {
300         /* Gyro, To be updated */
301 };
302
303 /* TSP */
304 static u8 mxt_init_vals[] = {
305         /* MXT_GEN_COMMAND(6) */
306         0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
307         /* MXT_GEN_POWER(7) */
308         0x20, 0xff, 0x32,
309         /* MXT_GEN_ACQUIRE(8) */
310         0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x23,
311         /* MXT_TOUCH_MULTI(9) */
312         0x00, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00,
313         0x00, 0x01, 0x01, 0x0e, 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00,
314         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
315         0x00,
316         /* MXT_TOUCH_KEYARRAY(15) */
317         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
318         0x00,
319         /* MXT_SPT_GPIOPWM(19) */
320         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
321         0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
322         /* MXT_PROCI_GRIPFACE(20) */
323         0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x28, 0x04,
324         0x0f, 0x0a,
325         /* MXT_PROCG_NOISE(22) */
326         0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x23, 0x00,
327         0x00, 0x05, 0x0f, 0x19, 0x23, 0x2d, 0x03,
328         /* MXT_TOUCH_PROXIMITY(23) */
329         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
330         0x00, 0x00, 0x00, 0x00, 0x00,
331         /* MXT_PROCI_ONETOUCH(24) */
332         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
333         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
334         /* MXT_SPT_SELFTEST(25) */
335         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
336         0x00, 0x00, 0x00, 0x00,
337         /* MXT_PROCI_TWOTOUCH(27) */
338         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
339         /* MXT_SPT_CTECONFIG(28) */
340         0x00, 0x00, 0x02, 0x08, 0x10, 0x00,
341 };
342
343 static struct mxt_platform_data mxt_platform_data = {
344         .config                 = mxt_init_vals,
345         .config_length          = ARRAY_SIZE(mxt_init_vals),
346
347         .x_line                 = 18,
348         .y_line                 = 11,
349         .x_size                 = 1024,
350         .y_size                 = 600,
351         .blen                   = 0x1,
352         .threshold              = 0x28,
353         .voltage                = 2800000,              /* 2.8V */
354         .orient                 = MXT_DIAGONAL_COUNTER,
355         .irqflags               = IRQF_TRIGGER_FALLING,
356 };
357
358 static struct s3c2410_platform_i2c i2c3_data __initdata = {
359         .flags          = 0,
360         .bus_num        = 3,
361         .slave_addr     = 0x10,
362         .frequency      = 400 * 1000,
363         .sda_delay      = 100,
364 };
365
366 static struct i2c_board_info i2c3_devs[] __initdata = {
367         {
368                 I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
369                 .platform_data  = &mxt_platform_data,
370                 .irq            = IRQ_EINT(4),
371         },
372 };
373
374 static void __init nuri_tsp_init(void)
375 {
376         int gpio;
377
378         /* TOUCH_INT: XEINT_4 */
379         gpio = EXYNOS4_GPX0(4);
380         gpio_request(gpio, "TOUCH_INT");
381         s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
382         s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
383 }
384
385 static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
386         REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */
387 };
388 static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
389         REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
390 };
391 static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
392         REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
393 };
394 static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
395         REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
396 };
397 static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
398         REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
399 };
400 static struct regulator_consumer_supply __initdata max8997_ldo8_[] = {
401         REGULATOR_SUPPLY("vusb_d", NULL), /* Used by CPU */
402         REGULATOR_SUPPLY("vdac", NULL), /* Used by CPU */
403 };
404 static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
405         REGULATOR_SUPPLY("vcc", "platform-lcd"), /* U804 LVDS */
406 };
407 static struct regulator_consumer_supply __initdata max8997_ldo12_[] = {
408         REGULATOR_SUPPLY("vddio", "6-003c"), /* HDC802 */
409 };
410 static struct regulator_consumer_supply __initdata max8997_ldo13_[] = {
411         REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), /* TFLASH */
412 };
413 static struct regulator_consumer_supply __initdata max8997_ldo14_[] = {
414         REGULATOR_SUPPLY("inmotor", "max8997-haptic"),
415 };
416 static struct regulator_consumer_supply __initdata max8997_ldo15_[] = {
417         REGULATOR_SUPPLY("avdd", "3-004a"), /* Touch Screen */
418 };
419 static struct regulator_consumer_supply __initdata max8997_ldo16_[] = {
420         REGULATOR_SUPPLY("d_sensor", "0-001f"), /* HDC803 */
421 };
422 static struct regulator_consumer_supply __initdata max8997_ldo18_[] = {
423         REGULATOR_SUPPLY("vdd", "3-004a"), /* Touch Screen */
424 };
425 static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
426         REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
427 };
428 static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
429         REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
430 };
431 static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
432         REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
433 };
434 static struct regulator_consumer_supply __initdata max8997_buck4_[] = {
435         REGULATOR_SUPPLY("core", "0-001f"), /* HDC803 */
436 };
437 static struct regulator_consumer_supply __initdata max8997_buck6_[] = {
438         REGULATOR_SUPPLY("dig_28", "0-001f"), /* pin "7" of HDC803 */
439 };
440 static struct regulator_consumer_supply __initdata max8997_esafeout1_[] = {
441         REGULATOR_SUPPLY("usb_vbus", NULL), /* CPU's USB OTG */
442 };
443 static struct regulator_consumer_supply __initdata max8997_esafeout2_[] = {
444         REGULATOR_SUPPLY("usb_vbus", "modemctl"), /* VBUS of Modem */
445 };
446
447 static struct regulator_consumer_supply __initdata max8997_charger_[] = {
448         REGULATOR_SUPPLY("vinchg1", "charger-manager.0"),
449 };
450 static struct regulator_consumer_supply __initdata max8997_chg_toff_[] = {
451         REGULATOR_SUPPLY("vinchg_stop", NULL), /* for jack interrupt handlers */
452 };
453
454 static struct regulator_consumer_supply __initdata max8997_32khz_ap_[] = {
455         REGULATOR_SUPPLY("gps_clk", "bcm4751"),
456         REGULATOR_SUPPLY("bt_clk", "bcm4330-b1"),
457         REGULATOR_SUPPLY("wifi_clk", "bcm433-b1"),
458 };
459
460 static struct regulator_init_data __initdata max8997_ldo1_data = {
461         .constraints    = {
462                 .name           = "VADC_3.3V_C210",
463                 .min_uV         = 3300000,
464                 .max_uV         = 3300000,
465                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
466                 .apply_uV       = 1,
467                 .state_mem      = {
468                         .disabled       = 1,
469                 },
470         },
471         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo1_),
472         .consumer_supplies      = max8997_ldo1_,
473 };
474
475 static struct regulator_init_data __initdata max8997_ldo2_data = {
476         .constraints    = {
477                 .name           = "VALIVE_1.1V_C210",
478                 .min_uV         = 1100000,
479                 .max_uV         = 1100000,
480                 .apply_uV       = 1,
481                 .always_on      = 1,
482                 .state_mem      = {
483                         .enabled        = 1,
484                 },
485         },
486 };
487
488 static struct regulator_init_data __initdata max8997_ldo3_data = {
489         .constraints    = {
490                 .name           = "VUSB_1.1V_C210",
491                 .min_uV         = 1100000,
492                 .max_uV         = 1100000,
493                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
494                 .apply_uV       = 1,
495                 .state_mem      = {
496                         .disabled       = 1,
497                 },
498         },
499         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo3_),
500         .consumer_supplies      = max8997_ldo3_,
501 };
502
503 static struct regulator_init_data __initdata max8997_ldo4_data = {
504         .constraints    = {
505                 .name           = "VMIPI_1.8V",
506                 .min_uV         = 1800000,
507                 .max_uV         = 1800000,
508                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
509                 .apply_uV       = 1,
510                 .state_mem      = {
511                         .disabled       = 1,
512                 },
513         },
514         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo4_),
515         .consumer_supplies      = max8997_ldo4_,
516 };
517
518 static struct regulator_init_data __initdata max8997_ldo5_data = {
519         .constraints    = {
520                 .name           = "VHSIC_1.2V_C210",
521                 .min_uV         = 1200000,
522                 .max_uV         = 1200000,
523                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
524                 .apply_uV       = 1,
525                 .state_mem      = {
526                         .disabled       = 1,
527                 },
528         },
529         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo5_),
530         .consumer_supplies      = max8997_ldo5_,
531 };
532
533 static struct regulator_init_data __initdata max8997_ldo6_data = {
534         .constraints    = {
535                 .name           = "VCC_1.8V_PDA",
536                 .min_uV         = 1800000,
537                 .max_uV         = 1800000,
538                 .apply_uV       = 1,
539                 .always_on      = 1,
540                 .state_mem      = {
541                         .enabled        = 1,
542                 },
543         },
544 };
545
546 static struct regulator_init_data __initdata max8997_ldo7_data = {
547         .constraints    = {
548                 .name           = "CAM_ISP_1.8V",
549                 .min_uV         = 1800000,
550                 .max_uV         = 1800000,
551                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
552                 .apply_uV       = 1,
553                 .state_mem      = {
554                         .disabled       = 1,
555                 },
556         },
557         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo7_),
558         .consumer_supplies      = max8997_ldo7_,
559 };
560
561 static struct regulator_init_data __initdata max8997_ldo8_data = {
562         .constraints    = {
563                 .name           = "VUSB/VDAC_3.3V_C210",
564                 .min_uV         = 3300000,
565                 .max_uV         = 3300000,
566                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
567                 .apply_uV       = 1,
568                 .state_mem      = {
569                         .disabled       = 1,
570                 },
571         },
572         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo8_),
573         .consumer_supplies      = max8997_ldo8_,
574 };
575
576 static struct regulator_init_data __initdata max8997_ldo9_data = {
577         .constraints    = {
578                 .name           = "VCC_2.8V_PDA",
579                 .min_uV         = 2800000,
580                 .max_uV         = 2800000,
581                 .apply_uV       = 1,
582                 .always_on      = 1,
583                 .state_mem      = {
584                         .enabled        = 1,
585                 },
586         },
587 };
588
589 static struct regulator_init_data __initdata max8997_ldo10_data = {
590         .constraints    = {
591                 .name           = "VPLL_1.1V_C210",
592                 .min_uV         = 1100000,
593                 .max_uV         = 1100000,
594                 .apply_uV       = 1,
595                 .always_on      = 1,
596                 .state_mem      = {
597                         .disabled       = 1,
598                 },
599         },
600 };
601
602 static struct regulator_init_data __initdata max8997_ldo11_data = {
603         .constraints    = {
604                 .name           = "LVDS_VDD3.3V",
605                 .min_uV         = 3300000,
606                 .max_uV         = 3300000,
607                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
608                 .apply_uV       = 1,
609                 .boot_on        = 1,
610                 .state_mem      = {
611                         .disabled       = 1,
612                 },
613         },
614         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo11_),
615         .consumer_supplies      = max8997_ldo11_,
616 };
617
618 static struct regulator_init_data __initdata max8997_ldo12_data = {
619         .constraints    = {
620                 .name           = "VT_CAM_1.8V",
621                 .min_uV         = 1800000,
622                 .max_uV         = 1800000,
623                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
624                 .apply_uV       = 1,
625                 .state_mem      = {
626                         .disabled       = 1,
627                 },
628         },
629         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo12_),
630         .consumer_supplies      = max8997_ldo12_,
631 };
632
633 static struct regulator_init_data __initdata max8997_ldo13_data = {
634         .constraints    = {
635                 .name           = "VTF_2.8V",
636                 .min_uV         = 2800000,
637                 .max_uV         = 2800000,
638                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
639                 .apply_uV       = 1,
640                 .state_mem      = {
641                         .disabled       = 1,
642                 },
643         },
644         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo13_),
645         .consumer_supplies      = max8997_ldo13_,
646 };
647
648 static struct regulator_init_data __initdata max8997_ldo14_data = {
649         .constraints    = {
650                 .name           = "VCC_3.0V_MOTOR",
651                 .min_uV         = 3000000,
652                 .max_uV         = 3000000,
653                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
654                 .apply_uV       = 1,
655                 .state_mem      = {
656                         .disabled       = 1,
657                 },
658         },
659         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo14_),
660         .consumer_supplies      = max8997_ldo14_,
661 };
662
663 static struct regulator_init_data __initdata max8997_ldo15_data = {
664         .constraints    = {
665                 .name           = "VTOUCH_ADVV2.8V",
666                 .min_uV         = 2800000,
667                 .max_uV         = 2800000,
668                 .apply_uV       = 1,
669                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
670                 .state_mem      = {
671                         .disabled       = 1,
672                 },
673         },
674         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo15_),
675         .consumer_supplies      = max8997_ldo15_,
676 };
677
678 static struct regulator_init_data __initdata max8997_ldo16_data = {
679         .constraints    = {
680                 .name           = "CAM_SENSOR_IO_1.8V",
681                 .min_uV         = 1800000,
682                 .max_uV         = 1800000,
683                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
684                 .apply_uV       = 1,
685                 .state_mem      = {
686                         .disabled       = 1,
687                 },
688         },
689         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo16_),
690         .consumer_supplies      = max8997_ldo16_,
691 };
692
693 static struct regulator_init_data __initdata max8997_ldo18_data = {
694         .constraints    = {
695                 .name           = "VTOUCH_VDD2.8V",
696                 .min_uV         = 2800000,
697                 .max_uV         = 2800000,
698                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
699                 .apply_uV       = 1,
700                 .state_mem      = {
701                         .disabled       = 1,
702                 },
703         },
704         .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo18_),
705         .consumer_supplies      = max8997_ldo18_,
706 };
707
708 static struct regulator_init_data __initdata max8997_ldo21_data = {
709         .constraints    = {
710                 .name           = "VDDQ_M1M2_1.2V",
711                 .min_uV         = 1200000,
712                 .max_uV         = 1200000,
713                 .apply_uV       = 1,
714                 .always_on      = 1,
715                 .state_mem      = {
716                         .disabled       = 1,
717                 },
718         },
719 };
720
721 static struct regulator_init_data __initdata max8997_buck1_data = {
722         .constraints    = {
723                 .name           = "VARM_1.2V_C210",
724                 .min_uV         = 900000,
725                 .max_uV         = 1350000,
726                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
727                 .always_on      = 1,
728                 .state_mem      = {
729                         .disabled       = 1,
730                 },
731         },
732         .num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
733         .consumer_supplies = max8997_buck1_,
734 };
735
736 static struct regulator_init_data __initdata max8997_buck2_data = {
737         .constraints    = {
738                 .name           = "VINT_1.1V_C210",
739                 .min_uV         = 900000,
740                 .max_uV         = 1100000,
741                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
742                 .always_on      = 1,
743                 .state_mem      = {
744                         .disabled       = 1,
745                 },
746         },
747         .num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
748         .consumer_supplies = max8997_buck2_,
749 };
750
751 static struct regulator_init_data __initdata max8997_buck3_data = {
752         .constraints    = {
753                 .name           = "VG3D_1.1V_C210",
754                 .min_uV         = 900000,
755                 .max_uV         = 1100000,
756                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
757                                   REGULATOR_CHANGE_STATUS,
758                 .state_mem      = {
759                         .disabled       = 1,
760                 },
761         },
762         .num_consumer_supplies = ARRAY_SIZE(max8997_buck3_),
763         .consumer_supplies = max8997_buck3_,
764 };
765
766 static struct regulator_init_data __initdata max8997_buck4_data = {
767         .constraints    = {
768                 .name           = "CAM_ISP_CORE_1.2V",
769                 .min_uV         = 1200000,
770                 .max_uV         = 1200000,
771                 .apply_uV       = 1,
772                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
773                 .state_mem      = {
774                         .disabled       = 1,
775                 },
776         },
777         .num_consumer_supplies = ARRAY_SIZE(max8997_buck4_),
778         .consumer_supplies = max8997_buck4_,
779 };
780
781 static struct regulator_init_data __initdata max8997_buck5_data = {
782         .constraints    = {
783                 .name           = "VMEM_1.2V_C210",
784                 .min_uV         = 1200000,
785                 .max_uV         = 1200000,
786                 .apply_uV       = 1,
787                 .always_on      = 1,
788                 .state_mem      = {
789                         .enabled        = 1,
790                 },
791         },
792 };
793
794 static struct regulator_init_data __initdata max8997_buck6_data = {
795         .constraints    = {
796                 .name           = "CAM_AF_2.8V",
797                 .min_uV         = 2800000,
798                 .max_uV         = 2800000,
799                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
800                 .state_mem      = {
801                         .disabled       = 1,
802                 },
803         },
804         .num_consumer_supplies = ARRAY_SIZE(max8997_buck6_),
805         .consumer_supplies = max8997_buck6_,
806 };
807
808 static struct regulator_init_data __initdata max8997_buck7_data = {
809         .constraints    = {
810                 .name           = "VCC_SUB_2.0V",
811                 .min_uV         = 2000000,
812                 .max_uV         = 2000000,
813                 .apply_uV       = 1,
814                 .always_on      = 1,
815                 .state_mem      = {
816                         .enabled        = 1,
817                 },
818         },
819 };
820
821 static struct regulator_init_data __initdata max8997_32khz_ap_data = {
822         .constraints    = {
823                 .name           = "32KHz AP",
824                 .always_on      = 1,
825                 .state_mem      = {
826                         .enabled        = 1,
827                 },
828         },
829         .num_consumer_supplies = ARRAY_SIZE(max8997_32khz_ap_),
830         .consumer_supplies = max8997_32khz_ap_,
831 };
832
833 static struct regulator_init_data __initdata max8997_32khz_cp_data = {
834         .constraints    = {
835                 .name           = "32KHz CP",
836                 .state_mem      = {
837                         .disabled       = 1,
838                 },
839         },
840 };
841
842 static struct regulator_init_data __initdata max8997_vichg_data = {
843         .constraints    = {
844                 .name           = "VICHG",
845                 .state_mem      = {
846                         .disabled       = 1,
847                 },
848         },
849 };
850
851 static struct regulator_init_data __initdata max8997_esafeout1_data = {
852         .constraints    = {
853                 .name           = "SAFEOUT1",
854                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
855                 .state_mem      = {
856                         .disabled       = 1,
857                 },
858         },
859         .num_consumer_supplies  = ARRAY_SIZE(max8997_esafeout1_),
860         .consumer_supplies      = max8997_esafeout1_,
861 };
862
863 static struct regulator_init_data __initdata max8997_esafeout2_data = {
864         .constraints    = {
865                 .name           = "SAFEOUT2",
866                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
867                 .state_mem      = {
868                         .disabled       = 1,
869                 },
870         },
871         .num_consumer_supplies  = ARRAY_SIZE(max8997_esafeout2_),
872         .consumer_supplies      = max8997_esafeout2_,
873 };
874
875 static struct regulator_init_data __initdata max8997_charger_cv_data = {
876         .constraints    = {
877                 .name           = "CHARGER_CV",
878                 .min_uV         = 4200000,
879                 .max_uV         = 4200000,
880                 .apply_uV       = 1,
881         },
882 };
883
884 static struct regulator_init_data __initdata max8997_charger_data = {
885         .constraints    = {
886                 .name           = "CHARGER",
887                 .min_uA         = 200000,
888                 .max_uA         = 950000,
889                 .boot_on        = 1,
890                 .valid_ops_mask = REGULATOR_CHANGE_STATUS |
891                                 REGULATOR_CHANGE_CURRENT,
892         },
893         .num_consumer_supplies  = ARRAY_SIZE(max8997_charger_),
894         .consumer_supplies      = max8997_charger_,
895 };
896
897 static struct regulator_init_data __initdata max8997_charger_topoff_data = {
898         .constraints    = {
899                 .name           = "CHARGER TOPOFF",
900                 .min_uA         = 50000,
901                 .max_uA         = 200000,
902                 .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
903         },
904         .num_consumer_supplies  = ARRAY_SIZE(max8997_chg_toff_),
905         .consumer_supplies      = max8997_chg_toff_,
906 };
907
908 static struct max8997_regulator_data __initdata nuri_max8997_regulators[] = {
909         { MAX8997_LDO1, &max8997_ldo1_data },
910         { MAX8997_LDO2, &max8997_ldo2_data },
911         { MAX8997_LDO3, &max8997_ldo3_data },
912         { MAX8997_LDO4, &max8997_ldo4_data },
913         { MAX8997_LDO5, &max8997_ldo5_data },
914         { MAX8997_LDO6, &max8997_ldo6_data },
915         { MAX8997_LDO7, &max8997_ldo7_data },
916         { MAX8997_LDO8, &max8997_ldo8_data },
917         { MAX8997_LDO9, &max8997_ldo9_data },
918         { MAX8997_LDO10, &max8997_ldo10_data },
919         { MAX8997_LDO11, &max8997_ldo11_data },
920         { MAX8997_LDO12, &max8997_ldo12_data },
921         { MAX8997_LDO13, &max8997_ldo13_data },
922         { MAX8997_LDO14, &max8997_ldo14_data },
923         { MAX8997_LDO15, &max8997_ldo15_data },
924         { MAX8997_LDO16, &max8997_ldo16_data },
925
926         { MAX8997_LDO18, &max8997_ldo18_data },
927         { MAX8997_LDO21, &max8997_ldo21_data },
928
929         { MAX8997_BUCK1, &max8997_buck1_data },
930         { MAX8997_BUCK2, &max8997_buck2_data },
931         { MAX8997_BUCK3, &max8997_buck3_data },
932         { MAX8997_BUCK4, &max8997_buck4_data },
933         { MAX8997_BUCK5, &max8997_buck5_data },
934         { MAX8997_BUCK6, &max8997_buck6_data },
935         { MAX8997_BUCK7, &max8997_buck7_data },
936
937         { MAX8997_EN32KHZ_AP, &max8997_32khz_ap_data },
938         { MAX8997_EN32KHZ_CP, &max8997_32khz_cp_data },
939
940         { MAX8997_ENVICHG, &max8997_vichg_data },
941         { MAX8997_ESAFEOUT1, &max8997_esafeout1_data },
942         { MAX8997_ESAFEOUT2, &max8997_esafeout2_data },
943         { MAX8997_CHARGER_CV, &max8997_charger_cv_data },
944         { MAX8997_CHARGER, &max8997_charger_data },
945         { MAX8997_CHARGER_TOPOFF, &max8997_charger_topoff_data },
946 };
947
948 static struct max8997_platform_data __initdata nuri_max8997_pdata = {
949         .wakeup                 = 1,
950
951         .num_regulators         = ARRAY_SIZE(nuri_max8997_regulators),
952         .regulators             = nuri_max8997_regulators,
953
954         .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
955         .buck2_gpiodvs = true,
956
957         .buck1_voltage[0] = 1350000, /* 1.35V */
958         .buck1_voltage[1] = 1300000, /* 1.3V */
959         .buck1_voltage[2] = 1250000, /* 1.25V */
960         .buck1_voltage[3] = 1200000, /* 1.2V */
961         .buck1_voltage[4] = 1150000, /* 1.15V */
962         .buck1_voltage[5] = 1100000, /* 1.1V */
963         .buck1_voltage[6] = 1000000, /* 1.0V */
964         .buck1_voltage[7] = 950000, /* 0.95V */
965
966         .buck2_voltage[0] = 1100000, /* 1.1V */
967         .buck2_voltage[1] = 1000000, /* 1.0V */
968         .buck2_voltage[2] = 950000, /* 0.95V */
969         .buck2_voltage[3] = 900000, /* 0.9V */
970         .buck2_voltage[4] = 1100000, /* 1.1V */
971         .buck2_voltage[5] = 1000000, /* 1.0V */
972         .buck2_voltage[6] = 950000, /* 0.95V */
973         .buck2_voltage[7] = 900000, /* 0.9V */
974
975         .buck5_voltage[0] = 1200000, /* 1.2V */
976         .buck5_voltage[1] = 1200000, /* 1.2V */
977         .buck5_voltage[2] = 1200000, /* 1.2V */
978         .buck5_voltage[3] = 1200000, /* 1.2V */
979         .buck5_voltage[4] = 1200000, /* 1.2V */
980         .buck5_voltage[5] = 1200000, /* 1.2V */
981         .buck5_voltage[6] = 1200000, /* 1.2V */
982         .buck5_voltage[7] = 1200000, /* 1.2V */
983 };
984
985 /* GPIO I2C 5 (PMIC) */
986 enum { I2C5_MAX8997 };
987 static struct i2c_board_info i2c5_devs[] __initdata = {
988         [I2C5_MAX8997] = {
989                 I2C_BOARD_INFO("max8997", 0xCC >> 1),
990                 .platform_data  = &nuri_max8997_pdata,
991         },
992 };
993
994 static struct max17042_platform_data nuri_battery_platform_data = {
995 };
996
997 /* GPIO I2C 9 (Fuel Gauge) */
998 static struct i2c_gpio_platform_data i2c9_gpio_data = {
999         .sda_pin                = EXYNOS4_GPY4(0),      /* XM0ADDR_8 */
1000         .scl_pin                = EXYNOS4_GPY4(1),      /* XM0ADDR_9 */
1001 };
1002 static struct platform_device i2c9_gpio = {
1003         .name                   = "i2c-gpio",
1004         .id                     = 9,
1005         .dev                    = {
1006                 .platform_data  = &i2c9_gpio_data,
1007         },
1008 };
1009 enum { I2C9_MAX17042};
1010 static struct i2c_board_info i2c9_devs[] __initdata = {
1011         [I2C9_MAX17042] = {
1012                 I2C_BOARD_INFO("max17042", 0x36),
1013                 .platform_data = &nuri_battery_platform_data,
1014         },
1015 };
1016
1017 /* MAX8903 Secondary Charger */
1018 static struct regulator_consumer_supply supplies_max8903[] = {
1019         REGULATOR_SUPPLY("vinchg2", "charger-manager.0"),
1020 };
1021
1022 static struct regulator_init_data max8903_charger_en_data = {
1023         .constraints = {
1024                 .name           = "VOUT_CHARGER",
1025                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
1026                 .boot_on        = 1,
1027         },
1028         .num_consumer_supplies = ARRAY_SIZE(supplies_max8903),
1029         .consumer_supplies = supplies_max8903,
1030 };
1031
1032 static struct fixed_voltage_config max8903_charger_en = {
1033         .supply_name = "VOUT_CHARGER",
1034         .microvolts = 5000000, /* Assume 5VDC */
1035         .gpio = EXYNOS4_GPY4(5), /* TA_EN negaged */
1036         .enable_high = 0, /* Enable = Low */
1037         .enabled_at_boot = 1,
1038         .init_data = &max8903_charger_en_data,
1039 };
1040
1041 static struct platform_device max8903_fixed_reg_dev = {
1042         .name = "reg-fixed-voltage",
1043         .id = FIXED_REG_ID_MAX8903,
1044         .dev = { .platform_data = &max8903_charger_en },
1045 };
1046
1047 static struct max8903_pdata nuri_max8903 = {
1048         /*
1049          * cen: don't control with the driver, let it be
1050          * controlled by regulator above
1051          */
1052         .dok = EXYNOS4_GPX1(4), /* TA_nCONNECTED */
1053         /* uok, usus: not connected */
1054         .chg = EXYNOS4_GPE2(0), /* TA_nCHG */
1055         /* flt: vcc_1.8V_pda */
1056         .dcm = EXYNOS4_GPL0(1), /* CURR_ADJ */
1057
1058         .dc_valid = true,
1059         .usb_valid = false, /* USB is not wired to MAX8903 */
1060 };
1061
1062 static struct platform_device nuri_max8903_device = {
1063         .name                   = "max8903-charger",
1064         .dev                    = {
1065                 .platform_data  = &nuri_max8903,
1066         },
1067 };
1068
1069 static struct device *nuri_cm_devices[] = {
1070         &s3c_device_i2c5.dev,
1071         &s3c_device_adc.dev,
1072         NULL, /* Reserved for UART */
1073         NULL,
1074 };
1075
1076 static void __init nuri_power_init(void)
1077 {
1078         int gpio;
1079         int irq_base = IRQ_GPIO_END + 1;
1080         int ta_en = 0;
1081
1082         nuri_max8997_pdata.irq_base = irq_base;
1083         irq_base += MAX8997_IRQ_NR;
1084
1085         gpio = EXYNOS4_GPX0(7);
1086         gpio_request(gpio, "AP_PMIC_IRQ");
1087         s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
1088         s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
1089
1090         gpio = EXYNOS4_GPX2(3);
1091         gpio_request(gpio, "FUEL_ALERT");
1092         s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
1093         s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
1094
1095         gpio = nuri_max8903.dok;
1096         gpio_request(gpio, "TA_nCONNECTED");
1097         s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
1098         s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
1099         ta_en = gpio_get_value(gpio) ? 0 : 1;
1100
1101         gpio = nuri_max8903.chg;
1102         gpio_request(gpio, "TA_nCHG");
1103         gpio_direction_input(gpio);
1104
1105         gpio = nuri_max8903.dcm;
1106         gpio_request(gpio, "CURR_ADJ");
1107         gpio_direction_output(gpio, ta_en);
1108 }
1109
1110 /* USB EHCI */
1111 static struct s5p_ehci_platdata nuri_ehci_pdata;
1112
1113 static void __init nuri_ehci_init(void)
1114 {
1115         struct s5p_ehci_platdata *pdata = &nuri_ehci_pdata;
1116
1117         s5p_ehci_set_platdata(pdata);
1118 }
1119
1120 static struct platform_device *nuri_devices[] __initdata = {
1121         /* Samsung Platform Devices */
1122         &s3c_device_i2c5, /* PMIC should initialize first */
1123         &emmc_fixed_voltage,
1124         &s5p_device_fimd0,
1125         &s3c_device_hsmmc0,
1126         &s3c_device_hsmmc2,
1127         &s3c_device_hsmmc3,
1128         &s3c_device_wdt,
1129         &s3c_device_timer[0],
1130         &s5p_device_ehci,
1131         &s3c_device_i2c3,
1132         &i2c9_gpio,
1133         &s3c_device_adc,
1134         &s3c_device_rtc,
1135         &s5p_device_mfc,
1136         &s5p_device_mfc_l,
1137         &s5p_device_mfc_r,
1138         &exynos4_device_pd[PD_MFC],
1139         &exynos4_device_pd[PD_LCD0],
1140
1141         /* NURI Devices */
1142         &nuri_gpio_keys,
1143         &nuri_lcd_device,
1144         &nuri_backlight_device,
1145         &max8903_fixed_reg_dev,
1146         &nuri_max8903_device,
1147 };
1148
1149 static void __init nuri_map_io(void)
1150 {
1151         s5p_init_io(NULL, 0, S5P_VA_CHIPID);
1152         s3c24xx_init_clocks(24000000);
1153         s3c24xx_init_uarts(nuri_uartcfgs, ARRAY_SIZE(nuri_uartcfgs));
1154 }
1155
1156 static void __init nuri_reserve(void)
1157 {
1158         s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
1159 }
1160
1161 static void __init nuri_machine_init(void)
1162 {
1163         nuri_sdhci_init();
1164         nuri_tsp_init();
1165         nuri_power_init();
1166
1167         i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
1168         s3c_i2c3_set_platdata(&i2c3_data);
1169         i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
1170         s3c_i2c5_set_platdata(NULL);
1171         i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
1172         i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
1173         i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
1174         i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
1175
1176         s5p_fimd0_set_platdata(&nuri_fb_pdata);
1177
1178         nuri_ehci_init();
1179         clk_xusbxti.rate = 24000000;
1180
1181         /* Last */
1182         platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
1183         s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
1184         s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
1185 }
1186
1187 MACHINE_START(NURI, "NURI")
1188         /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
1189         .atag_offset    = 0x100,
1190         .init_irq       = exynos4_init_irq,
1191         .map_io         = nuri_map_io,
1192         .init_machine   = nuri_machine_init,
1193         .timer          = &exynos4_timer,
1194         .reserve        = &nuri_reserve,
1195 MACHINE_END