blob: f6b753d9289c42c193c8da351c1deb81b85d3801 [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>
Jin Hongd3024e62012-02-09 16:13:32 -080026#include <mach/msm_dsps.h>
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -080027#include <sound/msm-dai-q6.h>
28#include <sound/apr_audio.h>
Gagan Mac8a7a5d32011-11-11 16:43:06 -070029#include <mach/msm_bus_board.h>
Praveen Chidambaram78499012011-11-01 17:15:17 -060030#include <mach/rpm.h>
Joel Kingdacbc822012-01-25 13:30:57 -080031#include <mach/mdm2.h>
Eric Holmberg023d25c2012-03-01 12:27:55 -070032#include <mach/msm_smd.h>
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -070033#include <mach/msm_dcvs.h>
Pratik Patel212ab362012-03-16 12:30:07 -070034#include <mach/qdss.h>
Mohan Kumar Gubbihalli Lachma Naik7f72edd2012-02-06 17:26:47 -080035#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070036#include "clock.h"
37#include "devices.h"
Matt Wagantall1875d322012-02-22 16:11:33 -080038#include "footswitch.h"
Jeff Ohlstein7e668552011-10-06 16:17:25 -070039#include "msm_watchdog.h"
Praveen Chidambaram78499012011-11-01 17:15:17 -060040#include "rpm_stats.h"
41#include "rpm_log.h"
Subhash Jadavani909e04f2012-04-12 10:52:50 +053042#include <mach/mpm.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070043
44/* Address of GSBI blocks */
Stepan Moskovchenko2701a442011-08-19 13:47:22 -070045#define MSM_GSBI1_PHYS 0x12440000
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070046#define MSM_GSBI3_PHYS 0x16200000
Harini Jayaramanc4c58692011-07-19 14:50:10 -060047#define MSM_GSBI4_PHYS 0x16300000
48#define MSM_GSBI5_PHYS 0x1A200000
49#define MSM_GSBI6_PHYS 0x16500000
50#define MSM_GSBI7_PHYS 0x16600000
51
Kenneth Heitke748593a2011-07-15 15:45:11 -060052/* GSBI UART devices */
Stepan Moskovchenko2701a442011-08-19 13:47:22 -070053#define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070054#define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000)
Jin Hong4bbbfba2012-02-02 21:48:07 -080055#define MSM_UART7DM_PHYS (MSM_GSBI7_PHYS + 0x40000)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070056
Harini Jayaramanc4c58692011-07-19 14:50:10 -060057/* GSBI QUP devices */
David Keitel3c40fc52012-02-09 17:53:52 -080058#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x20000)
Harini Jayaramanc4c58692011-07-19 14:50:10 -060059#define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000)
60#define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000)
61#define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000)
62#define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000)
63#define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000)
64#define MSM_QUP_SIZE SZ_4K
65
Kenneth Heitke36920d32011-07-20 16:44:30 -060066/* Address of SSBI CMD */
67#define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000
68#define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000
69#define MSM_PMIC_SSBI_SIZE SZ_4K
Harini Jayaramanc4c58692011-07-19 14:50:10 -060070
Hemant Kumarcaa09092011-07-30 00:26:33 -070071/* Address of HS USBOTG1 */
Hemant Kumard86c4882012-01-24 19:39:37 -080072#define MSM_HSUSB1_PHYS 0x12500000
73#define MSM_HSUSB1_SIZE SZ_4K
Hemant Kumarcaa09092011-07-30 00:26:33 -070074
Manu Gautam91223e02011-11-08 15:27:22 +053075/* Address of HS USB3 */
76#define MSM_HSUSB3_PHYS 0x12520000
77#define MSM_HSUSB3_SIZE SZ_4K
78
Hemant Kumar1d66e1c2012-02-13 15:24:59 -080079/* Address of HS USB4 */
80#define MSM_HSUSB4_PHYS 0x12530000
81#define MSM_HSUSB4_SIZE SZ_4K
82
83
Jeff Ohlstein7e668552011-10-06 16:17:25 -070084static struct msm_watchdog_pdata msm_watchdog_pdata = {
85 .pet_time = 10000,
86 .bark_time = 11000,
87 .has_secure = true,
Joel Kinge7ca6f72012-02-09 20:51:25 -080088 .needs_expired_enable = true,
Jeff Ohlstein7e668552011-10-06 16:17:25 -070089};
90
91struct platform_device msm8064_device_watchdog = {
92 .name = "msm_watchdog",
93 .id = -1,
94 .dev = {
95 .platform_data = &msm_watchdog_pdata,
96 },
97};
98
Joel King0581896d2011-07-19 16:43:28 -070099static struct resource msm_dmov_resource[] = {
100 {
Jeff Ohlstein4af72692011-11-07 15:59:17 -0800101 .start = ADM_0_SCSS_1_IRQ,
Joel King0581896d2011-07-19 16:43:28 -0700102 .flags = IORESOURCE_IRQ,
103 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700104 {
Jeff Ohlstein4af72692011-11-07 15:59:17 -0800105 .start = 0x18320000,
106 .end = 0x18320000 + SZ_1M - 1,
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700107 .flags = IORESOURCE_MEM,
108 },
109};
110
111static struct msm_dmov_pdata msm_dmov_pdata = {
Jeff Ohlstein4af72692011-11-07 15:59:17 -0800112 .sd = 1,
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700113 .sd_size = 0x800,
Joel King0581896d2011-07-19 16:43:28 -0700114};
115
Stepan Moskovchenkodf13d342011-08-03 19:01:25 -0700116struct platform_device apq8064_device_dmov = {
Joel King0581896d2011-07-19 16:43:28 -0700117 .name = "msm_dmov",
118 .id = -1,
119 .resource = msm_dmov_resource,
120 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700121 .dev = {
122 .platform_data = &msm_dmov_pdata,
123 },
Joel King0581896d2011-07-19 16:43:28 -0700124};
125
Stepan Moskovchenko2701a442011-08-19 13:47:22 -0700126static struct resource resources_uart_gsbi1[] = {
127 {
128 .start = APQ8064_GSBI1_UARTDM_IRQ,
129 .end = APQ8064_GSBI1_UARTDM_IRQ,
130 .flags = IORESOURCE_IRQ,
131 },
132 {
133 .start = MSM_UART1DM_PHYS,
134 .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1,
135 .name = "uartdm_resource",
136 .flags = IORESOURCE_MEM,
137 },
138 {
139 .start = MSM_GSBI1_PHYS,
140 .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1,
141 .name = "gsbi_resource",
142 .flags = IORESOURCE_MEM,
143 },
144};
145
146struct platform_device apq8064_device_uart_gsbi1 = {
147 .name = "msm_serial_hsl",
Jin Hong4bbbfba2012-02-02 21:48:07 -0800148 .id = 1,
Stepan Moskovchenko2701a442011-08-19 13:47:22 -0700149 .num_resources = ARRAY_SIZE(resources_uart_gsbi1),
150 .resource = resources_uart_gsbi1,
151};
152
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700153static struct resource resources_uart_gsbi3[] = {
154 {
155 .start = GSBI3_UARTDM_IRQ,
156 .end = GSBI3_UARTDM_IRQ,
157 .flags = IORESOURCE_IRQ,
158 },
159 {
160 .start = MSM_UART3DM_PHYS,
161 .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1,
162 .name = "uartdm_resource",
163 .flags = IORESOURCE_MEM,
164 },
165 {
166 .start = MSM_GSBI3_PHYS,
167 .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1,
168 .name = "gsbi_resource",
169 .flags = IORESOURCE_MEM,
170 },
171};
172
173struct platform_device apq8064_device_uart_gsbi3 = {
174 .name = "msm_serial_hsl",
175 .id = 0,
176 .num_resources = ARRAY_SIZE(resources_uart_gsbi3),
177 .resource = resources_uart_gsbi3,
178};
179
Jing Lin04601f92012-02-05 15:36:07 -0800180static struct resource resources_qup_i2c_gsbi3[] = {
181 {
182 .name = "gsbi_qup_i2c_addr",
183 .start = MSM_GSBI3_PHYS,
184 .end = MSM_GSBI3_PHYS + 4 - 1,
185 .flags = IORESOURCE_MEM,
186 },
187 {
188 .name = "qup_phys_addr",
189 .start = MSM_GSBI3_QUP_PHYS,
190 .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1,
191 .flags = IORESOURCE_MEM,
192 },
193 {
194 .name = "qup_err_intr",
195 .start = GSBI3_QUP_IRQ,
196 .end = GSBI3_QUP_IRQ,
197 .flags = IORESOURCE_IRQ,
198 },
199 {
200 .name = "i2c_clk",
201 .start = 9,
202 .end = 9,
203 .flags = IORESOURCE_IO,
204 },
205 {
206 .name = "i2c_sda",
207 .start = 8,
208 .end = 8,
209 .flags = IORESOURCE_IO,
210 },
211};
212
David Keitel3c40fc52012-02-09 17:53:52 -0800213static struct resource resources_qup_i2c_gsbi1[] = {
214 {
215 .name = "gsbi_qup_i2c_addr",
216 .start = MSM_GSBI1_PHYS,
217 .end = MSM_GSBI1_PHYS + 4 - 1,
218 .flags = IORESOURCE_MEM,
219 },
220 {
221 .name = "qup_phys_addr",
222 .start = MSM_GSBI1_QUP_PHYS,
223 .end = MSM_GSBI1_QUP_PHYS + MSM_QUP_SIZE - 1,
224 .flags = IORESOURCE_MEM,
225 },
226 {
227 .name = "qup_err_intr",
228 .start = APQ8064_GSBI1_QUP_IRQ,
229 .end = APQ8064_GSBI1_QUP_IRQ,
230 .flags = IORESOURCE_IRQ,
231 },
232 {
233 .name = "i2c_clk",
234 .start = 21,
235 .end = 21,
236 .flags = IORESOURCE_IO,
237 },
238 {
239 .name = "i2c_sda",
240 .start = 20,
241 .end = 20,
242 .flags = IORESOURCE_IO,
243 },
244};
245
246struct platform_device apq8064_device_qup_i2c_gsbi1 = {
247 .name = "qup_i2c",
248 .id = 0,
249 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi1),
250 .resource = resources_qup_i2c_gsbi1,
251};
252
Jing Lin04601f92012-02-05 15:36:07 -0800253struct platform_device apq8064_device_qup_i2c_gsbi3 = {
254 .name = "qup_i2c",
255 .id = 3,
256 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3),
257 .resource = resources_qup_i2c_gsbi3,
258};
259
Kenneth Heitke748593a2011-07-15 15:45:11 -0600260static struct resource resources_qup_i2c_gsbi4[] = {
261 {
262 .name = "gsbi_qup_i2c_addr",
263 .start = MSM_GSBI4_PHYS,
Harini Jayaramane1554a92011-09-15 14:43:02 -0600264 .end = MSM_GSBI4_PHYS + 4 - 1,
Kenneth Heitke748593a2011-07-15 15:45:11 -0600265 .flags = IORESOURCE_MEM,
266 },
267 {
268 .name = "qup_phys_addr",
269 .start = MSM_GSBI4_QUP_PHYS,
Harini Jayaramane1554a92011-09-15 14:43:02 -0600270 .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1,
Kenneth Heitke748593a2011-07-15 15:45:11 -0600271 .flags = IORESOURCE_MEM,
272 },
273 {
274 .name = "qup_err_intr",
275 .start = GSBI4_QUP_IRQ,
276 .end = GSBI4_QUP_IRQ,
277 .flags = IORESOURCE_IRQ,
278 },
Kevin Chand07220e2012-02-13 15:52:22 -0800279 {
280 .name = "i2c_clk",
281 .start = 11,
282 .end = 11,
283 .flags = IORESOURCE_IO,
284 },
285 {
286 .name = "i2c_sda",
287 .start = 10,
288 .end = 10,
289 .flags = IORESOURCE_IO,
290 },
Kenneth Heitke748593a2011-07-15 15:45:11 -0600291};
292
293struct platform_device apq8064_device_qup_i2c_gsbi4 = {
294 .name = "qup_i2c",
295 .id = 4,
296 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4),
297 .resource = resources_qup_i2c_gsbi4,
298};
299
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700300static struct resource resources_qup_spi_gsbi5[] = {
301 {
302 .name = "spi_base",
303 .start = MSM_GSBI5_QUP_PHYS,
304 .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1,
305 .flags = IORESOURCE_MEM,
306 },
307 {
308 .name = "gsbi_base",
309 .start = MSM_GSBI5_PHYS,
310 .end = MSM_GSBI5_PHYS + 4 - 1,
311 .flags = IORESOURCE_MEM,
312 },
313 {
314 .name = "spi_irq_in",
315 .start = GSBI5_QUP_IRQ,
316 .end = GSBI5_QUP_IRQ,
317 .flags = IORESOURCE_IRQ,
318 },
319};
320
321struct platform_device apq8064_device_qup_spi_gsbi5 = {
322 .name = "spi_qsd",
323 .id = 0,
324 .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5),
325 .resource = resources_qup_spi_gsbi5,
326};
327
Joel King8f839b92012-04-01 14:37:46 -0700328static struct resource resources_qup_i2c_gsbi5[] = {
329 {
330 .name = "gsbi_qup_i2c_addr",
331 .start = MSM_GSBI5_PHYS,
332 .end = MSM_GSBI5_PHYS + 4 - 1,
333 .flags = IORESOURCE_MEM,
334 },
335 {
336 .name = "qup_phys_addr",
337 .start = MSM_GSBI5_QUP_PHYS,
338 .end = MSM_GSBI5_QUP_PHYS + MSM_QUP_SIZE - 1,
339 .flags = IORESOURCE_MEM,
340 },
341 {
342 .name = "qup_err_intr",
343 .start = GSBI5_QUP_IRQ,
344 .end = GSBI5_QUP_IRQ,
345 .flags = IORESOURCE_IRQ,
346 },
347 {
348 .name = "i2c_clk",
349 .start = 54,
350 .end = 54,
351 .flags = IORESOURCE_IO,
352 },
353 {
354 .name = "i2c_sda",
355 .start = 53,
356 .end = 53,
357 .flags = IORESOURCE_IO,
358 },
359};
360
361struct platform_device mpq8064_device_qup_i2c_gsbi5 = {
362 .name = "qup_i2c",
363 .id = 5,
364 .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi5),
365 .resource = resources_qup_i2c_gsbi5,
366};
367
Jin Hong4bbbfba2012-02-02 21:48:07 -0800368static struct resource resources_uart_gsbi7[] = {
369 {
370 .start = GSBI7_UARTDM_IRQ,
371 .end = GSBI7_UARTDM_IRQ,
372 .flags = IORESOURCE_IRQ,
373 },
374 {
375 .start = MSM_UART7DM_PHYS,
376 .end = MSM_UART7DM_PHYS + PAGE_SIZE - 1,
377 .name = "uartdm_resource",
378 .flags = IORESOURCE_MEM,
379 },
380 {
381 .start = MSM_GSBI7_PHYS,
382 .end = MSM_GSBI7_PHYS + PAGE_SIZE - 1,
383 .name = "gsbi_resource",
384 .flags = IORESOURCE_MEM,
385 },
386};
387
388struct platform_device apq8064_device_uart_gsbi7 = {
389 .name = "msm_serial_hsl",
390 .id = 0,
391 .num_resources = ARRAY_SIZE(resources_uart_gsbi7),
392 .resource = resources_uart_gsbi7,
393};
394
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800395struct platform_device apq_pcm = {
396 .name = "msm-pcm-dsp",
397 .id = -1,
398};
399
400struct platform_device apq_pcm_routing = {
401 .name = "msm-pcm-routing",
402 .id = -1,
403};
404
405struct platform_device apq_cpudai0 = {
406 .name = "msm-dai-q6",
407 .id = 0x4000,
408};
409
410struct platform_device apq_cpudai1 = {
411 .name = "msm-dai-q6",
412 .id = 0x4001,
413};
Santosh Mardieff9a742012-04-09 23:23:39 +0530414struct platform_device mpq_cpudai_sec_i2s_rx = {
415 .name = "msm-dai-q6",
416 .id = 4,
417};
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800418struct platform_device apq_cpudai_hdmi_rx = {
Swaminathan Sathappanfd9dbad2012-02-15 16:56:44 -0800419 .name = "msm-dai-q6-hdmi",
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800420 .id = 8,
421};
422
423struct platform_device apq_cpudai_bt_rx = {
424 .name = "msm-dai-q6",
425 .id = 0x3000,
426};
427
428struct platform_device apq_cpudai_bt_tx = {
429 .name = "msm-dai-q6",
430 .id = 0x3001,
431};
432
433struct platform_device apq_cpudai_fm_rx = {
434 .name = "msm-dai-q6",
435 .id = 0x3004,
436};
437
438struct platform_device apq_cpudai_fm_tx = {
439 .name = "msm-dai-q6",
440 .id = 0x3005,
441};
442
443/*
444 * Machine specific data for AUX PCM Interface
445 * which the driver will be unware of.
446 */
Kiran Kandi5f4ab692012-02-23 11:23:56 -0800447struct msm_dai_auxpcm_pdata apq_auxpcm_pdata = {
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800448 .clk = "pcm_clk",
449 .mode = AFE_PCM_CFG_MODE_PCM,
450 .sync = AFE_PCM_CFG_SYNC_INT,
451 .frame = AFE_PCM_CFG_FRM_256BPF,
452 .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD,
453 .slot = 0,
454 .data = AFE_PCM_CFG_CDATAOE_MASTER,
455 .pcm_clk_rate = 2048000,
456};
457
458struct platform_device apq_cpudai_auxpcm_rx = {
459 .name = "msm-dai-q6",
460 .id = 2,
461 .dev = {
Kiran Kandi5f4ab692012-02-23 11:23:56 -0800462 .platform_data = &apq_auxpcm_pdata,
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800463 },
464};
465
466struct platform_device apq_cpudai_auxpcm_tx = {
467 .name = "msm-dai-q6",
468 .id = 3,
Kiran Kandi5f4ab692012-02-23 11:23:56 -0800469 .dev = {
470 .platform_data = &apq_auxpcm_pdata,
471 },
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800472};
473
474struct platform_device apq_cpu_fe = {
475 .name = "msm-dai-fe",
476 .id = -1,
477};
478
479struct platform_device apq_stub_codec = {
480 .name = "msm-stub-codec",
481 .id = 1,
482};
483
484struct platform_device apq_voice = {
485 .name = "msm-pcm-voice",
486 .id = -1,
487};
488
489struct platform_device apq_voip = {
490 .name = "msm-voip-dsp",
491 .id = -1,
492};
493
494struct platform_device apq_lpa_pcm = {
495 .name = "msm-pcm-lpa",
496 .id = -1,
497};
498
Krishnankutty Kolathappilly4374e332012-03-18 22:27:30 -0700499struct platform_device apq_compr_dsp = {
500 .name = "msm-compr-dsp",
501 .id = -1,
502};
503
504struct platform_device apq_multi_ch_pcm = {
505 .name = "msm-multi-ch-pcm-dsp",
506 .id = -1,
507};
508
Bharath Ramachandramurthyb8e797f2011-11-30 12:08:42 -0800509struct platform_device apq_pcm_hostless = {
510 .name = "msm-pcm-hostless",
511 .id = -1,
512};
513
514struct platform_device apq_cpudai_afe_01_rx = {
515 .name = "msm-dai-q6",
516 .id = 0xE0,
517};
518
519struct platform_device apq_cpudai_afe_01_tx = {
520 .name = "msm-dai-q6",
521 .id = 0xF0,
522};
523
524struct platform_device apq_cpudai_afe_02_rx = {
525 .name = "msm-dai-q6",
526 .id = 0xF1,
527};
528
529struct platform_device apq_cpudai_afe_02_tx = {
530 .name = "msm-dai-q6",
531 .id = 0xE1,
532};
533
534struct platform_device apq_pcm_afe = {
535 .name = "msm-pcm-afe",
536 .id = -1,
537};
538
Neema Shetty8427c262012-02-16 11:23:43 -0800539struct platform_device apq_cpudai_stub = {
540 .name = "msm-dai-stub",
541 .id = -1,
542};
543
Neema Shetty3c9d2862012-03-11 01:25:32 -0800544struct platform_device apq_cpudai_slimbus_1_rx = {
545 .name = "msm-dai-q6",
546 .id = 0x4002,
547};
548
549struct platform_device apq_cpudai_slimbus_1_tx = {
550 .name = "msm-dai-q6",
551 .id = 0x4003,
552};
553
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700554static struct resource resources_ssbi_pmic1[] = {
555 {
556 .start = MSM_PMIC1_SSBI_CMD_PHYS,
557 .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
558 .flags = IORESOURCE_MEM,
559 },
560};
561
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -0600562#define LPASS_SLIMBUS_PHYS 0x28080000
563#define LPASS_SLIMBUS_BAM_PHYS 0x28084000
Swaminathan Sathappan2316e082012-02-03 14:07:17 -0800564#define LPASS_SLIMBUS_SLEW (MSM8960_TLMM_PHYS + 0x207C)
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -0600565/* Board info for the slimbus slave device */
566static struct resource slimbus_res[] = {
567 {
568 .start = LPASS_SLIMBUS_PHYS,
569 .end = LPASS_SLIMBUS_PHYS + 8191,
570 .flags = IORESOURCE_MEM,
571 .name = "slimbus_physical",
572 },
573 {
574 .start = LPASS_SLIMBUS_BAM_PHYS,
575 .end = LPASS_SLIMBUS_BAM_PHYS + 8191,
576 .flags = IORESOURCE_MEM,
577 .name = "slimbus_bam_physical",
578 },
579 {
Swaminathan Sathappan2316e082012-02-03 14:07:17 -0800580 .start = LPASS_SLIMBUS_SLEW,
581 .end = LPASS_SLIMBUS_SLEW + 4 - 1,
582 .flags = IORESOURCE_MEM,
583 .name = "slimbus_slew_reg",
584 },
585 {
Sagar Dharia8bdcdaf2011-09-16 16:01:15 -0600586 .start = SLIMBUS0_CORE_EE1_IRQ,
587 .end = SLIMBUS0_CORE_EE1_IRQ,
588 .flags = IORESOURCE_IRQ,
589 .name = "slimbus_irq",
590 },
591 {
592 .start = SLIMBUS0_BAM_EE1_IRQ,
593 .end = SLIMBUS0_BAM_EE1_IRQ,
594 .flags = IORESOURCE_IRQ,
595 .name = "slimbus_bam_irq",
596 },
597};
598
599struct platform_device apq8064_slim_ctrl = {
600 .name = "msm_slim_ctrl",
601 .id = 1,
602 .num_resources = ARRAY_SIZE(slimbus_res),
603 .resource = slimbus_res,
604 .dev = {
605 .coherent_dma_mask = 0xffffffffULL,
606 },
607};
608
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700609struct platform_device apq8064_device_ssbi_pmic1 = {
610 .name = "msm_ssbi",
611 .id = 0,
612 .resource = resources_ssbi_pmic1,
613 .num_resources = ARRAY_SIZE(resources_ssbi_pmic1),
614};
615
616static struct resource resources_ssbi_pmic2[] = {
617 {
618 .start = MSM_PMIC2_SSBI_CMD_PHYS,
619 .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1,
620 .flags = IORESOURCE_MEM,
621 },
622};
623
624struct platform_device apq8064_device_ssbi_pmic2 = {
625 .name = "msm_ssbi",
626 .id = 1,
627 .resource = resources_ssbi_pmic2,
628 .num_resources = ARRAY_SIZE(resources_ssbi_pmic2),
629};
630
631static struct resource resources_otg[] = {
632 {
Hemant Kumard86c4882012-01-24 19:39:37 -0800633 .start = MSM_HSUSB1_PHYS,
634 .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700635 .flags = IORESOURCE_MEM,
636 },
637 {
638 .start = USB1_HS_IRQ,
639 .end = USB1_HS_IRQ,
640 .flags = IORESOURCE_IRQ,
641 },
642};
643
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700644struct platform_device apq8064_device_otg = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700645 .name = "msm_otg",
646 .id = -1,
647 .num_resources = ARRAY_SIZE(resources_otg),
648 .resource = resources_otg,
649 .dev = {
650 .coherent_dma_mask = 0xffffffff,
651 },
652};
653
654static struct resource resources_hsusb[] = {
655 {
Hemant Kumard86c4882012-01-24 19:39:37 -0800656 .start = MSM_HSUSB1_PHYS,
657 .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700658 .flags = IORESOURCE_MEM,
659 },
660 {
661 .start = USB1_HS_IRQ,
662 .end = USB1_HS_IRQ,
663 .flags = IORESOURCE_IRQ,
664 },
665};
666
Stepan Moskovchenko14aa6492011-08-08 15:15:01 -0700667struct platform_device apq8064_device_gadget_peripheral = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700668 .name = "msm_hsusb",
669 .id = -1,
670 .num_resources = ARRAY_SIZE(resources_hsusb),
671 .resource = resources_hsusb,
672 .dev = {
673 .coherent_dma_mask = 0xffffffff,
674 },
675};
676
Hemant Kumard86c4882012-01-24 19:39:37 -0800677static struct resource resources_hsusb_host[] = {
678 {
679 .start = MSM_HSUSB1_PHYS,
680 .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1,
681 .flags = IORESOURCE_MEM,
682 },
683 {
684 .start = USB1_HS_IRQ,
685 .end = USB1_HS_IRQ,
686 .flags = IORESOURCE_IRQ,
687 },
688};
689
Hemant Kumara945b472012-01-25 15:08:06 -0800690static struct resource resources_hsic_host[] = {
691 {
692 .start = 0x12510000,
693 .end = 0x12510000 + SZ_4K - 1,
694 .flags = IORESOURCE_MEM,
695 },
696 {
697 .start = USB2_HSIC_IRQ,
698 .end = USB2_HSIC_IRQ,
699 .flags = IORESOURCE_IRQ,
700 },
701 {
702 .start = MSM_GPIO_TO_INT(49),
703 .end = MSM_GPIO_TO_INT(49),
704 .name = "peripheral_status_irq",
705 .flags = IORESOURCE_IRQ,
706 },
Vamsi Krishna6921cbe2012-02-21 18:34:43 -0800707 {
708 .start = MSM_GPIO_TO_INT(88),
709 .end = MSM_GPIO_TO_INT(88),
710 .name = "wakeup_irq",
711 .flags = IORESOURCE_IRQ,
712 },
Hemant Kumara945b472012-01-25 15:08:06 -0800713};
714
Hemant Kumard86c4882012-01-24 19:39:37 -0800715static u64 dma_mask = DMA_BIT_MASK(32);
716struct platform_device apq8064_device_hsusb_host = {
717 .name = "msm_hsusb_host",
718 .id = -1,
719 .num_resources = ARRAY_SIZE(resources_hsusb_host),
720 .resource = resources_hsusb_host,
721 .dev = {
722 .dma_mask = &dma_mask,
723 .coherent_dma_mask = 0xffffffff,
724 },
725};
726
Hemant Kumara945b472012-01-25 15:08:06 -0800727struct platform_device apq8064_device_hsic_host = {
728 .name = "msm_hsic_host",
729 .id = -1,
730 .num_resources = ARRAY_SIZE(resources_hsic_host),
731 .resource = resources_hsic_host,
732 .dev = {
733 .dma_mask = &dma_mask,
734 .coherent_dma_mask = DMA_BIT_MASK(32),
735 },
736};
737
Manu Gautam91223e02011-11-08 15:27:22 +0530738static struct resource resources_ehci_host3[] = {
739{
740 .start = MSM_HSUSB3_PHYS,
741 .end = MSM_HSUSB3_PHYS + MSM_HSUSB3_SIZE - 1,
742 .flags = IORESOURCE_MEM,
743 },
744 {
745 .start = USB3_HS_IRQ,
746 .end = USB3_HS_IRQ,
747 .flags = IORESOURCE_IRQ,
748 },
749};
750
751struct platform_device apq8064_device_ehci_host3 = {
752 .name = "msm_ehci_host",
753 .id = 0,
754 .num_resources = ARRAY_SIZE(resources_ehci_host3),
755 .resource = resources_ehci_host3,
756 .dev = {
757 .dma_mask = &dma_mask,
758 .coherent_dma_mask = 0xffffffff,
759 },
760};
761
Hemant Kumar1d66e1c2012-02-13 15:24:59 -0800762static struct resource resources_ehci_host4[] = {
763{
764 .start = MSM_HSUSB4_PHYS,
765 .end = MSM_HSUSB4_PHYS + MSM_HSUSB4_SIZE - 1,
766 .flags = IORESOURCE_MEM,
767 },
768 {
769 .start = USB4_HS_IRQ,
770 .end = USB4_HS_IRQ,
771 .flags = IORESOURCE_IRQ,
772 },
773};
774
775struct platform_device apq8064_device_ehci_host4 = {
776 .name = "msm_ehci_host",
777 .id = 1,
778 .num_resources = ARRAY_SIZE(resources_ehci_host4),
779 .resource = resources_ehci_host4,
780 .dev = {
781 .dma_mask = &dma_mask,
782 .coherent_dma_mask = 0xffffffff,
783 },
784};
785
Mohan Kumar Gubbihalli Lachma Naik7f72edd2012-02-06 17:26:47 -0800786/* MSM Video core device */
787#ifdef CONFIG_MSM_BUS_SCALING
788static struct msm_bus_vectors vidc_init_vectors[] = {
789 {
790 .src = MSM_BUS_MASTER_VIDEO_ENC,
791 .dst = MSM_BUS_SLAVE_EBI_CH0,
792 .ab = 0,
793 .ib = 0,
794 },
795 {
796 .src = MSM_BUS_MASTER_VIDEO_DEC,
797 .dst = MSM_BUS_SLAVE_EBI_CH0,
798 .ab = 0,
799 .ib = 0,
800 },
801 {
802 .src = MSM_BUS_MASTER_AMPSS_M0,
803 .dst = MSM_BUS_SLAVE_EBI_CH0,
804 .ab = 0,
805 .ib = 0,
806 },
807 {
808 .src = MSM_BUS_MASTER_AMPSS_M0,
809 .dst = MSM_BUS_SLAVE_EBI_CH0,
810 .ab = 0,
811 .ib = 0,
812 },
813};
814static struct msm_bus_vectors vidc_venc_vga_vectors[] = {
815 {
816 .src = MSM_BUS_MASTER_VIDEO_ENC,
817 .dst = MSM_BUS_SLAVE_EBI_CH0,
818 .ab = 54525952,
819 .ib = 436207616,
820 },
821 {
822 .src = MSM_BUS_MASTER_VIDEO_DEC,
823 .dst = MSM_BUS_SLAVE_EBI_CH0,
824 .ab = 72351744,
825 .ib = 289406976,
826 },
827 {
828 .src = MSM_BUS_MASTER_AMPSS_M0,
829 .dst = MSM_BUS_SLAVE_EBI_CH0,
830 .ab = 500000,
831 .ib = 1000000,
832 },
833 {
834 .src = MSM_BUS_MASTER_AMPSS_M0,
835 .dst = MSM_BUS_SLAVE_EBI_CH0,
836 .ab = 500000,
837 .ib = 1000000,
838 },
839};
840static struct msm_bus_vectors vidc_vdec_vga_vectors[] = {
841 {
842 .src = MSM_BUS_MASTER_VIDEO_ENC,
843 .dst = MSM_BUS_SLAVE_EBI_CH0,
844 .ab = 40894464,
845 .ib = 327155712,
846 },
847 {
848 .src = MSM_BUS_MASTER_VIDEO_DEC,
849 .dst = MSM_BUS_SLAVE_EBI_CH0,
850 .ab = 48234496,
851 .ib = 192937984,
852 },
853 {
854 .src = MSM_BUS_MASTER_AMPSS_M0,
855 .dst = MSM_BUS_SLAVE_EBI_CH0,
856 .ab = 500000,
857 .ib = 2000000,
858 },
859 {
860 .src = MSM_BUS_MASTER_AMPSS_M0,
861 .dst = MSM_BUS_SLAVE_EBI_CH0,
862 .ab = 500000,
863 .ib = 2000000,
864 },
865};
866static struct msm_bus_vectors vidc_venc_720p_vectors[] = {
867 {
868 .src = MSM_BUS_MASTER_VIDEO_ENC,
869 .dst = MSM_BUS_SLAVE_EBI_CH0,
870 .ab = 163577856,
871 .ib = 1308622848,
872 },
873 {
874 .src = MSM_BUS_MASTER_VIDEO_DEC,
875 .dst = MSM_BUS_SLAVE_EBI_CH0,
876 .ab = 219152384,
877 .ib = 876609536,
878 },
879 {
880 .src = MSM_BUS_MASTER_AMPSS_M0,
881 .dst = MSM_BUS_SLAVE_EBI_CH0,
882 .ab = 1750000,
883 .ib = 3500000,
884 },
885 {
886 .src = MSM_BUS_MASTER_AMPSS_M0,
887 .dst = MSM_BUS_SLAVE_EBI_CH0,
888 .ab = 1750000,
889 .ib = 3500000,
890 },
891};
892static struct msm_bus_vectors vidc_vdec_720p_vectors[] = {
893 {
894 .src = MSM_BUS_MASTER_VIDEO_ENC,
895 .dst = MSM_BUS_SLAVE_EBI_CH0,
896 .ab = 121634816,
897 .ib = 973078528,
898 },
899 {
900 .src = MSM_BUS_MASTER_VIDEO_DEC,
901 .dst = MSM_BUS_SLAVE_EBI_CH0,
902 .ab = 155189248,
903 .ib = 620756992,
904 },
905 {
906 .src = MSM_BUS_MASTER_AMPSS_M0,
907 .dst = MSM_BUS_SLAVE_EBI_CH0,
908 .ab = 1750000,
909 .ib = 7000000,
910 },
911 {
912 .src = MSM_BUS_MASTER_AMPSS_M0,
913 .dst = MSM_BUS_SLAVE_EBI_CH0,
914 .ab = 1750000,
915 .ib = 7000000,
916 },
917};
918static struct msm_bus_vectors vidc_venc_1080p_vectors[] = {
919 {
920 .src = MSM_BUS_MASTER_VIDEO_ENC,
921 .dst = MSM_BUS_SLAVE_EBI_CH0,
922 .ab = 372244480,
923 .ib = 2560000000U,
924 },
925 {
926 .src = MSM_BUS_MASTER_VIDEO_DEC,
927 .dst = MSM_BUS_SLAVE_EBI_CH0,
928 .ab = 501219328,
929 .ib = 2560000000U,
930 },
931 {
932 .src = MSM_BUS_MASTER_AMPSS_M0,
933 .dst = MSM_BUS_SLAVE_EBI_CH0,
934 .ab = 2500000,
935 .ib = 5000000,
936 },
937 {
938 .src = MSM_BUS_MASTER_AMPSS_M0,
939 .dst = MSM_BUS_SLAVE_EBI_CH0,
940 .ab = 2500000,
941 .ib = 5000000,
942 },
943};
944static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = {
945 {
946 .src = MSM_BUS_MASTER_VIDEO_ENC,
947 .dst = MSM_BUS_SLAVE_EBI_CH0,
948 .ab = 222298112,
949 .ib = 2560000000U,
950 },
951 {
952 .src = MSM_BUS_MASTER_VIDEO_DEC,
953 .dst = MSM_BUS_SLAVE_EBI_CH0,
954 .ab = 330301440,
955 .ib = 2560000000U,
956 },
957 {
958 .src = MSM_BUS_MASTER_AMPSS_M0,
959 .dst = MSM_BUS_SLAVE_EBI_CH0,
960 .ab = 2500000,
961 .ib = 700000000,
962 },
963 {
964 .src = MSM_BUS_MASTER_AMPSS_M0,
965 .dst = MSM_BUS_SLAVE_EBI_CH0,
966 .ab = 2500000,
967 .ib = 10000000,
968 },
969};
970
971static struct msm_bus_paths vidc_bus_client_config[] = {
972 {
973 ARRAY_SIZE(vidc_init_vectors),
974 vidc_init_vectors,
975 },
976 {
977 ARRAY_SIZE(vidc_venc_vga_vectors),
978 vidc_venc_vga_vectors,
979 },
980 {
981 ARRAY_SIZE(vidc_vdec_vga_vectors),
982 vidc_vdec_vga_vectors,
983 },
984 {
985 ARRAY_SIZE(vidc_venc_720p_vectors),
986 vidc_venc_720p_vectors,
987 },
988 {
989 ARRAY_SIZE(vidc_vdec_720p_vectors),
990 vidc_vdec_720p_vectors,
991 },
992 {
993 ARRAY_SIZE(vidc_venc_1080p_vectors),
994 vidc_venc_1080p_vectors,
995 },
996 {
997 ARRAY_SIZE(vidc_vdec_1080p_vectors),
998 vidc_vdec_1080p_vectors,
999 },
1000};
1001
1002static struct msm_bus_scale_pdata vidc_bus_client_data = {
1003 vidc_bus_client_config,
1004 ARRAY_SIZE(vidc_bus_client_config),
1005 .name = "vidc",
1006};
1007#endif
1008
1009
1010#define APQ8064_VIDC_BASE_PHYS 0x04400000
1011#define APQ8064_VIDC_BASE_SIZE 0x00100000
1012
1013static struct resource apq8064_device_vidc_resources[] = {
1014 {
1015 .start = APQ8064_VIDC_BASE_PHYS,
1016 .end = APQ8064_VIDC_BASE_PHYS + APQ8064_VIDC_BASE_SIZE - 1,
1017 .flags = IORESOURCE_MEM,
1018 },
1019 {
1020 .start = VCODEC_IRQ,
1021 .end = VCODEC_IRQ,
1022 .flags = IORESOURCE_IRQ,
1023 },
1024};
1025
1026struct msm_vidc_platform_data apq8064_vidc_platform_data = {
1027#ifdef CONFIG_MSM_BUS_SCALING
1028 .vidc_bus_client_pdata = &vidc_bus_client_data,
1029#endif
1030#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
1031 .memtype = ION_CP_MM_HEAP_ID,
1032 .enable_ion = 1,
1033#else
1034 .memtype = MEMTYPE_EBI1,
1035 .enable_ion = 0,
1036#endif
1037 .disable_dmx = 0,
1038 .disable_fullhd = 0,
1039};
1040
1041struct platform_device apq8064_msm_device_vidc = {
1042 .name = "msm_vidc",
1043 .id = 0,
1044 .num_resources = ARRAY_SIZE(apq8064_device_vidc_resources),
1045 .resource = apq8064_device_vidc_resources,
1046 .dev = {
1047 .platform_data = &apq8064_vidc_platform_data,
1048 },
1049};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001050#define MSM_SDC1_BASE 0x12400000
1051#define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800)
1052#define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000)
1053#define MSM_SDC2_BASE 0x12140000
1054#define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800)
1055#define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000)
1056#define MSM_SDC3_BASE 0x12180000
1057#define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800)
1058#define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000)
1059#define MSM_SDC4_BASE 0x121C0000
1060#define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800)
1061#define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000)
1062
1063static struct resource resources_sdc1[] = {
1064 {
1065 .name = "core_mem",
1066 .flags = IORESOURCE_MEM,
1067 .start = MSM_SDC1_BASE,
1068 .end = MSM_SDC1_DML_BASE - 1,
1069 },
1070 {
1071 .name = "core_irq",
1072 .flags = IORESOURCE_IRQ,
1073 .start = SDC1_IRQ_0,
1074 .end = SDC1_IRQ_0
1075 },
1076#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
1077 {
1078 .name = "sdcc_dml_addr",
1079 .start = MSM_SDC1_DML_BASE,
1080 .end = MSM_SDC1_BAM_BASE - 1,
1081 .flags = IORESOURCE_MEM,
1082 },
1083 {
1084 .name = "sdcc_bam_addr",
1085 .start = MSM_SDC1_BAM_BASE,
1086 .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1,
1087 .flags = IORESOURCE_MEM,
1088 },
1089 {
1090 .name = "sdcc_bam_irq",
1091 .start = SDC1_BAM_IRQ,
1092 .end = SDC1_BAM_IRQ,
1093 .flags = IORESOURCE_IRQ,
1094 },
1095#endif
1096};
1097
1098static struct resource resources_sdc2[] = {
1099 {
1100 .name = "core_mem",
1101 .flags = IORESOURCE_MEM,
1102 .start = MSM_SDC2_BASE,
1103 .end = MSM_SDC2_DML_BASE - 1,
1104 },
1105 {
1106 .name = "core_irq",
1107 .flags = IORESOURCE_IRQ,
1108 .start = SDC2_IRQ_0,
1109 .end = SDC2_IRQ_0
1110 },
1111#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
1112 {
1113 .name = "sdcc_dml_addr",
1114 .start = MSM_SDC2_DML_BASE,
1115 .end = MSM_SDC2_BAM_BASE - 1,
1116 .flags = IORESOURCE_MEM,
1117 },
1118 {
1119 .name = "sdcc_bam_addr",
1120 .start = MSM_SDC2_BAM_BASE,
1121 .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1,
1122 .flags = IORESOURCE_MEM,
1123 },
1124 {
1125 .name = "sdcc_bam_irq",
1126 .start = SDC2_BAM_IRQ,
1127 .end = SDC2_BAM_IRQ,
1128 .flags = IORESOURCE_IRQ,
1129 },
1130#endif
1131};
1132
1133static struct resource resources_sdc3[] = {
1134 {
1135 .name = "core_mem",
1136 .flags = IORESOURCE_MEM,
1137 .start = MSM_SDC3_BASE,
1138 .end = MSM_SDC3_DML_BASE - 1,
1139 },
1140 {
1141 .name = "core_irq",
1142 .flags = IORESOURCE_IRQ,
1143 .start = SDC3_IRQ_0,
1144 .end = SDC3_IRQ_0
1145 },
1146#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
1147 {
1148 .name = "sdcc_dml_addr",
1149 .start = MSM_SDC3_DML_BASE,
1150 .end = MSM_SDC3_BAM_BASE - 1,
1151 .flags = IORESOURCE_MEM,
1152 },
1153 {
1154 .name = "sdcc_bam_addr",
1155 .start = MSM_SDC3_BAM_BASE,
1156 .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1,
1157 .flags = IORESOURCE_MEM,
1158 },
1159 {
1160 .name = "sdcc_bam_irq",
1161 .start = SDC3_BAM_IRQ,
1162 .end = SDC3_BAM_IRQ,
1163 .flags = IORESOURCE_IRQ,
1164 },
1165#endif
1166};
1167
1168static struct resource resources_sdc4[] = {
1169 {
1170 .name = "core_mem",
1171 .flags = IORESOURCE_MEM,
1172 .start = MSM_SDC4_BASE,
1173 .end = MSM_SDC4_DML_BASE - 1,
1174 },
1175 {
1176 .name = "core_irq",
1177 .flags = IORESOURCE_IRQ,
1178 .start = SDC4_IRQ_0,
1179 .end = SDC4_IRQ_0
1180 },
1181#ifdef CONFIG_MMC_MSM_SPS_SUPPORT
1182 {
1183 .name = "sdcc_dml_addr",
1184 .start = MSM_SDC4_DML_BASE,
1185 .end = MSM_SDC4_BAM_BASE - 1,
1186 .flags = IORESOURCE_MEM,
1187 },
1188 {
1189 .name = "sdcc_bam_addr",
1190 .start = MSM_SDC4_BAM_BASE,
1191 .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1,
1192 .flags = IORESOURCE_MEM,
1193 },
1194 {
1195 .name = "sdcc_bam_irq",
1196 .start = SDC4_BAM_IRQ,
1197 .end = SDC4_BAM_IRQ,
1198 .flags = IORESOURCE_IRQ,
1199 },
1200#endif
1201};
1202
1203struct platform_device apq8064_device_sdc1 = {
1204 .name = "msm_sdcc",
1205 .id = 1,
1206 .num_resources = ARRAY_SIZE(resources_sdc1),
1207 .resource = resources_sdc1,
1208 .dev = {
1209 .coherent_dma_mask = 0xffffffff,
1210 },
1211};
1212
1213struct platform_device apq8064_device_sdc2 = {
1214 .name = "msm_sdcc",
1215 .id = 2,
1216 .num_resources = ARRAY_SIZE(resources_sdc2),
1217 .resource = resources_sdc2,
1218 .dev = {
1219 .coherent_dma_mask = 0xffffffff,
1220 },
1221};
1222
1223struct platform_device apq8064_device_sdc3 = {
1224 .name = "msm_sdcc",
1225 .id = 3,
1226 .num_resources = ARRAY_SIZE(resources_sdc3),
1227 .resource = resources_sdc3,
1228 .dev = {
1229 .coherent_dma_mask = 0xffffffff,
1230 },
1231};
1232
1233struct platform_device apq8064_device_sdc4 = {
1234 .name = "msm_sdcc",
1235 .id = 4,
1236 .num_resources = ARRAY_SIZE(resources_sdc4),
1237 .resource = resources_sdc4,
1238 .dev = {
1239 .coherent_dma_mask = 0xffffffff,
1240 },
1241};
1242
1243static struct platform_device *apq8064_sdcc_devices[] __initdata = {
1244 &apq8064_device_sdc1,
1245 &apq8064_device_sdc2,
1246 &apq8064_device_sdc3,
1247 &apq8064_device_sdc4,
1248};
1249
1250int __init apq8064_add_sdcc(unsigned int controller,
1251 struct mmc_platform_data *plat)
1252{
1253 struct platform_device *pdev;
1254
1255 if (!plat)
1256 return 0;
1257 if (controller < 1 || controller > 4)
1258 return -EINVAL;
1259
1260 pdev = apq8064_sdcc_devices[controller-1];
1261 pdev->dev.platform_data = plat;
1262 return platform_device_register(pdev);
1263}
1264
Yan He06913ce2011-08-26 16:33:46 -07001265static struct resource resources_sps[] = {
1266 {
1267 .name = "pipe_mem",
1268 .start = 0x12800000,
1269 .end = 0x12800000 + 0x4000 - 1,
1270 .flags = IORESOURCE_MEM,
1271 },
1272 {
1273 .name = "bamdma_dma",
1274 .start = 0x12240000,
1275 .end = 0x12240000 + 0x1000 - 1,
1276 .flags = IORESOURCE_MEM,
1277 },
1278 {
1279 .name = "bamdma_bam",
1280 .start = 0x12244000,
1281 .end = 0x12244000 + 0x4000 - 1,
1282 .flags = IORESOURCE_MEM,
1283 },
1284 {
1285 .name = "bamdma_irq",
1286 .start = SPS_BAM_DMA_IRQ,
1287 .end = SPS_BAM_DMA_IRQ,
1288 .flags = IORESOURCE_IRQ,
1289 },
1290};
1291
Gagan Mac8a7a5d32011-11-11 16:43:06 -07001292struct platform_device msm_bus_8064_sys_fabric = {
1293 .name = "msm_bus_fabric",
1294 .id = MSM_BUS_FAB_SYSTEM,
1295};
1296struct platform_device msm_bus_8064_apps_fabric = {
1297 .name = "msm_bus_fabric",
1298 .id = MSM_BUS_FAB_APPSS,
1299};
1300struct platform_device msm_bus_8064_mm_fabric = {
1301 .name = "msm_bus_fabric",
1302 .id = MSM_BUS_FAB_MMSS,
1303};
1304struct platform_device msm_bus_8064_sys_fpb = {
1305 .name = "msm_bus_fabric",
1306 .id = MSM_BUS_FAB_SYSTEM_FPB,
1307};
1308struct platform_device msm_bus_8064_cpss_fpb = {
1309 .name = "msm_bus_fabric",
1310 .id = MSM_BUS_FAB_CPSS_FPB,
1311};
1312
Yan He06913ce2011-08-26 16:33:46 -07001313static struct msm_sps_platform_data msm_sps_pdata = {
1314 .bamdma_restricted_pipes = 0x06,
1315};
1316
1317struct platform_device msm_device_sps_apq8064 = {
1318 .name = "msm_sps",
1319 .id = -1,
1320 .num_resources = ARRAY_SIZE(resources_sps),
1321 .resource = resources_sps,
1322 .dev.platform_data = &msm_sps_pdata,
1323};
1324
Eric Holmberg023d25c2012-03-01 12:27:55 -07001325static struct resource smd_resource[] = {
1326 {
1327 .name = "a9_m2a_0",
1328 .start = INT_A9_M2A_0,
1329 .flags = IORESOURCE_IRQ,
1330 },
1331 {
1332 .name = "a9_m2a_5",
1333 .start = INT_A9_M2A_5,
1334 .flags = IORESOURCE_IRQ,
1335 },
1336 {
1337 .name = "adsp_a11",
1338 .start = INT_ADSP_A11,
1339 .flags = IORESOURCE_IRQ,
1340 },
1341 {
1342 .name = "adsp_a11_smsm",
1343 .start = INT_ADSP_A11_SMSM,
1344 .flags = IORESOURCE_IRQ,
1345 },
1346 {
1347 .name = "dsps_a11",
1348 .start = INT_DSPS_A11,
1349 .flags = IORESOURCE_IRQ,
1350 },
1351 {
1352 .name = "dsps_a11_smsm",
1353 .start = INT_DSPS_A11_SMSM,
1354 .flags = IORESOURCE_IRQ,
1355 },
1356 {
1357 .name = "wcnss_a11",
1358 .start = INT_WCNSS_A11,
1359 .flags = IORESOURCE_IRQ,
1360 },
1361 {
1362 .name = "wcnss_a11_smsm",
1363 .start = INT_WCNSS_A11_SMSM,
1364 .flags = IORESOURCE_IRQ,
1365 },
1366};
1367
1368static struct smd_subsystem_config smd_config_list[] = {
1369 {
1370 .irq_config_id = SMD_MODEM,
1371 .subsys_name = "gss",
1372 .edge = SMD_APPS_MODEM,
1373
1374 .smd_int.irq_name = "a9_m2a_0",
1375 .smd_int.flags = IRQF_TRIGGER_RISING,
1376 .smd_int.irq_id = -1,
1377 .smd_int.device_name = "smd_dev",
1378 .smd_int.dev_id = 0,
1379 .smd_int.out_bit_pos = 1 << 3,
1380 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1381 .smd_int.out_offset = 0x8,
1382
1383 .smsm_int.irq_name = "a9_m2a_5",
1384 .smsm_int.flags = IRQF_TRIGGER_RISING,
1385 .smsm_int.irq_id = -1,
1386 .smsm_int.device_name = "smd_smsm",
1387 .smsm_int.dev_id = 0,
1388 .smsm_int.out_bit_pos = 1 << 4,
1389 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1390 .smsm_int.out_offset = 0x8,
1391 },
1392 {
1393 .irq_config_id = SMD_Q6,
1394 .subsys_name = "q6",
1395 .edge = SMD_APPS_QDSP,
1396
1397 .smd_int.irq_name = "adsp_a11",
1398 .smd_int.flags = IRQF_TRIGGER_RISING,
1399 .smd_int.irq_id = -1,
1400 .smd_int.device_name = "smd_dev",
1401 .smd_int.dev_id = 0,
1402 .smd_int.out_bit_pos = 1 << 15,
1403 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1404 .smd_int.out_offset = 0x8,
1405
1406 .smsm_int.irq_name = "adsp_a11_smsm",
1407 .smsm_int.flags = IRQF_TRIGGER_RISING,
1408 .smsm_int.irq_id = -1,
1409 .smsm_int.device_name = "smd_smsm",
1410 .smsm_int.dev_id = 0,
1411 .smsm_int.out_bit_pos = 1 << 14,
1412 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1413 .smsm_int.out_offset = 0x8,
1414 },
1415 {
1416 .irq_config_id = SMD_DSPS,
1417 .subsys_name = "dsps",
1418 .edge = SMD_APPS_DSPS,
1419
1420 .smd_int.irq_name = "dsps_a11",
1421 .smd_int.flags = IRQF_TRIGGER_RISING,
1422 .smd_int.irq_id = -1,
1423 .smd_int.device_name = "smd_dev",
1424 .smd_int.dev_id = 0,
1425 .smd_int.out_bit_pos = 1,
1426 .smd_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1427 .smd_int.out_offset = 0x4080,
1428
1429 .smsm_int.irq_name = "dsps_a11_smsm",
1430 .smsm_int.flags = IRQF_TRIGGER_RISING,
1431 .smsm_int.irq_id = -1,
1432 .smsm_int.device_name = "smd_smsm",
1433 .smsm_int.dev_id = 0,
1434 .smsm_int.out_bit_pos = 1,
1435 .smsm_int.out_base = (void __iomem *)MSM_SIC_NON_SECURE_BASE,
1436 .smsm_int.out_offset = 0x4094,
1437 },
1438 {
1439 .irq_config_id = SMD_WCNSS,
1440 .subsys_name = "wcnss",
1441 .edge = SMD_APPS_WCNSS,
1442
1443 .smd_int.irq_name = "wcnss_a11",
1444 .smd_int.flags = IRQF_TRIGGER_RISING,
1445 .smd_int.irq_id = -1,
1446 .smd_int.device_name = "smd_dev",
1447 .smd_int.dev_id = 0,
1448 .smd_int.out_bit_pos = 1 << 25,
1449 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1450 .smd_int.out_offset = 0x8,
1451
1452 .smsm_int.irq_name = "wcnss_a11_smsm",
1453 .smsm_int.flags = IRQF_TRIGGER_RISING,
1454 .smsm_int.irq_id = -1,
1455 .smsm_int.device_name = "smd_smsm",
1456 .smsm_int.dev_id = 0,
1457 .smsm_int.out_bit_pos = 1 << 23,
1458 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
1459 .smsm_int.out_offset = 0x8,
1460 },
1461};
1462
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001463static struct smd_subsystem_restart_config smd_ssr_config = {
1464 .disable_smsm_reset_handshake = 1,
1465};
1466
Eric Holmberg023d25c2012-03-01 12:27:55 -07001467static struct smd_platform smd_platform_data = {
1468 .num_ss_configs = ARRAY_SIZE(smd_config_list),
1469 .smd_ss_configs = smd_config_list,
Eric Holmberg2bb6ccd2012-03-13 13:05:14 -06001470 .smd_ssr_config = &smd_ssr_config,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001471};
1472
Jeff Hugo0c0f5e92011-09-28 13:55:45 -06001473struct platform_device msm_device_smd_apq8064 = {
1474 .name = "msm_smd",
1475 .id = -1,
Eric Holmberg023d25c2012-03-01 12:27:55 -07001476 .resource = smd_resource,
1477 .num_resources = ARRAY_SIZE(smd_resource),
1478 .dev = {
1479 .platform_data = &smd_platform_data,
1480 },
Jeff Hugo0c0f5e92011-09-28 13:55:45 -06001481};
1482
Ramesh Masavarapuf46be1b2011-11-03 11:13:41 -07001483#ifdef CONFIG_HW_RANDOM_MSM
1484/* PRNG device */
1485#define MSM_PRNG_PHYS 0x1A500000
1486static struct resource rng_resources = {
1487 .flags = IORESOURCE_MEM,
1488 .start = MSM_PRNG_PHYS,
1489 .end = MSM_PRNG_PHYS + SZ_512 - 1,
1490};
1491
1492struct platform_device apq8064_device_rng = {
1493 .name = "msm_rng",
1494 .id = 0,
1495 .num_resources = 1,
1496 .resource = &rng_resources,
1497};
1498#endif
1499
Matt Wagantall292aace2012-01-26 19:12:34 -08001500static struct resource msm_gss_resources[] = {
1501 {
1502 .start = 0x10000000,
1503 .end = 0x10000000 + SZ_256 - 1,
1504 .flags = IORESOURCE_MEM,
1505 },
Matt Wagantall19ac4fd2012-02-03 20:18:23 -08001506 {
1507 .start = 0x10008000,
1508 .end = 0x10008000 + SZ_256 - 1,
1509 .flags = IORESOURCE_MEM,
1510 },
Matt Wagantall292aace2012-01-26 19:12:34 -08001511};
1512
1513struct platform_device msm_gss = {
1514 .name = "pil_gss",
1515 .id = -1,
1516 .num_resources = ARRAY_SIZE(msm_gss_resources),
1517 .resource = msm_gss_resources,
1518};
1519
Matt Wagantall1875d322012-02-22 16:11:33 -08001520struct platform_device *apq8064_fs_devices[] = {
1521 FS_8X60(FS_ROT, "fs_rot"),
1522 FS_8X60(FS_IJPEG, "fs_ijpeg"),
1523 FS_8X60(FS_VFE, "fs_vfe"),
1524 FS_8X60(FS_VPE, "fs_vpe"),
1525 FS_8X60(FS_GFX3D, "fs_gfx3d"),
1526 FS_8X60(FS_VED, "fs_ved"),
1527 FS_8X60(FS_VCAP, "fs_vcap"),
1528};
1529unsigned apq8064_num_fs_devices = ARRAY_SIZE(apq8064_fs_devices);
1530
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001531static struct clk_lookup msm_clocks_8064_dummy[] = {
1532 CLK_DUMMY("pll2", PLL2, NULL, 0),
1533 CLK_DUMMY("pll8", PLL8, NULL, 0),
1534 CLK_DUMMY("pll4", PLL4, NULL, 0),
1535
1536 CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0),
1537 CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0),
1538 CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0),
1539 CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0),
1540 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1541 CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0),
1542 CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0),
1543 CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0),
1544 CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0),
1545 CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0),
1546 CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0),
1547 CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0),
1548 CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0),
1549 CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0),
1550 CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0),
1551 CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0),
1552
Matt Wagantalle2522372011-08-17 14:52:21 -07001553 CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF),
1554 CLK_DUMMY("core_clk", GSBI2_UART_CLK, NULL, OFF),
1555 CLK_DUMMY("core_clk", GSBI3_UART_CLK,
Jing Lin04601f92012-02-05 15:36:07 -08001556 NULL, OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001557 CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF),
1558 CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF),
1559 CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF),
1560 CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF),
1561 CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF),
1562 CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF),
1563 CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF),
1564 CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF),
1565 CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001566 CLK_DUMMY("core_clk", GSBI1_QUP_CLK, NULL, OFF),
1567 CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF),
Jing Lin04601f92012-02-05 15:36:07 -08001568 CLK_DUMMY("core_clk", GSBI3_QUP_CLK, "qup_i2c.3", OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001569 CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF),
1570 CLK_DUMMY("core_clk", GSBI5_QUP_CLK, "spi_qsd.0", OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001571 CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF),
1572 CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001573 CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF),
Matt Wagantalld86d6832011-08-17 14:06:55 -07001574 CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF),
Ramesh Masavarapuf46be1b2011-11-03 11:13:41 -07001575 CLK_DUMMY("core_clk", PRNG_CLK, "msm_rng.0", OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001576 CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF),
1577 CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF),
1578 CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF),
1579 CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001580 CLK_DUMMY("ref_clk", TSIF_REF_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001581 CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08001582 CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF),
1583 CLK_DUMMY("alt_core_clk", USB_HS3_XCVR_CLK, NULL, OFF),
1584 CLK_DUMMY("alt_core_clk", USB_HS4_XCVR_CLK, NULL, OFF),
1585 CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF),
1586 CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF),
1587 CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF),
1588 CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF),
Matt Wagantallc4b3a4d2011-08-17 16:58:39 -07001589 CLK_DUMMY("core_clk", CE2_CLK, NULL, OFF),
1590 CLK_DUMMY("core_clk", CE1_CORE_CLK, NULL, OFF),
1591 CLK_DUMMY("core_clk", CE3_CORE_CLK, NULL, OFF),
1592 CLK_DUMMY("iface_clk", CE3_P_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001593 CLK_DUMMY("pcie_pclk", PCIE_P_CLK, NULL, OFF),
1594 CLK_DUMMY("pcie_alt_ref_clk", PCIE_ALT_REF_CLK, NULL, OFF),
1595 CLK_DUMMY("sata_rxoob_clk", SATA_RXOOB_CLK, NULL, OFF),
1596 CLK_DUMMY("sata_pmalive_clk", SATA_PMALIVE_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001597 CLK_DUMMY("ref_clk", SATA_PHY_REF_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001598 CLK_DUMMY("iface_clk", GSBI1_P_CLK, NULL, OFF),
1599 CLK_DUMMY("iface_clk", GSBI2_P_CLK, NULL, OFF),
Jing Lin04601f92012-02-05 15:36:07 -08001600 CLK_DUMMY("iface_clk", GSBI3_P_CLK, "qup_i2c.3", OFF),
Matt Wagantallac294852011-08-17 15:44:58 -07001601 CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF),
1602 CLK_DUMMY("iface_clk", GSBI5_P_CLK, "spi_qsd.0", OFF),
Matt Wagantalle2522372011-08-17 14:52:21 -07001603 CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF),
Matt Wagantall62cf63e2011-08-17 16:34:47 -07001604 CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF),
Matt Wagantall640e5fd2011-08-17 16:08:53 -07001605 CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF),
Manu Gautam5143b252012-01-05 19:25:23 -08001606 CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF),
1607 CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF),
1608 CLK_DUMMY("iface_clk", USB_HS3_P_CLK, NULL, OFF),
1609 CLK_DUMMY("iface_clk", USB_HS4_P_CLK, NULL, OFF),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001610 CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF),
1611 CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF),
1612 CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF),
1613 CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF),
Jin Hong01f2dbb2011-11-03 22:13:51 -07001614 CLK_DUMMY("core_clk", ADM0_CLK, "msm_dmov", OFF),
1615 CLK_DUMMY("iface_clk", ADM0_P_CLK, "msm_dmov", OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001616 CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF),
1617 CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF),
1618 CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF),
1619 CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF),
1620 CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001621 CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF),
1622 CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF),
1623 CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF),
1624 CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF),
1625 CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF),
1626 CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF),
1627 CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF),
1628 CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF),
1629 CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF),
1630 CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF),
1631 CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF),
1632 CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, NULL, OFF),
1633 CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, NULL, OFF),
1634 CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, NULL, OFF),
1635 CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001636 CLK_DUMMY("core_clk", VCAP_CLK, NULL, OFF),
1637 CLK_DUMMY("npl_clk", VCAP_NPL_CLK, NULL, OFF),
Pu Chen86b4be92011-11-03 17:27:57 -07001638 CLK_DUMMY("core_clk", GFX3D_CLK, "kgsl-3d0.0", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001639 CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001640 CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001641 CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001642 CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF),
1643 CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF),
1644 CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001645 CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001646 CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF),
Matt Wagantallb86ad262011-10-24 19:50:29 -07001647 CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001648 CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001649 CLK_DUMMY("rgb_tv_clk", RGB_TV_CLK, NULL, OFF),
1650 CLK_DUMMY("npl_tv_clk", NPL_TV_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001651 CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF),
Matt Wagantall5a4f1ba2011-08-18 18:13:03 -07001652 CLK_DUMMY("core_clk", HDMI_APP_CLK, "hdmi_msm.1", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001653 CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF),
1654 CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF),
1655 CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF),
1656 CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
1657 CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF),
1658 CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001659 CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001660 CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF),
1661 CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF),
1662 CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF),
1663 CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001664 CLK_DUMMY("bus_clk", GFX3D_AXI_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001665 CLK_DUMMY("vcap_axi_clk", VCAP_AXI_CLK, NULL, OFF),
1666 CLK_DUMMY("vcap_ahb_clk", VCAP_AHB_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001667 CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF),
1668 CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF),
1669 CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, NULL, OFF),
1670 CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, NULL, OFF),
1671 CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, NULL, OFF),
1672 CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, NULL, OFF),
Tianyi Gou86bb4722011-08-09 13:28:02 -07001673 CLK_DUMMY("lvds_clk", LVDS_CLK, NULL, OFF),
1674 CLK_DUMMY("mdp_p2clk", MDP_P2CLK, NULL, OFF),
1675 CLK_DUMMY("dsi2_pixel_clk", DSI2_PIXEL_CLK, NULL, OFF),
1676 CLK_DUMMY("lvds_ref_clk", LVDS_REF_CLK, NULL, OFF),
Pu Chen86b4be92011-11-03 17:27:57 -07001677 CLK_DUMMY("iface_clk", GFX3D_P_CLK, "kgsl-3d0.0", OFF),
Matt Wagantall5a4f1ba2011-08-18 18:13:03 -07001678 CLK_DUMMY("master_iface_clk", HDMI_M_P_CLK, "hdmi_msm.1", OFF),
1679 CLK_DUMMY("slave_iface_clk", HDMI_S_P_CLK, "hdmi_msm.1", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001680 CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF),
1681 CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF),
Matt Wagantall9dc01632011-08-17 18:55:04 -07001682 CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001683 CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF),
Matt Wagantalle604d712011-10-21 15:38:18 -07001684 CLK_DUMMY("iface_clk", SMMU_P_CLK, "msm_smmu", OFF),
Matt Wagantallbb90da92011-10-25 15:07:52 -07001685 CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001686 CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF),
1687 CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF),
1688 CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF),
1689 CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF),
1690 CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF),
1691 CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF),
1692 CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF),
1693 CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF),
1694 CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF),
1695 CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF),
1696 CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF),
1697 CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF),
1698 CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF),
1699 CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF),
Tianyi Gou142b8db2011-09-21 18:01:54 -07001700 CLK_DUMMY("audio_slimbus_clk", AUDIO_SLIMBUS_CLK, NULL, OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001701
1702 CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0),
Manu Gautam5143b252012-01-05 19:25:23 -08001703 CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, NULL, 0),
Matt Wagantall37ce3842011-08-17 16:00:36 -07001704 CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, NULL, 0),
1705 CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, NULL, 0),
1706 CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, NULL, 0),
1707 CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, NULL, 0),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001708 CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0),
1709 CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0),
Jin Hong01f2dbb2011-11-03 22:13:51 -07001710 CLK_DUMMY("mem_clk", EBI1_ADM_CLK, "msm_dmov", 0),
Ramesh Masavarapu28311912011-10-27 11:04:12 -07001711 CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qce.0", OFF),
1712 CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qcrypto.0", OFF),
1713 CLK_DUMMY("core_clk", CE3_CORE_CLK, "qce.0", OFF),
1714 CLK_DUMMY("core_clk", CE3_CORE_CLK, "qcrypto.0", OFF),
1715 CLK_DUMMY("iface_clk", CE3_P_CLK, "qce0.0", OFF),
1716 CLK_DUMMY("iface_clk", CE3_P_CLK, "qcrypto.0", OFF),
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001717};
1718
Stephen Boydbb600ae2011-08-02 20:11:40 -07001719struct clock_init_data apq8064_dummy_clock_init_data __initdata = {
1720 .table = msm_clocks_8064_dummy,
1721 .size = ARRAY_SIZE(msm_clocks_8064_dummy),
1722};
Praveen Chidambaram78499012011-11-01 17:15:17 -06001723
1724struct msm_rpm_platform_data apq8064_rpm_data __initdata = {
1725 .reg_base_addrs = {
1726 [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE,
1727 [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400,
1728 [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600,
1729 [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00,
1730 },
1731 .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ,
Stephen Boydf61255e2012-02-24 14:31:09 -08001732 .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ,
Praveen Chidambaram78499012011-11-01 17:15:17 -06001733 .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008,
1734 .ipc_rpm_val = 4,
1735 .target_id = {
1736 MSM_RPM_MAP(8064, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4),
1737 MSM_RPM_MAP(8064, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4),
1738 MSM_RPM_MAP(8064, INVALIDATE_0, INVALIDATE, 8),
1739 MSM_RPM_MAP(8064, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1),
1740 MSM_RPM_MAP(8064, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1),
1741 MSM_RPM_MAP(8064, RPM_CTL, RPM_CTL, 1),
1742 MSM_RPM_MAP(8064, CXO_CLK, CXO_CLK, 1),
1743 MSM_RPM_MAP(8064, PXO_CLK, PXO_CLK, 1),
1744 MSM_RPM_MAP(8064, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1),
1745 MSM_RPM_MAP(8064, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1),
1746 MSM_RPM_MAP(8064, MM_FABRIC_CLK, MM_FABRIC_CLK, 1),
1747 MSM_RPM_MAP(8064, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1),
1748 MSM_RPM_MAP(8064, SFPB_CLK, SFPB_CLK, 1),
1749 MSM_RPM_MAP(8064, CFPB_CLK, CFPB_CLK, 1),
1750 MSM_RPM_MAP(8064, MMFPB_CLK, MMFPB_CLK, 1),
1751 MSM_RPM_MAP(8064, EBI1_CLK, EBI1_CLK, 1),
1752 MSM_RPM_MAP(8064, APPS_FABRIC_CFG_HALT_0,
1753 APPS_FABRIC_CFG_HALT, 2),
1754 MSM_RPM_MAP(8064, APPS_FABRIC_CFG_CLKMOD_0,
1755 APPS_FABRIC_CFG_CLKMOD, 3),
1756 MSM_RPM_MAP(8064, APPS_FABRIC_CFG_IOCTL,
1757 APPS_FABRIC_CFG_IOCTL, 1),
1758 MSM_RPM_MAP(8064, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12),
1759 MSM_RPM_MAP(8064, SYS_FABRIC_CFG_HALT_0,
1760 SYS_FABRIC_CFG_HALT, 2),
1761 MSM_RPM_MAP(8064, SYS_FABRIC_CFG_CLKMOD_0,
1762 SYS_FABRIC_CFG_CLKMOD, 3),
1763 MSM_RPM_MAP(8064, SYS_FABRIC_CFG_IOCTL,
1764 SYS_FABRIC_CFG_IOCTL, 1),
1765 MSM_RPM_MAP(8064, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 30),
1766 MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_HALT_0,
1767 MMSS_FABRIC_CFG_HALT, 2),
1768 MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_CLKMOD_0,
1769 MMSS_FABRIC_CFG_CLKMOD, 3),
1770 MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_IOCTL,
1771 MMSS_FABRIC_CFG_IOCTL, 1),
1772 MSM_RPM_MAP(8064, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 21),
1773 MSM_RPM_MAP(8064, PM8921_S1_0, PM8921_S1, 2),
1774 MSM_RPM_MAP(8064, PM8921_S2_0, PM8921_S2, 2),
1775 MSM_RPM_MAP(8064, PM8921_S3_0, PM8921_S3, 2),
1776 MSM_RPM_MAP(8064, PM8921_S4_0, PM8921_S4, 2),
1777 MSM_RPM_MAP(8064, PM8921_S5_0, PM8921_S5, 2),
1778 MSM_RPM_MAP(8064, PM8921_S6_0, PM8921_S6, 2),
1779 MSM_RPM_MAP(8064, PM8921_S7_0, PM8921_S7, 2),
1780 MSM_RPM_MAP(8064, PM8921_S8_0, PM8921_S8, 2),
1781 MSM_RPM_MAP(8064, PM8921_L1_0, PM8921_L1, 2),
1782 MSM_RPM_MAP(8064, PM8921_L2_0, PM8921_L2, 2),
1783 MSM_RPM_MAP(8064, PM8921_L3_0, PM8921_L3, 2),
1784 MSM_RPM_MAP(8064, PM8921_L4_0, PM8921_L4, 2),
1785 MSM_RPM_MAP(8064, PM8921_L5_0, PM8921_L5, 2),
1786 MSM_RPM_MAP(8064, PM8921_L6_0, PM8921_L6, 2),
1787 MSM_RPM_MAP(8064, PM8921_L7_0, PM8921_L7, 2),
1788 MSM_RPM_MAP(8064, PM8921_L8_0, PM8921_L8, 2),
1789 MSM_RPM_MAP(8064, PM8921_L9_0, PM8921_L9, 2),
1790 MSM_RPM_MAP(8064, PM8921_L10_0, PM8921_L10, 2),
1791 MSM_RPM_MAP(8064, PM8921_L11_0, PM8921_L11, 2),
1792 MSM_RPM_MAP(8064, PM8921_L12_0, PM8921_L12, 2),
1793 MSM_RPM_MAP(8064, PM8921_L13_0, PM8921_L13, 2),
1794 MSM_RPM_MAP(8064, PM8921_L14_0, PM8921_L14, 2),
1795 MSM_RPM_MAP(8064, PM8921_L15_0, PM8921_L15, 2),
1796 MSM_RPM_MAP(8064, PM8921_L16_0, PM8921_L16, 2),
1797 MSM_RPM_MAP(8064, PM8921_L17_0, PM8921_L17, 2),
1798 MSM_RPM_MAP(8064, PM8921_L18_0, PM8921_L18, 2),
1799 MSM_RPM_MAP(8064, PM8921_L19_0, PM8921_L19, 2),
1800 MSM_RPM_MAP(8064, PM8921_L20_0, PM8921_L20, 2),
1801 MSM_RPM_MAP(8064, PM8921_L21_0, PM8921_L21, 2),
1802 MSM_RPM_MAP(8064, PM8921_L22_0, PM8921_L22, 2),
1803 MSM_RPM_MAP(8064, PM8921_L23_0, PM8921_L23, 2),
1804 MSM_RPM_MAP(8064, PM8921_L24_0, PM8921_L24, 2),
1805 MSM_RPM_MAP(8064, PM8921_L25_0, PM8921_L25, 2),
1806 MSM_RPM_MAP(8064, PM8921_L26_0, PM8921_L26, 2),
1807 MSM_RPM_MAP(8064, PM8921_L27_0, PM8921_L27, 2),
1808 MSM_RPM_MAP(8064, PM8921_L28_0, PM8921_L28, 2),
1809 MSM_RPM_MAP(8064, PM8921_L29_0, PM8921_L29, 2),
1810 MSM_RPM_MAP(8064, PM8921_CLK1_0, PM8921_CLK1, 2),
1811 MSM_RPM_MAP(8064, PM8921_CLK2_0, PM8921_CLK2, 2),
1812 MSM_RPM_MAP(8064, PM8921_LVS1, PM8921_LVS1, 1),
1813 MSM_RPM_MAP(8064, PM8921_LVS2, PM8921_LVS2, 1),
1814 MSM_RPM_MAP(8064, PM8921_LVS3, PM8921_LVS3, 1),
1815 MSM_RPM_MAP(8064, PM8921_LVS4, PM8921_LVS4, 1),
1816 MSM_RPM_MAP(8064, PM8921_LVS5, PM8921_LVS5, 1),
1817 MSM_RPM_MAP(8064, PM8921_LVS6, PM8921_LVS6, 1),
1818 MSM_RPM_MAP(8064, PM8921_LVS7, PM8921_LVS7, 1),
1819 MSM_RPM_MAP(8064, PM8821_S1_0, PM8821_S1, 2),
1820 MSM_RPM_MAP(8064, PM8821_S2_0, PM8821_S2, 2),
1821 MSM_RPM_MAP(8064, PM8821_L1_0, PM8821_L1, 2),
1822 MSM_RPM_MAP(8064, NCP_0, NCP, 2),
1823 MSM_RPM_MAP(8064, CXO_BUFFERS, CXO_BUFFERS, 1),
1824 MSM_RPM_MAP(8064, USB_OTG_SWITCH, USB_OTG_SWITCH, 1),
1825 MSM_RPM_MAP(8064, HDMI_SWITCH, HDMI_SWITCH, 1),
1826 MSM_RPM_MAP(8064, DDR_DMM_0, DDR_DMM, 2),
1827 MSM_RPM_MAP(8064, QDSS_CLK, QDSS_CLK, 1),
1828 },
1829 .target_status = {
1830 MSM_RPM_STATUS_ID_MAP(8064, VERSION_MAJOR),
1831 MSM_RPM_STATUS_ID_MAP(8064, VERSION_MINOR),
1832 MSM_RPM_STATUS_ID_MAP(8064, VERSION_BUILD),
1833 MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_0),
1834 MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_1),
1835 MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_2),
1836 MSM_RPM_STATUS_ID_MAP(8064, RESERVED_SUPPORTED_RESOURCES_0),
1837 MSM_RPM_STATUS_ID_MAP(8064, SEQUENCE),
1838 MSM_RPM_STATUS_ID_MAP(8064, RPM_CTL),
1839 MSM_RPM_STATUS_ID_MAP(8064, CXO_CLK),
1840 MSM_RPM_STATUS_ID_MAP(8064, PXO_CLK),
1841 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CLK),
1842 MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_CLK),
1843 MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_CLK),
1844 MSM_RPM_STATUS_ID_MAP(8064, DAYTONA_FABRIC_CLK),
1845 MSM_RPM_STATUS_ID_MAP(8064, SFPB_CLK),
1846 MSM_RPM_STATUS_ID_MAP(8064, CFPB_CLK),
1847 MSM_RPM_STATUS_ID_MAP(8064, MMFPB_CLK),
1848 MSM_RPM_STATUS_ID_MAP(8064, EBI1_CLK),
1849 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_HALT),
1850 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_CLKMOD),
1851 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_IOCTL),
1852 MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_ARB),
1853 MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_HALT),
1854 MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_CLKMOD),
1855 MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_IOCTL),
1856 MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_ARB),
1857 MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_HALT),
1858 MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_CLKMOD),
1859 MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_IOCTL),
1860 MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_ARB),
1861 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_0),
1862 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_1),
1863 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_0),
1864 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_1),
1865 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_0),
1866 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_1),
1867 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_0),
1868 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_1),
1869 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_0),
1870 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_1),
1871 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_0),
1872 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_1),
1873 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_0),
1874 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_1),
1875 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_0),
1876 MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_1),
1877 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_0),
1878 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_1),
1879 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_0),
1880 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_1),
1881 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_0),
1882 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_1),
1883 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_0),
1884 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_1),
1885 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_0),
1886 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_1),
1887 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_0),
1888 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_1),
1889 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_0),
1890 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_1),
1891 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_0),
1892 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_1),
1893 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_0),
1894 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_1),
1895 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_0),
1896 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_1),
1897 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_0),
1898 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_1),
1899 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_0),
1900 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_1),
1901 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_0),
1902 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_1),
1903 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_0),
1904 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_1),
1905 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_0),
1906 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_1),
1907 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_0),
1908 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_1),
1909 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_0),
1910 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_1),
1911 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_0),
1912 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_1),
1913 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_0),
1914 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_1),
1915 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_0),
1916 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_1),
1917 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_0),
1918 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_1),
1919 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_0),
1920 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_1),
1921 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_0),
1922 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_1),
1923 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_0),
1924 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_1),
1925 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_0),
1926 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_1),
1927 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_0),
1928 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_1),
1929 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_0),
1930 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_1),
1931 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_0),
1932 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_1),
1933 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_0),
1934 MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_1),
1935 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_0),
1936 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_1),
1937 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_0),
1938 MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_1),
1939 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS1),
1940 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS2),
1941 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS3),
1942 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS4),
1943 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS5),
1944 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS6),
1945 MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS7),
1946 MSM_RPM_STATUS_ID_MAP(8064, NCP_0),
1947 MSM_RPM_STATUS_ID_MAP(8064, NCP_1),
1948 MSM_RPM_STATUS_ID_MAP(8064, CXO_BUFFERS),
1949 MSM_RPM_STATUS_ID_MAP(8064, USB_OTG_SWITCH),
1950 MSM_RPM_STATUS_ID_MAP(8064, HDMI_SWITCH),
1951 MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_0),
1952 MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_1),
1953 MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH0_RANGE),
1954 MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH1_RANGE),
1955 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_0),
1956 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_1),
1957 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_0),
1958 MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_1),
1959 MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_0),
1960 MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_1),
1961 },
1962 .target_ctrl_id = {
1963 MSM_RPM_CTRL_MAP(8064, VERSION_MAJOR),
1964 MSM_RPM_CTRL_MAP(8064, VERSION_MINOR),
1965 MSM_RPM_CTRL_MAP(8064, VERSION_BUILD),
1966 MSM_RPM_CTRL_MAP(8064, REQ_CTX_0),
1967 MSM_RPM_CTRL_MAP(8064, REQ_SEL_0),
1968 MSM_RPM_CTRL_MAP(8064, ACK_CTX_0),
1969 MSM_RPM_CTRL_MAP(8064, ACK_SEL_0),
1970 },
1971 .sel_invalidate = MSM_RPM_8064_SEL_INVALIDATE,
1972 .sel_notification = MSM_RPM_8064_SEL_NOTIFICATION,
1973 .sel_last = MSM_RPM_8064_SEL_LAST,
1974 .ver = {3, 0, 0},
1975};
1976
1977struct platform_device apq8064_rpm_device = {
1978 .name = "msm_rpm",
1979 .id = -1,
1980};
1981
1982static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = {
1983 .phys_addr_base = 0x0010D204,
1984 .phys_size = SZ_8K,
1985};
1986
1987struct platform_device apq8064_rpm_stat_device = {
1988 .name = "msm_rpm_stat",
1989 .id = -1,
1990 .dev = {
1991 .platform_data = &msm_rpm_stat_pdata,
1992 },
1993};
1994
1995static struct msm_rpm_log_platform_data msm_rpm_log_pdata = {
1996 .phys_addr_base = 0x0010C000,
1997 .reg_offsets = {
1998 [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080,
1999 [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0,
2000 },
2001 .phys_size = SZ_8K,
2002 .log_len = 4096, /* log's buffer length in bytes */
2003 .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */
2004};
2005
2006struct platform_device apq8064_rpm_log_device = {
2007 .name = "msm_rpm_log",
2008 .id = -1,
2009 .dev = {
2010 .platform_data = &msm_rpm_log_pdata,
2011 },
2012};
2013
Jin Hongd3024e62012-02-09 16:13:32 -08002014/* Sensors DSPS platform data */
2015
2016#define PPSS_REG_PHYS_BASE 0x12080000
2017
2018static struct dsps_clk_info dsps_clks[] = {};
2019static struct dsps_regulator_info dsps_regs[] = {};
2020
2021/*
2022 * Note: GPIOs field is intialized in run-time at the function
2023 * apq8064_init_dsps().
2024 */
2025
2026struct msm_dsps_platform_data msm_dsps_pdata_8064 = {
2027 .clks = dsps_clks,
2028 .clks_num = ARRAY_SIZE(dsps_clks),
2029 .gpios = NULL,
2030 .gpios_num = 0,
2031 .regs = dsps_regs,
2032 .regs_num = ARRAY_SIZE(dsps_regs),
2033 .dsps_pwr_ctl_en = 1,
2034 .signature = DSPS_SIGNATURE,
2035};
2036
2037static struct resource msm_dsps_resources[] = {
2038 {
2039 .start = PPSS_REG_PHYS_BASE,
2040 .end = PPSS_REG_PHYS_BASE + SZ_8K - 1,
2041 .name = "ppss_reg",
2042 .flags = IORESOURCE_MEM,
2043 },
2044
2045 {
2046 .start = PPSS_WDOG_TIMER_IRQ,
2047 .end = PPSS_WDOG_TIMER_IRQ,
2048 .name = "ppss_wdog",
2049 .flags = IORESOURCE_IRQ,
2050 },
2051};
2052
2053struct platform_device msm_dsps_device_8064 = {
2054 .name = "msm_dsps",
2055 .id = 0,
2056 .num_resources = ARRAY_SIZE(msm_dsps_resources),
2057 .resource = msm_dsps_resources,
2058 .dev.platform_data = &msm_dsps_pdata_8064,
2059};
2060
Praveen Chidambaram78499012011-11-01 17:15:17 -06002061#ifdef CONFIG_MSM_MPM
2062static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = {
2063 [1] = MSM_GPIO_TO_INT(26),
2064 [2] = MSM_GPIO_TO_INT(88),
2065 [4] = MSM_GPIO_TO_INT(73),
2066 [5] = MSM_GPIO_TO_INT(74),
2067 [6] = MSM_GPIO_TO_INT(75),
2068 [7] = MSM_GPIO_TO_INT(76),
2069 [8] = MSM_GPIO_TO_INT(77),
2070 [9] = MSM_GPIO_TO_INT(36),
2071 [10] = MSM_GPIO_TO_INT(84),
2072 [11] = MSM_GPIO_TO_INT(7),
2073 [12] = MSM_GPIO_TO_INT(11),
2074 [13] = MSM_GPIO_TO_INT(52),
2075 [14] = MSM_GPIO_TO_INT(15),
2076 [15] = MSM_GPIO_TO_INT(83),
2077 [16] = USB3_HS_IRQ,
2078 [19] = MSM_GPIO_TO_INT(61),
2079 [20] = MSM_GPIO_TO_INT(58),
2080 [23] = MSM_GPIO_TO_INT(65),
2081 [24] = MSM_GPIO_TO_INT(63),
2082 [25] = USB1_HS_IRQ,
2083 [27] = HDMI_IRQ,
2084 [29] = MSM_GPIO_TO_INT(22),
2085 [30] = MSM_GPIO_TO_INT(72),
2086 [31] = USB4_HS_IRQ,
2087 [33] = MSM_GPIO_TO_INT(44),
2088 [34] = MSM_GPIO_TO_INT(39),
2089 [35] = MSM_GPIO_TO_INT(19),
2090 [36] = MSM_GPIO_TO_INT(23),
2091 [37] = MSM_GPIO_TO_INT(41),
2092 [38] = MSM_GPIO_TO_INT(30),
2093 [41] = MSM_GPIO_TO_INT(42),
2094 [42] = MSM_GPIO_TO_INT(56),
2095 [43] = MSM_GPIO_TO_INT(55),
2096 [44] = MSM_GPIO_TO_INT(50),
2097 [45] = MSM_GPIO_TO_INT(49),
2098 [46] = MSM_GPIO_TO_INT(47),
2099 [47] = MSM_GPIO_TO_INT(45),
2100 [48] = MSM_GPIO_TO_INT(38),
2101 [49] = MSM_GPIO_TO_INT(34),
2102 [50] = MSM_GPIO_TO_INT(32),
2103 [51] = MSM_GPIO_TO_INT(29),
2104 [52] = MSM_GPIO_TO_INT(18),
2105 [53] = MSM_GPIO_TO_INT(10),
2106 [54] = MSM_GPIO_TO_INT(81),
2107 [55] = MSM_GPIO_TO_INT(6),
2108};
2109
2110static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = {
2111 TLMM_MSM_SUMMARY_IRQ,
2112 RPM_APCC_CPU0_GP_HIGH_IRQ,
2113 RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2114 RPM_APCC_CPU0_GP_LOW_IRQ,
2115 RPM_APCC_CPU0_WAKE_UP_IRQ,
2116 RPM_APCC_CPU1_GP_HIGH_IRQ,
2117 RPM_APCC_CPU1_GP_MEDIUM_IRQ,
2118 RPM_APCC_CPU1_GP_LOW_IRQ,
2119 RPM_APCC_CPU1_WAKE_UP_IRQ,
2120 MSS_TO_APPS_IRQ_0,
2121 MSS_TO_APPS_IRQ_1,
2122 MSS_TO_APPS_IRQ_2,
2123 MSS_TO_APPS_IRQ_3,
2124 MSS_TO_APPS_IRQ_4,
2125 MSS_TO_APPS_IRQ_5,
2126 MSS_TO_APPS_IRQ_6,
2127 MSS_TO_APPS_IRQ_7,
2128 MSS_TO_APPS_IRQ_8,
2129 MSS_TO_APPS_IRQ_9,
2130 LPASS_SCSS_GP_LOW_IRQ,
2131 LPASS_SCSS_GP_MEDIUM_IRQ,
2132 LPASS_SCSS_GP_HIGH_IRQ,
2133 SPS_MTI_30,
2134 SPS_MTI_31,
2135 RIVA_APSS_SPARE_IRQ,
2136 RIVA_APPS_WLAN_SMSM_IRQ,
2137 RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ,
2138 RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ,
2139};
2140
2141struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = {
2142 .irqs_m2a = msm_mpm_irqs_m2a,
2143 .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a),
2144 .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs,
2145 .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs),
2146 .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8,
2147 .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8,
2148 .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008,
2149 .mpm_apps_ipc_val = BIT(1),
2150 .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ,
2151
2152};
2153#endif
Joel Kingdacbc822012-01-25 13:30:57 -08002154
2155#define MDM2AP_ERRFATAL 19
2156#define AP2MDM_ERRFATAL 18
2157#define MDM2AP_STATUS 49
2158#define AP2MDM_STATUS 48
2159#define AP2MDM_PMIC_RESET_N 27
2160
2161static struct resource mdm_resources[] = {
2162 {
2163 .start = MDM2AP_ERRFATAL,
2164 .end = MDM2AP_ERRFATAL,
2165 .name = "MDM2AP_ERRFATAL",
2166 .flags = IORESOURCE_IO,
2167 },
2168 {
2169 .start = AP2MDM_ERRFATAL,
2170 .end = AP2MDM_ERRFATAL,
2171 .name = "AP2MDM_ERRFATAL",
2172 .flags = IORESOURCE_IO,
2173 },
2174 {
2175 .start = MDM2AP_STATUS,
2176 .end = MDM2AP_STATUS,
2177 .name = "MDM2AP_STATUS",
2178 .flags = IORESOURCE_IO,
2179 },
2180 {
2181 .start = AP2MDM_STATUS,
2182 .end = AP2MDM_STATUS,
2183 .name = "AP2MDM_STATUS",
2184 .flags = IORESOURCE_IO,
2185 },
2186 {
2187 .start = AP2MDM_PMIC_RESET_N,
2188 .end = AP2MDM_PMIC_RESET_N,
2189 .name = "AP2MDM_PMIC_RESET_N",
2190 .flags = IORESOURCE_IO,
2191 },
2192};
2193
2194struct platform_device mdm_8064_device = {
2195 .name = "mdm2_modem",
2196 .id = -1,
2197 .num_resources = ARRAY_SIZE(mdm_resources),
2198 .resource = mdm_resources,
2199};
Praveen Chidambaram8ea3dcd2011-12-07 14:46:31 -07002200
2201static int apq8064_LPM_latency = 1000; /* >100 usec for WFI */
2202
2203struct platform_device apq8064_cpu_idle_device = {
2204 .name = "msm_cpu_idle",
2205 .id = -1,
2206 .dev = {
2207 .platform_data = &apq8064_LPM_latency,
2208 },
2209};
Praveen Chidambaram5c8adf22012-02-23 18:44:37 -07002210
2211static struct msm_dcvs_freq_entry apq8064_freq[] = {
2212 { 384000, 166981, 345600},
2213 { 702000, 213049, 632502},
2214 {1026000, 285712, 925613},
2215 {1242000, 383945, 1176550},
2216 {1458000, 419729, 1465478},
2217 {1512000, 434116, 1546674},
2218
2219};
2220
2221static struct msm_dcvs_core_info apq8064_core_info = {
2222 .freq_tbl = &apq8064_freq[0],
2223 .core_param = {
2224 .max_time_us = 100000,
2225 .num_freq = ARRAY_SIZE(apq8064_freq),
2226 },
2227 .algo_param = {
2228 .slack_time_us = 58000,
2229 .scale_slack_time = 0,
2230 .scale_slack_time_pct = 0,
2231 .disable_pc_threshold = 1458000,
2232 .em_window_size = 100000,
2233 .em_max_util_pct = 97,
2234 .ss_window_size = 1000000,
2235 .ss_util_pct = 95,
2236 .ss_iobusy_conv = 100,
2237 },
2238};
2239
2240struct platform_device apq8064_msm_gov_device = {
2241 .name = "msm_dcvs_gov",
2242 .id = -1,
2243 .dev = {
2244 .platform_data = &apq8064_core_info,
2245 },
2246};
Stepan Moskovchenko28662c52012-03-01 12:48:45 -08002247
2248static struct resource msm_cache_erp_resources[] = {
2249 {
2250 .name = "l1_irq",
2251 .start = SC_SICCPUXEXTFAULTIRPTREQ,
2252 .flags = IORESOURCE_IRQ,
2253 },
2254 {
2255 .name = "l2_irq",
2256 .start = APCC_QGICL2IRPTREQ,
2257 .flags = IORESOURCE_IRQ,
2258 }
2259};
2260
2261struct platform_device apq8064_device_cache_erp = {
2262 .name = "msm_cache_erp",
2263 .id = -1,
2264 .num_resources = ARRAY_SIZE(msm_cache_erp_resources),
2265 .resource = msm_cache_erp_resources,
2266};
Pratik Patel212ab362012-03-16 12:30:07 -07002267
2268#define MSM_QDSS_PHYS_BASE 0x01A00000
2269#define MSM_ETM_PHYS_BASE (MSM_QDSS_PHYS_BASE + 0x1C000)
2270
2271#define QDSS_SOURCE(src_name, fpm) { .name = src_name, .fport_mask = fpm, }
2272
2273static struct qdss_source msm_qdss_sources[] = {
2274 QDSS_SOURCE("msm_etm", 0x33),
2275 QDSS_SOURCE("msm_oxili", 0x80),
2276};
2277
2278static struct msm_qdss_platform_data qdss_pdata = {
2279 .src_table = msm_qdss_sources,
2280 .size = ARRAY_SIZE(msm_qdss_sources),
2281 .afamily = 1,
2282};
2283
2284struct platform_device apq8064_qdss_device = {
2285 .name = "msm_qdss",
2286 .id = -1,
2287 .dev = {
2288 .platform_data = &qdss_pdata,
2289 },
2290};
2291
2292static struct resource msm_etm_resources[] = {
2293 {
2294 .start = MSM_ETM_PHYS_BASE,
2295 .end = MSM_ETM_PHYS_BASE + (SZ_4K * 4) - 1,
2296 .flags = IORESOURCE_MEM,
2297 },
2298};
2299
2300struct platform_device apq8064_etm_device = {
2301 .name = "msm_etm",
2302 .id = 0,
2303 .num_resources = ARRAY_SIZE(msm_etm_resources),
2304 .resource = msm_etm_resources,
2305};