aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorVladimir Barinov <vova.barinov@gmail.com>2009-04-28 20:00:51 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-07 10:19:11 -0400
commit11cda13d48a29ff81fe7bc2e0b767e164991c094 (patch)
treeeafc5241070f19eb3098c00f67de41122cb8173d /arch/arm
parentc981214ac4a304d784a290b3714cc73a39589af0 (diff)
MX27ADS: Add framebuffer support
Add Sharp-QVGA panel support for MX27ADS board Signed-off-by: Vladimir Barinov <vbarinov@embeddedalley.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mx2/mx27ads.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c
index bf131457c0e5..41d67f2ba390 100644
--- a/arch/arm/mach-mx2/mx27ads.c
+++ b/arch/arm/mach-mx2/mx27ads.c
@@ -36,6 +36,7 @@
36#include <mach/board-mx27ads.h> 36#include <mach/board-mx27ads.h>
37#include <mach/mxc_nand.h> 37#include <mach/mxc_nand.h>
38#include <mach/i2c.h> 38#include <mach/i2c.h>
39#include <mach/imxfb.h>
39 40
40#include "devices.h" 41#include "devices.h"
41 42
@@ -92,6 +93,34 @@ static unsigned int mx27ads_pins[] = {
92 /* I2C2 */ 93 /* I2C2 */
93 PC5_PF_I2C2_SDA, 94 PC5_PF_I2C2_SDA,
94 PC6_PF_I2C2_SCL, 95 PC6_PF_I2C2_SCL,
96 /* FB */
97 PA5_PF_LSCLK,
98 PA6_PF_LD0,
99 PA7_PF_LD1,
100 PA8_PF_LD2,
101 PA9_PF_LD3,
102 PA10_PF_LD4,
103 PA11_PF_LD5,
104 PA12_PF_LD6,
105 PA13_PF_LD7,
106 PA14_PF_LD8,
107 PA15_PF_LD9,
108 PA16_PF_LD10,
109 PA17_PF_LD11,
110 PA18_PF_LD12,
111 PA19_PF_LD13,
112 PA20_PF_LD14,
113 PA21_PF_LD15,
114 PA22_PF_LD16,
115 PA23_PF_LD17,
116 PA24_PF_REV,
117 PA25_PF_CLS,
118 PA26_PF_PS,
119 PA27_PF_SPL_SPR,
120 PA28_PF_HSYNC,
121 PA29_PF_VSYNC,
122 PA30_PF_CONTRAST,
123 PA31_PF_OE_ACD,
95}; 124};
96 125
97static struct mxc_nand_platform_data mx27ads_nand_board_info = { 126static struct mxc_nand_platform_data mx27ads_nand_board_info = {
@@ -128,6 +157,46 @@ static struct imxi2c_platform_data mx27ads_i2c_data = {
128static struct i2c_board_info mx27ads_i2c_devices[] = { 157static struct i2c_board_info mx27ads_i2c_devices[] = {
129}; 158};
130 159
160void lcd_power(int on)
161{
162 if (on)
163 __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_SET_REG);
164 else
165 __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_CLEAR_REG);
166}
167
168static struct imx_fb_platform_data mx27ads_fb_data = {
169 .pixclock = 188679,
170 .xres = 240,
171 .yres = 320,
172
173 .bpp = 16,
174 .hsync_len = 1,
175 .left_margin = 9,
176 .right_margin = 16,
177
178 .vsync_len = 1,
179 .upper_margin = 7,
180 .lower_margin = 9,
181 .fixed_screen_cpu = 0,
182
183 /*
184 * - HSYNC active high
185 * - VSYNC active high
186 * - clk notenabled while idle
187 * - clock inverted
188 * - data not inverted
189 * - data enable low active
190 * - enable sharp mode
191 */
192 .pcr = 0xFB008BC0,
193 .pwmr = 0x00A903FF,
194 .lscr1 = 0x00120300,
195 .dmacr = 0x00020010,
196
197 .lcd_power = lcd_power,
198};
199
131static struct platform_device *platform_devices[] __initdata = { 200static struct platform_device *platform_devices[] __initdata = {
132 &mx27ads_nor_mtd_device, 201 &mx27ads_nor_mtd_device,
133 &mxc_fec_device, 202 &mxc_fec_device,
@@ -166,6 +235,7 @@ static void __init mx27ads_board_init(void)
166 i2c_register_board_info(1, mx27ads_i2c_devices, 235 i2c_register_board_info(1, mx27ads_i2c_devices,
167 ARRAY_SIZE(mx27ads_i2c_devices)); 236 ARRAY_SIZE(mx27ads_i2c_devices));
168 mxc_register_device(&mxc_i2c_device1, &mx27ads_i2c_data); 237 mxc_register_device(&mxc_i2c_device1, &mx27ads_i2c_data);
238 mxc_register_device(&mxc_fb_device, &mx27ads_fb_data);
169 239
170 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 240 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
171} 241}