public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250
@ 2013-01-09  6:42 Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL Ajay Kumar
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ajay Kumar @ 2013-01-09  6:42 UTC (permalink / raw)
  To: u-boot

  [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(-)

-- 
1.8.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL
  2013-01-09  6:42 [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
@ 2013-01-09  6:42 ` Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 2/4] EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM Ajay Kumar
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Ajay Kumar @ 2013-01-09  6:42 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
---
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(-)

diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c
index ae6d7fe..abc3272 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -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);
 
 	/*
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH V6 2/4] EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM
  2013-01-09  6:42 [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL Ajay Kumar
@ 2013-01-09  6:42 ` Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 3/4] video: Modify exynos_fimd driver to support LCD console Ajay Kumar
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Ajay Kumar @ 2013-01-09  6:42 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
---
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(+)

diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
index 9a7cbeb..c1c9a35 100644
--- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
+++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
@@ -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
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH V6 3/4] video: Modify exynos_fimd driver to support LCD console
  2013-01-09  6:42 [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 2/4] EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM Ajay Kumar
@ 2013-01-09  6:42 ` Ajay Kumar
  2013-01-09  6:42 ` [U-Boot] [PATCH 4/4] EXYNOS5: Add support for FIMD and DP Ajay Kumar
  2013-01-10  1:21 ` [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Minkyu Kang
  4 siblings, 0 replies; 6+ messages in thread
From: Ajay Kumar @ 2013-01-09  6:42 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
---
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(-)

diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index aac74a3..25d73cf 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -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)
diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index 06eae2e..2efe6a6 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -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));
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 4/4] EXYNOS5: Add support for FIMD and DP
  2013-01-09  6:42 [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
                   ` (2 preceding siblings ...)
  2013-01-09  6:42 ` [U-Boot] [PATCH V6 3/4] video: Modify exynos_fimd driver to support LCD console Ajay Kumar
@ 2013-01-09  6:42 ` Ajay Kumar
  2013-01-10  1:21 ` [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Minkyu Kang
  4 siblings, 0 replies; 6+ messages in thread
From: Ajay Kumar @ 2013-01-09  6:42 UTC (permalink / raw)
  To: u-boot

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>
---
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(+)

diff --git a/arch/arm/include/asm/arch-exynos/dp_info.h b/arch/arm/include/asm/arch-exynos/dp_info.h
index 3569498..102b709 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)
 }
 #endif
 
+void exynos_set_dp_platform_data(struct exynos_dp_platform_data *pd);
+
 #endif /* _DP_INFO_H */
diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c
index d80f75d..9c4bf9b 100644
--- a/board/samsung/smdk5250/smdk5250.c
+++ b/board/samsung/smdk5250/smdk5250.c
@@ -24,13 +24,16 @@
 #include <fdtdec.h>
 #include <asm/io.h>
 #include <i2c.h>
+#include <lcd.h>
 #include <netdev.h>
 #include <spi.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/pinmux.h>
+#include <asm/arch/power.h>
 #include <asm/arch/sromc.h>
+#include <asm/arch/dp_info.h>
 #include <power/pmic.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -277,3 +280,97 @@ int board_early_init_f(void)
 	return err;
 }
 #endif
+
+void cfg_lcd_gpio(void)
+{
+	struct exynos5_gpio_part1 *gpio1 =
+		(struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
+
+	/* For Backlight */
+	s5p_gpio_cfg_pin(&gpio1->b2, 0, GPIO_OUTPUT);
+	s5p_gpio_set_value(&gpio1->b2, 0, 1);
+
+	/* LCD power on */
+	s5p_gpio_cfg_pin(&gpio1->x1, 5, GPIO_OUTPUT);
+	s5p_gpio_set_value(&gpio1->x1, 5, 1);
+
+	/* Set Hotplug detect for DP */
+	s5p_gpio_cfg_pin(&gpio1->x0, 7, GPIO_FUNC(0x3));
+}
+
+vidinfo_t panel_info = {
+	.vl_freq	= 60,
+	.vl_col		= 2560,
+	.vl_row		= 1600,
+	.vl_width	= 2560,
+	.vl_height	= 1600,
+	.vl_clkp	= CONFIG_SYS_LOW,
+	.vl_hsp		= CONFIG_SYS_LOW,
+	.vl_vsp		= CONFIG_SYS_LOW,
+	.vl_dp		= CONFIG_SYS_LOW,
+	.vl_bpix	= 4,	/* LCD_BPP = 2^4, for output conosle on LCD */
+
+	/* wDP panel timing infomation */
+	.vl_hspw	= 32,
+	.vl_hbpd	= 80,
+	.vl_hfpd	= 48,
+
+	.vl_vspw	= 6,
+	.vl_vbpd	= 37,
+	.vl_vfpd	= 3,
+	.vl_cmd_allow_len = 0xf,
+
+	.win_id		= 3,
+	.cfg_gpio	= cfg_lcd_gpio,
+	.backlight_on	= NULL,
+	.lcd_power_on	= NULL,
+	.reset_lcd	= NULL,
+	.dual_lcd_enabled = 0,
+
+	.init_delay	= 0,
+	.power_on_delay = 0,
+	.reset_delay	= 0,
+	.interface_mode = FIMD_RGB_INTERFACE,
+	.dp_enabled	= 1,
+};
+
+static struct edp_device_info edp_info = {
+	.disp_info = {
+		.h_res = 2560,
+		.h_sync_width = 32,
+		.h_back_porch = 80,
+		.h_front_porch = 48,
+		.v_res = 1600,
+		.v_sync_width  = 6,
+		.v_back_porch = 37,
+		.v_front_porch = 3,
+		.v_sync_rate = 60,
+	},
+	.lt_info = {
+		.lt_status = DP_LT_NONE,
+	},
+	.video_info = {
+		.master_mode = 0,
+		.bist_mode = DP_DISABLE,
+		.bist_pattern = NO_PATTERN,
+		.h_sync_polarity = 0,
+		.v_sync_polarity = 0,
+		.interlaced = 0,
+		.color_space = COLOR_RGB,
+		.dynamic_range = VESA,
+		.ycbcr_coeff = COLOR_YCBCR601,
+		.color_depth = COLOR_8,
+	},
+};
+
+static struct exynos_dp_platform_data dp_platform_data = {
+	.phy_enable	= set_dp_phy_ctrl,
+	.edp_dev_info	= &edp_info,
+};
+
+void init_panel_info(vidinfo_t *vid)
+{
+	vid->rgb_mode   = MODE_RGB_P,
+
+	exynos_set_dp_platform_data(&dp_platform_data);
+}
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 59182f4..07bca1d 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -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 */
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250
  2013-01-09  6:42 [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
                   ` (3 preceding siblings ...)
  2013-01-09  6:42 ` [U-Boot] [PATCH 4/4] EXYNOS5: Add support for FIMD and DP Ajay Kumar
@ 2013-01-10  1:21 ` Minkyu Kang
  4 siblings, 0 replies; 6+ messages in thread
From: Minkyu Kang @ 2013-01-10  1:21 UTC (permalink / raw)
  To: u-boot

On 09/01/13 15:42, Ajay Kumar wrote:
>   [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(-)
> 

applied to u-boot-samsung

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-10  1:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09  6:42 [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Ajay Kumar
2013-01-09  6:42 ` [U-Boot] [PATCH V6 1/4] EXYNOS5: Change parent clock of FIMD to MPLL Ajay Kumar
2013-01-09  6:42 ` [U-Boot] [PATCH V6 2/4] EXYNOS: Add dummy definition to fix compilation dependency on CONFIG_EXYNOS_MIPI_DSIM Ajay Kumar
2013-01-09  6:42 ` [U-Boot] [PATCH V6 3/4] video: Modify exynos_fimd driver to support LCD console Ajay Kumar
2013-01-09  6:42 ` [U-Boot] [PATCH 4/4] EXYNOS5: Add support for FIMD and DP Ajay Kumar
2013-01-10  1:21 ` [U-Boot] [PATCH V6 0/4] Add support for FIMD and DP on SMDK5250 Minkyu Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox