diff options
Diffstat (limited to 'arch/arm/mach-exynos4/mach-universal_c210.c')
-rw-r--r-- | arch/arm/mach-exynos4/mach-universal_c210.c | 307 |
1 files changed, 300 insertions, 7 deletions
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c index 2aac6f755c8..a2a177ff4b4 100644 --- a/arch/arm/mach-exynos4/mach-universal_c210.c +++ b/arch/arm/mach-exynos4/mach-universal_c210.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/gpio_keys.h> | 14 | #include <linux/gpio_keys.h> |
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | #include <linux/fb.h> | ||
16 | #include <linux/mfd/max8998.h> | 17 | #include <linux/mfd/max8998.h> |
17 | #include <linux/regulator/machine.h> | 18 | #include <linux/regulator/machine.h> |
18 | #include <linux/regulator/fixed.h> | 19 | #include <linux/regulator/fixed.h> |
@@ -31,12 +32,21 @@ | |||
31 | #include <plat/devs.h> | 32 | #include <plat/devs.h> |
32 | #include <plat/iic.h> | 33 | #include <plat/iic.h> |
33 | #include <plat/gpio-cfg.h> | 34 | #include <plat/gpio-cfg.h> |
35 | #include <plat/fb.h> | ||
34 | #include <plat/mfc.h> | 36 | #include <plat/mfc.h> |
35 | #include <plat/sdhci.h> | 37 | #include <plat/sdhci.h> |
36 | #include <plat/pd.h> | 38 | #include <plat/pd.h> |
39 | #include <plat/regs-fb-v4.h> | ||
40 | #include <plat/fimc-core.h> | ||
41 | #include <plat/camport.h> | ||
42 | #include <plat/mipi_csis.h> | ||
37 | 43 | ||
38 | #include <mach/map.h> | 44 | #include <mach/map.h> |
39 | 45 | ||
46 | #include <media/v4l2-mediabus.h> | ||
47 | #include <media/s5p_fimc.h> | ||
48 | #include <media/m5mols.h> | ||
49 | |||
40 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 50 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
41 | #define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 51 | #define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
42 | S3C2410_UCON_RXILEVEL | \ | 52 | S3C2410_UCON_RXILEVEL | \ |
@@ -110,6 +120,9 @@ static struct regulator_consumer_supply lp3974_buck1_consumer = | |||
110 | static struct regulator_consumer_supply lp3974_buck2_consumer = | 120 | static struct regulator_consumer_supply lp3974_buck2_consumer = |
111 | REGULATOR_SUPPLY("vddg3d", NULL); | 121 | REGULATOR_SUPPLY("vddg3d", NULL); |
112 | 122 | ||
123 | static struct regulator_consumer_supply lp3974_buck3_consumer = | ||
124 | REGULATOR_SUPPLY("vdet", "s5p-sdo"); | ||
125 | |||
113 | static struct regulator_init_data lp3974_buck1_data = { | 126 | static struct regulator_init_data lp3974_buck1_data = { |
114 | .constraints = { | 127 | .constraints = { |
115 | .name = "VINT_1.1V", | 128 | .name = "VINT_1.1V", |
@@ -153,6 +166,8 @@ static struct regulator_init_data lp3974_buck3_data = { | |||
153 | .enabled = 1, | 166 | .enabled = 1, |
154 | }, | 167 | }, |
155 | }, | 168 | }, |
169 | .num_consumer_supplies = 1, | ||
170 | .consumer_supplies = &lp3974_buck3_consumer, | ||
156 | }; | 171 | }; |
157 | 172 | ||
158 | static struct regulator_init_data lp3974_buck4_data = { | 173 | static struct regulator_init_data lp3974_buck4_data = { |
@@ -181,6 +196,12 @@ static struct regulator_init_data lp3974_ldo2_data = { | |||
181 | }, | 196 | }, |
182 | }; | 197 | }; |
183 | 198 | ||
199 | static struct regulator_consumer_supply lp3974_ldo3_consumer[] = { | ||
200 | REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), | ||
201 | REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), | ||
202 | REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), | ||
203 | }; | ||
204 | |||
184 | static struct regulator_init_data lp3974_ldo3_data = { | 205 | static struct regulator_init_data lp3974_ldo3_data = { |
185 | .constraints = { | 206 | .constraints = { |
186 | .name = "VUSB+MIPI_1.1V", | 207 | .name = "VUSB+MIPI_1.1V", |
@@ -192,6 +213,12 @@ static struct regulator_init_data lp3974_ldo3_data = { | |||
192 | .disabled = 1, | 213 | .disabled = 1, |
193 | }, | 214 | }, |
194 | }, | 215 | }, |
216 | .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo3_consumer), | ||
217 | .consumer_supplies = lp3974_ldo3_consumer, | ||
218 | }; | ||
219 | |||
220 | static struct regulator_consumer_supply lp3974_ldo4_consumer[] = { | ||
221 | REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), | ||
195 | }; | 222 | }; |
196 | 223 | ||
197 | static struct regulator_init_data lp3974_ldo4_data = { | 224 | static struct regulator_init_data lp3974_ldo4_data = { |
@@ -205,6 +232,8 @@ static struct regulator_init_data lp3974_ldo4_data = { | |||
205 | .disabled = 1, | 232 | .disabled = 1, |
206 | }, | 233 | }, |
207 | }, | 234 | }, |
235 | .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo4_consumer), | ||
236 | .consumer_supplies = lp3974_ldo4_consumer, | ||
208 | }; | 237 | }; |
209 | 238 | ||
210 | static struct regulator_init_data lp3974_ldo5_data = { | 239 | static struct regulator_init_data lp3974_ldo5_data = { |
@@ -233,6 +262,10 @@ static struct regulator_init_data lp3974_ldo6_data = { | |||
233 | }, | 262 | }, |
234 | }; | 263 | }; |
235 | 264 | ||
265 | static struct regulator_consumer_supply lp3974_ldo7_consumer[] = { | ||
266 | REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), | ||
267 | }; | ||
268 | |||
236 | static struct regulator_init_data lp3974_ldo7_data = { | 269 | static struct regulator_init_data lp3974_ldo7_data = { |
237 | .constraints = { | 270 | .constraints = { |
238 | .name = "VLCD+VMIPI_1.8V", | 271 | .name = "VLCD+VMIPI_1.8V", |
@@ -244,6 +277,12 @@ static struct regulator_init_data lp3974_ldo7_data = { | |||
244 | .disabled = 1, | 277 | .disabled = 1, |
245 | }, | 278 | }, |
246 | }, | 279 | }, |
280 | .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo7_consumer), | ||
281 | .consumer_supplies = lp3974_ldo7_consumer, | ||
282 | }; | ||
283 | |||
284 | static struct regulator_consumer_supply lp3974_ldo8_consumer[] = { | ||
285 | REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"), | ||
247 | }; | 286 | }; |
248 | 287 | ||
249 | static struct regulator_init_data lp3974_ldo8_data = { | 288 | static struct regulator_init_data lp3974_ldo8_data = { |
@@ -257,6 +296,8 @@ static struct regulator_init_data lp3974_ldo8_data = { | |||
257 | .disabled = 1, | 296 | .disabled = 1, |
258 | }, | 297 | }, |
259 | }, | 298 | }, |
299 | .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo8_consumer), | ||
300 | .consumer_supplies = lp3974_ldo8_consumer, | ||
260 | }; | 301 | }; |
261 | 302 | ||
262 | static struct regulator_init_data lp3974_ldo9_data = { | 303 | static struct regulator_init_data lp3974_ldo9_data = { |
@@ -286,6 +327,9 @@ static struct regulator_init_data lp3974_ldo10_data = { | |||
286 | }, | 327 | }, |
287 | }; | 328 | }; |
288 | 329 | ||
330 | static struct regulator_consumer_supply lp3974_ldo11_consumer = | ||
331 | REGULATOR_SUPPLY("dig_28", "0-001f"); | ||
332 | |||
289 | static struct regulator_init_data lp3974_ldo11_data = { | 333 | static struct regulator_init_data lp3974_ldo11_data = { |
290 | .constraints = { | 334 | .constraints = { |
291 | .name = "CAM_AF_3.3V", | 335 | .name = "CAM_AF_3.3V", |
@@ -297,6 +341,8 @@ static struct regulator_init_data lp3974_ldo11_data = { | |||
297 | .disabled = 1, | 341 | .disabled = 1, |
298 | }, | 342 | }, |
299 | }, | 343 | }, |
344 | .num_consumer_supplies = 1, | ||
345 | .consumer_supplies = &lp3974_ldo11_consumer, | ||
300 | }; | 346 | }; |
301 | 347 | ||
302 | static struct regulator_init_data lp3974_ldo12_data = { | 348 | static struct regulator_init_data lp3974_ldo12_data = { |
@@ -325,6 +371,9 @@ static struct regulator_init_data lp3974_ldo13_data = { | |||
325 | }, | 371 | }, |
326 | }; | 372 | }; |
327 | 373 | ||
374 | static struct regulator_consumer_supply lp3974_ldo14_consumer = | ||
375 | REGULATOR_SUPPLY("dig_18", "0-001f"); | ||
376 | |||
328 | static struct regulator_init_data lp3974_ldo14_data = { | 377 | static struct regulator_init_data lp3974_ldo14_data = { |
329 | .constraints = { | 378 | .constraints = { |
330 | .name = "CAM_I_HOST_1.8V", | 379 | .name = "CAM_I_HOST_1.8V", |
@@ -336,8 +385,14 @@ static struct regulator_init_data lp3974_ldo14_data = { | |||
336 | .disabled = 1, | 385 | .disabled = 1, |
337 | }, | 386 | }, |
338 | }, | 387 | }, |
388 | .num_consumer_supplies = 1, | ||
389 | .consumer_supplies = &lp3974_ldo14_consumer, | ||
339 | }; | 390 | }; |
340 | 391 | ||
392 | |||
393 | static struct regulator_consumer_supply lp3974_ldo15_consumer = | ||
394 | REGULATOR_SUPPLY("dig_12", "0-001f"); | ||
395 | |||
341 | static struct regulator_init_data lp3974_ldo15_data = { | 396 | static struct regulator_init_data lp3974_ldo15_data = { |
342 | .constraints = { | 397 | .constraints = { |
343 | .name = "CAM_S_DIG+FM33_CORE_1.2V", | 398 | .name = "CAM_S_DIG+FM33_CORE_1.2V", |
@@ -349,6 +404,12 @@ static struct regulator_init_data lp3974_ldo15_data = { | |||
349 | .disabled = 1, | 404 | .disabled = 1, |
350 | }, | 405 | }, |
351 | }, | 406 | }, |
407 | .num_consumer_supplies = 1, | ||
408 | .consumer_supplies = &lp3974_ldo15_consumer, | ||
409 | }; | ||
410 | |||
411 | static struct regulator_consumer_supply lp3974_ldo16_consumer[] = { | ||
412 | REGULATOR_SUPPLY("a_sensor", "0-001f"), | ||
352 | }; | 413 | }; |
353 | 414 | ||
354 | static struct regulator_init_data lp3974_ldo16_data = { | 415 | static struct regulator_init_data lp3974_ldo16_data = { |
@@ -362,6 +423,8 @@ static struct regulator_init_data lp3974_ldo16_data = { | |||
362 | .disabled = 1, | 423 | .disabled = 1, |
363 | }, | 424 | }, |
364 | }, | 425 | }, |
426 | .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo16_consumer), | ||
427 | .consumer_supplies = lp3974_ldo16_consumer, | ||
365 | }; | 428 | }; |
366 | 429 | ||
367 | static struct regulator_init_data lp3974_ldo17_data = { | 430 | static struct regulator_init_data lp3974_ldo17_data = { |
@@ -472,6 +535,43 @@ static struct max8998_platform_data universal_lp3974_pdata = { | |||
472 | .wakeup = true, | 535 | .wakeup = true, |
473 | }; | 536 | }; |
474 | 537 | ||
538 | |||
539 | enum fixed_regulator_id { | ||
540 | FIXED_REG_ID_MMC0, | ||
541 | FIXED_REG_ID_HDMI_5V, | ||
542 | FIXED_REG_ID_CAM_S_IF, | ||
543 | FIXED_REG_ID_CAM_I_CORE, | ||
544 | FIXED_REG_ID_CAM_VT_DIO, | ||
545 | }; | ||
546 | |||
547 | static struct regulator_consumer_supply hdmi_fixed_consumer = | ||
548 | REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi"); | ||
549 | |||
550 | static struct regulator_init_data hdmi_fixed_voltage_init_data = { | ||
551 | .constraints = { | ||
552 | .name = "HDMI_5V", | ||
553 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
554 | }, | ||
555 | .num_consumer_supplies = 1, | ||
556 | .consumer_supplies = &hdmi_fixed_consumer, | ||
557 | }; | ||
558 | |||
559 | static struct fixed_voltage_config hdmi_fixed_voltage_config = { | ||
560 | .supply_name = "HDMI_EN1", | ||
561 | .microvolts = 5000000, | ||
562 | .gpio = EXYNOS4_GPE0(1), | ||
563 | .enable_high = true, | ||
564 | .init_data = &hdmi_fixed_voltage_init_data, | ||
565 | }; | ||
566 | |||
567 | static struct platform_device hdmi_fixed_voltage = { | ||
568 | .name = "reg-fixed-voltage", | ||
569 | .id = FIXED_REG_ID_HDMI_5V, | ||
570 | .dev = { | ||
571 | .platform_data = &hdmi_fixed_voltage_config, | ||
572 | }, | ||
573 | }; | ||
574 | |||
475 | /* GPIO I2C 5 (PMIC) */ | 575 | /* GPIO I2C 5 (PMIC) */ |
476 | static struct i2c_board_info i2c5_devs[] __initdata = { | 576 | static struct i2c_board_info i2c5_devs[] __initdata = { |
477 | { | 577 | { |
@@ -573,6 +673,11 @@ static void __init universal_touchkey_init(void) | |||
573 | gpio_direction_output(gpio, 1); | 673 | gpio_direction_output(gpio, 1); |
574 | } | 674 | } |
575 | 675 | ||
676 | static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = { | ||
677 | .frequency = 300 * 1000, | ||
678 | .sda_delay = 200, | ||
679 | }; | ||
680 | |||
576 | /* GPIO KEYS */ | 681 | /* GPIO KEYS */ |
577 | static struct gpio_keys_button universal_gpio_keys_tables[] = { | 682 | static struct gpio_keys_button universal_gpio_keys_tables[] = { |
578 | { | 683 | { |
@@ -658,7 +763,7 @@ static struct fixed_voltage_config mmc0_fixed_voltage_config = { | |||
658 | 763 | ||
659 | static struct platform_device mmc0_fixed_voltage = { | 764 | static struct platform_device mmc0_fixed_voltage = { |
660 | .name = "reg-fixed-voltage", | 765 | .name = "reg-fixed-voltage", |
661 | .id = 0, | 766 | .id = FIXED_REG_ID_MMC0, |
662 | .dev = { | 767 | .dev = { |
663 | .platform_data = &mmc0_fixed_voltage_config, | 768 | .platform_data = &mmc0_fixed_voltage_config, |
664 | }, | 769 | }, |
@@ -692,18 +797,165 @@ static void __init universal_sdhci_init(void) | |||
692 | s3c_sdhci3_set_platdata(&universal_hsmmc3_data); | 797 | s3c_sdhci3_set_platdata(&universal_hsmmc3_data); |
693 | } | 798 | } |
694 | 799 | ||
695 | /* I2C0 */ | ||
696 | static struct i2c_board_info i2c0_devs[] __initdata = { | ||
697 | /* Camera, To be updated */ | ||
698 | }; | ||
699 | |||
700 | /* I2C1 */ | 800 | /* I2C1 */ |
701 | static struct i2c_board_info i2c1_devs[] __initdata = { | 801 | static struct i2c_board_info i2c1_devs[] __initdata = { |
702 | /* Gyro, To be updated */ | 802 | /* Gyro, To be updated */ |
703 | }; | 803 | }; |
704 | 804 | ||
805 | /* Frame Buffer */ | ||
806 | static struct s3c_fb_pd_win universal_fb_win0 = { | ||
807 | .win_mode = { | ||
808 | .left_margin = 16, | ||
809 | .right_margin = 16, | ||
810 | .upper_margin = 2, | ||
811 | .lower_margin = 28, | ||
812 | .hsync_len = 2, | ||
813 | .vsync_len = 1, | ||
814 | .xres = 480, | ||
815 | .yres = 800, | ||
816 | .refresh = 55, | ||
817 | }, | ||
818 | .max_bpp = 32, | ||
819 | .default_bpp = 16, | ||
820 | }; | ||
821 | |||
822 | static struct s3c_fb_platdata universal_lcd_pdata __initdata = { | ||
823 | .win[0] = &universal_fb_win0, | ||
824 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
825 | VIDCON0_CLKSEL_LCD, | ||
826 | .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN | ||
827 | | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
828 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | ||
829 | }; | ||
830 | |||
831 | static struct regulator_consumer_supply cam_i_core_supply = | ||
832 | REGULATOR_SUPPLY("core", "0-001f"); | ||
833 | |||
834 | static struct regulator_init_data cam_i_core_reg_init_data = { | ||
835 | .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS }, | ||
836 | .num_consumer_supplies = 1, | ||
837 | .consumer_supplies = &cam_i_core_supply, | ||
838 | }; | ||
839 | |||
840 | static struct fixed_voltage_config cam_i_core_fixed_voltage_cfg = { | ||
841 | .supply_name = "CAM_I_CORE_1.2V", | ||
842 | .microvolts = 1200000, | ||
843 | .gpio = EXYNOS4_GPE2(2), /* CAM_8M_CORE_EN */ | ||
844 | .enable_high = 1, | ||
845 | .init_data = &cam_i_core_reg_init_data, | ||
846 | }; | ||
847 | |||
848 | static struct platform_device cam_i_core_fixed_reg_dev = { | ||
849 | .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_I_CORE, | ||
850 | .dev = { .platform_data = &cam_i_core_fixed_voltage_cfg }, | ||
851 | }; | ||
852 | |||
853 | static struct regulator_consumer_supply cam_s_if_supply = | ||
854 | REGULATOR_SUPPLY("d_sensor", "0-001f"); | ||
855 | |||
856 | static struct regulator_init_data cam_s_if_reg_init_data = { | ||
857 | .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS }, | ||
858 | .num_consumer_supplies = 1, | ||
859 | .consumer_supplies = &cam_s_if_supply, | ||
860 | }; | ||
861 | |||
862 | static struct fixed_voltage_config cam_s_if_fixed_voltage_cfg = { | ||
863 | .supply_name = "CAM_S_IF_1.8V", | ||
864 | .microvolts = 1800000, | ||
865 | .gpio = EXYNOS4_GPE3(0), /* CAM_PWR_EN1 */ | ||
866 | .enable_high = 1, | ||
867 | .init_data = &cam_s_if_reg_init_data, | ||
868 | }; | ||
869 | |||
870 | static struct platform_device cam_s_if_fixed_reg_dev = { | ||
871 | .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_S_IF, | ||
872 | .dev = { .platform_data = &cam_s_if_fixed_voltage_cfg }, | ||
873 | }; | ||
874 | |||
875 | static struct s5p_platform_mipi_csis mipi_csis_platdata = { | ||
876 | .clk_rate = 166000000UL, | ||
877 | .lanes = 2, | ||
878 | .alignment = 32, | ||
879 | .hs_settle = 12, | ||
880 | .phy_enable = s5p_csis_phy_enable, | ||
881 | }; | ||
882 | |||
883 | #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3) | ||
884 | #define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */ | ||
885 | #define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5) | ||
886 | |||
887 | static int m5mols_set_power(struct device *dev, int on) | ||
888 | { | ||
889 | gpio_set_value(GPIO_CAM_LEVEL_EN(1), !on); | ||
890 | gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on); | ||
891 | return 0; | ||
892 | } | ||
893 | |||
894 | static struct m5mols_platform_data m5mols_platdata = { | ||
895 | .gpio_reset = GPIO_CAM_MEGA_nRST, | ||
896 | .reset_polarity = 0, | ||
897 | .set_power = m5mols_set_power, | ||
898 | }; | ||
899 | |||
900 | static struct i2c_board_info m5mols_board_info = { | ||
901 | I2C_BOARD_INFO("M5MOLS", 0x1F), | ||
902 | .platform_data = &m5mols_platdata, | ||
903 | }; | ||
904 | |||
905 | static struct s5p_fimc_isp_info universal_camera_sensors[] = { | ||
906 | { | ||
907 | .mux_id = 0, | ||
908 | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | | ||
909 | V4L2_MBUS_VSYNC_ACTIVE_LOW, | ||
910 | .bus_type = FIMC_MIPI_CSI2, | ||
911 | .board_info = &m5mols_board_info, | ||
912 | .i2c_bus_num = 0, | ||
913 | .clk_frequency = 21600000UL, | ||
914 | .csi_data_align = 32, | ||
915 | }, | ||
916 | }; | ||
917 | |||
918 | static struct s5p_platform_fimc fimc_md_platdata = { | ||
919 | .isp_info = universal_camera_sensors, | ||
920 | .num_clients = ARRAY_SIZE(universal_camera_sensors), | ||
921 | }; | ||
922 | |||
923 | static struct gpio universal_camera_gpios[] = { | ||
924 | { GPIO_CAM_LEVEL_EN(1), GPIOF_OUT_INIT_HIGH, "CAM_LVL_EN1" }, | ||
925 | { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" }, | ||
926 | { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, | ||
927 | { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, | ||
928 | }; | ||
929 | |||
930 | static void universal_camera_init(void) | ||
931 | { | ||
932 | s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), | ||
933 | &s5p_device_mipi_csis0); | ||
934 | s3c_set_platdata(&fimc_md_platdata, sizeof(fimc_md_platdata), | ||
935 | &s5p_device_fimc_md); | ||
936 | |||
937 | if (gpio_request_array(universal_camera_gpios, | ||
938 | ARRAY_SIZE(universal_camera_gpios))) { | ||
939 | pr_err("%s: GPIO request failed\n", __func__); | ||
940 | return; | ||
941 | } | ||
942 | |||
943 | if (!s3c_gpio_cfgpin(GPIO_CAM_8M_ISP_INT, S3C_GPIO_SFN(0xf))) | ||
944 | m5mols_board_info.irq = gpio_to_irq(GPIO_CAM_8M_ISP_INT); | ||
945 | else | ||
946 | pr_err("Failed to configure 8M_ISP_INT GPIO\n"); | ||
947 | |||
948 | /* Free GPIOs controlled directly by the sensor drivers. */ | ||
949 | gpio_free(GPIO_CAM_MEGA_nRST); | ||
950 | gpio_free(GPIO_CAM_8M_ISP_INT); | ||
951 | |||
952 | if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) | ||
953 | pr_err("Camera port A setup failed\n"); | ||
954 | } | ||
955 | |||
705 | static struct platform_device *universal_devices[] __initdata = { | 956 | static struct platform_device *universal_devices[] __initdata = { |
706 | /* Samsung Platform Devices */ | 957 | /* Samsung Platform Devices */ |
958 | &s5p_device_mipi_csis0, | ||
707 | &s5p_device_fimc0, | 959 | &s5p_device_fimc0, |
708 | &s5p_device_fimc1, | 960 | &s5p_device_fimc1, |
709 | &s5p_device_fimc2, | 961 | &s5p_device_fimc2, |
@@ -712,17 +964,30 @@ static struct platform_device *universal_devices[] __initdata = { | |||
712 | &s3c_device_hsmmc0, | 964 | &s3c_device_hsmmc0, |
713 | &s3c_device_hsmmc2, | 965 | &s3c_device_hsmmc2, |
714 | &s3c_device_hsmmc3, | 966 | &s3c_device_hsmmc3, |
967 | &s3c_device_i2c0, | ||
715 | &s3c_device_i2c3, | 968 | &s3c_device_i2c3, |
716 | &s3c_device_i2c5, | 969 | &s3c_device_i2c5, |
970 | &s5p_device_i2c_hdmiphy, | ||
971 | &hdmi_fixed_voltage, | ||
972 | &exynos4_device_pd[PD_TV], | ||
973 | &s5p_device_hdmi, | ||
974 | &s5p_device_sdo, | ||
975 | &s5p_device_mixer, | ||
717 | 976 | ||
718 | /* Universal Devices */ | 977 | /* Universal Devices */ |
719 | &i2c_gpio12, | 978 | &i2c_gpio12, |
720 | &universal_gpio_keys, | 979 | &universal_gpio_keys, |
721 | &s5p_device_onenand, | 980 | &s5p_device_onenand, |
981 | &s5p_device_fimd0, | ||
722 | &s5p_device_mfc, | 982 | &s5p_device_mfc, |
723 | &s5p_device_mfc_l, | 983 | &s5p_device_mfc_l, |
724 | &s5p_device_mfc_r, | 984 | &s5p_device_mfc_r, |
725 | &exynos4_device_pd[PD_MFC], | 985 | &exynos4_device_pd[PD_MFC], |
986 | &exynos4_device_pd[PD_LCD0], | ||
987 | &exynos4_device_pd[PD_CAM], | ||
988 | &cam_i_core_fixed_reg_dev, | ||
989 | &cam_s_if_fixed_reg_dev, | ||
990 | &s5p_device_fimc_md, | ||
726 | }; | 991 | }; |
727 | 992 | ||
728 | static void __init universal_map_io(void) | 993 | static void __init universal_map_io(void) |
@@ -732,6 +997,20 @@ static void __init universal_map_io(void) | |||
732 | s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); | 997 | s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); |
733 | } | 998 | } |
734 | 999 | ||
1000 | void s5p_tv_setup(void) | ||
1001 | { | ||
1002 | /* direct HPD to HDMI chip */ | ||
1003 | gpio_request(EXYNOS4_GPX3(7), "hpd-plug"); | ||
1004 | |||
1005 | gpio_direction_input(EXYNOS4_GPX3(7)); | ||
1006 | s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3)); | ||
1007 | s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE); | ||
1008 | |||
1009 | /* setup dependencies between TV devices */ | ||
1010 | s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev; | ||
1011 | s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev; | ||
1012 | } | ||
1013 | |||
735 | static void __init universal_reserve(void) | 1014 | static void __init universal_reserve(void) |
736 | { | 1015 | { |
737 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); | 1016 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); |
@@ -740,8 +1019,9 @@ static void __init universal_reserve(void) | |||
740 | static void __init universal_machine_init(void) | 1019 | static void __init universal_machine_init(void) |
741 | { | 1020 | { |
742 | universal_sdhci_init(); | 1021 | universal_sdhci_init(); |
1022 | s5p_tv_setup(); | ||
743 | 1023 | ||
744 | i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); | 1024 | s3c_i2c0_set_platdata(&universal_i2c0_platdata); |
745 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); | 1025 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); |
746 | 1026 | ||
747 | universal_tsp_init(); | 1027 | universal_tsp_init(); |
@@ -749,15 +1029,28 @@ static void __init universal_machine_init(void) | |||
749 | i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs)); | 1029 | i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs)); |
750 | 1030 | ||
751 | s3c_i2c5_set_platdata(NULL); | 1031 | s3c_i2c5_set_platdata(NULL); |
1032 | s5p_i2c_hdmiphy_set_platdata(NULL); | ||
752 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); | 1033 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); |
753 | 1034 | ||
1035 | s5p_fimd0_set_platdata(&universal_lcd_pdata); | ||
1036 | |||
754 | universal_touchkey_init(); | 1037 | universal_touchkey_init(); |
755 | i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, | 1038 | i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, |
756 | ARRAY_SIZE(i2c_gpio12_devs)); | 1039 | ARRAY_SIZE(i2c_gpio12_devs)); |
757 | 1040 | ||
1041 | universal_camera_init(); | ||
1042 | |||
758 | /* Last */ | 1043 | /* Last */ |
759 | platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices)); | 1044 | platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices)); |
1045 | |||
760 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; | 1046 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; |
1047 | s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev; | ||
1048 | |||
1049 | s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev; | ||
1050 | s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev; | ||
1051 | s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev; | ||
1052 | s5p_device_fimc3.dev.parent = &exynos4_device_pd[PD_CAM].dev; | ||
1053 | s5p_device_mipi_csis0.dev.parent = &exynos4_device_pd[PD_CAM].dev; | ||
761 | } | 1054 | } |
762 | 1055 | ||
763 | MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | 1056 | MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") |