blob: 8e1e63a1748f29de9ac34e84c7ad501dd4ef245e [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/platform_device.h>
17#include <linux/msm_rotator.h>
Deepak Kotur12301a72011-11-09 18:30:29 -080018#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <linux/gpio.h>
20#include <asm/clkdev.h>
21#include <linux/msm_kgsl.h>
22#include <linux/android_pmem.h>
23#include <mach/irqs-8960.h>
Mayank Rana9f51f582011-08-04 18:35:59 +053024#include <mach/dma.h>
25#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026#include <mach/board.h>
27#include <mach/msm_iomap.h>
28#include <mach/msm_hsusb.h>
29#include <mach/msm_sps.h>
30#include <mach/rpm.h>
31#include <mach/msm_bus_board.h>
32#include <mach/msm_memtypes.h>
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 Chidambaram7a712232011-10-28 13:39:45 -060040#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070041#include "pil-q6v4.h"
42#include "scm-pas.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070043
44#ifdef CONFIG_MSM_MPM
45#include "mpm.h"
46#endif
47#ifdef CONFIG_MSM_DSPS
48#include <mach/msm_dsps.h>
49#endif
50
51
52/* Address of GSBI blocks */
53#define MSM_GSBI1_PHYS 0x16000000
54#define MSM_GSBI2_PHYS 0x16100000
55#define MSM_GSBI3_PHYS 0x16200000
56#define MSM_GSBI4_PHYS 0x16300000
57#define MSM_GSBI5_PHYS 0x16400000
58#define MSM_GSBI6_PHYS 0x16500000
59#define MSM_GSBI7_PHYS 0x16600000
60#define MSM_GSBI8_PHYS 0x1A000000
61#define MSM_GSBI9_PHYS 0x1A100000
62#define MSM_GSBI10_PHYS 0x1A200000
63#define MSM_GSBI11_PHYS 0x12440000
64#define MSM_GSBI12_PHYS 0x12480000
65
66#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
67#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053068#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070069
70/* GSBI QUP devices */
71#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
72#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
73#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
74#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
75#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
76#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
77#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
78#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
79#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
80#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
81#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
82#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
83#define MSM_QUP_SIZE SZ_4K
84
85#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
86#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
87#define MSM_PMIC_SSBI_SIZE SZ_4K
88
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070089#define MSM8960_HSUSB_PHYS 0x12500000
90#define MSM8960_HSUSB_SIZE SZ_4K
91
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070092static struct resource resources_otg[] = {
93 {
94 .start = MSM8960_HSUSB_PHYS,
95 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
96 .flags = IORESOURCE_MEM,
97 },
98 {
99 .start = USB1_HS_IRQ,
100 .end = USB1_HS_IRQ,
101 .flags = IORESOURCE_IRQ,
102 },
103};
104
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700105struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700106 .name = "msm_otg",
107 .id = -1,
108 .num_resources = ARRAY_SIZE(resources_otg),
109 .resource = resources_otg,
110 .dev = {
111 .coherent_dma_mask = 0xffffffff,
112 },
113};
114
115static struct resource resources_hsusb[] = {
116 {
117 .start = MSM8960_HSUSB_PHYS,
118 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
119 .flags = IORESOURCE_MEM,
120 },
121 {
122 .start = USB1_HS_IRQ,
123 .end = USB1_HS_IRQ,
124 .flags = IORESOURCE_IRQ,
125 },
126};
127
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700128struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700129 .name = "msm_hsusb",
130 .id = -1,
131 .num_resources = ARRAY_SIZE(resources_hsusb),
132 .resource = resources_hsusb,
133 .dev = {
134 .coherent_dma_mask = 0xffffffff,
135 },
136};
137
138static struct resource resources_hsusb_host[] = {
139 {
140 .start = MSM8960_HSUSB_PHYS,
141 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
142 .flags = IORESOURCE_MEM,
143 },
144 {
145 .start = USB1_HS_IRQ,
146 .end = USB1_HS_IRQ,
147 .flags = IORESOURCE_IRQ,
148 },
149};
150
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530151static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700152struct platform_device msm_device_hsusb_host = {
153 .name = "msm_hsusb_host",
154 .id = -1,
155 .num_resources = ARRAY_SIZE(resources_hsusb_host),
156 .resource = resources_hsusb_host,
157 .dev = {
158 .dma_mask = &dma_mask,
159 .coherent_dma_mask = 0xffffffff,
160 },
161};
162
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530163static struct resource resources_hsic_host[] = {
164 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700165 .start = 0x12520000,
166 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530167 .flags = IORESOURCE_MEM,
168 },
169 {
170 .start = USB_HSIC_IRQ,
171 .end = USB_HSIC_IRQ,
172 .flags = IORESOURCE_IRQ,
173 },
174};
175
176struct platform_device msm_device_hsic_host = {
177 .name = "msm_hsic_host",
178 .id = -1,
179 .num_resources = ARRAY_SIZE(resources_hsic_host),
180 .resource = resources_hsic_host,
181 .dev = {
182 .dma_mask = &dma_mask,
183 .coherent_dma_mask = DMA_BIT_MASK(32),
184 },
185};
186
Mona Hossain11c03ac2011-10-26 12:42:10 -0700187#define SHARED_IMEM_TZ_BASE 0x2a03f720
188static struct resource tzlog_resources[] = {
189 {
190 .start = SHARED_IMEM_TZ_BASE,
191 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
192 .flags = IORESOURCE_MEM,
193 },
194};
195
196struct platform_device msm_device_tz_log = {
197 .name = "tz_log",
198 .id = 0,
199 .num_resources = ARRAY_SIZE(tzlog_resources),
200 .resource = tzlog_resources,
201};
202
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700203static struct resource resources_uart_gsbi2[] = {
204 {
205 .start = MSM8960_GSBI2_UARTDM_IRQ,
206 .end = MSM8960_GSBI2_UARTDM_IRQ,
207 .flags = IORESOURCE_IRQ,
208 },
209 {
210 .start = MSM_UART2DM_PHYS,
211 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
212 .name = "uartdm_resource",
213 .flags = IORESOURCE_MEM,
214 },
215 {
216 .start = MSM_GSBI2_PHYS,
217 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
218 .name = "gsbi_resource",
219 .flags = IORESOURCE_MEM,
220 },
221};
222
223struct platform_device msm8960_device_uart_gsbi2 = {
224 .name = "msm_serial_hsl",
225 .id = 0,
226 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
227 .resource = resources_uart_gsbi2,
228};
Mayank Rana9f51f582011-08-04 18:35:59 +0530229/* GSBI 6 used into UARTDM Mode */
230static struct resource msm_uart_dm6_resources[] = {
231 {
232 .start = MSM_UART6DM_PHYS,
233 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
234 .name = "uartdm_resource",
235 .flags = IORESOURCE_MEM,
236 },
237 {
238 .start = GSBI6_UARTDM_IRQ,
239 .end = GSBI6_UARTDM_IRQ,
240 .flags = IORESOURCE_IRQ,
241 },
242 {
243 .start = MSM_GSBI6_PHYS,
244 .end = MSM_GSBI6_PHYS + 4 - 1,
245 .name = "gsbi_resource",
246 .flags = IORESOURCE_MEM,
247 },
248 {
249 .start = DMOV_HSUART_GSBI6_TX_CHAN,
250 .end = DMOV_HSUART_GSBI6_RX_CHAN,
251 .name = "uartdm_channels",
252 .flags = IORESOURCE_DMA,
253 },
254 {
255 .start = DMOV_HSUART_GSBI6_TX_CRCI,
256 .end = DMOV_HSUART_GSBI6_RX_CRCI,
257 .name = "uartdm_crci",
258 .flags = IORESOURCE_DMA,
259 },
260};
261static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
262struct platform_device msm_device_uart_dm6 = {
263 .name = "msm_serial_hs",
264 .id = 0,
265 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
266 .resource = msm_uart_dm6_resources,
267 .dev = {
268 .dma_mask = &msm_uart_dm6_dma_mask,
269 .coherent_dma_mask = DMA_BIT_MASK(32),
270 },
271};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700272
273static struct resource resources_uart_gsbi5[] = {
274 {
275 .start = GSBI5_UARTDM_IRQ,
276 .end = GSBI5_UARTDM_IRQ,
277 .flags = IORESOURCE_IRQ,
278 },
279 {
280 .start = MSM_UART5DM_PHYS,
281 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
282 .name = "uartdm_resource",
283 .flags = IORESOURCE_MEM,
284 },
285 {
286 .start = MSM_GSBI5_PHYS,
287 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
288 .name = "gsbi_resource",
289 .flags = IORESOURCE_MEM,
290 },
291};
292
293struct platform_device msm8960_device_uart_gsbi5 = {
294 .name = "msm_serial_hsl",
295 .id = 0,
296 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
297 .resource = resources_uart_gsbi5,
298};
299/* MSM Video core device */
300#ifdef CONFIG_MSM_BUS_SCALING
301static struct msm_bus_vectors vidc_init_vectors[] = {
302 {
303 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
304 .dst = MSM_BUS_SLAVE_EBI_CH0,
305 .ab = 0,
306 .ib = 0,
307 },
308 {
309 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
310 .dst = MSM_BUS_SLAVE_EBI_CH0,
311 .ab = 0,
312 .ib = 0,
313 },
314 {
315 .src = MSM_BUS_MASTER_AMPSS_M0,
316 .dst = MSM_BUS_SLAVE_EBI_CH0,
317 .ab = 0,
318 .ib = 0,
319 },
320 {
321 .src = MSM_BUS_MASTER_AMPSS_M0,
322 .dst = MSM_BUS_SLAVE_EBI_CH0,
323 .ab = 0,
324 .ib = 0,
325 },
326};
327static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
328 {
329 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
330 .dst = MSM_BUS_SLAVE_EBI_CH0,
331 .ab = 54525952,
332 .ib = 436207616,
333 },
334 {
335 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
336 .dst = MSM_BUS_SLAVE_EBI_CH0,
337 .ab = 72351744,
338 .ib = 289406976,
339 },
340 {
341 .src = MSM_BUS_MASTER_AMPSS_M0,
342 .dst = MSM_BUS_SLAVE_EBI_CH0,
343 .ab = 500000,
344 .ib = 1000000,
345 },
346 {
347 .src = MSM_BUS_MASTER_AMPSS_M0,
348 .dst = MSM_BUS_SLAVE_EBI_CH0,
349 .ab = 500000,
350 .ib = 1000000,
351 },
352};
353static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
354 {
355 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
356 .dst = MSM_BUS_SLAVE_EBI_CH0,
357 .ab = 40894464,
358 .ib = 327155712,
359 },
360 {
361 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
362 .dst = MSM_BUS_SLAVE_EBI_CH0,
363 .ab = 48234496,
364 .ib = 192937984,
365 },
366 {
367 .src = MSM_BUS_MASTER_AMPSS_M0,
368 .dst = MSM_BUS_SLAVE_EBI_CH0,
369 .ab = 500000,
370 .ib = 2000000,
371 },
372 {
373 .src = MSM_BUS_MASTER_AMPSS_M0,
374 .dst = MSM_BUS_SLAVE_EBI_CH0,
375 .ab = 500000,
376 .ib = 2000000,
377 },
378};
379static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
380 {
381 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
382 .dst = MSM_BUS_SLAVE_EBI_CH0,
383 .ab = 163577856,
384 .ib = 1308622848,
385 },
386 {
387 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
388 .dst = MSM_BUS_SLAVE_EBI_CH0,
389 .ab = 219152384,
390 .ib = 876609536,
391 },
392 {
393 .src = MSM_BUS_MASTER_AMPSS_M0,
394 .dst = MSM_BUS_SLAVE_EBI_CH0,
395 .ab = 1750000,
396 .ib = 3500000,
397 },
398 {
399 .src = MSM_BUS_MASTER_AMPSS_M0,
400 .dst = MSM_BUS_SLAVE_EBI_CH0,
401 .ab = 1750000,
402 .ib = 3500000,
403 },
404};
405static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
406 {
407 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
408 .dst = MSM_BUS_SLAVE_EBI_CH0,
409 .ab = 121634816,
410 .ib = 973078528,
411 },
412 {
413 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
414 .dst = MSM_BUS_SLAVE_EBI_CH0,
415 .ab = 155189248,
416 .ib = 620756992,
417 },
418 {
419 .src = MSM_BUS_MASTER_AMPSS_M0,
420 .dst = MSM_BUS_SLAVE_EBI_CH0,
421 .ab = 1750000,
422 .ib = 7000000,
423 },
424 {
425 .src = MSM_BUS_MASTER_AMPSS_M0,
426 .dst = MSM_BUS_SLAVE_EBI_CH0,
427 .ab = 1750000,
428 .ib = 7000000,
429 },
430};
431static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
432 {
433 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
434 .dst = MSM_BUS_SLAVE_EBI_CH0,
435 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700436 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700437 },
438 {
439 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
440 .dst = MSM_BUS_SLAVE_EBI_CH0,
441 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700442 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700443 },
444 {
445 .src = MSM_BUS_MASTER_AMPSS_M0,
446 .dst = MSM_BUS_SLAVE_EBI_CH0,
447 .ab = 2500000,
448 .ib = 5000000,
449 },
450 {
451 .src = MSM_BUS_MASTER_AMPSS_M0,
452 .dst = MSM_BUS_SLAVE_EBI_CH0,
453 .ab = 2500000,
454 .ib = 5000000,
455 },
456};
457static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
458 {
459 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
460 .dst = MSM_BUS_SLAVE_EBI_CH0,
461 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700462 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700463 },
464 {
465 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
466 .dst = MSM_BUS_SLAVE_EBI_CH0,
467 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700468 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700469 },
470 {
471 .src = MSM_BUS_MASTER_AMPSS_M0,
472 .dst = MSM_BUS_SLAVE_EBI_CH0,
473 .ab = 2500000,
474 .ib = 700000000,
475 },
476 {
477 .src = MSM_BUS_MASTER_AMPSS_M0,
478 .dst = MSM_BUS_SLAVE_EBI_CH0,
479 .ab = 2500000,
480 .ib = 10000000,
481 },
482};
483
484static struct msm_bus_paths vidc_bus_client_config[] = {
485 {
486 ARRAY_SIZE(vidc_init_vectors),
487 vidc_init_vectors,
488 },
489 {
490 ARRAY_SIZE(vidc_venc_vga_vectors),
491 vidc_venc_vga_vectors,
492 },
493 {
494 ARRAY_SIZE(vidc_vdec_vga_vectors),
495 vidc_vdec_vga_vectors,
496 },
497 {
498 ARRAY_SIZE(vidc_venc_720p_vectors),
499 vidc_venc_720p_vectors,
500 },
501 {
502 ARRAY_SIZE(vidc_vdec_720p_vectors),
503 vidc_vdec_720p_vectors,
504 },
505 {
506 ARRAY_SIZE(vidc_venc_1080p_vectors),
507 vidc_venc_1080p_vectors,
508 },
509 {
510 ARRAY_SIZE(vidc_vdec_1080p_vectors),
511 vidc_vdec_1080p_vectors,
512 },
513};
514
515static struct msm_bus_scale_pdata vidc_bus_client_data = {
516 vidc_bus_client_config,
517 ARRAY_SIZE(vidc_bus_client_config),
518 .name = "vidc",
519};
520#endif
521
Mona Hossain9c430e32011-07-27 11:04:47 -0700522#ifdef CONFIG_HW_RANDOM_MSM
523/* PRNG device */
524#define MSM_PRNG_PHYS 0x1A500000
525static struct resource rng_resources = {
526 .flags = IORESOURCE_MEM,
527 .start = MSM_PRNG_PHYS,
528 .end = MSM_PRNG_PHYS + SZ_512 - 1,
529};
530
531struct platform_device msm_device_rng = {
532 .name = "msm_rng",
533 .id = 0,
534 .num_resources = 1,
535 .resource = &rng_resources,
536};
537#endif
538
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700539#define MSM_VIDC_BASE_PHYS 0x04400000
540#define MSM_VIDC_BASE_SIZE 0x00100000
541
542static struct resource msm_device_vidc_resources[] = {
543 {
544 .start = MSM_VIDC_BASE_PHYS,
545 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
546 .flags = IORESOURCE_MEM,
547 },
548 {
549 .start = VCODEC_IRQ,
550 .end = VCODEC_IRQ,
551 .flags = IORESOURCE_IRQ,
552 },
553};
554
555struct msm_vidc_platform_data vidc_platform_data = {
556#ifdef CONFIG_MSM_BUS_SCALING
557 .vidc_bus_client_pdata = &vidc_bus_client_data,
558#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700559#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Deepak Kotur12301a72011-11-09 18:30:29 -0800560 .memtype = ION_HEAP_EBI_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700561 .enable_ion = 1,
562#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800563 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700564 .enable_ion = 0,
565#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700566};
567
568struct platform_device msm_device_vidc = {
569 .name = "msm_vidc",
570 .id = 0,
571 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
572 .resource = msm_device_vidc_resources,
573 .dev = {
574 .platform_data = &vidc_platform_data,
575 },
576};
577
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700578#define MSM_SDC1_BASE 0x12400000
579#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
580#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
581#define MSM_SDC2_BASE 0x12140000
582#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
583#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
584#define MSM_SDC2_BASE 0x12140000
585#define MSM_SDC3_BASE 0x12180000
586#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
587#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
588#define MSM_SDC4_BASE 0x121C0000
589#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
590#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
591#define MSM_SDC5_BASE 0x12200000
592#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
593#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
594
595static struct resource resources_sdc1[] = {
596 {
597 .name = "core_mem",
598 .flags = IORESOURCE_MEM,
599 .start = MSM_SDC1_BASE,
600 .end = MSM_SDC1_DML_BASE - 1,
601 },
602 {
603 .name = "core_irq",
604 .flags = IORESOURCE_IRQ,
605 .start = SDC1_IRQ_0,
606 .end = SDC1_IRQ_0
607 },
608#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
609 {
610 .name = "sdcc_dml_addr",
611 .start = MSM_SDC1_DML_BASE,
612 .end = MSM_SDC1_BAM_BASE - 1,
613 .flags = IORESOURCE_MEM,
614 },
615 {
616 .name = "sdcc_bam_addr",
617 .start = MSM_SDC1_BAM_BASE,
618 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
619 .flags = IORESOURCE_MEM,
620 },
621 {
622 .name = "sdcc_bam_irq",
623 .start = SDC1_BAM_IRQ,
624 .end = SDC1_BAM_IRQ,
625 .flags = IORESOURCE_IRQ,
626 },
627#endif
628};
629
630static struct resource resources_sdc2[] = {
631 {
632 .name = "core_mem",
633 .flags = IORESOURCE_MEM,
634 .start = MSM_SDC2_BASE,
635 .end = MSM_SDC2_DML_BASE - 1,
636 },
637 {
638 .name = "core_irq",
639 .flags = IORESOURCE_IRQ,
640 .start = SDC2_IRQ_0,
641 .end = SDC2_IRQ_0
642 },
643#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
644 {
645 .name = "sdcc_dml_addr",
646 .start = MSM_SDC2_DML_BASE,
647 .end = MSM_SDC2_BAM_BASE - 1,
648 .flags = IORESOURCE_MEM,
649 },
650 {
651 .name = "sdcc_bam_addr",
652 .start = MSM_SDC2_BAM_BASE,
653 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
654 .flags = IORESOURCE_MEM,
655 },
656 {
657 .name = "sdcc_bam_irq",
658 .start = SDC2_BAM_IRQ,
659 .end = SDC2_BAM_IRQ,
660 .flags = IORESOURCE_IRQ,
661 },
662#endif
663};
664
665static struct resource resources_sdc3[] = {
666 {
667 .name = "core_mem",
668 .flags = IORESOURCE_MEM,
669 .start = MSM_SDC3_BASE,
670 .end = MSM_SDC3_DML_BASE - 1,
671 },
672 {
673 .name = "core_irq",
674 .flags = IORESOURCE_IRQ,
675 .start = SDC3_IRQ_0,
676 .end = SDC3_IRQ_0
677 },
678#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
679 {
680 .name = "sdcc_dml_addr",
681 .start = MSM_SDC3_DML_BASE,
682 .end = MSM_SDC3_BAM_BASE - 1,
683 .flags = IORESOURCE_MEM,
684 },
685 {
686 .name = "sdcc_bam_addr",
687 .start = MSM_SDC3_BAM_BASE,
688 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
689 .flags = IORESOURCE_MEM,
690 },
691 {
692 .name = "sdcc_bam_irq",
693 .start = SDC3_BAM_IRQ,
694 .end = SDC3_BAM_IRQ,
695 .flags = IORESOURCE_IRQ,
696 },
697#endif
698};
699
700static struct resource resources_sdc4[] = {
701 {
702 .name = "core_mem",
703 .flags = IORESOURCE_MEM,
704 .start = MSM_SDC4_BASE,
705 .end = MSM_SDC4_DML_BASE - 1,
706 },
707 {
708 .name = "core_irq",
709 .flags = IORESOURCE_IRQ,
710 .start = SDC4_IRQ_0,
711 .end = SDC4_IRQ_0
712 },
713#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
714 {
715 .name = "sdcc_dml_addr",
716 .start = MSM_SDC4_DML_BASE,
717 .end = MSM_SDC4_BAM_BASE - 1,
718 .flags = IORESOURCE_MEM,
719 },
720 {
721 .name = "sdcc_bam_addr",
722 .start = MSM_SDC4_BAM_BASE,
723 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
724 .flags = IORESOURCE_MEM,
725 },
726 {
727 .name = "sdcc_bam_irq",
728 .start = SDC4_BAM_IRQ,
729 .end = SDC4_BAM_IRQ,
730 .flags = IORESOURCE_IRQ,
731 },
732#endif
733};
734
735static struct resource resources_sdc5[] = {
736 {
737 .name = "core_mem",
738 .flags = IORESOURCE_MEM,
739 .start = MSM_SDC5_BASE,
740 .end = MSM_SDC5_DML_BASE - 1,
741 },
742 {
743 .name = "core_irq",
744 .flags = IORESOURCE_IRQ,
745 .start = SDC5_IRQ_0,
746 .end = SDC5_IRQ_0
747 },
748#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
749 {
750 .name = "sdcc_dml_addr",
751 .start = MSM_SDC5_DML_BASE,
752 .end = MSM_SDC5_BAM_BASE - 1,
753 .flags = IORESOURCE_MEM,
754 },
755 {
756 .name = "sdcc_bam_addr",
757 .start = MSM_SDC5_BAM_BASE,
758 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
759 .flags = IORESOURCE_MEM,
760 },
761 {
762 .name = "sdcc_bam_irq",
763 .start = SDC5_BAM_IRQ,
764 .end = SDC5_BAM_IRQ,
765 .flags = IORESOURCE_IRQ,
766 },
767#endif
768};
769
770struct platform_device msm_device_sdc1 = {
771 .name = "msm_sdcc",
772 .id = 1,
773 .num_resources = ARRAY_SIZE(resources_sdc1),
774 .resource = resources_sdc1,
775 .dev = {
776 .coherent_dma_mask = 0xffffffff,
777 },
778};
779
780struct platform_device msm_device_sdc2 = {
781 .name = "msm_sdcc",
782 .id = 2,
783 .num_resources = ARRAY_SIZE(resources_sdc2),
784 .resource = resources_sdc2,
785 .dev = {
786 .coherent_dma_mask = 0xffffffff,
787 },
788};
789
790struct platform_device msm_device_sdc3 = {
791 .name = "msm_sdcc",
792 .id = 3,
793 .num_resources = ARRAY_SIZE(resources_sdc3),
794 .resource = resources_sdc3,
795 .dev = {
796 .coherent_dma_mask = 0xffffffff,
797 },
798};
799
800struct platform_device msm_device_sdc4 = {
801 .name = "msm_sdcc",
802 .id = 4,
803 .num_resources = ARRAY_SIZE(resources_sdc4),
804 .resource = resources_sdc4,
805 .dev = {
806 .coherent_dma_mask = 0xffffffff,
807 },
808};
809
810struct platform_device msm_device_sdc5 = {
811 .name = "msm_sdcc",
812 .id = 5,
813 .num_resources = ARRAY_SIZE(resources_sdc5),
814 .resource = resources_sdc5,
815 .dev = {
816 .coherent_dma_mask = 0xffffffff,
817 },
818};
819
Stephen Boydeb819882011-08-29 14:46:30 -0700820#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
821#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
822
823static struct resource msm_8960_q6_lpass_resources[] = {
824 {
825 .start = MSM_LPASS_QDSP6SS_PHYS,
826 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
827 .flags = IORESOURCE_MEM,
828 },
829};
830
831static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
832 .strap_tcm_base = 0x01460000,
833 .strap_ahb_upper = 0x00290000,
834 .strap_ahb_lower = 0x00000280,
835 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
836 .name = "q6",
837 .pas_id = PAS_Q6,
838};
839
840struct platform_device msm_8960_q6_lpass = {
841 .name = "pil_qdsp6v4",
842 .id = 0,
843 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
844 .resource = msm_8960_q6_lpass_resources,
845 .dev.platform_data = &msm_8960_q6_lpass_data,
846};
847
848#define MSM_MSS_ENABLE_PHYS 0x08B00000
849#define MSM_FW_QDSP6SS_PHYS 0x08800000
850#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
851#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
852
853static struct resource msm_8960_q6_mss_fw_resources[] = {
854 {
855 .start = MSM_FW_QDSP6SS_PHYS,
856 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
857 .flags = IORESOURCE_MEM,
858 },
859 {
860 .start = MSM_MSS_ENABLE_PHYS,
861 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
862 .flags = IORESOURCE_MEM,
863 },
864};
865
866static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
867 .strap_tcm_base = 0x00400000,
868 .strap_ahb_upper = 0x00090000,
869 .strap_ahb_lower = 0x00000080,
870 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
871 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
872 .name = "modem_fw",
873 .depends = "q6",
874 .pas_id = PAS_MODEM_FW,
875};
876
877struct platform_device msm_8960_q6_mss_fw = {
878 .name = "pil_qdsp6v4",
879 .id = 1,
880 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
881 .resource = msm_8960_q6_mss_fw_resources,
882 .dev.platform_data = &msm_8960_q6_mss_fw_data,
883};
884
885#define MSM_SW_QDSP6SS_PHYS 0x08900000
886#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
887#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
888
889static struct resource msm_8960_q6_mss_sw_resources[] = {
890 {
891 .start = MSM_SW_QDSP6SS_PHYS,
892 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
893 .flags = IORESOURCE_MEM,
894 },
895 {
896 .start = MSM_MSS_ENABLE_PHYS,
897 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
898 .flags = IORESOURCE_MEM,
899 },
900};
901
902static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
903 .strap_tcm_base = 0x00420000,
904 .strap_ahb_upper = 0x00090000,
905 .strap_ahb_lower = 0x00000080,
906 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
907 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
908 .name = "modem",
909 .depends = "modem_fw",
910 .pas_id = PAS_MODEM_SW,
911};
912
913struct platform_device msm_8960_q6_mss_sw = {
914 .name = "pil_qdsp6v4",
915 .id = 2,
916 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
917 .resource = msm_8960_q6_mss_sw_resources,
918 .dev.platform_data = &msm_8960_q6_mss_sw_data,
919};
920
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700921struct platform_device msm_device_smd = {
922 .name = "msm_smd",
923 .id = -1,
924};
925
926struct platform_device msm_device_bam_dmux = {
927 .name = "BAM_RMNT",
928 .id = -1,
929};
930
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700931static struct msm_watchdog_pdata msm_watchdog_pdata = {
932 .pet_time = 10000,
933 .bark_time = 11000,
934 .has_secure = true,
935};
936
937struct platform_device msm8960_device_watchdog = {
938 .name = "msm_watchdog",
939 .id = -1,
940 .dev = {
941 .platform_data = &msm_watchdog_pdata,
942 },
943};
944
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700945static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700946 {
947 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700948 .flags = IORESOURCE_IRQ,
949 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700950 {
951 .start = 0x18320000,
952 .end = 0x18320000 + SZ_1M - 1,
953 .flags = IORESOURCE_MEM,
954 },
955};
956
957static struct msm_dmov_pdata msm_dmov_pdata = {
958 .sd = 1,
959 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700960};
961
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700962struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700963 .name = "msm_dmov",
964 .id = -1,
965 .resource = msm_dmov_resource,
966 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700967 .dev = {
968 .platform_data = &msm_dmov_pdata,
969 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700970};
971
972static struct platform_device *msm_sdcc_devices[] __initdata = {
973 &msm_device_sdc1,
974 &msm_device_sdc2,
975 &msm_device_sdc3,
976 &msm_device_sdc4,
977 &msm_device_sdc5,
978};
979
980int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
981{
982 struct platform_device *pdev;
983
984 if (controller < 1 || controller > 5)
985 return -EINVAL;
986
987 pdev = msm_sdcc_devices[controller-1];
988 pdev->dev.platform_data = plat;
989 return platform_device_register(pdev);
990}
991
992static struct resource resources_qup_i2c_gsbi4[] = {
993 {
994 .name = "gsbi_qup_i2c_addr",
995 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600996 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700997 .flags = IORESOURCE_MEM,
998 },
999 {
1000 .name = "qup_phys_addr",
1001 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001002 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001003 .flags = IORESOURCE_MEM,
1004 },
1005 {
1006 .name = "qup_err_intr",
1007 .start = GSBI4_QUP_IRQ,
1008 .end = GSBI4_QUP_IRQ,
1009 .flags = IORESOURCE_IRQ,
1010 },
1011};
1012
1013struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1014 .name = "qup_i2c",
1015 .id = 4,
1016 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1017 .resource = resources_qup_i2c_gsbi4,
1018};
1019
1020static struct resource resources_qup_i2c_gsbi3[] = {
1021 {
1022 .name = "gsbi_qup_i2c_addr",
1023 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001024 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001025 .flags = IORESOURCE_MEM,
1026 },
1027 {
1028 .name = "qup_phys_addr",
1029 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001030 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001031 .flags = IORESOURCE_MEM,
1032 },
1033 {
1034 .name = "qup_err_intr",
1035 .start = GSBI3_QUP_IRQ,
1036 .end = GSBI3_QUP_IRQ,
1037 .flags = IORESOURCE_IRQ,
1038 },
1039};
1040
1041struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1042 .name = "qup_i2c",
1043 .id = 3,
1044 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1045 .resource = resources_qup_i2c_gsbi3,
1046};
1047
1048static struct resource resources_qup_i2c_gsbi10[] = {
1049 {
1050 .name = "gsbi_qup_i2c_addr",
1051 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001052 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001053 .flags = IORESOURCE_MEM,
1054 },
1055 {
1056 .name = "qup_phys_addr",
1057 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001058 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001059 .flags = IORESOURCE_MEM,
1060 },
1061 {
1062 .name = "qup_err_intr",
1063 .start = GSBI10_QUP_IRQ,
1064 .end = GSBI10_QUP_IRQ,
1065 .flags = IORESOURCE_IRQ,
1066 },
1067};
1068
1069struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1070 .name = "qup_i2c",
1071 .id = 10,
1072 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1073 .resource = resources_qup_i2c_gsbi10,
1074};
1075
1076static struct resource resources_qup_i2c_gsbi12[] = {
1077 {
1078 .name = "gsbi_qup_i2c_addr",
1079 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001080 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001081 .flags = IORESOURCE_MEM,
1082 },
1083 {
1084 .name = "qup_phys_addr",
1085 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001086 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001087 .flags = IORESOURCE_MEM,
1088 },
1089 {
1090 .name = "qup_err_intr",
1091 .start = GSBI12_QUP_IRQ,
1092 .end = GSBI12_QUP_IRQ,
1093 .flags = IORESOURCE_IRQ,
1094 },
1095};
1096
1097struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1098 .name = "qup_i2c",
1099 .id = 12,
1100 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1101 .resource = resources_qup_i2c_gsbi12,
1102};
1103
1104#ifdef CONFIG_MSM_CAMERA
1105struct resource msm_camera_resources[] = {
1106 {
Nishant Pandit24153d82011-08-27 16:05:13 +05301107 .name = "s3d_rw",
1108 .start = 0x008003E0,
1109 .end = 0x008003E0 + SZ_16 - 1,
1110 .flags = IORESOURCE_MEM,
1111 },
1112 {
1113 .name = "s3d_ctl",
1114 .start = 0x008020B8,
1115 .end = 0x008020B8 + SZ_16 - 1,
1116 .flags = IORESOURCE_MEM,
1117 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001118};
1119
1120int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1121{
1122 s_info->resource = msm_camera_resources;
1123 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1124 return 0;
1125}
Kevin Chanf6216f22011-10-25 18:40:11 -07001126
1127static struct resource msm_csiphy0_resources[] = {
1128 {
1129 .name = "csiphy",
1130 .start = 0x04800C00,
1131 .end = 0x04800C00 + SZ_1K - 1,
1132 .flags = IORESOURCE_MEM,
1133 },
1134 {
1135 .name = "csiphy",
1136 .start = CSIPHY_4LN_IRQ,
1137 .end = CSIPHY_4LN_IRQ,
1138 .flags = IORESOURCE_IRQ,
1139 },
1140};
1141
1142static struct resource msm_csiphy1_resources[] = {
1143 {
1144 .name = "csiphy",
1145 .start = 0x04801000,
1146 .end = 0x04801000 + SZ_1K - 1,
1147 .flags = IORESOURCE_MEM,
1148 },
1149 {
1150 .name = "csiphy",
1151 .start = MSM8960_CSIPHY_2LN_IRQ,
1152 .end = MSM8960_CSIPHY_2LN_IRQ,
1153 .flags = IORESOURCE_IRQ,
1154 },
1155};
1156
1157struct platform_device msm8960_device_csiphy0 = {
1158 .name = "msm_csiphy",
1159 .id = 0,
1160 .resource = msm_csiphy0_resources,
1161 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1162};
1163
1164struct platform_device msm8960_device_csiphy1 = {
1165 .name = "msm_csiphy",
1166 .id = 1,
1167 .resource = msm_csiphy1_resources,
1168 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1169};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001170
1171static struct resource msm_csid0_resources[] = {
1172 {
1173 .name = "csid",
1174 .start = 0x04800000,
1175 .end = 0x04800000 + SZ_1K - 1,
1176 .flags = IORESOURCE_MEM,
1177 },
1178 {
1179 .name = "csid",
1180 .start = CSI_0_IRQ,
1181 .end = CSI_0_IRQ,
1182 .flags = IORESOURCE_IRQ,
1183 },
1184};
1185
1186static struct resource msm_csid1_resources[] = {
1187 {
1188 .name = "csid",
1189 .start = 0x04800400,
1190 .end = 0x04800400 + SZ_1K - 1,
1191 .flags = IORESOURCE_MEM,
1192 },
1193 {
1194 .name = "csid",
1195 .start = CSI_1_IRQ,
1196 .end = CSI_1_IRQ,
1197 .flags = IORESOURCE_IRQ,
1198 },
1199};
1200
1201struct platform_device msm8960_device_csid0 = {
1202 .name = "msm_csid",
1203 .id = 0,
1204 .resource = msm_csid0_resources,
1205 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1206};
1207
1208struct platform_device msm8960_device_csid1 = {
1209 .name = "msm_csid",
1210 .id = 1,
1211 .resource = msm_csid1_resources,
1212 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1213};
Kevin Chane12c6672011-10-26 11:55:26 -07001214
1215struct resource msm_ispif_resources[] = {
1216 {
1217 .name = "ispif",
1218 .start = 0x04800800,
1219 .end = 0x04800800 + SZ_1K - 1,
1220 .flags = IORESOURCE_MEM,
1221 },
1222 {
1223 .name = "ispif",
1224 .start = ISPIF_IRQ,
1225 .end = ISPIF_IRQ,
1226 .flags = IORESOURCE_IRQ,
1227 },
1228};
1229
1230struct platform_device msm8960_device_ispif = {
1231 .name = "msm_ispif",
1232 .id = 0,
1233 .resource = msm_ispif_resources,
1234 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1235};
Kevin Chan5827c552011-10-28 18:36:32 -07001236
1237static struct resource msm_vfe_resources[] = {
1238 {
1239 .name = "vfe32",
1240 .start = 0x04500000,
1241 .end = 0x04500000 + SZ_1M - 1,
1242 .flags = IORESOURCE_MEM,
1243 },
1244 {
1245 .name = "vfe32",
1246 .start = VFE_IRQ,
1247 .end = VFE_IRQ,
1248 .flags = IORESOURCE_IRQ,
1249 },
1250};
1251
1252struct platform_device msm8960_device_vfe = {
1253 .name = "msm_vfe",
1254 .id = 0,
1255 .resource = msm_vfe_resources,
1256 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1257};
Kevin Chana0853122011-11-07 19:48:44 -08001258
1259static struct resource msm_vpe_resources[] = {
1260 {
1261 .name = "vpe",
1262 .start = 0x05300000,
1263 .end = 0x05300000 + SZ_1M - 1,
1264 .flags = IORESOURCE_MEM,
1265 },
1266 {
1267 .name = "vpe",
1268 .start = VPE_IRQ,
1269 .end = VPE_IRQ,
1270 .flags = IORESOURCE_IRQ,
1271 },
1272};
1273
1274struct platform_device msm8960_device_vpe = {
1275 .name = "msm_vpe",
1276 .id = 0,
1277 .resource = msm_vpe_resources,
1278 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1279};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001280#endif
1281
1282static struct resource resources_ssbi_pm8921[] = {
1283 {
1284 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1285 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1286 .flags = IORESOURCE_MEM,
1287 },
1288};
1289
1290struct platform_device msm8960_device_ssbi_pm8921 = {
1291 .name = "msm_ssbi",
1292 .id = 0,
1293 .resource = resources_ssbi_pm8921,
1294 .num_resources = ARRAY_SIZE(resources_ssbi_pm8921),
1295};
1296
1297static struct resource resources_qup_spi_gsbi1[] = {
1298 {
1299 .name = "spi_base",
1300 .start = MSM_GSBI1_QUP_PHYS,
1301 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1302 .flags = IORESOURCE_MEM,
1303 },
1304 {
1305 .name = "gsbi_base",
1306 .start = MSM_GSBI1_PHYS,
1307 .end = MSM_GSBI1_PHYS + 4 - 1,
1308 .flags = IORESOURCE_MEM,
1309 },
1310 {
1311 .name = "spi_irq_in",
1312 .start = MSM8960_GSBI1_QUP_IRQ,
1313 .end = MSM8960_GSBI1_QUP_IRQ,
1314 .flags = IORESOURCE_IRQ,
1315 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001316 {
1317 .name = "spi_clk",
1318 .start = 9,
1319 .end = 9,
1320 .flags = IORESOURCE_IO,
1321 },
1322 {
1323 .name = "spi_cs",
1324 .start = 8,
1325 .end = 8,
1326 .flags = IORESOURCE_IO,
1327 },
1328 {
Chandan Uddaraju15e54b92011-09-12 10:52:36 -07001329 .name = "spi_cs1",
1330 .start = 14,
1331 .end = 14,
1332 .flags = IORESOURCE_IO,
1333 },
1334 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001335 .name = "spi_miso",
1336 .start = 7,
1337 .end = 7,
1338 .flags = IORESOURCE_IO,
1339 },
1340 {
1341 .name = "spi_mosi",
1342 .start = 6,
1343 .end = 6,
1344 .flags = IORESOURCE_IO,
1345 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001346};
1347
1348struct platform_device msm8960_device_qup_spi_gsbi1 = {
1349 .name = "spi_qsd",
1350 .id = 0,
1351 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1352 .resource = resources_qup_spi_gsbi1,
1353};
1354
1355struct platform_device msm_pcm = {
1356 .name = "msm-pcm-dsp",
1357 .id = -1,
1358};
1359
1360struct platform_device msm_pcm_routing = {
1361 .name = "msm-pcm-routing",
1362 .id = -1,
1363};
1364
1365struct platform_device msm_cpudai0 = {
1366 .name = "msm-dai-q6",
1367 .id = 0x4000,
1368};
1369
1370struct platform_device msm_cpudai1 = {
1371 .name = "msm-dai-q6",
1372 .id = 0x4001,
1373};
1374
1375struct platform_device msm_cpudai_hdmi_rx = {
1376 .name = "msm-dai-q6",
1377 .id = 8,
1378};
1379
1380struct platform_device msm_cpudai_bt_rx = {
1381 .name = "msm-dai-q6",
1382 .id = 0x3000,
1383};
1384
1385struct platform_device msm_cpudai_bt_tx = {
1386 .name = "msm-dai-q6",
1387 .id = 0x3001,
1388};
1389
1390struct platform_device msm_cpudai_fm_rx = {
1391 .name = "msm-dai-q6",
1392 .id = 0x3004,
1393};
1394
1395struct platform_device msm_cpudai_fm_tx = {
1396 .name = "msm-dai-q6",
1397 .id = 0x3005,
1398};
1399
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001400/*
1401 * Machine specific data for AUX PCM Interface
1402 * which the driver will be unware of.
1403 */
1404struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1405 .clk = "pcm_clk",
1406 .mode = AFE_PCM_CFG_MODE_PCM,
1407 .sync = AFE_PCM_CFG_SYNC_INT,
1408 .frame = AFE_PCM_CFG_FRM_256BPF,
1409 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1410 .slot = 0,
1411 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1412 .pcm_clk_rate = 2048000,
1413};
1414
1415struct platform_device msm_cpudai_auxpcm_rx = {
1416 .name = "msm-dai-q6",
1417 .id = 2,
1418 .dev = {
1419 .platform_data = &auxpcm_rx_pdata,
1420 },
1421};
1422
1423struct platform_device msm_cpudai_auxpcm_tx = {
1424 .name = "msm-dai-q6",
1425 .id = 3,
1426};
1427
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001428struct platform_device msm_cpu_fe = {
1429 .name = "msm-dai-fe",
1430 .id = -1,
1431};
1432
1433struct platform_device msm_stub_codec = {
1434 .name = "msm-stub-codec",
1435 .id = 1,
1436};
1437
1438struct platform_device msm_voice = {
1439 .name = "msm-pcm-voice",
1440 .id = -1,
1441};
1442
1443struct platform_device msm_voip = {
1444 .name = "msm-voip-dsp",
1445 .id = -1,
1446};
1447
1448struct platform_device msm_lpa_pcm = {
1449 .name = "msm-pcm-lpa",
1450 .id = -1,
1451};
1452
1453struct platform_device msm_pcm_hostless = {
1454 .name = "msm-pcm-hostless",
1455 .id = -1,
1456};
1457
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301458struct platform_device msm_cpudai_afe_01_rx = {
1459 .name = "msm-dai-q6",
1460 .id = 0xE0,
1461};
1462
1463struct platform_device msm_cpudai_afe_01_tx = {
1464 .name = "msm-dai-q6",
1465 .id = 0xF0,
1466};
1467
1468struct platform_device msm_cpudai_afe_02_rx = {
1469 .name = "msm-dai-q6",
1470 .id = 0xF1,
1471};
1472
1473struct platform_device msm_cpudai_afe_02_tx = {
1474 .name = "msm-dai-q6",
1475 .id = 0xE1,
1476};
1477
1478struct platform_device msm_pcm_afe = {
1479 .name = "msm-pcm-afe",
1480 .id = -1,
1481};
1482
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001483struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001484 FS_8X60(FS_MDP, "fs_mdp"),
1485 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001486 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1487 FS_8X60(FS_VFE, "fs_vfe"),
1488 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001489 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1490 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1491 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001492 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001493};
1494unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1495
1496#ifdef CONFIG_MSM_ROTATOR
1497#define ROTATOR_HW_BASE 0x04E00000
1498static struct resource resources_msm_rotator[] = {
1499 {
1500 .start = ROTATOR_HW_BASE,
1501 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1502 .flags = IORESOURCE_MEM,
1503 },
1504 {
1505 .start = ROT_IRQ,
1506 .end = ROT_IRQ,
1507 .flags = IORESOURCE_IRQ,
1508 },
1509};
1510
1511static struct msm_rot_clocks rotator_clocks[] = {
1512 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001513 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001514 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001515 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001516 },
1517 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001518 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001519 .clk_type = ROTATOR_PCLK,
1520 .clk_rate = 0,
1521 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001522};
1523
1524static struct msm_rotator_platform_data rotator_pdata = {
1525 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1526 .hardware_version_number = 0x01020309,
1527 .rotator_clks = rotator_clocks,
1528 .regulator_name = "fs_rot",
1529};
1530
1531struct platform_device msm_rotator_device = {
1532 .name = "msm_rotator",
1533 .id = 0,
1534 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1535 .resource = resources_msm_rotator,
1536 .dev = {
1537 .platform_data = &rotator_pdata,
1538 },
1539};
1540#endif
1541
1542#define MIPI_DSI_HW_BASE 0x04700000
1543#define MDP_HW_BASE 0x05100000
1544
1545static struct resource msm_mipi_dsi1_resources[] = {
1546 {
1547 .name = "mipi_dsi",
1548 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001549 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001550 .flags = IORESOURCE_MEM,
1551 },
1552 {
1553 .start = DSI1_IRQ,
1554 .end = DSI1_IRQ,
1555 .flags = IORESOURCE_IRQ,
1556 },
1557};
1558
1559struct platform_device msm_mipi_dsi1_device = {
1560 .name = "mipi_dsi",
1561 .id = 1,
1562 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1563 .resource = msm_mipi_dsi1_resources,
1564};
1565
1566static struct resource msm_mdp_resources[] = {
1567 {
1568 .name = "mdp",
1569 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001570 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001571 .flags = IORESOURCE_MEM,
1572 },
1573 {
1574 .start = MDP_IRQ,
1575 .end = MDP_IRQ,
1576 .flags = IORESOURCE_IRQ,
1577 },
1578};
1579
1580static struct platform_device msm_mdp_device = {
1581 .name = "mdp",
1582 .id = 0,
1583 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1584 .resource = msm_mdp_resources,
1585};
1586
1587static void __init msm_register_device(struct platform_device *pdev, void *data)
1588{
1589 int ret;
1590
1591 pdev->dev.platform_data = data;
1592 ret = platform_device_register(pdev);
1593 if (ret)
1594 dev_err(&pdev->dev,
1595 "%s: platform_device_register() failed = %d\n",
1596 __func__, ret);
1597}
1598
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001599#ifdef CONFIG_MSM_BUS_SCALING
1600static struct platform_device msm_dtv_device = {
1601 .name = "dtv",
1602 .id = 0,
1603};
1604#endif
1605
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001606void __init msm_fb_register_device(char *name, void *data)
1607{
1608 if (!strncmp(name, "mdp", 3))
1609 msm_register_device(&msm_mdp_device, data);
1610 else if (!strncmp(name, "mipi_dsi", 8))
1611 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001612#ifdef CONFIG_MSM_BUS_SCALING
1613 else if (!strncmp(name, "dtv", 3))
1614 msm_register_device(&msm_dtv_device, data);
1615#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001616 else
1617 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1618}
1619
1620static struct resource resources_sps[] = {
1621 {
1622 .name = "pipe_mem",
1623 .start = 0x12800000,
1624 .end = 0x12800000 + 0x4000 - 1,
1625 .flags = IORESOURCE_MEM,
1626 },
1627 {
1628 .name = "bamdma_dma",
1629 .start = 0x12240000,
1630 .end = 0x12240000 + 0x1000 - 1,
1631 .flags = IORESOURCE_MEM,
1632 },
1633 {
1634 .name = "bamdma_bam",
1635 .start = 0x12244000,
1636 .end = 0x12244000 + 0x4000 - 1,
1637 .flags = IORESOURCE_MEM,
1638 },
1639 {
1640 .name = "bamdma_irq",
1641 .start = SPS_BAM_DMA_IRQ,
1642 .end = SPS_BAM_DMA_IRQ,
1643 .flags = IORESOURCE_IRQ,
1644 },
1645};
1646
1647struct msm_sps_platform_data msm_sps_pdata = {
1648 .bamdma_restricted_pipes = 0x06,
1649};
1650
1651struct platform_device msm_device_sps = {
1652 .name = "msm_sps",
1653 .id = -1,
1654 .num_resources = ARRAY_SIZE(resources_sps),
1655 .resource = resources_sps,
1656 .dev.platform_data = &msm_sps_pdata,
1657};
1658
1659#ifdef CONFIG_MSM_MPM
1660static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001661 [1] = MSM_GPIO_TO_INT(46),
1662 [2] = MSM_GPIO_TO_INT(150),
1663 [4] = MSM_GPIO_TO_INT(103),
1664 [5] = MSM_GPIO_TO_INT(104),
1665 [6] = MSM_GPIO_TO_INT(105),
1666 [7] = MSM_GPIO_TO_INT(106),
1667 [8] = MSM_GPIO_TO_INT(107),
1668 [9] = MSM_GPIO_TO_INT(7),
1669 [10] = MSM_GPIO_TO_INT(11),
1670 [11] = MSM_GPIO_TO_INT(15),
1671 [12] = MSM_GPIO_TO_INT(19),
1672 [13] = MSM_GPIO_TO_INT(23),
1673 [14] = MSM_GPIO_TO_INT(27),
1674 [15] = MSM_GPIO_TO_INT(31),
1675 [16] = MSM_GPIO_TO_INT(35),
1676 [19] = MSM_GPIO_TO_INT(90),
1677 [20] = MSM_GPIO_TO_INT(92),
1678 [23] = MSM_GPIO_TO_INT(85),
1679 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001680 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001681 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001682 [29] = MSM_GPIO_TO_INT(10),
1683 [30] = MSM_GPIO_TO_INT(102),
1684 [31] = MSM_GPIO_TO_INT(81),
1685 [32] = MSM_GPIO_TO_INT(78),
1686 [33] = MSM_GPIO_TO_INT(94),
1687 [34] = MSM_GPIO_TO_INT(72),
1688 [35] = MSM_GPIO_TO_INT(39),
1689 [36] = MSM_GPIO_TO_INT(43),
1690 [37] = MSM_GPIO_TO_INT(61),
1691 [38] = MSM_GPIO_TO_INT(50),
1692 [39] = MSM_GPIO_TO_INT(42),
1693 [41] = MSM_GPIO_TO_INT(62),
1694 [42] = MSM_GPIO_TO_INT(76),
1695 [43] = MSM_GPIO_TO_INT(75),
1696 [44] = MSM_GPIO_TO_INT(70),
1697 [45] = MSM_GPIO_TO_INT(69),
1698 [46] = MSM_GPIO_TO_INT(67),
1699 [47] = MSM_GPIO_TO_INT(65),
1700 [48] = MSM_GPIO_TO_INT(58),
1701 [49] = MSM_GPIO_TO_INT(54),
1702 [50] = MSM_GPIO_TO_INT(52),
1703 [51] = MSM_GPIO_TO_INT(49),
1704 [52] = MSM_GPIO_TO_INT(40),
1705 [53] = MSM_GPIO_TO_INT(37),
1706 [54] = MSM_GPIO_TO_INT(24),
1707 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001708};
1709
1710static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1711 TLMM_MSM_SUMMARY_IRQ,
1712 RPM_APCC_CPU0_GP_HIGH_IRQ,
1713 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1714 RPM_APCC_CPU0_GP_LOW_IRQ,
1715 RPM_APCC_CPU0_WAKE_UP_IRQ,
1716 RPM_APCC_CPU1_GP_HIGH_IRQ,
1717 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1718 RPM_APCC_CPU1_GP_LOW_IRQ,
1719 RPM_APCC_CPU1_WAKE_UP_IRQ,
1720 MSS_TO_APPS_IRQ_0,
1721 MSS_TO_APPS_IRQ_1,
1722 MSS_TO_APPS_IRQ_2,
1723 MSS_TO_APPS_IRQ_3,
1724 MSS_TO_APPS_IRQ_4,
1725 MSS_TO_APPS_IRQ_5,
1726 MSS_TO_APPS_IRQ_6,
1727 MSS_TO_APPS_IRQ_7,
1728 MSS_TO_APPS_IRQ_8,
1729 MSS_TO_APPS_IRQ_9,
1730 LPASS_SCSS_GP_LOW_IRQ,
1731 LPASS_SCSS_GP_MEDIUM_IRQ,
1732 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001733 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001734 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001735 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001736 RIVA_APPS_WLAN_SMSM_IRQ,
1737 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1738 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001739};
1740
1741struct msm_mpm_device_data msm_mpm_dev_data = {
1742 .irqs_m2a = msm_mpm_irqs_m2a,
1743 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1744 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1745 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1746 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1747 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1748 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1749 .mpm_apps_ipc_val = BIT(1),
1750 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1751
1752};
1753#endif
1754
Stephen Boydbb600ae2011-08-02 20:11:40 -07001755static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001756 CLK_DUMMY("pll2", PLL2, NULL, 0),
1757 CLK_DUMMY("pll8", PLL8, NULL, 0),
1758 CLK_DUMMY("pll4", PLL4, NULL, 0),
1759
1760 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1761 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1762 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1763 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1764 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1765 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1766 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1767 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1768 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1769 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1770 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1771 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1772 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1773 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1774 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1775 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1776
Matt Wagantalle2522372011-08-17 14:52:21 -07001777 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1778 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1779 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1780 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1781 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1782 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1783 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1784 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1785 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1786 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1787 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1788 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001789 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1790 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1791 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1792 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1793 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1794 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1795 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1796 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1797 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1798 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1799 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1800 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001801 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001802 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001803 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001804 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1805 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1806 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1807 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1808 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001809 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001810 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001811 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1812 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1813 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1814 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1815 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1816 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1817 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1818 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001819 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1820 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001821 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1822 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001823 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001824 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001825 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001826 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001827 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001828 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1829 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1830 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1831 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1832 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1833 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1834 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001835 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001836 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1837 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1838 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001839 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1840 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1841 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1842 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1843 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001844 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1845 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001846 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1847 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1848 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1849 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1850 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001851 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1852 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1853 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1854 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1855 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1856 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1857 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1858 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1859 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1860 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1861 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1862 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1863 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1864 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1865 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001866 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1867 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1868 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001869 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001870 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001871 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001872 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1873 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1874 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001875 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001876 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1877 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1878 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001879 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001880 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1881 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1882 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1883 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1884 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1885 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1886 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1887 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1888 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001889 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001890 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1891 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1892 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1893 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1894 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1895 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1896 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1897 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1898 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1899 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001900 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1901 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1902 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001903 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1904 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1905 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1906 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001907 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001908 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001909 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001910 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001911 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1912 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1913 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1914 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1915 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1916 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1917 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1918 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1919 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1920 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1921 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1922 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1923 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1924 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1925 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001926 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1927 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1928 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1929 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1930 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1931 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001932
1933 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1934 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001935 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1936 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1937 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1938 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1939 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001940 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1941 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1942};
1943
Stephen Boydbb600ae2011-08-02 20:11:40 -07001944struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1945 .table = msm_clocks_8960_dummy,
1946 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1947};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001948
1949#define LPASS_SLIMBUS_PHYS 0x28080000
1950#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001951#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001952/* Board info for the slimbus slave device */
1953static struct resource slimbus_res[] = {
1954 {
1955 .start = LPASS_SLIMBUS_PHYS,
1956 .end = LPASS_SLIMBUS_PHYS + 8191,
1957 .flags = IORESOURCE_MEM,
1958 .name = "slimbus_physical",
1959 },
1960 {
1961 .start = LPASS_SLIMBUS_BAM_PHYS,
1962 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1963 .flags = IORESOURCE_MEM,
1964 .name = "slimbus_bam_physical",
1965 },
1966 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001967 .start = LPASS_SLIMBUS_SLEW,
1968 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1969 .flags = IORESOURCE_MEM,
1970 .name = "slimbus_slew_reg",
1971 },
1972 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001973 .start = SLIMBUS0_CORE_EE1_IRQ,
1974 .end = SLIMBUS0_CORE_EE1_IRQ,
1975 .flags = IORESOURCE_IRQ,
1976 .name = "slimbus_irq",
1977 },
1978 {
1979 .start = SLIMBUS0_BAM_EE1_IRQ,
1980 .end = SLIMBUS0_BAM_EE1_IRQ,
1981 .flags = IORESOURCE_IRQ,
1982 .name = "slimbus_bam_irq",
1983 },
1984};
1985
1986struct platform_device msm_slim_ctrl = {
1987 .name = "msm_slim_ctrl",
1988 .id = 1,
1989 .num_resources = ARRAY_SIZE(slimbus_res),
1990 .resource = slimbus_res,
1991 .dev = {
1992 .coherent_dma_mask = 0xffffffffULL,
1993 },
1994};
1995
1996#ifdef CONFIG_MSM_BUS_SCALING
1997static struct msm_bus_vectors grp3d_init_vectors[] = {
1998 {
1999 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2000 .dst = MSM_BUS_SLAVE_EBI_CH0,
2001 .ab = 0,
2002 .ib = 0,
2003 },
2004};
2005
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002006static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002007 {
2008 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2009 .dst = MSM_BUS_SLAVE_EBI_CH0,
2010 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002011 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002012 },
2013};
2014
2015static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2016 {
2017 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2018 .dst = MSM_BUS_SLAVE_EBI_CH0,
2019 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002020 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002021 },
2022};
2023
2024static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2025 {
2026 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2027 .dst = MSM_BUS_SLAVE_EBI_CH0,
2028 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002029 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002030 },
2031};
2032
2033static struct msm_bus_vectors grp3d_max_vectors[] = {
2034 {
2035 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2036 .dst = MSM_BUS_SLAVE_EBI_CH0,
2037 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002038 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002039 },
2040};
2041
2042static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2043 {
2044 ARRAY_SIZE(grp3d_init_vectors),
2045 grp3d_init_vectors,
2046 },
2047 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002048 ARRAY_SIZE(grp3d_low_vectors),
2049 grp3d_low_vectors,
2050 },
2051 {
2052 ARRAY_SIZE(grp3d_nominal_low_vectors),
2053 grp3d_nominal_low_vectors,
2054 },
2055 {
2056 ARRAY_SIZE(grp3d_nominal_high_vectors),
2057 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002058 },
2059 {
2060 ARRAY_SIZE(grp3d_max_vectors),
2061 grp3d_max_vectors,
2062 },
2063};
2064
2065static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2066 grp3d_bus_scale_usecases,
2067 ARRAY_SIZE(grp3d_bus_scale_usecases),
2068 .name = "grp3d",
2069};
2070
2071static struct msm_bus_vectors grp2d0_init_vectors[] = {
2072 {
2073 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2074 .dst = MSM_BUS_SLAVE_EBI_CH0,
2075 .ab = 0,
2076 .ib = 0,
2077 },
2078};
2079
2080static struct msm_bus_vectors grp2d0_max_vectors[] = {
2081 {
2082 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2083 .dst = MSM_BUS_SLAVE_EBI_CH0,
2084 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002085 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002086 },
2087};
2088
2089static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2090 {
2091 ARRAY_SIZE(grp2d0_init_vectors),
2092 grp2d0_init_vectors,
2093 },
2094 {
2095 ARRAY_SIZE(grp2d0_max_vectors),
2096 grp2d0_max_vectors,
2097 },
2098};
2099
2100struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2101 grp2d0_bus_scale_usecases,
2102 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2103 .name = "grp2d0",
2104};
2105
2106static struct msm_bus_vectors grp2d1_init_vectors[] = {
2107 {
2108 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2109 .dst = MSM_BUS_SLAVE_EBI_CH0,
2110 .ab = 0,
2111 .ib = 0,
2112 },
2113};
2114
2115static struct msm_bus_vectors grp2d1_max_vectors[] = {
2116 {
2117 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2118 .dst = MSM_BUS_SLAVE_EBI_CH0,
2119 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002120 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002121 },
2122};
2123
2124static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2125 {
2126 ARRAY_SIZE(grp2d1_init_vectors),
2127 grp2d1_init_vectors,
2128 },
2129 {
2130 ARRAY_SIZE(grp2d1_max_vectors),
2131 grp2d1_max_vectors,
2132 },
2133};
2134
2135struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2136 grp2d1_bus_scale_usecases,
2137 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2138 .name = "grp2d1",
2139};
2140#endif
2141
2142static struct resource kgsl_3d0_resources[] = {
2143 {
2144 .name = KGSL_3D0_REG_MEMORY,
2145 .start = 0x04300000, /* GFX3D address */
2146 .end = 0x0431ffff,
2147 .flags = IORESOURCE_MEM,
2148 },
2149 {
2150 .name = KGSL_3D0_IRQ,
2151 .start = GFX3D_IRQ,
2152 .end = GFX3D_IRQ,
2153 .flags = IORESOURCE_IRQ,
2154 },
2155};
2156
2157static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002158 .pwrlevel = {
2159 {
2160 .gpu_freq = 400000000,
2161 .bus_freq = 4,
2162 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002163 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002164 {
2165 .gpu_freq = 300000000,
2166 .bus_freq = 3,
2167 .io_fraction = 33,
2168 },
2169 {
2170 .gpu_freq = 200000000,
2171 .bus_freq = 2,
2172 .io_fraction = 100,
2173 },
2174 {
2175 .gpu_freq = 128000000,
2176 .bus_freq = 1,
2177 .io_fraction = 100,
2178 },
2179 {
2180 .gpu_freq = 27000000,
2181 .bus_freq = 0,
2182 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002183 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002184 .init_level = 0,
2185 .num_levels = 5,
2186 .set_grp_async = NULL,
2187 .idle_timeout = HZ/5,
2188 .nap_allowed = true,
2189 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002190#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002191 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002192#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002193 .iommu_user_ctx_name = "gfx3d_user",
2194 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002195};
2196
2197struct platform_device msm_kgsl_3d0 = {
2198 .name = "kgsl-3d0",
2199 .id = 0,
2200 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2201 .resource = kgsl_3d0_resources,
2202 .dev = {
2203 .platform_data = &kgsl_3d0_pdata,
2204 },
2205};
2206
2207static struct resource kgsl_2d0_resources[] = {
2208 {
2209 .name = KGSL_2D0_REG_MEMORY,
2210 .start = 0x04100000, /* Z180 base address */
2211 .end = 0x04100FFF,
2212 .flags = IORESOURCE_MEM,
2213 },
2214 {
2215 .name = KGSL_2D0_IRQ,
2216 .start = GFX2D0_IRQ,
2217 .end = GFX2D0_IRQ,
2218 .flags = IORESOURCE_IRQ,
2219 },
2220};
2221
2222static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002223 .pwrlevel = {
2224 {
2225 .gpu_freq = 200000000,
2226 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002227 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002228 {
2229 .gpu_freq = 200000000,
2230 .bus_freq = 0,
2231 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002232 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002233 .init_level = 0,
2234 .num_levels = 2,
2235 .set_grp_async = NULL,
2236 .idle_timeout = HZ/10,
2237 .nap_allowed = true,
2238 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002239#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002240 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002241#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002242 .iommu_user_ctx_name = "gfx2d0_2d0",
2243 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002244};
2245
2246struct platform_device msm_kgsl_2d0 = {
2247 .name = "kgsl-2d0",
2248 .id = 0,
2249 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2250 .resource = kgsl_2d0_resources,
2251 .dev = {
2252 .platform_data = &kgsl_2d0_pdata,
2253 },
2254};
2255
2256static struct resource kgsl_2d1_resources[] = {
2257 {
2258 .name = KGSL_2D1_REG_MEMORY,
2259 .start = 0x04200000, /* Z180 device 1 base address */
2260 .end = 0x04200FFF,
2261 .flags = IORESOURCE_MEM,
2262 },
2263 {
2264 .name = KGSL_2D1_IRQ,
2265 .start = GFX2D1_IRQ,
2266 .end = GFX2D1_IRQ,
2267 .flags = IORESOURCE_IRQ,
2268 },
2269};
2270
2271static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002272 .pwrlevel = {
2273 {
2274 .gpu_freq = 200000000,
2275 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002276 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002277 {
2278 .gpu_freq = 200000000,
2279 .bus_freq = 0,
2280 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002281 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002282 .init_level = 0,
2283 .num_levels = 2,
2284 .set_grp_async = NULL,
2285 .idle_timeout = HZ/10,
2286 .nap_allowed = true,
2287 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002288#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002289 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002290#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002291 .iommu_user_ctx_name = "gfx2d1_2d1",
2292 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002293};
2294
2295struct platform_device msm_kgsl_2d1 = {
2296 .name = "kgsl-2d1",
2297 .id = 1,
2298 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2299 .resource = kgsl_2d1_resources,
2300 .dev = {
2301 .platform_data = &kgsl_2d1_pdata,
2302 },
2303};
2304
2305#ifdef CONFIG_MSM_GEMINI
2306static struct resource msm_gemini_resources[] = {
2307 {
2308 .start = 0x04600000,
2309 .end = 0x04600000 + SZ_1M - 1,
2310 .flags = IORESOURCE_MEM,
2311 },
2312 {
2313 .start = JPEG_IRQ,
2314 .end = JPEG_IRQ,
2315 .flags = IORESOURCE_IRQ,
2316 },
2317};
2318
2319struct platform_device msm8960_gemini_device = {
2320 .name = "msm_gemini",
2321 .resource = msm_gemini_resources,
2322 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2323};
2324#endif
2325
2326struct msm_rpm_map_data rpm_map_data[] __initdata = {
2327 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2328 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2329
2330 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2331
2332 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2333 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2334 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2335 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2336 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2337 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2338 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2339 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2340 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2341 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2342
2343 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2344 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2345 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2346 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2347
2348 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2349 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2350 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002351 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002352
2353 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2354 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2355 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2356 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2357
2358 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2359 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2360 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2361 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2362 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2363 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2364 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2365 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2366 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2367 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2368 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2369 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2370 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2371 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2372 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2373 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2374 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2375 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2376 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2377 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2378 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2379 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2380 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2381 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2382 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2383 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2384 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2385 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2386 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2387 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2388 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2389 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2390 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2391 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2392 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2393 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2394 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2395 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2396 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2397 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2398 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2399 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2400 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2401 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2402 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2403 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2404 MSM_RPM_MAP(NCP_0, NCP, 2),
2405 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2406 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2407 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002408 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002409
2410};
2411unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2412
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002413struct platform_device msm_rpm_device = {
2414 .name = "msm_rpm",
2415 .id = -1,
2416};
2417
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002418static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2419 .phys_addr_base = 0x0010D204,
2420 .phys_size = SZ_8K,
2421};
2422
2423struct platform_device msm_rpm_stat_device = {
2424 .name = "msm_rpm_stat",
2425 .id = -1,
2426 .dev = {
2427 .platform_data = &msm_rpm_stat_pdata,
2428 },
2429};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002430
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002431struct platform_device msm_bus_sys_fabric = {
2432 .name = "msm_bus_fabric",
2433 .id = MSM_BUS_FAB_SYSTEM,
2434};
2435struct platform_device msm_bus_apps_fabric = {
2436 .name = "msm_bus_fabric",
2437 .id = MSM_BUS_FAB_APPSS,
2438};
2439struct platform_device msm_bus_mm_fabric = {
2440 .name = "msm_bus_fabric",
2441 .id = MSM_BUS_FAB_MMSS,
2442};
2443struct platform_device msm_bus_sys_fpb = {
2444 .name = "msm_bus_fabric",
2445 .id = MSM_BUS_FAB_SYSTEM_FPB,
2446};
2447struct platform_device msm_bus_cpss_fpb = {
2448 .name = "msm_bus_fabric",
2449 .id = MSM_BUS_FAB_CPSS_FPB,
2450};
2451
2452/* Sensors DSPS platform data */
2453#ifdef CONFIG_MSM_DSPS
2454
2455#define PPSS_REG_PHYS_BASE 0x12080000
2456
2457static struct dsps_clk_info dsps_clks[] = {};
2458static struct dsps_regulator_info dsps_regs[] = {};
2459
2460/*
2461 * Note: GPIOs field is intialized in run-time at the function
2462 * msm8960_init_dsps().
2463 */
2464
2465struct msm_dsps_platform_data msm_dsps_pdata = {
2466 .clks = dsps_clks,
2467 .clks_num = ARRAY_SIZE(dsps_clks),
2468 .gpios = NULL,
2469 .gpios_num = 0,
2470 .regs = dsps_regs,
2471 .regs_num = ARRAY_SIZE(dsps_regs),
2472 .dsps_pwr_ctl_en = 1,
2473 .signature = DSPS_SIGNATURE,
2474};
2475
2476static struct resource msm_dsps_resources[] = {
2477 {
2478 .start = PPSS_REG_PHYS_BASE,
2479 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2480 .name = "ppss_reg",
2481 .flags = IORESOURCE_MEM,
2482 },
Wentao Xua55500b2011-08-16 18:15:04 -04002483
2484 {
2485 .start = PPSS_WDOG_TIMER_IRQ,
2486 .end = PPSS_WDOG_TIMER_IRQ,
2487 .name = "ppss_wdog",
2488 .flags = IORESOURCE_IRQ,
2489 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002490};
2491
2492struct platform_device msm_dsps_device = {
2493 .name = "msm_dsps",
2494 .id = 0,
2495 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2496 .resource = msm_dsps_resources,
2497 .dev.platform_data = &msm_dsps_pdata,
2498};
2499
2500#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002501
2502#ifdef CONFIG_MSM_QDSS
2503
2504#define MSM_QDSS_PHYS_BASE 0x01A00000
2505#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2506#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2507#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002508#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002509#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2510
2511static struct resource msm_etb_resources[] = {
2512 {
2513 .start = MSM_ETB_PHYS_BASE,
2514 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2515 .flags = IORESOURCE_MEM,
2516 },
2517};
2518
2519struct platform_device msm_etb_device = {
2520 .name = "msm_etb",
2521 .id = 0,
2522 .num_resources = ARRAY_SIZE(msm_etb_resources),
2523 .resource = msm_etb_resources,
2524};
2525
2526static struct resource msm_tpiu_resources[] = {
2527 {
2528 .start = MSM_TPIU_PHYS_BASE,
2529 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2530 .flags = IORESOURCE_MEM,
2531 },
2532};
2533
2534struct platform_device msm_tpiu_device = {
2535 .name = "msm_tpiu",
2536 .id = 0,
2537 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2538 .resource = msm_tpiu_resources,
2539};
2540
2541static struct resource msm_funnel_resources[] = {
2542 {
2543 .start = MSM_FUNNEL_PHYS_BASE,
2544 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2545 .flags = IORESOURCE_MEM,
2546 },
2547};
2548
2549struct platform_device msm_funnel_device = {
2550 .name = "msm_funnel",
2551 .id = 0,
2552 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2553 .resource = msm_funnel_resources,
2554};
2555
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002556static struct resource msm_debug_resources[] = {
2557 {
2558 .start = MSM_DEBUG_PHYS_BASE,
2559 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2560 .flags = IORESOURCE_MEM,
2561 },
2562 {
2563 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2564 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2565 .flags = IORESOURCE_MEM,
2566 },
2567};
2568
2569struct platform_device msm_debug_device = {
2570 .name = "msm_debug",
2571 .id = 0,
2572 .num_resources = ARRAY_SIZE(msm_debug_resources),
2573 .resource = msm_debug_resources,
2574};
2575
Pratik Patel7831c082011-06-08 21:44:37 -07002576static struct resource msm_ptm_resources[] = {
2577 {
2578 .start = MSM_PTM_PHYS_BASE,
2579 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2580 .flags = IORESOURCE_MEM,
2581 },
2582};
2583
2584struct platform_device msm_ptm_device = {
2585 .name = "msm_ptm",
2586 .id = 0,
2587 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2588 .resource = msm_ptm_resources,
2589};
2590
2591#endif