aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4/mach-universal_c210.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2011-08-11 06:55:40 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-10-04 00:00:51 -0400
commitf3f5bfe234f562772392558dcf29a75d3229115c (patch)
tree68598928ec07b5efef16dc345b1c81878e053f66 /arch/arm/mach-exynos4/mach-universal_c210.c
parent3c76669998905afe2f8dd3f9a95c9936aaf9c4ff (diff)
ARM: EXYNOS4: enable frame buffer on Universal C210 board
This patch adds platform definitions to enable s3c-fb driver. Framebuffer window with 480x800x16bpp mode has been defined. 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-exynos4/mach-universal_c210.c')
-rw-r--r--arch/arm/mach-exynos4/mach-universal_c210.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c
index b3b5d8911004..3ca7f3a8c2c5 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,9 +32,11 @@
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>
37 40
38#include <mach/map.h> 41#include <mach/map.h>
39 42
@@ -702,6 +705,32 @@ static struct i2c_board_info i2c1_devs[] __initdata = {
702 /* Gyro, To be updated */ 705 /* Gyro, To be updated */
703}; 706};
704 707
708/* Frame Buffer */
709static struct s3c_fb_pd_win universal_fb_win0 = {
710 .win_mode = {
711 .left_margin = 16,
712 .right_margin = 16,
713 .upper_margin = 2,
714 .lower_margin = 28,
715 .hsync_len = 2,
716 .vsync_len = 1,
717 .xres = 480,
718 .yres = 800,
719 .refresh = 55,
720 },
721 .max_bpp = 32,
722 .default_bpp = 16,
723};
724
725static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
726 .win[0] = &universal_fb_win0,
727 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
728 VIDCON0_CLKSEL_LCD,
729 .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
730 | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
731 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
732};
733
705static struct platform_device *universal_devices[] __initdata = { 734static struct platform_device *universal_devices[] __initdata = {
706 /* Samsung Platform Devices */ 735 /* Samsung Platform Devices */
707 &s5p_device_fimc0, 736 &s5p_device_fimc0,
@@ -719,10 +748,12 @@ static struct platform_device *universal_devices[] __initdata = {
719 &i2c_gpio12, 748 &i2c_gpio12,
720 &universal_gpio_keys, 749 &universal_gpio_keys,
721 &s5p_device_onenand, 750 &s5p_device_onenand,
751 &s5p_device_fimd0,
722 &s5p_device_mfc, 752 &s5p_device_mfc,
723 &s5p_device_mfc_l, 753 &s5p_device_mfc_l,
724 &s5p_device_mfc_r, 754 &s5p_device_mfc_r,
725 &exynos4_device_pd[PD_MFC], 755 &exynos4_device_pd[PD_MFC],
756 &exynos4_device_pd[PD_LCD0],
726}; 757};
727 758
728static void __init universal_map_io(void) 759static void __init universal_map_io(void)
@@ -751,6 +782,8 @@ static void __init universal_machine_init(void)
751 s3c_i2c5_set_platdata(NULL); 782 s3c_i2c5_set_platdata(NULL);
752 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); 783 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
753 784
785 s5p_fimd0_set_platdata(&universal_lcd_pdata);
786
754 universal_touchkey_init(); 787 universal_touchkey_init();
755 i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, 788 i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs,
756 ARRAY_SIZE(i2c_gpio12_devs)); 789 ARRAY_SIZE(i2c_gpio12_devs));
@@ -758,6 +791,7 @@ static void __init universal_machine_init(void)
758 /* Last */ 791 /* Last */
759 platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices)); 792 platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
760 s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; 793 s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
794 s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
761} 795}
762 796
763MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") 797MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")