blob: 48e85b03cb165eb069965ebd748095105696dc44 [file] [log] [blame]
Kukjin Kimd11135c2011-02-14 14:59:52 +09001/* linux/arch/arm/mach-exynos4/mach-universal_c210.c
Kyungmin Park516607d2010-08-06 19:59:21 +09002 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8*/
9
Kyungmin Park34d79312010-08-21 09:49:49 +090010#include <linux/platform_device.h>
Kyungmin Park516607d2010-08-06 19:59:21 +090011#include <linux/serial_core.h>
Kyungmin Park34d79312010-08-21 09:49:49 +090012#include <linux/input.h>
Kyungmin Park3b7998f2010-10-08 22:34:56 +090013#include <linux/i2c.h>
Kyungmin Park34d79312010-08-21 09:49:49 +090014#include <linux/gpio_keys.h>
15#include <linux/gpio.h>
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +090016#include <linux/fb.h>
Marek Szyprowski4d838ec2011-03-04 10:19:52 +090017#include <linux/mfd/max8998.h>
Kyungmin Parka8928ce2010-12-22 13:34:23 +090018#include <linux/regulator/machine.h>
19#include <linux/regulator/fixed.h>
Marek Szyprowski4d838ec2011-03-04 10:19:52 +090020#include <linux/regulator/max8952.h>
Kyungmin Parka8928ce2010-12-22 13:34:23 +090021#include <linux/mmc/host.h>
Marek Szyprowskib908af42011-06-22 13:43:39 +090022#include <linux/i2c-gpio.h>
23#include <linux/i2c/mcs.h>
Marc Zyngier4e44d2c2011-05-30 11:04:53 +010024 <linux/i2c/atmel_mxt_ts.h>
Kyungmin Park516607d2010-08-06 19:59:21 +090025
26#include <asm/mach/arch.h>
Marc Zyngier4e44d2c2011-05-30 11:04:53 +010027#include <asm/hardware/gic.h>
Kyungmin Park516607d2010-08-06 19:59:21 +090028#include <asm/mach-types.h>
Kyungmin Park516607d2010-08-06 19:59:21 +090029
30#include <plat/regs-serial.h>
Kukjin Kimd11135c2011-02-14 14:59:52 +090031#include <plat/exynos4.h>
Kyungmin Park516607d2010-08-06 19:59:21 +090032#include <plat/cpu.h>
Kyungmin Parkacf5eda2010-10-08 22:34:52 +090033#include <plat/devs.h>
Marek Szyprowski4d838ec2011-03-04 10:19:52 +090034#include <plat/iic.h>
Marek Szyprowski0b398b62011-06-22 13:43:39 +090035#include <plat/gpio-cfg.h>
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +090036#include <plat/fb.h>
Kamil Debskib14f04d2011-07-21 16:43:20 +090037#include <plat/mfc.h>
Kyungmin Parka8928ce2010-12-22 13:34:23 +090038#include <plat/sdhci.h>
Kamil Debskib14f04d2011-07-21 16:43:20 +090039#include <plat/pd.h>
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +090040#include <plat/regs-fb-v4.h>
Sylwester Nawrocki05132182011-09-27 07:18:55 +090041#include <plat/fimc-core.h>
42#include <plat/camport.h>
43#include <plat/mipi_csis.h>
Kyungmin Park516607d2010-08-06 19:59:21 +090044
45#include <mach/map.h>
46
Sylwester Nawrocki05132182011-09-27 07:18:55 +090047#include <media/v4l2-mediabus.h>
48#include <media/s5p_fimc.h>
49#include <media/m5mols.h>
50
Kyungmin Park516607d2010-08-06 19:59:21 +090051/* Following are default values for UCON, ULCON and UFCON UART registers */
52#define UNIVERSAL_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 UNIVERSAL_ULCON_DEFAULT S3C2410_LCON_CS8
60
61#define UNIVERSAL_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
62 S5PV210_UFCON_TXTRIG256 | \
63 S5PV210_UFCON_RXTRIG256)
64
65static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = {
66 [0] = {
67 .hwport = 0,
68 .ucon = UNIVERSAL_UCON_DEFAULT,
69 .ulcon = UNIVERSAL_ULCON_DEFAULT,
70 .ufcon = UNIVERSAL_UFCON_DEFAULT,
71 },
72 [1] = {
73 .hwport = 1,
74 .ucon = UNIVERSAL_UCON_DEFAULT,
75 .ulcon = UNIVERSAL_ULCON_DEFAULT,
76 .ufcon = UNIVERSAL_UFCON_DEFAULT,
77 },
78 [2] = {
79 .hwport = 2,
80 .ucon = UNIVERSAL_UCON_DEFAULT,
81 .ulcon = UNIVERSAL_ULCON_DEFAULT,
82 .ufcon = UNIVERSAL_UFCON_DEFAULT,
83 },
84 [3] = {
85 .hwport = 3,
86 .ucon = UNIVERSAL_UCON_DEFAULT,
87 .ulcon = UNIVERSAL_ULCON_DEFAULT,
88 .ufcon = UNIVERSAL_UFCON_DEFAULT,
89 },
90};
91
Marek Szyprowski4d838ec2011-03-04 10:19:52 +090092static struct regulator_consumer_supply max8952_consumer =
Kyungmin Parkc1a238a2011-08-11 16:36:41 +090093 REGULATOR_SUPPLY("vdd_arm", NULL);
Marek Szyprowski4d838ec2011-03-04 10:19:52 +090094
95static struct max8952_platform_data universal_max8952_pdata __initdata = {
96 .gpio_vid0 = EXYNOS4_GPX0(3),
97 .gpio_vid1 = EXYNOS4_GPX0(4),
98 .gpio_en = -1, /* Not controllable, set "Always High" */
99 .default_mode = 0, /* vid0 = 0, vid1 = 0 */
100 .dvs_mode = { 48, 32, 28, 18 }, /* 1.25, 1.20, 1.05, 0.95V */
101 .sync_freq = 0, /* default: fastest */
102 .ramp_speed = 0, /* default: fastest */
103
104 .reg_data = {
105 .constraints = {
106 .name = "VARM_1.2V",
107 .min_uV = 770000,
108 .max_uV = 1400000,
109 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
110 .always_on = 1,
111 .boot_on = 1,
112 },
113 .num_consumer_supplies = 1,
114 .consumer_supplies = &max8952_consumer,
115 },
116};
117
118static struct regulator_consumer_supply lp3974_buck1_consumer =
Kyungmin Parkc1a238a2011-08-11 16:36:41 +0900119 REGULATOR_SUPPLY("vdd_int", NULL);
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900120
121static struct regulator_consumer_supply lp3974_buck2_consumer =
122 REGULATOR_SUPPLY("vddg3d", NULL);
123
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900124static struct regulator_consumer_supply lp3974_buck3_consumer =
125 REGULATOR_SUPPLY("vdet", "s5p-sdo");
126
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900127static struct regulator_init_data lp3974_buck1_data = {
128 .constraints = {
129 .name = "VINT_1.1V",
130 .min_uV = 750000,
131 .max_uV = 1500000,
132 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
133 REGULATOR_CHANGE_STATUS,
134 .boot_on = 1,
135 .state_mem = {
136 .disabled = 1,
137 },
138 },
139 .num_consumer_supplies = 1,
140 .consumer_supplies = &lp3974_buck1_consumer,
141};
142
143static struct regulator_init_data lp3974_buck2_data = {
144 .constraints = {
145 .name = "VG3D_1.1V",
146 .min_uV = 750000,
147 .max_uV = 1500000,
148 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
149 REGULATOR_CHANGE_STATUS,
150 .boot_on = 1,
151 .state_mem = {
152 .disabled = 1,
153 },
154 },
155 .num_consumer_supplies = 1,
156 .consumer_supplies = &lp3974_buck2_consumer,
157};
158
159static struct regulator_init_data lp3974_buck3_data = {
160 .constraints = {
161 .name = "VCC_1.8V",
162 .min_uV = 1800000,
163 .max_uV = 1800000,
164 .apply_uV = 1,
165 .always_on = 1,
166 .state_mem = {
167 .enabled = 1,
168 },
169 },
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900170 .num_consumer_supplies = 1,
171 .consumer_supplies = &lp3974_buck3_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900172};
173
174static struct regulator_init_data lp3974_buck4_data = {
175 .constraints = {
176 .name = "VMEM_1.2V",
177 .min_uV = 1200000,
178 .max_uV = 1200000,
179 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
180 .apply_uV = 1,
181 .state_mem = {
182 .disabled = 1,
183 },
184 },
185};
186
187static struct regulator_init_data lp3974_ldo2_data = {
188 .constraints = {
189 .name = "VALIVE_1.2V",
190 .min_uV = 1200000,
191 .max_uV = 1200000,
192 .apply_uV = 1,
193 .always_on = 1,
194 .state_mem = {
195 .enabled = 1,
196 },
197 },
198};
199
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900200static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
201 REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
202 REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900203 REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"),
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900204};
205
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900206static struct regulator_init_data lp3974_ldo3_data = {
207 .constraints = {
208 .name = "VUSB+MIPI_1.1V",
209 .min_uV = 1100000,
210 .max_uV = 1100000,
211 .apply_uV = 1,
212 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
213 .state_mem = {
214 .disabled = 1,
215 },
216 },
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900217 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo3_consumer),
218 .consumer_supplies = lp3974_ldo3_consumer,
219};
220
221static struct regulator_consumer_supply lp3974_ldo4_consumer[] = {
222 REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"),
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900223};
224
225static struct regulator_init_data lp3974_ldo4_data = {
226 .constraints = {
227 .name = "VADC_3.3V",
228 .min_uV = 3300000,
229 .max_uV = 3300000,
230 .apply_uV = 1,
231 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
232 .state_mem = {
233 .disabled = 1,
234 },
235 },
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900236 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo4_consumer),
237 .consumer_supplies = lp3974_ldo4_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900238};
239
240static struct regulator_init_data lp3974_ldo5_data = {
241 .constraints = {
242 .name = "VTF_2.8V",
243 .min_uV = 2800000,
244 .max_uV = 2800000,
245 .apply_uV = 1,
246 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
247 .state_mem = {
248 .disabled = 1,
249 },
250 },
251};
252
253static struct regulator_init_data lp3974_ldo6_data = {
254 .constraints = {
255 .name = "LDO6",
256 .min_uV = 2000000,
257 .max_uV = 2000000,
258 .apply_uV = 1,
259 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
260 .state_mem = {
261 .disabled = 1,
262 },
263 },
264};
265
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900266static struct regulator_consumer_supply lp3974_ldo7_consumer[] = {
267 REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"),
268};
269
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900270static struct regulator_init_data lp3974_ldo7_data = {
271 .constraints = {
272 .name = "VLCD+VMIPI_1.8V",
273 .min_uV = 1800000,
274 .max_uV = 1800000,
275 .apply_uV = 1,
276 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
277 .state_mem = {
278 .disabled = 1,
279 },
280 },
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900281 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo7_consumer),
282 .consumer_supplies = lp3974_ldo7_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900283};
284
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900285static struct regulator_consumer_supply lp3974_ldo8_consumer[] = {
286 REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
287};
288
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900289static struct regulator_init_data lp3974_ldo8_data = {
290 .constraints = {
291 .name = "VUSB+VDAC_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 },
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900300 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo8_consumer),
301 .consumer_supplies = lp3974_ldo8_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900302};
303
304static struct regulator_init_data lp3974_ldo9_data = {
305 .constraints = {
306 .name = "VCC_2.8V",
307 .min_uV = 2800000,
308 .max_uV = 2800000,
309 .apply_uV = 1,
310 .always_on = 1,
311 .state_mem = {
312 .enabled = 1,
313 },
314 },
315};
316
317static struct regulator_init_data lp3974_ldo10_data = {
318 .constraints = {
319 .name = "VPLL_1.1V",
320 .min_uV = 1100000,
321 .max_uV = 1100000,
322 .boot_on = 1,
323 .apply_uV = 1,
324 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
325 .state_mem = {
326 .disabled = 1,
327 },
328 },
329};
330
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900331static struct regulator_consumer_supply lp3974_ldo11_consumer =
332 REGULATOR_SUPPLY("dig_28", "0-001f");
333
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900334static struct regulator_init_data lp3974_ldo11_data = {
335 .constraints = {
336 .name = "CAM_AF_3.3V",
337 .min_uV = 3300000,
338 .max_uV = 3300000,
339 .apply_uV = 1,
340 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
341 .state_mem = {
342 .disabled = 1,
343 },
344 },
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900345 .num_consumer_supplies = 1,
346 .consumer_supplies = &lp3974_ldo11_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900347};
348
349static struct regulator_init_data lp3974_ldo12_data = {
350 .constraints = {
351 .name = "PS_2.8V",
352 .min_uV = 2800000,
353 .max_uV = 2800000,
354 .apply_uV = 1,
355 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
356 .state_mem = {
357 .disabled = 1,
358 },
359 },
360};
361
362static struct regulator_init_data lp3974_ldo13_data = {
363 .constraints = {
364 .name = "VHIC_1.2V",
365 .min_uV = 1200000,
366 .max_uV = 1200000,
367 .apply_uV = 1,
368 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
369 .state_mem = {
370 .disabled = 1,
371 },
372 },
373};
374
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900375static struct regulator_consumer_supply lp3974_ldo14_consumer =
376 REGULATOR_SUPPLY("dig_18", "0-001f");
377
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900378static struct regulator_init_data lp3974_ldo14_data = {
379 .constraints = {
380 .name = "CAM_I_HOST_1.8V",
381 .min_uV = 1800000,
382 .max_uV = 1800000,
383 .apply_uV = 1,
384 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
385 .state_mem = {
386 .disabled = 1,
387 },
388 },
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900389 .num_consumer_supplies = 1,
390 .consumer_supplies = &lp3974_ldo14_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900391};
392
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900393
394static struct regulator_consumer_supply lp3974_ldo15_consumer =
395 REGULATOR_SUPPLY("dig_12", "0-001f");
396
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900397static struct regulator_init_data lp3974_ldo15_data = {
398 .constraints = {
399 .name = "CAM_S_DIG+FM33_CORE_1.2V",
400 .min_uV = 1200000,
401 .max_uV = 1200000,
402 .apply_uV = 1,
403 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
404 .state_mem = {
405 .disabled = 1,
406 },
407 },
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900408 .num_consumer_supplies = 1,
409 .consumer_supplies = &lp3974_ldo15_consumer,
410};
411
412static struct regulator_consumer_supply lp3974_ldo16_consumer[] = {
413 REGULATOR_SUPPLY("a_sensor", "0-001f"),
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900414};
415
416static struct regulator_init_data lp3974_ldo16_data = {
417 .constraints = {
418 .name = "CAM_S_ANA_2.8V",
419 .min_uV = 2800000,
420 .max_uV = 2800000,
421 .apply_uV = 1,
422 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
423 .state_mem = {
424 .disabled = 1,
425 },
426 },
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900427 .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo16_consumer),
428 .consumer_supplies = lp3974_ldo16_consumer,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900429};
430
431static struct regulator_init_data lp3974_ldo17_data = {
432 .constraints = {
433 .name = "VCC_3.0V_LCD",
434 .min_uV = 3000000,
435 .max_uV = 3000000,
436 .apply_uV = 1,
437 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
438 .boot_on = 1,
439 .state_mem = {
440 .disabled = 1,
441 },
442 },
443};
444
445static struct regulator_init_data lp3974_32khz_ap_data = {
446 .constraints = {
447 .name = "32KHz AP",
448 .always_on = 1,
449 .state_mem = {
450 .enabled = 1,
451 },
452 },
453};
454
455static struct regulator_init_data lp3974_32khz_cp_data = {
456 .constraints = {
457 .name = "32KHz CP",
458 .state_mem = {
459 .disabled = 1,
460 },
461 },
462};
463
464static struct regulator_init_data lp3974_vichg_data = {
465 .constraints = {
466 .name = "VICHG",
467 .state_mem = {
468 .disabled = 1,
469 },
470 },
471};
472
473static struct regulator_init_data lp3974_esafeout1_data = {
474 .constraints = {
475 .name = "SAFEOUT1",
476 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
477 .state_mem = {
478 .enabled = 1,
479 },
480 },
481};
482
483static struct regulator_init_data lp3974_esafeout2_data = {
484 .constraints = {
485 .name = "SAFEOUT2",
486 .boot_on = 1,
487 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
488 .state_mem = {
489 .enabled = 1,
490 },
491 },
492};
493
494static struct max8998_regulator_data lp3974_regulators[] = {
495 { MAX8998_LDO2, &lp3974_ldo2_data },
496 { MAX8998_LDO3, &lp3974_ldo3_data },
497 { MAX8998_LDO4, &lp3974_ldo4_data },
498 { MAX8998_LDO5, &lp3974_ldo5_data },
499 { MAX8998_LDO6, &lp3974_ldo6_data },
500 { MAX8998_LDO7, &lp3974_ldo7_data },
501 { MAX8998_LDO8, &lp3974_ldo8_data },
502 { MAX8998_LDO9, &lp3974_ldo9_data },
503 { MAX8998_LDO10, &lp3974_ldo10_data },
504 { MAX8998_LDO11, &lp3974_ldo11_data },
505 { MAX8998_LDO12, &lp3974_ldo12_data },
506 { MAX8998_LDO13, &lp3974_ldo13_data },
507 { MAX8998_LDO14, &lp3974_ldo14_data },
508 { MAX8998_LDO15, &lp3974_ldo15_data },
509 { MAX8998_LDO16, &lp3974_ldo16_data },
510 { MAX8998_LDO17, &lp3974_ldo17_data },
511 { MAX8998_BUCK1, &lp3974_buck1_data },
512 { MAX8998_BUCK2, &lp3974_buck2_data },
513 { MAX8998_BUCK3, &lp3974_buck3_data },
514 { MAX8998_BUCK4, &lp3974_buck4_data },
515 { MAX8998_EN32KHZ_AP, &lp3974_32khz_ap_data },
516 { MAX8998_EN32KHZ_CP, &lp3974_32khz_cp_data },
517 { MAX8998_ENVICHG, &lp3974_vichg_data },
518 { MAX8998_ESAFEOUT1, &lp3974_esafeout1_data },
519 { MAX8998_ESAFEOUT2, &lp3974_esafeout2_data },
520};
521
522static struct max8998_platform_data universal_lp3974_pdata = {
523 .num_regulators = ARRAY_SIZE(lp3974_regulators),
524 .regulators = lp3974_regulators,
525 .buck1_voltage1 = 1100000, /* INT */
526 .buck1_voltage2 = 1000000,
527 .buck1_voltage3 = 1100000,
528 .buck1_voltage4 = 1000000,
529 .buck1_set1 = EXYNOS4_GPX0(5),
530 .buck1_set2 = EXYNOS4_GPX0(6),
531 .buck2_voltage1 = 1200000, /* G3D */
532 .buck2_voltage2 = 1100000,
533 .buck1_default_idx = 0,
534 .buck2_set3 = EXYNOS4_GPE2(0),
535 .buck2_default_idx = 0,
536 .wakeup = true,
537};
538
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900539
540enum fixed_regulator_id {
541 FIXED_REG_ID_MMC0,
542 FIXED_REG_ID_HDMI_5V,
543 FIXED_REG_ID_CAM_S_IF,
544 FIXED_REG_ID_CAM_I_CORE,
545 FIXED_REG_ID_CAM_VT_DIO,
546};
547
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900548static struct regulator_consumer_supply hdmi_fixed_consumer =
549 REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi");
550
551static struct regulator_init_data hdmi_fixed_voltage_init_data = {
552 .constraints = {
553 .name = "HDMI_5V",
554 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
555 },
556 .num_consumer_supplies = 1,
557 .consumer_supplies = &hdmi_fixed_consumer,
558};
559
560static struct fixed_voltage_config hdmi_fixed_voltage_config = {
561 .supply_name = "HDMI_EN1",
562 .microvolts = 5000000,
563 .gpio = EXYNOS4_GPE0(1),
564 .enable_high = true,
565 .init_data = &hdmi_fixed_voltage_init_data,
566};
567
568static struct platform_device hdmi_fixed_voltage = {
569 .name = "reg-fixed-voltage",
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900570 .id = FIXED_REG_ID_HDMI_5V,
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900571 .dev = {
572 .platform_data = &hdmi_fixed_voltage_config,
573 },
574};
575
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900576/* GPIO I2C 5 (PMIC) */
577static struct i2c_board_info i2c5_devs[] __initdata = {
578 {
579 I2C_BOARD_INFO("max8952", 0xC0 >> 1),
580 .platform_data = &universal_max8952_pdata,
581 }, {
582 I2C_BOARD_INFO("lp3974", 0xCC >> 1),
583 .platform_data = &universal_lp3974_pdata,
584 },
585};
586
Marek Szyprowski0b398b62011-06-22 13:43:39 +0900587/* I2C3 (TSP) */
588static struct mxt_platform_data qt602240_platform_data = {
589 .x_line = 19,
590 .y_line = 11,
591 .x_size = 800,
592 .y_size = 480,
593 .blen = 0x11,
594 .threshold = 0x28,
595 .voltage = 2800000, /* 2.8V */
596 .orient = MXT_DIAGONAL,
597};
598
599static struct i2c_board_info i2c3_devs[] __initdata = {
600 {
601 I2C_BOARD_INFO("qt602240_ts", 0x4a),
602 .platform_data = &qt602240_platform_data,
603 },
604};
605
606static void __init universal_tsp_init(void)
607{
608 int gpio;
609
610 /* TSP_LDO_ON: XMDMADDR_11 */
611 gpio = EXYNOS4_GPE2(3);
612 gpio_request(gpio, "TSP_LDO_ON");
613 gpio_direction_output(gpio, 1);
614 gpio_export(gpio, 0);
615
616 /* TSP_INT: XMDMADDR_7 */
617 gpio = EXYNOS4_GPE1(7);
618 gpio_request(gpio, "TSP_INT");
619
620 s5p_register_gpio_interrupt(gpio);
621 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
622 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
623 i2c3_devs[0].irq = gpio_to_irq(gpio);
624}
625
626
Marek Szyprowskib908af42011-06-22 13:43:39 +0900627/* GPIO I2C 12 (3 Touchkey) */
628static uint32_t touchkey_keymap[] = {
629 /* MCS_KEY_MAP(value, keycode) */
630 MCS_KEY_MAP(0, KEY_MENU), /* KEY_SEND */
631 MCS_KEY_MAP(1, KEY_BACK), /* KEY_END */
632};
633
634static struct mcs_platform_data touchkey_data = {
635 .keymap = touchkey_keymap,
636 .keymap_size = ARRAY_SIZE(touchkey_keymap),
637 .key_maxval = 2,
638};
639
640/* GPIO I2C 3_TOUCH 2.8V */
641#define I2C_GPIO_BUS_12 12
642static struct i2c_gpio_platform_data i2c_gpio12_data = {
643 .sda_pin = EXYNOS4_GPE4(0), /* XMDMDATA_8 */
644 .scl_pin = EXYNOS4_GPE4(1), /* XMDMDATA_9 */
645};
646
647static struct platform_device i2c_gpio12 = {
648 .name = "i2c-gpio",
649 .id = I2C_GPIO_BUS_12,
650 .dev = {
651 .platform_data = &i2c_gpio12_data,
652 },
653};
654
655static struct i2c_board_info i2c_gpio12_devs[] __initdata = {
656 {
657 I2C_BOARD_INFO("mcs5080_touchkey", 0x20),
658 .platform_data = &touchkey_data,
659 },
660};
661
662static void __init universal_touchkey_init(void)
663{
664 int gpio;
665
666 gpio = EXYNOS4_GPE3(7); /* XMDMDATA_7 */
667 gpio_request(gpio, "3_TOUCH_INT");
668 s5p_register_gpio_interrupt(gpio);
669 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
670 i2c_gpio12_devs[0].irq = gpio_to_irq(gpio);
671
672 gpio = EXYNOS4_GPE3(3); /* XMDMDATA_3 */
673 gpio_request(gpio, "3_TOUCH_EN");
674 gpio_direction_output(gpio, 1);
675}
676
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900677static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = {
678 .frequency = 300 * 1000,
679 .sda_delay = 200,
680};
681
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900682/* GPIO KEYS */
Kyungmin Park34d79312010-08-21 09:49:49 +0900683static struct gpio_keys_button universal_gpio_keys_tables[] = {
684 {
685 .code = KEY_VOLUMEUP,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900686 .gpio = EXYNOS4_GPX2(0), /* XEINT16 */
Kyungmin Park34d79312010-08-21 09:49:49 +0900687 .desc = "gpio-keys: KEY_VOLUMEUP",
688 .type = EV_KEY,
689 .active_low = 1,
690 .debounce_interval = 1,
691 }, {
692 .code = KEY_VOLUMEDOWN,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900693 .gpio = EXYNOS4_GPX2(1), /* XEINT17 */
Kyungmin Park34d79312010-08-21 09:49:49 +0900694 .desc = "gpio-keys: KEY_VOLUMEDOWN",
695 .type = EV_KEY,
696 .active_low = 1,
697 .debounce_interval = 1,
698 }, {
699 .code = KEY_CONFIG,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900700 .gpio = EXYNOS4_GPX2(2), /* XEINT18 */
Kyungmin Park34d79312010-08-21 09:49:49 +0900701 .desc = "gpio-keys: KEY_CONFIG",
702 .type = EV_KEY,
703 .active_low = 1,
704 .debounce_interval = 1,
705 }, {
706 .code = KEY_CAMERA,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900707 .gpio = EXYNOS4_GPX2(3), /* XEINT19 */
Kyungmin Park34d79312010-08-21 09:49:49 +0900708 .desc = "gpio-keys: KEY_CAMERA",
709 .type = EV_KEY,
710 .active_low = 1,
711 .debounce_interval = 1,
712 }, {
713 .code = KEY_OK,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900714 .gpio = EXYNOS4_GPX3(5), /* XEINT29 */
Kyungmin Park34d79312010-08-21 09:49:49 +0900715 .desc = "gpio-keys: KEY_OK",
716 .type = EV_KEY,
717 .active_low = 1,
718 .debounce_interval = 1,
719 },
720};
721
722static struct gpio_keys_platform_data universal_gpio_keys_data = {
723 .buttons = universal_gpio_keys_tables,
724 .nbuttons = ARRAY_SIZE(universal_gpio_keys_tables),
725};
726
727static struct platform_device universal_gpio_keys = {
728 .name = "gpio-keys",
729 .dev = {
730 .platform_data = &universal_gpio_keys_data,
731 },
732};
733
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900734/* eMMC */
735static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = {
736 .max_width = 8,
737 .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
738 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
739 MMC_CAP_DISABLE),
740 .cd_type = S3C_SDHCI_CD_PERMANENT,
741 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
742};
743
744static struct regulator_consumer_supply mmc0_supplies[] = {
745 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
746};
747
748static struct regulator_init_data mmc0_fixed_voltage_init_data = {
749 .constraints = {
750 .name = "VMEM_VDD_2.8V",
751 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
752 },
753 .num_consumer_supplies = ARRAY_SIZE(mmc0_supplies),
754 .consumer_supplies = mmc0_supplies,
755};
756
757static struct fixed_voltage_config mmc0_fixed_voltage_config = {
758 .supply_name = "MASSMEMORY_EN",
759 .microvolts = 2800000,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900760 .gpio = EXYNOS4_GPE1(3),
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900761 .enable_high = true,
762 .init_data = &mmc0_fixed_voltage_init_data,
763};
764
765static struct platform_device mmc0_fixed_voltage = {
766 .name = "reg-fixed-voltage",
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900767 .id = FIXED_REG_ID_MMC0,
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900768 .dev = {
769 .platform_data = &mmc0_fixed_voltage_config,
770 },
771};
772
773/* SD */
774static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = {
775 .max_width = 4,
776 .host_caps = MMC_CAP_4_BIT_DATA |
777 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
778 MMC_CAP_DISABLE,
Kukjin Kimd11135c2011-02-14 14:59:52 +0900779 .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900780 .ext_cd_gpio_invert = 1,
781 .cd_type = S3C_SDHCI_CD_GPIO,
782 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
783};
784
785/* WiFi */
786static struct s3c_sdhci_platdata universal_hsmmc3_data __initdata = {
787 .max_width = 4,
788 .host_caps = MMC_CAP_4_BIT_DATA |
789 MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
790 MMC_CAP_DISABLE,
791 .cd_type = S3C_SDHCI_CD_EXTERNAL,
792};
793
794static void __init universal_sdhci_init(void)
795{
796 s3c_sdhci0_set_platdata(&universal_hsmmc0_data);
797 s3c_sdhci2_set_platdata(&universal_hsmmc2_data);
798 s3c_sdhci3_set_platdata(&universal_hsmmc3_data);
799}
800
Kyungmin Park3b7998f2010-10-08 22:34:56 +0900801/* I2C1 */
802static struct i2c_board_info i2c1_devs[] __initdata = {
803 /* Gyro, To be updated */
804};
805
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +0900806/* Frame Buffer */
807static struct s3c_fb_pd_win universal_fb_win0 = {
808 .win_mode = {
809 .left_margin = 16,
810 .right_margin = 16,
811 .upper_margin = 2,
812 .lower_margin = 28,
813 .hsync_len = 2,
814 .vsync_len = 1,
815 .xres = 480,
816 .yres = 800,
817 .refresh = 55,
818 },
819 .max_bpp = 32,
820 .default_bpp = 16,
821};
822
823static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
824 .win[0] = &universal_fb_win0,
825 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
826 VIDCON0_CLKSEL_LCD,
827 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
828 | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
829 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
830};
831
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900832static struct regulator_consumer_supply cam_i_core_supply =
833 REGULATOR_SUPPLY("core", "0-001f");
834
835static struct regulator_init_data cam_i_core_reg_init_data = {
836 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
837 .num_consumer_supplies = 1,
838 .consumer_supplies = &cam_i_core_supply,
839};
840
841static struct fixed_voltage_config cam_i_core_fixed_voltage_cfg = {
842 .supply_name = "CAM_I_CORE_1.2V",
843 .microvolts = 1200000,
844 .gpio = EXYNOS4_GPE2(2), /* CAM_8M_CORE_EN */
845 .enable_high = 1,
846 .init_data = &cam_i_core_reg_init_data,
847};
848
849static struct platform_device cam_i_core_fixed_reg_dev = {
850 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_I_CORE,
851 .dev = { .platform_data = &cam_i_core_fixed_voltage_cfg },
852};
853
854static struct regulator_consumer_supply cam_s_if_supply =
855 REGULATOR_SUPPLY("d_sensor", "0-001f");
856
857static struct regulator_init_data cam_s_if_reg_init_data = {
858 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
859 .num_consumer_supplies = 1,
860 .consumer_supplies = &cam_s_if_supply,
861};
862
863static struct fixed_voltage_config cam_s_if_fixed_voltage_cfg = {
864 .supply_name = "CAM_S_IF_1.8V",
865 .microvolts = 1800000,
866 .gpio = EXYNOS4_GPE3(0), /* CAM_PWR_EN1 */
867 .enable_high = 1,
868 .init_data = &cam_s_if_reg_init_data,
869};
870
871static struct platform_device cam_s_if_fixed_reg_dev = {
872 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_S_IF,
873 .dev = { .platform_data = &cam_s_if_fixed_voltage_cfg },
874};
875
876static struct s5p_platform_mipi_csis mipi_csis_platdata = {
877 .clk_rate = 166000000UL,
878 .lanes = 2,
879 .alignment = 32,
880 .hs_settle = 12,
881 .phy_enable = s5p_csis_phy_enable,
882};
883
884#define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3)
885#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */
886#define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5)
887
888static int m5mols_set_power(struct device *dev, int on)
889{
890 gpio_set_value(GPIO_CAM_LEVEL_EN(1), !on);
891 gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
892 return 0;
893}
894
895static struct m5mols_platform_data m5mols_platdata = {
896 .gpio_reset = GPIO_CAM_MEGA_nRST,
897 .reset_polarity = 0,
898 .set_power = m5mols_set_power,
899};
900
901static struct i2c_board_info m5mols_board_info = {
902 I2C_BOARD_INFO("M5MOLS", 0x1F),
903 .platform_data = &m5mols_platdata,
904};
905
906static struct s5p_fimc_isp_info universal_camera_sensors[] = {
907 {
908 .mux_id = 0,
909 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
910 V4L2_MBUS_VSYNC_ACTIVE_LOW,
911 .bus_type = FIMC_MIPI_CSI2,
912 .board_info = &m5mols_board_info,
913 .i2c_bus_num = 0,
914 .clk_frequency = 21600000UL,
915 .csi_data_align = 32,
916 },
917};
918
919static struct s5p_platform_fimc fimc_md_platdata = {
920 .isp_info = universal_camera_sensors,
921 .num_clients = ARRAY_SIZE(universal_camera_sensors),
922};
923
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900924static struct gpio universal_camera_gpios[] = {
925 { GPIO_CAM_LEVEL_EN(1), GPIOF_OUT_INIT_HIGH, "CAM_LVL_EN1" },
926 { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" },
927 { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" },
928 { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
929};
930
931static void universal_camera_init(void)
932{
933 s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
934 &s5p_device_mipi_csis0);
935 s3c_set_platdata(&fimc_md_platdata, sizeof(fimc_md_platdata),
936 &s5p_device_fimc_md);
937
938 if (gpio_request_array(universal_camera_gpios,
939 ARRAY_SIZE(universal_camera_gpios))) {
940 pr_err("%s: GPIO request failed\n", __func__);
941 return;
942 }
943
944 if (!s3c_gpio_cfgpin(GPIO_CAM_8M_ISP_INT, S3C_GPIO_SFN(0xf)))
945 m5mols_board_info.irq = gpio_to_irq(GPIO_CAM_8M_ISP_INT);
946 else
947 pr_err("Failed to configure 8M_ISP_INT GPIO\n");
948
949 /* Free GPIOs controlled directly by the sensor drivers. */
950 gpio_free(GPIO_CAM_MEGA_nRST);
951 gpio_free(GPIO_CAM_8M_ISP_INT);
952
953 if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A))
954 pr_err("Camera port A setup failed\n");
955}
956
Kyungmin Park34d79312010-08-21 09:49:49 +0900957static struct platform_device *universal_devices[] __initdata = {
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900958 /* Samsung Platform Devices */
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900959 &s5p_device_mipi_csis0,
Marek Szyprowskiedd967b2011-06-22 13:43:39 +0900960 &s5p_device_fimc0,
961 &s5p_device_fimc1,
962 &s5p_device_fimc2,
963 &s5p_device_fimc3,
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900964 &mmc0_fixed_voltage,
965 &s3c_device_hsmmc0,
966 &s3c_device_hsmmc2,
967 &s3c_device_hsmmc3,
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900968 &s3c_device_i2c0,
Marek Szyprowski0b398b62011-06-22 13:43:39 +0900969 &s3c_device_i2c3,
Marek Szyprowski4d838ec2011-03-04 10:19:52 +0900970 &s3c_device_i2c5,
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +0900971 &s5p_device_i2c_hdmiphy,
972 &hdmi_fixed_voltage,
973 &exynos4_device_pd[PD_TV],
974 &s5p_device_hdmi,
975 &s5p_device_sdo,
976 &s5p_device_mixer,
Kyungmin Parka8928ce2010-12-22 13:34:23 +0900977
978 /* Universal Devices */
Marek Szyprowskib908af42011-06-22 13:43:39 +0900979 &i2c_gpio12,
Kyungmin Park34d79312010-08-21 09:49:49 +0900980 &universal_gpio_keys,
Kyungmin Parkacf5eda2010-10-08 22:34:52 +0900981 &s5p_device_onenand,
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +0900982 &s5p_device_fimd0,
Kamil Debskib14f04d2011-07-21 16:43:20 +0900983 &s5p_device_mfc,
984 &s5p_device_mfc_l,
985 &s5p_device_mfc_r,
986 &exynos4_device_pd[PD_MFC],
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +0900987 &exynos4_device_pd[PD_LCD0],
Sylwester Nawrocki05132182011-09-27 07:18:55 +0900988 &exynos4_device_pd[PD_CAM],
989 &cam_i_core_fixed_reg_dev,
990 &cam_s_if_fixed_reg_dev,
991 &s5p_device_fimc_md,
Kyungmin Park34d79312010-08-21 09:49:49 +0900992};
993
Kyungmin Park516607d2010-08-06 19:59:21 +0900994static void __init universal_map_io(void)
995{
996 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
997 s3c24xx_init_clocks(24000000);
998 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
999}
1000
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +09001001void s5p_tv_setup(void)
1002{
1003 /* direct HPD to HDMI chip */
1004 gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
1005
1006 gpio_direction_input(EXYNOS4_GPX3(7));
1007 s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
1008 s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
1009
1010 /* setup dependencies between TV devices */
1011 s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
1012 s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
1013}
1014
Kamil Debskib14f04d2011-07-21 16:43:20 +09001015static void __init universal_reserve(void)
1016{
1017 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
1018}
1019
Kyungmin Park516607d2010-08-06 19:59:21 +09001020static void __init universal_machine_init(void)
1021{
Kyungmin Parka8928ce2010-12-22 13:34:23 +09001022 universal_sdhci_init();
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +09001023 s5p_tv_setup();
Kyungmin Parka8928ce2010-12-22 13:34:23 +09001024
Sylwester Nawrocki05132182011-09-27 07:18:55 +09001025 s3c_i2c0_set_platdata(&universal_i2c0_platdata);
Kyungmin Park3b7998f2010-10-08 22:34:56 +09001026 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
1027
Marek Szyprowski0b398b62011-06-22 13:43:39 +09001028 universal_tsp_init();
1029 s3c_i2c3_set_platdata(NULL);
1030 i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
1031
Marek Szyprowski4d838ec2011-03-04 10:19:52 +09001032 s3c_i2c5_set_platdata(NULL);
Tomasz Stanislawskid737cf22011-09-16 18:48:32 +09001033 s5p_i2c_hdmiphy_set_platdata(NULL);
Marek Szyprowski4d838ec2011-03-04 10:19:52 +09001034 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
1035
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +09001036 s5p_fimd0_set_platdata(&universal_lcd_pdata);
1037
Marek Szyprowskib908af42011-06-22 13:43:39 +09001038 universal_touchkey_init();
1039 i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs,
1040 ARRAY_SIZE(i2c_gpio12_devs));
1041
Sylwester Nawrocki05132182011-09-27 07:18:55 +09001042 universal_camera_init();
1043
Kyungmin Park34d79312010-08-21 09:49:49 +09001044 /* Last */
1045 platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
Sylwester Nawrocki05132182011-09-27 07:18:55 +09001046
Kamil Debskib14f04d2011-07-21 16:43:20 +09001047 s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
Marek Szyprowskif3f5bfe2011-08-11 19:55:40 +09001048 s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
Sylwester Nawrocki05132182011-09-27 07:18:55 +09001049
1050 s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
1051 s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev;
1052 s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev;
1053 s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev;
1054 s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
Kyungmin Park516607d2010-08-06 19:59:21 +09001055}
1056
1057MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
1058 /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
Nicolas Pitre2be5a4a2011-07-05 22:38:11 -04001059 .atag_offset = 0x100,
Kukjin Kimd11135c2011-02-14 14:59:52 +09001060 .init_irq = exynos4_init_irq,
Kyungmin Park516607d2010-08-06 19:59:21 +09001061 .map_io = universal_map_io,
Marc Zyngier4e44d2c2011-05-30 11:04:53 +01001062 .handle_irq = gic_handle_irq,
Kyungmin Park516607d2010-08-06 19:59:21 +09001063 .init_machine = universal_machine_init,
Kukjin Kimd11135c2011-02-14 14:59:52 +09001064 .timer = &exynos4_timer,
Kamil Debskib14f04d2011-07-21 16:43:20 +09001065 .reserve = &universal_reserve,
Kyungmin Park516607d2010-08-06 19:59:21 +09001066MACHINE_END