blob: ce164a315ee7f9373511670d06b02c45b3157129 [file] [log] [blame]
Juergen Beisertfc80a5e2008-07-05 10:02:57 +02001/*
2 * Author: MontaVista Software, Inc.
3 * <source@mvista.com>
4 *
5 * Based on the OMAP devices.c
6 *
7 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
8 * terms of the GNU General Public License version 2. This program is
9 * licensed "as is" without any warranty of any kind, whether express
10 * or implied.
11 *
12 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
13 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
27 * MA 02110-1301, USA.
28 */
29#include <linux/module.h>
30#include <linux/kernel.h>
31#include <linux/init.h>
32#include <linux/platform_device.h>
33#include <linux/gpio.h>
34
Russell King80b02c12009-01-08 10:01:47 +000035#include <mach/irqs.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010036#include <mach/hardware.h>
Holger Schurig058b7a62009-01-26 16:34:51 +010037#include <mach/common.h>
Sascha Hauer1a02be02008-12-19 14:32:07 +010038#include <mach/mmc.h>
Holger Schurig058b7a62009-01-26 16:34:51 +010039
40#include "devices.h"
Juergen Beisertfc80a5e2008-07-05 10:02:57 +020041
42/*
Sascha Hauerf420db82008-12-19 14:32:14 +010043 * SPI master controller
44 *
45 * - i.MX1: 2 channel (slighly different register setting)
46 * - i.MX21: 2 channel
47 * - i.MX27: 3 channel
48 */
Uwe Kleine-König68c94b42010-02-04 22:04:32 +010049#define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \
50 static struct resource mxc_spi_resources ## n[] = { \
51 { \
52 .start = baseaddr, \
53 .end = baseaddr + SZ_4K - 1, \
54 .flags = IORESOURCE_MEM, \
55 }, { \
56 .start = irq, \
57 .end = irq, \
58 .flags = IORESOURCE_IRQ, \
59 }, \
60 }; \
61 \
62 struct platform_device mxc_spi_device ## n = { \
63 .name = "spi_imx", \
64 .id = n, \
65 .num_resources = ARRAY_SIZE(mxc_spi_resources ## n), \
66 .resource = mxc_spi_resources ## n, \
67 }
Sascha Hauerf420db82008-12-19 14:32:14 +010068
Uwe Kleine-König68c94b42010-02-04 22:04:32 +010069DEFINE_IMX_SPI_DEVICE(0, MX2x_CSPI1_BASE_ADDR, MX2x_INT_CSPI1);
70DEFINE_IMX_SPI_DEVICE(1, MX2x_CSPI2_BASE_ADDR, MX2x_INT_CSPI2);
Sascha Hauerf420db82008-12-19 14:32:14 +010071
72#ifdef CONFIG_MACH_MX27
Uwe Kleine-König68c94b42010-02-04 22:04:32 +010073DEFINE_IMX_SPI_DEVICE(2, MX27_CSPI3_BASE_ADDR, MX27_INT_CSPI3);
Sascha Hauerf420db82008-12-19 14:32:14 +010074#endif
75
76/*
Juergen Beisertfc80a5e2008-07-05 10:02:57 +020077 * General Purpose Timer
Sascha Hauerbf50bcc2009-06-23 12:04:36 +020078 * - i.MX21: 3 timers
79 * - i.MX27: 6 timers
Juergen Beisertfc80a5e2008-07-05 10:02:57 +020080 */
81
82/* We use gpt0 as system timer, so do not add a device for this one */
83
84static struct resource timer1_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +020085 {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +020086 .start = GPT2_BASE_ADDR,
87 .end = GPT2_BASE_ADDR + 0x17,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +020088 .flags = IORESOURCE_MEM,
89 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +020090 .start = MXC_INT_GPT2,
91 .end = MXC_INT_GPT2,
92 .flags = IORESOURCE_IRQ,
93 }
94};
95
96struct platform_device mxc_gpt1 = {
97 .name = "imx_gpt",
98 .id = 1,
99 .num_resources = ARRAY_SIZE(timer1_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200100 .resource = timer1_resources,
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200101};
102
103static struct resource timer2_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200104 {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200105 .start = GPT3_BASE_ADDR,
106 .end = GPT3_BASE_ADDR + 0x17,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200107 .flags = IORESOURCE_MEM,
108 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200109 .start = MXC_INT_GPT3,
110 .end = MXC_INT_GPT3,
111 .flags = IORESOURCE_IRQ,
112 }
113};
114
115struct platform_device mxc_gpt2 = {
116 .name = "imx_gpt",
117 .id = 2,
118 .num_resources = ARRAY_SIZE(timer2_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200119 .resource = timer2_resources,
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200120};
121
122#ifdef CONFIG_MACH_MX27
123static struct resource timer3_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200124 {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200125 .start = GPT4_BASE_ADDR,
126 .end = GPT4_BASE_ADDR + 0x17,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200127 .flags = IORESOURCE_MEM,
128 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200129 .start = MXC_INT_GPT4,
130 .end = MXC_INT_GPT4,
131 .flags = IORESOURCE_IRQ,
132 }
133};
134
135struct platform_device mxc_gpt3 = {
136 .name = "imx_gpt",
137 .id = 3,
138 .num_resources = ARRAY_SIZE(timer3_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200139 .resource = timer3_resources,
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200140};
141
142static struct resource timer4_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200143 {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200144 .start = GPT5_BASE_ADDR,
145 .end = GPT5_BASE_ADDR + 0x17,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200146 .flags = IORESOURCE_MEM,
147 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200148 .start = MXC_INT_GPT5,
149 .end = MXC_INT_GPT5,
150 .flags = IORESOURCE_IRQ,
151 }
152};
153
154struct platform_device mxc_gpt4 = {
155 .name = "imx_gpt",
156 .id = 4,
157 .num_resources = ARRAY_SIZE(timer4_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200158 .resource = timer4_resources,
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200159};
160
161static struct resource timer5_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200162 {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200163 .start = GPT6_BASE_ADDR,
164 .end = GPT6_BASE_ADDR + 0x17,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200165 .flags = IORESOURCE_MEM,
166 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200167 .start = MXC_INT_GPT6,
168 .end = MXC_INT_GPT6,
169 .flags = IORESOURCE_IRQ,
170 }
171};
172
173struct platform_device mxc_gpt5 = {
174 .name = "imx_gpt",
175 .id = 5,
176 .num_resources = ARRAY_SIZE(timer5_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200177 .resource = timer5_resources,
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200178};
179#endif
180
181/*
182 * Watchdog:
183 * - i.MX1
184 * - i.MX21
185 * - i.MX27
186 */
187static struct resource mxc_wdt_resources[] = {
188 {
189 .start = WDOG_BASE_ADDR,
190 .end = WDOG_BASE_ADDR + 0x30,
191 .flags = IORESOURCE_MEM,
192 },
193};
194
195struct platform_device mxc_wdt = {
196 .name = "mxc_wdt",
197 .id = 0,
198 .num_resources = ARRAY_SIZE(mxc_wdt_resources),
199 .resource = mxc_wdt_resources,
200};
201
Sascha Hauer3d89baa2008-12-01 14:15:38 -0800202static struct resource mxc_w1_master_resources[] = {
203 {
204 .start = OWIRE_BASE_ADDR,
205 .end = OWIRE_BASE_ADDR + SZ_4K - 1,
206 .flags = IORESOURCE_MEM,
207 },
208};
209
210struct platform_device mxc_w1_master_device = {
211 .name = "mxc_w1",
212 .id = 0,
213 .num_resources = ARRAY_SIZE(mxc_w1_master_resources),
214 .resource = mxc_w1_master_resources,
215};
216
Sascha Hauer02870972008-09-09 11:30:58 +0200217static struct resource mxc_nand_resources[] = {
218 {
219 .start = NFC_BASE_ADDR,
220 .end = NFC_BASE_ADDR + 0xfff,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200221 .flags = IORESOURCE_MEM,
Sascha Hauer02870972008-09-09 11:30:58 +0200222 }, {
223 .start = MXC_INT_NANDFC,
224 .end = MXC_INT_NANDFC,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200225 .flags = IORESOURCE_IRQ,
Sascha Hauer02870972008-09-09 11:30:58 +0200226 },
227};
228
229struct platform_device mxc_nand_device = {
230 .name = "mxc_nand",
231 .id = 0,
232 .num_resources = ARRAY_SIZE(mxc_nand_resources),
233 .resource = mxc_nand_resources,
234};
235
Holger Schurige4813552009-01-26 16:34:56 +0100236/*
237 * lcdc:
238 * - i.MX1: the basic controller
239 * - i.MX21: to be checked
240 * - i.MX27: like i.MX1, with slightly variations
241 */
242static struct resource mxc_fb[] = {
243 {
244 .start = LCDC_BASE_ADDR,
245 .end = LCDC_BASE_ADDR + 0xFFF,
246 .flags = IORESOURCE_MEM,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200247 }, {
Holger Schurige4813552009-01-26 16:34:56 +0100248 .start = MXC_INT_LCDC,
249 .end = MXC_INT_LCDC,
250 .flags = IORESOURCE_IRQ,
251 }
252};
253
254/* mxc lcd driver */
255struct platform_device mxc_fb_device = {
256 .name = "imx-fb",
257 .id = 0,
258 .num_resources = ARRAY_SIZE(mxc_fb),
259 .resource = mxc_fb,
260 .dev = {
261 .coherent_dma_mask = 0xFFFFFFFF,
262 },
263};
264
Sascha Hauer879fea12009-01-26 17:26:02 +0100265#ifdef CONFIG_MACH_MX27
266static struct resource mxc_fec_resources[] = {
267 {
268 .start = FEC_BASE_ADDR,
269 .end = FEC_BASE_ADDR + 0xfff,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200270 .flags = IORESOURCE_MEM,
Sascha Hauer879fea12009-01-26 17:26:02 +0100271 }, {
272 .start = MXC_INT_FEC,
273 .end = MXC_INT_FEC,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200274 .flags = IORESOURCE_IRQ,
Sascha Hauer879fea12009-01-26 17:26:02 +0100275 },
276};
277
278struct platform_device mxc_fec_device = {
279 .name = "fec",
280 .id = 0,
281 .num_resources = ARRAY_SIZE(mxc_fec_resources),
282 .resource = mxc_fec_resources,
283};
Holger Schurige4813552009-01-26 16:34:56 +0100284#endif
285
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100286static struct resource mxc_i2c_1_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200287 {
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100288 .start = I2C_BASE_ADDR,
289 .end = I2C_BASE_ADDR + 0x0fff,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200290 .flags = IORESOURCE_MEM,
291 }, {
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100292 .start = MXC_INT_I2C,
293 .end = MXC_INT_I2C,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200294 .flags = IORESOURCE_IRQ,
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100295 }
296};
297
298struct platform_device mxc_i2c_device0 = {
299 .name = "imx-i2c",
300 .id = 0,
301 .num_resources = ARRAY_SIZE(mxc_i2c_1_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200302 .resource = mxc_i2c_1_resources,
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100303};
304
305#ifdef CONFIG_MACH_MX27
306static struct resource mxc_i2c_2_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200307 {
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100308 .start = I2C2_BASE_ADDR,
309 .end = I2C2_BASE_ADDR + 0x0fff,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200310 .flags = IORESOURCE_MEM,
311 }, {
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100312 .start = MXC_INT_I2C2,
313 .end = MXC_INT_I2C2,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200314 .flags = IORESOURCE_IRQ,
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100315 }
316};
317
318struct platform_device mxc_i2c_device1 = {
319 .name = "imx-i2c",
320 .id = 1,
321 .num_resources = ARRAY_SIZE(mxc_i2c_2_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200322 .resource = mxc_i2c_2_resources,
Sascha Hauerc5d4dbf2009-01-28 13:26:56 +0100323};
324#endif
325
Sascha Hauer824b16e2009-01-16 15:17:46 +0100326static struct resource mxc_pwm_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200327 {
Sascha Hauer824b16e2009-01-16 15:17:46 +0100328 .start = PWM_BASE_ADDR,
329 .end = PWM_BASE_ADDR + 0x0fff,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200330 .flags = IORESOURCE_MEM,
331 }, {
Sascha Hauer824b16e2009-01-16 15:17:46 +0100332 .start = MXC_INT_PWM,
333 .end = MXC_INT_PWM,
334 .flags = IORESOURCE_IRQ,
335 }
336};
337
338struct platform_device mxc_pwm_device = {
339 .name = "mxc_pwm",
340 .id = 0,
341 .num_resources = ARRAY_SIZE(mxc_pwm_resources),
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200342 .resource = mxc_pwm_resources,
Sascha Hauer824b16e2009-01-16 15:17:46 +0100343};
344
Sascha Hauer1a02be02008-12-19 14:32:07 +0100345/*
346 * Resource definition for the MXC SDHC
347 */
348static struct resource mxc_sdhc1_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200349 {
350 .start = SDHC1_BASE_ADDR,
351 .end = SDHC1_BASE_ADDR + SZ_4K - 1,
352 .flags = IORESOURCE_MEM,
353 }, {
354 .start = MXC_INT_SDHC1,
355 .end = MXC_INT_SDHC1,
356 .flags = IORESOURCE_IRQ,
357 }, {
358 .start = DMA_REQ_SDHC1,
359 .end = DMA_REQ_SDHC1,
360 .flags = IORESOURCE_DMA,
361 },
Sascha Hauer1a02be02008-12-19 14:32:07 +0100362};
363
364static u64 mxc_sdhc1_dmamask = 0xffffffffUL;
365
366struct platform_device mxc_sdhc_device0 = {
367 .name = "mxc-mmc",
368 .id = 0,
369 .dev = {
370 .dma_mask = &mxc_sdhc1_dmamask,
371 .coherent_dma_mask = 0xffffffff,
372 },
373 .num_resources = ARRAY_SIZE(mxc_sdhc1_resources),
374 .resource = mxc_sdhc1_resources,
375};
376
377static struct resource mxc_sdhc2_resources[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200378 {
379 .start = SDHC2_BASE_ADDR,
380 .end = SDHC2_BASE_ADDR + SZ_4K - 1,
381 .flags = IORESOURCE_MEM,
382 }, {
383 .start = MXC_INT_SDHC2,
384 .end = MXC_INT_SDHC2,
385 .flags = IORESOURCE_IRQ,
386 }, {
387 .start = DMA_REQ_SDHC2,
388 .end = DMA_REQ_SDHC2,
389 .flags = IORESOURCE_DMA,
390 },
Sascha Hauer1a02be02008-12-19 14:32:07 +0100391};
392
393static u64 mxc_sdhc2_dmamask = 0xffffffffUL;
394
395struct platform_device mxc_sdhc_device1 = {
396 .name = "mxc-mmc",
397 .id = 1,
398 .dev = {
399 .dma_mask = &mxc_sdhc2_dmamask,
400 .coherent_dma_mask = 0xffffffff,
401 },
402 .num_resources = ARRAY_SIZE(mxc_sdhc2_resources),
403 .resource = mxc_sdhc2_resources,
404};
405
Sascha Hauerf6d2fa72009-08-13 10:02:30 +0200406#ifdef CONFIG_MACH_MX27
javier Martin627fb3b2009-07-15 15:26:21 +0200407static struct resource otg_resources[] = {
408 {
409 .start = OTG_BASE_ADDR,
410 .end = OTG_BASE_ADDR + 0x1ff,
411 .flags = IORESOURCE_MEM,
412 }, {
413 .start = MXC_INT_USB3,
414 .end = MXC_INT_USB3,
415 .flags = IORESOURCE_IRQ,
416 },
417};
418
419static u64 otg_dmamask = 0xffffffffUL;
420
421/* OTG gadget device */
422struct platform_device mxc_otg_udc_device = {
423 .name = "fsl-usb2-udc",
424 .id = -1,
425 .dev = {
426 .dma_mask = &otg_dmamask,
427 .coherent_dma_mask = 0xffffffffUL,
428 },
429 .resource = otg_resources,
430 .num_resources = ARRAY_SIZE(otg_resources),
431};
432
433/* OTG host */
434struct platform_device mxc_otg_host = {
435 .name = "mxc-ehci",
436 .id = 0,
437 .dev = {
438 .coherent_dma_mask = 0xffffffff,
439 .dma_mask = &otg_dmamask,
440 },
441 .resource = otg_resources,
442 .num_resources = ARRAY_SIZE(otg_resources),
443};
444
445/* USB host 1 */
446
447static u64 usbh1_dmamask = 0xffffffffUL;
448
449static struct resource mxc_usbh1_resources[] = {
450 {
451 .start = OTG_BASE_ADDR + 0x200,
452 .end = OTG_BASE_ADDR + 0x3ff,
453 .flags = IORESOURCE_MEM,
454 }, {
455 .start = MXC_INT_USB1,
456 .end = MXC_INT_USB1,
457 .flags = IORESOURCE_IRQ,
458 },
459};
460
461struct platform_device mxc_usbh1 = {
462 .name = "mxc-ehci",
463 .id = 1,
464 .dev = {
465 .coherent_dma_mask = 0xffffffff,
466 .dma_mask = &usbh1_dmamask,
467 },
468 .resource = mxc_usbh1_resources,
469 .num_resources = ARRAY_SIZE(mxc_usbh1_resources),
470};
471
472/* USB host 2 */
473static u64 usbh2_dmamask = 0xffffffffUL;
474
475static struct resource mxc_usbh2_resources[] = {
476 {
477 .start = OTG_BASE_ADDR + 0x400,
478 .end = OTG_BASE_ADDR + 0x5ff,
479 .flags = IORESOURCE_MEM,
480 }, {
481 .start = MXC_INT_USB2,
482 .end = MXC_INT_USB2,
483 .flags = IORESOURCE_IRQ,
484 },
485};
486
487struct platform_device mxc_usbh2 = {
488 .name = "mxc-ehci",
489 .id = 2,
490 .dev = {
491 .coherent_dma_mask = 0xffffffff,
492 .dma_mask = &usbh2_dmamask,
493 },
494 .resource = mxc_usbh2_resources,
495 .num_resources = ARRAY_SIZE(mxc_usbh2_resources),
496};
Sascha Hauerf6d2fa72009-08-13 10:02:30 +0200497#endif
javier Martin627fb3b2009-07-15 15:26:21 +0200498
Sascha Hauer23291df2009-10-22 14:50:33 +0200499static struct resource imx_ssi_resources0[] = {
500 {
501 .start = SSI1_BASE_ADDR,
502 .end = SSI1_BASE_ADDR + 0x6F,
503 .flags = IORESOURCE_MEM,
504 }, {
505 .start = MXC_INT_SSI1,
506 .end = MXC_INT_SSI1,
507 .flags = IORESOURCE_IRQ,
508 }, {
509 .name = "tx0",
510 .start = DMA_REQ_SSI1_TX0,
511 .end = DMA_REQ_SSI1_TX0,
512 .flags = IORESOURCE_DMA,
513 }, {
514 .name = "rx0",
515 .start = DMA_REQ_SSI1_RX0,
516 .end = DMA_REQ_SSI1_RX0,
517 .flags = IORESOURCE_DMA,
518 }, {
519 .name = "tx1",
520 .start = DMA_REQ_SSI1_TX1,
521 .end = DMA_REQ_SSI1_TX1,
522 .flags = IORESOURCE_DMA,
523 }, {
524 .name = "rx1",
525 .start = DMA_REQ_SSI1_RX1,
526 .end = DMA_REQ_SSI1_RX1,
527 .flags = IORESOURCE_DMA,
528 },
529};
530
531static struct resource imx_ssi_resources1[] = {
532 {
533 .start = SSI2_BASE_ADDR,
534 .end = SSI2_BASE_ADDR + 0x6F,
535 .flags = IORESOURCE_MEM,
536 }, {
537 .start = MXC_INT_SSI2,
538 .end = MXC_INT_SSI2,
539 .flags = IORESOURCE_IRQ,
540 }, {
541 .name = "tx0",
542 .start = DMA_REQ_SSI2_TX0,
543 .end = DMA_REQ_SSI2_TX0,
544 .flags = IORESOURCE_DMA,
545 }, {
546 .name = "rx0",
547 .start = DMA_REQ_SSI2_RX0,
548 .end = DMA_REQ_SSI2_RX0,
549 .flags = IORESOURCE_DMA,
550 }, {
551 .name = "tx1",
552 .start = DMA_REQ_SSI2_TX1,
553 .end = DMA_REQ_SSI2_TX1,
554 .flags = IORESOURCE_DMA,
555 }, {
556 .name = "rx1",
557 .start = DMA_REQ_SSI2_RX1,
558 .end = DMA_REQ_SSI2_RX1,
559 .flags = IORESOURCE_DMA,
560 },
561};
562
563struct platform_device imx_ssi_device0 = {
564 .name = "imx-ssi",
565 .id = 0,
566 .num_resources = ARRAY_SIZE(imx_ssi_resources0),
567 .resource = imx_ssi_resources0,
568};
569
570struct platform_device imx_ssi_device1 = {
571 .name = "imx-ssi",
572 .id = 1,
573 .num_resources = ARRAY_SIZE(imx_ssi_resources1),
574 .resource = imx_ssi_resources1,
575};
576
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200577/* GPIO port description */
578static struct mxc_gpio_port imx_gpio_ports[] = {
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200579 {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200580 .chip.label = "gpio-0",
581 .irq = MXC_INT_GPIO,
Holger Schurig058b7a62009-01-26 16:34:51 +0100582 .base = IO_ADDRESS(GPIO_BASE_ADDR),
Sascha Hauer9d631b82008-12-18 11:08:55 +0100583 .virtual_irq_start = MXC_GPIO_IRQ_START,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200584 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200585 .chip.label = "gpio-1",
Holger Schurig058b7a62009-01-26 16:34:51 +0100586 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x100),
Sascha Hauer9d631b82008-12-18 11:08:55 +0100587 .virtual_irq_start = MXC_GPIO_IRQ_START + 32,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200588 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200589 .chip.label = "gpio-2",
Holger Schurig058b7a62009-01-26 16:34:51 +0100590 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x200),
Sascha Hauer9d631b82008-12-18 11:08:55 +0100591 .virtual_irq_start = MXC_GPIO_IRQ_START + 64,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200592 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200593 .chip.label = "gpio-3",
Holger Schurig058b7a62009-01-26 16:34:51 +0100594 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x300),
Sascha Hauer9d631b82008-12-18 11:08:55 +0100595 .virtual_irq_start = MXC_GPIO_IRQ_START + 96,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200596 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200597 .chip.label = "gpio-4",
Holger Schurig058b7a62009-01-26 16:34:51 +0100598 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x400),
Sascha Hauer9d631b82008-12-18 11:08:55 +0100599 .virtual_irq_start = MXC_GPIO_IRQ_START + 128,
Sascha Hauerbf50bcc2009-06-23 12:04:36 +0200600 }, {
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200601 .chip.label = "gpio-5",
Holger Schurig058b7a62009-01-26 16:34:51 +0100602 .base = IO_ADDRESS(GPIO_BASE_ADDR + 0x500),
Sascha Hauer9d631b82008-12-18 11:08:55 +0100603 .virtual_irq_start = MXC_GPIO_IRQ_START + 160,
Juergen Beisertfc80a5e2008-07-05 10:02:57 +0200604 }
605};
606
607int __init mxc_register_gpios(void)
608{
609 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
610}