diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-19 03:25:41 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-07 06:10:56 -0400 |
commit | 343684ffb793a3c371579b7bbc16724713ee5ac7 (patch) | |
tree | 148ad5f2ba60bf529732645624998798c072da90 /arch | |
parent | d6b515028863a912d051d371b6d71e09f2a9ff19 (diff) |
imxfb: Add support for multiple displays
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx2/mx27ads.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-mx2/pcm970-baseboard.c | 83 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/imxfb.h | 26 |
3 files changed, 88 insertions, 57 deletions
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c index a9f69eb58b7c..83e412b713e6 100644 --- a/arch/arm/mach-mx2/mx27ads.c +++ b/arch/arm/mach-mx2/mx27ads.c | |||
@@ -183,20 +183,29 @@ void lcd_power(int on) | |||
183 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_CLEAR_REG); | 183 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_CLEAR_REG); |
184 | } | 184 | } |
185 | 185 | ||
186 | static struct imx_fb_platform_data mx27ads_fb_data = { | 186 | static struct imx_fb_videomode mx27ads_modes[] = { |
187 | .pixclock = 188679, | 187 | { |
188 | .xres = 240, | 188 | .mode = { |
189 | .yres = 320, | 189 | .name = "Sharp-LQ035Q7", |
190 | 190 | .refresh = 60, | |
191 | .bpp = 16, | 191 | .xres = 240, |
192 | .hsync_len = 1, | 192 | .yres = 320, |
193 | .left_margin = 9, | 193 | .pixclock = 188679, /* in ps (5.3MHz) */ |
194 | .right_margin = 16, | 194 | .hsync_len = 1, |
195 | .left_margin = 9, | ||
196 | .right_margin = 16, | ||
197 | .vsync_len = 1, | ||
198 | .upper_margin = 7, | ||
199 | .lower_margin = 9, | ||
200 | }, | ||
201 | .bpp = 16, | ||
202 | .pcr = 0xFB008BC0, | ||
203 | }, | ||
204 | }; | ||
195 | 205 | ||
196 | .vsync_len = 1, | 206 | static struct imx_fb_platform_data mx27ads_fb_data = { |
197 | .upper_margin = 7, | 207 | .mode = mx27ads_modes, |
198 | .lower_margin = 9, | 208 | .num_modes = ARRAY_SIZE(mx27ads_modes), |
199 | .fixed_screen_cpu = 0, | ||
200 | 209 | ||
201 | /* | 210 | /* |
202 | * - HSYNC active high | 211 | * - HSYNC active high |
@@ -207,7 +216,6 @@ static struct imx_fb_platform_data mx27ads_fb_data = { | |||
207 | * - data enable low active | 216 | * - data enable low active |
208 | * - enable sharp mode | 217 | * - enable sharp mode |
209 | */ | 218 | */ |
210 | .pcr = 0xFB008BC0, | ||
211 | .pwmr = 0x00A903FF, | 219 | .pwmr = 0x00A903FF, |
212 | .lscr1 = 0x00120300, | 220 | .lscr1 = 0x00120300, |
213 | .dmacr = 0x00020010, | 221 | .dmacr = 0x00020010, |
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c index 6a3acaf57dd4..8e2bc94f1a03 100644 --- a/arch/arm/mach-mx2/pcm970-baseboard.c +++ b/arch/arm/mach-mx2/pcm970-baseboard.c | |||
@@ -125,35 +125,64 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
125 | .exit = pcm970_sdhc2_exit, | 125 | .exit = pcm970_sdhc2_exit, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | /* | 128 | static struct imx_fb_videomode pcm970_modes[] = { |
129 | * Connected is a portrait Sharp-QVGA display | 129 | { |
130 | * of type: LQ035Q7DH06 | 130 | .mode = { |
131 | */ | 131 | .name = "Sharp-LQ035Q7", |
132 | static struct imx_fb_platform_data pcm038_fb_data = { | 132 | .refresh = 60, |
133 | .pixclock = 188679, /* in ps (5.3MHz) */ | 133 | .xres = 240, |
134 | .xres = 240, | 134 | .yres = 320, |
135 | .yres = 320, | 135 | .pixclock = 188679, /* in ps (5.3MHz) */ |
136 | 136 | .hsync_len = 7, | |
137 | .bpp = 16, | 137 | .left_margin = 5, |
138 | .hsync_len = 7, | 138 | .right_margin = 16, |
139 | .left_margin = 5, | 139 | .vsync_len = 1, |
140 | .right_margin = 16, | 140 | .upper_margin = 7, |
141 | .lower_margin = 9, | ||
142 | }, | ||
143 | /* | ||
144 | * - HSYNC active high | ||
145 | * - VSYNC active high | ||
146 | * - clk notenabled while idle | ||
147 | * - clock not inverted | ||
148 | * - data not inverted | ||
149 | * - data enable low active | ||
150 | * - enable sharp mode | ||
151 | */ | ||
152 | .pcr = 0xF00080C0, | ||
153 | .bpp = 16, | ||
154 | }, { | ||
155 | .mode = { | ||
156 | .name = "TX090", | ||
157 | .refresh = 60, | ||
158 | .xres = 240, | ||
159 | .yres = 320, | ||
160 | .pixclock = 38255, | ||
161 | .left_margin = 144, | ||
162 | .right_margin = 0, | ||
163 | .upper_margin = 7, | ||
164 | .lower_margin = 40, | ||
165 | .hsync_len = 96, | ||
166 | .vsync_len = 1, | ||
167 | }, | ||
168 | /* | ||
169 | * - HSYNC active low (1 << 22) | ||
170 | * - VSYNC active low (1 << 23) | ||
171 | * - clk notenabled while idle | ||
172 | * - clock not inverted | ||
173 | * - data not inverted | ||
174 | * - data enable low active | ||
175 | * - enable sharp mode | ||
176 | */ | ||
177 | .pcr = 0xF0008080 | (1<<22) | (1<<23) | (1<<19), | ||
178 | .bpp = 32, | ||
179 | }, | ||
180 | }; | ||
141 | 181 | ||
142 | .vsync_len = 1, | 182 | static struct imx_fb_platform_data pcm038_fb_data = { |
143 | .upper_margin = 7, | 183 | .mode = pcm970_modes, |
144 | .lower_margin = 9, | 184 | .num_modes = ARRAY_SIZE(pcm970_modes), |
145 | .fixed_screen_cpu = 0, | ||
146 | 185 | ||
147 | /* | ||
148 | * - HSYNC active high | ||
149 | * - VSYNC active high | ||
150 | * - clk notenabled while idle | ||
151 | * - clock not inverted | ||
152 | * - data not inverted | ||
153 | * - data enable low active | ||
154 | * - enable sharp mode | ||
155 | */ | ||
156 | .pcr = 0xFA0080C0, | ||
157 | .pwmr = 0x00A903FF, | 186 | .pwmr = 0x00A903FF, |
158 | .lscr1 = 0x00120300, | 187 | .lscr1 = 0x00120300, |
159 | .dmacr = 0x00020010, | 188 | .dmacr = 0x00020010, |
diff --git a/arch/arm/plat-mxc/include/mach/imxfb.h b/arch/arm/plat-mxc/include/mach/imxfb.h index 66259f6158e0..5263506b7ddf 100644 --- a/arch/arm/plat-mxc/include/mach/imxfb.h +++ b/arch/arm/plat-mxc/include/mach/imxfb.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * This structure describes the machine which we are running on. | 2 | * This structure describes the machine which we are running on. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/fb.h> | ||
6 | |||
5 | #define PCR_TFT (1 << 31) | 7 | #define PCR_TFT (1 << 31) |
6 | #define PCR_COLOR (1 << 30) | 8 | #define PCR_COLOR (1 << 30) |
7 | #define PCR_PBSIZ_1 (0 << 28) | 9 | #define PCR_PBSIZ_1 (0 << 28) |
@@ -47,29 +49,21 @@ | |||
47 | #define DMACR_HM(x) (((x) & 0xf) << 16) | 49 | #define DMACR_HM(x) (((x) & 0xf) << 16) |
48 | #define DMACR_TM(x) ((x) & 0xf) | 50 | #define DMACR_TM(x) ((x) & 0xf) |
49 | 51 | ||
50 | struct imx_fb_platform_data { | 52 | struct imx_fb_videomode { |
51 | u_long pixclock; | 53 | struct fb_videomode mode; |
52 | 54 | u32 pcr; | |
53 | u_short xres; | 55 | unsigned char bpp; |
54 | u_short yres; | 56 | }; |
55 | |||
56 | u_int nonstd; | ||
57 | u_char bpp; | ||
58 | u_char hsync_len; | ||
59 | u_char left_margin; | ||
60 | u_char right_margin; | ||
61 | 57 | ||
62 | u_char vsync_len; | 58 | struct imx_fb_platform_data { |
63 | u_char upper_margin; | 59 | struct imx_fb_videomode *mode; |
64 | u_char lower_margin; | 60 | int num_modes; |
65 | u_char sync; | ||
66 | 61 | ||
67 | u_int cmap_greyscale:1, | 62 | u_int cmap_greyscale:1, |
68 | cmap_inverse:1, | 63 | cmap_inverse:1, |
69 | cmap_static:1, | 64 | cmap_static:1, |
70 | unused:29; | 65 | unused:29; |
71 | 66 | ||
72 | u_int pcr; | ||
73 | u_int pwmr; | 67 | u_int pwmr; |
74 | u_int lscr1; | 68 | u_int lscr1; |
75 | u_int dmacr; | 69 | u_int dmacr; |