blob: af4806783d1c2db4a972ec234208306855966948 [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,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700418 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700419 },
420 {
421 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
422 .dst = MSM_BUS_SLAVE_EBI_CH0,
423 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700424 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700425 },
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,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700444 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700445 },
446 {
447 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
448 .dst = MSM_BUS_SLAVE_EBI_CH0,
449 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700450 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700451 },
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 {
Nishant Pandit24153d82011-08-27 16:05:13 +0530988 .name = "s3d_rw",
989 .start = 0x008003E0,
990 .end = 0x008003E0 + SZ_16 - 1,
991 .flags = IORESOURCE_MEM,
992 },
993 {
994 .name = "s3d_ctl",
995 .start = 0x008020B8,
996 .end = 0x008020B8 + SZ_16 - 1,
997 .flags = IORESOURCE_MEM,
998 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700999};
1000
1001int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info)
1002{
1003 s_info->resource = msm_camera_resources;
1004 s_info->num_resources = ARRAY_SIZE(msm_camera_resources);
1005 return 0;
1006}
Kevin Chanf6216f22011-10-25 18:40:11 -07001007
1008static struct resource msm_csiphy0_resources[] = {
1009 {
1010 .name = "csiphy",
1011 .start = 0x04800C00,
1012 .end = 0x04800C00 + SZ_1K - 1,
1013 .flags = IORESOURCE_MEM,
1014 },
1015 {
1016 .name = "csiphy",
1017 .start = CSIPHY_4LN_IRQ,
1018 .end = CSIPHY_4LN_IRQ,
1019 .flags = IORESOURCE_IRQ,
1020 },
1021};
1022
1023static struct resource msm_csiphy1_resources[] = {
1024 {
1025 .name = "csiphy",
1026 .start = 0x04801000,
1027 .end = 0x04801000 + SZ_1K - 1,
1028 .flags = IORESOURCE_MEM,
1029 },
1030 {
1031 .name = "csiphy",
1032 .start = MSM8960_CSIPHY_2LN_IRQ,
1033 .end = MSM8960_CSIPHY_2LN_IRQ,
1034 .flags = IORESOURCE_IRQ,
1035 },
1036};
1037
1038struct platform_device msm8960_device_csiphy0 = {
1039 .name = "msm_csiphy",
1040 .id = 0,
1041 .resource = msm_csiphy0_resources,
1042 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1043};
1044
1045struct platform_device msm8960_device_csiphy1 = {
1046 .name = "msm_csiphy",
1047 .id = 1,
1048 .resource = msm_csiphy1_resources,
1049 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1050};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001051
1052static struct resource msm_csid0_resources[] = {
1053 {
1054 .name = "csid",
1055 .start = 0x04800000,
1056 .end = 0x04800000 + SZ_1K - 1,
1057 .flags = IORESOURCE_MEM,
1058 },
1059 {
1060 .name = "csid",
1061 .start = CSI_0_IRQ,
1062 .end = CSI_0_IRQ,
1063 .flags = IORESOURCE_IRQ,
1064 },
1065};
1066
1067static struct resource msm_csid1_resources[] = {
1068 {
1069 .name = "csid",
1070 .start = 0x04800400,
1071 .end = 0x04800400 + SZ_1K - 1,
1072 .flags = IORESOURCE_MEM,
1073 },
1074 {
1075 .name = "csid",
1076 .start = CSI_1_IRQ,
1077 .end = CSI_1_IRQ,
1078 .flags = IORESOURCE_IRQ,
1079 },
1080};
1081
1082struct platform_device msm8960_device_csid0 = {
1083 .name = "msm_csid",
1084 .id = 0,
1085 .resource = msm_csid0_resources,
1086 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1087};
1088
1089struct platform_device msm8960_device_csid1 = {
1090 .name = "msm_csid",
1091 .id = 1,
1092 .resource = msm_csid1_resources,
1093 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1094};
Kevin Chane12c6672011-10-26 11:55:26 -07001095
1096struct resource msm_ispif_resources[] = {
1097 {
1098 .name = "ispif",
1099 .start = 0x04800800,
1100 .end = 0x04800800 + SZ_1K - 1,
1101 .flags = IORESOURCE_MEM,
1102 },
1103 {
1104 .name = "ispif",
1105 .start = ISPIF_IRQ,
1106 .end = ISPIF_IRQ,
1107 .flags = IORESOURCE_IRQ,
1108 },
1109};
1110
1111struct platform_device msm8960_device_ispif = {
1112 .name = "msm_ispif",
1113 .id = 0,
1114 .resource = msm_ispif_resources,
1115 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1116};
Kevin Chan5827c552011-10-28 18:36:32 -07001117
1118static struct resource msm_vfe_resources[] = {
1119 {
1120 .name = "vfe32",
1121 .start = 0x04500000,
1122 .end = 0x04500000 + SZ_1M - 1,
1123 .flags = IORESOURCE_MEM,
1124 },
1125 {
1126 .name = "vfe32",
1127 .start = VFE_IRQ,
1128 .end = VFE_IRQ,
1129 .flags = IORESOURCE_IRQ,
1130 },
1131};
1132
1133struct platform_device msm8960_device_vfe = {
1134 .name = "msm_vfe",
1135 .id = 0,
1136 .resource = msm_vfe_resources,
1137 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1138};
Kevin Chana0853122011-11-07 19:48:44 -08001139
1140static struct resource msm_vpe_resources[] = {
1141 {
1142 .name = "vpe",
1143 .start = 0x05300000,
1144 .end = 0x05300000 + SZ_1M - 1,
1145 .flags = IORESOURCE_MEM,
1146 },
1147 {
1148 .name = "vpe",
1149 .start = VPE_IRQ,
1150 .end = VPE_IRQ,
1151 .flags = IORESOURCE_IRQ,
1152 },
1153};
1154
1155struct platform_device msm8960_device_vpe = {
1156 .name = "msm_vpe",
1157 .id = 0,
1158 .resource = msm_vpe_resources,
1159 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1160};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001161#endif
1162
1163static struct resource resources_ssbi_pm8921[] = {
1164 {
1165 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1166 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1167 .flags = IORESOURCE_MEM,
1168 },
1169};
1170
1171struct platform_device msm8960_device_ssbi_pm8921 = {
1172 .name = "msm_ssbi",
1173 .id = 0,
1174 .resource = resources_ssbi_pm8921,
1175 .num_resources = ARRAY_SIZE(resources_ssbi_pm8921),
1176};
1177
1178static struct resource resources_qup_spi_gsbi1[] = {
1179 {
1180 .name = "spi_base",
1181 .start = MSM_GSBI1_QUP_PHYS,
1182 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1183 .flags = IORESOURCE_MEM,
1184 },
1185 {
1186 .name = "gsbi_base",
1187 .start = MSM_GSBI1_PHYS,
1188 .end = MSM_GSBI1_PHYS + 4 - 1,
1189 .flags = IORESOURCE_MEM,
1190 },
1191 {
1192 .name = "spi_irq_in",
1193 .start = MSM8960_GSBI1_QUP_IRQ,
1194 .end = MSM8960_GSBI1_QUP_IRQ,
1195 .flags = IORESOURCE_IRQ,
1196 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001197 {
1198 .name = "spi_clk",
1199 .start = 9,
1200 .end = 9,
1201 .flags = IORESOURCE_IO,
1202 },
1203 {
1204 .name = "spi_cs",
1205 .start = 8,
1206 .end = 8,
1207 .flags = IORESOURCE_IO,
1208 },
1209 {
Chandan Uddaraju15e54b92011-09-12 10:52:36 -07001210 .name = "spi_cs1",
1211 .start = 14,
1212 .end = 14,
1213 .flags = IORESOURCE_IO,
1214 },
1215 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001216 .name = "spi_miso",
1217 .start = 7,
1218 .end = 7,
1219 .flags = IORESOURCE_IO,
1220 },
1221 {
1222 .name = "spi_mosi",
1223 .start = 6,
1224 .end = 6,
1225 .flags = IORESOURCE_IO,
1226 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001227};
1228
1229struct platform_device msm8960_device_qup_spi_gsbi1 = {
1230 .name = "spi_qsd",
1231 .id = 0,
1232 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1233 .resource = resources_qup_spi_gsbi1,
1234};
1235
1236struct platform_device msm_pcm = {
1237 .name = "msm-pcm-dsp",
1238 .id = -1,
1239};
1240
1241struct platform_device msm_pcm_routing = {
1242 .name = "msm-pcm-routing",
1243 .id = -1,
1244};
1245
1246struct platform_device msm_cpudai0 = {
1247 .name = "msm-dai-q6",
1248 .id = 0x4000,
1249};
1250
1251struct platform_device msm_cpudai1 = {
1252 .name = "msm-dai-q6",
1253 .id = 0x4001,
1254};
1255
1256struct platform_device msm_cpudai_hdmi_rx = {
1257 .name = "msm-dai-q6",
1258 .id = 8,
1259};
1260
1261struct platform_device msm_cpudai_bt_rx = {
1262 .name = "msm-dai-q6",
1263 .id = 0x3000,
1264};
1265
1266struct platform_device msm_cpudai_bt_tx = {
1267 .name = "msm-dai-q6",
1268 .id = 0x3001,
1269};
1270
1271struct platform_device msm_cpudai_fm_rx = {
1272 .name = "msm-dai-q6",
1273 .id = 0x3004,
1274};
1275
1276struct platform_device msm_cpudai_fm_tx = {
1277 .name = "msm-dai-q6",
1278 .id = 0x3005,
1279};
1280
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001281/*
1282 * Machine specific data for AUX PCM Interface
1283 * which the driver will be unware of.
1284 */
1285struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1286 .clk = "pcm_clk",
1287 .mode = AFE_PCM_CFG_MODE_PCM,
1288 .sync = AFE_PCM_CFG_SYNC_INT,
1289 .frame = AFE_PCM_CFG_FRM_256BPF,
1290 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1291 .slot = 0,
1292 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1293 .pcm_clk_rate = 2048000,
1294};
1295
1296struct platform_device msm_cpudai_auxpcm_rx = {
1297 .name = "msm-dai-q6",
1298 .id = 2,
1299 .dev = {
1300 .platform_data = &auxpcm_rx_pdata,
1301 },
1302};
1303
1304struct platform_device msm_cpudai_auxpcm_tx = {
1305 .name = "msm-dai-q6",
1306 .id = 3,
1307};
1308
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001309struct platform_device msm_cpu_fe = {
1310 .name = "msm-dai-fe",
1311 .id = -1,
1312};
1313
1314struct platform_device msm_stub_codec = {
1315 .name = "msm-stub-codec",
1316 .id = 1,
1317};
1318
1319struct platform_device msm_voice = {
1320 .name = "msm-pcm-voice",
1321 .id = -1,
1322};
1323
1324struct platform_device msm_voip = {
1325 .name = "msm-voip-dsp",
1326 .id = -1,
1327};
1328
1329struct platform_device msm_lpa_pcm = {
1330 .name = "msm-pcm-lpa",
1331 .id = -1,
1332};
1333
1334struct platform_device msm_pcm_hostless = {
1335 .name = "msm-pcm-hostless",
1336 .id = -1,
1337};
1338
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301339struct platform_device msm_cpudai_afe_01_rx = {
1340 .name = "msm-dai-q6",
1341 .id = 0xE0,
1342};
1343
1344struct platform_device msm_cpudai_afe_01_tx = {
1345 .name = "msm-dai-q6",
1346 .id = 0xF0,
1347};
1348
1349struct platform_device msm_cpudai_afe_02_rx = {
1350 .name = "msm-dai-q6",
1351 .id = 0xF1,
1352};
1353
1354struct platform_device msm_cpudai_afe_02_tx = {
1355 .name = "msm-dai-q6",
1356 .id = 0xE1,
1357};
1358
1359struct platform_device msm_pcm_afe = {
1360 .name = "msm-pcm-afe",
1361 .id = -1,
1362};
1363
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001364struct platform_device *msm_footswitch_devices[] = {
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001365 FS_8X60(FS_MDP, "fs_mdp"),
1366 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001367 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1368 FS_8X60(FS_VFE, "fs_vfe"),
1369 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001370 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1371 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1372 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001373 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001374};
1375unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1376
1377#ifdef CONFIG_MSM_ROTATOR
1378#define ROTATOR_HW_BASE 0x04E00000
1379static struct resource resources_msm_rotator[] = {
1380 {
1381 .start = ROTATOR_HW_BASE,
1382 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1383 .flags = IORESOURCE_MEM,
1384 },
1385 {
1386 .start = ROT_IRQ,
1387 .end = ROT_IRQ,
1388 .flags = IORESOURCE_IRQ,
1389 },
1390};
1391
1392static struct msm_rot_clocks rotator_clocks[] = {
1393 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001394 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001395 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001396 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001397 },
1398 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001399 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001400 .clk_type = ROTATOR_PCLK,
1401 .clk_rate = 0,
1402 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001403};
1404
1405static struct msm_rotator_platform_data rotator_pdata = {
1406 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1407 .hardware_version_number = 0x01020309,
1408 .rotator_clks = rotator_clocks,
1409 .regulator_name = "fs_rot",
1410};
1411
1412struct platform_device msm_rotator_device = {
1413 .name = "msm_rotator",
1414 .id = 0,
1415 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1416 .resource = resources_msm_rotator,
1417 .dev = {
1418 .platform_data = &rotator_pdata,
1419 },
1420};
1421#endif
1422
1423#define MIPI_DSI_HW_BASE 0x04700000
1424#define MDP_HW_BASE 0x05100000
1425
1426static struct resource msm_mipi_dsi1_resources[] = {
1427 {
1428 .name = "mipi_dsi",
1429 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001430 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001431 .flags = IORESOURCE_MEM,
1432 },
1433 {
1434 .start = DSI1_IRQ,
1435 .end = DSI1_IRQ,
1436 .flags = IORESOURCE_IRQ,
1437 },
1438};
1439
1440struct platform_device msm_mipi_dsi1_device = {
1441 .name = "mipi_dsi",
1442 .id = 1,
1443 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1444 .resource = msm_mipi_dsi1_resources,
1445};
1446
1447static struct resource msm_mdp_resources[] = {
1448 {
1449 .name = "mdp",
1450 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001451 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001452 .flags = IORESOURCE_MEM,
1453 },
1454 {
1455 .start = MDP_IRQ,
1456 .end = MDP_IRQ,
1457 .flags = IORESOURCE_IRQ,
1458 },
1459};
1460
1461static struct platform_device msm_mdp_device = {
1462 .name = "mdp",
1463 .id = 0,
1464 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1465 .resource = msm_mdp_resources,
1466};
1467
1468static void __init msm_register_device(struct platform_device *pdev, void *data)
1469{
1470 int ret;
1471
1472 pdev->dev.platform_data = data;
1473 ret = platform_device_register(pdev);
1474 if (ret)
1475 dev_err(&pdev->dev,
1476 "%s: platform_device_register() failed = %d\n",
1477 __func__, ret);
1478}
1479
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001480#ifdef CONFIG_MSM_BUS_SCALING
1481static struct platform_device msm_dtv_device = {
1482 .name = "dtv",
1483 .id = 0,
1484};
1485#endif
1486
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001487void __init msm_fb_register_device(char *name, void *data)
1488{
1489 if (!strncmp(name, "mdp", 3))
1490 msm_register_device(&msm_mdp_device, data);
1491 else if (!strncmp(name, "mipi_dsi", 8))
1492 msm_register_device(&msm_mipi_dsi1_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001493#ifdef CONFIG_MSM_BUS_SCALING
1494 else if (!strncmp(name, "dtv", 3))
1495 msm_register_device(&msm_dtv_device, data);
1496#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001497 else
1498 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1499}
1500
1501static struct resource resources_sps[] = {
1502 {
1503 .name = "pipe_mem",
1504 .start = 0x12800000,
1505 .end = 0x12800000 + 0x4000 - 1,
1506 .flags = IORESOURCE_MEM,
1507 },
1508 {
1509 .name = "bamdma_dma",
1510 .start = 0x12240000,
1511 .end = 0x12240000 + 0x1000 - 1,
1512 .flags = IORESOURCE_MEM,
1513 },
1514 {
1515 .name = "bamdma_bam",
1516 .start = 0x12244000,
1517 .end = 0x12244000 + 0x4000 - 1,
1518 .flags = IORESOURCE_MEM,
1519 },
1520 {
1521 .name = "bamdma_irq",
1522 .start = SPS_BAM_DMA_IRQ,
1523 .end = SPS_BAM_DMA_IRQ,
1524 .flags = IORESOURCE_IRQ,
1525 },
1526};
1527
1528struct msm_sps_platform_data msm_sps_pdata = {
1529 .bamdma_restricted_pipes = 0x06,
1530};
1531
1532struct platform_device msm_device_sps = {
1533 .name = "msm_sps",
1534 .id = -1,
1535 .num_resources = ARRAY_SIZE(resources_sps),
1536 .resource = resources_sps,
1537 .dev.platform_data = &msm_sps_pdata,
1538};
1539
1540#ifdef CONFIG_MSM_MPM
1541static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001542 [1] = MSM_GPIO_TO_INT(46),
1543 [2] = MSM_GPIO_TO_INT(150),
1544 [4] = MSM_GPIO_TO_INT(103),
1545 [5] = MSM_GPIO_TO_INT(104),
1546 [6] = MSM_GPIO_TO_INT(105),
1547 [7] = MSM_GPIO_TO_INT(106),
1548 [8] = MSM_GPIO_TO_INT(107),
1549 [9] = MSM_GPIO_TO_INT(7),
1550 [10] = MSM_GPIO_TO_INT(11),
1551 [11] = MSM_GPIO_TO_INT(15),
1552 [12] = MSM_GPIO_TO_INT(19),
1553 [13] = MSM_GPIO_TO_INT(23),
1554 [14] = MSM_GPIO_TO_INT(27),
1555 [15] = MSM_GPIO_TO_INT(31),
1556 [16] = MSM_GPIO_TO_INT(35),
1557 [19] = MSM_GPIO_TO_INT(90),
1558 [20] = MSM_GPIO_TO_INT(92),
1559 [23] = MSM_GPIO_TO_INT(85),
1560 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001561 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001562 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06001563 [29] = MSM_GPIO_TO_INT(10),
1564 [30] = MSM_GPIO_TO_INT(102),
1565 [31] = MSM_GPIO_TO_INT(81),
1566 [32] = MSM_GPIO_TO_INT(78),
1567 [33] = MSM_GPIO_TO_INT(94),
1568 [34] = MSM_GPIO_TO_INT(72),
1569 [35] = MSM_GPIO_TO_INT(39),
1570 [36] = MSM_GPIO_TO_INT(43),
1571 [37] = MSM_GPIO_TO_INT(61),
1572 [38] = MSM_GPIO_TO_INT(50),
1573 [39] = MSM_GPIO_TO_INT(42),
1574 [41] = MSM_GPIO_TO_INT(62),
1575 [42] = MSM_GPIO_TO_INT(76),
1576 [43] = MSM_GPIO_TO_INT(75),
1577 [44] = MSM_GPIO_TO_INT(70),
1578 [45] = MSM_GPIO_TO_INT(69),
1579 [46] = MSM_GPIO_TO_INT(67),
1580 [47] = MSM_GPIO_TO_INT(65),
1581 [48] = MSM_GPIO_TO_INT(58),
1582 [49] = MSM_GPIO_TO_INT(54),
1583 [50] = MSM_GPIO_TO_INT(52),
1584 [51] = MSM_GPIO_TO_INT(49),
1585 [52] = MSM_GPIO_TO_INT(40),
1586 [53] = MSM_GPIO_TO_INT(37),
1587 [54] = MSM_GPIO_TO_INT(24),
1588 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001589};
1590
1591static uint16_t msm_mpm_bypassed_apps_irqs[] = {
1592 TLMM_MSM_SUMMARY_IRQ,
1593 RPM_APCC_CPU0_GP_HIGH_IRQ,
1594 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1595 RPM_APCC_CPU0_GP_LOW_IRQ,
1596 RPM_APCC_CPU0_WAKE_UP_IRQ,
1597 RPM_APCC_CPU1_GP_HIGH_IRQ,
1598 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1599 RPM_APCC_CPU1_GP_LOW_IRQ,
1600 RPM_APCC_CPU1_WAKE_UP_IRQ,
1601 MSS_TO_APPS_IRQ_0,
1602 MSS_TO_APPS_IRQ_1,
1603 MSS_TO_APPS_IRQ_2,
1604 MSS_TO_APPS_IRQ_3,
1605 MSS_TO_APPS_IRQ_4,
1606 MSS_TO_APPS_IRQ_5,
1607 MSS_TO_APPS_IRQ_6,
1608 MSS_TO_APPS_IRQ_7,
1609 MSS_TO_APPS_IRQ_8,
1610 MSS_TO_APPS_IRQ_9,
1611 LPASS_SCSS_GP_LOW_IRQ,
1612 LPASS_SCSS_GP_MEDIUM_IRQ,
1613 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07001614 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001615 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07001616 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07001617 RIVA_APPS_WLAN_SMSM_IRQ,
1618 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1619 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001620};
1621
1622struct msm_mpm_device_data msm_mpm_dev_data = {
1623 .irqs_m2a = msm_mpm_irqs_m2a,
1624 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1625 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1626 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1627 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1628 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1629 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1630 .mpm_apps_ipc_val = BIT(1),
1631 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1632
1633};
1634#endif
1635
Stephen Boydbb600ae2011-08-02 20:11:40 -07001636static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001637 CLK_DUMMY("pll2", PLL2, NULL, 0),
1638 CLK_DUMMY("pll8", PLL8, NULL, 0),
1639 CLK_DUMMY("pll4", PLL4, NULL, 0),
1640
1641 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1642 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1643 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1644 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1645 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1646 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1647 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1648 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1649 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1650 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1651 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1652 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1653 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1654 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1655 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1656 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1657
Matt Wagantalle2522372011-08-17 14:52:21 -07001658 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1659 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
1660 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
1661 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1662 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1663 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1664 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1665 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1666 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1667 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1668 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1669 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001670 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
1671 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
1672 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
1673 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1674 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
1675 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1676 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
1677 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
1678 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF),
1679 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
1680 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
1681 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001682 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001683 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07001684 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001685 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1686 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1687 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1688 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
1689 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001690 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001691 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001692 CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1693 CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF),
1694 CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1695 CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1696 CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
1697 CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF),
1698 CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF),
1699 CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001700 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
1701 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001702 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
1703 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001704 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001705 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001706 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001707 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001708 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001709 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
1710 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
1711 CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF),
1712 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
1713 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
1714 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
1715 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001716 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001717 CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF),
1718 CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF),
1719 CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001720 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1721 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1722 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1723 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
1724 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07001725 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
1726 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001727 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1728 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1729 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1730 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1731 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001732 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1733 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1734 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1735 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1736 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1737 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1738 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1739 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1740 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1741 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1742 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1743 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
1744 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
1745 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
1746 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001747 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
1748 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
1749 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001750 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001751 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001752 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001753 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1754 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1755 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001756 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001757 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
1758 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
1759 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001760 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001761 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
1762 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
1763 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
1764 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1765 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1766 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1767 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1768 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1769 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001770 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001771 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1772 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1773 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1774 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
1775 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1776 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1777 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
1778 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
1779 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
1780 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001781 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
1782 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
1783 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001784 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
1785 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
1786 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1787 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001788 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001789 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001790 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001791 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001792 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
1793 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1794 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1795 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1796 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1797 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1798 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1799 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1800 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1801 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1802 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1803 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1804 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1805 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1806 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001807 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
1808 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
1809 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
1810 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
1811 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
1812 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001813
1814 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
1815 CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001816 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
1817 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
1818 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
1819 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
1820 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001821 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1822 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
1823};
1824
Stephen Boydbb600ae2011-08-02 20:11:40 -07001825struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
1826 .table = msm_clocks_8960_dummy,
1827 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
1828};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001829
1830#define LPASS_SLIMBUS_PHYS 0x28080000
1831#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06001832#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001833/* Board info for the slimbus slave device */
1834static struct resource slimbus_res[] = {
1835 {
1836 .start = LPASS_SLIMBUS_PHYS,
1837 .end = LPASS_SLIMBUS_PHYS + 8191,
1838 .flags = IORESOURCE_MEM,
1839 .name = "slimbus_physical",
1840 },
1841 {
1842 .start = LPASS_SLIMBUS_BAM_PHYS,
1843 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
1844 .flags = IORESOURCE_MEM,
1845 .name = "slimbus_bam_physical",
1846 },
1847 {
Sagar Dhariacc969452011-09-19 10:34:30 -06001848 .start = LPASS_SLIMBUS_SLEW,
1849 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
1850 .flags = IORESOURCE_MEM,
1851 .name = "slimbus_slew_reg",
1852 },
1853 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001854 .start = SLIMBUS0_CORE_EE1_IRQ,
1855 .end = SLIMBUS0_CORE_EE1_IRQ,
1856 .flags = IORESOURCE_IRQ,
1857 .name = "slimbus_irq",
1858 },
1859 {
1860 .start = SLIMBUS0_BAM_EE1_IRQ,
1861 .end = SLIMBUS0_BAM_EE1_IRQ,
1862 .flags = IORESOURCE_IRQ,
1863 .name = "slimbus_bam_irq",
1864 },
1865};
1866
1867struct platform_device msm_slim_ctrl = {
1868 .name = "msm_slim_ctrl",
1869 .id = 1,
1870 .num_resources = ARRAY_SIZE(slimbus_res),
1871 .resource = slimbus_res,
1872 .dev = {
1873 .coherent_dma_mask = 0xffffffffULL,
1874 },
1875};
1876
1877#ifdef CONFIG_MSM_BUS_SCALING
1878static struct msm_bus_vectors grp3d_init_vectors[] = {
1879 {
1880 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1881 .dst = MSM_BUS_SLAVE_EBI_CH0,
1882 .ab = 0,
1883 .ib = 0,
1884 },
1885};
1886
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001887static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001888 {
1889 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1890 .dst = MSM_BUS_SLAVE_EBI_CH0,
1891 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001892 .ib = KGSL_CONVERT_TO_MBPS(1200),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001893 },
1894};
1895
1896static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
1897 {
1898 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1899 .dst = MSM_BUS_SLAVE_EBI_CH0,
1900 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001901 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001902 },
1903};
1904
1905static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
1906 {
1907 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1908 .dst = MSM_BUS_SLAVE_EBI_CH0,
1909 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001910 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001911 },
1912};
1913
1914static struct msm_bus_vectors grp3d_max_vectors[] = {
1915 {
1916 .src = MSM_BUS_MASTER_GRAPHICS_3D,
1917 .dst = MSM_BUS_SLAVE_EBI_CH0,
1918 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07001919 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001920 },
1921};
1922
1923static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
1924 {
1925 ARRAY_SIZE(grp3d_init_vectors),
1926 grp3d_init_vectors,
1927 },
1928 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06001929 ARRAY_SIZE(grp3d_low_vectors),
1930 grp3d_low_vectors,
1931 },
1932 {
1933 ARRAY_SIZE(grp3d_nominal_low_vectors),
1934 grp3d_nominal_low_vectors,
1935 },
1936 {
1937 ARRAY_SIZE(grp3d_nominal_high_vectors),
1938 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001939 },
1940 {
1941 ARRAY_SIZE(grp3d_max_vectors),
1942 grp3d_max_vectors,
1943 },
1944};
1945
1946static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
1947 grp3d_bus_scale_usecases,
1948 ARRAY_SIZE(grp3d_bus_scale_usecases),
1949 .name = "grp3d",
1950};
1951
1952static struct msm_bus_vectors grp2d0_init_vectors[] = {
1953 {
1954 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1955 .dst = MSM_BUS_SLAVE_EBI_CH0,
1956 .ab = 0,
1957 .ib = 0,
1958 },
1959};
1960
1961static struct msm_bus_vectors grp2d0_max_vectors[] = {
1962 {
1963 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
1964 .dst = MSM_BUS_SLAVE_EBI_CH0,
1965 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07001966 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001967 },
1968};
1969
1970static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
1971 {
1972 ARRAY_SIZE(grp2d0_init_vectors),
1973 grp2d0_init_vectors,
1974 },
1975 {
1976 ARRAY_SIZE(grp2d0_max_vectors),
1977 grp2d0_max_vectors,
1978 },
1979};
1980
1981struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
1982 grp2d0_bus_scale_usecases,
1983 ARRAY_SIZE(grp2d0_bus_scale_usecases),
1984 .name = "grp2d0",
1985};
1986
1987static struct msm_bus_vectors grp2d1_init_vectors[] = {
1988 {
1989 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
1990 .dst = MSM_BUS_SLAVE_EBI_CH0,
1991 .ab = 0,
1992 .ib = 0,
1993 },
1994};
1995
1996static struct msm_bus_vectors grp2d1_max_vectors[] = {
1997 {
1998 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
1999 .dst = MSM_BUS_SLAVE_EBI_CH0,
2000 .ab = 0,
Suman Tatiraju903a0ef2011-09-30 16:53:57 -07002001 .ib = KGSL_CONVERT_TO_MBPS(1200),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002002 },
2003};
2004
2005static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2006 {
2007 ARRAY_SIZE(grp2d1_init_vectors),
2008 grp2d1_init_vectors,
2009 },
2010 {
2011 ARRAY_SIZE(grp2d1_max_vectors),
2012 grp2d1_max_vectors,
2013 },
2014};
2015
2016struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2017 grp2d1_bus_scale_usecases,
2018 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2019 .name = "grp2d1",
2020};
2021#endif
2022
2023static struct resource kgsl_3d0_resources[] = {
2024 {
2025 .name = KGSL_3D0_REG_MEMORY,
2026 .start = 0x04300000, /* GFX3D address */
2027 .end = 0x0431ffff,
2028 .flags = IORESOURCE_MEM,
2029 },
2030 {
2031 .name = KGSL_3D0_IRQ,
2032 .start = GFX3D_IRQ,
2033 .end = GFX3D_IRQ,
2034 .flags = IORESOURCE_IRQ,
2035 },
2036};
2037
2038static struct kgsl_device_platform_data kgsl_3d0_pdata = {
2039 .pwr_data = {
2040 .pwrlevel = {
2041 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002042 .gpu_freq = 400000000,
2043 .bus_freq = 4,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002044 .io_fraction = 0,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002045 },
2046 {
2047 .gpu_freq = 300000000,
2048 .bus_freq = 3,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002049 .io_fraction = 33,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002050 },
2051 {
2052 .gpu_freq = 200000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002053 .bus_freq = 2,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002054 .io_fraction = 100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002055 },
2056 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002057 .gpu_freq = 128000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002058 .bus_freq = 1,
Lucille Sylvester596d4c22011-10-19 18:04:01 -06002059 .io_fraction = 100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002060 },
2061 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002062 .gpu_freq = 27000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002063 .bus_freq = 0,
2064 },
2065 },
Lucille Sylvester5d0ac132011-09-21 10:15:01 -06002066 .init_level = 0,
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002067 .num_levels = 5,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002068 .set_grp_async = NULL,
2069 .idle_timeout = HZ/5,
Jeremy Gebbend3342ee2011-10-18 09:53:17 -06002070 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002071 },
2072 .clk = {
2073 .name = {
Matt Wagantall9dc01632011-08-17 18:55:04 -07002074 .clk = "core_clk",
2075 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002076 },
2077#ifdef CONFIG_MSM_BUS_SCALING
2078 .bus_scale_table = &grp3d_bus_scale_pdata,
2079#endif
2080 },
2081 .imem_clk_name = {
2082 .clk = NULL,
Matt Wagantall9dc01632011-08-17 18:55:04 -07002083 .pclk = "mem_iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002084 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002085 .iommu_user_ctx_name = "gfx3d_user",
2086 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002087};
2088
2089struct platform_device msm_kgsl_3d0 = {
2090 .name = "kgsl-3d0",
2091 .id = 0,
2092 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2093 .resource = kgsl_3d0_resources,
2094 .dev = {
2095 .platform_data = &kgsl_3d0_pdata,
2096 },
2097};
2098
2099static struct resource kgsl_2d0_resources[] = {
2100 {
2101 .name = KGSL_2D0_REG_MEMORY,
2102 .start = 0x04100000, /* Z180 base address */
2103 .end = 0x04100FFF,
2104 .flags = IORESOURCE_MEM,
2105 },
2106 {
2107 .name = KGSL_2D0_IRQ,
2108 .start = GFX2D0_IRQ,
2109 .end = GFX2D0_IRQ,
2110 .flags = IORESOURCE_IRQ,
2111 },
2112};
2113
2114static struct kgsl_device_platform_data kgsl_2d0_pdata = {
2115 .pwr_data = {
2116 .pwrlevel = {
2117 {
2118 .gpu_freq = 200000000,
2119 .bus_freq = 1,
2120 },
2121 {
2122 .gpu_freq = 200000000,
2123 .bus_freq = 0,
2124 },
2125 },
2126 .init_level = 0,
2127 .num_levels = 2,
2128 .set_grp_async = NULL,
2129 .idle_timeout = HZ/10,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002130 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002131 },
2132 .clk = {
2133 .name = {
2134 /* note: 2d clocks disabled on v1 */
Matt Wagantall9dc01632011-08-17 18:55:04 -07002135 .clk = "core_clk",
2136 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002137 },
2138#ifdef CONFIG_MSM_BUS_SCALING
2139 .bus_scale_table = &grp2d0_bus_scale_pdata,
2140#endif
2141 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002142 .iommu_user_ctx_name = "gfx2d0_2d0",
2143 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002144};
2145
2146struct platform_device msm_kgsl_2d0 = {
2147 .name = "kgsl-2d0",
2148 .id = 0,
2149 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2150 .resource = kgsl_2d0_resources,
2151 .dev = {
2152 .platform_data = &kgsl_2d0_pdata,
2153 },
2154};
2155
2156static struct resource kgsl_2d1_resources[] = {
2157 {
2158 .name = KGSL_2D1_REG_MEMORY,
2159 .start = 0x04200000, /* Z180 device 1 base address */
2160 .end = 0x04200FFF,
2161 .flags = IORESOURCE_MEM,
2162 },
2163 {
2164 .name = KGSL_2D1_IRQ,
2165 .start = GFX2D1_IRQ,
2166 .end = GFX2D1_IRQ,
2167 .flags = IORESOURCE_IRQ,
2168 },
2169};
2170
2171static struct kgsl_device_platform_data kgsl_2d1_pdata = {
2172 .pwr_data = {
2173 .pwrlevel = {
2174 {
2175 .gpu_freq = 200000000,
2176 .bus_freq = 1,
2177 },
2178 {
2179 .gpu_freq = 200000000,
2180 .bus_freq = 0,
2181 },
2182 },
2183 .init_level = 0,
2184 .num_levels = 2,
2185 .set_grp_async = NULL,
2186 .idle_timeout = HZ/10,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002187 .nap_allowed = true,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002188 },
2189 .clk = {
2190 .name = {
Matt Wagantall9dc01632011-08-17 18:55:04 -07002191 .clk = "core_clk",
2192 .pclk = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002193 },
2194#ifdef CONFIG_MSM_BUS_SCALING
2195 .bus_scale_table = &grp2d1_bus_scale_pdata,
2196#endif
2197 },
Shubhraprakash Das767fdda2011-08-15 15:49:45 -06002198 .iommu_user_ctx_name = "gfx2d1_2d1",
2199 .iommu_priv_ctx_name = NULL,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002200};
2201
2202struct platform_device msm_kgsl_2d1 = {
2203 .name = "kgsl-2d1",
2204 .id = 1,
2205 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2206 .resource = kgsl_2d1_resources,
2207 .dev = {
2208 .platform_data = &kgsl_2d1_pdata,
2209 },
2210};
2211
2212#ifdef CONFIG_MSM_GEMINI
2213static struct resource msm_gemini_resources[] = {
2214 {
2215 .start = 0x04600000,
2216 .end = 0x04600000 + SZ_1M - 1,
2217 .flags = IORESOURCE_MEM,
2218 },
2219 {
2220 .start = JPEG_IRQ,
2221 .end = JPEG_IRQ,
2222 .flags = IORESOURCE_IRQ,
2223 },
2224};
2225
2226struct platform_device msm8960_gemini_device = {
2227 .name = "msm_gemini",
2228 .resource = msm_gemini_resources,
2229 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2230};
2231#endif
2232
2233struct msm_rpm_map_data rpm_map_data[] __initdata = {
2234 MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2235 MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2236
2237 MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1),
2238
2239 MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1),
2240 MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1),
2241 MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2242 MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2243 MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2244 MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2245 MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1),
2246 MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1),
2247 MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1),
2248 MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1),
2249
2250 MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2),
2251 MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3),
2252 MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1),
2253 MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2254
2255 MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2),
2256 MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3),
2257 MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1),
Eugene Seahd9040ad2011-07-11 13:20:54 -06002258 MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002259
2260 MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2),
2261 MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3),
2262 MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1),
2263 MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2264
2265 MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2),
2266 MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2),
2267 MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2),
2268 MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2),
2269 MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2),
2270 MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2),
2271 MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2),
2272 MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2),
2273 MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2),
2274 MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2),
2275 MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2),
2276 MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2),
2277 MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2),
2278 MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2),
2279 MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2),
2280 MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2),
2281 MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2),
2282 MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2),
2283 MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2),
2284 MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2),
2285 MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2),
2286 MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2),
2287 MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2),
2288 MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2),
2289 MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2),
2290 MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2),
2291 MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2),
2292 MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2),
2293 MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2),
2294 MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2),
2295 MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2),
2296 MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2),
2297 MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2),
2298 MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2),
2299 MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2),
2300 MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2),
2301 MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2),
2302 MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2),
2303 MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2),
2304 MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1),
2305 MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1),
2306 MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1),
2307 MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1),
2308 MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1),
2309 MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1),
2310 MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1),
2311 MSM_RPM_MAP(NCP_0, NCP, 2),
2312 MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1),
2313 MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2314 MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1),
Praveen Chidambaram27658c22011-07-07 11:00:49 -06002315 MSM_RPM_MAP(DDR_DMM_0, DDR_DMM, 2),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002316
2317};
2318unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data);
2319
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002320struct platform_device msm_rpm_device = {
2321 .name = "msm_rpm",
2322 .id = -1,
2323};
2324
Praveen Chidambaram7a712232011-10-28 13:39:45 -06002325static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
2326 .phys_addr_base = 0x0010D204,
2327 .phys_size = SZ_8K,
2328};
2329
2330struct platform_device msm_rpm_stat_device = {
2331 .name = "msm_rpm_stat",
2332 .id = -1,
2333 .dev = {
2334 .platform_data = &msm_rpm_stat_pdata,
2335 },
2336};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06002337
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002338struct platform_device msm_bus_sys_fabric = {
2339 .name = "msm_bus_fabric",
2340 .id = MSM_BUS_FAB_SYSTEM,
2341};
2342struct platform_device msm_bus_apps_fabric = {
2343 .name = "msm_bus_fabric",
2344 .id = MSM_BUS_FAB_APPSS,
2345};
2346struct platform_device msm_bus_mm_fabric = {
2347 .name = "msm_bus_fabric",
2348 .id = MSM_BUS_FAB_MMSS,
2349};
2350struct platform_device msm_bus_sys_fpb = {
2351 .name = "msm_bus_fabric",
2352 .id = MSM_BUS_FAB_SYSTEM_FPB,
2353};
2354struct platform_device msm_bus_cpss_fpb = {
2355 .name = "msm_bus_fabric",
2356 .id = MSM_BUS_FAB_CPSS_FPB,
2357};
2358
2359/* Sensors DSPS platform data */
2360#ifdef CONFIG_MSM_DSPS
2361
2362#define PPSS_REG_PHYS_BASE 0x12080000
2363
2364static struct dsps_clk_info dsps_clks[] = {};
2365static struct dsps_regulator_info dsps_regs[] = {};
2366
2367/*
2368 * Note: GPIOs field is intialized in run-time at the function
2369 * msm8960_init_dsps().
2370 */
2371
2372struct msm_dsps_platform_data msm_dsps_pdata = {
2373 .clks = dsps_clks,
2374 .clks_num = ARRAY_SIZE(dsps_clks),
2375 .gpios = NULL,
2376 .gpios_num = 0,
2377 .regs = dsps_regs,
2378 .regs_num = ARRAY_SIZE(dsps_regs),
2379 .dsps_pwr_ctl_en = 1,
2380 .signature = DSPS_SIGNATURE,
2381};
2382
2383static struct resource msm_dsps_resources[] = {
2384 {
2385 .start = PPSS_REG_PHYS_BASE,
2386 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2387 .name = "ppss_reg",
2388 .flags = IORESOURCE_MEM,
2389 },
Wentao Xua55500b2011-08-16 18:15:04 -04002390
2391 {
2392 .start = PPSS_WDOG_TIMER_IRQ,
2393 .end = PPSS_WDOG_TIMER_IRQ,
2394 .name = "ppss_wdog",
2395 .flags = IORESOURCE_IRQ,
2396 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002397};
2398
2399struct platform_device msm_dsps_device = {
2400 .name = "msm_dsps",
2401 .id = 0,
2402 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2403 .resource = msm_dsps_resources,
2404 .dev.platform_data = &msm_dsps_pdata,
2405};
2406
2407#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07002408
2409#ifdef CONFIG_MSM_QDSS
2410
2411#define MSM_QDSS_PHYS_BASE 0x01A00000
2412#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
2413#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
2414#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002415#define MSM_DEBUG_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x10000)
Pratik Patel7831c082011-06-08 21:44:37 -07002416#define MSM_PTM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2417
2418static struct resource msm_etb_resources[] = {
2419 {
2420 .start = MSM_ETB_PHYS_BASE,
2421 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
2422 .flags = IORESOURCE_MEM,
2423 },
2424};
2425
2426struct platform_device msm_etb_device = {
2427 .name = "msm_etb",
2428 .id = 0,
2429 .num_resources = ARRAY_SIZE(msm_etb_resources),
2430 .resource = msm_etb_resources,
2431};
2432
2433static struct resource msm_tpiu_resources[] = {
2434 {
2435 .start = MSM_TPIU_PHYS_BASE,
2436 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
2437 .flags = IORESOURCE_MEM,
2438 },
2439};
2440
2441struct platform_device msm_tpiu_device = {
2442 .name = "msm_tpiu",
2443 .id = 0,
2444 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
2445 .resource = msm_tpiu_resources,
2446};
2447
2448static struct resource msm_funnel_resources[] = {
2449 {
2450 .start = MSM_FUNNEL_PHYS_BASE,
2451 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
2452 .flags = IORESOURCE_MEM,
2453 },
2454};
2455
2456struct platform_device msm_funnel_device = {
2457 .name = "msm_funnel",
2458 .id = 0,
2459 .num_resources = ARRAY_SIZE(msm_funnel_resources),
2460 .resource = msm_funnel_resources,
2461};
2462
Pratik Patelfd6f56a2011-10-10 17:47:55 -07002463static struct resource msm_debug_resources[] = {
2464 {
2465 .start = MSM_DEBUG_PHYS_BASE,
2466 .end = MSM_DEBUG_PHYS_BASE + SZ_4K - 1,
2467 .flags = IORESOURCE_MEM,
2468 },
2469 {
2470 .start = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2),
2471 .end = MSM_DEBUG_PHYS_BASE + (SZ_4K * 2) + SZ_4K - 1,
2472 .flags = IORESOURCE_MEM,
2473 },
2474};
2475
2476struct platform_device msm_debug_device = {
2477 .name = "msm_debug",
2478 .id = 0,
2479 .num_resources = ARRAY_SIZE(msm_debug_resources),
2480 .resource = msm_debug_resources,
2481};
2482
Pratik Patel7831c082011-06-08 21:44:37 -07002483static struct resource msm_ptm_resources[] = {
2484 {
2485 .start = MSM_PTM_PHYS_BASE,
2486 .end = MSM_PTM_PHYS_BASE + (SZ_4K * 2) - 1,
2487 .flags = IORESOURCE_MEM,
2488 },
2489};
2490
2491struct platform_device msm_ptm_device = {
2492 .name = "msm_ptm",
2493 .id = 0,
2494 .num_resources = ARRAY_SIZE(msm_ptm_resources),
2495 .resource = msm_ptm_resources,
2496};
2497
2498#endif