blob: e814b4ed287b0709359850f53b3d9f9fd15842b4 [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
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700567};
568
569struct platform_device msm_device_vidc = {
570 .name = "msm_vidc",
571 .id = 0,
572 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
573 .resource = msm_device_vidc_resources,
574 .dev = {
575 .platform_data = &vidc_platform_data,
576 },
577};
578
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700579#define MSM_SDC1_BASE 0x12400000
580#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
581#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
582#define MSM_SDC2_BASE 0x12140000
583#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
584#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
585#define MSM_SDC2_BASE 0x12140000
586#define MSM_SDC3_BASE 0x12180000
587#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
588#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
589#define MSM_SDC4_BASE 0x121C0000
590#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
591#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
592#define MSM_SDC5_BASE 0x12200000
593#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
594#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
595
596static struct resource resources_sdc1[] = {
597 {
598 .name = "core_mem",
599 .flags = IORESOURCE_MEM,
600 .start = MSM_SDC1_BASE,
601 .end = MSM_SDC1_DML_BASE - 1,
602 },
603 {
604 .name = "core_irq",
605 .flags = IORESOURCE_IRQ,
606 .start = SDC1_IRQ_0,
607 .end = SDC1_IRQ_0
608 },
609#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
610 {
611 .name = "sdcc_dml_addr",
612 .start = MSM_SDC1_DML_BASE,
613 .end = MSM_SDC1_BAM_BASE - 1,
614 .flags = IORESOURCE_MEM,
615 },
616 {
617 .name = "sdcc_bam_addr",
618 .start = MSM_SDC1_BAM_BASE,
619 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
620 .flags = IORESOURCE_MEM,
621 },
622 {
623 .name = "sdcc_bam_irq",
624 .start = SDC1_BAM_IRQ,
625 .end = SDC1_BAM_IRQ,
626 .flags = IORESOURCE_IRQ,
627 },
628#endif
629};
630
631static struct resource resources_sdc2[] = {
632 {
633 .name = "core_mem",
634 .flags = IORESOURCE_MEM,
635 .start = MSM_SDC2_BASE,
636 .end = MSM_SDC2_DML_BASE - 1,
637 },
638 {
639 .name = "core_irq",
640 .flags = IORESOURCE_IRQ,
641 .start = SDC2_IRQ_0,
642 .end = SDC2_IRQ_0
643 },
644#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
645 {
646 .name = "sdcc_dml_addr",
647 .start = MSM_SDC2_DML_BASE,
648 .end = MSM_SDC2_BAM_BASE - 1,
649 .flags = IORESOURCE_MEM,
650 },
651 {
652 .name = "sdcc_bam_addr",
653 .start = MSM_SDC2_BAM_BASE,
654 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
655 .flags = IORESOURCE_MEM,
656 },
657 {
658 .name = "sdcc_bam_irq",
659 .start = SDC2_BAM_IRQ,
660 .end = SDC2_BAM_IRQ,
661 .flags = IORESOURCE_IRQ,
662 },
663#endif
664};
665
666static struct resource resources_sdc3[] = {
667 {
668 .name = "core_mem",
669 .flags = IORESOURCE_MEM,
670 .start = MSM_SDC3_BASE,
671 .end = MSM_SDC3_DML_BASE - 1,
672 },
673 {
674 .name = "core_irq",
675 .flags = IORESOURCE_IRQ,
676 .start = SDC3_IRQ_0,
677 .end = SDC3_IRQ_0
678 },
679#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
680 {
681 .name = "sdcc_dml_addr",
682 .start = MSM_SDC3_DML_BASE,
683 .end = MSM_SDC3_BAM_BASE - 1,
684 .flags = IORESOURCE_MEM,
685 },
686 {
687 .name = "sdcc_bam_addr",
688 .start = MSM_SDC3_BAM_BASE,
689 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
690 .flags = IORESOURCE_MEM,
691 },
692 {
693 .name = "sdcc_bam_irq",
694 .start = SDC3_BAM_IRQ,
695 .end = SDC3_BAM_IRQ,
696 .flags = IORESOURCE_IRQ,
697 },
698#endif
699};
700
701static struct resource resources_sdc4[] = {
702 {
703 .name = "core_mem",
704 .flags = IORESOURCE_MEM,
705 .start = MSM_SDC4_BASE,
706 .end = MSM_SDC4_DML_BASE - 1,
707 },
708 {
709 .name = "core_irq",
710 .flags = IORESOURCE_IRQ,
711 .start = SDC4_IRQ_0,
712 .end = SDC4_IRQ_0
713 },
714#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
715 {
716 .name = "sdcc_dml_addr",
717 .start = MSM_SDC4_DML_BASE,
718 .end = MSM_SDC4_BAM_BASE - 1,
719 .flags = IORESOURCE_MEM,
720 },
721 {
722 .name = "sdcc_bam_addr",
723 .start = MSM_SDC4_BAM_BASE,
724 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
725 .flags = IORESOURCE_MEM,
726 },
727 {
728 .name = "sdcc_bam_irq",
729 .start = SDC4_BAM_IRQ,
730 .end = SDC4_BAM_IRQ,
731 .flags = IORESOURCE_IRQ,
732 },
733#endif
734};
735
736static struct resource resources_sdc5[] = {
737 {
738 .name = "core_mem",
739 .flags = IORESOURCE_MEM,
740 .start = MSM_SDC5_BASE,
741 .end = MSM_SDC5_DML_BASE - 1,
742 },
743 {
744 .name = "core_irq",
745 .flags = IORESOURCE_IRQ,
746 .start = SDC5_IRQ_0,
747 .end = SDC5_IRQ_0
748 },
749#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
750 {
751 .name = "sdcc_dml_addr",
752 .start = MSM_SDC5_DML_BASE,
753 .end = MSM_SDC5_BAM_BASE - 1,
754 .flags = IORESOURCE_MEM,
755 },
756 {
757 .name = "sdcc_bam_addr",
758 .start = MSM_SDC5_BAM_BASE,
759 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
760 .flags = IORESOURCE_MEM,
761 },
762 {
763 .name = "sdcc_bam_irq",
764 .start = SDC5_BAM_IRQ,
765 .end = SDC5_BAM_IRQ,
766 .flags = IORESOURCE_IRQ,
767 },
768#endif
769};
770
771struct platform_device msm_device_sdc1 = {
772 .name = "msm_sdcc",
773 .id = 1,
774 .num_resources = ARRAY_SIZE(resources_sdc1),
775 .resource = resources_sdc1,
776 .dev = {
777 .coherent_dma_mask = 0xffffffff,
778 },
779};
780
781struct platform_device msm_device_sdc2 = {
782 .name = "msm_sdcc",
783 .id = 2,
784 .num_resources = ARRAY_SIZE(resources_sdc2),
785 .resource = resources_sdc2,
786 .dev = {
787 .coherent_dma_mask = 0xffffffff,
788 },
789};
790
791struct platform_device msm_device_sdc3 = {
792 .name = "msm_sdcc",
793 .id = 3,
794 .num_resources = ARRAY_SIZE(resources_sdc3),
795 .resource = resources_sdc3,
796 .dev = {
797 .coherent_dma_mask = 0xffffffff,
798 },
799};
800
801struct platform_device msm_device_sdc4 = {
802 .name = "msm_sdcc",
803 .id = 4,
804 .num_resources = ARRAY_SIZE(resources_sdc4),
805 .resource = resources_sdc4,
806 .dev = {
807 .coherent_dma_mask = 0xffffffff,
808 },
809};
810
811struct platform_device msm_device_sdc5 = {
812 .name = "msm_sdcc",
813 .id = 5,
814 .num_resources = ARRAY_SIZE(resources_sdc5),
815 .resource = resources_sdc5,
816 .dev = {
817 .coherent_dma_mask = 0xffffffff,
818 },
819};
820
Stephen Boydeb819882011-08-29 14:46:30 -0700821#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
822#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
823
824static struct resource msm_8960_q6_lpass_resources[] = {
825 {
826 .start = MSM_LPASS_QDSP6SS_PHYS,
827 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
828 .flags = IORESOURCE_MEM,
829 },
830};
831
832static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
833 .strap_tcm_base = 0x01460000,
834 .strap_ahb_upper = 0x00290000,
835 .strap_ahb_lower = 0x00000280,
836 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
Matt Wagantall39088932011-08-02 20:24:56 -0700837 .xo_id = MSM_XO_PXO,
Stephen Boydeb819882011-08-29 14:46:30 -0700838 .name = "q6",
839 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700840 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700841};
842
843struct platform_device msm_8960_q6_lpass = {
844 .name = "pil_qdsp6v4",
845 .id = 0,
846 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
847 .resource = msm_8960_q6_lpass_resources,
848 .dev.platform_data = &msm_8960_q6_lpass_data,
849};
850
851#define MSM_MSS_ENABLE_PHYS 0x08B00000
852#define MSM_FW_QDSP6SS_PHYS 0x08800000
853#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
854#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
855
856static struct resource msm_8960_q6_mss_fw_resources[] = {
857 {
858 .start = MSM_FW_QDSP6SS_PHYS,
859 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
860 .flags = IORESOURCE_MEM,
861 },
862 {
863 .start = MSM_MSS_ENABLE_PHYS,
864 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
865 .flags = IORESOURCE_MEM,
866 },
867};
868
869static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
870 .strap_tcm_base = 0x00400000,
871 .strap_ahb_upper = 0x00090000,
872 .strap_ahb_lower = 0x00000080,
873 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
874 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
Matt Wagantall39088932011-08-02 20:24:56 -0700875 .xo_id = MSM_XO_TCXO_D0,
Stephen Boydeb819882011-08-29 14:46:30 -0700876 .name = "modem_fw",
877 .depends = "q6",
878 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700879 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700880};
881
882struct platform_device msm_8960_q6_mss_fw = {
883 .name = "pil_qdsp6v4",
884 .id = 1,
885 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
886 .resource = msm_8960_q6_mss_fw_resources,
887 .dev.platform_data = &msm_8960_q6_mss_fw_data,
888};
889
890#define MSM_SW_QDSP6SS_PHYS 0x08900000
891#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
892#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
893
894static struct resource msm_8960_q6_mss_sw_resources[] = {
895 {
896 .start = MSM_SW_QDSP6SS_PHYS,
897 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
898 .flags = IORESOURCE_MEM,
899 },
900 {
901 .start = MSM_MSS_ENABLE_PHYS,
902 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
903 .flags = IORESOURCE_MEM,
904 },
905};
906
907static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
908 .strap_tcm_base = 0x00420000,
909 .strap_ahb_upper = 0x00090000,
910 .strap_ahb_lower = 0x00000080,
911 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
912 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
Matt Wagantall39088932011-08-02 20:24:56 -0700913 .xo_id = MSM_XO_TCXO_D0,
Stephen Boydeb819882011-08-29 14:46:30 -0700914 .name = "modem",
915 .depends = "modem_fw",
916 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700917 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700918};
919
920struct platform_device msm_8960_q6_mss_sw = {
921 .name = "pil_qdsp6v4",
922 .id = 2,
923 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
924 .resource = msm_8960_q6_mss_sw_resources,
925 .dev.platform_data = &msm_8960_q6_mss_sw_data,
926};
927
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700928struct platform_device msm_device_smd = {
929 .name = "msm_smd",
930 .id = -1,
931};
932
933struct platform_device msm_device_bam_dmux = {
934 .name = "BAM_RMNT",
935 .id = -1,
936};
937
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700938static struct msm_watchdog_pdata msm_watchdog_pdata = {
939 .pet_time = 10000,
940 .bark_time = 11000,
941 .has_secure = true,
942};
943
944struct platform_device msm8960_device_watchdog = {
945 .name = "msm_watchdog",
946 .id = -1,
947 .dev = {
948 .platform_data = &msm_watchdog_pdata,
949 },
950};
951
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700952static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700953 {
954 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700955 .flags = IORESOURCE_IRQ,
956 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700957 {
958 .start = 0x18320000,
959 .end = 0x18320000 + SZ_1M - 1,
960 .flags = IORESOURCE_MEM,
961 },
962};
963
964static struct msm_dmov_pdata msm_dmov_pdata = {
965 .sd = 1,
966 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700967};
968
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700969struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700970 .name = "msm_dmov",
971 .id = -1,
972 .resource = msm_dmov_resource,
973 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700974 .dev = {
975 .platform_data = &msm_dmov_pdata,
976 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700977};
978
979static struct platform_device *msm_sdcc_devices[] __initdata = {
980 &msm_device_sdc1,
981 &msm_device_sdc2,
982 &msm_device_sdc3,
983 &msm_device_sdc4,
984 &msm_device_sdc5,
985};
986
987int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
988{
989 struct platform_device *pdev;
990
991 if (controller < 1 || controller > 5)
992 return -EINVAL;
993
994 pdev = msm_sdcc_devices[controller-1];
995 pdev->dev.platform_data = plat;
996 return platform_device_register(pdev);
997}
998
999static struct resource resources_qup_i2c_gsbi4[] = {
1000 {
1001 .name = "gsbi_qup_i2c_addr",
1002 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001003 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001004 .flags = IORESOURCE_MEM,
1005 },
1006 {
1007 .name = "qup_phys_addr",
1008 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001009 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001010 .flags = IORESOURCE_MEM,
1011 },
1012 {
1013 .name = "qup_err_intr",
1014 .start = GSBI4_QUP_IRQ,
1015 .end = GSBI4_QUP_IRQ,
1016 .flags = IORESOURCE_IRQ,
1017 },
1018};
1019
1020struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1021 .name = "qup_i2c",
1022 .id = 4,
1023 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1024 .resource = resources_qup_i2c_gsbi4,
1025};
1026
1027static struct resource resources_qup_i2c_gsbi3[] = {
1028 {
1029 .name = "gsbi_qup_i2c_addr",
1030 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001031 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001032 .flags = IORESOURCE_MEM,
1033 },
1034 {
1035 .name = "qup_phys_addr",
1036 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001037 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001038 .flags = IORESOURCE_MEM,
1039 },
1040 {
1041 .name = "qup_err_intr",
1042 .start = GSBI3_QUP_IRQ,
1043 .end = GSBI3_QUP_IRQ,
1044 .flags = IORESOURCE_IRQ,
1045 },
1046};
1047
1048struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1049 .name = "qup_i2c",
1050 .id = 3,
1051 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1052 .resource = resources_qup_i2c_gsbi3,
1053};
1054
1055static struct resource resources_qup_i2c_gsbi10[] = {
1056 {
1057 .name = "gsbi_qup_i2c_addr",
1058 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001059 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001060 .flags = IORESOURCE_MEM,
1061 },
1062 {
1063 .name = "qup_phys_addr",
1064 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001065 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001066 .flags = IORESOURCE_MEM,
1067 },
1068 {
1069 .name = "qup_err_intr",
1070 .start = GSBI10_QUP_IRQ,
1071 .end = GSBI10_QUP_IRQ,
1072 .flags = IORESOURCE_IRQ,
1073 },
1074};
1075
1076struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1077 .name = "qup_i2c",
1078 .id = 10,
1079 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1080 .resource = resources_qup_i2c_gsbi10,
1081};
1082
1083static struct resource resources_qup_i2c_gsbi12[] = {
1084 {
1085 .name = "gsbi_qup_i2c_addr",
1086 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001087 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001088 .flags = IORESOURCE_MEM,
1089 },
1090 {
1091 .name = "qup_phys_addr",
1092 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001093 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001094 .flags = IORESOURCE_MEM,
1095 },
1096 {
1097 .name = "qup_err_intr",
1098 .start = GSBI12_QUP_IRQ,
1099 .end = GSBI12_QUP_IRQ,
1100 .flags = IORESOURCE_IRQ,
1101 },
1102};
1103
1104struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1105 .name = "qup_i2c",
1106 .id = 12,
1107 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1108 .resource = resources_qup_i2c_gsbi12,
1109};
1110
1111#ifdef CONFIG_MSM_CAMERA
1112struct resource msm_camera_resources[] = {
1113 {
Nishant Pandit24153d82011-08-27 16:05:13 +05301114 .name = "s3d_rw",
1115 .start = 0x008003E0,
1116 .end = 0x008003E0 + SZ_16 - 1,
1117 .flags = IORESOURCE_MEM,
1118 },
1119 {
1120 .name = "s3d_ctl",
1121 .start = 0x008020B8,
1122 .end = 0x008020B8 + SZ_16 - 1,
1123 .flags = IORESOURCE_MEM,
1124 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001125};
1126
1127int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1128{
1129 s_info->resource = msm_camera_resources;
1130 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1131 return 0;
1132}
Kevin Chanf6216f22011-10-25 18:40:11 -07001133
1134static struct resource msm_csiphy0_resources[] = {
1135 {
1136 .name = "csiphy",
1137 .start = 0x04800C00,
1138 .end = 0x04800C00 + SZ_1K - 1,
1139 .flags = IORESOURCE_MEM,
1140 },
1141 {
1142 .name = "csiphy",
1143 .start = CSIPHY_4LN_IRQ,
1144 .end = CSIPHY_4LN_IRQ,
1145 .flags = IORESOURCE_IRQ,
1146 },
1147};
1148
1149static struct resource msm_csiphy1_resources[] = {
1150 {
1151 .name = "csiphy",
1152 .start = 0x04801000,
1153 .end = 0x04801000 + SZ_1K - 1,
1154 .flags = IORESOURCE_MEM,
1155 },
1156 {
1157 .name = "csiphy",
1158 .start = MSM8960_CSIPHY_2LN_IRQ,
1159 .end = MSM8960_CSIPHY_2LN_IRQ,
1160 .flags = IORESOURCE_IRQ,
1161 },
1162};
1163
1164struct platform_device msm8960_device_csiphy0 = {
1165 .name = "msm_csiphy",
1166 .id = 0,
1167 .resource = msm_csiphy0_resources,
1168 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1169};
1170
1171struct platform_device msm8960_device_csiphy1 = {
1172 .name = "msm_csiphy",
1173 .id = 1,
1174 .resource = msm_csiphy1_resources,
1175 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1176};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001177
1178static struct resource msm_csid0_resources[] = {
1179 {
1180 .name = "csid",
1181 .start = 0x04800000,
1182 .end = 0x04800000 + SZ_1K - 1,
1183 .flags = IORESOURCE_MEM,
1184 },
1185 {
1186 .name = "csid",
1187 .start = CSI_0_IRQ,
1188 .end = CSI_0_IRQ,
1189 .flags = IORESOURCE_IRQ,
1190 },
1191};
1192
1193static struct resource msm_csid1_resources[] = {
1194 {
1195 .name = "csid",
1196 .start = 0x04800400,
1197 .end = 0x04800400 + SZ_1K - 1,
1198 .flags = IORESOURCE_MEM,
1199 },
1200 {
1201 .name = "csid",
1202 .start = CSI_1_IRQ,
1203 .end = CSI_1_IRQ,
1204 .flags = IORESOURCE_IRQ,
1205 },
1206};
1207
1208struct platform_device msm8960_device_csid0 = {
1209 .name = "msm_csid",
1210 .id = 0,
1211 .resource = msm_csid0_resources,
1212 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1213};
1214
1215struct platform_device msm8960_device_csid1 = {
1216 .name = "msm_csid",
1217 .id = 1,
1218 .resource = msm_csid1_resources,
1219 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1220};
Kevin Chane12c6672011-10-26 11:55:26 -07001221
1222struct resource msm_ispif_resources[] = {
1223 {
1224 .name = "ispif",
1225 .start = 0x04800800,
1226 .end = 0x04800800 + SZ_1K - 1,
1227 .flags = IORESOURCE_MEM,
1228 },
1229 {
1230 .name = "ispif",
1231 .start = ISPIF_IRQ,
1232 .end = ISPIF_IRQ,
1233 .flags = IORESOURCE_IRQ,
1234 },
1235};
1236
1237struct platform_device msm8960_device_ispif = {
1238 .name = "msm_ispif",
1239 .id = 0,
1240 .resource = msm_ispif_resources,
1241 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1242};
Kevin Chan5827c552011-10-28 18:36:32 -07001243
1244static struct resource msm_vfe_resources[] = {
1245 {
1246 .name = "vfe32",
1247 .start = 0x04500000,
1248 .end = 0x04500000 + SZ_1M - 1,
1249 .flags = IORESOURCE_MEM,
1250 },
1251 {
1252 .name = "vfe32",
1253 .start = VFE_IRQ,
1254 .end = VFE_IRQ,
1255 .flags = IORESOURCE_IRQ,
1256 },
1257};
1258
1259struct platform_device msm8960_device_vfe = {
1260 .name = "msm_vfe",
1261 .id = 0,
1262 .resource = msm_vfe_resources,
1263 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1264};
Kevin Chana0853122011-11-07 19:48:44 -08001265
1266static struct resource msm_vpe_resources[] = {
1267 {
1268 .name = "vpe",
1269 .start = 0x05300000,
1270 .end = 0x05300000 + SZ_1M - 1,
1271 .flags = IORESOURCE_MEM,
1272 },
1273 {
1274 .name = "vpe",
1275 .start = VPE_IRQ,
1276 .end = VPE_IRQ,
1277 .flags = IORESOURCE_IRQ,
1278 },
1279};
1280
1281struct platform_device msm8960_device_vpe = {
1282 .name = "msm_vpe",
1283 .id = 0,
1284 .resource = msm_vpe_resources,
1285 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1286};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001287#endif
1288
1289static struct resource resources_ssbi_pm8921[] = {
1290 {
1291 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1292 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1293 .flags = IORESOURCE_MEM,
1294 },
1295};
1296
1297struct platform_device msm8960_device_ssbi_pm8921 = {
1298 .name = "msm_ssbi",
1299 .id = 0,
1300 .resource = resources_ssbi_pm8921,
1301 .num_resources = ARRAY_SIZE(resources_ssbi_pm8921),
1302};
1303
1304static struct resource resources_qup_spi_gsbi1[] = {
1305 {
1306 .name = "spi_base",
1307 .start = MSM_GSBI1_QUP_PHYS,
1308 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1309 .flags = IORESOURCE_MEM,
1310 },
1311 {
1312 .name = "gsbi_base",
1313 .start = MSM_GSBI1_PHYS,
1314 .end = MSM_GSBI1_PHYS + 4 - 1,
1315 .flags = IORESOURCE_MEM,
1316 },
1317 {
1318 .name = "spi_irq_in",
1319 .start = MSM8960_GSBI1_QUP_IRQ,
1320 .end = MSM8960_GSBI1_QUP_IRQ,
1321 .flags = IORESOURCE_IRQ,
1322 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001323 {
1324 .name = "spi_clk",
1325 .start = 9,
1326 .end = 9,
1327 .flags = IORESOURCE_IO,
1328 },
1329 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001330 .name = "spi_miso",
1331 .start = 7,
1332 .end = 7,
1333 .flags = IORESOURCE_IO,
1334 },
1335 {
1336 .name = "spi_mosi",
1337 .start = 6,
1338 .end = 6,
1339 .flags = IORESOURCE_IO,
1340 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001341 {
1342 .name = "spi_cs",
1343 .start = 8,
1344 .end = 8,
1345 .flags = IORESOURCE_IO,
1346 },
1347 {
1348 .name = "spi_cs1",
1349 .start = 14,
1350 .end = 14,
1351 .flags = IORESOURCE_IO,
1352 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001353};
1354
1355struct platform_device msm8960_device_qup_spi_gsbi1 = {
1356 .name = "spi_qsd",
1357 .id = 0,
1358 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1359 .resource = resources_qup_spi_gsbi1,
1360};
1361
1362struct platform_device msm_pcm = {
1363 .name = "msm-pcm-dsp",
1364 .id = -1,
1365};
1366
1367struct platform_device msm_pcm_routing = {
1368 .name = "msm-pcm-routing",
1369 .id = -1,
1370};
1371
1372struct platform_device msm_cpudai0 = {
1373 .name = "msm-dai-q6",
1374 .id = 0x4000,
1375};
1376
1377struct platform_device msm_cpudai1 = {
1378 .name = "msm-dai-q6",
1379 .id = 0x4001,
1380};
1381
1382struct platform_device msm_cpudai_hdmi_rx = {
1383 .name = "msm-dai-q6",
1384 .id = 8,
1385};
1386
1387struct platform_device msm_cpudai_bt_rx = {
1388 .name = "msm-dai-q6",
1389 .id = 0x3000,
1390};
1391
1392struct platform_device msm_cpudai_bt_tx = {
1393 .name = "msm-dai-q6",
1394 .id = 0x3001,
1395};
1396
1397struct platform_device msm_cpudai_fm_rx = {
1398 .name = "msm-dai-q6",
1399 .id = 0x3004,
1400};
1401
1402struct platform_device msm_cpudai_fm_tx = {
1403 .name = "msm-dai-q6",
1404 .id = 0x3005,
1405};
1406
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001407/*
1408 * Machine specific data for AUX PCM Interface
1409 * which the driver will be unware of.
1410 */
1411struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1412 .clk = "pcm_clk",
1413 .mode = AFE_PCM_CFG_MODE_PCM,
1414 .sync = AFE_PCM_CFG_SYNC_INT,
1415 .frame = AFE_PCM_CFG_FRM_256BPF,
1416 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1417 .slot = 0,
1418 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1419 .pcm_clk_rate = 2048000,
1420};
1421
1422struct platform_device msm_cpudai_auxpcm_rx = {
1423 .name = "msm-dai-q6",
1424 .id = 2,
1425 .dev = {
1426 .platform_data = &auxpcm_rx_pdata,
1427 },
1428};
1429
1430struct platform_device msm_cpudai_auxpcm_tx = {
1431 .name = "msm-dai-q6",
1432 .id = 3,
1433};
1434
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001435struct platform_device msm_cpu_fe = {
1436 .name = "msm-dai-fe",
1437 .id = -1,
1438};
1439
1440struct platform_device msm_stub_codec = {
1441 .name = "msm-stub-codec",
1442 .id = 1,
1443};
1444
1445struct platform_device msm_voice = {
1446 .name = "msm-pcm-voice",
1447 .id = -1,
1448};
1449
1450struct platform_device msm_voip = {
1451 .name = "msm-voip-dsp",
1452 .id = -1,
1453};
1454
1455struct platform_device msm_lpa_pcm = {
1456 .name = "msm-pcm-lpa",
1457 .id = -1,
1458};
1459
1460struct platform_device msm_pcm_hostless = {
1461 .name = "msm-pcm-hostless",
1462 .id = -1,
1463};
1464
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301465struct platform_device msm_cpudai_afe_01_rx = {
1466 .name = "msm-dai-q6",
1467 .id = 0xE0,
1468};
1469
1470struct platform_device msm_cpudai_afe_01_tx = {
1471 .name = "msm-dai-q6",
1472 .id = 0xF0,
1473};
1474
1475struct platform_device msm_cpudai_afe_02_rx = {
1476 .name = "msm-dai-q6",
1477 .id = 0xF1,
1478};
1479
1480struct platform_device msm_cpudai_afe_02_tx = {
1481 .name = "msm-dai-q6",
1482 .id = 0xE1,
1483};
1484
1485struct platform_device msm_pcm_afe = {
1486 .name = "msm-pcm-afe",
1487 .id = -1,
1488};
1489
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001490struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001491 FS_8X60(FS_MDP, "fs_mdp"),
1492 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001493 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1494 FS_8X60(FS_VFE, "fs_vfe"),
1495 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001496 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1497 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1498 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001499 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001500};
1501unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1502
1503#ifdef CONFIG_MSM_ROTATOR
1504#define ROTATOR_HW_BASE 0x04E00000
1505static struct resource resources_msm_rotator[] = {
1506 {
1507 .start = ROTATOR_HW_BASE,
1508 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1509 .flags = IORESOURCE_MEM,
1510 },
1511 {
1512 .start = ROT_IRQ,
1513 .end = ROT_IRQ,
1514 .flags = IORESOURCE_IRQ,
1515 },
1516};
1517
1518static struct msm_rot_clocks rotator_clocks[] = {
1519 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001520 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001521 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001522 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001523 },
1524 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001525 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001526 .clk_type = ROTATOR_PCLK,
1527 .clk_rate = 0,
1528 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001529};
1530
1531static struct msm_rotator_platform_data rotator_pdata = {
1532 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1533 .hardware_version_number = 0x01020309,
1534 .rotator_clks = rotator_clocks,
1535 .regulator_name = "fs_rot",
1536};
1537
1538struct platform_device msm_rotator_device = {
1539 .name = "msm_rotator",
1540 .id = 0,
1541 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1542 .resource = resources_msm_rotator,
1543 .dev = {
1544 .platform_data = &rotator_pdata,
1545 },
1546};
1547#endif
1548
1549#define MIPI_DSI_HW_BASE 0x04700000
1550#define MDP_HW_BASE 0x05100000
1551
1552static struct resource msm_mipi_dsi1_resources[] = {
1553 {
1554 .name = "mipi_dsi",
1555 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001556 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001557 .flags = IORESOURCE_MEM,
1558 },
1559 {
1560 .start = DSI1_IRQ,
1561 .end = DSI1_IRQ,
1562 .flags = IORESOURCE_IRQ,
1563 },
1564};
1565
1566struct platform_device msm_mipi_dsi1_device = {
1567 .name = "mipi_dsi",
1568 .id = 1,
1569 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1570 .resource = msm_mipi_dsi1_resources,
1571};
1572
1573static struct resource msm_mdp_resources[] = {
1574 {
1575 .name = "mdp",
1576 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001577 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001578 .flags = IORESOURCE_MEM,
1579 },
1580 {
1581 .start = MDP_IRQ,
1582 .end = MDP_IRQ,
1583 .flags = IORESOURCE_IRQ,
1584 },
1585};
1586
1587static struct platform_device msm_mdp_device = {
1588 .name = "mdp",
1589 .id = 0,
1590 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1591 .resource = msm_mdp_resources,
1592};
1593
1594static void __init msm_register_device(struct platform_device *pdev, void *data)
1595{
1596 int ret;
1597
1598 pdev->dev.platform_data = data;
1599 ret = platform_device_register(pdev);
1600 if (ret)
1601 dev_err(&pdev->dev,
1602 "%s: platform_device_register() failed = %d\n",
1603 __func__, ret);
1604}
1605
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001606#ifdef CONFIG_MSM_BUS_SCALING
1607static struct platform_device msm_dtv_device = {
1608 .name = "dtv",
1609 .id = 0,
1610};
1611#endif
1612
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001613void __init msm_fb_register_device(char *name, void *data)
1614{
1615 if (!strncmp(name, "mdp", 3))
1616 msm_register_device(&msm_mdp_device, data);
1617 else if (!strncmp(name, "mipi_dsi", 8))
1618 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001619#ifdef CONFIG_MSM_BUS_SCALING
1620 else if (!strncmp(name, "dtv", 3))
1621 msm_register_device(&msm_dtv_device, data);
1622#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001623 else
1624 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1625}
1626
1627static struct resource resources_sps[] = {
1628 {
1629 .name = "pipe_mem",
1630 .start = 0x12800000,
1631 .end = 0x12800000 + 0x4000 - 1,
1632 .flags = IORESOURCE_MEM,
1633 },
1634 {
1635 .name = "bamdma_dma",
1636 .start = 0x12240000,
1637 .end = 0x12240000 + 0x1000 - 1,
1638 .flags = IORESOURCE_MEM,
1639 },
1640 {
1641 .name = "bamdma_bam",
1642 .start = 0x12244000,
1643 .end = 0x12244000 + 0x4000 - 1,
1644 .flags = IORESOURCE_MEM,
1645 },
1646 {
1647 .name = "bamdma_irq",
1648 .start = SPS_BAM_DMA_IRQ,
1649 .end = SPS_BAM_DMA_IRQ,
1650 .flags = IORESOURCE_IRQ,
1651 },
1652};
1653
1654struct msm_sps_platform_data msm_sps_pdata = {
1655 .bamdma_restricted_pipes = 0x06,
1656};
1657
1658struct platform_device msm_device_sps = {
1659 .name = "msm_sps",
1660 .id = -1,
1661 .num_resources = ARRAY_SIZE(resources_sps),
1662 .resource = resources_sps,
1663 .dev.platform_data = &msm_sps_pdata,
1664};
1665
1666#ifdef CONFIG_MSM_MPM
1667static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001668 [1] = MSM_GPIO_TO_INT(46),
1669 [2] = MSM_GPIO_TO_INT(150),
1670 [4] = MSM_GPIO_TO_INT(103),
1671 [5] = MSM_GPIO_TO_INT(104),
1672 [6] = MSM_GPIO_TO_INT(105),
1673 [7] = MSM_GPIO_TO_INT(106),
1674 [8] = MSM_GPIO_TO_INT(107),
1675 [9] = MSM_GPIO_TO_INT(7),
1676 [10] = MSM_GPIO_TO_INT(11),
1677 [11] = MSM_GPIO_TO_INT(15),
1678 [12] = MSM_GPIO_TO_INT(19),
1679 [13] = MSM_GPIO_TO_INT(23),
1680 [14] = MSM_GPIO_TO_INT(27),
1681 [15] = MSM_GPIO_TO_INT(31),
1682 [16] = MSM_GPIO_TO_INT(35),
1683 [19] = MSM_GPIO_TO_INT(90),
1684 [20] = MSM_GPIO_TO_INT(92),
1685 [23] = MSM_GPIO_TO_INT(85),
1686 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001687 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001688 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001689 [29] = MSM_GPIO_TO_INT(10),
1690 [30] = MSM_GPIO_TO_INT(102),
1691 [31] = MSM_GPIO_TO_INT(81),
1692 [32] = MSM_GPIO_TO_INT(78),
1693 [33] = MSM_GPIO_TO_INT(94),
1694 [34] = MSM_GPIO_TO_INT(72),
1695 [35] = MSM_GPIO_TO_INT(39),
1696 [36] = MSM_GPIO_TO_INT(43),
1697 [37] = MSM_GPIO_TO_INT(61),
1698 [38] = MSM_GPIO_TO_INT(50),
1699 [39] = MSM_GPIO_TO_INT(42),
1700 [41] = MSM_GPIO_TO_INT(62),
1701 [42] = MSM_GPIO_TO_INT(76),
1702 [43] = MSM_GPIO_TO_INT(75),
1703 [44] = MSM_GPIO_TO_INT(70),
1704 [45] = MSM_GPIO_TO_INT(69),
1705 [46] = MSM_GPIO_TO_INT(67),
1706 [47] = MSM_GPIO_TO_INT(65),
1707 [48] = MSM_GPIO_TO_INT(58),
1708 [49] = MSM_GPIO_TO_INT(54),
1709 [50] = MSM_GPIO_TO_INT(52),
1710 [51] = MSM_GPIO_TO_INT(49),
1711 [52] = MSM_GPIO_TO_INT(40),
1712 [53] = MSM_GPIO_TO_INT(37),
1713 [54] = MSM_GPIO_TO_INT(24),
1714 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001715};
1716
1717static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1718 TLMM_MSM_SUMMARY_IRQ,
1719 RPM_APCC_CPU0_GP_HIGH_IRQ,
1720 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1721 RPM_APCC_CPU0_GP_LOW_IRQ,
1722 RPM_APCC_CPU0_WAKE_UP_IRQ,
1723 RPM_APCC_CPU1_GP_HIGH_IRQ,
1724 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1725 RPM_APCC_CPU1_GP_LOW_IRQ,
1726 RPM_APCC_CPU1_WAKE_UP_IRQ,
1727 MSS_TO_APPS_IRQ_0,
1728 MSS_TO_APPS_IRQ_1,
1729 MSS_TO_APPS_IRQ_2,
1730 MSS_TO_APPS_IRQ_3,
1731 MSS_TO_APPS_IRQ_4,
1732 MSS_TO_APPS_IRQ_5,
1733 MSS_TO_APPS_IRQ_6,
1734 MSS_TO_APPS_IRQ_7,
1735 MSS_TO_APPS_IRQ_8,
1736 MSS_TO_APPS_IRQ_9,
1737 LPASS_SCSS_GP_LOW_IRQ,
1738 LPASS_SCSS_GP_MEDIUM_IRQ,
1739 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001740 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001741 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001742 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001743 RIVA_APPS_WLAN_SMSM_IRQ,
1744 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1745 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001746};
1747
1748struct msm_mpm_device_data msm_mpm_dev_data = {
1749 .irqs_m2a = msm_mpm_irqs_m2a,
1750 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1751 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1752 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1753 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1754 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1755 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1756 .mpm_apps_ipc_val = BIT(1),
1757 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1758
1759};
1760#endif
1761
Stephen Boydbb600ae2011-08-02 20:11:40 -07001762static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001763 CLK_DUMMY("pll2", PLL2, NULL, 0),
1764 CLK_DUMMY("pll8", PLL8, NULL, 0),
1765 CLK_DUMMY("pll4", PLL4, NULL, 0),
1766
1767 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1768 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1769 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1770 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1771 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1772 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1773 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1774 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1775 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1776 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1777 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1778 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1779 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1780 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1781 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1782 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1783
Matt Wagantalle2522372011-08-17 14:52:21 -07001784 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1785 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1786 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1787 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1788 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1789 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1790 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1791 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1792 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1793 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1794 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1795 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001796 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1797 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1798 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1799 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1800 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1801 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1802 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1803 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1804 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1805 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1806 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1807 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001808 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001809 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001810 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001811 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1812 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1813 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1814 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1815 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001816 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001817 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001818 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1819 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1820 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1821 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1822 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1823 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1824 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1825 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001826 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1827 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001828 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1829 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001830 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001831 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001832 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001833 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001834 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001835 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1836 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1837 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1838 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1839 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1840 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1841 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001842 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001843 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1844 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1845 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001846 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1847 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1848 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1849 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1850 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001851 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1852 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001853 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1854 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1855 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1856 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1857 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001858 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1859 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1860 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1861 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1862 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1863 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1864 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1865 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1866 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1867 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1868 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1869 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1870 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1871 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1872 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001873 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1874 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1875 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001876 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001877 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001878 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001879 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1880 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1881 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001882 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001883 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1884 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1885 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001886 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001887 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1888 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1889 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1890 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1891 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1892 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1893 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1894 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1895 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001896 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001897 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1898 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1899 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1900 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1901 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1902 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1903 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1904 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1905 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1906 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001907 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1908 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1909 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001910 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1911 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1912 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1913 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001914 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001915 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001916 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001917 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001918 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1919 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1920 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1921 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1922 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1923 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1924 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1925 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1926 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1927 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1928 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1929 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1930 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1931 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1932 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001933 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1934 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1935 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1936 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1937 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1938 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001939
1940 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1941 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001942 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1943 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1944 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1945 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1946 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001947 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1948 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1949};
1950
Stephen Boydbb600ae2011-08-02 20:11:40 -07001951struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1952 .table = msm_clocks_8960_dummy,
1953 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1954};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001955
1956#define LPASS_SLIMBUS_PHYS 0x28080000
1957#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001958#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001959/* Board info for the slimbus slave device */
1960static struct resource slimbus_res[] = {
1961 {
1962 .start = LPASS_SLIMBUS_PHYS,
1963 .end = LPASS_SLIMBUS_PHYS + 8191,
1964 .flags = IORESOURCE_MEM,
1965 .name = "slimbus_physical",
1966 },
1967 {
1968 .start = LPASS_SLIMBUS_BAM_PHYS,
1969 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1970 .flags = IORESOURCE_MEM,
1971 .name = "slimbus_bam_physical",
1972 },
1973 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001974 .start = LPASS_SLIMBUS_SLEW,
1975 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1976 .flags = IORESOURCE_MEM,
1977 .name = "slimbus_slew_reg",
1978 },
1979 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001980 .start = SLIMBUS0_CORE_EE1_IRQ,
1981 .end = SLIMBUS0_CORE_EE1_IRQ,
1982 .flags = IORESOURCE_IRQ,
1983 .name = "slimbus_irq",
1984 },
1985 {
1986 .start = SLIMBUS0_BAM_EE1_IRQ,
1987 .end = SLIMBUS0_BAM_EE1_IRQ,
1988 .flags = IORESOURCE_IRQ,
1989 .name = "slimbus_bam_irq",
1990 },
1991};
1992
1993struct platform_device msm_slim_ctrl = {
1994 .name = "msm_slim_ctrl",
1995 .id = 1,
1996 .num_resources = ARRAY_SIZE(slimbus_res),
1997 .resource = slimbus_res,
1998 .dev = {
1999 .coherent_dma_mask = 0xffffffffULL,
2000 },
2001};
2002
2003#ifdef CONFIG_MSM_BUS_SCALING
2004static struct msm_bus_vectors grp3d_init_vectors[] = {
2005 {
2006 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2007 .dst = MSM_BUS_SLAVE_EBI_CH0,
2008 .ab = 0,
2009 .ib = 0,
2010 },
2011};
2012
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002013static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002014 {
2015 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2016 .dst = MSM_BUS_SLAVE_EBI_CH0,
2017 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002018 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002019 },
2020};
2021
2022static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2023 {
2024 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2025 .dst = MSM_BUS_SLAVE_EBI_CH0,
2026 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002027 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002028 },
2029};
2030
2031static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2032 {
2033 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2034 .dst = MSM_BUS_SLAVE_EBI_CH0,
2035 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002036 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002037 },
2038};
2039
2040static struct msm_bus_vectors grp3d_max_vectors[] = {
2041 {
2042 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2043 .dst = MSM_BUS_SLAVE_EBI_CH0,
2044 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002045 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002046 },
2047};
2048
2049static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2050 {
2051 ARRAY_SIZE(grp3d_init_vectors),
2052 grp3d_init_vectors,
2053 },
2054 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002055 ARRAY_SIZE(grp3d_low_vectors),
2056 grp3d_low_vectors,
2057 },
2058 {
2059 ARRAY_SIZE(grp3d_nominal_low_vectors),
2060 grp3d_nominal_low_vectors,
2061 },
2062 {
2063 ARRAY_SIZE(grp3d_nominal_high_vectors),
2064 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002065 },
2066 {
2067 ARRAY_SIZE(grp3d_max_vectors),
2068 grp3d_max_vectors,
2069 },
2070};
2071
2072static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2073 grp3d_bus_scale_usecases,
2074 ARRAY_SIZE(grp3d_bus_scale_usecases),
2075 .name = "grp3d",
2076};
2077
2078static struct msm_bus_vectors grp2d0_init_vectors[] = {
2079 {
2080 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2081 .dst = MSM_BUS_SLAVE_EBI_CH0,
2082 .ab = 0,
2083 .ib = 0,
2084 },
2085};
2086
2087static struct msm_bus_vectors grp2d0_max_vectors[] = {
2088 {
2089 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2090 .dst = MSM_BUS_SLAVE_EBI_CH0,
2091 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002092 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002093 },
2094};
2095
2096static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2097 {
2098 ARRAY_SIZE(grp2d0_init_vectors),
2099 grp2d0_init_vectors,
2100 },
2101 {
2102 ARRAY_SIZE(grp2d0_max_vectors),
2103 grp2d0_max_vectors,
2104 },
2105};
2106
2107struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2108 grp2d0_bus_scale_usecases,
2109 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2110 .name = "grp2d0",
2111};
2112
2113static struct msm_bus_vectors grp2d1_init_vectors[] = {
2114 {
2115 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2116 .dst = MSM_BUS_SLAVE_EBI_CH0,
2117 .ab = 0,
2118 .ib = 0,
2119 },
2120};
2121
2122static struct msm_bus_vectors grp2d1_max_vectors[] = {
2123 {
2124 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2125 .dst = MSM_BUS_SLAVE_EBI_CH0,
2126 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002127 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002128 },
2129};
2130
2131static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2132 {
2133 ARRAY_SIZE(grp2d1_init_vectors),
2134 grp2d1_init_vectors,
2135 },
2136 {
2137 ARRAY_SIZE(grp2d1_max_vectors),
2138 grp2d1_max_vectors,
2139 },
2140};
2141
2142struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2143 grp2d1_bus_scale_usecases,
2144 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2145 .name = "grp2d1",
2146};
2147#endif
2148
2149static struct resource kgsl_3d0_resources[] = {
2150 {
2151 .name = KGSL_3D0_REG_MEMORY,
2152 .start = 0x04300000, /* GFX3D address */
2153 .end = 0x0431ffff,
2154 .flags = IORESOURCE_MEM,
2155 },
2156 {
2157 .name = KGSL_3D0_IRQ,
2158 .start = GFX3D_IRQ,
2159 .end = GFX3D_IRQ,
2160 .flags = IORESOURCE_IRQ,
2161 },
2162};
2163
2164static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002165 .pwrlevel = {
2166 {
2167 .gpu_freq = 400000000,
2168 .bus_freq = 4,
2169 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002170 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002171 {
2172 .gpu_freq = 300000000,
2173 .bus_freq = 3,
2174 .io_fraction = 33,
2175 },
2176 {
2177 .gpu_freq = 200000000,
2178 .bus_freq = 2,
2179 .io_fraction = 100,
2180 },
2181 {
2182 .gpu_freq = 128000000,
2183 .bus_freq = 1,
2184 .io_fraction = 100,
2185 },
2186 {
2187 .gpu_freq = 27000000,
2188 .bus_freq = 0,
2189 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002190 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002191 .init_level = 0,
2192 .num_levels = 5,
2193 .set_grp_async = NULL,
2194 .idle_timeout = HZ/5,
2195 .nap_allowed = true,
2196 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002197#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002198 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002199#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002200 .iommu_user_ctx_name = "gfx3d_user",
2201 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002202};
2203
2204struct platform_device msm_kgsl_3d0 = {
2205 .name = "kgsl-3d0",
2206 .id = 0,
2207 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2208 .resource = kgsl_3d0_resources,
2209 .dev = {
2210 .platform_data = &kgsl_3d0_pdata,
2211 },
2212};
2213
2214static struct resource kgsl_2d0_resources[] = {
2215 {
2216 .name = KGSL_2D0_REG_MEMORY,
2217 .start = 0x04100000, /* Z180 base address */
2218 .end = 0x04100FFF,
2219 .flags = IORESOURCE_MEM,
2220 },
2221 {
2222 .name = KGSL_2D0_IRQ,
2223 .start = GFX2D0_IRQ,
2224 .end = GFX2D0_IRQ,
2225 .flags = IORESOURCE_IRQ,
2226 },
2227};
2228
2229static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002230 .pwrlevel = {
2231 {
2232 .gpu_freq = 200000000,
2233 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002234 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002235 {
2236 .gpu_freq = 200000000,
2237 .bus_freq = 0,
2238 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002239 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002240 .init_level = 0,
2241 .num_levels = 2,
2242 .set_grp_async = NULL,
2243 .idle_timeout = HZ/10,
2244 .nap_allowed = true,
2245 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002246#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002247 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002248#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002249 .iommu_user_ctx_name = "gfx2d0_2d0",
2250 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002251};
2252
2253struct platform_device msm_kgsl_2d0 = {
2254 .name = "kgsl-2d0",
2255 .id = 0,
2256 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2257 .resource = kgsl_2d0_resources,
2258 .dev = {
2259 .platform_data = &kgsl_2d0_pdata,
2260 },
2261};
2262
2263static struct resource kgsl_2d1_resources[] = {
2264 {
2265 .name = KGSL_2D1_REG_MEMORY,
2266 .start = 0x04200000, /* Z180 device 1 base address */
2267 .end = 0x04200FFF,
2268 .flags = IORESOURCE_MEM,
2269 },
2270 {
2271 .name = KGSL_2D1_IRQ,
2272 .start = GFX2D1_IRQ,
2273 .end = GFX2D1_IRQ,
2274 .flags = IORESOURCE_IRQ,
2275 },
2276};
2277
2278static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002279 .pwrlevel = {
2280 {
2281 .gpu_freq = 200000000,
2282 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002283 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002284 {
2285 .gpu_freq = 200000000,
2286 .bus_freq = 0,
2287 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002288 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002289 .init_level = 0,
2290 .num_levels = 2,
2291 .set_grp_async = NULL,
2292 .idle_timeout = HZ/10,
2293 .nap_allowed = true,
2294 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002295#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002296 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002297#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002298 .iommu_user_ctx_name = "gfx2d1_2d1",
2299 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002300};
2301
2302struct platform_device msm_kgsl_2d1 = {
2303 .name = "kgsl-2d1",
2304 .id = 1,
2305 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2306 .resource = kgsl_2d1_resources,
2307 .dev = {
2308 .platform_data = &kgsl_2d1_pdata,
2309 },
2310};
2311
2312#ifdef CONFIG_MSM_GEMINI
2313static struct resource msm_gemini_resources[] = {
2314 {
2315 .start = 0x04600000,
2316 .end = 0x04600000 + SZ_1M - 1,
2317 .flags = IORESOURCE_MEM,
2318 },
2319 {
2320 .start = JPEG_IRQ,
2321 .end = JPEG_IRQ,
2322 .flags = IORESOURCE_IRQ,
2323 },
2324};
2325
2326struct platform_device msm8960_gemini_device = {
2327 .name = "msm_gemini",
2328 .resource = msm_gemini_resources,
2329 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2330};
2331#endif
2332
2333struct msm_rpm_map_data rpm_map_data[] __initdata = {
2334 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2335 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2336
2337 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2338
2339 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2340 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2341 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2342 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2343 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2344 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2345 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2346 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2347 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2348 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2349
2350 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2351 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2352 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2353 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2354
2355 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2356 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2357 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002358 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002359
2360 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2361 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2362 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2363 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2364
2365 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2366 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2367 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2368 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2369 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2370 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2371 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2372 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2373 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2374 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2375 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2376 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2377 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2378 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2379 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2380 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2381 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2382 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2383 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2384 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2385 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2386 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2387 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2388 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2389 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2390 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2391 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2392 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2393 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2394 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2395 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2396 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2397 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2398 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2399 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2400 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2401 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2402 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2403 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2404 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2405 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2406 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2407 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2408 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2409 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2410 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2411 MSM_RPM_MAP(NCP_0, NCP, 2),
2412 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2413 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2414 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002415 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002416
2417};
2418unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2419
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002420struct platform_device msm_rpm_device = {
2421 .name = "msm_rpm",
2422 .id = -1,
2423};
2424
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002425static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2426 .phys_addr_base = 0x0010D204,
2427 .phys_size = SZ_8K,
2428};
2429
2430struct platform_device msm_rpm_stat_device = {
2431 .name = "msm_rpm_stat",
2432 .id = -1,
2433 .dev = {
2434 .platform_data = &msm_rpm_stat_pdata,
2435 },
2436};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002437
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002438struct platform_device msm_bus_sys_fabric = {
2439 .name = "msm_bus_fabric",
2440 .id = MSM_BUS_FAB_SYSTEM,
2441};
2442struct platform_device msm_bus_apps_fabric = {
2443 .name = "msm_bus_fabric",
2444 .id = MSM_BUS_FAB_APPSS,
2445};
2446struct platform_device msm_bus_mm_fabric = {
2447 .name = "msm_bus_fabric",
2448 .id = MSM_BUS_FAB_MMSS,
2449};
2450struct platform_device msm_bus_sys_fpb = {
2451 .name = "msm_bus_fabric",
2452 .id = MSM_BUS_FAB_SYSTEM_FPB,
2453};
2454struct platform_device msm_bus_cpss_fpb = {
2455 .name = "msm_bus_fabric",
2456 .id = MSM_BUS_FAB_CPSS_FPB,
2457};
2458
2459/* Sensors DSPS platform data */
2460#ifdef CONFIG_MSM_DSPS
2461
2462#define PPSS_REG_PHYS_BASE 0x12080000
2463
2464static struct dsps_clk_info dsps_clks[] = {};
2465static struct dsps_regulator_info dsps_regs[] = {};
2466
2467/*
2468 * Note: GPIOs field is intialized in run-time at the function
2469 * msm8960_init_dsps().
2470 */
2471
2472struct msm_dsps_platform_data msm_dsps_pdata = {
2473 .clks = dsps_clks,
2474 .clks_num = ARRAY_SIZE(dsps_clks),
2475 .gpios = NULL,
2476 .gpios_num = 0,
2477 .regs = dsps_regs,
2478 .regs_num = ARRAY_SIZE(dsps_regs),
2479 .dsps_pwr_ctl_en = 1,
2480 .signature = DSPS_SIGNATURE,
2481};
2482
2483static struct resource msm_dsps_resources[] = {
2484 {
2485 .start = PPSS_REG_PHYS_BASE,
2486 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2487 .name = "ppss_reg",
2488 .flags = IORESOURCE_MEM,
2489 },
Wentao Xua55500b2011-08-16 18:15:04 -04002490
2491 {
2492 .start = PPSS_WDOG_TIMER_IRQ,
2493 .end = PPSS_WDOG_TIMER_IRQ,
2494 .name = "ppss_wdog",
2495 .flags = IORESOURCE_IRQ,
2496 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002497};
2498
2499struct platform_device msm_dsps_device = {
2500 .name = "msm_dsps",
2501 .id = 0,
2502 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2503 .resource = msm_dsps_resources,
2504 .dev.platform_data = &msm_dsps_pdata,
2505};
2506
2507#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002508
2509#ifdef CONFIG_MSM_QDSS
2510
2511#define MSM_QDSS_PHYS_BASE 0x01A00000
2512#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2513#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2514#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002515#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002516#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2517
2518static struct resource msm_etb_resources[] = {
2519 {
2520 .start = MSM_ETB_PHYS_BASE,
2521 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2522 .flags = IORESOURCE_MEM,
2523 },
2524};
2525
2526struct platform_device msm_etb_device = {
2527 .name = "msm_etb",
2528 .id = 0,
2529 .num_resources = ARRAY_SIZE(msm_etb_resources),
2530 .resource = msm_etb_resources,
2531};
2532
2533static struct resource msm_tpiu_resources[] = {
2534 {
2535 .start = MSM_TPIU_PHYS_BASE,
2536 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2537 .flags = IORESOURCE_MEM,
2538 },
2539};
2540
2541struct platform_device msm_tpiu_device = {
2542 .name = "msm_tpiu",
2543 .id = 0,
2544 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2545 .resource = msm_tpiu_resources,
2546};
2547
2548static struct resource msm_funnel_resources[] = {
2549 {
2550 .start = MSM_FUNNEL_PHYS_BASE,
2551 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2552 .flags = IORESOURCE_MEM,
2553 },
2554};
2555
2556struct platform_device msm_funnel_device = {
2557 .name = "msm_funnel",
2558 .id = 0,
2559 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2560 .resource = msm_funnel_resources,
2561};
2562
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002563static struct resource msm_debug_resources[] = {
2564 {
2565 .start = MSM_DEBUG_PHYS_BASE,
2566 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2567 .flags = IORESOURCE_MEM,
2568 },
2569 {
2570 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2571 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2572 .flags = IORESOURCE_MEM,
2573 },
2574};
2575
2576struct platform_device msm_debug_device = {
2577 .name = "msm_debug",
2578 .id = 0,
2579 .num_resources = ARRAY_SIZE(msm_debug_resources),
2580 .resource = msm_debug_resources,
2581};
2582
Pratik Patel7831c082011-06-08 21:44:37 -07002583static struct resource msm_ptm_resources[] = {
2584 {
2585 .start = MSM_PTM_PHYS_BASE,
2586 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2587 .flags = IORESOURCE_MEM,
2588 },
2589};
2590
2591struct platform_device msm_ptm_device = {
2592 .name = "msm_ptm",
2593 .id = 0,
2594 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2595 .resource = msm_ptm_resources,
2596};
2597
2598#endif