blob: 2add8f9b6eef90518c6c8e1033fa6cf815faf489 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/platform_device.h>
17#include <linux/msm_rotator.h>
Deepak Kotur12301a72011-11-09 18:30:29 -080018#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <linux/gpio.h>
20#include <asm/clkdev.h>
21#include <linux/msm_kgsl.h>
22#include <linux/android_pmem.h>
23#include <mach/irqs-8960.h>
Mayank Rana9f51f582011-08-04 18:35:59 +053024#include <mach/dma.h>
25#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026#include <mach/board.h>
27#include <mach/msm_iomap.h>
28#include <mach/msm_hsusb.h>
29#include <mach/msm_sps.h>
30#include <mach/rpm.h>
31#include <mach/msm_bus_board.h>
32#include <mach/msm_memtypes.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070033#include <sound/msm-dai-q6.h>
34#include <sound/apr_audio.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070035#include "clock.h"
36#include "devices.h"
37#include "devices-msm8x60.h"
38#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070039#include "msm_watchdog.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060040#include "rpm_stats.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070041
42#ifdef CONFIG_MSM_MPM
43#include "mpm.h"
44#endif
45#ifdef CONFIG_MSM_DSPS
46#include <mach/msm_dsps.h>
47#endif
48
49
50/* Address of GSBI blocks */
51#define MSM_GSBI1_PHYS 0x16000000
52#define MSM_GSBI2_PHYS 0x16100000
53#define MSM_GSBI3_PHYS 0x16200000
54#define MSM_GSBI4_PHYS 0x16300000
55#define MSM_GSBI5_PHYS 0x16400000
56#define MSM_GSBI6_PHYS 0x16500000
57#define MSM_GSBI7_PHYS 0x16600000
58#define MSM_GSBI8_PHYS 0x1A000000
59#define MSM_GSBI9_PHYS 0x1A100000
60#define MSM_GSBI10_PHYS 0x1A200000
61#define MSM_GSBI11_PHYS 0x12440000
62#define MSM_GSBI12_PHYS 0x12480000
63
64#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
65#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053066#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070067
68/* GSBI QUP devices */
69#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
70#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
71#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
72#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
73#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
74#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
75#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
76#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
77#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
78#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
79#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
80#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
81#define MSM_QUP_SIZE SZ_4K
82
83#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
84#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
85#define MSM_PMIC_SSBI_SIZE SZ_4K
86
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070087#define MSM8960_HSUSB_PHYS 0x12500000
88#define MSM8960_HSUSB_SIZE SZ_4K
89
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070090static struct resource resources_otg[] = {
91 {
92 .start = MSM8960_HSUSB_PHYS,
93 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
94 .flags = IORESOURCE_MEM,
95 },
96 {
97 .start = USB1_HS_IRQ,
98 .end = USB1_HS_IRQ,
99 .flags = IORESOURCE_IRQ,
100 },
101};
102
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700103struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700104 .name = "msm_otg",
105 .id = -1,
106 .num_resources = ARRAY_SIZE(resources_otg),
107 .resource = resources_otg,
108 .dev = {
109 .coherent_dma_mask = 0xffffffff,
110 },
111};
112
113static struct resource resources_hsusb[] = {
114 {
115 .start = MSM8960_HSUSB_PHYS,
116 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
117 .flags = IORESOURCE_MEM,
118 },
119 {
120 .start = USB1_HS_IRQ,
121 .end = USB1_HS_IRQ,
122 .flags = IORESOURCE_IRQ,
123 },
124};
125
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700126struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700127 .name = "msm_hsusb",
128 .id = -1,
129 .num_resources = ARRAY_SIZE(resources_hsusb),
130 .resource = resources_hsusb,
131 .dev = {
132 .coherent_dma_mask = 0xffffffff,
133 },
134};
135
136static struct resource resources_hsusb_host[] = {
137 {
138 .start = MSM8960_HSUSB_PHYS,
139 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
140 .flags = IORESOURCE_MEM,
141 },
142 {
143 .start = USB1_HS_IRQ,
144 .end = USB1_HS_IRQ,
145 .flags = IORESOURCE_IRQ,
146 },
147};
148
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530149static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700150struct platform_device msm_device_hsusb_host = {
151 .name = "msm_hsusb_host",
152 .id = -1,
153 .num_resources = ARRAY_SIZE(resources_hsusb_host),
154 .resource = resources_hsusb_host,
155 .dev = {
156 .dma_mask = &dma_mask,
157 .coherent_dma_mask = 0xffffffff,
158 },
159};
160
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530161static struct resource resources_hsic_host[] = {
162 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700163 .start = 0x12520000,
164 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530165 .flags = IORESOURCE_MEM,
166 },
167 {
168 .start = USB_HSIC_IRQ,
169 .end = USB_HSIC_IRQ,
170 .flags = IORESOURCE_IRQ,
171 },
172};
173
174struct platform_device msm_device_hsic_host = {
175 .name = "msm_hsic_host",
176 .id = -1,
177 .num_resources = ARRAY_SIZE(resources_hsic_host),
178 .resource = resources_hsic_host,
179 .dev = {
180 .dma_mask = &dma_mask,
181 .coherent_dma_mask = DMA_BIT_MASK(32),
182 },
183};
184
Mona Hossain11c03ac2011-10-26 12:42:10 -0700185#define SHARED_IMEM_TZ_BASE 0x2a03f720
186static struct resource tzlog_resources[] = {
187 {
188 .start = SHARED_IMEM_TZ_BASE,
189 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
190 .flags = IORESOURCE_MEM,
191 },
192};
193
194struct platform_device msm_device_tz_log = {
195 .name = "tz_log",
196 .id = 0,
197 .num_resources = ARRAY_SIZE(tzlog_resources),
198 .resource = tzlog_resources,
199};
200
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700201static struct resource resources_uart_gsbi2[] = {
202 {
203 .start = MSM8960_GSBI2_UARTDM_IRQ,
204 .end = MSM8960_GSBI2_UARTDM_IRQ,
205 .flags = IORESOURCE_IRQ,
206 },
207 {
208 .start = MSM_UART2DM_PHYS,
209 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
210 .name = "uartdm_resource",
211 .flags = IORESOURCE_MEM,
212 },
213 {
214 .start = MSM_GSBI2_PHYS,
215 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
216 .name = "gsbi_resource",
217 .flags = IORESOURCE_MEM,
218 },
219};
220
221struct platform_device msm8960_device_uart_gsbi2 = {
222 .name = "msm_serial_hsl",
223 .id = 0,
224 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
225 .resource = resources_uart_gsbi2,
226};
Mayank Rana9f51f582011-08-04 18:35:59 +0530227/* GSBI 6 used into UARTDM Mode */
228static struct resource msm_uart_dm6_resources[] = {
229 {
230 .start = MSM_UART6DM_PHYS,
231 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
232 .name = "uartdm_resource",
233 .flags = IORESOURCE_MEM,
234 },
235 {
236 .start = GSBI6_UARTDM_IRQ,
237 .end = GSBI6_UARTDM_IRQ,
238 .flags = IORESOURCE_IRQ,
239 },
240 {
241 .start = MSM_GSBI6_PHYS,
242 .end = MSM_GSBI6_PHYS + 4 - 1,
243 .name = "gsbi_resource",
244 .flags = IORESOURCE_MEM,
245 },
246 {
247 .start = DMOV_HSUART_GSBI6_TX_CHAN,
248 .end = DMOV_HSUART_GSBI6_RX_CHAN,
249 .name = "uartdm_channels",
250 .flags = IORESOURCE_DMA,
251 },
252 {
253 .start = DMOV_HSUART_GSBI6_TX_CRCI,
254 .end = DMOV_HSUART_GSBI6_RX_CRCI,
255 .name = "uartdm_crci",
256 .flags = IORESOURCE_DMA,
257 },
258};
259static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
260struct platform_device msm_device_uart_dm6 = {
261 .name = "msm_serial_hs",
262 .id = 0,
263 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
264 .resource = msm_uart_dm6_resources,
265 .dev = {
266 .dma_mask = &msm_uart_dm6_dma_mask,
267 .coherent_dma_mask = DMA_BIT_MASK(32),
268 },
269};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700270
271static struct resource resources_uart_gsbi5[] = {
272 {
273 .start = GSBI5_UARTDM_IRQ,
274 .end = GSBI5_UARTDM_IRQ,
275 .flags = IORESOURCE_IRQ,
276 },
277 {
278 .start = MSM_UART5DM_PHYS,
279 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
280 .name = "uartdm_resource",
281 .flags = IORESOURCE_MEM,
282 },
283 {
284 .start = MSM_GSBI5_PHYS,
285 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
286 .name = "gsbi_resource",
287 .flags = IORESOURCE_MEM,
288 },
289};
290
291struct platform_device msm8960_device_uart_gsbi5 = {
292 .name = "msm_serial_hsl",
293 .id = 0,
294 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
295 .resource = resources_uart_gsbi5,
296};
297/* MSM Video core device */
298#ifdef CONFIG_MSM_BUS_SCALING
299static struct msm_bus_vectors vidc_init_vectors[] = {
300 {
301 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
302 .dst = MSM_BUS_SLAVE_EBI_CH0,
303 .ab = 0,
304 .ib = 0,
305 },
306 {
307 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
308 .dst = MSM_BUS_SLAVE_EBI_CH0,
309 .ab = 0,
310 .ib = 0,
311 },
312 {
313 .src = MSM_BUS_MASTER_AMPSS_M0,
314 .dst = MSM_BUS_SLAVE_EBI_CH0,
315 .ab = 0,
316 .ib = 0,
317 },
318 {
319 .src = MSM_BUS_MASTER_AMPSS_M0,
320 .dst = MSM_BUS_SLAVE_EBI_CH0,
321 .ab = 0,
322 .ib = 0,
323 },
324};
325static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
326 {
327 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
328 .dst = MSM_BUS_SLAVE_EBI_CH0,
329 .ab = 54525952,
330 .ib = 436207616,
331 },
332 {
333 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
334 .dst = MSM_BUS_SLAVE_EBI_CH0,
335 .ab = 72351744,
336 .ib = 289406976,
337 },
338 {
339 .src = MSM_BUS_MASTER_AMPSS_M0,
340 .dst = MSM_BUS_SLAVE_EBI_CH0,
341 .ab = 500000,
342 .ib = 1000000,
343 },
344 {
345 .src = MSM_BUS_MASTER_AMPSS_M0,
346 .dst = MSM_BUS_SLAVE_EBI_CH0,
347 .ab = 500000,
348 .ib = 1000000,
349 },
350};
351static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
352 {
353 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
354 .dst = MSM_BUS_SLAVE_EBI_CH0,
355 .ab = 40894464,
356 .ib = 327155712,
357 },
358 {
359 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
360 .dst = MSM_BUS_SLAVE_EBI_CH0,
361 .ab = 48234496,
362 .ib = 192937984,
363 },
364 {
365 .src = MSM_BUS_MASTER_AMPSS_M0,
366 .dst = MSM_BUS_SLAVE_EBI_CH0,
367 .ab = 500000,
368 .ib = 2000000,
369 },
370 {
371 .src = MSM_BUS_MASTER_AMPSS_M0,
372 .dst = MSM_BUS_SLAVE_EBI_CH0,
373 .ab = 500000,
374 .ib = 2000000,
375 },
376};
377static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
378 {
379 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
380 .dst = MSM_BUS_SLAVE_EBI_CH0,
381 .ab = 163577856,
382 .ib = 1308622848,
383 },
384 {
385 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
386 .dst = MSM_BUS_SLAVE_EBI_CH0,
387 .ab = 219152384,
388 .ib = 876609536,
389 },
390 {
391 .src = MSM_BUS_MASTER_AMPSS_M0,
392 .dst = MSM_BUS_SLAVE_EBI_CH0,
393 .ab = 1750000,
394 .ib = 3500000,
395 },
396 {
397 .src = MSM_BUS_MASTER_AMPSS_M0,
398 .dst = MSM_BUS_SLAVE_EBI_CH0,
399 .ab = 1750000,
400 .ib = 3500000,
401 },
402};
403static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
404 {
405 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
406 .dst = MSM_BUS_SLAVE_EBI_CH0,
407 .ab = 121634816,
408 .ib = 973078528,
409 },
410 {
411 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
412 .dst = MSM_BUS_SLAVE_EBI_CH0,
413 .ab = 155189248,
414 .ib = 620756992,
415 },
416 {
417 .src = MSM_BUS_MASTER_AMPSS_M0,
418 .dst = MSM_BUS_SLAVE_EBI_CH0,
419 .ab = 1750000,
420 .ib = 7000000,
421 },
422 {
423 .src = MSM_BUS_MASTER_AMPSS_M0,
424 .dst = MSM_BUS_SLAVE_EBI_CH0,
425 .ab = 1750000,
426 .ib = 7000000,
427 },
428};
429static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
430 {
431 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
432 .dst = MSM_BUS_SLAVE_EBI_CH0,
433 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700434 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700435 },
436 {
437 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
438 .dst = MSM_BUS_SLAVE_EBI_CH0,
439 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700440 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700441 },
442 {
443 .src = MSM_BUS_MASTER_AMPSS_M0,
444 .dst = MSM_BUS_SLAVE_EBI_CH0,
445 .ab = 2500000,
446 .ib = 5000000,
447 },
448 {
449 .src = MSM_BUS_MASTER_AMPSS_M0,
450 .dst = MSM_BUS_SLAVE_EBI_CH0,
451 .ab = 2500000,
452 .ib = 5000000,
453 },
454};
455static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
456 {
457 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
458 .dst = MSM_BUS_SLAVE_EBI_CH0,
459 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700460 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700461 },
462 {
463 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
464 .dst = MSM_BUS_SLAVE_EBI_CH0,
465 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700466 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700467 },
468 {
469 .src = MSM_BUS_MASTER_AMPSS_M0,
470 .dst = MSM_BUS_SLAVE_EBI_CH0,
471 .ab = 2500000,
472 .ib = 700000000,
473 },
474 {
475 .src = MSM_BUS_MASTER_AMPSS_M0,
476 .dst = MSM_BUS_SLAVE_EBI_CH0,
477 .ab = 2500000,
478 .ib = 10000000,
479 },
480};
481
482static struct msm_bus_paths vidc_bus_client_config[] = {
483 {
484 ARRAY_SIZE(vidc_init_vectors),
485 vidc_init_vectors,
486 },
487 {
488 ARRAY_SIZE(vidc_venc_vga_vectors),
489 vidc_venc_vga_vectors,
490 },
491 {
492 ARRAY_SIZE(vidc_vdec_vga_vectors),
493 vidc_vdec_vga_vectors,
494 },
495 {
496 ARRAY_SIZE(vidc_venc_720p_vectors),
497 vidc_venc_720p_vectors,
498 },
499 {
500 ARRAY_SIZE(vidc_vdec_720p_vectors),
501 vidc_vdec_720p_vectors,
502 },
503 {
504 ARRAY_SIZE(vidc_venc_1080p_vectors),
505 vidc_venc_1080p_vectors,
506 },
507 {
508 ARRAY_SIZE(vidc_vdec_1080p_vectors),
509 vidc_vdec_1080p_vectors,
510 },
511};
512
513static struct msm_bus_scale_pdata vidc_bus_client_data = {
514 vidc_bus_client_config,
515 ARRAY_SIZE(vidc_bus_client_config),
516 .name = "vidc",
517};
518#endif
519
Mona Hossain9c430e32011-07-27 11:04:47 -0700520#ifdef CONFIG_HW_RANDOM_MSM
521/* PRNG device */
522#define MSM_PRNG_PHYS 0x1A500000
523static struct resource rng_resources = {
524 .flags = IORESOURCE_MEM,
525 .start = MSM_PRNG_PHYS,
526 .end = MSM_PRNG_PHYS + SZ_512 - 1,
527};
528
529struct platform_device msm_device_rng = {
530 .name = "msm_rng",
531 .id = 0,
532 .num_resources = 1,
533 .resource = &rng_resources,
534};
535#endif
536
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700537#define MSM_VIDC_BASE_PHYS 0x04400000
538#define MSM_VIDC_BASE_SIZE 0x00100000
539
540static struct resource msm_device_vidc_resources[] = {
541 {
542 .start = MSM_VIDC_BASE_PHYS,
543 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
544 .flags = IORESOURCE_MEM,
545 },
546 {
547 .start = VCODEC_IRQ,
548 .end = VCODEC_IRQ,
549 .flags = IORESOURCE_IRQ,
550 },
551};
552
553struct msm_vidc_platform_data vidc_platform_data = {
554#ifdef CONFIG_MSM_BUS_SCALING
555 .vidc_bus_client_pdata = &vidc_bus_client_data,
556#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700557#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Deepak Kotur12301a72011-11-09 18:30:29 -0800558 .memtype = ION_HEAP_EBI_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700559 .enable_ion = 1,
560#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800561 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700562 .enable_ion = 0,
563#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700564};
565
566struct platform_device msm_device_vidc = {
567 .name = "msm_vidc",
568 .id = 0,
569 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
570 .resource = msm_device_vidc_resources,
571 .dev = {
572 .platform_data = &vidc_platform_data,
573 },
574};
575
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700576#define MSM_SDC1_BASE 0x12400000
577#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
578#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
579#define MSM_SDC2_BASE 0x12140000
580#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
581#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
582#define MSM_SDC2_BASE 0x12140000
583#define MSM_SDC3_BASE 0x12180000
584#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
585#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
586#define MSM_SDC4_BASE 0x121C0000
587#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
588#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
589#define MSM_SDC5_BASE 0x12200000
590#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
591#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
592
593static struct resource resources_sdc1[] = {
594 {
595 .name = "core_mem",
596 .flags = IORESOURCE_MEM,
597 .start = MSM_SDC1_BASE,
598 .end = MSM_SDC1_DML_BASE - 1,
599 },
600 {
601 .name = "core_irq",
602 .flags = IORESOURCE_IRQ,
603 .start = SDC1_IRQ_0,
604 .end = SDC1_IRQ_0
605 },
606#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
607 {
608 .name = "sdcc_dml_addr",
609 .start = MSM_SDC1_DML_BASE,
610 .end = MSM_SDC1_BAM_BASE - 1,
611 .flags = IORESOURCE_MEM,
612 },
613 {
614 .name = "sdcc_bam_addr",
615 .start = MSM_SDC1_BAM_BASE,
616 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
617 .flags = IORESOURCE_MEM,
618 },
619 {
620 .name = "sdcc_bam_irq",
621 .start = SDC1_BAM_IRQ,
622 .end = SDC1_BAM_IRQ,
623 .flags = IORESOURCE_IRQ,
624 },
625#endif
626};
627
628static struct resource resources_sdc2[] = {
629 {
630 .name = "core_mem",
631 .flags = IORESOURCE_MEM,
632 .start = MSM_SDC2_BASE,
633 .end = MSM_SDC2_DML_BASE - 1,
634 },
635 {
636 .name = "core_irq",
637 .flags = IORESOURCE_IRQ,
638 .start = SDC2_IRQ_0,
639 .end = SDC2_IRQ_0
640 },
641#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
642 {
643 .name = "sdcc_dml_addr",
644 .start = MSM_SDC2_DML_BASE,
645 .end = MSM_SDC2_BAM_BASE - 1,
646 .flags = IORESOURCE_MEM,
647 },
648 {
649 .name = "sdcc_bam_addr",
650 .start = MSM_SDC2_BAM_BASE,
651 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
652 .flags = IORESOURCE_MEM,
653 },
654 {
655 .name = "sdcc_bam_irq",
656 .start = SDC2_BAM_IRQ,
657 .end = SDC2_BAM_IRQ,
658 .flags = IORESOURCE_IRQ,
659 },
660#endif
661};
662
663static struct resource resources_sdc3[] = {
664 {
665 .name = "core_mem",
666 .flags = IORESOURCE_MEM,
667 .start = MSM_SDC3_BASE,
668 .end = MSM_SDC3_DML_BASE - 1,
669 },
670 {
671 .name = "core_irq",
672 .flags = IORESOURCE_IRQ,
673 .start = SDC3_IRQ_0,
674 .end = SDC3_IRQ_0
675 },
676#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
677 {
678 .name = "sdcc_dml_addr",
679 .start = MSM_SDC3_DML_BASE,
680 .end = MSM_SDC3_BAM_BASE - 1,
681 .flags = IORESOURCE_MEM,
682 },
683 {
684 .name = "sdcc_bam_addr",
685 .start = MSM_SDC3_BAM_BASE,
686 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
687 .flags = IORESOURCE_MEM,
688 },
689 {
690 .name = "sdcc_bam_irq",
691 .start = SDC3_BAM_IRQ,
692 .end = SDC3_BAM_IRQ,
693 .flags = IORESOURCE_IRQ,
694 },
695#endif
696};
697
698static struct resource resources_sdc4[] = {
699 {
700 .name = "core_mem",
701 .flags = IORESOURCE_MEM,
702 .start = MSM_SDC4_BASE,
703 .end = MSM_SDC4_DML_BASE - 1,
704 },
705 {
706 .name = "core_irq",
707 .flags = IORESOURCE_IRQ,
708 .start = SDC4_IRQ_0,
709 .end = SDC4_IRQ_0
710 },
711#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
712 {
713 .name = "sdcc_dml_addr",
714 .start = MSM_SDC4_DML_BASE,
715 .end = MSM_SDC4_BAM_BASE - 1,
716 .flags = IORESOURCE_MEM,
717 },
718 {
719 .name = "sdcc_bam_addr",
720 .start = MSM_SDC4_BAM_BASE,
721 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
722 .flags = IORESOURCE_MEM,
723 },
724 {
725 .name = "sdcc_bam_irq",
726 .start = SDC4_BAM_IRQ,
727 .end = SDC4_BAM_IRQ,
728 .flags = IORESOURCE_IRQ,
729 },
730#endif
731};
732
733static struct resource resources_sdc5[] = {
734 {
735 .name = "core_mem",
736 .flags = IORESOURCE_MEM,
737 .start = MSM_SDC5_BASE,
738 .end = MSM_SDC5_DML_BASE - 1,
739 },
740 {
741 .name = "core_irq",
742 .flags = IORESOURCE_IRQ,
743 .start = SDC5_IRQ_0,
744 .end = SDC5_IRQ_0
745 },
746#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
747 {
748 .name = "sdcc_dml_addr",
749 .start = MSM_SDC5_DML_BASE,
750 .end = MSM_SDC5_BAM_BASE - 1,
751 .flags = IORESOURCE_MEM,
752 },
753 {
754 .name = "sdcc_bam_addr",
755 .start = MSM_SDC5_BAM_BASE,
756 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
757 .flags = IORESOURCE_MEM,
758 },
759 {
760 .name = "sdcc_bam_irq",
761 .start = SDC5_BAM_IRQ,
762 .end = SDC5_BAM_IRQ,
763 .flags = IORESOURCE_IRQ,
764 },
765#endif
766};
767
768struct platform_device msm_device_sdc1 = {
769 .name = "msm_sdcc",
770 .id = 1,
771 .num_resources = ARRAY_SIZE(resources_sdc1),
772 .resource = resources_sdc1,
773 .dev = {
774 .coherent_dma_mask = 0xffffffff,
775 },
776};
777
778struct platform_device msm_device_sdc2 = {
779 .name = "msm_sdcc",
780 .id = 2,
781 .num_resources = ARRAY_SIZE(resources_sdc2),
782 .resource = resources_sdc2,
783 .dev = {
784 .coherent_dma_mask = 0xffffffff,
785 },
786};
787
788struct platform_device msm_device_sdc3 = {
789 .name = "msm_sdcc",
790 .id = 3,
791 .num_resources = ARRAY_SIZE(resources_sdc3),
792 .resource = resources_sdc3,
793 .dev = {
794 .coherent_dma_mask = 0xffffffff,
795 },
796};
797
798struct platform_device msm_device_sdc4 = {
799 .name = "msm_sdcc",
800 .id = 4,
801 .num_resources = ARRAY_SIZE(resources_sdc4),
802 .resource = resources_sdc4,
803 .dev = {
804 .coherent_dma_mask = 0xffffffff,
805 },
806};
807
808struct platform_device msm_device_sdc5 = {
809 .name = "msm_sdcc",
810 .id = 5,
811 .num_resources = ARRAY_SIZE(resources_sdc5),
812 .resource = resources_sdc5,
813 .dev = {
814 .coherent_dma_mask = 0xffffffff,
815 },
816};
817
818struct platform_device msm_device_smd = {
819 .name = "msm_smd",
820 .id = -1,
821};
822
823struct platform_device msm_device_bam_dmux = {
824 .name = "BAM_RMNT",
825 .id = -1,
826};
827
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700828static struct msm_watchdog_pdata msm_watchdog_pdata = {
829 .pet_time = 10000,
830 .bark_time = 11000,
831 .has_secure = true,
832};
833
834struct platform_device msm8960_device_watchdog = {
835 .name = "msm_watchdog",
836 .id = -1,
837 .dev = {
838 .platform_data = &msm_watchdog_pdata,
839 },
840};
841
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700842static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700843 {
844 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700845 .flags = IORESOURCE_IRQ,
846 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700847 {
848 .start = 0x18320000,
849 .end = 0x18320000 + SZ_1M - 1,
850 .flags = IORESOURCE_MEM,
851 },
852};
853
854static struct msm_dmov_pdata msm_dmov_pdata = {
855 .sd = 1,
856 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700857};
858
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700859struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700860 .name = "msm_dmov",
861 .id = -1,
862 .resource = msm_dmov_resource,
863 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700864 .dev = {
865 .platform_data = &msm_dmov_pdata,
866 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700867};
868
869static struct platform_device *msm_sdcc_devices[] __initdata = {
870 &msm_device_sdc1,
871 &msm_device_sdc2,
872 &msm_device_sdc3,
873 &msm_device_sdc4,
874 &msm_device_sdc5,
875};
876
877int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
878{
879 struct platform_device *pdev;
880
881 if (controller < 1 || controller > 5)
882 return -EINVAL;
883
884 pdev = msm_sdcc_devices[controller-1];
885 pdev->dev.platform_data = plat;
886 return platform_device_register(pdev);
887}
888
889static struct resource resources_qup_i2c_gsbi4[] = {
890 {
891 .name = "gsbi_qup_i2c_addr",
892 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600893 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700894 .flags = IORESOURCE_MEM,
895 },
896 {
897 .name = "qup_phys_addr",
898 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600899 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700900 .flags = IORESOURCE_MEM,
901 },
902 {
903 .name = "qup_err_intr",
904 .start = GSBI4_QUP_IRQ,
905 .end = GSBI4_QUP_IRQ,
906 .flags = IORESOURCE_IRQ,
907 },
908};
909
910struct platform_device msm8960_device_qup_i2c_gsbi4 = {
911 .name = "qup_i2c",
912 .id = 4,
913 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
914 .resource = resources_qup_i2c_gsbi4,
915};
916
917static struct resource resources_qup_i2c_gsbi3[] = {
918 {
919 .name = "gsbi_qup_i2c_addr",
920 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600921 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700922 .flags = IORESOURCE_MEM,
923 },
924 {
925 .name = "qup_phys_addr",
926 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600927 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700928 .flags = IORESOURCE_MEM,
929 },
930 {
931 .name = "qup_err_intr",
932 .start = GSBI3_QUP_IRQ,
933 .end = GSBI3_QUP_IRQ,
934 .flags = IORESOURCE_IRQ,
935 },
936};
937
938struct platform_device msm8960_device_qup_i2c_gsbi3 = {
939 .name = "qup_i2c",
940 .id = 3,
941 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
942 .resource = resources_qup_i2c_gsbi3,
943};
944
945static struct resource resources_qup_i2c_gsbi10[] = {
946 {
947 .name = "gsbi_qup_i2c_addr",
948 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600949 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700950 .flags = IORESOURCE_MEM,
951 },
952 {
953 .name = "qup_phys_addr",
954 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600955 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700956 .flags = IORESOURCE_MEM,
957 },
958 {
959 .name = "qup_err_intr",
960 .start = GSBI10_QUP_IRQ,
961 .end = GSBI10_QUP_IRQ,
962 .flags = IORESOURCE_IRQ,
963 },
964};
965
966struct platform_device msm8960_device_qup_i2c_gsbi10 = {
967 .name = "qup_i2c",
968 .id = 10,
969 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
970 .resource = resources_qup_i2c_gsbi10,
971};
972
973static struct resource resources_qup_i2c_gsbi12[] = {
974 {
975 .name = "gsbi_qup_i2c_addr",
976 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600977 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700978 .flags = IORESOURCE_MEM,
979 },
980 {
981 .name = "qup_phys_addr",
982 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600983 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700984 .flags = IORESOURCE_MEM,
985 },
986 {
987 .name = "qup_err_intr",
988 .start = GSBI12_QUP_IRQ,
989 .end = GSBI12_QUP_IRQ,
990 .flags = IORESOURCE_IRQ,
991 },
992};
993
994struct platform_device msm8960_device_qup_i2c_gsbi12 = {
995 .name = "qup_i2c",
996 .id = 12,
997 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
998 .resource = resources_qup_i2c_gsbi12,
999};
1000
1001#ifdef CONFIG_MSM_CAMERA
1002struct resource msm_camera_resources[] = {
1003 {
Nishant Pandit24153d82011-08-27 16:05:13 +05301004 .name = "s3d_rw",
1005 .start = 0x008003E0,
1006 .end = 0x008003E0 + SZ_16 - 1,
1007 .flags = IORESOURCE_MEM,
1008 },
1009 {
1010 .name = "s3d_ctl",
1011 .start = 0x008020B8,
1012 .end = 0x008020B8 + SZ_16 - 1,
1013 .flags = IORESOURCE_MEM,
1014 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001015};
1016
1017int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1018{
1019 s_info->resource = msm_camera_resources;
1020 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1021 return 0;
1022}
Kevin Chanf6216f22011-10-25 18:40:11 -07001023
1024static struct resource msm_csiphy0_resources[] = {
1025 {
1026 .name = "csiphy",
1027 .start = 0x04800C00,
1028 .end = 0x04800C00 + SZ_1K - 1,
1029 .flags = IORESOURCE_MEM,
1030 },
1031 {
1032 .name = "csiphy",
1033 .start = CSIPHY_4LN_IRQ,
1034 .end = CSIPHY_4LN_IRQ,
1035 .flags = IORESOURCE_IRQ,
1036 },
1037};
1038
1039static struct resource msm_csiphy1_resources[] = {
1040 {
1041 .name = "csiphy",
1042 .start = 0x04801000,
1043 .end = 0x04801000 + SZ_1K - 1,
1044 .flags = IORESOURCE_MEM,
1045 },
1046 {
1047 .name = "csiphy",
1048 .start = MSM8960_CSIPHY_2LN_IRQ,
1049 .end = MSM8960_CSIPHY_2LN_IRQ,
1050 .flags = IORESOURCE_IRQ,
1051 },
1052};
1053
1054struct platform_device msm8960_device_csiphy0 = {
1055 .name = "msm_csiphy",
1056 .id = 0,
1057 .resource = msm_csiphy0_resources,
1058 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1059};
1060
1061struct platform_device msm8960_device_csiphy1 = {
1062 .name = "msm_csiphy",
1063 .id = 1,
1064 .resource = msm_csiphy1_resources,
1065 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1066};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001067
1068static struct resource msm_csid0_resources[] = {
1069 {
1070 .name = "csid",
1071 .start = 0x04800000,
1072 .end = 0x04800000 + SZ_1K - 1,
1073 .flags = IORESOURCE_MEM,
1074 },
1075 {
1076 .name = "csid",
1077 .start = CSI_0_IRQ,
1078 .end = CSI_0_IRQ,
1079 .flags = IORESOURCE_IRQ,
1080 },
1081};
1082
1083static struct resource msm_csid1_resources[] = {
1084 {
1085 .name = "csid",
1086 .start = 0x04800400,
1087 .end = 0x04800400 + SZ_1K - 1,
1088 .flags = IORESOURCE_MEM,
1089 },
1090 {
1091 .name = "csid",
1092 .start = CSI_1_IRQ,
1093 .end = CSI_1_IRQ,
1094 .flags = IORESOURCE_IRQ,
1095 },
1096};
1097
1098struct platform_device msm8960_device_csid0 = {
1099 .name = "msm_csid",
1100 .id = 0,
1101 .resource = msm_csid0_resources,
1102 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1103};
1104
1105struct platform_device msm8960_device_csid1 = {
1106 .name = "msm_csid",
1107 .id = 1,
1108 .resource = msm_csid1_resources,
1109 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1110};
Kevin Chane12c6672011-10-26 11:55:26 -07001111
1112struct resource msm_ispif_resources[] = {
1113 {
1114 .name = "ispif",
1115 .start = 0x04800800,
1116 .end = 0x04800800 + SZ_1K - 1,
1117 .flags = IORESOURCE_MEM,
1118 },
1119 {
1120 .name = "ispif",
1121 .start = ISPIF_IRQ,
1122 .end = ISPIF_IRQ,
1123 .flags = IORESOURCE_IRQ,
1124 },
1125};
1126
1127struct platform_device msm8960_device_ispif = {
1128 .name = "msm_ispif",
1129 .id = 0,
1130 .resource = msm_ispif_resources,
1131 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1132};
Kevin Chan5827c552011-10-28 18:36:32 -07001133
1134static struct resource msm_vfe_resources[] = {
1135 {
1136 .name = "vfe32",
1137 .start = 0x04500000,
1138 .end = 0x04500000 + SZ_1M - 1,
1139 .flags = IORESOURCE_MEM,
1140 },
1141 {
1142 .name = "vfe32",
1143 .start = VFE_IRQ,
1144 .end = VFE_IRQ,
1145 .flags = IORESOURCE_IRQ,
1146 },
1147};
1148
1149struct platform_device msm8960_device_vfe = {
1150 .name = "msm_vfe",
1151 .id = 0,
1152 .resource = msm_vfe_resources,
1153 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1154};
Kevin Chana0853122011-11-07 19:48:44 -08001155
1156static struct resource msm_vpe_resources[] = {
1157 {
1158 .name = "vpe",
1159 .start = 0x05300000,
1160 .end = 0x05300000 + SZ_1M - 1,
1161 .flags = IORESOURCE_MEM,
1162 },
1163 {
1164 .name = "vpe",
1165 .start = VPE_IRQ,
1166 .end = VPE_IRQ,
1167 .flags = IORESOURCE_IRQ,
1168 },
1169};
1170
1171struct platform_device msm8960_device_vpe = {
1172 .name = "msm_vpe",
1173 .id = 0,
1174 .resource = msm_vpe_resources,
1175 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1176};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001177#endif
1178
1179static struct resource resources_ssbi_pm8921[] = {
1180 {
1181 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1182 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1183 .flags = IORESOURCE_MEM,
1184 },
1185};
1186
1187struct platform_device msm8960_device_ssbi_pm8921 = {
1188 .name = "msm_ssbi",
1189 .id = 0,
1190 .resource = resources_ssbi_pm8921,
1191 .num_resources = ARRAY_SIZE(resources_ssbi_pm8921),
1192};
1193
1194static struct resource resources_qup_spi_gsbi1[] = {
1195 {
1196 .name = "spi_base",
1197 .start = MSM_GSBI1_QUP_PHYS,
1198 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1199 .flags = IORESOURCE_MEM,
1200 },
1201 {
1202 .name = "gsbi_base",
1203 .start = MSM_GSBI1_PHYS,
1204 .end = MSM_GSBI1_PHYS + 4 - 1,
1205 .flags = IORESOURCE_MEM,
1206 },
1207 {
1208 .name = "spi_irq_in",
1209 .start = MSM8960_GSBI1_QUP_IRQ,
1210 .end = MSM8960_GSBI1_QUP_IRQ,
1211 .flags = IORESOURCE_IRQ,
1212 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001213 {
1214 .name = "spi_clk",
1215 .start = 9,
1216 .end = 9,
1217 .flags = IORESOURCE_IO,
1218 },
1219 {
1220 .name = "spi_cs",
1221 .start = 8,
1222 .end = 8,
1223 .flags = IORESOURCE_IO,
1224 },
1225 {
Chandan Uddaraju15e54b92011-09-12 10:52:36 -07001226 .name = "spi_cs1",
1227 .start = 14,
1228 .end = 14,
1229 .flags = IORESOURCE_IO,
1230 },
1231 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001232 .name = "spi_miso",
1233 .start = 7,
1234 .end = 7,
1235 .flags = IORESOURCE_IO,
1236 },
1237 {
1238 .name = "spi_mosi",
1239 .start = 6,
1240 .end = 6,
1241 .flags = IORESOURCE_IO,
1242 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001243};
1244
1245struct platform_device msm8960_device_qup_spi_gsbi1 = {
1246 .name = "spi_qsd",
1247 .id = 0,
1248 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1249 .resource = resources_qup_spi_gsbi1,
1250};
1251
1252struct platform_device msm_pcm = {
1253 .name = "msm-pcm-dsp",
1254 .id = -1,
1255};
1256
1257struct platform_device msm_pcm_routing = {
1258 .name = "msm-pcm-routing",
1259 .id = -1,
1260};
1261
1262struct platform_device msm_cpudai0 = {
1263 .name = "msm-dai-q6",
1264 .id = 0x4000,
1265};
1266
1267struct platform_device msm_cpudai1 = {
1268 .name = "msm-dai-q6",
1269 .id = 0x4001,
1270};
1271
1272struct platform_device msm_cpudai_hdmi_rx = {
1273 .name = "msm-dai-q6",
1274 .id = 8,
1275};
1276
1277struct platform_device msm_cpudai_bt_rx = {
1278 .name = "msm-dai-q6",
1279 .id = 0x3000,
1280};
1281
1282struct platform_device msm_cpudai_bt_tx = {
1283 .name = "msm-dai-q6",
1284 .id = 0x3001,
1285};
1286
1287struct platform_device msm_cpudai_fm_rx = {
1288 .name = "msm-dai-q6",
1289 .id = 0x3004,
1290};
1291
1292struct platform_device msm_cpudai_fm_tx = {
1293 .name = "msm-dai-q6",
1294 .id = 0x3005,
1295};
1296
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001297/*
1298 * Machine specific data for AUX PCM Interface
1299 * which the driver will be unware of.
1300 */
1301struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1302 .clk = "pcm_clk",
1303 .mode = AFE_PCM_CFG_MODE_PCM,
1304 .sync = AFE_PCM_CFG_SYNC_INT,
1305 .frame = AFE_PCM_CFG_FRM_256BPF,
1306 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1307 .slot = 0,
1308 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1309 .pcm_clk_rate = 2048000,
1310};
1311
1312struct platform_device msm_cpudai_auxpcm_rx = {
1313 .name = "msm-dai-q6",
1314 .id = 2,
1315 .dev = {
1316 .platform_data = &auxpcm_rx_pdata,
1317 },
1318};
1319
1320struct platform_device msm_cpudai_auxpcm_tx = {
1321 .name = "msm-dai-q6",
1322 .id = 3,
1323};
1324
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001325struct platform_device msm_cpu_fe = {
1326 .name = "msm-dai-fe",
1327 .id = -1,
1328};
1329
1330struct platform_device msm_stub_codec = {
1331 .name = "msm-stub-codec",
1332 .id = 1,
1333};
1334
1335struct platform_device msm_voice = {
1336 .name = "msm-pcm-voice",
1337 .id = -1,
1338};
1339
1340struct platform_device msm_voip = {
1341 .name = "msm-voip-dsp",
1342 .id = -1,
1343};
1344
1345struct platform_device msm_lpa_pcm = {
1346 .name = "msm-pcm-lpa",
1347 .id = -1,
1348};
1349
1350struct platform_device msm_pcm_hostless = {
1351 .name = "msm-pcm-hostless",
1352 .id = -1,
1353};
1354
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301355struct platform_device msm_cpudai_afe_01_rx = {
1356 .name = "msm-dai-q6",
1357 .id = 0xE0,
1358};
1359
1360struct platform_device msm_cpudai_afe_01_tx = {
1361 .name = "msm-dai-q6",
1362 .id = 0xF0,
1363};
1364
1365struct platform_device msm_cpudai_afe_02_rx = {
1366 .name = "msm-dai-q6",
1367 .id = 0xF1,
1368};
1369
1370struct platform_device msm_cpudai_afe_02_tx = {
1371 .name = "msm-dai-q6",
1372 .id = 0xE1,
1373};
1374
1375struct platform_device msm_pcm_afe = {
1376 .name = "msm-pcm-afe",
1377 .id = -1,
1378};
1379
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001380struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001381 FS_8X60(FS_MDP, "fs_mdp"),
1382 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001383 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1384 FS_8X60(FS_VFE, "fs_vfe"),
1385 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001386 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1387 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1388 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001389 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001390};
1391unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1392
1393#ifdef CONFIG_MSM_ROTATOR
1394#define ROTATOR_HW_BASE 0x04E00000
1395static struct resource resources_msm_rotator[] = {
1396 {
1397 .start = ROTATOR_HW_BASE,
1398 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1399 .flags = IORESOURCE_MEM,
1400 },
1401 {
1402 .start = ROT_IRQ,
1403 .end = ROT_IRQ,
1404 .flags = IORESOURCE_IRQ,
1405 },
1406};
1407
1408static struct msm_rot_clocks rotator_clocks[] = {
1409 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001410 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001411 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001412 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001413 },
1414 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001415 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001416 .clk_type = ROTATOR_PCLK,
1417 .clk_rate = 0,
1418 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001419};
1420
1421static struct msm_rotator_platform_data rotator_pdata = {
1422 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1423 .hardware_version_number = 0x01020309,
1424 .rotator_clks = rotator_clocks,
1425 .regulator_name = "fs_rot",
1426};
1427
1428struct platform_device msm_rotator_device = {
1429 .name = "msm_rotator",
1430 .id = 0,
1431 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1432 .resource = resources_msm_rotator,
1433 .dev = {
1434 .platform_data = &rotator_pdata,
1435 },
1436};
1437#endif
1438
1439#define MIPI_DSI_HW_BASE 0x04700000
1440#define MDP_HW_BASE 0x05100000
1441
1442static struct resource msm_mipi_dsi1_resources[] = {
1443 {
1444 .name = "mipi_dsi",
1445 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001446 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001447 .flags = IORESOURCE_MEM,
1448 },
1449 {
1450 .start = DSI1_IRQ,
1451 .end = DSI1_IRQ,
1452 .flags = IORESOURCE_IRQ,
1453 },
1454};
1455
1456struct platform_device msm_mipi_dsi1_device = {
1457 .name = "mipi_dsi",
1458 .id = 1,
1459 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1460 .resource = msm_mipi_dsi1_resources,
1461};
1462
1463static struct resource msm_mdp_resources[] = {
1464 {
1465 .name = "mdp",
1466 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001467 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001468 .flags = IORESOURCE_MEM,
1469 },
1470 {
1471 .start = MDP_IRQ,
1472 .end = MDP_IRQ,
1473 .flags = IORESOURCE_IRQ,
1474 },
1475};
1476
1477static struct platform_device msm_mdp_device = {
1478 .name = "mdp",
1479 .id = 0,
1480 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1481 .resource = msm_mdp_resources,
1482};
1483
1484static void __init msm_register_device(struct platform_device *pdev, void *data)
1485{
1486 int ret;
1487
1488 pdev->dev.platform_data = data;
1489 ret = platform_device_register(pdev);
1490 if (ret)
1491 dev_err(&pdev->dev,
1492 "%s: platform_device_register() failed = %d\n",
1493 __func__, ret);
1494}
1495
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001496#ifdef CONFIG_MSM_BUS_SCALING
1497static struct platform_device msm_dtv_device = {
1498 .name = "dtv",
1499 .id = 0,
1500};
1501#endif
1502
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001503void __init msm_fb_register_device(char *name, void *data)
1504{
1505 if (!strncmp(name, "mdp", 3))
1506 msm_register_device(&msm_mdp_device, data);
1507 else if (!strncmp(name, "mipi_dsi", 8))
1508 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001509#ifdef CONFIG_MSM_BUS_SCALING
1510 else if (!strncmp(name, "dtv", 3))
1511 msm_register_device(&msm_dtv_device, data);
1512#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001513 else
1514 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1515}
1516
1517static struct resource resources_sps[] = {
1518 {
1519 .name = "pipe_mem",
1520 .start = 0x12800000,
1521 .end = 0x12800000 + 0x4000 - 1,
1522 .flags = IORESOURCE_MEM,
1523 },
1524 {
1525 .name = "bamdma_dma",
1526 .start = 0x12240000,
1527 .end = 0x12240000 + 0x1000 - 1,
1528 .flags = IORESOURCE_MEM,
1529 },
1530 {
1531 .name = "bamdma_bam",
1532 .start = 0x12244000,
1533 .end = 0x12244000 + 0x4000 - 1,
1534 .flags = IORESOURCE_MEM,
1535 },
1536 {
1537 .name = "bamdma_irq",
1538 .start = SPS_BAM_DMA_IRQ,
1539 .end = SPS_BAM_DMA_IRQ,
1540 .flags = IORESOURCE_IRQ,
1541 },
1542};
1543
1544struct msm_sps_platform_data msm_sps_pdata = {
1545 .bamdma_restricted_pipes = 0x06,
1546};
1547
1548struct platform_device msm_device_sps = {
1549 .name = "msm_sps",
1550 .id = -1,
1551 .num_resources = ARRAY_SIZE(resources_sps),
1552 .resource = resources_sps,
1553 .dev.platform_data = &msm_sps_pdata,
1554};
1555
1556#ifdef CONFIG_MSM_MPM
1557static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001558 [1] = MSM_GPIO_TO_INT(46),
1559 [2] = MSM_GPIO_TO_INT(150),
1560 [4] = MSM_GPIO_TO_INT(103),
1561 [5] = MSM_GPIO_TO_INT(104),
1562 [6] = MSM_GPIO_TO_INT(105),
1563 [7] = MSM_GPIO_TO_INT(106),
1564 [8] = MSM_GPIO_TO_INT(107),
1565 [9] = MSM_GPIO_TO_INT(7),
1566 [10] = MSM_GPIO_TO_INT(11),
1567 [11] = MSM_GPIO_TO_INT(15),
1568 [12] = MSM_GPIO_TO_INT(19),
1569 [13] = MSM_GPIO_TO_INT(23),
1570 [14] = MSM_GPIO_TO_INT(27),
1571 [15] = MSM_GPIO_TO_INT(31),
1572 [16] = MSM_GPIO_TO_INT(35),
1573 [19] = MSM_GPIO_TO_INT(90),
1574 [20] = MSM_GPIO_TO_INT(92),
1575 [23] = MSM_GPIO_TO_INT(85),
1576 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001577 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001578 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001579 [29] = MSM_GPIO_TO_INT(10),
1580 [30] = MSM_GPIO_TO_INT(102),
1581 [31] = MSM_GPIO_TO_INT(81),
1582 [32] = MSM_GPIO_TO_INT(78),
1583 [33] = MSM_GPIO_TO_INT(94),
1584 [34] = MSM_GPIO_TO_INT(72),
1585 [35] = MSM_GPIO_TO_INT(39),
1586 [36] = MSM_GPIO_TO_INT(43),
1587 [37] = MSM_GPIO_TO_INT(61),
1588 [38] = MSM_GPIO_TO_INT(50),
1589 [39] = MSM_GPIO_TO_INT(42),
1590 [41] = MSM_GPIO_TO_INT(62),
1591 [42] = MSM_GPIO_TO_INT(76),
1592 [43] = MSM_GPIO_TO_INT(75),
1593 [44] = MSM_GPIO_TO_INT(70),
1594 [45] = MSM_GPIO_TO_INT(69),
1595 [46] = MSM_GPIO_TO_INT(67),
1596 [47] = MSM_GPIO_TO_INT(65),
1597 [48] = MSM_GPIO_TO_INT(58),
1598 [49] = MSM_GPIO_TO_INT(54),
1599 [50] = MSM_GPIO_TO_INT(52),
1600 [51] = MSM_GPIO_TO_INT(49),
1601 [52] = MSM_GPIO_TO_INT(40),
1602 [53] = MSM_GPIO_TO_INT(37),
1603 [54] = MSM_GPIO_TO_INT(24),
1604 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001605};
1606
1607static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1608 TLMM_MSM_SUMMARY_IRQ,
1609 RPM_APCC_CPU0_GP_HIGH_IRQ,
1610 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1611 RPM_APCC_CPU0_GP_LOW_IRQ,
1612 RPM_APCC_CPU0_WAKE_UP_IRQ,
1613 RPM_APCC_CPU1_GP_HIGH_IRQ,
1614 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1615 RPM_APCC_CPU1_GP_LOW_IRQ,
1616 RPM_APCC_CPU1_WAKE_UP_IRQ,
1617 MSS_TO_APPS_IRQ_0,
1618 MSS_TO_APPS_IRQ_1,
1619 MSS_TO_APPS_IRQ_2,
1620 MSS_TO_APPS_IRQ_3,
1621 MSS_TO_APPS_IRQ_4,
1622 MSS_TO_APPS_IRQ_5,
1623 MSS_TO_APPS_IRQ_6,
1624 MSS_TO_APPS_IRQ_7,
1625 MSS_TO_APPS_IRQ_8,
1626 MSS_TO_APPS_IRQ_9,
1627 LPASS_SCSS_GP_LOW_IRQ,
1628 LPASS_SCSS_GP_MEDIUM_IRQ,
1629 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001630 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001631 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001632 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001633 RIVA_APPS_WLAN_SMSM_IRQ,
1634 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1635 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001636};
1637
1638struct msm_mpm_device_data msm_mpm_dev_data = {
1639 .irqs_m2a = msm_mpm_irqs_m2a,
1640 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1641 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1642 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1643 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1644 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1645 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1646 .mpm_apps_ipc_val = BIT(1),
1647 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1648
1649};
1650#endif
1651
Stephen Boydbb600ae2011-08-02 20:11:40 -07001652static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001653 CLK_DUMMY("pll2", PLL2, NULL, 0),
1654 CLK_DUMMY("pll8", PLL8, NULL, 0),
1655 CLK_DUMMY("pll4", PLL4, NULL, 0),
1656
1657 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1658 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1659 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1660 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1661 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1662 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1663 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1664 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1665 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1666 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1667 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1668 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1669 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1670 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1671 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1672 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1673
Matt Wagantalle2522372011-08-17 14:52:21 -07001674 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1675 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1676 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1677 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1678 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1679 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1680 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1681 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1682 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1683 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1684 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1685 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001686 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1687 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1688 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1689 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1690 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1691 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1692 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1693 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1694 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1695 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1696 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1697 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001698 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001699 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001700 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001701 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1702 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1703 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1704 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1705 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001706 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001707 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001708 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1709 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1710 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1711 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1712 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1713 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1714 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1715 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001716 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1717 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001718 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1719 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001720 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001721 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001722 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001723 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001724 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001725 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1726 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1727 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1728 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1729 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1730 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1731 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001732 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001733 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1734 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1735 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001736 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1737 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1738 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1739 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1740 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001741 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1742 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001743 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1744 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1745 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1746 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1747 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001748 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1749 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1750 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1751 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1752 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1753 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1754 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1755 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1756 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1757 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1758 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1759 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1760 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1761 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1762 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001763 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1764 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1765 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001766 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001767 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001768 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001769 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1770 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1771 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001772 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001773 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1774 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1775 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001776 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001777 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1778 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1779 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1780 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1781 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1782 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1783 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1784 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1785 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001786 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001787 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1788 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1789 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1790 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1791 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1792 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1793 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1794 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1795 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1796 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001797 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1798 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1799 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001800 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1801 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1802 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1803 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001804 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001805 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001806 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001807 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001808 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1809 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1810 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1811 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1812 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1813 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1814 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1815 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1816 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1817 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1818 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1819 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1820 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1821 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1822 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001823 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1824 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1825 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1826 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1827 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1828 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001829
1830 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1831 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001832 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1833 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1834 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1835 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1836 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001837 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1838 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1839};
1840
Stephen Boydbb600ae2011-08-02 20:11:40 -07001841struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1842 .table = msm_clocks_8960_dummy,
1843 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1844};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001845
1846#define LPASS_SLIMBUS_PHYS 0x28080000
1847#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001848#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001849/* Board info for the slimbus slave device */
1850static struct resource slimbus_res[] = {
1851 {
1852 .start = LPASS_SLIMBUS_PHYS,
1853 .end = LPASS_SLIMBUS_PHYS + 8191,
1854 .flags = IORESOURCE_MEM,
1855 .name = "slimbus_physical",
1856 },
1857 {
1858 .start = LPASS_SLIMBUS_BAM_PHYS,
1859 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1860 .flags = IORESOURCE_MEM,
1861 .name = "slimbus_bam_physical",
1862 },
1863 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001864 .start = LPASS_SLIMBUS_SLEW,
1865 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1866 .flags = IORESOURCE_MEM,
1867 .name = "slimbus_slew_reg",
1868 },
1869 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001870 .start = SLIMBUS0_CORE_EE1_IRQ,
1871 .end = SLIMBUS0_CORE_EE1_IRQ,
1872 .flags = IORESOURCE_IRQ,
1873 .name = "slimbus_irq",
1874 },
1875 {
1876 .start = SLIMBUS0_BAM_EE1_IRQ,
1877 .end = SLIMBUS0_BAM_EE1_IRQ,
1878 .flags = IORESOURCE_IRQ,
1879 .name = "slimbus_bam_irq",
1880 },
1881};
1882
1883struct platform_device msm_slim_ctrl = {
1884 .name = "msm_slim_ctrl",
1885 .id = 1,
1886 .num_resources = ARRAY_SIZE(slimbus_res),
1887 .resource = slimbus_res,
1888 .dev = {
1889 .coherent_dma_mask = 0xffffffffULL,
1890 },
1891};
1892
1893#ifdef CONFIG_MSM_BUS_SCALING
1894static struct msm_bus_vectors grp3d_init_vectors[] = {
1895 {
1896 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1897 .dst = MSM_BUS_SLAVE_EBI_CH0,
1898 .ab = 0,
1899 .ib = 0,
1900 },
1901};
1902
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001903static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001904 {
1905 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1906 .dst = MSM_BUS_SLAVE_EBI_CH0,
1907 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001908 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001909 },
1910};
1911
1912static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
1913 {
1914 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1915 .dst = MSM_BUS_SLAVE_EBI_CH0,
1916 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001917 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001918 },
1919};
1920
1921static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
1922 {
1923 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1924 .dst = MSM_BUS_SLAVE_EBI_CH0,
1925 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001926 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001927 },
1928};
1929
1930static struct msm_bus_vectors grp3d_max_vectors[] = {
1931 {
1932 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1933 .dst = MSM_BUS_SLAVE_EBI_CH0,
1934 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001935 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001936 },
1937};
1938
1939static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
1940 {
1941 ARRAY_SIZE(grp3d_init_vectors),
1942 grp3d_init_vectors,
1943 },
1944 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001945 ARRAY_SIZE(grp3d_low_vectors),
1946 grp3d_low_vectors,
1947 },
1948 {
1949 ARRAY_SIZE(grp3d_nominal_low_vectors),
1950 grp3d_nominal_low_vectors,
1951 },
1952 {
1953 ARRAY_SIZE(grp3d_nominal_high_vectors),
1954 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001955 },
1956 {
1957 ARRAY_SIZE(grp3d_max_vectors),
1958 grp3d_max_vectors,
1959 },
1960};
1961
1962static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
1963 grp3d_bus_scale_usecases,
1964 ARRAY_SIZE(grp3d_bus_scale_usecases),
1965 .name = "grp3d",
1966};
1967
1968static struct msm_bus_vectors grp2d0_init_vectors[] = {
1969 {
1970 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1971 .dst = MSM_BUS_SLAVE_EBI_CH0,
1972 .ab = 0,
1973 .ib = 0,
1974 },
1975};
1976
1977static struct msm_bus_vectors grp2d0_max_vectors[] = {
1978 {
1979 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1980 .dst = MSM_BUS_SLAVE_EBI_CH0,
1981 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07001982 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001983 },
1984};
1985
1986static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
1987 {
1988 ARRAY_SIZE(grp2d0_init_vectors),
1989 grp2d0_init_vectors,
1990 },
1991 {
1992 ARRAY_SIZE(grp2d0_max_vectors),
1993 grp2d0_max_vectors,
1994 },
1995};
1996
1997struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
1998 grp2d0_bus_scale_usecases,
1999 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2000 .name = "grp2d0",
2001};
2002
2003static struct msm_bus_vectors grp2d1_init_vectors[] = {
2004 {
2005 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2006 .dst = MSM_BUS_SLAVE_EBI_CH0,
2007 .ab = 0,
2008 .ib = 0,
2009 },
2010};
2011
2012static struct msm_bus_vectors grp2d1_max_vectors[] = {
2013 {
2014 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2015 .dst = MSM_BUS_SLAVE_EBI_CH0,
2016 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002017 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002018 },
2019};
2020
2021static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2022 {
2023 ARRAY_SIZE(grp2d1_init_vectors),
2024 grp2d1_init_vectors,
2025 },
2026 {
2027 ARRAY_SIZE(grp2d1_max_vectors),
2028 grp2d1_max_vectors,
2029 },
2030};
2031
2032struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2033 grp2d1_bus_scale_usecases,
2034 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2035 .name = "grp2d1",
2036};
2037#endif
2038
2039static struct resource kgsl_3d0_resources[] = {
2040 {
2041 .name = KGSL_3D0_REG_MEMORY,
2042 .start = 0x04300000, /* GFX3D address */
2043 .end = 0x0431ffff,
2044 .flags = IORESOURCE_MEM,
2045 },
2046 {
2047 .name = KGSL_3D0_IRQ,
2048 .start = GFX3D_IRQ,
2049 .end = GFX3D_IRQ,
2050 .flags = IORESOURCE_IRQ,
2051 },
2052};
2053
2054static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002055 .pwrlevel = {
2056 {
2057 .gpu_freq = 400000000,
2058 .bus_freq = 4,
2059 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002060 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002061 {
2062 .gpu_freq = 300000000,
2063 .bus_freq = 3,
2064 .io_fraction = 33,
2065 },
2066 {
2067 .gpu_freq = 200000000,
2068 .bus_freq = 2,
2069 .io_fraction = 100,
2070 },
2071 {
2072 .gpu_freq = 128000000,
2073 .bus_freq = 1,
2074 .io_fraction = 100,
2075 },
2076 {
2077 .gpu_freq = 27000000,
2078 .bus_freq = 0,
2079 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002080 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002081 .init_level = 0,
2082 .num_levels = 5,
2083 .set_grp_async = NULL,
2084 .idle_timeout = HZ/5,
2085 .nap_allowed = true,
2086 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002087#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002088 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002089#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002090 .iommu_user_ctx_name = "gfx3d_user",
2091 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002092};
2093
2094struct platform_device msm_kgsl_3d0 = {
2095 .name = "kgsl-3d0",
2096 .id = 0,
2097 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2098 .resource = kgsl_3d0_resources,
2099 .dev = {
2100 .platform_data = &kgsl_3d0_pdata,
2101 },
2102};
2103
2104static struct resource kgsl_2d0_resources[] = {
2105 {
2106 .name = KGSL_2D0_REG_MEMORY,
2107 .start = 0x04100000, /* Z180 base address */
2108 .end = 0x04100FFF,
2109 .flags = IORESOURCE_MEM,
2110 },
2111 {
2112 .name = KGSL_2D0_IRQ,
2113 .start = GFX2D0_IRQ,
2114 .end = GFX2D0_IRQ,
2115 .flags = IORESOURCE_IRQ,
2116 },
2117};
2118
2119static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002120 .pwrlevel = {
2121 {
2122 .gpu_freq = 200000000,
2123 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002124 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002125 {
2126 .gpu_freq = 200000000,
2127 .bus_freq = 0,
2128 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002129 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002130 .init_level = 0,
2131 .num_levels = 2,
2132 .set_grp_async = NULL,
2133 .idle_timeout = HZ/10,
2134 .nap_allowed = true,
2135 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002136#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002137 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002138#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002139 .iommu_user_ctx_name = "gfx2d0_2d0",
2140 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002141};
2142
2143struct platform_device msm_kgsl_2d0 = {
2144 .name = "kgsl-2d0",
2145 .id = 0,
2146 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2147 .resource = kgsl_2d0_resources,
2148 .dev = {
2149 .platform_data = &kgsl_2d0_pdata,
2150 },
2151};
2152
2153static struct resource kgsl_2d1_resources[] = {
2154 {
2155 .name = KGSL_2D1_REG_MEMORY,
2156 .start = 0x04200000, /* Z180 device 1 base address */
2157 .end = 0x04200FFF,
2158 .flags = IORESOURCE_MEM,
2159 },
2160 {
2161 .name = KGSL_2D1_IRQ,
2162 .start = GFX2D1_IRQ,
2163 .end = GFX2D1_IRQ,
2164 .flags = IORESOURCE_IRQ,
2165 },
2166};
2167
2168static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002169 .pwrlevel = {
2170 {
2171 .gpu_freq = 200000000,
2172 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002173 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002174 {
2175 .gpu_freq = 200000000,
2176 .bus_freq = 0,
2177 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002178 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002179 .init_level = 0,
2180 .num_levels = 2,
2181 .set_grp_async = NULL,
2182 .idle_timeout = HZ/10,
2183 .nap_allowed = true,
2184 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002185#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002186 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002187#endif
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002188 .iommu_user_ctx_name = "gfx2d1_2d1",
2189 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002190};
2191
2192struct platform_device msm_kgsl_2d1 = {
2193 .name = "kgsl-2d1",
2194 .id = 1,
2195 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2196 .resource = kgsl_2d1_resources,
2197 .dev = {
2198 .platform_data = &kgsl_2d1_pdata,
2199 },
2200};
2201
2202#ifdef CONFIG_MSM_GEMINI
2203static struct resource msm_gemini_resources[] = {
2204 {
2205 .start = 0x04600000,
2206 .end = 0x04600000 + SZ_1M - 1,
2207 .flags = IORESOURCE_MEM,
2208 },
2209 {
2210 .start = JPEG_IRQ,
2211 .end = JPEG_IRQ,
2212 .flags = IORESOURCE_IRQ,
2213 },
2214};
2215
2216struct platform_device msm8960_gemini_device = {
2217 .name = "msm_gemini",
2218 .resource = msm_gemini_resources,
2219 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2220};
2221#endif
2222
2223struct msm_rpm_map_data rpm_map_data[] __initdata = {
2224 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2225 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2226
2227 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2228
2229 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2230 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2231 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2232 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2233 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2234 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2235 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2236 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2237 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2238 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2239
2240 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2241 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2242 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2243 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2244
2245 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2246 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2247 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002248 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002249
2250 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2251 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2252 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2253 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2254
2255 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2256 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2257 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2258 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2259 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2260 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2261 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2262 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2263 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2264 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2265 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2266 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2267 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2268 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2269 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2270 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2271 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2272 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2273 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2274 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2275 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2276 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2277 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2278 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2279 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2280 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2281 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2282 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2283 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2284 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2285 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2286 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2287 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2288 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2289 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2290 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2291 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2292 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2293 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2294 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2295 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2296 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2297 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2298 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2299 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2300 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2301 MSM_RPM_MAP(NCP_0, NCP, 2),
2302 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2303 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2304 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002305 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002306
2307};
2308unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2309
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002310struct platform_device msm_rpm_device = {
2311 .name = "msm_rpm",
2312 .id = -1,
2313};
2314
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002315static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2316 .phys_addr_base = 0x0010D204,
2317 .phys_size = SZ_8K,
2318};
2319
2320struct platform_device msm_rpm_stat_device = {
2321 .name = "msm_rpm_stat",
2322 .id = -1,
2323 .dev = {
2324 .platform_data = &msm_rpm_stat_pdata,
2325 },
2326};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002327
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002328struct platform_device msm_bus_sys_fabric = {
2329 .name = "msm_bus_fabric",
2330 .id = MSM_BUS_FAB_SYSTEM,
2331};
2332struct platform_device msm_bus_apps_fabric = {
2333 .name = "msm_bus_fabric",
2334 .id = MSM_BUS_FAB_APPSS,
2335};
2336struct platform_device msm_bus_mm_fabric = {
2337 .name = "msm_bus_fabric",
2338 .id = MSM_BUS_FAB_MMSS,
2339};
2340struct platform_device msm_bus_sys_fpb = {
2341 .name = "msm_bus_fabric",
2342 .id = MSM_BUS_FAB_SYSTEM_FPB,
2343};
2344struct platform_device msm_bus_cpss_fpb = {
2345 .name = "msm_bus_fabric",
2346 .id = MSM_BUS_FAB_CPSS_FPB,
2347};
2348
2349/* Sensors DSPS platform data */
2350#ifdef CONFIG_MSM_DSPS
2351
2352#define PPSS_REG_PHYS_BASE 0x12080000
2353
2354static struct dsps_clk_info dsps_clks[] = {};
2355static struct dsps_regulator_info dsps_regs[] = {};
2356
2357/*
2358 * Note: GPIOs field is intialized in run-time at the function
2359 * msm8960_init_dsps().
2360 */
2361
2362struct msm_dsps_platform_data msm_dsps_pdata = {
2363 .clks = dsps_clks,
2364 .clks_num = ARRAY_SIZE(dsps_clks),
2365 .gpios = NULL,
2366 .gpios_num = 0,
2367 .regs = dsps_regs,
2368 .regs_num = ARRAY_SIZE(dsps_regs),
2369 .dsps_pwr_ctl_en = 1,
2370 .signature = DSPS_SIGNATURE,
2371};
2372
2373static struct resource msm_dsps_resources[] = {
2374 {
2375 .start = PPSS_REG_PHYS_BASE,
2376 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2377 .name = "ppss_reg",
2378 .flags = IORESOURCE_MEM,
2379 },
Wentao Xua55500b2011-08-16 18:15:04 -04002380
2381 {
2382 .start = PPSS_WDOG_TIMER_IRQ,
2383 .end = PPSS_WDOG_TIMER_IRQ,
2384 .name = "ppss_wdog",
2385 .flags = IORESOURCE_IRQ,
2386 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002387};
2388
2389struct platform_device msm_dsps_device = {
2390 .name = "msm_dsps",
2391 .id = 0,
2392 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2393 .resource = msm_dsps_resources,
2394 .dev.platform_data = &msm_dsps_pdata,
2395};
2396
2397#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002398
2399#ifdef CONFIG_MSM_QDSS
2400
2401#define MSM_QDSS_PHYS_BASE 0x01A00000
2402#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2403#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2404#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002405#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002406#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2407
2408static struct resource msm_etb_resources[] = {
2409 {
2410 .start = MSM_ETB_PHYS_BASE,
2411 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2412 .flags = IORESOURCE_MEM,
2413 },
2414};
2415
2416struct platform_device msm_etb_device = {
2417 .name = "msm_etb",
2418 .id = 0,
2419 .num_resources = ARRAY_SIZE(msm_etb_resources),
2420 .resource = msm_etb_resources,
2421};
2422
2423static struct resource msm_tpiu_resources[] = {
2424 {
2425 .start = MSM_TPIU_PHYS_BASE,
2426 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2427 .flags = IORESOURCE_MEM,
2428 },
2429};
2430
2431struct platform_device msm_tpiu_device = {
2432 .name = "msm_tpiu",
2433 .id = 0,
2434 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2435 .resource = msm_tpiu_resources,
2436};
2437
2438static struct resource msm_funnel_resources[] = {
2439 {
2440 .start = MSM_FUNNEL_PHYS_BASE,
2441 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2442 .flags = IORESOURCE_MEM,
2443 },
2444};
2445
2446struct platform_device msm_funnel_device = {
2447 .name = "msm_funnel",
2448 .id = 0,
2449 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2450 .resource = msm_funnel_resources,
2451};
2452
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002453static struct resource msm_debug_resources[] = {
2454 {
2455 .start = MSM_DEBUG_PHYS_BASE,
2456 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2457 .flags = IORESOURCE_MEM,
2458 },
2459 {
2460 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2461 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2462 .flags = IORESOURCE_MEM,
2463 },
2464};
2465
2466struct platform_device msm_debug_device = {
2467 .name = "msm_debug",
2468 .id = 0,
2469 .num_resources = ARRAY_SIZE(msm_debug_resources),
2470 .resource = msm_debug_resources,
2471};
2472
Pratik Patel7831c082011-06-08 21:44:37 -07002473static struct resource msm_ptm_resources[] = {
2474 {
2475 .start = MSM_PTM_PHYS_BASE,
2476 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2477 .flags = IORESOURCE_MEM,
2478 },
2479};
2480
2481struct platform_device msm_ptm_device = {
2482 .name = "msm_ptm",
2483 .id = 0,
2484 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2485 .resource = msm_ptm_resources,
2486};
2487
2488#endif