blob: 2ea1f47e55bf51af0525388646a1ae7095d113be [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
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700185static struct resource resources_uart_gsbi2[] = {
186 {
187 .start = MSM8960_GSBI2_UARTDM_IRQ,
188 .end = MSM8960_GSBI2_UARTDM_IRQ,
189 .flags = IORESOURCE_IRQ,
190 },
191 {
192 .start = MSM_UART2DM_PHYS,
193 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
194 .name = "uartdm_resource",
195 .flags = IORESOURCE_MEM,
196 },
197 {
198 .start = MSM_GSBI2_PHYS,
199 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
200 .name = "gsbi_resource",
201 .flags = IORESOURCE_MEM,
202 },
203};
204
205struct platform_device msm8960_device_uart_gsbi2 = {
206 .name = "msm_serial_hsl",
207 .id = 0,
208 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
209 .resource = resources_uart_gsbi2,
210};
Mayank Rana9f51f582011-08-04 18:35:59 +0530211/* GSBI 6 used into UARTDM Mode */
212static struct resource msm_uart_dm6_resources[] = {
213 {
214 .start = MSM_UART6DM_PHYS,
215 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
216 .name = "uartdm_resource",
217 .flags = IORESOURCE_MEM,
218 },
219 {
220 .start = GSBI6_UARTDM_IRQ,
221 .end = GSBI6_UARTDM_IRQ,
222 .flags = IORESOURCE_IRQ,
223 },
224 {
225 .start = MSM_GSBI6_PHYS,
226 .end = MSM_GSBI6_PHYS + 4 - 1,
227 .name = "gsbi_resource",
228 .flags = IORESOURCE_MEM,
229 },
230 {
231 .start = DMOV_HSUART_GSBI6_TX_CHAN,
232 .end = DMOV_HSUART_GSBI6_RX_CHAN,
233 .name = "uartdm_channels",
234 .flags = IORESOURCE_DMA,
235 },
236 {
237 .start = DMOV_HSUART_GSBI6_TX_CRCI,
238 .end = DMOV_HSUART_GSBI6_RX_CRCI,
239 .name = "uartdm_crci",
240 .flags = IORESOURCE_DMA,
241 },
242};
243static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
244struct platform_device msm_device_uart_dm6 = {
245 .name = "msm_serial_hs",
246 .id = 0,
247 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
248 .resource = msm_uart_dm6_resources,
249 .dev = {
250 .dma_mask = &msm_uart_dm6_dma_mask,
251 .coherent_dma_mask = DMA_BIT_MASK(32),
252 },
253};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700254
255static struct resource resources_uart_gsbi5[] = {
256 {
257 .start = GSBI5_UARTDM_IRQ,
258 .end = GSBI5_UARTDM_IRQ,
259 .flags = IORESOURCE_IRQ,
260 },
261 {
262 .start = MSM_UART5DM_PHYS,
263 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
264 .name = "uartdm_resource",
265 .flags = IORESOURCE_MEM,
266 },
267 {
268 .start = MSM_GSBI5_PHYS,
269 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
270 .name = "gsbi_resource",
271 .flags = IORESOURCE_MEM,
272 },
273};
274
275struct platform_device msm8960_device_uart_gsbi5 = {
276 .name = "msm_serial_hsl",
277 .id = 0,
278 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
279 .resource = resources_uart_gsbi5,
280};
281/* MSM Video core device */
282#ifdef CONFIG_MSM_BUS_SCALING
283static struct msm_bus_vectors vidc_init_vectors[] = {
284 {
285 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
286 .dst = MSM_BUS_SLAVE_EBI_CH0,
287 .ab = 0,
288 .ib = 0,
289 },
290 {
291 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
292 .dst = MSM_BUS_SLAVE_EBI_CH0,
293 .ab = 0,
294 .ib = 0,
295 },
296 {
297 .src = MSM_BUS_MASTER_AMPSS_M0,
298 .dst = MSM_BUS_SLAVE_EBI_CH0,
299 .ab = 0,
300 .ib = 0,
301 },
302 {
303 .src = MSM_BUS_MASTER_AMPSS_M0,
304 .dst = MSM_BUS_SLAVE_EBI_CH0,
305 .ab = 0,
306 .ib = 0,
307 },
308};
309static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
310 {
311 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
312 .dst = MSM_BUS_SLAVE_EBI_CH0,
313 .ab = 54525952,
314 .ib = 436207616,
315 },
316 {
317 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
318 .dst = MSM_BUS_SLAVE_EBI_CH0,
319 .ab = 72351744,
320 .ib = 289406976,
321 },
322 {
323 .src = MSM_BUS_MASTER_AMPSS_M0,
324 .dst = MSM_BUS_SLAVE_EBI_CH0,
325 .ab = 500000,
326 .ib = 1000000,
327 },
328 {
329 .src = MSM_BUS_MASTER_AMPSS_M0,
330 .dst = MSM_BUS_SLAVE_EBI_CH0,
331 .ab = 500000,
332 .ib = 1000000,
333 },
334};
335static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
336 {
337 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
338 .dst = MSM_BUS_SLAVE_EBI_CH0,
339 .ab = 40894464,
340 .ib = 327155712,
341 },
342 {
343 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
344 .dst = MSM_BUS_SLAVE_EBI_CH0,
345 .ab = 48234496,
346 .ib = 192937984,
347 },
348 {
349 .src = MSM_BUS_MASTER_AMPSS_M0,
350 .dst = MSM_BUS_SLAVE_EBI_CH0,
351 .ab = 500000,
352 .ib = 2000000,
353 },
354 {
355 .src = MSM_BUS_MASTER_AMPSS_M0,
356 .dst = MSM_BUS_SLAVE_EBI_CH0,
357 .ab = 500000,
358 .ib = 2000000,
359 },
360};
361static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
362 {
363 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
364 .dst = MSM_BUS_SLAVE_EBI_CH0,
365 .ab = 163577856,
366 .ib = 1308622848,
367 },
368 {
369 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
370 .dst = MSM_BUS_SLAVE_EBI_CH0,
371 .ab = 219152384,
372 .ib = 876609536,
373 },
374 {
375 .src = MSM_BUS_MASTER_AMPSS_M0,
376 .dst = MSM_BUS_SLAVE_EBI_CH0,
377 .ab = 1750000,
378 .ib = 3500000,
379 },
380 {
381 .src = MSM_BUS_MASTER_AMPSS_M0,
382 .dst = MSM_BUS_SLAVE_EBI_CH0,
383 .ab = 1750000,
384 .ib = 3500000,
385 },
386};
387static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
388 {
389 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
390 .dst = MSM_BUS_SLAVE_EBI_CH0,
391 .ab = 121634816,
392 .ib = 973078528,
393 },
394 {
395 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
396 .dst = MSM_BUS_SLAVE_EBI_CH0,
397 .ab = 155189248,
398 .ib = 620756992,
399 },
400 {
401 .src = MSM_BUS_MASTER_AMPSS_M0,
402 .dst = MSM_BUS_SLAVE_EBI_CH0,
403 .ab = 1750000,
404 .ib = 7000000,
405 },
406 {
407 .src = MSM_BUS_MASTER_AMPSS_M0,
408 .dst = MSM_BUS_SLAVE_EBI_CH0,
409 .ab = 1750000,
410 .ib = 7000000,
411 },
412};
413static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
414 {
415 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
416 .dst = MSM_BUS_SLAVE_EBI_CH0,
417 .ab = 372244480,
418 .ib = 1861222400,
419 },
420 {
421 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
422 .dst = MSM_BUS_SLAVE_EBI_CH0,
423 .ab = 501219328,
424 .ib = 2004877312,
425 },
426 {
427 .src = MSM_BUS_MASTER_AMPSS_M0,
428 .dst = MSM_BUS_SLAVE_EBI_CH0,
429 .ab = 2500000,
430 .ib = 5000000,
431 },
432 {
433 .src = MSM_BUS_MASTER_AMPSS_M0,
434 .dst = MSM_BUS_SLAVE_EBI_CH0,
435 .ab = 2500000,
436 .ib = 5000000,
437 },
438};
439static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
440 {
441 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
442 .dst = MSM_BUS_SLAVE_EBI_CH0,
443 .ab = 222298112,
444 .ib = 1778384896,
445 },
446 {
447 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
448 .dst = MSM_BUS_SLAVE_EBI_CH0,
449 .ab = 330301440,
450 .ib = 1321205760,
451 },
452 {
453 .src = MSM_BUS_MASTER_AMPSS_M0,
454 .dst = MSM_BUS_SLAVE_EBI_CH0,
455 .ab = 2500000,
456 .ib = 700000000,
457 },
458 {
459 .src = MSM_BUS_MASTER_AMPSS_M0,
460 .dst = MSM_BUS_SLAVE_EBI_CH0,
461 .ab = 2500000,
462 .ib = 10000000,
463 },
464};
465
466static struct msm_bus_paths vidc_bus_client_config[] = {
467 {
468 ARRAY_SIZE(vidc_init_vectors),
469 vidc_init_vectors,
470 },
471 {
472 ARRAY_SIZE(vidc_venc_vga_vectors),
473 vidc_venc_vga_vectors,
474 },
475 {
476 ARRAY_SIZE(vidc_vdec_vga_vectors),
477 vidc_vdec_vga_vectors,
478 },
479 {
480 ARRAY_SIZE(vidc_venc_720p_vectors),
481 vidc_venc_720p_vectors,
482 },
483 {
484 ARRAY_SIZE(vidc_vdec_720p_vectors),
485 vidc_vdec_720p_vectors,
486 },
487 {
488 ARRAY_SIZE(vidc_venc_1080p_vectors),
489 vidc_venc_1080p_vectors,
490 },
491 {
492 ARRAY_SIZE(vidc_vdec_1080p_vectors),
493 vidc_vdec_1080p_vectors,
494 },
495};
496
497static struct msm_bus_scale_pdata vidc_bus_client_data = {
498 vidc_bus_client_config,
499 ARRAY_SIZE(vidc_bus_client_config),
500 .name = "vidc",
501};
502#endif
503
Mona Hossain9c430e32011-07-27 11:04:47 -0700504#ifdef CONFIG_HW_RANDOM_MSM
505/* PRNG device */
506#define MSM_PRNG_PHYS 0x1A500000
507static struct resource rng_resources = {
508 .flags = IORESOURCE_MEM,
509 .start = MSM_PRNG_PHYS,
510 .end = MSM_PRNG_PHYS + SZ_512 - 1,
511};
512
513struct platform_device msm_device_rng = {
514 .name = "msm_rng",
515 .id = 0,
516 .num_resources = 1,
517 .resource = &rng_resources,
518};
519#endif
520
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700521#define MSM_VIDC_BASE_PHYS 0x04400000
522#define MSM_VIDC_BASE_SIZE 0x00100000
523
524static struct resource msm_device_vidc_resources[] = {
525 {
526 .start = MSM_VIDC_BASE_PHYS,
527 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
528 .flags = IORESOURCE_MEM,
529 },
530 {
531 .start = VCODEC_IRQ,
532 .end = VCODEC_IRQ,
533 .flags = IORESOURCE_IRQ,
534 },
535};
536
537struct msm_vidc_platform_data vidc_platform_data = {
538#ifdef CONFIG_MSM_BUS_SCALING
539 .vidc_bus_client_pdata = &vidc_bus_client_data,
540#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700541#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Deepak Kotur12301a72011-11-09 18:30:29 -0800542 .memtype = ION_HEAP_EBI_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700543 .enable_ion = 1,
544#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800545 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700546 .enable_ion = 0,
547#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700548};
549
550struct platform_device msm_device_vidc = {
551 .name = "msm_vidc",
552 .id = 0,
553 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
554 .resource = msm_device_vidc_resources,
555 .dev = {
556 .platform_data = &vidc_platform_data,
557 },
558};
559
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700560#define MSM_SDC1_BASE 0x12400000
561#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
562#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
563#define MSM_SDC2_BASE 0x12140000
564#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
565#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
566#define MSM_SDC2_BASE 0x12140000
567#define MSM_SDC3_BASE 0x12180000
568#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
569#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
570#define MSM_SDC4_BASE 0x121C0000
571#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
572#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
573#define MSM_SDC5_BASE 0x12200000
574#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
575#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
576
577static struct resource resources_sdc1[] = {
578 {
579 .name = "core_mem",
580 .flags = IORESOURCE_MEM,
581 .start = MSM_SDC1_BASE,
582 .end = MSM_SDC1_DML_BASE - 1,
583 },
584 {
585 .name = "core_irq",
586 .flags = IORESOURCE_IRQ,
587 .start = SDC1_IRQ_0,
588 .end = SDC1_IRQ_0
589 },
590#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
591 {
592 .name = "sdcc_dml_addr",
593 .start = MSM_SDC1_DML_BASE,
594 .end = MSM_SDC1_BAM_BASE - 1,
595 .flags = IORESOURCE_MEM,
596 },
597 {
598 .name = "sdcc_bam_addr",
599 .start = MSM_SDC1_BAM_BASE,
600 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
601 .flags = IORESOURCE_MEM,
602 },
603 {
604 .name = "sdcc_bam_irq",
605 .start = SDC1_BAM_IRQ,
606 .end = SDC1_BAM_IRQ,
607 .flags = IORESOURCE_IRQ,
608 },
609#endif
610};
611
612static struct resource resources_sdc2[] = {
613 {
614 .name = "core_mem",
615 .flags = IORESOURCE_MEM,
616 .start = MSM_SDC2_BASE,
617 .end = MSM_SDC2_DML_BASE - 1,
618 },
619 {
620 .name = "core_irq",
621 .flags = IORESOURCE_IRQ,
622 .start = SDC2_IRQ_0,
623 .end = SDC2_IRQ_0
624 },
625#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
626 {
627 .name = "sdcc_dml_addr",
628 .start = MSM_SDC2_DML_BASE,
629 .end = MSM_SDC2_BAM_BASE - 1,
630 .flags = IORESOURCE_MEM,
631 },
632 {
633 .name = "sdcc_bam_addr",
634 .start = MSM_SDC2_BAM_BASE,
635 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
636 .flags = IORESOURCE_MEM,
637 },
638 {
639 .name = "sdcc_bam_irq",
640 .start = SDC2_BAM_IRQ,
641 .end = SDC2_BAM_IRQ,
642 .flags = IORESOURCE_IRQ,
643 },
644#endif
645};
646
647static struct resource resources_sdc3[] = {
648 {
649 .name = "core_mem",
650 .flags = IORESOURCE_MEM,
651 .start = MSM_SDC3_BASE,
652 .end = MSM_SDC3_DML_BASE - 1,
653 },
654 {
655 .name = "core_irq",
656 .flags = IORESOURCE_IRQ,
657 .start = SDC3_IRQ_0,
658 .end = SDC3_IRQ_0
659 },
660#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
661 {
662 .name = "sdcc_dml_addr",
663 .start = MSM_SDC3_DML_BASE,
664 .end = MSM_SDC3_BAM_BASE - 1,
665 .flags = IORESOURCE_MEM,
666 },
667 {
668 .name = "sdcc_bam_addr",
669 .start = MSM_SDC3_BAM_BASE,
670 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
671 .flags = IORESOURCE_MEM,
672 },
673 {
674 .name = "sdcc_bam_irq",
675 .start = SDC3_BAM_IRQ,
676 .end = SDC3_BAM_IRQ,
677 .flags = IORESOURCE_IRQ,
678 },
679#endif
680};
681
682static struct resource resources_sdc4[] = {
683 {
684 .name = "core_mem",
685 .flags = IORESOURCE_MEM,
686 .start = MSM_SDC4_BASE,
687 .end = MSM_SDC4_DML_BASE - 1,
688 },
689 {
690 .name = "core_irq",
691 .flags = IORESOURCE_IRQ,
692 .start = SDC4_IRQ_0,
693 .end = SDC4_IRQ_0
694 },
695#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
696 {
697 .name = "sdcc_dml_addr",
698 .start = MSM_SDC4_DML_BASE,
699 .end = MSM_SDC4_BAM_BASE - 1,
700 .flags = IORESOURCE_MEM,
701 },
702 {
703 .name = "sdcc_bam_addr",
704 .start = MSM_SDC4_BAM_BASE,
705 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
706 .flags = IORESOURCE_MEM,
707 },
708 {
709 .name = "sdcc_bam_irq",
710 .start = SDC4_BAM_IRQ,
711 .end = SDC4_BAM_IRQ,
712 .flags = IORESOURCE_IRQ,
713 },
714#endif
715};
716
717static struct resource resources_sdc5[] = {
718 {
719 .name = "core_mem",
720 .flags = IORESOURCE_MEM,
721 .start = MSM_SDC5_BASE,
722 .end = MSM_SDC5_DML_BASE - 1,
723 },
724 {
725 .name = "core_irq",
726 .flags = IORESOURCE_IRQ,
727 .start = SDC5_IRQ_0,
728 .end = SDC5_IRQ_0
729 },
730#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
731 {
732 .name = "sdcc_dml_addr",
733 .start = MSM_SDC5_DML_BASE,
734 .end = MSM_SDC5_BAM_BASE - 1,
735 .flags = IORESOURCE_MEM,
736 },
737 {
738 .name = "sdcc_bam_addr",
739 .start = MSM_SDC5_BAM_BASE,
740 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
741 .flags = IORESOURCE_MEM,
742 },
743 {
744 .name = "sdcc_bam_irq",
745 .start = SDC5_BAM_IRQ,
746 .end = SDC5_BAM_IRQ,
747 .flags = IORESOURCE_IRQ,
748 },
749#endif
750};
751
752struct platform_device msm_device_sdc1 = {
753 .name = "msm_sdcc",
754 .id = 1,
755 .num_resources = ARRAY_SIZE(resources_sdc1),
756 .resource = resources_sdc1,
757 .dev = {
758 .coherent_dma_mask = 0xffffffff,
759 },
760};
761
762struct platform_device msm_device_sdc2 = {
763 .name = "msm_sdcc",
764 .id = 2,
765 .num_resources = ARRAY_SIZE(resources_sdc2),
766 .resource = resources_sdc2,
767 .dev = {
768 .coherent_dma_mask = 0xffffffff,
769 },
770};
771
772struct platform_device msm_device_sdc3 = {
773 .name = "msm_sdcc",
774 .id = 3,
775 .num_resources = ARRAY_SIZE(resources_sdc3),
776 .resource = resources_sdc3,
777 .dev = {
778 .coherent_dma_mask = 0xffffffff,
779 },
780};
781
782struct platform_device msm_device_sdc4 = {
783 .name = "msm_sdcc",
784 .id = 4,
785 .num_resources = ARRAY_SIZE(resources_sdc4),
786 .resource = resources_sdc4,
787 .dev = {
788 .coherent_dma_mask = 0xffffffff,
789 },
790};
791
792struct platform_device msm_device_sdc5 = {
793 .name = "msm_sdcc",
794 .id = 5,
795 .num_resources = ARRAY_SIZE(resources_sdc5),
796 .resource = resources_sdc5,
797 .dev = {
798 .coherent_dma_mask = 0xffffffff,
799 },
800};
801
802struct platform_device msm_device_smd = {
803 .name = "msm_smd",
804 .id = -1,
805};
806
807struct platform_device msm_device_bam_dmux = {
808 .name = "BAM_RMNT",
809 .id = -1,
810};
811
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700812static struct msm_watchdog_pdata msm_watchdog_pdata = {
813 .pet_time = 10000,
814 .bark_time = 11000,
815 .has_secure = true,
816};
817
818struct platform_device msm8960_device_watchdog = {
819 .name = "msm_watchdog",
820 .id = -1,
821 .dev = {
822 .platform_data = &msm_watchdog_pdata,
823 },
824};
825
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700826static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700827 {
828 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700829 .flags = IORESOURCE_IRQ,
830 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700831 {
832 .start = 0x18320000,
833 .end = 0x18320000 + SZ_1M - 1,
834 .flags = IORESOURCE_MEM,
835 },
836};
837
838static struct msm_dmov_pdata msm_dmov_pdata = {
839 .sd = 1,
840 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700841};
842
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700843struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700844 .name = "msm_dmov",
845 .id = -1,
846 .resource = msm_dmov_resource,
847 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700848 .dev = {
849 .platform_data = &msm_dmov_pdata,
850 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700851};
852
853static struct platform_device *msm_sdcc_devices[] __initdata = {
854 &msm_device_sdc1,
855 &msm_device_sdc2,
856 &msm_device_sdc3,
857 &msm_device_sdc4,
858 &msm_device_sdc5,
859};
860
861int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
862{
863 struct platform_device *pdev;
864
865 if (controller < 1 || controller > 5)
866 return -EINVAL;
867
868 pdev = msm_sdcc_devices[controller-1];
869 pdev->dev.platform_data = plat;
870 return platform_device_register(pdev);
871}
872
873static struct resource resources_qup_i2c_gsbi4[] = {
874 {
875 .name = "gsbi_qup_i2c_addr",
876 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600877 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700878 .flags = IORESOURCE_MEM,
879 },
880 {
881 .name = "qup_phys_addr",
882 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600883 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700884 .flags = IORESOURCE_MEM,
885 },
886 {
887 .name = "qup_err_intr",
888 .start = GSBI4_QUP_IRQ,
889 .end = GSBI4_QUP_IRQ,
890 .flags = IORESOURCE_IRQ,
891 },
892};
893
894struct platform_device msm8960_device_qup_i2c_gsbi4 = {
895 .name = "qup_i2c",
896 .id = 4,
897 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
898 .resource = resources_qup_i2c_gsbi4,
899};
900
901static struct resource resources_qup_i2c_gsbi3[] = {
902 {
903 .name = "gsbi_qup_i2c_addr",
904 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600905 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700906 .flags = IORESOURCE_MEM,
907 },
908 {
909 .name = "qup_phys_addr",
910 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600911 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700912 .flags = IORESOURCE_MEM,
913 },
914 {
915 .name = "qup_err_intr",
916 .start = GSBI3_QUP_IRQ,
917 .end = GSBI3_QUP_IRQ,
918 .flags = IORESOURCE_IRQ,
919 },
920};
921
922struct platform_device msm8960_device_qup_i2c_gsbi3 = {
923 .name = "qup_i2c",
924 .id = 3,
925 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
926 .resource = resources_qup_i2c_gsbi3,
927};
928
929static struct resource resources_qup_i2c_gsbi10[] = {
930 {
931 .name = "gsbi_qup_i2c_addr",
932 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600933 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700934 .flags = IORESOURCE_MEM,
935 },
936 {
937 .name = "qup_phys_addr",
938 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600939 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700940 .flags = IORESOURCE_MEM,
941 },
942 {
943 .name = "qup_err_intr",
944 .start = GSBI10_QUP_IRQ,
945 .end = GSBI10_QUP_IRQ,
946 .flags = IORESOURCE_IRQ,
947 },
948};
949
950struct platform_device msm8960_device_qup_i2c_gsbi10 = {
951 .name = "qup_i2c",
952 .id = 10,
953 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
954 .resource = resources_qup_i2c_gsbi10,
955};
956
957static struct resource resources_qup_i2c_gsbi12[] = {
958 {
959 .name = "gsbi_qup_i2c_addr",
960 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600961 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700962 .flags = IORESOURCE_MEM,
963 },
964 {
965 .name = "qup_phys_addr",
966 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -0600967 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700968 .flags = IORESOURCE_MEM,
969 },
970 {
971 .name = "qup_err_intr",
972 .start = GSBI12_QUP_IRQ,
973 .end = GSBI12_QUP_IRQ,
974 .flags = IORESOURCE_IRQ,
975 },
976};
977
978struct platform_device msm8960_device_qup_i2c_gsbi12 = {
979 .name = "qup_i2c",
980 .id = 12,
981 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
982 .resource = resources_qup_i2c_gsbi12,
983};
984
985#ifdef CONFIG_MSM_CAMERA
986struct resource msm_camera_resources[] = {
987 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700988 .name = "vid_buf",
989 .flags = IORESOURCE_DMA,
990 },
991 {
Nishant Pandit24153d82011-08-27 16:05:13 +0530992 .name = "s3d_rw",
993 .start = 0x008003E0,
994 .end = 0x008003E0 + SZ_16 - 1,
995 .flags = IORESOURCE_MEM,
996 },
997 {
998 .name = "s3d_ctl",
999 .start = 0x008020B8,
1000 .end = 0x008020B8 + SZ_16 - 1,
1001 .flags = IORESOURCE_MEM,
1002 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001003};
1004
1005int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1006{
1007 s_info->resource = msm_camera_resources;
1008 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1009 return 0;
1010}
Kevin Chanf6216f22011-10-25 18:40:11 -07001011
1012static struct resource msm_csiphy0_resources[] = {
1013 {
1014 .name = "csiphy",
1015 .start = 0x04800C00,
1016 .end = 0x04800C00 + SZ_1K - 1,
1017 .flags = IORESOURCE_MEM,
1018 },
1019 {
1020 .name = "csiphy",
1021 .start = CSIPHY_4LN_IRQ,
1022 .end = CSIPHY_4LN_IRQ,
1023 .flags = IORESOURCE_IRQ,
1024 },
1025};
1026
1027static struct resource msm_csiphy1_resources[] = {
1028 {
1029 .name = "csiphy",
1030 .start = 0x04801000,
1031 .end = 0x04801000 + SZ_1K - 1,
1032 .flags = IORESOURCE_MEM,
1033 },
1034 {
1035 .name = "csiphy",
1036 .start = MSM8960_CSIPHY_2LN_IRQ,
1037 .end = MSM8960_CSIPHY_2LN_IRQ,
1038 .flags = IORESOURCE_IRQ,
1039 },
1040};
1041
1042struct platform_device msm8960_device_csiphy0 = {
1043 .name = "msm_csiphy",
1044 .id = 0,
1045 .resource = msm_csiphy0_resources,
1046 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1047};
1048
1049struct platform_device msm8960_device_csiphy1 = {
1050 .name = "msm_csiphy",
1051 .id = 1,
1052 .resource = msm_csiphy1_resources,
1053 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1054};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001055
1056static struct resource msm_csid0_resources[] = {
1057 {
1058 .name = "csid",
1059 .start = 0x04800000,
1060 .end = 0x04800000 + SZ_1K - 1,
1061 .flags = IORESOURCE_MEM,
1062 },
1063 {
1064 .name = "csid",
1065 .start = CSI_0_IRQ,
1066 .end = CSI_0_IRQ,
1067 .flags = IORESOURCE_IRQ,
1068 },
1069};
1070
1071static struct resource msm_csid1_resources[] = {
1072 {
1073 .name = "csid",
1074 .start = 0x04800400,
1075 .end = 0x04800400 + SZ_1K - 1,
1076 .flags = IORESOURCE_MEM,
1077 },
1078 {
1079 .name = "csid",
1080 .start = CSI_1_IRQ,
1081 .end = CSI_1_IRQ,
1082 .flags = IORESOURCE_IRQ,
1083 },
1084};
1085
1086struct platform_device msm8960_device_csid0 = {
1087 .name = "msm_csid",
1088 .id = 0,
1089 .resource = msm_csid0_resources,
1090 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1091};
1092
1093struct platform_device msm8960_device_csid1 = {
1094 .name = "msm_csid",
1095 .id = 1,
1096 .resource = msm_csid1_resources,
1097 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1098};
Kevin Chane12c6672011-10-26 11:55:26 -07001099
1100struct resource msm_ispif_resources[] = {
1101 {
1102 .name = "ispif",
1103 .start = 0x04800800,
1104 .end = 0x04800800 + SZ_1K - 1,
1105 .flags = IORESOURCE_MEM,
1106 },
1107 {
1108 .name = "ispif",
1109 .start = ISPIF_IRQ,
1110 .end = ISPIF_IRQ,
1111 .flags = IORESOURCE_IRQ,
1112 },
1113};
1114
1115struct platform_device msm8960_device_ispif = {
1116 .name = "msm_ispif",
1117 .id = 0,
1118 .resource = msm_ispif_resources,
1119 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1120};
Kevin Chan5827c552011-10-28 18:36:32 -07001121
1122static struct resource msm_vfe_resources[] = {
1123 {
1124 .name = "vfe32",
1125 .start = 0x04500000,
1126 .end = 0x04500000 + SZ_1M - 1,
1127 .flags = IORESOURCE_MEM,
1128 },
1129 {
1130 .name = "vfe32",
1131 .start = VFE_IRQ,
1132 .end = VFE_IRQ,
1133 .flags = IORESOURCE_IRQ,
1134 },
1135};
1136
1137struct platform_device msm8960_device_vfe = {
1138 .name = "msm_vfe",
1139 .id = 0,
1140 .resource = msm_vfe_resources,
1141 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1142};
Kevin Chana0853122011-11-07 19:48:44 -08001143
1144static struct resource msm_vpe_resources[] = {
1145 {
1146 .name = "vpe",
1147 .start = 0x05300000,
1148 .end = 0x05300000 + SZ_1M - 1,
1149 .flags = IORESOURCE_MEM,
1150 },
1151 {
1152 .name = "vpe",
1153 .start = VPE_IRQ,
1154 .end = VPE_IRQ,
1155 .flags = IORESOURCE_IRQ,
1156 },
1157};
1158
1159struct platform_device msm8960_device_vpe = {
1160 .name = "msm_vpe",
1161 .id = 0,
1162 .resource = msm_vpe_resources,
1163 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1164};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001165#endif
1166
1167static struct resource resources_ssbi_pm8921[] = {
1168 {
1169 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1170 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1171 .flags = IORESOURCE_MEM,
1172 },
1173};
1174
1175struct platform_device msm8960_device_ssbi_pm8921 = {
1176 .name = "msm_ssbi",
1177 .id = 0,
1178 .resource = resources_ssbi_pm8921,
1179 .num_resources = ARRAY_SIZE(resources_ssbi_pm8921),
1180};
1181
1182static struct resource resources_qup_spi_gsbi1[] = {
1183 {
1184 .name = "spi_base",
1185 .start = MSM_GSBI1_QUP_PHYS,
1186 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1187 .flags = IORESOURCE_MEM,
1188 },
1189 {
1190 .name = "gsbi_base",
1191 .start = MSM_GSBI1_PHYS,
1192 .end = MSM_GSBI1_PHYS + 4 - 1,
1193 .flags = IORESOURCE_MEM,
1194 },
1195 {
1196 .name = "spi_irq_in",
1197 .start = MSM8960_GSBI1_QUP_IRQ,
1198 .end = MSM8960_GSBI1_QUP_IRQ,
1199 .flags = IORESOURCE_IRQ,
1200 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001201 {
1202 .name = "spi_clk",
1203 .start = 9,
1204 .end = 9,
1205 .flags = IORESOURCE_IO,
1206 },
1207 {
1208 .name = "spi_cs",
1209 .start = 8,
1210 .end = 8,
1211 .flags = IORESOURCE_IO,
1212 },
1213 {
Chandan Uddaraju15e54b92011-09-12 10:52:36 -07001214 .name = "spi_cs1",
1215 .start = 14,
1216 .end = 14,
1217 .flags = IORESOURCE_IO,
1218 },
1219 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001220 .name = "spi_miso",
1221 .start = 7,
1222 .end = 7,
1223 .flags = IORESOURCE_IO,
1224 },
1225 {
1226 .name = "spi_mosi",
1227 .start = 6,
1228 .end = 6,
1229 .flags = IORESOURCE_IO,
1230 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001231};
1232
1233struct platform_device msm8960_device_qup_spi_gsbi1 = {
1234 .name = "spi_qsd",
1235 .id = 0,
1236 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1237 .resource = resources_qup_spi_gsbi1,
1238};
1239
1240struct platform_device msm_pcm = {
1241 .name = "msm-pcm-dsp",
1242 .id = -1,
1243};
1244
1245struct platform_device msm_pcm_routing = {
1246 .name = "msm-pcm-routing",
1247 .id = -1,
1248};
1249
1250struct platform_device msm_cpudai0 = {
1251 .name = "msm-dai-q6",
1252 .id = 0x4000,
1253};
1254
1255struct platform_device msm_cpudai1 = {
1256 .name = "msm-dai-q6",
1257 .id = 0x4001,
1258};
1259
1260struct platform_device msm_cpudai_hdmi_rx = {
1261 .name = "msm-dai-q6",
1262 .id = 8,
1263};
1264
1265struct platform_device msm_cpudai_bt_rx = {
1266 .name = "msm-dai-q6",
1267 .id = 0x3000,
1268};
1269
1270struct platform_device msm_cpudai_bt_tx = {
1271 .name = "msm-dai-q6",
1272 .id = 0x3001,
1273};
1274
1275struct platform_device msm_cpudai_fm_rx = {
1276 .name = "msm-dai-q6",
1277 .id = 0x3004,
1278};
1279
1280struct platform_device msm_cpudai_fm_tx = {
1281 .name = "msm-dai-q6",
1282 .id = 0x3005,
1283};
1284
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001285/*
1286 * Machine specific data for AUX PCM Interface
1287 * which the driver will be unware of.
1288 */
1289struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1290 .clk = "pcm_clk",
1291 .mode = AFE_PCM_CFG_MODE_PCM,
1292 .sync = AFE_PCM_CFG_SYNC_INT,
1293 .frame = AFE_PCM_CFG_FRM_256BPF,
1294 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1295 .slot = 0,
1296 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1297 .pcm_clk_rate = 2048000,
1298};
1299
1300struct platform_device msm_cpudai_auxpcm_rx = {
1301 .name = "msm-dai-q6",
1302 .id = 2,
1303 .dev = {
1304 .platform_data = &auxpcm_rx_pdata,
1305 },
1306};
1307
1308struct platform_device msm_cpudai_auxpcm_tx = {
1309 .name = "msm-dai-q6",
1310 .id = 3,
1311};
1312
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001313struct platform_device msm_cpu_fe = {
1314 .name = "msm-dai-fe",
1315 .id = -1,
1316};
1317
1318struct platform_device msm_stub_codec = {
1319 .name = "msm-stub-codec",
1320 .id = 1,
1321};
1322
1323struct platform_device msm_voice = {
1324 .name = "msm-pcm-voice",
1325 .id = -1,
1326};
1327
1328struct platform_device msm_voip = {
1329 .name = "msm-voip-dsp",
1330 .id = -1,
1331};
1332
1333struct platform_device msm_lpa_pcm = {
1334 .name = "msm-pcm-lpa",
1335 .id = -1,
1336};
1337
1338struct platform_device msm_pcm_hostless = {
1339 .name = "msm-pcm-hostless",
1340 .id = -1,
1341};
1342
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301343struct platform_device msm_cpudai_afe_01_rx = {
1344 .name = "msm-dai-q6",
1345 .id = 0xE0,
1346};
1347
1348struct platform_device msm_cpudai_afe_01_tx = {
1349 .name = "msm-dai-q6",
1350 .id = 0xF0,
1351};
1352
1353struct platform_device msm_cpudai_afe_02_rx = {
1354 .name = "msm-dai-q6",
1355 .id = 0xF1,
1356};
1357
1358struct platform_device msm_cpudai_afe_02_tx = {
1359 .name = "msm-dai-q6",
1360 .id = 0xE1,
1361};
1362
1363struct platform_device msm_pcm_afe = {
1364 .name = "msm-pcm-afe",
1365 .id = -1,
1366};
1367
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001368struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001369 FS_8X60(FS_MDP, "fs_mdp"),
1370 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001371 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1372 FS_8X60(FS_VFE, "fs_vfe"),
1373 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001374 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1375 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1376 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001377 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001378};
1379unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1380
1381#ifdef CONFIG_MSM_ROTATOR
1382#define ROTATOR_HW_BASE 0x04E00000
1383static struct resource resources_msm_rotator[] = {
1384 {
1385 .start = ROTATOR_HW_BASE,
1386 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1387 .flags = IORESOURCE_MEM,
1388 },
1389 {
1390 .start = ROT_IRQ,
1391 .end = ROT_IRQ,
1392 .flags = IORESOURCE_IRQ,
1393 },
1394};
1395
1396static struct msm_rot_clocks rotator_clocks[] = {
1397 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001398 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001399 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001400 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001401 },
1402 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001403 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001404 .clk_type = ROTATOR_PCLK,
1405 .clk_rate = 0,
1406 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001407};
1408
1409static struct msm_rotator_platform_data rotator_pdata = {
1410 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1411 .hardware_version_number = 0x01020309,
1412 .rotator_clks = rotator_clocks,
1413 .regulator_name = "fs_rot",
1414};
1415
1416struct platform_device msm_rotator_device = {
1417 .name = "msm_rotator",
1418 .id = 0,
1419 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1420 .resource = resources_msm_rotator,
1421 .dev = {
1422 .platform_data = &rotator_pdata,
1423 },
1424};
1425#endif
1426
1427#define MIPI_DSI_HW_BASE 0x04700000
1428#define MDP_HW_BASE 0x05100000
1429
1430static struct resource msm_mipi_dsi1_resources[] = {
1431 {
1432 .name = "mipi_dsi",
1433 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001434 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001435 .flags = IORESOURCE_MEM,
1436 },
1437 {
1438 .start = DSI1_IRQ,
1439 .end = DSI1_IRQ,
1440 .flags = IORESOURCE_IRQ,
1441 },
1442};
1443
1444struct platform_device msm_mipi_dsi1_device = {
1445 .name = "mipi_dsi",
1446 .id = 1,
1447 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1448 .resource = msm_mipi_dsi1_resources,
1449};
1450
1451static struct resource msm_mdp_resources[] = {
1452 {
1453 .name = "mdp",
1454 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001455 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001456 .flags = IORESOURCE_MEM,
1457 },
1458 {
1459 .start = MDP_IRQ,
1460 .end = MDP_IRQ,
1461 .flags = IORESOURCE_IRQ,
1462 },
1463};
1464
1465static struct platform_device msm_mdp_device = {
1466 .name = "mdp",
1467 .id = 0,
1468 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1469 .resource = msm_mdp_resources,
1470};
1471
1472static void __init msm_register_device(struct platform_device *pdev, void *data)
1473{
1474 int ret;
1475
1476 pdev->dev.platform_data = data;
1477 ret = platform_device_register(pdev);
1478 if (ret)
1479 dev_err(&pdev->dev,
1480 "%s: platform_device_register() failed = %d\n",
1481 __func__, ret);
1482}
1483
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001484#ifdef CONFIG_MSM_BUS_SCALING
1485static struct platform_device msm_dtv_device = {
1486 .name = "dtv",
1487 .id = 0,
1488};
1489#endif
1490
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001491void __init msm_fb_register_device(char *name, void *data)
1492{
1493 if (!strncmp(name, "mdp", 3))
1494 msm_register_device(&msm_mdp_device, data);
1495 else if (!strncmp(name, "mipi_dsi", 8))
1496 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001497#ifdef CONFIG_MSM_BUS_SCALING
1498 else if (!strncmp(name, "dtv", 3))
1499 msm_register_device(&msm_dtv_device, data);
1500#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001501 else
1502 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1503}
1504
1505static struct resource resources_sps[] = {
1506 {
1507 .name = "pipe_mem",
1508 .start = 0x12800000,
1509 .end = 0x12800000 + 0x4000 - 1,
1510 .flags = IORESOURCE_MEM,
1511 },
1512 {
1513 .name = "bamdma_dma",
1514 .start = 0x12240000,
1515 .end = 0x12240000 + 0x1000 - 1,
1516 .flags = IORESOURCE_MEM,
1517 },
1518 {
1519 .name = "bamdma_bam",
1520 .start = 0x12244000,
1521 .end = 0x12244000 + 0x4000 - 1,
1522 .flags = IORESOURCE_MEM,
1523 },
1524 {
1525 .name = "bamdma_irq",
1526 .start = SPS_BAM_DMA_IRQ,
1527 .end = SPS_BAM_DMA_IRQ,
1528 .flags = IORESOURCE_IRQ,
1529 },
1530};
1531
1532struct msm_sps_platform_data msm_sps_pdata = {
1533 .bamdma_restricted_pipes = 0x06,
1534};
1535
1536struct platform_device msm_device_sps = {
1537 .name = "msm_sps",
1538 .id = -1,
1539 .num_resources = ARRAY_SIZE(resources_sps),
1540 .resource = resources_sps,
1541 .dev.platform_data = &msm_sps_pdata,
1542};
1543
1544#ifdef CONFIG_MSM_MPM
1545static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001546 [1] = MSM_GPIO_TO_INT(46),
1547 [2] = MSM_GPIO_TO_INT(150),
1548 [4] = MSM_GPIO_TO_INT(103),
1549 [5] = MSM_GPIO_TO_INT(104),
1550 [6] = MSM_GPIO_TO_INT(105),
1551 [7] = MSM_GPIO_TO_INT(106),
1552 [8] = MSM_GPIO_TO_INT(107),
1553 [9] = MSM_GPIO_TO_INT(7),
1554 [10] = MSM_GPIO_TO_INT(11),
1555 [11] = MSM_GPIO_TO_INT(15),
1556 [12] = MSM_GPIO_TO_INT(19),
1557 [13] = MSM_GPIO_TO_INT(23),
1558 [14] = MSM_GPIO_TO_INT(27),
1559 [15] = MSM_GPIO_TO_INT(31),
1560 [16] = MSM_GPIO_TO_INT(35),
1561 [19] = MSM_GPIO_TO_INT(90),
1562 [20] = MSM_GPIO_TO_INT(92),
1563 [23] = MSM_GPIO_TO_INT(85),
1564 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001565 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001566 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001567 [29] = MSM_GPIO_TO_INT(10),
1568 [30] = MSM_GPIO_TO_INT(102),
1569 [31] = MSM_GPIO_TO_INT(81),
1570 [32] = MSM_GPIO_TO_INT(78),
1571 [33] = MSM_GPIO_TO_INT(94),
1572 [34] = MSM_GPIO_TO_INT(72),
1573 [35] = MSM_GPIO_TO_INT(39),
1574 [36] = MSM_GPIO_TO_INT(43),
1575 [37] = MSM_GPIO_TO_INT(61),
1576 [38] = MSM_GPIO_TO_INT(50),
1577 [39] = MSM_GPIO_TO_INT(42),
1578 [41] = MSM_GPIO_TO_INT(62),
1579 [42] = MSM_GPIO_TO_INT(76),
1580 [43] = MSM_GPIO_TO_INT(75),
1581 [44] = MSM_GPIO_TO_INT(70),
1582 [45] = MSM_GPIO_TO_INT(69),
1583 [46] = MSM_GPIO_TO_INT(67),
1584 [47] = MSM_GPIO_TO_INT(65),
1585 [48] = MSM_GPIO_TO_INT(58),
1586 [49] = MSM_GPIO_TO_INT(54),
1587 [50] = MSM_GPIO_TO_INT(52),
1588 [51] = MSM_GPIO_TO_INT(49),
1589 [52] = MSM_GPIO_TO_INT(40),
1590 [53] = MSM_GPIO_TO_INT(37),
1591 [54] = MSM_GPIO_TO_INT(24),
1592 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001593};
1594
1595static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1596 TLMM_MSM_SUMMARY_IRQ,
1597 RPM_APCC_CPU0_GP_HIGH_IRQ,
1598 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1599 RPM_APCC_CPU0_GP_LOW_IRQ,
1600 RPM_APCC_CPU0_WAKE_UP_IRQ,
1601 RPM_APCC_CPU1_GP_HIGH_IRQ,
1602 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1603 RPM_APCC_CPU1_GP_LOW_IRQ,
1604 RPM_APCC_CPU1_WAKE_UP_IRQ,
1605 MSS_TO_APPS_IRQ_0,
1606 MSS_TO_APPS_IRQ_1,
1607 MSS_TO_APPS_IRQ_2,
1608 MSS_TO_APPS_IRQ_3,
1609 MSS_TO_APPS_IRQ_4,
1610 MSS_TO_APPS_IRQ_5,
1611 MSS_TO_APPS_IRQ_6,
1612 MSS_TO_APPS_IRQ_7,
1613 MSS_TO_APPS_IRQ_8,
1614 MSS_TO_APPS_IRQ_9,
1615 LPASS_SCSS_GP_LOW_IRQ,
1616 LPASS_SCSS_GP_MEDIUM_IRQ,
1617 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001618 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001619 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001620 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001621 RIVA_APPS_WLAN_SMSM_IRQ,
1622 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1623 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001624};
1625
1626struct msm_mpm_device_data msm_mpm_dev_data = {
1627 .irqs_m2a = msm_mpm_irqs_m2a,
1628 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1629 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1630 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1631 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1632 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1633 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1634 .mpm_apps_ipc_val = BIT(1),
1635 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1636
1637};
1638#endif
1639
Stephen Boydbb600ae2011-08-02 20:11:40 -07001640static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001641 CLK_DUMMY("pll2", PLL2, NULL, 0),
1642 CLK_DUMMY("pll8", PLL8, NULL, 0),
1643 CLK_DUMMY("pll4", PLL4, NULL, 0),
1644
1645 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1646 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1647 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1648 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1649 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1650 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1651 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1652 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1653 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1654 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1655 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1656 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1657 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1658 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1659 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1660 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1661
Matt Wagantalle2522372011-08-17 14:52:21 -07001662 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1663 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1664 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1665 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1666 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1667 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1668 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1669 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1670 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1671 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1672 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1673 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001674 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1675 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1676 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1677 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1678 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1679 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1680 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1681 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1682 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1683 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1684 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1685 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001686 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001687 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001688 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001689 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1690 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1691 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1692 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1693 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001694 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001695 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001696 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1697 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1698 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1699 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1700 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1701 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1702 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1703 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001704 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1705 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001706 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1707 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001708 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001709 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001710 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001711 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001712 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001713 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1714 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1715 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1716 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1717 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1718 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1719 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001720 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001721 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1722 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1723 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001724 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1725 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1726 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1727 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1728 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001729 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1730 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001731 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1732 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1733 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1734 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1735 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001736 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1737 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1738 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1739 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1740 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1741 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1742 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1743 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1744 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1745 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1746 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1747 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1748 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1749 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1750 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001751 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1752 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1753 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001754 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001755 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001756 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001757 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1758 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1759 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001760 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001761 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1762 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1763 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001764 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001765 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1766 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1767 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1768 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1769 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1770 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1771 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1772 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1773 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001774 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001775 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1776 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1777 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1778 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1779 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1780 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1781 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1782 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1783 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1784 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001785 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1786 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1787 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001788 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1789 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1790 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1791 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001792 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001793 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001794 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001795 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001796 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1797 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1798 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1799 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1800 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1801 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1802 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1803 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1804 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1805 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1806 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1807 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1808 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1809 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1810 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001811 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1812 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1813 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1814 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1815 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1816 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001817
1818 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1819 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001820 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1821 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1822 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1823 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1824 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001825 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1826 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1827};
1828
Stephen Boydbb600ae2011-08-02 20:11:40 -07001829struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1830 .table = msm_clocks_8960_dummy,
1831 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1832};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001833
1834#define LPASS_SLIMBUS_PHYS 0x28080000
1835#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001836#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001837/* Board info for the slimbus slave device */
1838static struct resource slimbus_res[] = {
1839 {
1840 .start = LPASS_SLIMBUS_PHYS,
1841 .end = LPASS_SLIMBUS_PHYS + 8191,
1842 .flags = IORESOURCE_MEM,
1843 .name = "slimbus_physical",
1844 },
1845 {
1846 .start = LPASS_SLIMBUS_BAM_PHYS,
1847 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1848 .flags = IORESOURCE_MEM,
1849 .name = "slimbus_bam_physical",
1850 },
1851 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001852 .start = LPASS_SLIMBUS_SLEW,
1853 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1854 .flags = IORESOURCE_MEM,
1855 .name = "slimbus_slew_reg",
1856 },
1857 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001858 .start = SLIMBUS0_CORE_EE1_IRQ,
1859 .end = SLIMBUS0_CORE_EE1_IRQ,
1860 .flags = IORESOURCE_IRQ,
1861 .name = "slimbus_irq",
1862 },
1863 {
1864 .start = SLIMBUS0_BAM_EE1_IRQ,
1865 .end = SLIMBUS0_BAM_EE1_IRQ,
1866 .flags = IORESOURCE_IRQ,
1867 .name = "slimbus_bam_irq",
1868 },
1869};
1870
1871struct platform_device msm_slim_ctrl = {
1872 .name = "msm_slim_ctrl",
1873 .id = 1,
1874 .num_resources = ARRAY_SIZE(slimbus_res),
1875 .resource = slimbus_res,
1876 .dev = {
1877 .coherent_dma_mask = 0xffffffffULL,
1878 },
1879};
1880
1881#ifdef CONFIG_MSM_BUS_SCALING
1882static struct msm_bus_vectors grp3d_init_vectors[] = {
1883 {
1884 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1885 .dst = MSM_BUS_SLAVE_EBI_CH0,
1886 .ab = 0,
1887 .ib = 0,
1888 },
1889};
1890
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001891static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001892 {
1893 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1894 .dst = MSM_BUS_SLAVE_EBI_CH0,
1895 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001896 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001897 },
1898};
1899
1900static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
1901 {
1902 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1903 .dst = MSM_BUS_SLAVE_EBI_CH0,
1904 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001905 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001906 },
1907};
1908
1909static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
1910 {
1911 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1912 .dst = MSM_BUS_SLAVE_EBI_CH0,
1913 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001914 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001915 },
1916};
1917
1918static struct msm_bus_vectors grp3d_max_vectors[] = {
1919 {
1920 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1921 .dst = MSM_BUS_SLAVE_EBI_CH0,
1922 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001923 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001924 },
1925};
1926
1927static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
1928 {
1929 ARRAY_SIZE(grp3d_init_vectors),
1930 grp3d_init_vectors,
1931 },
1932 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001933 ARRAY_SIZE(grp3d_low_vectors),
1934 grp3d_low_vectors,
1935 },
1936 {
1937 ARRAY_SIZE(grp3d_nominal_low_vectors),
1938 grp3d_nominal_low_vectors,
1939 },
1940 {
1941 ARRAY_SIZE(grp3d_nominal_high_vectors),
1942 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001943 },
1944 {
1945 ARRAY_SIZE(grp3d_max_vectors),
1946 grp3d_max_vectors,
1947 },
1948};
1949
1950static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
1951 grp3d_bus_scale_usecases,
1952 ARRAY_SIZE(grp3d_bus_scale_usecases),
1953 .name = "grp3d",
1954};
1955
1956static struct msm_bus_vectors grp2d0_init_vectors[] = {
1957 {
1958 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1959 .dst = MSM_BUS_SLAVE_EBI_CH0,
1960 .ab = 0,
1961 .ib = 0,
1962 },
1963};
1964
1965static struct msm_bus_vectors grp2d0_max_vectors[] = {
1966 {
1967 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1968 .dst = MSM_BUS_SLAVE_EBI_CH0,
1969 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07001970 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001971 },
1972};
1973
1974static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
1975 {
1976 ARRAY_SIZE(grp2d0_init_vectors),
1977 grp2d0_init_vectors,
1978 },
1979 {
1980 ARRAY_SIZE(grp2d0_max_vectors),
1981 grp2d0_max_vectors,
1982 },
1983};
1984
1985struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
1986 grp2d0_bus_scale_usecases,
1987 ARRAY_SIZE(grp2d0_bus_scale_usecases),
1988 .name = "grp2d0",
1989};
1990
1991static struct msm_bus_vectors grp2d1_init_vectors[] = {
1992 {
1993 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
1994 .dst = MSM_BUS_SLAVE_EBI_CH0,
1995 .ab = 0,
1996 .ib = 0,
1997 },
1998};
1999
2000static struct msm_bus_vectors grp2d1_max_vectors[] = {
2001 {
2002 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2003 .dst = MSM_BUS_SLAVE_EBI_CH0,
2004 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002005 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002006 },
2007};
2008
2009static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2010 {
2011 ARRAY_SIZE(grp2d1_init_vectors),
2012 grp2d1_init_vectors,
2013 },
2014 {
2015 ARRAY_SIZE(grp2d1_max_vectors),
2016 grp2d1_max_vectors,
2017 },
2018};
2019
2020struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2021 grp2d1_bus_scale_usecases,
2022 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2023 .name = "grp2d1",
2024};
2025#endif
2026
2027static struct resource kgsl_3d0_resources[] = {
2028 {
2029 .name = KGSL_3D0_REG_MEMORY,
2030 .start = 0x04300000, /* GFX3D address */
2031 .end = 0x0431ffff,
2032 .flags = IORESOURCE_MEM,
2033 },
2034 {
2035 .name = KGSL_3D0_IRQ,
2036 .start = GFX3D_IRQ,
2037 .end = GFX3D_IRQ,
2038 .flags = IORESOURCE_IRQ,
2039 },
2040};
2041
2042static struct kgsl_device_platform_data kgsl_3d0_pdata = {
2043 .pwr_data = {
2044 .pwrlevel = {
2045 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002046 .gpu_freq = 400000000,
2047 .bus_freq = 4,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002048 .io_fraction = 0,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002049 },
2050 {
2051 .gpu_freq = 300000000,
2052 .bus_freq = 3,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002053 .io_fraction = 33,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002054 },
2055 {
2056 .gpu_freq = 200000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002057 .bus_freq = 2,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002058 .io_fraction = 100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002059 },
2060 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002061 .gpu_freq = 128000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002062 .bus_freq = 1,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002063 .io_fraction = 100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002064 },
2065 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002066 .gpu_freq = 27000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002067 .bus_freq = 0,
2068 },
2069 },
Lucille Sylvester5d0ac132011-09-21 10:15:01 -06002070 .init_level = 0,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002071 .num_levels = 5,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002072 .set_grp_async = NULL,
2073 .idle_timeout = HZ/5,
Jeremy Gebbend3342ee2011-10-18 09:53:17 -06002074 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002075 },
2076 .clk = {
2077 .name = {
Matt Wagantall9dc01632011-08-17 18:55:04 -07002078 .clk = "core_clk",
2079 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002080 },
2081#ifdef CONFIG_MSM_BUS_SCALING
2082 .bus_scale_table = &grp3d_bus_scale_pdata,
2083#endif
2084 },
2085 .imem_clk_name = {
2086 .clk = NULL,
Matt Wagantall9dc01632011-08-17 18:55:04 -07002087 .pclk = "mem_iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002088 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002089 .iommu_user_ctx_name = "gfx3d_user",
2090 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002091};
2092
2093struct platform_device msm_kgsl_3d0 = {
2094 .name = "kgsl-3d0",
2095 .id = 0,
2096 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2097 .resource = kgsl_3d0_resources,
2098 .dev = {
2099 .platform_data = &kgsl_3d0_pdata,
2100 },
2101};
2102
2103static struct resource kgsl_2d0_resources[] = {
2104 {
2105 .name = KGSL_2D0_REG_MEMORY,
2106 .start = 0x04100000, /* Z180 base address */
2107 .end = 0x04100FFF,
2108 .flags = IORESOURCE_MEM,
2109 },
2110 {
2111 .name = KGSL_2D0_IRQ,
2112 .start = GFX2D0_IRQ,
2113 .end = GFX2D0_IRQ,
2114 .flags = IORESOURCE_IRQ,
2115 },
2116};
2117
2118static struct kgsl_device_platform_data kgsl_2d0_pdata = {
2119 .pwr_data = {
2120 .pwrlevel = {
2121 {
2122 .gpu_freq = 200000000,
2123 .bus_freq = 1,
2124 },
2125 {
2126 .gpu_freq = 200000000,
2127 .bus_freq = 0,
2128 },
2129 },
2130 .init_level = 0,
2131 .num_levels = 2,
2132 .set_grp_async = NULL,
2133 .idle_timeout = HZ/10,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002134 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002135 },
2136 .clk = {
2137 .name = {
2138 /* note: 2d clocks disabled on v1 */
Matt Wagantall9dc01632011-08-17 18:55:04 -07002139 .clk = "core_clk",
2140 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002141 },
2142#ifdef CONFIG_MSM_BUS_SCALING
2143 .bus_scale_table = &grp2d0_bus_scale_pdata,
2144#endif
2145 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002146 .iommu_user_ctx_name = "gfx2d0_2d0",
2147 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002148};
2149
2150struct platform_device msm_kgsl_2d0 = {
2151 .name = "kgsl-2d0",
2152 .id = 0,
2153 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2154 .resource = kgsl_2d0_resources,
2155 .dev = {
2156 .platform_data = &kgsl_2d0_pdata,
2157 },
2158};
2159
2160static struct resource kgsl_2d1_resources[] = {
2161 {
2162 .name = KGSL_2D1_REG_MEMORY,
2163 .start = 0x04200000, /* Z180 device 1 base address */
2164 .end = 0x04200FFF,
2165 .flags = IORESOURCE_MEM,
2166 },
2167 {
2168 .name = KGSL_2D1_IRQ,
2169 .start = GFX2D1_IRQ,
2170 .end = GFX2D1_IRQ,
2171 .flags = IORESOURCE_IRQ,
2172 },
2173};
2174
2175static struct kgsl_device_platform_data kgsl_2d1_pdata = {
2176 .pwr_data = {
2177 .pwrlevel = {
2178 {
2179 .gpu_freq = 200000000,
2180 .bus_freq = 1,
2181 },
2182 {
2183 .gpu_freq = 200000000,
2184 .bus_freq = 0,
2185 },
2186 },
2187 .init_level = 0,
2188 .num_levels = 2,
2189 .set_grp_async = NULL,
2190 .idle_timeout = HZ/10,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002191 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002192 },
2193 .clk = {
2194 .name = {
Matt Wagantall9dc01632011-08-17 18:55:04 -07002195 .clk = "core_clk",
2196 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002197 },
2198#ifdef CONFIG_MSM_BUS_SCALING
2199 .bus_scale_table = &grp2d1_bus_scale_pdata,
2200#endif
2201 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002202 .iommu_user_ctx_name = "gfx2d1_2d1",
2203 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002204};
2205
2206struct platform_device msm_kgsl_2d1 = {
2207 .name = "kgsl-2d1",
2208 .id = 1,
2209 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2210 .resource = kgsl_2d1_resources,
2211 .dev = {
2212 .platform_data = &kgsl_2d1_pdata,
2213 },
2214};
2215
2216#ifdef CONFIG_MSM_GEMINI
2217static struct resource msm_gemini_resources[] = {
2218 {
2219 .start = 0x04600000,
2220 .end = 0x04600000 + SZ_1M - 1,
2221 .flags = IORESOURCE_MEM,
2222 },
2223 {
2224 .start = JPEG_IRQ,
2225 .end = JPEG_IRQ,
2226 .flags = IORESOURCE_IRQ,
2227 },
2228};
2229
2230struct platform_device msm8960_gemini_device = {
2231 .name = "msm_gemini",
2232 .resource = msm_gemini_resources,
2233 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2234};
2235#endif
2236
2237struct msm_rpm_map_data rpm_map_data[] __initdata = {
2238 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2239 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2240
2241 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2242
2243 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2244 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2245 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2246 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2247 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2248 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2249 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2250 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2251 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2252 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2253
2254 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2255 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2256 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2257 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2258
2259 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2260 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2261 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002262 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002263
2264 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2265 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2266 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2267 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2268
2269 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2270 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2271 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2272 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2273 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2274 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2275 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2276 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2277 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2278 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2279 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2280 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2281 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2282 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2283 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2284 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2285 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2286 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2287 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2288 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2289 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2290 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2291 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2292 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2293 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2294 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2295 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2296 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2297 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2298 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2299 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2300 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2301 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2302 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2303 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2304 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2305 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2306 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2307 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2308 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2309 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2310 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2311 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2312 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2313 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2314 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2315 MSM_RPM_MAP(NCP_0, NCP, 2),
2316 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2317 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2318 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002319 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002320
2321};
2322unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2323
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002324struct platform_device msm_rpm_device = {
2325 .name = "msm_rpm",
2326 .id = -1,
2327};
2328
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002329static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2330 .phys_addr_base = 0x0010D204,
2331 .phys_size = SZ_8K,
2332};
2333
2334struct platform_device msm_rpm_stat_device = {
2335 .name = "msm_rpm_stat",
2336 .id = -1,
2337 .dev = {
2338 .platform_data = &msm_rpm_stat_pdata,
2339 },
2340};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002341
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002342struct platform_device msm_bus_sys_fabric = {
2343 .name = "msm_bus_fabric",
2344 .id = MSM_BUS_FAB_SYSTEM,
2345};
2346struct platform_device msm_bus_apps_fabric = {
2347 .name = "msm_bus_fabric",
2348 .id = MSM_BUS_FAB_APPSS,
2349};
2350struct platform_device msm_bus_mm_fabric = {
2351 .name = "msm_bus_fabric",
2352 .id = MSM_BUS_FAB_MMSS,
2353};
2354struct platform_device msm_bus_sys_fpb = {
2355 .name = "msm_bus_fabric",
2356 .id = MSM_BUS_FAB_SYSTEM_FPB,
2357};
2358struct platform_device msm_bus_cpss_fpb = {
2359 .name = "msm_bus_fabric",
2360 .id = MSM_BUS_FAB_CPSS_FPB,
2361};
2362
2363/* Sensors DSPS platform data */
2364#ifdef CONFIG_MSM_DSPS
2365
2366#define PPSS_REG_PHYS_BASE 0x12080000
2367
2368static struct dsps_clk_info dsps_clks[] = {};
2369static struct dsps_regulator_info dsps_regs[] = {};
2370
2371/*
2372 * Note: GPIOs field is intialized in run-time at the function
2373 * msm8960_init_dsps().
2374 */
2375
2376struct msm_dsps_platform_data msm_dsps_pdata = {
2377 .clks = dsps_clks,
2378 .clks_num = ARRAY_SIZE(dsps_clks),
2379 .gpios = NULL,
2380 .gpios_num = 0,
2381 .regs = dsps_regs,
2382 .regs_num = ARRAY_SIZE(dsps_regs),
2383 .dsps_pwr_ctl_en = 1,
2384 .signature = DSPS_SIGNATURE,
2385};
2386
2387static struct resource msm_dsps_resources[] = {
2388 {
2389 .start = PPSS_REG_PHYS_BASE,
2390 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2391 .name = "ppss_reg",
2392 .flags = IORESOURCE_MEM,
2393 },
Wentao Xua55500b2011-08-16 18:15:04 -04002394
2395 {
2396 .start = PPSS_WDOG_TIMER_IRQ,
2397 .end = PPSS_WDOG_TIMER_IRQ,
2398 .name = "ppss_wdog",
2399 .flags = IORESOURCE_IRQ,
2400 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002401};
2402
2403struct platform_device msm_dsps_device = {
2404 .name = "msm_dsps",
2405 .id = 0,
2406 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2407 .resource = msm_dsps_resources,
2408 .dev.platform_data = &msm_dsps_pdata,
2409};
2410
2411#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002412
2413#ifdef CONFIG_MSM_QDSS
2414
2415#define MSM_QDSS_PHYS_BASE 0x01A00000
2416#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2417#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2418#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002419#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002420#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2421
2422static struct resource msm_etb_resources[] = {
2423 {
2424 .start = MSM_ETB_PHYS_BASE,
2425 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2426 .flags = IORESOURCE_MEM,
2427 },
2428};
2429
2430struct platform_device msm_etb_device = {
2431 .name = "msm_etb",
2432 .id = 0,
2433 .num_resources = ARRAY_SIZE(msm_etb_resources),
2434 .resource = msm_etb_resources,
2435};
2436
2437static struct resource msm_tpiu_resources[] = {
2438 {
2439 .start = MSM_TPIU_PHYS_BASE,
2440 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2441 .flags = IORESOURCE_MEM,
2442 },
2443};
2444
2445struct platform_device msm_tpiu_device = {
2446 .name = "msm_tpiu",
2447 .id = 0,
2448 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2449 .resource = msm_tpiu_resources,
2450};
2451
2452static struct resource msm_funnel_resources[] = {
2453 {
2454 .start = MSM_FUNNEL_PHYS_BASE,
2455 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2456 .flags = IORESOURCE_MEM,
2457 },
2458};
2459
2460struct platform_device msm_funnel_device = {
2461 .name = "msm_funnel",
2462 .id = 0,
2463 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2464 .resource = msm_funnel_resources,
2465};
2466
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002467static struct resource msm_debug_resources[] = {
2468 {
2469 .start = MSM_DEBUG_PHYS_BASE,
2470 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2471 .flags = IORESOURCE_MEM,
2472 },
2473 {
2474 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2475 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2476 .flags = IORESOURCE_MEM,
2477 },
2478};
2479
2480struct platform_device msm_debug_device = {
2481 .name = "msm_debug",
2482 .id = 0,
2483 .num_resources = ARRAY_SIZE(msm_debug_resources),
2484 .resource = msm_debug_resources,
2485};
2486
Pratik Patel7831c082011-06-08 21:44:37 -07002487static struct resource msm_ptm_resources[] = {
2488 {
2489 .start = MSM_PTM_PHYS_BASE,
2490 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2491 .flags = IORESOURCE_MEM,
2492 },
2493};
2494
2495struct platform_device msm_ptm_device = {
2496 .name = "msm_ptm",
2497 .id = 0,
2498 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2499 .resource = msm_ptm_resources,
2500};
2501
2502#endif