blob: 0c1d4ab41884cf4b8e1fe58f4cef12950bfe5886 [file] [log] [blame]
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +05301/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070033#include <sound/msm-dai-q6.h>
34#include <sound/apr_audio.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070035#include "clock.h"
36#include "devices.h"
37#include "devices-msm8x60.h"
38#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070039#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060040#include "rpm_log.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 },
Vamsi Krishna34f01582011-12-14 19:54:42 -0800175 {
176 .start = MSM_GPIO_TO_INT(69),
177 .end = MSM_GPIO_TO_INT(69),
178 .name = "peripheral_status_irq",
179 .flags = IORESOURCE_IRQ,
180 },
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530181};
182
183struct platform_device msm_device_hsic_host = {
184 .name = "msm_hsic_host",
185 .id = -1,
186 .num_resources = ARRAY_SIZE(resources_hsic_host),
187 .resource = resources_hsic_host,
188 .dev = {
189 .dma_mask = &dma_mask,
190 .coherent_dma_mask = DMA_BIT_MASK(32),
191 },
192};
193
Mona Hossain11c03ac2011-10-26 12:42:10 -0700194#define SHARED_IMEM_TZ_BASE 0x2a03f720
195static struct resource tzlog_resources[] = {
196 {
197 .start = SHARED_IMEM_TZ_BASE,
198 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
199 .flags = IORESOURCE_MEM,
200 },
201};
202
203struct platform_device msm_device_tz_log = {
204 .name = "tz_log",
205 .id = 0,
206 .num_resources = ARRAY_SIZE(tzlog_resources),
207 .resource = tzlog_resources,
208};
209
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700210static struct resource resources_uart_gsbi2[] = {
211 {
212 .start = MSM8960_GSBI2_UARTDM_IRQ,
213 .end = MSM8960_GSBI2_UARTDM_IRQ,
214 .flags = IORESOURCE_IRQ,
215 },
216 {
217 .start = MSM_UART2DM_PHYS,
218 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
219 .name = "uartdm_resource",
220 .flags = IORESOURCE_MEM,
221 },
222 {
223 .start = MSM_GSBI2_PHYS,
224 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
225 .name = "gsbi_resource",
226 .flags = IORESOURCE_MEM,
227 },
228};
229
230struct platform_device msm8960_device_uart_gsbi2 = {
231 .name = "msm_serial_hsl",
232 .id = 0,
233 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
234 .resource = resources_uart_gsbi2,
235};
Mayank Rana9f51f582011-08-04 18:35:59 +0530236/* GSBI 6 used into UARTDM Mode */
237static struct resource msm_uart_dm6_resources[] = {
238 {
239 .start = MSM_UART6DM_PHYS,
240 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
241 .name = "uartdm_resource",
242 .flags = IORESOURCE_MEM,
243 },
244 {
245 .start = GSBI6_UARTDM_IRQ,
246 .end = GSBI6_UARTDM_IRQ,
247 .flags = IORESOURCE_IRQ,
248 },
249 {
250 .start = MSM_GSBI6_PHYS,
251 .end = MSM_GSBI6_PHYS + 4 - 1,
252 .name = "gsbi_resource",
253 .flags = IORESOURCE_MEM,
254 },
255 {
256 .start = DMOV_HSUART_GSBI6_TX_CHAN,
257 .end = DMOV_HSUART_GSBI6_RX_CHAN,
258 .name = "uartdm_channels",
259 .flags = IORESOURCE_DMA,
260 },
261 {
262 .start = DMOV_HSUART_GSBI6_TX_CRCI,
263 .end = DMOV_HSUART_GSBI6_RX_CRCI,
264 .name = "uartdm_crci",
265 .flags = IORESOURCE_DMA,
266 },
267};
268static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
269struct platform_device msm_device_uart_dm6 = {
270 .name = "msm_serial_hs",
271 .id = 0,
272 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
273 .resource = msm_uart_dm6_resources,
274 .dev = {
275 .dma_mask = &msm_uart_dm6_dma_mask,
276 .coherent_dma_mask = DMA_BIT_MASK(32),
277 },
278};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700279
280static struct resource resources_uart_gsbi5[] = {
281 {
282 .start = GSBI5_UARTDM_IRQ,
283 .end = GSBI5_UARTDM_IRQ,
284 .flags = IORESOURCE_IRQ,
285 },
286 {
287 .start = MSM_UART5DM_PHYS,
288 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
289 .name = "uartdm_resource",
290 .flags = IORESOURCE_MEM,
291 },
292 {
293 .start = MSM_GSBI5_PHYS,
294 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
295 .name = "gsbi_resource",
296 .flags = IORESOURCE_MEM,
297 },
298};
299
300struct platform_device msm8960_device_uart_gsbi5 = {
301 .name = "msm_serial_hsl",
302 .id = 0,
303 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
304 .resource = resources_uart_gsbi5,
305};
306/* MSM Video core device */
307#ifdef CONFIG_MSM_BUS_SCALING
308static struct msm_bus_vectors vidc_init_vectors[] = {
309 {
310 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
311 .dst = MSM_BUS_SLAVE_EBI_CH0,
312 .ab = 0,
313 .ib = 0,
314 },
315 {
316 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
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 {
328 .src = MSM_BUS_MASTER_AMPSS_M0,
329 .dst = MSM_BUS_SLAVE_EBI_CH0,
330 .ab = 0,
331 .ib = 0,
332 },
333};
334static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
335 {
336 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
337 .dst = MSM_BUS_SLAVE_EBI_CH0,
338 .ab = 54525952,
339 .ib = 436207616,
340 },
341 {
342 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
343 .dst = MSM_BUS_SLAVE_EBI_CH0,
344 .ab = 72351744,
345 .ib = 289406976,
346 },
347 {
348 .src = MSM_BUS_MASTER_AMPSS_M0,
349 .dst = MSM_BUS_SLAVE_EBI_CH0,
350 .ab = 500000,
351 .ib = 1000000,
352 },
353 {
354 .src = MSM_BUS_MASTER_AMPSS_M0,
355 .dst = MSM_BUS_SLAVE_EBI_CH0,
356 .ab = 500000,
357 .ib = 1000000,
358 },
359};
360static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
361 {
362 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
363 .dst = MSM_BUS_SLAVE_EBI_CH0,
364 .ab = 40894464,
365 .ib = 327155712,
366 },
367 {
368 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
369 .dst = MSM_BUS_SLAVE_EBI_CH0,
370 .ab = 48234496,
371 .ib = 192937984,
372 },
373 {
374 .src = MSM_BUS_MASTER_AMPSS_M0,
375 .dst = MSM_BUS_SLAVE_EBI_CH0,
376 .ab = 500000,
377 .ib = 2000000,
378 },
379 {
380 .src = MSM_BUS_MASTER_AMPSS_M0,
381 .dst = MSM_BUS_SLAVE_EBI_CH0,
382 .ab = 500000,
383 .ib = 2000000,
384 },
385};
386static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
387 {
388 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
389 .dst = MSM_BUS_SLAVE_EBI_CH0,
390 .ab = 163577856,
391 .ib = 1308622848,
392 },
393 {
394 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
395 .dst = MSM_BUS_SLAVE_EBI_CH0,
396 .ab = 219152384,
397 .ib = 876609536,
398 },
399 {
400 .src = MSM_BUS_MASTER_AMPSS_M0,
401 .dst = MSM_BUS_SLAVE_EBI_CH0,
402 .ab = 1750000,
403 .ib = 3500000,
404 },
405 {
406 .src = MSM_BUS_MASTER_AMPSS_M0,
407 .dst = MSM_BUS_SLAVE_EBI_CH0,
408 .ab = 1750000,
409 .ib = 3500000,
410 },
411};
412static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
413 {
414 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
415 .dst = MSM_BUS_SLAVE_EBI_CH0,
416 .ab = 121634816,
417 .ib = 973078528,
418 },
419 {
420 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
421 .dst = MSM_BUS_SLAVE_EBI_CH0,
422 .ab = 155189248,
423 .ib = 620756992,
424 },
425 {
426 .src = MSM_BUS_MASTER_AMPSS_M0,
427 .dst = MSM_BUS_SLAVE_EBI_CH0,
428 .ab = 1750000,
429 .ib = 7000000,
430 },
431 {
432 .src = MSM_BUS_MASTER_AMPSS_M0,
433 .dst = MSM_BUS_SLAVE_EBI_CH0,
434 .ab = 1750000,
435 .ib = 7000000,
436 },
437};
438static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
439 {
440 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
441 .dst = MSM_BUS_SLAVE_EBI_CH0,
442 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700443 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700444 },
445 {
446 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
447 .dst = MSM_BUS_SLAVE_EBI_CH0,
448 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700449 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700450 },
451 {
452 .src = MSM_BUS_MASTER_AMPSS_M0,
453 .dst = MSM_BUS_SLAVE_EBI_CH0,
454 .ab = 2500000,
455 .ib = 5000000,
456 },
457 {
458 .src = MSM_BUS_MASTER_AMPSS_M0,
459 .dst = MSM_BUS_SLAVE_EBI_CH0,
460 .ab = 2500000,
461 .ib = 5000000,
462 },
463};
464static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
465 {
466 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
467 .dst = MSM_BUS_SLAVE_EBI_CH0,
468 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700469 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700470 },
471 {
472 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
473 .dst = MSM_BUS_SLAVE_EBI_CH0,
474 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700475 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700476 },
477 {
478 .src = MSM_BUS_MASTER_AMPSS_M0,
479 .dst = MSM_BUS_SLAVE_EBI_CH0,
480 .ab = 2500000,
481 .ib = 700000000,
482 },
483 {
484 .src = MSM_BUS_MASTER_AMPSS_M0,
485 .dst = MSM_BUS_SLAVE_EBI_CH0,
486 .ab = 2500000,
487 .ib = 10000000,
488 },
489};
490
491static struct msm_bus_paths vidc_bus_client_config[] = {
492 {
493 ARRAY_SIZE(vidc_init_vectors),
494 vidc_init_vectors,
495 },
496 {
497 ARRAY_SIZE(vidc_venc_vga_vectors),
498 vidc_venc_vga_vectors,
499 },
500 {
501 ARRAY_SIZE(vidc_vdec_vga_vectors),
502 vidc_vdec_vga_vectors,
503 },
504 {
505 ARRAY_SIZE(vidc_venc_720p_vectors),
506 vidc_venc_720p_vectors,
507 },
508 {
509 ARRAY_SIZE(vidc_vdec_720p_vectors),
510 vidc_vdec_720p_vectors,
511 },
512 {
513 ARRAY_SIZE(vidc_venc_1080p_vectors),
514 vidc_venc_1080p_vectors,
515 },
516 {
517 ARRAY_SIZE(vidc_vdec_1080p_vectors),
518 vidc_vdec_1080p_vectors,
519 },
520};
521
522static struct msm_bus_scale_pdata vidc_bus_client_data = {
523 vidc_bus_client_config,
524 ARRAY_SIZE(vidc_bus_client_config),
525 .name = "vidc",
526};
527#endif
528
Mona Hossain9c430e32011-07-27 11:04:47 -0700529#ifdef CONFIG_HW_RANDOM_MSM
530/* PRNG device */
531#define MSM_PRNG_PHYS 0x1A500000
532static struct resource rng_resources = {
533 .flags = IORESOURCE_MEM,
534 .start = MSM_PRNG_PHYS,
535 .end = MSM_PRNG_PHYS + SZ_512 - 1,
536};
537
538struct platform_device msm_device_rng = {
539 .name = "msm_rng",
540 .id = 0,
541 .num_resources = 1,
542 .resource = &rng_resources,
543};
544#endif
545
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700546#define MSM_VIDC_BASE_PHYS 0x04400000
547#define MSM_VIDC_BASE_SIZE 0x00100000
548
549static struct resource msm_device_vidc_resources[] = {
550 {
551 .start = MSM_VIDC_BASE_PHYS,
552 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
553 .flags = IORESOURCE_MEM,
554 },
555 {
556 .start = VCODEC_IRQ,
557 .end = VCODEC_IRQ,
558 .flags = IORESOURCE_IRQ,
559 },
560};
561
562struct msm_vidc_platform_data vidc_platform_data = {
563#ifdef CONFIG_MSM_BUS_SCALING
564 .vidc_bus_client_pdata = &vidc_bus_client_data,
565#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700566#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Olav Hauganb5be7992011-11-18 14:29:02 -0800567 .memtype = ION_CP_MM_HEAP_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700568 .enable_ion = 1,
569#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800570 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700571 .enable_ion = 0,
572#endif
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800573 .disable_dmx = 0,
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530574 .disable_fullhd = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700575};
576
577struct platform_device msm_device_vidc = {
578 .name = "msm_vidc",
579 .id = 0,
580 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
581 .resource = msm_device_vidc_resources,
582 .dev = {
583 .platform_data = &vidc_platform_data,
584 },
585};
586
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700587#define MSM_SDC1_BASE 0x12400000
588#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
589#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
590#define MSM_SDC2_BASE 0x12140000
591#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
592#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
593#define MSM_SDC2_BASE 0x12140000
594#define MSM_SDC3_BASE 0x12180000
595#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
596#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
597#define MSM_SDC4_BASE 0x121C0000
598#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
599#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
600#define MSM_SDC5_BASE 0x12200000
601#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
602#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
603
604static struct resource resources_sdc1[] = {
605 {
606 .name = "core_mem",
607 .flags = IORESOURCE_MEM,
608 .start = MSM_SDC1_BASE,
609 .end = MSM_SDC1_DML_BASE - 1,
610 },
611 {
612 .name = "core_irq",
613 .flags = IORESOURCE_IRQ,
614 .start = SDC1_IRQ_0,
615 .end = SDC1_IRQ_0
616 },
617#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
618 {
619 .name = "sdcc_dml_addr",
620 .start = MSM_SDC1_DML_BASE,
621 .end = MSM_SDC1_BAM_BASE - 1,
622 .flags = IORESOURCE_MEM,
623 },
624 {
625 .name = "sdcc_bam_addr",
626 .start = MSM_SDC1_BAM_BASE,
627 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
628 .flags = IORESOURCE_MEM,
629 },
630 {
631 .name = "sdcc_bam_irq",
632 .start = SDC1_BAM_IRQ,
633 .end = SDC1_BAM_IRQ,
634 .flags = IORESOURCE_IRQ,
635 },
636#endif
637};
638
639static struct resource resources_sdc2[] = {
640 {
641 .name = "core_mem",
642 .flags = IORESOURCE_MEM,
643 .start = MSM_SDC2_BASE,
644 .end = MSM_SDC2_DML_BASE - 1,
645 },
646 {
647 .name = "core_irq",
648 .flags = IORESOURCE_IRQ,
649 .start = SDC2_IRQ_0,
650 .end = SDC2_IRQ_0
651 },
652#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
653 {
654 .name = "sdcc_dml_addr",
655 .start = MSM_SDC2_DML_BASE,
656 .end = MSM_SDC2_BAM_BASE - 1,
657 .flags = IORESOURCE_MEM,
658 },
659 {
660 .name = "sdcc_bam_addr",
661 .start = MSM_SDC2_BAM_BASE,
662 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
663 .flags = IORESOURCE_MEM,
664 },
665 {
666 .name = "sdcc_bam_irq",
667 .start = SDC2_BAM_IRQ,
668 .end = SDC2_BAM_IRQ,
669 .flags = IORESOURCE_IRQ,
670 },
671#endif
672};
673
674static struct resource resources_sdc3[] = {
675 {
676 .name = "core_mem",
677 .flags = IORESOURCE_MEM,
678 .start = MSM_SDC3_BASE,
679 .end = MSM_SDC3_DML_BASE - 1,
680 },
681 {
682 .name = "core_irq",
683 .flags = IORESOURCE_IRQ,
684 .start = SDC3_IRQ_0,
685 .end = SDC3_IRQ_0
686 },
687#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
688 {
689 .name = "sdcc_dml_addr",
690 .start = MSM_SDC3_DML_BASE,
691 .end = MSM_SDC3_BAM_BASE - 1,
692 .flags = IORESOURCE_MEM,
693 },
694 {
695 .name = "sdcc_bam_addr",
696 .start = MSM_SDC3_BAM_BASE,
697 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
698 .flags = IORESOURCE_MEM,
699 },
700 {
701 .name = "sdcc_bam_irq",
702 .start = SDC3_BAM_IRQ,
703 .end = SDC3_BAM_IRQ,
704 .flags = IORESOURCE_IRQ,
705 },
706#endif
707};
708
709static struct resource resources_sdc4[] = {
710 {
711 .name = "core_mem",
712 .flags = IORESOURCE_MEM,
713 .start = MSM_SDC4_BASE,
714 .end = MSM_SDC4_DML_BASE - 1,
715 },
716 {
717 .name = "core_irq",
718 .flags = IORESOURCE_IRQ,
719 .start = SDC4_IRQ_0,
720 .end = SDC4_IRQ_0
721 },
722#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
723 {
724 .name = "sdcc_dml_addr",
725 .start = MSM_SDC4_DML_BASE,
726 .end = MSM_SDC4_BAM_BASE - 1,
727 .flags = IORESOURCE_MEM,
728 },
729 {
730 .name = "sdcc_bam_addr",
731 .start = MSM_SDC4_BAM_BASE,
732 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
733 .flags = IORESOURCE_MEM,
734 },
735 {
736 .name = "sdcc_bam_irq",
737 .start = SDC4_BAM_IRQ,
738 .end = SDC4_BAM_IRQ,
739 .flags = IORESOURCE_IRQ,
740 },
741#endif
742};
743
744static struct resource resources_sdc5[] = {
745 {
746 .name = "core_mem",
747 .flags = IORESOURCE_MEM,
748 .start = MSM_SDC5_BASE,
749 .end = MSM_SDC5_DML_BASE - 1,
750 },
751 {
752 .name = "core_irq",
753 .flags = IORESOURCE_IRQ,
754 .start = SDC5_IRQ_0,
755 .end = SDC5_IRQ_0
756 },
757#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
758 {
759 .name = "sdcc_dml_addr",
760 .start = MSM_SDC5_DML_BASE,
761 .end = MSM_SDC5_BAM_BASE - 1,
762 .flags = IORESOURCE_MEM,
763 },
764 {
765 .name = "sdcc_bam_addr",
766 .start = MSM_SDC5_BAM_BASE,
767 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
768 .flags = IORESOURCE_MEM,
769 },
770 {
771 .name = "sdcc_bam_irq",
772 .start = SDC5_BAM_IRQ,
773 .end = SDC5_BAM_IRQ,
774 .flags = IORESOURCE_IRQ,
775 },
776#endif
777};
778
779struct platform_device msm_device_sdc1 = {
780 .name = "msm_sdcc",
781 .id = 1,
782 .num_resources = ARRAY_SIZE(resources_sdc1),
783 .resource = resources_sdc1,
784 .dev = {
785 .coherent_dma_mask = 0xffffffff,
786 },
787};
788
789struct platform_device msm_device_sdc2 = {
790 .name = "msm_sdcc",
791 .id = 2,
792 .num_resources = ARRAY_SIZE(resources_sdc2),
793 .resource = resources_sdc2,
794 .dev = {
795 .coherent_dma_mask = 0xffffffff,
796 },
797};
798
799struct platform_device msm_device_sdc3 = {
800 .name = "msm_sdcc",
801 .id = 3,
802 .num_resources = ARRAY_SIZE(resources_sdc3),
803 .resource = resources_sdc3,
804 .dev = {
805 .coherent_dma_mask = 0xffffffff,
806 },
807};
808
809struct platform_device msm_device_sdc4 = {
810 .name = "msm_sdcc",
811 .id = 4,
812 .num_resources = ARRAY_SIZE(resources_sdc4),
813 .resource = resources_sdc4,
814 .dev = {
815 .coherent_dma_mask = 0xffffffff,
816 },
817};
818
819struct platform_device msm_device_sdc5 = {
820 .name = "msm_sdcc",
821 .id = 5,
822 .num_resources = ARRAY_SIZE(resources_sdc5),
823 .resource = resources_sdc5,
824 .dev = {
825 .coherent_dma_mask = 0xffffffff,
826 },
827};
828
Stephen Boydeb819882011-08-29 14:46:30 -0700829#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
830#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
831
832static struct resource msm_8960_q6_lpass_resources[] = {
833 {
834 .start = MSM_LPASS_QDSP6SS_PHYS,
835 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
836 .flags = IORESOURCE_MEM,
837 },
838};
839
840static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
841 .strap_tcm_base = 0x01460000,
842 .strap_ahb_upper = 0x00290000,
843 .strap_ahb_lower = 0x00000280,
844 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
845 .name = "q6",
846 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700847 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700848};
849
850struct platform_device msm_8960_q6_lpass = {
851 .name = "pil_qdsp6v4",
852 .id = 0,
853 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
854 .resource = msm_8960_q6_lpass_resources,
855 .dev.platform_data = &msm_8960_q6_lpass_data,
856};
857
858#define MSM_MSS_ENABLE_PHYS 0x08B00000
859#define MSM_FW_QDSP6SS_PHYS 0x08800000
860#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
861#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
862
863static struct resource msm_8960_q6_mss_fw_resources[] = {
864 {
865 .start = MSM_FW_QDSP6SS_PHYS,
866 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
867 .flags = IORESOURCE_MEM,
868 },
869 {
870 .start = MSM_MSS_ENABLE_PHYS,
871 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
872 .flags = IORESOURCE_MEM,
873 },
874};
875
876static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
877 .strap_tcm_base = 0x00400000,
878 .strap_ahb_upper = 0x00090000,
879 .strap_ahb_lower = 0x00000080,
880 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
881 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
882 .name = "modem_fw",
883 .depends = "q6",
884 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700885 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700886};
887
888struct platform_device msm_8960_q6_mss_fw = {
889 .name = "pil_qdsp6v4",
890 .id = 1,
891 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
892 .resource = msm_8960_q6_mss_fw_resources,
893 .dev.platform_data = &msm_8960_q6_mss_fw_data,
894};
895
896#define MSM_SW_QDSP6SS_PHYS 0x08900000
897#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
898#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
899
900static struct resource msm_8960_q6_mss_sw_resources[] = {
901 {
902 .start = MSM_SW_QDSP6SS_PHYS,
903 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
904 .flags = IORESOURCE_MEM,
905 },
906 {
907 .start = MSM_MSS_ENABLE_PHYS,
908 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
909 .flags = IORESOURCE_MEM,
910 },
911};
912
913static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
914 .strap_tcm_base = 0x00420000,
915 .strap_ahb_upper = 0x00090000,
916 .strap_ahb_lower = 0x00000080,
917 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
918 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
919 .name = "modem",
920 .depends = "modem_fw",
921 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700922 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700923};
924
925struct platform_device msm_8960_q6_mss_sw = {
926 .name = "pil_qdsp6v4",
927 .id = 2,
928 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
929 .resource = msm_8960_q6_mss_sw_resources,
930 .dev.platform_data = &msm_8960_q6_mss_sw_data,
931};
932
Stephen Boyd322a9922011-09-20 01:05:54 -0700933static struct resource msm_8960_riva_resources[] = {
934 {
935 .start = 0x03204000,
936 .end = 0x03204000 + SZ_256 - 1,
937 .flags = IORESOURCE_MEM,
938 },
939};
940
941struct platform_device msm_8960_riva = {
942 .name = "pil_riva",
943 .id = -1,
944 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
945 .resource = msm_8960_riva_resources,
946};
947
Stephen Boydd89eebe2011-09-28 23:28:11 -0700948struct platform_device msm_pil_tzapps = {
949 .name = "pil_tzapps",
950 .id = -1,
951};
952
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700953struct platform_device msm_device_smd = {
954 .name = "msm_smd",
955 .id = -1,
956};
957
958struct platform_device msm_device_bam_dmux = {
959 .name = "BAM_RMNT",
960 .id = -1,
961};
962
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700963static struct msm_watchdog_pdata msm_watchdog_pdata = {
964 .pet_time = 10000,
965 .bark_time = 11000,
966 .has_secure = true,
967};
968
969struct platform_device msm8960_device_watchdog = {
970 .name = "msm_watchdog",
971 .id = -1,
972 .dev = {
973 .platform_data = &msm_watchdog_pdata,
974 },
975};
976
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700977static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700978 {
979 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700980 .flags = IORESOURCE_IRQ,
981 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700982 {
983 .start = 0x18320000,
984 .end = 0x18320000 + SZ_1M - 1,
985 .flags = IORESOURCE_MEM,
986 },
987};
988
989static struct msm_dmov_pdata msm_dmov_pdata = {
990 .sd = 1,
991 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700992};
993
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700994struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700995 .name = "msm_dmov",
996 .id = -1,
997 .resource = msm_dmov_resource,
998 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700999 .dev = {
1000 .platform_data = &msm_dmov_pdata,
1001 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001002};
1003
1004static struct platform_device *msm_sdcc_devices[] __initdata = {
1005 &msm_device_sdc1,
1006 &msm_device_sdc2,
1007 &msm_device_sdc3,
1008 &msm_device_sdc4,
1009 &msm_device_sdc5,
1010};
1011
1012int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1013{
1014 struct platform_device *pdev;
1015
1016 if (controller < 1 || controller > 5)
1017 return -EINVAL;
1018
1019 pdev = msm_sdcc_devices[controller-1];
1020 pdev->dev.platform_data = plat;
1021 return platform_device_register(pdev);
1022}
1023
1024static struct resource resources_qup_i2c_gsbi4[] = {
1025 {
1026 .name = "gsbi_qup_i2c_addr",
1027 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001028 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001029 .flags = IORESOURCE_MEM,
1030 },
1031 {
1032 .name = "qup_phys_addr",
1033 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001034 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001035 .flags = IORESOURCE_MEM,
1036 },
1037 {
1038 .name = "qup_err_intr",
1039 .start = GSBI4_QUP_IRQ,
1040 .end = GSBI4_QUP_IRQ,
1041 .flags = IORESOURCE_IRQ,
1042 },
1043};
1044
1045struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1046 .name = "qup_i2c",
1047 .id = 4,
1048 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1049 .resource = resources_qup_i2c_gsbi4,
1050};
1051
1052static struct resource resources_qup_i2c_gsbi3[] = {
1053 {
1054 .name = "gsbi_qup_i2c_addr",
1055 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001056 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001057 .flags = IORESOURCE_MEM,
1058 },
1059 {
1060 .name = "qup_phys_addr",
1061 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001062 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001063 .flags = IORESOURCE_MEM,
1064 },
1065 {
1066 .name = "qup_err_intr",
1067 .start = GSBI3_QUP_IRQ,
1068 .end = GSBI3_QUP_IRQ,
1069 .flags = IORESOURCE_IRQ,
1070 },
1071};
1072
1073struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1074 .name = "qup_i2c",
1075 .id = 3,
1076 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1077 .resource = resources_qup_i2c_gsbi3,
1078};
1079
1080static struct resource resources_qup_i2c_gsbi10[] = {
1081 {
1082 .name = "gsbi_qup_i2c_addr",
1083 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001084 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001085 .flags = IORESOURCE_MEM,
1086 },
1087 {
1088 .name = "qup_phys_addr",
1089 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001090 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001091 .flags = IORESOURCE_MEM,
1092 },
1093 {
1094 .name = "qup_err_intr",
1095 .start = GSBI10_QUP_IRQ,
1096 .end = GSBI10_QUP_IRQ,
1097 .flags = IORESOURCE_IRQ,
1098 },
1099};
1100
1101struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1102 .name = "qup_i2c",
1103 .id = 10,
1104 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1105 .resource = resources_qup_i2c_gsbi10,
1106};
1107
1108static struct resource resources_qup_i2c_gsbi12[] = {
1109 {
1110 .name = "gsbi_qup_i2c_addr",
1111 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001112 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001113 .flags = IORESOURCE_MEM,
1114 },
1115 {
1116 .name = "qup_phys_addr",
1117 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001118 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001119 .flags = IORESOURCE_MEM,
1120 },
1121 {
1122 .name = "qup_err_intr",
1123 .start = GSBI12_QUP_IRQ,
1124 .end = GSBI12_QUP_IRQ,
1125 .flags = IORESOURCE_IRQ,
1126 },
1127};
1128
1129struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1130 .name = "qup_i2c",
1131 .id = 12,
1132 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1133 .resource = resources_qup_i2c_gsbi12,
1134};
1135
1136#ifdef CONFIG_MSM_CAMERA
Kevin Chanbb8ef862012-02-14 13:03:04 -08001137static struct resource msm_cam_gsbi4_i2c_mux_resources[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001138 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001139 .name = "i2c_mux_rw",
Nishant Pandit24153d82011-08-27 16:05:13 +05301140 .start = 0x008003E0,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001141 .end = 0x008003E0 + SZ_8 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301142 .flags = IORESOURCE_MEM,
1143 },
1144 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001145 .name = "i2c_mux_ctl",
Nishant Pandit24153d82011-08-27 16:05:13 +05301146 .start = 0x008020B8,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001147 .end = 0x008020B8 + SZ_4 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301148 .flags = IORESOURCE_MEM,
1149 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001150};
1151
Kevin Chanbb8ef862012-02-14 13:03:04 -08001152struct platform_device msm8960_device_i2c_mux_gsbi4 = {
1153 .name = "msm_cam_i2c_mux",
1154 .id = 0,
1155 .resource = msm_cam_gsbi4_i2c_mux_resources,
1156 .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources),
1157};
Kevin Chanf6216f22011-10-25 18:40:11 -07001158
1159static struct resource msm_csiphy0_resources[] = {
1160 {
1161 .name = "csiphy",
1162 .start = 0x04800C00,
1163 .end = 0x04800C00 + SZ_1K - 1,
1164 .flags = IORESOURCE_MEM,
1165 },
1166 {
1167 .name = "csiphy",
1168 .start = CSIPHY_4LN_IRQ,
1169 .end = CSIPHY_4LN_IRQ,
1170 .flags = IORESOURCE_IRQ,
1171 },
1172};
1173
1174static struct resource msm_csiphy1_resources[] = {
1175 {
1176 .name = "csiphy",
1177 .start = 0x04801000,
1178 .end = 0x04801000 + SZ_1K - 1,
1179 .flags = IORESOURCE_MEM,
1180 },
1181 {
1182 .name = "csiphy",
1183 .start = MSM8960_CSIPHY_2LN_IRQ,
1184 .end = MSM8960_CSIPHY_2LN_IRQ,
1185 .flags = IORESOURCE_IRQ,
1186 },
1187};
1188
1189struct platform_device msm8960_device_csiphy0 = {
1190 .name = "msm_csiphy",
1191 .id = 0,
1192 .resource = msm_csiphy0_resources,
1193 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1194};
1195
1196struct platform_device msm8960_device_csiphy1 = {
1197 .name = "msm_csiphy",
1198 .id = 1,
1199 .resource = msm_csiphy1_resources,
1200 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1201};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001202
1203static struct resource msm_csid0_resources[] = {
1204 {
1205 .name = "csid",
1206 .start = 0x04800000,
1207 .end = 0x04800000 + SZ_1K - 1,
1208 .flags = IORESOURCE_MEM,
1209 },
1210 {
1211 .name = "csid",
1212 .start = CSI_0_IRQ,
1213 .end = CSI_0_IRQ,
1214 .flags = IORESOURCE_IRQ,
1215 },
1216};
1217
1218static struct resource msm_csid1_resources[] = {
1219 {
1220 .name = "csid",
1221 .start = 0x04800400,
1222 .end = 0x04800400 + SZ_1K - 1,
1223 .flags = IORESOURCE_MEM,
1224 },
1225 {
1226 .name = "csid",
1227 .start = CSI_1_IRQ,
1228 .end = CSI_1_IRQ,
1229 .flags = IORESOURCE_IRQ,
1230 },
1231};
1232
1233struct platform_device msm8960_device_csid0 = {
1234 .name = "msm_csid",
1235 .id = 0,
1236 .resource = msm_csid0_resources,
1237 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1238};
1239
1240struct platform_device msm8960_device_csid1 = {
1241 .name = "msm_csid",
1242 .id = 1,
1243 .resource = msm_csid1_resources,
1244 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1245};
Kevin Chane12c6672011-10-26 11:55:26 -07001246
1247struct resource msm_ispif_resources[] = {
1248 {
1249 .name = "ispif",
1250 .start = 0x04800800,
1251 .end = 0x04800800 + SZ_1K - 1,
1252 .flags = IORESOURCE_MEM,
1253 },
1254 {
1255 .name = "ispif",
1256 .start = ISPIF_IRQ,
1257 .end = ISPIF_IRQ,
1258 .flags = IORESOURCE_IRQ,
1259 },
1260};
1261
1262struct platform_device msm8960_device_ispif = {
1263 .name = "msm_ispif",
1264 .id = 0,
1265 .resource = msm_ispif_resources,
1266 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1267};
Kevin Chan5827c552011-10-28 18:36:32 -07001268
1269static struct resource msm_vfe_resources[] = {
1270 {
1271 .name = "vfe32",
1272 .start = 0x04500000,
1273 .end = 0x04500000 + SZ_1M - 1,
1274 .flags = IORESOURCE_MEM,
1275 },
1276 {
1277 .name = "vfe32",
1278 .start = VFE_IRQ,
1279 .end = VFE_IRQ,
1280 .flags = IORESOURCE_IRQ,
1281 },
1282};
1283
1284struct platform_device msm8960_device_vfe = {
1285 .name = "msm_vfe",
1286 .id = 0,
1287 .resource = msm_vfe_resources,
1288 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1289};
Kevin Chana0853122011-11-07 19:48:44 -08001290
1291static struct resource msm_vpe_resources[] = {
1292 {
1293 .name = "vpe",
1294 .start = 0x05300000,
1295 .end = 0x05300000 + SZ_1M - 1,
1296 .flags = IORESOURCE_MEM,
1297 },
1298 {
1299 .name = "vpe",
1300 .start = VPE_IRQ,
1301 .end = VPE_IRQ,
1302 .flags = IORESOURCE_IRQ,
1303 },
1304};
1305
1306struct platform_device msm8960_device_vpe = {
1307 .name = "msm_vpe",
1308 .id = 0,
1309 .resource = msm_vpe_resources,
1310 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1311};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001312#endif
1313
Jay Chokshi33c044a2011-12-07 13:05:40 -08001314static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001315 {
1316 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1317 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1318 .flags = IORESOURCE_MEM,
1319 },
1320};
1321
Jay Chokshi33c044a2011-12-07 13:05:40 -08001322struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001323 .name = "msm_ssbi",
1324 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001325 .resource = resources_ssbi_pmic,
1326 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001327};
1328
1329static struct resource resources_qup_spi_gsbi1[] = {
1330 {
1331 .name = "spi_base",
1332 .start = MSM_GSBI1_QUP_PHYS,
1333 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1334 .flags = IORESOURCE_MEM,
1335 },
1336 {
1337 .name = "gsbi_base",
1338 .start = MSM_GSBI1_PHYS,
1339 .end = MSM_GSBI1_PHYS + 4 - 1,
1340 .flags = IORESOURCE_MEM,
1341 },
1342 {
1343 .name = "spi_irq_in",
1344 .start = MSM8960_GSBI1_QUP_IRQ,
1345 .end = MSM8960_GSBI1_QUP_IRQ,
1346 .flags = IORESOURCE_IRQ,
1347 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001348 {
1349 .name = "spi_clk",
1350 .start = 9,
1351 .end = 9,
1352 .flags = IORESOURCE_IO,
1353 },
1354 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001355 .name = "spi_miso",
1356 .start = 7,
1357 .end = 7,
1358 .flags = IORESOURCE_IO,
1359 },
1360 {
1361 .name = "spi_mosi",
1362 .start = 6,
1363 .end = 6,
1364 .flags = IORESOURCE_IO,
1365 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001366 {
1367 .name = "spi_cs",
1368 .start = 8,
1369 .end = 8,
1370 .flags = IORESOURCE_IO,
1371 },
1372 {
1373 .name = "spi_cs1",
1374 .start = 14,
1375 .end = 14,
1376 .flags = IORESOURCE_IO,
1377 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001378};
1379
1380struct platform_device msm8960_device_qup_spi_gsbi1 = {
1381 .name = "spi_qsd",
1382 .id = 0,
1383 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1384 .resource = resources_qup_spi_gsbi1,
1385};
1386
1387struct platform_device msm_pcm = {
1388 .name = "msm-pcm-dsp",
1389 .id = -1,
1390};
1391
Kiran Kandi5e809b02012-01-31 00:24:33 -08001392struct platform_device msm_multi_ch_pcm = {
1393 .name = "msm-multi-ch-pcm-dsp",
1394 .id = -1,
1395};
1396
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001397struct platform_device msm_pcm_routing = {
1398 .name = "msm-pcm-routing",
1399 .id = -1,
1400};
1401
1402struct platform_device msm_cpudai0 = {
1403 .name = "msm-dai-q6",
1404 .id = 0x4000,
1405};
1406
1407struct platform_device msm_cpudai1 = {
1408 .name = "msm-dai-q6",
1409 .id = 0x4001,
1410};
1411
1412struct platform_device msm_cpudai_hdmi_rx = {
Kiran Kandi5e809b02012-01-31 00:24:33 -08001413 .name = "msm-dai-q6-hdmi",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001414 .id = 8,
1415};
1416
1417struct platform_device msm_cpudai_bt_rx = {
1418 .name = "msm-dai-q6",
1419 .id = 0x3000,
1420};
1421
1422struct platform_device msm_cpudai_bt_tx = {
1423 .name = "msm-dai-q6",
1424 .id = 0x3001,
1425};
1426
1427struct platform_device msm_cpudai_fm_rx = {
1428 .name = "msm-dai-q6",
1429 .id = 0x3004,
1430};
1431
1432struct platform_device msm_cpudai_fm_tx = {
1433 .name = "msm-dai-q6",
1434 .id = 0x3005,
1435};
1436
Helen Zeng0705a5f2011-10-14 15:29:52 -07001437struct platform_device msm_cpudai_incall_music_rx = {
1438 .name = "msm-dai-q6",
1439 .id = 0x8005,
1440};
1441
Helen Zenge3d716a2011-10-14 16:32:16 -07001442struct platform_device msm_cpudai_incall_record_rx = {
1443 .name = "msm-dai-q6",
1444 .id = 0x8004,
1445};
1446
1447struct platform_device msm_cpudai_incall_record_tx = {
1448 .name = "msm-dai-q6",
1449 .id = 0x8003,
1450};
1451
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001452/*
1453 * Machine specific data for AUX PCM Interface
1454 * which the driver will be unware of.
1455 */
1456struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1457 .clk = "pcm_clk",
1458 .mode = AFE_PCM_CFG_MODE_PCM,
1459 .sync = AFE_PCM_CFG_SYNC_INT,
1460 .frame = AFE_PCM_CFG_FRM_256BPF,
1461 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1462 .slot = 0,
1463 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1464 .pcm_clk_rate = 2048000,
1465};
1466
1467struct platform_device msm_cpudai_auxpcm_rx = {
1468 .name = "msm-dai-q6",
1469 .id = 2,
1470 .dev = {
1471 .platform_data = &auxpcm_rx_pdata,
1472 },
1473};
1474
1475struct platform_device msm_cpudai_auxpcm_tx = {
1476 .name = "msm-dai-q6",
1477 .id = 3,
1478};
1479
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001480struct platform_device msm_cpu_fe = {
1481 .name = "msm-dai-fe",
1482 .id = -1,
1483};
1484
1485struct platform_device msm_stub_codec = {
1486 .name = "msm-stub-codec",
1487 .id = 1,
1488};
1489
1490struct platform_device msm_voice = {
1491 .name = "msm-pcm-voice",
1492 .id = -1,
1493};
1494
1495struct platform_device msm_voip = {
1496 .name = "msm-voip-dsp",
1497 .id = -1,
1498};
1499
1500struct platform_device msm_lpa_pcm = {
1501 .name = "msm-pcm-lpa",
1502 .id = -1,
1503};
1504
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301505struct platform_device msm_compr_dsp = {
1506 .name = "msm-compr-dsp",
1507 .id = -1,
1508};
1509
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001510struct platform_device msm_pcm_hostless = {
1511 .name = "msm-pcm-hostless",
1512 .id = -1,
1513};
1514
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301515struct platform_device msm_cpudai_afe_01_rx = {
1516 .name = "msm-dai-q6",
1517 .id = 0xE0,
1518};
1519
1520struct platform_device msm_cpudai_afe_01_tx = {
1521 .name = "msm-dai-q6",
1522 .id = 0xF0,
1523};
1524
1525struct platform_device msm_cpudai_afe_02_rx = {
1526 .name = "msm-dai-q6",
1527 .id = 0xF1,
1528};
1529
1530struct platform_device msm_cpudai_afe_02_tx = {
1531 .name = "msm-dai-q6",
1532 .id = 0xE1,
1533};
1534
1535struct platform_device msm_pcm_afe = {
1536 .name = "msm-pcm-afe",
1537 .id = -1,
1538};
1539
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001540struct platform_device *msm_footswitch_devices[] = {
Ravishangar Kalyanamb31a0e42012-01-19 16:02:34 -08001541 FS_8X60(FS_MDP, "fs_mdp"),
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001542 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001543 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1544 FS_8X60(FS_VFE, "fs_vfe"),
1545 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001546 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1547 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1548 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001549 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001550};
1551unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1552
1553#ifdef CONFIG_MSM_ROTATOR
1554#define ROTATOR_HW_BASE 0x04E00000
1555static struct resource resources_msm_rotator[] = {
1556 {
1557 .start = ROTATOR_HW_BASE,
1558 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1559 .flags = IORESOURCE_MEM,
1560 },
1561 {
1562 .start = ROT_IRQ,
1563 .end = ROT_IRQ,
1564 .flags = IORESOURCE_IRQ,
1565 },
1566};
1567
1568static struct msm_rot_clocks rotator_clocks[] = {
1569 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001570 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001571 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001572 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001573 },
1574 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001575 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001576 .clk_type = ROTATOR_PCLK,
1577 .clk_rate = 0,
1578 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001579};
1580
1581static struct msm_rotator_platform_data rotator_pdata = {
1582 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1583 .hardware_version_number = 0x01020309,
1584 .rotator_clks = rotator_clocks,
1585 .regulator_name = "fs_rot",
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -08001586#ifdef CONFIG_MSM_BUS_SCALING
1587 .bus_scale_table = &rotator_bus_scale_pdata,
1588#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001589};
1590
1591struct platform_device msm_rotator_device = {
1592 .name = "msm_rotator",
1593 .id = 0,
1594 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1595 .resource = resources_msm_rotator,
1596 .dev = {
1597 .platform_data = &rotator_pdata,
1598 },
1599};
1600#endif
1601
1602#define MIPI_DSI_HW_BASE 0x04700000
1603#define MDP_HW_BASE 0x05100000
1604
1605static struct resource msm_mipi_dsi1_resources[] = {
1606 {
1607 .name = "mipi_dsi",
1608 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001609 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001610 .flags = IORESOURCE_MEM,
1611 },
1612 {
1613 .start = DSI1_IRQ,
1614 .end = DSI1_IRQ,
1615 .flags = IORESOURCE_IRQ,
1616 },
1617};
1618
1619struct platform_device msm_mipi_dsi1_device = {
1620 .name = "mipi_dsi",
1621 .id = 1,
1622 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1623 .resource = msm_mipi_dsi1_resources,
1624};
1625
1626static struct resource msm_mdp_resources[] = {
1627 {
1628 .name = "mdp",
1629 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001630 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001631 .flags = IORESOURCE_MEM,
1632 },
1633 {
1634 .start = MDP_IRQ,
1635 .end = MDP_IRQ,
1636 .flags = IORESOURCE_IRQ,
1637 },
1638};
1639
1640static struct platform_device msm_mdp_device = {
1641 .name = "mdp",
1642 .id = 0,
1643 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1644 .resource = msm_mdp_resources,
1645};
1646
1647static void __init msm_register_device(struct platform_device *pdev, void *data)
1648{
1649 int ret;
1650
1651 pdev->dev.platform_data = data;
1652 ret = platform_device_register(pdev);
1653 if (ret)
1654 dev_err(&pdev->dev,
1655 "%s: platform_device_register() failed = %d\n",
1656 __func__, ret);
1657}
1658
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001659#ifdef CONFIG_MSM_BUS_SCALING
1660static struct platform_device msm_dtv_device = {
1661 .name = "dtv",
1662 .id = 0,
1663};
1664#endif
1665
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -08001666struct platform_device msm_lvds_device = {
Huaibin Yang4a084e32011-12-15 15:25:52 -08001667 .name = "lvds",
1668 .id = 0,
1669};
1670
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001671void __init msm_fb_register_device(char *name, void *data)
1672{
1673 if (!strncmp(name, "mdp", 3))
1674 msm_register_device(&msm_mdp_device, data);
1675 else if (!strncmp(name, "mipi_dsi", 8))
1676 msm_register_device(&msm_mipi_dsi1_device, data);
Huaibin Yang4a084e32011-12-15 15:25:52 -08001677 else if (!strncmp(name, "lvds", 4))
1678 msm_register_device(&msm_lvds_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001679#ifdef CONFIG_MSM_BUS_SCALING
1680 else if (!strncmp(name, "dtv", 3))
1681 msm_register_device(&msm_dtv_device, data);
1682#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001683 else
1684 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1685}
1686
1687static struct resource resources_sps[] = {
1688 {
1689 .name = "pipe_mem",
1690 .start = 0x12800000,
1691 .end = 0x12800000 + 0x4000 - 1,
1692 .flags = IORESOURCE_MEM,
1693 },
1694 {
1695 .name = "bamdma_dma",
1696 .start = 0x12240000,
1697 .end = 0x12240000 + 0x1000 - 1,
1698 .flags = IORESOURCE_MEM,
1699 },
1700 {
1701 .name = "bamdma_bam",
1702 .start = 0x12244000,
1703 .end = 0x12244000 + 0x4000 - 1,
1704 .flags = IORESOURCE_MEM,
1705 },
1706 {
1707 .name = "bamdma_irq",
1708 .start = SPS_BAM_DMA_IRQ,
1709 .end = SPS_BAM_DMA_IRQ,
1710 .flags = IORESOURCE_IRQ,
1711 },
1712};
1713
1714struct msm_sps_platform_data msm_sps_pdata = {
1715 .bamdma_restricted_pipes = 0x06,
1716};
1717
1718struct platform_device msm_device_sps = {
1719 .name = "msm_sps",
1720 .id = -1,
1721 .num_resources = ARRAY_SIZE(resources_sps),
1722 .resource = resources_sps,
1723 .dev.platform_data = &msm_sps_pdata,
1724};
1725
1726#ifdef CONFIG_MSM_MPM
Praveen Chidambaram78499012011-11-01 17:15:17 -06001727static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001728 [1] = MSM_GPIO_TO_INT(46),
1729 [2] = MSM_GPIO_TO_INT(150),
1730 [4] = MSM_GPIO_TO_INT(103),
1731 [5] = MSM_GPIO_TO_INT(104),
1732 [6] = MSM_GPIO_TO_INT(105),
1733 [7] = MSM_GPIO_TO_INT(106),
1734 [8] = MSM_GPIO_TO_INT(107),
1735 [9] = MSM_GPIO_TO_INT(7),
1736 [10] = MSM_GPIO_TO_INT(11),
1737 [11] = MSM_GPIO_TO_INT(15),
1738 [12] = MSM_GPIO_TO_INT(19),
1739 [13] = MSM_GPIO_TO_INT(23),
1740 [14] = MSM_GPIO_TO_INT(27),
1741 [15] = MSM_GPIO_TO_INT(31),
1742 [16] = MSM_GPIO_TO_INT(35),
1743 [19] = MSM_GPIO_TO_INT(90),
1744 [20] = MSM_GPIO_TO_INT(92),
1745 [23] = MSM_GPIO_TO_INT(85),
1746 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001747 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001748 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001749 [29] = MSM_GPIO_TO_INT(10),
1750 [30] = MSM_GPIO_TO_INT(102),
1751 [31] = MSM_GPIO_TO_INT(81),
1752 [32] = MSM_GPIO_TO_INT(78),
1753 [33] = MSM_GPIO_TO_INT(94),
1754 [34] = MSM_GPIO_TO_INT(72),
1755 [35] = MSM_GPIO_TO_INT(39),
1756 [36] = MSM_GPIO_TO_INT(43),
1757 [37] = MSM_GPIO_TO_INT(61),
1758 [38] = MSM_GPIO_TO_INT(50),
1759 [39] = MSM_GPIO_TO_INT(42),
1760 [41] = MSM_GPIO_TO_INT(62),
1761 [42] = MSM_GPIO_TO_INT(76),
1762 [43] = MSM_GPIO_TO_INT(75),
1763 [44] = MSM_GPIO_TO_INT(70),
1764 [45] = MSM_GPIO_TO_INT(69),
1765 [46] = MSM_GPIO_TO_INT(67),
1766 [47] = MSM_GPIO_TO_INT(65),
1767 [48] = MSM_GPIO_TO_INT(58),
1768 [49] = MSM_GPIO_TO_INT(54),
1769 [50] = MSM_GPIO_TO_INT(52),
1770 [51] = MSM_GPIO_TO_INT(49),
1771 [52] = MSM_GPIO_TO_INT(40),
1772 [53] = MSM_GPIO_TO_INT(37),
1773 [54] = MSM_GPIO_TO_INT(24),
1774 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001775};
1776
Praveen Chidambaram78499012011-11-01 17:15:17 -06001777static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001778 TLMM_MSM_SUMMARY_IRQ,
1779 RPM_APCC_CPU0_GP_HIGH_IRQ,
1780 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1781 RPM_APCC_CPU0_GP_LOW_IRQ,
1782 RPM_APCC_CPU0_WAKE_UP_IRQ,
1783 RPM_APCC_CPU1_GP_HIGH_IRQ,
1784 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1785 RPM_APCC_CPU1_GP_LOW_IRQ,
1786 RPM_APCC_CPU1_WAKE_UP_IRQ,
1787 MSS_TO_APPS_IRQ_0,
1788 MSS_TO_APPS_IRQ_1,
1789 MSS_TO_APPS_IRQ_2,
1790 MSS_TO_APPS_IRQ_3,
1791 MSS_TO_APPS_IRQ_4,
1792 MSS_TO_APPS_IRQ_5,
1793 MSS_TO_APPS_IRQ_6,
1794 MSS_TO_APPS_IRQ_7,
1795 MSS_TO_APPS_IRQ_8,
1796 MSS_TO_APPS_IRQ_9,
1797 LPASS_SCSS_GP_LOW_IRQ,
1798 LPASS_SCSS_GP_MEDIUM_IRQ,
1799 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001800 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001801 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001802 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001803 RIVA_APPS_WLAN_SMSM_IRQ,
1804 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1805 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001806};
1807
Praveen Chidambaram78499012011-11-01 17:15:17 -06001808struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001809 .irqs_m2a = msm_mpm_irqs_m2a,
1810 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1811 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1812 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1813 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1814 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1815 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1816 .mpm_apps_ipc_val = BIT(1),
1817 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1818
1819};
1820#endif
1821
Stephen Boydbb600ae2011-08-02 20:11:40 -07001822static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001823 CLK_DUMMY("pll2", PLL2, NULL, 0),
1824 CLK_DUMMY("pll8", PLL8, NULL, 0),
1825 CLK_DUMMY("pll4", PLL4, NULL, 0),
1826
1827 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1828 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1829 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1830 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1831 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1832 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1833 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1834 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1835 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1836 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1837 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1838 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1839 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1840 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1841 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1842 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1843
Matt Wagantalle2522372011-08-17 14:52:21 -07001844 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1845 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1846 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1847 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1848 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1849 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1850 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1851 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1852 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1853 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1854 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1855 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001856 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1857 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1858 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1859 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1860 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1861 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1862 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1863 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1864 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1865 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1866 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1867 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001868 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001869 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001870 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001871 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1872 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1873 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1874 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1875 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001876 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001877 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08001878 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1879 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
1880 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1881 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1882 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1883 CLK_DUMMY("src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1884 CLK_DUMMY("alt_core_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1885 CLK_DUMMY("sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001886 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1887 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001888 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1889 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001890 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001891 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001892 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001893 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001894 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001895 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1896 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1897 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1898 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1899 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1900 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1901 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001902 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08001903 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
1904 CLK_DUMMY("iface_clk", USB_FS2_P_CLK, NULL, OFF),
1905 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001906 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1907 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1908 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1909 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1910 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001911 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1912 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001913 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1914 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1915 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1916 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1917 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001918 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1919 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1920 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1921 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1922 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1923 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1924 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1925 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1926 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1927 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1928 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1929 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1930 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1931 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1932 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001933 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1934 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1935 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001936 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001937 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001938 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001939 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1940 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1941 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001942 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001943 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1944 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1945 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001946 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001947 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1948 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1949 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1950 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1951 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1952 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1953 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1954 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1955 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001956 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001957 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1958 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1959 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1960 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1961 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1962 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1963 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1964 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1965 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1966 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001967 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1968 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1969 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001970 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1971 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1972 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1973 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001974 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001975 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001976 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001977 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001978 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1979 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1980 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1981 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1982 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1983 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1984 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1985 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1986 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1987 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1988 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1989 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1990 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1991 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1992 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001993 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1994 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1995 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1996 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1997 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1998 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001999
2000 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08002001 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, "msm_otg", NULL),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002002 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
2003 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
2004 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
2005 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
2006 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002007 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2008 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
2009};
2010
Stephen Boydbb600ae2011-08-02 20:11:40 -07002011struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
2012 .table = msm_clocks_8960_dummy,
2013 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
2014};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002015
2016#define LPASS_SLIMBUS_PHYS 0x28080000
2017#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06002018#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002019/* Board info for the slimbus slave device */
2020static struct resource slimbus_res[] = {
2021 {
2022 .start = LPASS_SLIMBUS_PHYS,
2023 .end = LPASS_SLIMBUS_PHYS + 8191,
2024 .flags = IORESOURCE_MEM,
2025 .name = "slimbus_physical",
2026 },
2027 {
2028 .start = LPASS_SLIMBUS_BAM_PHYS,
2029 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
2030 .flags = IORESOURCE_MEM,
2031 .name = "slimbus_bam_physical",
2032 },
2033 {
Sagar Dhariacc969452011-09-19 10:34:30 -06002034 .start = LPASS_SLIMBUS_SLEW,
2035 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
2036 .flags = IORESOURCE_MEM,
2037 .name = "slimbus_slew_reg",
2038 },
2039 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002040 .start = SLIMBUS0_CORE_EE1_IRQ,
2041 .end = SLIMBUS0_CORE_EE1_IRQ,
2042 .flags = IORESOURCE_IRQ,
2043 .name = "slimbus_irq",
2044 },
2045 {
2046 .start = SLIMBUS0_BAM_EE1_IRQ,
2047 .end = SLIMBUS0_BAM_EE1_IRQ,
2048 .flags = IORESOURCE_IRQ,
2049 .name = "slimbus_bam_irq",
2050 },
2051};
2052
2053struct platform_device msm_slim_ctrl = {
2054 .name = "msm_slim_ctrl",
2055 .id = 1,
2056 .num_resources = ARRAY_SIZE(slimbus_res),
2057 .resource = slimbus_res,
2058 .dev = {
2059 .coherent_dma_mask = 0xffffffffULL,
2060 },
2061};
2062
2063#ifdef CONFIG_MSM_BUS_SCALING
2064static struct msm_bus_vectors grp3d_init_vectors[] = {
2065 {
2066 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2067 .dst = MSM_BUS_SLAVE_EBI_CH0,
2068 .ab = 0,
2069 .ib = 0,
2070 },
2071};
2072
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002073static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002074 {
2075 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2076 .dst = MSM_BUS_SLAVE_EBI_CH0,
2077 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002078 .ib = KGSL_CONVERT_TO_MBPS(1000),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002079 },
2080};
2081
2082static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2083 {
2084 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2085 .dst = MSM_BUS_SLAVE_EBI_CH0,
2086 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002087 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002088 },
2089};
2090
2091static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2092 {
2093 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2094 .dst = MSM_BUS_SLAVE_EBI_CH0,
2095 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002096 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002097 },
2098};
2099
2100static struct msm_bus_vectors grp3d_max_vectors[] = {
2101 {
2102 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2103 .dst = MSM_BUS_SLAVE_EBI_CH0,
2104 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002105 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002106 },
2107};
2108
2109static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2110 {
2111 ARRAY_SIZE(grp3d_init_vectors),
2112 grp3d_init_vectors,
2113 },
2114 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002115 ARRAY_SIZE(grp3d_low_vectors),
2116 grp3d_low_vectors,
2117 },
2118 {
2119 ARRAY_SIZE(grp3d_nominal_low_vectors),
2120 grp3d_nominal_low_vectors,
2121 },
2122 {
2123 ARRAY_SIZE(grp3d_nominal_high_vectors),
2124 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002125 },
2126 {
2127 ARRAY_SIZE(grp3d_max_vectors),
2128 grp3d_max_vectors,
2129 },
2130};
2131
2132static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2133 grp3d_bus_scale_usecases,
2134 ARRAY_SIZE(grp3d_bus_scale_usecases),
2135 .name = "grp3d",
2136};
2137
2138static struct msm_bus_vectors grp2d0_init_vectors[] = {
2139 {
2140 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2141 .dst = MSM_BUS_SLAVE_EBI_CH0,
2142 .ab = 0,
2143 .ib = 0,
2144 },
2145};
2146
Lucille Sylvester808eca22011-11-03 10:26:29 -07002147static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002148 {
2149 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2150 .dst = MSM_BUS_SLAVE_EBI_CH0,
2151 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002152 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002153 },
2154};
2155
Lucille Sylvester808eca22011-11-03 10:26:29 -07002156static struct msm_bus_vectors grp2d0_max_vectors[] = {
2157 {
2158 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2159 .dst = MSM_BUS_SLAVE_EBI_CH0,
2160 .ab = 0,
2161 .ib = KGSL_CONVERT_TO_MBPS(2048),
2162 },
2163};
2164
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002165static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2166 {
2167 ARRAY_SIZE(grp2d0_init_vectors),
2168 grp2d0_init_vectors,
2169 },
2170 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002171 ARRAY_SIZE(grp2d0_nominal_vectors),
2172 grp2d0_nominal_vectors,
2173 },
2174 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002175 ARRAY_SIZE(grp2d0_max_vectors),
2176 grp2d0_max_vectors,
2177 },
2178};
2179
2180struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2181 grp2d0_bus_scale_usecases,
2182 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2183 .name = "grp2d0",
2184};
2185
2186static struct msm_bus_vectors grp2d1_init_vectors[] = {
2187 {
2188 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2189 .dst = MSM_BUS_SLAVE_EBI_CH0,
2190 .ab = 0,
2191 .ib = 0,
2192 },
2193};
2194
Lucille Sylvester808eca22011-11-03 10:26:29 -07002195static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002196 {
2197 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2198 .dst = MSM_BUS_SLAVE_EBI_CH0,
2199 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002200 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002201 },
2202};
2203
Lucille Sylvester808eca22011-11-03 10:26:29 -07002204static struct msm_bus_vectors grp2d1_max_vectors[] = {
2205 {
2206 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2207 .dst = MSM_BUS_SLAVE_EBI_CH0,
2208 .ab = 0,
2209 .ib = KGSL_CONVERT_TO_MBPS(2048),
2210 },
2211};
2212
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002213static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2214 {
2215 ARRAY_SIZE(grp2d1_init_vectors),
2216 grp2d1_init_vectors,
2217 },
2218 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002219 ARRAY_SIZE(grp2d1_nominal_vectors),
2220 grp2d1_nominal_vectors,
2221 },
2222 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002223 ARRAY_SIZE(grp2d1_max_vectors),
2224 grp2d1_max_vectors,
2225 },
2226};
2227
2228struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2229 grp2d1_bus_scale_usecases,
2230 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2231 .name = "grp2d1",
2232};
2233#endif
2234
2235static struct resource kgsl_3d0_resources[] = {
2236 {
2237 .name = KGSL_3D0_REG_MEMORY,
2238 .start = 0x04300000, /* GFX3D address */
2239 .end = 0x0431ffff,
2240 .flags = IORESOURCE_MEM,
2241 },
2242 {
2243 .name = KGSL_3D0_IRQ,
2244 .start = GFX3D_IRQ,
2245 .end = GFX3D_IRQ,
2246 .flags = IORESOURCE_IRQ,
2247 },
2248};
2249
2250static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002251 .pwrlevel = {
2252 {
2253 .gpu_freq = 400000000,
2254 .bus_freq = 4,
2255 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002256 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002257 {
2258 .gpu_freq = 300000000,
2259 .bus_freq = 3,
2260 .io_fraction = 33,
2261 },
2262 {
2263 .gpu_freq = 200000000,
2264 .bus_freq = 2,
2265 .io_fraction = 100,
2266 },
2267 {
2268 .gpu_freq = 128000000,
2269 .bus_freq = 1,
2270 .io_fraction = 100,
2271 },
2272 {
2273 .gpu_freq = 27000000,
2274 .bus_freq = 0,
2275 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002276 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002277 .init_level = 0,
2278 .num_levels = 5,
2279 .set_grp_async = NULL,
Lucille Sylvester93650bb2011-11-02 14:37:10 -07002280 .idle_timeout = HZ/20,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002281 .nap_allowed = true,
2282 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002283#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002284 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002285#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002286 .iommu_user_ctx_name = "gfx3d_user",
2287 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002288};
2289
2290struct platform_device msm_kgsl_3d0 = {
2291 .name = "kgsl-3d0",
2292 .id = 0,
2293 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2294 .resource = kgsl_3d0_resources,
2295 .dev = {
2296 .platform_data = &kgsl_3d0_pdata,
2297 },
2298};
2299
2300static struct resource kgsl_2d0_resources[] = {
2301 {
2302 .name = KGSL_2D0_REG_MEMORY,
2303 .start = 0x04100000, /* Z180 base address */
2304 .end = 0x04100FFF,
2305 .flags = IORESOURCE_MEM,
2306 },
2307 {
2308 .name = KGSL_2D0_IRQ,
2309 .start = GFX2D0_IRQ,
2310 .end = GFX2D0_IRQ,
2311 .flags = IORESOURCE_IRQ,
2312 },
2313};
2314
2315static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002316 .pwrlevel = {
2317 {
2318 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002319 .bus_freq = 2,
2320 },
2321 {
2322 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002323 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002324 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002325 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002326 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002327 .bus_freq = 0,
2328 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002329 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002330 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002331 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002332 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002333 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002334 .nap_allowed = true,
2335 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002336#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002337 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002338#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002339 .iommu_user_ctx_name = "gfx2d0_2d0",
2340 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002341};
2342
2343struct platform_device msm_kgsl_2d0 = {
2344 .name = "kgsl-2d0",
2345 .id = 0,
2346 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2347 .resource = kgsl_2d0_resources,
2348 .dev = {
2349 .platform_data = &kgsl_2d0_pdata,
2350 },
2351};
2352
2353static struct resource kgsl_2d1_resources[] = {
2354 {
2355 .name = KGSL_2D1_REG_MEMORY,
2356 .start = 0x04200000, /* Z180 device 1 base address */
2357 .end = 0x04200FFF,
2358 .flags = IORESOURCE_MEM,
2359 },
2360 {
2361 .name = KGSL_2D1_IRQ,
2362 .start = GFX2D1_IRQ,
2363 .end = GFX2D1_IRQ,
2364 .flags = IORESOURCE_IRQ,
2365 },
2366};
2367
2368static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002369 .pwrlevel = {
2370 {
2371 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002372 .bus_freq = 2,
2373 },
2374 {
2375 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002376 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002377 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002378 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002379 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002380 .bus_freq = 0,
2381 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002382 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002383 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002384 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002385 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002386 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002387 .nap_allowed = true,
2388 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002389#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002390 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002391#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002392 .iommu_user_ctx_name = "gfx2d1_2d1",
2393 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002394};
2395
2396struct platform_device msm_kgsl_2d1 = {
2397 .name = "kgsl-2d1",
2398 .id = 1,
2399 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2400 .resource = kgsl_2d1_resources,
2401 .dev = {
2402 .platform_data = &kgsl_2d1_pdata,
2403 },
2404};
2405
2406#ifdef CONFIG_MSM_GEMINI
2407static struct resource msm_gemini_resources[] = {
2408 {
2409 .start = 0x04600000,
2410 .end = 0x04600000 + SZ_1M - 1,
2411 .flags = IORESOURCE_MEM,
2412 },
2413 {
2414 .start = JPEG_IRQ,
2415 .end = JPEG_IRQ,
2416 .flags = IORESOURCE_IRQ,
2417 },
2418};
2419
2420struct platform_device msm8960_gemini_device = {
2421 .name = "msm_gemini",
2422 .resource = msm_gemini_resources,
2423 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2424};
2425#endif
2426
Praveen Chidambaram78499012011-11-01 17:15:17 -06002427struct msm_rpm_platform_data msm8960_rpm_data __initdata = {
2428 .reg_base_addrs = {
2429 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
2430 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
2431 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
2432 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
2433 },
2434 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
2435 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
2436 .ipc_rpm_val = 4,
2437 .target_id = {
2438 MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
2439 MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
2440 MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8),
2441 MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2442 MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2443 MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1),
2444 MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1),
2445 MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1),
2446 MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2447 MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2448 MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2449 MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2450 MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1),
2451 MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1),
2452 MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1),
2453 MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1),
2454 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0,
2455 APPS_FABRIC_CFG_HALT, 2),
2456 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0,
2457 APPS_FABRIC_CFG_CLKMOD, 3),
2458 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL,
2459 APPS_FABRIC_CFG_IOCTL, 1),
2460 MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2461 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0,
2462 SYS_FABRIC_CFG_HALT, 2),
2463 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0,
2464 SYS_FABRIC_CFG_CLKMOD, 3),
2465 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL,
2466 SYS_FABRIC_CFG_IOCTL, 1),
2467 MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0,
2468 SYSTEM_FABRIC_ARB, 29),
2469 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0,
2470 MMSS_FABRIC_CFG_HALT, 2),
2471 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0,
2472 MMSS_FABRIC_CFG_CLKMOD, 3),
2473 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL,
2474 MMSS_FABRIC_CFG_IOCTL, 1),
2475 MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2476 MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2),
2477 MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2),
2478 MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2),
2479 MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2),
2480 MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2),
2481 MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2),
2482 MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2),
2483 MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2),
2484 MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2),
2485 MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2),
2486 MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2),
2487 MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2),
2488 MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2),
2489 MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2),
2490 MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2),
2491 MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2),
2492 MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2),
2493 MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2),
2494 MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2),
2495 MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2),
2496 MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2),
2497 MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2),
2498 MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2),
2499 MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2),
2500 MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2),
2501 MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2),
2502 MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2),
2503 MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2),
2504 MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2),
2505 MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2),
2506 MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2),
2507 MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2),
2508 MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2),
2509 MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2),
2510 MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2),
2511 MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2),
2512 MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2),
2513 MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2),
2514 MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2),
2515 MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1),
2516 MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1),
2517 MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1),
2518 MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1),
2519 MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1),
2520 MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1),
2521 MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1),
2522 MSM_RPM_MAP(8960, NCP_0, NCP, 2),
2523 MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1),
2524 MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2525 MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1),
2526 MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2),
2527 MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1),
2528 },
2529 .target_status = {
2530 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR),
2531 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR),
2532 MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD),
2533 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0),
2534 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1),
2535 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2),
2536 MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0),
2537 MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE),
2538 MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL),
2539 MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK),
2540 MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK),
2541 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK),
2542 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK),
2543 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK),
2544 MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK),
2545 MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK),
2546 MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK),
2547 MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK),
2548 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK),
2549 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT),
2550 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD),
2551 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL),
2552 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB),
2553 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT),
2554 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD),
2555 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL),
2556 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB),
2557 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT),
2558 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD),
2559 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL),
2560 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB),
2561 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0),
2562 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1),
2563 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0),
2564 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1),
2565 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0),
2566 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1),
2567 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0),
2568 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1),
2569 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0),
2570 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1),
2571 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0),
2572 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1),
2573 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0),
2574 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1),
2575 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0),
2576 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1),
2577 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0),
2578 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1),
2579 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0),
2580 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1),
2581 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0),
2582 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1),
2583 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0),
2584 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1),
2585 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0),
2586 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1),
2587 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0),
2588 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1),
2589 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0),
2590 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1),
2591 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0),
2592 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1),
2593 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0),
2594 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1),
2595 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0),
2596 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1),
2597 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0),
2598 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1),
2599 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0),
2600 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1),
2601 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0),
2602 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1),
2603 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0),
2604 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1),
2605 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0),
2606 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1),
2607 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0),
2608 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1),
2609 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0),
2610 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1),
2611 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0),
2612 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1),
2613 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0),
2614 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1),
2615 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0),
2616 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1),
2617 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0),
2618 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1),
2619 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0),
2620 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1),
2621 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0),
2622 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1),
2623 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0),
2624 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1),
2625 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0),
2626 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1),
2627 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0),
2628 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1),
2629 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0),
2630 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1),
2631 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0),
2632 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1),
2633 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0),
2634 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1),
2635 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0),
2636 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1),
2637 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0),
2638 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1),
2639 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1),
2640 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2),
2641 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3),
2642 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4),
2643 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5),
2644 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6),
2645 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7),
2646 MSM_RPM_STATUS_ID_MAP(8960, NCP_0),
2647 MSM_RPM_STATUS_ID_MAP(8960, NCP_1),
2648 MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS),
2649 MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH),
2650 MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH),
2651 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0),
2652 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1),
2653 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE),
2654 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE),
2655 },
2656 .target_ctrl_id = {
2657 MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR),
2658 MSM_RPM_CTRL_MAP(8960, VERSION_MINOR),
2659 MSM_RPM_CTRL_MAP(8960, VERSION_BUILD),
2660 MSM_RPM_CTRL_MAP(8960, REQ_CTX_0),
2661 MSM_RPM_CTRL_MAP(8960, REQ_SEL_0),
2662 MSM_RPM_CTRL_MAP(8960, ACK_CTX_0),
2663 MSM_RPM_CTRL_MAP(8960, ACK_SEL_0),
2664 },
2665 .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE,
2666 .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION,
2667 .sel_last = MSM_RPM_8960_SEL_LAST,
2668 .ver = {3, 0, 0},
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002669};
Praveen Chidambaram8985b012011-12-16 13:38:59 -07002670
Praveen Chidambaram78499012011-11-01 17:15:17 -06002671struct platform_device msm8960_rpm_device = {
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002672 .name = "msm_rpm",
2673 .id = -1,
2674};
2675
Praveen Chidambaram78499012011-11-01 17:15:17 -06002676static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
2677 .phys_addr_base = 0x0010C000,
2678 .reg_offsets = {
2679 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
2680 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
2681 },
2682 .phys_size = SZ_8K,
2683 .log_len = 4096, /* log's buffer length in bytes */
2684 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
2685};
2686
2687struct platform_device msm8960_rpm_log_device = {
2688 .name = "msm_rpm_log",
2689 .id = -1,
2690 .dev = {
2691 .platform_data = &msm_rpm_log_pdata,
2692 },
2693};
2694
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002695static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2696 .phys_addr_base = 0x0010D204,
2697 .phys_size = SZ_8K,
2698};
2699
Praveen Chidambaram78499012011-11-01 17:15:17 -06002700struct platform_device msm8960_rpm_stat_device = {
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002701 .name = "msm_rpm_stat",
2702 .id = -1,
2703 .dev = {
2704 .platform_data = &msm_rpm_stat_pdata,
2705 },
2706};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002707
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002708struct platform_device msm_bus_sys_fabric = {
2709 .name = "msm_bus_fabric",
2710 .id = MSM_BUS_FAB_SYSTEM,
2711};
2712struct platform_device msm_bus_apps_fabric = {
2713 .name = "msm_bus_fabric",
2714 .id = MSM_BUS_FAB_APPSS,
2715};
2716struct platform_device msm_bus_mm_fabric = {
2717 .name = "msm_bus_fabric",
2718 .id = MSM_BUS_FAB_MMSS,
2719};
2720struct platform_device msm_bus_sys_fpb = {
2721 .name = "msm_bus_fabric",
2722 .id = MSM_BUS_FAB_SYSTEM_FPB,
2723};
2724struct platform_device msm_bus_cpss_fpb = {
2725 .name = "msm_bus_fabric",
2726 .id = MSM_BUS_FAB_CPSS_FPB,
2727};
2728
2729/* Sensors DSPS platform data */
2730#ifdef CONFIG_MSM_DSPS
2731
2732#define PPSS_REG_PHYS_BASE 0x12080000
2733
2734static struct dsps_clk_info dsps_clks[] = {};
2735static struct dsps_regulator_info dsps_regs[] = {};
2736
2737/*
2738 * Note: GPIOs field is intialized in run-time at the function
2739 * msm8960_init_dsps().
2740 */
2741
2742struct msm_dsps_platform_data msm_dsps_pdata = {
2743 .clks = dsps_clks,
2744 .clks_num = ARRAY_SIZE(dsps_clks),
2745 .gpios = NULL,
2746 .gpios_num = 0,
2747 .regs = dsps_regs,
2748 .regs_num = ARRAY_SIZE(dsps_regs),
2749 .dsps_pwr_ctl_en = 1,
2750 .signature = DSPS_SIGNATURE,
2751};
2752
2753static struct resource msm_dsps_resources[] = {
2754 {
2755 .start = PPSS_REG_PHYS_BASE,
2756 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2757 .name = "ppss_reg",
2758 .flags = IORESOURCE_MEM,
2759 },
Wentao Xua55500b2011-08-16 18:15:04 -04002760
2761 {
2762 .start = PPSS_WDOG_TIMER_IRQ,
2763 .end = PPSS_WDOG_TIMER_IRQ,
2764 .name = "ppss_wdog",
2765 .flags = IORESOURCE_IRQ,
2766 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002767};
2768
2769struct platform_device msm_dsps_device = {
2770 .name = "msm_dsps",
2771 .id = 0,
2772 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2773 .resource = msm_dsps_resources,
2774 .dev.platform_data = &msm_dsps_pdata,
2775};
2776
2777#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002778
2779#ifdef CONFIG_MSM_QDSS
2780
2781#define MSM_QDSS_PHYS_BASE 0x01A00000
2782#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2783#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2784#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
2785#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2786
2787static struct resource msm_etb_resources[] = {
2788 {
2789 .start = MSM_ETB_PHYS_BASE,
2790 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2791 .flags = IORESOURCE_MEM,
2792 },
2793};
2794
2795struct platform_device msm_etb_device = {
2796 .name = "msm_etb",
2797 .id = 0,
2798 .num_resources = ARRAY_SIZE(msm_etb_resources),
2799 .resource = msm_etb_resources,
2800};
2801
2802static struct resource msm_tpiu_resources[] = {
2803 {
2804 .start = MSM_TPIU_PHYS_BASE,
2805 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2806 .flags = IORESOURCE_MEM,
2807 },
2808};
2809
2810struct platform_device msm_tpiu_device = {
2811 .name = "msm_tpiu",
2812 .id = 0,
2813 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2814 .resource = msm_tpiu_resources,
2815};
2816
2817static struct resource msm_funnel_resources[] = {
2818 {
2819 .start = MSM_FUNNEL_PHYS_BASE,
2820 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2821 .flags = IORESOURCE_MEM,
2822 },
2823};
2824
2825struct platform_device msm_funnel_device = {
2826 .name = "msm_funnel",
2827 .id = 0,
2828 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2829 .resource = msm_funnel_resources,
2830};
2831
2832static struct resource msm_ptm_resources[] = {
2833 {
2834 .start = MSM_PTM_PHYS_BASE,
2835 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2836 .flags = IORESOURCE_MEM,
2837 },
2838};
2839
2840struct platform_device msm_ptm_device = {
2841 .name = "msm_ptm",
2842 .id = 0,
2843 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2844 .resource = msm_ptm_resources,
2845};
2846
2847#endif