diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-05-11 17:41:06 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-11 17:41:06 -0400 |
commit | db6856e8d8ab9448685f6fbbc571d38c5ceaa88e (patch) | |
tree | afdb763912602cb71bcea7f546eb27bd12de1dac /arch/arm | |
parent | 6dafa4aead1b9e5f79fd789f10bc15a9149b916a (diff) |
ARM: EXYNOS: Add DRM core support for NURI 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')
-rw-r--r-- | arch/arm/mach-exynos/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-nuri.c | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 20077add2764..85fc9ea7870a 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -289,6 +289,7 @@ config MACH_NURI | |||
289 | select S5P_DEV_USB_EHCI | 289 | select S5P_DEV_USB_EHCI |
290 | select S5P_SETUP_MIPIPHY | 290 | select S5P_SETUP_MIPIPHY |
291 | select EXYNOS4_DEV_DMA | 291 | select EXYNOS4_DEV_DMA |
292 | select EXYNOS_DEV_DRM | ||
292 | select EXYNOS4_SETUP_FIMC | 293 | select EXYNOS4_SETUP_FIMC |
293 | select EXYNOS4_SETUP_FIMD0 | 294 | select EXYNOS4_SETUP_FIMD0 |
294 | select EXYNOS4_SETUP_I2C1 | 295 | select EXYNOS4_SETUP_I2C1 |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index ed90aef404c3..0fcbb2e162e3 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
26 | #include <linux/fb.h> | 26 | #include <linux/fb.h> |
27 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
28 | #include <drm/exynos_drm.h> | ||
28 | 29 | ||
29 | #include <video/platform_lcd.h> | 30 | #include <video/platform_lcd.h> |
30 | #include <media/m5mols.h> | 31 | #include <media/m5mols.h> |
@@ -213,6 +214,29 @@ static struct platform_device nuri_gpio_keys = { | |||
213 | }, | 214 | }, |
214 | }; | 215 | }; |
215 | 216 | ||
217 | #ifdef CONFIG_DRM_EXYNOS | ||
218 | static struct exynos_drm_fimd_pdata drm_fimd_pdata = { | ||
219 | .panel = { | ||
220 | .timing = { | ||
221 | .xres = 1024, | ||
222 | .yres = 600, | ||
223 | .hsync_len = 40, | ||
224 | .left_margin = 79, | ||
225 | .right_margin = 200, | ||
226 | .vsync_len = 10, | ||
227 | .upper_margin = 10, | ||
228 | .lower_margin = 11, | ||
229 | .refresh = 60, | ||
230 | }, | ||
231 | }, | ||
232 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
233 | VIDCON0_CLKSEL_LCD, | ||
234 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
235 | .default_win = 3, | ||
236 | .bpp = 32, | ||
237 | }; | ||
238 | |||
239 | #else | ||
216 | /* Frame Buffer */ | 240 | /* Frame Buffer */ |
217 | static struct s3c_fb_pd_win nuri_fb_win0 = { | 241 | static struct s3c_fb_pd_win nuri_fb_win0 = { |
218 | .win_mode = { | 242 | .win_mode = { |
@@ -239,6 +263,7 @@ static struct s3c_fb_platdata nuri_fb_pdata __initdata = { | |||
239 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | 263 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
240 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | 264 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, |
241 | }; | 265 | }; |
266 | #endif | ||
242 | 267 | ||
243 | static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) | 268 | static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) |
244 | { | 269 | { |
@@ -1302,6 +1327,9 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
1302 | &cam_vdda_fixed_rdev, | 1327 | &cam_vdda_fixed_rdev, |
1303 | &cam_8m_12v_fixed_rdev, | 1328 | &cam_8m_12v_fixed_rdev, |
1304 | &exynos4_bus_devfreq, | 1329 | &exynos4_bus_devfreq, |
1330 | #ifdef CONFIG_DRM_EXYNOS | ||
1331 | &exynos_device_drm, | ||
1332 | #endif | ||
1305 | }; | 1333 | }; |
1306 | 1334 | ||
1307 | static void __init nuri_map_io(void) | 1335 | static void __init nuri_map_io(void) |
@@ -1334,7 +1362,12 @@ static void __init nuri_machine_init(void) | |||
1334 | i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); | 1362 | i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); |
1335 | s3c_i2c6_set_platdata(&nuri_i2c6_platdata); | 1363 | s3c_i2c6_set_platdata(&nuri_i2c6_platdata); |
1336 | 1364 | ||
1365 | #ifdef CONFIG_DRM_EXYNOS | ||
1366 | s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; | ||
1367 | exynos4_fimd0_gpio_setup_24bpp(); | ||
1368 | #else | ||
1337 | s5p_fimd0_set_platdata(&nuri_fb_pdata); | 1369 | s5p_fimd0_set_platdata(&nuri_fb_pdata); |
1370 | #endif | ||
1338 | 1371 | ||
1339 | nuri_camera_init(); | 1372 | nuri_camera_init(); |
1340 | 1373 | ||