blob: edaa00815ecb6cd1612eeac57b28852eaa2d2cd3 [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>
18#include <linux/gpio.h>
19#include <asm/clkdev.h>
20#include <linux/msm_kgsl.h>
21#include <linux/android_pmem.h>
22#include <mach/irqs-8960.h>
Mayank Rana9f51f582011-08-04 18:35:59 +053023#include <mach/dma.h>
24#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070025#include <mach/board.h>
26#include <mach/msm_iomap.h>
27#include <mach/msm_hsusb.h>
28#include <mach/msm_sps.h>
29#include <mach/rpm.h>
30#include <mach/msm_bus_board.h>
31#include <mach/msm_memtypes.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070032#include <sound/msm-dai-q6.h>
33#include <sound/apr_audio.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070034#include "clock.h"
35#include "devices.h"
36#include "devices-msm8x60.h"
37#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070038#include "msm_watchdog.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060039#include "rpm_stats.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070040
41#ifdef CONFIG_MSM_MPM
42#include "mpm.h"
43#endif
44#ifdef CONFIG_MSM_DSPS
45#include <mach/msm_dsps.h>
46#endif
47
48
49/* Address of GSBI blocks */
50#define MSM_GSBI1_PHYS 0x16000000
51#define MSM_GSBI2_PHYS 0x16100000
52#define MSM_GSBI3_PHYS 0x16200000
53#define MSM_GSBI4_PHYS 0x16300000
54#define MSM_GSBI5_PHYS 0x16400000
55#define MSM_GSBI6_PHYS 0x16500000
56#define MSM_GSBI7_PHYS 0x16600000
57#define MSM_GSBI8_PHYS 0x1A000000
58#define MSM_GSBI9_PHYS 0x1A100000
59#define MSM_GSBI10_PHYS 0x1A200000
60#define MSM_GSBI11_PHYS 0x12440000
61#define MSM_GSBI12_PHYS 0x12480000
62
63#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
64#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053065#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070066
67/* GSBI QUP devices */
68#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
69#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
70#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
71#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
72#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
73#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
74#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
75#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
76#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
77#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
78#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
79#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
80#define MSM_QUP_SIZE SZ_4K
81
82#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
83#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
84#define MSM_PMIC_SSBI_SIZE SZ_4K
85
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070086#define MSM8960_HSUSB_PHYS 0x12500000
87#define MSM8960_HSUSB_SIZE SZ_4K
88
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070089static struct resource resources_otg[] = {
90 {
91 .start = MSM8960_HSUSB_PHYS,
92 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
93 .flags = IORESOURCE_MEM,
94 },
95 {
96 .start = USB1_HS_IRQ,
97 .end = USB1_HS_IRQ,
98 .flags = IORESOURCE_IRQ,
99 },
100};
101
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700102struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700103 .name = "msm_otg",
104 .id = -1,
105 .num_resources = ARRAY_SIZE(resources_otg),
106 .resource = resources_otg,
107 .dev = {
108 .coherent_dma_mask = 0xffffffff,
109 },
110};
111
112static struct resource resources_hsusb[] = {
113 {
114 .start = MSM8960_HSUSB_PHYS,
115 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
116 .flags = IORESOURCE_MEM,
117 },
118 {
119 .start = USB1_HS_IRQ,
120 .end = USB1_HS_IRQ,
121 .flags = IORESOURCE_IRQ,
122 },
123};
124
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700125struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700126 .name = "msm_hsusb",
127 .id = -1,
128 .num_resources = ARRAY_SIZE(resources_hsusb),
129 .resource = resources_hsusb,
130 .dev = {
131 .coherent_dma_mask = 0xffffffff,
132 },
133};
134
135static struct resource resources_hsusb_host[] = {
136 {
137 .start = MSM8960_HSUSB_PHYS,
138 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
139 .flags = IORESOURCE_MEM,
140 },
141 {
142 .start = USB1_HS_IRQ,
143 .end = USB1_HS_IRQ,
144 .flags = IORESOURCE_IRQ,
145 },
146};
147
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530148static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700149struct platform_device msm_device_hsusb_host = {
150 .name = "msm_hsusb_host",
151 .id = -1,
152 .num_resources = ARRAY_SIZE(resources_hsusb_host),
153 .resource = resources_hsusb_host,
154 .dev = {
155 .dma_mask = &dma_mask,
156 .coherent_dma_mask = 0xffffffff,
157 },
158};
159
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530160static struct resource resources_hsic_host[] = {
161 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700162 .start = 0x12520000,
163 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530164 .flags = IORESOURCE_MEM,
165 },
166 {
167 .start = USB_HSIC_IRQ,
168 .end = USB_HSIC_IRQ,
169 .flags = IORESOURCE_IRQ,
170 },
171};
172
173struct platform_device msm_device_hsic_host = {
174 .name = "msm_hsic_host",
175 .id = -1,
176 .num_resources = ARRAY_SIZE(resources_hsic_host),
177 .resource = resources_hsic_host,
178 .dev = {
179 .dma_mask = &dma_mask,
180 .coherent_dma_mask = DMA_BIT_MASK(32),
181 },
182};
183
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700184static struct resource resources_uart_gsbi2[] = {
185 {
186 .start = MSM8960_GSBI2_UARTDM_IRQ,
187 .end = MSM8960_GSBI2_UARTDM_IRQ,
188 .flags = IORESOURCE_IRQ,
189 },
190 {
191 .start = MSM_UART2DM_PHYS,
192 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
193 .name = "uartdm_resource",
194 .flags = IORESOURCE_MEM,
195 },
196 {
197 .start = MSM_GSBI2_PHYS,
198 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
199 .name = "gsbi_resource",
200 .flags = IORESOURCE_MEM,
201 },
202};
203
204struct platform_device msm8960_device_uart_gsbi2 = {
205 .name = "msm_serial_hsl",
206 .id = 0,
207 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
208 .resource = resources_uart_gsbi2,
209};
Mayank Rana9f51f582011-08-04 18:35:59 +0530210/* GSBI 6 used into UARTDM Mode */
211static struct resource msm_uart_dm6_resources[] = {
212 {
213 .start = MSM_UART6DM_PHYS,
214 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
215 .name = "uartdm_resource",
216 .flags = IORESOURCE_MEM,
217 },
218 {
219 .start = GSBI6_UARTDM_IRQ,
220 .end = GSBI6_UARTDM_IRQ,
221 .flags = IORESOURCE_IRQ,
222 },
223 {
224 .start = MSM_GSBI6_PHYS,
225 .end = MSM_GSBI6_PHYS + 4 - 1,
226 .name = "gsbi_resource",
227 .flags = IORESOURCE_MEM,
228 },
229 {
230 .start = DMOV_HSUART_GSBI6_TX_CHAN,
231 .end = DMOV_HSUART_GSBI6_RX_CHAN,
232 .name = "uartdm_channels",
233 .flags = IORESOURCE_DMA,
234 },
235 {
236 .start = DMOV_HSUART_GSBI6_TX_CRCI,
237 .end = DMOV_HSUART_GSBI6_RX_CRCI,
238 .name = "uartdm_crci",
239 .flags = IORESOURCE_DMA,
240 },
241};
242static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
243struct platform_device msm_device_uart_dm6 = {
244 .name = "msm_serial_hs",
245 .id = 0,
246 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
247 .resource = msm_uart_dm6_resources,
248 .dev = {
249 .dma_mask = &msm_uart_dm6_dma_mask,
250 .coherent_dma_mask = DMA_BIT_MASK(32),
251 },
252};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700253
254static struct resource resources_uart_gsbi5[] = {
255 {
256 .start = GSBI5_UARTDM_IRQ,
257 .end = GSBI5_UARTDM_IRQ,
258 .flags = IORESOURCE_IRQ,
259 },
260 {
261 .start = MSM_UART5DM_PHYS,
262 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
263 .name = "uartdm_resource",
264 .flags = IORESOURCE_MEM,
265 },
266 {
267 .start = MSM_GSBI5_PHYS,
268 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
269 .name = "gsbi_resource",
270 .flags = IORESOURCE_MEM,
271 },
272};
273
274struct platform_device msm8960_device_uart_gsbi5 = {
275 .name = "msm_serial_hsl",
276 .id = 0,
277 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
278 .resource = resources_uart_gsbi5,
279};
280/* MSM Video core device */
281#ifdef CONFIG_MSM_BUS_SCALING
282static struct msm_bus_vectors vidc_init_vectors[] = {
283 {
284 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
285 .dst = MSM_BUS_SLAVE_EBI_CH0,
286 .ab = 0,
287 .ib = 0,
288 },
289 {
290 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
291 .dst = MSM_BUS_SLAVE_EBI_CH0,
292 .ab = 0,
293 .ib = 0,
294 },
295 {
296 .src = MSM_BUS_MASTER_AMPSS_M0,
297 .dst = MSM_BUS_SLAVE_EBI_CH0,
298 .ab = 0,
299 .ib = 0,
300 },
301 {
302 .src = MSM_BUS_MASTER_AMPSS_M0,
303 .dst = MSM_BUS_SLAVE_EBI_CH0,
304 .ab = 0,
305 .ib = 0,
306 },
307};
308static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
309 {
310 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
311 .dst = MSM_BUS_SLAVE_EBI_CH0,
312 .ab = 54525952,
313 .ib = 436207616,
314 },
315 {
316 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
317 .dst = MSM_BUS_SLAVE_EBI_CH0,
318 .ab = 72351744,
319 .ib = 289406976,
320 },
321 {
322 .src = MSM_BUS_MASTER_AMPSS_M0,
323 .dst = MSM_BUS_SLAVE_EBI_CH0,
324 .ab = 500000,
325 .ib = 1000000,
326 },
327 {
328 .src = MSM_BUS_MASTER_AMPSS_M0,
329 .dst = MSM_BUS_SLAVE_EBI_CH0,
330 .ab = 500000,
331 .ib = 1000000,
332 },
333};
334static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
335 {
336 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
337 .dst = MSM_BUS_SLAVE_EBI_CH0,
338 .ab = 40894464,
339 .ib = 327155712,
340 },
341 {
342 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
343 .dst = MSM_BUS_SLAVE_EBI_CH0,
344 .ab = 48234496,
345 .ib = 192937984,
346 },
347 {
348 .src = MSM_BUS_MASTER_AMPSS_M0,
349 .dst = MSM_BUS_SLAVE_EBI_CH0,
350 .ab = 500000,
351 .ib = 2000000,
352 },
353 {
354 .src = MSM_BUS_MASTER_AMPSS_M0,
355 .dst = MSM_BUS_SLAVE_EBI_CH0,
356 .ab = 500000,
357 .ib = 2000000,
358 },
359};
360static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
361 {
362 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
363 .dst = MSM_BUS_SLAVE_EBI_CH0,
364 .ab = 163577856,
365 .ib = 1308622848,
366 },
367 {
368 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
369 .dst = MSM_BUS_SLAVE_EBI_CH0,
370 .ab = 219152384,
371 .ib = 876609536,
372 },
373 {
374 .src = MSM_BUS_MASTER_AMPSS_M0,
375 .dst = MSM_BUS_SLAVE_EBI_CH0,
376 .ab = 1750000,
377 .ib = 3500000,
378 },
379 {
380 .src = MSM_BUS_MASTER_AMPSS_M0,
381 .dst = MSM_BUS_SLAVE_EBI_CH0,
382 .ab = 1750000,
383 .ib = 3500000,
384 },
385};
386static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
387 {
388 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
389 .dst = MSM_BUS_SLAVE_EBI_CH0,
390 .ab = 121634816,
391 .ib = 973078528,
392 },
393 {
394 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
395 .dst = MSM_BUS_SLAVE_EBI_CH0,
396 .ab = 155189248,
397 .ib = 620756992,
398 },
399 {
400 .src = MSM_BUS_MASTER_AMPSS_M0,
401 .dst = MSM_BUS_SLAVE_EBI_CH0,
402 .ab = 1750000,
403 .ib = 7000000,
404 },
405 {
406 .src = MSM_BUS_MASTER_AMPSS_M0,
407 .dst = MSM_BUS_SLAVE_EBI_CH0,
408 .ab = 1750000,
409 .ib = 7000000,
410 },
411};
412static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
413 {
414 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
415 .dst = MSM_BUS_SLAVE_EBI_CH0,
416 .ab = 372244480,
417 .ib = 1861222400,
418 },
419 {
420 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
421 .dst = MSM_BUS_SLAVE_EBI_CH0,
422 .ab = 501219328,
423 .ib = 2004877312,
424 },
425 {
426 .src = MSM_BUS_MASTER_AMPSS_M0,
427 .dst = MSM_BUS_SLAVE_EBI_CH0,
428 .ab = 2500000,
429 .ib = 5000000,
430 },
431 {
432 .src = MSM_BUS_MASTER_AMPSS_M0,
433 .dst = MSM_BUS_SLAVE_EBI_CH0,
434 .ab = 2500000,
435 .ib = 5000000,
436 },
437};
438static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
439 {
440 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
441 .dst = MSM_BUS_SLAVE_EBI_CH0,
442 .ab = 222298112,
443 .ib = 1778384896,
444 },
445 {
446 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
447 .dst = MSM_BUS_SLAVE_EBI_CH0,
448 .ab = 330301440,
449 .ib = 1321205760,
450 },
451 {
452 .src = MSM_BUS_MASTER_AMPSS_M0,
453 .dst = MSM_BUS_SLAVE_EBI_CH0,
454 .ab = 2500000,
455 .ib = 700000000,
456 },
457 {
458 .src = MSM_BUS_MASTER_AMPSS_M0,
459 .dst = MSM_BUS_SLAVE_EBI_CH0,
460 .ab = 2500000,
461 .ib = 10000000,
462 },
463};
464
465static struct msm_bus_paths vidc_bus_client_config[] = {
466 {
467 ARRAY_SIZE(vidc_init_vectors),
468 vidc_init_vectors,
469 },
470 {
471 ARRAY_SIZE(vidc_venc_vga_vectors),
472 vidc_venc_vga_vectors,
473 },
474 {
475 ARRAY_SIZE(vidc_vdec_vga_vectors),
476 vidc_vdec_vga_vectors,
477 },
478 {
479 ARRAY_SIZE(vidc_venc_720p_vectors),
480 vidc_venc_720p_vectors,
481 },
482 {
483 ARRAY_SIZE(vidc_vdec_720p_vectors),
484 vidc_vdec_720p_vectors,
485 },
486 {
487 ARRAY_SIZE(vidc_venc_1080p_vectors),
488 vidc_venc_1080p_vectors,
489 },
490 {
491 ARRAY_SIZE(vidc_vdec_1080p_vectors),
492 vidc_vdec_1080p_vectors,
493 },
494};
495
496static struct msm_bus_scale_pdata vidc_bus_client_data = {
497 vidc_bus_client_config,
498 ARRAY_SIZE(vidc_bus_client_config),
499 .name = "vidc",
500};
501#endif
502
Mona Hossain9c430e32011-07-27 11:04:47 -0700503#ifdef CONFIG_HW_RANDOM_MSM
504/* PRNG device */
505#define MSM_PRNG_PHYS 0x1A500000
506static struct resource rng_resources = {
507 .flags = IORESOURCE_MEM,
508 .start = MSM_PRNG_PHYS,
509 .end = MSM_PRNG_PHYS + SZ_512 - 1,
510};
511
512struct platform_device msm_device_rng = {
513 .name = "msm_rng",
514 .id = 0,
515 .num_resources = 1,
516 .resource = &rng_resources,
517};
518#endif
519
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700520#define MSM_VIDC_BASE_PHYS 0x04400000
521#define MSM_VIDC_BASE_SIZE 0x00100000
522
523static struct resource msm_device_vidc_resources[] = {
524 {
525 .start = MSM_VIDC_BASE_PHYS,
526 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
527 .flags = IORESOURCE_MEM,
528 },
529 {
530 .start = VCODEC_IRQ,
531 .end = VCODEC_IRQ,
532 .flags = IORESOURCE_IRQ,
533 },
534};
535
536struct msm_vidc_platform_data vidc_platform_data = {
537#ifdef CONFIG_MSM_BUS_SCALING
538 .vidc_bus_client_pdata = &vidc_bus_client_data,
539#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700540 .memtype = MEMTYPE_EBI1,
541#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
542 .enable_ion = 1,
543#else
544 .enable_ion = 0,
545#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700546};
547
548struct platform_device msm_device_vidc = {
549 .name = "msm_vidc",
550 .id = 0,
551 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
552 .resource = msm_device_vidc_resources,
553 .dev = {
554 .platform_data = &vidc_platform_data,
555 },
556};
557
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700558#define MSM_SDC1_BASE 0x12400000
559#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
560#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
561#define MSM_SDC2_BASE 0x12140000
562#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
563#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
564#define MSM_SDC2_BASE 0x12140000
565#define MSM_SDC3_BASE 0x12180000
566#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
567#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
568#define MSM_SDC4_BASE 0x121C0000
569#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
570#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
571#define MSM_SDC5_BASE 0x12200000
572#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
573#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
574
575static struct resource resources_sdc1[] = {
576 {
577 .name = "core_mem",
578 .flags = IORESOURCE_MEM,
579 .start = MSM_SDC1_BASE,
580 .end = MSM_SDC1_DML_BASE - 1,
581 },
582 {
583 .name = "core_irq",
584 .flags = IORESOURCE_IRQ,
585 .start = SDC1_IRQ_0,
586 .end = SDC1_IRQ_0
587 },
588#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
589 {
590 .name = "sdcc_dml_addr",
591 .start = MSM_SDC1_DML_BASE,
592 .end = MSM_SDC1_BAM_BASE - 1,
593 .flags = IORESOURCE_MEM,
594 },
595 {
596 .name = "sdcc_bam_addr",
597 .start = MSM_SDC1_BAM_BASE,
598 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
599 .flags = IORESOURCE_MEM,
600 },
601 {
602 .name = "sdcc_bam_irq",
603 .start = SDC1_BAM_IRQ,
604 .end = SDC1_BAM_IRQ,
605 .flags = IORESOURCE_IRQ,
606 },
607#endif
608};
609
610static struct resource resources_sdc2[] = {
611 {
612 .name = "core_mem",
613 .flags = IORESOURCE_MEM,
614 .start = MSM_SDC2_BASE,
615 .end = MSM_SDC2_DML_BASE - 1,
616 },
617 {
618 .name = "core_irq",
619 .flags = IORESOURCE_IRQ,
620 .start = SDC2_IRQ_0,
621 .end = SDC2_IRQ_0
622 },
623#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
624 {
625 .name = "sdcc_dml_addr",
626 .start = MSM_SDC2_DML_BASE,
627 .end = MSM_SDC2_BAM_BASE - 1,
628 .flags = IORESOURCE_MEM,
629 },
630 {
631 .name = "sdcc_bam_addr",
632 .start = MSM_SDC2_BAM_BASE,
633 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
634 .flags = IORESOURCE_MEM,
635 },
636 {
637 .name = "sdcc_bam_irq",
638 .start = SDC2_BAM_IRQ,
639 .end = SDC2_BAM_IRQ,
640 .flags = IORESOURCE_IRQ,
641 },
642#endif
643};
644
645static struct resource resources_sdc3[] = {
646 {
647 .name = "core_mem",
648 .flags = IORESOURCE_MEM,
649 .start = MSM_SDC3_BASE,
650 .end = MSM_SDC3_DML_BASE - 1,
651 },
652 {
653 .name = "core_irq",
654 .flags = IORESOURCE_IRQ,
655 .start = SDC3_IRQ_0,
656 .end = SDC3_IRQ_0
657 },
658#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
659 {
660 .name = "sdcc_dml_addr",
661 .start = MSM_SDC3_DML_BASE,
662 .end = MSM_SDC3_BAM_BASE - 1,
663 .flags = IORESOURCE_MEM,
664 },
665 {
666 .name = "sdcc_bam_addr",
667 .start = MSM_SDC3_BAM_BASE,
668 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
669 .flags = IORESOURCE_MEM,
670 },
671 {
672 .name = "sdcc_bam_irq",
673 .start = SDC3_BAM_IRQ,
674 .end = SDC3_BAM_IRQ,
675 .flags = IORESOURCE_IRQ,
676 },
677#endif
678};
679
680static struct resource resources_sdc4[] = {
681 {
682 .name = "core_mem",
683 .flags = IORESOURCE_MEM,
684 .start = MSM_SDC4_BASE,
685 .end = MSM_SDC4_DML_BASE - 1,
686 },
687 {
688 .name = "core_irq",
689 .flags = IORESOURCE_IRQ,
690 .start = SDC4_IRQ_0,
691 .end = SDC4_IRQ_0
692 },
693#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
694 {
695 .name = "sdcc_dml_addr",
696 .start = MSM_SDC4_DML_BASE,
697 .end = MSM_SDC4_BAM_BASE - 1,
698 .flags = IORESOURCE_MEM,
699 },
700 {
701 .name = "sdcc_bam_addr",
702 .start = MSM_SDC4_BAM_BASE,
703 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
704 .flags = IORESOURCE_MEM,
705 },
706 {
707 .name = "sdcc_bam_irq",
708 .start = SDC4_BAM_IRQ,
709 .end = SDC4_BAM_IRQ,
710 .flags = IORESOURCE_IRQ,
711 },
712#endif
713};
714
715static struct resource resources_sdc5[] = {
716 {
717 .name = "core_mem",
718 .flags = IORESOURCE_MEM,
719 .start = MSM_SDC5_BASE,
720 .end = MSM_SDC5_DML_BASE - 1,
721 },
722 {
723 .name = "core_irq",
724 .flags = IORESOURCE_IRQ,
725 .start = SDC5_IRQ_0,
726 .end = SDC5_IRQ_0
727 },
728#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
729 {
730 .name = "sdcc_dml_addr",
731 .start = MSM_SDC5_DML_BASE,
732 .end = MSM_SDC5_BAM_BASE - 1,
733 .flags = IORESOURCE_MEM,
734 },
735 {
736 .name = "sdcc_bam_addr",
737 .start = MSM_SDC5_BAM_BASE,
738 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
739 .flags = IORESOURCE_MEM,
740 },
741 {
742 .name = "sdcc_bam_irq",
743 .start = SDC5_BAM_IRQ,
744 .end = SDC5_BAM_IRQ,
745 .flags = IORESOURCE_IRQ,
746 },
747#endif
748};
749
750struct platform_device msm_device_sdc1 = {
751 .name = "msm_sdcc",
752 .id = 1,
753 .num_resources = ARRAY_SIZE(resources_sdc1),
754 .resource = resources_sdc1,
755 .dev = {
756 .coherent_dma_mask = 0xffffffff,
757 },
758};
759
760struct platform_device msm_device_sdc2 = {
761 .name = "msm_sdcc",
762 .id = 2,
763 .num_resources = ARRAY_SIZE(resources_sdc2),
764 .resource = resources_sdc2,
765 .dev = {
766 .coherent_dma_mask = 0xffffffff,
767 },
768};
769
770struct platform_device msm_device_sdc3 = {
771 .name = "msm_sdcc",
772 .id = 3,
773 .num_resources = ARRAY_SIZE(resources_sdc3),
774 .resource = resources_sdc3,
775 .dev = {
776 .coherent_dma_mask = 0xffffffff,
777 },
778};
779
780struct platform_device msm_device_sdc4 = {
781 .name = "msm_sdcc",
782 .id = 4,
783 .num_resources = ARRAY_SIZE(resources_sdc4),
784 .resource = resources_sdc4,
785 .dev = {
786 .coherent_dma_mask = 0xffffffff,
787 },
788};
789
790struct platform_device msm_device_sdc5 = {
791 .name = "msm_sdcc",
792 .id = 5,
793 .num_resources = ARRAY_SIZE(resources_sdc5),
794 .resource = resources_sdc5,
795 .dev = {
796 .coherent_dma_mask = 0xffffffff,
797 },
798};
799
800struct platform_device msm_device_smd = {
801 .name = "msm_smd",
802 .id = -1,
803};
804
805struct platform_device msm_device_bam_dmux = {
806 .name = "BAM_RMNT",
807 .id = -1,
808};
809
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700810static struct msm_watchdog_pdata msm_watchdog_pdata = {
811 .pet_time = 10000,
812 .bark_time = 11000,
813 .has_secure = true,
814};
815
816struct platform_device msm8960_device_watchdog = {
817 .name = "msm_watchdog",
818 .id = -1,
819 .dev = {
820 .platform_data = &msm_watchdog_pdata,
821 },
822};
823
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700824static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700825 {
826 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700827 .flags = IORESOURCE_IRQ,
828 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700829 {
830 .start = 0x18320000,
831 .end = 0x18320000 + SZ_1M - 1,
832 .flags = IORESOURCE_MEM,
833 },
834};
835
836static struct msm_dmov_pdata msm_dmov_pdata = {
837 .sd = 1,
838 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700839};
840
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700841struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700842 .name = "msm_dmov",
843 .id = -1,
844 .resource = msm_dmov_resource,
845 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700846 .dev = {
847 .platform_data = &msm_dmov_pdata,
848 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700849};
850
851static struct platform_device *msm_sdcc_devices[] __initdata = {
852 &msm_device_sdc1,
853 &msm_device_sdc2,
854 &msm_device_sdc3,
855 &msm_device_sdc4,
856 &msm_device_sdc5,
857};
858
859int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
860{
861 struct platform_device *pdev;
862
863 if (controller < 1 || controller > 5)
864 return -EINVAL;
865
866 pdev = msm_sdcc_devices[controller-1];
867 pdev->dev.platform_data = plat;
868 return platform_device_register(pdev);
869}
870
871static struct resource resources_qup_i2c_gsbi4[] = {
872 {
873 .name = "gsbi_qup_i2c_addr",
874 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600875 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700876 .flags = IORESOURCE_MEM,
877 },
878 {
879 .name = "qup_phys_addr",
880 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600881 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700882 .flags = IORESOURCE_MEM,
883 },
884 {
885 .name = "qup_err_intr",
886 .start = GSBI4_QUP_IRQ,
887 .end = GSBI4_QUP_IRQ,
888 .flags = IORESOURCE_IRQ,
889 },
890};
891
892struct platform_device msm8960_device_qup_i2c_gsbi4 = {
893 .name = "qup_i2c",
894 .id = 4,
895 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
896 .resource = resources_qup_i2c_gsbi4,
897};
898
899static struct resource resources_qup_i2c_gsbi3[] = {
900 {
901 .name = "gsbi_qup_i2c_addr",
902 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600903 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700904 .flags = IORESOURCE_MEM,
905 },
906 {
907 .name = "qup_phys_addr",
908 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600909 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700910 .flags = IORESOURCE_MEM,
911 },
912 {
913 .name = "qup_err_intr",
914 .start = GSBI3_QUP_IRQ,
915 .end = GSBI3_QUP_IRQ,
916 .flags = IORESOURCE_IRQ,
917 },
918};
919
920struct platform_device msm8960_device_qup_i2c_gsbi3 = {
921 .name = "qup_i2c",
922 .id = 3,
923 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
924 .resource = resources_qup_i2c_gsbi3,
925};
926
927static struct resource resources_qup_i2c_gsbi10[] = {
928 {
929 .name = "gsbi_qup_i2c_addr",
930 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600931 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700932 .flags = IORESOURCE_MEM,
933 },
934 {
935 .name = "qup_phys_addr",
936 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600937 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700938 .flags = IORESOURCE_MEM,
939 },
940 {
941 .name = "qup_err_intr",
942 .start = GSBI10_QUP_IRQ,
943 .end = GSBI10_QUP_IRQ,
944 .flags = IORESOURCE_IRQ,
945 },
946};
947
948struct platform_device msm8960_device_qup_i2c_gsbi10 = {
949 .name = "qup_i2c",
950 .id = 10,
951 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
952 .resource = resources_qup_i2c_gsbi10,
953};
954
955static struct resource resources_qup_i2c_gsbi12[] = {
956 {
957 .name = "gsbi_qup_i2c_addr",
958 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600959 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700960 .flags = IORESOURCE_MEM,
961 },
962 {
963 .name = "qup_phys_addr",
964 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600965 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700966 .flags = IORESOURCE_MEM,
967 },
968 {
969 .name = "qup_err_intr",
970 .start = GSBI12_QUP_IRQ,
971 .end = GSBI12_QUP_IRQ,
972 .flags = IORESOURCE_IRQ,
973 },
974};
975
976struct platform_device msm8960_device_qup_i2c_gsbi12 = {
977 .name = "qup_i2c",
978 .id = 12,
979 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
980 .resource = resources_qup_i2c_gsbi12,
981};
982
983#ifdef CONFIG_MSM_CAMERA
984struct resource msm_camera_resources[] = {
985 {
Mingcheng Zhu8e9f99e2011-08-26 16:33:32 -0700986 .name = "vpe",
987 .start = 0x05300000,
988 .end = 0x05300000 + SZ_1M - 1,
989 .flags = IORESOURCE_MEM,
990 },
991 {
992 .name = "vpe",
993 .start = VPE_IRQ,
994 .end = VPE_IRQ,
995 .flags = IORESOURCE_IRQ,
996 },
997 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700998 .name = "vid_buf",
999 .flags = IORESOURCE_DMA,
1000 },
1001 {
Nishant Pandit24153d82011-08-27 16:05:13 +05301002 .name = "s3d_rw",
1003 .start = 0x008003E0,
1004 .end = 0x008003E0 + SZ_16 - 1,
1005 .flags = IORESOURCE_MEM,
1006 },
1007 {
1008 .name = "s3d_ctl",
1009 .start = 0x008020B8,
1010 .end = 0x008020B8 + SZ_16 - 1,
1011 .flags = IORESOURCE_MEM,
1012 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001013};
1014
1015int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1016{
1017 s_info->resource = msm_camera_resources;
1018 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1019 return 0;
1020}
Kevin Chanf6216f22011-10-25 18:40:11 -07001021
1022static struct resource msm_csiphy0_resources[] = {
1023 {
1024 .name = "csiphy",
1025 .start = 0x04800C00,
1026 .end = 0x04800C00 + SZ_1K - 1,
1027 .flags = IORESOURCE_MEM,
1028 },
1029 {
1030 .name = "csiphy",
1031 .start = CSIPHY_4LN_IRQ,
1032 .end = CSIPHY_4LN_IRQ,
1033 .flags = IORESOURCE_IRQ,
1034 },
1035};
1036
1037static struct resource msm_csiphy1_resources[] = {
1038 {
1039 .name = "csiphy",
1040 .start = 0x04801000,
1041 .end = 0x04801000 + SZ_1K - 1,
1042 .flags = IORESOURCE_MEM,
1043 },
1044 {
1045 .name = "csiphy",
1046 .start = MSM8960_CSIPHY_2LN_IRQ,
1047 .end = MSM8960_CSIPHY_2LN_IRQ,
1048 .flags = IORESOURCE_IRQ,
1049 },
1050};
1051
1052struct platform_device msm8960_device_csiphy0 = {
1053 .name = "msm_csiphy",
1054 .id = 0,
1055 .resource = msm_csiphy0_resources,
1056 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1057};
1058
1059struct platform_device msm8960_device_csiphy1 = {
1060 .name = "msm_csiphy",
1061 .id = 1,
1062 .resource = msm_csiphy1_resources,
1063 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1064};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001065
1066static struct resource msm_csid0_resources[] = {
1067 {
1068 .name = "csid",
1069 .start = 0x04800000,
1070 .end = 0x04800000 + SZ_1K - 1,
1071 .flags = IORESOURCE_MEM,
1072 },
1073 {
1074 .name = "csid",
1075 .start = CSI_0_IRQ,
1076 .end = CSI_0_IRQ,
1077 .flags = IORESOURCE_IRQ,
1078 },
1079};
1080
1081static struct resource msm_csid1_resources[] = {
1082 {
1083 .name = "csid",
1084 .start = 0x04800400,
1085 .end = 0x04800400 + SZ_1K - 1,
1086 .flags = IORESOURCE_MEM,
1087 },
1088 {
1089 .name = "csid",
1090 .start = CSI_1_IRQ,
1091 .end = CSI_1_IRQ,
1092 .flags = IORESOURCE_IRQ,
1093 },
1094};
1095
1096struct platform_device msm8960_device_csid0 = {
1097 .name = "msm_csid",
1098 .id = 0,
1099 .resource = msm_csid0_resources,
1100 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1101};
1102
1103struct platform_device msm8960_device_csid1 = {
1104 .name = "msm_csid",
1105 .id = 1,
1106 .resource = msm_csid1_resources,
1107 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1108};
Kevin Chane12c6672011-10-26 11:55:26 -07001109
1110struct resource msm_ispif_resources[] = {
1111 {
1112 .name = "ispif",
1113 .start = 0x04800800,
1114 .end = 0x04800800 + SZ_1K - 1,
1115 .flags = IORESOURCE_MEM,
1116 },
1117 {
1118 .name = "ispif",
1119 .start = ISPIF_IRQ,
1120 .end = ISPIF_IRQ,
1121 .flags = IORESOURCE_IRQ,
1122 },
1123};
1124
1125struct platform_device msm8960_device_ispif = {
1126 .name = "msm_ispif",
1127 .id = 0,
1128 .resource = msm_ispif_resources,
1129 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1130};
Kevin Chan5827c552011-10-28 18:36:32 -07001131
1132static struct resource msm_vfe_resources[] = {
1133 {
1134 .name = "vfe32",
1135 .start = 0x04500000,
1136 .end = 0x04500000 + SZ_1M - 1,
1137 .flags = IORESOURCE_MEM,
1138 },
1139 {
1140 .name = "vfe32",
1141 .start = VFE_IRQ,
1142 .end = VFE_IRQ,
1143 .flags = IORESOURCE_IRQ,
1144 },
1145};
1146
1147struct platform_device msm8960_device_vfe = {
1148 .name = "msm_vfe",
1149 .id = 0,
1150 .resource = msm_vfe_resources,
1151 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1152};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001153#endif
1154
1155static struct resource resources_ssbi_pm8921[] = {
1156 {
1157 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1158 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1159 .flags = IORESOURCE_MEM,
1160 },
1161};
1162
1163struct platform_device msm8960_device_ssbi_pm8921 = {
1164 .name = "msm_ssbi",
1165 .id = 0,
1166 .resource = resources_ssbi_pm8921,
1167 .num_resources = ARRAY_SIZE(resources_ssbi_pm8921),
1168};
1169
1170static struct resource resources_qup_spi_gsbi1[] = {
1171 {
1172 .name = "spi_base",
1173 .start = MSM_GSBI1_QUP_PHYS,
1174 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1175 .flags = IORESOURCE_MEM,
1176 },
1177 {
1178 .name = "gsbi_base",
1179 .start = MSM_GSBI1_PHYS,
1180 .end = MSM_GSBI1_PHYS + 4 - 1,
1181 .flags = IORESOURCE_MEM,
1182 },
1183 {
1184 .name = "spi_irq_in",
1185 .start = MSM8960_GSBI1_QUP_IRQ,
1186 .end = MSM8960_GSBI1_QUP_IRQ,
1187 .flags = IORESOURCE_IRQ,
1188 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001189 {
1190 .name = "spi_clk",
1191 .start = 9,
1192 .end = 9,
1193 .flags = IORESOURCE_IO,
1194 },
1195 {
1196 .name = "spi_cs",
1197 .start = 8,
1198 .end = 8,
1199 .flags = IORESOURCE_IO,
1200 },
1201 {
Chandan Uddaraju15e54b92011-09-12 10:52:36 -07001202 .name = "spi_cs1",
1203 .start = 14,
1204 .end = 14,
1205 .flags = IORESOURCE_IO,
1206 },
1207 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001208 .name = "spi_miso",
1209 .start = 7,
1210 .end = 7,
1211 .flags = IORESOURCE_IO,
1212 },
1213 {
1214 .name = "spi_mosi",
1215 .start = 6,
1216 .end = 6,
1217 .flags = IORESOURCE_IO,
1218 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001219};
1220
1221struct platform_device msm8960_device_qup_spi_gsbi1 = {
1222 .name = "spi_qsd",
1223 .id = 0,
1224 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1225 .resource = resources_qup_spi_gsbi1,
1226};
1227
1228struct platform_device msm_pcm = {
1229 .name = "msm-pcm-dsp",
1230 .id = -1,
1231};
1232
1233struct platform_device msm_pcm_routing = {
1234 .name = "msm-pcm-routing",
1235 .id = -1,
1236};
1237
1238struct platform_device msm_cpudai0 = {
1239 .name = "msm-dai-q6",
1240 .id = 0x4000,
1241};
1242
1243struct platform_device msm_cpudai1 = {
1244 .name = "msm-dai-q6",
1245 .id = 0x4001,
1246};
1247
1248struct platform_device msm_cpudai_hdmi_rx = {
1249 .name = "msm-dai-q6",
1250 .id = 8,
1251};
1252
1253struct platform_device msm_cpudai_bt_rx = {
1254 .name = "msm-dai-q6",
1255 .id = 0x3000,
1256};
1257
1258struct platform_device msm_cpudai_bt_tx = {
1259 .name = "msm-dai-q6",
1260 .id = 0x3001,
1261};
1262
1263struct platform_device msm_cpudai_fm_rx = {
1264 .name = "msm-dai-q6",
1265 .id = 0x3004,
1266};
1267
1268struct platform_device msm_cpudai_fm_tx = {
1269 .name = "msm-dai-q6",
1270 .id = 0x3005,
1271};
1272
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001273/*
1274 * Machine specific data for AUX PCM Interface
1275 * which the driver will be unware of.
1276 */
1277struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1278 .clk = "pcm_clk",
1279 .mode = AFE_PCM_CFG_MODE_PCM,
1280 .sync = AFE_PCM_CFG_SYNC_INT,
1281 .frame = AFE_PCM_CFG_FRM_256BPF,
1282 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1283 .slot = 0,
1284 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1285 .pcm_clk_rate = 2048000,
1286};
1287
1288struct platform_device msm_cpudai_auxpcm_rx = {
1289 .name = "msm-dai-q6",
1290 .id = 2,
1291 .dev = {
1292 .platform_data = &auxpcm_rx_pdata,
1293 },
1294};
1295
1296struct platform_device msm_cpudai_auxpcm_tx = {
1297 .name = "msm-dai-q6",
1298 .id = 3,
1299};
1300
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001301struct platform_device msm_cpu_fe = {
1302 .name = "msm-dai-fe",
1303 .id = -1,
1304};
1305
1306struct platform_device msm_stub_codec = {
1307 .name = "msm-stub-codec",
1308 .id = 1,
1309};
1310
1311struct platform_device msm_voice = {
1312 .name = "msm-pcm-voice",
1313 .id = -1,
1314};
1315
1316struct platform_device msm_voip = {
1317 .name = "msm-voip-dsp",
1318 .id = -1,
1319};
1320
1321struct platform_device msm_lpa_pcm = {
1322 .name = "msm-pcm-lpa",
1323 .id = -1,
1324};
1325
1326struct platform_device msm_pcm_hostless = {
1327 .name = "msm-pcm-hostless",
1328 .id = -1,
1329};
1330
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301331struct platform_device msm_cpudai_afe_01_rx = {
1332 .name = "msm-dai-q6",
1333 .id = 0xE0,
1334};
1335
1336struct platform_device msm_cpudai_afe_01_tx = {
1337 .name = "msm-dai-q6",
1338 .id = 0xF0,
1339};
1340
1341struct platform_device msm_cpudai_afe_02_rx = {
1342 .name = "msm-dai-q6",
1343 .id = 0xF1,
1344};
1345
1346struct platform_device msm_cpudai_afe_02_tx = {
1347 .name = "msm-dai-q6",
1348 .id = 0xE1,
1349};
1350
1351struct platform_device msm_pcm_afe = {
1352 .name = "msm-pcm-afe",
1353 .id = -1,
1354};
1355
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001356struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001357 FS_8X60(FS_MDP, "fs_mdp"),
1358 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001359 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1360 FS_8X60(FS_VFE, "fs_vfe"),
1361 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001362 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1363 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1364 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001365 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001366};
1367unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1368
1369#ifdef CONFIG_MSM_ROTATOR
1370#define ROTATOR_HW_BASE 0x04E00000
1371static struct resource resources_msm_rotator[] = {
1372 {
1373 .start = ROTATOR_HW_BASE,
1374 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1375 .flags = IORESOURCE_MEM,
1376 },
1377 {
1378 .start = ROT_IRQ,
1379 .end = ROT_IRQ,
1380 .flags = IORESOURCE_IRQ,
1381 },
1382};
1383
1384static struct msm_rot_clocks rotator_clocks[] = {
1385 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001386 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001387 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001388 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001389 },
1390 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001391 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001392 .clk_type = ROTATOR_PCLK,
1393 .clk_rate = 0,
1394 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001395};
1396
1397static struct msm_rotator_platform_data rotator_pdata = {
1398 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1399 .hardware_version_number = 0x01020309,
1400 .rotator_clks = rotator_clocks,
1401 .regulator_name = "fs_rot",
1402};
1403
1404struct platform_device msm_rotator_device = {
1405 .name = "msm_rotator",
1406 .id = 0,
1407 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1408 .resource = resources_msm_rotator,
1409 .dev = {
1410 .platform_data = &rotator_pdata,
1411 },
1412};
1413#endif
1414
1415#define MIPI_DSI_HW_BASE 0x04700000
1416#define MDP_HW_BASE 0x05100000
1417
1418static struct resource msm_mipi_dsi1_resources[] = {
1419 {
1420 .name = "mipi_dsi",
1421 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001422 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001423 .flags = IORESOURCE_MEM,
1424 },
1425 {
1426 .start = DSI1_IRQ,
1427 .end = DSI1_IRQ,
1428 .flags = IORESOURCE_IRQ,
1429 },
1430};
1431
1432struct platform_device msm_mipi_dsi1_device = {
1433 .name = "mipi_dsi",
1434 .id = 1,
1435 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1436 .resource = msm_mipi_dsi1_resources,
1437};
1438
1439static struct resource msm_mdp_resources[] = {
1440 {
1441 .name = "mdp",
1442 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001443 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001444 .flags = IORESOURCE_MEM,
1445 },
1446 {
1447 .start = MDP_IRQ,
1448 .end = MDP_IRQ,
1449 .flags = IORESOURCE_IRQ,
1450 },
1451};
1452
1453static struct platform_device msm_mdp_device = {
1454 .name = "mdp",
1455 .id = 0,
1456 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1457 .resource = msm_mdp_resources,
1458};
1459
1460static void __init msm_register_device(struct platform_device *pdev, void *data)
1461{
1462 int ret;
1463
1464 pdev->dev.platform_data = data;
1465 ret = platform_device_register(pdev);
1466 if (ret)
1467 dev_err(&pdev->dev,
1468 "%s: platform_device_register() failed = %d\n",
1469 __func__, ret);
1470}
1471
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001472#ifdef CONFIG_MSM_BUS_SCALING
1473static struct platform_device msm_dtv_device = {
1474 .name = "dtv",
1475 .id = 0,
1476};
1477#endif
1478
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001479void __init msm_fb_register_device(char *name, void *data)
1480{
1481 if (!strncmp(name, "mdp", 3))
1482 msm_register_device(&msm_mdp_device, data);
1483 else if (!strncmp(name, "mipi_dsi", 8))
1484 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001485#ifdef CONFIG_MSM_BUS_SCALING
1486 else if (!strncmp(name, "dtv", 3))
1487 msm_register_device(&msm_dtv_device, data);
1488#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001489 else
1490 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1491}
1492
1493static struct resource resources_sps[] = {
1494 {
1495 .name = "pipe_mem",
1496 .start = 0x12800000,
1497 .end = 0x12800000 + 0x4000 - 1,
1498 .flags = IORESOURCE_MEM,
1499 },
1500 {
1501 .name = "bamdma_dma",
1502 .start = 0x12240000,
1503 .end = 0x12240000 + 0x1000 - 1,
1504 .flags = IORESOURCE_MEM,
1505 },
1506 {
1507 .name = "bamdma_bam",
1508 .start = 0x12244000,
1509 .end = 0x12244000 + 0x4000 - 1,
1510 .flags = IORESOURCE_MEM,
1511 },
1512 {
1513 .name = "bamdma_irq",
1514 .start = SPS_BAM_DMA_IRQ,
1515 .end = SPS_BAM_DMA_IRQ,
1516 .flags = IORESOURCE_IRQ,
1517 },
1518};
1519
1520struct msm_sps_platform_data msm_sps_pdata = {
1521 .bamdma_restricted_pipes = 0x06,
1522};
1523
1524struct platform_device msm_device_sps = {
1525 .name = "msm_sps",
1526 .id = -1,
1527 .num_resources = ARRAY_SIZE(resources_sps),
1528 .resource = resources_sps,
1529 .dev.platform_data = &msm_sps_pdata,
1530};
1531
1532#ifdef CONFIG_MSM_MPM
1533static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001534 [1] = MSM_GPIO_TO_INT(46),
1535 [2] = MSM_GPIO_TO_INT(150),
1536 [4] = MSM_GPIO_TO_INT(103),
1537 [5] = MSM_GPIO_TO_INT(104),
1538 [6] = MSM_GPIO_TO_INT(105),
1539 [7] = MSM_GPIO_TO_INT(106),
1540 [8] = MSM_GPIO_TO_INT(107),
1541 [9] = MSM_GPIO_TO_INT(7),
1542 [10] = MSM_GPIO_TO_INT(11),
1543 [11] = MSM_GPIO_TO_INT(15),
1544 [12] = MSM_GPIO_TO_INT(19),
1545 [13] = MSM_GPIO_TO_INT(23),
1546 [14] = MSM_GPIO_TO_INT(27),
1547 [15] = MSM_GPIO_TO_INT(31),
1548 [16] = MSM_GPIO_TO_INT(35),
1549 [19] = MSM_GPIO_TO_INT(90),
1550 [20] = MSM_GPIO_TO_INT(92),
1551 [23] = MSM_GPIO_TO_INT(85),
1552 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001553 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001554 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001555 [29] = MSM_GPIO_TO_INT(10),
1556 [30] = MSM_GPIO_TO_INT(102),
1557 [31] = MSM_GPIO_TO_INT(81),
1558 [32] = MSM_GPIO_TO_INT(78),
1559 [33] = MSM_GPIO_TO_INT(94),
1560 [34] = MSM_GPIO_TO_INT(72),
1561 [35] = MSM_GPIO_TO_INT(39),
1562 [36] = MSM_GPIO_TO_INT(43),
1563 [37] = MSM_GPIO_TO_INT(61),
1564 [38] = MSM_GPIO_TO_INT(50),
1565 [39] = MSM_GPIO_TO_INT(42),
1566 [41] = MSM_GPIO_TO_INT(62),
1567 [42] = MSM_GPIO_TO_INT(76),
1568 [43] = MSM_GPIO_TO_INT(75),
1569 [44] = MSM_GPIO_TO_INT(70),
1570 [45] = MSM_GPIO_TO_INT(69),
1571 [46] = MSM_GPIO_TO_INT(67),
1572 [47] = MSM_GPIO_TO_INT(65),
1573 [48] = MSM_GPIO_TO_INT(58),
1574 [49] = MSM_GPIO_TO_INT(54),
1575 [50] = MSM_GPIO_TO_INT(52),
1576 [51] = MSM_GPIO_TO_INT(49),
1577 [52] = MSM_GPIO_TO_INT(40),
1578 [53] = MSM_GPIO_TO_INT(37),
1579 [54] = MSM_GPIO_TO_INT(24),
1580 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001581};
1582
1583static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1584 TLMM_MSM_SUMMARY_IRQ,
1585 RPM_APCC_CPU0_GP_HIGH_IRQ,
1586 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1587 RPM_APCC_CPU0_GP_LOW_IRQ,
1588 RPM_APCC_CPU0_WAKE_UP_IRQ,
1589 RPM_APCC_CPU1_GP_HIGH_IRQ,
1590 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1591 RPM_APCC_CPU1_GP_LOW_IRQ,
1592 RPM_APCC_CPU1_WAKE_UP_IRQ,
1593 MSS_TO_APPS_IRQ_0,
1594 MSS_TO_APPS_IRQ_1,
1595 MSS_TO_APPS_IRQ_2,
1596 MSS_TO_APPS_IRQ_3,
1597 MSS_TO_APPS_IRQ_4,
1598 MSS_TO_APPS_IRQ_5,
1599 MSS_TO_APPS_IRQ_6,
1600 MSS_TO_APPS_IRQ_7,
1601 MSS_TO_APPS_IRQ_8,
1602 MSS_TO_APPS_IRQ_9,
1603 LPASS_SCSS_GP_LOW_IRQ,
1604 LPASS_SCSS_GP_MEDIUM_IRQ,
1605 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001606 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001607 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001608 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001609 RIVA_APPS_WLAN_SMSM_IRQ,
1610 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1611 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001612};
1613
1614struct msm_mpm_device_data msm_mpm_dev_data = {
1615 .irqs_m2a = msm_mpm_irqs_m2a,
1616 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1617 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1618 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1619 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1620 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1621 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1622 .mpm_apps_ipc_val = BIT(1),
1623 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1624
1625};
1626#endif
1627
Stephen Boydbb600ae2011-08-02 20:11:40 -07001628static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001629 CLK_DUMMY("pll2", PLL2, NULL, 0),
1630 CLK_DUMMY("pll8", PLL8, NULL, 0),
1631 CLK_DUMMY("pll4", PLL4, NULL, 0),
1632
1633 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1634 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1635 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1636 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1637 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1638 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1639 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1640 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1641 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1642 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1643 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1644 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1645 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1646 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1647 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1648 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1649
Matt Wagantalle2522372011-08-17 14:52:21 -07001650 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1651 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1652 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1653 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1654 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1655 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1656 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1657 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1658 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1659 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1660 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1661 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001662 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1663 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1664 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1665 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1666 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1667 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1668 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1669 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1670 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1671 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1672 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1673 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001674 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001675 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001676 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001677 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1678 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1679 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1680 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1681 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001682 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001683 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001684 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1685 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1686 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1687 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1688 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1689 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1690 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1691 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001692 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1693 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001694 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1695 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001696 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001697 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001698 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001699 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001700 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001701 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1702 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1703 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1704 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1705 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1706 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1707 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001708 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001709 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1710 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1711 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001712 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1713 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1714 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1715 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1716 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001717 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1718 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001719 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1720 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1721 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1722 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1723 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001724 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1725 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1726 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1727 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1728 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1729 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1730 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1731 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1732 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1733 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1734 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1735 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1736 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1737 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1738 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001739 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1740 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1741 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001742 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001743 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001744 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001745 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1746 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1747 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001748 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001749 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1750 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1751 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001752 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001753 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1754 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1755 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1756 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1757 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1758 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1759 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1760 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1761 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001762 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001763 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1764 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1765 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1766 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1767 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1768 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1769 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1770 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1771 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1772 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001773 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1774 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1775 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001776 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1777 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1778 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1779 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001780 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001781 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001782 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001783 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001784 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1785 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1786 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1787 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1788 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1789 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1790 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1791 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1792 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1793 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1794 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1795 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1796 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1797 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1798 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001799 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1800 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1801 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1802 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1803 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1804 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001805
1806 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1807 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001808 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1809 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1810 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1811 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1812 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001813 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1814 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1815};
1816
Stephen Boydbb600ae2011-08-02 20:11:40 -07001817struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1818 .table = msm_clocks_8960_dummy,
1819 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1820};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001821
1822#define LPASS_SLIMBUS_PHYS 0x28080000
1823#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001824#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001825/* Board info for the slimbus slave device */
1826static struct resource slimbus_res[] = {
1827 {
1828 .start = LPASS_SLIMBUS_PHYS,
1829 .end = LPASS_SLIMBUS_PHYS + 8191,
1830 .flags = IORESOURCE_MEM,
1831 .name = "slimbus_physical",
1832 },
1833 {
1834 .start = LPASS_SLIMBUS_BAM_PHYS,
1835 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1836 .flags = IORESOURCE_MEM,
1837 .name = "slimbus_bam_physical",
1838 },
1839 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001840 .start = LPASS_SLIMBUS_SLEW,
1841 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1842 .flags = IORESOURCE_MEM,
1843 .name = "slimbus_slew_reg",
1844 },
1845 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001846 .start = SLIMBUS0_CORE_EE1_IRQ,
1847 .end = SLIMBUS0_CORE_EE1_IRQ,
1848 .flags = IORESOURCE_IRQ,
1849 .name = "slimbus_irq",
1850 },
1851 {
1852 .start = SLIMBUS0_BAM_EE1_IRQ,
1853 .end = SLIMBUS0_BAM_EE1_IRQ,
1854 .flags = IORESOURCE_IRQ,
1855 .name = "slimbus_bam_irq",
1856 },
1857};
1858
1859struct platform_device msm_slim_ctrl = {
1860 .name = "msm_slim_ctrl",
1861 .id = 1,
1862 .num_resources = ARRAY_SIZE(slimbus_res),
1863 .resource = slimbus_res,
1864 .dev = {
1865 .coherent_dma_mask = 0xffffffffULL,
1866 },
1867};
1868
1869#ifdef CONFIG_MSM_BUS_SCALING
1870static struct msm_bus_vectors grp3d_init_vectors[] = {
1871 {
1872 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1873 .dst = MSM_BUS_SLAVE_EBI_CH0,
1874 .ab = 0,
1875 .ib = 0,
1876 },
1877};
1878
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001879static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001880 {
1881 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1882 .dst = MSM_BUS_SLAVE_EBI_CH0,
1883 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001884 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001885 },
1886};
1887
1888static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
1889 {
1890 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1891 .dst = MSM_BUS_SLAVE_EBI_CH0,
1892 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001893 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001894 },
1895};
1896
1897static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
1898 {
1899 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1900 .dst = MSM_BUS_SLAVE_EBI_CH0,
1901 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001902 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001903 },
1904};
1905
1906static struct msm_bus_vectors grp3d_max_vectors[] = {
1907 {
1908 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1909 .dst = MSM_BUS_SLAVE_EBI_CH0,
1910 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001911 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001912 },
1913};
1914
1915static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
1916 {
1917 ARRAY_SIZE(grp3d_init_vectors),
1918 grp3d_init_vectors,
1919 },
1920 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001921 ARRAY_SIZE(grp3d_low_vectors),
1922 grp3d_low_vectors,
1923 },
1924 {
1925 ARRAY_SIZE(grp3d_nominal_low_vectors),
1926 grp3d_nominal_low_vectors,
1927 },
1928 {
1929 ARRAY_SIZE(grp3d_nominal_high_vectors),
1930 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001931 },
1932 {
1933 ARRAY_SIZE(grp3d_max_vectors),
1934 grp3d_max_vectors,
1935 },
1936};
1937
1938static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
1939 grp3d_bus_scale_usecases,
1940 ARRAY_SIZE(grp3d_bus_scale_usecases),
1941 .name = "grp3d",
1942};
1943
1944static struct msm_bus_vectors grp2d0_init_vectors[] = {
1945 {
1946 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1947 .dst = MSM_BUS_SLAVE_EBI_CH0,
1948 .ab = 0,
1949 .ib = 0,
1950 },
1951};
1952
1953static struct msm_bus_vectors grp2d0_max_vectors[] = {
1954 {
1955 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1956 .dst = MSM_BUS_SLAVE_EBI_CH0,
1957 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07001958 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001959 },
1960};
1961
1962static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
1963 {
1964 ARRAY_SIZE(grp2d0_init_vectors),
1965 grp2d0_init_vectors,
1966 },
1967 {
1968 ARRAY_SIZE(grp2d0_max_vectors),
1969 grp2d0_max_vectors,
1970 },
1971};
1972
1973struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
1974 grp2d0_bus_scale_usecases,
1975 ARRAY_SIZE(grp2d0_bus_scale_usecases),
1976 .name = "grp2d0",
1977};
1978
1979static struct msm_bus_vectors grp2d1_init_vectors[] = {
1980 {
1981 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
1982 .dst = MSM_BUS_SLAVE_EBI_CH0,
1983 .ab = 0,
1984 .ib = 0,
1985 },
1986};
1987
1988static struct msm_bus_vectors grp2d1_max_vectors[] = {
1989 {
1990 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
1991 .dst = MSM_BUS_SLAVE_EBI_CH0,
1992 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07001993 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001994 },
1995};
1996
1997static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
1998 {
1999 ARRAY_SIZE(grp2d1_init_vectors),
2000 grp2d1_init_vectors,
2001 },
2002 {
2003 ARRAY_SIZE(grp2d1_max_vectors),
2004 grp2d1_max_vectors,
2005 },
2006};
2007
2008struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2009 grp2d1_bus_scale_usecases,
2010 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2011 .name = "grp2d1",
2012};
2013#endif
2014
2015static struct resource kgsl_3d0_resources[] = {
2016 {
2017 .name = KGSL_3D0_REG_MEMORY,
2018 .start = 0x04300000, /* GFX3D address */
2019 .end = 0x0431ffff,
2020 .flags = IORESOURCE_MEM,
2021 },
2022 {
2023 .name = KGSL_3D0_IRQ,
2024 .start = GFX3D_IRQ,
2025 .end = GFX3D_IRQ,
2026 .flags = IORESOURCE_IRQ,
2027 },
2028};
2029
2030static struct kgsl_device_platform_data kgsl_3d0_pdata = {
2031 .pwr_data = {
2032 .pwrlevel = {
2033 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002034 .gpu_freq = 400000000,
2035 .bus_freq = 4,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002036 .io_fraction = 0,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002037 },
2038 {
2039 .gpu_freq = 300000000,
2040 .bus_freq = 3,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002041 .io_fraction = 33,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002042 },
2043 {
2044 .gpu_freq = 200000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002045 .bus_freq = 2,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002046 .io_fraction = 100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002047 },
2048 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002049 .gpu_freq = 128000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002050 .bus_freq = 1,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002051 .io_fraction = 100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002052 },
2053 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002054 .gpu_freq = 27000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002055 .bus_freq = 0,
2056 },
2057 },
Lucille Sylvester5d0ac132011-09-21 10:15:01 -06002058 .init_level = 0,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002059 .num_levels = 5,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002060 .set_grp_async = NULL,
2061 .idle_timeout = HZ/5,
Jeremy Gebbend3342ee2011-10-18 09:53:17 -06002062 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002063 },
2064 .clk = {
2065 .name = {
Matt Wagantall9dc01632011-08-17 18:55:04 -07002066 .clk = "core_clk",
2067 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002068 },
2069#ifdef CONFIG_MSM_BUS_SCALING
2070 .bus_scale_table = &grp3d_bus_scale_pdata,
2071#endif
2072 },
2073 .imem_clk_name = {
2074 .clk = NULL,
Matt Wagantall9dc01632011-08-17 18:55:04 -07002075 .pclk = "mem_iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002076 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002077 .iommu_user_ctx_name = "gfx3d_user",
2078 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002079};
2080
2081struct platform_device msm_kgsl_3d0 = {
2082 .name = "kgsl-3d0",
2083 .id = 0,
2084 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2085 .resource = kgsl_3d0_resources,
2086 .dev = {
2087 .platform_data = &kgsl_3d0_pdata,
2088 },
2089};
2090
2091static struct resource kgsl_2d0_resources[] = {
2092 {
2093 .name = KGSL_2D0_REG_MEMORY,
2094 .start = 0x04100000, /* Z180 base address */
2095 .end = 0x04100FFF,
2096 .flags = IORESOURCE_MEM,
2097 },
2098 {
2099 .name = KGSL_2D0_IRQ,
2100 .start = GFX2D0_IRQ,
2101 .end = GFX2D0_IRQ,
2102 .flags = IORESOURCE_IRQ,
2103 },
2104};
2105
2106static struct kgsl_device_platform_data kgsl_2d0_pdata = {
2107 .pwr_data = {
2108 .pwrlevel = {
2109 {
2110 .gpu_freq = 200000000,
2111 .bus_freq = 1,
2112 },
2113 {
2114 .gpu_freq = 200000000,
2115 .bus_freq = 0,
2116 },
2117 },
2118 .init_level = 0,
2119 .num_levels = 2,
2120 .set_grp_async = NULL,
2121 .idle_timeout = HZ/10,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002122 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002123 },
2124 .clk = {
2125 .name = {
2126 /* note: 2d clocks disabled on v1 */
Matt Wagantall9dc01632011-08-17 18:55:04 -07002127 .clk = "core_clk",
2128 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002129 },
2130#ifdef CONFIG_MSM_BUS_SCALING
2131 .bus_scale_table = &grp2d0_bus_scale_pdata,
2132#endif
2133 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002134 .iommu_user_ctx_name = "gfx2d0_2d0",
2135 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002136};
2137
2138struct platform_device msm_kgsl_2d0 = {
2139 .name = "kgsl-2d0",
2140 .id = 0,
2141 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2142 .resource = kgsl_2d0_resources,
2143 .dev = {
2144 .platform_data = &kgsl_2d0_pdata,
2145 },
2146};
2147
2148static struct resource kgsl_2d1_resources[] = {
2149 {
2150 .name = KGSL_2D1_REG_MEMORY,
2151 .start = 0x04200000, /* Z180 device 1 base address */
2152 .end = 0x04200FFF,
2153 .flags = IORESOURCE_MEM,
2154 },
2155 {
2156 .name = KGSL_2D1_IRQ,
2157 .start = GFX2D1_IRQ,
2158 .end = GFX2D1_IRQ,
2159 .flags = IORESOURCE_IRQ,
2160 },
2161};
2162
2163static struct kgsl_device_platform_data kgsl_2d1_pdata = {
2164 .pwr_data = {
2165 .pwrlevel = {
2166 {
2167 .gpu_freq = 200000000,
2168 .bus_freq = 1,
2169 },
2170 {
2171 .gpu_freq = 200000000,
2172 .bus_freq = 0,
2173 },
2174 },
2175 .init_level = 0,
2176 .num_levels = 2,
2177 .set_grp_async = NULL,
2178 .idle_timeout = HZ/10,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002179 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002180 },
2181 .clk = {
2182 .name = {
Matt Wagantall9dc01632011-08-17 18:55:04 -07002183 .clk = "core_clk",
2184 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002185 },
2186#ifdef CONFIG_MSM_BUS_SCALING
2187 .bus_scale_table = &grp2d1_bus_scale_pdata,
2188#endif
2189 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002190 .iommu_user_ctx_name = "gfx2d1_2d1",
2191 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002192};
2193
2194struct platform_device msm_kgsl_2d1 = {
2195 .name = "kgsl-2d1",
2196 .id = 1,
2197 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2198 .resource = kgsl_2d1_resources,
2199 .dev = {
2200 .platform_data = &kgsl_2d1_pdata,
2201 },
2202};
2203
2204#ifdef CONFIG_MSM_GEMINI
2205static struct resource msm_gemini_resources[] = {
2206 {
2207 .start = 0x04600000,
2208 .end = 0x04600000 + SZ_1M - 1,
2209 .flags = IORESOURCE_MEM,
2210 },
2211 {
2212 .start = JPEG_IRQ,
2213 .end = JPEG_IRQ,
2214 .flags = IORESOURCE_IRQ,
2215 },
2216};
2217
2218struct platform_device msm8960_gemini_device = {
2219 .name = "msm_gemini",
2220 .resource = msm_gemini_resources,
2221 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2222};
2223#endif
2224
2225struct msm_rpm_map_data rpm_map_data[] __initdata = {
2226 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2227 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2228
2229 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2230
2231 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2232 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2233 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2234 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2235 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2236 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2237 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2238 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2239 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2240 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2241
2242 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2243 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2244 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2245 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2246
2247 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2248 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2249 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002250 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002251
2252 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2253 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2254 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2255 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2256
2257 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2258 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2259 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2260 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2261 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2262 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2263 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2264 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2265 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2266 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2267 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2268 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2269 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2270 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2271 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2272 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2273 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2274 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2275 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2276 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2277 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2278 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2279 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2280 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2281 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2282 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2283 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2284 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2285 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2286 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2287 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2288 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2289 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2290 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2291 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2292 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2293 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2294 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2295 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2296 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2297 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2298 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2299 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2300 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2301 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2302 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2303 MSM_RPM_MAP(NCP_0, NCP, 2),
2304 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2305 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2306 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002307 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002308
2309};
2310unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2311
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002312struct platform_device msm_rpm_device = {
2313 .name = "msm_rpm",
2314 .id = -1,
2315};
2316
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002317static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2318 .phys_addr_base = 0x0010D204,
2319 .phys_size = SZ_8K,
2320};
2321
2322struct platform_device msm_rpm_stat_device = {
2323 .name = "msm_rpm_stat",
2324 .id = -1,
2325 .dev = {
2326 .platform_data = &msm_rpm_stat_pdata,
2327 },
2328};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002329
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002330struct platform_device msm_bus_sys_fabric = {
2331 .name = "msm_bus_fabric",
2332 .id = MSM_BUS_FAB_SYSTEM,
2333};
2334struct platform_device msm_bus_apps_fabric = {
2335 .name = "msm_bus_fabric",
2336 .id = MSM_BUS_FAB_APPSS,
2337};
2338struct platform_device msm_bus_mm_fabric = {
2339 .name = "msm_bus_fabric",
2340 .id = MSM_BUS_FAB_MMSS,
2341};
2342struct platform_device msm_bus_sys_fpb = {
2343 .name = "msm_bus_fabric",
2344 .id = MSM_BUS_FAB_SYSTEM_FPB,
2345};
2346struct platform_device msm_bus_cpss_fpb = {
2347 .name = "msm_bus_fabric",
2348 .id = MSM_BUS_FAB_CPSS_FPB,
2349};
2350
2351/* Sensors DSPS platform data */
2352#ifdef CONFIG_MSM_DSPS
2353
2354#define PPSS_REG_PHYS_BASE 0x12080000
2355
2356static struct dsps_clk_info dsps_clks[] = {};
2357static struct dsps_regulator_info dsps_regs[] = {};
2358
2359/*
2360 * Note: GPIOs field is intialized in run-time at the function
2361 * msm8960_init_dsps().
2362 */
2363
2364struct msm_dsps_platform_data msm_dsps_pdata = {
2365 .clks = dsps_clks,
2366 .clks_num = ARRAY_SIZE(dsps_clks),
2367 .gpios = NULL,
2368 .gpios_num = 0,
2369 .regs = dsps_regs,
2370 .regs_num = ARRAY_SIZE(dsps_regs),
2371 .dsps_pwr_ctl_en = 1,
2372 .signature = DSPS_SIGNATURE,
2373};
2374
2375static struct resource msm_dsps_resources[] = {
2376 {
2377 .start = PPSS_REG_PHYS_BASE,
2378 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2379 .name = "ppss_reg",
2380 .flags = IORESOURCE_MEM,
2381 },
Wentao Xua55500b2011-08-16 18:15:04 -04002382
2383 {
2384 .start = PPSS_WDOG_TIMER_IRQ,
2385 .end = PPSS_WDOG_TIMER_IRQ,
2386 .name = "ppss_wdog",
2387 .flags = IORESOURCE_IRQ,
2388 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002389};
2390
2391struct platform_device msm_dsps_device = {
2392 .name = "msm_dsps",
2393 .id = 0,
2394 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2395 .resource = msm_dsps_resources,
2396 .dev.platform_data = &msm_dsps_pdata,
2397};
2398
2399#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002400
2401#ifdef CONFIG_MSM_QDSS
2402
2403#define MSM_QDSS_PHYS_BASE 0x01A00000
2404#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2405#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2406#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002407#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002408#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2409
2410static struct resource msm_etb_resources[] = {
2411 {
2412 .start = MSM_ETB_PHYS_BASE,
2413 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2414 .flags = IORESOURCE_MEM,
2415 },
2416};
2417
2418struct platform_device msm_etb_device = {
2419 .name = "msm_etb",
2420 .id = 0,
2421 .num_resources = ARRAY_SIZE(msm_etb_resources),
2422 .resource = msm_etb_resources,
2423};
2424
2425static struct resource msm_tpiu_resources[] = {
2426 {
2427 .start = MSM_TPIU_PHYS_BASE,
2428 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2429 .flags = IORESOURCE_MEM,
2430 },
2431};
2432
2433struct platform_device msm_tpiu_device = {
2434 .name = "msm_tpiu",
2435 .id = 0,
2436 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2437 .resource = msm_tpiu_resources,
2438};
2439
2440static struct resource msm_funnel_resources[] = {
2441 {
2442 .start = MSM_FUNNEL_PHYS_BASE,
2443 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2444 .flags = IORESOURCE_MEM,
2445 },
2446};
2447
2448struct platform_device msm_funnel_device = {
2449 .name = "msm_funnel",
2450 .id = 0,
2451 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2452 .resource = msm_funnel_resources,
2453};
2454
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002455static struct resource msm_debug_resources[] = {
2456 {
2457 .start = MSM_DEBUG_PHYS_BASE,
2458 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2459 .flags = IORESOURCE_MEM,
2460 },
2461 {
2462 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2463 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2464 .flags = IORESOURCE_MEM,
2465 },
2466};
2467
2468struct platform_device msm_debug_device = {
2469 .name = "msm_debug",
2470 .id = 0,
2471 .num_resources = ARRAY_SIZE(msm_debug_resources),
2472 .resource = msm_debug_resources,
2473};
2474
Pratik Patel7831c082011-06-08 21:44:37 -07002475static struct resource msm_ptm_resources[] = {
2476 {
2477 .start = MSM_PTM_PHYS_BASE,
2478 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2479 .flags = IORESOURCE_MEM,
2480 },
2481};
2482
2483struct platform_device msm_ptm_device = {
2484 .name = "msm_ptm",
2485 .id = 0,
2486 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2487 .resource = msm_ptm_resources,
2488};
2489
2490#endif