blob: 6b268f385a1b9c49164555dab87e782e68d52bf6 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/platform_device.h>
17#include <linux/msm_rotator.h>
Deepak Kotur12301a72011-11-09 18:30:29 -080018#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <linux/gpio.h>
20#include <asm/clkdev.h>
21#include <linux/msm_kgsl.h>
22#include <linux/android_pmem.h>
23#include <mach/irqs-8960.h>
Mayank Rana9f51f582011-08-04 18:35:59 +053024#include <mach/dma.h>
25#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026#include <mach/board.h>
27#include <mach/msm_iomap.h>
28#include <mach/msm_hsusb.h>
29#include <mach/msm_sps.h>
30#include <mach/rpm.h>
31#include <mach/msm_bus_board.h>
32#include <mach/msm_memtypes.h>
Matt Wagantall39088932011-08-02 20:24:56 -070033#include <mach/msm_xo.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070034#include <sound/msm-dai-q6.h>
35#include <sound/apr_audio.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070036#include "clock.h"
37#include "devices.h"
38#include "devices-msm8x60.h"
39#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070040#include "msm_watchdog.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060041#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070042#include "pil-q6v4.h"
43#include "scm-pas.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070044
45#ifdef CONFIG_MSM_MPM
46#include "mpm.h"
47#endif
48#ifdef CONFIG_MSM_DSPS
49#include <mach/msm_dsps.h>
50#endif
51
52
53/* Address of GSBI blocks */
54#define MSM_GSBI1_PHYS 0x16000000
55#define MSM_GSBI2_PHYS 0x16100000
56#define MSM_GSBI3_PHYS 0x16200000
57#define MSM_GSBI4_PHYS 0x16300000
58#define MSM_GSBI5_PHYS 0x16400000
59#define MSM_GSBI6_PHYS 0x16500000
60#define MSM_GSBI7_PHYS 0x16600000
61#define MSM_GSBI8_PHYS 0x1A000000
62#define MSM_GSBI9_PHYS 0x1A100000
63#define MSM_GSBI10_PHYS 0x1A200000
64#define MSM_GSBI11_PHYS 0x12440000
65#define MSM_GSBI12_PHYS 0x12480000
66
67#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
68#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053069#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070070
71/* GSBI QUP devices */
72#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
73#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
74#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
75#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
76#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
77#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
78#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
79#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
80#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
81#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
82#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
83#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
84#define MSM_QUP_SIZE SZ_4K
85
86#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
87#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
88#define MSM_PMIC_SSBI_SIZE SZ_4K
89
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070090#define MSM8960_HSUSB_PHYS 0x12500000
91#define MSM8960_HSUSB_SIZE SZ_4K
92
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070093static struct resource resources_otg[] = {
94 {
95 .start = MSM8960_HSUSB_PHYS,
96 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
97 .flags = IORESOURCE_MEM,
98 },
99 {
100 .start = USB1_HS_IRQ,
101 .end = USB1_HS_IRQ,
102 .flags = IORESOURCE_IRQ,
103 },
104};
105
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700106struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700107 .name = "msm_otg",
108 .id = -1,
109 .num_resources = ARRAY_SIZE(resources_otg),
110 .resource = resources_otg,
111 .dev = {
112 .coherent_dma_mask = 0xffffffff,
113 },
114};
115
116static struct resource resources_hsusb[] = {
117 {
118 .start = MSM8960_HSUSB_PHYS,
119 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
120 .flags = IORESOURCE_MEM,
121 },
122 {
123 .start = USB1_HS_IRQ,
124 .end = USB1_HS_IRQ,
125 .flags = IORESOURCE_IRQ,
126 },
127};
128
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700129struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700130 .name = "msm_hsusb",
131 .id = -1,
132 .num_resources = ARRAY_SIZE(resources_hsusb),
133 .resource = resources_hsusb,
134 .dev = {
135 .coherent_dma_mask = 0xffffffff,
136 },
137};
138
139static struct resource resources_hsusb_host[] = {
140 {
141 .start = MSM8960_HSUSB_PHYS,
142 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
143 .flags = IORESOURCE_MEM,
144 },
145 {
146 .start = USB1_HS_IRQ,
147 .end = USB1_HS_IRQ,
148 .flags = IORESOURCE_IRQ,
149 },
150};
151
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530152static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700153struct platform_device msm_device_hsusb_host = {
154 .name = "msm_hsusb_host",
155 .id = -1,
156 .num_resources = ARRAY_SIZE(resources_hsusb_host),
157 .resource = resources_hsusb_host,
158 .dev = {
159 .dma_mask = &dma_mask,
160 .coherent_dma_mask = 0xffffffff,
161 },
162};
163
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530164static struct resource resources_hsic_host[] = {
165 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700166 .start = 0x12520000,
167 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530168 .flags = IORESOURCE_MEM,
169 },
170 {
171 .start = USB_HSIC_IRQ,
172 .end = USB_HSIC_IRQ,
173 .flags = IORESOURCE_IRQ,
174 },
175};
176
177struct platform_device msm_device_hsic_host = {
178 .name = "msm_hsic_host",
179 .id = -1,
180 .num_resources = ARRAY_SIZE(resources_hsic_host),
181 .resource = resources_hsic_host,
182 .dev = {
183 .dma_mask = &dma_mask,
184 .coherent_dma_mask = DMA_BIT_MASK(32),
185 },
186};
187
Mona Hossain11c03ac2011-10-26 12:42:10 -0700188#define SHARED_IMEM_TZ_BASE 0x2a03f720
189static struct resource tzlog_resources[] = {
190 {
191 .start = SHARED_IMEM_TZ_BASE,
192 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
193 .flags = IORESOURCE_MEM,
194 },
195};
196
197struct platform_device msm_device_tz_log = {
198 .name = "tz_log",
199 .id = 0,
200 .num_resources = ARRAY_SIZE(tzlog_resources),
201 .resource = tzlog_resources,
202};
203
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700204static struct resource resources_uart_gsbi2[] = {
205 {
206 .start = MSM8960_GSBI2_UARTDM_IRQ,
207 .end = MSM8960_GSBI2_UARTDM_IRQ,
208 .flags = IORESOURCE_IRQ,
209 },
210 {
211 .start = MSM_UART2DM_PHYS,
212 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
213 .name = "uartdm_resource",
214 .flags = IORESOURCE_MEM,
215 },
216 {
217 .start = MSM_GSBI2_PHYS,
218 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
219 .name = "gsbi_resource",
220 .flags = IORESOURCE_MEM,
221 },
222};
223
224struct platform_device msm8960_device_uart_gsbi2 = {
225 .name = "msm_serial_hsl",
226 .id = 0,
227 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
228 .resource = resources_uart_gsbi2,
229};
Mayank Rana9f51f582011-08-04 18:35:59 +0530230/* GSBI 6 used into UARTDM Mode */
231static struct resource msm_uart_dm6_resources[] = {
232 {
233 .start = MSM_UART6DM_PHYS,
234 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
235 .name = "uartdm_resource",
236 .flags = IORESOURCE_MEM,
237 },
238 {
239 .start = GSBI6_UARTDM_IRQ,
240 .end = GSBI6_UARTDM_IRQ,
241 .flags = IORESOURCE_IRQ,
242 },
243 {
244 .start = MSM_GSBI6_PHYS,
245 .end = MSM_GSBI6_PHYS + 4 - 1,
246 .name = "gsbi_resource",
247 .flags = IORESOURCE_MEM,
248 },
249 {
250 .start = DMOV_HSUART_GSBI6_TX_CHAN,
251 .end = DMOV_HSUART_GSBI6_RX_CHAN,
252 .name = "uartdm_channels",
253 .flags = IORESOURCE_DMA,
254 },
255 {
256 .start = DMOV_HSUART_GSBI6_TX_CRCI,
257 .end = DMOV_HSUART_GSBI6_RX_CRCI,
258 .name = "uartdm_crci",
259 .flags = IORESOURCE_DMA,
260 },
261};
262static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
263struct platform_device msm_device_uart_dm6 = {
264 .name = "msm_serial_hs",
265 .id = 0,
266 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
267 .resource = msm_uart_dm6_resources,
268 .dev = {
269 .dma_mask = &msm_uart_dm6_dma_mask,
270 .coherent_dma_mask = DMA_BIT_MASK(32),
271 },
272};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700273
274static struct resource resources_uart_gsbi5[] = {
275 {
276 .start = GSBI5_UARTDM_IRQ,
277 .end = GSBI5_UARTDM_IRQ,
278 .flags = IORESOURCE_IRQ,
279 },
280 {
281 .start = MSM_UART5DM_PHYS,
282 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
283 .name = "uartdm_resource",
284 .flags = IORESOURCE_MEM,
285 },
286 {
287 .start = MSM_GSBI5_PHYS,
288 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
289 .name = "gsbi_resource",
290 .flags = IORESOURCE_MEM,
291 },
292};
293
294struct platform_device msm8960_device_uart_gsbi5 = {
295 .name = "msm_serial_hsl",
296 .id = 0,
297 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
298 .resource = resources_uart_gsbi5,
299};
300/* MSM Video core device */
301#ifdef CONFIG_MSM_BUS_SCALING
302static struct msm_bus_vectors vidc_init_vectors[] = {
303 {
304 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
305 .dst = MSM_BUS_SLAVE_EBI_CH0,
306 .ab = 0,
307 .ib = 0,
308 },
309 {
310 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
311 .dst = MSM_BUS_SLAVE_EBI_CH0,
312 .ab = 0,
313 .ib = 0,
314 },
315 {
316 .src = MSM_BUS_MASTER_AMPSS_M0,
317 .dst = MSM_BUS_SLAVE_EBI_CH0,
318 .ab = 0,
319 .ib = 0,
320 },
321 {
322 .src = MSM_BUS_MASTER_AMPSS_M0,
323 .dst = MSM_BUS_SLAVE_EBI_CH0,
324 .ab = 0,
325 .ib = 0,
326 },
327};
328static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
329 {
330 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
331 .dst = MSM_BUS_SLAVE_EBI_CH0,
332 .ab = 54525952,
333 .ib = 436207616,
334 },
335 {
336 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
337 .dst = MSM_BUS_SLAVE_EBI_CH0,
338 .ab = 72351744,
339 .ib = 289406976,
340 },
341 {
342 .src = MSM_BUS_MASTER_AMPSS_M0,
343 .dst = MSM_BUS_SLAVE_EBI_CH0,
344 .ab = 500000,
345 .ib = 1000000,
346 },
347 {
348 .src = MSM_BUS_MASTER_AMPSS_M0,
349 .dst = MSM_BUS_SLAVE_EBI_CH0,
350 .ab = 500000,
351 .ib = 1000000,
352 },
353};
354static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
355 {
356 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
357 .dst = MSM_BUS_SLAVE_EBI_CH0,
358 .ab = 40894464,
359 .ib = 327155712,
360 },
361 {
362 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
363 .dst = MSM_BUS_SLAVE_EBI_CH0,
364 .ab = 48234496,
365 .ib = 192937984,
366 },
367 {
368 .src = MSM_BUS_MASTER_AMPSS_M0,
369 .dst = MSM_BUS_SLAVE_EBI_CH0,
370 .ab = 500000,
371 .ib = 2000000,
372 },
373 {
374 .src = MSM_BUS_MASTER_AMPSS_M0,
375 .dst = MSM_BUS_SLAVE_EBI_CH0,
376 .ab = 500000,
377 .ib = 2000000,
378 },
379};
380static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
381 {
382 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
383 .dst = MSM_BUS_SLAVE_EBI_CH0,
384 .ab = 163577856,
385 .ib = 1308622848,
386 },
387 {
388 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
389 .dst = MSM_BUS_SLAVE_EBI_CH0,
390 .ab = 219152384,
391 .ib = 876609536,
392 },
393 {
394 .src = MSM_BUS_MASTER_AMPSS_M0,
395 .dst = MSM_BUS_SLAVE_EBI_CH0,
396 .ab = 1750000,
397 .ib = 3500000,
398 },
399 {
400 .src = MSM_BUS_MASTER_AMPSS_M0,
401 .dst = MSM_BUS_SLAVE_EBI_CH0,
402 .ab = 1750000,
403 .ib = 3500000,
404 },
405};
406static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
407 {
408 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
409 .dst = MSM_BUS_SLAVE_EBI_CH0,
410 .ab = 121634816,
411 .ib = 973078528,
412 },
413 {
414 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
415 .dst = MSM_BUS_SLAVE_EBI_CH0,
416 .ab = 155189248,
417 .ib = 620756992,
418 },
419 {
420 .src = MSM_BUS_MASTER_AMPSS_M0,
421 .dst = MSM_BUS_SLAVE_EBI_CH0,
422 .ab = 1750000,
423 .ib = 7000000,
424 },
425 {
426 .src = MSM_BUS_MASTER_AMPSS_M0,
427 .dst = MSM_BUS_SLAVE_EBI_CH0,
428 .ab = 1750000,
429 .ib = 7000000,
430 },
431};
432static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
433 {
434 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
435 .dst = MSM_BUS_SLAVE_EBI_CH0,
436 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700437 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700438 },
439 {
440 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
441 .dst = MSM_BUS_SLAVE_EBI_CH0,
442 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700443 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700444 },
445 {
446 .src = MSM_BUS_MASTER_AMPSS_M0,
447 .dst = MSM_BUS_SLAVE_EBI_CH0,
448 .ab = 2500000,
449 .ib = 5000000,
450 },
451 {
452 .src = MSM_BUS_MASTER_AMPSS_M0,
453 .dst = MSM_BUS_SLAVE_EBI_CH0,
454 .ab = 2500000,
455 .ib = 5000000,
456 },
457};
458static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
459 {
460 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
461 .dst = MSM_BUS_SLAVE_EBI_CH0,
462 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700463 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700464 },
465 {
466 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
467 .dst = MSM_BUS_SLAVE_EBI_CH0,
468 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700469 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700470 },
471 {
472 .src = MSM_BUS_MASTER_AMPSS_M0,
473 .dst = MSM_BUS_SLAVE_EBI_CH0,
474 .ab = 2500000,
475 .ib = 700000000,
476 },
477 {
478 .src = MSM_BUS_MASTER_AMPSS_M0,
479 .dst = MSM_BUS_SLAVE_EBI_CH0,
480 .ab = 2500000,
481 .ib = 10000000,
482 },
483};
484
485static struct msm_bus_paths vidc_bus_client_config[] = {
486 {
487 ARRAY_SIZE(vidc_init_vectors),
488 vidc_init_vectors,
489 },
490 {
491 ARRAY_SIZE(vidc_venc_vga_vectors),
492 vidc_venc_vga_vectors,
493 },
494 {
495 ARRAY_SIZE(vidc_vdec_vga_vectors),
496 vidc_vdec_vga_vectors,
497 },
498 {
499 ARRAY_SIZE(vidc_venc_720p_vectors),
500 vidc_venc_720p_vectors,
501 },
502 {
503 ARRAY_SIZE(vidc_vdec_720p_vectors),
504 vidc_vdec_720p_vectors,
505 },
506 {
507 ARRAY_SIZE(vidc_venc_1080p_vectors),
508 vidc_venc_1080p_vectors,
509 },
510 {
511 ARRAY_SIZE(vidc_vdec_1080p_vectors),
512 vidc_vdec_1080p_vectors,
513 },
514};
515
516static struct msm_bus_scale_pdata vidc_bus_client_data = {
517 vidc_bus_client_config,
518 ARRAY_SIZE(vidc_bus_client_config),
519 .name = "vidc",
520};
521#endif
522
Mona Hossain9c430e32011-07-27 11:04:47 -0700523#ifdef CONFIG_HW_RANDOM_MSM
524/* PRNG device */
525#define MSM_PRNG_PHYS 0x1A500000
526static struct resource rng_resources = {
527 .flags = IORESOURCE_MEM,
528 .start = MSM_PRNG_PHYS,
529 .end = MSM_PRNG_PHYS + SZ_512 - 1,
530};
531
532struct platform_device msm_device_rng = {
533 .name = "msm_rng",
534 .id = 0,
535 .num_resources = 1,
536 .resource = &rng_resources,
537};
538#endif
539
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700540#define MSM_VIDC_BASE_PHYS 0x04400000
541#define MSM_VIDC_BASE_SIZE 0x00100000
542
543static struct resource msm_device_vidc_resources[] = {
544 {
545 .start = MSM_VIDC_BASE_PHYS,
546 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
547 .flags = IORESOURCE_MEM,
548 },
549 {
550 .start = VCODEC_IRQ,
551 .end = VCODEC_IRQ,
552 .flags = IORESOURCE_IRQ,
553 },
554};
555
556struct msm_vidc_platform_data vidc_platform_data = {
557#ifdef CONFIG_MSM_BUS_SCALING
558 .vidc_bus_client_pdata = &vidc_bus_client_data,
559#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700560#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Deepak Kotur12301a72011-11-09 18:30:29 -0800561 .memtype = ION_HEAP_EBI_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700562 .enable_ion = 1,
563#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800564 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700565 .enable_ion = 0,
566#endif
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800567 .disable_dmx = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700568};
569
570struct platform_device msm_device_vidc = {
571 .name = "msm_vidc",
572 .id = 0,
573 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
574 .resource = msm_device_vidc_resources,
575 .dev = {
576 .platform_data = &vidc_platform_data,
577 },
578};
579
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700580#define MSM_SDC1_BASE 0x12400000
581#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
582#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
583#define MSM_SDC2_BASE 0x12140000
584#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
585#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
586#define MSM_SDC2_BASE 0x12140000
587#define MSM_SDC3_BASE 0x12180000
588#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
589#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
590#define MSM_SDC4_BASE 0x121C0000
591#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
592#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
593#define MSM_SDC5_BASE 0x12200000
594#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
595#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
596
597static struct resource resources_sdc1[] = {
598 {
599 .name = "core_mem",
600 .flags = IORESOURCE_MEM,
601 .start = MSM_SDC1_BASE,
602 .end = MSM_SDC1_DML_BASE - 1,
603 },
604 {
605 .name = "core_irq",
606 .flags = IORESOURCE_IRQ,
607 .start = SDC1_IRQ_0,
608 .end = SDC1_IRQ_0
609 },
610#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
611 {
612 .name = "sdcc_dml_addr",
613 .start = MSM_SDC1_DML_BASE,
614 .end = MSM_SDC1_BAM_BASE - 1,
615 .flags = IORESOURCE_MEM,
616 },
617 {
618 .name = "sdcc_bam_addr",
619 .start = MSM_SDC1_BAM_BASE,
620 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
621 .flags = IORESOURCE_MEM,
622 },
623 {
624 .name = "sdcc_bam_irq",
625 .start = SDC1_BAM_IRQ,
626 .end = SDC1_BAM_IRQ,
627 .flags = IORESOURCE_IRQ,
628 },
629#endif
630};
631
632static struct resource resources_sdc2[] = {
633 {
634 .name = "core_mem",
635 .flags = IORESOURCE_MEM,
636 .start = MSM_SDC2_BASE,
637 .end = MSM_SDC2_DML_BASE - 1,
638 },
639 {
640 .name = "core_irq",
641 .flags = IORESOURCE_IRQ,
642 .start = SDC2_IRQ_0,
643 .end = SDC2_IRQ_0
644 },
645#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
646 {
647 .name = "sdcc_dml_addr",
648 .start = MSM_SDC2_DML_BASE,
649 .end = MSM_SDC2_BAM_BASE - 1,
650 .flags = IORESOURCE_MEM,
651 },
652 {
653 .name = "sdcc_bam_addr",
654 .start = MSM_SDC2_BAM_BASE,
655 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
656 .flags = IORESOURCE_MEM,
657 },
658 {
659 .name = "sdcc_bam_irq",
660 .start = SDC2_BAM_IRQ,
661 .end = SDC2_BAM_IRQ,
662 .flags = IORESOURCE_IRQ,
663 },
664#endif
665};
666
667static struct resource resources_sdc3[] = {
668 {
669 .name = "core_mem",
670 .flags = IORESOURCE_MEM,
671 .start = MSM_SDC3_BASE,
672 .end = MSM_SDC3_DML_BASE - 1,
673 },
674 {
675 .name = "core_irq",
676 .flags = IORESOURCE_IRQ,
677 .start = SDC3_IRQ_0,
678 .end = SDC3_IRQ_0
679 },
680#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
681 {
682 .name = "sdcc_dml_addr",
683 .start = MSM_SDC3_DML_BASE,
684 .end = MSM_SDC3_BAM_BASE - 1,
685 .flags = IORESOURCE_MEM,
686 },
687 {
688 .name = "sdcc_bam_addr",
689 .start = MSM_SDC3_BAM_BASE,
690 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
691 .flags = IORESOURCE_MEM,
692 },
693 {
694 .name = "sdcc_bam_irq",
695 .start = SDC3_BAM_IRQ,
696 .end = SDC3_BAM_IRQ,
697 .flags = IORESOURCE_IRQ,
698 },
699#endif
700};
701
702static struct resource resources_sdc4[] = {
703 {
704 .name = "core_mem",
705 .flags = IORESOURCE_MEM,
706 .start = MSM_SDC4_BASE,
707 .end = MSM_SDC4_DML_BASE - 1,
708 },
709 {
710 .name = "core_irq",
711 .flags = IORESOURCE_IRQ,
712 .start = SDC4_IRQ_0,
713 .end = SDC4_IRQ_0
714 },
715#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
716 {
717 .name = "sdcc_dml_addr",
718 .start = MSM_SDC4_DML_BASE,
719 .end = MSM_SDC4_BAM_BASE - 1,
720 .flags = IORESOURCE_MEM,
721 },
722 {
723 .name = "sdcc_bam_addr",
724 .start = MSM_SDC4_BAM_BASE,
725 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
726 .flags = IORESOURCE_MEM,
727 },
728 {
729 .name = "sdcc_bam_irq",
730 .start = SDC4_BAM_IRQ,
731 .end = SDC4_BAM_IRQ,
732 .flags = IORESOURCE_IRQ,
733 },
734#endif
735};
736
737static struct resource resources_sdc5[] = {
738 {
739 .name = "core_mem",
740 .flags = IORESOURCE_MEM,
741 .start = MSM_SDC5_BASE,
742 .end = MSM_SDC5_DML_BASE - 1,
743 },
744 {
745 .name = "core_irq",
746 .flags = IORESOURCE_IRQ,
747 .start = SDC5_IRQ_0,
748 .end = SDC5_IRQ_0
749 },
750#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
751 {
752 .name = "sdcc_dml_addr",
753 .start = MSM_SDC5_DML_BASE,
754 .end = MSM_SDC5_BAM_BASE - 1,
755 .flags = IORESOURCE_MEM,
756 },
757 {
758 .name = "sdcc_bam_addr",
759 .start = MSM_SDC5_BAM_BASE,
760 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
761 .flags = IORESOURCE_MEM,
762 },
763 {
764 .name = "sdcc_bam_irq",
765 .start = SDC5_BAM_IRQ,
766 .end = SDC5_BAM_IRQ,
767 .flags = IORESOURCE_IRQ,
768 },
769#endif
770};
771
772struct platform_device msm_device_sdc1 = {
773 .name = "msm_sdcc",
774 .id = 1,
775 .num_resources = ARRAY_SIZE(resources_sdc1),
776 .resource = resources_sdc1,
777 .dev = {
778 .coherent_dma_mask = 0xffffffff,
779 },
780};
781
782struct platform_device msm_device_sdc2 = {
783 .name = "msm_sdcc",
784 .id = 2,
785 .num_resources = ARRAY_SIZE(resources_sdc2),
786 .resource = resources_sdc2,
787 .dev = {
788 .coherent_dma_mask = 0xffffffff,
789 },
790};
791
792struct platform_device msm_device_sdc3 = {
793 .name = "msm_sdcc",
794 .id = 3,
795 .num_resources = ARRAY_SIZE(resources_sdc3),
796 .resource = resources_sdc3,
797 .dev = {
798 .coherent_dma_mask = 0xffffffff,
799 },
800};
801
802struct platform_device msm_device_sdc4 = {
803 .name = "msm_sdcc",
804 .id = 4,
805 .num_resources = ARRAY_SIZE(resources_sdc4),
806 .resource = resources_sdc4,
807 .dev = {
808 .coherent_dma_mask = 0xffffffff,
809 },
810};
811
812struct platform_device msm_device_sdc5 = {
813 .name = "msm_sdcc",
814 .id = 5,
815 .num_resources = ARRAY_SIZE(resources_sdc5),
816 .resource = resources_sdc5,
817 .dev = {
818 .coherent_dma_mask = 0xffffffff,
819 },
820};
821
Stephen Boydeb819882011-08-29 14:46:30 -0700822#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
823#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
824
825static struct resource msm_8960_q6_lpass_resources[] = {
826 {
827 .start = MSM_LPASS_QDSP6SS_PHYS,
828 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
829 .flags = IORESOURCE_MEM,
830 },
831};
832
833static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
834 .strap_tcm_base = 0x01460000,
835 .strap_ahb_upper = 0x00290000,
836 .strap_ahb_lower = 0x00000280,
837 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
Matt Wagantall39088932011-08-02 20:24:56 -0700838 .xo_id = MSM_XO_PXO,
Stephen Boydeb819882011-08-29 14:46:30 -0700839 .name = "q6",
840 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700841 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700842};
843
844struct platform_device msm_8960_q6_lpass = {
845 .name = "pil_qdsp6v4",
846 .id = 0,
847 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
848 .resource = msm_8960_q6_lpass_resources,
849 .dev.platform_data = &msm_8960_q6_lpass_data,
850};
851
852#define MSM_MSS_ENABLE_PHYS 0x08B00000
853#define MSM_FW_QDSP6SS_PHYS 0x08800000
854#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
855#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
856
857static struct resource msm_8960_q6_mss_fw_resources[] = {
858 {
859 .start = MSM_FW_QDSP6SS_PHYS,
860 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
861 .flags = IORESOURCE_MEM,
862 },
863 {
864 .start = MSM_MSS_ENABLE_PHYS,
865 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
866 .flags = IORESOURCE_MEM,
867 },
868};
869
870static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
871 .strap_tcm_base = 0x00400000,
872 .strap_ahb_upper = 0x00090000,
873 .strap_ahb_lower = 0x00000080,
874 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
875 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
Matt Wagantall39088932011-08-02 20:24:56 -0700876 .xo_id = MSM_XO_TCXO_D0,
Stephen Boydeb819882011-08-29 14:46:30 -0700877 .name = "modem_fw",
878 .depends = "q6",
879 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700880 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700881};
882
883struct platform_device msm_8960_q6_mss_fw = {
884 .name = "pil_qdsp6v4",
885 .id = 1,
886 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
887 .resource = msm_8960_q6_mss_fw_resources,
888 .dev.platform_data = &msm_8960_q6_mss_fw_data,
889};
890
891#define MSM_SW_QDSP6SS_PHYS 0x08900000
892#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
893#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
894
895static struct resource msm_8960_q6_mss_sw_resources[] = {
896 {
897 .start = MSM_SW_QDSP6SS_PHYS,
898 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
899 .flags = IORESOURCE_MEM,
900 },
901 {
902 .start = MSM_MSS_ENABLE_PHYS,
903 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
904 .flags = IORESOURCE_MEM,
905 },
906};
907
908static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
909 .strap_tcm_base = 0x00420000,
910 .strap_ahb_upper = 0x00090000,
911 .strap_ahb_lower = 0x00000080,
912 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
913 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
Matt Wagantall39088932011-08-02 20:24:56 -0700914 .xo_id = MSM_XO_TCXO_D0,
Stephen Boydeb819882011-08-29 14:46:30 -0700915 .name = "modem",
916 .depends = "modem_fw",
917 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700918 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700919};
920
921struct platform_device msm_8960_q6_mss_sw = {
922 .name = "pil_qdsp6v4",
923 .id = 2,
924 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
925 .resource = msm_8960_q6_mss_sw_resources,
926 .dev.platform_data = &msm_8960_q6_mss_sw_data,
927};
928
Stephen Boyd322a9922011-09-20 01:05:54 -0700929static struct resource msm_8960_riva_resources[] = {
930 {
931 .start = 0x03204000,
932 .end = 0x03204000 + SZ_256 - 1,
933 .flags = IORESOURCE_MEM,
934 },
935};
936
937struct platform_device msm_8960_riva = {
938 .name = "pil_riva",
939 .id = -1,
940 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
941 .resource = msm_8960_riva_resources,
942};
943
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700944struct platform_device msm_device_smd = {
945 .name = "msm_smd",
946 .id = -1,
947};
948
949struct platform_device msm_device_bam_dmux = {
950 .name = "BAM_RMNT",
951 .id = -1,
952};
953
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700954static struct msm_watchdog_pdata msm_watchdog_pdata = {
955 .pet_time = 10000,
956 .bark_time = 11000,
957 .has_secure = true,
958};
959
960struct platform_device msm8960_device_watchdog = {
961 .name = "msm_watchdog",
962 .id = -1,
963 .dev = {
964 .platform_data = &msm_watchdog_pdata,
965 },
966};
967
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700968static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700969 {
970 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700971 .flags = IORESOURCE_IRQ,
972 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700973 {
974 .start = 0x18320000,
975 .end = 0x18320000 + SZ_1M - 1,
976 .flags = IORESOURCE_MEM,
977 },
978};
979
980static struct msm_dmov_pdata msm_dmov_pdata = {
981 .sd = 1,
982 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700983};
984
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700985struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700986 .name = "msm_dmov",
987 .id = -1,
988 .resource = msm_dmov_resource,
989 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700990 .dev = {
991 .platform_data = &msm_dmov_pdata,
992 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700993};
994
995static struct platform_device *msm_sdcc_devices[] __initdata = {
996 &msm_device_sdc1,
997 &msm_device_sdc2,
998 &msm_device_sdc3,
999 &msm_device_sdc4,
1000 &msm_device_sdc5,
1001};
1002
1003int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1004{
1005 struct platform_device *pdev;
1006
1007 if (controller < 1 || controller > 5)
1008 return -EINVAL;
1009
1010 pdev = msm_sdcc_devices[controller-1];
1011 pdev->dev.platform_data = plat;
1012 return platform_device_register(pdev);
1013}
1014
1015static struct resource resources_qup_i2c_gsbi4[] = {
1016 {
1017 .name = "gsbi_qup_i2c_addr",
1018 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001019 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001020 .flags = IORESOURCE_MEM,
1021 },
1022 {
1023 .name = "qup_phys_addr",
1024 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001025 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001026 .flags = IORESOURCE_MEM,
1027 },
1028 {
1029 .name = "qup_err_intr",
1030 .start = GSBI4_QUP_IRQ,
1031 .end = GSBI4_QUP_IRQ,
1032 .flags = IORESOURCE_IRQ,
1033 },
1034};
1035
1036struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1037 .name = "qup_i2c",
1038 .id = 4,
1039 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1040 .resource = resources_qup_i2c_gsbi4,
1041};
1042
1043static struct resource resources_qup_i2c_gsbi3[] = {
1044 {
1045 .name = "gsbi_qup_i2c_addr",
1046 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001047 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001048 .flags = IORESOURCE_MEM,
1049 },
1050 {
1051 .name = "qup_phys_addr",
1052 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001053 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001054 .flags = IORESOURCE_MEM,
1055 },
1056 {
1057 .name = "qup_err_intr",
1058 .start = GSBI3_QUP_IRQ,
1059 .end = GSBI3_QUP_IRQ,
1060 .flags = IORESOURCE_IRQ,
1061 },
1062};
1063
1064struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1065 .name = "qup_i2c",
1066 .id = 3,
1067 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1068 .resource = resources_qup_i2c_gsbi3,
1069};
1070
1071static struct resource resources_qup_i2c_gsbi10[] = {
1072 {
1073 .name = "gsbi_qup_i2c_addr",
1074 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001075 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001076 .flags = IORESOURCE_MEM,
1077 },
1078 {
1079 .name = "qup_phys_addr",
1080 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001081 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001082 .flags = IORESOURCE_MEM,
1083 },
1084 {
1085 .name = "qup_err_intr",
1086 .start = GSBI10_QUP_IRQ,
1087 .end = GSBI10_QUP_IRQ,
1088 .flags = IORESOURCE_IRQ,
1089 },
1090};
1091
1092struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1093 .name = "qup_i2c",
1094 .id = 10,
1095 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1096 .resource = resources_qup_i2c_gsbi10,
1097};
1098
1099static struct resource resources_qup_i2c_gsbi12[] = {
1100 {
1101 .name = "gsbi_qup_i2c_addr",
1102 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001103 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001104 .flags = IORESOURCE_MEM,
1105 },
1106 {
1107 .name = "qup_phys_addr",
1108 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001109 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001110 .flags = IORESOURCE_MEM,
1111 },
1112 {
1113 .name = "qup_err_intr",
1114 .start = GSBI12_QUP_IRQ,
1115 .end = GSBI12_QUP_IRQ,
1116 .flags = IORESOURCE_IRQ,
1117 },
1118};
1119
1120struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1121 .name = "qup_i2c",
1122 .id = 12,
1123 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1124 .resource = resources_qup_i2c_gsbi12,
1125};
1126
1127#ifdef CONFIG_MSM_CAMERA
1128struct resource msm_camera_resources[] = {
1129 {
Nishant Pandit24153d82011-08-27 16:05:13 +05301130 .name = "s3d_rw",
1131 .start = 0x008003E0,
1132 .end = 0x008003E0 + SZ_16 - 1,
1133 .flags = IORESOURCE_MEM,
1134 },
1135 {
1136 .name = "s3d_ctl",
1137 .start = 0x008020B8,
1138 .end = 0x008020B8 + SZ_16 - 1,
1139 .flags = IORESOURCE_MEM,
1140 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001141};
1142
1143int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1144{
1145 s_info->resource = msm_camera_resources;
1146 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1147 return 0;
1148}
Kevin Chanf6216f22011-10-25 18:40:11 -07001149
1150static struct resource msm_csiphy0_resources[] = {
1151 {
1152 .name = "csiphy",
1153 .start = 0x04800C00,
1154 .end = 0x04800C00 + SZ_1K - 1,
1155 .flags = IORESOURCE_MEM,
1156 },
1157 {
1158 .name = "csiphy",
1159 .start = CSIPHY_4LN_IRQ,
1160 .end = CSIPHY_4LN_IRQ,
1161 .flags = IORESOURCE_IRQ,
1162 },
1163};
1164
1165static struct resource msm_csiphy1_resources[] = {
1166 {
1167 .name = "csiphy",
1168 .start = 0x04801000,
1169 .end = 0x04801000 + SZ_1K - 1,
1170 .flags = IORESOURCE_MEM,
1171 },
1172 {
1173 .name = "csiphy",
1174 .start = MSM8960_CSIPHY_2LN_IRQ,
1175 .end = MSM8960_CSIPHY_2LN_IRQ,
1176 .flags = IORESOURCE_IRQ,
1177 },
1178};
1179
1180struct platform_device msm8960_device_csiphy0 = {
1181 .name = "msm_csiphy",
1182 .id = 0,
1183 .resource = msm_csiphy0_resources,
1184 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1185};
1186
1187struct platform_device msm8960_device_csiphy1 = {
1188 .name = "msm_csiphy",
1189 .id = 1,
1190 .resource = msm_csiphy1_resources,
1191 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1192};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001193
1194static struct resource msm_csid0_resources[] = {
1195 {
1196 .name = "csid",
1197 .start = 0x04800000,
1198 .end = 0x04800000 + SZ_1K - 1,
1199 .flags = IORESOURCE_MEM,
1200 },
1201 {
1202 .name = "csid",
1203 .start = CSI_0_IRQ,
1204 .end = CSI_0_IRQ,
1205 .flags = IORESOURCE_IRQ,
1206 },
1207};
1208
1209static struct resource msm_csid1_resources[] = {
1210 {
1211 .name = "csid",
1212 .start = 0x04800400,
1213 .end = 0x04800400 + SZ_1K - 1,
1214 .flags = IORESOURCE_MEM,
1215 },
1216 {
1217 .name = "csid",
1218 .start = CSI_1_IRQ,
1219 .end = CSI_1_IRQ,
1220 .flags = IORESOURCE_IRQ,
1221 },
1222};
1223
1224struct platform_device msm8960_device_csid0 = {
1225 .name = "msm_csid",
1226 .id = 0,
1227 .resource = msm_csid0_resources,
1228 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1229};
1230
1231struct platform_device msm8960_device_csid1 = {
1232 .name = "msm_csid",
1233 .id = 1,
1234 .resource = msm_csid1_resources,
1235 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1236};
Kevin Chane12c6672011-10-26 11:55:26 -07001237
1238struct resource msm_ispif_resources[] = {
1239 {
1240 .name = "ispif",
1241 .start = 0x04800800,
1242 .end = 0x04800800 + SZ_1K - 1,
1243 .flags = IORESOURCE_MEM,
1244 },
1245 {
1246 .name = "ispif",
1247 .start = ISPIF_IRQ,
1248 .end = ISPIF_IRQ,
1249 .flags = IORESOURCE_IRQ,
1250 },
1251};
1252
1253struct platform_device msm8960_device_ispif = {
1254 .name = "msm_ispif",
1255 .id = 0,
1256 .resource = msm_ispif_resources,
1257 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1258};
Kevin Chan5827c552011-10-28 18:36:32 -07001259
1260static struct resource msm_vfe_resources[] = {
1261 {
1262 .name = "vfe32",
1263 .start = 0x04500000,
1264 .end = 0x04500000 + SZ_1M - 1,
1265 .flags = IORESOURCE_MEM,
1266 },
1267 {
1268 .name = "vfe32",
1269 .start = VFE_IRQ,
1270 .end = VFE_IRQ,
1271 .flags = IORESOURCE_IRQ,
1272 },
1273};
1274
1275struct platform_device msm8960_device_vfe = {
1276 .name = "msm_vfe",
1277 .id = 0,
1278 .resource = msm_vfe_resources,
1279 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1280};
Kevin Chana0853122011-11-07 19:48:44 -08001281
1282static struct resource msm_vpe_resources[] = {
1283 {
1284 .name = "vpe",
1285 .start = 0x05300000,
1286 .end = 0x05300000 + SZ_1M - 1,
1287 .flags = IORESOURCE_MEM,
1288 },
1289 {
1290 .name = "vpe",
1291 .start = VPE_IRQ,
1292 .end = VPE_IRQ,
1293 .flags = IORESOURCE_IRQ,
1294 },
1295};
1296
1297struct platform_device msm8960_device_vpe = {
1298 .name = "msm_vpe",
1299 .id = 0,
1300 .resource = msm_vpe_resources,
1301 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1302};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001303#endif
1304
Jay Chokshi33c044a2011-12-07 13:05:40 -08001305static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001306 {
1307 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1308 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1309 .flags = IORESOURCE_MEM,
1310 },
1311};
1312
Jay Chokshi33c044a2011-12-07 13:05:40 -08001313struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001314 .name = "msm_ssbi",
1315 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001316 .resource = resources_ssbi_pmic,
1317 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001318};
1319
1320static struct resource resources_qup_spi_gsbi1[] = {
1321 {
1322 .name = "spi_base",
1323 .start = MSM_GSBI1_QUP_PHYS,
1324 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1325 .flags = IORESOURCE_MEM,
1326 },
1327 {
1328 .name = "gsbi_base",
1329 .start = MSM_GSBI1_PHYS,
1330 .end = MSM_GSBI1_PHYS + 4 - 1,
1331 .flags = IORESOURCE_MEM,
1332 },
1333 {
1334 .name = "spi_irq_in",
1335 .start = MSM8960_GSBI1_QUP_IRQ,
1336 .end = MSM8960_GSBI1_QUP_IRQ,
1337 .flags = IORESOURCE_IRQ,
1338 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001339 {
1340 .name = "spi_clk",
1341 .start = 9,
1342 .end = 9,
1343 .flags = IORESOURCE_IO,
1344 },
1345 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001346 .name = "spi_miso",
1347 .start = 7,
1348 .end = 7,
1349 .flags = IORESOURCE_IO,
1350 },
1351 {
1352 .name = "spi_mosi",
1353 .start = 6,
1354 .end = 6,
1355 .flags = IORESOURCE_IO,
1356 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001357 {
1358 .name = "spi_cs",
1359 .start = 8,
1360 .end = 8,
1361 .flags = IORESOURCE_IO,
1362 },
1363 {
1364 .name = "spi_cs1",
1365 .start = 14,
1366 .end = 14,
1367 .flags = IORESOURCE_IO,
1368 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001369};
1370
1371struct platform_device msm8960_device_qup_spi_gsbi1 = {
1372 .name = "spi_qsd",
1373 .id = 0,
1374 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1375 .resource = resources_qup_spi_gsbi1,
1376};
1377
1378struct platform_device msm_pcm = {
1379 .name = "msm-pcm-dsp",
1380 .id = -1,
1381};
1382
1383struct platform_device msm_pcm_routing = {
1384 .name = "msm-pcm-routing",
1385 .id = -1,
1386};
1387
1388struct platform_device msm_cpudai0 = {
1389 .name = "msm-dai-q6",
1390 .id = 0x4000,
1391};
1392
1393struct platform_device msm_cpudai1 = {
1394 .name = "msm-dai-q6",
1395 .id = 0x4001,
1396};
1397
1398struct platform_device msm_cpudai_hdmi_rx = {
1399 .name = "msm-dai-q6",
1400 .id = 8,
1401};
1402
1403struct platform_device msm_cpudai_bt_rx = {
1404 .name = "msm-dai-q6",
1405 .id = 0x3000,
1406};
1407
1408struct platform_device msm_cpudai_bt_tx = {
1409 .name = "msm-dai-q6",
1410 .id = 0x3001,
1411};
1412
1413struct platform_device msm_cpudai_fm_rx = {
1414 .name = "msm-dai-q6",
1415 .id = 0x3004,
1416};
1417
1418struct platform_device msm_cpudai_fm_tx = {
1419 .name = "msm-dai-q6",
1420 .id = 0x3005,
1421};
1422
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001423/*
1424 * Machine specific data for AUX PCM Interface
1425 * which the driver will be unware of.
1426 */
1427struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1428 .clk = "pcm_clk",
1429 .mode = AFE_PCM_CFG_MODE_PCM,
1430 .sync = AFE_PCM_CFG_SYNC_INT,
1431 .frame = AFE_PCM_CFG_FRM_256BPF,
1432 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1433 .slot = 0,
1434 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1435 .pcm_clk_rate = 2048000,
1436};
1437
1438struct platform_device msm_cpudai_auxpcm_rx = {
1439 .name = "msm-dai-q6",
1440 .id = 2,
1441 .dev = {
1442 .platform_data = &auxpcm_rx_pdata,
1443 },
1444};
1445
1446struct platform_device msm_cpudai_auxpcm_tx = {
1447 .name = "msm-dai-q6",
1448 .id = 3,
1449};
1450
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001451struct platform_device msm_cpu_fe = {
1452 .name = "msm-dai-fe",
1453 .id = -1,
1454};
1455
1456struct platform_device msm_stub_codec = {
1457 .name = "msm-stub-codec",
1458 .id = 1,
1459};
1460
1461struct platform_device msm_voice = {
1462 .name = "msm-pcm-voice",
1463 .id = -1,
1464};
1465
1466struct platform_device msm_voip = {
1467 .name = "msm-voip-dsp",
1468 .id = -1,
1469};
1470
1471struct platform_device msm_lpa_pcm = {
1472 .name = "msm-pcm-lpa",
1473 .id = -1,
1474};
1475
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301476struct platform_device msm_compr_dsp = {
1477 .name = "msm-compr-dsp",
1478 .id = -1,
1479};
1480
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001481struct platform_device msm_pcm_hostless = {
1482 .name = "msm-pcm-hostless",
1483 .id = -1,
1484};
1485
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301486struct platform_device msm_cpudai_afe_01_rx = {
1487 .name = "msm-dai-q6",
1488 .id = 0xE0,
1489};
1490
1491struct platform_device msm_cpudai_afe_01_tx = {
1492 .name = "msm-dai-q6",
1493 .id = 0xF0,
1494};
1495
1496struct platform_device msm_cpudai_afe_02_rx = {
1497 .name = "msm-dai-q6",
1498 .id = 0xF1,
1499};
1500
1501struct platform_device msm_cpudai_afe_02_tx = {
1502 .name = "msm-dai-q6",
1503 .id = 0xE1,
1504};
1505
1506struct platform_device msm_pcm_afe = {
1507 .name = "msm-pcm-afe",
1508 .id = -1,
1509};
1510
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001511struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001512 FS_8X60(FS_MDP, "fs_mdp"),
1513 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001514 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1515 FS_8X60(FS_VFE, "fs_vfe"),
1516 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001517 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1518 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1519 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001520 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001521};
1522unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1523
1524#ifdef CONFIG_MSM_ROTATOR
1525#define ROTATOR_HW_BASE 0x04E00000
1526static struct resource resources_msm_rotator[] = {
1527 {
1528 .start = ROTATOR_HW_BASE,
1529 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1530 .flags = IORESOURCE_MEM,
1531 },
1532 {
1533 .start = ROT_IRQ,
1534 .end = ROT_IRQ,
1535 .flags = IORESOURCE_IRQ,
1536 },
1537};
1538
1539static struct msm_rot_clocks rotator_clocks[] = {
1540 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001541 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001542 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001543 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001544 },
1545 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001546 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001547 .clk_type = ROTATOR_PCLK,
1548 .clk_rate = 0,
1549 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001550};
1551
1552static struct msm_rotator_platform_data rotator_pdata = {
1553 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1554 .hardware_version_number = 0x01020309,
1555 .rotator_clks = rotator_clocks,
1556 .regulator_name = "fs_rot",
1557};
1558
1559struct platform_device msm_rotator_device = {
1560 .name = "msm_rotator",
1561 .id = 0,
1562 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1563 .resource = resources_msm_rotator,
1564 .dev = {
1565 .platform_data = &rotator_pdata,
1566 },
1567};
1568#endif
1569
1570#define MIPI_DSI_HW_BASE 0x04700000
1571#define MDP_HW_BASE 0x05100000
1572
1573static struct resource msm_mipi_dsi1_resources[] = {
1574 {
1575 .name = "mipi_dsi",
1576 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001577 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001578 .flags = IORESOURCE_MEM,
1579 },
1580 {
1581 .start = DSI1_IRQ,
1582 .end = DSI1_IRQ,
1583 .flags = IORESOURCE_IRQ,
1584 },
1585};
1586
1587struct platform_device msm_mipi_dsi1_device = {
1588 .name = "mipi_dsi",
1589 .id = 1,
1590 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1591 .resource = msm_mipi_dsi1_resources,
1592};
1593
1594static struct resource msm_mdp_resources[] = {
1595 {
1596 .name = "mdp",
1597 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001598 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001599 .flags = IORESOURCE_MEM,
1600 },
1601 {
1602 .start = MDP_IRQ,
1603 .end = MDP_IRQ,
1604 .flags = IORESOURCE_IRQ,
1605 },
1606};
1607
1608static struct platform_device msm_mdp_device = {
1609 .name = "mdp",
1610 .id = 0,
1611 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1612 .resource = msm_mdp_resources,
1613};
1614
1615static void __init msm_register_device(struct platform_device *pdev, void *data)
1616{
1617 int ret;
1618
1619 pdev->dev.platform_data = data;
1620 ret = platform_device_register(pdev);
1621 if (ret)
1622 dev_err(&pdev->dev,
1623 "%s: platform_device_register() failed = %d\n",
1624 __func__, ret);
1625}
1626
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001627#ifdef CONFIG_MSM_BUS_SCALING
1628static struct platform_device msm_dtv_device = {
1629 .name = "dtv",
1630 .id = 0,
1631};
1632#endif
1633
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001634void __init msm_fb_register_device(char *name, void *data)
1635{
1636 if (!strncmp(name, "mdp", 3))
1637 msm_register_device(&msm_mdp_device, data);
1638 else if (!strncmp(name, "mipi_dsi", 8))
1639 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001640#ifdef CONFIG_MSM_BUS_SCALING
1641 else if (!strncmp(name, "dtv", 3))
1642 msm_register_device(&msm_dtv_device, data);
1643#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001644 else
1645 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1646}
1647
1648static struct resource resources_sps[] = {
1649 {
1650 .name = "pipe_mem",
1651 .start = 0x12800000,
1652 .end = 0x12800000 + 0x4000 - 1,
1653 .flags = IORESOURCE_MEM,
1654 },
1655 {
1656 .name = "bamdma_dma",
1657 .start = 0x12240000,
1658 .end = 0x12240000 + 0x1000 - 1,
1659 .flags = IORESOURCE_MEM,
1660 },
1661 {
1662 .name = "bamdma_bam",
1663 .start = 0x12244000,
1664 .end = 0x12244000 + 0x4000 - 1,
1665 .flags = IORESOURCE_MEM,
1666 },
1667 {
1668 .name = "bamdma_irq",
1669 .start = SPS_BAM_DMA_IRQ,
1670 .end = SPS_BAM_DMA_IRQ,
1671 .flags = IORESOURCE_IRQ,
1672 },
1673};
1674
1675struct msm_sps_platform_data msm_sps_pdata = {
1676 .bamdma_restricted_pipes = 0x06,
1677};
1678
1679struct platform_device msm_device_sps = {
1680 .name = "msm_sps",
1681 .id = -1,
1682 .num_resources = ARRAY_SIZE(resources_sps),
1683 .resource = resources_sps,
1684 .dev.platform_data = &msm_sps_pdata,
1685};
1686
1687#ifdef CONFIG_MSM_MPM
1688static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001689 [1] = MSM_GPIO_TO_INT(46),
1690 [2] = MSM_GPIO_TO_INT(150),
1691 [4] = MSM_GPIO_TO_INT(103),
1692 [5] = MSM_GPIO_TO_INT(104),
1693 [6] = MSM_GPIO_TO_INT(105),
1694 [7] = MSM_GPIO_TO_INT(106),
1695 [8] = MSM_GPIO_TO_INT(107),
1696 [9] = MSM_GPIO_TO_INT(7),
1697 [10] = MSM_GPIO_TO_INT(11),
1698 [11] = MSM_GPIO_TO_INT(15),
1699 [12] = MSM_GPIO_TO_INT(19),
1700 [13] = MSM_GPIO_TO_INT(23),
1701 [14] = MSM_GPIO_TO_INT(27),
1702 [15] = MSM_GPIO_TO_INT(31),
1703 [16] = MSM_GPIO_TO_INT(35),
1704 [19] = MSM_GPIO_TO_INT(90),
1705 [20] = MSM_GPIO_TO_INT(92),
1706 [23] = MSM_GPIO_TO_INT(85),
1707 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001708 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001709 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001710 [29] = MSM_GPIO_TO_INT(10),
1711 [30] = MSM_GPIO_TO_INT(102),
1712 [31] = MSM_GPIO_TO_INT(81),
1713 [32] = MSM_GPIO_TO_INT(78),
1714 [33] = MSM_GPIO_TO_INT(94),
1715 [34] = MSM_GPIO_TO_INT(72),
1716 [35] = MSM_GPIO_TO_INT(39),
1717 [36] = MSM_GPIO_TO_INT(43),
1718 [37] = MSM_GPIO_TO_INT(61),
1719 [38] = MSM_GPIO_TO_INT(50),
1720 [39] = MSM_GPIO_TO_INT(42),
1721 [41] = MSM_GPIO_TO_INT(62),
1722 [42] = MSM_GPIO_TO_INT(76),
1723 [43] = MSM_GPIO_TO_INT(75),
1724 [44] = MSM_GPIO_TO_INT(70),
1725 [45] = MSM_GPIO_TO_INT(69),
1726 [46] = MSM_GPIO_TO_INT(67),
1727 [47] = MSM_GPIO_TO_INT(65),
1728 [48] = MSM_GPIO_TO_INT(58),
1729 [49] = MSM_GPIO_TO_INT(54),
1730 [50] = MSM_GPIO_TO_INT(52),
1731 [51] = MSM_GPIO_TO_INT(49),
1732 [52] = MSM_GPIO_TO_INT(40),
1733 [53] = MSM_GPIO_TO_INT(37),
1734 [54] = MSM_GPIO_TO_INT(24),
1735 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001736};
1737
1738static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1739 TLMM_MSM_SUMMARY_IRQ,
1740 RPM_APCC_CPU0_GP_HIGH_IRQ,
1741 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1742 RPM_APCC_CPU0_GP_LOW_IRQ,
1743 RPM_APCC_CPU0_WAKE_UP_IRQ,
1744 RPM_APCC_CPU1_GP_HIGH_IRQ,
1745 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1746 RPM_APCC_CPU1_GP_LOW_IRQ,
1747 RPM_APCC_CPU1_WAKE_UP_IRQ,
1748 MSS_TO_APPS_IRQ_0,
1749 MSS_TO_APPS_IRQ_1,
1750 MSS_TO_APPS_IRQ_2,
1751 MSS_TO_APPS_IRQ_3,
1752 MSS_TO_APPS_IRQ_4,
1753 MSS_TO_APPS_IRQ_5,
1754 MSS_TO_APPS_IRQ_6,
1755 MSS_TO_APPS_IRQ_7,
1756 MSS_TO_APPS_IRQ_8,
1757 MSS_TO_APPS_IRQ_9,
1758 LPASS_SCSS_GP_LOW_IRQ,
1759 LPASS_SCSS_GP_MEDIUM_IRQ,
1760 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001761 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001762 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001763 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001764 RIVA_APPS_WLAN_SMSM_IRQ,
1765 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1766 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001767};
1768
1769struct msm_mpm_device_data msm_mpm_dev_data = {
1770 .irqs_m2a = msm_mpm_irqs_m2a,
1771 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1772 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1773 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1774 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1775 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1776 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1777 .mpm_apps_ipc_val = BIT(1),
1778 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1779
1780};
1781#endif
1782
Stephen Boydbb600ae2011-08-02 20:11:40 -07001783static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001784 CLK_DUMMY("pll2", PLL2, NULL, 0),
1785 CLK_DUMMY("pll8", PLL8, NULL, 0),
1786 CLK_DUMMY("pll4", PLL4, NULL, 0),
1787
1788 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1789 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1790 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1791 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1792 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1793 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1794 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1795 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1796 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1797 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1798 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1799 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1800 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1801 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1802 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1803 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1804
Matt Wagantalle2522372011-08-17 14:52:21 -07001805 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1806 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1807 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1808 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1809 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1810 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1811 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1812 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1813 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1814 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1815 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1816 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001817 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1818 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1819 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1820 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1821 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1822 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1823 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1824 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1825 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1826 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1827 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1828 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001829 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001830 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001831 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001832 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1833 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1834 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1835 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1836 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001837 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001838 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001839 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1840 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1841 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1842 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1843 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1844 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1845 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1846 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001847 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1848 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001849 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1850 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001851 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001852 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001853 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001854 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001855 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001856 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1857 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1858 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1859 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1860 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1861 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1862 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001863 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001864 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1865 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1866 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001867 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1868 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1869 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1870 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1871 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001872 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1873 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001874 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1875 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1876 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1877 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1878 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001879 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1880 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1881 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1882 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1883 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1884 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1885 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1886 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1887 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1888 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1889 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1890 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1891 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1892 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1893 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001894 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1895 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1896 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001897 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001898 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001899 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001900 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1901 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1902 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001903 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001904 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1905 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1906 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001907 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001908 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1909 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1910 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1911 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1912 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1913 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1914 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1915 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1916 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001917 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001918 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1919 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1920 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1921 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1922 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1923 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1924 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1925 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1926 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1927 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001928 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1929 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1930 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001931 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1932 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1933 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1934 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001935 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001936 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001937 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001938 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001939 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1940 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1941 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1942 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1943 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1944 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1945 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1946 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1947 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1948 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1949 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1950 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1951 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1952 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1953 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001954 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1955 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1956 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1957 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1958 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1959 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001960
1961 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1962 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001963 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1964 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1965 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1966 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1967 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001968 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1969 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1970};
1971
Stephen Boydbb600ae2011-08-02 20:11:40 -07001972struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1973 .table = msm_clocks_8960_dummy,
1974 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1975};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001976
1977#define LPASS_SLIMBUS_PHYS 0x28080000
1978#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001979#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001980/* Board info for the slimbus slave device */
1981static struct resource slimbus_res[] = {
1982 {
1983 .start = LPASS_SLIMBUS_PHYS,
1984 .end = LPASS_SLIMBUS_PHYS + 8191,
1985 .flags = IORESOURCE_MEM,
1986 .name = "slimbus_physical",
1987 },
1988 {
1989 .start = LPASS_SLIMBUS_BAM_PHYS,
1990 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1991 .flags = IORESOURCE_MEM,
1992 .name = "slimbus_bam_physical",
1993 },
1994 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001995 .start = LPASS_SLIMBUS_SLEW,
1996 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1997 .flags = IORESOURCE_MEM,
1998 .name = "slimbus_slew_reg",
1999 },
2000 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002001 .start = SLIMBUS0_CORE_EE1_IRQ,
2002 .end = SLIMBUS0_CORE_EE1_IRQ,
2003 .flags = IORESOURCE_IRQ,
2004 .name = "slimbus_irq",
2005 },
2006 {
2007 .start = SLIMBUS0_BAM_EE1_IRQ,
2008 .end = SLIMBUS0_BAM_EE1_IRQ,
2009 .flags = IORESOURCE_IRQ,
2010 .name = "slimbus_bam_irq",
2011 },
2012};
2013
2014struct platform_device msm_slim_ctrl = {
2015 .name = "msm_slim_ctrl",
2016 .id = 1,
2017 .num_resources = ARRAY_SIZE(slimbus_res),
2018 .resource = slimbus_res,
2019 .dev = {
2020 .coherent_dma_mask = 0xffffffffULL,
2021 },
2022};
2023
2024#ifdef CONFIG_MSM_BUS_SCALING
2025static struct msm_bus_vectors grp3d_init_vectors[] = {
2026 {
2027 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2028 .dst = MSM_BUS_SLAVE_EBI_CH0,
2029 .ab = 0,
2030 .ib = 0,
2031 },
2032};
2033
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002034static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002035 {
2036 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2037 .dst = MSM_BUS_SLAVE_EBI_CH0,
2038 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002039 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002040 },
2041};
2042
2043static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2044 {
2045 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2046 .dst = MSM_BUS_SLAVE_EBI_CH0,
2047 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002048 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002049 },
2050};
2051
2052static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2053 {
2054 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2055 .dst = MSM_BUS_SLAVE_EBI_CH0,
2056 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002057 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002058 },
2059};
2060
2061static struct msm_bus_vectors grp3d_max_vectors[] = {
2062 {
2063 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2064 .dst = MSM_BUS_SLAVE_EBI_CH0,
2065 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002066 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002067 },
2068};
2069
2070static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2071 {
2072 ARRAY_SIZE(grp3d_init_vectors),
2073 grp3d_init_vectors,
2074 },
2075 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002076 ARRAY_SIZE(grp3d_low_vectors),
2077 grp3d_low_vectors,
2078 },
2079 {
2080 ARRAY_SIZE(grp3d_nominal_low_vectors),
2081 grp3d_nominal_low_vectors,
2082 },
2083 {
2084 ARRAY_SIZE(grp3d_nominal_high_vectors),
2085 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002086 },
2087 {
2088 ARRAY_SIZE(grp3d_max_vectors),
2089 grp3d_max_vectors,
2090 },
2091};
2092
2093static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2094 grp3d_bus_scale_usecases,
2095 ARRAY_SIZE(grp3d_bus_scale_usecases),
2096 .name = "grp3d",
2097};
2098
2099static struct msm_bus_vectors grp2d0_init_vectors[] = {
2100 {
2101 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2102 .dst = MSM_BUS_SLAVE_EBI_CH0,
2103 .ab = 0,
2104 .ib = 0,
2105 },
2106};
2107
Lucille Sylvester808eca22011-11-03 10:26:29 -07002108static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002109 {
2110 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2111 .dst = MSM_BUS_SLAVE_EBI_CH0,
2112 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002113 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002114 },
2115};
2116
Lucille Sylvester808eca22011-11-03 10:26:29 -07002117static struct msm_bus_vectors grp2d0_max_vectors[] = {
2118 {
2119 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2120 .dst = MSM_BUS_SLAVE_EBI_CH0,
2121 .ab = 0,
2122 .ib = KGSL_CONVERT_TO_MBPS(2048),
2123 },
2124};
2125
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002126static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2127 {
2128 ARRAY_SIZE(grp2d0_init_vectors),
2129 grp2d0_init_vectors,
2130 },
2131 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002132 ARRAY_SIZE(grp2d0_nominal_vectors),
2133 grp2d0_nominal_vectors,
2134 },
2135 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002136 ARRAY_SIZE(grp2d0_max_vectors),
2137 grp2d0_max_vectors,
2138 },
2139};
2140
2141struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2142 grp2d0_bus_scale_usecases,
2143 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2144 .name = "grp2d0",
2145};
2146
2147static struct msm_bus_vectors grp2d1_init_vectors[] = {
2148 {
2149 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2150 .dst = MSM_BUS_SLAVE_EBI_CH0,
2151 .ab = 0,
2152 .ib = 0,
2153 },
2154};
2155
Lucille Sylvester808eca22011-11-03 10:26:29 -07002156static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002157 {
2158 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2159 .dst = MSM_BUS_SLAVE_EBI_CH0,
2160 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002161 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002162 },
2163};
2164
Lucille Sylvester808eca22011-11-03 10:26:29 -07002165static struct msm_bus_vectors grp2d1_max_vectors[] = {
2166 {
2167 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2168 .dst = MSM_BUS_SLAVE_EBI_CH0,
2169 .ab = 0,
2170 .ib = KGSL_CONVERT_TO_MBPS(2048),
2171 },
2172};
2173
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002174static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2175 {
2176 ARRAY_SIZE(grp2d1_init_vectors),
2177 grp2d1_init_vectors,
2178 },
2179 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002180 ARRAY_SIZE(grp2d1_nominal_vectors),
2181 grp2d1_nominal_vectors,
2182 },
2183 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002184 ARRAY_SIZE(grp2d1_max_vectors),
2185 grp2d1_max_vectors,
2186 },
2187};
2188
2189struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2190 grp2d1_bus_scale_usecases,
2191 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2192 .name = "grp2d1",
2193};
2194#endif
2195
2196static struct resource kgsl_3d0_resources[] = {
2197 {
2198 .name = KGSL_3D0_REG_MEMORY,
2199 .start = 0x04300000, /* GFX3D address */
2200 .end = 0x0431ffff,
2201 .flags = IORESOURCE_MEM,
2202 },
2203 {
2204 .name = KGSL_3D0_IRQ,
2205 .start = GFX3D_IRQ,
2206 .end = GFX3D_IRQ,
2207 .flags = IORESOURCE_IRQ,
2208 },
2209};
2210
2211static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002212 .pwrlevel = {
2213 {
2214 .gpu_freq = 400000000,
2215 .bus_freq = 4,
2216 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002217 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002218 {
2219 .gpu_freq = 300000000,
2220 .bus_freq = 3,
2221 .io_fraction = 33,
2222 },
2223 {
2224 .gpu_freq = 200000000,
2225 .bus_freq = 2,
2226 .io_fraction = 100,
2227 },
2228 {
2229 .gpu_freq = 128000000,
2230 .bus_freq = 1,
2231 .io_fraction = 100,
2232 },
2233 {
2234 .gpu_freq = 27000000,
2235 .bus_freq = 0,
2236 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002237 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002238 .init_level = 0,
2239 .num_levels = 5,
2240 .set_grp_async = NULL,
2241 .idle_timeout = HZ/5,
2242 .nap_allowed = true,
2243 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002244#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002245 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002246#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002247 .iommu_user_ctx_name = "gfx3d_user",
2248 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002249};
2250
2251struct platform_device msm_kgsl_3d0 = {
2252 .name = "kgsl-3d0",
2253 .id = 0,
2254 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2255 .resource = kgsl_3d0_resources,
2256 .dev = {
2257 .platform_data = &kgsl_3d0_pdata,
2258 },
2259};
2260
2261static struct resource kgsl_2d0_resources[] = {
2262 {
2263 .name = KGSL_2D0_REG_MEMORY,
2264 .start = 0x04100000, /* Z180 base address */
2265 .end = 0x04100FFF,
2266 .flags = IORESOURCE_MEM,
2267 },
2268 {
2269 .name = KGSL_2D0_IRQ,
2270 .start = GFX2D0_IRQ,
2271 .end = GFX2D0_IRQ,
2272 .flags = IORESOURCE_IRQ,
2273 },
2274};
2275
2276static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002277 .pwrlevel = {
2278 {
2279 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002280 .bus_freq = 2,
2281 },
2282 {
2283 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002284 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002285 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002286 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002287 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002288 .bus_freq = 0,
2289 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002290 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002291 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002292 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002293 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002294 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002295 .nap_allowed = true,
2296 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002297#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002298 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002299#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002300 .iommu_user_ctx_name = "gfx2d0_2d0",
2301 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002302};
2303
2304struct platform_device msm_kgsl_2d0 = {
2305 .name = "kgsl-2d0",
2306 .id = 0,
2307 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2308 .resource = kgsl_2d0_resources,
2309 .dev = {
2310 .platform_data = &kgsl_2d0_pdata,
2311 },
2312};
2313
2314static struct resource kgsl_2d1_resources[] = {
2315 {
2316 .name = KGSL_2D1_REG_MEMORY,
2317 .start = 0x04200000, /* Z180 device 1 base address */
2318 .end = 0x04200FFF,
2319 .flags = IORESOURCE_MEM,
2320 },
2321 {
2322 .name = KGSL_2D1_IRQ,
2323 .start = GFX2D1_IRQ,
2324 .end = GFX2D1_IRQ,
2325 .flags = IORESOURCE_IRQ,
2326 },
2327};
2328
2329static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002330 .pwrlevel = {
2331 {
2332 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002333 .bus_freq = 2,
2334 },
2335 {
2336 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002337 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002338 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002339 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002340 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002341 .bus_freq = 0,
2342 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002343 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002344 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002345 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002346 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002347 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002348 .nap_allowed = true,
2349 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002350#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002351 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002352#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002353 .iommu_user_ctx_name = "gfx2d1_2d1",
2354 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002355};
2356
2357struct platform_device msm_kgsl_2d1 = {
2358 .name = "kgsl-2d1",
2359 .id = 1,
2360 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2361 .resource = kgsl_2d1_resources,
2362 .dev = {
2363 .platform_data = &kgsl_2d1_pdata,
2364 },
2365};
2366
2367#ifdef CONFIG_MSM_GEMINI
2368static struct resource msm_gemini_resources[] = {
2369 {
2370 .start = 0x04600000,
2371 .end = 0x04600000 + SZ_1M - 1,
2372 .flags = IORESOURCE_MEM,
2373 },
2374 {
2375 .start = JPEG_IRQ,
2376 .end = JPEG_IRQ,
2377 .flags = IORESOURCE_IRQ,
2378 },
2379};
2380
2381struct platform_device msm8960_gemini_device = {
2382 .name = "msm_gemini",
2383 .resource = msm_gemini_resources,
2384 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2385};
2386#endif
2387
2388struct msm_rpm_map_data rpm_map_data[] __initdata = {
2389 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2390 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2391
2392 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2393
2394 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2395 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2396 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2397 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2398 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2399 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2400 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2401 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2402 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2403 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2404
2405 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2406 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2407 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2408 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2409
2410 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2411 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2412 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002413 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002414
2415 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2416 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2417 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2418 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2419
2420 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2421 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2422 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2423 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2424 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2425 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2426 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2427 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2428 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2429 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2430 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2431 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2432 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2433 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2434 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2435 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2436 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2437 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2438 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2439 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2440 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2441 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2442 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2443 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2444 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2445 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2446 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2447 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2448 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2449 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2450 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2451 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2452 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2453 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2454 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2455 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2456 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2457 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2458 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2459 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2460 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2461 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2462 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2463 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2464 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2465 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2466 MSM_RPM_MAP(NCP_0, NCP, 2),
2467 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2468 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2469 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002470 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002471
2472};
2473unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2474
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002475struct platform_device msm_rpm_device = {
2476 .name = "msm_rpm",
2477 .id = -1,
2478};
2479
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002480static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2481 .phys_addr_base = 0x0010D204,
2482 .phys_size = SZ_8K,
2483};
2484
2485struct platform_device msm_rpm_stat_device = {
2486 .name = "msm_rpm_stat",
2487 .id = -1,
2488 .dev = {
2489 .platform_data = &msm_rpm_stat_pdata,
2490 },
2491};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002492
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002493struct platform_device msm_bus_sys_fabric = {
2494 .name = "msm_bus_fabric",
2495 .id = MSM_BUS_FAB_SYSTEM,
2496};
2497struct platform_device msm_bus_apps_fabric = {
2498 .name = "msm_bus_fabric",
2499 .id = MSM_BUS_FAB_APPSS,
2500};
2501struct platform_device msm_bus_mm_fabric = {
2502 .name = "msm_bus_fabric",
2503 .id = MSM_BUS_FAB_MMSS,
2504};
2505struct platform_device msm_bus_sys_fpb = {
2506 .name = "msm_bus_fabric",
2507 .id = MSM_BUS_FAB_SYSTEM_FPB,
2508};
2509struct platform_device msm_bus_cpss_fpb = {
2510 .name = "msm_bus_fabric",
2511 .id = MSM_BUS_FAB_CPSS_FPB,
2512};
2513
2514/* Sensors DSPS platform data */
2515#ifdef CONFIG_MSM_DSPS
2516
2517#define PPSS_REG_PHYS_BASE 0x12080000
2518
2519static struct dsps_clk_info dsps_clks[] = {};
2520static struct dsps_regulator_info dsps_regs[] = {};
2521
2522/*
2523 * Note: GPIOs field is intialized in run-time at the function
2524 * msm8960_init_dsps().
2525 */
2526
2527struct msm_dsps_platform_data msm_dsps_pdata = {
2528 .clks = dsps_clks,
2529 .clks_num = ARRAY_SIZE(dsps_clks),
2530 .gpios = NULL,
2531 .gpios_num = 0,
2532 .regs = dsps_regs,
2533 .regs_num = ARRAY_SIZE(dsps_regs),
2534 .dsps_pwr_ctl_en = 1,
2535 .signature = DSPS_SIGNATURE,
2536};
2537
2538static struct resource msm_dsps_resources[] = {
2539 {
2540 .start = PPSS_REG_PHYS_BASE,
2541 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2542 .name = "ppss_reg",
2543 .flags = IORESOURCE_MEM,
2544 },
Wentao Xua55500b2011-08-16 18:15:04 -04002545
2546 {
2547 .start = PPSS_WDOG_TIMER_IRQ,
2548 .end = PPSS_WDOG_TIMER_IRQ,
2549 .name = "ppss_wdog",
2550 .flags = IORESOURCE_IRQ,
2551 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002552};
2553
2554struct platform_device msm_dsps_device = {
2555 .name = "msm_dsps",
2556 .id = 0,
2557 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2558 .resource = msm_dsps_resources,
2559 .dev.platform_data = &msm_dsps_pdata,
2560};
2561
2562#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002563
2564#ifdef CONFIG_MSM_QDSS
2565
2566#define MSM_QDSS_PHYS_BASE 0x01A00000
2567#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2568#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2569#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002570#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002571#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2572
2573static struct resource msm_etb_resources[] = {
2574 {
2575 .start = MSM_ETB_PHYS_BASE,
2576 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2577 .flags = IORESOURCE_MEM,
2578 },
2579};
2580
2581struct platform_device msm_etb_device = {
2582 .name = "msm_etb",
2583 .id = 0,
2584 .num_resources = ARRAY_SIZE(msm_etb_resources),
2585 .resource = msm_etb_resources,
2586};
2587
2588static struct resource msm_tpiu_resources[] = {
2589 {
2590 .start = MSM_TPIU_PHYS_BASE,
2591 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2592 .flags = IORESOURCE_MEM,
2593 },
2594};
2595
2596struct platform_device msm_tpiu_device = {
2597 .name = "msm_tpiu",
2598 .id = 0,
2599 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2600 .resource = msm_tpiu_resources,
2601};
2602
2603static struct resource msm_funnel_resources[] = {
2604 {
2605 .start = MSM_FUNNEL_PHYS_BASE,
2606 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2607 .flags = IORESOURCE_MEM,
2608 },
2609};
2610
2611struct platform_device msm_funnel_device = {
2612 .name = "msm_funnel",
2613 .id = 0,
2614 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2615 .resource = msm_funnel_resources,
2616};
2617
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002618static struct resource msm_debug_resources[] = {
2619 {
2620 .start = MSM_DEBUG_PHYS_BASE,
2621 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2622 .flags = IORESOURCE_MEM,
2623 },
2624 {
2625 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2626 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2627 .flags = IORESOURCE_MEM,
2628 },
2629};
2630
2631struct platform_device msm_debug_device = {
2632 .name = "msm_debug",
2633 .id = 0,
2634 .num_resources = ARRAY_SIZE(msm_debug_resources),
2635 .resource = msm_debug_resources,
2636};
2637
Pratik Patel7831c082011-06-08 21:44:37 -07002638static struct resource msm_ptm_resources[] = {
2639 {
2640 .start = MSM_PTM_PHYS_BASE,
2641 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2642 .flags = IORESOURCE_MEM,
2643 },
2644};
2645
2646struct platform_device msm_ptm_device = {
2647 .name = "msm_ptm",
2648 .id = 0,
2649 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2650 .resource = msm_ptm_resources,
2651};
2652
2653#endif