Skip to contentSkip to conversation

Add support for FIMD and DP on SMDK5250

PATCH New Ajay Kumar 2 participants 6 messages Jan 9, 2013 – Jan 10, 2013

Subsystems (3)
lore
Share & tools
lore

Ajay Kumar

author
#0 lore raw

v6 cover Add support for FIMD and DP on SMDK5250

[PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL [PATCH V6 2/4] EXYNOS: Add dummy definition to fix compilation dependency on
CONFIG_EXYNOS_MIPI_DSIM
[PATCH V6 3/4] video: Modify exynos_fimd driver to support LCD console [PATCH V6 4/4] EXYNOS5: Add support for FIMD and DP

 arch/arm/cpu/armv7/exynos/clock.c            |  2 +-
 arch/arm/include/asm/arch-exynos/dp_info.h   |  2 +
 arch/arm/include/asm/arch-exynos/mipi_dsim.h |  7 ++
 board/samsung/smdk5250/smdk5250.c            | 97 ++++++++++++++++++++++++++++
 drivers/video/exynos_fb.c                    |  2 +
 drivers/video/exynos_fimd.c                  | 12 ++--
 include/configs/exynos5250-dt.h              |  8 +++
 7 files changed, 125 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.0
author
#1 lore raw

PATCH v6 1/4 EXYNOS5: Change parent clock of FIMD to MPLL

With VPLL as source clock to FIMD,
Exynos DP Initializaton was failing sometimes with unstable clock. Changing FIMD source to MPLL resolves this issue.

---
Changes in V2:
-- Fix commit message. Had written VPLL instead of MPLL.
Changes in V3:
-- Added changelog in commit message.
Changes in V6:
-- Moved changelog to proper position

 arch/arm/cpu/armv7/exynos/clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/exynos/clock.c +1 -1
index ae6d7fe..abc3272 100644
@@ -741,7 +741,7 @@ void exynos5_set_lcd_clk(void)
 	 */
 	cfg = readl(&clk->src_disp1_0);
 	cfg &= ~(0xf);
-	cfg |= 0x8;
+	cfg |= 0x6;
 	writel(cfg, &clk->src_disp1_0);
 
 	/*
Signature · 1 line
1.8.0
author
#2 lore raw

PATCH v6 2/4 EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM

In reply to Ajay Kumar

When only DP is used, we need not enable CONFIG_EXYNOS_MIPI_DSIM. But if we do not select CONFIG_EXYNOS_MIPI_DSIM, exynos_fb.c throws error saying exynos_mipi_dsi_init() not defined. So, we add dummy definition for exynos_mipi_dsi_init when CONFIG_EXYNOS_MIPI_DSIM is not defined.

---
Changes in V2:
-- Make dummy definition for exynos_mipi_dsi_init as static.
Changes in V3:
-- Added Changelog in commit message.
Changes in V6:
-- Moved changelog to proper position

 arch/arm/include/asm/arch-exynos/mipi_dsim.h | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/include/asm/arch-exynos/mipi_dsim.h +7 -0
index 9a7cbeb..c1c9a35 100644
@@ -358,7 +358,14 @@ struct mipi_dsim_lcd_driver {
 	void	(*mipi_display_on)(struct mipi_dsim_device *dsim_dev);
 };
 
+#ifdef CONFIG_EXYNOS_MIPI_DSIM
 int exynos_mipi_dsi_init(void);
+#else
+static inline int exynos_mipi_dsi_init(void)
+{
+	return 0;
+}
+#endif
 
 /*
  * register mipi_dsim_lcd_driver object defined by lcd panel driver
Signature · 1 line
1.8.0
author
#3 lore raw

PATCH v6 3/4 video: Modify exynos_fimd driver to support LCD console

In reply to Ajay Kumar

Currently, exynos FIMD driver is being used to support only TIZEN LOGOs. In order to get LCD console, we need to enable half word swap feature of FIMD and use 16 BPP.
LCD console and proprietary Logo cannot be used simultaneously. We use "logo_on" field inside vidinfo_t structure to decide whether user wants Logo or Console.
Define CONFIG_CMD_BMP and make logo_on = 1 to get Logo on screen. Use logo_on = 0 to get output console on LCD.

---
Changes in V2:
-- Use CONFIG_CMD_BMP instead of CONFIG_TIZEN to distinguish
between Proprietary logo support and LCD console support.
Changes in V3:
-- Create and use new config CONFIG_EXYNOS_LOGO instead of using
CONFIG_CMD_BMP
Changes in V4:
-- Remove #ifdef CONFIG_EXYNOS_LOGO, instead use logo_on field
to add LCD console support.
Changes in V5:
-- Remove dummy definition for bmp_display. Instead, place the call to
bmp_display inside #ifdef CONFIG_CMD_BMP
-- Added changelog in commit message.
Changes in V6:
-- Moved changelog to proper position

 drivers/video/exynos_fb.c   |  2 ++
 drivers/video/exynos_fimd.c | 12 ++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/video/exynos_fb.c +2 -0
index aac74a3..25d73cf 100644
@@ -88,7 +88,9 @@ static void draw_logo(void)
 	}
 
 	addr = panel_info.logo_addr;
+#ifdef CONFIG_CMD_BMP
 	bmp_display(addr, x, y);
+#endif
 }
 
 static void lcd_panel_on(vidinfo_t *vid)
drivers/video/exynos_fimd.c +8 -4
index 06eae2e..2efe6a6 100644
@@ -88,14 +88,18 @@ static void exynos_fimd_set_par(unsigned int win_id)
 	/* DATAPATH is DMA */
 	cfg |= EXYNOS_WINCON_DATAPATH_DMA;
 
-	/* bpp is 32 */
-	cfg |= EXYNOS_WINCON_WSWP_ENABLE;
+	if (pvid->logo_on) /* To get proprietary LOGO */
+		cfg |= EXYNOS_WINCON_WSWP_ENABLE;
+	else /* To get output console on LCD */
+		cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
 
 	/* dma burst is 16 */
 	cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
 
-	/* pixel format is unpacked RGB888 */
-	cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+	if (pvid->logo_on) /* To get proprietary LOGO */
+		cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+	else /* To get output console on LCD */
+		cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
 
 	writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
 			EXYNOS_WINCON(win_id));
Signature · 1 line
1.8.0
author
#4 lore raw

PATCH v6 4/4 EXYNOS5: Add support for FIMD and DP

In reply to Ajay Kumar

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.

---
changes in V2:
-- Move LCD GPIO confiration from exynos common file to board file.
changes in V3:
-- Remove explicit call for cfg_lcd_gpio and add it as callback.
changes in V4:
-- use logo_on = 1 for smdk5250 panel_info structure.
changes in V5:
-- Move CONFIGS from smdk5250.h to exynos5250-dt.h.
-- Added changelog in commit message.
Changes in V6:
-- Fix compilation warning:
implicit declaration of function 'exynos_set_dp_platform_data'
-- Moved changelog to proper position

 arch/arm/include/asm/arch-exynos/dp_info.h |  2 +
 board/samsung/smdk5250/smdk5250.c          | 97 ++++++++++++++++++++++++++++++
 include/configs/exynos5250-dt.h            |  8 +++
 3 files changed, 107 insertions(+)
arch/arm/include/asm/arch-exynos/dp_info.h +2 -0
index 3569498..102b709 100644
@@ -211,4 +211,6 @@ unsigned int exynos_init_dp(void)
 }
 #endif
 
+void exynos_set_dp_platform_data(struct exynos_dp_platform_data *pd);
+
 #endif /* _DP_INFO_H */
board/samsung/smdk5250/smdk5250.c +97 -0

113 lines not on this page · raw message

include/configs/exynos5250-dt.h +8 -0
index 59182f4..07bca1d 100644
@@ -297,4 +297,12 @@
 #define CONFIG_SHA1
 #define CONFIG_SHA256
 
+/* Display */
+#define CONFIG_LCD
+#define CONFIG_EXYNOS_FB
+#define CONFIG_EXYNOS_DP
+#define LCD_XRES			2560
+#define LCD_YRES			1600
+#define LCD_BPP			LCD_COLOR16
+
 #endif	/* __CONFIG_H */
Signature · 1 line
1.8.0
#5 lore raw

v6 cover Add support for FIMD and DP on SMDK5250

In reply to Ajay Kumar
Quoted 6 lines · Ajay Kumar

[PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL [PATCH V6 2/4] EXYNOS: Add dummy definition to fix compilation dependency on
CONFIG_EXYNOS_MIPI_DSIM
[PATCH V6 3/4] video: Modify exynos_fimd driver to support LCD console [PATCH V6 4/4] EXYNOS5: Add support for FIMD and DP

Quoted 9 lines
 arch/arm/cpu/armv7/exynos/clock.c            |  2 +-
 arch/arm/include/asm/arch-exynos/dp_info.h   |  2 +
 arch/arm/include/asm/arch-exynos/mipi_dsim.h |  7 ++
 board/samsung/smdk5250/smdk5250.c            | 97 ++++++++++++++++++++++++++++
 drivers/video/exynos_fb.c                    |  2 +
 drivers/video/exynos_fimd.c                  | 12 ++--
 include/configs/exynos5250-dt.h              |  8 +++
 7 files changed, 125 insertions(+), 5 deletions(-)

applied to u-boot-samsung

Thanks,
Minkyu Kang.