blob: e14d4c025f844d150b9d6340c6acffa0374769e0 [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>
Matt Wagantall39088932011-08-02 20:24:56 -070033#include <mach/msm_xo.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070034#include <sound/msm-dai-q6.h>
35#include <sound/apr_audio.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070036#include "clock.h"
37#include "devices.h"
38#include "devices-msm8x60.h"
39#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070040#include "msm_watchdog.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060041#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070042#include "pil-q6v4.h"
43#include "scm-pas.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070044
45#ifdef CONFIG_MSM_MPM
46#include "mpm.h"
47#endif
48#ifdef CONFIG_MSM_DSPS
49#include <mach/msm_dsps.h>
50#endif
51
52
53/* Address of GSBI blocks */
54#define MSM_GSBI1_PHYS 0x16000000
55#define MSM_GSBI2_PHYS 0x16100000
56#define MSM_GSBI3_PHYS 0x16200000
57#define MSM_GSBI4_PHYS 0x16300000
58#define MSM_GSBI5_PHYS 0x16400000
59#define MSM_GSBI6_PHYS 0x16500000
60#define MSM_GSBI7_PHYS 0x16600000
61#define MSM_GSBI8_PHYS 0x1A000000
62#define MSM_GSBI9_PHYS 0x1A100000
63#define MSM_GSBI10_PHYS 0x1A200000
64#define MSM_GSBI11_PHYS 0x12440000
65#define MSM_GSBI12_PHYS 0x12480000
66
67#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
68#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053069#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070070
71/* GSBI QUP devices */
72#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
73#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
74#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
75#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
76#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
77#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
78#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
79#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
80#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
81#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
82#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
83#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
84#define MSM_QUP_SIZE SZ_4K
85
86#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
87#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
88#define MSM_PMIC_SSBI_SIZE SZ_4K
89
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070090#define MSM8960_HSUSB_PHYS 0x12500000
91#define MSM8960_HSUSB_SIZE SZ_4K
92
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070093static struct resource resources_otg[] = {
94 {
95 .start = MSM8960_HSUSB_PHYS,
96 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
97 .flags = IORESOURCE_MEM,
98 },
99 {
100 .start = USB1_HS_IRQ,
101 .end = USB1_HS_IRQ,
102 .flags = IORESOURCE_IRQ,
103 },
104};
105
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700106struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700107 .name = "msm_otg",
108 .id = -1,
109 .num_resources = ARRAY_SIZE(resources_otg),
110 .resource = resources_otg,
111 .dev = {
112 .coherent_dma_mask = 0xffffffff,
113 },
114};
115
116static struct resource resources_hsusb[] = {
117 {
118 .start = MSM8960_HSUSB_PHYS,
119 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
120 .flags = IORESOURCE_MEM,
121 },
122 {
123 .start = USB1_HS_IRQ,
124 .end = USB1_HS_IRQ,
125 .flags = IORESOURCE_IRQ,
126 },
127};
128
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700129struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700130 .name = "msm_hsusb",
131 .id = -1,
132 .num_resources = ARRAY_SIZE(resources_hsusb),
133 .resource = resources_hsusb,
134 .dev = {
135 .coherent_dma_mask = 0xffffffff,
136 },
137};
138
139static struct resource resources_hsusb_host[] = {
140 {
141 .start = MSM8960_HSUSB_PHYS,
142 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
143 .flags = IORESOURCE_MEM,
144 },
145 {
146 .start = USB1_HS_IRQ,
147 .end = USB1_HS_IRQ,
148 .flags = IORESOURCE_IRQ,
149 },
150};
151
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530152static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700153struct platform_device msm_device_hsusb_host = {
154 .name = "msm_hsusb_host",
155 .id = -1,
156 .num_resources = ARRAY_SIZE(resources_hsusb_host),
157 .resource = resources_hsusb_host,
158 .dev = {
159 .dma_mask = &dma_mask,
160 .coherent_dma_mask = 0xffffffff,
161 },
162};
163
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530164static struct resource resources_hsic_host[] = {
165 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700166 .start = 0x12520000,
167 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530168 .flags = IORESOURCE_MEM,
169 },
170 {
171 .start = USB_HSIC_IRQ,
172 .end = USB_HSIC_IRQ,
173 .flags = IORESOURCE_IRQ,
174 },
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,
Matt Wagantall39088932011-08-02 20:24:56 -0700845 .xo_id = MSM_XO_PXO,
Stephen Boydeb819882011-08-29 14:46:30 -0700846 .name = "q6",
847 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700848 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700849};
850
851struct platform_device msm_8960_q6_lpass = {
852 .name = "pil_qdsp6v4",
853 .id = 0,
854 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
855 .resource = msm_8960_q6_lpass_resources,
856 .dev.platform_data = &msm_8960_q6_lpass_data,
857};
858
859#define MSM_MSS_ENABLE_PHYS 0x08B00000
860#define MSM_FW_QDSP6SS_PHYS 0x08800000
861#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
862#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
863
864static struct resource msm_8960_q6_mss_fw_resources[] = {
865 {
866 .start = MSM_FW_QDSP6SS_PHYS,
867 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
868 .flags = IORESOURCE_MEM,
869 },
870 {
871 .start = MSM_MSS_ENABLE_PHYS,
872 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
873 .flags = IORESOURCE_MEM,
874 },
875};
876
877static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
878 .strap_tcm_base = 0x00400000,
879 .strap_ahb_upper = 0x00090000,
880 .strap_ahb_lower = 0x00000080,
881 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
882 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
Matt Wagantalled90b002011-12-12 21:22:43 -0800883 .xo_id = MSM_XO_CXO,
Stephen Boydeb819882011-08-29 14:46:30 -0700884 .name = "modem_fw",
885 .depends = "q6",
886 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700887 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700888};
889
890struct platform_device msm_8960_q6_mss_fw = {
891 .name = "pil_qdsp6v4",
892 .id = 1,
893 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
894 .resource = msm_8960_q6_mss_fw_resources,
895 .dev.platform_data = &msm_8960_q6_mss_fw_data,
896};
897
898#define MSM_SW_QDSP6SS_PHYS 0x08900000
899#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
900#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
901
902static struct resource msm_8960_q6_mss_sw_resources[] = {
903 {
904 .start = MSM_SW_QDSP6SS_PHYS,
905 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
906 .flags = IORESOURCE_MEM,
907 },
908 {
909 .start = MSM_MSS_ENABLE_PHYS,
910 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
911 .flags = IORESOURCE_MEM,
912 },
913};
914
915static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
916 .strap_tcm_base = 0x00420000,
917 .strap_ahb_upper = 0x00090000,
918 .strap_ahb_lower = 0x00000080,
919 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
920 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
Matt Wagantalled90b002011-12-12 21:22:43 -0800921 .xo_id = MSM_XO_CXO,
Stephen Boydeb819882011-08-29 14:46:30 -0700922 .name = "modem",
923 .depends = "modem_fw",
924 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700925 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700926};
927
928struct platform_device msm_8960_q6_mss_sw = {
929 .name = "pil_qdsp6v4",
930 .id = 2,
931 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
932 .resource = msm_8960_q6_mss_sw_resources,
933 .dev.platform_data = &msm_8960_q6_mss_sw_data,
934};
935
Stephen Boyd322a9922011-09-20 01:05:54 -0700936static struct resource msm_8960_riva_resources[] = {
937 {
938 .start = 0x03204000,
939 .end = 0x03204000 + SZ_256 - 1,
940 .flags = IORESOURCE_MEM,
941 },
942};
943
944struct platform_device msm_8960_riva = {
945 .name = "pil_riva",
946 .id = -1,
947 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
948 .resource = msm_8960_riva_resources,
949};
950
Stephen Boydd89eebe2011-09-28 23:28:11 -0700951struct platform_device msm_pil_tzapps = {
952 .name = "pil_tzapps",
953 .id = -1,
954};
955
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700956struct platform_device msm_device_smd = {
957 .name = "msm_smd",
958 .id = -1,
959};
960
961struct platform_device msm_device_bam_dmux = {
962 .name = "BAM_RMNT",
963 .id = -1,
964};
965
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700966static struct msm_watchdog_pdata msm_watchdog_pdata = {
967 .pet_time = 10000,
968 .bark_time = 11000,
969 .has_secure = true,
970};
971
972struct platform_device msm8960_device_watchdog = {
973 .name = "msm_watchdog",
974 .id = -1,
975 .dev = {
976 .platform_data = &msm_watchdog_pdata,
977 },
978};
979
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700980static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700981 {
982 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700983 .flags = IORESOURCE_IRQ,
984 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700985 {
986 .start = 0x18320000,
987 .end = 0x18320000 + SZ_1M - 1,
988 .flags = IORESOURCE_MEM,
989 },
990};
991
992static struct msm_dmov_pdata msm_dmov_pdata = {
993 .sd = 1,
994 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700995};
996
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700997struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700998 .name = "msm_dmov",
999 .id = -1,
1000 .resource = msm_dmov_resource,
1001 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001002 .dev = {
1003 .platform_data = &msm_dmov_pdata,
1004 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001005};
1006
1007static struct platform_device *msm_sdcc_devices[] __initdata = {
1008 &msm_device_sdc1,
1009 &msm_device_sdc2,
1010 &msm_device_sdc3,
1011 &msm_device_sdc4,
1012 &msm_device_sdc5,
1013};
1014
1015int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1016{
1017 struct platform_device *pdev;
1018
1019 if (controller < 1 || controller > 5)
1020 return -EINVAL;
1021
1022 pdev = msm_sdcc_devices[controller-1];
1023 pdev->dev.platform_data = plat;
1024 return platform_device_register(pdev);
1025}
1026
1027static struct resource resources_qup_i2c_gsbi4[] = {
1028 {
1029 .name = "gsbi_qup_i2c_addr",
1030 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001031 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001032 .flags = IORESOURCE_MEM,
1033 },
1034 {
1035 .name = "qup_phys_addr",
1036 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001037 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001038 .flags = IORESOURCE_MEM,
1039 },
1040 {
1041 .name = "qup_err_intr",
1042 .start = GSBI4_QUP_IRQ,
1043 .end = GSBI4_QUP_IRQ,
1044 .flags = IORESOURCE_IRQ,
1045 },
1046};
1047
1048struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1049 .name = "qup_i2c",
1050 .id = 4,
1051 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1052 .resource = resources_qup_i2c_gsbi4,
1053};
1054
1055static struct resource resources_qup_i2c_gsbi3[] = {
1056 {
1057 .name = "gsbi_qup_i2c_addr",
1058 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001059 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001060 .flags = IORESOURCE_MEM,
1061 },
1062 {
1063 .name = "qup_phys_addr",
1064 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001065 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001066 .flags = IORESOURCE_MEM,
1067 },
1068 {
1069 .name = "qup_err_intr",
1070 .start = GSBI3_QUP_IRQ,
1071 .end = GSBI3_QUP_IRQ,
1072 .flags = IORESOURCE_IRQ,
1073 },
1074};
1075
1076struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1077 .name = "qup_i2c",
1078 .id = 3,
1079 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1080 .resource = resources_qup_i2c_gsbi3,
1081};
1082
1083static struct resource resources_qup_i2c_gsbi10[] = {
1084 {
1085 .name = "gsbi_qup_i2c_addr",
1086 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001087 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001088 .flags = IORESOURCE_MEM,
1089 },
1090 {
1091 .name = "qup_phys_addr",
1092 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001093 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001094 .flags = IORESOURCE_MEM,
1095 },
1096 {
1097 .name = "qup_err_intr",
1098 .start = GSBI10_QUP_IRQ,
1099 .end = GSBI10_QUP_IRQ,
1100 .flags = IORESOURCE_IRQ,
1101 },
1102};
1103
1104struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1105 .name = "qup_i2c",
1106 .id = 10,
1107 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1108 .resource = resources_qup_i2c_gsbi10,
1109};
1110
1111static struct resource resources_qup_i2c_gsbi12[] = {
1112 {
1113 .name = "gsbi_qup_i2c_addr",
1114 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001115 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001116 .flags = IORESOURCE_MEM,
1117 },
1118 {
1119 .name = "qup_phys_addr",
1120 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001121 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001122 .flags = IORESOURCE_MEM,
1123 },
1124 {
1125 .name = "qup_err_intr",
1126 .start = GSBI12_QUP_IRQ,
1127 .end = GSBI12_QUP_IRQ,
1128 .flags = IORESOURCE_IRQ,
1129 },
1130};
1131
1132struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1133 .name = "qup_i2c",
1134 .id = 12,
1135 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1136 .resource = resources_qup_i2c_gsbi12,
1137};
1138
1139#ifdef CONFIG_MSM_CAMERA
1140struct resource msm_camera_resources[] = {
1141 {
Nishant Pandit24153d82011-08-27 16:05:13 +05301142 .name = "s3d_rw",
1143 .start = 0x008003E0,
1144 .end = 0x008003E0 + SZ_16 - 1,
1145 .flags = IORESOURCE_MEM,
1146 },
1147 {
1148 .name = "s3d_ctl",
1149 .start = 0x008020B8,
1150 .end = 0x008020B8 + SZ_16 - 1,
1151 .flags = IORESOURCE_MEM,
1152 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001153};
1154
1155int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1156{
1157 s_info->resource = msm_camera_resources;
1158 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1159 return 0;
1160}
Kevin Chanf6216f22011-10-25 18:40:11 -07001161
1162static struct resource msm_csiphy0_resources[] = {
1163 {
1164 .name = "csiphy",
1165 .start = 0x04800C00,
1166 .end = 0x04800C00 + SZ_1K - 1,
1167 .flags = IORESOURCE_MEM,
1168 },
1169 {
1170 .name = "csiphy",
1171 .start = CSIPHY_4LN_IRQ,
1172 .end = CSIPHY_4LN_IRQ,
1173 .flags = IORESOURCE_IRQ,
1174 },
1175};
1176
1177static struct resource msm_csiphy1_resources[] = {
1178 {
1179 .name = "csiphy",
1180 .start = 0x04801000,
1181 .end = 0x04801000 + SZ_1K - 1,
1182 .flags = IORESOURCE_MEM,
1183 },
1184 {
1185 .name = "csiphy",
1186 .start = MSM8960_CSIPHY_2LN_IRQ,
1187 .end = MSM8960_CSIPHY_2LN_IRQ,
1188 .flags = IORESOURCE_IRQ,
1189 },
1190};
1191
1192struct platform_device msm8960_device_csiphy0 = {
1193 .name = "msm_csiphy",
1194 .id = 0,
1195 .resource = msm_csiphy0_resources,
1196 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1197};
1198
1199struct platform_device msm8960_device_csiphy1 = {
1200 .name = "msm_csiphy",
1201 .id = 1,
1202 .resource = msm_csiphy1_resources,
1203 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1204};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001205
1206static struct resource msm_csid0_resources[] = {
1207 {
1208 .name = "csid",
1209 .start = 0x04800000,
1210 .end = 0x04800000 + SZ_1K - 1,
1211 .flags = IORESOURCE_MEM,
1212 },
1213 {
1214 .name = "csid",
1215 .start = CSI_0_IRQ,
1216 .end = CSI_0_IRQ,
1217 .flags = IORESOURCE_IRQ,
1218 },
1219};
1220
1221static struct resource msm_csid1_resources[] = {
1222 {
1223 .name = "csid",
1224 .start = 0x04800400,
1225 .end = 0x04800400 + SZ_1K - 1,
1226 .flags = IORESOURCE_MEM,
1227 },
1228 {
1229 .name = "csid",
1230 .start = CSI_1_IRQ,
1231 .end = CSI_1_IRQ,
1232 .flags = IORESOURCE_IRQ,
1233 },
1234};
1235
1236struct platform_device msm8960_device_csid0 = {
1237 .name = "msm_csid",
1238 .id = 0,
1239 .resource = msm_csid0_resources,
1240 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1241};
1242
1243struct platform_device msm8960_device_csid1 = {
1244 .name = "msm_csid",
1245 .id = 1,
1246 .resource = msm_csid1_resources,
1247 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1248};
Kevin Chane12c6672011-10-26 11:55:26 -07001249
1250struct resource msm_ispif_resources[] = {
1251 {
1252 .name = "ispif",
1253 .start = 0x04800800,
1254 .end = 0x04800800 + SZ_1K - 1,
1255 .flags = IORESOURCE_MEM,
1256 },
1257 {
1258 .name = "ispif",
1259 .start = ISPIF_IRQ,
1260 .end = ISPIF_IRQ,
1261 .flags = IORESOURCE_IRQ,
1262 },
1263};
1264
1265struct platform_device msm8960_device_ispif = {
1266 .name = "msm_ispif",
1267 .id = 0,
1268 .resource = msm_ispif_resources,
1269 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1270};
Kevin Chan5827c552011-10-28 18:36:32 -07001271
1272static struct resource msm_vfe_resources[] = {
1273 {
1274 .name = "vfe32",
1275 .start = 0x04500000,
1276 .end = 0x04500000 + SZ_1M - 1,
1277 .flags = IORESOURCE_MEM,
1278 },
1279 {
1280 .name = "vfe32",
1281 .start = VFE_IRQ,
1282 .end = VFE_IRQ,
1283 .flags = IORESOURCE_IRQ,
1284 },
1285};
1286
1287struct platform_device msm8960_device_vfe = {
1288 .name = "msm_vfe",
1289 .id = 0,
1290 .resource = msm_vfe_resources,
1291 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1292};
Kevin Chana0853122011-11-07 19:48:44 -08001293
1294static struct resource msm_vpe_resources[] = {
1295 {
1296 .name = "vpe",
1297 .start = 0x05300000,
1298 .end = 0x05300000 + SZ_1M - 1,
1299 .flags = IORESOURCE_MEM,
1300 },
1301 {
1302 .name = "vpe",
1303 .start = VPE_IRQ,
1304 .end = VPE_IRQ,
1305 .flags = IORESOURCE_IRQ,
1306 },
1307};
1308
1309struct platform_device msm8960_device_vpe = {
1310 .name = "msm_vpe",
1311 .id = 0,
1312 .resource = msm_vpe_resources,
1313 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1314};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001315#endif
1316
Jay Chokshi33c044a2011-12-07 13:05:40 -08001317static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001318 {
1319 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1320 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1321 .flags = IORESOURCE_MEM,
1322 },
1323};
1324
Jay Chokshi33c044a2011-12-07 13:05:40 -08001325struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001326 .name = "msm_ssbi",
1327 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001328 .resource = resources_ssbi_pmic,
1329 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001330};
1331
1332static struct resource resources_qup_spi_gsbi1[] = {
1333 {
1334 .name = "spi_base",
1335 .start = MSM_GSBI1_QUP_PHYS,
1336 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1337 .flags = IORESOURCE_MEM,
1338 },
1339 {
1340 .name = "gsbi_base",
1341 .start = MSM_GSBI1_PHYS,
1342 .end = MSM_GSBI1_PHYS + 4 - 1,
1343 .flags = IORESOURCE_MEM,
1344 },
1345 {
1346 .name = "spi_irq_in",
1347 .start = MSM8960_GSBI1_QUP_IRQ,
1348 .end = MSM8960_GSBI1_QUP_IRQ,
1349 .flags = IORESOURCE_IRQ,
1350 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001351 {
1352 .name = "spi_clk",
1353 .start = 9,
1354 .end = 9,
1355 .flags = IORESOURCE_IO,
1356 },
1357 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001358 .name = "spi_miso",
1359 .start = 7,
1360 .end = 7,
1361 .flags = IORESOURCE_IO,
1362 },
1363 {
1364 .name = "spi_mosi",
1365 .start = 6,
1366 .end = 6,
1367 .flags = IORESOURCE_IO,
1368 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001369 {
1370 .name = "spi_cs",
1371 .start = 8,
1372 .end = 8,
1373 .flags = IORESOURCE_IO,
1374 },
1375 {
1376 .name = "spi_cs1",
1377 .start = 14,
1378 .end = 14,
1379 .flags = IORESOURCE_IO,
1380 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001381};
1382
1383struct platform_device msm8960_device_qup_spi_gsbi1 = {
1384 .name = "spi_qsd",
1385 .id = 0,
1386 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1387 .resource = resources_qup_spi_gsbi1,
1388};
1389
1390struct platform_device msm_pcm = {
1391 .name = "msm-pcm-dsp",
1392 .id = -1,
1393};
1394
1395struct platform_device msm_pcm_routing = {
1396 .name = "msm-pcm-routing",
1397 .id = -1,
1398};
1399
1400struct platform_device msm_cpudai0 = {
1401 .name = "msm-dai-q6",
1402 .id = 0x4000,
1403};
1404
1405struct platform_device msm_cpudai1 = {
1406 .name = "msm-dai-q6",
1407 .id = 0x4001,
1408};
1409
1410struct platform_device msm_cpudai_hdmi_rx = {
1411 .name = "msm-dai-q6",
1412 .id = 8,
1413};
1414
1415struct platform_device msm_cpudai_bt_rx = {
1416 .name = "msm-dai-q6",
1417 .id = 0x3000,
1418};
1419
1420struct platform_device msm_cpudai_bt_tx = {
1421 .name = "msm-dai-q6",
1422 .id = 0x3001,
1423};
1424
1425struct platform_device msm_cpudai_fm_rx = {
1426 .name = "msm-dai-q6",
1427 .id = 0x3004,
1428};
1429
1430struct platform_device msm_cpudai_fm_tx = {
1431 .name = "msm-dai-q6",
1432 .id = 0x3005,
1433};
1434
Helen Zeng0705a5f2011-10-14 15:29:52 -07001435struct platform_device msm_cpudai_incall_music_rx = {
1436 .name = "msm-dai-q6",
1437 .id = 0x8005,
1438};
1439
Helen Zenge3d716a2011-10-14 16:32:16 -07001440struct platform_device msm_cpudai_incall_record_rx = {
1441 .name = "msm-dai-q6",
1442 .id = 0x8004,
1443};
1444
1445struct platform_device msm_cpudai_incall_record_tx = {
1446 .name = "msm-dai-q6",
1447 .id = 0x8003,
1448};
1449
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001450/*
1451 * Machine specific data for AUX PCM Interface
1452 * which the driver will be unware of.
1453 */
1454struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1455 .clk = "pcm_clk",
1456 .mode = AFE_PCM_CFG_MODE_PCM,
1457 .sync = AFE_PCM_CFG_SYNC_INT,
1458 .frame = AFE_PCM_CFG_FRM_256BPF,
1459 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1460 .slot = 0,
1461 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1462 .pcm_clk_rate = 2048000,
1463};
1464
1465struct platform_device msm_cpudai_auxpcm_rx = {
1466 .name = "msm-dai-q6",
1467 .id = 2,
1468 .dev = {
1469 .platform_data = &auxpcm_rx_pdata,
1470 },
1471};
1472
1473struct platform_device msm_cpudai_auxpcm_tx = {
1474 .name = "msm-dai-q6",
1475 .id = 3,
1476};
1477
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001478struct platform_device msm_cpu_fe = {
1479 .name = "msm-dai-fe",
1480 .id = -1,
1481};
1482
1483struct platform_device msm_stub_codec = {
1484 .name = "msm-stub-codec",
1485 .id = 1,
1486};
1487
1488struct platform_device msm_voice = {
1489 .name = "msm-pcm-voice",
1490 .id = -1,
1491};
1492
1493struct platform_device msm_voip = {
1494 .name = "msm-voip-dsp",
1495 .id = -1,
1496};
1497
1498struct platform_device msm_lpa_pcm = {
1499 .name = "msm-pcm-lpa",
1500 .id = -1,
1501};
1502
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301503struct platform_device msm_compr_dsp = {
1504 .name = "msm-compr-dsp",
1505 .id = -1,
1506};
1507
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001508struct platform_device msm_pcm_hostless = {
1509 .name = "msm-pcm-hostless",
1510 .id = -1,
1511};
1512
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301513struct platform_device msm_cpudai_afe_01_rx = {
1514 .name = "msm-dai-q6",
1515 .id = 0xE0,
1516};
1517
1518struct platform_device msm_cpudai_afe_01_tx = {
1519 .name = "msm-dai-q6",
1520 .id = 0xF0,
1521};
1522
1523struct platform_device msm_cpudai_afe_02_rx = {
1524 .name = "msm-dai-q6",
1525 .id = 0xF1,
1526};
1527
1528struct platform_device msm_cpudai_afe_02_tx = {
1529 .name = "msm-dai-q6",
1530 .id = 0xE1,
1531};
1532
1533struct platform_device msm_pcm_afe = {
1534 .name = "msm-pcm-afe",
1535 .id = -1,
1536};
1537
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001538struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001539 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001540 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1541 FS_8X60(FS_VFE, "fs_vfe"),
1542 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001543 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1544 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1545 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001546 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001547};
1548unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1549
1550#ifdef CONFIG_MSM_ROTATOR
1551#define ROTATOR_HW_BASE 0x04E00000
1552static struct resource resources_msm_rotator[] = {
1553 {
1554 .start = ROTATOR_HW_BASE,
1555 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1556 .flags = IORESOURCE_MEM,
1557 },
1558 {
1559 .start = ROT_IRQ,
1560 .end = ROT_IRQ,
1561 .flags = IORESOURCE_IRQ,
1562 },
1563};
1564
1565static struct msm_rot_clocks rotator_clocks[] = {
1566 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001567 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001568 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001569 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001570 },
1571 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001572 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001573 .clk_type = ROTATOR_PCLK,
1574 .clk_rate = 0,
1575 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001576};
1577
1578static struct msm_rotator_platform_data rotator_pdata = {
1579 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1580 .hardware_version_number = 0x01020309,
1581 .rotator_clks = rotator_clocks,
1582 .regulator_name = "fs_rot",
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -08001583#ifdef CONFIG_MSM_BUS_SCALING
1584 .bus_scale_table = &rotator_bus_scale_pdata,
1585#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001586};
1587
1588struct platform_device msm_rotator_device = {
1589 .name = "msm_rotator",
1590 .id = 0,
1591 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1592 .resource = resources_msm_rotator,
1593 .dev = {
1594 .platform_data = &rotator_pdata,
1595 },
1596};
1597#endif
1598
1599#define MIPI_DSI_HW_BASE 0x04700000
1600#define MDP_HW_BASE 0x05100000
1601
1602static struct resource msm_mipi_dsi1_resources[] = {
1603 {
1604 .name = "mipi_dsi",
1605 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001606 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001607 .flags = IORESOURCE_MEM,
1608 },
1609 {
1610 .start = DSI1_IRQ,
1611 .end = DSI1_IRQ,
1612 .flags = IORESOURCE_IRQ,
1613 },
1614};
1615
1616struct platform_device msm_mipi_dsi1_device = {
1617 .name = "mipi_dsi",
1618 .id = 1,
1619 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1620 .resource = msm_mipi_dsi1_resources,
1621};
1622
1623static struct resource msm_mdp_resources[] = {
1624 {
1625 .name = "mdp",
1626 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001627 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001628 .flags = IORESOURCE_MEM,
1629 },
1630 {
1631 .start = MDP_IRQ,
1632 .end = MDP_IRQ,
1633 .flags = IORESOURCE_IRQ,
1634 },
1635};
1636
1637static struct platform_device msm_mdp_device = {
1638 .name = "mdp",
1639 .id = 0,
1640 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1641 .resource = msm_mdp_resources,
1642};
1643
1644static void __init msm_register_device(struct platform_device *pdev, void *data)
1645{
1646 int ret;
1647
1648 pdev->dev.platform_data = data;
1649 ret = platform_device_register(pdev);
1650 if (ret)
1651 dev_err(&pdev->dev,
1652 "%s: platform_device_register() failed = %d\n",
1653 __func__, ret);
1654}
1655
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001656#ifdef CONFIG_MSM_BUS_SCALING
1657static struct platform_device msm_dtv_device = {
1658 .name = "dtv",
1659 .id = 0,
1660};
1661#endif
1662
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001663void __init msm_fb_register_device(char *name, void *data)
1664{
1665 if (!strncmp(name, "mdp", 3))
1666 msm_register_device(&msm_mdp_device, data);
1667 else if (!strncmp(name, "mipi_dsi", 8))
1668 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001669#ifdef CONFIG_MSM_BUS_SCALING
1670 else if (!strncmp(name, "dtv", 3))
1671 msm_register_device(&msm_dtv_device, data);
1672#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001673 else
1674 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1675}
1676
1677static struct resource resources_sps[] = {
1678 {
1679 .name = "pipe_mem",
1680 .start = 0x12800000,
1681 .end = 0x12800000 + 0x4000 - 1,
1682 .flags = IORESOURCE_MEM,
1683 },
1684 {
1685 .name = "bamdma_dma",
1686 .start = 0x12240000,
1687 .end = 0x12240000 + 0x1000 - 1,
1688 .flags = IORESOURCE_MEM,
1689 },
1690 {
1691 .name = "bamdma_bam",
1692 .start = 0x12244000,
1693 .end = 0x12244000 + 0x4000 - 1,
1694 .flags = IORESOURCE_MEM,
1695 },
1696 {
1697 .name = "bamdma_irq",
1698 .start = SPS_BAM_DMA_IRQ,
1699 .end = SPS_BAM_DMA_IRQ,
1700 .flags = IORESOURCE_IRQ,
1701 },
1702};
1703
1704struct msm_sps_platform_data msm_sps_pdata = {
1705 .bamdma_restricted_pipes = 0x06,
1706};
1707
1708struct platform_device msm_device_sps = {
1709 .name = "msm_sps",
1710 .id = -1,
1711 .num_resources = ARRAY_SIZE(resources_sps),
1712 .resource = resources_sps,
1713 .dev.platform_data = &msm_sps_pdata,
1714};
1715
1716#ifdef CONFIG_MSM_MPM
1717static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001718 [1] = MSM_GPIO_TO_INT(46),
1719 [2] = MSM_GPIO_TO_INT(150),
1720 [4] = MSM_GPIO_TO_INT(103),
1721 [5] = MSM_GPIO_TO_INT(104),
1722 [6] = MSM_GPIO_TO_INT(105),
1723 [7] = MSM_GPIO_TO_INT(106),
1724 [8] = MSM_GPIO_TO_INT(107),
1725 [9] = MSM_GPIO_TO_INT(7),
1726 [10] = MSM_GPIO_TO_INT(11),
1727 [11] = MSM_GPIO_TO_INT(15),
1728 [12] = MSM_GPIO_TO_INT(19),
1729 [13] = MSM_GPIO_TO_INT(23),
1730 [14] = MSM_GPIO_TO_INT(27),
1731 [15] = MSM_GPIO_TO_INT(31),
1732 [16] = MSM_GPIO_TO_INT(35),
1733 [19] = MSM_GPIO_TO_INT(90),
1734 [20] = MSM_GPIO_TO_INT(92),
1735 [23] = MSM_GPIO_TO_INT(85),
1736 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001737 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001738 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001739 [29] = MSM_GPIO_TO_INT(10),
1740 [30] = MSM_GPIO_TO_INT(102),
1741 [31] = MSM_GPIO_TO_INT(81),
1742 [32] = MSM_GPIO_TO_INT(78),
1743 [33] = MSM_GPIO_TO_INT(94),
1744 [34] = MSM_GPIO_TO_INT(72),
1745 [35] = MSM_GPIO_TO_INT(39),
1746 [36] = MSM_GPIO_TO_INT(43),
1747 [37] = MSM_GPIO_TO_INT(61),
1748 [38] = MSM_GPIO_TO_INT(50),
1749 [39] = MSM_GPIO_TO_INT(42),
1750 [41] = MSM_GPIO_TO_INT(62),
1751 [42] = MSM_GPIO_TO_INT(76),
1752 [43] = MSM_GPIO_TO_INT(75),
1753 [44] = MSM_GPIO_TO_INT(70),
1754 [45] = MSM_GPIO_TO_INT(69),
1755 [46] = MSM_GPIO_TO_INT(67),
1756 [47] = MSM_GPIO_TO_INT(65),
1757 [48] = MSM_GPIO_TO_INT(58),
1758 [49] = MSM_GPIO_TO_INT(54),
1759 [50] = MSM_GPIO_TO_INT(52),
1760 [51] = MSM_GPIO_TO_INT(49),
1761 [52] = MSM_GPIO_TO_INT(40),
1762 [53] = MSM_GPIO_TO_INT(37),
1763 [54] = MSM_GPIO_TO_INT(24),
1764 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001765};
1766
1767static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1768 TLMM_MSM_SUMMARY_IRQ,
1769 RPM_APCC_CPU0_GP_HIGH_IRQ,
1770 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1771 RPM_APCC_CPU0_GP_LOW_IRQ,
1772 RPM_APCC_CPU0_WAKE_UP_IRQ,
1773 RPM_APCC_CPU1_GP_HIGH_IRQ,
1774 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1775 RPM_APCC_CPU1_GP_LOW_IRQ,
1776 RPM_APCC_CPU1_WAKE_UP_IRQ,
1777 MSS_TO_APPS_IRQ_0,
1778 MSS_TO_APPS_IRQ_1,
1779 MSS_TO_APPS_IRQ_2,
1780 MSS_TO_APPS_IRQ_3,
1781 MSS_TO_APPS_IRQ_4,
1782 MSS_TO_APPS_IRQ_5,
1783 MSS_TO_APPS_IRQ_6,
1784 MSS_TO_APPS_IRQ_7,
1785 MSS_TO_APPS_IRQ_8,
1786 MSS_TO_APPS_IRQ_9,
1787 LPASS_SCSS_GP_LOW_IRQ,
1788 LPASS_SCSS_GP_MEDIUM_IRQ,
1789 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001790 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001791 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001792 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001793 RIVA_APPS_WLAN_SMSM_IRQ,
1794 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1795 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001796};
1797
1798struct msm_mpm_device_data msm_mpm_dev_data = {
1799 .irqs_m2a = msm_mpm_irqs_m2a,
1800 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1801 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1802 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1803 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1804 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1805 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1806 .mpm_apps_ipc_val = BIT(1),
1807 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1808
1809};
1810#endif
1811
Stephen Boydbb600ae2011-08-02 20:11:40 -07001812static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001813 CLK_DUMMY("pll2", PLL2, NULL, 0),
1814 CLK_DUMMY("pll8", PLL8, NULL, 0),
1815 CLK_DUMMY("pll4", PLL4, NULL, 0),
1816
1817 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1818 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1819 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1820 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1821 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1822 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1823 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1824 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1825 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1826 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1827 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1828 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1829 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1830 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1831 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1832 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1833
Matt Wagantalle2522372011-08-17 14:52:21 -07001834 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1835 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1836 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1837 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1838 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1839 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1840 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1841 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1842 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1843 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1844 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1845 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001846 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1847 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1848 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1849 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1850 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1851 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1852 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1853 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1854 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1855 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1856 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1857 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001858 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001859 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001860 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001861 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1862 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1863 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1864 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1865 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001866 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001867 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001868 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1869 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1870 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1871 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1872 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1873 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1874 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1875 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001876 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1877 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001878 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1879 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001880 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001881 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001882 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001883 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001884 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001885 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1886 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1887 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1888 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1889 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1890 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1891 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001892 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001893 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1894 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1895 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001896 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1897 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1898 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1899 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1900 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001901 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1902 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001903 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1904 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1905 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1906 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1907 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001908 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1909 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1910 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1911 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1912 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1913 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1914 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1915 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1916 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1917 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1918 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1919 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1920 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1921 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1922 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001923 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1924 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1925 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001926 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001927 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001928 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001929 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1930 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1931 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001932 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001933 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1934 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1935 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001936 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001937 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1938 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1939 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1940 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1941 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1942 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1943 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1944 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1945 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001946 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001947 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1948 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1949 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1950 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1951 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1952 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1953 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1954 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1955 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1956 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001957 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1958 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1959 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001960 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1961 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1962 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1963 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001964 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001965 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001966 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001967 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001968 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1969 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1970 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1971 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1972 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1973 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1974 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1975 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1976 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1977 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1978 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1979 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1980 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1981 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1982 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001983 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1984 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1985 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1986 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1987 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1988 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001989
1990 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1991 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001992 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1993 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1994 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1995 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1996 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001997 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1998 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1999};
2000
Stephen Boydbb600ae2011-08-02 20:11:40 -07002001struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
2002 .table = msm_clocks_8960_dummy,
2003 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
2004};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002005
2006#define LPASS_SLIMBUS_PHYS 0x28080000
2007#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06002008#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002009/* Board info for the slimbus slave device */
2010static struct resource slimbus_res[] = {
2011 {
2012 .start = LPASS_SLIMBUS_PHYS,
2013 .end = LPASS_SLIMBUS_PHYS + 8191,
2014 .flags = IORESOURCE_MEM,
2015 .name = "slimbus_physical",
2016 },
2017 {
2018 .start = LPASS_SLIMBUS_BAM_PHYS,
2019 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
2020 .flags = IORESOURCE_MEM,
2021 .name = "slimbus_bam_physical",
2022 },
2023 {
Sagar Dhariacc969452011-09-19 10:34:30 -06002024 .start = LPASS_SLIMBUS_SLEW,
2025 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
2026 .flags = IORESOURCE_MEM,
2027 .name = "slimbus_slew_reg",
2028 },
2029 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002030 .start = SLIMBUS0_CORE_EE1_IRQ,
2031 .end = SLIMBUS0_CORE_EE1_IRQ,
2032 .flags = IORESOURCE_IRQ,
2033 .name = "slimbus_irq",
2034 },
2035 {
2036 .start = SLIMBUS0_BAM_EE1_IRQ,
2037 .end = SLIMBUS0_BAM_EE1_IRQ,
2038 .flags = IORESOURCE_IRQ,
2039 .name = "slimbus_bam_irq",
2040 },
2041};
2042
2043struct platform_device msm_slim_ctrl = {
2044 .name = "msm_slim_ctrl",
2045 .id = 1,
2046 .num_resources = ARRAY_SIZE(slimbus_res),
2047 .resource = slimbus_res,
2048 .dev = {
2049 .coherent_dma_mask = 0xffffffffULL,
2050 },
2051};
2052
2053#ifdef CONFIG_MSM_BUS_SCALING
2054static struct msm_bus_vectors grp3d_init_vectors[] = {
2055 {
2056 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2057 .dst = MSM_BUS_SLAVE_EBI_CH0,
2058 .ab = 0,
2059 .ib = 0,
2060 },
2061};
2062
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002063static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002064 {
2065 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2066 .dst = MSM_BUS_SLAVE_EBI_CH0,
2067 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002068 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002069 },
2070};
2071
2072static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2073 {
2074 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2075 .dst = MSM_BUS_SLAVE_EBI_CH0,
2076 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002077 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002078 },
2079};
2080
2081static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2082 {
2083 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2084 .dst = MSM_BUS_SLAVE_EBI_CH0,
2085 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002086 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002087 },
2088};
2089
2090static struct msm_bus_vectors grp3d_max_vectors[] = {
2091 {
2092 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2093 .dst = MSM_BUS_SLAVE_EBI_CH0,
2094 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002095 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002096 },
2097};
2098
2099static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2100 {
2101 ARRAY_SIZE(grp3d_init_vectors),
2102 grp3d_init_vectors,
2103 },
2104 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002105 ARRAY_SIZE(grp3d_low_vectors),
2106 grp3d_low_vectors,
2107 },
2108 {
2109 ARRAY_SIZE(grp3d_nominal_low_vectors),
2110 grp3d_nominal_low_vectors,
2111 },
2112 {
2113 ARRAY_SIZE(grp3d_nominal_high_vectors),
2114 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002115 },
2116 {
2117 ARRAY_SIZE(grp3d_max_vectors),
2118 grp3d_max_vectors,
2119 },
2120};
2121
2122static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2123 grp3d_bus_scale_usecases,
2124 ARRAY_SIZE(grp3d_bus_scale_usecases),
2125 .name = "grp3d",
2126};
2127
2128static struct msm_bus_vectors grp2d0_init_vectors[] = {
2129 {
2130 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2131 .dst = MSM_BUS_SLAVE_EBI_CH0,
2132 .ab = 0,
2133 .ib = 0,
2134 },
2135};
2136
Lucille Sylvester808eca22011-11-03 10:26:29 -07002137static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002138 {
2139 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2140 .dst = MSM_BUS_SLAVE_EBI_CH0,
2141 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002142 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002143 },
2144};
2145
Lucille Sylvester808eca22011-11-03 10:26:29 -07002146static struct msm_bus_vectors grp2d0_max_vectors[] = {
2147 {
2148 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2149 .dst = MSM_BUS_SLAVE_EBI_CH0,
2150 .ab = 0,
2151 .ib = KGSL_CONVERT_TO_MBPS(2048),
2152 },
2153};
2154
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002155static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2156 {
2157 ARRAY_SIZE(grp2d0_init_vectors),
2158 grp2d0_init_vectors,
2159 },
2160 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002161 ARRAY_SIZE(grp2d0_nominal_vectors),
2162 grp2d0_nominal_vectors,
2163 },
2164 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002165 ARRAY_SIZE(grp2d0_max_vectors),
2166 grp2d0_max_vectors,
2167 },
2168};
2169
2170struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2171 grp2d0_bus_scale_usecases,
2172 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2173 .name = "grp2d0",
2174};
2175
2176static struct msm_bus_vectors grp2d1_init_vectors[] = {
2177 {
2178 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2179 .dst = MSM_BUS_SLAVE_EBI_CH0,
2180 .ab = 0,
2181 .ib = 0,
2182 },
2183};
2184
Lucille Sylvester808eca22011-11-03 10:26:29 -07002185static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002186 {
2187 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2188 .dst = MSM_BUS_SLAVE_EBI_CH0,
2189 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002190 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002191 },
2192};
2193
Lucille Sylvester808eca22011-11-03 10:26:29 -07002194static struct msm_bus_vectors grp2d1_max_vectors[] = {
2195 {
2196 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2197 .dst = MSM_BUS_SLAVE_EBI_CH0,
2198 .ab = 0,
2199 .ib = KGSL_CONVERT_TO_MBPS(2048),
2200 },
2201};
2202
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002203static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2204 {
2205 ARRAY_SIZE(grp2d1_init_vectors),
2206 grp2d1_init_vectors,
2207 },
2208 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002209 ARRAY_SIZE(grp2d1_nominal_vectors),
2210 grp2d1_nominal_vectors,
2211 },
2212 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002213 ARRAY_SIZE(grp2d1_max_vectors),
2214 grp2d1_max_vectors,
2215 },
2216};
2217
2218struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2219 grp2d1_bus_scale_usecases,
2220 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2221 .name = "grp2d1",
2222};
2223#endif
2224
2225static struct resource kgsl_3d0_resources[] = {
2226 {
2227 .name = KGSL_3D0_REG_MEMORY,
2228 .start = 0x04300000, /* GFX3D address */
2229 .end = 0x0431ffff,
2230 .flags = IORESOURCE_MEM,
2231 },
2232 {
2233 .name = KGSL_3D0_IRQ,
2234 .start = GFX3D_IRQ,
2235 .end = GFX3D_IRQ,
2236 .flags = IORESOURCE_IRQ,
2237 },
2238};
2239
2240static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002241 .pwrlevel = {
2242 {
2243 .gpu_freq = 400000000,
2244 .bus_freq = 4,
2245 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002246 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002247 {
2248 .gpu_freq = 300000000,
2249 .bus_freq = 3,
2250 .io_fraction = 33,
2251 },
2252 {
2253 .gpu_freq = 200000000,
2254 .bus_freq = 2,
2255 .io_fraction = 100,
2256 },
2257 {
2258 .gpu_freq = 128000000,
2259 .bus_freq = 1,
2260 .io_fraction = 100,
2261 },
2262 {
2263 .gpu_freq = 27000000,
2264 .bus_freq = 0,
2265 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002266 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002267 .init_level = 0,
2268 .num_levels = 5,
2269 .set_grp_async = NULL,
Lucille Sylvester93650bb2011-11-02 14:37:10 -07002270 .idle_timeout = HZ/20,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002271 .nap_allowed = true,
2272 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002273#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002274 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002275#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002276 .iommu_user_ctx_name = "gfx3d_user",
2277 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002278};
2279
2280struct platform_device msm_kgsl_3d0 = {
2281 .name = "kgsl-3d0",
2282 .id = 0,
2283 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2284 .resource = kgsl_3d0_resources,
2285 .dev = {
2286 .platform_data = &kgsl_3d0_pdata,
2287 },
2288};
2289
2290static struct resource kgsl_2d0_resources[] = {
2291 {
2292 .name = KGSL_2D0_REG_MEMORY,
2293 .start = 0x04100000, /* Z180 base address */
2294 .end = 0x04100FFF,
2295 .flags = IORESOURCE_MEM,
2296 },
2297 {
2298 .name = KGSL_2D0_IRQ,
2299 .start = GFX2D0_IRQ,
2300 .end = GFX2D0_IRQ,
2301 .flags = IORESOURCE_IRQ,
2302 },
2303};
2304
2305static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002306 .pwrlevel = {
2307 {
2308 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002309 .bus_freq = 2,
2310 },
2311 {
2312 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002313 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002314 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002315 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002316 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002317 .bus_freq = 0,
2318 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002319 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002320 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002321 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002322 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002323 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002324 .nap_allowed = true,
2325 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002326#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002327 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002328#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002329 .iommu_user_ctx_name = "gfx2d0_2d0",
2330 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002331};
2332
2333struct platform_device msm_kgsl_2d0 = {
2334 .name = "kgsl-2d0",
2335 .id = 0,
2336 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2337 .resource = kgsl_2d0_resources,
2338 .dev = {
2339 .platform_data = &kgsl_2d0_pdata,
2340 },
2341};
2342
2343static struct resource kgsl_2d1_resources[] = {
2344 {
2345 .name = KGSL_2D1_REG_MEMORY,
2346 .start = 0x04200000, /* Z180 device 1 base address */
2347 .end = 0x04200FFF,
2348 .flags = IORESOURCE_MEM,
2349 },
2350 {
2351 .name = KGSL_2D1_IRQ,
2352 .start = GFX2D1_IRQ,
2353 .end = GFX2D1_IRQ,
2354 .flags = IORESOURCE_IRQ,
2355 },
2356};
2357
2358static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002359 .pwrlevel = {
2360 {
2361 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002362 .bus_freq = 2,
2363 },
2364 {
2365 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002366 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002367 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002368 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002369 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002370 .bus_freq = 0,
2371 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002372 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002373 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002374 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002375 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002376 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002377 .nap_allowed = true,
2378 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002379#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002380 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002381#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002382 .iommu_user_ctx_name = "gfx2d1_2d1",
2383 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002384};
2385
2386struct platform_device msm_kgsl_2d1 = {
2387 .name = "kgsl-2d1",
2388 .id = 1,
2389 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2390 .resource = kgsl_2d1_resources,
2391 .dev = {
2392 .platform_data = &kgsl_2d1_pdata,
2393 },
2394};
2395
2396#ifdef CONFIG_MSM_GEMINI
2397static struct resource msm_gemini_resources[] = {
2398 {
2399 .start = 0x04600000,
2400 .end = 0x04600000 + SZ_1M - 1,
2401 .flags = IORESOURCE_MEM,
2402 },
2403 {
2404 .start = JPEG_IRQ,
2405 .end = JPEG_IRQ,
2406 .flags = IORESOURCE_IRQ,
2407 },
2408};
2409
2410struct platform_device msm8960_gemini_device = {
2411 .name = "msm_gemini",
2412 .resource = msm_gemini_resources,
2413 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2414};
2415#endif
2416
2417struct msm_rpm_map_data rpm_map_data[] __initdata = {
2418 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2419 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2420
2421 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2422
2423 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2424 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2425 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2426 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2427 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2428 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2429 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2430 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2431 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2432 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2433
2434 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2435 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2436 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2437 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2438
2439 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2440 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2441 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002442 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002443
2444 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2445 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2446 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2447 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2448
2449 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2450 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2451 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2452 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2453 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2454 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2455 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2456 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2457 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2458 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2459 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2460 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2461 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2462 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2463 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2464 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2465 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2466 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2467 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2468 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2469 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2470 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2471 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2472 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2473 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2474 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2475 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2476 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2477 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2478 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2479 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2480 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2481 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2482 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2483 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2484 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2485 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2486 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2487 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2488 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2489 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2490 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2491 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2492 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2493 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2494 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2495 MSM_RPM_MAP(NCP_0, NCP, 2),
2496 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2497 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2498 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002499 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Praveen Chidambaram8985b012011-12-16 13:38:59 -07002500 MSM_RPM_MAP(QDSS_CLK, QDSS_CLK, 1),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002501};
Praveen Chidambaram8985b012011-12-16 13:38:59 -07002502
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002503unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2504
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002505struct platform_device msm_rpm_device = {
2506 .name = "msm_rpm",
2507 .id = -1,
2508};
2509
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002510static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2511 .phys_addr_base = 0x0010D204,
2512 .phys_size = SZ_8K,
2513};
2514
2515struct platform_device msm_rpm_stat_device = {
2516 .name = "msm_rpm_stat",
2517 .id = -1,
2518 .dev = {
2519 .platform_data = &msm_rpm_stat_pdata,
2520 },
2521};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002522
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002523struct platform_device msm_bus_sys_fabric = {
2524 .name = "msm_bus_fabric",
2525 .id = MSM_BUS_FAB_SYSTEM,
2526};
2527struct platform_device msm_bus_apps_fabric = {
2528 .name = "msm_bus_fabric",
2529 .id = MSM_BUS_FAB_APPSS,
2530};
2531struct platform_device msm_bus_mm_fabric = {
2532 .name = "msm_bus_fabric",
2533 .id = MSM_BUS_FAB_MMSS,
2534};
2535struct platform_device msm_bus_sys_fpb = {
2536 .name = "msm_bus_fabric",
2537 .id = MSM_BUS_FAB_SYSTEM_FPB,
2538};
2539struct platform_device msm_bus_cpss_fpb = {
2540 .name = "msm_bus_fabric",
2541 .id = MSM_BUS_FAB_CPSS_FPB,
2542};
2543
2544/* Sensors DSPS platform data */
2545#ifdef CONFIG_MSM_DSPS
2546
2547#define PPSS_REG_PHYS_BASE 0x12080000
2548
2549static struct dsps_clk_info dsps_clks[] = {};
2550static struct dsps_regulator_info dsps_regs[] = {};
2551
2552/*
2553 * Note: GPIOs field is intialized in run-time at the function
2554 * msm8960_init_dsps().
2555 */
2556
2557struct msm_dsps_platform_data msm_dsps_pdata = {
2558 .clks = dsps_clks,
2559 .clks_num = ARRAY_SIZE(dsps_clks),
2560 .gpios = NULL,
2561 .gpios_num = 0,
2562 .regs = dsps_regs,
2563 .regs_num = ARRAY_SIZE(dsps_regs),
2564 .dsps_pwr_ctl_en = 1,
2565 .signature = DSPS_SIGNATURE,
2566};
2567
2568static struct resource msm_dsps_resources[] = {
2569 {
2570 .start = PPSS_REG_PHYS_BASE,
2571 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2572 .name = "ppss_reg",
2573 .flags = IORESOURCE_MEM,
2574 },
Wentao Xua55500b2011-08-16 18:15:04 -04002575
2576 {
2577 .start = PPSS_WDOG_TIMER_IRQ,
2578 .end = PPSS_WDOG_TIMER_IRQ,
2579 .name = "ppss_wdog",
2580 .flags = IORESOURCE_IRQ,
2581 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002582};
2583
2584struct platform_device msm_dsps_device = {
2585 .name = "msm_dsps",
2586 .id = 0,
2587 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2588 .resource = msm_dsps_resources,
2589 .dev.platform_data = &msm_dsps_pdata,
2590};
2591
2592#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002593
2594#ifdef CONFIG_MSM_QDSS
2595
2596#define MSM_QDSS_PHYS_BASE 0x01A00000
2597#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2598#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2599#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002600#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002601#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2602
2603static struct resource msm_etb_resources[] = {
2604 {
2605 .start = MSM_ETB_PHYS_BASE,
2606 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2607 .flags = IORESOURCE_MEM,
2608 },
2609};
2610
2611struct platform_device msm_etb_device = {
2612 .name = "msm_etb",
2613 .id = 0,
2614 .num_resources = ARRAY_SIZE(msm_etb_resources),
2615 .resource = msm_etb_resources,
2616};
2617
2618static struct resource msm_tpiu_resources[] = {
2619 {
2620 .start = MSM_TPIU_PHYS_BASE,
2621 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2622 .flags = IORESOURCE_MEM,
2623 },
2624};
2625
2626struct platform_device msm_tpiu_device = {
2627 .name = "msm_tpiu",
2628 .id = 0,
2629 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2630 .resource = msm_tpiu_resources,
2631};
2632
2633static struct resource msm_funnel_resources[] = {
2634 {
2635 .start = MSM_FUNNEL_PHYS_BASE,
2636 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2637 .flags = IORESOURCE_MEM,
2638 },
2639};
2640
2641struct platform_device msm_funnel_device = {
2642 .name = "msm_funnel",
2643 .id = 0,
2644 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2645 .resource = msm_funnel_resources,
2646};
2647
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002648static struct resource msm_debug_resources[] = {
2649 {
2650 .start = MSM_DEBUG_PHYS_BASE,
2651 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2652 .flags = IORESOURCE_MEM,
2653 },
2654 {
2655 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2656 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2657 .flags = IORESOURCE_MEM,
2658 },
2659};
2660
2661struct platform_device msm_debug_device = {
2662 .name = "msm_debug",
2663 .id = 0,
2664 .num_resources = ARRAY_SIZE(msm_debug_resources),
2665 .resource = msm_debug_resources,
2666};
2667
Pratik Patel7831c082011-06-08 21:44:37 -07002668static struct resource msm_ptm_resources[] = {
2669 {
2670 .start = MSM_PTM_PHYS_BASE,
2671 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2672 .flags = IORESOURCE_MEM,
2673 },
2674};
2675
2676struct platform_device msm_ptm_device = {
2677 .name = "msm_ptm",
2678 .id = 0,
2679 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2680 .resource = msm_ptm_resources,
2681};
2682
2683#endif