]> git.karo-electronics.de Git - mv-sheeva.git/blob - arch/arm/mach-exynos/mach-origen.c
Merge branch 'depends/rmk/restart' into next/cleanup
[mv-sheeva.git] / arch / arm / mach-exynos / mach-origen.c
1 /* linux/arch/arm/mach-exynos4/mach-origen.c
2  *
3  * Copyright (c) 2011 Insignal Co., Ltd.
4  *              http://www.insignal.co.kr/
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/serial_core.h>
12 #include <linux/gpio.h>
13 #include <linux/mmc/host.h>
14 #include <linux/platform_device.h>
15 #include <linux/io.h>
16 #include <linux/input.h>
17 #include <linux/pwm_backlight.h>
18 #include <linux/gpio_keys.h>
19 #include <linux/i2c.h>
20 #include <linux/regulator/machine.h>
21 #include <linux/mfd/max8997.h>
22 #include <linux/lcd.h>
23
24 #include <asm/mach/arch.h>
25 #include <asm/hardware/gic.h>
26 #include <asm/mach-types.h>
27
28 #include <video/platform_lcd.h>
29
30 #include <plat/regs-serial.h>
31 #include <plat/regs-fb-v4.h>
32 #include <plat/cpu.h>
33 #include <plat/devs.h>
34 #include <plat/sdhci.h>
35 #include <plat/iic.h>
36 #include <plat/ehci.h>
37 #include <plat/clock.h>
38 #include <plat/gpio-cfg.h>
39 #include <plat/backlight.h>
40 #include <plat/pd.h>
41 #include <plat/fb.h>
42 #include <plat/mfc.h>
43
44 #include <mach/map.h>
45
46 #include "common.h"
47
48 /* Following are default values for UCON, ULCON and UFCON UART registers */
49 #define ORIGEN_UCON_DEFAULT     (S3C2410_UCON_TXILEVEL |        \
50                                  S3C2410_UCON_RXILEVEL |        \
51                                  S3C2410_UCON_TXIRQMODE |       \
52                                  S3C2410_UCON_RXIRQMODE |       \
53                                  S3C2410_UCON_RXFIFO_TOI |      \
54                                  S3C2443_UCON_RXERR_IRQEN)
55
56 #define ORIGEN_ULCON_DEFAULT    S3C2410_LCON_CS8
57
58 #define ORIGEN_UFCON_DEFAULT    (S3C2410_UFCON_FIFOMODE |       \
59                                  S5PV210_UFCON_TXTRIG4 |        \
60                                  S5PV210_UFCON_RXTRIG4)
61
62 static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = {
63         [0] = {
64                 .hwport         = 0,
65                 .flags          = 0,
66                 .ucon           = ORIGEN_UCON_DEFAULT,
67                 .ulcon          = ORIGEN_ULCON_DEFAULT,
68                 .ufcon          = ORIGEN_UFCON_DEFAULT,
69         },
70         [1] = {
71                 .hwport         = 1,
72                 .flags          = 0,
73                 .ucon           = ORIGEN_UCON_DEFAULT,
74                 .ulcon          = ORIGEN_ULCON_DEFAULT,
75                 .ufcon          = ORIGEN_UFCON_DEFAULT,
76         },
77         [2] = {
78                 .hwport         = 2,
79                 .flags          = 0,
80                 .ucon           = ORIGEN_UCON_DEFAULT,
81                 .ulcon          = ORIGEN_ULCON_DEFAULT,
82                 .ufcon          = ORIGEN_UFCON_DEFAULT,
83         },
84         [3] = {
85                 .hwport         = 3,
86                 .flags          = 0,
87                 .ucon           = ORIGEN_UCON_DEFAULT,
88                 .ulcon          = ORIGEN_ULCON_DEFAULT,
89                 .ufcon          = ORIGEN_UFCON_DEFAULT,
90         },
91 };
92
93 static struct regulator_consumer_supply __initdata ldo3_consumer[] = {
94         REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
95         REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
96         REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
97 };
98 static struct regulator_consumer_supply __initdata ldo6_consumer[] = {
99         REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
100 };
101 static struct regulator_consumer_supply __initdata ldo7_consumer[] = {
102         REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */
103 };
104 static struct regulator_consumer_supply __initdata ldo8_consumer[] = {
105         REGULATOR_SUPPLY("vdd", "s5p-adc"), /* ADC */
106         REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), /* HDMI */
107 };
108 static struct regulator_consumer_supply __initdata ldo9_consumer[] = {
109         REGULATOR_SUPPLY("dvdd", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
110 };
111 static struct regulator_consumer_supply __initdata ldo11_consumer[] = {
112         REGULATOR_SUPPLY("dvdd", "alc5625"), /* Realtek ALC5625 */
113 };
114 static struct regulator_consumer_supply __initdata ldo14_consumer[] = {
115         REGULATOR_SUPPLY("avdd18", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
116 };
117 static struct regulator_consumer_supply __initdata ldo17_consumer[] = {
118         REGULATOR_SUPPLY("vdd33", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */
119 };
120 static struct regulator_consumer_supply __initdata buck1_consumer[] = {
121         REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
122 };
123 static struct regulator_consumer_supply __initdata buck2_consumer[] = {
124         REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
125 };
126 static struct regulator_consumer_supply __initdata buck3_consumer[] = {
127         REGULATOR_SUPPLY("vdd_g3d", "mali_drm"), /* G3D */
128 };
129 static struct regulator_consumer_supply __initdata buck7_consumer[] = {
130         REGULATOR_SUPPLY("vcc", "platform-lcd"), /* LCD */
131 };
132
133 static struct regulator_init_data __initdata max8997_ldo1_data = {
134         .constraints    = {
135                 .name           = "VDD_ABB_3.3V",
136                 .min_uV         = 3300000,
137                 .max_uV         = 3300000,
138                 .apply_uV       = 1,
139                 .state_mem      = {
140                         .disabled       = 1,
141                 },
142         },
143 };
144
145 static struct regulator_init_data __initdata max8997_ldo2_data  = {
146         .constraints    = {
147                 .name           = "VDD_ALIVE_1.1V",
148                 .min_uV         = 1100000,
149                 .max_uV         = 1100000,
150                 .apply_uV       = 1,
151                 .always_on      = 1,
152                 .state_mem      = {
153                         .enabled        = 1,
154                 },
155         },
156 };
157
158 static struct regulator_init_data __initdata max8997_ldo3_data = {
159         .constraints    = {
160                 .name           = "VMIPI_1.1V",
161                 .min_uV         = 1100000,
162                 .max_uV         = 1100000,
163                 .apply_uV       = 1,
164                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
165                 .state_mem      = {
166                         .disabled       = 1,
167                 },
168         },
169         .num_consumer_supplies  = ARRAY_SIZE(ldo3_consumer),
170         .consumer_supplies      = ldo3_consumer,
171 };
172
173 static struct regulator_init_data __initdata max8997_ldo4_data = {
174         .constraints    = {
175                 .name           = "VDD_RTC_1.8V",
176                 .min_uV         = 1800000,
177                 .max_uV         = 1800000,
178                 .apply_uV       = 1,
179                 .always_on      = 1,
180                 .state_mem      = {
181                         .disabled       = 1,
182                 },
183         },
184 };
185
186 static struct regulator_init_data __initdata max8997_ldo6_data = {
187         .constraints    = {
188                 .name           = "VMIPI_1.8V",
189                 .min_uV         = 1800000,
190                 .max_uV         = 1800000,
191                 .apply_uV       = 1,
192                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
193                 .state_mem      = {
194                         .disabled       = 1,
195                 },
196         },
197         .num_consumer_supplies  = ARRAY_SIZE(ldo6_consumer),
198         .consumer_supplies      = ldo6_consumer,
199 };
200
201 static struct regulator_init_data __initdata max8997_ldo7_data = {
202         .constraints    = {
203                 .name           = "VDD_AUD_1.8V",
204                 .min_uV         = 1800000,
205                 .max_uV         = 1800000,
206                 .apply_uV       = 1,
207                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
208                 .state_mem      = {
209                         .disabled       = 1,
210                 },
211         },
212         .num_consumer_supplies  = ARRAY_SIZE(ldo7_consumer),
213         .consumer_supplies      = ldo7_consumer,
214 };
215
216 static struct regulator_init_data __initdata max8997_ldo8_data = {
217         .constraints    = {
218                 .name           = "VADC_3.3V",
219                 .min_uV         = 3300000,
220                 .max_uV         = 3300000,
221                 .apply_uV       = 1,
222                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
223                 .state_mem      = {
224                         .disabled       = 1,
225                 },
226         },
227         .num_consumer_supplies  = ARRAY_SIZE(ldo8_consumer),
228         .consumer_supplies      = ldo8_consumer,
229 };
230
231 static struct regulator_init_data __initdata max8997_ldo9_data = {
232         .constraints    = {
233                 .name           = "DVDD_SWB_2.8V",
234                 .min_uV         = 2800000,
235                 .max_uV         = 2800000,
236                 .apply_uV       = 1,
237                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
238                 .state_mem      = {
239                         .disabled       = 1,
240                 },
241         },
242         .num_consumer_supplies  = ARRAY_SIZE(ldo9_consumer),
243         .consumer_supplies      = ldo9_consumer,
244 };
245
246 static struct regulator_init_data __initdata max8997_ldo10_data = {
247         .constraints    = {
248                 .name           = "VDD_PLL_1.1V",
249                 .min_uV         = 1100000,
250                 .max_uV         = 1100000,
251                 .apply_uV       = 1,
252                 .always_on      = 1,
253                 .state_mem      = {
254                         .disabled       = 1,
255                 },
256         },
257 };
258
259 static struct regulator_init_data __initdata max8997_ldo11_data = {
260         .constraints    = {
261                 .name           = "VDD_AUD_3V",
262                 .min_uV         = 3000000,
263                 .max_uV         = 3000000,
264                 .apply_uV       = 1,
265                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
266                 .state_mem      = {
267                         .disabled       = 1,
268                 },
269         },
270         .num_consumer_supplies  = ARRAY_SIZE(ldo11_consumer),
271         .consumer_supplies      = ldo11_consumer,
272 };
273
274 static struct regulator_init_data __initdata max8997_ldo14_data = {
275         .constraints    = {
276                 .name           = "AVDD18_SWB_1.8V",
277                 .min_uV         = 1800000,
278                 .max_uV         = 1800000,
279                 .apply_uV       = 1,
280                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
281                 .state_mem      = {
282                         .disabled       = 1,
283                 },
284         },
285         .num_consumer_supplies  = ARRAY_SIZE(ldo14_consumer),
286         .consumer_supplies      = ldo14_consumer,
287 };
288
289 static struct regulator_init_data __initdata max8997_ldo17_data = {
290         .constraints    = {
291                 .name           = "VDD_SWB_3.3V",
292                 .min_uV         = 3300000,
293                 .max_uV         = 3300000,
294                 .apply_uV       = 1,
295                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
296                 .state_mem      = {
297                         .disabled       = 1,
298                 },
299         },
300         .num_consumer_supplies  = ARRAY_SIZE(ldo17_consumer),
301         .consumer_supplies      = ldo17_consumer,
302 };
303
304 static struct regulator_init_data __initdata max8997_ldo21_data = {
305         .constraints    = {
306                 .name           = "VDD_MIF_1.2V",
307                 .min_uV         = 1200000,
308                 .max_uV         = 1200000,
309                 .apply_uV       = 1,
310                 .always_on      = 1,
311                 .state_mem      = {
312                         .disabled       = 1,
313                 },
314         },
315 };
316
317 static struct regulator_init_data __initdata max8997_buck1_data = {
318         .constraints    = {
319                 .name           = "VDD_ARM_1.2V",
320                 .min_uV         = 950000,
321                 .max_uV         = 1350000,
322                 .always_on      = 1,
323                 .boot_on        = 1,
324                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
325                 .state_mem      = {
326                         .disabled       = 1,
327                 },
328         },
329         .num_consumer_supplies  = ARRAY_SIZE(buck1_consumer),
330         .consumer_supplies      = buck1_consumer,
331 };
332
333 static struct regulator_init_data __initdata max8997_buck2_data = {
334         .constraints    = {
335                 .name           = "VDD_INT_1.1V",
336                 .min_uV         = 900000,
337                 .max_uV         = 1100000,
338                 .always_on      = 1,
339                 .boot_on        = 1,
340                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
341                 .state_mem      = {
342                         .disabled       = 1,
343                 },
344         },
345         .num_consumer_supplies  = ARRAY_SIZE(buck2_consumer),
346         .consumer_supplies      = buck2_consumer,
347 };
348
349 static struct regulator_init_data __initdata max8997_buck3_data = {
350         .constraints    = {
351                 .name           = "VDD_G3D_1.1V",
352                 .min_uV         = 900000,
353                 .max_uV         = 1100000,
354                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
355                                         REGULATOR_CHANGE_STATUS,
356                 .state_mem      = {
357                         .disabled       = 1,
358                 },
359         },
360         .num_consumer_supplies  = ARRAY_SIZE(buck3_consumer),
361         .consumer_supplies      = buck3_consumer,
362 };
363
364 static struct regulator_init_data __initdata max8997_buck5_data = {
365         .constraints    = {
366                 .name           = "VDDQ_M1M2_1.2V",
367                 .min_uV         = 1200000,
368                 .max_uV         = 1200000,
369                 .apply_uV       = 1,
370                 .always_on      = 1,
371                 .state_mem      = {
372                         .disabled       = 1,
373                 },
374         },
375 };
376
377 static struct regulator_init_data __initdata max8997_buck7_data = {
378         .constraints    = {
379                 .name           = "VDD_LCD_3.3V",
380                 .min_uV         = 3300000,
381                 .max_uV         = 3300000,
382                 .boot_on        = 1,
383                 .apply_uV       = 1,
384                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
385                 .state_mem      = {
386                         .disabled       = 1
387                 },
388         },
389         .num_consumer_supplies  = ARRAY_SIZE(buck7_consumer),
390         .consumer_supplies      = buck7_consumer,
391 };
392
393 static struct max8997_regulator_data __initdata origen_max8997_regulators[] = {
394         { MAX8997_LDO1,         &max8997_ldo1_data },
395         { MAX8997_LDO2,         &max8997_ldo2_data },
396         { MAX8997_LDO3,         &max8997_ldo3_data },
397         { MAX8997_LDO4,         &max8997_ldo4_data },
398         { MAX8997_LDO6,         &max8997_ldo6_data },
399         { MAX8997_LDO7,         &max8997_ldo7_data },
400         { MAX8997_LDO8,         &max8997_ldo8_data },
401         { MAX8997_LDO9,         &max8997_ldo9_data },
402         { MAX8997_LDO10,        &max8997_ldo10_data },
403         { MAX8997_LDO11,        &max8997_ldo11_data },
404         { MAX8997_LDO14,        &max8997_ldo14_data },
405         { MAX8997_LDO17,        &max8997_ldo17_data },
406         { MAX8997_LDO21,        &max8997_ldo21_data },
407         { MAX8997_BUCK1,        &max8997_buck1_data },
408         { MAX8997_BUCK2,        &max8997_buck2_data },
409         { MAX8997_BUCK3,        &max8997_buck3_data },
410         { MAX8997_BUCK5,        &max8997_buck5_data },
411         { MAX8997_BUCK7,        &max8997_buck7_data },
412 };
413
414 struct max8997_platform_data __initdata origen_max8997_pdata = {
415         .num_regulators = ARRAY_SIZE(origen_max8997_regulators),
416         .regulators     = origen_max8997_regulators,
417
418         .wakeup = true,
419         .buck1_gpiodvs  = false,
420         .buck2_gpiodvs  = false,
421         .buck5_gpiodvs  = false,
422         .irq_base       = IRQ_GPIO_END + 1,
423
424         .ignore_gpiodvs_side_effect = true,
425         .buck125_default_idx = 0x0,
426
427         .buck125_gpios[0]       = EXYNOS4_GPX0(0),
428         .buck125_gpios[1]       = EXYNOS4_GPX0(1),
429         .buck125_gpios[2]       = EXYNOS4_GPX0(2),
430
431         .buck1_voltage[0]       = 1350000,
432         .buck1_voltage[1]       = 1300000,
433         .buck1_voltage[2]       = 1250000,
434         .buck1_voltage[3]       = 1200000,
435         .buck1_voltage[4]       = 1150000,
436         .buck1_voltage[5]       = 1100000,
437         .buck1_voltage[6]       = 1000000,
438         .buck1_voltage[7]       = 950000,
439
440         .buck2_voltage[0]       = 1100000,
441         .buck2_voltage[1]       = 1100000,
442         .buck2_voltage[2]       = 1100000,
443         .buck2_voltage[3]       = 1100000,
444         .buck2_voltage[4]       = 1000000,
445         .buck2_voltage[5]       = 1000000,
446         .buck2_voltage[6]       = 1000000,
447         .buck2_voltage[7]       = 1000000,
448
449         .buck5_voltage[0]       = 1200000,
450         .buck5_voltage[1]       = 1200000,
451         .buck5_voltage[2]       = 1200000,
452         .buck5_voltage[3]       = 1200000,
453         .buck5_voltage[4]       = 1200000,
454         .buck5_voltage[5]       = 1200000,
455         .buck5_voltage[6]       = 1200000,
456         .buck5_voltage[7]       = 1200000,
457 };
458
459 /* I2C0 */
460 static struct i2c_board_info i2c0_devs[] __initdata = {
461         {
462                 I2C_BOARD_INFO("max8997", (0xCC >> 1)),
463                 .platform_data  = &origen_max8997_pdata,
464                 .irq            = IRQ_EINT(4),
465         },
466 };
467
468 static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
469         .cd_type                = S3C_SDHCI_CD_INTERNAL,
470         .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
471 };
472
473 static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
474         .cd_type                = S3C_SDHCI_CD_INTERNAL,
475         .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
476 };
477
478 /* USB EHCI */
479 static struct s5p_ehci_platdata origen_ehci_pdata;
480
481 static void __init origen_ehci_init(void)
482 {
483         struct s5p_ehci_platdata *pdata = &origen_ehci_pdata;
484
485         s5p_ehci_set_platdata(pdata);
486 }
487
488 static struct gpio_keys_button origen_gpio_keys_table[] = {
489         {
490                 .code                   = KEY_MENU,
491                 .gpio                   = EXYNOS4_GPX1(5),
492                 .desc                   = "gpio-keys: KEY_MENU",
493                 .type                   = EV_KEY,
494                 .active_low             = 1,
495                 .wakeup                 = 1,
496                 .debounce_interval      = 1,
497         }, {
498                 .code                   = KEY_HOME,
499                 .gpio                   = EXYNOS4_GPX1(6),
500                 .desc                   = "gpio-keys: KEY_HOME",
501                 .type                   = EV_KEY,
502                 .active_low             = 1,
503                 .wakeup                 = 1,
504                 .debounce_interval      = 1,
505         }, {
506                 .code                   = KEY_BACK,
507                 .gpio                   = EXYNOS4_GPX1(7),
508                 .desc                   = "gpio-keys: KEY_BACK",
509                 .type                   = EV_KEY,
510                 .active_low             = 1,
511                 .wakeup                 = 1,
512                 .debounce_interval      = 1,
513         }, {
514                 .code                   = KEY_UP,
515                 .gpio                   = EXYNOS4_GPX2(0),
516                 .desc                   = "gpio-keys: KEY_UP",
517                 .type                   = EV_KEY,
518                 .active_low             = 1,
519                 .wakeup                 = 1,
520                 .debounce_interval      = 1,
521         }, {
522                 .code                   = KEY_DOWN,
523                 .gpio                   = EXYNOS4_GPX2(1),
524                 .desc                   = "gpio-keys: KEY_DOWN",
525                 .type                   = EV_KEY,
526                 .active_low             = 1,
527                 .wakeup                 = 1,
528                 .debounce_interval      = 1,
529         },
530 };
531
532 static struct gpio_keys_platform_data origen_gpio_keys_data = {
533         .buttons        = origen_gpio_keys_table,
534         .nbuttons       = ARRAY_SIZE(origen_gpio_keys_table),
535 };
536
537 static struct platform_device origen_device_gpiokeys = {
538         .name           = "gpio-keys",
539         .dev            = {
540                 .platform_data  = &origen_gpio_keys_data,
541         },
542 };
543
544 static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int power)
545 {
546         int ret;
547
548         if (power)
549                 ret = gpio_request_one(EXYNOS4_GPE3(4),
550                                         GPIOF_OUT_INIT_HIGH, "GPE3_4");
551         else
552                 ret = gpio_request_one(EXYNOS4_GPE3(4),
553                                         GPIOF_OUT_INIT_LOW, "GPE3_4");
554
555         gpio_free(EXYNOS4_GPE3(4));
556
557         if (ret)
558                 pr_err("failed to request gpio for LCD power: %d\n", ret);
559 }
560
561 static struct plat_lcd_data origen_lcd_hv070wsa_data = {
562         .set_power = lcd_hv070wsa_set_power,
563 };
564
565 static struct platform_device origen_lcd_hv070wsa = {
566         .name                   = "platform-lcd",
567         .dev.parent             = &s5p_device_fimd0.dev,
568         .dev.platform_data      = &origen_lcd_hv070wsa_data,
569 };
570
571 static struct s3c_fb_pd_win origen_fb_win0 = {
572         .win_mode = {
573                 .left_margin    = 64,
574                 .right_margin   = 16,
575                 .upper_margin   = 64,
576                 .lower_margin   = 16,
577                 .hsync_len      = 48,
578                 .vsync_len      = 3,
579                 .xres           = 1024,
580                 .yres           = 600,
581         },
582         .max_bpp                = 32,
583         .default_bpp            = 24,
584 };
585
586 static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
587         .win[0]         = &origen_fb_win0,
588         .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
589         .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
590         .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
591 };
592
593 static struct platform_device *origen_devices[] __initdata = {
594         &s3c_device_hsmmc2,
595         &s3c_device_hsmmc0,
596         &s3c_device_i2c0,
597         &s3c_device_rtc,
598         &s3c_device_wdt,
599         &s5p_device_ehci,
600         &s5p_device_fimc0,
601         &s5p_device_fimc1,
602         &s5p_device_fimc2,
603         &s5p_device_fimc3,
604         &s5p_device_fimd0,
605         &s5p_device_hdmi,
606         &s5p_device_i2c_hdmiphy,
607         &s5p_device_mfc,
608         &s5p_device_mfc_l,
609         &s5p_device_mfc_r,
610         &s5p_device_mixer,
611         &exynos4_device_pd[PD_LCD0],
612         &exynos4_device_pd[PD_TV],
613         &exynos4_device_pd[PD_G3D],
614         &exynos4_device_pd[PD_LCD1],
615         &exynos4_device_pd[PD_CAM],
616         &exynos4_device_pd[PD_GPS],
617         &exynos4_device_pd[PD_MFC],
618         &origen_device_gpiokeys,
619         &origen_lcd_hv070wsa,
620 };
621
622 /* LCD Backlight data */
623 static struct samsung_bl_gpio_info origen_bl_gpio_info = {
624         .no             = EXYNOS4_GPD0(0),
625         .func           = S3C_GPIO_SFN(2),
626 };
627
628 static struct platform_pwm_backlight_data origen_bl_data = {
629         .pwm_id         = 0,
630         .pwm_period_ns  = 1000,
631 };
632
633 static void s5p_tv_setup(void)
634 {
635         /* Direct HPD to HDMI chip */
636         gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug");
637         s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
638         s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
639 }
640
641 static void __init origen_map_io(void)
642 {
643         exynos_init_io(NULL, 0);
644         s3c24xx_init_clocks(24000000);
645         s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs));
646 }
647
648 static void __init origen_power_init(void)
649 {
650         gpio_request(EXYNOS4_GPX0(4), "PMIC_IRQ");
651         s3c_gpio_cfgpin(EXYNOS4_GPX0(4), S3C_GPIO_SFN(0xf));
652         s3c_gpio_setpull(EXYNOS4_GPX0(4), S3C_GPIO_PULL_NONE);
653 }
654
655 static void __init origen_reserve(void)
656 {
657         s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
658 }
659
660 static void __init origen_machine_init(void)
661 {
662         origen_power_init();
663
664         s3c_i2c0_set_platdata(NULL);
665         i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
666
667         /*
668          * Since sdhci instance 2 can contain a bootable media,
669          * sdhci instance 0 is registered after instance 2.
670          */
671         s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
672         s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata);
673
674         origen_ehci_init();
675         clk_xusbxti.rate = 24000000;
676
677         s5p_tv_setup();
678         s5p_i2c_hdmiphy_set_platdata(NULL);
679
680         s5p_fimd0_set_platdata(&origen_lcd_pdata);
681
682         platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
683
684         s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
685
686         s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
687         s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
688
689         s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
690
691         samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
692 }
693
694 MACHINE_START(ORIGEN, "ORIGEN")
695         /* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */
696         .atag_offset    = 0x100,
697         .init_irq       = exynos4_init_irq,
698         .map_io         = origen_map_io,
699         .handle_irq     = gic_handle_irq,
700         .init_machine   = origen_machine_init,
701         .timer          = &exynos4_timer,
702         .reserve        = &origen_reserve,
703         .restart        = exynos4_restart,
704 MACHINE_END