diff options
Diffstat (limited to 'arch/arm/mach-mx5/displays')
-rw-r--r-- | arch/arm/mach-mx5/displays/hdmi_ad9389.h | 168 | ||||
-rw-r--r-- | arch/arm/mach-mx5/displays/lcd.h | 135 | ||||
-rw-r--r-- | arch/arm/mach-mx5/displays/vga.h | 64 |
3 files changed, 367 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/displays/hdmi_ad9389.h b/arch/arm/mach-mx5/displays/hdmi_ad9389.h new file mode 100644 index 000000000000..2a29cd783b48 --- /dev/null +++ b/arch/arm/mach-mx5/displays/hdmi_ad9389.h @@ -0,0 +1,168 @@ +/* + * arch/arm/mach-mx5/displays/hdmi_ad9389.h + * + * Copyright (C) 2010 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_HDMI_AD9389_H__ +#define __ASM_ARCH_MXC_CCWMX51_DISPLAYS_HDMI_AD9389_H__ + +static struct fb_videomode ad9389_1280x720x24 = { + .name = "1280x720", + .refresh = 60, + .xres = 1280, + .yres = 720, + .pixclock = 20100, + .left_margin = 32, + .right_margin = 48, + .upper_margin = 7, + .lower_margin = 3, + .hsync_len = 32, + .vsync_len = 6, +}; + +static struct fb_videomode ad9389_1360x768x24 = { + .name = "1360x768", + .refresh = 60, + .xres = 1360, + .yres = 768, + .pixclock = 16000, + .left_margin = 139, + .right_margin = 256, + .upper_margin = 3, + .lower_margin = 18, + .hsync_len = 76, + .vsync_len = 6, +}; + + +static struct fb_videomode ad9389_1366x768x24 = { + .name = "1366x768", + .refresh = 60, + .xres = 1366, + .yres = 768, + .pixclock = 16000, + .left_margin = 139, + .right_margin = 256, + .upper_margin = 3, + .lower_margin = 18, + .hsync_len = 76, + .vsync_len = 6, +}; + +static struct fb_videomode ad9389_1920x1080x24 = { + .name = "1920x1080", + .refresh = 60, + .xres = 1920, + .yres = 1080, + .pixclock = 7560, + .left_margin = 148, + .right_margin = 88, + .upper_margin = 36, + .lower_margin = 4, + .hsync_len = 44, + .vsync_len = 5, +}; + +static struct fb_videomode ad9389_1024x768x24 = { + .name = "1024x768", + .refresh = 60, + .xres = 1024, + .yres = 768, + .pixclock = 15384, /* pico seconds of 65.0MHz */ + .left_margin = 160, + .right_margin = 24, + .upper_margin = 29, + .lower_margin = 3, + .hsync_len = 136, + .vsync_len = 6, +}; + +static struct fb_videomode ad9389_custom_1 = { + .name = "custom1", + .refresh = 0, + .xres = 0, + .yres = 0, + .pixclock = 0, + .left_margin = 0, + .right_margin = 0, + .upper_margin = 0, + .lower_margin = 0, + .hsync_len = 0, + .vsync_len = 0, + .sync = 0, +}; + +static struct fb_videomode ad9389_custom_2 = { + .name = "custom2", + .refresh = 0, + .xres = 0, + .yres = 0, + .pixclock = 0, + .left_margin = 0, + .right_margin = 0, + .upper_margin = 0, + .lower_margin = 0, + .hsync_len = 0, + .vsync_len = 0, + .sync = 0, +}; + +struct ccwmx51_lcd_pdata ad9389_panel_list[] = { + { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "1280x720", + .mode = &ad9389_1280x720x24, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "1360x768", + .mode = &ad9389_1360x768x24, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "1366x768", + .mode = &ad9389_1366x768x24, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "1920x1080", + .mode = &ad9389_1920x1080x24, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "1024x768", + .mode = &ad9389_1024x768x24, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "custom1", + .mode = &ad9389_custom_1, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "custom2", + .mode = &ad9389_custom_2, + }, + .bl_enable = NULL, + }, +}; +#endif /* __ASM_ARCH_MXC_CCWMX51_DISPLAYS_HDMI_AD9389_H__ */
\ No newline at end of file diff --git a/arch/arm/mach-mx5/displays/lcd.h b/arch/arm/mach-mx5/displays/lcd.h new file mode 100644 index 000000000000..f2af740ebf85 --- /dev/null +++ b/arch/arm/mach-mx5/displays/lcd.h @@ -0,0 +1,135 @@ +/* + * arch/arm/mach-mx5/displays/lcd.h + * + * Copyright (C) 2010 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_LCD_H__ +#define __ASM_ARCH_MXC_CCWMX51_DISPLAYS_LCD_H__ + +#include "../iomux.h" + +#if defined (CONFIG_JSCCWMX51_V1) +#include "../drivers/mxc/ipu3/ipu_regs.h" + +/** + * This code is only valide to enable/disable the backlight of the second + * display, on the first version of the JumpStart Board (JSCCWMX51 RevA). + * Newer versions use a GPIO to enable the BL of the second display. + */ +void ipu_ccwmx51_disp1_enable(int enable) +{ + uint32_t tmp; + + tmp = __raw_readl(DI_GENERAL(1)); + tmp &= ~DI_GEN_POLARITY_4; + if (enable) + tmp |= DI_GEN_POLARITY_4; + __raw_writel(tmp, DI_GENERAL(1)); +} +#endif + +static void lcd_bl_enable_lq70(int enable, int vif) +{ + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN11), !enable); + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN12), !enable); + if (vif == 0) + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN11), !enable); + else if (vif == 1) +#ifdef CONFIG_JSCCWMX51_V1 + ipu_ccwmx51_disp1_enable(enable); +#elif defined(CONFIG_JSCCWMX51_V2) + gpio_set_value(IOMUX_TO_GPIO(MX51_PIN_DI1_PIN12), !enable); +#else +#error "A function to enable/disalbe the display have to be specified" +#endif +} + +static void lcd_init(int vif) +{ + /* Initialize lcd enable gpio and video interface lines */ + gpio_video_active(vif, PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST); +} + +static struct fb_videomode lq70y3dg3b = { + .name = "LQ070Y3DG3B", + .refresh = 60, + .xres = 800, + .yres = 480, + .pixclock = 44000, + .left_margin = 0, + .right_margin = 50, + .upper_margin = 25, + .lower_margin = 10, + .hsync_len = 128, + .vsync_len = 10, + .vmode = FB_VMODE_NONINTERLACED, + .sync = FB_SYNC_EXT, + .flag = 0, +}; + +static struct fb_videomode lcd_custom_1 = { + .name = "custom1", + .refresh = 0, + .xres = 0, + .yres = 0, + .pixclock = 0, + .left_margin = 0, + .right_margin = 0, + .upper_margin = 0, + .lower_margin = 0, + .hsync_len = 0, + .vsync_len = 0, + .vmode = FB_VMODE_NONINTERLACED, + .sync = FB_SYNC_EXT, +}; + +static struct fb_videomode lcd_custom_2 = { + .name = "custom2", + .refresh = 0, + .xres = 0, + .yres = 0, + .pixclock = 0, + .left_margin = 0, + .right_margin = 0, + .upper_margin = 0, + .lower_margin = 0, + .hsync_len = 0, + .vsync_len = 0, + .vmode = FB_VMODE_NONINTERLACED, + .sync = FB_SYNC_EXT, +}; + +struct ccwmx51_lcd_pdata lcd_panel_list[] = { + { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "LQ070Y3DG3B", + .mode = &lq70y3dg3b, + }, + .bl_enable = lcd_bl_enable_lq70, + .init = &lcd_init, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "custom1", + .mode = &lcd_custom_1, + }, + .bl_enable = NULL, + .init = &lcd_init, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "custom2", + .mode = &lcd_custom_2, + }, + .bl_enable = NULL, + .init = &lcd_init, + }, +}; +#endif /* __ASM_ARCH_MXC_CCWMX51_DISPLAYS_LCD_H__ */ diff --git a/arch/arm/mach-mx5/displays/vga.h b/arch/arm/mach-mx5/displays/vga.h new file mode 100644 index 000000000000..3e5a913c643a --- /dev/null +++ b/arch/arm/mach-mx5/displays/vga.h @@ -0,0 +1,64 @@ +/* + * arch/arm/mach-mx5/displays/vga.h + * + * Copyright (C) 2010 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_VGA_H__ +#define __ASM_ARCH_MXC_CCWMX51_DISPLAYS_VGA_H__ + +static struct fb_videomode vga_custom_1 = { + .name = "custom1", + .refresh = 0, + .xres = 0, + .yres = 0, + .pixclock = 0, + .left_margin = 0, + .right_margin = 0, + .upper_margin = 0, + .lower_margin = 0, + .hsync_len = 0, + .vsync_len = 0, + .vmode = FB_VMODE_NONINTERLACED, + .sync = FB_SYNC_EXT, +}; + +static struct fb_videomode vga_custom_2 = { + .name = "custom1", + .refresh = 0, + .xres = 0, + .yres = 0, + .pixclock = 0, + .left_margin = 0, + .right_margin = 0, + .upper_margin = 0, + .lower_margin = 0, + .hsync_len = 0, + .vsync_len = 0, + .vmode = FB_VMODE_NONINTERLACED, + .sync = FB_SYNC_EXT, +}; + +struct ccwmx51_lcd_pdata vga_panel_list[] = { + { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "custom1", + .mode = &vga_custom_1, + }, + .bl_enable = NULL, + }, { + .fb_pdata = { + .interface_pix_fmt = VIDEO_PIX_FMT, + .mode_str = "custom2", + .mode = &vga_custom_2, + }, + .bl_enable = NULL, + }, +}; +#endif /* __ASM_ARCH_MXC_CCWMX51_DISPLAYS_VGA_H__ */
\ No newline at end of file |