aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-11-08 23:34:55 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-11-21 18:43:21 -0500
commitf832906a56bcf9c597589e9a7898c1dd2f0513b9 (patch)
tree699c01b6a8a2866e8d2366b0f755230544568b57
parent26c3d7ac219e74ab3939048a32d6bd3b4a16798a (diff)
fbdev: sh_mipi_dsi: add sync_pulses/sync_events/burst mode
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c3
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c1
-rw-r--r--drivers/video/sh_mipi_dsi.c9
-rw-r--r--include/video/sh_mipi_dsi.h9
4 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index e969fe91e505..6993844424c6 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -327,7 +327,8 @@ static struct sh_mipi_dsi_info mipidsi0_info = {
327 .lane = 2, 327 .lane = 2,
328 .vsynw_offset = 20, 328 .vsynw_offset = 20,
329 .clksrc = 1, 329 .clksrc = 1,
330 .flags = SH_MIPI_DSI_HSABM, 330 .flags = SH_MIPI_DSI_HSABM |
331 SH_MIPI_DSI_SYNC_PULSES_MODE,
331}; 332};
332 333
333static struct platform_device mipidsi0_device = { 334static struct platform_device mipidsi0_device = {
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index b7d006fd0461..b2e32c8c9e54 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -582,6 +582,7 @@ static struct sh_mipi_dsi_info mipidsi0_info = {
582 .lcd_chan = &lcdc_info.ch[0], 582 .lcd_chan = &lcdc_info.ch[0],
583 .lane = 2, 583 .lane = 2,
584 .vsynw_offset = 17, 584 .vsynw_offset = 17,
585 .flags = SH_MIPI_DSI_SYNC_PULSES_MODE,
585}; 586};
586 587
587static struct platform_device mipidsi0_device = { 588static struct platform_device mipidsi0_device = {
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
index af6bec24effb..b8c4873df710 100644
--- a/drivers/video/sh_mipi_dsi.c
+++ b/drivers/video/sh_mipi_dsi.c
@@ -152,7 +152,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
152{ 152{
153 void __iomem *base = mipi->base; 153 void __iomem *base = mipi->base;
154 struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan; 154 struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan;
155 u32 pctype, datatype, pixfmt, linelength, vmctr2 = 0x00e00000; 155 u32 pctype, datatype, pixfmt, linelength, vmctr2;
156 bool yuv; 156 bool yuv;
157 u32 tmp; 157 u32 tmp;
158 158
@@ -324,6 +324,13 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
324 * Non-burst mode with sync pulses: VSE and HSE are output, 324 * Non-burst mode with sync pulses: VSE and HSE are output,
325 * HSA period allowed, no commands in LP 325 * HSA period allowed, no commands in LP
326 */ 326 */
327 vmctr2 = 0;
328 if (pdata->flags & SH_MIPI_DSI_VSEE)
329 vmctr2 |= 1 << 23;
330 if (pdata->flags & SH_MIPI_DSI_HSEE)
331 vmctr2 |= 1 << 22;
332 if (pdata->flags & SH_MIPI_DSI_HSAE)
333 vmctr2 |= 1 << 21;
327 if (pdata->flags & SH_MIPI_DSI_BL2E) 334 if (pdata->flags & SH_MIPI_DSI_BL2E)
328 vmctr2 |= 1 << 17; 335 vmctr2 |= 1 << 17;
329 if (pdata->flags & SH_MIPI_DSI_HSABM) 336 if (pdata->flags & SH_MIPI_DSI_HSABM)
diff --git a/include/video/sh_mipi_dsi.h b/include/video/sh_mipi_dsi.h
index 3d0ec500d896..c8225b4fe8e6 100644
--- a/include/video/sh_mipi_dsi.h
+++ b/include/video/sh_mipi_dsi.h
@@ -31,6 +31,15 @@ struct sh_mobile_lcdc_chan_cfg;
31#define SH_MIPI_DSI_HBPBM (1 << 1) 31#define SH_MIPI_DSI_HBPBM (1 << 1)
32#define SH_MIPI_DSI_HFPBM (1 << 2) 32#define SH_MIPI_DSI_HFPBM (1 << 2)
33#define SH_MIPI_DSI_BL2E (1 << 3) 33#define SH_MIPI_DSI_BL2E (1 << 3)
34#define SH_MIPI_DSI_VSEE (1 << 4)
35#define SH_MIPI_DSI_HSEE (1 << 5)
36#define SH_MIPI_DSI_HSAE (1 << 6)
37
38#define SH_MIPI_DSI_SYNC_PULSES_MODE (SH_MIPI_DSI_VSEE | \
39 SH_MIPI_DSI_HSEE | \
40 SH_MIPI_DSI_HSAE)
41#define SH_MIPI_DSI_SYNC_EVENTS_MODE (0)
42#define SH_MIPI_DSI_SYNC_BURST_MODE (SH_MIPI_DSI_BL2E)
34 43
35struct sh_mipi_dsi_info { 44struct sh_mipi_dsi_info {
36 enum sh_mipi_dsi_data_fmt data_format; 45 enum sh_mipi_dsi_data_fmt data_format;