aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-01-14 22:44:44 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:19:03 -0500
commitcbd10dfb82d6b0b169a42fe52223259f0b1a2cab (patch)
treee288b561a0a6935938a5b41cc1dc5270c750ef09 /arch/sh/boards
parent4bb70b84bffee0bf1f60f17113e5baa814c2ce79 (diff)
sh: r2d - add lcd planel timings to sm501 platform data
This patch adds timings to drive a Sharp LQ104V1DG21 lcd panel that can be hooked up to R2D-1 or R2D-PLUS. The sm501fb driver should leave the pins FPEN and VBIASEN alone, and this patch instructs the driver to do so by not setting flags flags for these pins. This patch works best together with the patch posted to the linux-fbdev-devel list "sm501fb: control panel pin usage with platform data flags", but this patch can be merged independently. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 8125d20fdbd8..dc143c10cd18 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -14,6 +14,7 @@
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15#include <linux/sm501.h> 15#include <linux/sm501.h>
16#include <linux/pm.h> 16#include <linux/pm.h>
17#include <linux/fb.h>
17#include <asm/machvec.h> 18#include <asm/machvec.h>
18#include <asm/rts7751r2d.h> 19#include <asm/rts7751r2d.h>
19#include <asm/voyagergx.h> 20#include <asm/voyagergx.h>
@@ -129,9 +130,53 @@ static struct resource sm501_resources[] = {
129 }, 130 },
130}; 131};
131 132
133static struct fb_videomode sm501_default_mode = {
134 .pixclock = 35714,
135 .xres = 640,
136 .yres = 480,
137 .left_margin = 105,
138 .right_margin = 50,
139 .upper_margin = 35,
140 .lower_margin = 0,
141 .hsync_len = 96,
142 .vsync_len = 2,
143 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
144};
145
146static struct sm501_platdata_fbsub sm501_pdata_fbsub_pnl = {
147 .def_bpp = 16,
148 .def_mode = &sm501_default_mode,
149 .flags = SM501FB_FLAG_USE_INIT_MODE |
150 SM501FB_FLAG_USE_HWCURSOR |
151 SM501FB_FLAG_USE_HWACCEL |
152 SM501FB_FLAG_DISABLE_AT_EXIT,
153};
154
155static struct sm501_platdata_fbsub sm501_pdata_fbsub_crt = {
156 .flags = (SM501FB_FLAG_USE_INIT_MODE |
157 SM501FB_FLAG_USE_HWCURSOR |
158 SM501FB_FLAG_USE_HWACCEL |
159 SM501FB_FLAG_DISABLE_AT_EXIT),
160
161};
162
163static struct sm501_platdata_fb sm501_fb_pdata = {
164 .fb_route = SM501_FB_OWN,
165 .fb_crt = &sm501_pdata_fbsub_crt,
166 .fb_pnl = &sm501_pdata_fbsub_pnl,
167 .flags = SM501_FBPD_SWAP_FB_ENDIAN,
168};
169
170static struct sm501_platdata sm501_platform_data = {
171 .fb = &sm501_fb_pdata,
172};
173
132static struct platform_device sm501_device = { 174static struct platform_device sm501_device = {
133 .name = "sm501", 175 .name = "sm501",
134 .id = -1, 176 .id = -1,
177 .dev = {
178 .platform_data = &sm501_platform_data,
179 },
135 .num_resources = ARRAY_SIZE(sm501_resources), 180 .num_resources = ARRAY_SIZE(sm501_resources),
136 .resource = sm501_resources, 181 .resource = sm501_resources,
137}; 182};