summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Nold <dannynold@freescale.com>2010-08-22 21:17:35 -0500
committerDanny Nold <dannynold@freescale.com>2010-08-25 13:09:34 -0500
commit6e28302271fd10f1319f94e0e11d367b87e3f385 (patch)
tree639acf3398bbfe649b5257ff069b40c560dbb5e0
parent2fbdcbfa8ae09d0dfce72e75d8f8893cc55d9491 (diff)
ENGR00126260-1 - MSL change to define E Ink panels in platform code
Shift panel definitions to platform code, and expand panel structure to encapsulate all variable parameters for configuring the EPDC to drive the panel. Signed-off-by: Danny Nold <dannynold@freescale.com>
-rw-r--r--arch/arm/mach-mx5/mx50_arm2.c46
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h17
2 files changed, 62 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/mx50_arm2.c b/arch/arm/mach-mx5/mx50_arm2.c
index 2cf22ec1292b..54eb092d3872 100644
--- a/arch/arm/mach-mx5/mx50_arm2.c
+++ b/arch/arm/mach-mx5/mx50_arm2.c
@@ -676,8 +676,54 @@ void epdc_disable_pins(void)
gpio_direction_output(EPDC_SDCE2, 0);
}
+static struct fb_videomode e60_mode = {
+ .name = "E60",
+ .refresh = 50,
+ .xres = 800,
+ .yres = 600,
+ .pixclock = 20000000,
+ .left_margin = 10,
+ .right_margin = 217,
+ .upper_margin = 4,
+ .lower_margin = 10,
+ .hsync_len = 20,
+ .vsync_len = 4,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+};
+
+static struct fb_videomode e97_mode = {
+ .name = "E97",
+ .refresh = 50,
+ .xres = 1200,
+ .yres = 825,
+ .pixclock = 32000000,
+ .left_margin = 8,
+ .right_margin = 125,
+ .upper_margin = 4,
+ .lower_margin = 17,
+ .hsync_len = 20,
+ .vsync_len = 4,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+};
+
+static struct mxc_epdc_fb_mode panel_modes[] = {
+ {
+ &e60_mode,
+ 4, 10, 20, 10, 20, 480, 20, 0, 1, 1,
+ },
+ {
+ &e97_mode,
+ 8, 10, 20, 10, 20, 580, 20, 0, 1, 3,
+ },
+};
static struct mxc_epdc_fb_platform_data epdc_data = {
+ .epdc_mode = panel_modes,
+ .num_modes = ARRAY_SIZE(panel_modes),
.get_pins = epdc_get_pins,
.put_pins = epdc_put_pins,
.enable_pins = epdc_enable_pins,
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 7bcb188c922c..541603102d4b 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -317,14 +317,29 @@ struct mxc_lcd_platform_data {
void (*reset) (void);
};
+struct mxc_epdc_fb_mode {
+ struct fb_videomode *vmode;
+ int vscan_holdoff;
+ int sdoed_width;
+ int sdoed_delay;
+ int sdoez_width;
+ int sdoez_delay;
+ int gdclk_hp_offs;
+ int gdsp_offs;
+ int gdoe_offs;
+ int gdclk_offs;
+ int num_ce;
+};
+
struct mxc_epdc_fb_platform_data {
+ struct mxc_epdc_fb_mode *epdc_mode;
+ int num_modes;
void (*get_pins) (void);
void (*put_pins) (void);
void (*enable_pins) (void);
void (*disable_pins) (void);
};
-
struct mxc_tsc_platform_data {
char *vdd_reg;
int penup_threshold;