aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx2/pcm970-baseboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx2/pcm970-baseboard.c')
-rw-r--r--arch/arm/mach-mx2/pcm970-baseboard.c112
1 files changed, 85 insertions, 27 deletions
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c
index 6a3acaf57dd4..c261f59b0b4c 100644
--- a/arch/arm/mach-mx2/pcm970-baseboard.c
+++ b/arch/arm/mach-mx2/pcm970-baseboard.c
@@ -19,6 +19,7 @@
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/can/platform/sja1000.h>
22 23
23#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
24 25
@@ -125,40 +126,96 @@ static struct imxmmc_platform_data sdhc_pdata = {
125 .exit = pcm970_sdhc2_exit, 126 .exit = pcm970_sdhc2_exit,
126}; 127};
127 128
128/* 129static struct imx_fb_videomode pcm970_modes[] = {
129 * Connected is a portrait Sharp-QVGA display 130 {
130 * of type: LQ035Q7DH06 131 .mode = {
131 */ 132 .name = "Sharp-LQ035Q7",
132static struct imx_fb_platform_data pcm038_fb_data = { 133 .refresh = 60,
133 .pixclock = 188679, /* in ps (5.3MHz) */ 134 .xres = 240,
134 .xres = 240, 135 .yres = 320,
135 .yres = 320, 136 .pixclock = 188679, /* in ps (5.3MHz) */
136 137 .hsync_len = 7,
137 .bpp = 16, 138 .left_margin = 5,
138 .hsync_len = 7, 139 .right_margin = 16,
139 .left_margin = 5, 140 .vsync_len = 1,
140 .right_margin = 16, 141 .upper_margin = 7,
142 .lower_margin = 9,
143 },
144 /*
145 * - HSYNC active high
146 * - VSYNC active high
147 * - clk notenabled while idle
148 * - clock not inverted
149 * - data not inverted
150 * - data enable low active
151 * - enable sharp mode
152 */
153 .pcr = 0xF00080C0,
154 .bpp = 16,
155 }, {
156 .mode = {
157 .name = "TX090",
158 .refresh = 60,
159 .xres = 240,
160 .yres = 320,
161 .pixclock = 38255,
162 .left_margin = 144,
163 .right_margin = 0,
164 .upper_margin = 7,
165 .lower_margin = 40,
166 .hsync_len = 96,
167 .vsync_len = 1,
168 },
169 /*
170 * - HSYNC active low (1 << 22)
171 * - VSYNC active low (1 << 23)
172 * - clk notenabled while idle
173 * - clock not inverted
174 * - data not inverted
175 * - data enable low active
176 * - enable sharp mode
177 */
178 .pcr = 0xF0008080 | (1<<22) | (1<<23) | (1<<19),
179 .bpp = 32,
180 },
181};
141 182
142 .vsync_len = 1, 183static struct imx_fb_platform_data pcm038_fb_data = {
143 .upper_margin = 7, 184 .mode = pcm970_modes,
144 .lower_margin = 9, 185 .num_modes = ARRAY_SIZE(pcm970_modes),
145 .fixed_screen_cpu = 0,
146 186
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, 187 .pwmr = 0x00A903FF,
158 .lscr1 = 0x00120300, 188 .lscr1 = 0x00120300,
159 .dmacr = 0x00020010, 189 .dmacr = 0x00020010,
160}; 190};
161 191
192static struct resource pcm970_sja1000_resources[] = {
193 {
194 .start = CS4_BASE_ADDR,
195 .end = CS4_BASE_ADDR + 0x100 - 1,
196 .flags = IORESOURCE_MEM,
197 }, {
198 .start = IRQ_GPIOE(19),
199 .end = IRQ_GPIOE(19),
200 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
201 },
202};
203
204struct sja1000_platform_data pcm970_sja1000_platform_data = {
205 .clock = 16000000 / 2,
206 .ocr = 0x40 | 0x18,
207 .cdr = 0x40,
208};
209
210static struct platform_device pcm970_sja1000 = {
211 .name = "sja1000_platform",
212 .dev = {
213 .platform_data = &pcm970_sja1000_platform_data,
214 },
215 .resource = pcm970_sja1000_resources,
216 .num_resources = ARRAY_SIZE(pcm970_sja1000_resources),
217};
218
162/* 219/*
163 * system init for baseboard usage. Will be called by pcm038 init. 220 * system init for baseboard usage. Will be called by pcm038 init.
164 * 221 *
@@ -172,4 +229,5 @@ void __init pcm970_baseboard_init(void)
172 229
173 mxc_register_device(&mxc_fb_device, &pcm038_fb_data); 230 mxc_register_device(&mxc_fb_device, &pcm038_fb_data);
174 mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); 231 mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata);
232 platform_device_register(&pcm970_sja1000);
175} 233}