diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-05-11 17:41:00 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-11 17:41:00 -0400 |
commit | 6dafa4aead1b9e5f79fd789f10bc15a9149b916a (patch) | |
tree | a38f8aed5028c86333e7297dda2089e5a4b3f535 /arch/arm/mach-exynos/mach-universal_c210.c | |
parent | 384b10491363481fc93a37ca447fae5934b4941c (diff) |
ARM: EXYNOS: Add DRM core device support for Universal C210 board
Add core DRM device and alternative platform device data
for FIMD DRM subdriver. Based on the initial patch by
Joonyoung Shim <jy0922.shim@samsung.com>.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/mach-universal_c210.c')
-rw-r--r-- | arch/arm/mach-exynos/mach-universal_c210.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index cb2b027f09a6..a6959bbfef89 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/i2c-gpio.h> | 23 | #include <linux/i2c-gpio.h> |
24 | #include <linux/i2c/mcs.h> | 24 | #include <linux/i2c/mcs.h> |
25 | #include <linux/i2c/atmel_mxt_ts.h> | 25 | #include <linux/i2c/atmel_mxt_ts.h> |
26 | #include <drm/exynos_drm.h> | ||
26 | 27 | ||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <asm/hardware/gic.h> | 29 | #include <asm/hardware/gic.h> |
@@ -812,6 +813,29 @@ static struct i2c_board_info i2c1_devs[] __initdata = { | |||
812 | /* Gyro, To be updated */ | 813 | /* Gyro, To be updated */ |
813 | }; | 814 | }; |
814 | 815 | ||
816 | #ifdef CONFIG_DRM_EXYNOS | ||
817 | static struct exynos_drm_fimd_pdata drm_fimd_pdata = { | ||
818 | .panel = { | ||
819 | .timing = { | ||
820 | .left_margin = 16, | ||
821 | .right_margin = 16, | ||
822 | .upper_margin = 2, | ||
823 | .lower_margin = 28, | ||
824 | .hsync_len = 2, | ||
825 | .vsync_len = 1, | ||
826 | .xres = 480, | ||
827 | .yres = 800, | ||
828 | .refresh = 55, | ||
829 | }, | ||
830 | }, | ||
831 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
832 | VIDCON0_CLKSEL_LCD, | ||
833 | .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN | ||
834 | | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
835 | .default_win = 3, | ||
836 | .bpp = 32, | ||
837 | }; | ||
838 | #else | ||
815 | /* Frame Buffer */ | 839 | /* Frame Buffer */ |
816 | static struct s3c_fb_pd_win universal_fb_win0 = { | 840 | static struct s3c_fb_pd_win universal_fb_win0 = { |
817 | .win_mode = { | 841 | .win_mode = { |
@@ -839,6 +863,7 @@ static struct s3c_fb_platdata universal_lcd_pdata __initdata = { | |||
839 | | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | 863 | | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
840 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | 864 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, |
841 | }; | 865 | }; |
866 | #endif | ||
842 | 867 | ||
843 | static struct regulator_consumer_supply cam_vt_dio_supply = | 868 | static struct regulator_consumer_supply cam_vt_dio_supply = |
844 | REGULATOR_SUPPLY("vdd_core", "0-003c"); | 869 | REGULATOR_SUPPLY("vdd_core", "0-003c"); |
@@ -1048,6 +1073,9 @@ static struct platform_device *universal_devices[] __initdata = { | |||
1048 | &s5p_device_onenand, | 1073 | &s5p_device_onenand, |
1049 | &s5p_device_fimd0, | 1074 | &s5p_device_fimd0, |
1050 | &s5p_device_jpeg, | 1075 | &s5p_device_jpeg, |
1076 | #ifdef CONFIG_DRM_EXYNOS | ||
1077 | &exynos_device_drm, | ||
1078 | #endif | ||
1051 | &s5p_device_mfc, | 1079 | &s5p_device_mfc, |
1052 | &s5p_device_mfc_l, | 1080 | &s5p_device_mfc_l, |
1053 | &s5p_device_mfc_r, | 1081 | &s5p_device_mfc_r, |
@@ -1094,7 +1122,12 @@ static void __init universal_machine_init(void) | |||
1094 | s5p_i2c_hdmiphy_set_platdata(NULL); | 1122 | s5p_i2c_hdmiphy_set_platdata(NULL); |
1095 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); | 1123 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); |
1096 | 1124 | ||
1125 | #ifdef CONFIG_DRM_EXYNOS | ||
1126 | s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; | ||
1127 | exynos4_fimd0_gpio_setup_24bpp(); | ||
1128 | #else | ||
1097 | s5p_fimd0_set_platdata(&universal_lcd_pdata); | 1129 | s5p_fimd0_set_platdata(&universal_lcd_pdata); |
1130 | #endif | ||
1098 | 1131 | ||
1099 | universal_touchkey_init(); | 1132 | universal_touchkey_init(); |
1100 | i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, | 1133 | i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, |