blob: 243e0c8ba9646901f50a75f1232a24a84f1e4a0d [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>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070034#include <sound/msm-dai-q6.h>
35#include <sound/apr_audio.h>
Joel Nidera1261942011-09-12 16:30:09 +030036#include <mach/msm_tsif.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070037#include "clock.h"
38#include "devices.h"
39#include "devices-msm8x60.h"
40#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070041#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060042#include "rpm_log.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060043#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070044#include "pil-q6v4.h"
45#include "scm-pas.h"
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -070046#include <mach/msm_dcvs.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070047
48#ifdef CONFIG_MSM_MPM
49#include "mpm.h"
50#endif
51#ifdef CONFIG_MSM_DSPS
52#include <mach/msm_dsps.h>
53#endif
54
55
56/* Address of GSBI blocks */
57#define MSM_GSBI1_PHYS 0x16000000
58#define MSM_GSBI2_PHYS 0x16100000
59#define MSM_GSBI3_PHYS 0x16200000
60#define MSM_GSBI4_PHYS 0x16300000
61#define MSM_GSBI5_PHYS 0x16400000
62#define MSM_GSBI6_PHYS 0x16500000
63#define MSM_GSBI7_PHYS 0x16600000
64#define MSM_GSBI8_PHYS 0x1A000000
65#define MSM_GSBI9_PHYS 0x1A100000
66#define MSM_GSBI10_PHYS 0x1A200000
67#define MSM_GSBI11_PHYS 0x12440000
68#define MSM_GSBI12_PHYS 0x12480000
69
70#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
71#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053072#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070073
74/* GSBI QUP devices */
75#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
76#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
77#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
78#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
79#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
80#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
81#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
82#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
83#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
84#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
85#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
86#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
87#define MSM_QUP_SIZE SZ_4K
88
89#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
90#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
91#define MSM_PMIC_SSBI_SIZE SZ_4K
92
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070093#define MSM8960_HSUSB_PHYS 0x12500000
94#define MSM8960_HSUSB_SIZE SZ_4K
95
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070096static struct resource resources_otg[] = {
97 {
98 .start = MSM8960_HSUSB_PHYS,
99 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
100 .flags = IORESOURCE_MEM,
101 },
102 {
103 .start = USB1_HS_IRQ,
104 .end = USB1_HS_IRQ,
105 .flags = IORESOURCE_IRQ,
106 },
107};
108
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700109struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700110 .name = "msm_otg",
111 .id = -1,
112 .num_resources = ARRAY_SIZE(resources_otg),
113 .resource = resources_otg,
114 .dev = {
115 .coherent_dma_mask = 0xffffffff,
116 },
117};
118
119static struct resource resources_hsusb[] = {
120 {
121 .start = MSM8960_HSUSB_PHYS,
122 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
123 .flags = IORESOURCE_MEM,
124 },
125 {
126 .start = USB1_HS_IRQ,
127 .end = USB1_HS_IRQ,
128 .flags = IORESOURCE_IRQ,
129 },
130};
131
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700132struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700133 .name = "msm_hsusb",
134 .id = -1,
135 .num_resources = ARRAY_SIZE(resources_hsusb),
136 .resource = resources_hsusb,
137 .dev = {
138 .coherent_dma_mask = 0xffffffff,
139 },
140};
141
142static struct resource resources_hsusb_host[] = {
143 {
144 .start = MSM8960_HSUSB_PHYS,
145 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
146 .flags = IORESOURCE_MEM,
147 },
148 {
149 .start = USB1_HS_IRQ,
150 .end = USB1_HS_IRQ,
151 .flags = IORESOURCE_IRQ,
152 },
153};
154
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530155static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700156struct platform_device msm_device_hsusb_host = {
157 .name = "msm_hsusb_host",
158 .id = -1,
159 .num_resources = ARRAY_SIZE(resources_hsusb_host),
160 .resource = resources_hsusb_host,
161 .dev = {
162 .dma_mask = &dma_mask,
163 .coherent_dma_mask = 0xffffffff,
164 },
165};
166
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530167static struct resource resources_hsic_host[] = {
168 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700169 .start = 0x12520000,
170 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530171 .flags = IORESOURCE_MEM,
172 },
173 {
174 .start = USB_HSIC_IRQ,
175 .end = USB_HSIC_IRQ,
176 .flags = IORESOURCE_IRQ,
177 },
Vamsi Krishna34f01582011-12-14 19:54:42 -0800178 {
179 .start = MSM_GPIO_TO_INT(69),
180 .end = MSM_GPIO_TO_INT(69),
181 .name = "peripheral_status_irq",
182 .flags = IORESOURCE_IRQ,
183 },
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530184};
185
186struct platform_device msm_device_hsic_host = {
187 .name = "msm_hsic_host",
188 .id = -1,
189 .num_resources = ARRAY_SIZE(resources_hsic_host),
190 .resource = resources_hsic_host,
191 .dev = {
192 .dma_mask = &dma_mask,
193 .coherent_dma_mask = DMA_BIT_MASK(32),
194 },
195};
196
Mona Hossain11c03ac2011-10-26 12:42:10 -0700197#define SHARED_IMEM_TZ_BASE 0x2a03f720
198static struct resource tzlog_resources[] = {
199 {
200 .start = SHARED_IMEM_TZ_BASE,
201 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
202 .flags = IORESOURCE_MEM,
203 },
204};
205
206struct platform_device msm_device_tz_log = {
207 .name = "tz_log",
208 .id = 0,
209 .num_resources = ARRAY_SIZE(tzlog_resources),
210 .resource = tzlog_resources,
211};
212
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700213static struct resource resources_uart_gsbi2[] = {
214 {
215 .start = MSM8960_GSBI2_UARTDM_IRQ,
216 .end = MSM8960_GSBI2_UARTDM_IRQ,
217 .flags = IORESOURCE_IRQ,
218 },
219 {
220 .start = MSM_UART2DM_PHYS,
221 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
222 .name = "uartdm_resource",
223 .flags = IORESOURCE_MEM,
224 },
225 {
226 .start = MSM_GSBI2_PHYS,
227 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
228 .name = "gsbi_resource",
229 .flags = IORESOURCE_MEM,
230 },
231};
232
233struct platform_device msm8960_device_uart_gsbi2 = {
234 .name = "msm_serial_hsl",
235 .id = 0,
236 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
237 .resource = resources_uart_gsbi2,
238};
Mayank Rana9f51f582011-08-04 18:35:59 +0530239/* GSBI 6 used into UARTDM Mode */
240static struct resource msm_uart_dm6_resources[] = {
241 {
242 .start = MSM_UART6DM_PHYS,
243 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
244 .name = "uartdm_resource",
245 .flags = IORESOURCE_MEM,
246 },
247 {
248 .start = GSBI6_UARTDM_IRQ,
249 .end = GSBI6_UARTDM_IRQ,
250 .flags = IORESOURCE_IRQ,
251 },
252 {
253 .start = MSM_GSBI6_PHYS,
254 .end = MSM_GSBI6_PHYS + 4 - 1,
255 .name = "gsbi_resource",
256 .flags = IORESOURCE_MEM,
257 },
258 {
259 .start = DMOV_HSUART_GSBI6_TX_CHAN,
260 .end = DMOV_HSUART_GSBI6_RX_CHAN,
261 .name = "uartdm_channels",
262 .flags = IORESOURCE_DMA,
263 },
264 {
265 .start = DMOV_HSUART_GSBI6_TX_CRCI,
266 .end = DMOV_HSUART_GSBI6_RX_CRCI,
267 .name = "uartdm_crci",
268 .flags = IORESOURCE_DMA,
269 },
270};
271static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
272struct platform_device msm_device_uart_dm6 = {
273 .name = "msm_serial_hs",
274 .id = 0,
275 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
276 .resource = msm_uart_dm6_resources,
277 .dev = {
278 .dma_mask = &msm_uart_dm6_dma_mask,
279 .coherent_dma_mask = DMA_BIT_MASK(32),
280 },
281};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700282
283static struct resource resources_uart_gsbi5[] = {
284 {
285 .start = GSBI5_UARTDM_IRQ,
286 .end = GSBI5_UARTDM_IRQ,
287 .flags = IORESOURCE_IRQ,
288 },
289 {
290 .start = MSM_UART5DM_PHYS,
291 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
292 .name = "uartdm_resource",
293 .flags = IORESOURCE_MEM,
294 },
295 {
296 .start = MSM_GSBI5_PHYS,
297 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
298 .name = "gsbi_resource",
299 .flags = IORESOURCE_MEM,
300 },
301};
302
303struct platform_device msm8960_device_uart_gsbi5 = {
304 .name = "msm_serial_hsl",
305 .id = 0,
306 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
307 .resource = resources_uart_gsbi5,
308};
309/* MSM Video core device */
310#ifdef CONFIG_MSM_BUS_SCALING
311static struct msm_bus_vectors vidc_init_vectors[] = {
312 {
313 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
314 .dst = MSM_BUS_SLAVE_EBI_CH0,
315 .ab = 0,
316 .ib = 0,
317 },
318 {
319 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
320 .dst = MSM_BUS_SLAVE_EBI_CH0,
321 .ab = 0,
322 .ib = 0,
323 },
324 {
325 .src = MSM_BUS_MASTER_AMPSS_M0,
326 .dst = MSM_BUS_SLAVE_EBI_CH0,
327 .ab = 0,
328 .ib = 0,
329 },
330 {
331 .src = MSM_BUS_MASTER_AMPSS_M0,
332 .dst = MSM_BUS_SLAVE_EBI_CH0,
333 .ab = 0,
334 .ib = 0,
335 },
336};
337static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
338 {
339 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
340 .dst = MSM_BUS_SLAVE_EBI_CH0,
341 .ab = 54525952,
342 .ib = 436207616,
343 },
344 {
345 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
346 .dst = MSM_BUS_SLAVE_EBI_CH0,
347 .ab = 72351744,
348 .ib = 289406976,
349 },
350 {
351 .src = MSM_BUS_MASTER_AMPSS_M0,
352 .dst = MSM_BUS_SLAVE_EBI_CH0,
353 .ab = 500000,
354 .ib = 1000000,
355 },
356 {
357 .src = MSM_BUS_MASTER_AMPSS_M0,
358 .dst = MSM_BUS_SLAVE_EBI_CH0,
359 .ab = 500000,
360 .ib = 1000000,
361 },
362};
363static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
364 {
365 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
366 .dst = MSM_BUS_SLAVE_EBI_CH0,
367 .ab = 40894464,
368 .ib = 327155712,
369 },
370 {
371 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
372 .dst = MSM_BUS_SLAVE_EBI_CH0,
373 .ab = 48234496,
374 .ib = 192937984,
375 },
376 {
377 .src = MSM_BUS_MASTER_AMPSS_M0,
378 .dst = MSM_BUS_SLAVE_EBI_CH0,
379 .ab = 500000,
380 .ib = 2000000,
381 },
382 {
383 .src = MSM_BUS_MASTER_AMPSS_M0,
384 .dst = MSM_BUS_SLAVE_EBI_CH0,
385 .ab = 500000,
386 .ib = 2000000,
387 },
388};
389static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
390 {
391 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
392 .dst = MSM_BUS_SLAVE_EBI_CH0,
393 .ab = 163577856,
394 .ib = 1308622848,
395 },
396 {
397 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
398 .dst = MSM_BUS_SLAVE_EBI_CH0,
399 .ab = 219152384,
400 .ib = 876609536,
401 },
402 {
403 .src = MSM_BUS_MASTER_AMPSS_M0,
404 .dst = MSM_BUS_SLAVE_EBI_CH0,
405 .ab = 1750000,
406 .ib = 3500000,
407 },
408 {
409 .src = MSM_BUS_MASTER_AMPSS_M0,
410 .dst = MSM_BUS_SLAVE_EBI_CH0,
411 .ab = 1750000,
412 .ib = 3500000,
413 },
414};
415static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
416 {
417 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
418 .dst = MSM_BUS_SLAVE_EBI_CH0,
419 .ab = 121634816,
420 .ib = 973078528,
421 },
422 {
423 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
424 .dst = MSM_BUS_SLAVE_EBI_CH0,
425 .ab = 155189248,
426 .ib = 620756992,
427 },
428 {
429 .src = MSM_BUS_MASTER_AMPSS_M0,
430 .dst = MSM_BUS_SLAVE_EBI_CH0,
431 .ab = 1750000,
432 .ib = 7000000,
433 },
434 {
435 .src = MSM_BUS_MASTER_AMPSS_M0,
436 .dst = MSM_BUS_SLAVE_EBI_CH0,
437 .ab = 1750000,
438 .ib = 7000000,
439 },
440};
441static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
442 {
443 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
444 .dst = MSM_BUS_SLAVE_EBI_CH0,
445 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700446 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700447 },
448 {
449 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
450 .dst = MSM_BUS_SLAVE_EBI_CH0,
451 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700452 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700453 },
454 {
455 .src = MSM_BUS_MASTER_AMPSS_M0,
456 .dst = MSM_BUS_SLAVE_EBI_CH0,
457 .ab = 2500000,
458 .ib = 5000000,
459 },
460 {
461 .src = MSM_BUS_MASTER_AMPSS_M0,
462 .dst = MSM_BUS_SLAVE_EBI_CH0,
463 .ab = 2500000,
464 .ib = 5000000,
465 },
466};
467static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
468 {
469 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
470 .dst = MSM_BUS_SLAVE_EBI_CH0,
471 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700472 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700473 },
474 {
475 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
476 .dst = MSM_BUS_SLAVE_EBI_CH0,
477 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700478 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700479 },
480 {
481 .src = MSM_BUS_MASTER_AMPSS_M0,
482 .dst = MSM_BUS_SLAVE_EBI_CH0,
483 .ab = 2500000,
484 .ib = 700000000,
485 },
486 {
487 .src = MSM_BUS_MASTER_AMPSS_M0,
488 .dst = MSM_BUS_SLAVE_EBI_CH0,
489 .ab = 2500000,
490 .ib = 10000000,
491 },
492};
493
494static struct msm_bus_paths vidc_bus_client_config[] = {
495 {
496 ARRAY_SIZE(vidc_init_vectors),
497 vidc_init_vectors,
498 },
499 {
500 ARRAY_SIZE(vidc_venc_vga_vectors),
501 vidc_venc_vga_vectors,
502 },
503 {
504 ARRAY_SIZE(vidc_vdec_vga_vectors),
505 vidc_vdec_vga_vectors,
506 },
507 {
508 ARRAY_SIZE(vidc_venc_720p_vectors),
509 vidc_venc_720p_vectors,
510 },
511 {
512 ARRAY_SIZE(vidc_vdec_720p_vectors),
513 vidc_vdec_720p_vectors,
514 },
515 {
516 ARRAY_SIZE(vidc_venc_1080p_vectors),
517 vidc_venc_1080p_vectors,
518 },
519 {
520 ARRAY_SIZE(vidc_vdec_1080p_vectors),
521 vidc_vdec_1080p_vectors,
522 },
523};
524
525static struct msm_bus_scale_pdata vidc_bus_client_data = {
526 vidc_bus_client_config,
527 ARRAY_SIZE(vidc_bus_client_config),
528 .name = "vidc",
529};
530#endif
531
Mona Hossain9c430e32011-07-27 11:04:47 -0700532#ifdef CONFIG_HW_RANDOM_MSM
533/* PRNG device */
534#define MSM_PRNG_PHYS 0x1A500000
535static struct resource rng_resources = {
536 .flags = IORESOURCE_MEM,
537 .start = MSM_PRNG_PHYS,
538 .end = MSM_PRNG_PHYS + SZ_512 - 1,
539};
540
541struct platform_device msm_device_rng = {
542 .name = "msm_rng",
543 .id = 0,
544 .num_resources = 1,
545 .resource = &rng_resources,
546};
547#endif
548
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700549#define MSM_VIDC_BASE_PHYS 0x04400000
550#define MSM_VIDC_BASE_SIZE 0x00100000
551
552static struct resource msm_device_vidc_resources[] = {
553 {
554 .start = MSM_VIDC_BASE_PHYS,
555 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
556 .flags = IORESOURCE_MEM,
557 },
558 {
559 .start = VCODEC_IRQ,
560 .end = VCODEC_IRQ,
561 .flags = IORESOURCE_IRQ,
562 },
563};
564
565struct msm_vidc_platform_data vidc_platform_data = {
566#ifdef CONFIG_MSM_BUS_SCALING
567 .vidc_bus_client_pdata = &vidc_bus_client_data,
568#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700569#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Olav Hauganb5be7992011-11-18 14:29:02 -0800570 .memtype = ION_CP_MM_HEAP_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700571 .enable_ion = 1,
572#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800573 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700574 .enable_ion = 0,
575#endif
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800576 .disable_dmx = 0,
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530577 .disable_fullhd = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700578};
579
580struct platform_device msm_device_vidc = {
581 .name = "msm_vidc",
582 .id = 0,
583 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
584 .resource = msm_device_vidc_resources,
585 .dev = {
586 .platform_data = &vidc_platform_data,
587 },
588};
589
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700590#define MSM_SDC1_BASE 0x12400000
591#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
592#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
593#define MSM_SDC2_BASE 0x12140000
594#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
595#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
596#define MSM_SDC2_BASE 0x12140000
597#define MSM_SDC3_BASE 0x12180000
598#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
599#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
600#define MSM_SDC4_BASE 0x121C0000
601#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
602#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
603#define MSM_SDC5_BASE 0x12200000
604#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
605#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
606
607static struct resource resources_sdc1[] = {
608 {
609 .name = "core_mem",
610 .flags = IORESOURCE_MEM,
611 .start = MSM_SDC1_BASE,
612 .end = MSM_SDC1_DML_BASE - 1,
613 },
614 {
615 .name = "core_irq",
616 .flags = IORESOURCE_IRQ,
617 .start = SDC1_IRQ_0,
618 .end = SDC1_IRQ_0
619 },
620#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
621 {
622 .name = "sdcc_dml_addr",
623 .start = MSM_SDC1_DML_BASE,
624 .end = MSM_SDC1_BAM_BASE - 1,
625 .flags = IORESOURCE_MEM,
626 },
627 {
628 .name = "sdcc_bam_addr",
629 .start = MSM_SDC1_BAM_BASE,
630 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
631 .flags = IORESOURCE_MEM,
632 },
633 {
634 .name = "sdcc_bam_irq",
635 .start = SDC1_BAM_IRQ,
636 .end = SDC1_BAM_IRQ,
637 .flags = IORESOURCE_IRQ,
638 },
639#endif
640};
641
642static struct resource resources_sdc2[] = {
643 {
644 .name = "core_mem",
645 .flags = IORESOURCE_MEM,
646 .start = MSM_SDC2_BASE,
647 .end = MSM_SDC2_DML_BASE - 1,
648 },
649 {
650 .name = "core_irq",
651 .flags = IORESOURCE_IRQ,
652 .start = SDC2_IRQ_0,
653 .end = SDC2_IRQ_0
654 },
655#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
656 {
657 .name = "sdcc_dml_addr",
658 .start = MSM_SDC2_DML_BASE,
659 .end = MSM_SDC2_BAM_BASE - 1,
660 .flags = IORESOURCE_MEM,
661 },
662 {
663 .name = "sdcc_bam_addr",
664 .start = MSM_SDC2_BAM_BASE,
665 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
666 .flags = IORESOURCE_MEM,
667 },
668 {
669 .name = "sdcc_bam_irq",
670 .start = SDC2_BAM_IRQ,
671 .end = SDC2_BAM_IRQ,
672 .flags = IORESOURCE_IRQ,
673 },
674#endif
675};
676
677static struct resource resources_sdc3[] = {
678 {
679 .name = "core_mem",
680 .flags = IORESOURCE_MEM,
681 .start = MSM_SDC3_BASE,
682 .end = MSM_SDC3_DML_BASE - 1,
683 },
684 {
685 .name = "core_irq",
686 .flags = IORESOURCE_IRQ,
687 .start = SDC3_IRQ_0,
688 .end = SDC3_IRQ_0
689 },
690#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
691 {
692 .name = "sdcc_dml_addr",
693 .start = MSM_SDC3_DML_BASE,
694 .end = MSM_SDC3_BAM_BASE - 1,
695 .flags = IORESOURCE_MEM,
696 },
697 {
698 .name = "sdcc_bam_addr",
699 .start = MSM_SDC3_BAM_BASE,
700 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
701 .flags = IORESOURCE_MEM,
702 },
703 {
704 .name = "sdcc_bam_irq",
705 .start = SDC3_BAM_IRQ,
706 .end = SDC3_BAM_IRQ,
707 .flags = IORESOURCE_IRQ,
708 },
709#endif
710};
711
712static struct resource resources_sdc4[] = {
713 {
714 .name = "core_mem",
715 .flags = IORESOURCE_MEM,
716 .start = MSM_SDC4_BASE,
717 .end = MSM_SDC4_DML_BASE - 1,
718 },
719 {
720 .name = "core_irq",
721 .flags = IORESOURCE_IRQ,
722 .start = SDC4_IRQ_0,
723 .end = SDC4_IRQ_0
724 },
725#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
726 {
727 .name = "sdcc_dml_addr",
728 .start = MSM_SDC4_DML_BASE,
729 .end = MSM_SDC4_BAM_BASE - 1,
730 .flags = IORESOURCE_MEM,
731 },
732 {
733 .name = "sdcc_bam_addr",
734 .start = MSM_SDC4_BAM_BASE,
735 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
736 .flags = IORESOURCE_MEM,
737 },
738 {
739 .name = "sdcc_bam_irq",
740 .start = SDC4_BAM_IRQ,
741 .end = SDC4_BAM_IRQ,
742 .flags = IORESOURCE_IRQ,
743 },
744#endif
745};
746
747static struct resource resources_sdc5[] = {
748 {
749 .name = "core_mem",
750 .flags = IORESOURCE_MEM,
751 .start = MSM_SDC5_BASE,
752 .end = MSM_SDC5_DML_BASE - 1,
753 },
754 {
755 .name = "core_irq",
756 .flags = IORESOURCE_IRQ,
757 .start = SDC5_IRQ_0,
758 .end = SDC5_IRQ_0
759 },
760#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
761 {
762 .name = "sdcc_dml_addr",
763 .start = MSM_SDC5_DML_BASE,
764 .end = MSM_SDC5_BAM_BASE - 1,
765 .flags = IORESOURCE_MEM,
766 },
767 {
768 .name = "sdcc_bam_addr",
769 .start = MSM_SDC5_BAM_BASE,
770 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
771 .flags = IORESOURCE_MEM,
772 },
773 {
774 .name = "sdcc_bam_irq",
775 .start = SDC5_BAM_IRQ,
776 .end = SDC5_BAM_IRQ,
777 .flags = IORESOURCE_IRQ,
778 },
779#endif
780};
781
782struct platform_device msm_device_sdc1 = {
783 .name = "msm_sdcc",
784 .id = 1,
785 .num_resources = ARRAY_SIZE(resources_sdc1),
786 .resource = resources_sdc1,
787 .dev = {
788 .coherent_dma_mask = 0xffffffff,
789 },
790};
791
792struct platform_device msm_device_sdc2 = {
793 .name = "msm_sdcc",
794 .id = 2,
795 .num_resources = ARRAY_SIZE(resources_sdc2),
796 .resource = resources_sdc2,
797 .dev = {
798 .coherent_dma_mask = 0xffffffff,
799 },
800};
801
802struct platform_device msm_device_sdc3 = {
803 .name = "msm_sdcc",
804 .id = 3,
805 .num_resources = ARRAY_SIZE(resources_sdc3),
806 .resource = resources_sdc3,
807 .dev = {
808 .coherent_dma_mask = 0xffffffff,
809 },
810};
811
812struct platform_device msm_device_sdc4 = {
813 .name = "msm_sdcc",
814 .id = 4,
815 .num_resources = ARRAY_SIZE(resources_sdc4),
816 .resource = resources_sdc4,
817 .dev = {
818 .coherent_dma_mask = 0xffffffff,
819 },
820};
821
822struct platform_device msm_device_sdc5 = {
823 .name = "msm_sdcc",
824 .id = 5,
825 .num_resources = ARRAY_SIZE(resources_sdc5),
826 .resource = resources_sdc5,
827 .dev = {
828 .coherent_dma_mask = 0xffffffff,
829 },
830};
831
Stephen Boydeb819882011-08-29 14:46:30 -0700832#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
833#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
834
835static struct resource msm_8960_q6_lpass_resources[] = {
836 {
837 .start = MSM_LPASS_QDSP6SS_PHYS,
838 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
839 .flags = IORESOURCE_MEM,
840 },
841};
842
843static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
844 .strap_tcm_base = 0x01460000,
845 .strap_ahb_upper = 0x00290000,
846 .strap_ahb_lower = 0x00000280,
847 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
848 .name = "q6",
849 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700850 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700851};
852
853struct platform_device msm_8960_q6_lpass = {
854 .name = "pil_qdsp6v4",
855 .id = 0,
856 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
857 .resource = msm_8960_q6_lpass_resources,
858 .dev.platform_data = &msm_8960_q6_lpass_data,
859};
860
861#define MSM_MSS_ENABLE_PHYS 0x08B00000
862#define MSM_FW_QDSP6SS_PHYS 0x08800000
863#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
864#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
865
866static struct resource msm_8960_q6_mss_fw_resources[] = {
867 {
868 .start = MSM_FW_QDSP6SS_PHYS,
869 .end = MSM_FW_QDSP6SS_PHYS + SZ_256 - 1,
870 .flags = IORESOURCE_MEM,
871 },
872 {
873 .start = MSM_MSS_ENABLE_PHYS,
874 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
875 .flags = IORESOURCE_MEM,
876 },
877};
878
879static struct pil_q6v4_pdata msm_8960_q6_mss_fw_data = {
880 .strap_tcm_base = 0x00400000,
881 .strap_ahb_upper = 0x00090000,
882 .strap_ahb_lower = 0x00000080,
883 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
884 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
885 .name = "modem_fw",
886 .depends = "q6",
887 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700888 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700889};
890
891struct platform_device msm_8960_q6_mss_fw = {
892 .name = "pil_qdsp6v4",
893 .id = 1,
894 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
895 .resource = msm_8960_q6_mss_fw_resources,
896 .dev.platform_data = &msm_8960_q6_mss_fw_data,
897};
898
899#define MSM_SW_QDSP6SS_PHYS 0x08900000
900#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
901#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
902
903static struct resource msm_8960_q6_mss_sw_resources[] = {
904 {
905 .start = MSM_SW_QDSP6SS_PHYS,
906 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
907 .flags = IORESOURCE_MEM,
908 },
909 {
910 .start = MSM_MSS_ENABLE_PHYS,
911 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
912 .flags = IORESOURCE_MEM,
913 },
914};
915
916static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
917 .strap_tcm_base = 0x00420000,
918 .strap_ahb_upper = 0x00090000,
919 .strap_ahb_lower = 0x00000080,
920 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
921 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
922 .name = "modem",
923 .depends = "modem_fw",
924 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700925 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700926};
927
928struct platform_device msm_8960_q6_mss_sw = {
929 .name = "pil_qdsp6v4",
930 .id = 2,
931 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
932 .resource = msm_8960_q6_mss_sw_resources,
933 .dev.platform_data = &msm_8960_q6_mss_sw_data,
934};
935
Stephen Boyd322a9922011-09-20 01:05:54 -0700936static struct resource msm_8960_riva_resources[] = {
937 {
938 .start = 0x03204000,
939 .end = 0x03204000 + SZ_256 - 1,
940 .flags = IORESOURCE_MEM,
941 },
942};
943
944struct platform_device msm_8960_riva = {
945 .name = "pil_riva",
946 .id = -1,
947 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
948 .resource = msm_8960_riva_resources,
949};
950
Stephen Boydd89eebe2011-09-28 23:28:11 -0700951struct platform_device msm_pil_tzapps = {
952 .name = "pil_tzapps",
953 .id = -1,
954};
955
Eric Holmberg023d25c2012-03-01 12:27:55 -0700956static struct resource smd_resource[] = {
957 {
958 .name = "a9_m2a_0",
959 .start = INT_A9_M2A_0,
960 .flags = IORESOURCE_IRQ,
961 },
962 {
963 .name = "a9_m2a_5",
964 .start = INT_A9_M2A_5,
965 .flags = IORESOURCE_IRQ,
966 },
967 {
968 .name = "adsp_a11",
969 .start = INT_ADSP_A11,
970 .flags = IORESOURCE_IRQ,
971 },
972 {
973 .name = "adsp_a11_smsm",
974 .start = INT_ADSP_A11_SMSM,
975 .flags = IORESOURCE_IRQ,
976 },
977 {
978 .name = "dsps_a11",
979 .start = INT_DSPS_A11,
980 .flags = IORESOURCE_IRQ,
981 },
982 {
983 .name = "dsps_a11_smsm",
984 .start = INT_DSPS_A11_SMSM,
985 .flags = IORESOURCE_IRQ,
986 },
987 {
988 .name = "wcnss_a11",
989 .start = INT_WCNSS_A11,
990 .flags = IORESOURCE_IRQ,
991 },
992 {
993 .name = "wcnss_a11_smsm",
994 .start = INT_WCNSS_A11_SMSM,
995 .flags = IORESOURCE_IRQ,
996 },
997};
998
999static struct smd_subsystem_config smd_config_list[] = {
1000 {
1001 .irq_config_id = SMD_MODEM,
1002 .subsys_name = "modem",
1003 .edge = SMD_APPS_MODEM,
1004
1005 .smd_int.irq_name = "a9_m2a_0",
1006 .smd_int.flags = IRQF_TRIGGER_RISING,
1007 .smd_int.irq_id = -1,
1008 .smd_int.device_name = "smd_dev",
1009 .smd_int.dev_id = 0,
1010 .smd_int.out_bit_pos = 1 << 3,
1011 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1012 .smd_int.out_offset = 0x8,
1013
1014 .smsm_int.irq_name = "a9_m2a_5",
1015 .smsm_int.flags = IRQF_TRIGGER_RISING,
1016 .smsm_int.irq_id = -1,
1017 .smsm_int.device_name = "smd_smsm",
1018 .smsm_int.dev_id = 0,
1019 .smsm_int.out_bit_pos = 1 << 4,
1020 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1021 .smsm_int.out_offset = 0x8,
1022 },
1023 {
1024 .irq_config_id = SMD_Q6,
1025 .subsys_name = "q6",
1026 .edge = SMD_APPS_QDSP,
1027
1028 .smd_int.irq_name = "adsp_a11",
1029 .smd_int.flags = IRQF_TRIGGER_RISING,
1030 .smd_int.irq_id = -1,
1031 .smd_int.device_name = "smd_dev",
1032 .smd_int.dev_id = 0,
1033 .smd_int.out_bit_pos = 1 << 15,
1034 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1035 .smd_int.out_offset = 0x8,
1036
1037 .smsm_int.irq_name = "adsp_a11_smsm",
1038 .smsm_int.flags = IRQF_TRIGGER_RISING,
1039 .smsm_int.irq_id = -1,
1040 .smsm_int.device_name = "smd_smsm",
1041 .smsm_int.dev_id = 0,
1042 .smsm_int.out_bit_pos = 1 << 14,
1043 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1044 .smsm_int.out_offset = 0x8,
1045 },
1046 {
1047 .irq_config_id = SMD_DSPS,
1048 .subsys_name = "dsps",
1049 .edge = SMD_APPS_DSPS,
1050
1051 .smd_int.irq_name = "dsps_a11",
1052 .smd_int.flags = IRQF_TRIGGER_RISING,
1053 .smd_int.irq_id = -1,
1054 .smd_int.device_name = "smd_dev",
1055 .smd_int.dev_id = 0,
1056 .smd_int.out_bit_pos = 1,
1057 .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1058 .smd_int.out_offset = 0x4080,
1059
1060 .smsm_int.irq_name = "dsps_a11_smsm",
1061 .smsm_int.flags = IRQF_TRIGGER_RISING,
1062 .smsm_int.irq_id = -1,
1063 .smsm_int.device_name = "smd_smsm",
1064 .smsm_int.dev_id = 0,
1065 .smsm_int.out_bit_pos = 1,
1066 .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1067 .smsm_int.out_offset = 0x4094,
1068 },
1069 {
1070 .irq_config_id = SMD_WCNSS,
1071 .subsys_name = "wcnss",
1072 .edge = SMD_APPS_WCNSS,
1073
1074 .smd_int.irq_name = "wcnss_a11",
1075 .smd_int.flags = IRQF_TRIGGER_RISING,
1076 .smd_int.irq_id = -1,
1077 .smd_int.device_name = "smd_dev",
1078 .smd_int.dev_id = 0,
1079 .smd_int.out_bit_pos = 1 << 25,
1080 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1081 .smd_int.out_offset = 0x8,
1082
1083 .smsm_int.irq_name = "wcnss_a11_smsm",
1084 .smsm_int.flags = IRQF_TRIGGER_RISING,
1085 .smsm_int.irq_id = -1,
1086 .smsm_int.device_name = "smd_smsm",
1087 .smsm_int.dev_id = 0,
1088 .smsm_int.out_bit_pos = 1 << 23,
1089 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1090 .smsm_int.out_offset = 0x8,
1091 },
1092};
1093
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001094static struct smd_subsystem_restart_config smd_ssr_config = {
1095 .disable_smsm_reset_handshake = 1,
1096};
1097
Eric Holmberg023d25c2012-03-01 12:27:55 -07001098static struct smd_platform smd_platform_data = {
1099 .num_ss_configs = ARRAY_SIZE(smd_config_list),
1100 .smd_ss_configs = smd_config_list,
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001101 .smd_ssr_config = &smd_ssr_config,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001102};
1103
1104
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001105struct platform_device msm_device_smd = {
1106 .name = "msm_smd",
1107 .id = -1,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001108 .resource = smd_resource,
1109 .num_resources = ARRAY_SIZE(smd_resource),
1110 .dev = {
1111 .platform_data = &smd_platform_data,
1112 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001113};
1114
1115struct platform_device msm_device_bam_dmux = {
1116 .name = "BAM_RMNT",
1117 .id = -1,
1118};
1119
Jeff Ohlstein7e668552011-10-06 16:17:25 -07001120static struct msm_watchdog_pdata msm_watchdog_pdata = {
1121 .pet_time = 10000,
1122 .bark_time = 11000,
1123 .has_secure = true,
1124};
1125
1126struct platform_device msm8960_device_watchdog = {
1127 .name = "msm_watchdog",
1128 .id = -1,
1129 .dev = {
1130 .platform_data = &msm_watchdog_pdata,
1131 },
1132};
1133
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001134static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001135 {
1136 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001137 .flags = IORESOURCE_IRQ,
1138 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001139 {
1140 .start = 0x18320000,
1141 .end = 0x18320000 + SZ_1M - 1,
1142 .flags = IORESOURCE_MEM,
1143 },
1144};
1145
1146static struct msm_dmov_pdata msm_dmov_pdata = {
1147 .sd = 1,
1148 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001149};
1150
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001151struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001152 .name = "msm_dmov",
1153 .id = -1,
1154 .resource = msm_dmov_resource,
1155 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001156 .dev = {
1157 .platform_data = &msm_dmov_pdata,
1158 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001159};
1160
1161static struct platform_device *msm_sdcc_devices[] __initdata = {
1162 &msm_device_sdc1,
1163 &msm_device_sdc2,
1164 &msm_device_sdc3,
1165 &msm_device_sdc4,
1166 &msm_device_sdc5,
1167};
1168
1169int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1170{
1171 struct platform_device *pdev;
1172
1173 if (controller < 1 || controller > 5)
1174 return -EINVAL;
1175
1176 pdev = msm_sdcc_devices[controller-1];
1177 pdev->dev.platform_data = plat;
1178 return platform_device_register(pdev);
1179}
1180
1181static struct resource resources_qup_i2c_gsbi4[] = {
1182 {
1183 .name = "gsbi_qup_i2c_addr",
1184 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001185 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001186 .flags = IORESOURCE_MEM,
1187 },
1188 {
1189 .name = "qup_phys_addr",
1190 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001191 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001192 .flags = IORESOURCE_MEM,
1193 },
1194 {
1195 .name = "qup_err_intr",
1196 .start = GSBI4_QUP_IRQ,
1197 .end = GSBI4_QUP_IRQ,
1198 .flags = IORESOURCE_IRQ,
1199 },
1200};
1201
1202struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1203 .name = "qup_i2c",
1204 .id = 4,
1205 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1206 .resource = resources_qup_i2c_gsbi4,
1207};
1208
1209static struct resource resources_qup_i2c_gsbi3[] = {
1210 {
1211 .name = "gsbi_qup_i2c_addr",
1212 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001213 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001214 .flags = IORESOURCE_MEM,
1215 },
1216 {
1217 .name = "qup_phys_addr",
1218 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001219 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001220 .flags = IORESOURCE_MEM,
1221 },
1222 {
1223 .name = "qup_err_intr",
1224 .start = GSBI3_QUP_IRQ,
1225 .end = GSBI3_QUP_IRQ,
1226 .flags = IORESOURCE_IRQ,
1227 },
1228};
1229
1230struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1231 .name = "qup_i2c",
1232 .id = 3,
1233 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1234 .resource = resources_qup_i2c_gsbi3,
1235};
1236
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06001237static struct resource resources_qup_i2c_gsbi9[] = {
1238 {
1239 .name = "gsbi_qup_i2c_addr",
1240 .start = MSM_GSBI9_PHYS,
1241 .end = MSM_GSBI9_PHYS + 4 - 1,
1242 .flags = IORESOURCE_MEM,
1243 },
1244 {
1245 .name = "qup_phys_addr",
1246 .start = MSM_GSBI9_QUP_PHYS,
1247 .end = MSM_GSBI9_QUP_PHYS + MSM_QUP_SIZE - 1,
1248 .flags = IORESOURCE_MEM,
1249 },
1250 {
1251 .name = "qup_err_intr",
1252 .start = GSBI9_QUP_IRQ,
1253 .end = GSBI9_QUP_IRQ,
1254 .flags = IORESOURCE_IRQ,
1255 },
1256};
1257
1258struct platform_device msm8960_device_qup_i2c_gsbi9 = {
1259 .name = "qup_i2c",
1260 .id = 0,
1261 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi9),
1262 .resource = resources_qup_i2c_gsbi9,
1263};
1264
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001265static struct resource resources_qup_i2c_gsbi10[] = {
1266 {
1267 .name = "gsbi_qup_i2c_addr",
1268 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001269 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001270 .flags = IORESOURCE_MEM,
1271 },
1272 {
1273 .name = "qup_phys_addr",
1274 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001275 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001276 .flags = IORESOURCE_MEM,
1277 },
1278 {
1279 .name = "qup_err_intr",
1280 .start = GSBI10_QUP_IRQ,
1281 .end = GSBI10_QUP_IRQ,
1282 .flags = IORESOURCE_IRQ,
1283 },
1284};
1285
1286struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1287 .name = "qup_i2c",
1288 .id = 10,
1289 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1290 .resource = resources_qup_i2c_gsbi10,
1291};
1292
1293static struct resource resources_qup_i2c_gsbi12[] = {
1294 {
1295 .name = "gsbi_qup_i2c_addr",
1296 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001297 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001298 .flags = IORESOURCE_MEM,
1299 },
1300 {
1301 .name = "qup_phys_addr",
1302 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001303 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001304 .flags = IORESOURCE_MEM,
1305 },
1306 {
1307 .name = "qup_err_intr",
1308 .start = GSBI12_QUP_IRQ,
1309 .end = GSBI12_QUP_IRQ,
1310 .flags = IORESOURCE_IRQ,
1311 },
1312};
1313
1314struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1315 .name = "qup_i2c",
1316 .id = 12,
1317 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1318 .resource = resources_qup_i2c_gsbi12,
1319};
1320
1321#ifdef CONFIG_MSM_CAMERA
Kevin Chanbb8ef862012-02-14 13:03:04 -08001322static struct resource msm_cam_gsbi4_i2c_mux_resources[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001323 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001324 .name = "i2c_mux_rw",
Nishant Pandit24153d82011-08-27 16:05:13 +05301325 .start = 0x008003E0,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001326 .end = 0x008003E0 + SZ_8 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301327 .flags = IORESOURCE_MEM,
1328 },
1329 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001330 .name = "i2c_mux_ctl",
Nishant Pandit24153d82011-08-27 16:05:13 +05301331 .start = 0x008020B8,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001332 .end = 0x008020B8 + SZ_4 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301333 .flags = IORESOURCE_MEM,
1334 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001335};
1336
Kevin Chanbb8ef862012-02-14 13:03:04 -08001337struct platform_device msm8960_device_i2c_mux_gsbi4 = {
1338 .name = "msm_cam_i2c_mux",
1339 .id = 0,
1340 .resource = msm_cam_gsbi4_i2c_mux_resources,
1341 .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources),
1342};
Kevin Chanf6216f22011-10-25 18:40:11 -07001343
1344static struct resource msm_csiphy0_resources[] = {
1345 {
1346 .name = "csiphy",
1347 .start = 0x04800C00,
1348 .end = 0x04800C00 + SZ_1K - 1,
1349 .flags = IORESOURCE_MEM,
1350 },
1351 {
1352 .name = "csiphy",
1353 .start = CSIPHY_4LN_IRQ,
1354 .end = CSIPHY_4LN_IRQ,
1355 .flags = IORESOURCE_IRQ,
1356 },
1357};
1358
1359static struct resource msm_csiphy1_resources[] = {
1360 {
1361 .name = "csiphy",
1362 .start = 0x04801000,
1363 .end = 0x04801000 + SZ_1K - 1,
1364 .flags = IORESOURCE_MEM,
1365 },
1366 {
1367 .name = "csiphy",
1368 .start = MSM8960_CSIPHY_2LN_IRQ,
1369 .end = MSM8960_CSIPHY_2LN_IRQ,
1370 .flags = IORESOURCE_IRQ,
1371 },
1372};
1373
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001374static struct resource msm_csiphy2_resources[] = {
1375 {
1376 .name = "csiphy",
1377 .start = 0x04801400,
1378 .end = 0x04801400 + SZ_1K - 1,
1379 .flags = IORESOURCE_MEM,
1380 },
1381 {
1382 .name = "csiphy",
1383 .start = MSM8960_CSIPHY_2_2LN_IRQ,
1384 .end = MSM8960_CSIPHY_2_2LN_IRQ,
1385 .flags = IORESOURCE_IRQ,
1386 },
1387};
1388
Kevin Chanf6216f22011-10-25 18:40:11 -07001389struct platform_device msm8960_device_csiphy0 = {
1390 .name = "msm_csiphy",
1391 .id = 0,
1392 .resource = msm_csiphy0_resources,
1393 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1394};
1395
1396struct platform_device msm8960_device_csiphy1 = {
1397 .name = "msm_csiphy",
1398 .id = 1,
1399 .resource = msm_csiphy1_resources,
1400 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1401};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001402
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001403struct platform_device msm8960_device_csiphy2 = {
1404 .name = "msm_csiphy",
1405 .id = 2,
1406 .resource = msm_csiphy2_resources,
1407 .num_resources = ARRAY_SIZE(msm_csiphy2_resources),
1408};
1409
Kevin Chanc8b52e82011-10-25 23:20:21 -07001410static struct resource msm_csid0_resources[] = {
1411 {
1412 .name = "csid",
1413 .start = 0x04800000,
1414 .end = 0x04800000 + SZ_1K - 1,
1415 .flags = IORESOURCE_MEM,
1416 },
1417 {
1418 .name = "csid",
1419 .start = CSI_0_IRQ,
1420 .end = CSI_0_IRQ,
1421 .flags = IORESOURCE_IRQ,
1422 },
1423};
1424
1425static struct resource msm_csid1_resources[] = {
1426 {
1427 .name = "csid",
1428 .start = 0x04800400,
1429 .end = 0x04800400 + SZ_1K - 1,
1430 .flags = IORESOURCE_MEM,
1431 },
1432 {
1433 .name = "csid",
1434 .start = CSI_1_IRQ,
1435 .end = CSI_1_IRQ,
1436 .flags = IORESOURCE_IRQ,
1437 },
1438};
1439
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001440static struct resource msm_csid2_resources[] = {
1441 {
1442 .name = "csid",
1443 .start = 0x04801800,
1444 .end = 0x04801800 + SZ_1K - 1,
1445 .flags = IORESOURCE_MEM,
1446 },
1447 {
1448 .name = "csid",
1449 .start = CSI_2_IRQ,
1450 .end = CSI_2_IRQ,
1451 .flags = IORESOURCE_IRQ,
1452 },
1453};
1454
Kevin Chanc8b52e82011-10-25 23:20:21 -07001455struct platform_device msm8960_device_csid0 = {
1456 .name = "msm_csid",
1457 .id = 0,
1458 .resource = msm_csid0_resources,
1459 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1460};
1461
1462struct platform_device msm8960_device_csid1 = {
1463 .name = "msm_csid",
1464 .id = 1,
1465 .resource = msm_csid1_resources,
1466 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1467};
Kevin Chane12c6672011-10-26 11:55:26 -07001468
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001469struct platform_device msm8960_device_csid2 = {
1470 .name = "msm_csid",
1471 .id = 2,
1472 .resource = msm_csid2_resources,
1473 .num_resources = ARRAY_SIZE(msm_csid2_resources),
1474};
1475
Kevin Chane12c6672011-10-26 11:55:26 -07001476struct resource msm_ispif_resources[] = {
1477 {
1478 .name = "ispif",
1479 .start = 0x04800800,
1480 .end = 0x04800800 + SZ_1K - 1,
1481 .flags = IORESOURCE_MEM,
1482 },
1483 {
1484 .name = "ispif",
1485 .start = ISPIF_IRQ,
1486 .end = ISPIF_IRQ,
1487 .flags = IORESOURCE_IRQ,
1488 },
1489};
1490
1491struct platform_device msm8960_device_ispif = {
1492 .name = "msm_ispif",
1493 .id = 0,
1494 .resource = msm_ispif_resources,
1495 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1496};
Kevin Chan5827c552011-10-28 18:36:32 -07001497
1498static struct resource msm_vfe_resources[] = {
1499 {
1500 .name = "vfe32",
1501 .start = 0x04500000,
1502 .end = 0x04500000 + SZ_1M - 1,
1503 .flags = IORESOURCE_MEM,
1504 },
1505 {
1506 .name = "vfe32",
1507 .start = VFE_IRQ,
1508 .end = VFE_IRQ,
1509 .flags = IORESOURCE_IRQ,
1510 },
1511};
1512
1513struct platform_device msm8960_device_vfe = {
1514 .name = "msm_vfe",
1515 .id = 0,
1516 .resource = msm_vfe_resources,
1517 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1518};
Kevin Chana0853122011-11-07 19:48:44 -08001519
1520static struct resource msm_vpe_resources[] = {
1521 {
1522 .name = "vpe",
1523 .start = 0x05300000,
1524 .end = 0x05300000 + SZ_1M - 1,
1525 .flags = IORESOURCE_MEM,
1526 },
1527 {
1528 .name = "vpe",
1529 .start = VPE_IRQ,
1530 .end = VPE_IRQ,
1531 .flags = IORESOURCE_IRQ,
1532 },
1533};
1534
1535struct platform_device msm8960_device_vpe = {
1536 .name = "msm_vpe",
1537 .id = 0,
1538 .resource = msm_vpe_resources,
1539 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1540};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001541#endif
1542
Joel Nidera1261942011-09-12 16:30:09 +03001543#define MSM_TSIF0_PHYS (0x18200000)
1544#define MSM_TSIF1_PHYS (0x18201000)
1545#define MSM_TSIF_SIZE (0x200)
1546
1547#define TSIF_0_CLK GPIO_CFG(75, 1, GPIO_CFG_INPUT, \
1548 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1549#define TSIF_0_EN GPIO_CFG(76, 1, GPIO_CFG_INPUT, \
1550 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1551#define TSIF_0_DATA GPIO_CFG(77, 1, GPIO_CFG_INPUT, \
1552 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1553#define TSIF_0_SYNC GPIO_CFG(82, 1, GPIO_CFG_INPUT, \
1554 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1555#define TSIF_1_CLK GPIO_CFG(79, 1, GPIO_CFG_INPUT, \
1556 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1557#define TSIF_1_EN GPIO_CFG(80, 1, GPIO_CFG_INPUT, \
1558 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1559#define TSIF_1_DATA GPIO_CFG(81, 1, GPIO_CFG_INPUT, \
1560 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1561#define TSIF_1_SYNC GPIO_CFG(78, 1, GPIO_CFG_INPUT, \
1562 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1563
1564static const struct msm_gpio tsif0_gpios[] = {
1565 { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", },
1566 { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", },
1567 { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", },
1568 { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", },
1569};
1570
1571static const struct msm_gpio tsif1_gpios[] = {
1572 { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", },
1573 { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", },
1574 { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", },
1575 { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", },
1576};
1577
1578struct msm_tsif_platform_data tsif1_platform_data = {
1579 .num_gpios = ARRAY_SIZE(tsif1_gpios),
1580 .gpios = tsif1_gpios,
1581 .tsif_pclk = "tsif_pclk",
1582 .tsif_ref_clk = "tsif_ref_clk",
1583};
1584
1585struct resource tsif1_resources[] = {
1586 [0] = {
1587 .flags = IORESOURCE_IRQ,
1588 .start = TSIF2_IRQ,
1589 .end = TSIF2_IRQ,
1590 },
1591 [1] = {
1592 .flags = IORESOURCE_MEM,
1593 .start = MSM_TSIF1_PHYS,
1594 .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1,
1595 },
1596 [2] = {
1597 .flags = IORESOURCE_DMA,
1598 .start = DMOV_TSIF_CHAN,
1599 .end = DMOV_TSIF_CRCI,
1600 },
1601};
1602
1603struct msm_tsif_platform_data tsif0_platform_data = {
1604 .num_gpios = ARRAY_SIZE(tsif0_gpios),
1605 .gpios = tsif0_gpios,
1606 .tsif_pclk = "tsif_pclk",
1607 .tsif_ref_clk = "tsif_ref_clk",
1608};
1609struct resource tsif0_resources[] = {
1610 [0] = {
1611 .flags = IORESOURCE_IRQ,
1612 .start = TSIF1_IRQ,
1613 .end = TSIF1_IRQ,
1614 },
1615 [1] = {
1616 .flags = IORESOURCE_MEM,
1617 .start = MSM_TSIF0_PHYS,
1618 .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1,
1619 },
1620 [2] = {
1621 .flags = IORESOURCE_DMA,
1622 .start = DMOV_TSIF_CHAN,
1623 .end = DMOV_TSIF_CRCI,
1624 },
1625};
1626
1627struct platform_device msm_device_tsif[2] = {
1628 {
1629 .name = "msm_tsif",
1630 .id = 0,
1631 .num_resources = ARRAY_SIZE(tsif0_resources),
1632 .resource = tsif0_resources,
1633 .dev = {
1634 .platform_data = &tsif0_platform_data
1635 },
1636 },
1637 {
1638 .name = "msm_tsif",
1639 .id = 1,
1640 .num_resources = ARRAY_SIZE(tsif1_resources),
1641 .resource = tsif1_resources,
1642 .dev = {
1643 .platform_data = &tsif1_platform_data
1644 },
1645 }
1646};
1647
Jay Chokshi33c044a2011-12-07 13:05:40 -08001648static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001649 {
1650 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1651 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1652 .flags = IORESOURCE_MEM,
1653 },
1654};
1655
Jay Chokshi33c044a2011-12-07 13:05:40 -08001656struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001657 .name = "msm_ssbi",
1658 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001659 .resource = resources_ssbi_pmic,
1660 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001661};
1662
1663static struct resource resources_qup_spi_gsbi1[] = {
1664 {
1665 .name = "spi_base",
1666 .start = MSM_GSBI1_QUP_PHYS,
1667 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1668 .flags = IORESOURCE_MEM,
1669 },
1670 {
1671 .name = "gsbi_base",
1672 .start = MSM_GSBI1_PHYS,
1673 .end = MSM_GSBI1_PHYS + 4 - 1,
1674 .flags = IORESOURCE_MEM,
1675 },
1676 {
1677 .name = "spi_irq_in",
1678 .start = MSM8960_GSBI1_QUP_IRQ,
1679 .end = MSM8960_GSBI1_QUP_IRQ,
1680 .flags = IORESOURCE_IRQ,
1681 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001682 {
1683 .name = "spi_clk",
1684 .start = 9,
1685 .end = 9,
1686 .flags = IORESOURCE_IO,
1687 },
1688 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001689 .name = "spi_miso",
1690 .start = 7,
1691 .end = 7,
1692 .flags = IORESOURCE_IO,
1693 },
1694 {
1695 .name = "spi_mosi",
1696 .start = 6,
1697 .end = 6,
1698 .flags = IORESOURCE_IO,
1699 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001700 {
1701 .name = "spi_cs",
1702 .start = 8,
1703 .end = 8,
1704 .flags = IORESOURCE_IO,
1705 },
1706 {
1707 .name = "spi_cs1",
1708 .start = 14,
1709 .end = 14,
1710 .flags = IORESOURCE_IO,
1711 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001712};
1713
1714struct platform_device msm8960_device_qup_spi_gsbi1 = {
1715 .name = "spi_qsd",
1716 .id = 0,
1717 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1718 .resource = resources_qup_spi_gsbi1,
1719};
1720
1721struct platform_device msm_pcm = {
1722 .name = "msm-pcm-dsp",
1723 .id = -1,
1724};
1725
Kiran Kandi5e809b02012-01-31 00:24:33 -08001726struct platform_device msm_multi_ch_pcm = {
1727 .name = "msm-multi-ch-pcm-dsp",
1728 .id = -1,
1729};
1730
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001731struct platform_device msm_pcm_routing = {
1732 .name = "msm-pcm-routing",
1733 .id = -1,
1734};
1735
1736struct platform_device msm_cpudai0 = {
1737 .name = "msm-dai-q6",
1738 .id = 0x4000,
1739};
1740
1741struct platform_device msm_cpudai1 = {
1742 .name = "msm-dai-q6",
1743 .id = 0x4001,
1744};
1745
1746struct platform_device msm_cpudai_hdmi_rx = {
Kiran Kandi5e809b02012-01-31 00:24:33 -08001747 .name = "msm-dai-q6-hdmi",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001748 .id = 8,
1749};
1750
1751struct platform_device msm_cpudai_bt_rx = {
1752 .name = "msm-dai-q6",
1753 .id = 0x3000,
1754};
1755
1756struct platform_device msm_cpudai_bt_tx = {
1757 .name = "msm-dai-q6",
1758 .id = 0x3001,
1759};
1760
1761struct platform_device msm_cpudai_fm_rx = {
1762 .name = "msm-dai-q6",
1763 .id = 0x3004,
1764};
1765
1766struct platform_device msm_cpudai_fm_tx = {
1767 .name = "msm-dai-q6",
1768 .id = 0x3005,
1769};
1770
Helen Zeng0705a5f2011-10-14 15:29:52 -07001771struct platform_device msm_cpudai_incall_music_rx = {
1772 .name = "msm-dai-q6",
1773 .id = 0x8005,
1774};
1775
Helen Zenge3d716a2011-10-14 16:32:16 -07001776struct platform_device msm_cpudai_incall_record_rx = {
1777 .name = "msm-dai-q6",
1778 .id = 0x8004,
1779};
1780
1781struct platform_device msm_cpudai_incall_record_tx = {
1782 .name = "msm-dai-q6",
1783 .id = 0x8003,
1784};
1785
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001786/*
1787 * Machine specific data for AUX PCM Interface
1788 * which the driver will be unware of.
1789 */
1790struct msm_dai_auxpcm_pdata auxpcm_rx_pdata = {
1791 .clk = "pcm_clk",
1792 .mode = AFE_PCM_CFG_MODE_PCM,
1793 .sync = AFE_PCM_CFG_SYNC_INT,
1794 .frame = AFE_PCM_CFG_FRM_256BPF,
1795 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1796 .slot = 0,
1797 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1798 .pcm_clk_rate = 2048000,
1799};
1800
1801struct platform_device msm_cpudai_auxpcm_rx = {
1802 .name = "msm-dai-q6",
1803 .id = 2,
1804 .dev = {
1805 .platform_data = &auxpcm_rx_pdata,
1806 },
1807};
1808
1809struct platform_device msm_cpudai_auxpcm_tx = {
1810 .name = "msm-dai-q6",
1811 .id = 3,
1812};
1813
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001814struct platform_device msm_cpu_fe = {
1815 .name = "msm-dai-fe",
1816 .id = -1,
1817};
1818
1819struct platform_device msm_stub_codec = {
1820 .name = "msm-stub-codec",
1821 .id = 1,
1822};
1823
1824struct platform_device msm_voice = {
1825 .name = "msm-pcm-voice",
1826 .id = -1,
1827};
1828
1829struct platform_device msm_voip = {
1830 .name = "msm-voip-dsp",
1831 .id = -1,
1832};
1833
1834struct platform_device msm_lpa_pcm = {
1835 .name = "msm-pcm-lpa",
1836 .id = -1,
1837};
1838
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301839struct platform_device msm_compr_dsp = {
1840 .name = "msm-compr-dsp",
1841 .id = -1,
1842};
1843
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001844struct platform_device msm_pcm_hostless = {
1845 .name = "msm-pcm-hostless",
1846 .id = -1,
1847};
1848
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301849struct platform_device msm_cpudai_afe_01_rx = {
1850 .name = "msm-dai-q6",
1851 .id = 0xE0,
1852};
1853
1854struct platform_device msm_cpudai_afe_01_tx = {
1855 .name = "msm-dai-q6",
1856 .id = 0xF0,
1857};
1858
1859struct platform_device msm_cpudai_afe_02_rx = {
1860 .name = "msm-dai-q6",
1861 .id = 0xF1,
1862};
1863
1864struct platform_device msm_cpudai_afe_02_tx = {
1865 .name = "msm-dai-q6",
1866 .id = 0xE1,
1867};
1868
1869struct platform_device msm_pcm_afe = {
1870 .name = "msm-pcm-afe",
1871 .id = -1,
1872};
1873
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001874struct platform_device *msm_footswitch_devices[] = {
Ravishangar Kalyanamb31a0e42012-01-19 16:02:34 -08001875 FS_8X60(FS_MDP, "fs_mdp"),
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001876 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001877 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1878 FS_8X60(FS_VFE, "fs_vfe"),
1879 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001880 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1881 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1882 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001883 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001884};
1885unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1886
1887#ifdef CONFIG_MSM_ROTATOR
1888#define ROTATOR_HW_BASE 0x04E00000
1889static struct resource resources_msm_rotator[] = {
1890 {
1891 .start = ROTATOR_HW_BASE,
1892 .end = ROTATOR_HW_BASE + 0x100000 - 1,
1893 .flags = IORESOURCE_MEM,
1894 },
1895 {
1896 .start = ROT_IRQ,
1897 .end = ROT_IRQ,
1898 .flags = IORESOURCE_IRQ,
1899 },
1900};
1901
1902static struct msm_rot_clocks rotator_clocks[] = {
1903 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001904 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001905 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07001906 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001907 },
1908 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001909 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001910 .clk_type = ROTATOR_PCLK,
1911 .clk_rate = 0,
1912 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001913};
1914
1915static struct msm_rotator_platform_data rotator_pdata = {
1916 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1917 .hardware_version_number = 0x01020309,
1918 .rotator_clks = rotator_clocks,
1919 .regulator_name = "fs_rot",
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -08001920#ifdef CONFIG_MSM_BUS_SCALING
1921 .bus_scale_table = &rotator_bus_scale_pdata,
1922#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001923};
1924
1925struct platform_device msm_rotator_device = {
1926 .name = "msm_rotator",
1927 .id = 0,
1928 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1929 .resource = resources_msm_rotator,
1930 .dev = {
1931 .platform_data = &rotator_pdata,
1932 },
1933};
1934#endif
1935
1936#define MIPI_DSI_HW_BASE 0x04700000
1937#define MDP_HW_BASE 0x05100000
1938
1939static struct resource msm_mipi_dsi1_resources[] = {
1940 {
1941 .name = "mipi_dsi",
1942 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001943 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001944 .flags = IORESOURCE_MEM,
1945 },
1946 {
1947 .start = DSI1_IRQ,
1948 .end = DSI1_IRQ,
1949 .flags = IORESOURCE_IRQ,
1950 },
1951};
1952
1953struct platform_device msm_mipi_dsi1_device = {
1954 .name = "mipi_dsi",
1955 .id = 1,
1956 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
1957 .resource = msm_mipi_dsi1_resources,
1958};
1959
1960static struct resource msm_mdp_resources[] = {
1961 {
1962 .name = "mdp",
1963 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07001964 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001965 .flags = IORESOURCE_MEM,
1966 },
1967 {
1968 .start = MDP_IRQ,
1969 .end = MDP_IRQ,
1970 .flags = IORESOURCE_IRQ,
1971 },
1972};
1973
1974static struct platform_device msm_mdp_device = {
1975 .name = "mdp",
1976 .id = 0,
1977 .num_resources = ARRAY_SIZE(msm_mdp_resources),
1978 .resource = msm_mdp_resources,
1979};
1980
1981static void __init msm_register_device(struct platform_device *pdev, void *data)
1982{
1983 int ret;
1984
1985 pdev->dev.platform_data = data;
1986 ret = platform_device_register(pdev);
1987 if (ret)
1988 dev_err(&pdev->dev,
1989 "%s: platform_device_register() failed = %d\n",
1990 __func__, ret);
1991}
1992
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07001993#ifdef CONFIG_MSM_BUS_SCALING
1994static struct platform_device msm_dtv_device = {
1995 .name = "dtv",
1996 .id = 0,
1997};
1998#endif
1999
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -08002000struct platform_device msm_lvds_device = {
Huaibin Yang4a084e32011-12-15 15:25:52 -08002001 .name = "lvds",
2002 .id = 0,
2003};
2004
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002005void __init msm_fb_register_device(char *name, void *data)
2006{
2007 if (!strncmp(name, "mdp", 3))
2008 msm_register_device(&msm_mdp_device, data);
2009 else if (!strncmp(name, "mipi_dsi", 8))
2010 msm_register_device(&msm_mipi_dsi1_device, data);
Huaibin Yang4a084e32011-12-15 15:25:52 -08002011 else if (!strncmp(name, "lvds", 4))
2012 msm_register_device(&msm_lvds_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07002013#ifdef CONFIG_MSM_BUS_SCALING
2014 else if (!strncmp(name, "dtv", 3))
2015 msm_register_device(&msm_dtv_device, data);
2016#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002017 else
2018 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
2019}
2020
2021static struct resource resources_sps[] = {
2022 {
2023 .name = "pipe_mem",
2024 .start = 0x12800000,
2025 .end = 0x12800000 + 0x4000 - 1,
2026 .flags = IORESOURCE_MEM,
2027 },
2028 {
2029 .name = "bamdma_dma",
2030 .start = 0x12240000,
2031 .end = 0x12240000 + 0x1000 - 1,
2032 .flags = IORESOURCE_MEM,
2033 },
2034 {
2035 .name = "bamdma_bam",
2036 .start = 0x12244000,
2037 .end = 0x12244000 + 0x4000 - 1,
2038 .flags = IORESOURCE_MEM,
2039 },
2040 {
2041 .name = "bamdma_irq",
2042 .start = SPS_BAM_DMA_IRQ,
2043 .end = SPS_BAM_DMA_IRQ,
2044 .flags = IORESOURCE_IRQ,
2045 },
2046};
2047
2048struct msm_sps_platform_data msm_sps_pdata = {
2049 .bamdma_restricted_pipes = 0x06,
2050};
2051
2052struct platform_device msm_device_sps = {
2053 .name = "msm_sps",
2054 .id = -1,
2055 .num_resources = ARRAY_SIZE(resources_sps),
2056 .resource = resources_sps,
2057 .dev.platform_data = &msm_sps_pdata,
2058};
2059
2060#ifdef CONFIG_MSM_MPM
Praveen Chidambaram78499012011-11-01 17:15:17 -06002061static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002062 [1] = MSM_GPIO_TO_INT(46),
2063 [2] = MSM_GPIO_TO_INT(150),
2064 [4] = MSM_GPIO_TO_INT(103),
2065 [5] = MSM_GPIO_TO_INT(104),
2066 [6] = MSM_GPIO_TO_INT(105),
2067 [7] = MSM_GPIO_TO_INT(106),
2068 [8] = MSM_GPIO_TO_INT(107),
2069 [9] = MSM_GPIO_TO_INT(7),
2070 [10] = MSM_GPIO_TO_INT(11),
2071 [11] = MSM_GPIO_TO_INT(15),
2072 [12] = MSM_GPIO_TO_INT(19),
2073 [13] = MSM_GPIO_TO_INT(23),
2074 [14] = MSM_GPIO_TO_INT(27),
2075 [15] = MSM_GPIO_TO_INT(31),
2076 [16] = MSM_GPIO_TO_INT(35),
2077 [19] = MSM_GPIO_TO_INT(90),
2078 [20] = MSM_GPIO_TO_INT(92),
2079 [23] = MSM_GPIO_TO_INT(85),
2080 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002081 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002082 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002083 [29] = MSM_GPIO_TO_INT(10),
2084 [30] = MSM_GPIO_TO_INT(102),
2085 [31] = MSM_GPIO_TO_INT(81),
2086 [32] = MSM_GPIO_TO_INT(78),
2087 [33] = MSM_GPIO_TO_INT(94),
2088 [34] = MSM_GPIO_TO_INT(72),
2089 [35] = MSM_GPIO_TO_INT(39),
2090 [36] = MSM_GPIO_TO_INT(43),
2091 [37] = MSM_GPIO_TO_INT(61),
2092 [38] = MSM_GPIO_TO_INT(50),
2093 [39] = MSM_GPIO_TO_INT(42),
2094 [41] = MSM_GPIO_TO_INT(62),
2095 [42] = MSM_GPIO_TO_INT(76),
2096 [43] = MSM_GPIO_TO_INT(75),
2097 [44] = MSM_GPIO_TO_INT(70),
2098 [45] = MSM_GPIO_TO_INT(69),
2099 [46] = MSM_GPIO_TO_INT(67),
2100 [47] = MSM_GPIO_TO_INT(65),
2101 [48] = MSM_GPIO_TO_INT(58),
2102 [49] = MSM_GPIO_TO_INT(54),
2103 [50] = MSM_GPIO_TO_INT(52),
2104 [51] = MSM_GPIO_TO_INT(49),
2105 [52] = MSM_GPIO_TO_INT(40),
2106 [53] = MSM_GPIO_TO_INT(37),
2107 [54] = MSM_GPIO_TO_INT(24),
2108 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002109};
2110
Praveen Chidambaram78499012011-11-01 17:15:17 -06002111static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002112 TLMM_MSM_SUMMARY_IRQ,
2113 RPM_APCC_CPU0_GP_HIGH_IRQ,
2114 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2115 RPM_APCC_CPU0_GP_LOW_IRQ,
2116 RPM_APCC_CPU0_WAKE_UP_IRQ,
2117 RPM_APCC_CPU1_GP_HIGH_IRQ,
2118 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
2119 RPM_APCC_CPU1_GP_LOW_IRQ,
2120 RPM_APCC_CPU1_WAKE_UP_IRQ,
2121 MSS_TO_APPS_IRQ_0,
2122 MSS_TO_APPS_IRQ_1,
2123 MSS_TO_APPS_IRQ_2,
2124 MSS_TO_APPS_IRQ_3,
2125 MSS_TO_APPS_IRQ_4,
2126 MSS_TO_APPS_IRQ_5,
2127 MSS_TO_APPS_IRQ_6,
2128 MSS_TO_APPS_IRQ_7,
2129 MSS_TO_APPS_IRQ_8,
2130 MSS_TO_APPS_IRQ_9,
2131 LPASS_SCSS_GP_LOW_IRQ,
2132 LPASS_SCSS_GP_MEDIUM_IRQ,
2133 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07002134 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002135 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07002136 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07002137 RIVA_APPS_WLAN_SMSM_IRQ,
2138 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
2139 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002140};
2141
Praveen Chidambaram78499012011-11-01 17:15:17 -06002142struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002143 .irqs_m2a = msm_mpm_irqs_m2a,
2144 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
2145 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
2146 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
2147 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
2148 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
2149 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
2150 .mpm_apps_ipc_val = BIT(1),
2151 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2152
2153};
2154#endif
2155
Stephen Boydbb600ae2011-08-02 20:11:40 -07002156static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002157 CLK_DUMMY("pll2", PLL2, NULL, 0),
2158 CLK_DUMMY("pll8", PLL8, NULL, 0),
2159 CLK_DUMMY("pll4", PLL4, NULL, 0),
2160
2161 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
2162 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
2163 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
2164 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
2165 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2166 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
2167 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
2168 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
2169 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
2170 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
2171 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
2172 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
2173 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
2174 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
2175 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
2176 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
2177
Matt Wagantalle2522372011-08-17 14:52:21 -07002178 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
2179 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
2180 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
2181 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
2182 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
2183 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
2184 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
2185 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
2186 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
2187 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
2188 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
2189 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002190 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
2191 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
2192 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
2193 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
2194 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
2195 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
2196 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
2197 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06002198 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, "qup_i2c.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002199 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
2200 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
2201 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002202 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07002203 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07002204 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002205 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
2206 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
2207 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
2208 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
2209 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002210 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002211 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002212 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
2213 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
2214 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
2215 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
2216 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
2217 CLK_DUMMY("src_clk", USB_FS2_SRC_CLK, NULL, OFF),
2218 CLK_DUMMY("alt_core_clk", USB_FS2_XCVR_CLK, NULL, OFF),
2219 CLK_DUMMY("sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07002220 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
2221 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002222 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
2223 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002224 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002225 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07002226 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002227 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07002228 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002229 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
2230 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06002231 CLK_DUMMY("iface_clk", GSBI9_P_CLK, "qup_i2c.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002232 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
2233 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
2234 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
2235 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002236 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002237 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
2238 CLK_DUMMY("iface_clk", USB_FS2_P_CLK, NULL, OFF),
2239 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002240 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
2241 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
2242 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
2243 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
2244 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07002245 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
2246 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002247 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
2248 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
2249 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
2250 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
2251 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002252 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
2253 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
2254 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
2255 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
2256 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
2257 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
2258 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
2259 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
2260 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
2261 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
2262 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
2263 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
2264 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
2265 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
2266 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002267 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
2268 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
2269 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002270 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002271 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002272 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002273 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
2274 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
2275 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002276 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002277 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
2278 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
2279 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002280 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002281 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
2282 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
2283 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
2284 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
2285 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
2286 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
2287 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
2288 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
2289 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002290 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002291 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
2292 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
2293 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
2294 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
2295 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
2296 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
2297 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
2298 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
2299 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
2300 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002301 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
2302 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
2303 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002304 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
2305 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
2306 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
2307 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002308 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002309 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002310 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002311 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002312 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
2313 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
2314 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
2315 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
2316 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
2317 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
2318 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
2319 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
2320 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
2321 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
2322 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
2323 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
2324 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
2325 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
2326 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002327 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
2328 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
2329 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
2330 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
2331 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
2332 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002333
2334 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08002335 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, "msm_otg", NULL),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002336 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
2337 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
2338 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
2339 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
2340 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002341 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2342 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
2343};
2344
Stephen Boydbb600ae2011-08-02 20:11:40 -07002345struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
2346 .table = msm_clocks_8960_dummy,
2347 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
2348};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002349
2350#define LPASS_SLIMBUS_PHYS 0x28080000
2351#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06002352#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002353/* Board info for the slimbus slave device */
2354static struct resource slimbus_res[] = {
2355 {
2356 .start = LPASS_SLIMBUS_PHYS,
2357 .end = LPASS_SLIMBUS_PHYS + 8191,
2358 .flags = IORESOURCE_MEM,
2359 .name = "slimbus_physical",
2360 },
2361 {
2362 .start = LPASS_SLIMBUS_BAM_PHYS,
2363 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
2364 .flags = IORESOURCE_MEM,
2365 .name = "slimbus_bam_physical",
2366 },
2367 {
Sagar Dhariacc969452011-09-19 10:34:30 -06002368 .start = LPASS_SLIMBUS_SLEW,
2369 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
2370 .flags = IORESOURCE_MEM,
2371 .name = "slimbus_slew_reg",
2372 },
2373 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002374 .start = SLIMBUS0_CORE_EE1_IRQ,
2375 .end = SLIMBUS0_CORE_EE1_IRQ,
2376 .flags = IORESOURCE_IRQ,
2377 .name = "slimbus_irq",
2378 },
2379 {
2380 .start = SLIMBUS0_BAM_EE1_IRQ,
2381 .end = SLIMBUS0_BAM_EE1_IRQ,
2382 .flags = IORESOURCE_IRQ,
2383 .name = "slimbus_bam_irq",
2384 },
2385};
2386
2387struct platform_device msm_slim_ctrl = {
2388 .name = "msm_slim_ctrl",
2389 .id = 1,
2390 .num_resources = ARRAY_SIZE(slimbus_res),
2391 .resource = slimbus_res,
2392 .dev = {
2393 .coherent_dma_mask = 0xffffffffULL,
2394 },
2395};
2396
2397#ifdef CONFIG_MSM_BUS_SCALING
2398static struct msm_bus_vectors grp3d_init_vectors[] = {
2399 {
2400 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2401 .dst = MSM_BUS_SLAVE_EBI_CH0,
2402 .ab = 0,
2403 .ib = 0,
2404 },
2405};
2406
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002407static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002408 {
2409 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2410 .dst = MSM_BUS_SLAVE_EBI_CH0,
2411 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002412 .ib = KGSL_CONVERT_TO_MBPS(1000),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002413 },
2414};
2415
2416static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2417 {
2418 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2419 .dst = MSM_BUS_SLAVE_EBI_CH0,
2420 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002421 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002422 },
2423};
2424
2425static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2426 {
2427 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2428 .dst = MSM_BUS_SLAVE_EBI_CH0,
2429 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002430 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002431 },
2432};
2433
2434static struct msm_bus_vectors grp3d_max_vectors[] = {
2435 {
2436 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2437 .dst = MSM_BUS_SLAVE_EBI_CH0,
2438 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002439 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002440 },
2441};
2442
2443static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2444 {
2445 ARRAY_SIZE(grp3d_init_vectors),
2446 grp3d_init_vectors,
2447 },
2448 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002449 ARRAY_SIZE(grp3d_low_vectors),
2450 grp3d_low_vectors,
2451 },
2452 {
2453 ARRAY_SIZE(grp3d_nominal_low_vectors),
2454 grp3d_nominal_low_vectors,
2455 },
2456 {
2457 ARRAY_SIZE(grp3d_nominal_high_vectors),
2458 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002459 },
2460 {
2461 ARRAY_SIZE(grp3d_max_vectors),
2462 grp3d_max_vectors,
2463 },
2464};
2465
2466static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2467 grp3d_bus_scale_usecases,
2468 ARRAY_SIZE(grp3d_bus_scale_usecases),
2469 .name = "grp3d",
2470};
2471
2472static struct msm_bus_vectors grp2d0_init_vectors[] = {
2473 {
2474 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2475 .dst = MSM_BUS_SLAVE_EBI_CH0,
2476 .ab = 0,
2477 .ib = 0,
2478 },
2479};
2480
Lucille Sylvester808eca22011-11-03 10:26:29 -07002481static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002482 {
2483 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2484 .dst = MSM_BUS_SLAVE_EBI_CH0,
2485 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002486 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002487 },
2488};
2489
Lucille Sylvester808eca22011-11-03 10:26:29 -07002490static struct msm_bus_vectors grp2d0_max_vectors[] = {
2491 {
2492 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2493 .dst = MSM_BUS_SLAVE_EBI_CH0,
2494 .ab = 0,
2495 .ib = KGSL_CONVERT_TO_MBPS(2048),
2496 },
2497};
2498
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002499static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2500 {
2501 ARRAY_SIZE(grp2d0_init_vectors),
2502 grp2d0_init_vectors,
2503 },
2504 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002505 ARRAY_SIZE(grp2d0_nominal_vectors),
2506 grp2d0_nominal_vectors,
2507 },
2508 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002509 ARRAY_SIZE(grp2d0_max_vectors),
2510 grp2d0_max_vectors,
2511 },
2512};
2513
2514struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2515 grp2d0_bus_scale_usecases,
2516 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2517 .name = "grp2d0",
2518};
2519
2520static struct msm_bus_vectors grp2d1_init_vectors[] = {
2521 {
2522 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2523 .dst = MSM_BUS_SLAVE_EBI_CH0,
2524 .ab = 0,
2525 .ib = 0,
2526 },
2527};
2528
Lucille Sylvester808eca22011-11-03 10:26:29 -07002529static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002530 {
2531 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2532 .dst = MSM_BUS_SLAVE_EBI_CH0,
2533 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002534 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002535 },
2536};
2537
Lucille Sylvester808eca22011-11-03 10:26:29 -07002538static struct msm_bus_vectors grp2d1_max_vectors[] = {
2539 {
2540 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2541 .dst = MSM_BUS_SLAVE_EBI_CH0,
2542 .ab = 0,
2543 .ib = KGSL_CONVERT_TO_MBPS(2048),
2544 },
2545};
2546
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002547static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2548 {
2549 ARRAY_SIZE(grp2d1_init_vectors),
2550 grp2d1_init_vectors,
2551 },
2552 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002553 ARRAY_SIZE(grp2d1_nominal_vectors),
2554 grp2d1_nominal_vectors,
2555 },
2556 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002557 ARRAY_SIZE(grp2d1_max_vectors),
2558 grp2d1_max_vectors,
2559 },
2560};
2561
2562struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2563 grp2d1_bus_scale_usecases,
2564 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2565 .name = "grp2d1",
2566};
2567#endif
2568
2569static struct resource kgsl_3d0_resources[] = {
2570 {
2571 .name = KGSL_3D0_REG_MEMORY,
2572 .start = 0x04300000, /* GFX3D address */
2573 .end = 0x0431ffff,
2574 .flags = IORESOURCE_MEM,
2575 },
2576 {
2577 .name = KGSL_3D0_IRQ,
2578 .start = GFX3D_IRQ,
2579 .end = GFX3D_IRQ,
2580 .flags = IORESOURCE_IRQ,
2581 },
2582};
2583
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002584static const char *kgsl_3d0_iommu_ctx_names[] = {
2585 "gfx3d_user",
2586 /* priv_ctx goes here */
2587};
2588
2589static struct kgsl_device_iommu_data kgsl_3d0_iommu_data[] = {
2590 {
2591 .iommu_ctx_names = kgsl_3d0_iommu_ctx_names,
2592 .iommu_ctx_count = ARRAY_SIZE(kgsl_3d0_iommu_ctx_names),
2593 .physstart = 0x07C00000,
2594 .physend = 0x07C00000 + SZ_1M - 1,
2595 },
2596};
2597
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002598static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002599 .pwrlevel = {
2600 {
2601 .gpu_freq = 400000000,
2602 .bus_freq = 4,
2603 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002604 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002605 {
2606 .gpu_freq = 300000000,
2607 .bus_freq = 3,
2608 .io_fraction = 33,
2609 },
2610 {
2611 .gpu_freq = 200000000,
2612 .bus_freq = 2,
2613 .io_fraction = 100,
2614 },
2615 {
2616 .gpu_freq = 128000000,
2617 .bus_freq = 1,
2618 .io_fraction = 100,
2619 },
2620 {
2621 .gpu_freq = 27000000,
2622 .bus_freq = 0,
2623 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002624 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002625 .init_level = 0,
2626 .num_levels = 5,
2627 .set_grp_async = NULL,
Lucille Sylvester93650bb2011-11-02 14:37:10 -07002628 .idle_timeout = HZ/20,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002629 .nap_allowed = true,
2630 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002631#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002632 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002633#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002634 .iommu_data = kgsl_3d0_iommu_data,
2635 .iommu_count = ARRAY_SIZE(kgsl_3d0_iommu_data),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002636};
2637
2638struct platform_device msm_kgsl_3d0 = {
2639 .name = "kgsl-3d0",
2640 .id = 0,
2641 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2642 .resource = kgsl_3d0_resources,
2643 .dev = {
2644 .platform_data = &kgsl_3d0_pdata,
2645 },
2646};
2647
2648static struct resource kgsl_2d0_resources[] = {
2649 {
2650 .name = KGSL_2D0_REG_MEMORY,
2651 .start = 0x04100000, /* Z180 base address */
2652 .end = 0x04100FFF,
2653 .flags = IORESOURCE_MEM,
2654 },
2655 {
2656 .name = KGSL_2D0_IRQ,
2657 .start = GFX2D0_IRQ,
2658 .end = GFX2D0_IRQ,
2659 .flags = IORESOURCE_IRQ,
2660 },
2661};
2662
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002663static const char *kgsl_2d0_iommu_ctx_names[] = {
2664 "gfx2d0_2d0",
2665};
2666
2667static struct kgsl_device_iommu_data kgsl_2d0_iommu_data[] = {
2668 {
2669 .iommu_ctx_names = kgsl_2d0_iommu_ctx_names,
2670 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d0_iommu_ctx_names),
2671 .physstart = 0x07D00000,
2672 .physend = 0x07D00000 + SZ_1M - 1,
2673 },
2674};
2675
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002676static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002677 .pwrlevel = {
2678 {
2679 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002680 .bus_freq = 2,
2681 },
2682 {
2683 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002684 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002685 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002686 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002687 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002688 .bus_freq = 0,
2689 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002690 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002691 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002692 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002693 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002694 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002695 .nap_allowed = true,
2696 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002697#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002698 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002699#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002700 .iommu_data = kgsl_2d0_iommu_data,
2701 .iommu_count = ARRAY_SIZE(kgsl_2d0_iommu_data),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002702};
2703
2704struct platform_device msm_kgsl_2d0 = {
2705 .name = "kgsl-2d0",
2706 .id = 0,
2707 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2708 .resource = kgsl_2d0_resources,
2709 .dev = {
2710 .platform_data = &kgsl_2d0_pdata,
2711 },
2712};
2713
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002714static const char *kgsl_2d1_iommu_ctx_names[] = {
Jeremy Gebben5c4c1132012-02-27 11:26:49 -07002715 "gfx2d1_2d1",
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002716};
2717
2718static struct kgsl_device_iommu_data kgsl_2d1_iommu_data[] = {
2719 {
2720 .iommu_ctx_names = kgsl_2d1_iommu_ctx_names,
2721 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d1_iommu_ctx_names),
2722 .physstart = 0x07E00000,
2723 .physend = 0x07E00000 + SZ_1M - 1,
2724 },
2725};
2726
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002727static struct resource kgsl_2d1_resources[] = {
2728 {
2729 .name = KGSL_2D1_REG_MEMORY,
2730 .start = 0x04200000, /* Z180 device 1 base address */
2731 .end = 0x04200FFF,
2732 .flags = IORESOURCE_MEM,
2733 },
2734 {
2735 .name = KGSL_2D1_IRQ,
2736 .start = GFX2D1_IRQ,
2737 .end = GFX2D1_IRQ,
2738 .flags = IORESOURCE_IRQ,
2739 },
2740};
2741
2742static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002743 .pwrlevel = {
2744 {
2745 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002746 .bus_freq = 2,
2747 },
2748 {
2749 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002750 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002751 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002752 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002753 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002754 .bus_freq = 0,
2755 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002756 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002757 .init_level = 0,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002758 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002759 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002760 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002761 .nap_allowed = true,
2762 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002763#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002764 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002765#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002766 .iommu_data = kgsl_2d1_iommu_data,
2767 .iommu_count = ARRAY_SIZE(kgsl_2d1_iommu_data),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002768};
2769
2770struct platform_device msm_kgsl_2d1 = {
2771 .name = "kgsl-2d1",
2772 .id = 1,
2773 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2774 .resource = kgsl_2d1_resources,
2775 .dev = {
2776 .platform_data = &kgsl_2d1_pdata,
2777 },
2778};
2779
2780#ifdef CONFIG_MSM_GEMINI
2781static struct resource msm_gemini_resources[] = {
2782 {
2783 .start = 0x04600000,
2784 .end = 0x04600000 + SZ_1M - 1,
2785 .flags = IORESOURCE_MEM,
2786 },
2787 {
2788 .start = JPEG_IRQ,
2789 .end = JPEG_IRQ,
2790 .flags = IORESOURCE_IRQ,
2791 },
2792};
2793
2794struct platform_device msm8960_gemini_device = {
2795 .name = "msm_gemini",
2796 .resource = msm_gemini_resources,
2797 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2798};
2799#endif
2800
Praveen Chidambaram78499012011-11-01 17:15:17 -06002801struct msm_rpm_platform_data msm8960_rpm_data __initdata = {
2802 .reg_base_addrs = {
2803 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
2804 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
2805 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
2806 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
2807 },
2808 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
Stephen Boydf61255e2012-02-24 14:31:09 -08002809 .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ,
Praveen Chidambaram78499012011-11-01 17:15:17 -06002810 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
2811 .ipc_rpm_val = 4,
2812 .target_id = {
2813 MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
2814 MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
2815 MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8),
2816 MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2817 MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2818 MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1),
2819 MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1),
2820 MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1),
2821 MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2822 MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
2823 MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
2824 MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
2825 MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1),
2826 MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1),
2827 MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1),
2828 MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1),
2829 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0,
2830 APPS_FABRIC_CFG_HALT, 2),
2831 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0,
2832 APPS_FABRIC_CFG_CLKMOD, 3),
2833 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL,
2834 APPS_FABRIC_CFG_IOCTL, 1),
2835 MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
2836 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0,
2837 SYS_FABRIC_CFG_HALT, 2),
2838 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0,
2839 SYS_FABRIC_CFG_CLKMOD, 3),
2840 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL,
2841 SYS_FABRIC_CFG_IOCTL, 1),
2842 MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0,
2843 SYSTEM_FABRIC_ARB, 29),
2844 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0,
2845 MMSS_FABRIC_CFG_HALT, 2),
2846 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0,
2847 MMSS_FABRIC_CFG_CLKMOD, 3),
2848 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL,
2849 MMSS_FABRIC_CFG_IOCTL, 1),
2850 MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
2851 MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2),
2852 MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2),
2853 MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2),
2854 MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2),
2855 MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2),
2856 MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2),
2857 MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2),
2858 MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2),
2859 MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2),
2860 MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2),
2861 MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2),
2862 MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2),
2863 MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2),
2864 MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2),
2865 MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2),
2866 MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2),
2867 MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2),
2868 MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2),
2869 MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2),
2870 MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2),
2871 MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2),
2872 MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2),
2873 MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2),
2874 MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2),
2875 MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2),
2876 MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2),
2877 MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2),
2878 MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2),
2879 MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2),
2880 MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2),
2881 MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2),
2882 MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2),
2883 MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2),
2884 MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2),
2885 MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2),
2886 MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2),
2887 MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2),
2888 MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2),
2889 MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2),
2890 MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1),
2891 MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1),
2892 MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1),
2893 MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1),
2894 MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1),
2895 MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1),
2896 MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1),
2897 MSM_RPM_MAP(8960, NCP_0, NCP, 2),
2898 MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1),
2899 MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
2900 MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1),
2901 MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2),
2902 MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1),
2903 },
2904 .target_status = {
2905 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR),
2906 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR),
2907 MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD),
2908 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0),
2909 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1),
2910 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2),
2911 MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0),
2912 MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE),
2913 MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL),
2914 MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK),
2915 MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK),
2916 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK),
2917 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK),
2918 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK),
2919 MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK),
2920 MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK),
2921 MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK),
2922 MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK),
2923 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK),
2924 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT),
2925 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD),
2926 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL),
2927 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB),
2928 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT),
2929 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD),
2930 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL),
2931 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB),
2932 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT),
2933 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD),
2934 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL),
2935 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB),
2936 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0),
2937 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1),
2938 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0),
2939 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1),
2940 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0),
2941 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1),
2942 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0),
2943 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1),
2944 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0),
2945 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1),
2946 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0),
2947 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1),
2948 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0),
2949 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1),
2950 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0),
2951 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1),
2952 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0),
2953 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1),
2954 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0),
2955 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1),
2956 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0),
2957 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1),
2958 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0),
2959 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1),
2960 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0),
2961 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1),
2962 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0),
2963 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1),
2964 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0),
2965 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1),
2966 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0),
2967 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1),
2968 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0),
2969 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1),
2970 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0),
2971 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1),
2972 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0),
2973 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1),
2974 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0),
2975 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1),
2976 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0),
2977 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1),
2978 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0),
2979 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1),
2980 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0),
2981 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1),
2982 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0),
2983 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1),
2984 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0),
2985 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1),
2986 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0),
2987 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1),
2988 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0),
2989 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1),
2990 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0),
2991 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1),
2992 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0),
2993 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1),
2994 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0),
2995 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1),
2996 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0),
2997 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1),
2998 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0),
2999 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1),
3000 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0),
3001 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1),
3002 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0),
3003 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1),
3004 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0),
3005 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1),
3006 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0),
3007 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1),
3008 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0),
3009 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1),
3010 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0),
3011 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1),
3012 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0),
3013 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1),
3014 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1),
3015 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2),
3016 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3),
3017 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4),
3018 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5),
3019 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6),
3020 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7),
3021 MSM_RPM_STATUS_ID_MAP(8960, NCP_0),
3022 MSM_RPM_STATUS_ID_MAP(8960, NCP_1),
3023 MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS),
3024 MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH),
3025 MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH),
3026 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0),
3027 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1),
3028 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE),
3029 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE),
3030 },
3031 .target_ctrl_id = {
3032 MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR),
3033 MSM_RPM_CTRL_MAP(8960, VERSION_MINOR),
3034 MSM_RPM_CTRL_MAP(8960, VERSION_BUILD),
3035 MSM_RPM_CTRL_MAP(8960, REQ_CTX_0),
3036 MSM_RPM_CTRL_MAP(8960, REQ_SEL_0),
3037 MSM_RPM_CTRL_MAP(8960, ACK_CTX_0),
3038 MSM_RPM_CTRL_MAP(8960, ACK_SEL_0),
3039 },
3040 .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE,
3041 .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION,
3042 .sel_last = MSM_RPM_8960_SEL_LAST,
3043 .ver = {3, 0, 0},
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003044};
Praveen Chidambaram8985b012011-12-16 13:38:59 -07003045
Praveen Chidambaram78499012011-11-01 17:15:17 -06003046struct platform_device msm8960_rpm_device = {
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003047 .name = "msm_rpm",
3048 .id = -1,
3049};
3050
Praveen Chidambaram78499012011-11-01 17:15:17 -06003051static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
3052 .phys_addr_base = 0x0010C000,
3053 .reg_offsets = {
3054 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
3055 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
3056 },
3057 .phys_size = SZ_8K,
3058 .log_len = 4096, /* log's buffer length in bytes */
3059 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
3060};
3061
3062struct platform_device msm8960_rpm_log_device = {
3063 .name = "msm_rpm_log",
3064 .id = -1,
3065 .dev = {
3066 .platform_data = &msm_rpm_log_pdata,
3067 },
3068};
3069
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003070static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
3071 .phys_addr_base = 0x0010D204,
3072 .phys_size = SZ_8K,
3073};
3074
Praveen Chidambaram78499012011-11-01 17:15:17 -06003075struct platform_device msm8960_rpm_stat_device = {
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003076 .name = "msm_rpm_stat",
3077 .id = -1,
3078 .dev = {
3079 .platform_data = &msm_rpm_stat_pdata,
3080 },
3081};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003082
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003083struct platform_device msm_bus_sys_fabric = {
3084 .name = "msm_bus_fabric",
3085 .id = MSM_BUS_FAB_SYSTEM,
3086};
3087struct platform_device msm_bus_apps_fabric = {
3088 .name = "msm_bus_fabric",
3089 .id = MSM_BUS_FAB_APPSS,
3090};
3091struct platform_device msm_bus_mm_fabric = {
3092 .name = "msm_bus_fabric",
3093 .id = MSM_BUS_FAB_MMSS,
3094};
3095struct platform_device msm_bus_sys_fpb = {
3096 .name = "msm_bus_fabric",
3097 .id = MSM_BUS_FAB_SYSTEM_FPB,
3098};
3099struct platform_device msm_bus_cpss_fpb = {
3100 .name = "msm_bus_fabric",
3101 .id = MSM_BUS_FAB_CPSS_FPB,
3102};
3103
3104/* Sensors DSPS platform data */
3105#ifdef CONFIG_MSM_DSPS
3106
3107#define PPSS_REG_PHYS_BASE 0x12080000
3108
3109static struct dsps_clk_info dsps_clks[] = {};
3110static struct dsps_regulator_info dsps_regs[] = {};
3111
3112/*
3113 * Note: GPIOs field is intialized in run-time at the function
3114 * msm8960_init_dsps().
3115 */
3116
3117struct msm_dsps_platform_data msm_dsps_pdata = {
3118 .clks = dsps_clks,
3119 .clks_num = ARRAY_SIZE(dsps_clks),
3120 .gpios = NULL,
3121 .gpios_num = 0,
3122 .regs = dsps_regs,
3123 .regs_num = ARRAY_SIZE(dsps_regs),
3124 .dsps_pwr_ctl_en = 1,
3125 .signature = DSPS_SIGNATURE,
3126};
3127
3128static struct resource msm_dsps_resources[] = {
3129 {
3130 .start = PPSS_REG_PHYS_BASE,
3131 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
3132 .name = "ppss_reg",
3133 .flags = IORESOURCE_MEM,
3134 },
Wentao Xua55500b2011-08-16 18:15:04 -04003135
3136 {
3137 .start = PPSS_WDOG_TIMER_IRQ,
3138 .end = PPSS_WDOG_TIMER_IRQ,
3139 .name = "ppss_wdog",
3140 .flags = IORESOURCE_IRQ,
3141 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003142};
3143
3144struct platform_device msm_dsps_device = {
3145 .name = "msm_dsps",
3146 .id = 0,
3147 .num_resources = ARRAY_SIZE(msm_dsps_resources),
3148 .resource = msm_dsps_resources,
3149 .dev.platform_data = &msm_dsps_pdata,
3150};
3151
3152#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07003153
3154#ifdef CONFIG_MSM_QDSS
3155
3156#define MSM_QDSS_PHYS_BASE 0x01A00000
3157#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
3158#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
3159#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patel492b3012012-03-06 14:22:30 -08003160#define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
Pratik Patel7831c082011-06-08 21:44:37 -07003161
3162static struct resource msm_etb_resources[] = {
3163 {
3164 .start = MSM_ETB_PHYS_BASE,
3165 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
3166 .flags = IORESOURCE_MEM,
3167 },
3168};
3169
3170struct platform_device msm_etb_device = {
3171 .name = "msm_etb",
3172 .id = 0,
3173 .num_resources = ARRAY_SIZE(msm_etb_resources),
3174 .resource = msm_etb_resources,
3175};
3176
3177static struct resource msm_tpiu_resources[] = {
3178 {
3179 .start = MSM_TPIU_PHYS_BASE,
3180 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
3181 .flags = IORESOURCE_MEM,
3182 },
3183};
3184
3185struct platform_device msm_tpiu_device = {
3186 .name = "msm_tpiu",
3187 .id = 0,
3188 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
3189 .resource = msm_tpiu_resources,
3190};
3191
3192static struct resource msm_funnel_resources[] = {
3193 {
3194 .start = MSM_FUNNEL_PHYS_BASE,
3195 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
3196 .flags = IORESOURCE_MEM,
3197 },
3198};
3199
3200struct platform_device msm_funnel_device = {
3201 .name = "msm_funnel",
3202 .id = 0,
3203 .num_resources = ARRAY_SIZE(msm_funnel_resources),
3204 .resource = msm_funnel_resources,
3205};
3206
Pratik Patel492b3012012-03-06 14:22:30 -08003207static struct resource msm_etm_resources[] = {
Pratik Patel7831c082011-06-08 21:44:37 -07003208 {
Pratik Patel492b3012012-03-06 14:22:30 -08003209 .start = MSM_ETM_PHYS_BASE,
3210 .end = MSM_ETM_PHYS_BASE + (SZ_4K * 2) - 1,
Pratik Patel7831c082011-06-08 21:44:37 -07003211 .flags = IORESOURCE_MEM,
3212 },
3213};
3214
Pratik Patel492b3012012-03-06 14:22:30 -08003215struct platform_device msm_etm_device = {
3216 .name = "msm_etm",
Pratik Patel7831c082011-06-08 21:44:37 -07003217 .id = 0,
Pratik Patel492b3012012-03-06 14:22:30 -08003218 .num_resources = ARRAY_SIZE(msm_etm_resources),
3219 .resource = msm_etm_resources,
Pratik Patel7831c082011-06-08 21:44:37 -07003220};
3221
3222#endif
Praveen Chidambaram8ea3dcd2011-12-07 14:46:31 -07003223
3224static int msm8960_LPM_latency = 1000; /* >100 usec for WFI */
3225
3226struct platform_device msm8960_cpu_idle_device = {
3227 .name = "msm_cpu_idle",
3228 .id = -1,
3229 .dev = {
3230 .platform_data = &msm8960_LPM_latency,
3231 },
3232};
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -07003233
3234static struct msm_dcvs_freq_entry msm8960_freq[] = {
3235 { 384000, 166981, 345600},
3236 { 702000, 213049, 632502},
3237 {1026000, 285712, 925613},
3238 {1242000, 383945, 1176550},
3239 {1458000, 419729, 1465478},
3240 {1512000, 434116, 1546674},
3241
3242};
3243
3244static struct msm_dcvs_core_info msm8960_core_info = {
3245 .freq_tbl = &msm8960_freq[0],
3246 .core_param = {
3247 .max_time_us = 100000,
3248 .num_freq = ARRAY_SIZE(msm8960_freq),
3249 },
3250 .algo_param = {
3251 .slack_time_us = 58000,
3252 .scale_slack_time = 0,
3253 .scale_slack_time_pct = 0,
3254 .disable_pc_threshold = 1458000,
3255 .em_window_size = 100000,
3256 .em_max_util_pct = 97,
3257 .ss_window_size = 1000000,
3258 .ss_util_pct = 95,
3259 .ss_iobusy_conv = 100,
3260 },
3261};
3262
3263struct platform_device msm8960_msm_gov_device = {
3264 .name = "msm_dcvs_gov",
3265 .id = -1,
3266 .dev = {
3267 .platform_data = &msm8960_core_info,
3268 },
3269};