aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-ecovec24/setup.c
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-08-26 07:04:39 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-26 22:36:10 -0400
commitea15edb292197aaf0b137621bafb69f6157f4532 (patch)
treef83a60baaa92094a05f0b6e8a69fc2bb021937b1 /arch/sh/boards/mach-ecovec24/setup.c
parent2153ad3294e3e1e89d27a78d65932352b80a4f78 (diff)
sh: Add LCDC Panel support for EcoVec24
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-ecovec24/setup.c')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 55ff7357e799..428d1187ce5c 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -219,7 +219,6 @@ static struct sh_mobile_lcdc_info lcdc_info = {
219 .interface_type = RGB18, 219 .interface_type = RGB18,
220 .chan = LCDC_CHAN_MAINLCD, 220 .chan = LCDC_CHAN_MAINLCD,
221 .bpp = 16, 221 .bpp = 16,
222 .clock_divider = 1,
223 .lcd_cfg = { 222 .lcd_cfg = {
224 .sync = 0, /* hsync and vsync are active low */ 223 .sync = 0, /* hsync and vsync are active low */
225 }, 224 },
@@ -337,6 +336,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
337}; 336};
338 337
339#define PORT_HIZA 0xA4050158 338#define PORT_HIZA 0xA4050158
339#define IODRIVEA 0xA405018A
340static int __init devices_setup(void) 340static int __init devices_setup(void)
341{ 341{
342 /* enable SCIFA0 */ 342 /* enable SCIFA0 */
@@ -422,9 +422,13 @@ static int __init devices_setup(void)
422 gpio_direction_output(GPIO_PTR1, 0); 422 gpio_direction_output(GPIO_PTR1, 0);
423 gpio_direction_output(GPIO_PTA2, 0); 423 gpio_direction_output(GPIO_PTA2, 0);
424 424
425 /* I/O buffer drive ability is low */
426 ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0040 , IODRIVEA);
427
425 if (gpio_get_value(GPIO_PTE6)) { 428 if (gpio_get_value(GPIO_PTE6)) {
426 /* DVI */ 429 /* DVI */
427 lcdc_info.clock_source = LCDC_CLK_EXTERNAL; 430 lcdc_info.clock_source = LCDC_CLK_EXTERNAL;
431 lcdc_info.ch[0].clock_divider = 1,
428 lcdc_info.ch[0].lcd_cfg.name = "DVI"; 432 lcdc_info.ch[0].lcd_cfg.name = "DVI";
429 lcdc_info.ch[0].lcd_cfg.xres = 1280; 433 lcdc_info.ch[0].lcd_cfg.xres = 1280;
430 lcdc_info.ch[0].lcd_cfg.yres = 720; 434 lcdc_info.ch[0].lcd_cfg.yres = 720;
@@ -439,7 +443,29 @@ static int __init devices_setup(void)
439 gpio_set_value(GPIO_PTU1, 1); 443 gpio_set_value(GPIO_PTU1, 1);
440 } else { 444 } else {
441 /* Panel */ 445 /* Panel */
442 /* not supported */ 446
447 lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
448 lcdc_info.ch[0].clock_divider = 2,
449 lcdc_info.ch[0].lcd_cfg.name = "Panel";
450 lcdc_info.ch[0].lcd_cfg.xres = 800;
451 lcdc_info.ch[0].lcd_cfg.yres = 480;
452 lcdc_info.ch[0].lcd_cfg.left_margin = 220;
453 lcdc_info.ch[0].lcd_cfg.right_margin = 110;
454 lcdc_info.ch[0].lcd_cfg.hsync_len = 70;
455 lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
456 lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
457 lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
458
459 gpio_set_value(GPIO_PTR1, 1);
460
461 /* FIXME
462 *
463 * LCDDON control is needed for Panel,
464 * but current sh_mobile_lcdc driver doesn't control it.
465 * It is temporary correspondence
466 */
467 gpio_request(GPIO_PTF4, NULL);
468 gpio_direction_output(GPIO_PTF4, 1);
443 } 469 }
444 470
445 /* enable CEU0 */ 471 /* enable CEU0 */