Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284830
b: refs/heads/master
c: 26c3d7a
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Florian Tobias Schandinat committed Nov 21, 2011
1 parent b5a5f37 commit a022b77
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d07a9d2a5e82ed677971b2e9f3e4cbd49b9ec34e
refs/heads/master: 26c3d7ac219e74ab3939048a32d6bd3b4a16798a
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-shmobile/board-ag5evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ static struct resource mipidsi0_resources[] = {
static struct sh_mipi_dsi_info mipidsi0_info = {
.data_format = MIPI_RGB888,
.lcd_chan = &lcdc0_info.ch[0],
.lane = 2,
.vsynw_offset = 20,
.clksrc = 1,
.flags = SH_MIPI_DSI_HSABM,
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ static struct resource mipidsi0_resources[] = {
static struct sh_mipi_dsi_info mipidsi0_info = {
.data_format = MIPI_RGB888,
.lcd_chan = &lcdc_info.ch[0],
.lane = 2,
.vsynw_offset = 17,
};

Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/video/sh_mipi_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/

#include <linux/bitmap.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/init.h>
Expand Down Expand Up @@ -153,6 +154,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan;
u32 pctype, datatype, pixfmt, linelength, vmctr2 = 0x00e00000;
bool yuv;
u32 tmp;

/*
* Select data format. MIPI DSI is not hot-pluggable, so, we just use
Expand Down Expand Up @@ -253,6 +255,9 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
(!yuv && ch->interface_type != RGB24))
return -EINVAL;

if (!pdata->lane)
return -EINVAL;

/* reset DSI link */
iowrite32(0x00000001, base + SYSCTRL);
/* Hold reset for 100 cycles of the slowest of bus, HS byte and LP clock */
Expand All @@ -269,7 +274,10 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
* ECC check enable
* additionally enable first two lanes
*/
iowrite32(0x00003703, base + SYSCONF);
bitmap_fill((unsigned long *)&tmp, pdata->lane);
tmp |= 0x00003700;
iowrite32(tmp, base + SYSCONF);

/*
* T_wakeup = 0x7000
* T_hs-trail = 3
Expand Down
1 change: 1 addition & 0 deletions trunk/include/video/sh_mipi_dsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct sh_mobile_lcdc_chan_cfg;
struct sh_mipi_dsi_info {
enum sh_mipi_dsi_data_fmt data_format;
struct sh_mobile_lcdc_chan_cfg *lcd_chan;
int lane;
unsigned long flags;
u32 clksrc;
unsigned int vsynw_offset;
Expand Down

0 comments on commit a022b77

Please sign in to comment.