blob: dbf26d9957fbc210fdee52d502180b99fe8356a9 [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>
Eric Holmberg023d25c2012-03-01 12:27:55 -070033#include <mach/msm_smd.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070034#include <sound/msm-dai-q6.h>
35#include <sound/apr_audio.h>
Joel Nidera1261942011-09-12 16:30:09 +030036#include <mach/msm_tsif.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070037#include "clock.h"
38#include "devices.h"
39#include "devices-msm8x60.h"
40#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070041#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060042#include "rpm_log.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060043#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070044#include "pil-q6v4.h"
45#include "scm-pas.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070046
47#ifdef CONFIG_MSM_MPM
48#include "mpm.h"
49#endif
50#ifdef CONFIG_MSM_DSPS
51#include <mach/msm_dsps.h>
52#endif
53
54
55/* Address of GSBI blocks */
56#define MSM_GSBI1_PHYS 0x16000000
57#define MSM_GSBI2_PHYS 0x16100000
58#define MSM_GSBI3_PHYS 0x16200000
59#define MSM_GSBI4_PHYS 0x16300000
60#define MSM_GSBI5_PHYS 0x16400000
61#define MSM_GSBI6_PHYS 0x16500000
62#define MSM_GSBI7_PHYS 0x16600000
63#define MSM_GSBI8_PHYS 0x1A000000
64#define MSM_GSBI9_PHYS 0x1A100000
65#define MSM_GSBI10_PHYS 0x1A200000
66#define MSM_GSBI11_PHYS 0x12440000
67#define MSM_GSBI12_PHYS 0x12480000
68
69#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
70#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053071#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070072
73/* GSBI QUP devices */
74#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
75#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
76#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
77#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
78#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
79#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
80#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
81#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
82#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
83#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
84#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
85#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
86#define MSM_QUP_SIZE SZ_4K
87
88#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
89#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
90#define MSM_PMIC_SSBI_SIZE SZ_4K
91
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070092#define MSM8960_HSUSB_PHYS 0x12500000
93#define MSM8960_HSUSB_SIZE SZ_4K
94
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070095static struct resource resources_otg[] = {
96 {
97 .start = MSM8960_HSUSB_PHYS,
98 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
99 .flags = IORESOURCE_MEM,
100 },
101 {
102 .start = USB1_HS_IRQ,
103 .end = USB1_HS_IRQ,
104 .flags = IORESOURCE_IRQ,
105 },
106};
107
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700108struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700109 .name = "msm_otg",
110 .id = -1,
111 .num_resources = ARRAY_SIZE(resources_otg),
112 .resource = resources_otg,
113 .dev = {
114 .coherent_dma_mask = 0xffffffff,
115 },
116};
117
118static struct resource resources_hsusb[] = {
119 {
120 .start = MSM8960_HSUSB_PHYS,
121 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
122 .flags = IORESOURCE_MEM,
123 },
124 {
125 .start = USB1_HS_IRQ,
126 .end = USB1_HS_IRQ,
127 .flags = IORESOURCE_IRQ,
128 },
129};
130
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700131struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700132 .name = "msm_hsusb",
133 .id = -1,
134 .num_resources = ARRAY_SIZE(resources_hsusb),
135 .resource = resources_hsusb,
136 .dev = {
137 .coherent_dma_mask = 0xffffffff,
138 },
139};
140
141static struct resource resources_hsusb_host[] = {
142 {
143 .start = MSM8960_HSUSB_PHYS,
144 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
145 .flags = IORESOURCE_MEM,
146 },
147 {
148 .start = USB1_HS_IRQ,
149 .end = USB1_HS_IRQ,
150 .flags = IORESOURCE_IRQ,
151 },
152};
153
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530154static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700155struct platform_device msm_device_hsusb_host = {
156 .name = "msm_hsusb_host",
157 .id = -1,
158 .num_resources = ARRAY_SIZE(resources_hsusb_host),
159 .resource = resources_hsusb_host,
160 .dev = {
161 .dma_mask = &dma_mask,
162 .coherent_dma_mask = 0xffffffff,
163 },
164};
165
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530166static struct resource resources_hsic_host[] = {
167 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700168 .start = 0x12520000,
169 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530170 .flags = IORESOURCE_MEM,
171 },
172 {
173 .start = USB_HSIC_IRQ,
174 .end = USB_HSIC_IRQ,
175 .flags = IORESOURCE_IRQ,
176 },
Vamsi Krishna34f01582011-12-14 19:54:42 -0800177 {
178 .start = MSM_GPIO_TO_INT(69),
179 .end = MSM_GPIO_TO_INT(69),
180 .name = "peripheral_status_irq",
181 .flags = IORESOURCE_IRQ,
182 },
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530183};
184
185struct platform_device msm_device_hsic_host = {
186 .name = "msm_hsic_host",
187 .id = -1,
188 .num_resources = ARRAY_SIZE(resources_hsic_host),
189 .resource = resources_hsic_host,
190 .dev = {
191 .dma_mask = &dma_mask,
192 .coherent_dma_mask = DMA_BIT_MASK(32),
193 },
194};
195
Mona Hossain11c03ac2011-10-26 12:42:10 -0700196#define SHARED_IMEM_TZ_BASE 0x2a03f720
197static struct resource tzlog_resources[] = {
198 {
199 .start = SHARED_IMEM_TZ_BASE,
200 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
201 .flags = IORESOURCE_MEM,
202 },
203};
204
205struct platform_device msm_device_tz_log = {
206 .name = "tz_log",
207 .id = 0,
208 .num_resources = ARRAY_SIZE(tzlog_resources),
209 .resource = tzlog_resources,
210};
211
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700212static struct resource resources_uart_gsbi2[] = {
213 {
214 .start = MSM8960_GSBI2_UARTDM_IRQ,
215 .end = MSM8960_GSBI2_UARTDM_IRQ,
216 .flags = IORESOURCE_IRQ,
217 },
218 {
219 .start = MSM_UART2DM_PHYS,
220 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
221 .name = "uartdm_resource",
222 .flags = IORESOURCE_MEM,
223 },
224 {
225 .start = MSM_GSBI2_PHYS,
226 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
227 .name = "gsbi_resource",
228 .flags = IORESOURCE_MEM,
229 },
230};
231
232struct platform_device msm8960_device_uart_gsbi2 = {
233 .name = "msm_serial_hsl",
234 .id = 0,
235 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
236 .resource = resources_uart_gsbi2,
237};
Mayank Rana9f51f582011-08-04 18:35:59 +0530238/* GSBI 6 used into UARTDM Mode */
239static struct resource msm_uart_dm6_resources[] = {
240 {
241 .start = MSM_UART6DM_PHYS,
242 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
243 .name = "uartdm_resource",
244 .flags = IORESOURCE_MEM,
245 },
246 {
247 .start = GSBI6_UARTDM_IRQ,
248 .end = GSBI6_UARTDM_IRQ,
249 .flags = IORESOURCE_IRQ,
250 },
251 {
252 .start = MSM_GSBI6_PHYS,
253 .end = MSM_GSBI6_PHYS + 4 - 1,
254 .name = "gsbi_resource",
255 .flags = IORESOURCE_MEM,
256 },
257 {
258 .start = DMOV_HSUART_GSBI6_TX_CHAN,
259 .end = DMOV_HSUART_GSBI6_RX_CHAN,
260 .name = "uartdm_channels",
261 .flags = IORESOURCE_DMA,
262 },
263 {
264 .start = DMOV_HSUART_GSBI6_TX_CRCI,
265 .end = DMOV_HSUART_GSBI6_RX_CRCI,
266 .name = "uartdm_crci",
267 .flags = IORESOURCE_DMA,
268 },
269};
270static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
271struct platform_device msm_device_uart_dm6 = {
272 .name = "msm_serial_hs",
273 .id = 0,
274 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
275 .resource = msm_uart_dm6_resources,
276 .dev = {
277 .dma_mask = &msm_uart_dm6_dma_mask,
278 .coherent_dma_mask = DMA_BIT_MASK(32),
279 },
280};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700281
282static struct resource resources_uart_gsbi5[] = {
283 {
284 .start = GSBI5_UARTDM_IRQ,
285 .end = GSBI5_UARTDM_IRQ,
286 .flags = IORESOURCE_IRQ,
287 },
288 {
289 .start = MSM_UART5DM_PHYS,
290 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
291 .name = "uartdm_resource",
292 .flags = IORESOURCE_MEM,
293 },
294 {
295 .start = MSM_GSBI5_PHYS,
296 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
297 .name = "gsbi_resource",
298 .flags = IORESOURCE_MEM,
299 },
300};
301
302struct platform_device msm8960_device_uart_gsbi5 = {
303 .name = "msm_serial_hsl",
304 .id = 0,
305 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
306 .resource = resources_uart_gsbi5,
307};
308/* MSM Video core device */
309#ifdef CONFIG_MSM_BUS_SCALING
310static struct msm_bus_vectors vidc_init_vectors[] = {
311 {
312 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
313 .dst = MSM_BUS_SLAVE_EBI_CH0,
314 .ab = 0,
315 .ib = 0,
316 },
317 {
318 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
319 .dst = MSM_BUS_SLAVE_EBI_CH0,
320 .ab = 0,
321 .ib = 0,
322 },
323 {
324 .src = MSM_BUS_MASTER_AMPSS_M0,
325 .dst = MSM_BUS_SLAVE_EBI_CH0,
326 .ab = 0,
327 .ib = 0,
328 },
329 {
330 .src = MSM_BUS_MASTER_AMPSS_M0,
331 .dst = MSM_BUS_SLAVE_EBI_CH0,
332 .ab = 0,
333 .ib = 0,
334 },
335};
336static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
337 {
338 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
339 .dst = MSM_BUS_SLAVE_EBI_CH0,
340 .ab = 54525952,
341 .ib = 436207616,
342 },
343 {
344 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
345 .dst = MSM_BUS_SLAVE_EBI_CH0,
346 .ab = 72351744,
347 .ib = 289406976,
348 },
349 {
350 .src = MSM_BUS_MASTER_AMPSS_M0,
351 .dst = MSM_BUS_SLAVE_EBI_CH0,
352 .ab = 500000,
353 .ib = 1000000,
354 },
355 {
356 .src = MSM_BUS_MASTER_AMPSS_M0,
357 .dst = MSM_BUS_SLAVE_EBI_CH0,
358 .ab = 500000,
359 .ib = 1000000,
360 },
361};
362static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
363 {
364 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
365 .dst = MSM_BUS_SLAVE_EBI_CH0,
366 .ab = 40894464,
367 .ib = 327155712,
368 },
369 {
370 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
371 .dst = MSM_BUS_SLAVE_EBI_CH0,
372 .ab = 48234496,
373 .ib = 192937984,
374 },
375 {
376 .src = MSM_BUS_MASTER_AMPSS_M0,
377 .dst = MSM_BUS_SLAVE_EBI_CH0,
378 .ab = 500000,
379 .ib = 2000000,
380 },
381 {
382 .src = MSM_BUS_MASTER_AMPSS_M0,
383 .dst = MSM_BUS_SLAVE_EBI_CH0,
384 .ab = 500000,
385 .ib = 2000000,
386 },
387};
388static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
389 {
390 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
391 .dst = MSM_BUS_SLAVE_EBI_CH0,
392 .ab = 163577856,
393 .ib = 1308622848,
394 },
395 {
396 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
397 .dst = MSM_BUS_SLAVE_EBI_CH0,
398 .ab = 219152384,
399 .ib = 876609536,
400 },
401 {
402 .src = MSM_BUS_MASTER_AMPSS_M0,
403 .dst = MSM_BUS_SLAVE_EBI_CH0,
404 .ab = 1750000,
405 .ib = 3500000,
406 },
407 {
408 .src = MSM_BUS_MASTER_AMPSS_M0,
409 .dst = MSM_BUS_SLAVE_EBI_CH0,
410 .ab = 1750000,
411 .ib = 3500000,
412 },
413};
414static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
415 {
416 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
417 .dst = MSM_BUS_SLAVE_EBI_CH0,
418 .ab = 121634816,
419 .ib = 973078528,
420 },
421 {
422 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
423 .dst = MSM_BUS_SLAVE_EBI_CH0,
424 .ab = 155189248,
425 .ib = 620756992,
426 },
427 {
428 .src = MSM_BUS_MASTER_AMPSS_M0,
429 .dst = MSM_BUS_SLAVE_EBI_CH0,
430 .ab = 1750000,
431 .ib = 7000000,
432 },
433 {
434 .src = MSM_BUS_MASTER_AMPSS_M0,
435 .dst = MSM_BUS_SLAVE_EBI_CH0,
436 .ab = 1750000,
437 .ib = 7000000,
438 },
439};
440static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
441 {
442 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
443 .dst = MSM_BUS_SLAVE_EBI_CH0,
444 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700445 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700446 },
447 {
448 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
449 .dst = MSM_BUS_SLAVE_EBI_CH0,
450 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700451 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700452 },
453 {
454 .src = MSM_BUS_MASTER_AMPSS_M0,
455 .dst = MSM_BUS_SLAVE_EBI_CH0,
456 .ab = 2500000,
457 .ib = 5000000,
458 },
459 {
460 .src = MSM_BUS_MASTER_AMPSS_M0,
461 .dst = MSM_BUS_SLAVE_EBI_CH0,
462 .ab = 2500000,
463 .ib = 5000000,
464 },
465};
466static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
467 {
468 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
469 .dst = MSM_BUS_SLAVE_EBI_CH0,
470 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700471 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700472 },
473 {
474 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
475 .dst = MSM_BUS_SLAVE_EBI_CH0,
476 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700477 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700478 },
479 {
480 .src = MSM_BUS_MASTER_AMPSS_M0,
481 .dst = MSM_BUS_SLAVE_EBI_CH0,
482 .ab = 2500000,
483 .ib = 700000000,
484 },
485 {
486 .src = MSM_BUS_MASTER_AMPSS_M0,
487 .dst = MSM_BUS_SLAVE_EBI_CH0,
488 .ab = 2500000,
489 .ib = 10000000,
490 },
491};
492
493static struct msm_bus_paths vidc_bus_client_config[] = {
494 {
495 ARRAY_SIZE(vidc_init_vectors),
496 vidc_init_vectors,
497 },
498 {
499 ARRAY_SIZE(vidc_venc_vga_vectors),
500 vidc_venc_vga_vectors,
501 },
502 {
503 ARRAY_SIZE(vidc_vdec_vga_vectors),
504 vidc_vdec_vga_vectors,
505 },
506 {
507 ARRAY_SIZE(vidc_venc_720p_vectors),
508 vidc_venc_720p_vectors,
509 },
510 {
511 ARRAY_SIZE(vidc_vdec_720p_vectors),
512 vidc_vdec_720p_vectors,
513 },
514 {
515 ARRAY_SIZE(vidc_venc_1080p_vectors),
516 vidc_venc_1080p_vectors,
517 },
518 {
519 ARRAY_SIZE(vidc_vdec_1080p_vectors),
520 vidc_vdec_1080p_vectors,
521 },
522};
523
524static struct msm_bus_scale_pdata vidc_bus_client_data = {
525 vidc_bus_client_config,
526 ARRAY_SIZE(vidc_bus_client_config),
527 .name = "vidc",
528};
529#endif
530
Mona Hossain9c430e32011-07-27 11:04:47 -0700531#ifdef CONFIG_HW_RANDOM_MSM
532/* PRNG device */
533#define MSM_PRNG_PHYS 0x1A500000
534static struct resource rng_resources = {
535 .flags = IORESOURCE_MEM,
536 .start = MSM_PRNG_PHYS,
537 .end = MSM_PRNG_PHYS + SZ_512 - 1,
538};
539
540struct platform_device msm_device_rng = {
541 .name = "msm_rng",
542 .id = 0,
543 .num_resources = 1,
544 .resource = &rng_resources,
545};
546#endif
547
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700548#define MSM_VIDC_BASE_PHYS 0x04400000
549#define MSM_VIDC_BASE_SIZE 0x00100000
550
551static struct resource msm_device_vidc_resources[] = {
552 {
553 .start = MSM_VIDC_BASE_PHYS,
554 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
555 .flags = IORESOURCE_MEM,
556 },
557 {
558 .start = VCODEC_IRQ,
559 .end = VCODEC_IRQ,
560 .flags = IORESOURCE_IRQ,
561 },
562};
563
564struct msm_vidc_platform_data vidc_platform_data = {
565#ifdef CONFIG_MSM_BUS_SCALING
566 .vidc_bus_client_pdata = &vidc_bus_client_data,
567#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700568#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Olav Hauganb5be7992011-11-18 14:29:02 -0800569 .memtype = ION_CP_MM_HEAP_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700570 .enable_ion = 1,
571#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800572 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700573 .enable_ion = 0,
574#endif
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800575 .disable_dmx = 0,
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530576 .disable_fullhd = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700577};
578
579struct platform_device msm_device_vidc = {
580 .name = "msm_vidc",
581 .id = 0,
582 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
583 .resource = msm_device_vidc_resources,
584 .dev = {
585 .platform_data = &vidc_platform_data,
586 },
587};
588
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700589#define MSM_SDC1_BASE 0x12400000
590#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
591#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
592#define MSM_SDC2_BASE 0x12140000
593#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
594#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
595#define MSM_SDC2_BASE 0x12140000
596#define MSM_SDC3_BASE 0x12180000
597#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
598#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
599#define MSM_SDC4_BASE 0x121C0000
600#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
601#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
602#define MSM_SDC5_BASE 0x12200000
603#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
604#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
605
606static struct resource resources_sdc1[] = {
607 {
608 .name = "core_mem",
609 .flags = IORESOURCE_MEM,
610 .start = MSM_SDC1_BASE,
611 .end = MSM_SDC1_DML_BASE - 1,
612 },
613 {
614 .name = "core_irq",
615 .flags = IORESOURCE_IRQ,
616 .start = SDC1_IRQ_0,
617 .end = SDC1_IRQ_0
618 },
619#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
620 {
621 .name = "sdcc_dml_addr",
622 .start = MSM_SDC1_DML_BASE,
623 .end = MSM_SDC1_BAM_BASE - 1,
624 .flags = IORESOURCE_MEM,
625 },
626 {
627 .name = "sdcc_bam_addr",
628 .start = MSM_SDC1_BAM_BASE,
629 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
630 .flags = IORESOURCE_MEM,
631 },
632 {
633 .name = "sdcc_bam_irq",
634 .start = SDC1_BAM_IRQ,
635 .end = SDC1_BAM_IRQ,
636 .flags = IORESOURCE_IRQ,
637 },
638#endif
639};
640
641static struct resource resources_sdc2[] = {
642 {
643 .name = "core_mem",
644 .flags = IORESOURCE_MEM,
645 .start = MSM_SDC2_BASE,
646 .end = MSM_SDC2_DML_BASE - 1,
647 },
648 {
649 .name = "core_irq",
650 .flags = IORESOURCE_IRQ,
651 .start = SDC2_IRQ_0,
652 .end = SDC2_IRQ_0
653 },
654#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
655 {
656 .name = "sdcc_dml_addr",
657 .start = MSM_SDC2_DML_BASE,
658 .end = MSM_SDC2_BAM_BASE - 1,
659 .flags = IORESOURCE_MEM,
660 },
661 {
662 .name = "sdcc_bam_addr",
663 .start = MSM_SDC2_BAM_BASE,
664 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
665 .flags = IORESOURCE_MEM,
666 },
667 {
668 .name = "sdcc_bam_irq",
669 .start = SDC2_BAM_IRQ,
670 .end = SDC2_BAM_IRQ,
671 .flags = IORESOURCE_IRQ,
672 },
673#endif
674};
675
676static struct resource resources_sdc3[] = {
677 {
678 .name = "core_mem",
679 .flags = IORESOURCE_MEM,
680 .start = MSM_SDC3_BASE,
681 .end = MSM_SDC3_DML_BASE - 1,
682 },
683 {
684 .name = "core_irq",
685 .flags = IORESOURCE_IRQ,
686 .start = SDC3_IRQ_0,
687 .end = SDC3_IRQ_0
688 },
689#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
690 {
691 .name = "sdcc_dml_addr",
692 .start = MSM_SDC3_DML_BASE,
693 .end = MSM_SDC3_BAM_BASE - 1,
694 .flags = IORESOURCE_MEM,
695 },
696 {
697 .name = "sdcc_bam_addr",
698 .start = MSM_SDC3_BAM_BASE,
699 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
700 .flags = IORESOURCE_MEM,
701 },
702 {
703 .name = "sdcc_bam_irq",
704 .start = SDC3_BAM_IRQ,
705 .end = SDC3_BAM_IRQ,
706 .flags = IORESOURCE_IRQ,
707 },
708#endif
709};
710
711static struct resource resources_sdc4[] = {
712 {
713 .name = "core_mem",
714 .flags = IORESOURCE_MEM,
715 .start = MSM_SDC4_BASE,
716 .end = MSM_SDC4_DML_BASE - 1,
717 },
718 {
719 .name = "core_irq",
720 .flags = IORESOURCE_IRQ,
721 .start = SDC4_IRQ_0,
722 .end = SDC4_IRQ_0
723 },
724#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
725 {
726 .name = "sdcc_dml_addr",
727 .start = MSM_SDC4_DML_BASE,
728 .end = MSM_SDC4_BAM_BASE - 1,
729 .flags = IORESOURCE_MEM,
730 },
731 {
732 .name = "sdcc_bam_addr",
733 .start = MSM_SDC4_BAM_BASE,
734 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
735 .flags = IORESOURCE_MEM,
736 },
737 {
738 .name = "sdcc_bam_irq",
739 .start = SDC4_BAM_IRQ,
740 .end = SDC4_BAM_IRQ,
741 .flags = IORESOURCE_IRQ,
742 },
743#endif
744};
745
746static struct resource resources_sdc5[] = {
747 {
748 .name = "core_mem",
749 .flags = IORESOURCE_MEM,
750 .start = MSM_SDC5_BASE,
751 .end = MSM_SDC5_DML_BASE - 1,
752 },
753 {
754 .name = "core_irq",
755 .flags = IORESOURCE_IRQ,
756 .start = SDC5_IRQ_0,
757 .end = SDC5_IRQ_0
758 },
759#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
760 {
761 .name = "sdcc_dml_addr",
762 .start = MSM_SDC5_DML_BASE,
763 .end = MSM_SDC5_BAM_BASE - 1,
764 .flags = IORESOURCE_MEM,
765 },
766 {
767 .name = "sdcc_bam_addr",
768 .start = MSM_SDC5_BAM_BASE,
769 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
770 .flags = IORESOURCE_MEM,
771 },
772 {
773 .name = "sdcc_bam_irq",
774 .start = SDC5_BAM_IRQ,
775 .end = SDC5_BAM_IRQ,
776 .flags = IORESOURCE_IRQ,
777 },
778#endif
779};
780
781struct platform_device msm_device_sdc1 = {
782 .name = "msm_sdcc",
783 .id = 1,
784 .num_resources = ARRAY_SIZE(resources_sdc1),
785 .resource = resources_sdc1,
786 .dev = {
787 .coherent_dma_mask = 0xffffffff,
788 },
789};
790
791struct platform_device msm_device_sdc2 = {
792 .name = "msm_sdcc",
793 .id = 2,
794 .num_resources = ARRAY_SIZE(resources_sdc2),
795 .resource = resources_sdc2,
796 .dev = {
797 .coherent_dma_mask = 0xffffffff,
798 },
799};
800
801struct platform_device msm_device_sdc3 = {
802 .name = "msm_sdcc",
803 .id = 3,
804 .num_resources = ARRAY_SIZE(resources_sdc3),
805 .resource = resources_sdc3,
806 .dev = {
807 .coherent_dma_mask = 0xffffffff,
808 },
809};
810
811struct platform_device msm_device_sdc4 = {
812 .name = "msm_sdcc",
813 .id = 4,
814 .num_resources = ARRAY_SIZE(resources_sdc4),
815 .resource = resources_sdc4,
816 .dev = {
817 .coherent_dma_mask = 0xffffffff,
818 },
819};
820
821struct platform_device msm_device_sdc5 = {
822 .name = "msm_sdcc",
823 .id = 5,
824 .num_resources = ARRAY_SIZE(resources_sdc5),
825 .resource = resources_sdc5,
826 .dev = {
827 .coherent_dma_mask = 0xffffffff,
828 },
829};
830
Stephen Boydeb819882011-08-29 14:46:30 -0700831#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
832#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
833
834static struct resource msm_8960_q6_lpass_resources[] = {
835 {
836 .start = MSM_LPASS_QDSP6SS_PHYS,
837 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
838 .flags = IORESOURCE_MEM,
839 },
840};
841
842static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
843 .strap_tcm_base = 0x01460000,
844 .strap_ahb_upper = 0x00290000,
845 .strap_ahb_lower = 0x00000280,
846 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
847 .name = "q6",
848 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700849 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700850};
851
852struct platform_device msm_8960_q6_lpass = {
853 .name = "pil_qdsp6v4",
854 .id = 0,
855 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
856 .resource = msm_8960_q6_lpass_resources,
857 .dev.platform_data = &msm_8960_q6_lpass_data,
858};
859
860#define MSM_MSS_ENABLE_PHYS 0x08B00000
861#define MSM_FW_QDSP6SS_PHYS 0x08800000
862#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
863#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
864
865static struct resource msm_8960_q6_mss_fw_resources[] = {
866 {
867 .start = MSM_FW_QDSP6SS_PHYS,
868 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
869 .flags = IORESOURCE_MEM,
870 },
871 {
872 .start = MSM_MSS_ENABLE_PHYS,
873 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
874 .flags = IORESOURCE_MEM,
875 },
876};
877
878static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
879 .strap_tcm_base = 0x00400000,
880 .strap_ahb_upper = 0x00090000,
881 .strap_ahb_lower = 0x00000080,
882 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
883 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
884 .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,
921 .name = "modem",
922 .depends = "modem_fw",
923 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700924 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700925};
926
927struct platform_device msm_8960_q6_mss_sw = {
928 .name = "pil_qdsp6v4",
929 .id = 2,
930 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
931 .resource = msm_8960_q6_mss_sw_resources,
932 .dev.platform_data = &msm_8960_q6_mss_sw_data,
933};
934
Stephen Boyd322a9922011-09-20 01:05:54 -0700935static struct resource msm_8960_riva_resources[] = {
936 {
937 .start = 0x03204000,
938 .end = 0x03204000 + SZ_256 - 1,
939 .flags = IORESOURCE_MEM,
940 },
941};
942
943struct platform_device msm_8960_riva = {
944 .name = "pil_riva",
945 .id = -1,
946 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
947 .resource = msm_8960_riva_resources,
948};
949
Stephen Boydd89eebe2011-09-28 23:28:11 -0700950struct platform_device msm_pil_tzapps = {
951 .name = "pil_tzapps",
952 .id = -1,
953};
954
Eric Holmberg023d25c2012-03-01 12:27:55 -0700955static struct resource smd_resource[] = {
956 {
957 .name = "a9_m2a_0",
958 .start = INT_A9_M2A_0,
959 .flags = IORESOURCE_IRQ,
960 },
961 {
962 .name = "a9_m2a_5",
963 .start = INT_A9_M2A_5,
964 .flags = IORESOURCE_IRQ,
965 },
966 {
967 .name = "adsp_a11",
968 .start = INT_ADSP_A11,
969 .flags = IORESOURCE_IRQ,
970 },
971 {
972 .name = "adsp_a11_smsm",
973 .start = INT_ADSP_A11_SMSM,
974 .flags = IORESOURCE_IRQ,
975 },
976 {
977 .name = "dsps_a11",
978 .start = INT_DSPS_A11,
979 .flags = IORESOURCE_IRQ,
980 },
981 {
982 .name = "dsps_a11_smsm",
983 .start = INT_DSPS_A11_SMSM,
984 .flags = IORESOURCE_IRQ,
985 },
986 {
987 .name = "wcnss_a11",
988 .start = INT_WCNSS_A11,
989 .flags = IORESOURCE_IRQ,
990 },
991 {
992 .name = "wcnss_a11_smsm",
993 .start = INT_WCNSS_A11_SMSM,
994 .flags = IORESOURCE_IRQ,
995 },
996};
997
998static struct smd_subsystem_config smd_config_list[] = {
999 {
1000 .irq_config_id = SMD_MODEM,
1001 .subsys_name = "modem",
1002 .edge = SMD_APPS_MODEM,
1003
1004 .smd_int.irq_name = "a9_m2a_0",
1005 .smd_int.flags = IRQF_TRIGGER_RISING,
1006 .smd_int.irq_id = -1,
1007 .smd_int.device_name = "smd_dev",
1008 .smd_int.dev_id = 0,
1009 .smd_int.out_bit_pos = 1 << 3,
1010 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1011 .smd_int.out_offset = 0x8,
1012
1013 .smsm_int.irq_name = "a9_m2a_5",
1014 .smsm_int.flags = IRQF_TRIGGER_RISING,
1015 .smsm_int.irq_id = -1,
1016 .smsm_int.device_name = "smd_smsm",
1017 .smsm_int.dev_id = 0,
1018 .smsm_int.out_bit_pos = 1 << 4,
1019 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1020 .smsm_int.out_offset = 0x8,
1021 },
1022 {
1023 .irq_config_id = SMD_Q6,
1024 .subsys_name = "q6",
1025 .edge = SMD_APPS_QDSP,
1026
1027 .smd_int.irq_name = "adsp_a11",
1028 .smd_int.flags = IRQF_TRIGGER_RISING,
1029 .smd_int.irq_id = -1,
1030 .smd_int.device_name = "smd_dev",
1031 .smd_int.dev_id = 0,
1032 .smd_int.out_bit_pos = 1 << 15,
1033 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1034 .smd_int.out_offset = 0x8,
1035
1036 .smsm_int.irq_name = "adsp_a11_smsm",
1037 .smsm_int.flags = IRQF_TRIGGER_RISING,
1038 .smsm_int.irq_id = -1,
1039 .smsm_int.device_name = "smd_smsm",
1040 .smsm_int.dev_id = 0,
1041 .smsm_int.out_bit_pos = 1 << 14,
1042 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1043 .smsm_int.out_offset = 0x8,
1044 },
1045 {
1046 .irq_config_id = SMD_DSPS,
1047 .subsys_name = "dsps",
1048 .edge = SMD_APPS_DSPS,
1049
1050 .smd_int.irq_name = "dsps_a11",
1051 .smd_int.flags = IRQF_TRIGGER_RISING,
1052 .smd_int.irq_id = -1,
1053 .smd_int.device_name = "smd_dev",
1054 .smd_int.dev_id = 0,
1055 .smd_int.out_bit_pos = 1,
1056 .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1057 .smd_int.out_offset = 0x4080,
1058
1059 .smsm_int.irq_name = "dsps_a11_smsm",
1060 .smsm_int.flags = IRQF_TRIGGER_RISING,
1061 .smsm_int.irq_id = -1,
1062 .smsm_int.device_name = "smd_smsm",
1063 .smsm_int.dev_id = 0,
1064 .smsm_int.out_bit_pos = 1,
1065 .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1066 .smsm_int.out_offset = 0x4094,
1067 },
1068 {
1069 .irq_config_id = SMD_WCNSS,
1070 .subsys_name = "wcnss",
1071 .edge = SMD_APPS_WCNSS,
1072
1073 .smd_int.irq_name = "wcnss_a11",
1074 .smd_int.flags = IRQF_TRIGGER_RISING,
1075 .smd_int.irq_id = -1,
1076 .smd_int.device_name = "smd_dev",
1077 .smd_int.dev_id = 0,
1078 .smd_int.out_bit_pos = 1 << 25,
1079 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1080 .smd_int.out_offset = 0x8,
1081
1082 .smsm_int.irq_name = "wcnss_a11_smsm",
1083 .smsm_int.flags = IRQF_TRIGGER_RISING,
1084 .smsm_int.irq_id = -1,
1085 .smsm_int.device_name = "smd_smsm",
1086 .smsm_int.dev_id = 0,
1087 .smsm_int.out_bit_pos = 1 << 23,
1088 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1089 .smsm_int.out_offset = 0x8,
1090 },
1091};
1092
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001093static struct smd_subsystem_restart_config smd_ssr_config = {
1094 .disable_smsm_reset_handshake = 1,
1095};
1096
Eric Holmberg023d25c2012-03-01 12:27:55 -07001097static struct smd_platform smd_platform_data = {
1098 .num_ss_configs = ARRAY_SIZE(smd_config_list),
1099 .smd_ss_configs = smd_config_list,
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001100 .smd_ssr_config = &smd_ssr_config,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001101};
1102
1103
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001104struct platform_device msm_device_smd = {
1105 .name = "msm_smd",
1106 .id = -1,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001107 .resource = smd_resource,
1108 .num_resources = ARRAY_SIZE(smd_resource),
1109 .dev = {
1110 .platform_data = &smd_platform_data,
1111 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001112};
1113
1114struct platform_device msm_device_bam_dmux = {
1115 .name = "BAM_RMNT",
1116 .id = -1,
1117};
1118
Jeff Ohlstein7e668552011-10-06 16:17:25 -07001119static struct msm_watchdog_pdata msm_watchdog_pdata = {
1120 .pet_time = 10000,
1121 .bark_time = 11000,
1122 .has_secure = true,
1123};
1124
1125struct platform_device msm8960_device_watchdog = {
1126 .name = "msm_watchdog",
1127 .id = -1,
1128 .dev = {
1129 .platform_data = &msm_watchdog_pdata,
1130 },
1131};
1132
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001133static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001134 {
1135 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001136 .flags = IORESOURCE_IRQ,
1137 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001138 {
1139 .start = 0x18320000,
1140 .end = 0x18320000 + SZ_1M - 1,
1141 .flags = IORESOURCE_MEM,
1142 },
1143};
1144
1145static struct msm_dmov_pdata msm_dmov_pdata = {
1146 .sd = 1,
1147 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001148};
1149
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001150struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001151 .name = "msm_dmov",
1152 .id = -1,
1153 .resource = msm_dmov_resource,
1154 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001155 .dev = {
1156 .platform_data = &msm_dmov_pdata,
1157 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001158};
1159
1160static struct platform_device *msm_sdcc_devices[] __initdata = {
1161 &msm_device_sdc1,
1162 &msm_device_sdc2,
1163 &msm_device_sdc3,
1164 &msm_device_sdc4,
1165 &msm_device_sdc5,
1166};
1167
1168int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1169{
1170 struct platform_device *pdev;
1171
1172 if (controller < 1 || controller > 5)
1173 return -EINVAL;
1174
1175 pdev = msm_sdcc_devices[controller-1];
1176 pdev->dev.platform_data = plat;
1177 return platform_device_register(pdev);
1178}
1179
1180static struct resource resources_qup_i2c_gsbi4[] = {
1181 {
1182 .name = "gsbi_qup_i2c_addr",
1183 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001184 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001185 .flags = IORESOURCE_MEM,
1186 },
1187 {
1188 .name = "qup_phys_addr",
1189 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001190 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001191 .flags = IORESOURCE_MEM,
1192 },
1193 {
1194 .name = "qup_err_intr",
1195 .start = GSBI4_QUP_IRQ,
1196 .end = GSBI4_QUP_IRQ,
1197 .flags = IORESOURCE_IRQ,
1198 },
1199};
1200
1201struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1202 .name = "qup_i2c",
1203 .id = 4,
1204 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1205 .resource = resources_qup_i2c_gsbi4,
1206};
1207
1208static struct resource resources_qup_i2c_gsbi3[] = {
1209 {
1210 .name = "gsbi_qup_i2c_addr",
1211 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001212 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001213 .flags = IORESOURCE_MEM,
1214 },
1215 {
1216 .name = "qup_phys_addr",
1217 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001218 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001219 .flags = IORESOURCE_MEM,
1220 },
1221 {
1222 .name = "qup_err_intr",
1223 .start = GSBI3_QUP_IRQ,
1224 .end = GSBI3_QUP_IRQ,
1225 .flags = IORESOURCE_IRQ,
1226 },
1227};
1228
1229struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1230 .name = "qup_i2c",
1231 .id = 3,
1232 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1233 .resource = resources_qup_i2c_gsbi3,
1234};
1235
1236static struct resource resources_qup_i2c_gsbi10[] = {
1237 {
1238 .name = "gsbi_qup_i2c_addr",
1239 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001240 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001241 .flags = IORESOURCE_MEM,
1242 },
1243 {
1244 .name = "qup_phys_addr",
1245 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001246 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001247 .flags = IORESOURCE_MEM,
1248 },
1249 {
1250 .name = "qup_err_intr",
1251 .start = GSBI10_QUP_IRQ,
1252 .end = GSBI10_QUP_IRQ,
1253 .flags = IORESOURCE_IRQ,
1254 },
1255};
1256
1257struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1258 .name = "qup_i2c",
1259 .id = 10,
1260 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1261 .resource = resources_qup_i2c_gsbi10,
1262};
1263
1264static struct resource resources_qup_i2c_gsbi12[] = {
1265 {
1266 .name = "gsbi_qup_i2c_addr",
1267 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001268 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001269 .flags = IORESOURCE_MEM,
1270 },
1271 {
1272 .name = "qup_phys_addr",
1273 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001274 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001275 .flags = IORESOURCE_MEM,
1276 },
1277 {
1278 .name = "qup_err_intr",
1279 .start = GSBI12_QUP_IRQ,
1280 .end = GSBI12_QUP_IRQ,
1281 .flags = IORESOURCE_IRQ,
1282 },
1283};
1284
1285struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1286 .name = "qup_i2c",
1287 .id = 12,
1288 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1289 .resource = resources_qup_i2c_gsbi12,
1290};
1291
1292#ifdef CONFIG_MSM_CAMERA
Kevin Chanbb8ef862012-02-14 13:03:04 -08001293static struct resource msm_cam_gsbi4_i2c_mux_resources[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001294 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001295 .name = "i2c_mux_rw",
Nishant Pandit24153d82011-08-27 16:05:13 +05301296 .start = 0x008003E0,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001297 .end = 0x008003E0 + SZ_8 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301298 .flags = IORESOURCE_MEM,
1299 },
1300 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001301 .name = "i2c_mux_ctl",
Nishant Pandit24153d82011-08-27 16:05:13 +05301302 .start = 0x008020B8,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001303 .end = 0x008020B8 + SZ_4 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301304 .flags = IORESOURCE_MEM,
1305 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001306};
1307
Kevin Chanbb8ef862012-02-14 13:03:04 -08001308struct platform_device msm8960_device_i2c_mux_gsbi4 = {
1309 .name = "msm_cam_i2c_mux",
1310 .id = 0,
1311 .resource = msm_cam_gsbi4_i2c_mux_resources,
1312 .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources),
1313};
Kevin Chanf6216f22011-10-25 18:40:11 -07001314
1315static struct resource msm_csiphy0_resources[] = {
1316 {
1317 .name = "csiphy",
1318 .start = 0x04800C00,
1319 .end = 0x04800C00 + SZ_1K - 1,
1320 .flags = IORESOURCE_MEM,
1321 },
1322 {
1323 .name = "csiphy",
1324 .start = CSIPHY_4LN_IRQ,
1325 .end = CSIPHY_4LN_IRQ,
1326 .flags = IORESOURCE_IRQ,
1327 },
1328};
1329
1330static struct resource msm_csiphy1_resources[] = {
1331 {
1332 .name = "csiphy",
1333 .start = 0x04801000,
1334 .end = 0x04801000 + SZ_1K - 1,
1335 .flags = IORESOURCE_MEM,
1336 },
1337 {
1338 .name = "csiphy",
1339 .start = MSM8960_CSIPHY_2LN_IRQ,
1340 .end = MSM8960_CSIPHY_2LN_IRQ,
1341 .flags = IORESOURCE_IRQ,
1342 },
1343};
1344
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001345static struct resource msm_csiphy2_resources[] = {
1346 {
1347 .name = "csiphy",
1348 .start = 0x04801400,
1349 .end = 0x04801400 + SZ_1K - 1,
1350 .flags = IORESOURCE_MEM,
1351 },
1352 {
1353 .name = "csiphy",
1354 .start = MSM8960_CSIPHY_2_2LN_IRQ,
1355 .end = MSM8960_CSIPHY_2_2LN_IRQ,
1356 .flags = IORESOURCE_IRQ,
1357 },
1358};
1359
Kevin Chanf6216f22011-10-25 18:40:11 -07001360struct platform_device msm8960_device_csiphy0 = {
1361 .name = "msm_csiphy",
1362 .id = 0,
1363 .resource = msm_csiphy0_resources,
1364 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1365};
1366
1367struct platform_device msm8960_device_csiphy1 = {
1368 .name = "msm_csiphy",
1369 .id = 1,
1370 .resource = msm_csiphy1_resources,
1371 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1372};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001373
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001374struct platform_device msm8960_device_csiphy2 = {
1375 .name = "msm_csiphy",
1376 .id = 2,
1377 .resource = msm_csiphy2_resources,
1378 .num_resources = ARRAY_SIZE(msm_csiphy2_resources),
1379};
1380
Kevin Chanc8b52e82011-10-25 23:20:21 -07001381static struct resource msm_csid0_resources[] = {
1382 {
1383 .name = "csid",
1384 .start = 0x04800000,
1385 .end = 0x04800000 + SZ_1K - 1,
1386 .flags = IORESOURCE_MEM,
1387 },
1388 {
1389 .name = "csid",
1390 .start = CSI_0_IRQ,
1391 .end = CSI_0_IRQ,
1392 .flags = IORESOURCE_IRQ,
1393 },
1394};
1395
1396static struct resource msm_csid1_resources[] = {
1397 {
1398 .name = "csid",
1399 .start = 0x04800400,
1400 .end = 0x04800400 + SZ_1K - 1,
1401 .flags = IORESOURCE_MEM,
1402 },
1403 {
1404 .name = "csid",
1405 .start = CSI_1_IRQ,
1406 .end = CSI_1_IRQ,
1407 .flags = IORESOURCE_IRQ,
1408 },
1409};
1410
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001411static struct resource msm_csid2_resources[] = {
1412 {
1413 .name = "csid",
1414 .start = 0x04801800,
1415 .end = 0x04801800 + SZ_1K - 1,
1416 .flags = IORESOURCE_MEM,
1417 },
1418 {
1419 .name = "csid",
1420 .start = CSI_2_IRQ,
1421 .end = CSI_2_IRQ,
1422 .flags = IORESOURCE_IRQ,
1423 },
1424};
1425
Kevin Chanc8b52e82011-10-25 23:20:21 -07001426struct platform_device msm8960_device_csid0 = {
1427 .name = "msm_csid",
1428 .id = 0,
1429 .resource = msm_csid0_resources,
1430 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1431};
1432
1433struct platform_device msm8960_device_csid1 = {
1434 .name = "msm_csid",
1435 .id = 1,
1436 .resource = msm_csid1_resources,
1437 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1438};
Kevin Chane12c6672011-10-26 11:55:26 -07001439
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001440struct platform_device msm8960_device_csid2 = {
1441 .name = "msm_csid",
1442 .id = 2,
1443 .resource = msm_csid2_resources,
1444 .num_resources = ARRAY_SIZE(msm_csid2_resources),
1445};
1446
Kevin Chane12c6672011-10-26 11:55:26 -07001447struct resource msm_ispif_resources[] = {
1448 {
1449 .name = "ispif",
1450 .start = 0x04800800,
1451 .end = 0x04800800 + SZ_1K - 1,
1452 .flags = IORESOURCE_MEM,
1453 },
1454 {
1455 .name = "ispif",
1456 .start = ISPIF_IRQ,
1457 .end = ISPIF_IRQ,
1458 .flags = IORESOURCE_IRQ,
1459 },
1460};
1461
1462struct platform_device msm8960_device_ispif = {
1463 .name = "msm_ispif",
1464 .id = 0,
1465 .resource = msm_ispif_resources,
1466 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1467};
Kevin Chan5827c552011-10-28 18:36:32 -07001468
1469static struct resource msm_vfe_resources[] = {
1470 {
1471 .name = "vfe32",
1472 .start = 0x04500000,
1473 .end = 0x04500000 + SZ_1M - 1,
1474 .flags = IORESOURCE_MEM,
1475 },
1476 {
1477 .name = "vfe32",
1478 .start = VFE_IRQ,
1479 .end = VFE_IRQ,
1480 .flags = IORESOURCE_IRQ,
1481 },
1482};
1483
1484struct platform_device msm8960_device_vfe = {
1485 .name = "msm_vfe",
1486 .id = 0,
1487 .resource = msm_vfe_resources,
1488 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1489};
Kevin Chana0853122011-11-07 19:48:44 -08001490
1491static struct resource msm_vpe_resources[] = {
1492 {
1493 .name = "vpe",
1494 .start = 0x05300000,
1495 .end = 0x05300000 + SZ_1M - 1,
1496 .flags = IORESOURCE_MEM,
1497 },
1498 {
1499 .name = "vpe",
1500 .start = VPE_IRQ,
1501 .end = VPE_IRQ,
1502 .flags = IORESOURCE_IRQ,
1503 },
1504};
1505
1506struct platform_device msm8960_device_vpe = {
1507 .name = "msm_vpe",
1508 .id = 0,
1509 .resource = msm_vpe_resources,
1510 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1511};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001512#endif
1513
Joel Nidera1261942011-09-12 16:30:09 +03001514#define MSM_TSIF0_PHYS (0x18200000)
1515#define MSM_TSIF1_PHYS (0x18201000)
1516#define MSM_TSIF_SIZE (0x200)
1517
1518#define TSIF_0_CLK GPIO_CFG(75, 1, GPIO_CFG_INPUT, \
1519 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1520#define TSIF_0_EN GPIO_CFG(76, 1, GPIO_CFG_INPUT, \
1521 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1522#define TSIF_0_DATA GPIO_CFG(77, 1, GPIO_CFG_INPUT, \
1523 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1524#define TSIF_0_SYNC GPIO_CFG(82, 1, GPIO_CFG_INPUT, \
1525 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1526#define TSIF_1_CLK GPIO_CFG(79, 1, GPIO_CFG_INPUT, \
1527 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1528#define TSIF_1_EN GPIO_CFG(80, 1, GPIO_CFG_INPUT, \
1529 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1530#define TSIF_1_DATA GPIO_CFG(81, 1, GPIO_CFG_INPUT, \
1531 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1532#define TSIF_1_SYNC GPIO_CFG(78, 1, GPIO_CFG_INPUT, \
1533 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1534
1535static const struct msm_gpio tsif0_gpios[] = {
1536 { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", },
1537 { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", },
1538 { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", },
1539 { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", },
1540};
1541
1542static const struct msm_gpio tsif1_gpios[] = {
1543 { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", },
1544 { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", },
1545 { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", },
1546 { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", },
1547};
1548
1549struct msm_tsif_platform_data tsif1_platform_data = {
1550 .num_gpios = ARRAY_SIZE(tsif1_gpios),
1551 .gpios = tsif1_gpios,
1552 .tsif_pclk = "tsif_pclk",
1553 .tsif_ref_clk = "tsif_ref_clk",
1554};
1555
1556struct resource tsif1_resources[] = {
1557 [0] = {
1558 .flags = IORESOURCE_IRQ,
1559 .start = TSIF2_IRQ,
1560 .end = TSIF2_IRQ,
1561 },
1562 [1] = {
1563 .flags = IORESOURCE_MEM,
1564 .start = MSM_TSIF1_PHYS,
1565 .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1,
1566 },
1567 [2] = {
1568 .flags = IORESOURCE_DMA,
1569 .start = DMOV_TSIF_CHAN,
1570 .end = DMOV_TSIF_CRCI,
1571 },
1572};
1573
1574struct msm_tsif_platform_data tsif0_platform_data = {
1575 .num_gpios = ARRAY_SIZE(tsif0_gpios),
1576 .gpios = tsif0_gpios,
1577 .tsif_pclk = "tsif_pclk",
1578 .tsif_ref_clk = "tsif_ref_clk",
1579};
1580struct resource tsif0_resources[] = {
1581 [0] = {
1582 .flags = IORESOURCE_IRQ,
1583 .start = TSIF1_IRQ,
1584 .end = TSIF1_IRQ,
1585 },
1586 [1] = {
1587 .flags = IORESOURCE_MEM,
1588 .start = MSM_TSIF0_PHYS,
1589 .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1,
1590 },
1591 [2] = {
1592 .flags = IORESOURCE_DMA,
1593 .start = DMOV_TSIF_CHAN,
1594 .end = DMOV_TSIF_CRCI,
1595 },
1596};
1597
1598struct platform_device msm_device_tsif[2] = {
1599 {
1600 .name = "msm_tsif",
1601 .id = 0,
1602 .num_resources = ARRAY_SIZE(tsif0_resources),
1603 .resource = tsif0_resources,
1604 .dev = {
1605 .platform_data = &tsif0_platform_data
1606 },
1607 },
1608 {
1609 .name = "msm_tsif",
1610 .id = 1,
1611 .num_resources = ARRAY_SIZE(tsif1_resources),
1612 .resource = tsif1_resources,
1613 .dev = {
1614 .platform_data = &tsif1_platform_data
1615 },
1616 }
1617};
1618
Jay Chokshi33c044a2011-12-07 13:05:40 -08001619static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001620 {
1621 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1622 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1623 .flags = IORESOURCE_MEM,
1624 },
1625};
1626
Jay Chokshi33c044a2011-12-07 13:05:40 -08001627struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001628 .name = "msm_ssbi",
1629 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001630 .resource = resources_ssbi_pmic,
1631 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001632};
1633
1634static struct resource resources_qup_spi_gsbi1[] = {
1635 {
1636 .name = "spi_base",
1637 .start = MSM_GSBI1_QUP_PHYS,
1638 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1639 .flags = IORESOURCE_MEM,
1640 },
1641 {
1642 .name = "gsbi_base",
1643 .start = MSM_GSBI1_PHYS,
1644 .end = MSM_GSBI1_PHYS + 4 - 1,
1645 .flags = IORESOURCE_MEM,
1646 },
1647 {
1648 .name = "spi_irq_in",
1649 .start = MSM8960_GSBI1_QUP_IRQ,
1650 .end = MSM8960_GSBI1_QUP_IRQ,
1651 .flags = IORESOURCE_IRQ,
1652 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001653 {
1654 .name = "spi_clk",
1655 .start = 9,
1656 .end = 9,
1657 .flags = IORESOURCE_IO,
1658 },
1659 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001660 .name = "spi_miso",
1661 .start = 7,
1662 .end = 7,
1663 .flags = IORESOURCE_IO,
1664 },
1665 {
1666 .name = "spi_mosi",
1667 .start = 6,
1668 .end = 6,
1669 .flags = IORESOURCE_IO,
1670 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001671 {
1672 .name = "spi_cs",
1673 .start = 8,
1674 .end = 8,
1675 .flags = IORESOURCE_IO,
1676 },
1677 {
1678 .name = "spi_cs1",
1679 .start = 14,
1680 .end = 14,
1681 .flags = IORESOURCE_IO,
1682 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001683};
1684
1685struct platform_device msm8960_device_qup_spi_gsbi1 = {
1686 .name = "spi_qsd",
1687 .id = 0,
1688 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1689 .resource = resources_qup_spi_gsbi1,
1690};
1691
1692struct platform_device msm_pcm = {
1693 .name = "msm-pcm-dsp",
1694 .id = -1,
1695};
1696
Kiran Kandi5e809b02012-01-31 00:24:33 -08001697struct platform_device msm_multi_ch_pcm = {
1698 .name = "msm-multi-ch-pcm-dsp",
1699 .id = -1,
1700};
1701
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001702struct platform_device msm_pcm_routing = {
1703 .name = "msm-pcm-routing",
1704 .id = -1,
1705};
1706
1707struct platform_device msm_cpudai0 = {
1708 .name = "msm-dai-q6",
1709 .id = 0x4000,
1710};
1711
1712struct platform_device msm_cpudai1 = {
1713 .name = "msm-dai-q6",
1714 .id = 0x4001,
1715};
1716
1717struct platform_device msm_cpudai_hdmi_rx = {
Kiran Kandi5e809b02012-01-31 00:24:33 -08001718 .name = "msm-dai-q6-hdmi",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001719 .id = 8,
1720};
1721
1722struct platform_device msm_cpudai_bt_rx = {
1723 .name = "msm-dai-q6",
1724 .id = 0x3000,
1725};
1726
1727struct platform_device msm_cpudai_bt_tx = {
1728 .name = "msm-dai-q6",
1729 .id = 0x3001,
1730};
1731
1732struct platform_device msm_cpudai_fm_rx = {
1733 .name = "msm-dai-q6",
1734 .id = 0x3004,
1735};
1736
1737struct platform_device msm_cpudai_fm_tx = {
1738 .name = "msm-dai-q6",
1739 .id = 0x3005,
1740};
1741
Helen Zeng0705a5f2011-10-14 15:29:52 -07001742struct platform_device msm_cpudai_incall_music_rx = {
1743 .name = "msm-dai-q6",
1744 .id = 0x8005,
1745};
1746
Helen Zenge3d716a2011-10-14 16:32:16 -07001747struct platform_device msm_cpudai_incall_record_rx = {
1748 .name = "msm-dai-q6",
1749 .id = 0x8004,
1750};
1751
1752struct platform_device msm_cpudai_incall_record_tx = {
1753 .name = "msm-dai-q6",
1754 .id = 0x8003,
1755};
1756
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001757/*
1758 * Machine specific data for AUX PCM Interface
1759 * which the driver will be unware of.
1760 */
1761struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1762 .clk = "pcm_clk",
1763 .mode = AFE_PCM_CFG_MODE_PCM,
1764 .sync = AFE_PCM_CFG_SYNC_INT,
1765 .frame = AFE_PCM_CFG_FRM_256BPF,
1766 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1767 .slot = 0,
1768 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1769 .pcm_clk_rate = 2048000,
1770};
1771
1772struct platform_device msm_cpudai_auxpcm_rx = {
1773 .name = "msm-dai-q6",
1774 .id = 2,
1775 .dev = {
1776 .platform_data = &auxpcm_rx_pdata,
1777 },
1778};
1779
1780struct platform_device msm_cpudai_auxpcm_tx = {
1781 .name = "msm-dai-q6",
1782 .id = 3,
1783};
1784
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001785struct platform_device msm_cpu_fe = {
1786 .name = "msm-dai-fe",
1787 .id = -1,
1788};
1789
1790struct platform_device msm_stub_codec = {
1791 .name = "msm-stub-codec",
1792 .id = 1,
1793};
1794
1795struct platform_device msm_voice = {
1796 .name = "msm-pcm-voice",
1797 .id = -1,
1798};
1799
1800struct platform_device msm_voip = {
1801 .name = "msm-voip-dsp",
1802 .id = -1,
1803};
1804
1805struct platform_device msm_lpa_pcm = {
1806 .name = "msm-pcm-lpa",
1807 .id = -1,
1808};
1809
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301810struct platform_device msm_compr_dsp = {
1811 .name = "msm-compr-dsp",
1812 .id = -1,
1813};
1814
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001815struct platform_device msm_pcm_hostless = {
1816 .name = "msm-pcm-hostless",
1817 .id = -1,
1818};
1819
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301820struct platform_device msm_cpudai_afe_01_rx = {
1821 .name = "msm-dai-q6",
1822 .id = 0xE0,
1823};
1824
1825struct platform_device msm_cpudai_afe_01_tx = {
1826 .name = "msm-dai-q6",
1827 .id = 0xF0,
1828};
1829
1830struct platform_device msm_cpudai_afe_02_rx = {
1831 .name = "msm-dai-q6",
1832 .id = 0xF1,
1833};
1834
1835struct platform_device msm_cpudai_afe_02_tx = {
1836 .name = "msm-dai-q6",
1837 .id = 0xE1,
1838};
1839
1840struct platform_device msm_pcm_afe = {
1841 .name = "msm-pcm-afe",
1842 .id = -1,
1843};
1844
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001845struct platform_device *msm_footswitch_devices[] = {
Ravishangar Kalyanamb31a0e42012-01-19 16:02:34 -08001846 FS_8X60(FS_MDP, "fs_mdp"),
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001847 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001848 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1849 FS_8X60(FS_VFE, "fs_vfe"),
1850 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001851 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1852 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1853 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001854 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001855};
1856unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1857
1858#ifdef CONFIG_MSM_ROTATOR
1859#define ROTATOR_HW_BASE 0x04E00000
1860static struct resource resources_msm_rotator[] = {
1861 {
1862 .start = ROTATOR_HW_BASE,
1863 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1864 .flags = IORESOURCE_MEM,
1865 },
1866 {
1867 .start = ROT_IRQ,
1868 .end = ROT_IRQ,
1869 .flags = IORESOURCE_IRQ,
1870 },
1871};
1872
1873static struct msm_rot_clocks rotator_clocks[] = {
1874 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001875 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001876 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001877 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001878 },
1879 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001880 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001881 .clk_type = ROTATOR_PCLK,
1882 .clk_rate = 0,
1883 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001884};
1885
1886static struct msm_rotator_platform_data rotator_pdata = {
1887 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1888 .hardware_version_number = 0x01020309,
1889 .rotator_clks = rotator_clocks,
1890 .regulator_name = "fs_rot",
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -08001891#ifdef CONFIG_MSM_BUS_SCALING
1892 .bus_scale_table = &rotator_bus_scale_pdata,
1893#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001894};
1895
1896struct platform_device msm_rotator_device = {
1897 .name = "msm_rotator",
1898 .id = 0,
1899 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1900 .resource = resources_msm_rotator,
1901 .dev = {
1902 .platform_data = &rotator_pdata,
1903 },
1904};
1905#endif
1906
1907#define MIPI_DSI_HW_BASE 0x04700000
1908#define MDP_HW_BASE 0x05100000
1909
1910static struct resource msm_mipi_dsi1_resources[] = {
1911 {
1912 .name = "mipi_dsi",
1913 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001914 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001915 .flags = IORESOURCE_MEM,
1916 },
1917 {
1918 .start = DSI1_IRQ,
1919 .end = DSI1_IRQ,
1920 .flags = IORESOURCE_IRQ,
1921 },
1922};
1923
1924struct platform_device msm_mipi_dsi1_device = {
1925 .name = "mipi_dsi",
1926 .id = 1,
1927 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1928 .resource = msm_mipi_dsi1_resources,
1929};
1930
1931static struct resource msm_mdp_resources[] = {
1932 {
1933 .name = "mdp",
1934 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001935 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001936 .flags = IORESOURCE_MEM,
1937 },
1938 {
1939 .start = MDP_IRQ,
1940 .end = MDP_IRQ,
1941 .flags = IORESOURCE_IRQ,
1942 },
1943};
1944
1945static struct platform_device msm_mdp_device = {
1946 .name = "mdp",
1947 .id = 0,
1948 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1949 .resource = msm_mdp_resources,
1950};
1951
1952static void __init msm_register_device(struct platform_device *pdev, void *data)
1953{
1954 int ret;
1955
1956 pdev->dev.platform_data = data;
1957 ret = platform_device_register(pdev);
1958 if (ret)
1959 dev_err(&pdev->dev,
1960 "%s: platform_device_register() failed = %d\n",
1961 __func__, ret);
1962}
1963
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001964#ifdef CONFIG_MSM_BUS_SCALING
1965static struct platform_device msm_dtv_device = {
1966 .name = "dtv",
1967 .id = 0,
1968};
1969#endif
1970
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -08001971struct platform_device msm_lvds_device = {
Huaibin Yang4a084e32011-12-15 15:25:52 -08001972 .name = "lvds",
1973 .id = 0,
1974};
1975
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001976void __init msm_fb_register_device(char *name, void *data)
1977{
1978 if (!strncmp(name, "mdp", 3))
1979 msm_register_device(&msm_mdp_device, data);
1980 else if (!strncmp(name, "mipi_dsi", 8))
1981 msm_register_device(&msm_mipi_dsi1_device, data);
Huaibin Yang4a084e32011-12-15 15:25:52 -08001982 else if (!strncmp(name, "lvds", 4))
1983 msm_register_device(&msm_lvds_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001984#ifdef CONFIG_MSM_BUS_SCALING
1985 else if (!strncmp(name, "dtv", 3))
1986 msm_register_device(&msm_dtv_device, data);
1987#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001988 else
1989 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1990}
1991
1992static struct resource resources_sps[] = {
1993 {
1994 .name = "pipe_mem",
1995 .start = 0x12800000,
1996 .end = 0x12800000 + 0x4000 - 1,
1997 .flags = IORESOURCE_MEM,
1998 },
1999 {
2000 .name = "bamdma_dma",
2001 .start = 0x12240000,
2002 .end = 0x12240000 + 0x1000 - 1,
2003 .flags = IORESOURCE_MEM,
2004 },
2005 {
2006 .name = "bamdma_bam",
2007 .start = 0x12244000,
2008 .end = 0x12244000 + 0x4000 - 1,
2009 .flags = IORESOURCE_MEM,
2010 },
2011 {
2012 .name = "bamdma_irq",
2013 .start = SPS_BAM_DMA_IRQ,
2014 .end = SPS_BAM_DMA_IRQ,
2015 .flags = IORESOURCE_IRQ,
2016 },
2017};
2018
2019struct msm_sps_platform_data msm_sps_pdata = {
2020 .bamdma_restricted_pipes = 0x06,
2021};
2022
2023struct platform_device msm_device_sps = {
2024 .name = "msm_sps",
2025 .id = -1,
2026 .num_resources = ARRAY_SIZE(resources_sps),
2027 .resource = resources_sps,
2028 .dev.platform_data = &msm_sps_pdata,
2029};
2030
2031#ifdef CONFIG_MSM_MPM
Praveen Chidambaram78499012011-11-01 17:15:17 -06002032static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002033 [1] = MSM_GPIO_TO_INT(46),
2034 [2] = MSM_GPIO_TO_INT(150),
2035 [4] = MSM_GPIO_TO_INT(103),
2036 [5] = MSM_GPIO_TO_INT(104),
2037 [6] = MSM_GPIO_TO_INT(105),
2038 [7] = MSM_GPIO_TO_INT(106),
2039 [8] = MSM_GPIO_TO_INT(107),
2040 [9] = MSM_GPIO_TO_INT(7),
2041 [10] = MSM_GPIO_TO_INT(11),
2042 [11] = MSM_GPIO_TO_INT(15),
2043 [12] = MSM_GPIO_TO_INT(19),
2044 [13] = MSM_GPIO_TO_INT(23),
2045 [14] = MSM_GPIO_TO_INT(27),
2046 [15] = MSM_GPIO_TO_INT(31),
2047 [16] = MSM_GPIO_TO_INT(35),
2048 [19] = MSM_GPIO_TO_INT(90),
2049 [20] = MSM_GPIO_TO_INT(92),
2050 [23] = MSM_GPIO_TO_INT(85),
2051 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002052 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002053 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002054 [29] = MSM_GPIO_TO_INT(10),
2055 [30] = MSM_GPIO_TO_INT(102),
2056 [31] = MSM_GPIO_TO_INT(81),
2057 [32] = MSM_GPIO_TO_INT(78),
2058 [33] = MSM_GPIO_TO_INT(94),
2059 [34] = MSM_GPIO_TO_INT(72),
2060 [35] = MSM_GPIO_TO_INT(39),
2061 [36] = MSM_GPIO_TO_INT(43),
2062 [37] = MSM_GPIO_TO_INT(61),
2063 [38] = MSM_GPIO_TO_INT(50),
2064 [39] = MSM_GPIO_TO_INT(42),
2065 [41] = MSM_GPIO_TO_INT(62),
2066 [42] = MSM_GPIO_TO_INT(76),
2067 [43] = MSM_GPIO_TO_INT(75),
2068 [44] = MSM_GPIO_TO_INT(70),
2069 [45] = MSM_GPIO_TO_INT(69),
2070 [46] = MSM_GPIO_TO_INT(67),
2071 [47] = MSM_GPIO_TO_INT(65),
2072 [48] = MSM_GPIO_TO_INT(58),
2073 [49] = MSM_GPIO_TO_INT(54),
2074 [50] = MSM_GPIO_TO_INT(52),
2075 [51] = MSM_GPIO_TO_INT(49),
2076 [52] = MSM_GPIO_TO_INT(40),
2077 [53] = MSM_GPIO_TO_INT(37),
2078 [54] = MSM_GPIO_TO_INT(24),
2079 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002080};
2081
Praveen Chidambaram78499012011-11-01 17:15:17 -06002082static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002083 TLMM_MSM_SUMMARY_IRQ,
2084 RPM_APCC_CPU0_GP_HIGH_IRQ,
2085 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2086 RPM_APCC_CPU0_GP_LOW_IRQ,
2087 RPM_APCC_CPU0_WAKE_UP_IRQ,
2088 RPM_APCC_CPU1_GP_HIGH_IRQ,
2089 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
2090 RPM_APCC_CPU1_GP_LOW_IRQ,
2091 RPM_APCC_CPU1_WAKE_UP_IRQ,
2092 MSS_TO_APPS_IRQ_0,
2093 MSS_TO_APPS_IRQ_1,
2094 MSS_TO_APPS_IRQ_2,
2095 MSS_TO_APPS_IRQ_3,
2096 MSS_TO_APPS_IRQ_4,
2097 MSS_TO_APPS_IRQ_5,
2098 MSS_TO_APPS_IRQ_6,
2099 MSS_TO_APPS_IRQ_7,
2100 MSS_TO_APPS_IRQ_8,
2101 MSS_TO_APPS_IRQ_9,
2102 LPASS_SCSS_GP_LOW_IRQ,
2103 LPASS_SCSS_GP_MEDIUM_IRQ,
2104 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07002105 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002106 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07002107 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07002108 RIVA_APPS_WLAN_SMSM_IRQ,
2109 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
2110 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002111};
2112
Praveen Chidambaram78499012011-11-01 17:15:17 -06002113struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002114 .irqs_m2a = msm_mpm_irqs_m2a,
2115 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
2116 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
2117 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
2118 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
2119 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
2120 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
2121 .mpm_apps_ipc_val = BIT(1),
2122 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2123
2124};
2125#endif
2126
Stephen Boydbb600ae2011-08-02 20:11:40 -07002127static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002128 CLK_DUMMY("pll2", PLL2, NULL, 0),
2129 CLK_DUMMY("pll8", PLL8, NULL, 0),
2130 CLK_DUMMY("pll4", PLL4, NULL, 0),
2131
2132 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
2133 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
2134 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
2135 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
2136 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2137 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
2138 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
2139 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
2140 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
2141 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
2142 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
2143 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
2144 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
2145 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
2146 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
2147 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
2148
Matt Wagantalle2522372011-08-17 14:52:21 -07002149 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
2150 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
2151 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
2152 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
2153 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
2154 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
2155 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
2156 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
2157 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
2158 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
2159 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
2160 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002161 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
2162 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
2163 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
2164 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
2165 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
2166 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
2167 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
2168 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
2169 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
2170 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
2171 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
2172 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002173 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07002174 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07002175 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002176 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
2177 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
2178 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
2179 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
2180 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002181 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002182 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002183 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
2184 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
2185 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
2186 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
2187 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
2188 CLK_DUMMY("src_clk", USB_FS2_SRC_CLK, NULL, OFF),
2189 CLK_DUMMY("alt_core_clk", USB_FS2_XCVR_CLK, NULL, OFF),
2190 CLK_DUMMY("sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07002191 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
2192 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002193 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
2194 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002195 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002196 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07002197 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002198 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07002199 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002200 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
2201 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
2202 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
2203 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
2204 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
2205 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
2206 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002207 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002208 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
2209 CLK_DUMMY("iface_clk", USB_FS2_P_CLK, NULL, OFF),
2210 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002211 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
2212 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
2213 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
2214 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
2215 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07002216 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
2217 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002218 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
2219 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
2220 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
2221 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
2222 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002223 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
2224 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
2225 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
2226 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
2227 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
2228 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
2229 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
2230 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
2231 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
2232 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
2233 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
2234 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
2235 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
2236 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
2237 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002238 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
2239 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
2240 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002241 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002242 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002243 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002244 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
2245 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
2246 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002247 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002248 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
2249 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
2250 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002251 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002252 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
2253 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
2254 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
2255 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
2256 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
2257 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
2258 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
2259 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
2260 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002261 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002262 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
2263 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
2264 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
2265 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
2266 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
2267 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
2268 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
2269 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
2270 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
2271 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002272 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
2273 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
2274 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002275 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
2276 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
2277 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
2278 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002279 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002280 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002281 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002282 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002283 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
2284 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
2285 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
2286 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
2287 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
2288 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
2289 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
2290 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
2291 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
2292 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
2293 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
2294 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
2295 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
2296 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
2297 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002298 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
2299 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
2300 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
2301 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
2302 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
2303 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002304
2305 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08002306 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, "msm_otg", NULL),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002307 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
2308 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
2309 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
2310 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
2311 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002312 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2313 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
2314};
2315
Stephen Boydbb600ae2011-08-02 20:11:40 -07002316struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
2317 .table = msm_clocks_8960_dummy,
2318 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
2319};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002320
2321#define LPASS_SLIMBUS_PHYS 0x28080000
2322#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06002323#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002324/* Board info for the slimbus slave device */
2325static struct resource slimbus_res[] = {
2326 {
2327 .start = LPASS_SLIMBUS_PHYS,
2328 .end = LPASS_SLIMBUS_PHYS + 8191,
2329 .flags = IORESOURCE_MEM,
2330 .name = "slimbus_physical",
2331 },
2332 {
2333 .start = LPASS_SLIMBUS_BAM_PHYS,
2334 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
2335 .flags = IORESOURCE_MEM,
2336 .name = "slimbus_bam_physical",
2337 },
2338 {
Sagar Dhariacc969452011-09-19 10:34:30 -06002339 .start = LPASS_SLIMBUS_SLEW,
2340 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
2341 .flags = IORESOURCE_MEM,
2342 .name = "slimbus_slew_reg",
2343 },
2344 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002345 .start = SLIMBUS0_CORE_EE1_IRQ,
2346 .end = SLIMBUS0_CORE_EE1_IRQ,
2347 .flags = IORESOURCE_IRQ,
2348 .name = "slimbus_irq",
2349 },
2350 {
2351 .start = SLIMBUS0_BAM_EE1_IRQ,
2352 .end = SLIMBUS0_BAM_EE1_IRQ,
2353 .flags = IORESOURCE_IRQ,
2354 .name = "slimbus_bam_irq",
2355 },
2356};
2357
2358struct platform_device msm_slim_ctrl = {
2359 .name = "msm_slim_ctrl",
2360 .id = 1,
2361 .num_resources = ARRAY_SIZE(slimbus_res),
2362 .resource = slimbus_res,
2363 .dev = {
2364 .coherent_dma_mask = 0xffffffffULL,
2365 },
2366};
2367
2368#ifdef CONFIG_MSM_BUS_SCALING
2369static struct msm_bus_vectors grp3d_init_vectors[] = {
2370 {
2371 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2372 .dst = MSM_BUS_SLAVE_EBI_CH0,
2373 .ab = 0,
2374 .ib = 0,
2375 },
2376};
2377
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002378static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002379 {
2380 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2381 .dst = MSM_BUS_SLAVE_EBI_CH0,
2382 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002383 .ib = KGSL_CONVERT_TO_MBPS(1000),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002384 },
2385};
2386
2387static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2388 {
2389 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2390 .dst = MSM_BUS_SLAVE_EBI_CH0,
2391 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002392 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002393 },
2394};
2395
2396static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2397 {
2398 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2399 .dst = MSM_BUS_SLAVE_EBI_CH0,
2400 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002401 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002402 },
2403};
2404
2405static struct msm_bus_vectors grp3d_max_vectors[] = {
2406 {
2407 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2408 .dst = MSM_BUS_SLAVE_EBI_CH0,
2409 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002410 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002411 },
2412};
2413
2414static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2415 {
2416 ARRAY_SIZE(grp3d_init_vectors),
2417 grp3d_init_vectors,
2418 },
2419 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002420 ARRAY_SIZE(grp3d_low_vectors),
2421 grp3d_low_vectors,
2422 },
2423 {
2424 ARRAY_SIZE(grp3d_nominal_low_vectors),
2425 grp3d_nominal_low_vectors,
2426 },
2427 {
2428 ARRAY_SIZE(grp3d_nominal_high_vectors),
2429 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002430 },
2431 {
2432 ARRAY_SIZE(grp3d_max_vectors),
2433 grp3d_max_vectors,
2434 },
2435};
2436
2437static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2438 grp3d_bus_scale_usecases,
2439 ARRAY_SIZE(grp3d_bus_scale_usecases),
2440 .name = "grp3d",
2441};
2442
2443static struct msm_bus_vectors grp2d0_init_vectors[] = {
2444 {
2445 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2446 .dst = MSM_BUS_SLAVE_EBI_CH0,
2447 .ab = 0,
2448 .ib = 0,
2449 },
2450};
2451
Lucille Sylvester808eca22011-11-03 10:26:29 -07002452static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002453 {
2454 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2455 .dst = MSM_BUS_SLAVE_EBI_CH0,
2456 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002457 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002458 },
2459};
2460
Lucille Sylvester808eca22011-11-03 10:26:29 -07002461static struct msm_bus_vectors grp2d0_max_vectors[] = {
2462 {
2463 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2464 .dst = MSM_BUS_SLAVE_EBI_CH0,
2465 .ab = 0,
2466 .ib = KGSL_CONVERT_TO_MBPS(2048),
2467 },
2468};
2469
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002470static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2471 {
2472 ARRAY_SIZE(grp2d0_init_vectors),
2473 grp2d0_init_vectors,
2474 },
2475 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002476 ARRAY_SIZE(grp2d0_nominal_vectors),
2477 grp2d0_nominal_vectors,
2478 },
2479 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002480 ARRAY_SIZE(grp2d0_max_vectors),
2481 grp2d0_max_vectors,
2482 },
2483};
2484
2485struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2486 grp2d0_bus_scale_usecases,
2487 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2488 .name = "grp2d0",
2489};
2490
2491static struct msm_bus_vectors grp2d1_init_vectors[] = {
2492 {
2493 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2494 .dst = MSM_BUS_SLAVE_EBI_CH0,
2495 .ab = 0,
2496 .ib = 0,
2497 },
2498};
2499
Lucille Sylvester808eca22011-11-03 10:26:29 -07002500static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002501 {
2502 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2503 .dst = MSM_BUS_SLAVE_EBI_CH0,
2504 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002505 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002506 },
2507};
2508
Lucille Sylvester808eca22011-11-03 10:26:29 -07002509static struct msm_bus_vectors grp2d1_max_vectors[] = {
2510 {
2511 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2512 .dst = MSM_BUS_SLAVE_EBI_CH0,
2513 .ab = 0,
2514 .ib = KGSL_CONVERT_TO_MBPS(2048),
2515 },
2516};
2517
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002518static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2519 {
2520 ARRAY_SIZE(grp2d1_init_vectors),
2521 grp2d1_init_vectors,
2522 },
2523 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002524 ARRAY_SIZE(grp2d1_nominal_vectors),
2525 grp2d1_nominal_vectors,
2526 },
2527 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002528 ARRAY_SIZE(grp2d1_max_vectors),
2529 grp2d1_max_vectors,
2530 },
2531};
2532
2533struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2534 grp2d1_bus_scale_usecases,
2535 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2536 .name = "grp2d1",
2537};
2538#endif
2539
2540static struct resource kgsl_3d0_resources[] = {
2541 {
2542 .name = KGSL_3D0_REG_MEMORY,
2543 .start = 0x04300000, /* GFX3D address */
2544 .end = 0x0431ffff,
2545 .flags = IORESOURCE_MEM,
2546 },
2547 {
2548 .name = KGSL_3D0_IRQ,
2549 .start = GFX3D_IRQ,
2550 .end = GFX3D_IRQ,
2551 .flags = IORESOURCE_IRQ,
2552 },
2553};
2554
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002555static const char *kgsl_3d0_iommu_ctx_names[] = {
2556 "gfx3d_user",
2557 /* priv_ctx goes here */
2558};
2559
2560static struct kgsl_device_iommu_data kgsl_3d0_iommu_data[] = {
2561 {
2562 .iommu_ctx_names = kgsl_3d0_iommu_ctx_names,
2563 .iommu_ctx_count = ARRAY_SIZE(kgsl_3d0_iommu_ctx_names),
2564 .physstart = 0x07C00000,
2565 .physend = 0x07C00000 + SZ_1M - 1,
2566 },
2567};
2568
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002569static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002570 .pwrlevel = {
2571 {
2572 .gpu_freq = 400000000,
2573 .bus_freq = 4,
2574 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002575 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002576 {
2577 .gpu_freq = 300000000,
2578 .bus_freq = 3,
2579 .io_fraction = 33,
2580 },
2581 {
2582 .gpu_freq = 200000000,
2583 .bus_freq = 2,
2584 .io_fraction = 100,
2585 },
2586 {
2587 .gpu_freq = 128000000,
2588 .bus_freq = 1,
2589 .io_fraction = 100,
2590 },
2591 {
2592 .gpu_freq = 27000000,
2593 .bus_freq = 0,
2594 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002595 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002596 .init_level = 0,
2597 .num_levels = 5,
2598 .set_grp_async = NULL,
Lucille Sylvester93650bb2011-11-02 14:37:10 -07002599 .idle_timeout = HZ/20,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002600 .nap_allowed = true,
2601 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002602#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002603 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002604#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002605 .iommu_data = kgsl_3d0_iommu_data,
2606 .iommu_count = ARRAY_SIZE(kgsl_3d0_iommu_data),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002607};
2608
2609struct platform_device msm_kgsl_3d0 = {
2610 .name = "kgsl-3d0",
2611 .id = 0,
2612 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2613 .resource = kgsl_3d0_resources,
2614 .dev = {
2615 .platform_data = &kgsl_3d0_pdata,
2616 },
2617};
2618
2619static struct resource kgsl_2d0_resources[] = {
2620 {
2621 .name = KGSL_2D0_REG_MEMORY,
2622 .start = 0x04100000, /* Z180 base address */
2623 .end = 0x04100FFF,
2624 .flags = IORESOURCE_MEM,
2625 },
2626 {
2627 .name = KGSL_2D0_IRQ,
2628 .start = GFX2D0_IRQ,
2629 .end = GFX2D0_IRQ,
2630 .flags = IORESOURCE_IRQ,
2631 },
2632};
2633
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002634static const char *kgsl_2d0_iommu_ctx_names[] = {
2635 "gfx2d0_2d0",
2636};
2637
2638static struct kgsl_device_iommu_data kgsl_2d0_iommu_data[] = {
2639 {
2640 .iommu_ctx_names = kgsl_2d0_iommu_ctx_names,
2641 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d0_iommu_ctx_names),
2642 .physstart = 0x07D00000,
2643 .physend = 0x07D00000 + SZ_1M - 1,
2644 },
2645};
2646
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002647static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002648 .pwrlevel = {
2649 {
2650 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002651 .bus_freq = 2,
2652 },
2653 {
2654 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002655 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002656 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002657 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002658 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002659 .bus_freq = 0,
2660 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002661 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002662 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002663 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002664 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002665 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002666 .nap_allowed = true,
2667 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002668#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002669 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002670#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002671 .iommu_data = kgsl_2d0_iommu_data,
2672 .iommu_count = ARRAY_SIZE(kgsl_2d0_iommu_data),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002673};
2674
2675struct platform_device msm_kgsl_2d0 = {
2676 .name = "kgsl-2d0",
2677 .id = 0,
2678 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2679 .resource = kgsl_2d0_resources,
2680 .dev = {
2681 .platform_data = &kgsl_2d0_pdata,
2682 },
2683};
2684
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002685static const char *kgsl_2d1_iommu_ctx_names[] = {
Jeremy Gebben5c4c1132012-02-27 11:26:49 -07002686 "gfx2d1_2d1",
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002687};
2688
2689static struct kgsl_device_iommu_data kgsl_2d1_iommu_data[] = {
2690 {
2691 .iommu_ctx_names = kgsl_2d1_iommu_ctx_names,
2692 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d1_iommu_ctx_names),
2693 .physstart = 0x07E00000,
2694 .physend = 0x07E00000 + SZ_1M - 1,
2695 },
2696};
2697
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002698static struct resource kgsl_2d1_resources[] = {
2699 {
2700 .name = KGSL_2D1_REG_MEMORY,
2701 .start = 0x04200000, /* Z180 device 1 base address */
2702 .end = 0x04200FFF,
2703 .flags = IORESOURCE_MEM,
2704 },
2705 {
2706 .name = KGSL_2D1_IRQ,
2707 .start = GFX2D1_IRQ,
2708 .end = GFX2D1_IRQ,
2709 .flags = IORESOURCE_IRQ,
2710 },
2711};
2712
2713static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002714 .pwrlevel = {
2715 {
2716 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002717 .bus_freq = 2,
2718 },
2719 {
2720 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002721 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002722 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002723 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002724 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002725 .bus_freq = 0,
2726 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002727 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002728 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002729 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002730 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002731 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002732 .nap_allowed = true,
2733 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002734#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002735 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002736#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002737 .iommu_data = kgsl_2d1_iommu_data,
2738 .iommu_count = ARRAY_SIZE(kgsl_2d1_iommu_data),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002739};
2740
2741struct platform_device msm_kgsl_2d1 = {
2742 .name = "kgsl-2d1",
2743 .id = 1,
2744 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2745 .resource = kgsl_2d1_resources,
2746 .dev = {
2747 .platform_data = &kgsl_2d1_pdata,
2748 },
2749};
2750
2751#ifdef CONFIG_MSM_GEMINI
2752static struct resource msm_gemini_resources[] = {
2753 {
2754 .start = 0x04600000,
2755 .end = 0x04600000 + SZ_1M - 1,
2756 .flags = IORESOURCE_MEM,
2757 },
2758 {
2759 .start = JPEG_IRQ,
2760 .end = JPEG_IRQ,
2761 .flags = IORESOURCE_IRQ,
2762 },
2763};
2764
2765struct platform_device msm8960_gemini_device = {
2766 .name = "msm_gemini",
2767 .resource = msm_gemini_resources,
2768 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2769};
2770#endif
2771
Praveen Chidambaram78499012011-11-01 17:15:17 -06002772struct msm_rpm_platform_data msm8960_rpm_data __initdata = {
2773 .reg_base_addrs = {
2774 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
2775 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
2776 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
2777 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
2778 },
2779 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
2780 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
2781 .ipc_rpm_val = 4,
2782 .target_id = {
2783 MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
2784 MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
2785 MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8),
2786 MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2787 MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2788 MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1),
2789 MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1),
2790 MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1),
2791 MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2792 MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2793 MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2794 MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2795 MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1),
2796 MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1),
2797 MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1),
2798 MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1),
2799 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0,
2800 APPS_FABRIC_CFG_HALT, 2),
2801 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0,
2802 APPS_FABRIC_CFG_CLKMOD, 3),
2803 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL,
2804 APPS_FABRIC_CFG_IOCTL, 1),
2805 MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2806 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0,
2807 SYS_FABRIC_CFG_HALT, 2),
2808 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0,
2809 SYS_FABRIC_CFG_CLKMOD, 3),
2810 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL,
2811 SYS_FABRIC_CFG_IOCTL, 1),
2812 MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0,
2813 SYSTEM_FABRIC_ARB, 29),
2814 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0,
2815 MMSS_FABRIC_CFG_HALT, 2),
2816 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0,
2817 MMSS_FABRIC_CFG_CLKMOD, 3),
2818 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL,
2819 MMSS_FABRIC_CFG_IOCTL, 1),
2820 MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2821 MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2),
2822 MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2),
2823 MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2),
2824 MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2),
2825 MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2),
2826 MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2),
2827 MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2),
2828 MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2),
2829 MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2),
2830 MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2),
2831 MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2),
2832 MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2),
2833 MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2),
2834 MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2),
2835 MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2),
2836 MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2),
2837 MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2),
2838 MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2),
2839 MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2),
2840 MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2),
2841 MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2),
2842 MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2),
2843 MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2),
2844 MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2),
2845 MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2),
2846 MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2),
2847 MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2),
2848 MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2),
2849 MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2),
2850 MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2),
2851 MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2),
2852 MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2),
2853 MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2),
2854 MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2),
2855 MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2),
2856 MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2),
2857 MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2),
2858 MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2),
2859 MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2),
2860 MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1),
2861 MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1),
2862 MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1),
2863 MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1),
2864 MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1),
2865 MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1),
2866 MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1),
2867 MSM_RPM_MAP(8960, NCP_0, NCP, 2),
2868 MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1),
2869 MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2870 MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1),
2871 MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2),
2872 MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1),
2873 },
2874 .target_status = {
2875 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR),
2876 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR),
2877 MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD),
2878 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0),
2879 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1),
2880 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2),
2881 MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0),
2882 MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE),
2883 MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL),
2884 MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK),
2885 MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK),
2886 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK),
2887 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK),
2888 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK),
2889 MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK),
2890 MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK),
2891 MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK),
2892 MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK),
2893 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK),
2894 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT),
2895 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD),
2896 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL),
2897 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB),
2898 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT),
2899 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD),
2900 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL),
2901 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB),
2902 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT),
2903 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD),
2904 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL),
2905 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB),
2906 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0),
2907 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1),
2908 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0),
2909 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1),
2910 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0),
2911 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1),
2912 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0),
2913 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1),
2914 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0),
2915 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1),
2916 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0),
2917 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1),
2918 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0),
2919 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1),
2920 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0),
2921 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1),
2922 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0),
2923 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1),
2924 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0),
2925 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1),
2926 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0),
2927 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1),
2928 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0),
2929 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1),
2930 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0),
2931 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1),
2932 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0),
2933 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1),
2934 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0),
2935 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1),
2936 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0),
2937 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1),
2938 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0),
2939 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1),
2940 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0),
2941 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1),
2942 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0),
2943 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1),
2944 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0),
2945 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1),
2946 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0),
2947 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1),
2948 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0),
2949 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1),
2950 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0),
2951 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1),
2952 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0),
2953 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1),
2954 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0),
2955 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1),
2956 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0),
2957 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1),
2958 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0),
2959 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1),
2960 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0),
2961 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1),
2962 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0),
2963 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1),
2964 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0),
2965 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1),
2966 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0),
2967 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1),
2968 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0),
2969 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1),
2970 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0),
2971 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1),
2972 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0),
2973 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1),
2974 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0),
2975 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1),
2976 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0),
2977 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1),
2978 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0),
2979 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1),
2980 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0),
2981 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1),
2982 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0),
2983 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1),
2984 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1),
2985 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2),
2986 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3),
2987 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4),
2988 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5),
2989 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6),
2990 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7),
2991 MSM_RPM_STATUS_ID_MAP(8960, NCP_0),
2992 MSM_RPM_STATUS_ID_MAP(8960, NCP_1),
2993 MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS),
2994 MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH),
2995 MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH),
2996 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0),
2997 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1),
2998 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE),
2999 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE),
3000 },
3001 .target_ctrl_id = {
3002 MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR),
3003 MSM_RPM_CTRL_MAP(8960, VERSION_MINOR),
3004 MSM_RPM_CTRL_MAP(8960, VERSION_BUILD),
3005 MSM_RPM_CTRL_MAP(8960, REQ_CTX_0),
3006 MSM_RPM_CTRL_MAP(8960, REQ_SEL_0),
3007 MSM_RPM_CTRL_MAP(8960, ACK_CTX_0),
3008 MSM_RPM_CTRL_MAP(8960, ACK_SEL_0),
3009 },
3010 .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE,
3011 .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION,
3012 .sel_last = MSM_RPM_8960_SEL_LAST,
3013 .ver = {3, 0, 0},
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003014};
Praveen Chidambaram8985b012011-12-16 13:38:59 -07003015
Praveen Chidambaram78499012011-11-01 17:15:17 -06003016struct platform_device msm8960_rpm_device = {
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003017 .name = "msm_rpm",
3018 .id = -1,
3019};
3020
Praveen Chidambaram78499012011-11-01 17:15:17 -06003021static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
3022 .phys_addr_base = 0x0010C000,
3023 .reg_offsets = {
3024 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
3025 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
3026 },
3027 .phys_size = SZ_8K,
3028 .log_len = 4096, /* log's buffer length in bytes */
3029 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
3030};
3031
3032struct platform_device msm8960_rpm_log_device = {
3033 .name = "msm_rpm_log",
3034 .id = -1,
3035 .dev = {
3036 .platform_data = &msm_rpm_log_pdata,
3037 },
3038};
3039
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003040static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
3041 .phys_addr_base = 0x0010D204,
3042 .phys_size = SZ_8K,
3043};
3044
Praveen Chidambaram78499012011-11-01 17:15:17 -06003045struct platform_device msm8960_rpm_stat_device = {
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003046 .name = "msm_rpm_stat",
3047 .id = -1,
3048 .dev = {
3049 .platform_data = &msm_rpm_stat_pdata,
3050 },
3051};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003052
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003053struct platform_device msm_bus_sys_fabric = {
3054 .name = "msm_bus_fabric",
3055 .id = MSM_BUS_FAB_SYSTEM,
3056};
3057struct platform_device msm_bus_apps_fabric = {
3058 .name = "msm_bus_fabric",
3059 .id = MSM_BUS_FAB_APPSS,
3060};
3061struct platform_device msm_bus_mm_fabric = {
3062 .name = "msm_bus_fabric",
3063 .id = MSM_BUS_FAB_MMSS,
3064};
3065struct platform_device msm_bus_sys_fpb = {
3066 .name = "msm_bus_fabric",
3067 .id = MSM_BUS_FAB_SYSTEM_FPB,
3068};
3069struct platform_device msm_bus_cpss_fpb = {
3070 .name = "msm_bus_fabric",
3071 .id = MSM_BUS_FAB_CPSS_FPB,
3072};
3073
3074/* Sensors DSPS platform data */
3075#ifdef CONFIG_MSM_DSPS
3076
3077#define PPSS_REG_PHYS_BASE 0x12080000
3078
3079static struct dsps_clk_info dsps_clks[] = {};
3080static struct dsps_regulator_info dsps_regs[] = {};
3081
3082/*
3083 * Note: GPIOs field is intialized in run-time at the function
3084 * msm8960_init_dsps().
3085 */
3086
3087struct msm_dsps_platform_data msm_dsps_pdata = {
3088 .clks = dsps_clks,
3089 .clks_num = ARRAY_SIZE(dsps_clks),
3090 .gpios = NULL,
3091 .gpios_num = 0,
3092 .regs = dsps_regs,
3093 .regs_num = ARRAY_SIZE(dsps_regs),
3094 .dsps_pwr_ctl_en = 1,
3095 .signature = DSPS_SIGNATURE,
3096};
3097
3098static struct resource msm_dsps_resources[] = {
3099 {
3100 .start = PPSS_REG_PHYS_BASE,
3101 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
3102 .name = "ppss_reg",
3103 .flags = IORESOURCE_MEM,
3104 },
Wentao Xua55500b2011-08-16 18:15:04 -04003105
3106 {
3107 .start = PPSS_WDOG_TIMER_IRQ,
3108 .end = PPSS_WDOG_TIMER_IRQ,
3109 .name = "ppss_wdog",
3110 .flags = IORESOURCE_IRQ,
3111 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003112};
3113
3114struct platform_device msm_dsps_device = {
3115 .name = "msm_dsps",
3116 .id = 0,
3117 .num_resources = ARRAY_SIZE(msm_dsps_resources),
3118 .resource = msm_dsps_resources,
3119 .dev.platform_data = &msm_dsps_pdata,
3120};
3121
3122#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07003123
3124#ifdef CONFIG_MSM_QDSS
3125
3126#define MSM_QDSS_PHYS_BASE 0x01A00000
3127#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
3128#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
3129#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patel492b3012012-03-06 14:22:30 -08003130#define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
Pratik Patel7831c082011-06-08 21:44:37 -07003131
3132static struct resource msm_etb_resources[] = {
3133 {
3134 .start = MSM_ETB_PHYS_BASE,
3135 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
3136 .flags = IORESOURCE_MEM,
3137 },
3138};
3139
3140struct platform_device msm_etb_device = {
3141 .name = "msm_etb",
3142 .id = 0,
3143 .num_resources = ARRAY_SIZE(msm_etb_resources),
3144 .resource = msm_etb_resources,
3145};
3146
3147static struct resource msm_tpiu_resources[] = {
3148 {
3149 .start = MSM_TPIU_PHYS_BASE,
3150 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
3151 .flags = IORESOURCE_MEM,
3152 },
3153};
3154
3155struct platform_device msm_tpiu_device = {
3156 .name = "msm_tpiu",
3157 .id = 0,
3158 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
3159 .resource = msm_tpiu_resources,
3160};
3161
3162static struct resource msm_funnel_resources[] = {
3163 {
3164 .start = MSM_FUNNEL_PHYS_BASE,
3165 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
3166 .flags = IORESOURCE_MEM,
3167 },
3168};
3169
3170struct platform_device msm_funnel_device = {
3171 .name = "msm_funnel",
3172 .id = 0,
3173 .num_resources = ARRAY_SIZE(msm_funnel_resources),
3174 .resource = msm_funnel_resources,
3175};
3176
Pratik Patel492b3012012-03-06 14:22:30 -08003177static struct resource msm_etm_resources[] = {
Pratik Patel7831c082011-06-08 21:44:37 -07003178 {
Pratik Patel492b3012012-03-06 14:22:30 -08003179 .start = MSM_ETM_PHYS_BASE,
3180 .end = MSM_ETM_PHYS_BASE + (SZ_4K * 2) - 1,
Pratik Patel7831c082011-06-08 21:44:37 -07003181 .flags = IORESOURCE_MEM,
3182 },
3183};
3184
Pratik Patel492b3012012-03-06 14:22:30 -08003185struct platform_device msm_etm_device = {
3186 .name = "msm_etm",
Pratik Patel7831c082011-06-08 21:44:37 -07003187 .id = 0,
Pratik Patel492b3012012-03-06 14:22:30 -08003188 .num_resources = ARRAY_SIZE(msm_etm_resources),
3189 .resource = msm_etm_resources,
Pratik Patel7831c082011-06-08 21:44:37 -07003190};
3191
3192#endif