diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-08-11 06:57:28 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-04 00:00:56 -0400 |
commit | 0d88f9464850ac13c658d9de808ea2e0a31423be (patch) | |
tree | 064792e6896ef4c60534af5c6a23750e1b880ae8 /arch/arm/mach-exynos4/mach-nuri.c | |
parent | f3f5bfe234f562772392558dcf29a75d3229115c (diff) |
ARM: EXYNOS4: enable frame buffer on Nuri board
This patch adds platform definitions to enable s3c-fb driver.
Framebuffer window with 1280x800x16bpp 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-nuri.c')
-rw-r--r-- | arch/arm/mach-exynos4/mach-nuri.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index 43be71b799cb..bbd13f454151 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c | |||
@@ -32,10 +32,12 @@ | |||
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | 33 | ||
34 | #include <plat/adc.h> | 34 | #include <plat/adc.h> |
35 | #include <plat/regs-fb-v4.h> | ||
35 | #include <plat/regs-serial.h> | 36 | #include <plat/regs-serial.h> |
36 | #include <plat/exynos4.h> | 37 | #include <plat/exynos4.h> |
37 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
38 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
40 | #include <plat/fb.h> | ||
39 | #include <plat/sdhci.h> | 41 | #include <plat/sdhci.h> |
40 | #include <plat/ehci.h> | 42 | #include <plat/ehci.h> |
41 | #include <plat/clock.h> | 43 | #include <plat/clock.h> |
@@ -199,6 +201,33 @@ static struct platform_device nuri_gpio_keys = { | |||
199 | }, | 201 | }, |
200 | }; | 202 | }; |
201 | 203 | ||
204 | /* Frame Buffer */ | ||
205 | static struct s3c_fb_pd_win nuri_fb_win0 = { | ||
206 | .win_mode = { | ||
207 | .left_margin = 64, | ||
208 | .right_margin = 16, | ||
209 | .upper_margin = 64, | ||
210 | .lower_margin = 1, | ||
211 | .hsync_len = 48, | ||
212 | .vsync_len = 3, | ||
213 | .xres = 1280, | ||
214 | .yres = 800, | ||
215 | .refresh = 60, | ||
216 | }, | ||
217 | .max_bpp = 24, | ||
218 | .default_bpp = 16, | ||
219 | .virtual_x = 1280, | ||
220 | .virtual_y = 800, | ||
221 | }; | ||
222 | |||
223 | static struct s3c_fb_platdata nuri_fb_pdata __initdata = { | ||
224 | .win[0] = &nuri_fb_win0, | ||
225 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
226 | VIDCON0_CLKSEL_LCD, | ||
227 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
228 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | ||
229 | }; | ||
230 | |||
202 | static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) | 231 | static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) |
203 | { | 232 | { |
204 | int gpio = EXYNOS4_GPE1(5); | 233 | int gpio = EXYNOS4_GPE1(5); |
@@ -1092,6 +1121,7 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
1092 | /* Samsung Platform Devices */ | 1121 | /* Samsung Platform Devices */ |
1093 | &s3c_device_i2c5, /* PMIC should initialize first */ | 1122 | &s3c_device_i2c5, /* PMIC should initialize first */ |
1094 | &emmc_fixed_voltage, | 1123 | &emmc_fixed_voltage, |
1124 | &s5p_device_fimd0, | ||
1095 | &s3c_device_hsmmc0, | 1125 | &s3c_device_hsmmc0, |
1096 | &s3c_device_hsmmc2, | 1126 | &s3c_device_hsmmc2, |
1097 | &s3c_device_hsmmc3, | 1127 | &s3c_device_hsmmc3, |
@@ -1106,6 +1136,7 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
1106 | &s5p_device_mfc_l, | 1136 | &s5p_device_mfc_l, |
1107 | &s5p_device_mfc_r, | 1137 | &s5p_device_mfc_r, |
1108 | &exynos4_device_pd[PD_MFC], | 1138 | &exynos4_device_pd[PD_MFC], |
1139 | &exynos4_device_pd[PD_LCD0], | ||
1109 | 1140 | ||
1110 | /* NURI Devices */ | 1141 | /* NURI Devices */ |
1111 | &nuri_gpio_keys, | 1142 | &nuri_gpio_keys, |
@@ -1142,12 +1173,15 @@ static void __init nuri_machine_init(void) | |||
1142 | i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3)); | 1173 | i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3)); |
1143 | i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); | 1174 | i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); |
1144 | 1175 | ||
1176 | s5p_fimd0_set_platdata(&nuri_fb_pdata); | ||
1177 | |||
1145 | nuri_ehci_init(); | 1178 | nuri_ehci_init(); |
1146 | clk_xusbxti.rate = 24000000; | 1179 | clk_xusbxti.rate = 24000000; |
1147 | 1180 | ||
1148 | /* Last */ | 1181 | /* Last */ |
1149 | platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices)); | 1182 | platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices)); |
1150 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; | 1183 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; |
1184 | s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev; | ||
1151 | } | 1185 | } |
1152 | 1186 | ||
1153 | MACHINE_START(NURI, "NURI") | 1187 | MACHINE_START(NURI, "NURI") |