kernel 文件修改: 1.driver/video/mxc/mxcfb_epson_vga.c (1).static struct fb_videomode video_modes[] 改为:
- static struct fb_videomode video_modes[] = {
- {
- /* 320x480 @ 60 Hz */
- "Elite-HVGA", 60, 320, 480, 86566, 20, 40, 5, 1, 10, 2,
- FB_SYNC_CLK_LAT_FALL,
- FB_VMODE_NONINTERLACED,
- 0,},
- };
复制代码
(2).static void lcd_init(void)改为:
- static void lcd_init(void)
- {
- u16 i;
- const u16 cmd[] = {
- 0x11,
- 0xD0, param(0x07), param(0x41), param(0x0F),
- 0xD1, param(0x00), param(0x3E), param(0x1F),
- 0xD2, param(0x01), param(0x10),
- 0xC0, param(0x00), param(0x3B), param(0x00), param(0x02),
- param(0x11),
- 0xC5, param(0x02),
- // 0xC6, param(0x1B),
- 0xC6, param(0x02),
- 0xC8, param(0x66), param(0x66), param(0x66), param(0x66),
- param(0x0E), param(0x1E), param(0x66), param(0x66),
- param(0x77), param(0x66), param(0x0F), param(0x0F),
- 0x36, param(0x0A), // set_address_mode, RGB order
- 0x3A, param(0x66), // 0x60: RGB=666; 0x50: RGB=565; 0x10: RGB=111
- 0xB4, param(0x11),
- 0x29,
- 0x2C
- };
- if (lcd_spi) {
- spi_write(lcd_spi, (const u8 *)cmd, ARRAY_SIZE(cmd));
- } else {
- for (i = 0; i < sizeof(cmd) / 2; i++)
- {
- ipu_disp_direct_write(DIRECT_ASYNC1, cmd[i], 0);
- }
- msleep(1);
- ipu_uninit_channel(DIRECT_ASYNC1);
- }
- }
复制代码
2.arch/arm/mach-mx51/mx51_3stack.c
- static struct mxc_lcd_platform_data lcd_data = {
- .core_reg = "VIOHI",
- .io_reg = "SW4",
- .reset = lcd_reset,
- };
复制代码
改 为
- static struct mxc_lcd_platform_data lcd_data = {
- .core_reg = "VSD",
- .io_reg = "SW4",
- .reset = lcd_reset,
- };
复制代码
3.arch/arm/mach-mx51/mx51_3stack_gpio.c void gpio_lcd_active(void)修改为:
- void gpio_lcd_active(void)
- {
- mxc_request_iomux(MX51_PIN_NANDF_CS6, IOMUX_CONFIG_ALT3);
- mxc_set_gpio_direction(MX51_PIN_NANDF_CS6, 0);
- mxc_set_gpio_dataout(MX51_PIN_NANDF_CS6, 1);
- mxc_request_iomux(MX51_PIN_DI1_D1_CS, IOMUX_CONFIG_ALT4);
- mxc_set_gpio_direction(MX51_PIN_DI1_D1_CS, 0);
- mxc_set_gpio_dataout(MX51_PIN_DI1_D1_CS, 0);
-
- mxc_request_iomux(MX51_PIN_DI_GP2, IOMUX_CONFIG_ALT0);
- mxc_request_iomux(MX51_PIN_DI_GP3, IOMUX_CONFIG_ALT0);
- }
|
|