aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Kumar2013-01-08 14:42:26 -0600
committerMinkyu Kang2013-01-09 19:19:47 -0600
commit9b572852c0547365b186651d27b3df5dcbe82be2 (patch)
tree54dff43142a93917b449ff1adf7de794508f9fab
parent4050f0700f1822e6cb0095128192c15be5e750ee (diff)
downloadu-boot-9b572852c0547365b186651d27b3df5dcbe82be2.tar.gz
u-boot-9b572852c0547365b186651d27b3df5dcbe82be2.tar.xz
u-boot-9b572852c0547365b186651d27b3df5dcbe82be2.zip
EXYNOS5: Add support for FIMD and DP
Add panel_info structure required by LCD driver and DP panel platdata for SMDK5250. Add GPIO configuration for LCD. Enable FIMD and DP support on SMDK5250. DP Panel size: 2560x1600. We use 16BPP resolution to get LCD console. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Acked-by: Simon Glass <sjg@chomium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--arch/arm/include/asm/arch-exynos/dp_info.h2
-rw-r--r--board/samsung/smdk5250/smdk5250.c97
-rw-r--r--include/configs/exynos5250-dt.h8
3 files changed, 107 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-exynos/dp_info.h b/arch/arm/include/asm/arch-exynos/dp_info.h
index 35694980f..102b709bd 100644
--- a/arch/arm/include/asm/arch-exynos/dp_info.h
+++ b/arch/arm/include/asm/arch-exynos/dp_info.h
@@ -211,4 +211,6 @@ unsigned int exynos_init_dp(void)
211} 211}
212#endif 212#endif
213 213
214void exynos_set_dp_platform_data(struct exynos_dp_platform_data *pd);
215
214#endif /* _DP_INFO_H */ 216#endif /* _DP_INFO_H */
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index d80f75da1..9c4bf9b31 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -24,13 +24,16 @@
24#include <fdtdec.h> 24#include <fdtdec.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <i2c.h> 26#include <i2c.h>
27#include <lcd.h>
27#include <netdev.h> 28#include <netdev.h>
28#include <spi.h> 29#include <spi.h>
29#include <asm/arch/cpu.h> 30#include <asm/arch/cpu.h>
30#include <asm/arch/gpio.h> 31#include <asm/arch/gpio.h>
31#include <asm/arch/mmc.h> 32#include <asm/arch/mmc.h>
32#include <asm/arch/pinmux.h> 33#include <asm/arch/pinmux.h>
34#include <asm/arch/power.h>
33#include <asm/arch/sromc.h> 35#include <asm/arch/sromc.h>
36#include <asm/arch/dp_info.h>
34#include <power/pmic.h> 37#include <power/pmic.h>
35 38
36DECLARE_GLOBAL_DATA_PTR; 39DECLARE_GLOBAL_DATA_PTR;
@@ -277,3 +280,97 @@ int board_early_init_f(void)
277 return err; 280 return err;
278} 281}
279#endif 282#endif
283
284void cfg_lcd_gpio(void)
285{
286 struct exynos5_gpio_part1 *gpio1 =
287 (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
288
289 /* For Backlight */
290 s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT);
291 s5p_gpio_set_value(&gpio1->b2, 0, 1);
292
293 /* LCD power on */
294 s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT);
295 s5p_gpio_set_value(&gpio1->x1, 5, 1);
296
297 /* Set Hotplug detect for DP */
298 s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
299}
300
301vidinfo_t panel_info = {
302 .vl_freq = 60,
303 .vl_col = 2560,
304 .vl_row = 1600,
305 .vl_width = 2560,
306 .vl_height = 1600,
307 .vl_clkp = CONFIG_SYS_LOW,
308 .vl_hsp = CONFIG_SYS_LOW,
309 .vl_vsp = CONFIG_SYS_LOW,
310 .vl_dp = CONFIG_SYS_LOW,
311 .vl_bpix = 4, /* LCD_BPP = 2^4, for output conosle on LCD */
312
313 /* wDP panel timing infomation */
314 .vl_hspw = 32,
315 .vl_hbpd = 80,
316 .vl_hfpd = 48,
317
318 .vl_vspw = 6,
319 .vl_vbpd = 37,
320 .vl_vfpd = 3,
321 .vl_cmd_allow_len = 0xf,
322
323 .win_id = 3,
324 .cfg_gpio = cfg_lcd_gpio,
325 .backlight_on = NULL,
326 .lcd_power_on = NULL,
327 .reset_lcd = NULL,
328 .dual_lcd_enabled = 0,
329
330 .init_delay = 0,
331 .power_on_delay = 0,
332 .reset_delay = 0,
333 .interface_mode = FIMD_RGB_INTERFACE,
334 .dp_enabled = 1,
335};
336
337static struct edp_device_info edp_info = {
338 .disp_info = {
339 .h_res = 2560,
340 .h_sync_width = 32,
341 .h_back_porch = 80,
342 .h_front_porch = 48,
343 .v_res = 1600,
344 .v_sync_width = 6,
345 .v_back_porch = 37,
346 .v_front_porch = 3,
347 .v_sync_rate = 60,
348 },
349 .lt_info = {
350 .lt_status = DP_LT_NONE,
351 },
352 .video_info = {
353 .master_mode = 0,
354 .bist_mode = DP_DISABLE,
355 .bist_pattern = NO_PATTERN,
356 .h_sync_polarity = 0,
357 .v_sync_polarity = 0,
358 .interlaced = 0,
359 .color_space = COLOR_RGB,
360 .dynamic_range = VESA,
361 .ycbcr_coeff = COLOR_YCBCR601,
362 .color_depth = COLOR_8,
363 },
364};
365
366static struct exynos_dp_platform_data dp_platform_data = {
367 .phy_enable = set_dp_phy_ctrl,
368 .edp_dev_info = &edp_info,
369};
370
371void init_panel_info(vidinfo_t *vid)
372{
373 vid->rgb_mode = MODE_RGB_P,
374
375 exynos_set_dp_platform_data(&dp_platform_data);
376}
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 59182f444..07bca1d89 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -297,4 +297,12 @@
297#define CONFIG_SHA1 297#define CONFIG_SHA1
298#define CONFIG_SHA256 298#define CONFIG_SHA256
299 299
300/* Display */
301#define CONFIG_LCD
302#define CONFIG_EXYNOS_FB
303#define CONFIG_EXYNOS_DP
304#define LCD_XRES 2560
305#define LCD_YRES 1600
306#define LCD_BPP LCD_COLOR16
307
300#endif /* __CONFIG_H */ 308#endif /* __CONFIG_H */