blob: ababdca2b3e416d4b446c4a2db5d43e5a8b7a562 [file] [log] [blame]
Joonyoung Shim2e57da42010-05-19 23:15:32 +09001/* linux/arch/arm/mach-s5pv210/mach-goni.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
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/kernel.h>
12#include <linux/types.h>
13#include <linux/init.h>
14#include <linux/serial_core.h>
Marek Szyprowski3965fde2010-07-14 19:38:18 +090015#include <linux/fb.h>
Marek Szyprowskiba149f32010-07-14 19:39:47 +090016#include <linux/i2c.h>
17#include <linux/i2c-gpio.h>
Dmitry Torokhov964de522011-02-02 23:21:58 -080018#include <linux/i2c/atmel_mxt_ts.h>
Marek Szyprowskiba149f32010-07-14 19:39:47 +090019#include <linux/mfd/max8998.h>
Chanwoo Choi80849792010-10-14 17:25:57 +090020#include <linux/mfd/wm8994/pdata.h>
Marek Szyprowskie9dde6f12010-09-29 22:05:19 +090021#include <linux/regulator/fixed.h>
Marek Szyprowski8415d5c2010-10-04 16:39:20 +090022#include <linux/spi/spi.h>
23#include <linux/spi/spi_gpio.h>
24#include <linux/lcd.h>
Marek Szyprowskiba149f32010-07-14 19:39:47 +090025#include <linux/gpio_keys.h>
26#include <linux/input.h>
27#include <linux/gpio.h>
Marek Szyprowski9b4d1cbb2012-04-24 17:28:12 -070028#include <linux/mmc/host.h>
Iiro Valkonen919ed892011-02-15 13:36:52 -080029#include <linux/interrupt.h>
Lukasz Majewski126625e2012-05-09 13:16:53 +020030#include <linux/platform_data/s3c-hsotg.h>
Joonyoung Shim2e57da42010-05-19 23:15:32 +090031
Jamie Ilesbb3a4eb2011-09-27 20:53:31 +010032#include <asm/hardware/vic.h>
Joonyoung Shim2e57da42010-05-19 23:15:32 +090033#include <asm/mach/arch.h>
34#include <asm/mach/map.h>
35#include <asm/setup.h>
36#include <asm/mach-types.h>
37
Leela Krishna Amudala5a213a52012-08-08 09:44:49 +090038#include <video/samsung_fimd.h>
Joonyoung Shim2e57da42010-05-19 23:15:32 +090039#include <mach/map.h>
40#include <mach/regs-clock.h>
41
Marek Szyprowskiba149f32010-07-14 19:39:47 +090042#include <plat/gpio-cfg.h>
Joonyoung Shim2e57da42010-05-19 23:15:32 +090043#include <plat/regs-serial.h>
Joonyoung Shim2e57da42010-05-19 23:15:32 +090044#include <plat/devs.h>
45#include <plat/cpu.h>
Marek Szyprowski3965fde2010-07-14 19:38:18 +090046#include <plat/fb.h>
Arnd Bergmann436d42c2012-08-24 15:22:12 +020047#include <linux/platform_data/i2c-s3c2410.h>
Joonyoung Shim2a555582010-09-09 08:17:43 +090048#include <plat/keypad.h>
Marek Szyprowski19b90c72010-08-05 18:00:18 +090049#include <plat/sdhci.h>
Marek Szyprowskid5889d52010-09-30 20:59:46 +090050#include <plat/clock.h>
Sangbeom Kim20780fc2011-03-12 08:02:12 +090051#include <plat/s5p-time.h>
Kamil Debski66eb1232011-07-21 16:43:14 +090052#include <plat/mfc.h>
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +090053#include <plat/camport.h>
54
55#include <media/v4l2-mediabus.h>
56#include <media/s5p_fimc.h>
57#include <media/noon010pc30.h>
Joonyoung Shim2e57da42010-05-19 23:15:32 +090058
Kukjin Kim3fa754c2011-12-22 23:32:07 +010059#include "common.h"
60
Joonyoung Shim2e57da42010-05-19 23:15:32 +090061/* Following are default values for UCON, ULCON and UFCON UART registers */
Kukjin Kimc8def082010-07-21 09:19:51 +090062#define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
Joonyoung Shim2e57da42010-05-19 23:15:32 +090063 S3C2410_UCON_RXILEVEL | \
64 S3C2410_UCON_TXIRQMODE | \
65 S3C2410_UCON_RXIRQMODE | \
66 S3C2410_UCON_RXFIFO_TOI | \
67 S3C2443_UCON_RXERR_IRQEN)
68
Kukjin Kimc8def082010-07-21 09:19:51 +090069#define GONI_ULCON_DEFAULT S3C2410_LCON_CS8
Joonyoung Shim2e57da42010-05-19 23:15:32 +090070
Kukjin Kimf2b7e3c2010-08-06 21:34:55 +090071#define GONI_UFCON_DEFAULT S3C2410_UFCON_FIFOMODE
Joonyoung Shim2e57da42010-05-19 23:15:32 +090072
73static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
74 [0] = {
75 .hwport = 0,
76 .flags = 0,
Kukjin Kimc8def082010-07-21 09:19:51 +090077 .ucon = GONI_UCON_DEFAULT,
78 .ulcon = GONI_ULCON_DEFAULT,
Kukjin Kimf2b7e3c2010-08-06 21:34:55 +090079 .ufcon = GONI_UFCON_DEFAULT |
Joonyoung Shimbbf7b352010-06-24 19:28:55 +090080 S5PV210_UFCON_TXTRIG256 | S5PV210_UFCON_RXTRIG256,
Joonyoung Shim2e57da42010-05-19 23:15:32 +090081 },
82 [1] = {
83 .hwport = 1,
84 .flags = 0,
Kukjin Kimc8def082010-07-21 09:19:51 +090085 .ucon = GONI_UCON_DEFAULT,
86 .ulcon = GONI_ULCON_DEFAULT,
Kukjin Kimf2b7e3c2010-08-06 21:34:55 +090087 .ufcon = GONI_UFCON_DEFAULT |
Joonyoung Shimbbf7b352010-06-24 19:28:55 +090088 S5PV210_UFCON_TXTRIG64 | S5PV210_UFCON_RXTRIG64,
Joonyoung Shim2e57da42010-05-19 23:15:32 +090089 },
90 [2] = {
91 .hwport = 2,
92 .flags = 0,
Kukjin Kimc8def082010-07-21 09:19:51 +090093 .ucon = GONI_UCON_DEFAULT,
94 .ulcon = GONI_ULCON_DEFAULT,
Kukjin Kimf2b7e3c2010-08-06 21:34:55 +090095 .ufcon = GONI_UFCON_DEFAULT |
Joonyoung Shimbbf7b352010-06-24 19:28:55 +090096 S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16,
Joonyoung Shim2e57da42010-05-19 23:15:32 +090097 },
98 [3] = {
99 .hwport = 3,
100 .flags = 0,
Kukjin Kimc8def082010-07-21 09:19:51 +0900101 .ucon = GONI_UCON_DEFAULT,
102 .ulcon = GONI_ULCON_DEFAULT,
Kukjin Kimf2b7e3c2010-08-06 21:34:55 +0900103 .ufcon = GONI_UFCON_DEFAULT |
Joonyoung Shimbbf7b352010-06-24 19:28:55 +0900104 S5PV210_UFCON_TXTRIG16 | S5PV210_UFCON_RXTRIG16,
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900105 },
106};
107
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900108/* Frame Buffer */
109static struct s3c_fb_pd_win goni_fb_win0 = {
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900110 .max_bpp = 32,
111 .default_bpp = 16,
Thomas Abraham79d3c412012-03-24 21:58:48 +0530112 .xres = 480,
113 .yres = 800,
Sylwester Nawrockic472da62011-02-15 14:27:44 +0900114 .virtual_x = 480,
115 .virtual_y = 2 * 800,
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900116};
117
Thomas Abraham79d3c412012-03-24 21:58:48 +0530118static struct fb_videomode goni_lcd_timing = {
119 .left_margin = 16,
120 .right_margin = 16,
121 .upper_margin = 2,
122 .lower_margin = 28,
123 .hsync_len = 2,
124 .vsync_len = 1,
125 .xres = 480,
126 .yres = 800,
127 .refresh = 55,
128};
129
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900130static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
131 .win[0] = &goni_fb_win0,
Thomas Abraham79d3c412012-03-24 21:58:48 +0530132 .vtiming = &goni_lcd_timing,
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900133 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
134 VIDCON0_CLKSEL_LCD,
135 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
136 | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
137 .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
138};
139
Marek Szyprowski8415d5c2010-10-04 16:39:20 +0900140static int lcd_power_on(struct lcd_device *ld, int enable)
141{
142 return 1;
143}
144
145static int reset_lcd(struct lcd_device *ld)
146{
147 static unsigned int first = 1;
148 int reset_gpio = -1;
149
150 reset_gpio = S5PV210_MP05(5);
151
152 if (first) {
153 gpio_request(reset_gpio, "MLCD_RST");
154 first = 0;
155 }
156
157 gpio_direction_output(reset_gpio, 1);
158 return 1;
159}
160
161static struct lcd_platform_data goni_lcd_platform_data = {
162 .reset = reset_lcd,
163 .power_on = lcd_power_on,
164 .lcd_enabled = 0,
165 .reset_delay = 120, /* 120ms */
166 .power_on_delay = 25, /* 25ms */
167 .power_off_delay = 200, /* 200ms */
168};
169
170#define LCD_BUS_NUM 3
171static struct spi_board_info spi_board_info[] __initdata = {
172 {
173 .modalias = "s6e63m0",
174 .platform_data = &goni_lcd_platform_data,
175 .max_speed_hz = 1200000,
176 .bus_num = LCD_BUS_NUM,
177 .chip_select = 0,
178 .mode = SPI_MODE_3,
179 .controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */
180 },
181};
182
183static struct spi_gpio_platform_data lcd_spi_gpio_data = {
184 .sck = S5PV210_MP04(1), /* DISPLAY_CLK */
185 .mosi = S5PV210_MP04(3), /* DISPLAY_SI */
186 .miso = SPI_GPIO_NO_MISO,
187 .num_chipselect = 1,
188};
189
190static struct platform_device goni_spi_gpio = {
191 .name = "spi_gpio",
192 .id = LCD_BUS_NUM,
193 .dev = {
194 .parent = &s3c_device_fb.dev,
195 .platform_data = &lcd_spi_gpio_data,
196 },
197};
198
Joonyoung Shim2a555582010-09-09 08:17:43 +0900199/* KEYPAD */
200static uint32_t keymap[] __initdata = {
201 /* KEY(row, col, keycode) */
202 KEY(0, 1, KEY_MENU), /* Send */
203 KEY(0, 2, KEY_BACK), /* End */
204 KEY(1, 1, KEY_CONFIG), /* Half shot */
205 KEY(1, 2, KEY_VOLUMEUP),
206 KEY(2, 1, KEY_CAMERA), /* Full shot */
207 KEY(2, 2, KEY_VOLUMEDOWN),
208};
209
210static struct matrix_keymap_data keymap_data __initdata = {
211 .keymap = keymap,
212 .keymap_size = ARRAY_SIZE(keymap),
213};
214
215static struct samsung_keypad_platdata keypad_data __initdata = {
216 .keymap_data = &keymap_data,
217 .rows = 3,
218 .cols = 3,
219};
220
Marek Szyprowski528ef1b2010-10-04 16:39:22 +0900221/* Radio */
222static struct i2c_board_info i2c1_devs[] __initdata = {
223 {
224 I2C_BOARD_INFO("si470x", 0x10),
225 },
226};
227
228static void __init goni_radio_init(void)
229{
230 int gpio;
231
232 gpio = S5PV210_GPJ2(4); /* XMSMDATA_4 */
233 gpio_request(gpio, "FM_INT");
234 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
235 i2c1_devs[0].irq = gpio_to_irq(gpio);
236
237 gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */
Jingoo Han2f4f0b42011-12-24 11:57:09 +0900238 gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "FM_RST");
Marek Szyprowski528ef1b2010-10-04 16:39:22 +0900239}
240
Marek Szyprowskib4a0dca2010-10-04 18:38:12 +0900241/* TSP */
Iiro Valkonen7686b102011-02-02 23:21:58 -0800242static struct mxt_platform_data qt602240_platform_data = {
Marek Szyprowskib4a0dca2010-10-04 18:38:12 +0900243 .x_line = 17,
244 .y_line = 11,
245 .x_size = 800,
246 .y_size = 480,
247 .blen = 0x21,
248 .threshold = 0x28,
249 .voltage = 2800000, /* 2.8V */
Iiro Valkonen7686b102011-02-02 23:21:58 -0800250 .orient = MXT_DIAGONAL,
Iiro Valkonen919ed892011-02-15 13:36:52 -0800251 .irqflags = IRQF_TRIGGER_FALLING,
Marek Szyprowskib4a0dca2010-10-04 18:38:12 +0900252};
253
254static struct s3c2410_platform_i2c i2c2_data __initdata = {
255 .flags = 0,
256 .bus_num = 2,
257 .slave_addr = 0x10,
258 .frequency = 400 * 1000,
259 .sda_delay = 100,
260};
261
262static struct i2c_board_info i2c2_devs[] __initdata = {
263 {
264 I2C_BOARD_INFO("qt602240_ts", 0x4a),
265 .platform_data = &qt602240_platform_data,
266 },
267};
268
269static void __init goni_tsp_init(void)
270{
271 int gpio;
272
273 gpio = S5PV210_GPJ1(3); /* XMSMADDR_11 */
Jingoo Han2f4f0b42011-12-24 11:57:09 +0900274 gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "TSP_LDO_ON");
Marek Szyprowskib4a0dca2010-10-04 18:38:12 +0900275 gpio_export(gpio, 0);
276
277 gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */
278 gpio_request(gpio, "TSP_INT");
279
280 s5p_register_gpio_interrupt(gpio);
281 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
282 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
283 i2c2_devs[0].irq = gpio_to_irq(gpio);
284}
285
Lukasz Majewski460dcb02012-05-13 08:24:14 +0900286/* USB OTG */
287static struct s3c_hsotg_plat goni_hsotg_pdata;
288
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +0900289static void goni_camera_init(void)
290{
291 s5pv210_fimc_setup_gpio(S5P_CAMPORT_A);
292
293 /* Set max driver strength on CAM_A_CLKOUT pin. */
294 s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4);
295}
296
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900297/* MAX8998 regulators */
298#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
299
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900300static struct regulator_consumer_supply goni_ldo3_consumers[] = {
301 REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
302};
303
Marek Szyprowskie9dde6f12010-09-29 22:05:19 +0900304static struct regulator_consumer_supply goni_ldo5_consumers[] = {
305 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
306};
307
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900308static struct regulator_consumer_supply goni_ldo8_consumers[] = {
309 REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
Tomasz Stanislawskib74f2fb2011-09-16 18:48:52 +0900310 REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900311};
312
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900313static struct regulator_consumer_supply goni_ldo11_consumers[] = {
314 REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */
315};
316
317static struct regulator_consumer_supply goni_ldo13_consumers[] = {
318 REGULATOR_SUPPLY("vdda", "0-0030"), /* "CAM_A_2.8V" */
319};
320
321static struct regulator_consumer_supply goni_ldo14_consumers[] = {
322 REGULATOR_SUPPLY("vdd_core", "0-0030"), /* "CAM_CIF_1.8V" */
323};
324
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900325static struct regulator_init_data goni_ldo2_data = {
326 .constraints = {
327 .name = "VALIVE_1.1V",
328 .min_uV = 1100000,
329 .max_uV = 1100000,
330 .apply_uV = 1,
331 .always_on = 1,
332 .state_mem = {
333 .enabled = 1,
334 },
335 },
336};
337
338static struct regulator_init_data goni_ldo3_data = {
339 .constraints = {
Marek Szyprowskid1061332011-02-18 17:51:43 +0900340 .name = "VUSB+MIPI_1.1V",
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900341 .min_uV = 1100000,
342 .max_uV = 1100000,
343 .apply_uV = 1,
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900344 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900345 },
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900346 .num_consumer_supplies = ARRAY_SIZE(goni_ldo3_consumers),
347 .consumer_supplies = goni_ldo3_consumers,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900348};
349
350static struct regulator_init_data goni_ldo4_data = {
351 .constraints = {
352 .name = "VDAC_3.3V",
353 .min_uV = 3300000,
354 .max_uV = 3300000,
355 .apply_uV = 1,
356 },
357};
358
359static struct regulator_init_data goni_ldo5_data = {
360 .constraints = {
361 .name = "VTF_2.8V",
362 .min_uV = 2800000,
363 .max_uV = 2800000,
364 .apply_uV = 1,
Marek Szyprowski9b8306c2011-02-24 10:03:54 +0900365 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900366 },
Marek Szyprowskie9dde6f12010-09-29 22:05:19 +0900367 .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers),
368 .consumer_supplies = goni_ldo5_consumers,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900369};
370
371static struct regulator_init_data goni_ldo6_data = {
372 .constraints = {
373 .name = "VCC_3.3V",
374 .min_uV = 3300000,
375 .max_uV = 3300000,
376 .apply_uV = 1,
377 },
378};
379
380static struct regulator_init_data goni_ldo7_data = {
381 .constraints = {
382 .name = "VLCD_1.8V",
383 .min_uV = 1800000,
384 .max_uV = 1800000,
385 .apply_uV = 1,
386 .always_on = 1,
387 },
388};
389
390static struct regulator_init_data goni_ldo8_data = {
391 .constraints = {
Marek Szyprowskid1061332011-02-18 17:51:43 +0900392 .name = "VUSB+VADC_3.3V",
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900393 .min_uV = 3300000,
394 .max_uV = 3300000,
395 .apply_uV = 1,
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900396 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900397 },
Marek Szyprowski1d017fe2011-02-24 10:06:25 +0900398 .num_consumer_supplies = ARRAY_SIZE(goni_ldo8_consumers),
399 .consumer_supplies = goni_ldo8_consumers,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900400};
401
402static struct regulator_init_data goni_ldo9_data = {
403 .constraints = {
Marek Szyprowskid1061332011-02-18 17:51:43 +0900404 .name = "VCC+VCAM_2.8V",
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900405 .min_uV = 2800000,
406 .max_uV = 2800000,
407 .apply_uV = 1,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900408 },
409};
410
411static struct regulator_init_data goni_ldo10_data = {
412 .constraints = {
413 .name = "VPLL_1.1V",
414 .min_uV = 1100000,
415 .max_uV = 1100000,
416 .apply_uV = 1,
417 .boot_on = 1,
418 },
419};
420
421static struct regulator_init_data goni_ldo11_data = {
422 .constraints = {
423 .name = "CAM_IO_2.8V",
424 .min_uV = 2800000,
425 .max_uV = 2800000,
426 .apply_uV = 1,
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900427 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900428 },
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900429 .num_consumer_supplies = ARRAY_SIZE(goni_ldo11_consumers),
430 .consumer_supplies = goni_ldo11_consumers,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900431};
432
433static struct regulator_init_data goni_ldo12_data = {
434 .constraints = {
435 .name = "CAM_ISP_1.2V",
436 .min_uV = 1200000,
437 .max_uV = 1200000,
438 .apply_uV = 1,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900439 },
440};
441
442static struct regulator_init_data goni_ldo13_data = {
443 .constraints = {
444 .name = "CAM_A_2.8V",
445 .min_uV = 2800000,
446 .max_uV = 2800000,
447 .apply_uV = 1,
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900448 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900449 },
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900450 .num_consumer_supplies = ARRAY_SIZE(goni_ldo13_consumers),
451 .consumer_supplies = goni_ldo13_consumers,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900452};
453
454static struct regulator_init_data goni_ldo14_data = {
455 .constraints = {
456 .name = "CAM_CIF_1.8V",
457 .min_uV = 1800000,
458 .max_uV = 1800000,
459 .apply_uV = 1,
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900460 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900461 },
Sylwester Nawrocki9a16afd2011-02-15 14:27:44 +0900462 .num_consumer_supplies = ARRAY_SIZE(goni_ldo14_consumers),
463 .consumer_supplies = goni_ldo14_consumers,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900464};
465
466static struct regulator_init_data goni_ldo15_data = {
467 .constraints = {
468 .name = "CAM_AF_3.3V",
469 .min_uV = 3300000,
470 .max_uV = 3300000,
471 .apply_uV = 1,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900472 },
473};
474
475static struct regulator_init_data goni_ldo16_data = {
476 .constraints = {
477 .name = "VMIPI_1.8V",
478 .min_uV = 1800000,
479 .max_uV = 1800000,
480 .apply_uV = 1,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900481 },
482};
483
484static struct regulator_init_data goni_ldo17_data = {
485 .constraints = {
486 .name = "VCC_3.0V_LCD",
487 .min_uV = 3000000,
488 .max_uV = 3000000,
489 .apply_uV = 1,
490 .always_on = 1,
491 },
492};
493
494/* BUCK */
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900495static struct regulator_consumer_supply buck1_consumer =
496 REGULATOR_SUPPLY("vddarm", NULL);
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900497
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900498static struct regulator_consumer_supply buck2_consumer =
499 REGULATOR_SUPPLY("vddint", NULL);
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900500
Tomasz Stanislawskib74f2fb2011-09-16 18:48:52 +0900501static struct regulator_consumer_supply buck3_consumer =
502 REGULATOR_SUPPLY("vdet", "s5p-sdo");
503
504
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900505static struct regulator_init_data goni_buck1_data = {
506 .constraints = {
507 .name = "VARM_1.2V",
508 .min_uV = 1200000,
509 .max_uV = 1200000,
510 .apply_uV = 1,
511 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
512 REGULATOR_CHANGE_STATUS,
513 },
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900514 .num_consumer_supplies = 1,
515 .consumer_supplies = &buck1_consumer,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900516};
517
518static struct regulator_init_data goni_buck2_data = {
519 .constraints = {
520 .name = "VINT_1.2V",
521 .min_uV = 1200000,
522 .max_uV = 1200000,
523 .apply_uV = 1,
524 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
525 REGULATOR_CHANGE_STATUS,
526 },
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900527 .num_consumer_supplies = 1,
528 .consumer_supplies = &buck2_consumer,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900529};
530
531static struct regulator_init_data goni_buck3_data = {
532 .constraints = {
533 .name = "VCC_1.8V",
534 .min_uV = 1800000,
535 .max_uV = 1800000,
536 .apply_uV = 1,
537 .state_mem = {
538 .enabled = 1,
539 },
540 },
Tomasz Stanislawskib74f2fb2011-09-16 18:48:52 +0900541 .num_consumer_supplies = 1,
542 .consumer_supplies = &buck3_consumer,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900543};
544
545static struct regulator_init_data goni_buck4_data = {
546 .constraints = {
547 .name = "CAM_CORE_1.2V",
548 .min_uV = 1200000,
549 .max_uV = 1200000,
550 .apply_uV = 1,
551 .always_on = 1,
552 },
553};
554
555static struct max8998_regulator_data goni_regulators[] = {
556 { MAX8998_LDO2, &goni_ldo2_data },
557 { MAX8998_LDO3, &goni_ldo3_data },
558 { MAX8998_LDO4, &goni_ldo4_data },
559 { MAX8998_LDO5, &goni_ldo5_data },
560 { MAX8998_LDO6, &goni_ldo6_data },
561 { MAX8998_LDO7, &goni_ldo7_data },
562 { MAX8998_LDO8, &goni_ldo8_data },
563 { MAX8998_LDO9, &goni_ldo9_data },
564 { MAX8998_LDO10, &goni_ldo10_data },
565 { MAX8998_LDO11, &goni_ldo11_data },
566 { MAX8998_LDO12, &goni_ldo12_data },
567 { MAX8998_LDO13, &goni_ldo13_data },
568 { MAX8998_LDO14, &goni_ldo14_data },
569 { MAX8998_LDO15, &goni_ldo15_data },
570 { MAX8998_LDO16, &goni_ldo16_data },
571 { MAX8998_LDO17, &goni_ldo17_data },
572 { MAX8998_BUCK1, &goni_buck1_data },
573 { MAX8998_BUCK2, &goni_buck2_data },
574 { MAX8998_BUCK3, &goni_buck3_data },
575 { MAX8998_BUCK4, &goni_buck4_data },
576};
577
578static struct max8998_platform_data goni_max8998_pdata = {
579 .num_regulators = ARRAY_SIZE(goni_regulators),
580 .regulators = goni_regulators,
Marek Szyprowskicb186882010-12-17 14:47:42 +0900581 .buck1_set1 = S5PV210_GPH0(3),
582 .buck1_set2 = S5PV210_GPH0(4),
583 .buck2_set3 = S5PV210_GPH0(5),
Marek Szyprowski979f3952011-02-18 17:47:34 +0900584 .buck1_voltage1 = 1200000,
585 .buck1_voltage2 = 1200000,
586 .buck1_voltage3 = 1200000,
587 .buck1_voltage4 = 1200000,
588 .buck2_voltage1 = 1200000,
589 .buck2_voltage2 = 1200000,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900590};
591#endif
592
Chanwoo Choi80849792010-10-14 17:25:57 +0900593static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = {
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900594 REGULATOR_SUPPLY("DBVDD", "5-001a"),
595 REGULATOR_SUPPLY("AVDD2", "5-001a"),
596 REGULATOR_SUPPLY("CPVDD", "5-001a"),
Chanwoo Choi80849792010-10-14 17:25:57 +0900597};
598
599static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = {
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900600 REGULATOR_SUPPLY("SPKVDD1", "5-001a"),
601 REGULATOR_SUPPLY("SPKVDD2", "5-001a"),
Chanwoo Choi80849792010-10-14 17:25:57 +0900602};
603
604static struct regulator_init_data wm8994_fixed_voltage0_init_data = {
605 .constraints = {
606 .always_on = 1,
607 },
608 .num_consumer_supplies = ARRAY_SIZE(wm8994_fixed_voltage0_supplies),
609 .consumer_supplies = wm8994_fixed_voltage0_supplies,
610};
611
612static struct regulator_init_data wm8994_fixed_voltage1_init_data = {
613 .constraints = {
614 .always_on = 1,
615 },
616 .num_consumer_supplies = ARRAY_SIZE(wm8994_fixed_voltage1_supplies),
617 .consumer_supplies = wm8994_fixed_voltage1_supplies,
618};
619
620static struct fixed_voltage_config wm8994_fixed_voltage0_config = {
621 .supply_name = "VCC_1.8V_PDA",
622 .microvolts = 1800000,
623 .gpio = -EINVAL,
624 .init_data = &wm8994_fixed_voltage0_init_data,
625};
626
627static struct fixed_voltage_config wm8994_fixed_voltage1_config = {
628 .supply_name = "V_BAT",
629 .microvolts = 3700000,
630 .gpio = -EINVAL,
631 .init_data = &wm8994_fixed_voltage1_init_data,
632};
633
634static struct platform_device wm8994_fixed_voltage0 = {
635 .name = "reg-fixed-voltage",
636 .id = 0,
637 .dev = {
638 .platform_data = &wm8994_fixed_voltage0_config,
639 },
640};
641
642static struct platform_device wm8994_fixed_voltage1 = {
643 .name = "reg-fixed-voltage",
644 .id = 1,
645 .dev = {
646 .platform_data = &wm8994_fixed_voltage1_config,
647 },
648};
649
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900650static struct regulator_consumer_supply wm8994_avdd1_supply =
651 REGULATOR_SUPPLY("AVDD1", "5-001a");
Chanwoo Choi80849792010-10-14 17:25:57 +0900652
Kukjin Kimd3f9c572011-01-28 18:22:10 +0900653static struct regulator_consumer_supply wm8994_dcvdd_supply =
654 REGULATOR_SUPPLY("DCVDD", "5-001a");
Chanwoo Choi80849792010-10-14 17:25:57 +0900655
656static struct regulator_init_data wm8994_ldo1_data = {
657 .constraints = {
658 .name = "AVDD1_3.0V",
659 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
660 },
661 .num_consumer_supplies = 1,
662 .consumer_supplies = &wm8994_avdd1_supply,
663};
664
665static struct regulator_init_data wm8994_ldo2_data = {
666 .constraints = {
667 .name = "DCVDD_1.0V",
668 },
669 .num_consumer_supplies = 1,
670 .consumer_supplies = &wm8994_dcvdd_supply,
671};
672
673static struct wm8994_pdata wm8994_platform_data = {
674 /* configure gpio1 function: 0x0001(Logic level input/output) */
675 .gpio_defaults[0] = 0x0001,
676 /* configure gpio3/4/5/7 function for AIF2 voice */
677 .gpio_defaults[2] = 0x8100,
678 .gpio_defaults[3] = 0x8100,
679 .gpio_defaults[4] = 0x8100,
680 .gpio_defaults[6] = 0x0100,
681 /* configure gpio8/9/10/11 function for AIF3 BT */
682 .gpio_defaults[7] = 0x8100,
683 .gpio_defaults[8] = 0x0100,
684 .gpio_defaults[9] = 0x0100,
685 .gpio_defaults[10] = 0x0100,
Kukjin Kim70499322012-04-05 15:48:25 -0700686 .ldo[0] = { S5PV210_MP03(6), &wm8994_ldo1_data }, /* XM0FRNB_2 */
687 .ldo[1] = { 0, &wm8994_ldo2_data },
Chanwoo Choi80849792010-10-14 17:25:57 +0900688};
689
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900690/* GPIO I2C PMIC */
691#define AP_I2C_GPIO_PMIC_BUS_4 4
692static struct i2c_gpio_platform_data goni_i2c_gpio_pmic_data = {
693 .sda_pin = S5PV210_GPJ4(0), /* XMSMCSN */
694 .scl_pin = S5PV210_GPJ4(3), /* XMSMIRQN */
695};
696
697static struct platform_device goni_i2c_gpio_pmic = {
698 .name = "i2c-gpio",
699 .id = AP_I2C_GPIO_PMIC_BUS_4,
700 .dev = {
701 .platform_data = &goni_i2c_gpio_pmic_data,
702 },
703};
704
705static struct i2c_board_info i2c_gpio_pmic_devs[] __initdata = {
706#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
707 {
708 /* 0xCC when SRAD = 0 */
709 I2C_BOARD_INFO("max8998", 0xCC >> 1),
710 .platform_data = &goni_max8998_pdata,
711 },
712#endif
713};
714
Chanwoo Choi51122672010-10-14 15:02:44 +0900715/* GPIO I2C AP 1.8V */
716#define AP_I2C_GPIO_BUS_5 5
717static struct i2c_gpio_platform_data goni_i2c_gpio5_data = {
718 .sda_pin = S5PV210_MP05(3), /* XM0ADDR_11 */
719 .scl_pin = S5PV210_MP05(2), /* XM0ADDR_10 */
720};
721
722static struct platform_device goni_i2c_gpio5 = {
723 .name = "i2c-gpio",
724 .id = AP_I2C_GPIO_BUS_5,
725 .dev = {
726 .platform_data = &goni_i2c_gpio5_data,
727 },
728};
729
730static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
731 {
732 /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
733 I2C_BOARD_INFO("wm8994", 0x1a),
Chanwoo Choi80849792010-10-14 17:25:57 +0900734 .platform_data = &wm8994_platform_data,
Chanwoo Choi51122672010-10-14 15:02:44 +0900735 },
736};
737
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900738/* PMIC Power button */
739static struct gpio_keys_button goni_gpio_keys_table[] = {
740 {
741 .code = KEY_POWER,
742 .gpio = S5PV210_GPH2(6),
743 .desc = "gpio-keys: KEY_POWER",
744 .type = EV_KEY,
745 .active_low = 1,
746 .wakeup = 1,
747 .debounce_interval = 1,
748 },
749};
750
751static struct gpio_keys_platform_data goni_gpio_keys_data = {
752 .buttons = goni_gpio_keys_table,
753 .nbuttons = ARRAY_SIZE(goni_gpio_keys_table),
754};
755
756static struct platform_device goni_device_gpiokeys = {
757 .name = "gpio-keys",
758 .dev = {
759 .platform_data = &goni_gpio_keys_data,
760 },
761};
762
763static void __init goni_pmic_init(void)
764{
765 /* AP_PMIC_IRQ: EINT7 */
766 s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(0xf));
767 s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_UP);
768
769 /* nPower: EINT22 */
770 s3c_gpio_cfgpin(S5PV210_GPH2(6), S3C_GPIO_SFN(0xf));
771 s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP);
772}
773
Marek Szyprowski19b90c72010-08-05 18:00:18 +0900774/* MoviNAND */
775static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = {
776 .max_width = 4,
777 .cd_type = S3C_SDHCI_CD_PERMANENT,
778};
779
780/* Wireless LAN */
781static struct s3c_sdhci_platdata goni_hsmmc1_data __initdata = {
782 .max_width = 4,
783 .cd_type = S3C_SDHCI_CD_EXTERNAL,
784 /* ext_cd_{init,cleanup} callbacks will be added later */
785};
786
787/* External Flash */
788#define GONI_EXT_FLASH_EN S5PV210_MP05(4)
789#define GONI_EXT_FLASH_CD S5PV210_GPH3(4)
790static struct s3c_sdhci_platdata goni_hsmmc2_data __initdata = {
791 .max_width = 4,
792 .cd_type = S3C_SDHCI_CD_GPIO,
793 .ext_cd_gpio = GONI_EXT_FLASH_CD,
794 .ext_cd_gpio_invert = 1,
795};
796
Marek Szyprowskie9dde6f12010-09-29 22:05:19 +0900797static struct regulator_consumer_supply mmc2_supplies[] = {
798 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
799};
800
801static struct regulator_init_data mmc2_fixed_voltage_init_data = {
802 .constraints = {
803 .name = "V_TF_2.8V",
804 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
805 },
806 .num_consumer_supplies = ARRAY_SIZE(mmc2_supplies),
807 .consumer_supplies = mmc2_supplies,
808};
809
810static struct fixed_voltage_config mmc2_fixed_voltage_config = {
811 .supply_name = "EXT_FLASH_EN",
812 .microvolts = 2800000,
813 .gpio = GONI_EXT_FLASH_EN,
814 .enable_high = true,
815 .init_data = &mmc2_fixed_voltage_init_data,
816};
817
818static struct platform_device mmc2_fixed_voltage = {
819 .name = "reg-fixed-voltage",
820 .id = 2,
821 .dev = {
822 .platform_data = &mmc2_fixed_voltage_config,
823 },
824};
825
Marek Szyprowski19b90c72010-08-05 18:00:18 +0900826static void goni_setup_sdhci(void)
827{
Marek Szyprowski19b90c72010-08-05 18:00:18 +0900828 s3c_sdhci0_set_platdata(&goni_hsmmc0_data);
829 s3c_sdhci1_set_platdata(&goni_hsmmc1_data);
830 s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
831};
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900832
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +0900833static struct noon010pc30_platform_data noon010pc30_pldata = {
834 .clk_rate = 16000000UL,
835 .gpio_nreset = S5PV210_GPB(2), /* CAM_CIF_NRST */
836 .gpio_nstby = S5PV210_GPB(0), /* CAM_CIF_NSTBY */
837};
838
839static struct i2c_board_info noon010pc30_board_info = {
840 I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1),
841 .platform_data = &noon010pc30_pldata,
842};
843
844static struct s5p_fimc_isp_info goni_camera_sensors[] = {
845 {
846 .mux_id = 0,
847 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
848 V4L2_MBUS_VSYNC_ACTIVE_LOW,
849 .bus_type = FIMC_ITU_601,
850 .board_info = &noon010pc30_board_info,
851 .i2c_bus_num = 0,
852 .clk_frequency = 16000000UL,
853 },
854};
855
Kukjin Kim85fd1782012-01-21 11:10:31 +0900856static struct s5p_platform_fimc goni_fimc_md_platdata __initdata = {
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +0900857 .isp_info = goni_camera_sensors,
858 .num_clients = ARRAY_SIZE(goni_camera_sensors),
859};
860
Sachin Kamatd633ada2012-07-12 17:48:57 +0900861/* Audio device */
862static struct platform_device goni_device_audio = {
863 .name = "smdk-audio",
864 .id = -1,
865};
866
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900867static struct platform_device *goni_devices[] __initdata = {
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900868 &s3c_device_fb,
Kukjin Kim13904fb2010-08-27 13:56:54 +0900869 &s5p_device_onenand,
Marek Szyprowski8415d5c2010-10-04 16:39:20 +0900870 &goni_spi_gpio,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900871 &goni_i2c_gpio_pmic,
Chanwoo Choi51122672010-10-14 15:02:44 +0900872 &goni_i2c_gpio5,
Sachin Kamatd633ada2012-07-12 17:48:57 +0900873 &goni_device_audio,
Marek Szyprowskie9dde6f12010-09-29 22:05:19 +0900874 &mmc2_fixed_voltage,
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900875 &goni_device_gpiokeys,
Kamil Debski66eb1232011-07-21 16:43:14 +0900876 &s5p_device_mfc,
877 &s5p_device_mfc_l,
878 &s5p_device_mfc_r,
Tomasz Stanislawskib74f2fb2011-09-16 18:48:52 +0900879 &s5p_device_mixer,
880 &s5p_device_sdo,
Sylwester Nawrocki9c4f0a32011-02-15 14:27:44 +0900881 &s3c_device_i2c0,
Sylwester Nawrocki9f488c62010-08-09 16:55:34 +0900882 &s5p_device_fimc0,
883 &s5p_device_fimc1,
884 &s5p_device_fimc2,
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +0900885 &s5p_device_fimc_md,
Marek Szyprowski19b90c72010-08-05 18:00:18 +0900886 &s3c_device_hsmmc0,
887 &s3c_device_hsmmc1,
888 &s3c_device_hsmmc2,
Chanwoo Choi6c29e712010-10-14 16:00:42 +0900889 &s5pv210_device_iis0,
Marek Szyprowskid5889d52010-09-30 20:59:46 +0900890 &s3c_device_usb_hsotg,
Joonyoung Shim2a555582010-09-09 08:17:43 +0900891 &samsung_device_keypad,
Marek Szyprowski528ef1b2010-10-04 16:39:22 +0900892 &s3c_device_i2c1,
Marek Szyprowskib4a0dca2010-10-04 18:38:12 +0900893 &s3c_device_i2c2,
Chanwoo Choi80849792010-10-14 17:25:57 +0900894 &wm8994_fixed_voltage0,
895 &wm8994_fixed_voltage1,
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900896};
897
Chanwoo Choi6c29e712010-10-14 16:00:42 +0900898static void __init goni_sound_init(void)
899{
900 /* Ths main clock of WM8994 codec uses the output of CLKOUT pin.
901 * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS)
902 * because it needs 24MHz clock to operate WM8994 codec.
903 */
904 __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
905}
906
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900907static void __init goni_map_io(void)
908{
Kukjin Kim3fa754c2011-12-22 23:32:07 +0100909 s5pv210_init_io(NULL, 0);
Kukjin Kim2e274372012-07-12 18:03:52 +0900910 s3c24xx_init_clocks(clk_xusbxti.rate);
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900911 s3c24xx_init_uarts(goni_uartcfgs, ARRAY_SIZE(goni_uartcfgs));
Sangbeom Kim20780fc2011-03-12 08:02:12 +0900912 s5p_set_timer_source(S5P_PWM3, S5P_PWM4);
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900913}
914
Kamil Debski66eb1232011-07-21 16:43:14 +0900915static void __init goni_reserve(void)
916{
917 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
918}
919
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900920static void __init goni_machine_init(void)
921{
Marek Szyprowski528ef1b2010-10-04 16:39:22 +0900922 /* Radio: call before I2C 1 registeration */
923 goni_radio_init();
924
Sylwester Nawrocki9c4f0a32011-02-15 14:27:44 +0900925 /* I2C0 */
926 s3c_i2c0_set_platdata(NULL);
927
Marek Szyprowski528ef1b2010-10-04 16:39:22 +0900928 /* I2C1 */
929 s3c_i2c1_set_platdata(NULL);
930 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
931
Marek Szyprowskib4a0dca2010-10-04 18:38:12 +0900932 /* TSP: call before I2C 2 registeration */
933 goni_tsp_init();
934
935 /* I2C2 */
936 s3c_i2c2_set_platdata(&i2c2_data);
937 i2c_register_board_info(2, i2c2_devs, ARRAY_SIZE(i2c2_devs));
938
Marek Szyprowskiba149f32010-07-14 19:39:47 +0900939 /* PMIC */
940 goni_pmic_init();
941 i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs,
942 ARRAY_SIZE(i2c_gpio_pmic_devs));
Marek Szyprowski19b90c72010-08-05 18:00:18 +0900943 /* SDHCI */
944 goni_setup_sdhci();
945
Chanwoo Choi51122672010-10-14 15:02:44 +0900946 /* SOUND */
Chanwoo Choi6c29e712010-10-14 16:00:42 +0900947 goni_sound_init();
Chanwoo Choi51122672010-10-14 15:02:44 +0900948 i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs,
949 ARRAY_SIZE(i2c_gpio5_devs));
950
Marek Szyprowski3965fde2010-07-14 19:38:18 +0900951 /* FB */
952 s3c_fb_set_platdata(&goni_lcd_pdata);
953
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +0900954 /* FIMC */
955 s3c_set_platdata(&goni_fimc_md_platdata, sizeof(goni_fimc_md_platdata),
956 &s5p_device_fimc_md);
957
Lukasz Majewski460dcb02012-05-13 08:24:14 +0900958 s3c_hsotg_set_platdata(&goni_hsotg_pdata);
959
Sylwester Nawrocki39aefab2011-09-27 07:18:55 +0900960 goni_camera_init();
961
Marek Szyprowski8415d5c2010-10-04 16:39:20 +0900962 /* SPI */
963 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
964
Joonyoung Shim2a555582010-09-09 08:17:43 +0900965 /* KEYPAD */
966 samsung_keypad_set_platdata(&keypad_data);
967
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900968 platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices));
969}
970
971MACHINE_START(GONI, "GONI")
972 /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */
Nicolas Pitre02350a1f2011-07-05 22:38:17 -0400973 .atag_offset = 0x100,
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900974 .init_irq = s5pv210_init_irq,
Jamie Ilesbb3a4eb2011-09-27 20:53:31 +0100975 .handle_irq = vic_handle_irq,
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900976 .map_io = goni_map_io,
977 .init_machine = goni_machine_init,
Stephen Warren6bb27d72012-11-08 12:40:59 -0700978 .init_time = s5p_timer_init,
Kamil Debski66eb1232011-07-21 16:43:14 +0900979 .reserve = &goni_reserve,
Russell King1f34f0e2011-12-22 23:36:02 +0100980 .restart = s5pv210_restart,
Joonyoung Shim2e57da42010-05-19 23:15:32 +0900981MACHINE_END