1 /* linux/arch/arm/mach-s5pv210/mach-goni.c
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
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.
11 #include <linux/kernel.h>
12 #include <linux/types.h>
13 #include <linux/init.h>
14 #include <linux/serial_core.h>
16 #include <linux/i2c.h>
17 #include <linux/i2c-gpio.h>
18 #include <linux/i2c/atmel_mxt_ts.h>
19 #include <linux/mfd/max8998.h>
20 #include <linux/mfd/wm8994/pdata.h>
21 #include <linux/regulator/fixed.h>
22 #include <linux/spi/spi.h>
23 #include <linux/spi/spi_gpio.h>
24 #include <linux/lcd.h>
25 #include <linux/gpio_keys.h>
26 #include <linux/input.h>
27 #include <linux/gpio.h>
28 #include <linux/mmc/host.h>
29 #include <linux/interrupt.h>
30 #include <linux/platform_data/s3c-hsotg.h>
32 #include <asm/mach/arch.h>
33 #include <asm/mach/map.h>
34 #include <asm/setup.h>
35 #include <asm/mach-types.h>
37 #include <video/samsung_fimd.h>
39 #include <mach/regs-clock.h>
41 #include <plat/gpio-cfg.h>
42 #include <plat/regs-serial.h>
43 #include <plat/devs.h>
46 #include <linux/platform_data/i2c-s3c2410.h>
47 #include <plat/keypad.h>
48 #include <plat/sdhci.h>
49 #include <plat/clock.h>
50 #include <plat/samsung-time.h>
52 #include <plat/camport.h>
54 #include <media/v4l2-mediabus.h>
55 #include <media/s5p_fimc.h>
56 #include <media/noon010pc30.h>
60 /* Following are default values for UCON, ULCON and UFCON UART registers */
61 #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
62 S3C2410_UCON_RXILEVEL | \
63 S3C2410_UCON_TXIRQMODE | \
64 S3C2410_UCON_RXIRQMODE | \
65 S3C2410_UCON_RXFIFO_TOI | \
66 S3C2443_UCON_RXERR_IRQEN)
68 #define GONI_ULCON_DEFAULT S3C2410_LCON_CS8
70 #define GONI_UFCON_DEFAULT S3C2410_UFCON_FIFOMODE
72 static struct s3c2410_uartcfg goni_uartcfgs
[] __initdata
= {
76 .ucon
= GONI_UCON_DEFAULT
,
77 .ulcon
= GONI_ULCON_DEFAULT
,
78 .ufcon
= GONI_UFCON_DEFAULT
|
79 S5PV210_UFCON_TXTRIG256
| S5PV210_UFCON_RXTRIG256
,
84 .ucon
= GONI_UCON_DEFAULT
,
85 .ulcon
= GONI_ULCON_DEFAULT
,
86 .ufcon
= GONI_UFCON_DEFAULT
|
87 S5PV210_UFCON_TXTRIG64
| S5PV210_UFCON_RXTRIG64
,
92 .ucon
= GONI_UCON_DEFAULT
,
93 .ulcon
= GONI_ULCON_DEFAULT
,
94 .ufcon
= GONI_UFCON_DEFAULT
|
95 S5PV210_UFCON_TXTRIG16
| S5PV210_UFCON_RXTRIG16
,
100 .ucon
= GONI_UCON_DEFAULT
,
101 .ulcon
= GONI_ULCON_DEFAULT
,
102 .ufcon
= GONI_UFCON_DEFAULT
|
103 S5PV210_UFCON_TXTRIG16
| S5PV210_UFCON_RXTRIG16
,
108 static struct s3c_fb_pd_win goni_fb_win0
= {
114 .virtual_y
= 2 * 800,
117 static struct fb_videomode goni_lcd_timing
= {
129 static struct s3c_fb_platdata goni_lcd_pdata __initdata
= {
130 .win
[0] = &goni_fb_win0
,
131 .vtiming
= &goni_lcd_timing
,
132 .vidcon0
= VIDCON0_VIDOUT_RGB
| VIDCON0_PNRMODE_RGB
|
134 .vidcon1
= VIDCON1_INV_VCLK
| VIDCON1_INV_VDEN
135 | VIDCON1_INV_HSYNC
| VIDCON1_INV_VSYNC
,
136 .setup_gpio
= s5pv210_fb_gpio_setup_24bpp
,
139 static int lcd_power_on(struct lcd_device
*ld
, int enable
)
144 static int reset_lcd(struct lcd_device
*ld
)
146 static unsigned int first
= 1;
149 reset_gpio
= S5PV210_MP05(5);
152 gpio_request(reset_gpio
, "MLCD_RST");
156 gpio_direction_output(reset_gpio
, 1);
160 static struct lcd_platform_data goni_lcd_platform_data
= {
162 .power_on
= lcd_power_on
,
164 .reset_delay
= 120, /* 120ms */
165 .power_on_delay
= 25, /* 25ms */
166 .power_off_delay
= 200, /* 200ms */
169 #define LCD_BUS_NUM 3
170 static struct spi_board_info spi_board_info
[] __initdata
= {
172 .modalias
= "s6e63m0",
173 .platform_data
= &goni_lcd_platform_data
,
174 .max_speed_hz
= 1200000,
175 .bus_num
= LCD_BUS_NUM
,
178 .controller_data
= (void *)S5PV210_MP01(1), /* DISPLAY_CS */
182 static struct spi_gpio_platform_data lcd_spi_gpio_data
= {
183 .sck
= S5PV210_MP04(1), /* DISPLAY_CLK */
184 .mosi
= S5PV210_MP04(3), /* DISPLAY_SI */
185 .miso
= SPI_GPIO_NO_MISO
,
189 static struct platform_device goni_spi_gpio
= {
193 .parent
= &s3c_device_fb
.dev
,
194 .platform_data
= &lcd_spi_gpio_data
,
199 static uint32_t keymap
[] __initdata
= {
200 /* KEY(row, col, keycode) */
201 KEY(0, 1, KEY_MENU
), /* Send */
202 KEY(0, 2, KEY_BACK
), /* End */
203 KEY(1, 1, KEY_CONFIG
), /* Half shot */
204 KEY(1, 2, KEY_VOLUMEUP
),
205 KEY(2, 1, KEY_CAMERA
), /* Full shot */
206 KEY(2, 2, KEY_VOLUMEDOWN
),
209 static struct matrix_keymap_data keymap_data __initdata
= {
211 .keymap_size
= ARRAY_SIZE(keymap
),
214 static struct samsung_keypad_platdata keypad_data __initdata
= {
215 .keymap_data
= &keymap_data
,
221 static struct i2c_board_info i2c1_devs
[] __initdata
= {
223 I2C_BOARD_INFO("si470x", 0x10),
227 static void __init
goni_radio_init(void)
231 gpio
= S5PV210_GPJ2(4); /* XMSMDATA_4 */
232 gpio_request(gpio
, "FM_INT");
233 s3c_gpio_cfgpin(gpio
, S3C_GPIO_SFN(0xf));
234 i2c1_devs
[0].irq
= gpio_to_irq(gpio
);
236 gpio
= S5PV210_GPJ2(5); /* XMSMDATA_5 */
237 gpio_request_one(gpio
, GPIOF_OUT_INIT_HIGH
, "FM_RST");
241 static struct mxt_platform_data qt602240_platform_data
= {
248 .voltage
= 2800000, /* 2.8V */
249 .orient
= MXT_DIAGONAL
,
250 .irqflags
= IRQF_TRIGGER_FALLING
,
253 static struct s3c2410_platform_i2c i2c2_data __initdata
= {
257 .frequency
= 400 * 1000,
261 static struct i2c_board_info i2c2_devs
[] __initdata
= {
263 I2C_BOARD_INFO("qt602240_ts", 0x4a),
264 .platform_data
= &qt602240_platform_data
,
268 static void __init
goni_tsp_init(void)
272 gpio
= S5PV210_GPJ1(3); /* XMSMADDR_11 */
273 gpio_request_one(gpio
, GPIOF_OUT_INIT_HIGH
, "TSP_LDO_ON");
274 gpio_export(gpio
, 0);
276 gpio
= S5PV210_GPJ0(5); /* XMSMADDR_5 */
277 gpio_request(gpio
, "TSP_INT");
279 s5p_register_gpio_interrupt(gpio
);
280 s3c_gpio_cfgpin(gpio
, S3C_GPIO_SFN(0xf));
281 s3c_gpio_setpull(gpio
, S3C_GPIO_PULL_UP
);
282 i2c2_devs
[0].irq
= gpio_to_irq(gpio
);
286 static struct s3c_hsotg_plat goni_hsotg_pdata
;
288 static void goni_camera_init(void)
290 s5pv210_fimc_setup_gpio(S5P_CAMPORT_A
);
292 /* Set max driver strength on CAM_A_CLKOUT pin. */
293 s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4
);
296 /* MAX8998 regulators */
297 #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
299 static struct regulator_consumer_supply goni_ldo3_consumers
[] = {
300 REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
303 static struct regulator_consumer_supply goni_ldo5_consumers
[] = {
304 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
307 static struct regulator_consumer_supply goni_ldo8_consumers
[] = {
308 REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
309 REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
312 static struct regulator_consumer_supply goni_ldo11_consumers
[] = {
313 REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */
316 static struct regulator_consumer_supply goni_ldo13_consumers
[] = {
317 REGULATOR_SUPPLY("vdda", "0-0030"), /* "CAM_A_2.8V" */
320 static struct regulator_consumer_supply goni_ldo14_consumers
[] = {
321 REGULATOR_SUPPLY("vdd_core", "0-0030"), /* "CAM_CIF_1.8V" */
324 static struct regulator_init_data goni_ldo2_data
= {
326 .name
= "VALIVE_1.1V",
337 static struct regulator_init_data goni_ldo3_data
= {
339 .name
= "VUSB+MIPI_1.1V",
343 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
345 .num_consumer_supplies
= ARRAY_SIZE(goni_ldo3_consumers
),
346 .consumer_supplies
= goni_ldo3_consumers
,
349 static struct regulator_init_data goni_ldo4_data
= {
358 static struct regulator_init_data goni_ldo5_data
= {
364 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
366 .num_consumer_supplies
= ARRAY_SIZE(goni_ldo5_consumers
),
367 .consumer_supplies
= goni_ldo5_consumers
,
370 static struct regulator_init_data goni_ldo6_data
= {
379 static struct regulator_init_data goni_ldo7_data
= {
389 static struct regulator_init_data goni_ldo8_data
= {
391 .name
= "VUSB+VADC_3.3V",
395 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
397 .num_consumer_supplies
= ARRAY_SIZE(goni_ldo8_consumers
),
398 .consumer_supplies
= goni_ldo8_consumers
,
401 static struct regulator_init_data goni_ldo9_data
= {
403 .name
= "VCC+VCAM_2.8V",
410 static struct regulator_init_data goni_ldo10_data
= {
420 static struct regulator_init_data goni_ldo11_data
= {
422 .name
= "CAM_IO_2.8V",
426 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
428 .num_consumer_supplies
= ARRAY_SIZE(goni_ldo11_consumers
),
429 .consumer_supplies
= goni_ldo11_consumers
,
432 static struct regulator_init_data goni_ldo12_data
= {
434 .name
= "CAM_ISP_1.2V",
441 static struct regulator_init_data goni_ldo13_data
= {
443 .name
= "CAM_A_2.8V",
447 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
449 .num_consumer_supplies
= ARRAY_SIZE(goni_ldo13_consumers
),
450 .consumer_supplies
= goni_ldo13_consumers
,
453 static struct regulator_init_data goni_ldo14_data
= {
455 .name
= "CAM_CIF_1.8V",
459 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
461 .num_consumer_supplies
= ARRAY_SIZE(goni_ldo14_consumers
),
462 .consumer_supplies
= goni_ldo14_consumers
,
465 static struct regulator_init_data goni_ldo15_data
= {
467 .name
= "CAM_AF_3.3V",
474 static struct regulator_init_data goni_ldo16_data
= {
476 .name
= "VMIPI_1.8V",
483 static struct regulator_init_data goni_ldo17_data
= {
485 .name
= "VCC_3.0V_LCD",
494 static struct regulator_consumer_supply buck1_consumer
=
495 REGULATOR_SUPPLY("vddarm", NULL
);
497 static struct regulator_consumer_supply buck2_consumer
=
498 REGULATOR_SUPPLY("vddint", NULL
);
500 static struct regulator_consumer_supply buck3_consumer
=
501 REGULATOR_SUPPLY("vdet", "s5p-sdo");
504 static struct regulator_init_data goni_buck1_data
= {
510 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
|
511 REGULATOR_CHANGE_STATUS
,
513 .num_consumer_supplies
= 1,
514 .consumer_supplies
= &buck1_consumer
,
517 static struct regulator_init_data goni_buck2_data
= {
523 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
|
524 REGULATOR_CHANGE_STATUS
,
526 .num_consumer_supplies
= 1,
527 .consumer_supplies
= &buck2_consumer
,
530 static struct regulator_init_data goni_buck3_data
= {
540 .num_consumer_supplies
= 1,
541 .consumer_supplies
= &buck3_consumer
,
544 static struct regulator_init_data goni_buck4_data
= {
546 .name
= "CAM_CORE_1.2V",
554 static struct max8998_regulator_data goni_regulators
[] = {
555 { MAX8998_LDO2
, &goni_ldo2_data
},
556 { MAX8998_LDO3
, &goni_ldo3_data
},
557 { MAX8998_LDO4
, &goni_ldo4_data
},
558 { MAX8998_LDO5
, &goni_ldo5_data
},
559 { MAX8998_LDO6
, &goni_ldo6_data
},
560 { MAX8998_LDO7
, &goni_ldo7_data
},
561 { MAX8998_LDO8
, &goni_ldo8_data
},
562 { MAX8998_LDO9
, &goni_ldo9_data
},
563 { MAX8998_LDO10
, &goni_ldo10_data
},
564 { MAX8998_LDO11
, &goni_ldo11_data
},
565 { MAX8998_LDO12
, &goni_ldo12_data
},
566 { MAX8998_LDO13
, &goni_ldo13_data
},
567 { MAX8998_LDO14
, &goni_ldo14_data
},
568 { MAX8998_LDO15
, &goni_ldo15_data
},
569 { MAX8998_LDO16
, &goni_ldo16_data
},
570 { MAX8998_LDO17
, &goni_ldo17_data
},
571 { MAX8998_BUCK1
, &goni_buck1_data
},
572 { MAX8998_BUCK2
, &goni_buck2_data
},
573 { MAX8998_BUCK3
, &goni_buck3_data
},
574 { MAX8998_BUCK4
, &goni_buck4_data
},
577 static struct max8998_platform_data goni_max8998_pdata
= {
578 .num_regulators
= ARRAY_SIZE(goni_regulators
),
579 .regulators
= goni_regulators
,
580 .buck1_set1
= S5PV210_GPH0(3),
581 .buck1_set2
= S5PV210_GPH0(4),
582 .buck2_set3
= S5PV210_GPH0(5),
583 .buck1_voltage
= { 1200000, 1200000, 1200000, 1200000 },
584 .buck2_voltage
= { 1200000, 1200000 },
588 static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies
[] = {
589 REGULATOR_SUPPLY("DBVDD", "5-001a"),
590 REGULATOR_SUPPLY("AVDD2", "5-001a"),
591 REGULATOR_SUPPLY("CPVDD", "5-001a"),
594 static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies
[] = {
595 REGULATOR_SUPPLY("SPKVDD1", "5-001a"),
596 REGULATOR_SUPPLY("SPKVDD2", "5-001a"),
599 static struct regulator_init_data wm8994_fixed_voltage0_init_data
= {
603 .num_consumer_supplies
= ARRAY_SIZE(wm8994_fixed_voltage0_supplies
),
604 .consumer_supplies
= wm8994_fixed_voltage0_supplies
,
607 static struct regulator_init_data wm8994_fixed_voltage1_init_data
= {
611 .num_consumer_supplies
= ARRAY_SIZE(wm8994_fixed_voltage1_supplies
),
612 .consumer_supplies
= wm8994_fixed_voltage1_supplies
,
615 static struct fixed_voltage_config wm8994_fixed_voltage0_config
= {
616 .supply_name
= "VCC_1.8V_PDA",
617 .microvolts
= 1800000,
619 .init_data
= &wm8994_fixed_voltage0_init_data
,
622 static struct fixed_voltage_config wm8994_fixed_voltage1_config
= {
623 .supply_name
= "V_BAT",
624 .microvolts
= 3700000,
626 .init_data
= &wm8994_fixed_voltage1_init_data
,
629 static struct platform_device wm8994_fixed_voltage0
= {
630 .name
= "reg-fixed-voltage",
633 .platform_data
= &wm8994_fixed_voltage0_config
,
637 static struct platform_device wm8994_fixed_voltage1
= {
638 .name
= "reg-fixed-voltage",
641 .platform_data
= &wm8994_fixed_voltage1_config
,
645 static struct regulator_consumer_supply wm8994_avdd1_supply
=
646 REGULATOR_SUPPLY("AVDD1", "5-001a");
648 static struct regulator_consumer_supply wm8994_dcvdd_supply
=
649 REGULATOR_SUPPLY("DCVDD", "5-001a");
651 static struct regulator_init_data wm8994_ldo1_data
= {
653 .name
= "AVDD1_3.0V",
654 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
656 .num_consumer_supplies
= 1,
657 .consumer_supplies
= &wm8994_avdd1_supply
,
660 static struct regulator_init_data wm8994_ldo2_data
= {
662 .name
= "DCVDD_1.0V",
664 .num_consumer_supplies
= 1,
665 .consumer_supplies
= &wm8994_dcvdd_supply
,
668 static struct wm8994_pdata wm8994_platform_data
= {
669 /* configure gpio1 function: 0x0001(Logic level input/output) */
670 .gpio_defaults
[0] = 0x0001,
671 /* configure gpio3/4/5/7 function for AIF2 voice */
672 .gpio_defaults
[2] = 0x8100,
673 .gpio_defaults
[3] = 0x8100,
674 .gpio_defaults
[4] = 0x8100,
675 .gpio_defaults
[6] = 0x0100,
676 /* configure gpio8/9/10/11 function for AIF3 BT */
677 .gpio_defaults
[7] = 0x8100,
678 .gpio_defaults
[8] = 0x0100,
679 .gpio_defaults
[9] = 0x0100,
680 .gpio_defaults
[10] = 0x0100,
681 .ldo
[0] = { S5PV210_MP03(6), &wm8994_ldo1_data
}, /* XM0FRNB_2 */
682 .ldo
[1] = { 0, &wm8994_ldo2_data
},
686 #define AP_I2C_GPIO_PMIC_BUS_4 4
687 static struct i2c_gpio_platform_data goni_i2c_gpio_pmic_data
= {
688 .sda_pin
= S5PV210_GPJ4(0), /* XMSMCSN */
689 .scl_pin
= S5PV210_GPJ4(3), /* XMSMIRQN */
692 static struct platform_device goni_i2c_gpio_pmic
= {
694 .id
= AP_I2C_GPIO_PMIC_BUS_4
,
696 .platform_data
= &goni_i2c_gpio_pmic_data
,
700 static struct i2c_board_info i2c_gpio_pmic_devs
[] __initdata
= {
701 #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
703 /* 0xCC when SRAD = 0 */
704 I2C_BOARD_INFO("max8998", 0xCC >> 1),
705 .platform_data
= &goni_max8998_pdata
,
710 /* GPIO I2C AP 1.8V */
711 #define AP_I2C_GPIO_BUS_5 5
712 static struct i2c_gpio_platform_data goni_i2c_gpio5_data
= {
713 .sda_pin
= S5PV210_MP05(3), /* XM0ADDR_11 */
714 .scl_pin
= S5PV210_MP05(2), /* XM0ADDR_10 */
717 static struct platform_device goni_i2c_gpio5
= {
719 .id
= AP_I2C_GPIO_BUS_5
,
721 .platform_data
= &goni_i2c_gpio5_data
,
725 static struct i2c_board_info i2c_gpio5_devs
[] __initdata
= {
727 /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
728 I2C_BOARD_INFO("wm8994", 0x1a),
729 .platform_data
= &wm8994_platform_data
,
733 /* PMIC Power button */
734 static struct gpio_keys_button goni_gpio_keys_table
[] = {
737 .gpio
= S5PV210_GPH2(6),
738 .desc
= "gpio-keys: KEY_POWER",
742 .debounce_interval
= 1,
746 static struct gpio_keys_platform_data goni_gpio_keys_data
= {
747 .buttons
= goni_gpio_keys_table
,
748 .nbuttons
= ARRAY_SIZE(goni_gpio_keys_table
),
751 static struct platform_device goni_device_gpiokeys
= {
754 .platform_data
= &goni_gpio_keys_data
,
758 static void __init
goni_pmic_init(void)
760 /* AP_PMIC_IRQ: EINT7 */
761 s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(0xf));
762 s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_UP
);
765 s3c_gpio_cfgpin(S5PV210_GPH2(6), S3C_GPIO_SFN(0xf));
766 s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP
);
770 static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata
= {
772 .cd_type
= S3C_SDHCI_CD_PERMANENT
,
776 static struct s3c_sdhci_platdata goni_hsmmc1_data __initdata
= {
778 .cd_type
= S3C_SDHCI_CD_EXTERNAL
,
779 /* ext_cd_{init,cleanup} callbacks will be added later */
783 #define GONI_EXT_FLASH_EN S5PV210_MP05(4)
784 #define GONI_EXT_FLASH_CD S5PV210_GPH3(4)
785 static struct s3c_sdhci_platdata goni_hsmmc2_data __initdata
= {
787 .cd_type
= S3C_SDHCI_CD_GPIO
,
788 .ext_cd_gpio
= GONI_EXT_FLASH_CD
,
789 .ext_cd_gpio_invert
= 1,
792 static struct regulator_consumer_supply mmc2_supplies
[] = {
793 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
796 static struct regulator_init_data mmc2_fixed_voltage_init_data
= {
799 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
801 .num_consumer_supplies
= ARRAY_SIZE(mmc2_supplies
),
802 .consumer_supplies
= mmc2_supplies
,
805 static struct fixed_voltage_config mmc2_fixed_voltage_config
= {
806 .supply_name
= "EXT_FLASH_EN",
807 .microvolts
= 2800000,
808 .gpio
= GONI_EXT_FLASH_EN
,
810 .init_data
= &mmc2_fixed_voltage_init_data
,
813 static struct platform_device mmc2_fixed_voltage
= {
814 .name
= "reg-fixed-voltage",
817 .platform_data
= &mmc2_fixed_voltage_config
,
821 static void goni_setup_sdhci(void)
823 s3c_sdhci0_set_platdata(&goni_hsmmc0_data
);
824 s3c_sdhci1_set_platdata(&goni_hsmmc1_data
);
825 s3c_sdhci2_set_platdata(&goni_hsmmc2_data
);
828 static struct noon010pc30_platform_data noon010pc30_pldata
= {
829 .clk_rate
= 16000000UL,
830 .gpio_nreset
= S5PV210_GPB(2), /* CAM_CIF_NRST */
831 .gpio_nstby
= S5PV210_GPB(0), /* CAM_CIF_NSTBY */
834 static struct i2c_board_info noon010pc30_board_info
= {
835 I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1),
836 .platform_data
= &noon010pc30_pldata
,
839 static struct fimc_source_info goni_camera_sensors
[] = {
842 .flags
= V4L2_MBUS_PCLK_SAMPLE_FALLING
|
843 V4L2_MBUS_VSYNC_ACTIVE_LOW
,
844 .fimc_bus_type
= FIMC_BUS_TYPE_ITU_601
,
845 .board_info
= &noon010pc30_board_info
,
847 .clk_frequency
= 16000000UL,
851 static struct s5p_platform_fimc goni_fimc_md_platdata __initdata
= {
852 .source_info
= goni_camera_sensors
,
853 .num_clients
= ARRAY_SIZE(goni_camera_sensors
),
857 static struct platform_device goni_device_audio
= {
858 .name
= "smdk-audio",
862 static struct platform_device
*goni_devices
[] __initdata
= {
870 &goni_device_gpiokeys
,
884 &s5pv210_device_iis0
,
885 &s3c_device_usb_hsotg
,
886 &samsung_device_keypad
,
889 &wm8994_fixed_voltage0
,
890 &wm8994_fixed_voltage1
,
893 static void __init
goni_sound_init(void)
895 /* Ths main clock of WM8994 codec uses the output of CLKOUT pin.
896 * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS)
897 * because it needs 24MHz clock to operate WM8994 codec.
899 __raw_writel(__raw_readl(S5P_OTHERS
) | (0x3 << 8), S5P_OTHERS
);
902 static void __init
goni_map_io(void)
904 s5pv210_init_io(NULL
, 0);
905 s3c24xx_init_clocks(clk_xusbxti
.rate
);
906 s3c24xx_init_uarts(goni_uartcfgs
, ARRAY_SIZE(goni_uartcfgs
));
907 samsung_set_timer_source(SAMSUNG_PWM3
, SAMSUNG_PWM4
);
910 static void __init
goni_reserve(void)
912 s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
915 static void __init
goni_machine_init(void)
917 /* Radio: call before I2C 1 registeration */
921 s3c_i2c0_set_platdata(NULL
);
924 s3c_i2c1_set_platdata(NULL
);
925 i2c_register_board_info(1, i2c1_devs
, ARRAY_SIZE(i2c1_devs
));
927 /* TSP: call before I2C 2 registeration */
931 s3c_i2c2_set_platdata(&i2c2_data
);
932 i2c_register_board_info(2, i2c2_devs
, ARRAY_SIZE(i2c2_devs
));
936 i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4
, i2c_gpio_pmic_devs
,
937 ARRAY_SIZE(i2c_gpio_pmic_devs
));
943 i2c_register_board_info(AP_I2C_GPIO_BUS_5
, i2c_gpio5_devs
,
944 ARRAY_SIZE(i2c_gpio5_devs
));
947 s3c_fb_set_platdata(&goni_lcd_pdata
);
950 s3c_set_platdata(&goni_fimc_md_platdata
, sizeof(goni_fimc_md_platdata
),
951 &s5p_device_fimc_md
);
953 s3c_hsotg_set_platdata(&goni_hsotg_pdata
);
958 spi_register_board_info(spi_board_info
, ARRAY_SIZE(spi_board_info
));
961 samsung_keypad_set_platdata(&keypad_data
);
963 platform_add_devices(goni_devices
, ARRAY_SIZE(goni_devices
));
966 MACHINE_START(GONI
, "GONI")
967 /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */
968 .atag_offset
= 0x100,
969 .init_irq
= s5pv210_init_irq
,
970 .map_io
= goni_map_io
,
971 .init_machine
= goni_machine_init
,
972 .init_time
= samsung_timer_init
,
973 .reserve
= &goni_reserve
,
974 .restart
= s5pv210_restart
,