aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs/mach-mx28evk.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2011-03-08 05:51:10 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-10 05:18:35 -0500
commit0590a790319e2de59e0f15cf00af7fe473eb9ec8 (patch)
treee5633f2e443da21d1284fdd20c5161d4dfc162be /arch/arm/mach-mxs/mach-mx28evk.c
parent12b90f8a2ce4d913d9080dcd6b6c329db00cbbeb (diff)
ARM: mxs/mx28evk: add framebuffer device
Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mxs/mach-mx28evk.c')
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c76
1 files changed, 76 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index 8bb221754e4e..08002d02267a 100644
--- a/arch/arm/mach-mxs/mach-mx28evk.c
+++ b/arch/arm/mach-mxs/mach-mx28evk.c
@@ -30,6 +30,8 @@
30 30
31#define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13) 31#define MX28EVK_FLEXCAN_SWITCH MXS_GPIO_NR(2, 13)
32#define MX28EVK_FEC_PHY_POWER MXS_GPIO_NR(2, 15) 32#define MX28EVK_FEC_PHY_POWER MXS_GPIO_NR(2, 15)
33#define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18)
34#define MX28EVK_LCD_ENABLE MXS_GPIO_NR(3, 30)
33#define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13) 35#define MX28EVK_FEC_PHY_RESET MXS_GPIO_NR(4, 13)
34 36
35static const iomux_cfg_t mx28evk_pads[] __initconst = { 37static const iomux_cfg_t mx28evk_pads[] __initconst = {
@@ -79,6 +81,40 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = {
79 MX28_PAD_GPMI_CE3N__CAN1_RX, 81 MX28_PAD_GPMI_CE3N__CAN1_RX,
80 /* transceiver power control */ 82 /* transceiver power control */
81 MX28_PAD_SSP1_CMD__GPIO_2_13, 83 MX28_PAD_SSP1_CMD__GPIO_2_13,
84
85 /* mxsfb (lcdif) */
86 MX28_PAD_LCD_D00__LCD_D0 | MXS_PAD_CTRL,
87 MX28_PAD_LCD_D01__LCD_D1 | MXS_PAD_CTRL,
88 MX28_PAD_LCD_D02__LCD_D2 | MXS_PAD_CTRL,
89 MX28_PAD_LCD_D03__LCD_D3 | MXS_PAD_CTRL,
90 MX28_PAD_LCD_D04__LCD_D4 | MXS_PAD_CTRL,
91 MX28_PAD_LCD_D05__LCD_D5 | MXS_PAD_CTRL,
92 MX28_PAD_LCD_D06__LCD_D6 | MXS_PAD_CTRL,
93 MX28_PAD_LCD_D07__LCD_D7 | MXS_PAD_CTRL,
94 MX28_PAD_LCD_D08__LCD_D8 | MXS_PAD_CTRL,
95 MX28_PAD_LCD_D09__LCD_D9 | MXS_PAD_CTRL,
96 MX28_PAD_LCD_D10__LCD_D10 | MXS_PAD_CTRL,
97 MX28_PAD_LCD_D11__LCD_D11 | MXS_PAD_CTRL,
98 MX28_PAD_LCD_D12__LCD_D12 | MXS_PAD_CTRL,
99 MX28_PAD_LCD_D13__LCD_D13 | MXS_PAD_CTRL,
100 MX28_PAD_LCD_D14__LCD_D14 | MXS_PAD_CTRL,
101 MX28_PAD_LCD_D15__LCD_D15 | MXS_PAD_CTRL,
102 MX28_PAD_LCD_D16__LCD_D16 | MXS_PAD_CTRL,
103 MX28_PAD_LCD_D17__LCD_D17 | MXS_PAD_CTRL,
104 MX28_PAD_LCD_D18__LCD_D18 | MXS_PAD_CTRL,
105 MX28_PAD_LCD_D19__LCD_D19 | MXS_PAD_CTRL,
106 MX28_PAD_LCD_D20__LCD_D20 | MXS_PAD_CTRL,
107 MX28_PAD_LCD_D21__LCD_D21 | MXS_PAD_CTRL,
108 MX28_PAD_LCD_D22__LCD_D22 | MXS_PAD_CTRL,
109 MX28_PAD_LCD_D23__LCD_D23 | MXS_PAD_CTRL,
110 MX28_PAD_LCD_RD_E__LCD_VSYNC | MXS_PAD_CTRL,
111 MX28_PAD_LCD_WR_RWN__LCD_HSYNC | MXS_PAD_CTRL,
112 MX28_PAD_LCD_RS__LCD_DOTCLK | MXS_PAD_CTRL,
113 MX28_PAD_LCD_CS__LCD_ENABLE | MXS_PAD_CTRL,
114 /* LCD panel enable */
115 MX28_PAD_LCD_RESET__GPIO_3_30 | MXS_PAD_CTRL,
116 /* backlight control */
117 MX28_PAD_PWM2__GPIO_3_18 | MXS_PAD_CTRL,
82}; 118};
83 119
84/* fec */ 120/* fec */
@@ -196,6 +232,32 @@ static const struct flexcan_platform_data
196 } 232 }
197}; 233};
198 234
235/* mxsfb (lcdif) */
236static struct fb_videomode mx28evk_video_modes[] = {
237 {
238 .name = "Seiko-43WVF1G",
239 .refresh = 60,
240 .xres = 800,
241 .yres = 480,
242 .pixclock = 29851, /* picosecond (33.5 MHz) */
243 .left_margin = 89,
244 .right_margin = 164,
245 .upper_margin = 23,
246 .lower_margin = 10,
247 .hsync_len = 10,
248 .vsync_len = 10,
249 .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT |
250 FB_SYNC_DOTCLK_FAILING_ACT,
251 },
252};
253
254static const struct mxsfb_platform_data mx28evk_mxsfb_pdata __initconst = {
255 .mode_list = mx28evk_video_modes,
256 .mode_count = ARRAY_SIZE(mx28evk_video_modes),
257 .default_bpp = 32,
258 .ld_intf_width = STMLCDIF_24BIT,
259};
260
199static void __init mx28evk_init(void) 261static void __init mx28evk_init(void)
200{ 262{
201 int ret; 263 int ret;
@@ -221,6 +283,20 @@ static void __init mx28evk_init(void)
221 mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]); 283 mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
222 mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); 284 mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
223 } 285 }
286
287 ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable");
288 if (ret)
289 pr_warn("failed to request gpio lcd-enable: %d\n", ret);
290 else
291 gpio_set_value(MX28EVK_LCD_ENABLE, 1);
292
293 ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable");
294 if (ret)
295 pr_warn("failed to request gpio bl-enable: %d\n", ret);
296 else
297 gpio_set_value(MX28EVK_BL_ENABLE, 1);
298
299 mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
224} 300}
225 301
226static void __init mx28evk_timer_init(void) 302static void __init mx28evk_timer_init(void)