blob: b7d1bc863ce006a2b3eadb86ed5fc948bcc322dc [file] [log] [blame]
Manu Gautam5143b252012-01-05 19:25:23 -08001/* 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>
18#include <linux/clkdev.h>
Hemant Kumard86c4882012-01-24 19:39:37 -080019#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020#include <mach/irqs-8064.h>
21#include <mach/board.h>
22#include <mach/msm_iomap.h>
Yan He06913ce2011-08-26 16:33:46 -070023#include <mach/usbdiag.h>
24#include <mach/msm_sps.h>
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -070025#include <mach/dma.h>
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -080026#include <sound/msm-dai-q6.h>
27#include <sound/apr_audio.h>
Gagan Mac8a7a5d32011-11-11 16:43:06 -070028#include <mach/msm_bus_board.h>
Praveen Chidambaram78499012011-11-01 17:15:17 -060029#include <mach/rpm.h>
Joel Kingdacbc822012-01-25 13:30:57 -080030#include <mach/mdm2.h>
Mohan Kumar Gubbihalli Lachma Naik7f72edd2012-02-06 17:26:47 -080031#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070032#include "clock.h"
33#include "devices.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070034#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060035#include "rpm_stats.h"
36#include "rpm_log.h"
37#include "mpm.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070038
39/* Address of GSBI blocks */
Stepan Moskovchenko2701a442011-08-19 13:47:22 -070040#define MSM_GSBI1_PHYS 0x12440000
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070041#define MSM_GSBI3_PHYS 0x16200000
Harini Jayaramanc4c58692011-07-19 14:50:10 -060042#define MSM_GSBI4_PHYS 0x16300000
43#define MSM_GSBI5_PHYS 0x1A200000
44#define MSM_GSBI6_PHYS 0x16500000
45#define MSM_GSBI7_PHYS 0x16600000
46
Kenneth Heitke748593a2011-07-15 15:45:11 -060047/* GSBI UART devices */
Stepan Moskovchenko2701a442011-08-19 13:47:22 -070048#define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070049#define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000)
Jin Hong4bbbfba2012-02-02 21:48:07 -080050#define MSM_UART7DM_PHYS (MSM_GSBI7_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070051
Harini Jayaramanc4c58692011-07-19 14:50:10 -060052/* GSBI QUP devices */
53#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
54#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
55#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
56#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
57#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
58#define MSM_QUP_SIZE SZ_4K
59
Kenneth Heitke36920d32011-07-20 16:44:30 -060060/* Address of SSBI CMD */
61#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
62#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
63#define MSM_PMIC_SSBI_SIZE SZ_4K
Harini Jayaramanc4c58692011-07-19 14:50:10 -060064
Hemant Kumarcaa09092011-07-30 00:26:33 -070065/* Address of HS USBOTG1 */
Hemant Kumard86c4882012-01-24 19:39:37 -080066#define MSM_HSUSB1_PHYS 0x12500000
67#define MSM_HSUSB1_SIZE SZ_4K
Hemant Kumarcaa09092011-07-30 00:26:33 -070068
Jeff Ohlstein7e668552011-10-06 16:17:25 -070069static struct msm_watchdog_pdata msm_watchdog_pdata = {
70 .pet_time = 10000,
71 .bark_time = 11000,
72 .has_secure = true,
Joel Kinge7ca6f72012-02-09 20:51:25 -080073 .needs_expired_enable = true,
Jeff Ohlstein7e668552011-10-06 16:17:25 -070074};
75
76struct platform_device msm8064_device_watchdog = {
77 .name = "msm_watchdog",
78 .id = -1,
79 .dev = {
80 .platform_data = &msm_watchdog_pdata,
81 },
82};
83
Joel King0581896d2011-07-19 16:43:28 -070084static struct resource msm_dmov_resource[] = {
85 {
Jeff Ohlstein4af72692011-11-07 15:59:17 -080086 .start = ADM_0_SCSS_1_IRQ,
Joel King0581896d2011-07-19 16:43:28 -070087 .flags = IORESOURCE_IRQ,
88 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -070089 {
Jeff Ohlstein4af72692011-11-07 15:59:17 -080090 .start = 0x18320000,
91 .end = 0x18320000 + SZ_1M - 1,
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -070092 .flags = IORESOURCE_MEM,
93 },
94};
95
96static struct msm_dmov_pdata msm_dmov_pdata = {
Jeff Ohlstein4af72692011-11-07 15:59:17 -080097 .sd = 1,
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -070098 .sd_size = 0x800,
Joel King0581896d2011-07-19 16:43:28 -070099};
100
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700101struct platform_device apq8064_device_dmov = {
Joel King0581896d2011-07-19 16:43:28 -0700102 .name = "msm_dmov",
103 .id = -1,
104 .resource = msm_dmov_resource,
105 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700106 .dev = {
107 .platform_data = &msm_dmov_pdata,
108 },
Joel King0581896d2011-07-19 16:43:28 -0700109};
110
Stepan Moskovchenko2701a442011-08-19 13:47:22 -0700111static struct resource resources_uart_gsbi1[] = {
112 {
113 .start = APQ8064_GSBI1_UARTDM_IRQ,
114 .end = APQ8064_GSBI1_UARTDM_IRQ,
115 .flags = IORESOURCE_IRQ,
116 },
117 {
118 .start = MSM_UART1DM_PHYS,
119 .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1,
120 .name = "uartdm_resource",
121 .flags = IORESOURCE_MEM,
122 },
123 {
124 .start = MSM_GSBI1_PHYS,
125 .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1,
126 .name = "gsbi_resource",
127 .flags = IORESOURCE_MEM,
128 },
129};
130
131struct platform_device apq8064_device_uart_gsbi1 = {
132 .name = "msm_serial_hsl",
Jin Hong4bbbfba2012-02-02 21:48:07 -0800133 .id = 1,
Stepan Moskovchenko2701a442011-08-19 13:47:22 -0700134 .num_resources = ARRAY_SIZE(resources_uart_gsbi1),
135 .resource = resources_uart_gsbi1,
136};
137
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700138static struct resource resources_uart_gsbi3[] = {
139 {
140 .start = GSBI3_UARTDM_IRQ,
141 .end = GSBI3_UARTDM_IRQ,
142 .flags = IORESOURCE_IRQ,
143 },
144 {
145 .start = MSM_UART3DM_PHYS,
146 .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1,
147 .name = "uartdm_resource",
148 .flags = IORESOURCE_MEM,
149 },
150 {
151 .start = MSM_GSBI3_PHYS,
152 .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1,
153 .name = "gsbi_resource",
154 .flags = IORESOURCE_MEM,
155 },
156};
157
158struct platform_device apq8064_device_uart_gsbi3 = {
159 .name = "msm_serial_hsl",
160 .id = 0,
161 .num_resources = ARRAY_SIZE(resources_uart_gsbi3),
162 .resource = resources_uart_gsbi3,
163};
164
Jing Lin04601f92012-02-05 15:36:07 -0800165static struct resource resources_qup_i2c_gsbi3[] = {
166 {
167 .name = "gsbi_qup_i2c_addr",
168 .start = MSM_GSBI3_PHYS,
169 .end = MSM_GSBI3_PHYS + 4 - 1,
170 .flags = IORESOURCE_MEM,
171 },
172 {
173 .name = "qup_phys_addr",
174 .start = MSM_GSBI3_QUP_PHYS,
175 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
176 .flags = IORESOURCE_MEM,
177 },
178 {
179 .name = "qup_err_intr",
180 .start = GSBI3_QUP_IRQ,
181 .end = GSBI3_QUP_IRQ,
182 .flags = IORESOURCE_IRQ,
183 },
184 {
185 .name = "i2c_clk",
186 .start = 9,
187 .end = 9,
188 .flags = IORESOURCE_IO,
189 },
190 {
191 .name = "i2c_sda",
192 .start = 8,
193 .end = 8,
194 .flags = IORESOURCE_IO,
195 },
196};
197
198struct platform_device apq8064_device_qup_i2c_gsbi3 = {
199 .name = "qup_i2c",
200 .id = 3,
201 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
202 .resource = resources_qup_i2c_gsbi3,
203};
204
Kenneth Heitke748593a2011-07-15 15:45:11 -0600205static struct resource resources_qup_i2c_gsbi4[] = {
206 {
207 .name = "gsbi_qup_i2c_addr",
208 .start = MSM_GSBI4_PHYS,
Harini Jayaramane1554a92011-09-15 14:43:02 -0600209 .end = MSM_GSBI4_PHYS + 4 - 1,
Kenneth Heitke748593a2011-07-15 15:45:11 -0600210 .flags = IORESOURCE_MEM,
211 },
212 {
213 .name = "qup_phys_addr",
214 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramane1554a92011-09-15 14:43:02 -0600215 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Kenneth Heitke748593a2011-07-15 15:45:11 -0600216 .flags = IORESOURCE_MEM,
217 },
218 {
219 .name = "qup_err_intr",
220 .start = GSBI4_QUP_IRQ,
221 .end = GSBI4_QUP_IRQ,
222 .flags = IORESOURCE_IRQ,
223 },
Kevin Chand07220e2012-02-13 15:52:22 -0800224 {
225 .name = "i2c_clk",
226 .start = 11,
227 .end = 11,
228 .flags = IORESOURCE_IO,
229 },
230 {
231 .name = "i2c_sda",
232 .start = 10,
233 .end = 10,
234 .flags = IORESOURCE_IO,
235 },
Kenneth Heitke748593a2011-07-15 15:45:11 -0600236};
237
238struct platform_device apq8064_device_qup_i2c_gsbi4 = {
239 .name = "qup_i2c",
240 .id = 4,
241 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
242 .resource = resources_qup_i2c_gsbi4,
243};
244
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700245static struct resource resources_qup_spi_gsbi5[] = {
246 {
247 .name = "spi_base",
248 .start = MSM_GSBI5_QUP_PHYS,
249 .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1,
250 .flags = IORESOURCE_MEM,
251 },
252 {
253 .name = "gsbi_base",
254 .start = MSM_GSBI5_PHYS,
255 .end = MSM_GSBI5_PHYS + 4 - 1,
256 .flags = IORESOURCE_MEM,
257 },
258 {
259 .name = "spi_irq_in",
260 .start = GSBI5_QUP_IRQ,
261 .end = GSBI5_QUP_IRQ,
262 .flags = IORESOURCE_IRQ,
263 },
264};
265
266struct platform_device apq8064_device_qup_spi_gsbi5 = {
267 .name = "spi_qsd",
268 .id = 0,
269 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5),
270 .resource = resources_qup_spi_gsbi5,
271};
272
Jin Hong4bbbfba2012-02-02 21:48:07 -0800273static struct resource resources_uart_gsbi7[] = {
274 {
275 .start = GSBI7_UARTDM_IRQ,
276 .end = GSBI7_UARTDM_IRQ,
277 .flags = IORESOURCE_IRQ,
278 },
279 {
280 .start = MSM_UART7DM_PHYS,
281 .end = MSM_UART7DM_PHYS + PAGE_SIZE - 1,
282 .name = "uartdm_resource",
283 .flags = IORESOURCE_MEM,
284 },
285 {
286 .start = MSM_GSBI7_PHYS,
287 .end = MSM_GSBI7_PHYS + PAGE_SIZE - 1,
288 .name = "gsbi_resource",
289 .flags = IORESOURCE_MEM,
290 },
291};
292
293struct platform_device apq8064_device_uart_gsbi7 = {
294 .name = "msm_serial_hsl",
295 .id = 0,
296 .num_resources = ARRAY_SIZE(resources_uart_gsbi7),
297 .resource = resources_uart_gsbi7,
298};
299
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800300struct platform_device apq_pcm = {
301 .name = "msm-pcm-dsp",
302 .id = -1,
303};
304
305struct platform_device apq_pcm_routing = {
306 .name = "msm-pcm-routing",
307 .id = -1,
308};
309
310struct platform_device apq_cpudai0 = {
311 .name = "msm-dai-q6",
312 .id = 0x4000,
313};
314
315struct platform_device apq_cpudai1 = {
316 .name = "msm-dai-q6",
317 .id = 0x4001,
318};
319
320struct platform_device apq_cpudai_hdmi_rx = {
Swaminathan Sathappanfd9dbad2012-02-15 16:56:44 -0800321 .name = "msm-dai-q6-hdmi",
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800322 .id = 8,
323};
324
325struct platform_device apq_cpudai_bt_rx = {
326 .name = "msm-dai-q6",
327 .id = 0x3000,
328};
329
330struct platform_device apq_cpudai_bt_tx = {
331 .name = "msm-dai-q6",
332 .id = 0x3001,
333};
334
335struct platform_device apq_cpudai_fm_rx = {
336 .name = "msm-dai-q6",
337 .id = 0x3004,
338};
339
340struct platform_device apq_cpudai_fm_tx = {
341 .name = "msm-dai-q6",
342 .id = 0x3005,
343};
344
345/*
346 * Machine specific data for AUX PCM Interface
347 * which the driver will be unware of.
348 */
349struct msm_dai_auxpcm_pdata apq_auxpcm_rx_pdata = {
350 .clk = "pcm_clk",
351 .mode = AFE_PCM_CFG_MODE_PCM,
352 .sync = AFE_PCM_CFG_SYNC_INT,
353 .frame = AFE_PCM_CFG_FRM_256BPF,
354 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
355 .slot = 0,
356 .data = AFE_PCM_CFG_CDATAOE_MASTER,
357 .pcm_clk_rate = 2048000,
358};
359
360struct platform_device apq_cpudai_auxpcm_rx = {
361 .name = "msm-dai-q6",
362 .id = 2,
363 .dev = {
364 .platform_data = &apq_auxpcm_rx_pdata,
365 },
366};
367
368struct platform_device apq_cpudai_auxpcm_tx = {
369 .name = "msm-dai-q6",
370 .id = 3,
371};
372
373struct platform_device apq_cpu_fe = {
374 .name = "msm-dai-fe",
375 .id = -1,
376};
377
378struct platform_device apq_stub_codec = {
379 .name = "msm-stub-codec",
380 .id = 1,
381};
382
383struct platform_device apq_voice = {
384 .name = "msm-pcm-voice",
385 .id = -1,
386};
387
388struct platform_device apq_voip = {
389 .name = "msm-voip-dsp",
390 .id = -1,
391};
392
393struct platform_device apq_lpa_pcm = {
394 .name = "msm-pcm-lpa",
395 .id = -1,
396};
397
398struct platform_device apq_pcm_hostless = {
399 .name = "msm-pcm-hostless",
400 .id = -1,
401};
402
403struct platform_device apq_cpudai_afe_01_rx = {
404 .name = "msm-dai-q6",
405 .id = 0xE0,
406};
407
408struct platform_device apq_cpudai_afe_01_tx = {
409 .name = "msm-dai-q6",
410 .id = 0xF0,
411};
412
413struct platform_device apq_cpudai_afe_02_rx = {
414 .name = "msm-dai-q6",
415 .id = 0xF1,
416};
417
418struct platform_device apq_cpudai_afe_02_tx = {
419 .name = "msm-dai-q6",
420 .id = 0xE1,
421};
422
423struct platform_device apq_pcm_afe = {
424 .name = "msm-pcm-afe",
425 .id = -1,
426};
427
Neema Shetty8427c262012-02-16 11:23:43 -0800428struct platform_device apq_cpudai_stub = {
429 .name = "msm-dai-stub",
430 .id = -1,
431};
432
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700433static struct resource resources_ssbi_pmic1[] = {
434 {
435 .start = MSM_PMIC1_SSBI_CMD_PHYS,
436 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
437 .flags = IORESOURCE_MEM,
438 },
439};
440
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -0600441#define LPASS_SLIMBUS_PHYS 0x28080000
442#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Swaminathan Sathappan2316e082012-02-03 14:07:17 -0800443#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -0600444/* Board info for the slimbus slave device */
445static struct resource slimbus_res[] = {
446 {
447 .start = LPASS_SLIMBUS_PHYS,
448 .end = LPASS_SLIMBUS_PHYS + 8191,
449 .flags = IORESOURCE_MEM,
450 .name = "slimbus_physical",
451 },
452 {
453 .start = LPASS_SLIMBUS_BAM_PHYS,
454 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
455 .flags = IORESOURCE_MEM,
456 .name = "slimbus_bam_physical",
457 },
458 {
Swaminathan Sathappan2316e082012-02-03 14:07:17 -0800459 .start = LPASS_SLIMBUS_SLEW,
460 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
461 .flags = IORESOURCE_MEM,
462 .name = "slimbus_slew_reg",
463 },
464 {
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -0600465 .start = SLIMBUS0_CORE_EE1_IRQ,
466 .end = SLIMBUS0_CORE_EE1_IRQ,
467 .flags = IORESOURCE_IRQ,
468 .name = "slimbus_irq",
469 },
470 {
471 .start = SLIMBUS0_BAM_EE1_IRQ,
472 .end = SLIMBUS0_BAM_EE1_IRQ,
473 .flags = IORESOURCE_IRQ,
474 .name = "slimbus_bam_irq",
475 },
476};
477
478struct platform_device apq8064_slim_ctrl = {
479 .name = "msm_slim_ctrl",
480 .id = 1,
481 .num_resources = ARRAY_SIZE(slimbus_res),
482 .resource = slimbus_res,
483 .dev = {
484 .coherent_dma_mask = 0xffffffffULL,
485 },
486};
487
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700488struct platform_device apq8064_device_ssbi_pmic1 = {
489 .name = "msm_ssbi",
490 .id = 0,
491 .resource = resources_ssbi_pmic1,
492 .num_resources = ARRAY_SIZE(resources_ssbi_pmic1),
493};
494
495static struct resource resources_ssbi_pmic2[] = {
496 {
497 .start = MSM_PMIC2_SSBI_CMD_PHYS,
498 .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
499 .flags = IORESOURCE_MEM,
500 },
501};
502
503struct platform_device apq8064_device_ssbi_pmic2 = {
504 .name = "msm_ssbi",
505 .id = 1,
506 .resource = resources_ssbi_pmic2,
507 .num_resources = ARRAY_SIZE(resources_ssbi_pmic2),
508};
509
510static struct resource resources_otg[] = {
511 {
Hemant Kumard86c4882012-01-24 19:39:37 -0800512 .start = MSM_HSUSB1_PHYS,
513 .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700514 .flags = IORESOURCE_MEM,
515 },
516 {
517 .start = USB1_HS_IRQ,
518 .end = USB1_HS_IRQ,
519 .flags = IORESOURCE_IRQ,
520 },
521};
522
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700523struct platform_device apq8064_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700524 .name = "msm_otg",
525 .id = -1,
526 .num_resources = ARRAY_SIZE(resources_otg),
527 .resource = resources_otg,
528 .dev = {
529 .coherent_dma_mask = 0xffffffff,
530 },
531};
532
533static struct resource resources_hsusb[] = {
534 {
Hemant Kumard86c4882012-01-24 19:39:37 -0800535 .start = MSM_HSUSB1_PHYS,
536 .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700537 .flags = IORESOURCE_MEM,
538 },
539 {
540 .start = USB1_HS_IRQ,
541 .end = USB1_HS_IRQ,
542 .flags = IORESOURCE_IRQ,
543 },
544};
545
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700546struct platform_device apq8064_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700547 .name = "msm_hsusb",
548 .id = -1,
549 .num_resources = ARRAY_SIZE(resources_hsusb),
550 .resource = resources_hsusb,
551 .dev = {
552 .coherent_dma_mask = 0xffffffff,
553 },
554};
555
Hemant Kumard86c4882012-01-24 19:39:37 -0800556static struct resource resources_hsusb_host[] = {
557 {
558 .start = MSM_HSUSB1_PHYS,
559 .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1,
560 .flags = IORESOURCE_MEM,
561 },
562 {
563 .start = USB1_HS_IRQ,
564 .end = USB1_HS_IRQ,
565 .flags = IORESOURCE_IRQ,
566 },
567};
568
Hemant Kumara945b472012-01-25 15:08:06 -0800569static struct resource resources_hsic_host[] = {
570 {
571 .start = 0x12510000,
572 .end = 0x12510000 + SZ_4K - 1,
573 .flags = IORESOURCE_MEM,
574 },
575 {
576 .start = USB2_HSIC_IRQ,
577 .end = USB2_HSIC_IRQ,
578 .flags = IORESOURCE_IRQ,
579 },
580 {
581 .start = MSM_GPIO_TO_INT(49),
582 .end = MSM_GPIO_TO_INT(49),
583 .name = "peripheral_status_irq",
584 .flags = IORESOURCE_IRQ,
585 },
586};
587
Hemant Kumard86c4882012-01-24 19:39:37 -0800588static u64 dma_mask = DMA_BIT_MASK(32);
589struct platform_device apq8064_device_hsusb_host = {
590 .name = "msm_hsusb_host",
591 .id = -1,
592 .num_resources = ARRAY_SIZE(resources_hsusb_host),
593 .resource = resources_hsusb_host,
594 .dev = {
595 .dma_mask = &dma_mask,
596 .coherent_dma_mask = 0xffffffff,
597 },
598};
599
Hemant Kumara945b472012-01-25 15:08:06 -0800600struct platform_device apq8064_device_hsic_host = {
601 .name = "msm_hsic_host",
602 .id = -1,
603 .num_resources = ARRAY_SIZE(resources_hsic_host),
604 .resource = resources_hsic_host,
605 .dev = {
606 .dma_mask = &dma_mask,
607 .coherent_dma_mask = DMA_BIT_MASK(32),
608 },
609};
610
Mohan Kumar Gubbihalli Lachma Naik7f72edd2012-02-06 17:26:47 -0800611/* MSM Video core device */
612#ifdef CONFIG_MSM_BUS_SCALING
613static struct msm_bus_vectors vidc_init_vectors[] = {
614 {
615 .src = MSM_BUS_MASTER_VIDEO_ENC,
616 .dst = MSM_BUS_SLAVE_EBI_CH0,
617 .ab = 0,
618 .ib = 0,
619 },
620 {
621 .src = MSM_BUS_MASTER_VIDEO_DEC,
622 .dst = MSM_BUS_SLAVE_EBI_CH0,
623 .ab = 0,
624 .ib = 0,
625 },
626 {
627 .src = MSM_BUS_MASTER_AMPSS_M0,
628 .dst = MSM_BUS_SLAVE_EBI_CH0,
629 .ab = 0,
630 .ib = 0,
631 },
632 {
633 .src = MSM_BUS_MASTER_AMPSS_M0,
634 .dst = MSM_BUS_SLAVE_EBI_CH0,
635 .ab = 0,
636 .ib = 0,
637 },
638};
639static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
640 {
641 .src = MSM_BUS_MASTER_VIDEO_ENC,
642 .dst = MSM_BUS_SLAVE_EBI_CH0,
643 .ab = 54525952,
644 .ib = 436207616,
645 },
646 {
647 .src = MSM_BUS_MASTER_VIDEO_DEC,
648 .dst = MSM_BUS_SLAVE_EBI_CH0,
649 .ab = 72351744,
650 .ib = 289406976,
651 },
652 {
653 .src = MSM_BUS_MASTER_AMPSS_M0,
654 .dst = MSM_BUS_SLAVE_EBI_CH0,
655 .ab = 500000,
656 .ib = 1000000,
657 },
658 {
659 .src = MSM_BUS_MASTER_AMPSS_M0,
660 .dst = MSM_BUS_SLAVE_EBI_CH0,
661 .ab = 500000,
662 .ib = 1000000,
663 },
664};
665static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
666 {
667 .src = MSM_BUS_MASTER_VIDEO_ENC,
668 .dst = MSM_BUS_SLAVE_EBI_CH0,
669 .ab = 40894464,
670 .ib = 327155712,
671 },
672 {
673 .src = MSM_BUS_MASTER_VIDEO_DEC,
674 .dst = MSM_BUS_SLAVE_EBI_CH0,
675 .ab = 48234496,
676 .ib = 192937984,
677 },
678 {
679 .src = MSM_BUS_MASTER_AMPSS_M0,
680 .dst = MSM_BUS_SLAVE_EBI_CH0,
681 .ab = 500000,
682 .ib = 2000000,
683 },
684 {
685 .src = MSM_BUS_MASTER_AMPSS_M0,
686 .dst = MSM_BUS_SLAVE_EBI_CH0,
687 .ab = 500000,
688 .ib = 2000000,
689 },
690};
691static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
692 {
693 .src = MSM_BUS_MASTER_VIDEO_ENC,
694 .dst = MSM_BUS_SLAVE_EBI_CH0,
695 .ab = 163577856,
696 .ib = 1308622848,
697 },
698 {
699 .src = MSM_BUS_MASTER_VIDEO_DEC,
700 .dst = MSM_BUS_SLAVE_EBI_CH0,
701 .ab = 219152384,
702 .ib = 876609536,
703 },
704 {
705 .src = MSM_BUS_MASTER_AMPSS_M0,
706 .dst = MSM_BUS_SLAVE_EBI_CH0,
707 .ab = 1750000,
708 .ib = 3500000,
709 },
710 {
711 .src = MSM_BUS_MASTER_AMPSS_M0,
712 .dst = MSM_BUS_SLAVE_EBI_CH0,
713 .ab = 1750000,
714 .ib = 3500000,
715 },
716};
717static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
718 {
719 .src = MSM_BUS_MASTER_VIDEO_ENC,
720 .dst = MSM_BUS_SLAVE_EBI_CH0,
721 .ab = 121634816,
722 .ib = 973078528,
723 },
724 {
725 .src = MSM_BUS_MASTER_VIDEO_DEC,
726 .dst = MSM_BUS_SLAVE_EBI_CH0,
727 .ab = 155189248,
728 .ib = 620756992,
729 },
730 {
731 .src = MSM_BUS_MASTER_AMPSS_M0,
732 .dst = MSM_BUS_SLAVE_EBI_CH0,
733 .ab = 1750000,
734 .ib = 7000000,
735 },
736 {
737 .src = MSM_BUS_MASTER_AMPSS_M0,
738 .dst = MSM_BUS_SLAVE_EBI_CH0,
739 .ab = 1750000,
740 .ib = 7000000,
741 },
742};
743static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
744 {
745 .src = MSM_BUS_MASTER_VIDEO_ENC,
746 .dst = MSM_BUS_SLAVE_EBI_CH0,
747 .ab = 372244480,
748 .ib = 2560000000U,
749 },
750 {
751 .src = MSM_BUS_MASTER_VIDEO_DEC,
752 .dst = MSM_BUS_SLAVE_EBI_CH0,
753 .ab = 501219328,
754 .ib = 2560000000U,
755 },
756 {
757 .src = MSM_BUS_MASTER_AMPSS_M0,
758 .dst = MSM_BUS_SLAVE_EBI_CH0,
759 .ab = 2500000,
760 .ib = 5000000,
761 },
762 {
763 .src = MSM_BUS_MASTER_AMPSS_M0,
764 .dst = MSM_BUS_SLAVE_EBI_CH0,
765 .ab = 2500000,
766 .ib = 5000000,
767 },
768};
769static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
770 {
771 .src = MSM_BUS_MASTER_VIDEO_ENC,
772 .dst = MSM_BUS_SLAVE_EBI_CH0,
773 .ab = 222298112,
774 .ib = 2560000000U,
775 },
776 {
777 .src = MSM_BUS_MASTER_VIDEO_DEC,
778 .dst = MSM_BUS_SLAVE_EBI_CH0,
779 .ab = 330301440,
780 .ib = 2560000000U,
781 },
782 {
783 .src = MSM_BUS_MASTER_AMPSS_M0,
784 .dst = MSM_BUS_SLAVE_EBI_CH0,
785 .ab = 2500000,
786 .ib = 700000000,
787 },
788 {
789 .src = MSM_BUS_MASTER_AMPSS_M0,
790 .dst = MSM_BUS_SLAVE_EBI_CH0,
791 .ab = 2500000,
792 .ib = 10000000,
793 },
794};
795
796static struct msm_bus_paths vidc_bus_client_config[] = {
797 {
798 ARRAY_SIZE(vidc_init_vectors),
799 vidc_init_vectors,
800 },
801 {
802 ARRAY_SIZE(vidc_venc_vga_vectors),
803 vidc_venc_vga_vectors,
804 },
805 {
806 ARRAY_SIZE(vidc_vdec_vga_vectors),
807 vidc_vdec_vga_vectors,
808 },
809 {
810 ARRAY_SIZE(vidc_venc_720p_vectors),
811 vidc_venc_720p_vectors,
812 },
813 {
814 ARRAY_SIZE(vidc_vdec_720p_vectors),
815 vidc_vdec_720p_vectors,
816 },
817 {
818 ARRAY_SIZE(vidc_venc_1080p_vectors),
819 vidc_venc_1080p_vectors,
820 },
821 {
822 ARRAY_SIZE(vidc_vdec_1080p_vectors),
823 vidc_vdec_1080p_vectors,
824 },
825};
826
827static struct msm_bus_scale_pdata vidc_bus_client_data = {
828 vidc_bus_client_config,
829 ARRAY_SIZE(vidc_bus_client_config),
830 .name = "vidc",
831};
832#endif
833
834
835#define APQ8064_VIDC_BASE_PHYS 0x04400000
836#define APQ8064_VIDC_BASE_SIZE 0x00100000
837
838static struct resource apq8064_device_vidc_resources[] = {
839 {
840 .start = APQ8064_VIDC_BASE_PHYS,
841 .end = APQ8064_VIDC_BASE_PHYS + APQ8064_VIDC_BASE_SIZE - 1,
842 .flags = IORESOURCE_MEM,
843 },
844 {
845 .start = VCODEC_IRQ,
846 .end = VCODEC_IRQ,
847 .flags = IORESOURCE_IRQ,
848 },
849};
850
851struct msm_vidc_platform_data apq8064_vidc_platform_data = {
852#ifdef CONFIG_MSM_BUS_SCALING
853 .vidc_bus_client_pdata = &vidc_bus_client_data,
854#endif
855#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
856 .memtype = ION_CP_MM_HEAP_ID,
857 .enable_ion = 1,
858#else
859 .memtype = MEMTYPE_EBI1,
860 .enable_ion = 0,
861#endif
862 .disable_dmx = 0,
863 .disable_fullhd = 0,
864};
865
866struct platform_device apq8064_msm_device_vidc = {
867 .name = "msm_vidc",
868 .id = 0,
869 .num_resources = ARRAY_SIZE(apq8064_device_vidc_resources),
870 .resource = apq8064_device_vidc_resources,
871 .dev = {
872 .platform_data = &apq8064_vidc_platform_data,
873 },
874};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700875#define MSM_SDC1_BASE 0x12400000
876#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
877#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
878#define MSM_SDC2_BASE 0x12140000
879#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
880#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
881#define MSM_SDC3_BASE 0x12180000
882#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
883#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
884#define MSM_SDC4_BASE 0x121C0000
885#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
886#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
887
888static struct resource resources_sdc1[] = {
889 {
890 .name = "core_mem",
891 .flags = IORESOURCE_MEM,
892 .start = MSM_SDC1_BASE,
893 .end = MSM_SDC1_DML_BASE - 1,
894 },
895 {
896 .name = "core_irq",
897 .flags = IORESOURCE_IRQ,
898 .start = SDC1_IRQ_0,
899 .end = SDC1_IRQ_0
900 },
901#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
902 {
903 .name = "sdcc_dml_addr",
904 .start = MSM_SDC1_DML_BASE,
905 .end = MSM_SDC1_BAM_BASE - 1,
906 .flags = IORESOURCE_MEM,
907 },
908 {
909 .name = "sdcc_bam_addr",
910 .start = MSM_SDC1_BAM_BASE,
911 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
912 .flags = IORESOURCE_MEM,
913 },
914 {
915 .name = "sdcc_bam_irq",
916 .start = SDC1_BAM_IRQ,
917 .end = SDC1_BAM_IRQ,
918 .flags = IORESOURCE_IRQ,
919 },
920#endif
921};
922
923static struct resource resources_sdc2[] = {
924 {
925 .name = "core_mem",
926 .flags = IORESOURCE_MEM,
927 .start = MSM_SDC2_BASE,
928 .end = MSM_SDC2_DML_BASE - 1,
929 },
930 {
931 .name = "core_irq",
932 .flags = IORESOURCE_IRQ,
933 .start = SDC2_IRQ_0,
934 .end = SDC2_IRQ_0
935 },
936#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
937 {
938 .name = "sdcc_dml_addr",
939 .start = MSM_SDC2_DML_BASE,
940 .end = MSM_SDC2_BAM_BASE - 1,
941 .flags = IORESOURCE_MEM,
942 },
943 {
944 .name = "sdcc_bam_addr",
945 .start = MSM_SDC2_BAM_BASE,
946 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
947 .flags = IORESOURCE_MEM,
948 },
949 {
950 .name = "sdcc_bam_irq",
951 .start = SDC2_BAM_IRQ,
952 .end = SDC2_BAM_IRQ,
953 .flags = IORESOURCE_IRQ,
954 },
955#endif
956};
957
958static struct resource resources_sdc3[] = {
959 {
960 .name = "core_mem",
961 .flags = IORESOURCE_MEM,
962 .start = MSM_SDC3_BASE,
963 .end = MSM_SDC3_DML_BASE - 1,
964 },
965 {
966 .name = "core_irq",
967 .flags = IORESOURCE_IRQ,
968 .start = SDC3_IRQ_0,
969 .end = SDC3_IRQ_0
970 },
971#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
972 {
973 .name = "sdcc_dml_addr",
974 .start = MSM_SDC3_DML_BASE,
975 .end = MSM_SDC3_BAM_BASE - 1,
976 .flags = IORESOURCE_MEM,
977 },
978 {
979 .name = "sdcc_bam_addr",
980 .start = MSM_SDC3_BAM_BASE,
981 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
982 .flags = IORESOURCE_MEM,
983 },
984 {
985 .name = "sdcc_bam_irq",
986 .start = SDC3_BAM_IRQ,
987 .end = SDC3_BAM_IRQ,
988 .flags = IORESOURCE_IRQ,
989 },
990#endif
991};
992
993static struct resource resources_sdc4[] = {
994 {
995 .name = "core_mem",
996 .flags = IORESOURCE_MEM,
997 .start = MSM_SDC4_BASE,
998 .end = MSM_SDC4_DML_BASE - 1,
999 },
1000 {
1001 .name = "core_irq",
1002 .flags = IORESOURCE_IRQ,
1003 .start = SDC4_IRQ_0,
1004 .end = SDC4_IRQ_0
1005 },
1006#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
1007 {
1008 .name = "sdcc_dml_addr",
1009 .start = MSM_SDC4_DML_BASE,
1010 .end = MSM_SDC4_BAM_BASE - 1,
1011 .flags = IORESOURCE_MEM,
1012 },
1013 {
1014 .name = "sdcc_bam_addr",
1015 .start = MSM_SDC4_BAM_BASE,
1016 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
1017 .flags = IORESOURCE_MEM,
1018 },
1019 {
1020 .name = "sdcc_bam_irq",
1021 .start = SDC4_BAM_IRQ,
1022 .end = SDC4_BAM_IRQ,
1023 .flags = IORESOURCE_IRQ,
1024 },
1025#endif
1026};
1027
1028struct platform_device apq8064_device_sdc1 = {
1029 .name = "msm_sdcc",
1030 .id = 1,
1031 .num_resources = ARRAY_SIZE(resources_sdc1),
1032 .resource = resources_sdc1,
1033 .dev = {
1034 .coherent_dma_mask = 0xffffffff,
1035 },
1036};
1037
1038struct platform_device apq8064_device_sdc2 = {
1039 .name = "msm_sdcc",
1040 .id = 2,
1041 .num_resources = ARRAY_SIZE(resources_sdc2),
1042 .resource = resources_sdc2,
1043 .dev = {
1044 .coherent_dma_mask = 0xffffffff,
1045 },
1046};
1047
1048struct platform_device apq8064_device_sdc3 = {
1049 .name = "msm_sdcc",
1050 .id = 3,
1051 .num_resources = ARRAY_SIZE(resources_sdc3),
1052 .resource = resources_sdc3,
1053 .dev = {
1054 .coherent_dma_mask = 0xffffffff,
1055 },
1056};
1057
1058struct platform_device apq8064_device_sdc4 = {
1059 .name = "msm_sdcc",
1060 .id = 4,
1061 .num_resources = ARRAY_SIZE(resources_sdc4),
1062 .resource = resources_sdc4,
1063 .dev = {
1064 .coherent_dma_mask = 0xffffffff,
1065 },
1066};
1067
1068static struct platform_device *apq8064_sdcc_devices[] __initdata = {
1069 &apq8064_device_sdc1,
1070 &apq8064_device_sdc2,
1071 &apq8064_device_sdc3,
1072 &apq8064_device_sdc4,
1073};
1074
1075int __init apq8064_add_sdcc(unsigned int controller,
1076 struct mmc_platform_data *plat)
1077{
1078 struct platform_device *pdev;
1079
1080 if (!plat)
1081 return 0;
1082 if (controller < 1 || controller > 4)
1083 return -EINVAL;
1084
1085 pdev = apq8064_sdcc_devices[controller-1];
1086 pdev->dev.platform_data = plat;
1087 return platform_device_register(pdev);
1088}
1089
Yan He06913ce2011-08-26 16:33:46 -07001090static struct resource resources_sps[] = {
1091 {
1092 .name = "pipe_mem",
1093 .start = 0x12800000,
1094 .end = 0x12800000 + 0x4000 - 1,
1095 .flags = IORESOURCE_MEM,
1096 },
1097 {
1098 .name = "bamdma_dma",
1099 .start = 0x12240000,
1100 .end = 0x12240000 + 0x1000 - 1,
1101 .flags = IORESOURCE_MEM,
1102 },
1103 {
1104 .name = "bamdma_bam",
1105 .start = 0x12244000,
1106 .end = 0x12244000 + 0x4000 - 1,
1107 .flags = IORESOURCE_MEM,
1108 },
1109 {
1110 .name = "bamdma_irq",
1111 .start = SPS_BAM_DMA_IRQ,
1112 .end = SPS_BAM_DMA_IRQ,
1113 .flags = IORESOURCE_IRQ,
1114 },
1115};
1116
Gagan Mac8a7a5d32011-11-11 16:43:06 -07001117struct platform_device msm_bus_8064_sys_fabric = {
1118 .name = "msm_bus_fabric",
1119 .id = MSM_BUS_FAB_SYSTEM,
1120};
1121struct platform_device msm_bus_8064_apps_fabric = {
1122 .name = "msm_bus_fabric",
1123 .id = MSM_BUS_FAB_APPSS,
1124};
1125struct platform_device msm_bus_8064_mm_fabric = {
1126 .name = "msm_bus_fabric",
1127 .id = MSM_BUS_FAB_MMSS,
1128};
1129struct platform_device msm_bus_8064_sys_fpb = {
1130 .name = "msm_bus_fabric",
1131 .id = MSM_BUS_FAB_SYSTEM_FPB,
1132};
1133struct platform_device msm_bus_8064_cpss_fpb = {
1134 .name = "msm_bus_fabric",
1135 .id = MSM_BUS_FAB_CPSS_FPB,
1136};
1137
Yan He06913ce2011-08-26 16:33:46 -07001138static struct msm_sps_platform_data msm_sps_pdata = {
1139 .bamdma_restricted_pipes = 0x06,
1140};
1141
1142struct platform_device msm_device_sps_apq8064 = {
1143 .name = "msm_sps",
1144 .id = -1,
1145 .num_resources = ARRAY_SIZE(resources_sps),
1146 .resource = resources_sps,
1147 .dev.platform_data = &msm_sps_pdata,
1148};
1149
Jeff Hugo0c0f5e92011-09-28 13:55:45 -06001150struct platform_device msm_device_smd_apq8064 = {
1151 .name = "msm_smd",
1152 .id = -1,
1153};
1154
Ramesh Masavarapuf46be1b2011-11-03 11:13:41 -07001155#ifdef CONFIG_HW_RANDOM_MSM
1156/* PRNG device */
1157#define MSM_PRNG_PHYS 0x1A500000
1158static struct resource rng_resources = {
1159 .flags = IORESOURCE_MEM,
1160 .start = MSM_PRNG_PHYS,
1161 .end = MSM_PRNG_PHYS + SZ_512 - 1,
1162};
1163
1164struct platform_device apq8064_device_rng = {
1165 .name = "msm_rng",
1166 .id = 0,
1167 .num_resources = 1,
1168 .resource = &rng_resources,
1169};
1170#endif
1171
Matt Wagantall292aace2012-01-26 19:12:34 -08001172static struct resource msm_gss_resources[] = {
1173 {
1174 .start = 0x10000000,
1175 .end = 0x10000000 + SZ_256 - 1,
1176 .flags = IORESOURCE_MEM,
1177 },
Matt Wagantall19ac4fd2012-02-03 20:18:23 -08001178 {
1179 .start = 0x10008000,
1180 .end = 0x10008000 + SZ_256 - 1,
1181 .flags = IORESOURCE_MEM,
1182 },
Matt Wagantall292aace2012-01-26 19:12:34 -08001183};
1184
1185struct platform_device msm_gss = {
1186 .name = "pil_gss",
1187 .id = -1,
1188 .num_resources = ARRAY_SIZE(msm_gss_resources),
1189 .resource = msm_gss_resources,
1190};
1191
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001192static struct clk_lookup msm_clocks_8064_dummy[] = {
1193 CLK_DUMMY("pll2", PLL2, NULL, 0),
1194 CLK_DUMMY("pll8", PLL8, NULL, 0),
1195 CLK_DUMMY("pll4", PLL4, NULL, 0),
1196
1197 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1198 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1199 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1200 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1201 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1202 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1203 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1204 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1205 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1206 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1207 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1208 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1209 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1210 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1211 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1212 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1213
Matt Wagantalle2522372011-08-17 14:52:21 -07001214 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1215 CLK_DUMMY("core_clk", GSBI2_UART_CLK, NULL, OFF),
1216 CLK_DUMMY("core_clk", GSBI3_UART_CLK,
Jing Lin04601f92012-02-05 15:36:07 -08001217 NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001218 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1219 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1220 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1221 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1222 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1223 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1224 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1225 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1226 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001227 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, NULL, OFF),
1228 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
Jing Lin04601f92012-02-05 15:36:07 -08001229 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, "qup_i2c.3", OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001230 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1231 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, "spi_qsd.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001232 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1233 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001234 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001235 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Ramesh Masavarapuf46be1b2011-11-03 11:13:41 -07001236 CLK_DUMMY("core_clk", PRNG_CLK, "msm_rng.0", OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001237 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1238 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1239 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1240 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001241 CLK_DUMMY("ref_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001242 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08001243 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1244 CLK_DUMMY("alt_core_clk", USB_HS3_XCVR_CLK, NULL, OFF),
1245 CLK_DUMMY("alt_core_clk", USB_HS4_XCVR_CLK, NULL, OFF),
1246 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
1247 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1248 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1249 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001250 CLK_DUMMY("core_clk", CE2_CLK, NULL, OFF),
1251 CLK_DUMMY("core_clk", CE1_CORE_CLK, NULL, OFF),
1252 CLK_DUMMY("core_clk", CE3_CORE_CLK, NULL, OFF),
1253 CLK_DUMMY("iface_clk", CE3_P_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001254 CLK_DUMMY("pcie_pclk", PCIE_P_CLK, NULL, OFF),
1255 CLK_DUMMY("pcie_alt_ref_clk", PCIE_ALT_REF_CLK, NULL, OFF),
1256 CLK_DUMMY("sata_rxoob_clk", SATA_RXOOB_CLK, NULL, OFF),
1257 CLK_DUMMY("sata_pmalive_clk", SATA_PMALIVE_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001258 CLK_DUMMY("ref_clk", SATA_PHY_REF_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001259 CLK_DUMMY("iface_clk", GSBI1_P_CLK, NULL, OFF),
1260 CLK_DUMMY("iface_clk", GSBI2_P_CLK, NULL, OFF),
Jing Lin04601f92012-02-05 15:36:07 -08001261 CLK_DUMMY("iface_clk", GSBI3_P_CLK, "qup_i2c.3", OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001262 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
1263 CLK_DUMMY("iface_clk", GSBI5_P_CLK, "spi_qsd.0", OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001264 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001265 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001266 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08001267 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
1268 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
1269 CLK_DUMMY("iface_clk", USB_HS3_P_CLK, NULL, OFF),
1270 CLK_DUMMY("iface_clk", USB_HS4_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001271 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1272 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1273 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1274 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
Jin Hong01f2dbb2011-11-03 22:13:51 -07001275 CLK_DUMMY("core_clk", ADM0_CLK, "msm_dmov", OFF),
1276 CLK_DUMMY("iface_clk", ADM0_P_CLK, "msm_dmov", OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001277 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1278 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1279 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1280 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1281 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001282 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1283 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1284 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1285 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1286 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1287 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1288 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1289 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1290 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1291 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1292 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1293 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, NULL, OFF),
1294 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, NULL, OFF),
1295 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, NULL, OFF),
1296 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001297 CLK_DUMMY("core_clk", VCAP_CLK, NULL, OFF),
1298 CLK_DUMMY("npl_clk", VCAP_NPL_CLK, NULL, OFF),
Pu Chen86b4be92011-11-03 17:27:57 -07001299 CLK_DUMMY("core_clk", GFX3D_CLK, "kgsl-3d0.0", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001300 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001301 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001302 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001303 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1304 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1305 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001306 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001307 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001308 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001309 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001310 CLK_DUMMY("rgb_tv_clk", RGB_TV_CLK, NULL, OFF),
1311 CLK_DUMMY("npl_tv_clk", NPL_TV_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001312 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
Matt Wagantall5a4f1ba2011-08-18 18:13:03 -07001313 CLK_DUMMY("core_clk", HDMI_APP_CLK, "hdmi_msm.1", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001314 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1315 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1316 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1317 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1318 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1319 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001320 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001321 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1322 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1323 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1324 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001325 CLK_DUMMY("bus_clk", GFX3D_AXI_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001326 CLK_DUMMY("vcap_axi_clk", VCAP_AXI_CLK, NULL, OFF),
1327 CLK_DUMMY("vcap_ahb_clk", VCAP_AHB_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001328 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1329 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1330 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, NULL, OFF),
1331 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, NULL, OFF),
1332 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, NULL, OFF),
1333 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001334 CLK_DUMMY("lvds_clk", LVDS_CLK, NULL, OFF),
1335 CLK_DUMMY("mdp_p2clk", MDP_P2CLK, NULL, OFF),
1336 CLK_DUMMY("dsi2_pixel_clk", DSI2_PIXEL_CLK, NULL, OFF),
1337 CLK_DUMMY("lvds_ref_clk", LVDS_REF_CLK, NULL, OFF),
Pu Chen86b4be92011-11-03 17:27:57 -07001338 CLK_DUMMY("iface_clk", GFX3D_P_CLK, "kgsl-3d0.0", OFF),
Matt Wagantall5a4f1ba2011-08-18 18:13:03 -07001339 CLK_DUMMY("master_iface_clk", HDMI_M_P_CLK, "hdmi_msm.1", OFF),
1340 CLK_DUMMY("slave_iface_clk", HDMI_S_P_CLK, "hdmi_msm.1", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001341 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1342 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001343 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001344 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001345 CLK_DUMMY("iface_clk", SMMU_P_CLK, "msm_smmu", OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001346 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001347 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1348 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1349 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1350 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1351 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1352 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1353 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1354 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1355 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1356 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1357 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1358 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1359 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1360 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Tianyi Gou142b8db2011-09-21 18:01:54 -07001361 CLK_DUMMY("audio_slimbus_clk", AUDIO_SLIMBUS_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001362
1363 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08001364 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001365 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, NULL, 0),
1366 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, NULL, 0),
1367 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, NULL, 0),
1368 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001369 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1370 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
Jin Hong01f2dbb2011-11-03 22:13:51 -07001371 CLK_DUMMY("mem_clk", EBI1_ADM_CLK, "msm_dmov", 0),
Ramesh Masavarapu28311912011-10-27 11:04:12 -07001372 CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qce.0", OFF),
1373 CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qcrypto.0", OFF),
1374 CLK_DUMMY("core_clk", CE3_CORE_CLK, "qce.0", OFF),
1375 CLK_DUMMY("core_clk", CE3_CORE_CLK, "qcrypto.0", OFF),
1376 CLK_DUMMY("iface_clk", CE3_P_CLK, "qce0.0", OFF),
1377 CLK_DUMMY("iface_clk", CE3_P_CLK, "qcrypto.0", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001378};
1379
Stephen Boydbb600ae2011-08-02 20:11:40 -07001380struct clock_init_data apq8064_dummy_clock_init_data __initdata = {
1381 .table = msm_clocks_8064_dummy,
1382 .size = ARRAY_SIZE(msm_clocks_8064_dummy),
1383};
Praveen Chidambaram78499012011-11-01 17:15:17 -06001384
1385struct msm_rpm_platform_data apq8064_rpm_data __initdata = {
1386 .reg_base_addrs = {
1387 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
1388 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
1389 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
1390 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
1391 },
1392 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
1393 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
1394 .ipc_rpm_val = 4,
1395 .target_id = {
1396 MSM_RPM_MAP(8064, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
1397 MSM_RPM_MAP(8064, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
1398 MSM_RPM_MAP(8064, INVALIDATE_0, INVALIDATE, 8),
1399 MSM_RPM_MAP(8064, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
1400 MSM_RPM_MAP(8064, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
1401 MSM_RPM_MAP(8064, RPM_CTL, RPM_CTL, 1),
1402 MSM_RPM_MAP(8064, CXO_CLK, CXO_CLK, 1),
1403 MSM_RPM_MAP(8064, PXO_CLK, PXO_CLK, 1),
1404 MSM_RPM_MAP(8064, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
1405 MSM_RPM_MAP(8064, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
1406 MSM_RPM_MAP(8064, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
1407 MSM_RPM_MAP(8064, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
1408 MSM_RPM_MAP(8064, SFPB_CLK, SFPB_CLK, 1),
1409 MSM_RPM_MAP(8064, CFPB_CLK, CFPB_CLK, 1),
1410 MSM_RPM_MAP(8064, MMFPB_CLK, MMFPB_CLK, 1),
1411 MSM_RPM_MAP(8064, EBI1_CLK, EBI1_CLK, 1),
1412 MSM_RPM_MAP(8064, APPS_FABRIC_CFG_HALT_0,
1413 APPS_FABRIC_CFG_HALT, 2),
1414 MSM_RPM_MAP(8064, APPS_FABRIC_CFG_CLKMOD_0,
1415 APPS_FABRIC_CFG_CLKMOD, 3),
1416 MSM_RPM_MAP(8064, APPS_FABRIC_CFG_IOCTL,
1417 APPS_FABRIC_CFG_IOCTL, 1),
1418 MSM_RPM_MAP(8064, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
1419 MSM_RPM_MAP(8064, SYS_FABRIC_CFG_HALT_0,
1420 SYS_FABRIC_CFG_HALT, 2),
1421 MSM_RPM_MAP(8064, SYS_FABRIC_CFG_CLKMOD_0,
1422 SYS_FABRIC_CFG_CLKMOD, 3),
1423 MSM_RPM_MAP(8064, SYS_FABRIC_CFG_IOCTL,
1424 SYS_FABRIC_CFG_IOCTL, 1),
1425 MSM_RPM_MAP(8064, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 30),
1426 MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_HALT_0,
1427 MMSS_FABRIC_CFG_HALT, 2),
1428 MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_CLKMOD_0,
1429 MMSS_FABRIC_CFG_CLKMOD, 3),
1430 MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_IOCTL,
1431 MMSS_FABRIC_CFG_IOCTL, 1),
1432 MSM_RPM_MAP(8064, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 21),
1433 MSM_RPM_MAP(8064, PM8921_S1_0, PM8921_S1, 2),
1434 MSM_RPM_MAP(8064, PM8921_S2_0, PM8921_S2, 2),
1435 MSM_RPM_MAP(8064, PM8921_S3_0, PM8921_S3, 2),
1436 MSM_RPM_MAP(8064, PM8921_S4_0, PM8921_S4, 2),
1437 MSM_RPM_MAP(8064, PM8921_S5_0, PM8921_S5, 2),
1438 MSM_RPM_MAP(8064, PM8921_S6_0, PM8921_S6, 2),
1439 MSM_RPM_MAP(8064, PM8921_S7_0, PM8921_S7, 2),
1440 MSM_RPM_MAP(8064, PM8921_S8_0, PM8921_S8, 2),
1441 MSM_RPM_MAP(8064, PM8921_L1_0, PM8921_L1, 2),
1442 MSM_RPM_MAP(8064, PM8921_L2_0, PM8921_L2, 2),
1443 MSM_RPM_MAP(8064, PM8921_L3_0, PM8921_L3, 2),
1444 MSM_RPM_MAP(8064, PM8921_L4_0, PM8921_L4, 2),
1445 MSM_RPM_MAP(8064, PM8921_L5_0, PM8921_L5, 2),
1446 MSM_RPM_MAP(8064, PM8921_L6_0, PM8921_L6, 2),
1447 MSM_RPM_MAP(8064, PM8921_L7_0, PM8921_L7, 2),
1448 MSM_RPM_MAP(8064, PM8921_L8_0, PM8921_L8, 2),
1449 MSM_RPM_MAP(8064, PM8921_L9_0, PM8921_L9, 2),
1450 MSM_RPM_MAP(8064, PM8921_L10_0, PM8921_L10, 2),
1451 MSM_RPM_MAP(8064, PM8921_L11_0, PM8921_L11, 2),
1452 MSM_RPM_MAP(8064, PM8921_L12_0, PM8921_L12, 2),
1453 MSM_RPM_MAP(8064, PM8921_L13_0, PM8921_L13, 2),
1454 MSM_RPM_MAP(8064, PM8921_L14_0, PM8921_L14, 2),
1455 MSM_RPM_MAP(8064, PM8921_L15_0, PM8921_L15, 2),
1456 MSM_RPM_MAP(8064, PM8921_L16_0, PM8921_L16, 2),
1457 MSM_RPM_MAP(8064, PM8921_L17_0, PM8921_L17, 2),
1458 MSM_RPM_MAP(8064, PM8921_L18_0, PM8921_L18, 2),
1459 MSM_RPM_MAP(8064, PM8921_L19_0, PM8921_L19, 2),
1460 MSM_RPM_MAP(8064, PM8921_L20_0, PM8921_L20, 2),
1461 MSM_RPM_MAP(8064, PM8921_L21_0, PM8921_L21, 2),
1462 MSM_RPM_MAP(8064, PM8921_L22_0, PM8921_L22, 2),
1463 MSM_RPM_MAP(8064, PM8921_L23_0, PM8921_L23, 2),
1464 MSM_RPM_MAP(8064, PM8921_L24_0, PM8921_L24, 2),
1465 MSM_RPM_MAP(8064, PM8921_L25_0, PM8921_L25, 2),
1466 MSM_RPM_MAP(8064, PM8921_L26_0, PM8921_L26, 2),
1467 MSM_RPM_MAP(8064, PM8921_L27_0, PM8921_L27, 2),
1468 MSM_RPM_MAP(8064, PM8921_L28_0, PM8921_L28, 2),
1469 MSM_RPM_MAP(8064, PM8921_L29_0, PM8921_L29, 2),
1470 MSM_RPM_MAP(8064, PM8921_CLK1_0, PM8921_CLK1, 2),
1471 MSM_RPM_MAP(8064, PM8921_CLK2_0, PM8921_CLK2, 2),
1472 MSM_RPM_MAP(8064, PM8921_LVS1, PM8921_LVS1, 1),
1473 MSM_RPM_MAP(8064, PM8921_LVS2, PM8921_LVS2, 1),
1474 MSM_RPM_MAP(8064, PM8921_LVS3, PM8921_LVS3, 1),
1475 MSM_RPM_MAP(8064, PM8921_LVS4, PM8921_LVS4, 1),
1476 MSM_RPM_MAP(8064, PM8921_LVS5, PM8921_LVS5, 1),
1477 MSM_RPM_MAP(8064, PM8921_LVS6, PM8921_LVS6, 1),
1478 MSM_RPM_MAP(8064, PM8921_LVS7, PM8921_LVS7, 1),
1479 MSM_RPM_MAP(8064, PM8821_S1_0, PM8821_S1, 2),
1480 MSM_RPM_MAP(8064, PM8821_S2_0, PM8821_S2, 2),
1481 MSM_RPM_MAP(8064, PM8821_L1_0, PM8821_L1, 2),
1482 MSM_RPM_MAP(8064, NCP_0, NCP, 2),
1483 MSM_RPM_MAP(8064, CXO_BUFFERS, CXO_BUFFERS, 1),
1484 MSM_RPM_MAP(8064, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
1485 MSM_RPM_MAP(8064, HDMI_SWITCH, HDMI_SWITCH, 1),
1486 MSM_RPM_MAP(8064, DDR_DMM_0, DDR_DMM, 2),
1487 MSM_RPM_MAP(8064, QDSS_CLK, QDSS_CLK, 1),
1488 },
1489 .target_status = {
1490 MSM_RPM_STATUS_ID_MAP(8064, VERSION_MAJOR),
1491 MSM_RPM_STATUS_ID_MAP(8064, VERSION_MINOR),
1492 MSM_RPM_STATUS_ID_MAP(8064, VERSION_BUILD),
1493 MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_0),
1494 MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_1),
1495 MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_2),
1496 MSM_RPM_STATUS_ID_MAP(8064, RESERVED_SUPPORTED_RESOURCES_0),
1497 MSM_RPM_STATUS_ID_MAP(8064, SEQUENCE),
1498 MSM_RPM_STATUS_ID_MAP(8064, RPM_CTL),
1499 MSM_RPM_STATUS_ID_MAP(8064, CXO_CLK),
1500 MSM_RPM_STATUS_ID_MAP(8064, PXO_CLK),
1501 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CLK),
1502 MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_CLK),
1503 MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_CLK),
1504 MSM_RPM_STATUS_ID_MAP(8064, DAYTONA_FABRIC_CLK),
1505 MSM_RPM_STATUS_ID_MAP(8064, SFPB_CLK),
1506 MSM_RPM_STATUS_ID_MAP(8064, CFPB_CLK),
1507 MSM_RPM_STATUS_ID_MAP(8064, MMFPB_CLK),
1508 MSM_RPM_STATUS_ID_MAP(8064, EBI1_CLK),
1509 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_HALT),
1510 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_CLKMOD),
1511 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_IOCTL),
1512 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_ARB),
1513 MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_HALT),
1514 MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_CLKMOD),
1515 MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_IOCTL),
1516 MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_ARB),
1517 MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_HALT),
1518 MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_CLKMOD),
1519 MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_IOCTL),
1520 MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_ARB),
1521 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_0),
1522 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_1),
1523 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_0),
1524 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_1),
1525 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_0),
1526 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_1),
1527 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_0),
1528 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_1),
1529 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_0),
1530 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_1),
1531 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_0),
1532 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_1),
1533 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_0),
1534 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_1),
1535 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_0),
1536 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_1),
1537 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_0),
1538 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_1),
1539 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_0),
1540 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_1),
1541 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_0),
1542 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_1),
1543 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_0),
1544 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_1),
1545 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_0),
1546 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_1),
1547 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_0),
1548 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_1),
1549 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_0),
1550 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_1),
1551 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_0),
1552 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_1),
1553 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_0),
1554 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_1),
1555 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_0),
1556 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_1),
1557 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_0),
1558 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_1),
1559 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_0),
1560 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_1),
1561 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_0),
1562 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_1),
1563 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_0),
1564 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_1),
1565 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_0),
1566 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_1),
1567 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_0),
1568 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_1),
1569 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_0),
1570 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_1),
1571 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_0),
1572 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_1),
1573 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_0),
1574 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_1),
1575 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_0),
1576 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_1),
1577 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_0),
1578 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_1),
1579 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_0),
1580 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_1),
1581 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_0),
1582 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_1),
1583 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_0),
1584 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_1),
1585 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_0),
1586 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_1),
1587 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_0),
1588 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_1),
1589 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_0),
1590 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_1),
1591 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_0),
1592 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_1),
1593 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_0),
1594 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_1),
1595 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_0),
1596 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_1),
1597 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_0),
1598 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_1),
1599 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS1),
1600 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS2),
1601 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS3),
1602 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS4),
1603 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS5),
1604 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS6),
1605 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS7),
1606 MSM_RPM_STATUS_ID_MAP(8064, NCP_0),
1607 MSM_RPM_STATUS_ID_MAP(8064, NCP_1),
1608 MSM_RPM_STATUS_ID_MAP(8064, CXO_BUFFERS),
1609 MSM_RPM_STATUS_ID_MAP(8064, USB_OTG_SWITCH),
1610 MSM_RPM_STATUS_ID_MAP(8064, HDMI_SWITCH),
1611 MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_0),
1612 MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_1),
1613 MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH0_RANGE),
1614 MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH1_RANGE),
1615 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_0),
1616 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_1),
1617 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_0),
1618 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_1),
1619 MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_0),
1620 MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_1),
1621 },
1622 .target_ctrl_id = {
1623 MSM_RPM_CTRL_MAP(8064, VERSION_MAJOR),
1624 MSM_RPM_CTRL_MAP(8064, VERSION_MINOR),
1625 MSM_RPM_CTRL_MAP(8064, VERSION_BUILD),
1626 MSM_RPM_CTRL_MAP(8064, REQ_CTX_0),
1627 MSM_RPM_CTRL_MAP(8064, REQ_SEL_0),
1628 MSM_RPM_CTRL_MAP(8064, ACK_CTX_0),
1629 MSM_RPM_CTRL_MAP(8064, ACK_SEL_0),
1630 },
1631 .sel_invalidate = MSM_RPM_8064_SEL_INVALIDATE,
1632 .sel_notification = MSM_RPM_8064_SEL_NOTIFICATION,
1633 .sel_last = MSM_RPM_8064_SEL_LAST,
1634 .ver = {3, 0, 0},
1635};
1636
1637struct platform_device apq8064_rpm_device = {
1638 .name = "msm_rpm",
1639 .id = -1,
1640};
1641
1642static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
1643 .phys_addr_base = 0x0010D204,
1644 .phys_size = SZ_8K,
1645};
1646
1647struct platform_device apq8064_rpm_stat_device = {
1648 .name = "msm_rpm_stat",
1649 .id = -1,
1650 .dev = {
1651 .platform_data = &msm_rpm_stat_pdata,
1652 },
1653};
1654
1655static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
1656 .phys_addr_base = 0x0010C000,
1657 .reg_offsets = {
1658 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
1659 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
1660 },
1661 .phys_size = SZ_8K,
1662 .log_len = 4096, /* log's buffer length in bytes */
1663 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
1664};
1665
1666struct platform_device apq8064_rpm_log_device = {
1667 .name = "msm_rpm_log",
1668 .id = -1,
1669 .dev = {
1670 .platform_data = &msm_rpm_log_pdata,
1671 },
1672};
1673
1674#ifdef CONFIG_MSM_MPM
1675static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
1676 [1] = MSM_GPIO_TO_INT(26),
1677 [2] = MSM_GPIO_TO_INT(88),
1678 [4] = MSM_GPIO_TO_INT(73),
1679 [5] = MSM_GPIO_TO_INT(74),
1680 [6] = MSM_GPIO_TO_INT(75),
1681 [7] = MSM_GPIO_TO_INT(76),
1682 [8] = MSM_GPIO_TO_INT(77),
1683 [9] = MSM_GPIO_TO_INT(36),
1684 [10] = MSM_GPIO_TO_INT(84),
1685 [11] = MSM_GPIO_TO_INT(7),
1686 [12] = MSM_GPIO_TO_INT(11),
1687 [13] = MSM_GPIO_TO_INT(52),
1688 [14] = MSM_GPIO_TO_INT(15),
1689 [15] = MSM_GPIO_TO_INT(83),
1690 [16] = USB3_HS_IRQ,
1691 [19] = MSM_GPIO_TO_INT(61),
1692 [20] = MSM_GPIO_TO_INT(58),
1693 [23] = MSM_GPIO_TO_INT(65),
1694 [24] = MSM_GPIO_TO_INT(63),
1695 [25] = USB1_HS_IRQ,
1696 [27] = HDMI_IRQ,
1697 [29] = MSM_GPIO_TO_INT(22),
1698 [30] = MSM_GPIO_TO_INT(72),
1699 [31] = USB4_HS_IRQ,
1700 [33] = MSM_GPIO_TO_INT(44),
1701 [34] = MSM_GPIO_TO_INT(39),
1702 [35] = MSM_GPIO_TO_INT(19),
1703 [36] = MSM_GPIO_TO_INT(23),
1704 [37] = MSM_GPIO_TO_INT(41),
1705 [38] = MSM_GPIO_TO_INT(30),
1706 [41] = MSM_GPIO_TO_INT(42),
1707 [42] = MSM_GPIO_TO_INT(56),
1708 [43] = MSM_GPIO_TO_INT(55),
1709 [44] = MSM_GPIO_TO_INT(50),
1710 [45] = MSM_GPIO_TO_INT(49),
1711 [46] = MSM_GPIO_TO_INT(47),
1712 [47] = MSM_GPIO_TO_INT(45),
1713 [48] = MSM_GPIO_TO_INT(38),
1714 [49] = MSM_GPIO_TO_INT(34),
1715 [50] = MSM_GPIO_TO_INT(32),
1716 [51] = MSM_GPIO_TO_INT(29),
1717 [52] = MSM_GPIO_TO_INT(18),
1718 [53] = MSM_GPIO_TO_INT(10),
1719 [54] = MSM_GPIO_TO_INT(81),
1720 [55] = MSM_GPIO_TO_INT(6),
1721};
1722
1723static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
1724 TLMM_MSM_SUMMARY_IRQ,
1725 RPM_APCC_CPU0_GP_HIGH_IRQ,
1726 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1727 RPM_APCC_CPU0_GP_LOW_IRQ,
1728 RPM_APCC_CPU0_WAKE_UP_IRQ,
1729 RPM_APCC_CPU1_GP_HIGH_IRQ,
1730 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
1731 RPM_APCC_CPU1_GP_LOW_IRQ,
1732 RPM_APCC_CPU1_WAKE_UP_IRQ,
1733 MSS_TO_APPS_IRQ_0,
1734 MSS_TO_APPS_IRQ_1,
1735 MSS_TO_APPS_IRQ_2,
1736 MSS_TO_APPS_IRQ_3,
1737 MSS_TO_APPS_IRQ_4,
1738 MSS_TO_APPS_IRQ_5,
1739 MSS_TO_APPS_IRQ_6,
1740 MSS_TO_APPS_IRQ_7,
1741 MSS_TO_APPS_IRQ_8,
1742 MSS_TO_APPS_IRQ_9,
1743 LPASS_SCSS_GP_LOW_IRQ,
1744 LPASS_SCSS_GP_MEDIUM_IRQ,
1745 LPASS_SCSS_GP_HIGH_IRQ,
1746 SPS_MTI_30,
1747 SPS_MTI_31,
1748 RIVA_APSS_SPARE_IRQ,
1749 RIVA_APPS_WLAN_SMSM_IRQ,
1750 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
1751 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
1752};
1753
1754struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = {
1755 .irqs_m2a = msm_mpm_irqs_m2a,
1756 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
1757 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
1758 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
1759 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
1760 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
1761 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
1762 .mpm_apps_ipc_val = BIT(1),
1763 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
1764
1765};
1766#endif
Joel Kingdacbc822012-01-25 13:30:57 -08001767
1768#define MDM2AP_ERRFATAL 19
1769#define AP2MDM_ERRFATAL 18
1770#define MDM2AP_STATUS 49
1771#define AP2MDM_STATUS 48
1772#define AP2MDM_PMIC_RESET_N 27
1773
1774static struct resource mdm_resources[] = {
1775 {
1776 .start = MDM2AP_ERRFATAL,
1777 .end = MDM2AP_ERRFATAL,
1778 .name = "MDM2AP_ERRFATAL",
1779 .flags = IORESOURCE_IO,
1780 },
1781 {
1782 .start = AP2MDM_ERRFATAL,
1783 .end = AP2MDM_ERRFATAL,
1784 .name = "AP2MDM_ERRFATAL",
1785 .flags = IORESOURCE_IO,
1786 },
1787 {
1788 .start = MDM2AP_STATUS,
1789 .end = MDM2AP_STATUS,
1790 .name = "MDM2AP_STATUS",
1791 .flags = IORESOURCE_IO,
1792 },
1793 {
1794 .start = AP2MDM_STATUS,
1795 .end = AP2MDM_STATUS,
1796 .name = "AP2MDM_STATUS",
1797 .flags = IORESOURCE_IO,
1798 },
1799 {
1800 .start = AP2MDM_PMIC_RESET_N,
1801 .end = AP2MDM_PMIC_RESET_N,
1802 .name = "AP2MDM_PMIC_RESET_N",
1803 .flags = IORESOURCE_IO,
1804 },
1805};
1806
1807struct platform_device mdm_8064_device = {
1808 .name = "mdm2_modem",
1809 .id = -1,
1810 .num_resources = ARRAY_SIZE(mdm_resources),
1811 .resource = mdm_resources,
1812};
1813