2 * Copyright (C) 2012 Freescale Semiconductor, Inc.
3 * Fabio Estevam <fabio.estevam@freescale.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #include <linux/list.h>
27 #include <asm/arch/iomux-mx53.h>
29 #include <ipu_pixfmt.h>
31 #define MX53LOCO_LCD_POWER IMX_GPIO_NR(3, 24)
33 static struct fb_videomode const claa_wvga = {
34 .name = "CLAA07LC0ACW",
46 .vmode = FB_VMODE_NONINTERLACED
49 static struct fb_videomode const seiko_wvga = {
50 .name = "Seiko-43WVF1G",
54 .pixclock = 29851, /* picosecond (33.5 MHz) */
64 void setup_iomux_lcd(void)
66 static const iomux_v3_cfg_t lcd_pads[] = {
67 MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK,
68 MX53_PAD_DI0_PIN15__IPU_DI0_PIN15,
69 MX53_PAD_DI0_PIN2__IPU_DI0_PIN2,
70 MX53_PAD_DI0_PIN3__IPU_DI0_PIN3,
71 MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0,
72 MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1,
73 MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2,
74 MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3,
75 MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4,
76 MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5,
77 MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6,
78 MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7,
79 MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8,
80 MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9,
81 MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10,
82 MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11,
83 MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12,
84 MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13,
85 MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14,
86 MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15,
87 MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16,
88 MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17,
89 MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18,
90 MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19,
91 MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20,
92 MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21,
93 MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22,
94 MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23,
97 imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads));
99 /* Turn on GPIO backlight */
100 imx_iomux_v3_setup_pad(MX53_PAD_EIM_D24__GPIO3_24);
101 gpio_direction_output(MX53LOCO_LCD_POWER, 1);
103 /* Turn on display contrast */
104 imx_iomux_v3_setup_pad(MX53_PAD_GPIO_1__GPIO1_1);
105 gpio_direction_output(IMX_GPIO_NR(1, 1), 1);
108 int board_video_skip(void)
111 char const *e = getenv("panel");
114 if (strcmp(e, "seiko") == 0) {
115 ret = ipuv3_fb_init(&seiko_wvga, 0, IPU_PIX_FMT_RGB24);
117 printf("Seiko cannot be configured: %d\n", ret);
123 * 'panel' env variable not found or has different value than 'seiko'
124 * Defaulting to claa lcd.
126 ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
128 printf("CLAA cannot be configured: %d\n", ret);