blob: a653353814cc903bced9edd15fba3b33e6d892bb [file] [log] [blame]
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +05301/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/platform_device.h>
17#include <linux/msm_rotator.h>
Deepak Kotur12301a72011-11-09 18:30:29 -080018#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <linux/gpio.h>
20#include <asm/clkdev.h>
21#include <linux/msm_kgsl.h>
22#include <linux/android_pmem.h>
23#include <mach/irqs-8960.h>
Mayank Rana9f51f582011-08-04 18:35:59 +053024#include <mach/dma.h>
25#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026#include <mach/board.h>
27#include <mach/msm_iomap.h>
28#include <mach/msm_hsusb.h>
29#include <mach/msm_sps.h>
30#include <mach/rpm.h>
31#include <mach/msm_bus_board.h>
32#include <mach/msm_memtypes.h>
Eric Holmberg023d25c2012-03-01 12:27:55 -070033#include <mach/msm_smd.h>
Lucille Sylvester6e362412011-12-09 16:21:42 -070034#include <mach/msm_dcvs.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070035#include <sound/msm-dai-q6.h>
36#include <sound/apr_audio.h>
Joel Nidera1261942011-09-12 16:30:09 +030037#include <mach/msm_tsif.h>
Pratik Patel1403f2a2012-03-21 10:10:00 -070038#include <mach/qdss.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070039#include "clock.h"
40#include "devices.h"
41#include "devices-msm8x60.h"
42#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070043#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060044#include "rpm_log.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060045#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070046#include "pil-q6v4.h"
47#include "scm-pas.h"
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -070048#include <mach/msm_dcvs.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070049
50#ifdef CONFIG_MSM_MPM
51#include "mpm.h"
52#endif
53#ifdef CONFIG_MSM_DSPS
54#include <mach/msm_dsps.h>
55#endif
56
57
58/* Address of GSBI blocks */
59#define MSM_GSBI1_PHYS 0x16000000
60#define MSM_GSBI2_PHYS 0x16100000
61#define MSM_GSBI3_PHYS 0x16200000
62#define MSM_GSBI4_PHYS 0x16300000
63#define MSM_GSBI5_PHYS 0x16400000
64#define MSM_GSBI6_PHYS 0x16500000
65#define MSM_GSBI7_PHYS 0x16600000
66#define MSM_GSBI8_PHYS 0x1A000000
67#define MSM_GSBI9_PHYS 0x1A100000
68#define MSM_GSBI10_PHYS 0x1A200000
69#define MSM_GSBI11_PHYS 0x12440000
70#define MSM_GSBI12_PHYS 0x12480000
71
72#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
73#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053074#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070075
76/* GSBI QUP devices */
77#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
78#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
79#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
80#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
81#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
82#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
83#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
84#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
85#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
86#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
87#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
88#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
89#define MSM_QUP_SIZE SZ_4K
90
91#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
92#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
93#define MSM_PMIC_SSBI_SIZE SZ_4K
94
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070095#define MSM8960_HSUSB_PHYS 0x12500000
96#define MSM8960_HSUSB_SIZE SZ_4K
97
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070098static struct resource resources_otg[] = {
99 {
100 .start = MSM8960_HSUSB_PHYS,
101 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
102 .flags = IORESOURCE_MEM,
103 },
104 {
105 .start = USB1_HS_IRQ,
106 .end = USB1_HS_IRQ,
107 .flags = IORESOURCE_IRQ,
108 },
109};
110
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700111struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700112 .name = "msm_otg",
113 .id = -1,
114 .num_resources = ARRAY_SIZE(resources_otg),
115 .resource = resources_otg,
116 .dev = {
117 .coherent_dma_mask = 0xffffffff,
118 },
119};
120
121static struct resource resources_hsusb[] = {
122 {
123 .start = MSM8960_HSUSB_PHYS,
124 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
125 .flags = IORESOURCE_MEM,
126 },
127 {
128 .start = USB1_HS_IRQ,
129 .end = USB1_HS_IRQ,
130 .flags = IORESOURCE_IRQ,
131 },
132};
133
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700134struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700135 .name = "msm_hsusb",
136 .id = -1,
137 .num_resources = ARRAY_SIZE(resources_hsusb),
138 .resource = resources_hsusb,
139 .dev = {
140 .coherent_dma_mask = 0xffffffff,
141 },
142};
143
144static struct resource resources_hsusb_host[] = {
145 {
146 .start = MSM8960_HSUSB_PHYS,
147 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
148 .flags = IORESOURCE_MEM,
149 },
150 {
151 .start = USB1_HS_IRQ,
152 .end = USB1_HS_IRQ,
153 .flags = IORESOURCE_IRQ,
154 },
155};
156
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530157static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700158struct platform_device msm_device_hsusb_host = {
159 .name = "msm_hsusb_host",
160 .id = -1,
161 .num_resources = ARRAY_SIZE(resources_hsusb_host),
162 .resource = resources_hsusb_host,
163 .dev = {
164 .dma_mask = &dma_mask,
165 .coherent_dma_mask = 0xffffffff,
166 },
167};
168
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530169static struct resource resources_hsic_host[] = {
170 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700171 .start = 0x12520000,
172 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530173 .flags = IORESOURCE_MEM,
174 },
175 {
176 .start = USB_HSIC_IRQ,
177 .end = USB_HSIC_IRQ,
178 .flags = IORESOURCE_IRQ,
179 },
Vamsi Krishna34f01582011-12-14 19:54:42 -0800180 {
181 .start = MSM_GPIO_TO_INT(69),
182 .end = MSM_GPIO_TO_INT(69),
183 .name = "peripheral_status_irq",
184 .flags = IORESOURCE_IRQ,
185 },
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530186};
187
188struct platform_device msm_device_hsic_host = {
189 .name = "msm_hsic_host",
190 .id = -1,
191 .num_resources = ARRAY_SIZE(resources_hsic_host),
192 .resource = resources_hsic_host,
193 .dev = {
194 .dma_mask = &dma_mask,
195 .coherent_dma_mask = DMA_BIT_MASK(32),
196 },
197};
198
Mona Hossain11c03ac2011-10-26 12:42:10 -0700199#define SHARED_IMEM_TZ_BASE 0x2a03f720
200static struct resource tzlog_resources[] = {
201 {
202 .start = SHARED_IMEM_TZ_BASE,
203 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
204 .flags = IORESOURCE_MEM,
205 },
206};
207
208struct platform_device msm_device_tz_log = {
209 .name = "tz_log",
210 .id = 0,
211 .num_resources = ARRAY_SIZE(tzlog_resources),
212 .resource = tzlog_resources,
213};
214
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700215static struct resource resources_uart_gsbi2[] = {
216 {
217 .start = MSM8960_GSBI2_UARTDM_IRQ,
218 .end = MSM8960_GSBI2_UARTDM_IRQ,
219 .flags = IORESOURCE_IRQ,
220 },
221 {
222 .start = MSM_UART2DM_PHYS,
223 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
224 .name = "uartdm_resource",
225 .flags = IORESOURCE_MEM,
226 },
227 {
228 .start = MSM_GSBI2_PHYS,
229 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
230 .name = "gsbi_resource",
231 .flags = IORESOURCE_MEM,
232 },
233};
234
235struct platform_device msm8960_device_uart_gsbi2 = {
236 .name = "msm_serial_hsl",
237 .id = 0,
238 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
239 .resource = resources_uart_gsbi2,
240};
Mayank Rana9f51f582011-08-04 18:35:59 +0530241/* GSBI 6 used into UARTDM Mode */
242static struct resource msm_uart_dm6_resources[] = {
243 {
244 .start = MSM_UART6DM_PHYS,
245 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
246 .name = "uartdm_resource",
247 .flags = IORESOURCE_MEM,
248 },
249 {
250 .start = GSBI6_UARTDM_IRQ,
251 .end = GSBI6_UARTDM_IRQ,
252 .flags = IORESOURCE_IRQ,
253 },
254 {
255 .start = MSM_GSBI6_PHYS,
256 .end = MSM_GSBI6_PHYS + 4 - 1,
257 .name = "gsbi_resource",
258 .flags = IORESOURCE_MEM,
259 },
260 {
261 .start = DMOV_HSUART_GSBI6_TX_CHAN,
262 .end = DMOV_HSUART_GSBI6_RX_CHAN,
263 .name = "uartdm_channels",
264 .flags = IORESOURCE_DMA,
265 },
266 {
267 .start = DMOV_HSUART_GSBI6_TX_CRCI,
268 .end = DMOV_HSUART_GSBI6_RX_CRCI,
269 .name = "uartdm_crci",
270 .flags = IORESOURCE_DMA,
271 },
272};
273static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
274struct platform_device msm_device_uart_dm6 = {
275 .name = "msm_serial_hs",
276 .id = 0,
277 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
278 .resource = msm_uart_dm6_resources,
279 .dev = {
280 .dma_mask = &msm_uart_dm6_dma_mask,
281 .coherent_dma_mask = DMA_BIT_MASK(32),
282 },
283};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700284
285static struct resource resources_uart_gsbi5[] = {
286 {
287 .start = GSBI5_UARTDM_IRQ,
288 .end = GSBI5_UARTDM_IRQ,
289 .flags = IORESOURCE_IRQ,
290 },
291 {
292 .start = MSM_UART5DM_PHYS,
293 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
294 .name = "uartdm_resource",
295 .flags = IORESOURCE_MEM,
296 },
297 {
298 .start = MSM_GSBI5_PHYS,
299 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
300 .name = "gsbi_resource",
301 .flags = IORESOURCE_MEM,
302 },
303};
304
305struct platform_device msm8960_device_uart_gsbi5 = {
306 .name = "msm_serial_hsl",
307 .id = 0,
308 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
309 .resource = resources_uart_gsbi5,
310};
311/* MSM Video core device */
312#ifdef CONFIG_MSM_BUS_SCALING
313static struct msm_bus_vectors vidc_init_vectors[] = {
314 {
315 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
316 .dst = MSM_BUS_SLAVE_EBI_CH0,
317 .ab = 0,
318 .ib = 0,
319 },
320 {
321 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
322 .dst = MSM_BUS_SLAVE_EBI_CH0,
323 .ab = 0,
324 .ib = 0,
325 },
326 {
327 .src = MSM_BUS_MASTER_AMPSS_M0,
328 .dst = MSM_BUS_SLAVE_EBI_CH0,
329 .ab = 0,
330 .ib = 0,
331 },
332 {
333 .src = MSM_BUS_MASTER_AMPSS_M0,
334 .dst = MSM_BUS_SLAVE_EBI_CH0,
335 .ab = 0,
336 .ib = 0,
337 },
338};
339static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
340 {
341 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
342 .dst = MSM_BUS_SLAVE_EBI_CH0,
343 .ab = 54525952,
344 .ib = 436207616,
345 },
346 {
347 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
348 .dst = MSM_BUS_SLAVE_EBI_CH0,
349 .ab = 72351744,
350 .ib = 289406976,
351 },
352 {
353 .src = MSM_BUS_MASTER_AMPSS_M0,
354 .dst = MSM_BUS_SLAVE_EBI_CH0,
355 .ab = 500000,
356 .ib = 1000000,
357 },
358 {
359 .src = MSM_BUS_MASTER_AMPSS_M0,
360 .dst = MSM_BUS_SLAVE_EBI_CH0,
361 .ab = 500000,
362 .ib = 1000000,
363 },
364};
365static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
366 {
367 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
368 .dst = MSM_BUS_SLAVE_EBI_CH0,
369 .ab = 40894464,
370 .ib = 327155712,
371 },
372 {
373 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
374 .dst = MSM_BUS_SLAVE_EBI_CH0,
375 .ab = 48234496,
376 .ib = 192937984,
377 },
378 {
379 .src = MSM_BUS_MASTER_AMPSS_M0,
380 .dst = MSM_BUS_SLAVE_EBI_CH0,
381 .ab = 500000,
382 .ib = 2000000,
383 },
384 {
385 .src = MSM_BUS_MASTER_AMPSS_M0,
386 .dst = MSM_BUS_SLAVE_EBI_CH0,
387 .ab = 500000,
388 .ib = 2000000,
389 },
390};
391static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
392 {
393 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
394 .dst = MSM_BUS_SLAVE_EBI_CH0,
395 .ab = 163577856,
396 .ib = 1308622848,
397 },
398 {
399 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
400 .dst = MSM_BUS_SLAVE_EBI_CH0,
401 .ab = 219152384,
402 .ib = 876609536,
403 },
404 {
405 .src = MSM_BUS_MASTER_AMPSS_M0,
406 .dst = MSM_BUS_SLAVE_EBI_CH0,
407 .ab = 1750000,
408 .ib = 3500000,
409 },
410 {
411 .src = MSM_BUS_MASTER_AMPSS_M0,
412 .dst = MSM_BUS_SLAVE_EBI_CH0,
413 .ab = 1750000,
414 .ib = 3500000,
415 },
416};
417static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
418 {
419 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
420 .dst = MSM_BUS_SLAVE_EBI_CH0,
421 .ab = 121634816,
422 .ib = 973078528,
423 },
424 {
425 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
426 .dst = MSM_BUS_SLAVE_EBI_CH0,
427 .ab = 155189248,
428 .ib = 620756992,
429 },
430 {
431 .src = MSM_BUS_MASTER_AMPSS_M0,
432 .dst = MSM_BUS_SLAVE_EBI_CH0,
433 .ab = 1750000,
434 .ib = 7000000,
435 },
436 {
437 .src = MSM_BUS_MASTER_AMPSS_M0,
438 .dst = MSM_BUS_SLAVE_EBI_CH0,
439 .ab = 1750000,
440 .ib = 7000000,
441 },
442};
443static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
444 {
445 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
446 .dst = MSM_BUS_SLAVE_EBI_CH0,
447 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700448 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700449 },
450 {
451 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
452 .dst = MSM_BUS_SLAVE_EBI_CH0,
453 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700454 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700455 },
456 {
457 .src = MSM_BUS_MASTER_AMPSS_M0,
458 .dst = MSM_BUS_SLAVE_EBI_CH0,
459 .ab = 2500000,
460 .ib = 5000000,
461 },
462 {
463 .src = MSM_BUS_MASTER_AMPSS_M0,
464 .dst = MSM_BUS_SLAVE_EBI_CH0,
465 .ab = 2500000,
466 .ib = 5000000,
467 },
468};
469static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
470 {
471 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
472 .dst = MSM_BUS_SLAVE_EBI_CH0,
473 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700474 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700475 },
476 {
477 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
478 .dst = MSM_BUS_SLAVE_EBI_CH0,
479 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700480 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700481 },
482 {
483 .src = MSM_BUS_MASTER_AMPSS_M0,
484 .dst = MSM_BUS_SLAVE_EBI_CH0,
485 .ab = 2500000,
486 .ib = 700000000,
487 },
488 {
489 .src = MSM_BUS_MASTER_AMPSS_M0,
490 .dst = MSM_BUS_SLAVE_EBI_CH0,
491 .ab = 2500000,
492 .ib = 10000000,
493 },
494};
495
496static struct msm_bus_paths vidc_bus_client_config[] = {
497 {
498 ARRAY_SIZE(vidc_init_vectors),
499 vidc_init_vectors,
500 },
501 {
502 ARRAY_SIZE(vidc_venc_vga_vectors),
503 vidc_venc_vga_vectors,
504 },
505 {
506 ARRAY_SIZE(vidc_vdec_vga_vectors),
507 vidc_vdec_vga_vectors,
508 },
509 {
510 ARRAY_SIZE(vidc_venc_720p_vectors),
511 vidc_venc_720p_vectors,
512 },
513 {
514 ARRAY_SIZE(vidc_vdec_720p_vectors),
515 vidc_vdec_720p_vectors,
516 },
517 {
518 ARRAY_SIZE(vidc_venc_1080p_vectors),
519 vidc_venc_1080p_vectors,
520 },
521 {
522 ARRAY_SIZE(vidc_vdec_1080p_vectors),
523 vidc_vdec_1080p_vectors,
524 },
525};
526
527static struct msm_bus_scale_pdata vidc_bus_client_data = {
528 vidc_bus_client_config,
529 ARRAY_SIZE(vidc_bus_client_config),
530 .name = "vidc",
531};
532#endif
533
Mona Hossain9c430e32011-07-27 11:04:47 -0700534#ifdef CONFIG_HW_RANDOM_MSM
535/* PRNG device */
536#define MSM_PRNG_PHYS 0x1A500000
537static struct resource rng_resources = {
538 .flags = IORESOURCE_MEM,
539 .start = MSM_PRNG_PHYS,
540 .end = MSM_PRNG_PHYS + SZ_512 - 1,
541};
542
543struct platform_device msm_device_rng = {
544 .name = "msm_rng",
545 .id = 0,
546 .num_resources = 1,
547 .resource = &rng_resources,
548};
549#endif
550
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700551#define MSM_VIDC_BASE_PHYS 0x04400000
552#define MSM_VIDC_BASE_SIZE 0x00100000
553
554static struct resource msm_device_vidc_resources[] = {
555 {
556 .start = MSM_VIDC_BASE_PHYS,
557 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
558 .flags = IORESOURCE_MEM,
559 },
560 {
561 .start = VCODEC_IRQ,
562 .end = VCODEC_IRQ,
563 .flags = IORESOURCE_IRQ,
564 },
565};
566
567struct msm_vidc_platform_data vidc_platform_data = {
568#ifdef CONFIG_MSM_BUS_SCALING
569 .vidc_bus_client_pdata = &vidc_bus_client_data,
570#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700571#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Olav Hauganb5be7992011-11-18 14:29:02 -0800572 .memtype = ION_CP_MM_HEAP_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700573 .enable_ion = 1,
574#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800575 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700576 .enable_ion = 0,
577#endif
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800578 .disable_dmx = 0,
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530579 .disable_fullhd = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700580};
581
582struct platform_device msm_device_vidc = {
583 .name = "msm_vidc",
584 .id = 0,
585 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
586 .resource = msm_device_vidc_resources,
587 .dev = {
588 .platform_data = &vidc_platform_data,
589 },
590};
591
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700592#define MSM_SDC1_BASE 0x12400000
593#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
594#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
595#define MSM_SDC2_BASE 0x12140000
596#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
597#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
598#define MSM_SDC2_BASE 0x12140000
599#define MSM_SDC3_BASE 0x12180000
600#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
601#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
602#define MSM_SDC4_BASE 0x121C0000
603#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
604#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
605#define MSM_SDC5_BASE 0x12200000
606#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
607#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
608
609static struct resource resources_sdc1[] = {
610 {
611 .name = "core_mem",
612 .flags = IORESOURCE_MEM,
613 .start = MSM_SDC1_BASE,
614 .end = MSM_SDC1_DML_BASE - 1,
615 },
616 {
617 .name = "core_irq",
618 .flags = IORESOURCE_IRQ,
619 .start = SDC1_IRQ_0,
620 .end = SDC1_IRQ_0
621 },
622#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
623 {
624 .name = "sdcc_dml_addr",
625 .start = MSM_SDC1_DML_BASE,
626 .end = MSM_SDC1_BAM_BASE - 1,
627 .flags = IORESOURCE_MEM,
628 },
629 {
630 .name = "sdcc_bam_addr",
631 .start = MSM_SDC1_BAM_BASE,
632 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
633 .flags = IORESOURCE_MEM,
634 },
635 {
636 .name = "sdcc_bam_irq",
637 .start = SDC1_BAM_IRQ,
638 .end = SDC1_BAM_IRQ,
639 .flags = IORESOURCE_IRQ,
640 },
641#endif
642};
643
644static struct resource resources_sdc2[] = {
645 {
646 .name = "core_mem",
647 .flags = IORESOURCE_MEM,
648 .start = MSM_SDC2_BASE,
649 .end = MSM_SDC2_DML_BASE - 1,
650 },
651 {
652 .name = "core_irq",
653 .flags = IORESOURCE_IRQ,
654 .start = SDC2_IRQ_0,
655 .end = SDC2_IRQ_0
656 },
657#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
658 {
659 .name = "sdcc_dml_addr",
660 .start = MSM_SDC2_DML_BASE,
661 .end = MSM_SDC2_BAM_BASE - 1,
662 .flags = IORESOURCE_MEM,
663 },
664 {
665 .name = "sdcc_bam_addr",
666 .start = MSM_SDC2_BAM_BASE,
667 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
668 .flags = IORESOURCE_MEM,
669 },
670 {
671 .name = "sdcc_bam_irq",
672 .start = SDC2_BAM_IRQ,
673 .end = SDC2_BAM_IRQ,
674 .flags = IORESOURCE_IRQ,
675 },
676#endif
677};
678
679static struct resource resources_sdc3[] = {
680 {
681 .name = "core_mem",
682 .flags = IORESOURCE_MEM,
683 .start = MSM_SDC3_BASE,
684 .end = MSM_SDC3_DML_BASE - 1,
685 },
686 {
687 .name = "core_irq",
688 .flags = IORESOURCE_IRQ,
689 .start = SDC3_IRQ_0,
690 .end = SDC3_IRQ_0
691 },
692#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
693 {
694 .name = "sdcc_dml_addr",
695 .start = MSM_SDC3_DML_BASE,
696 .end = MSM_SDC3_BAM_BASE - 1,
697 .flags = IORESOURCE_MEM,
698 },
699 {
700 .name = "sdcc_bam_addr",
701 .start = MSM_SDC3_BAM_BASE,
702 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
703 .flags = IORESOURCE_MEM,
704 },
705 {
706 .name = "sdcc_bam_irq",
707 .start = SDC3_BAM_IRQ,
708 .end = SDC3_BAM_IRQ,
709 .flags = IORESOURCE_IRQ,
710 },
711#endif
712};
713
714static struct resource resources_sdc4[] = {
715 {
716 .name = "core_mem",
717 .flags = IORESOURCE_MEM,
718 .start = MSM_SDC4_BASE,
719 .end = MSM_SDC4_DML_BASE - 1,
720 },
721 {
722 .name = "core_irq",
723 .flags = IORESOURCE_IRQ,
724 .start = SDC4_IRQ_0,
725 .end = SDC4_IRQ_0
726 },
727#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
728 {
729 .name = "sdcc_dml_addr",
730 .start = MSM_SDC4_DML_BASE,
731 .end = MSM_SDC4_BAM_BASE - 1,
732 .flags = IORESOURCE_MEM,
733 },
734 {
735 .name = "sdcc_bam_addr",
736 .start = MSM_SDC4_BAM_BASE,
737 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
738 .flags = IORESOURCE_MEM,
739 },
740 {
741 .name = "sdcc_bam_irq",
742 .start = SDC4_BAM_IRQ,
743 .end = SDC4_BAM_IRQ,
744 .flags = IORESOURCE_IRQ,
745 },
746#endif
747};
748
749static struct resource resources_sdc5[] = {
750 {
751 .name = "core_mem",
752 .flags = IORESOURCE_MEM,
753 .start = MSM_SDC5_BASE,
754 .end = MSM_SDC5_DML_BASE - 1,
755 },
756 {
757 .name = "core_irq",
758 .flags = IORESOURCE_IRQ,
759 .start = SDC5_IRQ_0,
760 .end = SDC5_IRQ_0
761 },
762#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
763 {
764 .name = "sdcc_dml_addr",
765 .start = MSM_SDC5_DML_BASE,
766 .end = MSM_SDC5_BAM_BASE - 1,
767 .flags = IORESOURCE_MEM,
768 },
769 {
770 .name = "sdcc_bam_addr",
771 .start = MSM_SDC5_BAM_BASE,
772 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
773 .flags = IORESOURCE_MEM,
774 },
775 {
776 .name = "sdcc_bam_irq",
777 .start = SDC5_BAM_IRQ,
778 .end = SDC5_BAM_IRQ,
779 .flags = IORESOURCE_IRQ,
780 },
781#endif
782};
783
784struct platform_device msm_device_sdc1 = {
785 .name = "msm_sdcc",
786 .id = 1,
787 .num_resources = ARRAY_SIZE(resources_sdc1),
788 .resource = resources_sdc1,
789 .dev = {
790 .coherent_dma_mask = 0xffffffff,
791 },
792};
793
794struct platform_device msm_device_sdc2 = {
795 .name = "msm_sdcc",
796 .id = 2,
797 .num_resources = ARRAY_SIZE(resources_sdc2),
798 .resource = resources_sdc2,
799 .dev = {
800 .coherent_dma_mask = 0xffffffff,
801 },
802};
803
804struct platform_device msm_device_sdc3 = {
805 .name = "msm_sdcc",
806 .id = 3,
807 .num_resources = ARRAY_SIZE(resources_sdc3),
808 .resource = resources_sdc3,
809 .dev = {
810 .coherent_dma_mask = 0xffffffff,
811 },
812};
813
814struct platform_device msm_device_sdc4 = {
815 .name = "msm_sdcc",
816 .id = 4,
817 .num_resources = ARRAY_SIZE(resources_sdc4),
818 .resource = resources_sdc4,
819 .dev = {
820 .coherent_dma_mask = 0xffffffff,
821 },
822};
823
824struct platform_device msm_device_sdc5 = {
825 .name = "msm_sdcc",
826 .id = 5,
827 .num_resources = ARRAY_SIZE(resources_sdc5),
828 .resource = resources_sdc5,
829 .dev = {
830 .coherent_dma_mask = 0xffffffff,
831 },
832};
833
Stephen Boydeb819882011-08-29 14:46:30 -0700834#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
835#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
836
837static struct resource msm_8960_q6_lpass_resources[] = {
838 {
839 .start = MSM_LPASS_QDSP6SS_PHYS,
840 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
841 .flags = IORESOURCE_MEM,
842 },
843};
844
845static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
846 .strap_tcm_base = 0x01460000,
847 .strap_ahb_upper = 0x00290000,
848 .strap_ahb_lower = 0x00000280,
849 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
850 .name = "q6",
851 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700852 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700853};
854
855struct platform_device msm_8960_q6_lpass = {
856 .name = "pil_qdsp6v4",
857 .id = 0,
858 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
859 .resource = msm_8960_q6_lpass_resources,
860 .dev.platform_data = &msm_8960_q6_lpass_data,
861};
862
863#define MSM_MSS_ENABLE_PHYS 0x08B00000
864#define MSM_FW_QDSP6SS_PHYS 0x08800000
865#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
866#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
867
868static struct resource msm_8960_q6_mss_fw_resources[] = {
869 {
870 .start = MSM_FW_QDSP6SS_PHYS,
871 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
872 .flags = IORESOURCE_MEM,
873 },
874 {
875 .start = MSM_MSS_ENABLE_PHYS,
876 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
877 .flags = IORESOURCE_MEM,
878 },
879};
880
881static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
882 .strap_tcm_base = 0x00400000,
883 .strap_ahb_upper = 0x00090000,
884 .strap_ahb_lower = 0x00000080,
885 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
886 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
887 .name = "modem_fw",
888 .depends = "q6",
889 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700890 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700891};
892
893struct platform_device msm_8960_q6_mss_fw = {
894 .name = "pil_qdsp6v4",
895 .id = 1,
896 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
897 .resource = msm_8960_q6_mss_fw_resources,
898 .dev.platform_data = &msm_8960_q6_mss_fw_data,
899};
900
901#define MSM_SW_QDSP6SS_PHYS 0x08900000
902#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
903#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
904
905static struct resource msm_8960_q6_mss_sw_resources[] = {
906 {
907 .start = MSM_SW_QDSP6SS_PHYS,
908 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
909 .flags = IORESOURCE_MEM,
910 },
911 {
912 .start = MSM_MSS_ENABLE_PHYS,
913 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
914 .flags = IORESOURCE_MEM,
915 },
916};
917
918static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
919 .strap_tcm_base = 0x00420000,
920 .strap_ahb_upper = 0x00090000,
921 .strap_ahb_lower = 0x00000080,
922 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
923 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
924 .name = "modem",
925 .depends = "modem_fw",
926 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700927 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700928};
929
930struct platform_device msm_8960_q6_mss_sw = {
931 .name = "pil_qdsp6v4",
932 .id = 2,
933 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
934 .resource = msm_8960_q6_mss_sw_resources,
935 .dev.platform_data = &msm_8960_q6_mss_sw_data,
936};
937
Stephen Boyd322a9922011-09-20 01:05:54 -0700938static struct resource msm_8960_riva_resources[] = {
939 {
940 .start = 0x03204000,
941 .end = 0x03204000 + SZ_256 - 1,
942 .flags = IORESOURCE_MEM,
943 },
944};
945
946struct platform_device msm_8960_riva = {
947 .name = "pil_riva",
948 .id = -1,
949 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
950 .resource = msm_8960_riva_resources,
951};
952
Stephen Boydd89eebe2011-09-28 23:28:11 -0700953struct platform_device msm_pil_tzapps = {
954 .name = "pil_tzapps",
955 .id = -1,
956};
957
Stephen Boyd25c4a0b2011-09-20 00:12:36 -0700958struct platform_device msm_pil_dsps = {
959 .name = "pil_dsps",
960 .id = -1,
961 .dev.platform_data = "dsps",
962};
963
Eric Holmberg023d25c2012-03-01 12:27:55 -0700964static struct resource smd_resource[] = {
965 {
966 .name = "a9_m2a_0",
967 .start = INT_A9_M2A_0,
968 .flags = IORESOURCE_IRQ,
969 },
970 {
971 .name = "a9_m2a_5",
972 .start = INT_A9_M2A_5,
973 .flags = IORESOURCE_IRQ,
974 },
975 {
976 .name = "adsp_a11",
977 .start = INT_ADSP_A11,
978 .flags = IORESOURCE_IRQ,
979 },
980 {
981 .name = "adsp_a11_smsm",
982 .start = INT_ADSP_A11_SMSM,
983 .flags = IORESOURCE_IRQ,
984 },
985 {
986 .name = "dsps_a11",
987 .start = INT_DSPS_A11,
988 .flags = IORESOURCE_IRQ,
989 },
990 {
991 .name = "dsps_a11_smsm",
992 .start = INT_DSPS_A11_SMSM,
993 .flags = IORESOURCE_IRQ,
994 },
995 {
996 .name = "wcnss_a11",
997 .start = INT_WCNSS_A11,
998 .flags = IORESOURCE_IRQ,
999 },
1000 {
1001 .name = "wcnss_a11_smsm",
1002 .start = INT_WCNSS_A11_SMSM,
1003 .flags = IORESOURCE_IRQ,
1004 },
1005};
1006
1007static struct smd_subsystem_config smd_config_list[] = {
1008 {
1009 .irq_config_id = SMD_MODEM,
1010 .subsys_name = "modem",
1011 .edge = SMD_APPS_MODEM,
1012
1013 .smd_int.irq_name = "a9_m2a_0",
1014 .smd_int.flags = IRQF_TRIGGER_RISING,
1015 .smd_int.irq_id = -1,
1016 .smd_int.device_name = "smd_dev",
1017 .smd_int.dev_id = 0,
1018 .smd_int.out_bit_pos = 1 << 3,
1019 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1020 .smd_int.out_offset = 0x8,
1021
1022 .smsm_int.irq_name = "a9_m2a_5",
1023 .smsm_int.flags = IRQF_TRIGGER_RISING,
1024 .smsm_int.irq_id = -1,
1025 .smsm_int.device_name = "smd_smsm",
1026 .smsm_int.dev_id = 0,
1027 .smsm_int.out_bit_pos = 1 << 4,
1028 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1029 .smsm_int.out_offset = 0x8,
1030 },
1031 {
1032 .irq_config_id = SMD_Q6,
1033 .subsys_name = "q6",
1034 .edge = SMD_APPS_QDSP,
1035
1036 .smd_int.irq_name = "adsp_a11",
1037 .smd_int.flags = IRQF_TRIGGER_RISING,
1038 .smd_int.irq_id = -1,
1039 .smd_int.device_name = "smd_dev",
1040 .smd_int.dev_id = 0,
1041 .smd_int.out_bit_pos = 1 << 15,
1042 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1043 .smd_int.out_offset = 0x8,
1044
1045 .smsm_int.irq_name = "adsp_a11_smsm",
1046 .smsm_int.flags = IRQF_TRIGGER_RISING,
1047 .smsm_int.irq_id = -1,
1048 .smsm_int.device_name = "smd_smsm",
1049 .smsm_int.dev_id = 0,
1050 .smsm_int.out_bit_pos = 1 << 14,
1051 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1052 .smsm_int.out_offset = 0x8,
1053 },
1054 {
1055 .irq_config_id = SMD_DSPS,
1056 .subsys_name = "dsps",
1057 .edge = SMD_APPS_DSPS,
1058
1059 .smd_int.irq_name = "dsps_a11",
1060 .smd_int.flags = IRQF_TRIGGER_RISING,
1061 .smd_int.irq_id = -1,
1062 .smd_int.device_name = "smd_dev",
1063 .smd_int.dev_id = 0,
1064 .smd_int.out_bit_pos = 1,
1065 .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1066 .smd_int.out_offset = 0x4080,
1067
1068 .smsm_int.irq_name = "dsps_a11_smsm",
1069 .smsm_int.flags = IRQF_TRIGGER_RISING,
1070 .smsm_int.irq_id = -1,
1071 .smsm_int.device_name = "smd_smsm",
1072 .smsm_int.dev_id = 0,
1073 .smsm_int.out_bit_pos = 1,
1074 .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1075 .smsm_int.out_offset = 0x4094,
1076 },
1077 {
1078 .irq_config_id = SMD_WCNSS,
1079 .subsys_name = "wcnss",
1080 .edge = SMD_APPS_WCNSS,
1081
1082 .smd_int.irq_name = "wcnss_a11",
1083 .smd_int.flags = IRQF_TRIGGER_RISING,
1084 .smd_int.irq_id = -1,
1085 .smd_int.device_name = "smd_dev",
1086 .smd_int.dev_id = 0,
1087 .smd_int.out_bit_pos = 1 << 25,
1088 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1089 .smd_int.out_offset = 0x8,
1090
1091 .smsm_int.irq_name = "wcnss_a11_smsm",
1092 .smsm_int.flags = IRQF_TRIGGER_RISING,
1093 .smsm_int.irq_id = -1,
1094 .smsm_int.device_name = "smd_smsm",
1095 .smsm_int.dev_id = 0,
1096 .smsm_int.out_bit_pos = 1 << 23,
1097 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1098 .smsm_int.out_offset = 0x8,
1099 },
1100};
1101
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001102static struct smd_subsystem_restart_config smd_ssr_config = {
1103 .disable_smsm_reset_handshake = 1,
1104};
1105
Eric Holmberg023d25c2012-03-01 12:27:55 -07001106static struct smd_platform smd_platform_data = {
1107 .num_ss_configs = ARRAY_SIZE(smd_config_list),
1108 .smd_ss_configs = smd_config_list,
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001109 .smd_ssr_config = &smd_ssr_config,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001110};
1111
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001112struct platform_device msm_device_smd = {
1113 .name = "msm_smd",
1114 .id = -1,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001115 .resource = smd_resource,
1116 .num_resources = ARRAY_SIZE(smd_resource),
1117 .dev = {
1118 .platform_data = &smd_platform_data,
1119 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001120};
1121
1122struct platform_device msm_device_bam_dmux = {
1123 .name = "BAM_RMNT",
1124 .id = -1,
1125};
1126
Jeff Ohlstein7e668552011-10-06 16:17:25 -07001127static struct msm_watchdog_pdata msm_watchdog_pdata = {
1128 .pet_time = 10000,
1129 .bark_time = 11000,
1130 .has_secure = true,
1131};
1132
1133struct platform_device msm8960_device_watchdog = {
1134 .name = "msm_watchdog",
1135 .id = -1,
1136 .dev = {
1137 .platform_data = &msm_watchdog_pdata,
1138 },
1139};
1140
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001141static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001142 {
1143 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001144 .flags = IORESOURCE_IRQ,
1145 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001146 {
1147 .start = 0x18320000,
1148 .end = 0x18320000 + SZ_1M - 1,
1149 .flags = IORESOURCE_MEM,
1150 },
1151};
1152
1153static struct msm_dmov_pdata msm_dmov_pdata = {
1154 .sd = 1,
1155 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001156};
1157
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001158struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001159 .name = "msm_dmov",
1160 .id = -1,
1161 .resource = msm_dmov_resource,
1162 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001163 .dev = {
1164 .platform_data = &msm_dmov_pdata,
1165 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001166};
1167
1168static struct platform_device *msm_sdcc_devices[] __initdata = {
1169 &msm_device_sdc1,
1170 &msm_device_sdc2,
1171 &msm_device_sdc3,
1172 &msm_device_sdc4,
1173 &msm_device_sdc5,
1174};
1175
1176int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1177{
1178 struct platform_device *pdev;
1179
1180 if (controller < 1 || controller > 5)
1181 return -EINVAL;
1182
1183 pdev = msm_sdcc_devices[controller-1];
1184 pdev->dev.platform_data = plat;
1185 return platform_device_register(pdev);
1186}
1187
1188static struct resource resources_qup_i2c_gsbi4[] = {
1189 {
1190 .name = "gsbi_qup_i2c_addr",
1191 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001192 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001193 .flags = IORESOURCE_MEM,
1194 },
1195 {
1196 .name = "qup_phys_addr",
1197 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001198 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001199 .flags = IORESOURCE_MEM,
1200 },
1201 {
1202 .name = "qup_err_intr",
1203 .start = GSBI4_QUP_IRQ,
1204 .end = GSBI4_QUP_IRQ,
1205 .flags = IORESOURCE_IRQ,
1206 },
1207};
1208
1209struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1210 .name = "qup_i2c",
1211 .id = 4,
1212 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1213 .resource = resources_qup_i2c_gsbi4,
1214};
1215
1216static struct resource resources_qup_i2c_gsbi3[] = {
1217 {
1218 .name = "gsbi_qup_i2c_addr",
1219 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001220 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001221 .flags = IORESOURCE_MEM,
1222 },
1223 {
1224 .name = "qup_phys_addr",
1225 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001226 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001227 .flags = IORESOURCE_MEM,
1228 },
1229 {
1230 .name = "qup_err_intr",
1231 .start = GSBI3_QUP_IRQ,
1232 .end = GSBI3_QUP_IRQ,
1233 .flags = IORESOURCE_IRQ,
1234 },
1235};
1236
1237struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1238 .name = "qup_i2c",
1239 .id = 3,
1240 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1241 .resource = resources_qup_i2c_gsbi3,
1242};
1243
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06001244static struct resource resources_qup_i2c_gsbi9[] = {
1245 {
1246 .name = "gsbi_qup_i2c_addr",
1247 .start = MSM_GSBI9_PHYS,
1248 .end = MSM_GSBI9_PHYS + 4 - 1,
1249 .flags = IORESOURCE_MEM,
1250 },
1251 {
1252 .name = "qup_phys_addr",
1253 .start = MSM_GSBI9_QUP_PHYS,
1254 .end = MSM_GSBI9_QUP_PHYS + MSM_QUP_SIZE - 1,
1255 .flags = IORESOURCE_MEM,
1256 },
1257 {
1258 .name = "qup_err_intr",
1259 .start = GSBI9_QUP_IRQ,
1260 .end = GSBI9_QUP_IRQ,
1261 .flags = IORESOURCE_IRQ,
1262 },
1263};
1264
1265struct platform_device msm8960_device_qup_i2c_gsbi9 = {
1266 .name = "qup_i2c",
1267 .id = 0,
1268 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi9),
1269 .resource = resources_qup_i2c_gsbi9,
1270};
1271
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001272static struct resource resources_qup_i2c_gsbi10[] = {
1273 {
1274 .name = "gsbi_qup_i2c_addr",
1275 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001276 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001277 .flags = IORESOURCE_MEM,
1278 },
1279 {
1280 .name = "qup_phys_addr",
1281 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001282 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001283 .flags = IORESOURCE_MEM,
1284 },
1285 {
1286 .name = "qup_err_intr",
1287 .start = GSBI10_QUP_IRQ,
1288 .end = GSBI10_QUP_IRQ,
1289 .flags = IORESOURCE_IRQ,
1290 },
1291};
1292
1293struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1294 .name = "qup_i2c",
1295 .id = 10,
1296 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1297 .resource = resources_qup_i2c_gsbi10,
1298};
1299
1300static struct resource resources_qup_i2c_gsbi12[] = {
1301 {
1302 .name = "gsbi_qup_i2c_addr",
1303 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001304 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001305 .flags = IORESOURCE_MEM,
1306 },
1307 {
1308 .name = "qup_phys_addr",
1309 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001310 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001311 .flags = IORESOURCE_MEM,
1312 },
1313 {
1314 .name = "qup_err_intr",
1315 .start = GSBI12_QUP_IRQ,
1316 .end = GSBI12_QUP_IRQ,
1317 .flags = IORESOURCE_IRQ,
1318 },
1319};
1320
1321struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1322 .name = "qup_i2c",
1323 .id = 12,
1324 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1325 .resource = resources_qup_i2c_gsbi12,
1326};
1327
1328#ifdef CONFIG_MSM_CAMERA
Kevin Chanbb8ef862012-02-14 13:03:04 -08001329static struct resource msm_cam_gsbi4_i2c_mux_resources[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001330 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001331 .name = "i2c_mux_rw",
Nishant Pandit24153d82011-08-27 16:05:13 +05301332 .start = 0x008003E0,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001333 .end = 0x008003E0 + SZ_8 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301334 .flags = IORESOURCE_MEM,
1335 },
1336 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001337 .name = "i2c_mux_ctl",
Nishant Pandit24153d82011-08-27 16:05:13 +05301338 .start = 0x008020B8,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001339 .end = 0x008020B8 + SZ_4 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301340 .flags = IORESOURCE_MEM,
1341 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001342};
1343
Kevin Chanbb8ef862012-02-14 13:03:04 -08001344struct platform_device msm8960_device_i2c_mux_gsbi4 = {
1345 .name = "msm_cam_i2c_mux",
1346 .id = 0,
1347 .resource = msm_cam_gsbi4_i2c_mux_resources,
1348 .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources),
1349};
Kevin Chanf6216f22011-10-25 18:40:11 -07001350
1351static struct resource msm_csiphy0_resources[] = {
1352 {
1353 .name = "csiphy",
1354 .start = 0x04800C00,
1355 .end = 0x04800C00 + SZ_1K - 1,
1356 .flags = IORESOURCE_MEM,
1357 },
1358 {
1359 .name = "csiphy",
1360 .start = CSIPHY_4LN_IRQ,
1361 .end = CSIPHY_4LN_IRQ,
1362 .flags = IORESOURCE_IRQ,
1363 },
1364};
1365
1366static struct resource msm_csiphy1_resources[] = {
1367 {
1368 .name = "csiphy",
1369 .start = 0x04801000,
1370 .end = 0x04801000 + SZ_1K - 1,
1371 .flags = IORESOURCE_MEM,
1372 },
1373 {
1374 .name = "csiphy",
1375 .start = MSM8960_CSIPHY_2LN_IRQ,
1376 .end = MSM8960_CSIPHY_2LN_IRQ,
1377 .flags = IORESOURCE_IRQ,
1378 },
1379};
1380
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001381static struct resource msm_csiphy2_resources[] = {
1382 {
1383 .name = "csiphy",
1384 .start = 0x04801400,
1385 .end = 0x04801400 + SZ_1K - 1,
1386 .flags = IORESOURCE_MEM,
1387 },
1388 {
1389 .name = "csiphy",
1390 .start = MSM8960_CSIPHY_2_2LN_IRQ,
1391 .end = MSM8960_CSIPHY_2_2LN_IRQ,
1392 .flags = IORESOURCE_IRQ,
1393 },
1394};
1395
Kevin Chanf6216f22011-10-25 18:40:11 -07001396struct platform_device msm8960_device_csiphy0 = {
1397 .name = "msm_csiphy",
1398 .id = 0,
1399 .resource = msm_csiphy0_resources,
1400 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1401};
1402
1403struct platform_device msm8960_device_csiphy1 = {
1404 .name = "msm_csiphy",
1405 .id = 1,
1406 .resource = msm_csiphy1_resources,
1407 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1408};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001409
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001410struct platform_device msm8960_device_csiphy2 = {
1411 .name = "msm_csiphy",
1412 .id = 2,
1413 .resource = msm_csiphy2_resources,
1414 .num_resources = ARRAY_SIZE(msm_csiphy2_resources),
1415};
1416
Kevin Chanc8b52e82011-10-25 23:20:21 -07001417static struct resource msm_csid0_resources[] = {
1418 {
1419 .name = "csid",
1420 .start = 0x04800000,
1421 .end = 0x04800000 + SZ_1K - 1,
1422 .flags = IORESOURCE_MEM,
1423 },
1424 {
1425 .name = "csid",
1426 .start = CSI_0_IRQ,
1427 .end = CSI_0_IRQ,
1428 .flags = IORESOURCE_IRQ,
1429 },
1430};
1431
1432static struct resource msm_csid1_resources[] = {
1433 {
1434 .name = "csid",
1435 .start = 0x04800400,
1436 .end = 0x04800400 + SZ_1K - 1,
1437 .flags = IORESOURCE_MEM,
1438 },
1439 {
1440 .name = "csid",
1441 .start = CSI_1_IRQ,
1442 .end = CSI_1_IRQ,
1443 .flags = IORESOURCE_IRQ,
1444 },
1445};
1446
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001447static struct resource msm_csid2_resources[] = {
1448 {
1449 .name = "csid",
1450 .start = 0x04801800,
1451 .end = 0x04801800 + SZ_1K - 1,
1452 .flags = IORESOURCE_MEM,
1453 },
1454 {
1455 .name = "csid",
1456 .start = CSI_2_IRQ,
1457 .end = CSI_2_IRQ,
1458 .flags = IORESOURCE_IRQ,
1459 },
1460};
1461
Kevin Chanc8b52e82011-10-25 23:20:21 -07001462struct platform_device msm8960_device_csid0 = {
1463 .name = "msm_csid",
1464 .id = 0,
1465 .resource = msm_csid0_resources,
1466 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1467};
1468
1469struct platform_device msm8960_device_csid1 = {
1470 .name = "msm_csid",
1471 .id = 1,
1472 .resource = msm_csid1_resources,
1473 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1474};
Kevin Chane12c6672011-10-26 11:55:26 -07001475
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001476struct platform_device msm8960_device_csid2 = {
1477 .name = "msm_csid",
1478 .id = 2,
1479 .resource = msm_csid2_resources,
1480 .num_resources = ARRAY_SIZE(msm_csid2_resources),
1481};
1482
Kevin Chane12c6672011-10-26 11:55:26 -07001483struct resource msm_ispif_resources[] = {
1484 {
1485 .name = "ispif",
1486 .start = 0x04800800,
1487 .end = 0x04800800 + SZ_1K - 1,
1488 .flags = IORESOURCE_MEM,
1489 },
1490 {
1491 .name = "ispif",
1492 .start = ISPIF_IRQ,
1493 .end = ISPIF_IRQ,
1494 .flags = IORESOURCE_IRQ,
1495 },
1496};
1497
1498struct platform_device msm8960_device_ispif = {
1499 .name = "msm_ispif",
1500 .id = 0,
1501 .resource = msm_ispif_resources,
1502 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1503};
Kevin Chan5827c552011-10-28 18:36:32 -07001504
1505static struct resource msm_vfe_resources[] = {
1506 {
1507 .name = "vfe32",
1508 .start = 0x04500000,
1509 .end = 0x04500000 + SZ_1M - 1,
1510 .flags = IORESOURCE_MEM,
1511 },
1512 {
1513 .name = "vfe32",
1514 .start = VFE_IRQ,
1515 .end = VFE_IRQ,
1516 .flags = IORESOURCE_IRQ,
1517 },
1518};
1519
1520struct platform_device msm8960_device_vfe = {
1521 .name = "msm_vfe",
1522 .id = 0,
1523 .resource = msm_vfe_resources,
1524 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1525};
Kevin Chana0853122011-11-07 19:48:44 -08001526
1527static struct resource msm_vpe_resources[] = {
1528 {
1529 .name = "vpe",
1530 .start = 0x05300000,
1531 .end = 0x05300000 + SZ_1M - 1,
1532 .flags = IORESOURCE_MEM,
1533 },
1534 {
1535 .name = "vpe",
1536 .start = VPE_IRQ,
1537 .end = VPE_IRQ,
1538 .flags = IORESOURCE_IRQ,
1539 },
1540};
1541
1542struct platform_device msm8960_device_vpe = {
1543 .name = "msm_vpe",
1544 .id = 0,
1545 .resource = msm_vpe_resources,
1546 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1547};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001548#endif
1549
Joel Nidera1261942011-09-12 16:30:09 +03001550#define MSM_TSIF0_PHYS (0x18200000)
1551#define MSM_TSIF1_PHYS (0x18201000)
1552#define MSM_TSIF_SIZE (0x200)
1553
1554#define TSIF_0_CLK GPIO_CFG(75, 1, GPIO_CFG_INPUT, \
1555 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1556#define TSIF_0_EN GPIO_CFG(76, 1, GPIO_CFG_INPUT, \
1557 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1558#define TSIF_0_DATA GPIO_CFG(77, 1, GPIO_CFG_INPUT, \
1559 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1560#define TSIF_0_SYNC GPIO_CFG(82, 1, GPIO_CFG_INPUT, \
1561 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1562#define TSIF_1_CLK GPIO_CFG(79, 1, GPIO_CFG_INPUT, \
1563 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1564#define TSIF_1_EN GPIO_CFG(80, 1, GPIO_CFG_INPUT, \
1565 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1566#define TSIF_1_DATA GPIO_CFG(81, 1, GPIO_CFG_INPUT, \
1567 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1568#define TSIF_1_SYNC GPIO_CFG(78, 1, GPIO_CFG_INPUT, \
1569 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1570
1571static const struct msm_gpio tsif0_gpios[] = {
1572 { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", },
1573 { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", },
1574 { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", },
1575 { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", },
1576};
1577
1578static const struct msm_gpio tsif1_gpios[] = {
1579 { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", },
1580 { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", },
1581 { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", },
1582 { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", },
1583};
1584
1585struct msm_tsif_platform_data tsif1_platform_data = {
1586 .num_gpios = ARRAY_SIZE(tsif1_gpios),
1587 .gpios = tsif1_gpios,
1588 .tsif_pclk = "tsif_pclk",
1589 .tsif_ref_clk = "tsif_ref_clk",
1590};
1591
1592struct resource tsif1_resources[] = {
1593 [0] = {
1594 .flags = IORESOURCE_IRQ,
1595 .start = TSIF2_IRQ,
1596 .end = TSIF2_IRQ,
1597 },
1598 [1] = {
1599 .flags = IORESOURCE_MEM,
1600 .start = MSM_TSIF1_PHYS,
1601 .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1,
1602 },
1603 [2] = {
1604 .flags = IORESOURCE_DMA,
1605 .start = DMOV_TSIF_CHAN,
1606 .end = DMOV_TSIF_CRCI,
1607 },
1608};
1609
1610struct msm_tsif_platform_data tsif0_platform_data = {
1611 .num_gpios = ARRAY_SIZE(tsif0_gpios),
1612 .gpios = tsif0_gpios,
1613 .tsif_pclk = "tsif_pclk",
1614 .tsif_ref_clk = "tsif_ref_clk",
1615};
1616struct resource tsif0_resources[] = {
1617 [0] = {
1618 .flags = IORESOURCE_IRQ,
1619 .start = TSIF1_IRQ,
1620 .end = TSIF1_IRQ,
1621 },
1622 [1] = {
1623 .flags = IORESOURCE_MEM,
1624 .start = MSM_TSIF0_PHYS,
1625 .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1,
1626 },
1627 [2] = {
1628 .flags = IORESOURCE_DMA,
1629 .start = DMOV_TSIF_CHAN,
1630 .end = DMOV_TSIF_CRCI,
1631 },
1632};
1633
1634struct platform_device msm_device_tsif[2] = {
1635 {
1636 .name = "msm_tsif",
1637 .id = 0,
1638 .num_resources = ARRAY_SIZE(tsif0_resources),
1639 .resource = tsif0_resources,
1640 .dev = {
1641 .platform_data = &tsif0_platform_data
1642 },
1643 },
1644 {
1645 .name = "msm_tsif",
1646 .id = 1,
1647 .num_resources = ARRAY_SIZE(tsif1_resources),
1648 .resource = tsif1_resources,
1649 .dev = {
1650 .platform_data = &tsif1_platform_data
1651 },
1652 }
1653};
1654
Jay Chokshi33c044a2011-12-07 13:05:40 -08001655static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001656 {
1657 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1658 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1659 .flags = IORESOURCE_MEM,
1660 },
1661};
1662
Jay Chokshi33c044a2011-12-07 13:05:40 -08001663struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001664 .name = "msm_ssbi",
1665 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001666 .resource = resources_ssbi_pmic,
1667 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001668};
1669
1670static struct resource resources_qup_spi_gsbi1[] = {
1671 {
1672 .name = "spi_base",
1673 .start = MSM_GSBI1_QUP_PHYS,
1674 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1675 .flags = IORESOURCE_MEM,
1676 },
1677 {
1678 .name = "gsbi_base",
1679 .start = MSM_GSBI1_PHYS,
1680 .end = MSM_GSBI1_PHYS + 4 - 1,
1681 .flags = IORESOURCE_MEM,
1682 },
1683 {
1684 .name = "spi_irq_in",
1685 .start = MSM8960_GSBI1_QUP_IRQ,
1686 .end = MSM8960_GSBI1_QUP_IRQ,
1687 .flags = IORESOURCE_IRQ,
1688 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001689 {
1690 .name = "spi_clk",
1691 .start = 9,
1692 .end = 9,
1693 .flags = IORESOURCE_IO,
1694 },
1695 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001696 .name = "spi_miso",
1697 .start = 7,
1698 .end = 7,
1699 .flags = IORESOURCE_IO,
1700 },
1701 {
1702 .name = "spi_mosi",
1703 .start = 6,
1704 .end = 6,
1705 .flags = IORESOURCE_IO,
1706 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001707 {
1708 .name = "spi_cs",
1709 .start = 8,
1710 .end = 8,
1711 .flags = IORESOURCE_IO,
1712 },
1713 {
1714 .name = "spi_cs1",
1715 .start = 14,
1716 .end = 14,
1717 .flags = IORESOURCE_IO,
1718 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001719};
1720
1721struct platform_device msm8960_device_qup_spi_gsbi1 = {
1722 .name = "spi_qsd",
1723 .id = 0,
1724 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1725 .resource = resources_qup_spi_gsbi1,
1726};
1727
1728struct platform_device msm_pcm = {
1729 .name = "msm-pcm-dsp",
1730 .id = -1,
1731};
1732
Kiran Kandi5e809b02012-01-31 00:24:33 -08001733struct platform_device msm_multi_ch_pcm = {
1734 .name = "msm-multi-ch-pcm-dsp",
1735 .id = -1,
1736};
1737
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001738struct platform_device msm_pcm_routing = {
1739 .name = "msm-pcm-routing",
1740 .id = -1,
1741};
1742
1743struct platform_device msm_cpudai0 = {
1744 .name = "msm-dai-q6",
1745 .id = 0x4000,
1746};
1747
1748struct platform_device msm_cpudai1 = {
1749 .name = "msm-dai-q6",
1750 .id = 0x4001,
1751};
1752
1753struct platform_device msm_cpudai_hdmi_rx = {
Kiran Kandi5e809b02012-01-31 00:24:33 -08001754 .name = "msm-dai-q6-hdmi",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001755 .id = 8,
1756};
1757
1758struct platform_device msm_cpudai_bt_rx = {
1759 .name = "msm-dai-q6",
1760 .id = 0x3000,
1761};
1762
1763struct platform_device msm_cpudai_bt_tx = {
1764 .name = "msm-dai-q6",
1765 .id = 0x3001,
1766};
1767
1768struct platform_device msm_cpudai_fm_rx = {
1769 .name = "msm-dai-q6",
1770 .id = 0x3004,
1771};
1772
1773struct platform_device msm_cpudai_fm_tx = {
1774 .name = "msm-dai-q6",
1775 .id = 0x3005,
1776};
1777
Helen Zeng0705a5f2011-10-14 15:29:52 -07001778struct platform_device msm_cpudai_incall_music_rx = {
1779 .name = "msm-dai-q6",
1780 .id = 0x8005,
1781};
1782
Helen Zenge3d716a2011-10-14 16:32:16 -07001783struct platform_device msm_cpudai_incall_record_rx = {
1784 .name = "msm-dai-q6",
1785 .id = 0x8004,
1786};
1787
1788struct platform_device msm_cpudai_incall_record_tx = {
1789 .name = "msm-dai-q6",
1790 .id = 0x8003,
1791};
1792
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001793/*
1794 * Machine specific data for AUX PCM Interface
1795 * which the driver will be unware of.
1796 */
Kiran Kandi5f4ab692012-02-23 11:23:56 -08001797struct msm_dai_auxpcm_pdata auxpcm_pdata = {
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001798 .clk = "pcm_clk",
1799 .mode = AFE_PCM_CFG_MODE_PCM,
1800 .sync = AFE_PCM_CFG_SYNC_INT,
1801 .frame = AFE_PCM_CFG_FRM_256BPF,
1802 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1803 .slot = 0,
1804 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1805 .pcm_clk_rate = 2048000,
1806};
1807
1808struct platform_device msm_cpudai_auxpcm_rx = {
1809 .name = "msm-dai-q6",
1810 .id = 2,
1811 .dev = {
Kiran Kandi5f4ab692012-02-23 11:23:56 -08001812 .platform_data = &auxpcm_pdata,
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001813 },
1814};
1815
1816struct platform_device msm_cpudai_auxpcm_tx = {
1817 .name = "msm-dai-q6",
1818 .id = 3,
Kiran Kandi5f4ab692012-02-23 11:23:56 -08001819 .dev = {
1820 .platform_data = &auxpcm_pdata,
1821 },
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001822};
1823
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001824struct platform_device msm_cpu_fe = {
1825 .name = "msm-dai-fe",
1826 .id = -1,
1827};
1828
1829struct platform_device msm_stub_codec = {
1830 .name = "msm-stub-codec",
1831 .id = 1,
1832};
1833
1834struct platform_device msm_voice = {
1835 .name = "msm-pcm-voice",
1836 .id = -1,
1837};
1838
1839struct platform_device msm_voip = {
1840 .name = "msm-voip-dsp",
1841 .id = -1,
1842};
1843
1844struct platform_device msm_lpa_pcm = {
1845 .name = "msm-pcm-lpa",
1846 .id = -1,
1847};
1848
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301849struct platform_device msm_compr_dsp = {
1850 .name = "msm-compr-dsp",
1851 .id = -1,
1852};
1853
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001854struct platform_device msm_pcm_hostless = {
1855 .name = "msm-pcm-hostless",
1856 .id = -1,
1857};
1858
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301859struct platform_device msm_cpudai_afe_01_rx = {
1860 .name = "msm-dai-q6",
1861 .id = 0xE0,
1862};
1863
1864struct platform_device msm_cpudai_afe_01_tx = {
1865 .name = "msm-dai-q6",
1866 .id = 0xF0,
1867};
1868
1869struct platform_device msm_cpudai_afe_02_rx = {
1870 .name = "msm-dai-q6",
1871 .id = 0xF1,
1872};
1873
1874struct platform_device msm_cpudai_afe_02_tx = {
1875 .name = "msm-dai-q6",
1876 .id = 0xE1,
1877};
1878
1879struct platform_device msm_pcm_afe = {
1880 .name = "msm-pcm-afe",
1881 .id = -1,
1882};
1883
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001884struct platform_device *msm_footswitch_devices[] = {
Ravishangar Kalyanamb31a0e42012-01-19 16:02:34 -08001885 FS_8X60(FS_MDP, "fs_mdp"),
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001886 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001887 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1888 FS_8X60(FS_VFE, "fs_vfe"),
1889 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001890 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1891 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1892 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001893 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001894};
1895unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1896
1897#ifdef CONFIG_MSM_ROTATOR
1898#define ROTATOR_HW_BASE 0x04E00000
1899static struct resource resources_msm_rotator[] = {
1900 {
1901 .start = ROTATOR_HW_BASE,
1902 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1903 .flags = IORESOURCE_MEM,
1904 },
1905 {
1906 .start = ROT_IRQ,
1907 .end = ROT_IRQ,
1908 .flags = IORESOURCE_IRQ,
1909 },
1910};
1911
1912static struct msm_rot_clocks rotator_clocks[] = {
1913 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001914 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001915 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001916 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001917 },
1918 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001919 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001920 .clk_type = ROTATOR_PCLK,
1921 .clk_rate = 0,
1922 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001923};
1924
1925static struct msm_rotator_platform_data rotator_pdata = {
1926 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1927 .hardware_version_number = 0x01020309,
1928 .rotator_clks = rotator_clocks,
1929 .regulator_name = "fs_rot",
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -08001930#ifdef CONFIG_MSM_BUS_SCALING
1931 .bus_scale_table = &rotator_bus_scale_pdata,
1932#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001933};
1934
1935struct platform_device msm_rotator_device = {
1936 .name = "msm_rotator",
1937 .id = 0,
1938 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1939 .resource = resources_msm_rotator,
1940 .dev = {
1941 .platform_data = &rotator_pdata,
1942 },
1943};
1944#endif
1945
1946#define MIPI_DSI_HW_BASE 0x04700000
1947#define MDP_HW_BASE 0x05100000
1948
1949static struct resource msm_mipi_dsi1_resources[] = {
1950 {
1951 .name = "mipi_dsi",
1952 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001953 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001954 .flags = IORESOURCE_MEM,
1955 },
1956 {
1957 .start = DSI1_IRQ,
1958 .end = DSI1_IRQ,
1959 .flags = IORESOURCE_IRQ,
1960 },
1961};
1962
1963struct platform_device msm_mipi_dsi1_device = {
1964 .name = "mipi_dsi",
1965 .id = 1,
1966 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1967 .resource = msm_mipi_dsi1_resources,
1968};
1969
1970static struct resource msm_mdp_resources[] = {
1971 {
1972 .name = "mdp",
1973 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001974 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001975 .flags = IORESOURCE_MEM,
1976 },
1977 {
1978 .start = MDP_IRQ,
1979 .end = MDP_IRQ,
1980 .flags = IORESOURCE_IRQ,
1981 },
1982};
1983
1984static struct platform_device msm_mdp_device = {
1985 .name = "mdp",
1986 .id = 0,
1987 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1988 .resource = msm_mdp_resources,
1989};
1990
1991static void __init msm_register_device(struct platform_device *pdev, void *data)
1992{
1993 int ret;
1994
1995 pdev->dev.platform_data = data;
1996 ret = platform_device_register(pdev);
1997 if (ret)
1998 dev_err(&pdev->dev,
1999 "%s: platform_device_register() failed = %d\n",
2000 __func__, ret);
2001}
2002
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07002003#ifdef CONFIG_MSM_BUS_SCALING
2004static struct platform_device msm_dtv_device = {
2005 .name = "dtv",
2006 .id = 0,
2007};
2008#endif
2009
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -08002010struct platform_device msm_lvds_device = {
Huaibin Yang4a084e32011-12-15 15:25:52 -08002011 .name = "lvds",
2012 .id = 0,
2013};
2014
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002015void __init msm_fb_register_device(char *name, void *data)
2016{
2017 if (!strncmp(name, "mdp", 3))
2018 msm_register_device(&msm_mdp_device, data);
2019 else if (!strncmp(name, "mipi_dsi", 8))
2020 msm_register_device(&msm_mipi_dsi1_device, data);
Huaibin Yang4a084e32011-12-15 15:25:52 -08002021 else if (!strncmp(name, "lvds", 4))
2022 msm_register_device(&msm_lvds_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07002023#ifdef CONFIG_MSM_BUS_SCALING
2024 else if (!strncmp(name, "dtv", 3))
2025 msm_register_device(&msm_dtv_device, data);
2026#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002027 else
2028 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
2029}
2030
2031static struct resource resources_sps[] = {
2032 {
2033 .name = "pipe_mem",
2034 .start = 0x12800000,
2035 .end = 0x12800000 + 0x4000 - 1,
2036 .flags = IORESOURCE_MEM,
2037 },
2038 {
2039 .name = "bamdma_dma",
2040 .start = 0x12240000,
2041 .end = 0x12240000 + 0x1000 - 1,
2042 .flags = IORESOURCE_MEM,
2043 },
2044 {
2045 .name = "bamdma_bam",
2046 .start = 0x12244000,
2047 .end = 0x12244000 + 0x4000 - 1,
2048 .flags = IORESOURCE_MEM,
2049 },
2050 {
2051 .name = "bamdma_irq",
2052 .start = SPS_BAM_DMA_IRQ,
2053 .end = SPS_BAM_DMA_IRQ,
2054 .flags = IORESOURCE_IRQ,
2055 },
2056};
2057
2058struct msm_sps_platform_data msm_sps_pdata = {
2059 .bamdma_restricted_pipes = 0x06,
2060};
2061
2062struct platform_device msm_device_sps = {
2063 .name = "msm_sps",
2064 .id = -1,
2065 .num_resources = ARRAY_SIZE(resources_sps),
2066 .resource = resources_sps,
2067 .dev.platform_data = &msm_sps_pdata,
2068};
2069
2070#ifdef CONFIG_MSM_MPM
Praveen Chidambaram78499012011-11-01 17:15:17 -06002071static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002072 [1] = MSM_GPIO_TO_INT(46),
2073 [2] = MSM_GPIO_TO_INT(150),
2074 [4] = MSM_GPIO_TO_INT(103),
2075 [5] = MSM_GPIO_TO_INT(104),
2076 [6] = MSM_GPIO_TO_INT(105),
2077 [7] = MSM_GPIO_TO_INT(106),
2078 [8] = MSM_GPIO_TO_INT(107),
2079 [9] = MSM_GPIO_TO_INT(7),
2080 [10] = MSM_GPIO_TO_INT(11),
2081 [11] = MSM_GPIO_TO_INT(15),
2082 [12] = MSM_GPIO_TO_INT(19),
2083 [13] = MSM_GPIO_TO_INT(23),
2084 [14] = MSM_GPIO_TO_INT(27),
2085 [15] = MSM_GPIO_TO_INT(31),
2086 [16] = MSM_GPIO_TO_INT(35),
2087 [19] = MSM_GPIO_TO_INT(90),
2088 [20] = MSM_GPIO_TO_INT(92),
2089 [23] = MSM_GPIO_TO_INT(85),
2090 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002091 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002092 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002093 [29] = MSM_GPIO_TO_INT(10),
2094 [30] = MSM_GPIO_TO_INT(102),
2095 [31] = MSM_GPIO_TO_INT(81),
2096 [32] = MSM_GPIO_TO_INT(78),
2097 [33] = MSM_GPIO_TO_INT(94),
2098 [34] = MSM_GPIO_TO_INT(72),
2099 [35] = MSM_GPIO_TO_INT(39),
2100 [36] = MSM_GPIO_TO_INT(43),
2101 [37] = MSM_GPIO_TO_INT(61),
2102 [38] = MSM_GPIO_TO_INT(50),
2103 [39] = MSM_GPIO_TO_INT(42),
2104 [41] = MSM_GPIO_TO_INT(62),
2105 [42] = MSM_GPIO_TO_INT(76),
2106 [43] = MSM_GPIO_TO_INT(75),
2107 [44] = MSM_GPIO_TO_INT(70),
2108 [45] = MSM_GPIO_TO_INT(69),
2109 [46] = MSM_GPIO_TO_INT(67),
2110 [47] = MSM_GPIO_TO_INT(65),
2111 [48] = MSM_GPIO_TO_INT(58),
2112 [49] = MSM_GPIO_TO_INT(54),
2113 [50] = MSM_GPIO_TO_INT(52),
2114 [51] = MSM_GPIO_TO_INT(49),
2115 [52] = MSM_GPIO_TO_INT(40),
2116 [53] = MSM_GPIO_TO_INT(37),
2117 [54] = MSM_GPIO_TO_INT(24),
2118 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002119};
2120
Praveen Chidambaram78499012011-11-01 17:15:17 -06002121static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002122 TLMM_MSM_SUMMARY_IRQ,
2123 RPM_APCC_CPU0_GP_HIGH_IRQ,
2124 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2125 RPM_APCC_CPU0_GP_LOW_IRQ,
2126 RPM_APCC_CPU0_WAKE_UP_IRQ,
2127 RPM_APCC_CPU1_GP_HIGH_IRQ,
2128 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
2129 RPM_APCC_CPU1_GP_LOW_IRQ,
2130 RPM_APCC_CPU1_WAKE_UP_IRQ,
2131 MSS_TO_APPS_IRQ_0,
2132 MSS_TO_APPS_IRQ_1,
2133 MSS_TO_APPS_IRQ_2,
2134 MSS_TO_APPS_IRQ_3,
2135 MSS_TO_APPS_IRQ_4,
2136 MSS_TO_APPS_IRQ_5,
2137 MSS_TO_APPS_IRQ_6,
2138 MSS_TO_APPS_IRQ_7,
2139 MSS_TO_APPS_IRQ_8,
2140 MSS_TO_APPS_IRQ_9,
2141 LPASS_SCSS_GP_LOW_IRQ,
2142 LPASS_SCSS_GP_MEDIUM_IRQ,
2143 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07002144 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002145 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07002146 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07002147 RIVA_APPS_WLAN_SMSM_IRQ,
2148 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
2149 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002150};
2151
Praveen Chidambaram78499012011-11-01 17:15:17 -06002152struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002153 .irqs_m2a = msm_mpm_irqs_m2a,
2154 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
2155 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
2156 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
2157 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
2158 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
2159 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
2160 .mpm_apps_ipc_val = BIT(1),
2161 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2162
2163};
2164#endif
2165
Stephen Boydbb600ae2011-08-02 20:11:40 -07002166static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002167 CLK_DUMMY("pll2", PLL2, NULL, 0),
2168 CLK_DUMMY("pll8", PLL8, NULL, 0),
2169 CLK_DUMMY("pll4", PLL4, NULL, 0),
2170
2171 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
2172 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
2173 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
2174 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
2175 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2176 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
2177 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
2178 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
2179 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
2180 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
2181 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
2182 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
2183 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
2184 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
2185 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
2186 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
2187
Matt Wagantalle2522372011-08-17 14:52:21 -07002188 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
2189 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
2190 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
2191 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
2192 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
2193 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
2194 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
2195 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
2196 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
2197 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
2198 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
2199 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002200 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
2201 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
2202 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
2203 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
2204 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
2205 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
2206 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
2207 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06002208 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, "qup_i2c.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002209 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
2210 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
2211 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002212 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07002213 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07002214 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002215 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
2216 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
2217 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
2218 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
2219 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002220 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002221 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002222 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
2223 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
2224 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
2225 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
2226 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
2227 CLK_DUMMY("src_clk", USB_FS2_SRC_CLK, NULL, OFF),
2228 CLK_DUMMY("alt_core_clk", USB_FS2_XCVR_CLK, NULL, OFF),
2229 CLK_DUMMY("sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07002230 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
2231 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002232 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
2233 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002234 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002235 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07002236 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002237 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07002238 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002239 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
2240 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06002241 CLK_DUMMY("iface_clk", GSBI9_P_CLK, "qup_i2c.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002242 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
2243 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
2244 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
2245 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002246 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002247 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
2248 CLK_DUMMY("iface_clk", USB_FS2_P_CLK, NULL, OFF),
2249 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002250 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
2251 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
2252 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
2253 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
2254 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07002255 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
2256 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002257 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
2258 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
2259 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
2260 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
2261 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002262 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
2263 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
2264 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
2265 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
2266 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
2267 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
2268 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
2269 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
2270 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
2271 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
2272 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
2273 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
2274 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
2275 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
2276 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002277 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
2278 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
2279 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002280 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002281 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002282 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002283 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
2284 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
2285 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002286 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002287 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
2288 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
2289 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002290 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002291 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
2292 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
2293 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
2294 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
2295 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
2296 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
2297 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
2298 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
2299 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002300 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002301 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
2302 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
2303 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
2304 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
2305 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
2306 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
2307 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
2308 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
2309 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
2310 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002311 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
2312 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
2313 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002314 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
2315 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
2316 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
2317 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002318 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002319 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002320 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002321 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002322 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
2323 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
2324 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
2325 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
2326 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
2327 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
2328 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
2329 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
2330 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
2331 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
2332 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
2333 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
2334 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
2335 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
2336 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002337 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
2338 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
2339 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
2340 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
2341 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
2342 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002343
2344 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08002345 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, "msm_otg", NULL),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002346 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
2347 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
2348 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
2349 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
2350 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002351 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2352 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
2353};
2354
Stephen Boydbb600ae2011-08-02 20:11:40 -07002355struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
2356 .table = msm_clocks_8960_dummy,
2357 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
2358};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002359
2360#define LPASS_SLIMBUS_PHYS 0x28080000
2361#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06002362#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002363/* Board info for the slimbus slave device */
2364static struct resource slimbus_res[] = {
2365 {
2366 .start = LPASS_SLIMBUS_PHYS,
2367 .end = LPASS_SLIMBUS_PHYS + 8191,
2368 .flags = IORESOURCE_MEM,
2369 .name = "slimbus_physical",
2370 },
2371 {
2372 .start = LPASS_SLIMBUS_BAM_PHYS,
2373 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
2374 .flags = IORESOURCE_MEM,
2375 .name = "slimbus_bam_physical",
2376 },
2377 {
Sagar Dhariacc969452011-09-19 10:34:30 -06002378 .start = LPASS_SLIMBUS_SLEW,
2379 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
2380 .flags = IORESOURCE_MEM,
2381 .name = "slimbus_slew_reg",
2382 },
2383 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002384 .start = SLIMBUS0_CORE_EE1_IRQ,
2385 .end = SLIMBUS0_CORE_EE1_IRQ,
2386 .flags = IORESOURCE_IRQ,
2387 .name = "slimbus_irq",
2388 },
2389 {
2390 .start = SLIMBUS0_BAM_EE1_IRQ,
2391 .end = SLIMBUS0_BAM_EE1_IRQ,
2392 .flags = IORESOURCE_IRQ,
2393 .name = "slimbus_bam_irq",
2394 },
2395};
2396
2397struct platform_device msm_slim_ctrl = {
2398 .name = "msm_slim_ctrl",
2399 .id = 1,
2400 .num_resources = ARRAY_SIZE(slimbus_res),
2401 .resource = slimbus_res,
2402 .dev = {
2403 .coherent_dma_mask = 0xffffffffULL,
2404 },
2405};
2406
Lucille Sylvester6e362412011-12-09 16:21:42 -07002407static struct msm_dcvs_freq_entry grp3d_freq[] = {
2408 {0, 0, 333932},
2409 {0, 0, 497532},
2410 {0, 0, 707610},
2411 {0, 0, 844545},
2412};
2413
2414static struct msm_dcvs_freq_entry grp2d_freq[] = {
2415 {0, 0, 86000},
2416 {0, 0, 200000},
2417};
2418
2419static struct msm_dcvs_core_info grp3d_core_info = {
2420 .freq_tbl = &grp3d_freq[0],
2421 .core_param = {
2422 .max_time_us = 100000,
2423 .num_freq = ARRAY_SIZE(grp3d_freq),
2424 },
2425 .algo_param = {
2426 .slack_time_us = 39000,
2427 .disable_pc_threshold = 86000,
2428 .ss_window_size = 1000000,
2429 .ss_util_pct = 95,
2430 .em_max_util_pct = 97,
2431 .ss_iobusy_conv = 100,
2432 },
2433};
2434
2435static struct msm_dcvs_core_info grp2d_core_info = {
2436 .freq_tbl = &grp2d_freq[0],
2437 .core_param = {
2438 .max_time_us = 100000,
2439 .num_freq = ARRAY_SIZE(grp2d_freq),
2440 },
2441 .algo_param = {
2442 .slack_time_us = 39000,
2443 .disable_pc_threshold = 90000,
2444 .ss_window_size = 1000000,
2445 .ss_util_pct = 90,
2446 .em_max_util_pct = 95,
2447 },
2448};
2449
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002450#ifdef CONFIG_MSM_BUS_SCALING
2451static struct msm_bus_vectors grp3d_init_vectors[] = {
2452 {
2453 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2454 .dst = MSM_BUS_SLAVE_EBI_CH0,
2455 .ab = 0,
2456 .ib = 0,
2457 },
2458};
2459
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002460static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002461 {
2462 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2463 .dst = MSM_BUS_SLAVE_EBI_CH0,
2464 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002465 .ib = KGSL_CONVERT_TO_MBPS(1000),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002466 },
2467};
2468
2469static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2470 {
2471 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2472 .dst = MSM_BUS_SLAVE_EBI_CH0,
2473 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002474 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002475 },
2476};
2477
2478static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2479 {
2480 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2481 .dst = MSM_BUS_SLAVE_EBI_CH0,
2482 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002483 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002484 },
2485};
2486
2487static struct msm_bus_vectors grp3d_max_vectors[] = {
2488 {
2489 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2490 .dst = MSM_BUS_SLAVE_EBI_CH0,
2491 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002492 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002493 },
2494};
2495
2496static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2497 {
2498 ARRAY_SIZE(grp3d_init_vectors),
2499 grp3d_init_vectors,
2500 },
2501 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002502 ARRAY_SIZE(grp3d_low_vectors),
2503 grp3d_low_vectors,
2504 },
2505 {
2506 ARRAY_SIZE(grp3d_nominal_low_vectors),
2507 grp3d_nominal_low_vectors,
2508 },
2509 {
2510 ARRAY_SIZE(grp3d_nominal_high_vectors),
2511 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002512 },
2513 {
2514 ARRAY_SIZE(grp3d_max_vectors),
2515 grp3d_max_vectors,
2516 },
2517};
2518
2519static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2520 grp3d_bus_scale_usecases,
2521 ARRAY_SIZE(grp3d_bus_scale_usecases),
2522 .name = "grp3d",
2523};
2524
2525static struct msm_bus_vectors grp2d0_init_vectors[] = {
2526 {
2527 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2528 .dst = MSM_BUS_SLAVE_EBI_CH0,
2529 .ab = 0,
2530 .ib = 0,
2531 },
2532};
2533
Lucille Sylvester808eca22011-11-03 10:26:29 -07002534static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002535 {
2536 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2537 .dst = MSM_BUS_SLAVE_EBI_CH0,
2538 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002539 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002540 },
2541};
2542
Lucille Sylvester808eca22011-11-03 10:26:29 -07002543static struct msm_bus_vectors grp2d0_max_vectors[] = {
2544 {
2545 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2546 .dst = MSM_BUS_SLAVE_EBI_CH0,
2547 .ab = 0,
2548 .ib = KGSL_CONVERT_TO_MBPS(2048),
2549 },
2550};
2551
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002552static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2553 {
2554 ARRAY_SIZE(grp2d0_init_vectors),
2555 grp2d0_init_vectors,
2556 },
2557 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002558 ARRAY_SIZE(grp2d0_nominal_vectors),
2559 grp2d0_nominal_vectors,
2560 },
2561 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002562 ARRAY_SIZE(grp2d0_max_vectors),
2563 grp2d0_max_vectors,
2564 },
2565};
2566
2567struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2568 grp2d0_bus_scale_usecases,
2569 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2570 .name = "grp2d0",
2571};
2572
2573static struct msm_bus_vectors grp2d1_init_vectors[] = {
2574 {
2575 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2576 .dst = MSM_BUS_SLAVE_EBI_CH0,
2577 .ab = 0,
2578 .ib = 0,
2579 },
2580};
2581
Lucille Sylvester808eca22011-11-03 10:26:29 -07002582static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002583 {
2584 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2585 .dst = MSM_BUS_SLAVE_EBI_CH0,
2586 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002587 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002588 },
2589};
2590
Lucille Sylvester808eca22011-11-03 10:26:29 -07002591static struct msm_bus_vectors grp2d1_max_vectors[] = {
2592 {
2593 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2594 .dst = MSM_BUS_SLAVE_EBI_CH0,
2595 .ab = 0,
2596 .ib = KGSL_CONVERT_TO_MBPS(2048),
2597 },
2598};
2599
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002600static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2601 {
2602 ARRAY_SIZE(grp2d1_init_vectors),
2603 grp2d1_init_vectors,
2604 },
2605 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002606 ARRAY_SIZE(grp2d1_nominal_vectors),
2607 grp2d1_nominal_vectors,
2608 },
2609 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002610 ARRAY_SIZE(grp2d1_max_vectors),
2611 grp2d1_max_vectors,
2612 },
2613};
2614
2615struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2616 grp2d1_bus_scale_usecases,
2617 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2618 .name = "grp2d1",
2619};
2620#endif
2621
2622static struct resource kgsl_3d0_resources[] = {
2623 {
2624 .name = KGSL_3D0_REG_MEMORY,
2625 .start = 0x04300000, /* GFX3D address */
2626 .end = 0x0431ffff,
2627 .flags = IORESOURCE_MEM,
2628 },
2629 {
2630 .name = KGSL_3D0_IRQ,
2631 .start = GFX3D_IRQ,
2632 .end = GFX3D_IRQ,
2633 .flags = IORESOURCE_IRQ,
2634 },
2635};
2636
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002637static const char *kgsl_3d0_iommu_ctx_names[] = {
2638 "gfx3d_user",
2639 /* priv_ctx goes here */
2640};
2641
2642static struct kgsl_device_iommu_data kgsl_3d0_iommu_data[] = {
2643 {
2644 .iommu_ctx_names = kgsl_3d0_iommu_ctx_names,
2645 .iommu_ctx_count = ARRAY_SIZE(kgsl_3d0_iommu_ctx_names),
2646 .physstart = 0x07C00000,
2647 .physend = 0x07C00000 + SZ_1M - 1,
2648 },
2649};
2650
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002651static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002652 .pwrlevel = {
2653 {
2654 .gpu_freq = 400000000,
2655 .bus_freq = 4,
2656 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002657 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002658 {
2659 .gpu_freq = 300000000,
2660 .bus_freq = 3,
2661 .io_fraction = 33,
2662 },
2663 {
2664 .gpu_freq = 200000000,
2665 .bus_freq = 2,
2666 .io_fraction = 100,
2667 },
2668 {
2669 .gpu_freq = 128000000,
2670 .bus_freq = 1,
2671 .io_fraction = 100,
2672 },
2673 {
2674 .gpu_freq = 27000000,
2675 .bus_freq = 0,
2676 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002677 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002678 .init_level = 0,
Lucille Sylvester6e362412011-12-09 16:21:42 -07002679 .num_levels = ARRAY_SIZE(grp3d_freq) + 1,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002680 .set_grp_async = NULL,
Lucille Sylvester93650bb2011-11-02 14:37:10 -07002681 .idle_timeout = HZ/20,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002682 .nap_allowed = true,
2683 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002684#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002685 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002686#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002687 .iommu_data = kgsl_3d0_iommu_data,
2688 .iommu_count = ARRAY_SIZE(kgsl_3d0_iommu_data),
Lucille Sylvester6e362412011-12-09 16:21:42 -07002689 .core_info = &grp3d_core_info,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002690};
2691
2692struct platform_device msm_kgsl_3d0 = {
2693 .name = "kgsl-3d0",
2694 .id = 0,
2695 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2696 .resource = kgsl_3d0_resources,
2697 .dev = {
2698 .platform_data = &kgsl_3d0_pdata,
2699 },
2700};
2701
2702static struct resource kgsl_2d0_resources[] = {
2703 {
2704 .name = KGSL_2D0_REG_MEMORY,
2705 .start = 0x04100000, /* Z180 base address */
2706 .end = 0x04100FFF,
2707 .flags = IORESOURCE_MEM,
2708 },
2709 {
2710 .name = KGSL_2D0_IRQ,
2711 .start = GFX2D0_IRQ,
2712 .end = GFX2D0_IRQ,
2713 .flags = IORESOURCE_IRQ,
2714 },
2715};
2716
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002717static const char *kgsl_2d0_iommu_ctx_names[] = {
2718 "gfx2d0_2d0",
2719};
2720
2721static struct kgsl_device_iommu_data kgsl_2d0_iommu_data[] = {
2722 {
2723 .iommu_ctx_names = kgsl_2d0_iommu_ctx_names,
2724 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d0_iommu_ctx_names),
2725 .physstart = 0x07D00000,
2726 .physend = 0x07D00000 + SZ_1M - 1,
2727 },
2728};
2729
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002730static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002731 .pwrlevel = {
2732 {
2733 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002734 .bus_freq = 2,
2735 },
2736 {
2737 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002738 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002739 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002740 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002741 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002742 .bus_freq = 0,
2743 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002744 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002745 .init_level = 0,
Lucille Sylvester6e362412011-12-09 16:21:42 -07002746 .num_levels = ARRAY_SIZE(grp2d_freq) + 1,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002747 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002748 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002749 .nap_allowed = true,
2750 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002751#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002752 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002753#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002754 .iommu_data = kgsl_2d0_iommu_data,
2755 .iommu_count = ARRAY_SIZE(kgsl_2d0_iommu_data),
Lucille Sylvester6e362412011-12-09 16:21:42 -07002756 .core_info = &grp2d_core_info,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002757};
2758
2759struct platform_device msm_kgsl_2d0 = {
2760 .name = "kgsl-2d0",
2761 .id = 0,
2762 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2763 .resource = kgsl_2d0_resources,
2764 .dev = {
2765 .platform_data = &kgsl_2d0_pdata,
2766 },
2767};
2768
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002769static const char *kgsl_2d1_iommu_ctx_names[] = {
Jeremy Gebben5c4c1132012-02-27 11:26:49 -07002770 "gfx2d1_2d1",
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002771};
2772
2773static struct kgsl_device_iommu_data kgsl_2d1_iommu_data[] = {
2774 {
2775 .iommu_ctx_names = kgsl_2d1_iommu_ctx_names,
2776 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d1_iommu_ctx_names),
2777 .physstart = 0x07E00000,
2778 .physend = 0x07E00000 + SZ_1M - 1,
2779 },
2780};
2781
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002782static struct resource kgsl_2d1_resources[] = {
2783 {
2784 .name = KGSL_2D1_REG_MEMORY,
2785 .start = 0x04200000, /* Z180 device 1 base address */
2786 .end = 0x04200FFF,
2787 .flags = IORESOURCE_MEM,
2788 },
2789 {
2790 .name = KGSL_2D1_IRQ,
2791 .start = GFX2D1_IRQ,
2792 .end = GFX2D1_IRQ,
2793 .flags = IORESOURCE_IRQ,
2794 },
2795};
2796
2797static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002798 .pwrlevel = {
2799 {
2800 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002801 .bus_freq = 2,
2802 },
2803 {
2804 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002805 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002806 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002807 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002808 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002809 .bus_freq = 0,
2810 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002811 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002812 .init_level = 0,
Lucille Sylvester6e362412011-12-09 16:21:42 -07002813 .num_levels = ARRAY_SIZE(grp2d_freq) + 1,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002814 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002815 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002816 .nap_allowed = true,
2817 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002818#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002819 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002820#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002821 .iommu_data = kgsl_2d1_iommu_data,
2822 .iommu_count = ARRAY_SIZE(kgsl_2d1_iommu_data),
Lucille Sylvester6e362412011-12-09 16:21:42 -07002823 .core_info = &grp2d_core_info,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002824};
2825
2826struct platform_device msm_kgsl_2d1 = {
2827 .name = "kgsl-2d1",
2828 .id = 1,
2829 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2830 .resource = kgsl_2d1_resources,
2831 .dev = {
2832 .platform_data = &kgsl_2d1_pdata,
2833 },
2834};
2835
2836#ifdef CONFIG_MSM_GEMINI
2837static struct resource msm_gemini_resources[] = {
2838 {
2839 .start = 0x04600000,
2840 .end = 0x04600000 + SZ_1M - 1,
2841 .flags = IORESOURCE_MEM,
2842 },
2843 {
2844 .start = JPEG_IRQ,
2845 .end = JPEG_IRQ,
2846 .flags = IORESOURCE_IRQ,
2847 },
2848};
2849
2850struct platform_device msm8960_gemini_device = {
2851 .name = "msm_gemini",
2852 .resource = msm_gemini_resources,
2853 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2854};
2855#endif
2856
Praveen Chidambaram78499012011-11-01 17:15:17 -06002857struct msm_rpm_platform_data msm8960_rpm_data __initdata = {
2858 .reg_base_addrs = {
2859 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
2860 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
2861 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
2862 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
2863 },
2864 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
Stephen Boydf61255e2012-02-24 14:31:09 -08002865 .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ,
Praveen Chidambaram78499012011-11-01 17:15:17 -06002866 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
2867 .ipc_rpm_val = 4,
2868 .target_id = {
2869 MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
2870 MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
2871 MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8),
2872 MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2873 MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2874 MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1),
2875 MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1),
2876 MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1),
2877 MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2878 MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2879 MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2880 MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2881 MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1),
2882 MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1),
2883 MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1),
2884 MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1),
2885 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0,
2886 APPS_FABRIC_CFG_HALT, 2),
2887 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0,
2888 APPS_FABRIC_CFG_CLKMOD, 3),
2889 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL,
2890 APPS_FABRIC_CFG_IOCTL, 1),
2891 MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2892 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0,
2893 SYS_FABRIC_CFG_HALT, 2),
2894 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0,
2895 SYS_FABRIC_CFG_CLKMOD, 3),
2896 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL,
2897 SYS_FABRIC_CFG_IOCTL, 1),
2898 MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0,
2899 SYSTEM_FABRIC_ARB, 29),
2900 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0,
2901 MMSS_FABRIC_CFG_HALT, 2),
2902 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0,
2903 MMSS_FABRIC_CFG_CLKMOD, 3),
2904 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL,
2905 MMSS_FABRIC_CFG_IOCTL, 1),
2906 MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2907 MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2),
2908 MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2),
2909 MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2),
2910 MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2),
2911 MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2),
2912 MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2),
2913 MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2),
2914 MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2),
2915 MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2),
2916 MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2),
2917 MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2),
2918 MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2),
2919 MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2),
2920 MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2),
2921 MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2),
2922 MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2),
2923 MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2),
2924 MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2),
2925 MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2),
2926 MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2),
2927 MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2),
2928 MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2),
2929 MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2),
2930 MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2),
2931 MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2),
2932 MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2),
2933 MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2),
2934 MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2),
2935 MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2),
2936 MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2),
2937 MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2),
2938 MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2),
2939 MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2),
2940 MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2),
2941 MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2),
2942 MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2),
2943 MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2),
2944 MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2),
2945 MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2),
2946 MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1),
2947 MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1),
2948 MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1),
2949 MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1),
2950 MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1),
2951 MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1),
2952 MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1),
2953 MSM_RPM_MAP(8960, NCP_0, NCP, 2),
2954 MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1),
2955 MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2956 MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1),
2957 MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2),
2958 MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1),
2959 },
2960 .target_status = {
2961 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR),
2962 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR),
2963 MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD),
2964 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0),
2965 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1),
2966 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2),
2967 MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0),
2968 MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE),
2969 MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL),
2970 MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK),
2971 MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK),
2972 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK),
2973 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK),
2974 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK),
2975 MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK),
2976 MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK),
2977 MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK),
2978 MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK),
2979 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK),
2980 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT),
2981 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD),
2982 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL),
2983 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB),
2984 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT),
2985 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD),
2986 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL),
2987 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB),
2988 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT),
2989 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD),
2990 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL),
2991 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB),
2992 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0),
2993 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1),
2994 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0),
2995 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1),
2996 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0),
2997 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1),
2998 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0),
2999 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1),
3000 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0),
3001 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1),
3002 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0),
3003 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1),
3004 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0),
3005 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1),
3006 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0),
3007 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1),
3008 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0),
3009 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1),
3010 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0),
3011 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1),
3012 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0),
3013 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1),
3014 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0),
3015 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1),
3016 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0),
3017 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1),
3018 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0),
3019 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1),
3020 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0),
3021 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1),
3022 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0),
3023 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1),
3024 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0),
3025 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1),
3026 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0),
3027 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1),
3028 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0),
3029 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1),
3030 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0),
3031 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1),
3032 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0),
3033 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1),
3034 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0),
3035 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1),
3036 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0),
3037 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1),
3038 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0),
3039 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1),
3040 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0),
3041 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1),
3042 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0),
3043 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1),
3044 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0),
3045 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1),
3046 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0),
3047 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1),
3048 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0),
3049 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1),
3050 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0),
3051 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1),
3052 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0),
3053 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1),
3054 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0),
3055 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1),
3056 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0),
3057 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1),
3058 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0),
3059 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1),
3060 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0),
3061 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1),
3062 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0),
3063 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1),
3064 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0),
3065 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1),
3066 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0),
3067 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1),
3068 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0),
3069 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1),
3070 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1),
3071 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2),
3072 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3),
3073 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4),
3074 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5),
3075 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6),
3076 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7),
3077 MSM_RPM_STATUS_ID_MAP(8960, NCP_0),
3078 MSM_RPM_STATUS_ID_MAP(8960, NCP_1),
3079 MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS),
3080 MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH),
3081 MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH),
3082 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0),
3083 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1),
3084 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE),
3085 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE),
3086 },
3087 .target_ctrl_id = {
3088 MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR),
3089 MSM_RPM_CTRL_MAP(8960, VERSION_MINOR),
3090 MSM_RPM_CTRL_MAP(8960, VERSION_BUILD),
3091 MSM_RPM_CTRL_MAP(8960, REQ_CTX_0),
3092 MSM_RPM_CTRL_MAP(8960, REQ_SEL_0),
3093 MSM_RPM_CTRL_MAP(8960, ACK_CTX_0),
3094 MSM_RPM_CTRL_MAP(8960, ACK_SEL_0),
3095 },
3096 .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE,
3097 .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION,
3098 .sel_last = MSM_RPM_8960_SEL_LAST,
3099 .ver = {3, 0, 0},
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003100};
Praveen Chidambaram8985b012011-12-16 13:38:59 -07003101
Praveen Chidambaram78499012011-11-01 17:15:17 -06003102struct platform_device msm8960_rpm_device = {
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003103 .name = "msm_rpm",
3104 .id = -1,
3105};
3106
Praveen Chidambaram78499012011-11-01 17:15:17 -06003107static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
3108 .phys_addr_base = 0x0010C000,
3109 .reg_offsets = {
3110 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
3111 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
3112 },
3113 .phys_size = SZ_8K,
3114 .log_len = 4096, /* log's buffer length in bytes */
3115 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
3116};
3117
3118struct platform_device msm8960_rpm_log_device = {
3119 .name = "msm_rpm_log",
3120 .id = -1,
3121 .dev = {
3122 .platform_data = &msm_rpm_log_pdata,
3123 },
3124};
3125
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003126static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
3127 .phys_addr_base = 0x0010D204,
3128 .phys_size = SZ_8K,
3129};
3130
Praveen Chidambaram78499012011-11-01 17:15:17 -06003131struct platform_device msm8960_rpm_stat_device = {
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003132 .name = "msm_rpm_stat",
3133 .id = -1,
3134 .dev = {
3135 .platform_data = &msm_rpm_stat_pdata,
3136 },
3137};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003138
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003139struct platform_device msm_bus_sys_fabric = {
3140 .name = "msm_bus_fabric",
3141 .id = MSM_BUS_FAB_SYSTEM,
3142};
3143struct platform_device msm_bus_apps_fabric = {
3144 .name = "msm_bus_fabric",
3145 .id = MSM_BUS_FAB_APPSS,
3146};
3147struct platform_device msm_bus_mm_fabric = {
3148 .name = "msm_bus_fabric",
3149 .id = MSM_BUS_FAB_MMSS,
3150};
3151struct platform_device msm_bus_sys_fpb = {
3152 .name = "msm_bus_fabric",
3153 .id = MSM_BUS_FAB_SYSTEM_FPB,
3154};
3155struct platform_device msm_bus_cpss_fpb = {
3156 .name = "msm_bus_fabric",
3157 .id = MSM_BUS_FAB_CPSS_FPB,
3158};
3159
3160/* Sensors DSPS platform data */
3161#ifdef CONFIG_MSM_DSPS
3162
3163#define PPSS_REG_PHYS_BASE 0x12080000
3164
3165static struct dsps_clk_info dsps_clks[] = {};
3166static struct dsps_regulator_info dsps_regs[] = {};
3167
3168/*
3169 * Note: GPIOs field is intialized in run-time at the function
3170 * msm8960_init_dsps().
3171 */
3172
3173struct msm_dsps_platform_data msm_dsps_pdata = {
3174 .clks = dsps_clks,
3175 .clks_num = ARRAY_SIZE(dsps_clks),
3176 .gpios = NULL,
3177 .gpios_num = 0,
3178 .regs = dsps_regs,
3179 .regs_num = ARRAY_SIZE(dsps_regs),
3180 .dsps_pwr_ctl_en = 1,
3181 .signature = DSPS_SIGNATURE,
3182};
3183
3184static struct resource msm_dsps_resources[] = {
3185 {
3186 .start = PPSS_REG_PHYS_BASE,
3187 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
3188 .name = "ppss_reg",
3189 .flags = IORESOURCE_MEM,
3190 },
Wentao Xua55500b2011-08-16 18:15:04 -04003191
3192 {
3193 .start = PPSS_WDOG_TIMER_IRQ,
3194 .end = PPSS_WDOG_TIMER_IRQ,
3195 .name = "ppss_wdog",
3196 .flags = IORESOURCE_IRQ,
3197 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003198};
3199
3200struct platform_device msm_dsps_device = {
3201 .name = "msm_dsps",
3202 .id = 0,
3203 .num_resources = ARRAY_SIZE(msm_dsps_resources),
3204 .resource = msm_dsps_resources,
3205 .dev.platform_data = &msm_dsps_pdata,
3206};
3207
3208#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07003209
3210#ifdef CONFIG_MSM_QDSS
3211
3212#define MSM_QDSS_PHYS_BASE 0x01A00000
3213#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
3214#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
3215#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patel492b3012012-03-06 14:22:30 -08003216#define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
Pratik Patel7831c082011-06-08 21:44:37 -07003217
Pratik Patel1403f2a2012-03-21 10:10:00 -07003218#define QDSS_SOURCE(src_name, fpm) { .name = src_name, .fport_mask = fpm, }
3219
3220static struct qdss_source msm_qdss_sources[] = {
3221 QDSS_SOURCE("msm_etm", 0x3),
3222};
3223
3224static struct msm_qdss_platform_data qdss_pdata = {
3225 .src_table = msm_qdss_sources,
3226 .size = ARRAY_SIZE(msm_qdss_sources),
3227 .afamily = 1,
3228};
3229
3230struct platform_device msm_qdss_device = {
3231 .name = "msm_qdss",
3232 .id = -1,
3233 .dev = {
3234 .platform_data = &qdss_pdata,
3235 },
3236};
3237
Pratik Patel7831c082011-06-08 21:44:37 -07003238static struct resource msm_etb_resources[] = {
3239 {
3240 .start = MSM_ETB_PHYS_BASE,
3241 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
3242 .flags = IORESOURCE_MEM,
3243 },
3244};
3245
3246struct platform_device msm_etb_device = {
3247 .name = "msm_etb",
3248 .id = 0,
3249 .num_resources = ARRAY_SIZE(msm_etb_resources),
3250 .resource = msm_etb_resources,
3251};
3252
3253static struct resource msm_tpiu_resources[] = {
3254 {
3255 .start = MSM_TPIU_PHYS_BASE,
3256 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
3257 .flags = IORESOURCE_MEM,
3258 },
3259};
3260
3261struct platform_device msm_tpiu_device = {
3262 .name = "msm_tpiu",
3263 .id = 0,
3264 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
3265 .resource = msm_tpiu_resources,
3266};
3267
3268static struct resource msm_funnel_resources[] = {
3269 {
3270 .start = MSM_FUNNEL_PHYS_BASE,
3271 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
3272 .flags = IORESOURCE_MEM,
3273 },
3274};
3275
3276struct platform_device msm_funnel_device = {
3277 .name = "msm_funnel",
3278 .id = 0,
3279 .num_resources = ARRAY_SIZE(msm_funnel_resources),
3280 .resource = msm_funnel_resources,
3281};
3282
Pratik Patel492b3012012-03-06 14:22:30 -08003283static struct resource msm_etm_resources[] = {
Pratik Patel7831c082011-06-08 21:44:37 -07003284 {
Pratik Patel492b3012012-03-06 14:22:30 -08003285 .start = MSM_ETM_PHYS_BASE,
3286 .end = MSM_ETM_PHYS_BASE + (SZ_4K * 2) - 1,
Pratik Patel7831c082011-06-08 21:44:37 -07003287 .flags = IORESOURCE_MEM,
3288 },
3289};
3290
Pratik Patel492b3012012-03-06 14:22:30 -08003291struct platform_device msm_etm_device = {
3292 .name = "msm_etm",
Pratik Patel7831c082011-06-08 21:44:37 -07003293 .id = 0,
Pratik Patel492b3012012-03-06 14:22:30 -08003294 .num_resources = ARRAY_SIZE(msm_etm_resources),
3295 .resource = msm_etm_resources,
Pratik Patel7831c082011-06-08 21:44:37 -07003296};
3297
3298#endif
Praveen Chidambaram8ea3dcd2011-12-07 14:46:31 -07003299
3300static int msm8960_LPM_latency = 1000; /* >100 usec for WFI */
3301
3302struct platform_device msm8960_cpu_idle_device = {
3303 .name = "msm_cpu_idle",
3304 .id = -1,
3305 .dev = {
3306 .platform_data = &msm8960_LPM_latency,
3307 },
3308};
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -07003309
3310static struct msm_dcvs_freq_entry msm8960_freq[] = {
3311 { 384000, 166981, 345600},
3312 { 702000, 213049, 632502},
3313 {1026000, 285712, 925613},
3314 {1242000, 383945, 1176550},
3315 {1458000, 419729, 1465478},
3316 {1512000, 434116, 1546674},
3317
3318};
3319
3320static struct msm_dcvs_core_info msm8960_core_info = {
3321 .freq_tbl = &msm8960_freq[0],
3322 .core_param = {
3323 .max_time_us = 100000,
3324 .num_freq = ARRAY_SIZE(msm8960_freq),
3325 },
3326 .algo_param = {
3327 .slack_time_us = 58000,
3328 .scale_slack_time = 0,
3329 .scale_slack_time_pct = 0,
3330 .disable_pc_threshold = 1458000,
3331 .em_window_size = 100000,
3332 .em_max_util_pct = 97,
3333 .ss_window_size = 1000000,
3334 .ss_util_pct = 95,
3335 .ss_iobusy_conv = 100,
3336 },
3337};
3338
3339struct platform_device msm8960_msm_gov_device = {
3340 .name = "msm_dcvs_gov",
3341 .id = -1,
3342 .dev = {
3343 .platform_data = &msm8960_core_info,
3344 },
3345};
Stepan Moskovchenko28662c52012-03-01 12:48:45 -08003346
3347static struct resource msm_cache_erp_resources[] = {
3348 {
3349 .name = "l1_irq",
3350 .start = SC_SICCPUXEXTFAULTIRPTREQ,
3351 .flags = IORESOURCE_IRQ,
3352 },
3353 {
3354 .name = "l2_irq",
3355 .start = APCC_QGICL2IRPTREQ,
3356 .flags = IORESOURCE_IRQ,
3357 }
3358};
3359
3360struct platform_device msm8960_device_cache_erp = {
3361 .name = "msm_cache_erp",
3362 .id = -1,
3363 .num_resources = ARRAY_SIZE(msm_cache_erp_resources),
3364 .resource = msm_cache_erp_resources,
3365};