summaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2009-08-26 11:04:39 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-08-27 11:36:10 +0900
commitea15edb292197aaf0b137621bafb69f6157f4532 (patch)
treef83a60baaa92094a05f0b6e8a69fc2bb021937b1 /arch/sh/boards
parent2153ad3294e3e1e89d27a78d65932352b80a4f78 (diff)
downloadkernel-crypto-ea15edb292197aaf0b137621bafb69f6157f4532.tar.gz
kernel-crypto-ea15edb292197aaf0b137621bafb69f6157f4532.tar.xz
kernel-crypto-ea15edb292197aaf0b137621bafb69f6157f4532.zip
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')
-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 55ff7357e79..428d1187ce5 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 = {
.interface_type = RGB18,
.chan = LCDC_CHAN_MAINLCD,
.bpp = 16,
- .clock_divider = 1,
.lcd_cfg = {
.sync = 0, /* hsync and vsync are active low */
},
@@ -337,6 +336,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
};
#define PORT_HIZA 0xA4050158
+#define IODRIVEA 0xA405018A
static int __init devices_setup(void)
{
/* enable SCIFA0 */
@@ -422,9 +422,13 @@ static int __init devices_setup(void)
gpio_direction_output(GPIO_PTR1, 0);
gpio_direction_output(GPIO_PTA2, 0);
+ /* I/O buffer drive ability is low */
+ ctrl_outw((ctrl_inw(IODRIVEA) & ~0x00c0) | 0x0040 , IODRIVEA);
+
if (gpio_get_value(GPIO_PTE6)) {
/* DVI */
lcdc_info.clock_source = LCDC_CLK_EXTERNAL;
+ lcdc_info.ch[0].clock_divider = 1,
lcdc_info.ch[0].lcd_cfg.name = "DVI";
lcdc_info.ch[0].lcd_cfg.xres = 1280;
lcdc_info.ch[0].lcd_cfg.yres = 720;
@@ -439,7 +443,29 @@ static int __init devices_setup(void)
gpio_set_value(GPIO_PTU1, 1);
} else {
/* Panel */
- /* not supported */
+
+ lcdc_info.clock_source = LCDC_CLK_PERIPHERAL;
+ lcdc_info.ch[0].clock_divider = 2,
+ lcdc_info.ch[0].lcd_cfg.name = "Panel";
+ lcdc_info.ch[0].lcd_cfg.xres = 800;
+ lcdc_info.ch[0].lcd_cfg.yres = 480;
+ lcdc_info.ch[0].lcd_cfg.left_margin = 220;
+ lcdc_info.ch[0].lcd_cfg.right_margin = 110;
+ lcdc_info.ch[0].lcd_cfg.hsync_len = 70;
+ lcdc_info.ch[0].lcd_cfg.upper_margin = 20;
+ lcdc_info.ch[0].lcd_cfg.lower_margin = 5;
+ lcdc_info.ch[0].lcd_cfg.vsync_len = 5;
+
+ gpio_set_value(GPIO_PTR1, 1);
+
+ /* FIXME
+ *
+ * LCDDON control is needed for Panel,
+ * but current sh_mobile_lcdc driver doesn't control it.
+ * It is temporary correspondence
+ */
+ gpio_request(GPIO_PTF4, NULL);
+ gpio_direction_output(GPIO_PTF4, 1);
}
/* enable CEU0 */