summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx51/Kconfig2
-rw-r--r--arch/arm/mach-mx51/displays/CUSTOM.h34
-rw-r--r--arch/arm/mach-mx51/displays/Kconfig21
-rw-r--r--arch/arm/mach-mx51/displays/LQ070Y3DG3B.h32
-rw-r--r--arch/arm/mach-mx51/displays/display-ccwmx51.h22
-rw-r--r--arch/arm/mach-mx51/displays/displays.h31
-rw-r--r--arch/arm/mach-mx51/mx51_ccwmx51js.c30
-rw-r--r--arch/arm/mach-mx51/mx51_ccwmx51js_gpio.c8
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h66
9 files changed, 245 insertions, 1 deletions
diff --git a/arch/arm/mach-mx51/Kconfig b/arch/arm/mach-mx51/Kconfig
index 39aae1555cdd..6bf08edfdec4 100644
--- a/arch/arm/mach-mx51/Kconfig
+++ b/arch/arm/mach-mx51/Kconfig
@@ -142,4 +142,6 @@ config UART3_ENABLED
Enable the MX51 UART3 interface
endmenu
+source "arch/arm/mach-mx51/displays/Kconfig"
+
endmenu
diff --git a/arch/arm/mach-mx51/displays/CUSTOM.h b/arch/arm/mach-mx51/displays/CUSTOM.h
new file mode 100644
index 000000000000..19759533d84e
--- /dev/null
+++ b/arch/arm/mach-mx51/displays/CUSTOM.h
@@ -0,0 +1,34 @@
+
+// static void lcd_bl_enable_custom(int enable)
+// {
+// gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN11), enable);
+// }
+//
+// static struct fb_videomode cusom = {
+// .name = "CUSTOM",
+// .refresh = ,
+// .xres = ,
+// .yres = ,
+// .pixclock = ,
+// .left_margin = ,
+// .right_margin = ,
+// .upper_margin = ,
+// .lower_margin = ,
+// .hsync_len = ,
+// .vsync_len = ,
+// .sync = FB_SYNC_CLK_LAT_FALL,
+// .vmode = FB_VMODE_NONINTERLACED,
+// .flag = 0,
+// };
+//
+// #define CUSTOM_DISPLAY \
+// { \
+// .fb_pdata = { \
+// .interface_pix_fmt = IPU_PIX_FMT_RGB24, \
+// .mode_str = "CUSTOM", \
+// .mode = &custom, \
+// }, \
+// .bl_enable = &lcd_bl_enable_custom, \
+// }
+
+
diff --git a/arch/arm/mach-mx51/displays/Kconfig b/arch/arm/mach-mx51/displays/Kconfig
new file mode 100644
index 000000000000..dcc062795c5c
--- /dev/null
+++ b/arch/arm/mach-mx51/displays/Kconfig
@@ -0,0 +1,21 @@
+# arch/arm/mach-mx51/displays/Kconfig
+#
+# Copyright 2010 Digi International, Inc
+#
+
+if FB_MXC_SYNC_PANEL
+
+comment "Display selection"
+
+config CCWMX51_LQ070Y3DG3B
+ bool "LQ070Y3DG3B TFT LCD support"
+ help
+ This enables the support for the LQ070Y3DG3B TFT display.
+
+config CC9M2443_CUSTOM
+ bool "Custom display support"
+ help
+ This enables the support for a customer specific display.
+ displays/CUSTOM.h has to be modified when selecting this.
+
+endif
diff --git a/arch/arm/mach-mx51/displays/LQ070Y3DG3B.h b/arch/arm/mach-mx51/displays/LQ070Y3DG3B.h
new file mode 100644
index 000000000000..e4fa222ed5ee
--- /dev/null
+++ b/arch/arm/mach-mx51/displays/LQ070Y3DG3B.h
@@ -0,0 +1,32 @@
+
+static void lcd_bl_enable_lq70(int enable)
+{
+ gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN11), enable);
+}
+
+static struct fb_videomode lq70y3dg3b = {
+ .name = "LQ070Y3DG3B",
+ .refresh = 60,
+ .xres = 800,
+ .yres = 480,
+ .pixclock = 29000,
+ .left_margin = 0,
+ .right_margin = 50,
+ .upper_margin = 25,
+ .lower_margin = 10,
+ .hsync_len = 128,
+ .vsync_len = 10,
+ .sync = FB_SYNC_CLK_LAT_FALL,
+ .vmode = FB_VMODE_NONINTERLACED,
+ .flag = 0,
+};
+
+#define LQ070Y3DG3B_DISPLAY \
+{ \
+ .fb_pdata = { \
+ .interface_pix_fmt = IPU_PIX_FMT_RGB24, \
+ .mode_str = "LQ070Y3DG3B", \
+ .mode = &lq70y3dg3b, \
+ }, \
+ .bl_enable = &lcd_bl_enable_lq70, \
+}
diff --git a/arch/arm/mach-mx51/displays/display-ccwmx51.h b/arch/arm/mach-mx51/displays/display-ccwmx51.h
new file mode 100644
index 000000000000..b1e875c9694f
--- /dev/null
+++ b/arch/arm/mach-mx51/displays/display-ccwmx51.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2010 Digi International, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_BOARD_CCWMX51_H__
+#define __ASM_ARCH_MXC_BOARD_CCWMX51_H__
+
+// #include <mach/hardware.h>
+// #include <mach/mxc.h>
+//
+// struct ccwmx51_lcd_pdata {
+// int vinf;
+// struct mxc_fb_platform_data fb_pdata;
+// void (*reset) (void);
+// void (*bl_enable) (int);
+// };
+
+#endif /* __ASM_ARCH_MXC_BOARD_CCWMX51_H__ */
diff --git a/arch/arm/mach-mx51/displays/displays.h b/arch/arm/mach-mx51/displays/displays.h
new file mode 100644
index 000000000000..8c60f3b82015
--- /dev/null
+++ b/arch/arm/mach-mx51/displays/displays.h
@@ -0,0 +1,31 @@
+/*
+ * arch/arm/mach-s3c2443/displays/displays.h
+ *
+ * Copyright (C) 2009 by Digi International Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_CCWMX51_DISPLAYS_H__
+#define __ASM_ARCH_MXC_CCWMX51_DISPLAYS_H__
+
+#if defined(CONFIG_CCWMX51_LQ070Y3DG3B)
+#include "LQ070Y3DG3B.h"
+#endif
+#if defined(CONFIG_CC9M2443_CUSTOM)
+#include "CUSTOM.h"
+#endif
+
+struct ccwmx51_lcd_pdata lcd_display_list[] = {
+#if defined(CONFIG_CCWMX51_LQ070Y3DG3B)
+ LQ070Y3DG3B_DISPLAY,
+#endif
+#if defined(CONFIG_CC9M2443_CUSTOM)
+ CUSTOM_DISPLAY,
+#endif
+};
+
+#endif /* __ASM_ARCH_MXC_CCWMX51_DISPLAYS_H__ */
diff --git a/arch/arm/mach-mx51/mx51_ccwmx51js.c b/arch/arm/mach-mx51/mx51_ccwmx51js.c
index 695e9fec906b..ad93a4fc3c77 100644
--- a/arch/arm/mach-mx51/mx51_ccwmx51js.c
+++ b/arch/arm/mach-mx51/mx51_ccwmx51js.c
@@ -46,7 +46,7 @@
#include "board.h"
#include "iomux.h"
#include "crm_regs.h"
-
+#include "displays/displays.h"
#include <linux/smc911x.h>
@@ -396,9 +396,29 @@ static struct platform_device mxc_fb_device[] = {
},
};
+static struct platform_device lcd_pdev = {
+ .name = "ccwmx51_display",
+ .dev = {
+ .release = mxc_nop_release,
+ .coherent_dma_mask = 0xFFFFFFFF,
+ },
+};
+
+struct ccwmx51_lcd_pdata * ccwmx51_get_display(char *name)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(lcd_display_list); i++)
+ if (!strcmp(lcd_display_list[i].fb_pdata.mode->name, name))
+ return &lcd_display_list[i];
+ return NULL;
+}
+
static int __init ccwmx51_init_fb(void)
{
char *options = NULL, *p;
+ struct ccwmx51_lcd_pdata *lcd_pdata;
+
if (fb_get_options("displayfb", &options))
pr_warning("no display information available in commnad line\n");
@@ -431,6 +451,14 @@ static int __init ccwmx51_init_fb(void)
}
}
(void)platform_device_register(&mxc_fb_device[0]); /* VGA */
+ } else {
+ if ((lcd_pdata = ccwmx51_get_display(options)) != NULL) {
+ memcpy(&fb_data_vga, &lcd_pdata->fb_pdata, sizeof(struct mxc_fb_platform_data));
+ lcd_pdata->vif = 0; /* Select video interface 0 */
+ lcd_pdev.dev.platform_data = lcd_pdata,
+ (void)platform_device_register(&lcd_pdev);
+ (void)platform_device_register(&mxc_fb_device[0]); /* VGA */
+ }
}
return 0;
diff --git a/arch/arm/mach-mx51/mx51_ccwmx51js_gpio.c b/arch/arm/mach-mx51/mx51_ccwmx51js_gpio.c
index 7345ef1a2297..38277e3a8134 100644
--- a/arch/arm/mach-mx51/mx51_ccwmx51js_gpio.c
+++ b/arch/arm/mach-mx51/mx51_ccwmx51js_gpio.c
@@ -303,6 +303,11 @@ static struct mxc_iomux_pin_cfg __initdata ccwmx51_iomux_video1_pins[] = {
MX51_PIN_DISP1_DAT23, IOMUX_CONFIG_ALT0,
(PAD_CTL_HYS_NONE | PAD_CTL_DRV_LOW | PAD_CTL_SRE_FAST),
},
+ { /* LCD1 Power Enable, as gpio */
+ MX51_PIN_DI1_PIN11, IOMUX_CONFIG_GPIO,
+ (PAD_CTL_SRE_FAST | PAD_CTL_DRV_HIGH | PAD_CTL_47K_PU |
+ PAD_CTL_PUE_KEEPER | PAD_CTL_PKE_ENABLE | PAD_CTL_HYS_ENABLE),
+ },
};
#endif
@@ -558,6 +563,9 @@ void __init ccwmx51_io_init(void)
mxc_iomux_set_input(ccwmx51_iomux_video1_pins[i].in_select,
ccwmx51_iomux_video1_pins[i].in_mode);
}
+ /* LCD Power Enable */
+ gpio_request(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN11), "gpio3_0");
+ gpio_direction_output(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN11), 0);
#endif
#if defined(CONFIG_I2C_MXC) || defined(CONFIG_I2C_MXC_MODULE)
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 0fadd531c5b2..34031aebed98 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -291,6 +291,72 @@ struct mxc_lcd_platform_data {
void (*reset) (void);
};
+struct ccwmx51_lcd_pdata {
+ int vif;
+ struct mxc_fb_platform_data fb_pdata;
+ void (*reset) (void);
+ void (*bl_enable) (int);
+};
+
+struct mxc_dvfs_platform_data {
+ /** Supply voltage regulator name string */
+ char *reg_id;
+ /* CPU clock name string */
+ char *clk1_id;
+ /* DVFS clock name string */
+ char *clk2_id;
+ /* GPC control reg address */
+ unsigned int gpc_cntr_reg_addr;
+ /* GPC voltage counter reg address */
+ unsigned int gpc_vcr_reg_addr;
+ /* CCM DVFS control reg address */
+ unsigned int ccm_cdcr_reg_addr;
+ /* CCM ARM clock root reg address */
+ unsigned int ccm_cacrr_reg_addr;
+ /* CCM divider handshake in-progree reg address */
+ unsigned int ccm_cdhipr_reg_addr;
+ /* DVFS threshold reg address */
+ unsigned int dvfs_thrs_reg_addr;
+ /* DVFS counters reg address */
+ unsigned int dvfs_coun_reg_addr;
+ /* DVFS EMAC reg address */
+ unsigned int dvfs_emac_reg_addr;
+ /* DVFS control reg address */
+ unsigned int dvfs_cntr_reg_addr;
+ /* PREDIV mask */
+ u32 prediv_mask;
+ /* PREDIV offset */
+ int prediv_offset;
+ /* PREDIV value */
+ int prediv_val;
+ /* DIV3CK mask */
+ u32 div3ck_mask;
+ /* DIV3CK offset */
+ int div3ck_offset;
+ /* DIV3CK value */
+ int div3ck_val;
+ /* EMAC value */
+ int emac_val;
+ /* Frequency increase threshold. Increase frequency change request
+ will be sent if DVFS counter value will be more than this value */
+ int upthr_val;
+ /* Frequency decrease threshold. Decrease frequency change request
+ will be sent if DVFS counter value will be less than this value */
+ int dnthr_val;
+ /* Panic threshold. Panic frequency change request
+ will be sent if DVFS counter value will be more than this value */
+ int pncthr_val;
+ /* The amount of times the up threshold should be exceeded
+ before DVFS will trigger frequency increase request */
+ int upcnt_val;
+ /* The amount of times the down threshold should be exceeded
+ before DVFS will trigger frequency decrease request */
+ int dncnt_val;
+ /* Delay time in us */
+ int delay_time;
+ /* Number of woking points supported */
+ int num_wp;
+};
struct mxc_tsc_platform_data {
char *vdd_reg;