blob: 818deaf0d1f5ae4e3b34da7eb6fae9870d40c955 [file] [log] [blame]
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +05301/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/list.h>
16#include <linux/platform_device.h>
17#include <linux/msm_rotator.h>
Deepak Kotur12301a72011-11-09 18:30:29 -080018#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070019#include <linux/gpio.h>
20#include <asm/clkdev.h>
21#include <linux/msm_kgsl.h>
22#include <linux/android_pmem.h>
23#include <mach/irqs-8960.h>
Mayank Rana9f51f582011-08-04 18:35:59 +053024#include <mach/dma.h>
25#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070026#include <mach/board.h>
27#include <mach/msm_iomap.h>
28#include <mach/msm_hsusb.h>
29#include <mach/msm_sps.h>
30#include <mach/rpm.h>
31#include <mach/msm_bus_board.h>
32#include <mach/msm_memtypes.h>
Eric Holmberg023d25c2012-03-01 12:27:55 -070033#include <mach/msm_smd.h>
Lucille Sylvester6e362412011-12-09 16:21:42 -070034#include <mach/msm_dcvs.h>
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -070035#include <sound/msm-dai-q6.h>
36#include <sound/apr_audio.h>
Joel Nidera1261942011-09-12 16:30:09 +030037#include <mach/msm_tsif.h>
Pratik Patel1403f2a2012-03-21 10:10:00 -070038#include <mach/qdss.h>
Stepan Moskovchenko2b4b1cd2012-03-29 18:21:04 -070039#include <mach/msm_serial_hs_lite.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070040#include "clock.h"
41#include "devices.h"
42#include "devices-msm8x60.h"
43#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070044#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060045#include "rpm_log.h"
Praveen Chidambaram7a712232011-10-28 13:39:45 -060046#include "rpm_stats.h"
Stephen Boydeb819882011-08-29 14:46:30 -070047#include "pil-q6v4.h"
48#include "scm-pas.h"
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -070049#include <mach/msm_dcvs.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070050
51#ifdef CONFIG_MSM_MPM
52#include "mpm.h"
53#endif
54#ifdef CONFIG_MSM_DSPS
55#include <mach/msm_dsps.h>
56#endif
57
58
59/* Address of GSBI blocks */
60#define MSM_GSBI1_PHYS 0x16000000
61#define MSM_GSBI2_PHYS 0x16100000
62#define MSM_GSBI3_PHYS 0x16200000
63#define MSM_GSBI4_PHYS 0x16300000
64#define MSM_GSBI5_PHYS 0x16400000
65#define MSM_GSBI6_PHYS 0x16500000
66#define MSM_GSBI7_PHYS 0x16600000
67#define MSM_GSBI8_PHYS 0x1A000000
68#define MSM_GSBI9_PHYS 0x1A100000
69#define MSM_GSBI10_PHYS 0x1A200000
70#define MSM_GSBI11_PHYS 0x12440000
71#define MSM_GSBI12_PHYS 0x12480000
72
73#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
74#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
Mayank Rana9f51f582011-08-04 18:35:59 +053075#define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000)
Stepan Moskovchenko2b4b1cd2012-03-29 18:21:04 -070076#define MSM_UART8DM_PHYS (MSM_GSBI8_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070077
78/* GSBI QUP devices */
79#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
80#define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000)
81#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
82#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
83#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
84#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
85#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
86#define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000)
87#define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000)
88#define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000)
89#define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000)
90#define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000)
91#define MSM_QUP_SIZE SZ_4K
92
93#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
94#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
95#define MSM_PMIC_SSBI_SIZE SZ_4K
96
Stepan Moskovchenkobe5b45a2011-10-17 19:33:34 -070097#define MSM8960_HSUSB_PHYS 0x12500000
98#define MSM8960_HSUSB_SIZE SZ_4K
99
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700100static struct resource resources_otg[] = {
101 {
102 .start = MSM8960_HSUSB_PHYS,
103 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
104 .flags = IORESOURCE_MEM,
105 },
106 {
107 .start = USB1_HS_IRQ,
108 .end = USB1_HS_IRQ,
109 .flags = IORESOURCE_IRQ,
110 },
111};
112
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700113struct platform_device msm8960_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700114 .name = "msm_otg",
115 .id = -1,
116 .num_resources = ARRAY_SIZE(resources_otg),
117 .resource = resources_otg,
118 .dev = {
119 .coherent_dma_mask = 0xffffffff,
120 },
121};
122
123static struct resource resources_hsusb[] = {
124 {
125 .start = MSM8960_HSUSB_PHYS,
126 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE,
127 .flags = IORESOURCE_MEM,
128 },
129 {
130 .start = USB1_HS_IRQ,
131 .end = USB1_HS_IRQ,
132 .flags = IORESOURCE_IRQ,
133 },
134};
135
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700136struct platform_device msm8960_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700137 .name = "msm_hsusb",
138 .id = -1,
139 .num_resources = ARRAY_SIZE(resources_hsusb),
140 .resource = resources_hsusb,
141 .dev = {
142 .coherent_dma_mask = 0xffffffff,
143 },
144};
145
146static struct resource resources_hsusb_host[] = {
147 {
148 .start = MSM8960_HSUSB_PHYS,
149 .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1,
150 .flags = IORESOURCE_MEM,
151 },
152 {
153 .start = USB1_HS_IRQ,
154 .end = USB1_HS_IRQ,
155 .flags = IORESOURCE_IRQ,
156 },
157};
158
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530159static u64 dma_mask = DMA_BIT_MASK(32);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700160struct platform_device msm_device_hsusb_host = {
161 .name = "msm_hsusb_host",
162 .id = -1,
163 .num_resources = ARRAY_SIZE(resources_hsusb_host),
164 .resource = resources_hsusb_host,
165 .dev = {
166 .dma_mask = &dma_mask,
167 .coherent_dma_mask = 0xffffffff,
168 },
169};
170
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530171static struct resource resources_hsic_host[] = {
172 {
Stepan Moskovchenko8e06ae62011-10-17 18:01:29 -0700173 .start = 0x12520000,
174 .end = 0x12520000 + SZ_4K - 1,
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530175 .flags = IORESOURCE_MEM,
176 },
177 {
178 .start = USB_HSIC_IRQ,
179 .end = USB_HSIC_IRQ,
180 .flags = IORESOURCE_IRQ,
181 },
Vamsi Krishna34f01582011-12-14 19:54:42 -0800182 {
183 .start = MSM_GPIO_TO_INT(69),
184 .end = MSM_GPIO_TO_INT(69),
185 .name = "peripheral_status_irq",
186 .flags = IORESOURCE_IRQ,
187 },
Vijayavardhan Vennapusaeb566482011-09-18 07:48:37 +0530188};
189
190struct platform_device msm_device_hsic_host = {
191 .name = "msm_hsic_host",
192 .id = -1,
193 .num_resources = ARRAY_SIZE(resources_hsic_host),
194 .resource = resources_hsic_host,
195 .dev = {
196 .dma_mask = &dma_mask,
197 .coherent_dma_mask = DMA_BIT_MASK(32),
198 },
199};
200
Mona Hossain11c03ac2011-10-26 12:42:10 -0700201#define SHARED_IMEM_TZ_BASE 0x2a03f720
202static struct resource tzlog_resources[] = {
203 {
204 .start = SHARED_IMEM_TZ_BASE,
205 .end = SHARED_IMEM_TZ_BASE + SZ_4K - 1,
206 .flags = IORESOURCE_MEM,
207 },
208};
209
210struct platform_device msm_device_tz_log = {
211 .name = "tz_log",
212 .id = 0,
213 .num_resources = ARRAY_SIZE(tzlog_resources),
214 .resource = tzlog_resources,
215};
216
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700217static struct resource resources_uart_gsbi2[] = {
218 {
219 .start = MSM8960_GSBI2_UARTDM_IRQ,
220 .end = MSM8960_GSBI2_UARTDM_IRQ,
221 .flags = IORESOURCE_IRQ,
222 },
223 {
224 .start = MSM_UART2DM_PHYS,
225 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
226 .name = "uartdm_resource",
227 .flags = IORESOURCE_MEM,
228 },
229 {
230 .start = MSM_GSBI2_PHYS,
231 .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
232 .name = "gsbi_resource",
233 .flags = IORESOURCE_MEM,
234 },
235};
236
237struct platform_device msm8960_device_uart_gsbi2 = {
238 .name = "msm_serial_hsl",
239 .id = 0,
240 .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
241 .resource = resources_uart_gsbi2,
242};
Mayank Rana9f51f582011-08-04 18:35:59 +0530243/* GSBI 6 used into UARTDM Mode */
244static struct resource msm_uart_dm6_resources[] = {
245 {
246 .start = MSM_UART6DM_PHYS,
247 .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1,
248 .name = "uartdm_resource",
249 .flags = IORESOURCE_MEM,
250 },
251 {
252 .start = GSBI6_UARTDM_IRQ,
253 .end = GSBI6_UARTDM_IRQ,
254 .flags = IORESOURCE_IRQ,
255 },
256 {
257 .start = MSM_GSBI6_PHYS,
258 .end = MSM_GSBI6_PHYS + 4 - 1,
259 .name = "gsbi_resource",
260 .flags = IORESOURCE_MEM,
261 },
262 {
263 .start = DMOV_HSUART_GSBI6_TX_CHAN,
264 .end = DMOV_HSUART_GSBI6_RX_CHAN,
265 .name = "uartdm_channels",
266 .flags = IORESOURCE_DMA,
267 },
268 {
269 .start = DMOV_HSUART_GSBI6_TX_CRCI,
270 .end = DMOV_HSUART_GSBI6_RX_CRCI,
271 .name = "uartdm_crci",
272 .flags = IORESOURCE_DMA,
273 },
274};
275static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32);
276struct platform_device msm_device_uart_dm6 = {
277 .name = "msm_serial_hs",
278 .id = 0,
279 .num_resources = ARRAY_SIZE(msm_uart_dm6_resources),
280 .resource = msm_uart_dm6_resources,
281 .dev = {
282 .dma_mask = &msm_uart_dm6_dma_mask,
283 .coherent_dma_mask = DMA_BIT_MASK(32),
284 },
285};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700286
287static struct resource resources_uart_gsbi5[] = {
288 {
289 .start = GSBI5_UARTDM_IRQ,
290 .end = GSBI5_UARTDM_IRQ,
291 .flags = IORESOURCE_IRQ,
292 },
293 {
294 .start = MSM_UART5DM_PHYS,
295 .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
296 .name = "uartdm_resource",
297 .flags = IORESOURCE_MEM,
298 },
299 {
300 .start = MSM_GSBI5_PHYS,
301 .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
302 .name = "gsbi_resource",
303 .flags = IORESOURCE_MEM,
304 },
305};
306
307struct platform_device msm8960_device_uart_gsbi5 = {
308 .name = "msm_serial_hsl",
309 .id = 0,
310 .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
311 .resource = resources_uart_gsbi5,
312};
Stepan Moskovchenko2b4b1cd2012-03-29 18:21:04 -0700313
314static struct msm_serial_hslite_platform_data uart_gsbi8_pdata = {
315 .line = 0,
316};
317
318static struct resource resources_uart_gsbi8[] = {
319 {
320 .start = GSBI8_UARTDM_IRQ,
321 .end = GSBI8_UARTDM_IRQ,
322 .flags = IORESOURCE_IRQ,
323 },
324 {
325 .start = MSM_UART8DM_PHYS,
326 .end = MSM_UART8DM_PHYS + PAGE_SIZE - 1,
327 .name = "uartdm_resource",
328 .flags = IORESOURCE_MEM,
329 },
330 {
331 .start = MSM_GSBI8_PHYS,
332 .end = MSM_GSBI8_PHYS + PAGE_SIZE - 1,
333 .name = "gsbi_resource",
334 .flags = IORESOURCE_MEM,
335 },
336};
337
338struct platform_device msm8960_device_uart_gsbi8 = {
339 .name = "msm_serial_hsl",
340 .id = 1,
341 .num_resources = ARRAY_SIZE(resources_uart_gsbi8),
342 .resource = resources_uart_gsbi8,
343 .dev.platform_data = &uart_gsbi8_pdata,
344};
345
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700346/* MSM Video core device */
347#ifdef CONFIG_MSM_BUS_SCALING
348static struct msm_bus_vectors vidc_init_vectors[] = {
349 {
350 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
351 .dst = MSM_BUS_SLAVE_EBI_CH0,
352 .ab = 0,
353 .ib = 0,
354 },
355 {
356 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
357 .dst = MSM_BUS_SLAVE_EBI_CH0,
358 .ab = 0,
359 .ib = 0,
360 },
361 {
362 .src = MSM_BUS_MASTER_AMPSS_M0,
363 .dst = MSM_BUS_SLAVE_EBI_CH0,
364 .ab = 0,
365 .ib = 0,
366 },
367 {
368 .src = MSM_BUS_MASTER_AMPSS_M0,
369 .dst = MSM_BUS_SLAVE_EBI_CH0,
370 .ab = 0,
371 .ib = 0,
372 },
373};
374static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
375 {
376 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
377 .dst = MSM_BUS_SLAVE_EBI_CH0,
378 .ab = 54525952,
379 .ib = 436207616,
380 },
381 {
382 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
383 .dst = MSM_BUS_SLAVE_EBI_CH0,
384 .ab = 72351744,
385 .ib = 289406976,
386 },
387 {
388 .src = MSM_BUS_MASTER_AMPSS_M0,
389 .dst = MSM_BUS_SLAVE_EBI_CH0,
390 .ab = 500000,
391 .ib = 1000000,
392 },
393 {
394 .src = MSM_BUS_MASTER_AMPSS_M0,
395 .dst = MSM_BUS_SLAVE_EBI_CH0,
396 .ab = 500000,
397 .ib = 1000000,
398 },
399};
400static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
401 {
402 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
403 .dst = MSM_BUS_SLAVE_EBI_CH0,
404 .ab = 40894464,
405 .ib = 327155712,
406 },
407 {
408 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
409 .dst = MSM_BUS_SLAVE_EBI_CH0,
410 .ab = 48234496,
411 .ib = 192937984,
412 },
413 {
414 .src = MSM_BUS_MASTER_AMPSS_M0,
415 .dst = MSM_BUS_SLAVE_EBI_CH0,
416 .ab = 500000,
417 .ib = 2000000,
418 },
419 {
420 .src = MSM_BUS_MASTER_AMPSS_M0,
421 .dst = MSM_BUS_SLAVE_EBI_CH0,
422 .ab = 500000,
423 .ib = 2000000,
424 },
425};
426static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
427 {
428 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
429 .dst = MSM_BUS_SLAVE_EBI_CH0,
430 .ab = 163577856,
431 .ib = 1308622848,
432 },
433 {
434 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
435 .dst = MSM_BUS_SLAVE_EBI_CH0,
436 .ab = 219152384,
437 .ib = 876609536,
438 },
439 {
440 .src = MSM_BUS_MASTER_AMPSS_M0,
441 .dst = MSM_BUS_SLAVE_EBI_CH0,
442 .ab = 1750000,
443 .ib = 3500000,
444 },
445 {
446 .src = MSM_BUS_MASTER_AMPSS_M0,
447 .dst = MSM_BUS_SLAVE_EBI_CH0,
448 .ab = 1750000,
449 .ib = 3500000,
450 },
451};
452static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
453 {
454 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
455 .dst = MSM_BUS_SLAVE_EBI_CH0,
456 .ab = 121634816,
457 .ib = 973078528,
458 },
459 {
460 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
461 .dst = MSM_BUS_SLAVE_EBI_CH0,
462 .ab = 155189248,
463 .ib = 620756992,
464 },
465 {
466 .src = MSM_BUS_MASTER_AMPSS_M0,
467 .dst = MSM_BUS_SLAVE_EBI_CH0,
468 .ab = 1750000,
469 .ib = 7000000,
470 },
471 {
472 .src = MSM_BUS_MASTER_AMPSS_M0,
473 .dst = MSM_BUS_SLAVE_EBI_CH0,
474 .ab = 1750000,
475 .ib = 7000000,
476 },
477};
478static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
479 {
480 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
481 .dst = MSM_BUS_SLAVE_EBI_CH0,
482 .ab = 372244480,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700483 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700484 },
485 {
486 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
487 .dst = MSM_BUS_SLAVE_EBI_CH0,
488 .ab = 501219328,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700489 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700490 },
491 {
492 .src = MSM_BUS_MASTER_AMPSS_M0,
493 .dst = MSM_BUS_SLAVE_EBI_CH0,
494 .ab = 2500000,
495 .ib = 5000000,
496 },
497 {
498 .src = MSM_BUS_MASTER_AMPSS_M0,
499 .dst = MSM_BUS_SLAVE_EBI_CH0,
500 .ab = 2500000,
501 .ib = 5000000,
502 },
503};
504static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
505 {
506 .src = MSM_BUS_MASTER_HD_CODEC_PORT0,
507 .dst = MSM_BUS_SLAVE_EBI_CH0,
508 .ab = 222298112,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700509 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700510 },
511 {
512 .src = MSM_BUS_MASTER_HD_CODEC_PORT1,
513 .dst = MSM_BUS_SLAVE_EBI_CH0,
514 .ab = 330301440,
Gopikrishnaiah Anandan3e6bdda2011-11-04 16:05:04 -0700515 .ib = 2560000000U,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700516 },
517 {
518 .src = MSM_BUS_MASTER_AMPSS_M0,
519 .dst = MSM_BUS_SLAVE_EBI_CH0,
520 .ab = 2500000,
521 .ib = 700000000,
522 },
523 {
524 .src = MSM_BUS_MASTER_AMPSS_M0,
525 .dst = MSM_BUS_SLAVE_EBI_CH0,
526 .ab = 2500000,
527 .ib = 10000000,
528 },
529};
530
531static struct msm_bus_paths vidc_bus_client_config[] = {
532 {
533 ARRAY_SIZE(vidc_init_vectors),
534 vidc_init_vectors,
535 },
536 {
537 ARRAY_SIZE(vidc_venc_vga_vectors),
538 vidc_venc_vga_vectors,
539 },
540 {
541 ARRAY_SIZE(vidc_vdec_vga_vectors),
542 vidc_vdec_vga_vectors,
543 },
544 {
545 ARRAY_SIZE(vidc_venc_720p_vectors),
546 vidc_venc_720p_vectors,
547 },
548 {
549 ARRAY_SIZE(vidc_vdec_720p_vectors),
550 vidc_vdec_720p_vectors,
551 },
552 {
553 ARRAY_SIZE(vidc_venc_1080p_vectors),
554 vidc_venc_1080p_vectors,
555 },
556 {
557 ARRAY_SIZE(vidc_vdec_1080p_vectors),
558 vidc_vdec_1080p_vectors,
559 },
560};
561
562static struct msm_bus_scale_pdata vidc_bus_client_data = {
563 vidc_bus_client_config,
564 ARRAY_SIZE(vidc_bus_client_config),
565 .name = "vidc",
566};
567#endif
568
Mona Hossain9c430e32011-07-27 11:04:47 -0700569#ifdef CONFIG_HW_RANDOM_MSM
570/* PRNG device */
571#define MSM_PRNG_PHYS 0x1A500000
572static struct resource rng_resources = {
573 .flags = IORESOURCE_MEM,
574 .start = MSM_PRNG_PHYS,
575 .end = MSM_PRNG_PHYS + SZ_512 - 1,
576};
577
578struct platform_device msm_device_rng = {
579 .name = "msm_rng",
580 .id = 0,
581 .num_resources = 1,
582 .resource = &rng_resources,
583};
584#endif
585
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700586#define MSM_VIDC_BASE_PHYS 0x04400000
587#define MSM_VIDC_BASE_SIZE 0x00100000
588
589static struct resource msm_device_vidc_resources[] = {
590 {
591 .start = MSM_VIDC_BASE_PHYS,
592 .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1,
593 .flags = IORESOURCE_MEM,
594 },
595 {
596 .start = VCODEC_IRQ,
597 .end = VCODEC_IRQ,
598 .flags = IORESOURCE_IRQ,
599 },
600};
601
602struct msm_vidc_platform_data vidc_platform_data = {
603#ifdef CONFIG_MSM_BUS_SCALING
604 .vidc_bus_client_pdata = &vidc_bus_client_data,
605#endif
Deepak Koturcb4f6722011-10-31 14:06:57 -0700606#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
Olav Hauganb5be7992011-11-18 14:29:02 -0800607 .memtype = ION_CP_MM_HEAP_ID,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700608 .enable_ion = 1,
609#else
Deepak Kotur12301a72011-11-09 18:30:29 -0800610 .memtype = MEMTYPE_EBI1,
Deepak Koturcb4f6722011-10-31 14:06:57 -0700611 .enable_ion = 0,
612#endif
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800613 .disable_dmx = 0,
Rajeshwar Kurapatyc155c352011-12-17 06:35:32 +0530614 .disable_fullhd = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700615};
616
617struct platform_device msm_device_vidc = {
618 .name = "msm_vidc",
619 .id = 0,
620 .num_resources = ARRAY_SIZE(msm_device_vidc_resources),
621 .resource = msm_device_vidc_resources,
622 .dev = {
623 .platform_data = &vidc_platform_data,
624 },
625};
626
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700627#define MSM_SDC1_BASE 0x12400000
628#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
629#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
630#define MSM_SDC2_BASE 0x12140000
631#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
632#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
633#define MSM_SDC2_BASE 0x12140000
634#define MSM_SDC3_BASE 0x12180000
635#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
636#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
637#define MSM_SDC4_BASE 0x121C0000
638#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
639#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
640#define MSM_SDC5_BASE 0x12200000
641#define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800)
642#define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000)
643
644static struct resource resources_sdc1[] = {
645 {
646 .name = "core_mem",
647 .flags = IORESOURCE_MEM,
648 .start = MSM_SDC1_BASE,
649 .end = MSM_SDC1_DML_BASE - 1,
650 },
651 {
652 .name = "core_irq",
653 .flags = IORESOURCE_IRQ,
654 .start = SDC1_IRQ_0,
655 .end = SDC1_IRQ_0
656 },
657#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
658 {
659 .name = "sdcc_dml_addr",
660 .start = MSM_SDC1_DML_BASE,
661 .end = MSM_SDC1_BAM_BASE - 1,
662 .flags = IORESOURCE_MEM,
663 },
664 {
665 .name = "sdcc_bam_addr",
666 .start = MSM_SDC1_BAM_BASE,
667 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
668 .flags = IORESOURCE_MEM,
669 },
670 {
671 .name = "sdcc_bam_irq",
672 .start = SDC1_BAM_IRQ,
673 .end = SDC1_BAM_IRQ,
674 .flags = IORESOURCE_IRQ,
675 },
676#endif
677};
678
679static struct resource resources_sdc2[] = {
680 {
681 .name = "core_mem",
682 .flags = IORESOURCE_MEM,
683 .start = MSM_SDC2_BASE,
684 .end = MSM_SDC2_DML_BASE - 1,
685 },
686 {
687 .name = "core_irq",
688 .flags = IORESOURCE_IRQ,
689 .start = SDC2_IRQ_0,
690 .end = SDC2_IRQ_0
691 },
692#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
693 {
694 .name = "sdcc_dml_addr",
695 .start = MSM_SDC2_DML_BASE,
696 .end = MSM_SDC2_BAM_BASE - 1,
697 .flags = IORESOURCE_MEM,
698 },
699 {
700 .name = "sdcc_bam_addr",
701 .start = MSM_SDC2_BAM_BASE,
702 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
703 .flags = IORESOURCE_MEM,
704 },
705 {
706 .name = "sdcc_bam_irq",
707 .start = SDC2_BAM_IRQ,
708 .end = SDC2_BAM_IRQ,
709 .flags = IORESOURCE_IRQ,
710 },
711#endif
712};
713
714static struct resource resources_sdc3[] = {
715 {
716 .name = "core_mem",
717 .flags = IORESOURCE_MEM,
718 .start = MSM_SDC3_BASE,
719 .end = MSM_SDC3_DML_BASE - 1,
720 },
721 {
722 .name = "core_irq",
723 .flags = IORESOURCE_IRQ,
724 .start = SDC3_IRQ_0,
725 .end = SDC3_IRQ_0
726 },
727#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
728 {
729 .name = "sdcc_dml_addr",
730 .start = MSM_SDC3_DML_BASE,
731 .end = MSM_SDC3_BAM_BASE - 1,
732 .flags = IORESOURCE_MEM,
733 },
734 {
735 .name = "sdcc_bam_addr",
736 .start = MSM_SDC3_BAM_BASE,
737 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
738 .flags = IORESOURCE_MEM,
739 },
740 {
741 .name = "sdcc_bam_irq",
742 .start = SDC3_BAM_IRQ,
743 .end = SDC3_BAM_IRQ,
744 .flags = IORESOURCE_IRQ,
745 },
746#endif
747};
748
749static struct resource resources_sdc4[] = {
750 {
751 .name = "core_mem",
752 .flags = IORESOURCE_MEM,
753 .start = MSM_SDC4_BASE,
754 .end = MSM_SDC4_DML_BASE - 1,
755 },
756 {
757 .name = "core_irq",
758 .flags = IORESOURCE_IRQ,
759 .start = SDC4_IRQ_0,
760 .end = SDC4_IRQ_0
761 },
762#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
763 {
764 .name = "sdcc_dml_addr",
765 .start = MSM_SDC4_DML_BASE,
766 .end = MSM_SDC4_BAM_BASE - 1,
767 .flags = IORESOURCE_MEM,
768 },
769 {
770 .name = "sdcc_bam_addr",
771 .start = MSM_SDC4_BAM_BASE,
772 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
773 .flags = IORESOURCE_MEM,
774 },
775 {
776 .name = "sdcc_bam_irq",
777 .start = SDC4_BAM_IRQ,
778 .end = SDC4_BAM_IRQ,
779 .flags = IORESOURCE_IRQ,
780 },
781#endif
782};
783
784static struct resource resources_sdc5[] = {
785 {
786 .name = "core_mem",
787 .flags = IORESOURCE_MEM,
788 .start = MSM_SDC5_BASE,
789 .end = MSM_SDC5_DML_BASE - 1,
790 },
791 {
792 .name = "core_irq",
793 .flags = IORESOURCE_IRQ,
794 .start = SDC5_IRQ_0,
795 .end = SDC5_IRQ_0
796 },
797#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
798 {
799 .name = "sdcc_dml_addr",
800 .start = MSM_SDC5_DML_BASE,
801 .end = MSM_SDC5_BAM_BASE - 1,
802 .flags = IORESOURCE_MEM,
803 },
804 {
805 .name = "sdcc_bam_addr",
806 .start = MSM_SDC5_BAM_BASE,
807 .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1,
808 .flags = IORESOURCE_MEM,
809 },
810 {
811 .name = "sdcc_bam_irq",
812 .start = SDC5_BAM_IRQ,
813 .end = SDC5_BAM_IRQ,
814 .flags = IORESOURCE_IRQ,
815 },
816#endif
817};
818
819struct platform_device msm_device_sdc1 = {
820 .name = "msm_sdcc",
821 .id = 1,
822 .num_resources = ARRAY_SIZE(resources_sdc1),
823 .resource = resources_sdc1,
824 .dev = {
825 .coherent_dma_mask = 0xffffffff,
826 },
827};
828
829struct platform_device msm_device_sdc2 = {
830 .name = "msm_sdcc",
831 .id = 2,
832 .num_resources = ARRAY_SIZE(resources_sdc2),
833 .resource = resources_sdc2,
834 .dev = {
835 .coherent_dma_mask = 0xffffffff,
836 },
837};
838
839struct platform_device msm_device_sdc3 = {
840 .name = "msm_sdcc",
841 .id = 3,
842 .num_resources = ARRAY_SIZE(resources_sdc3),
843 .resource = resources_sdc3,
844 .dev = {
845 .coherent_dma_mask = 0xffffffff,
846 },
847};
848
849struct platform_device msm_device_sdc4 = {
850 .name = "msm_sdcc",
851 .id = 4,
852 .num_resources = ARRAY_SIZE(resources_sdc4),
853 .resource = resources_sdc4,
854 .dev = {
855 .coherent_dma_mask = 0xffffffff,
856 },
857};
858
859struct platform_device msm_device_sdc5 = {
860 .name = "msm_sdcc",
861 .id = 5,
862 .num_resources = ARRAY_SIZE(resources_sdc5),
863 .resource = resources_sdc5,
864 .dev = {
865 .coherent_dma_mask = 0xffffffff,
866 },
867};
868
Stephen Boydeb819882011-08-29 14:46:30 -0700869#define MSM_LPASS_QDSP6SS_PHYS 0x28800000
870#define SFAB_LPASS_Q6_ACLK_CTL (MSM_CLK_CTL_BASE + 0x23A0)
871
872static struct resource msm_8960_q6_lpass_resources[] = {
873 {
874 .start = MSM_LPASS_QDSP6SS_PHYS,
875 .end = MSM_LPASS_QDSP6SS_PHYS + SZ_256 - 1,
876 .flags = IORESOURCE_MEM,
877 },
878};
879
880static struct pil_q6v4_pdata msm_8960_q6_lpass_data = {
881 .strap_tcm_base = 0x01460000,
882 .strap_ahb_upper = 0x00290000,
883 .strap_ahb_lower = 0x00000280,
884 .aclk_reg = SFAB_LPASS_Q6_ACLK_CTL,
885 .name = "q6",
886 .pas_id = PAS_Q6,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700887 .bus_port = MSM_BUS_MASTER_LPASS_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700888};
889
890struct platform_device msm_8960_q6_lpass = {
891 .name = "pil_qdsp6v4",
892 .id = 0,
893 .num_resources = ARRAY_SIZE(msm_8960_q6_lpass_resources),
894 .resource = msm_8960_q6_lpass_resources,
895 .dev.platform_data = &msm_8960_q6_lpass_data,
896};
897
898#define MSM_MSS_ENABLE_PHYS 0x08B00000
899#define MSM_FW_QDSP6SS_PHYS 0x08800000
900#define MSS_Q6FW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C6C)
901#define SFAB_MSS_Q6_FW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2044)
902
903static struct resource msm_8960_q6_mss_fw_resources[] = {
904 {
905 .start = MSM_FW_QDSP6SS_PHYS,
906 .end = MSM_FW_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_fw_data = {
917 .strap_tcm_base = 0x00400000,
918 .strap_ahb_upper = 0x00090000,
919 .strap_ahb_lower = 0x00000080,
920 .aclk_reg = SFAB_MSS_Q6_FW_ACLK_CTL,
921 .jtag_clk_reg = MSS_Q6FW_JTAG_CLK_CTL,
922 .name = "modem_fw",
923 .depends = "q6",
924 .pas_id = PAS_MODEM_FW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700925 .bus_port = MSM_BUS_MASTER_MSS_FW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700926};
927
928struct platform_device msm_8960_q6_mss_fw = {
929 .name = "pil_qdsp6v4",
930 .id = 1,
931 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_fw_resources),
932 .resource = msm_8960_q6_mss_fw_resources,
933 .dev.platform_data = &msm_8960_q6_mss_fw_data,
934};
935
936#define MSM_SW_QDSP6SS_PHYS 0x08900000
937#define SFAB_MSS_Q6_SW_ACLK_CTL (MSM_CLK_CTL_BASE + 0x2040)
938#define MSS_Q6SW_JTAG_CLK_CTL (MSM_CLK_CTL_BASE + 0x2C68)
939
940static struct resource msm_8960_q6_mss_sw_resources[] = {
941 {
942 .start = MSM_SW_QDSP6SS_PHYS,
943 .end = MSM_SW_QDSP6SS_PHYS + SZ_256 - 1,
944 .flags = IORESOURCE_MEM,
945 },
946 {
947 .start = MSM_MSS_ENABLE_PHYS,
948 .end = MSM_MSS_ENABLE_PHYS + 4 - 1,
949 .flags = IORESOURCE_MEM,
950 },
951};
952
953static struct pil_q6v4_pdata msm_8960_q6_mss_sw_data = {
954 .strap_tcm_base = 0x00420000,
955 .strap_ahb_upper = 0x00090000,
956 .strap_ahb_lower = 0x00000080,
957 .aclk_reg = SFAB_MSS_Q6_SW_ACLK_CTL,
958 .jtag_clk_reg = MSS_Q6SW_JTAG_CLK_CTL,
959 .name = "modem",
960 .depends = "modem_fw",
961 .pas_id = PAS_MODEM_SW,
Matt Wagantall6e4aafb2011-09-09 17:53:54 -0700962 .bus_port = MSM_BUS_MASTER_MSS_SW_PROC,
Stephen Boydeb819882011-08-29 14:46:30 -0700963};
964
965struct platform_device msm_8960_q6_mss_sw = {
966 .name = "pil_qdsp6v4",
967 .id = 2,
968 .num_resources = ARRAY_SIZE(msm_8960_q6_mss_sw_resources),
969 .resource = msm_8960_q6_mss_sw_resources,
970 .dev.platform_data = &msm_8960_q6_mss_sw_data,
971};
972
Stephen Boyd322a9922011-09-20 01:05:54 -0700973static struct resource msm_8960_riva_resources[] = {
974 {
975 .start = 0x03204000,
976 .end = 0x03204000 + SZ_256 - 1,
977 .flags = IORESOURCE_MEM,
978 },
979};
980
981struct platform_device msm_8960_riva = {
982 .name = "pil_riva",
983 .id = -1,
984 .num_resources = ARRAY_SIZE(msm_8960_riva_resources),
985 .resource = msm_8960_riva_resources,
986};
987
Stephen Boydd89eebe2011-09-28 23:28:11 -0700988struct platform_device msm_pil_tzapps = {
989 .name = "pil_tzapps",
990 .id = -1,
991};
992
Stephen Boyd25c4a0b2011-09-20 00:12:36 -0700993struct platform_device msm_pil_dsps = {
994 .name = "pil_dsps",
995 .id = -1,
996 .dev.platform_data = "dsps",
997};
998
Stephen Boyd7b973de2012-03-09 12:26:16 -0800999struct platform_device msm_pil_vidc = {
1000 .name = "pil_vidc",
1001 .id = -1,
1002};
1003
Eric Holmberg023d25c2012-03-01 12:27:55 -07001004static struct resource smd_resource[] = {
1005 {
1006 .name = "a9_m2a_0",
1007 .start = INT_A9_M2A_0,
1008 .flags = IORESOURCE_IRQ,
1009 },
1010 {
1011 .name = "a9_m2a_5",
1012 .start = INT_A9_M2A_5,
1013 .flags = IORESOURCE_IRQ,
1014 },
1015 {
1016 .name = "adsp_a11",
1017 .start = INT_ADSP_A11,
1018 .flags = IORESOURCE_IRQ,
1019 },
1020 {
1021 .name = "adsp_a11_smsm",
1022 .start = INT_ADSP_A11_SMSM,
1023 .flags = IORESOURCE_IRQ,
1024 },
1025 {
1026 .name = "dsps_a11",
1027 .start = INT_DSPS_A11,
1028 .flags = IORESOURCE_IRQ,
1029 },
1030 {
1031 .name = "dsps_a11_smsm",
1032 .start = INT_DSPS_A11_SMSM,
1033 .flags = IORESOURCE_IRQ,
1034 },
1035 {
1036 .name = "wcnss_a11",
1037 .start = INT_WCNSS_A11,
1038 .flags = IORESOURCE_IRQ,
1039 },
1040 {
1041 .name = "wcnss_a11_smsm",
1042 .start = INT_WCNSS_A11_SMSM,
1043 .flags = IORESOURCE_IRQ,
1044 },
1045};
1046
1047static struct smd_subsystem_config smd_config_list[] = {
1048 {
1049 .irq_config_id = SMD_MODEM,
1050 .subsys_name = "modem",
1051 .edge = SMD_APPS_MODEM,
1052
1053 .smd_int.irq_name = "a9_m2a_0",
1054 .smd_int.flags = IRQF_TRIGGER_RISING,
1055 .smd_int.irq_id = -1,
1056 .smd_int.device_name = "smd_dev",
1057 .smd_int.dev_id = 0,
1058 .smd_int.out_bit_pos = 1 << 3,
1059 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1060 .smd_int.out_offset = 0x8,
1061
1062 .smsm_int.irq_name = "a9_m2a_5",
1063 .smsm_int.flags = IRQF_TRIGGER_RISING,
1064 .smsm_int.irq_id = -1,
1065 .smsm_int.device_name = "smd_smsm",
1066 .smsm_int.dev_id = 0,
1067 .smsm_int.out_bit_pos = 1 << 4,
1068 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1069 .smsm_int.out_offset = 0x8,
1070 },
1071 {
1072 .irq_config_id = SMD_Q6,
1073 .subsys_name = "q6",
1074 .edge = SMD_APPS_QDSP,
1075
1076 .smd_int.irq_name = "adsp_a11",
1077 .smd_int.flags = IRQF_TRIGGER_RISING,
1078 .smd_int.irq_id = -1,
1079 .smd_int.device_name = "smd_dev",
1080 .smd_int.dev_id = 0,
1081 .smd_int.out_bit_pos = 1 << 15,
1082 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1083 .smd_int.out_offset = 0x8,
1084
1085 .smsm_int.irq_name = "adsp_a11_smsm",
1086 .smsm_int.flags = IRQF_TRIGGER_RISING,
1087 .smsm_int.irq_id = -1,
1088 .smsm_int.device_name = "smd_smsm",
1089 .smsm_int.dev_id = 0,
1090 .smsm_int.out_bit_pos = 1 << 14,
1091 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1092 .smsm_int.out_offset = 0x8,
1093 },
1094 {
1095 .irq_config_id = SMD_DSPS,
1096 .subsys_name = "dsps",
1097 .edge = SMD_APPS_DSPS,
1098
1099 .smd_int.irq_name = "dsps_a11",
1100 .smd_int.flags = IRQF_TRIGGER_RISING,
1101 .smd_int.irq_id = -1,
1102 .smd_int.device_name = "smd_dev",
1103 .smd_int.dev_id = 0,
1104 .smd_int.out_bit_pos = 1,
1105 .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1106 .smd_int.out_offset = 0x4080,
1107
1108 .smsm_int.irq_name = "dsps_a11_smsm",
1109 .smsm_int.flags = IRQF_TRIGGER_RISING,
1110 .smsm_int.irq_id = -1,
1111 .smsm_int.device_name = "smd_smsm",
1112 .smsm_int.dev_id = 0,
1113 .smsm_int.out_bit_pos = 1,
1114 .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1115 .smsm_int.out_offset = 0x4094,
1116 },
1117 {
1118 .irq_config_id = SMD_WCNSS,
1119 .subsys_name = "wcnss",
1120 .edge = SMD_APPS_WCNSS,
1121
1122 .smd_int.irq_name = "wcnss_a11",
1123 .smd_int.flags = IRQF_TRIGGER_RISING,
1124 .smd_int.irq_id = -1,
1125 .smd_int.device_name = "smd_dev",
1126 .smd_int.dev_id = 0,
1127 .smd_int.out_bit_pos = 1 << 25,
1128 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1129 .smd_int.out_offset = 0x8,
1130
1131 .smsm_int.irq_name = "wcnss_a11_smsm",
1132 .smsm_int.flags = IRQF_TRIGGER_RISING,
1133 .smsm_int.irq_id = -1,
1134 .smsm_int.device_name = "smd_smsm",
1135 .smsm_int.dev_id = 0,
1136 .smsm_int.out_bit_pos = 1 << 23,
1137 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1138 .smsm_int.out_offset = 0x8,
1139 },
1140};
1141
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001142static struct smd_subsystem_restart_config smd_ssr_config = {
1143 .disable_smsm_reset_handshake = 1,
1144};
1145
Eric Holmberg023d25c2012-03-01 12:27:55 -07001146static struct smd_platform smd_platform_data = {
1147 .num_ss_configs = ARRAY_SIZE(smd_config_list),
1148 .smd_ss_configs = smd_config_list,
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001149 .smd_ssr_config = &smd_ssr_config,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001150};
1151
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001152struct platform_device msm_device_smd = {
1153 .name = "msm_smd",
1154 .id = -1,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001155 .resource = smd_resource,
1156 .num_resources = ARRAY_SIZE(smd_resource),
1157 .dev = {
1158 .platform_data = &smd_platform_data,
1159 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001160};
1161
1162struct platform_device msm_device_bam_dmux = {
1163 .name = "BAM_RMNT",
1164 .id = -1,
1165};
1166
Jeff Ohlstein7e668552011-10-06 16:17:25 -07001167static struct msm_watchdog_pdata msm_watchdog_pdata = {
1168 .pet_time = 10000,
1169 .bark_time = 11000,
1170 .has_secure = true,
1171};
1172
1173struct platform_device msm8960_device_watchdog = {
1174 .name = "msm_watchdog",
1175 .id = -1,
1176 .dev = {
1177 .platform_data = &msm_watchdog_pdata,
1178 },
1179};
1180
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001181static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001182 {
1183 .start = ADM_0_SCSS_1_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001184 .flags = IORESOURCE_IRQ,
1185 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001186 {
1187 .start = 0x18320000,
1188 .end = 0x18320000 + SZ_1M - 1,
1189 .flags = IORESOURCE_MEM,
1190 },
1191};
1192
1193static struct msm_dmov_pdata msm_dmov_pdata = {
1194 .sd = 1,
1195 .sd_size = 0x800,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001196};
1197
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -07001198struct platform_device msm8960_device_dmov = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001199 .name = "msm_dmov",
1200 .id = -1,
1201 .resource = msm_dmov_resource,
1202 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -07001203 .dev = {
1204 .platform_data = &msm_dmov_pdata,
1205 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001206};
1207
1208static struct platform_device *msm_sdcc_devices[] __initdata = {
1209 &msm_device_sdc1,
1210 &msm_device_sdc2,
1211 &msm_device_sdc3,
1212 &msm_device_sdc4,
1213 &msm_device_sdc5,
1214};
1215
1216int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1217{
1218 struct platform_device *pdev;
1219
1220 if (controller < 1 || controller > 5)
1221 return -EINVAL;
1222
1223 pdev = msm_sdcc_devices[controller-1];
1224 pdev->dev.platform_data = plat;
1225 return platform_device_register(pdev);
1226}
1227
1228static struct resource resources_qup_i2c_gsbi4[] = {
1229 {
1230 .name = "gsbi_qup_i2c_addr",
1231 .start = MSM_GSBI4_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001232 .end = MSM_GSBI4_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001233 .flags = IORESOURCE_MEM,
1234 },
1235 {
1236 .name = "qup_phys_addr",
1237 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001238 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001239 .flags = IORESOURCE_MEM,
1240 },
1241 {
1242 .name = "qup_err_intr",
1243 .start = GSBI4_QUP_IRQ,
1244 .end = GSBI4_QUP_IRQ,
1245 .flags = IORESOURCE_IRQ,
1246 },
1247};
1248
1249struct platform_device msm8960_device_qup_i2c_gsbi4 = {
1250 .name = "qup_i2c",
1251 .id = 4,
1252 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
1253 .resource = resources_qup_i2c_gsbi4,
1254};
1255
1256static struct resource resources_qup_i2c_gsbi3[] = {
1257 {
1258 .name = "gsbi_qup_i2c_addr",
1259 .start = MSM_GSBI3_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001260 .end = MSM_GSBI3_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001261 .flags = IORESOURCE_MEM,
1262 },
1263 {
1264 .name = "qup_phys_addr",
1265 .start = MSM_GSBI3_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001266 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001267 .flags = IORESOURCE_MEM,
1268 },
1269 {
1270 .name = "qup_err_intr",
1271 .start = GSBI3_QUP_IRQ,
1272 .end = GSBI3_QUP_IRQ,
1273 .flags = IORESOURCE_IRQ,
1274 },
1275};
1276
1277struct platform_device msm8960_device_qup_i2c_gsbi3 = {
1278 .name = "qup_i2c",
1279 .id = 3,
1280 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
1281 .resource = resources_qup_i2c_gsbi3,
1282};
1283
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06001284static struct resource resources_qup_i2c_gsbi9[] = {
1285 {
1286 .name = "gsbi_qup_i2c_addr",
1287 .start = MSM_GSBI9_PHYS,
1288 .end = MSM_GSBI9_PHYS + 4 - 1,
1289 .flags = IORESOURCE_MEM,
1290 },
1291 {
1292 .name = "qup_phys_addr",
1293 .start = MSM_GSBI9_QUP_PHYS,
1294 .end = MSM_GSBI9_QUP_PHYS + MSM_QUP_SIZE - 1,
1295 .flags = IORESOURCE_MEM,
1296 },
1297 {
1298 .name = "qup_err_intr",
1299 .start = GSBI9_QUP_IRQ,
1300 .end = GSBI9_QUP_IRQ,
1301 .flags = IORESOURCE_IRQ,
1302 },
1303};
1304
1305struct platform_device msm8960_device_qup_i2c_gsbi9 = {
1306 .name = "qup_i2c",
1307 .id = 0,
1308 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi9),
1309 .resource = resources_qup_i2c_gsbi9,
1310};
1311
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001312static struct resource resources_qup_i2c_gsbi10[] = {
1313 {
1314 .name = "gsbi_qup_i2c_addr",
1315 .start = MSM_GSBI10_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001316 .end = MSM_GSBI10_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001317 .flags = IORESOURCE_MEM,
1318 },
1319 {
1320 .name = "qup_phys_addr",
1321 .start = MSM_GSBI10_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001322 .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001323 .flags = IORESOURCE_MEM,
1324 },
1325 {
1326 .name = "qup_err_intr",
1327 .start = GSBI10_QUP_IRQ,
1328 .end = GSBI10_QUP_IRQ,
1329 .flags = IORESOURCE_IRQ,
1330 },
1331};
1332
1333struct platform_device msm8960_device_qup_i2c_gsbi10 = {
1334 .name = "qup_i2c",
1335 .id = 10,
1336 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10),
1337 .resource = resources_qup_i2c_gsbi10,
1338};
1339
1340static struct resource resources_qup_i2c_gsbi12[] = {
1341 {
1342 .name = "gsbi_qup_i2c_addr",
1343 .start = MSM_GSBI12_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001344 .end = MSM_GSBI12_PHYS + 4 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001345 .flags = IORESOURCE_MEM,
1346 },
1347 {
1348 .name = "qup_phys_addr",
1349 .start = MSM_GSBI12_QUP_PHYS,
Harini Jayaramand7614a72011-09-15 14:16:02 -06001350 .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001351 .flags = IORESOURCE_MEM,
1352 },
1353 {
1354 .name = "qup_err_intr",
1355 .start = GSBI12_QUP_IRQ,
1356 .end = GSBI12_QUP_IRQ,
1357 .flags = IORESOURCE_IRQ,
1358 },
1359};
1360
1361struct platform_device msm8960_device_qup_i2c_gsbi12 = {
1362 .name = "qup_i2c",
1363 .id = 12,
1364 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12),
1365 .resource = resources_qup_i2c_gsbi12,
1366};
1367
1368#ifdef CONFIG_MSM_CAMERA
Kevin Chanbb8ef862012-02-14 13:03:04 -08001369static struct resource msm_cam_gsbi4_i2c_mux_resources[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001370 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001371 .name = "i2c_mux_rw",
Nishant Pandit24153d82011-08-27 16:05:13 +05301372 .start = 0x008003E0,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001373 .end = 0x008003E0 + SZ_8 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301374 .flags = IORESOURCE_MEM,
1375 },
1376 {
Kevin Chanbb8ef862012-02-14 13:03:04 -08001377 .name = "i2c_mux_ctl",
Nishant Pandit24153d82011-08-27 16:05:13 +05301378 .start = 0x008020B8,
Kevin Chanbb8ef862012-02-14 13:03:04 -08001379 .end = 0x008020B8 + SZ_4 - 1,
Nishant Pandit24153d82011-08-27 16:05:13 +05301380 .flags = IORESOURCE_MEM,
1381 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001382};
1383
Kevin Chanbb8ef862012-02-14 13:03:04 -08001384struct platform_device msm8960_device_i2c_mux_gsbi4 = {
1385 .name = "msm_cam_i2c_mux",
1386 .id = 0,
1387 .resource = msm_cam_gsbi4_i2c_mux_resources,
1388 .num_resources = ARRAY_SIZE(msm_cam_gsbi4_i2c_mux_resources),
1389};
Kevin Chanf6216f22011-10-25 18:40:11 -07001390
1391static struct resource msm_csiphy0_resources[] = {
1392 {
1393 .name = "csiphy",
1394 .start = 0x04800C00,
1395 .end = 0x04800C00 + SZ_1K - 1,
1396 .flags = IORESOURCE_MEM,
1397 },
1398 {
1399 .name = "csiphy",
1400 .start = CSIPHY_4LN_IRQ,
1401 .end = CSIPHY_4LN_IRQ,
1402 .flags = IORESOURCE_IRQ,
1403 },
1404};
1405
1406static struct resource msm_csiphy1_resources[] = {
1407 {
1408 .name = "csiphy",
1409 .start = 0x04801000,
1410 .end = 0x04801000 + SZ_1K - 1,
1411 .flags = IORESOURCE_MEM,
1412 },
1413 {
1414 .name = "csiphy",
1415 .start = MSM8960_CSIPHY_2LN_IRQ,
1416 .end = MSM8960_CSIPHY_2LN_IRQ,
1417 .flags = IORESOURCE_IRQ,
1418 },
1419};
1420
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001421static struct resource msm_csiphy2_resources[] = {
1422 {
1423 .name = "csiphy",
1424 .start = 0x04801400,
1425 .end = 0x04801400 + SZ_1K - 1,
1426 .flags = IORESOURCE_MEM,
1427 },
1428 {
1429 .name = "csiphy",
1430 .start = MSM8960_CSIPHY_2_2LN_IRQ,
1431 .end = MSM8960_CSIPHY_2_2LN_IRQ,
1432 .flags = IORESOURCE_IRQ,
1433 },
1434};
1435
Kevin Chanf6216f22011-10-25 18:40:11 -07001436struct platform_device msm8960_device_csiphy0 = {
1437 .name = "msm_csiphy",
1438 .id = 0,
1439 .resource = msm_csiphy0_resources,
1440 .num_resources = ARRAY_SIZE(msm_csiphy0_resources),
1441};
1442
1443struct platform_device msm8960_device_csiphy1 = {
1444 .name = "msm_csiphy",
1445 .id = 1,
1446 .resource = msm_csiphy1_resources,
1447 .num_resources = ARRAY_SIZE(msm_csiphy1_resources),
1448};
Kevin Chanc8b52e82011-10-25 23:20:21 -07001449
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001450struct platform_device msm8960_device_csiphy2 = {
1451 .name = "msm_csiphy",
1452 .id = 2,
1453 .resource = msm_csiphy2_resources,
1454 .num_resources = ARRAY_SIZE(msm_csiphy2_resources),
1455};
1456
Kevin Chanc8b52e82011-10-25 23:20:21 -07001457static struct resource msm_csid0_resources[] = {
1458 {
1459 .name = "csid",
1460 .start = 0x04800000,
1461 .end = 0x04800000 + SZ_1K - 1,
1462 .flags = IORESOURCE_MEM,
1463 },
1464 {
1465 .name = "csid",
1466 .start = CSI_0_IRQ,
1467 .end = CSI_0_IRQ,
1468 .flags = IORESOURCE_IRQ,
1469 },
1470};
1471
1472static struct resource msm_csid1_resources[] = {
1473 {
1474 .name = "csid",
1475 .start = 0x04800400,
1476 .end = 0x04800400 + SZ_1K - 1,
1477 .flags = IORESOURCE_MEM,
1478 },
1479 {
1480 .name = "csid",
1481 .start = CSI_1_IRQ,
1482 .end = CSI_1_IRQ,
1483 .flags = IORESOURCE_IRQ,
1484 },
1485};
1486
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001487static struct resource msm_csid2_resources[] = {
1488 {
1489 .name = "csid",
1490 .start = 0x04801800,
1491 .end = 0x04801800 + SZ_1K - 1,
1492 .flags = IORESOURCE_MEM,
1493 },
1494 {
1495 .name = "csid",
1496 .start = CSI_2_IRQ,
1497 .end = CSI_2_IRQ,
1498 .flags = IORESOURCE_IRQ,
1499 },
1500};
1501
Kevin Chanc8b52e82011-10-25 23:20:21 -07001502struct platform_device msm8960_device_csid0 = {
1503 .name = "msm_csid",
1504 .id = 0,
1505 .resource = msm_csid0_resources,
1506 .num_resources = ARRAY_SIZE(msm_csid0_resources),
1507};
1508
1509struct platform_device msm8960_device_csid1 = {
1510 .name = "msm_csid",
1511 .id = 1,
1512 .resource = msm_csid1_resources,
1513 .num_resources = ARRAY_SIZE(msm_csid1_resources),
1514};
Kevin Chane12c6672011-10-26 11:55:26 -07001515
Sreesudhan Ramakrish Ramkumarb1edcd02012-01-17 11:33:05 -08001516struct platform_device msm8960_device_csid2 = {
1517 .name = "msm_csid",
1518 .id = 2,
1519 .resource = msm_csid2_resources,
1520 .num_resources = ARRAY_SIZE(msm_csid2_resources),
1521};
1522
Kevin Chane12c6672011-10-26 11:55:26 -07001523struct resource msm_ispif_resources[] = {
1524 {
1525 .name = "ispif",
1526 .start = 0x04800800,
1527 .end = 0x04800800 + SZ_1K - 1,
1528 .flags = IORESOURCE_MEM,
1529 },
1530 {
1531 .name = "ispif",
1532 .start = ISPIF_IRQ,
1533 .end = ISPIF_IRQ,
1534 .flags = IORESOURCE_IRQ,
1535 },
1536};
1537
1538struct platform_device msm8960_device_ispif = {
1539 .name = "msm_ispif",
1540 .id = 0,
1541 .resource = msm_ispif_resources,
1542 .num_resources = ARRAY_SIZE(msm_ispif_resources),
1543};
Kevin Chan5827c552011-10-28 18:36:32 -07001544
1545static struct resource msm_vfe_resources[] = {
1546 {
1547 .name = "vfe32",
1548 .start = 0x04500000,
1549 .end = 0x04500000 + SZ_1M - 1,
1550 .flags = IORESOURCE_MEM,
1551 },
1552 {
1553 .name = "vfe32",
1554 .start = VFE_IRQ,
1555 .end = VFE_IRQ,
1556 .flags = IORESOURCE_IRQ,
1557 },
1558};
1559
1560struct platform_device msm8960_device_vfe = {
1561 .name = "msm_vfe",
1562 .id = 0,
1563 .resource = msm_vfe_resources,
1564 .num_resources = ARRAY_SIZE(msm_vfe_resources),
1565};
Kevin Chana0853122011-11-07 19:48:44 -08001566
1567static struct resource msm_vpe_resources[] = {
1568 {
1569 .name = "vpe",
1570 .start = 0x05300000,
1571 .end = 0x05300000 + SZ_1M - 1,
1572 .flags = IORESOURCE_MEM,
1573 },
1574 {
1575 .name = "vpe",
1576 .start = VPE_IRQ,
1577 .end = VPE_IRQ,
1578 .flags = IORESOURCE_IRQ,
1579 },
1580};
1581
1582struct platform_device msm8960_device_vpe = {
1583 .name = "msm_vpe",
1584 .id = 0,
1585 .resource = msm_vpe_resources,
1586 .num_resources = ARRAY_SIZE(msm_vpe_resources),
1587};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001588#endif
1589
Joel Nidera1261942011-09-12 16:30:09 +03001590#define MSM_TSIF0_PHYS (0x18200000)
1591#define MSM_TSIF1_PHYS (0x18201000)
1592#define MSM_TSIF_SIZE (0x200)
1593
1594#define TSIF_0_CLK GPIO_CFG(75, 1, GPIO_CFG_INPUT, \
1595 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1596#define TSIF_0_EN GPIO_CFG(76, 1, GPIO_CFG_INPUT, \
1597 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1598#define TSIF_0_DATA GPIO_CFG(77, 1, GPIO_CFG_INPUT, \
1599 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1600#define TSIF_0_SYNC GPIO_CFG(82, 1, GPIO_CFG_INPUT, \
1601 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1602#define TSIF_1_CLK GPIO_CFG(79, 1, GPIO_CFG_INPUT, \
1603 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1604#define TSIF_1_EN GPIO_CFG(80, 1, GPIO_CFG_INPUT, \
1605 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1606#define TSIF_1_DATA GPIO_CFG(81, 1, GPIO_CFG_INPUT, \
1607 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1608#define TSIF_1_SYNC GPIO_CFG(78, 1, GPIO_CFG_INPUT, \
1609 GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA)
1610
1611static const struct msm_gpio tsif0_gpios[] = {
1612 { .gpio_cfg = TSIF_0_CLK, .label = "tsif_clk", },
1613 { .gpio_cfg = TSIF_0_EN, .label = "tsif_en", },
1614 { .gpio_cfg = TSIF_0_DATA, .label = "tsif_data", },
1615 { .gpio_cfg = TSIF_0_SYNC, .label = "tsif_sync", },
1616};
1617
1618static const struct msm_gpio tsif1_gpios[] = {
1619 { .gpio_cfg = TSIF_1_CLK, .label = "tsif_clk", },
1620 { .gpio_cfg = TSIF_1_EN, .label = "tsif_en", },
1621 { .gpio_cfg = TSIF_1_DATA, .label = "tsif_data", },
1622 { .gpio_cfg = TSIF_1_SYNC, .label = "tsif_sync", },
1623};
1624
1625struct msm_tsif_platform_data tsif1_platform_data = {
1626 .num_gpios = ARRAY_SIZE(tsif1_gpios),
1627 .gpios = tsif1_gpios,
1628 .tsif_pclk = "tsif_pclk",
1629 .tsif_ref_clk = "tsif_ref_clk",
1630};
1631
1632struct resource tsif1_resources[] = {
1633 [0] = {
1634 .flags = IORESOURCE_IRQ,
1635 .start = TSIF2_IRQ,
1636 .end = TSIF2_IRQ,
1637 },
1638 [1] = {
1639 .flags = IORESOURCE_MEM,
1640 .start = MSM_TSIF1_PHYS,
1641 .end = MSM_TSIF1_PHYS + MSM_TSIF_SIZE - 1,
1642 },
1643 [2] = {
1644 .flags = IORESOURCE_DMA,
1645 .start = DMOV_TSIF_CHAN,
1646 .end = DMOV_TSIF_CRCI,
1647 },
1648};
1649
1650struct msm_tsif_platform_data tsif0_platform_data = {
1651 .num_gpios = ARRAY_SIZE(tsif0_gpios),
1652 .gpios = tsif0_gpios,
1653 .tsif_pclk = "tsif_pclk",
1654 .tsif_ref_clk = "tsif_ref_clk",
1655};
1656struct resource tsif0_resources[] = {
1657 [0] = {
1658 .flags = IORESOURCE_IRQ,
1659 .start = TSIF1_IRQ,
1660 .end = TSIF1_IRQ,
1661 },
1662 [1] = {
1663 .flags = IORESOURCE_MEM,
1664 .start = MSM_TSIF0_PHYS,
1665 .end = MSM_TSIF0_PHYS + MSM_TSIF_SIZE - 1,
1666 },
1667 [2] = {
1668 .flags = IORESOURCE_DMA,
1669 .start = DMOV_TSIF_CHAN,
1670 .end = DMOV_TSIF_CRCI,
1671 },
1672};
1673
1674struct platform_device msm_device_tsif[2] = {
1675 {
1676 .name = "msm_tsif",
1677 .id = 0,
1678 .num_resources = ARRAY_SIZE(tsif0_resources),
1679 .resource = tsif0_resources,
1680 .dev = {
1681 .platform_data = &tsif0_platform_data
1682 },
1683 },
1684 {
1685 .name = "msm_tsif",
1686 .id = 1,
1687 .num_resources = ARRAY_SIZE(tsif1_resources),
1688 .resource = tsif1_resources,
1689 .dev = {
1690 .platform_data = &tsif1_platform_data
1691 },
1692 }
1693};
1694
Jay Chokshi33c044a2011-12-07 13:05:40 -08001695static struct resource resources_ssbi_pmic[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001696 {
1697 .start = MSM_PMIC1_SSBI_CMD_PHYS,
1698 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
1699 .flags = IORESOURCE_MEM,
1700 },
1701};
1702
Jay Chokshi33c044a2011-12-07 13:05:40 -08001703struct platform_device msm8960_device_ssbi_pmic = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001704 .name = "msm_ssbi",
1705 .id = 0,
Jay Chokshi33c044a2011-12-07 13:05:40 -08001706 .resource = resources_ssbi_pmic,
1707 .num_resources = ARRAY_SIZE(resources_ssbi_pmic),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001708};
1709
1710static struct resource resources_qup_spi_gsbi1[] = {
1711 {
1712 .name = "spi_base",
1713 .start = MSM_GSBI1_QUP_PHYS,
1714 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1715 .flags = IORESOURCE_MEM,
1716 },
1717 {
1718 .name = "gsbi_base",
1719 .start = MSM_GSBI1_PHYS,
1720 .end = MSM_GSBI1_PHYS + 4 - 1,
1721 .flags = IORESOURCE_MEM,
1722 },
1723 {
1724 .name = "spi_irq_in",
1725 .start = MSM8960_GSBI1_QUP_IRQ,
1726 .end = MSM8960_GSBI1_QUP_IRQ,
1727 .flags = IORESOURCE_IRQ,
1728 },
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001729 {
1730 .name = "spi_clk",
1731 .start = 9,
1732 .end = 9,
1733 .flags = IORESOURCE_IO,
1734 },
1735 {
Harini Jayaramanaac8e342011-08-09 19:25:23 -06001736 .name = "spi_miso",
1737 .start = 7,
1738 .end = 7,
1739 .flags = IORESOURCE_IO,
1740 },
1741 {
1742 .name = "spi_mosi",
1743 .start = 6,
1744 .end = 6,
1745 .flags = IORESOURCE_IO,
1746 },
Harini Jayaraman8392e432011-11-29 18:26:17 -07001747 {
1748 .name = "spi_cs",
1749 .start = 8,
1750 .end = 8,
1751 .flags = IORESOURCE_IO,
1752 },
1753 {
1754 .name = "spi_cs1",
1755 .start = 14,
1756 .end = 14,
1757 .flags = IORESOURCE_IO,
1758 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001759};
1760
1761struct platform_device msm8960_device_qup_spi_gsbi1 = {
1762 .name = "spi_qsd",
1763 .id = 0,
1764 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1),
1765 .resource = resources_qup_spi_gsbi1,
1766};
1767
1768struct platform_device msm_pcm = {
1769 .name = "msm-pcm-dsp",
1770 .id = -1,
1771};
1772
Kiran Kandi5e809b02012-01-31 00:24:33 -08001773struct platform_device msm_multi_ch_pcm = {
1774 .name = "msm-multi-ch-pcm-dsp",
1775 .id = -1,
1776};
1777
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001778struct platform_device msm_pcm_routing = {
1779 .name = "msm-pcm-routing",
1780 .id = -1,
1781};
1782
1783struct platform_device msm_cpudai0 = {
1784 .name = "msm-dai-q6",
1785 .id = 0x4000,
1786};
1787
1788struct platform_device msm_cpudai1 = {
1789 .name = "msm-dai-q6",
1790 .id = 0x4001,
1791};
1792
1793struct platform_device msm_cpudai_hdmi_rx = {
Kiran Kandi5e809b02012-01-31 00:24:33 -08001794 .name = "msm-dai-q6-hdmi",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001795 .id = 8,
1796};
1797
1798struct platform_device msm_cpudai_bt_rx = {
1799 .name = "msm-dai-q6",
1800 .id = 0x3000,
1801};
1802
1803struct platform_device msm_cpudai_bt_tx = {
1804 .name = "msm-dai-q6",
1805 .id = 0x3001,
1806};
1807
1808struct platform_device msm_cpudai_fm_rx = {
1809 .name = "msm-dai-q6",
1810 .id = 0x3004,
1811};
1812
1813struct platform_device msm_cpudai_fm_tx = {
1814 .name = "msm-dai-q6",
1815 .id = 0x3005,
1816};
1817
Helen Zeng0705a5f2011-10-14 15:29:52 -07001818struct platform_device msm_cpudai_incall_music_rx = {
1819 .name = "msm-dai-q6",
1820 .id = 0x8005,
1821};
1822
Helen Zenge3d716a2011-10-14 16:32:16 -07001823struct platform_device msm_cpudai_incall_record_rx = {
1824 .name = "msm-dai-q6",
1825 .id = 0x8004,
1826};
1827
1828struct platform_device msm_cpudai_incall_record_tx = {
1829 .name = "msm-dai-q6",
1830 .id = 0x8003,
1831};
1832
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001833/*
1834 * Machine specific data for AUX PCM Interface
1835 * which the driver will be unware of.
1836 */
Kiran Kandi5f4ab692012-02-23 11:23:56 -08001837struct msm_dai_auxpcm_pdata auxpcm_pdata = {
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001838 .clk = "pcm_clk",
1839 .mode = AFE_PCM_CFG_MODE_PCM,
1840 .sync = AFE_PCM_CFG_SYNC_INT,
1841 .frame = AFE_PCM_CFG_FRM_256BPF,
1842 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
1843 .slot = 0,
1844 .data = AFE_PCM_CFG_CDATAOE_MASTER,
1845 .pcm_clk_rate = 2048000,
1846};
1847
1848struct platform_device msm_cpudai_auxpcm_rx = {
1849 .name = "msm-dai-q6",
1850 .id = 2,
1851 .dev = {
Kiran Kandi5f4ab692012-02-23 11:23:56 -08001852 .platform_data = &auxpcm_pdata,
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001853 },
1854};
1855
1856struct platform_device msm_cpudai_auxpcm_tx = {
1857 .name = "msm-dai-q6",
1858 .id = 3,
Kiran Kandi5f4ab692012-02-23 11:23:56 -08001859 .dev = {
1860 .platform_data = &auxpcm_pdata,
1861 },
Bhalchandra Gajare0e795c42011-08-15 18:10:30 -07001862};
1863
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001864struct platform_device msm_cpu_fe = {
1865 .name = "msm-dai-fe",
1866 .id = -1,
1867};
1868
1869struct platform_device msm_stub_codec = {
1870 .name = "msm-stub-codec",
1871 .id = 1,
1872};
1873
1874struct platform_device msm_voice = {
1875 .name = "msm-pcm-voice",
1876 .id = -1,
1877};
1878
1879struct platform_device msm_voip = {
1880 .name = "msm-voip-dsp",
1881 .id = -1,
1882};
1883
1884struct platform_device msm_lpa_pcm = {
1885 .name = "msm-pcm-lpa",
1886 .id = -1,
1887};
1888
Asish Bhattacharya96bb6f42011-11-01 20:36:09 +05301889struct platform_device msm_compr_dsp = {
1890 .name = "msm-compr-dsp",
1891 .id = -1,
1892};
1893
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001894struct platform_device msm_pcm_hostless = {
1895 .name = "msm-pcm-hostless",
1896 .id = -1,
1897};
1898
Laxminath Kasamcee1d602011-08-01 19:26:57 +05301899struct platform_device msm_cpudai_afe_01_rx = {
1900 .name = "msm-dai-q6",
1901 .id = 0xE0,
1902};
1903
1904struct platform_device msm_cpudai_afe_01_tx = {
1905 .name = "msm-dai-q6",
1906 .id = 0xF0,
1907};
1908
1909struct platform_device msm_cpudai_afe_02_rx = {
1910 .name = "msm-dai-q6",
1911 .id = 0xF1,
1912};
1913
1914struct platform_device msm_cpudai_afe_02_tx = {
1915 .name = "msm-dai-q6",
1916 .id = 0xE1,
1917};
1918
1919struct platform_device msm_pcm_afe = {
1920 .name = "msm-pcm-afe",
1921 .id = -1,
1922};
1923
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001924struct platform_device *msm_footswitch_devices[] = {
Ravishangar Kalyanamb31a0e42012-01-19 16:02:34 -08001925 FS_8X60(FS_MDP, "fs_mdp"),
Nagamalleswararao Ganjifd7454a2011-08-09 10:56:40 -07001926 FS_8X60(FS_ROT, "fs_rot"),
Shuzhen Wang4d28c092011-07-14 15:40:33 -07001927 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1928 FS_8X60(FS_VFE, "fs_vfe"),
1929 FS_8X60(FS_VPE, "fs_vpe"),
Lucille Sylvestera610fb12011-07-22 17:22:20 -06001930 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1931 FS_8X60(FS_GFX2D0, "fs_gfx2d0"),
1932 FS_8X60(FS_GFX2D1, "fs_gfx2d1"),
Gopikrishnaiah Anandan031eb942011-07-28 13:24:00 -07001933 FS_8X60(FS_VED, "fs_ved"),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001934};
1935unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
1936
Ravishangar Kalyanam319a83c2012-03-21 18:38:05 -07001937
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001938#ifdef CONFIG_MSM_ROTATOR
Ravishangar Kalyanam319a83c2012-03-21 18:38:05 -07001939static struct msm_bus_vectors rotator_init_vectors[] = {
1940 {
1941 .src = MSM_BUS_MASTER_ROTATOR,
1942 .dst = MSM_BUS_SLAVE_EBI_CH0,
1943 .ab = 0,
1944 .ib = 0,
1945 },
1946};
1947
1948static struct msm_bus_vectors rotator_ui_vectors[] = {
1949 {
1950 .src = MSM_BUS_MASTER_ROTATOR,
1951 .dst = MSM_BUS_SLAVE_EBI_CH0,
1952 .ab = (1024 * 600 * 4 * 2 * 60),
1953 .ib = (1024 * 600 * 4 * 2 * 60 * 1.5),
1954 },
1955};
1956
1957static struct msm_bus_vectors rotator_vga_vectors[] = {
1958 {
1959 .src = MSM_BUS_MASTER_ROTATOR,
1960 .dst = MSM_BUS_SLAVE_EBI_CH0,
1961 .ab = (640 * 480 * 2 * 2 * 30),
1962 .ib = (640 * 480 * 2 * 2 * 30 * 1.5),
1963 },
1964};
1965static struct msm_bus_vectors rotator_720p_vectors[] = {
1966 {
1967 .src = MSM_BUS_MASTER_ROTATOR,
1968 .dst = MSM_BUS_SLAVE_EBI_CH0,
1969 .ab = (1280 * 736 * 2 * 2 * 30),
1970 .ib = (1280 * 736 * 2 * 2 * 30 * 1.5),
1971 },
1972};
1973
1974static struct msm_bus_vectors rotator_1080p_vectors[] = {
1975 {
1976 .src = MSM_BUS_MASTER_ROTATOR,
1977 .dst = MSM_BUS_SLAVE_EBI_CH0,
1978 .ab = (1920 * 1088 * 2 * 2 * 30),
1979 .ib = (1920 * 1088 * 2 * 2 * 30 * 1.5),
1980 },
1981};
1982
1983static struct msm_bus_paths rotator_bus_scale_usecases[] = {
1984 {
1985 ARRAY_SIZE(rotator_init_vectors),
1986 rotator_init_vectors,
1987 },
1988 {
1989 ARRAY_SIZE(rotator_ui_vectors),
1990 rotator_ui_vectors,
1991 },
1992 {
1993 ARRAY_SIZE(rotator_vga_vectors),
1994 rotator_vga_vectors,
1995 },
1996 {
1997 ARRAY_SIZE(rotator_720p_vectors),
1998 rotator_720p_vectors,
1999 },
2000 {
2001 ARRAY_SIZE(rotator_1080p_vectors),
2002 rotator_1080p_vectors,
2003 },
2004};
2005
2006struct msm_bus_scale_pdata rotator_bus_scale_pdata = {
2007 rotator_bus_scale_usecases,
2008 ARRAY_SIZE(rotator_bus_scale_usecases),
2009 .name = "rotator",
2010};
2011
2012void __init msm_rotator_update_bus_vectors(unsigned int xres,
2013 unsigned int yres)
2014{
2015 rotator_ui_vectors[0].ab = xres * yres * 4 * 2 * 60;
2016 rotator_ui_vectors[0].ib = xres * yres * 4 * 2 * 60 * 3 / 2;
2017}
2018
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002019#define ROTATOR_HW_BASE 0x04E00000
2020static struct resource resources_msm_rotator[] = {
2021 {
2022 .start = ROTATOR_HW_BASE,
2023 .end = ROTATOR_HW_BASE + 0x100000 - 1,
2024 .flags = IORESOURCE_MEM,
2025 },
2026 {
2027 .start = ROT_IRQ,
2028 .end = ROT_IRQ,
2029 .flags = IORESOURCE_IRQ,
2030 },
2031};
2032
2033static struct msm_rot_clocks rotator_clocks[] = {
2034 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07002035 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002036 .clk_type = ROTATOR_CORE_CLK,
Nagamalleswararao Ganji0bb107342011-10-10 20:55:32 -07002037 .clk_rate = 200 * 1000 * 1000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002038 },
2039 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07002040 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002041 .clk_type = ROTATOR_PCLK,
2042 .clk_rate = 0,
2043 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002044};
2045
2046static struct msm_rotator_platform_data rotator_pdata = {
2047 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
2048 .hardware_version_number = 0x01020309,
2049 .rotator_clks = rotator_clocks,
2050 .regulator_name = "fs_rot",
Nagamalleswararao Ganji5fabbd62011-11-06 23:10:43 -08002051#ifdef CONFIG_MSM_BUS_SCALING
2052 .bus_scale_table = &rotator_bus_scale_pdata,
2053#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002054};
2055
2056struct platform_device msm_rotator_device = {
2057 .name = "msm_rotator",
2058 .id = 0,
2059 .num_resources = ARRAY_SIZE(resources_msm_rotator),
2060 .resource = resources_msm_rotator,
2061 .dev = {
2062 .platform_data = &rotator_pdata,
2063 },
2064};
2065#endif
2066
2067#define MIPI_DSI_HW_BASE 0x04700000
2068#define MDP_HW_BASE 0x05100000
2069
2070static struct resource msm_mipi_dsi1_resources[] = {
2071 {
2072 .name = "mipi_dsi",
2073 .start = MIPI_DSI_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07002074 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002075 .flags = IORESOURCE_MEM,
2076 },
2077 {
2078 .start = DSI1_IRQ,
2079 .end = DSI1_IRQ,
2080 .flags = IORESOURCE_IRQ,
2081 },
2082};
2083
2084struct platform_device msm_mipi_dsi1_device = {
2085 .name = "mipi_dsi",
2086 .id = 1,
2087 .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources),
2088 .resource = msm_mipi_dsi1_resources,
2089};
2090
2091static struct resource msm_mdp_resources[] = {
2092 {
2093 .name = "mdp",
2094 .start = MDP_HW_BASE,
kuogee hsiehf12acf52011-09-06 10:49:43 -07002095 .end = MDP_HW_BASE + 0x000F0000 - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002096 .flags = IORESOURCE_MEM,
2097 },
2098 {
2099 .start = MDP_IRQ,
2100 .end = MDP_IRQ,
2101 .flags = IORESOURCE_IRQ,
2102 },
2103};
2104
2105static struct platform_device msm_mdp_device = {
2106 .name = "mdp",
2107 .id = 0,
2108 .num_resources = ARRAY_SIZE(msm_mdp_resources),
2109 .resource = msm_mdp_resources,
2110};
2111
2112static void __init msm_register_device(struct platform_device *pdev, void *data)
2113{
2114 int ret;
2115
2116 pdev->dev.platform_data = data;
2117 ret = platform_device_register(pdev);
2118 if (ret)
2119 dev_err(&pdev->dev,
2120 "%s: platform_device_register() failed = %d\n",
2121 __func__, ret);
2122}
2123
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07002124#ifdef CONFIG_MSM_BUS_SCALING
2125static struct platform_device msm_dtv_device = {
2126 .name = "dtv",
2127 .id = 0,
2128};
2129#endif
2130
Ravishangar Kalyanamc2fee312012-02-09 19:11:22 -08002131struct platform_device msm_lvds_device = {
Huaibin Yang4a084e32011-12-15 15:25:52 -08002132 .name = "lvds",
2133 .id = 0,
2134};
2135
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002136void __init msm_fb_register_device(char *name, void *data)
2137{
2138 if (!strncmp(name, "mdp", 3))
2139 msm_register_device(&msm_mdp_device, data);
2140 else if (!strncmp(name, "mipi_dsi", 8))
2141 msm_register_device(&msm_mipi_dsi1_device, data);
Huaibin Yang4a084e32011-12-15 15:25:52 -08002142 else if (!strncmp(name, "lvds", 4))
2143 msm_register_device(&msm_lvds_device, data);
Ravishangar Kalyanam882930f2011-07-08 17:51:52 -07002144#ifdef CONFIG_MSM_BUS_SCALING
2145 else if (!strncmp(name, "dtv", 3))
2146 msm_register_device(&msm_dtv_device, data);
2147#endif
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002148 else
2149 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
2150}
2151
2152static struct resource resources_sps[] = {
2153 {
2154 .name = "pipe_mem",
2155 .start = 0x12800000,
2156 .end = 0x12800000 + 0x4000 - 1,
2157 .flags = IORESOURCE_MEM,
2158 },
2159 {
2160 .name = "bamdma_dma",
2161 .start = 0x12240000,
2162 .end = 0x12240000 + 0x1000 - 1,
2163 .flags = IORESOURCE_MEM,
2164 },
2165 {
2166 .name = "bamdma_bam",
2167 .start = 0x12244000,
2168 .end = 0x12244000 + 0x4000 - 1,
2169 .flags = IORESOURCE_MEM,
2170 },
2171 {
2172 .name = "bamdma_irq",
2173 .start = SPS_BAM_DMA_IRQ,
2174 .end = SPS_BAM_DMA_IRQ,
2175 .flags = IORESOURCE_IRQ,
2176 },
2177};
2178
2179struct msm_sps_platform_data msm_sps_pdata = {
2180 .bamdma_restricted_pipes = 0x06,
2181};
2182
2183struct platform_device msm_device_sps = {
2184 .name = "msm_sps",
2185 .id = -1,
2186 .num_resources = ARRAY_SIZE(resources_sps),
2187 .resource = resources_sps,
2188 .dev.platform_data = &msm_sps_pdata,
2189};
2190
2191#ifdef CONFIG_MSM_MPM
Praveen Chidambaram78499012011-11-01 17:15:17 -06002192static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002193 [1] = MSM_GPIO_TO_INT(46),
2194 [2] = MSM_GPIO_TO_INT(150),
2195 [4] = MSM_GPIO_TO_INT(103),
2196 [5] = MSM_GPIO_TO_INT(104),
2197 [6] = MSM_GPIO_TO_INT(105),
2198 [7] = MSM_GPIO_TO_INT(106),
2199 [8] = MSM_GPIO_TO_INT(107),
2200 [9] = MSM_GPIO_TO_INT(7),
2201 [10] = MSM_GPIO_TO_INT(11),
2202 [11] = MSM_GPIO_TO_INT(15),
2203 [12] = MSM_GPIO_TO_INT(19),
2204 [13] = MSM_GPIO_TO_INT(23),
2205 [14] = MSM_GPIO_TO_INT(27),
2206 [15] = MSM_GPIO_TO_INT(31),
2207 [16] = MSM_GPIO_TO_INT(35),
2208 [19] = MSM_GPIO_TO_INT(90),
2209 [20] = MSM_GPIO_TO_INT(92),
2210 [23] = MSM_GPIO_TO_INT(85),
2211 [24] = MSM_GPIO_TO_INT(83),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002212 [25] = USB1_HS_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002213 [27] = HDMI_IRQ,
Praveen Chidambaramb3d857c2011-05-31 16:28:07 -06002214 [29] = MSM_GPIO_TO_INT(10),
2215 [30] = MSM_GPIO_TO_INT(102),
2216 [31] = MSM_GPIO_TO_INT(81),
2217 [32] = MSM_GPIO_TO_INT(78),
2218 [33] = MSM_GPIO_TO_INT(94),
2219 [34] = MSM_GPIO_TO_INT(72),
2220 [35] = MSM_GPIO_TO_INT(39),
2221 [36] = MSM_GPIO_TO_INT(43),
2222 [37] = MSM_GPIO_TO_INT(61),
2223 [38] = MSM_GPIO_TO_INT(50),
2224 [39] = MSM_GPIO_TO_INT(42),
2225 [41] = MSM_GPIO_TO_INT(62),
2226 [42] = MSM_GPIO_TO_INT(76),
2227 [43] = MSM_GPIO_TO_INT(75),
2228 [44] = MSM_GPIO_TO_INT(70),
2229 [45] = MSM_GPIO_TO_INT(69),
2230 [46] = MSM_GPIO_TO_INT(67),
2231 [47] = MSM_GPIO_TO_INT(65),
2232 [48] = MSM_GPIO_TO_INT(58),
2233 [49] = MSM_GPIO_TO_INT(54),
2234 [50] = MSM_GPIO_TO_INT(52),
2235 [51] = MSM_GPIO_TO_INT(49),
2236 [52] = MSM_GPIO_TO_INT(40),
2237 [53] = MSM_GPIO_TO_INT(37),
2238 [54] = MSM_GPIO_TO_INT(24),
2239 [55] = MSM_GPIO_TO_INT(14),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002240};
2241
Praveen Chidambaram78499012011-11-01 17:15:17 -06002242static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002243 TLMM_MSM_SUMMARY_IRQ,
2244 RPM_APCC_CPU0_GP_HIGH_IRQ,
2245 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2246 RPM_APCC_CPU0_GP_LOW_IRQ,
2247 RPM_APCC_CPU0_WAKE_UP_IRQ,
2248 RPM_APCC_CPU1_GP_HIGH_IRQ,
2249 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
2250 RPM_APCC_CPU1_GP_LOW_IRQ,
2251 RPM_APCC_CPU1_WAKE_UP_IRQ,
2252 MSS_TO_APPS_IRQ_0,
2253 MSS_TO_APPS_IRQ_1,
2254 MSS_TO_APPS_IRQ_2,
2255 MSS_TO_APPS_IRQ_3,
2256 MSS_TO_APPS_IRQ_4,
2257 MSS_TO_APPS_IRQ_5,
2258 MSS_TO_APPS_IRQ_6,
2259 MSS_TO_APPS_IRQ_7,
2260 MSS_TO_APPS_IRQ_8,
2261 MSS_TO_APPS_IRQ_9,
2262 LPASS_SCSS_GP_LOW_IRQ,
2263 LPASS_SCSS_GP_MEDIUM_IRQ,
2264 LPASS_SCSS_GP_HIGH_IRQ,
David Collins5e2b2fd2011-09-08 15:23:30 -07002265 SPS_MTI_30,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002266 SPS_MTI_31,
David Collins5e2b2fd2011-09-08 15:23:30 -07002267 RIVA_APSS_SPARE_IRQ,
David Collins84ecd0a2011-09-27 21:11:11 -07002268 RIVA_APPS_WLAN_SMSM_IRQ,
2269 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
2270 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002271};
2272
Praveen Chidambaram78499012011-11-01 17:15:17 -06002273struct msm_mpm_device_data msm8960_mpm_dev_data __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002274 .irqs_m2a = msm_mpm_irqs_m2a,
2275 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
2276 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
2277 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
2278 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
2279 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
2280 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
2281 .mpm_apps_ipc_val = BIT(1),
2282 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2283
2284};
2285#endif
2286
Stephen Boydbb600ae2011-08-02 20:11:40 -07002287static struct clk_lookup msm_clocks_8960_dummy[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002288 CLK_DUMMY("pll2", PLL2, NULL, 0),
2289 CLK_DUMMY("pll8", PLL8, NULL, 0),
2290 CLK_DUMMY("pll4", PLL4, NULL, 0),
2291
2292 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
2293 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
2294 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
2295 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
2296 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2297 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
2298 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
2299 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
2300 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
2301 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
2302 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
2303 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
2304 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
2305 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
2306 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
2307 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
2308
Matt Wagantalle2522372011-08-17 14:52:21 -07002309 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
2310 CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF),
2311 CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF),
2312 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
2313 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
2314 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
2315 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
2316 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
2317 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
2318 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
2319 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
2320 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002321 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF),
2322 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
2323 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF),
2324 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
2325 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF),
2326 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
2327 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
2328 CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF),
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06002329 CLK_DUMMY("core_clk", GSBI9_QUP_CLK, "qup_i2c.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002330 CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF),
2331 CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF),
2332 CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002333 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07002334 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Matt Wagantallc1205292011-08-11 17:19:31 -07002335 CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002336 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
2337 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
2338 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
2339 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
2340 CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002341 CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002342 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002343 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
2344 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
2345 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
2346 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
2347 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
2348 CLK_DUMMY("src_clk", USB_FS2_SRC_CLK, NULL, OFF),
2349 CLK_DUMMY("alt_core_clk", USB_FS2_XCVR_CLK, NULL, OFF),
2350 CLK_DUMMY("sys_clk", USB_FS2_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07002351 CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF),
2352 CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002353 CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF),
2354 CLK_DUMMY("iface_clk", GSBI2_P_CLK,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002355 "msm_serial_hsl.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002356 CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07002357 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002358 CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07002359 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002360 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
2361 CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF),
Harini Jayaramanfe6ff4162012-03-14 11:25:40 -06002362 CLK_DUMMY("iface_clk", GSBI9_P_CLK, "qup_i2c.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07002363 CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF),
2364 CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF),
2365 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
2366 CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07002367 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08002368 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
2369 CLK_DUMMY("iface_clk", USB_FS2_P_CLK, NULL, OFF),
2370 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002371 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
2372 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
2373 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
2374 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
2375 CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF),
Matt Wagantalle1a86062011-08-18 17:46:10 -07002376 CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF),
2377 CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002378 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
2379 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
2380 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
2381 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
2382 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002383 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
2384 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
2385 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
2386 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
2387 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
2388 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
2389 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
2390 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
2391 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
2392 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
2393 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
2394 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF),
2395 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF),
2396 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF),
2397 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002398 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF),
2399 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF),
2400 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002401 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002402 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002403 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002404 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
2405 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
2406 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002407 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002408 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
2409 CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF),
2410 CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07002411 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002412 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
2413 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
2414 CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF),
2415 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
2416 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
2417 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
2418 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
2419 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
2420 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002421 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002422 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
2423 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
2424 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
2425 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
2426 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
2427 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
2428 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF),
2429 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF),
2430 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF),
2431 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002432 CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF),
2433 CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF),
2434 CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002435 CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF),
2436 CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF),
2437 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
2438 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07002439 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002440 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002441 CLK_DUMMY("iface_clk", SMMU_P_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07002442 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002443 CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF),
2444 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
2445 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
2446 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
2447 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
2448 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
2449 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
2450 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
2451 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
2452 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
2453 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
2454 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
2455 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
2456 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
2457 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07002458 CLK_DUMMY("core_clk", JPEGD_AXI_CLK, NULL, 0),
2459 CLK_DUMMY("core_clk", VFE_AXI_CLK, NULL, 0),
2460 CLK_DUMMY("core_clk", VCODEC_AXI_CLK, NULL, 0),
2461 CLK_DUMMY("core_clk", GFX3D_CLK, NULL, 0),
2462 CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, 0),
2463 CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002464
2465 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08002466 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, "msm_otg", NULL),
Matt Wagantall37ce3842011-08-17 16:00:36 -07002467 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0),
2468 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0),
2469 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0),
2470 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0),
2471 CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002472 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
2473 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
2474};
2475
Stephen Boydbb600ae2011-08-02 20:11:40 -07002476struct clock_init_data msm8960_dummy_clock_init_data __initdata = {
2477 .table = msm_clocks_8960_dummy,
2478 .size = ARRAY_SIZE(msm_clocks_8960_dummy),
2479};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002480
2481#define LPASS_SLIMBUS_PHYS 0x28080000
2482#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Sagar Dhariacc969452011-09-19 10:34:30 -06002483#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002484/* Board info for the slimbus slave device */
2485static struct resource slimbus_res[] = {
2486 {
2487 .start = LPASS_SLIMBUS_PHYS,
2488 .end = LPASS_SLIMBUS_PHYS + 8191,
2489 .flags = IORESOURCE_MEM,
2490 .name = "slimbus_physical",
2491 },
2492 {
2493 .start = LPASS_SLIMBUS_BAM_PHYS,
2494 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
2495 .flags = IORESOURCE_MEM,
2496 .name = "slimbus_bam_physical",
2497 },
2498 {
Sagar Dhariacc969452011-09-19 10:34:30 -06002499 .start = LPASS_SLIMBUS_SLEW,
2500 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
2501 .flags = IORESOURCE_MEM,
2502 .name = "slimbus_slew_reg",
2503 },
2504 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002505 .start = SLIMBUS0_CORE_EE1_IRQ,
2506 .end = SLIMBUS0_CORE_EE1_IRQ,
2507 .flags = IORESOURCE_IRQ,
2508 .name = "slimbus_irq",
2509 },
2510 {
2511 .start = SLIMBUS0_BAM_EE1_IRQ,
2512 .end = SLIMBUS0_BAM_EE1_IRQ,
2513 .flags = IORESOURCE_IRQ,
2514 .name = "slimbus_bam_irq",
2515 },
2516};
2517
2518struct platform_device msm_slim_ctrl = {
2519 .name = "msm_slim_ctrl",
2520 .id = 1,
2521 .num_resources = ARRAY_SIZE(slimbus_res),
2522 .resource = slimbus_res,
2523 .dev = {
2524 .coherent_dma_mask = 0xffffffffULL,
2525 },
2526};
2527
Lucille Sylvester6e362412011-12-09 16:21:42 -07002528static struct msm_dcvs_freq_entry grp3d_freq[] = {
2529 {0, 0, 333932},
2530 {0, 0, 497532},
2531 {0, 0, 707610},
2532 {0, 0, 844545},
2533};
2534
2535static struct msm_dcvs_freq_entry grp2d_freq[] = {
2536 {0, 0, 86000},
2537 {0, 0, 200000},
2538};
2539
2540static struct msm_dcvs_core_info grp3d_core_info = {
2541 .freq_tbl = &grp3d_freq[0],
2542 .core_param = {
2543 .max_time_us = 100000,
2544 .num_freq = ARRAY_SIZE(grp3d_freq),
2545 },
2546 .algo_param = {
2547 .slack_time_us = 39000,
2548 .disable_pc_threshold = 86000,
2549 .ss_window_size = 1000000,
2550 .ss_util_pct = 95,
2551 .em_max_util_pct = 97,
2552 .ss_iobusy_conv = 100,
2553 },
2554};
2555
2556static struct msm_dcvs_core_info grp2d_core_info = {
2557 .freq_tbl = &grp2d_freq[0],
2558 .core_param = {
2559 .max_time_us = 100000,
2560 .num_freq = ARRAY_SIZE(grp2d_freq),
2561 },
2562 .algo_param = {
2563 .slack_time_us = 39000,
2564 .disable_pc_threshold = 90000,
2565 .ss_window_size = 1000000,
2566 .ss_util_pct = 90,
2567 .em_max_util_pct = 95,
2568 },
2569};
2570
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002571#ifdef CONFIG_MSM_BUS_SCALING
2572static struct msm_bus_vectors grp3d_init_vectors[] = {
2573 {
2574 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2575 .dst = MSM_BUS_SLAVE_EBI_CH0,
2576 .ab = 0,
2577 .ib = 0,
2578 },
2579};
2580
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002581static struct msm_bus_vectors grp3d_low_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002582 {
2583 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2584 .dst = MSM_BUS_SLAVE_EBI_CH0,
2585 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002586 .ib = KGSL_CONVERT_TO_MBPS(1000),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002587 },
2588};
2589
2590static struct msm_bus_vectors grp3d_nominal_low_vectors[] = {
2591 {
2592 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2593 .dst = MSM_BUS_SLAVE_EBI_CH0,
2594 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002595 .ib = KGSL_CONVERT_TO_MBPS(2048),
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002596 },
2597};
2598
2599static struct msm_bus_vectors grp3d_nominal_high_vectors[] = {
2600 {
2601 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2602 .dst = MSM_BUS_SLAVE_EBI_CH0,
2603 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002604 .ib = KGSL_CONVERT_TO_MBPS(2656),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002605 },
2606};
2607
2608static struct msm_bus_vectors grp3d_max_vectors[] = {
2609 {
2610 .src = MSM_BUS_MASTER_GRAPHICS_3D,
2611 .dst = MSM_BUS_SLAVE_EBI_CH0,
2612 .ab = 0,
Suman Tatiraju0123d182011-09-30 14:59:06 -07002613 .ib = KGSL_CONVERT_TO_MBPS(3968),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002614 },
2615};
2616
2617static struct msm_bus_paths grp3d_bus_scale_usecases[] = {
2618 {
2619 ARRAY_SIZE(grp3d_init_vectors),
2620 grp3d_init_vectors,
2621 },
2622 {
Lucille Sylvester34ec3692011-08-16 16:28:04 -06002623 ARRAY_SIZE(grp3d_low_vectors),
2624 grp3d_low_vectors,
2625 },
2626 {
2627 ARRAY_SIZE(grp3d_nominal_low_vectors),
2628 grp3d_nominal_low_vectors,
2629 },
2630 {
2631 ARRAY_SIZE(grp3d_nominal_high_vectors),
2632 grp3d_nominal_high_vectors,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002633 },
2634 {
2635 ARRAY_SIZE(grp3d_max_vectors),
2636 grp3d_max_vectors,
2637 },
2638};
2639
2640static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = {
2641 grp3d_bus_scale_usecases,
2642 ARRAY_SIZE(grp3d_bus_scale_usecases),
2643 .name = "grp3d",
2644};
2645
2646static struct msm_bus_vectors grp2d0_init_vectors[] = {
2647 {
2648 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2649 .dst = MSM_BUS_SLAVE_EBI_CH0,
2650 .ab = 0,
2651 .ib = 0,
2652 },
2653};
2654
Lucille Sylvester808eca22011-11-03 10:26:29 -07002655static struct msm_bus_vectors grp2d0_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002656 {
2657 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2658 .dst = MSM_BUS_SLAVE_EBI_CH0,
2659 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002660 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002661 },
2662};
2663
Lucille Sylvester808eca22011-11-03 10:26:29 -07002664static struct msm_bus_vectors grp2d0_max_vectors[] = {
2665 {
2666 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0,
2667 .dst = MSM_BUS_SLAVE_EBI_CH0,
2668 .ab = 0,
2669 .ib = KGSL_CONVERT_TO_MBPS(2048),
2670 },
2671};
2672
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002673static struct msm_bus_paths grp2d0_bus_scale_usecases[] = {
2674 {
2675 ARRAY_SIZE(grp2d0_init_vectors),
2676 grp2d0_init_vectors,
2677 },
2678 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002679 ARRAY_SIZE(grp2d0_nominal_vectors),
2680 grp2d0_nominal_vectors,
2681 },
2682 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002683 ARRAY_SIZE(grp2d0_max_vectors),
2684 grp2d0_max_vectors,
2685 },
2686};
2687
2688struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = {
2689 grp2d0_bus_scale_usecases,
2690 ARRAY_SIZE(grp2d0_bus_scale_usecases),
2691 .name = "grp2d0",
2692};
2693
2694static struct msm_bus_vectors grp2d1_init_vectors[] = {
2695 {
2696 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2697 .dst = MSM_BUS_SLAVE_EBI_CH0,
2698 .ab = 0,
2699 .ib = 0,
2700 },
2701};
2702
Lucille Sylvester808eca22011-11-03 10:26:29 -07002703static struct msm_bus_vectors grp2d1_nominal_vectors[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002704 {
2705 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2706 .dst = MSM_BUS_SLAVE_EBI_CH0,
2707 .ab = 0,
Lucille Sylvester3efebb52012-01-17 12:58:38 -07002708 .ib = KGSL_CONVERT_TO_MBPS(1000),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002709 },
2710};
2711
Lucille Sylvester808eca22011-11-03 10:26:29 -07002712static struct msm_bus_vectors grp2d1_max_vectors[] = {
2713 {
2714 .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1,
2715 .dst = MSM_BUS_SLAVE_EBI_CH0,
2716 .ab = 0,
2717 .ib = KGSL_CONVERT_TO_MBPS(2048),
2718 },
2719};
2720
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002721static struct msm_bus_paths grp2d1_bus_scale_usecases[] = {
2722 {
2723 ARRAY_SIZE(grp2d1_init_vectors),
2724 grp2d1_init_vectors,
2725 },
2726 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002727 ARRAY_SIZE(grp2d1_nominal_vectors),
2728 grp2d1_nominal_vectors,
2729 },
2730 {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002731 ARRAY_SIZE(grp2d1_max_vectors),
2732 grp2d1_max_vectors,
2733 },
2734};
2735
2736struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = {
2737 grp2d1_bus_scale_usecases,
2738 ARRAY_SIZE(grp2d1_bus_scale_usecases),
2739 .name = "grp2d1",
2740};
2741#endif
2742
2743static struct resource kgsl_3d0_resources[] = {
2744 {
2745 .name = KGSL_3D0_REG_MEMORY,
2746 .start = 0x04300000, /* GFX3D address */
2747 .end = 0x0431ffff,
2748 .flags = IORESOURCE_MEM,
2749 },
2750 {
2751 .name = KGSL_3D0_IRQ,
2752 .start = GFX3D_IRQ,
2753 .end = GFX3D_IRQ,
2754 .flags = IORESOURCE_IRQ,
2755 },
2756};
2757
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002758static const char *kgsl_3d0_iommu_ctx_names[] = {
2759 "gfx3d_user",
2760 /* priv_ctx goes here */
2761};
2762
2763static struct kgsl_device_iommu_data kgsl_3d0_iommu_data[] = {
2764 {
2765 .iommu_ctx_names = kgsl_3d0_iommu_ctx_names,
2766 .iommu_ctx_count = ARRAY_SIZE(kgsl_3d0_iommu_ctx_names),
2767 .physstart = 0x07C00000,
2768 .physend = 0x07C00000 + SZ_1M - 1,
2769 },
2770};
2771
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002772static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002773 .pwrlevel = {
2774 {
2775 .gpu_freq = 400000000,
2776 .bus_freq = 4,
2777 .io_fraction = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002778 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002779 {
2780 .gpu_freq = 300000000,
2781 .bus_freq = 3,
2782 .io_fraction = 33,
2783 },
2784 {
2785 .gpu_freq = 200000000,
2786 .bus_freq = 2,
2787 .io_fraction = 100,
2788 },
2789 {
2790 .gpu_freq = 128000000,
2791 .bus_freq = 1,
2792 .io_fraction = 100,
2793 },
2794 {
2795 .gpu_freq = 27000000,
2796 .bus_freq = 0,
2797 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002798 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002799 .init_level = 0,
Lucille Sylvester6e362412011-12-09 16:21:42 -07002800 .num_levels = ARRAY_SIZE(grp3d_freq) + 1,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002801 .set_grp_async = NULL,
Lucille Sylvester93650bb2011-11-02 14:37:10 -07002802 .idle_timeout = HZ/20,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002803 .nap_allowed = true,
2804 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002805#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002806 .bus_scale_table = &grp3d_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002807#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002808 .iommu_data = kgsl_3d0_iommu_data,
2809 .iommu_count = ARRAY_SIZE(kgsl_3d0_iommu_data),
Lucille Sylvester6e362412011-12-09 16:21:42 -07002810 .core_info = &grp3d_core_info,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002811};
2812
2813struct platform_device msm_kgsl_3d0 = {
2814 .name = "kgsl-3d0",
2815 .id = 0,
2816 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
2817 .resource = kgsl_3d0_resources,
2818 .dev = {
2819 .platform_data = &kgsl_3d0_pdata,
2820 },
2821};
2822
2823static struct resource kgsl_2d0_resources[] = {
2824 {
2825 .name = KGSL_2D0_REG_MEMORY,
2826 .start = 0x04100000, /* Z180 base address */
2827 .end = 0x04100FFF,
2828 .flags = IORESOURCE_MEM,
2829 },
2830 {
2831 .name = KGSL_2D0_IRQ,
2832 .start = GFX2D0_IRQ,
2833 .end = GFX2D0_IRQ,
2834 .flags = IORESOURCE_IRQ,
2835 },
2836};
2837
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002838static const char *kgsl_2d0_iommu_ctx_names[] = {
2839 "gfx2d0_2d0",
2840};
2841
2842static struct kgsl_device_iommu_data kgsl_2d0_iommu_data[] = {
2843 {
2844 .iommu_ctx_names = kgsl_2d0_iommu_ctx_names,
2845 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d0_iommu_ctx_names),
2846 .physstart = 0x07D00000,
2847 .physend = 0x07D00000 + SZ_1M - 1,
2848 },
2849};
2850
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002851static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002852 .pwrlevel = {
2853 {
2854 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002855 .bus_freq = 2,
2856 },
2857 {
2858 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002859 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002860 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002861 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002862 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002863 .bus_freq = 0,
2864 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002865 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002866 .init_level = 0,
Lucille Sylvester6e362412011-12-09 16:21:42 -07002867 .num_levels = ARRAY_SIZE(grp2d_freq) + 1,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002868 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002869 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002870 .nap_allowed = true,
2871 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002872#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002873 .bus_scale_table = &grp2d0_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002874#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002875 .iommu_data = kgsl_2d0_iommu_data,
2876 .iommu_count = ARRAY_SIZE(kgsl_2d0_iommu_data),
Lucille Sylvester6e362412011-12-09 16:21:42 -07002877 .core_info = &grp2d_core_info,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002878};
2879
2880struct platform_device msm_kgsl_2d0 = {
2881 .name = "kgsl-2d0",
2882 .id = 0,
2883 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
2884 .resource = kgsl_2d0_resources,
2885 .dev = {
2886 .platform_data = &kgsl_2d0_pdata,
2887 },
2888};
2889
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002890static const char *kgsl_2d1_iommu_ctx_names[] = {
Jeremy Gebben5c4c1132012-02-27 11:26:49 -07002891 "gfx2d1_2d1",
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002892};
2893
2894static struct kgsl_device_iommu_data kgsl_2d1_iommu_data[] = {
2895 {
2896 .iommu_ctx_names = kgsl_2d1_iommu_ctx_names,
2897 .iommu_ctx_count = ARRAY_SIZE(kgsl_2d1_iommu_ctx_names),
2898 .physstart = 0x07E00000,
2899 .physend = 0x07E00000 + SZ_1M - 1,
2900 },
2901};
2902
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002903static struct resource kgsl_2d1_resources[] = {
2904 {
2905 .name = KGSL_2D1_REG_MEMORY,
2906 .start = 0x04200000, /* Z180 device 1 base address */
2907 .end = 0x04200FFF,
2908 .flags = IORESOURCE_MEM,
2909 },
2910 {
2911 .name = KGSL_2D1_IRQ,
2912 .start = GFX2D1_IRQ,
2913 .end = GFX2D1_IRQ,
2914 .flags = IORESOURCE_IRQ,
2915 },
2916};
2917
2918static struct kgsl_device_platform_data kgsl_2d1_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002919 .pwrlevel = {
2920 {
2921 .gpu_freq = 200000000,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002922 .bus_freq = 2,
2923 },
2924 {
2925 .gpu_freq = 96000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002926 .bus_freq = 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002927 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002928 {
Lucille Sylvester808eca22011-11-03 10:26:29 -07002929 .gpu_freq = 27000000,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002930 .bus_freq = 0,
2931 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002932 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002933 .init_level = 0,
Lucille Sylvester6e362412011-12-09 16:21:42 -07002934 .num_levels = ARRAY_SIZE(grp2d_freq) + 1,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002935 .set_grp_async = NULL,
Lucille Sylvester808eca22011-11-03 10:26:29 -07002936 .idle_timeout = HZ/5,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002937 .nap_allowed = true,
2938 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002939#ifdef CONFIG_MSM_BUS_SCALING
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06002940 .bus_scale_table = &grp2d1_bus_scale_pdata,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002941#endif
Jordan Crouse46cf4bb2012-02-21 08:54:52 -07002942 .iommu_data = kgsl_2d1_iommu_data,
2943 .iommu_count = ARRAY_SIZE(kgsl_2d1_iommu_data),
Lucille Sylvester6e362412011-12-09 16:21:42 -07002944 .core_info = &grp2d_core_info,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002945};
2946
2947struct platform_device msm_kgsl_2d1 = {
2948 .name = "kgsl-2d1",
2949 .id = 1,
2950 .num_resources = ARRAY_SIZE(kgsl_2d1_resources),
2951 .resource = kgsl_2d1_resources,
2952 .dev = {
2953 .platform_data = &kgsl_2d1_pdata,
2954 },
2955};
2956
2957#ifdef CONFIG_MSM_GEMINI
2958static struct resource msm_gemini_resources[] = {
2959 {
2960 .start = 0x04600000,
2961 .end = 0x04600000 + SZ_1M - 1,
2962 .flags = IORESOURCE_MEM,
2963 },
2964 {
2965 .start = JPEG_IRQ,
2966 .end = JPEG_IRQ,
2967 .flags = IORESOURCE_IRQ,
2968 },
2969};
2970
2971struct platform_device msm8960_gemini_device = {
2972 .name = "msm_gemini",
2973 .resource = msm_gemini_resources,
2974 .num_resources = ARRAY_SIZE(msm_gemini_resources),
2975};
2976#endif
2977
Praveen Chidambaram78499012011-11-01 17:15:17 -06002978struct msm_rpm_platform_data msm8960_rpm_data __initdata = {
2979 .reg_base_addrs = {
2980 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
2981 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
2982 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
2983 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
2984 },
2985 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
Stephen Boydf61255e2012-02-24 14:31:09 -08002986 .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ,
Praveen Chidambaram78499012011-11-01 17:15:17 -06002987 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
2988 .ipc_rpm_val = 4,
2989 .target_id = {
2990 MSM_RPM_MAP(8960, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
2991 MSM_RPM_MAP(8960, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
2992 MSM_RPM_MAP(8960, INVALIDATE_0, INVALIDATE, 8),
2993 MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
2994 MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
2995 MSM_RPM_MAP(8960, RPM_CTL, RPM_CTL, 1),
2996 MSM_RPM_MAP(8960, CXO_CLK, CXO_CLK, 1),
2997 MSM_RPM_MAP(8960, PXO_CLK, PXO_CLK, 1),
2998 MSM_RPM_MAP(8960, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
2999 MSM_RPM_MAP(8960, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
3000 MSM_RPM_MAP(8960, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
3001 MSM_RPM_MAP(8960, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
3002 MSM_RPM_MAP(8960, SFPB_CLK, SFPB_CLK, 1),
3003 MSM_RPM_MAP(8960, CFPB_CLK, CFPB_CLK, 1),
3004 MSM_RPM_MAP(8960, MMFPB_CLK, MMFPB_CLK, 1),
3005 MSM_RPM_MAP(8960, EBI1_CLK, EBI1_CLK, 1),
3006 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_HALT_0,
3007 APPS_FABRIC_CFG_HALT, 2),
3008 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_CLKMOD_0,
3009 APPS_FABRIC_CFG_CLKMOD, 3),
3010 MSM_RPM_MAP(8960, APPS_FABRIC_CFG_IOCTL,
3011 APPS_FABRIC_CFG_IOCTL, 1),
3012 MSM_RPM_MAP(8960, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
3013 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_HALT_0,
3014 SYS_FABRIC_CFG_HALT, 2),
3015 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_CLKMOD_0,
3016 SYS_FABRIC_CFG_CLKMOD, 3),
3017 MSM_RPM_MAP(8960, SYS_FABRIC_CFG_IOCTL,
3018 SYS_FABRIC_CFG_IOCTL, 1),
3019 MSM_RPM_MAP(8960, SYSTEM_FABRIC_ARB_0,
3020 SYSTEM_FABRIC_ARB, 29),
3021 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_HALT_0,
3022 MMSS_FABRIC_CFG_HALT, 2),
3023 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_CLKMOD_0,
3024 MMSS_FABRIC_CFG_CLKMOD, 3),
3025 MSM_RPM_MAP(8960, MMSS_FABRIC_CFG_IOCTL,
3026 MMSS_FABRIC_CFG_IOCTL, 1),
3027 MSM_RPM_MAP(8960, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23),
3028 MSM_RPM_MAP(8960, PM8921_S1_0, PM8921_S1, 2),
3029 MSM_RPM_MAP(8960, PM8921_S2_0, PM8921_S2, 2),
3030 MSM_RPM_MAP(8960, PM8921_S3_0, PM8921_S3, 2),
3031 MSM_RPM_MAP(8960, PM8921_S4_0, PM8921_S4, 2),
3032 MSM_RPM_MAP(8960, PM8921_S5_0, PM8921_S5, 2),
3033 MSM_RPM_MAP(8960, PM8921_S6_0, PM8921_S6, 2),
3034 MSM_RPM_MAP(8960, PM8921_S7_0, PM8921_S7, 2),
3035 MSM_RPM_MAP(8960, PM8921_S8_0, PM8921_S8, 2),
3036 MSM_RPM_MAP(8960, PM8921_L1_0, PM8921_L1, 2),
3037 MSM_RPM_MAP(8960, PM8921_L2_0, PM8921_L2, 2),
3038 MSM_RPM_MAP(8960, PM8921_L3_0, PM8921_L3, 2),
3039 MSM_RPM_MAP(8960, PM8921_L4_0, PM8921_L4, 2),
3040 MSM_RPM_MAP(8960, PM8921_L5_0, PM8921_L5, 2),
3041 MSM_RPM_MAP(8960, PM8921_L6_0, PM8921_L6, 2),
3042 MSM_RPM_MAP(8960, PM8921_L7_0, PM8921_L7, 2),
3043 MSM_RPM_MAP(8960, PM8921_L8_0, PM8921_L8, 2),
3044 MSM_RPM_MAP(8960, PM8921_L9_0, PM8921_L9, 2),
3045 MSM_RPM_MAP(8960, PM8921_L10_0, PM8921_L10, 2),
3046 MSM_RPM_MAP(8960, PM8921_L11_0, PM8921_L11, 2),
3047 MSM_RPM_MAP(8960, PM8921_L12_0, PM8921_L12, 2),
3048 MSM_RPM_MAP(8960, PM8921_L13_0, PM8921_L13, 2),
3049 MSM_RPM_MAP(8960, PM8921_L14_0, PM8921_L14, 2),
3050 MSM_RPM_MAP(8960, PM8921_L15_0, PM8921_L15, 2),
3051 MSM_RPM_MAP(8960, PM8921_L16_0, PM8921_L16, 2),
3052 MSM_RPM_MAP(8960, PM8921_L17_0, PM8921_L17, 2),
3053 MSM_RPM_MAP(8960, PM8921_L18_0, PM8921_L18, 2),
3054 MSM_RPM_MAP(8960, PM8921_L19_0, PM8921_L19, 2),
3055 MSM_RPM_MAP(8960, PM8921_L20_0, PM8921_L20, 2),
3056 MSM_RPM_MAP(8960, PM8921_L21_0, PM8921_L21, 2),
3057 MSM_RPM_MAP(8960, PM8921_L22_0, PM8921_L22, 2),
3058 MSM_RPM_MAP(8960, PM8921_L23_0, PM8921_L23, 2),
3059 MSM_RPM_MAP(8960, PM8921_L24_0, PM8921_L24, 2),
3060 MSM_RPM_MAP(8960, PM8921_L25_0, PM8921_L25, 2),
3061 MSM_RPM_MAP(8960, PM8921_L26_0, PM8921_L26, 2),
3062 MSM_RPM_MAP(8960, PM8921_L27_0, PM8921_L27, 2),
3063 MSM_RPM_MAP(8960, PM8921_L28_0, PM8921_L28, 2),
3064 MSM_RPM_MAP(8960, PM8921_L29_0, PM8921_L29, 2),
3065 MSM_RPM_MAP(8960, PM8921_CLK1_0, PM8921_CLK1, 2),
3066 MSM_RPM_MAP(8960, PM8921_CLK2_0, PM8921_CLK2, 2),
3067 MSM_RPM_MAP(8960, PM8921_LVS1, PM8921_LVS1, 1),
3068 MSM_RPM_MAP(8960, PM8921_LVS2, PM8921_LVS2, 1),
3069 MSM_RPM_MAP(8960, PM8921_LVS3, PM8921_LVS3, 1),
3070 MSM_RPM_MAP(8960, PM8921_LVS4, PM8921_LVS4, 1),
3071 MSM_RPM_MAP(8960, PM8921_LVS5, PM8921_LVS5, 1),
3072 MSM_RPM_MAP(8960, PM8921_LVS6, PM8921_LVS6, 1),
3073 MSM_RPM_MAP(8960, PM8921_LVS7, PM8921_LVS7, 1),
3074 MSM_RPM_MAP(8960, NCP_0, NCP, 2),
3075 MSM_RPM_MAP(8960, CXO_BUFFERS, CXO_BUFFERS, 1),
3076 MSM_RPM_MAP(8960, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
3077 MSM_RPM_MAP(8960, HDMI_SWITCH, HDMI_SWITCH, 1),
3078 MSM_RPM_MAP(8960, DDR_DMM_0, DDR_DMM, 2),
3079 MSM_RPM_MAP(8960, QDSS_CLK, QDSS_CLK, 1),
3080 },
3081 .target_status = {
3082 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MAJOR),
3083 MSM_RPM_STATUS_ID_MAP(8960, VERSION_MINOR),
3084 MSM_RPM_STATUS_ID_MAP(8960, VERSION_BUILD),
3085 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_0),
3086 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_1),
3087 MSM_RPM_STATUS_ID_MAP(8960, SUPPORTED_RESOURCES_2),
3088 MSM_RPM_STATUS_ID_MAP(8960, RESERVED_SUPPORTED_RESOURCES_0),
3089 MSM_RPM_STATUS_ID_MAP(8960, SEQUENCE),
3090 MSM_RPM_STATUS_ID_MAP(8960, RPM_CTL),
3091 MSM_RPM_STATUS_ID_MAP(8960, CXO_CLK),
3092 MSM_RPM_STATUS_ID_MAP(8960, PXO_CLK),
3093 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CLK),
3094 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_CLK),
3095 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_CLK),
3096 MSM_RPM_STATUS_ID_MAP(8960, DAYTONA_FABRIC_CLK),
3097 MSM_RPM_STATUS_ID_MAP(8960, SFPB_CLK),
3098 MSM_RPM_STATUS_ID_MAP(8960, CFPB_CLK),
3099 MSM_RPM_STATUS_ID_MAP(8960, MMFPB_CLK),
3100 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CLK),
3101 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_HALT),
3102 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_CLKMOD),
3103 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_CFG_IOCTL),
3104 MSM_RPM_STATUS_ID_MAP(8960, APPS_FABRIC_ARB),
3105 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_HALT),
3106 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_CLKMOD),
3107 MSM_RPM_STATUS_ID_MAP(8960, SYS_FABRIC_CFG_IOCTL),
3108 MSM_RPM_STATUS_ID_MAP(8960, SYSTEM_FABRIC_ARB),
3109 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_HALT),
3110 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_CLKMOD),
3111 MSM_RPM_STATUS_ID_MAP(8960, MMSS_FABRIC_CFG_IOCTL),
3112 MSM_RPM_STATUS_ID_MAP(8960, MM_FABRIC_ARB),
3113 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_0),
3114 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S1_1),
3115 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_0),
3116 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S2_1),
3117 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_0),
3118 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S3_1),
3119 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_0),
3120 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S4_1),
3121 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_0),
3122 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S5_1),
3123 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_0),
3124 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S6_1),
3125 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_0),
3126 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S7_1),
3127 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_0),
3128 MSM_RPM_STATUS_ID_MAP(8960, PM8921_S8_1),
3129 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_0),
3130 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L1_1),
3131 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_0),
3132 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L2_1),
3133 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_0),
3134 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L3_1),
3135 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_0),
3136 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L4_1),
3137 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_0),
3138 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L5_1),
3139 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_0),
3140 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L6_1),
3141 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_0),
3142 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L7_1),
3143 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_0),
3144 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L8_1),
3145 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_0),
3146 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L9_1),
3147 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_0),
3148 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L10_1),
3149 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_0),
3150 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L11_1),
3151 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_0),
3152 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L12_1),
3153 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_0),
3154 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L13_1),
3155 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_0),
3156 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L14_1),
3157 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_0),
3158 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L15_1),
3159 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_0),
3160 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L16_1),
3161 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_0),
3162 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L17_1),
3163 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_0),
3164 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L18_1),
3165 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_0),
3166 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L19_1),
3167 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_0),
3168 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L20_1),
3169 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_0),
3170 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L21_1),
3171 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_0),
3172 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L22_1),
3173 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_0),
3174 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L23_1),
3175 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_0),
3176 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L24_1),
3177 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_0),
3178 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L25_1),
3179 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_0),
3180 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L26_1),
3181 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_0),
3182 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L27_1),
3183 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_0),
3184 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L28_1),
3185 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_0),
3186 MSM_RPM_STATUS_ID_MAP(8960, PM8921_L29_1),
3187 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_0),
3188 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK1_1),
3189 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_0),
3190 MSM_RPM_STATUS_ID_MAP(8960, PM8921_CLK2_1),
3191 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS1),
3192 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS2),
3193 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS3),
3194 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS4),
3195 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS5),
3196 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS6),
3197 MSM_RPM_STATUS_ID_MAP(8960, PM8921_LVS7),
3198 MSM_RPM_STATUS_ID_MAP(8960, NCP_0),
3199 MSM_RPM_STATUS_ID_MAP(8960, NCP_1),
3200 MSM_RPM_STATUS_ID_MAP(8960, CXO_BUFFERS),
3201 MSM_RPM_STATUS_ID_MAP(8960, USB_OTG_SWITCH),
3202 MSM_RPM_STATUS_ID_MAP(8960, HDMI_SWITCH),
3203 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_0),
3204 MSM_RPM_STATUS_ID_MAP(8960, DDR_DMM_1),
3205 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH0_RANGE),
3206 MSM_RPM_STATUS_ID_MAP(8960, EBI1_CH1_RANGE),
3207 },
3208 .target_ctrl_id = {
3209 MSM_RPM_CTRL_MAP(8960, VERSION_MAJOR),
3210 MSM_RPM_CTRL_MAP(8960, VERSION_MINOR),
3211 MSM_RPM_CTRL_MAP(8960, VERSION_BUILD),
3212 MSM_RPM_CTRL_MAP(8960, REQ_CTX_0),
3213 MSM_RPM_CTRL_MAP(8960, REQ_SEL_0),
3214 MSM_RPM_CTRL_MAP(8960, ACK_CTX_0),
3215 MSM_RPM_CTRL_MAP(8960, ACK_SEL_0),
3216 },
3217 .sel_invalidate = MSM_RPM_8960_SEL_INVALIDATE,
3218 .sel_notification = MSM_RPM_8960_SEL_NOTIFICATION,
3219 .sel_last = MSM_RPM_8960_SEL_LAST,
3220 .ver = {3, 0, 0},
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003221};
Praveen Chidambaram8985b012011-12-16 13:38:59 -07003222
Praveen Chidambaram78499012011-11-01 17:15:17 -06003223struct platform_device msm8960_rpm_device = {
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003224 .name = "msm_rpm",
3225 .id = -1,
3226};
3227
Praveen Chidambaram78499012011-11-01 17:15:17 -06003228static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
3229 .phys_addr_base = 0x0010C000,
3230 .reg_offsets = {
3231 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
3232 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
3233 },
3234 .phys_size = SZ_8K,
3235 .log_len = 4096, /* log's buffer length in bytes */
3236 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
3237};
3238
3239struct platform_device msm8960_rpm_log_device = {
3240 .name = "msm_rpm_log",
3241 .id = -1,
3242 .dev = {
3243 .platform_data = &msm_rpm_log_pdata,
3244 },
3245};
3246
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003247static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
3248 .phys_addr_base = 0x0010D204,
3249 .phys_size = SZ_8K,
3250};
3251
Praveen Chidambaram78499012011-11-01 17:15:17 -06003252struct platform_device msm8960_rpm_stat_device = {
Praveen Chidambaram7a712232011-10-28 13:39:45 -06003253 .name = "msm_rpm_stat",
3254 .id = -1,
3255 .dev = {
3256 .platform_data = &msm_rpm_stat_pdata,
3257 },
3258};
Maheshkumar Sivasubramanian9c8cdc92011-09-12 14:11:30 -06003259
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003260struct platform_device msm_bus_sys_fabric = {
3261 .name = "msm_bus_fabric",
3262 .id = MSM_BUS_FAB_SYSTEM,
3263};
3264struct platform_device msm_bus_apps_fabric = {
3265 .name = "msm_bus_fabric",
3266 .id = MSM_BUS_FAB_APPSS,
3267};
3268struct platform_device msm_bus_mm_fabric = {
3269 .name = "msm_bus_fabric",
3270 .id = MSM_BUS_FAB_MMSS,
3271};
3272struct platform_device msm_bus_sys_fpb = {
3273 .name = "msm_bus_fabric",
3274 .id = MSM_BUS_FAB_SYSTEM_FPB,
3275};
3276struct platform_device msm_bus_cpss_fpb = {
3277 .name = "msm_bus_fabric",
3278 .id = MSM_BUS_FAB_CPSS_FPB,
3279};
3280
3281/* Sensors DSPS platform data */
3282#ifdef CONFIG_MSM_DSPS
3283
3284#define PPSS_REG_PHYS_BASE 0x12080000
3285
3286static struct dsps_clk_info dsps_clks[] = {};
3287static struct dsps_regulator_info dsps_regs[] = {};
3288
3289/*
3290 * Note: GPIOs field is intialized in run-time at the function
3291 * msm8960_init_dsps().
3292 */
3293
3294struct msm_dsps_platform_data msm_dsps_pdata = {
3295 .clks = dsps_clks,
3296 .clks_num = ARRAY_SIZE(dsps_clks),
3297 .gpios = NULL,
3298 .gpios_num = 0,
3299 .regs = dsps_regs,
3300 .regs_num = ARRAY_SIZE(dsps_regs),
3301 .dsps_pwr_ctl_en = 1,
3302 .signature = DSPS_SIGNATURE,
3303};
3304
3305static struct resource msm_dsps_resources[] = {
3306 {
3307 .start = PPSS_REG_PHYS_BASE,
3308 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
3309 .name = "ppss_reg",
3310 .flags = IORESOURCE_MEM,
3311 },
Wentao Xua55500b2011-08-16 18:15:04 -04003312
3313 {
3314 .start = PPSS_WDOG_TIMER_IRQ,
3315 .end = PPSS_WDOG_TIMER_IRQ,
3316 .name = "ppss_wdog",
3317 .flags = IORESOURCE_IRQ,
3318 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003319};
3320
3321struct platform_device msm_dsps_device = {
3322 .name = "msm_dsps",
3323 .id = 0,
3324 .num_resources = ARRAY_SIZE(msm_dsps_resources),
3325 .resource = msm_dsps_resources,
3326 .dev.platform_data = &msm_dsps_pdata,
3327};
3328
3329#endif /* CONFIG_MSM_DSPS */
Pratik Patel7831c082011-06-08 21:44:37 -07003330
3331#ifdef CONFIG_MSM_QDSS
3332
3333#define MSM_QDSS_PHYS_BASE 0x01A00000
3334#define MSM_ETB_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1000)
3335#define MSM_TPIU_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x3000)
3336#define MSM_FUNNEL_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x4000)
Pratik Patel492b3012012-03-06 14:22:30 -08003337#define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
Pratik Patel7831c082011-06-08 21:44:37 -07003338
Pratik Patel1403f2a2012-03-21 10:10:00 -07003339#define QDSS_SOURCE(src_name, fpm) { .name = src_name, .fport_mask = fpm, }
3340
3341static struct qdss_source msm_qdss_sources[] = {
3342 QDSS_SOURCE("msm_etm", 0x3),
3343};
3344
3345static struct msm_qdss_platform_data qdss_pdata = {
3346 .src_table = msm_qdss_sources,
3347 .size = ARRAY_SIZE(msm_qdss_sources),
3348 .afamily = 1,
3349};
3350
3351struct platform_device msm_qdss_device = {
3352 .name = "msm_qdss",
3353 .id = -1,
3354 .dev = {
3355 .platform_data = &qdss_pdata,
3356 },
3357};
3358
Pratik Patel7831c082011-06-08 21:44:37 -07003359static struct resource msm_etb_resources[] = {
3360 {
3361 .start = MSM_ETB_PHYS_BASE,
3362 .end = MSM_ETB_PHYS_BASE + SZ_4K - 1,
3363 .flags = IORESOURCE_MEM,
3364 },
3365};
3366
3367struct platform_device msm_etb_device = {
3368 .name = "msm_etb",
3369 .id = 0,
3370 .num_resources = ARRAY_SIZE(msm_etb_resources),
3371 .resource = msm_etb_resources,
3372};
3373
3374static struct resource msm_tpiu_resources[] = {
3375 {
3376 .start = MSM_TPIU_PHYS_BASE,
3377 .end = MSM_TPIU_PHYS_BASE + SZ_4K - 1,
3378 .flags = IORESOURCE_MEM,
3379 },
3380};
3381
3382struct platform_device msm_tpiu_device = {
3383 .name = "msm_tpiu",
3384 .id = 0,
3385 .num_resources = ARRAY_SIZE(msm_tpiu_resources),
3386 .resource = msm_tpiu_resources,
3387};
3388
3389static struct resource msm_funnel_resources[] = {
3390 {
3391 .start = MSM_FUNNEL_PHYS_BASE,
3392 .end = MSM_FUNNEL_PHYS_BASE + SZ_4K - 1,
3393 .flags = IORESOURCE_MEM,
3394 },
3395};
3396
3397struct platform_device msm_funnel_device = {
3398 .name = "msm_funnel",
3399 .id = 0,
3400 .num_resources = ARRAY_SIZE(msm_funnel_resources),
3401 .resource = msm_funnel_resources,
3402};
3403
Pratik Patel492b3012012-03-06 14:22:30 -08003404static struct resource msm_etm_resources[] = {
Pratik Patel7831c082011-06-08 21:44:37 -07003405 {
Pratik Patel492b3012012-03-06 14:22:30 -08003406 .start = MSM_ETM_PHYS_BASE,
3407 .end = MSM_ETM_PHYS_BASE + (SZ_4K * 2) - 1,
Pratik Patel7831c082011-06-08 21:44:37 -07003408 .flags = IORESOURCE_MEM,
3409 },
3410};
3411
Pratik Patel492b3012012-03-06 14:22:30 -08003412struct platform_device msm_etm_device = {
3413 .name = "msm_etm",
Pratik Patel7831c082011-06-08 21:44:37 -07003414 .id = 0,
Pratik Patel492b3012012-03-06 14:22:30 -08003415 .num_resources = ARRAY_SIZE(msm_etm_resources),
3416 .resource = msm_etm_resources,
Pratik Patel7831c082011-06-08 21:44:37 -07003417};
3418
3419#endif
Praveen Chidambaram8ea3dcd2011-12-07 14:46:31 -07003420
3421static int msm8960_LPM_latency = 1000; /* >100 usec for WFI */
3422
3423struct platform_device msm8960_cpu_idle_device = {
3424 .name = "msm_cpu_idle",
3425 .id = -1,
3426 .dev = {
3427 .platform_data = &msm8960_LPM_latency,
3428 },
3429};
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -07003430
3431static struct msm_dcvs_freq_entry msm8960_freq[] = {
3432 { 384000, 166981, 345600},
3433 { 702000, 213049, 632502},
3434 {1026000, 285712, 925613},
3435 {1242000, 383945, 1176550},
3436 {1458000, 419729, 1465478},
3437 {1512000, 434116, 1546674},
3438
3439};
3440
3441static struct msm_dcvs_core_info msm8960_core_info = {
3442 .freq_tbl = &msm8960_freq[0],
3443 .core_param = {
3444 .max_time_us = 100000,
3445 .num_freq = ARRAY_SIZE(msm8960_freq),
3446 },
3447 .algo_param = {
3448 .slack_time_us = 58000,
3449 .scale_slack_time = 0,
3450 .scale_slack_time_pct = 0,
3451 .disable_pc_threshold = 1458000,
3452 .em_window_size = 100000,
3453 .em_max_util_pct = 97,
3454 .ss_window_size = 1000000,
3455 .ss_util_pct = 95,
3456 .ss_iobusy_conv = 100,
3457 },
3458};
3459
3460struct platform_device msm8960_msm_gov_device = {
3461 .name = "msm_dcvs_gov",
3462 .id = -1,
3463 .dev = {
3464 .platform_data = &msm8960_core_info,
3465 },
3466};
Stepan Moskovchenko28662c52012-03-01 12:48:45 -08003467
3468static struct resource msm_cache_erp_resources[] = {
3469 {
3470 .name = "l1_irq",
3471 .start = SC_SICCPUXEXTFAULTIRPTREQ,
3472 .flags = IORESOURCE_IRQ,
3473 },
3474 {
3475 .name = "l2_irq",
3476 .start = APCC_QGICL2IRPTREQ,
3477 .flags = IORESOURCE_IRQ,
3478 }
3479};
3480
3481struct platform_device msm8960_device_cache_erp = {
3482 .name = "msm_cache_erp",
3483 .id = -1,
3484 .num_resources = ARRAY_SIZE(msm_cache_erp_resources),
3485 .resource = msm_cache_erp_resources,
3486};