blob: 21428fe6ffa42a7b6b9d694085d47bf9d54b3133 [file] [log] [blame]
Paul Walmsley73591542010-02-22 22:09:32 -07001/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06005 * Copyright (C) 2012 Texas Instruments, Inc.
Paul Walmsley73591542010-02-22 22:09:32 -07006 * Paul Walmsley
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
14 *
15 * XXX these should be marked initdata for multi-OMAP kernels
16 */
17#include <plat/omap_hwmod.h>
18#include <mach/irqs.h>
19#include <plat/cpu.h>
20#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053021#include <plat/serial.h>
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000022#include <plat/l3_3xxx.h>
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053023#include <plat/l4_3xxx.h>
24#include <plat/i2c.h>
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080025#include <plat/gpio.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080026#include <plat/mmc.h>
Charulatha Vdc48e5f2011-02-24 15:16:49 +053027#include <plat/mcbsp.h>
Charulatha V0f616a42011-02-17 09:53:10 -080028#include <plat/mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070029#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070030
Paul Walmsley43b40992010-02-22 22:09:34 -070031#include "omap_hwmod_common_data.h"
32
Shweta Gulaticea6b942012-02-29 23:33:37 +010033#include "smartreflex.h"
Paul Walmsley73591542010-02-22 22:09:32 -070034#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053035#include "cm-regbits-34xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070036#include "wd_timer.h"
Hema HK273ff8c2011-02-17 12:07:19 +053037#include <mach/am35xx.h>
Paul Walmsley73591542010-02-22 22:09:32 -070038
39/*
40 * OMAP3xxx hardware module integration data
41 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060042 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070043 * TI hardware database or other technical documentation. Data that
44 * is driver-specific or driver-kernel integration-specific belongs
45 * elsewhere.
46 */
47
Paul Walmsley844a3b62012-04-19 04:04:33 -060048/*
49 * IP blocks
50 */
Paul Walmsley73591542010-02-22 22:09:32 -070051
Paul Walmsley844a3b62012-04-19 04:04:33 -060052/* L3 */
53static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
54 { .irq = INT_34XX_L3_DBG_IRQ },
55 { .irq = INT_34XX_L3_APP_IRQ },
56 { .irq = -1 }
57};
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080058
Paul Walmsley844a3b62012-04-19 04:04:33 -060059static struct omap_hwmod omap3xxx_l3_main_hwmod = {
60 .name = "l3_main",
61 .class = &l3_hwmod_class,
62 .mpu_irqs = omap3xxx_l3_main_irqs,
63 .flags = HWMOD_NO_IDLEST,
64};
65
66/* L4 CORE */
67static struct omap_hwmod omap3xxx_l4_core_hwmod = {
68 .name = "l4_core",
69 .class = &l4_hwmod_class,
70 .flags = HWMOD_NO_IDLEST,
71};
72
73/* L4 PER */
74static struct omap_hwmod omap3xxx_l4_per_hwmod = {
75 .name = "l4_per",
76 .class = &l4_hwmod_class,
77 .flags = HWMOD_NO_IDLEST,
78};
79
80/* L4 WKUP */
81static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
82 .name = "l4_wkup",
83 .class = &l4_hwmod_class,
84 .flags = HWMOD_NO_IDLEST,
85};
86
87/* L4 SEC */
88static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
89 .name = "l4_sec",
90 .class = &l4_hwmod_class,
91 .flags = HWMOD_NO_IDLEST,
92};
93
94/* MPU */
95static struct omap_hwmod omap3xxx_mpu_hwmod = {
96 .name = "mpu",
97 .class = &mpu_hwmod_class,
98 .main_clk = "arm_fck",
99};
100
101/* IVA2 (IVA2) */
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600102static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
103 { .name = "logic", .rst_shift = 0 },
104 { .name = "seq0", .rst_shift = 1 },
105 { .name = "seq1", .rst_shift = 2 },
106};
107
Paul Walmsley844a3b62012-04-19 04:04:33 -0600108static struct omap_hwmod omap3xxx_iva_hwmod = {
109 .name = "iva",
110 .class = &iva_hwmod_class,
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600111 .clkdm_name = "iva2_clkdm",
112 .rst_lines = omap3xxx_iva_resets,
113 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
114 .main_clk = "iva2_ck",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600115};
116
117/* timer class */
118static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
119 .rev_offs = 0x0000,
120 .sysc_offs = 0x0010,
121 .syss_offs = 0x0014,
122 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
123 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
124 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
125 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
126 .sysc_fields = &omap_hwmod_sysc_type1,
127};
128
129static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
130 .name = "timer",
131 .sysc = &omap3xxx_timer_1ms_sysc,
132 .rev = OMAP_TIMER_IP_VERSION_1,
133};
134
135static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
136 .rev_offs = 0x0000,
137 .sysc_offs = 0x0010,
138 .syss_offs = 0x0014,
139 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
140 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
141 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
142 .sysc_fields = &omap_hwmod_sysc_type1,
143};
144
145static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
146 .name = "timer",
147 .sysc = &omap3xxx_timer_sysc,
148 .rev = OMAP_TIMER_IP_VERSION_1,
149};
150
151/* secure timers dev attribute */
152static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
153 .timer_capability = OMAP_TIMER_SECURE,
154};
155
156/* always-on timers dev attribute */
157static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
158 .timer_capability = OMAP_TIMER_ALWON,
159};
160
161/* pwm timers dev attribute */
162static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
163 .timer_capability = OMAP_TIMER_HAS_PWM,
164};
165
166/* timer1 */
167static struct omap_hwmod omap3xxx_timer1_hwmod = {
168 .name = "timer1",
169 .mpu_irqs = omap2_timer1_mpu_irqs,
170 .main_clk = "gpt1_fck",
171 .prcm = {
172 .omap2 = {
173 .prcm_reg_id = 1,
174 .module_bit = OMAP3430_EN_GPT1_SHIFT,
175 .module_offs = WKUP_MOD,
176 .idlest_reg_id = 1,
177 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
178 },
179 },
180 .dev_attr = &capability_alwon_dev_attr,
181 .class = &omap3xxx_timer_1ms_hwmod_class,
182};
183
184/* timer2 */
185static struct omap_hwmod omap3xxx_timer2_hwmod = {
186 .name = "timer2",
187 .mpu_irqs = omap2_timer2_mpu_irqs,
188 .main_clk = "gpt2_fck",
189 .prcm = {
190 .omap2 = {
191 .prcm_reg_id = 1,
192 .module_bit = OMAP3430_EN_GPT2_SHIFT,
193 .module_offs = OMAP3430_PER_MOD,
194 .idlest_reg_id = 1,
195 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
196 },
197 },
198 .dev_attr = &capability_alwon_dev_attr,
199 .class = &omap3xxx_timer_1ms_hwmod_class,
200};
201
202/* timer3 */
203static struct omap_hwmod omap3xxx_timer3_hwmod = {
204 .name = "timer3",
205 .mpu_irqs = omap2_timer3_mpu_irqs,
206 .main_clk = "gpt3_fck",
207 .prcm = {
208 .omap2 = {
209 .prcm_reg_id = 1,
210 .module_bit = OMAP3430_EN_GPT3_SHIFT,
211 .module_offs = OMAP3430_PER_MOD,
212 .idlest_reg_id = 1,
213 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
214 },
215 },
216 .dev_attr = &capability_alwon_dev_attr,
217 .class = &omap3xxx_timer_hwmod_class,
218};
219
220/* timer4 */
221static struct omap_hwmod omap3xxx_timer4_hwmod = {
222 .name = "timer4",
223 .mpu_irqs = omap2_timer4_mpu_irqs,
224 .main_clk = "gpt4_fck",
225 .prcm = {
226 .omap2 = {
227 .prcm_reg_id = 1,
228 .module_bit = OMAP3430_EN_GPT4_SHIFT,
229 .module_offs = OMAP3430_PER_MOD,
230 .idlest_reg_id = 1,
231 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
232 },
233 },
234 .dev_attr = &capability_alwon_dev_attr,
235 .class = &omap3xxx_timer_hwmod_class,
236};
237
238/* timer5 */
239static struct omap_hwmod omap3xxx_timer5_hwmod = {
240 .name = "timer5",
241 .mpu_irqs = omap2_timer5_mpu_irqs,
242 .main_clk = "gpt5_fck",
243 .prcm = {
244 .omap2 = {
245 .prcm_reg_id = 1,
246 .module_bit = OMAP3430_EN_GPT5_SHIFT,
247 .module_offs = OMAP3430_PER_MOD,
248 .idlest_reg_id = 1,
249 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
250 },
251 },
252 .dev_attr = &capability_alwon_dev_attr,
253 .class = &omap3xxx_timer_hwmod_class,
254};
255
256/* timer6 */
257static struct omap_hwmod omap3xxx_timer6_hwmod = {
258 .name = "timer6",
259 .mpu_irqs = omap2_timer6_mpu_irqs,
260 .main_clk = "gpt6_fck",
261 .prcm = {
262 .omap2 = {
263 .prcm_reg_id = 1,
264 .module_bit = OMAP3430_EN_GPT6_SHIFT,
265 .module_offs = OMAP3430_PER_MOD,
266 .idlest_reg_id = 1,
267 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
268 },
269 },
270 .dev_attr = &capability_alwon_dev_attr,
271 .class = &omap3xxx_timer_hwmod_class,
272};
273
274/* timer7 */
275static struct omap_hwmod omap3xxx_timer7_hwmod = {
276 .name = "timer7",
277 .mpu_irqs = omap2_timer7_mpu_irqs,
278 .main_clk = "gpt7_fck",
279 .prcm = {
280 .omap2 = {
281 .prcm_reg_id = 1,
282 .module_bit = OMAP3430_EN_GPT7_SHIFT,
283 .module_offs = OMAP3430_PER_MOD,
284 .idlest_reg_id = 1,
285 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
286 },
287 },
288 .dev_attr = &capability_alwon_dev_attr,
289 .class = &omap3xxx_timer_hwmod_class,
290};
291
292/* timer8 */
293static struct omap_hwmod omap3xxx_timer8_hwmod = {
294 .name = "timer8",
295 .mpu_irqs = omap2_timer8_mpu_irqs,
296 .main_clk = "gpt8_fck",
297 .prcm = {
298 .omap2 = {
299 .prcm_reg_id = 1,
300 .module_bit = OMAP3430_EN_GPT8_SHIFT,
301 .module_offs = OMAP3430_PER_MOD,
302 .idlest_reg_id = 1,
303 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
304 },
305 },
306 .dev_attr = &capability_pwm_dev_attr,
307 .class = &omap3xxx_timer_hwmod_class,
308};
309
310/* timer9 */
311static struct omap_hwmod omap3xxx_timer9_hwmod = {
312 .name = "timer9",
313 .mpu_irqs = omap2_timer9_mpu_irqs,
314 .main_clk = "gpt9_fck",
315 .prcm = {
316 .omap2 = {
317 .prcm_reg_id = 1,
318 .module_bit = OMAP3430_EN_GPT9_SHIFT,
319 .module_offs = OMAP3430_PER_MOD,
320 .idlest_reg_id = 1,
321 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
322 },
323 },
324 .dev_attr = &capability_pwm_dev_attr,
325 .class = &omap3xxx_timer_hwmod_class,
326};
327
328/* timer10 */
329static struct omap_hwmod omap3xxx_timer10_hwmod = {
330 .name = "timer10",
331 .mpu_irqs = omap2_timer10_mpu_irqs,
332 .main_clk = "gpt10_fck",
333 .prcm = {
334 .omap2 = {
335 .prcm_reg_id = 1,
336 .module_bit = OMAP3430_EN_GPT10_SHIFT,
337 .module_offs = CORE_MOD,
338 .idlest_reg_id = 1,
339 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
340 },
341 },
342 .dev_attr = &capability_pwm_dev_attr,
343 .class = &omap3xxx_timer_1ms_hwmod_class,
344};
345
346/* timer11 */
347static struct omap_hwmod omap3xxx_timer11_hwmod = {
348 .name = "timer11",
349 .mpu_irqs = omap2_timer11_mpu_irqs,
350 .main_clk = "gpt11_fck",
351 .prcm = {
352 .omap2 = {
353 .prcm_reg_id = 1,
354 .module_bit = OMAP3430_EN_GPT11_SHIFT,
355 .module_offs = CORE_MOD,
356 .idlest_reg_id = 1,
357 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
358 },
359 },
360 .dev_attr = &capability_pwm_dev_attr,
361 .class = &omap3xxx_timer_hwmod_class,
362};
363
364/* timer12 */
365static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
366 { .irq = 95, },
367 { .irq = -1 }
368};
369
370static struct omap_hwmod omap3xxx_timer12_hwmod = {
371 .name = "timer12",
372 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
373 .main_clk = "gpt12_fck",
374 .prcm = {
375 .omap2 = {
376 .prcm_reg_id = 1,
377 .module_bit = OMAP3430_EN_GPT12_SHIFT,
378 .module_offs = WKUP_MOD,
379 .idlest_reg_id = 1,
380 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
381 },
382 },
383 .dev_attr = &capability_secure_dev_attr,
384 .class = &omap3xxx_timer_hwmod_class,
385};
386
387/*
388 * 'wd_timer' class
389 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
390 * overflow condition
391 */
392
393static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
394 .rev_offs = 0x0000,
395 .sysc_offs = 0x0010,
396 .syss_offs = 0x0014,
397 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
398 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
399 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
400 SYSS_HAS_RESET_STATUS),
401 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
402 .sysc_fields = &omap_hwmod_sysc_type1,
403};
404
405/* I2C common */
406static struct omap_hwmod_class_sysconfig i2c_sysc = {
407 .rev_offs = 0x00,
408 .sysc_offs = 0x20,
409 .syss_offs = 0x10,
410 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
411 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
412 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
413 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
414 .clockact = CLOCKACT_TEST_ICLK,
415 .sysc_fields = &omap_hwmod_sysc_type1,
416};
417
418static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
419 .name = "wd_timer",
420 .sysc = &omap3xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -0600421 .pre_shutdown = &omap2_wd_timer_disable,
422 .reset = &omap2_wd_timer_reset,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600423};
424
425static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
426 .name = "wd_timer2",
427 .class = &omap3xxx_wd_timer_hwmod_class,
428 .main_clk = "wdt2_fck",
429 .prcm = {
430 .omap2 = {
431 .prcm_reg_id = 1,
432 .module_bit = OMAP3430_EN_WDT2_SHIFT,
433 .module_offs = WKUP_MOD,
434 .idlest_reg_id = 1,
435 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
436 },
437 },
438 /*
439 * XXX: Use software supervised mode, HW supervised smartidle seems to
440 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
441 */
442 .flags = HWMOD_SWSUP_SIDLE,
443};
444
445/* UART1 */
446static struct omap_hwmod omap3xxx_uart1_hwmod = {
447 .name = "uart1",
448 .mpu_irqs = omap2_uart1_mpu_irqs,
449 .sdma_reqs = omap2_uart1_sdma_reqs,
450 .main_clk = "uart1_fck",
451 .prcm = {
452 .omap2 = {
453 .module_offs = CORE_MOD,
454 .prcm_reg_id = 1,
455 .module_bit = OMAP3430_EN_UART1_SHIFT,
456 .idlest_reg_id = 1,
457 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
458 },
459 },
460 .class = &omap2_uart_class,
461};
462
463/* UART2 */
464static struct omap_hwmod omap3xxx_uart2_hwmod = {
465 .name = "uart2",
466 .mpu_irqs = omap2_uart2_mpu_irqs,
467 .sdma_reqs = omap2_uart2_sdma_reqs,
468 .main_clk = "uart2_fck",
469 .prcm = {
470 .omap2 = {
471 .module_offs = CORE_MOD,
472 .prcm_reg_id = 1,
473 .module_bit = OMAP3430_EN_UART2_SHIFT,
474 .idlest_reg_id = 1,
475 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
476 },
477 },
478 .class = &omap2_uart_class,
479};
480
481/* UART3 */
482static struct omap_hwmod omap3xxx_uart3_hwmod = {
483 .name = "uart3",
484 .mpu_irqs = omap2_uart3_mpu_irqs,
485 .sdma_reqs = omap2_uart3_sdma_reqs,
486 .main_clk = "uart3_fck",
487 .prcm = {
488 .omap2 = {
489 .module_offs = OMAP3430_PER_MOD,
490 .prcm_reg_id = 1,
491 .module_bit = OMAP3430_EN_UART3_SHIFT,
492 .idlest_reg_id = 1,
493 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
494 },
495 },
496 .class = &omap2_uart_class,
497};
498
499/* UART4 */
500static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
501 { .irq = INT_36XX_UART4_IRQ, },
502 { .irq = -1 }
503};
504
505static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
506 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
507 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
508 { .dma_req = -1 }
509};
510
511static struct omap_hwmod omap36xx_uart4_hwmod = {
512 .name = "uart4",
513 .mpu_irqs = uart4_mpu_irqs,
514 .sdma_reqs = uart4_sdma_reqs,
515 .main_clk = "uart4_fck",
516 .prcm = {
517 .omap2 = {
518 .module_offs = OMAP3430_PER_MOD,
519 .prcm_reg_id = 1,
520 .module_bit = OMAP3630_EN_UART4_SHIFT,
521 .idlest_reg_id = 1,
522 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
523 },
524 },
525 .class = &omap2_uart_class,
526};
527
528static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
529 { .irq = INT_35XX_UART4_IRQ, },
530};
531
532static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
533 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
534 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
535};
536
537static struct omap_hwmod am35xx_uart4_hwmod = {
538 .name = "uart4",
539 .mpu_irqs = am35xx_uart4_mpu_irqs,
540 .sdma_reqs = am35xx_uart4_sdma_reqs,
541 .main_clk = "uart4_fck",
542 .prcm = {
543 .omap2 = {
544 .module_offs = CORE_MOD,
545 .prcm_reg_id = 1,
546 .module_bit = OMAP3430_EN_UART4_SHIFT,
547 .idlest_reg_id = 1,
548 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
549 },
550 },
551 .class = &omap2_uart_class,
552};
553
554static struct omap_hwmod_class i2c_class = {
555 .name = "i2c",
556 .sysc = &i2c_sysc,
557 .rev = OMAP_I2C_IP_VERSION_1,
558 .reset = &omap_i2c_reset,
559};
560
561static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
562 { .name = "dispc", .dma_req = 5 },
563 { .name = "dsi1", .dma_req = 74 },
564 { .dma_req = -1 }
565};
566
567/* dss */
568static struct omap_hwmod_opt_clk dss_opt_clks[] = {
569 /*
570 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
571 * driver does not use these clocks.
572 */
573 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
574 { .role = "tv_clk", .clk = "dss_tv_fck" },
575 /* required only on OMAP3430 */
576 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
577};
578
579static struct omap_hwmod omap3430es1_dss_core_hwmod = {
580 .name = "dss_core",
581 .class = &omap2_dss_hwmod_class,
582 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
583 .sdma_reqs = omap3xxx_dss_sdma_chs,
584 .prcm = {
585 .omap2 = {
586 .prcm_reg_id = 1,
587 .module_bit = OMAP3430_EN_DSS1_SHIFT,
588 .module_offs = OMAP3430_DSS_MOD,
589 .idlest_reg_id = 1,
590 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
591 },
592 },
593 .opt_clks = dss_opt_clks,
594 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
595 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
596};
597
598static struct omap_hwmod omap3xxx_dss_core_hwmod = {
599 .name = "dss_core",
600 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
601 .class = &omap2_dss_hwmod_class,
602 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
603 .sdma_reqs = omap3xxx_dss_sdma_chs,
604 .prcm = {
605 .omap2 = {
606 .prcm_reg_id = 1,
607 .module_bit = OMAP3430_EN_DSS1_SHIFT,
608 .module_offs = OMAP3430_DSS_MOD,
609 .idlest_reg_id = 1,
610 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
611 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
612 },
613 },
614 .opt_clks = dss_opt_clks,
615 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
616};
617
618/*
619 * 'dispc' class
620 * display controller
621 */
622
623static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
624 .rev_offs = 0x0000,
625 .sysc_offs = 0x0010,
626 .syss_offs = 0x0014,
627 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
628 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
629 SYSC_HAS_ENAWAKEUP),
630 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
631 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
632 .sysc_fields = &omap_hwmod_sysc_type1,
633};
634
635static struct omap_hwmod_class omap3_dispc_hwmod_class = {
636 .name = "dispc",
637 .sysc = &omap3_dispc_sysc,
638};
639
640static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
641 .name = "dss_dispc",
642 .class = &omap3_dispc_hwmod_class,
643 .mpu_irqs = omap2_dispc_irqs,
644 .main_clk = "dss1_alwon_fck",
645 .prcm = {
646 .omap2 = {
647 .prcm_reg_id = 1,
648 .module_bit = OMAP3430_EN_DSS1_SHIFT,
649 .module_offs = OMAP3430_DSS_MOD,
650 },
651 },
652 .flags = HWMOD_NO_IDLEST,
653 .dev_attr = &omap2_3_dss_dispc_dev_attr
654};
655
656/*
657 * 'dsi' class
658 * display serial interface controller
659 */
660
661static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
662 .name = "dsi",
663};
664
665static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
666 { .irq = 25 },
667 { .irq = -1 }
668};
669
670/* dss_dsi1 */
671static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
672 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
673};
674
675static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
676 .name = "dss_dsi1",
677 .class = &omap3xxx_dsi_hwmod_class,
678 .mpu_irqs = omap3xxx_dsi1_irqs,
679 .main_clk = "dss1_alwon_fck",
680 .prcm = {
681 .omap2 = {
682 .prcm_reg_id = 1,
683 .module_bit = OMAP3430_EN_DSS1_SHIFT,
684 .module_offs = OMAP3430_DSS_MOD,
685 },
686 },
687 .opt_clks = dss_dsi1_opt_clks,
688 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
689 .flags = HWMOD_NO_IDLEST,
690};
691
692static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
693 { .role = "ick", .clk = "dss_ick" },
694};
695
696static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
697 .name = "dss_rfbi",
698 .class = &omap2_rfbi_hwmod_class,
699 .main_clk = "dss1_alwon_fck",
700 .prcm = {
701 .omap2 = {
702 .prcm_reg_id = 1,
703 .module_bit = OMAP3430_EN_DSS1_SHIFT,
704 .module_offs = OMAP3430_DSS_MOD,
705 },
706 },
707 .opt_clks = dss_rfbi_opt_clks,
708 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
709 .flags = HWMOD_NO_IDLEST,
710};
711
712static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
713 /* required only on OMAP3430 */
714 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
715};
716
717static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
718 .name = "dss_venc",
719 .class = &omap2_venc_hwmod_class,
720 .main_clk = "dss_tv_fck",
721 .prcm = {
722 .omap2 = {
723 .prcm_reg_id = 1,
724 .module_bit = OMAP3430_EN_DSS1_SHIFT,
725 .module_offs = OMAP3430_DSS_MOD,
726 },
727 },
728 .opt_clks = dss_venc_opt_clks,
729 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
730 .flags = HWMOD_NO_IDLEST,
731};
732
733/* I2C1 */
734static struct omap_i2c_dev_attr i2c1_dev_attr = {
735 .fifo_depth = 8, /* bytes */
736 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
737 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
738 OMAP_I2C_FLAG_BUS_SHIFT_2,
739};
740
741static struct omap_hwmod omap3xxx_i2c1_hwmod = {
742 .name = "i2c1",
743 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
744 .mpu_irqs = omap2_i2c1_mpu_irqs,
745 .sdma_reqs = omap2_i2c1_sdma_reqs,
746 .main_clk = "i2c1_fck",
747 .prcm = {
748 .omap2 = {
749 .module_offs = CORE_MOD,
750 .prcm_reg_id = 1,
751 .module_bit = OMAP3430_EN_I2C1_SHIFT,
752 .idlest_reg_id = 1,
753 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
754 },
755 },
756 .class = &i2c_class,
757 .dev_attr = &i2c1_dev_attr,
758};
759
760/* I2C2 */
761static struct omap_i2c_dev_attr i2c2_dev_attr = {
762 .fifo_depth = 8, /* bytes */
763 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
764 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
765 OMAP_I2C_FLAG_BUS_SHIFT_2,
766};
767
768static struct omap_hwmod omap3xxx_i2c2_hwmod = {
769 .name = "i2c2",
770 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
771 .mpu_irqs = omap2_i2c2_mpu_irqs,
772 .sdma_reqs = omap2_i2c2_sdma_reqs,
773 .main_clk = "i2c2_fck",
774 .prcm = {
775 .omap2 = {
776 .module_offs = CORE_MOD,
777 .prcm_reg_id = 1,
778 .module_bit = OMAP3430_EN_I2C2_SHIFT,
779 .idlest_reg_id = 1,
780 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
781 },
782 },
783 .class = &i2c_class,
784 .dev_attr = &i2c2_dev_attr,
785};
786
787/* I2C3 */
788static struct omap_i2c_dev_attr i2c3_dev_attr = {
789 .fifo_depth = 64, /* bytes */
790 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
791 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
792 OMAP_I2C_FLAG_BUS_SHIFT_2,
793};
794
795static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
796 { .irq = INT_34XX_I2C3_IRQ, },
797 { .irq = -1 }
798};
799
800static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
801 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
802 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
803 { .dma_req = -1 }
804};
805
806static struct omap_hwmod omap3xxx_i2c3_hwmod = {
807 .name = "i2c3",
808 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
809 .mpu_irqs = i2c3_mpu_irqs,
810 .sdma_reqs = i2c3_sdma_reqs,
811 .main_clk = "i2c3_fck",
812 .prcm = {
813 .omap2 = {
814 .module_offs = CORE_MOD,
815 .prcm_reg_id = 1,
816 .module_bit = OMAP3430_EN_I2C3_SHIFT,
817 .idlest_reg_id = 1,
818 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
819 },
820 },
821 .class = &i2c_class,
822 .dev_attr = &i2c3_dev_attr,
823};
824
825/*
826 * 'gpio' class
827 * general purpose io module
828 */
829
830static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
831 .rev_offs = 0x0000,
832 .sysc_offs = 0x0010,
833 .syss_offs = 0x0014,
834 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
835 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
836 SYSS_HAS_RESET_STATUS),
837 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
838 .sysc_fields = &omap_hwmod_sysc_type1,
839};
840
841static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
842 .name = "gpio",
843 .sysc = &omap3xxx_gpio_sysc,
844 .rev = 1,
845};
846
847/* gpio_dev_attr */
848static struct omap_gpio_dev_attr gpio_dev_attr = {
849 .bank_width = 32,
850 .dbck_flag = true,
851};
852
853/* gpio1 */
854static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
855 { .role = "dbclk", .clk = "gpio1_dbck", },
856};
857
858static struct omap_hwmod omap3xxx_gpio1_hwmod = {
859 .name = "gpio1",
860 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
861 .mpu_irqs = omap2_gpio1_irqs,
862 .main_clk = "gpio1_ick",
863 .opt_clks = gpio1_opt_clks,
864 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
865 .prcm = {
866 .omap2 = {
867 .prcm_reg_id = 1,
868 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
869 .module_offs = WKUP_MOD,
870 .idlest_reg_id = 1,
871 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
872 },
873 },
874 .class = &omap3xxx_gpio_hwmod_class,
875 .dev_attr = &gpio_dev_attr,
876};
877
878/* gpio2 */
879static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
880 { .role = "dbclk", .clk = "gpio2_dbck", },
881};
882
883static struct omap_hwmod omap3xxx_gpio2_hwmod = {
884 .name = "gpio2",
885 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
886 .mpu_irqs = omap2_gpio2_irqs,
887 .main_clk = "gpio2_ick",
888 .opt_clks = gpio2_opt_clks,
889 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
890 .prcm = {
891 .omap2 = {
892 .prcm_reg_id = 1,
893 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
894 .module_offs = OMAP3430_PER_MOD,
895 .idlest_reg_id = 1,
896 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
897 },
898 },
899 .class = &omap3xxx_gpio_hwmod_class,
900 .dev_attr = &gpio_dev_attr,
901};
902
903/* gpio3 */
904static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
905 { .role = "dbclk", .clk = "gpio3_dbck", },
906};
907
908static struct omap_hwmod omap3xxx_gpio3_hwmod = {
909 .name = "gpio3",
910 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
911 .mpu_irqs = omap2_gpio3_irqs,
912 .main_clk = "gpio3_ick",
913 .opt_clks = gpio3_opt_clks,
914 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
915 .prcm = {
916 .omap2 = {
917 .prcm_reg_id = 1,
918 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
919 .module_offs = OMAP3430_PER_MOD,
920 .idlest_reg_id = 1,
921 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
922 },
923 },
924 .class = &omap3xxx_gpio_hwmod_class,
925 .dev_attr = &gpio_dev_attr,
926};
927
928/* gpio4 */
929static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
930 { .role = "dbclk", .clk = "gpio4_dbck", },
931};
932
933static struct omap_hwmod omap3xxx_gpio4_hwmod = {
934 .name = "gpio4",
935 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
936 .mpu_irqs = omap2_gpio4_irqs,
937 .main_clk = "gpio4_ick",
938 .opt_clks = gpio4_opt_clks,
939 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
940 .prcm = {
941 .omap2 = {
942 .prcm_reg_id = 1,
943 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
944 .module_offs = OMAP3430_PER_MOD,
945 .idlest_reg_id = 1,
946 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
947 },
948 },
949 .class = &omap3xxx_gpio_hwmod_class,
950 .dev_attr = &gpio_dev_attr,
951};
952
953/* gpio5 */
954static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
955 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
956 { .irq = -1 }
957};
958
959static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
960 { .role = "dbclk", .clk = "gpio5_dbck", },
961};
962
963static struct omap_hwmod omap3xxx_gpio5_hwmod = {
964 .name = "gpio5",
965 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
966 .mpu_irqs = omap3xxx_gpio5_irqs,
967 .main_clk = "gpio5_ick",
968 .opt_clks = gpio5_opt_clks,
969 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
970 .prcm = {
971 .omap2 = {
972 .prcm_reg_id = 1,
973 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
974 .module_offs = OMAP3430_PER_MOD,
975 .idlest_reg_id = 1,
976 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
977 },
978 },
979 .class = &omap3xxx_gpio_hwmod_class,
980 .dev_attr = &gpio_dev_attr,
981};
982
983/* gpio6 */
984static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
985 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
986 { .irq = -1 }
987};
988
989static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
990 { .role = "dbclk", .clk = "gpio6_dbck", },
991};
992
993static struct omap_hwmod omap3xxx_gpio6_hwmod = {
994 .name = "gpio6",
995 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
996 .mpu_irqs = omap3xxx_gpio6_irqs,
997 .main_clk = "gpio6_ick",
998 .opt_clks = gpio6_opt_clks,
999 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1000 .prcm = {
1001 .omap2 = {
1002 .prcm_reg_id = 1,
1003 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1004 .module_offs = OMAP3430_PER_MOD,
1005 .idlest_reg_id = 1,
1006 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1007 },
1008 },
1009 .class = &omap3xxx_gpio_hwmod_class,
1010 .dev_attr = &gpio_dev_attr,
1011};
1012
1013/* dma attributes */
1014static struct omap_dma_dev_attr dma_dev_attr = {
1015 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1016 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1017 .lch_count = 32,
1018};
1019
1020static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1021 .rev_offs = 0x0000,
1022 .sysc_offs = 0x002c,
1023 .syss_offs = 0x0028,
1024 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1025 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1026 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1027 SYSS_HAS_RESET_STATUS),
1028 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1029 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1030 .sysc_fields = &omap_hwmod_sysc_type1,
1031};
1032
1033static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1034 .name = "dma",
1035 .sysc = &omap3xxx_dma_sysc,
1036};
1037
1038/* dma_system */
1039static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1040 .name = "dma",
1041 .class = &omap3xxx_dma_hwmod_class,
1042 .mpu_irqs = omap2_dma_system_irqs,
1043 .main_clk = "core_l3_ick",
1044 .prcm = {
1045 .omap2 = {
1046 .module_offs = CORE_MOD,
1047 .prcm_reg_id = 1,
1048 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1049 .idlest_reg_id = 1,
1050 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1051 },
1052 },
1053 .dev_attr = &dma_dev_attr,
1054 .flags = HWMOD_NO_IDLEST,
1055};
1056
1057/*
1058 * 'mcbsp' class
1059 * multi channel buffered serial port controller
1060 */
1061
1062static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1063 .sysc_offs = 0x008c,
1064 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1065 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1066 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1067 .sysc_fields = &omap_hwmod_sysc_type1,
1068 .clockact = 0x2,
1069};
1070
1071static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1072 .name = "mcbsp",
1073 .sysc = &omap3xxx_mcbsp_sysc,
1074 .rev = MCBSP_CONFIG_TYPE3,
1075};
1076
1077/* mcbsp1 */
1078static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001079 { .name = "common", .irq = 16 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001080 { .name = "tx", .irq = 59 },
1081 { .name = "rx", .irq = 60 },
1082 { .irq = -1 }
1083};
1084
1085static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1086 .name = "mcbsp1",
1087 .class = &omap3xxx_mcbsp_hwmod_class,
1088 .mpu_irqs = omap3xxx_mcbsp1_irqs,
1089 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1090 .main_clk = "mcbsp1_fck",
1091 .prcm = {
1092 .omap2 = {
1093 .prcm_reg_id = 1,
1094 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1095 .module_offs = CORE_MOD,
1096 .idlest_reg_id = 1,
1097 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1098 },
1099 },
1100};
1101
1102/* mcbsp2 */
1103static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001104 { .name = "common", .irq = 17 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001105 { .name = "tx", .irq = 62 },
1106 { .name = "rx", .irq = 63 },
1107 { .irq = -1 }
1108};
1109
1110static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1111 .sidetone = "mcbsp2_sidetone",
1112};
1113
1114static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1115 .name = "mcbsp2",
1116 .class = &omap3xxx_mcbsp_hwmod_class,
1117 .mpu_irqs = omap3xxx_mcbsp2_irqs,
1118 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1119 .main_clk = "mcbsp2_fck",
1120 .prcm = {
1121 .omap2 = {
1122 .prcm_reg_id = 1,
1123 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1124 .module_offs = OMAP3430_PER_MOD,
1125 .idlest_reg_id = 1,
1126 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1127 },
1128 },
1129 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1130};
1131
1132/* mcbsp3 */
1133static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001134 { .name = "common", .irq = 22 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001135 { .name = "tx", .irq = 89 },
1136 { .name = "rx", .irq = 90 },
1137 { .irq = -1 }
1138};
1139
1140static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1141 .sidetone = "mcbsp3_sidetone",
1142};
1143
1144static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1145 .name = "mcbsp3",
1146 .class = &omap3xxx_mcbsp_hwmod_class,
1147 .mpu_irqs = omap3xxx_mcbsp3_irqs,
1148 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1149 .main_clk = "mcbsp3_fck",
1150 .prcm = {
1151 .omap2 = {
1152 .prcm_reg_id = 1,
1153 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1154 .module_offs = OMAP3430_PER_MOD,
1155 .idlest_reg_id = 1,
1156 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1157 },
1158 },
1159 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1160};
1161
1162/* mcbsp4 */
1163static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001164 { .name = "common", .irq = 23 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001165 { .name = "tx", .irq = 54 },
1166 { .name = "rx", .irq = 55 },
1167 { .irq = -1 }
1168};
1169
1170static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
1171 { .name = "rx", .dma_req = 20 },
1172 { .name = "tx", .dma_req = 19 },
1173 { .dma_req = -1 }
1174};
1175
1176static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1177 .name = "mcbsp4",
1178 .class = &omap3xxx_mcbsp_hwmod_class,
1179 .mpu_irqs = omap3xxx_mcbsp4_irqs,
1180 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
1181 .main_clk = "mcbsp4_fck",
1182 .prcm = {
1183 .omap2 = {
1184 .prcm_reg_id = 1,
1185 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1186 .module_offs = OMAP3430_PER_MOD,
1187 .idlest_reg_id = 1,
1188 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1189 },
1190 },
1191};
1192
1193/* mcbsp5 */
1194static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001195 { .name = "common", .irq = 27 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001196 { .name = "tx", .irq = 81 },
1197 { .name = "rx", .irq = 82 },
1198 { .irq = -1 }
1199};
1200
1201static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
1202 { .name = "rx", .dma_req = 22 },
1203 { .name = "tx", .dma_req = 21 },
1204 { .dma_req = -1 }
1205};
1206
1207static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1208 .name = "mcbsp5",
1209 .class = &omap3xxx_mcbsp_hwmod_class,
1210 .mpu_irqs = omap3xxx_mcbsp5_irqs,
1211 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
1212 .main_clk = "mcbsp5_fck",
1213 .prcm = {
1214 .omap2 = {
1215 .prcm_reg_id = 1,
1216 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1217 .module_offs = CORE_MOD,
1218 .idlest_reg_id = 1,
1219 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1220 },
1221 },
1222};
1223
1224/* 'mcbsp sidetone' class */
1225static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1226 .sysc_offs = 0x0010,
1227 .sysc_flags = SYSC_HAS_AUTOIDLE,
1228 .sysc_fields = &omap_hwmod_sysc_type1,
1229};
1230
1231static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1232 .name = "mcbsp_sidetone",
1233 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1234};
1235
1236/* mcbsp2_sidetone */
1237static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
1238 { .name = "irq", .irq = 4 },
1239 { .irq = -1 }
1240};
1241
1242static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1243 .name = "mcbsp2_sidetone",
1244 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1245 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
1246 .main_clk = "mcbsp2_fck",
1247 .prcm = {
1248 .omap2 = {
1249 .prcm_reg_id = 1,
1250 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1251 .module_offs = OMAP3430_PER_MOD,
1252 .idlest_reg_id = 1,
1253 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1254 },
1255 },
1256};
1257
1258/* mcbsp3_sidetone */
1259static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
1260 { .name = "irq", .irq = 5 },
1261 { .irq = -1 }
1262};
1263
1264static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1265 .name = "mcbsp3_sidetone",
1266 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1267 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
1268 .main_clk = "mcbsp3_fck",
1269 .prcm = {
1270 .omap2 = {
1271 .prcm_reg_id = 1,
1272 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1273 .module_offs = OMAP3430_PER_MOD,
1274 .idlest_reg_id = 1,
1275 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1276 },
1277 },
1278};
1279
1280/* SR common */
1281static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1282 .clkact_shift = 20,
1283};
1284
1285static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1286 .sysc_offs = 0x24,
1287 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1288 .clockact = CLOCKACT_TEST_ICLK,
1289 .sysc_fields = &omap34xx_sr_sysc_fields,
1290};
1291
1292static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1293 .name = "smartreflex",
1294 .sysc = &omap34xx_sr_sysc,
1295 .rev = 1,
1296};
1297
1298static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1299 .sidle_shift = 24,
1300 .enwkup_shift = 26,
1301};
1302
1303static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1304 .sysc_offs = 0x38,
1305 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1306 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1307 SYSC_NO_CACHE),
1308 .sysc_fields = &omap36xx_sr_sysc_fields,
1309};
1310
1311static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1312 .name = "smartreflex",
1313 .sysc = &omap36xx_sr_sysc,
1314 .rev = 2,
1315};
1316
1317/* SR1 */
1318static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1319 .sensor_voltdm_name = "mpu_iva",
1320};
1321
1322static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
1323 { .irq = 18 },
1324 { .irq = -1 }
1325};
1326
1327static struct omap_hwmod omap34xx_sr1_hwmod = {
1328 .name = "sr1",
1329 .class = &omap34xx_smartreflex_hwmod_class,
1330 .main_clk = "sr1_fck",
1331 .prcm = {
1332 .omap2 = {
1333 .prcm_reg_id = 1,
1334 .module_bit = OMAP3430_EN_SR1_SHIFT,
1335 .module_offs = WKUP_MOD,
1336 .idlest_reg_id = 1,
1337 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1338 },
1339 },
1340 .dev_attr = &sr1_dev_attr,
1341 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1342 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1343};
1344
1345static struct omap_hwmod omap36xx_sr1_hwmod = {
1346 .name = "sr1",
1347 .class = &omap36xx_smartreflex_hwmod_class,
1348 .main_clk = "sr1_fck",
1349 .prcm = {
1350 .omap2 = {
1351 .prcm_reg_id = 1,
1352 .module_bit = OMAP3430_EN_SR1_SHIFT,
1353 .module_offs = WKUP_MOD,
1354 .idlest_reg_id = 1,
1355 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1356 },
1357 },
1358 .dev_attr = &sr1_dev_attr,
1359 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1360};
1361
1362/* SR2 */
1363static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1364 .sensor_voltdm_name = "core",
1365};
1366
1367static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
1368 { .irq = 19 },
1369 { .irq = -1 }
1370};
1371
1372static struct omap_hwmod omap34xx_sr2_hwmod = {
1373 .name = "sr2",
1374 .class = &omap34xx_smartreflex_hwmod_class,
1375 .main_clk = "sr2_fck",
1376 .prcm = {
1377 .omap2 = {
1378 .prcm_reg_id = 1,
1379 .module_bit = OMAP3430_EN_SR2_SHIFT,
1380 .module_offs = WKUP_MOD,
1381 .idlest_reg_id = 1,
1382 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1383 },
1384 },
1385 .dev_attr = &sr2_dev_attr,
1386 .mpu_irqs = omap3_smartreflex_core_irqs,
1387 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1388};
1389
1390static struct omap_hwmod omap36xx_sr2_hwmod = {
1391 .name = "sr2",
1392 .class = &omap36xx_smartreflex_hwmod_class,
1393 .main_clk = "sr2_fck",
1394 .prcm = {
1395 .omap2 = {
1396 .prcm_reg_id = 1,
1397 .module_bit = OMAP3430_EN_SR2_SHIFT,
1398 .module_offs = WKUP_MOD,
1399 .idlest_reg_id = 1,
1400 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1401 },
1402 },
1403 .dev_attr = &sr2_dev_attr,
1404 .mpu_irqs = omap3_smartreflex_core_irqs,
1405};
1406
1407/*
1408 * 'mailbox' class
1409 * mailbox module allowing communication between the on-chip processors
1410 * using a queued mailbox-interrupt mechanism.
1411 */
1412
1413static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1414 .rev_offs = 0x000,
1415 .sysc_offs = 0x010,
1416 .syss_offs = 0x014,
1417 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1418 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1419 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1420 .sysc_fields = &omap_hwmod_sysc_type1,
1421};
1422
1423static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1424 .name = "mailbox",
1425 .sysc = &omap3xxx_mailbox_sysc,
1426};
1427
1428static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1429 { .irq = 26 },
1430 { .irq = -1 }
1431};
1432
1433static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1434 .name = "mailbox",
1435 .class = &omap3xxx_mailbox_hwmod_class,
1436 .mpu_irqs = omap3xxx_mailbox_irqs,
1437 .main_clk = "mailboxes_ick",
1438 .prcm = {
1439 .omap2 = {
1440 .prcm_reg_id = 1,
1441 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1442 .module_offs = CORE_MOD,
1443 .idlest_reg_id = 1,
1444 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1445 },
1446 },
1447};
1448
1449/*
1450 * 'mcspi' class
1451 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1452 * bus
1453 */
1454
1455static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1456 .rev_offs = 0x0000,
1457 .sysc_offs = 0x0010,
1458 .syss_offs = 0x0014,
1459 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1460 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1461 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1462 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1463 .sysc_fields = &omap_hwmod_sysc_type1,
1464};
1465
1466static struct omap_hwmod_class omap34xx_mcspi_class = {
1467 .name = "mcspi",
1468 .sysc = &omap34xx_mcspi_sysc,
1469 .rev = OMAP3_MCSPI_REV,
1470};
1471
1472/* mcspi1 */
1473static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1474 .num_chipselect = 4,
1475};
1476
1477static struct omap_hwmod omap34xx_mcspi1 = {
1478 .name = "mcspi1",
1479 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1480 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1481 .main_clk = "mcspi1_fck",
1482 .prcm = {
1483 .omap2 = {
1484 .module_offs = CORE_MOD,
1485 .prcm_reg_id = 1,
1486 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1487 .idlest_reg_id = 1,
1488 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1489 },
1490 },
1491 .class = &omap34xx_mcspi_class,
1492 .dev_attr = &omap_mcspi1_dev_attr,
1493};
1494
1495/* mcspi2 */
1496static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1497 .num_chipselect = 2,
1498};
1499
1500static struct omap_hwmod omap34xx_mcspi2 = {
1501 .name = "mcspi2",
1502 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1503 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1504 .main_clk = "mcspi2_fck",
1505 .prcm = {
1506 .omap2 = {
1507 .module_offs = CORE_MOD,
1508 .prcm_reg_id = 1,
1509 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1510 .idlest_reg_id = 1,
1511 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1512 },
1513 },
1514 .class = &omap34xx_mcspi_class,
1515 .dev_attr = &omap_mcspi2_dev_attr,
1516};
1517
1518/* mcspi3 */
1519static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
1520 { .name = "irq", .irq = 91 }, /* 91 */
1521 { .irq = -1 }
1522};
1523
1524static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
1525 { .name = "tx0", .dma_req = 15 },
1526 { .name = "rx0", .dma_req = 16 },
1527 { .name = "tx1", .dma_req = 23 },
1528 { .name = "rx1", .dma_req = 24 },
1529 { .dma_req = -1 }
1530};
1531
1532static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1533 .num_chipselect = 2,
1534};
1535
1536static struct omap_hwmod omap34xx_mcspi3 = {
1537 .name = "mcspi3",
1538 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
1539 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
1540 .main_clk = "mcspi3_fck",
1541 .prcm = {
1542 .omap2 = {
1543 .module_offs = CORE_MOD,
1544 .prcm_reg_id = 1,
1545 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1546 .idlest_reg_id = 1,
1547 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1548 },
1549 },
1550 .class = &omap34xx_mcspi_class,
1551 .dev_attr = &omap_mcspi3_dev_attr,
1552};
1553
1554/* mcspi4 */
1555static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
1556 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
1557 { .irq = -1 }
1558};
1559
1560static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
1561 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
1562 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
1563 { .dma_req = -1 }
1564};
1565
1566static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1567 .num_chipselect = 1,
1568};
1569
1570static struct omap_hwmod omap34xx_mcspi4 = {
1571 .name = "mcspi4",
1572 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
1573 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
1574 .main_clk = "mcspi4_fck",
1575 .prcm = {
1576 .omap2 = {
1577 .module_offs = CORE_MOD,
1578 .prcm_reg_id = 1,
1579 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1580 .idlest_reg_id = 1,
1581 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1582 },
1583 },
1584 .class = &omap34xx_mcspi_class,
1585 .dev_attr = &omap_mcspi4_dev_attr,
1586};
1587
1588/* usbhsotg */
1589static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1590 .rev_offs = 0x0400,
1591 .sysc_offs = 0x0404,
1592 .syss_offs = 0x0408,
1593 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1594 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1595 SYSC_HAS_AUTOIDLE),
1596 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1597 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1598 .sysc_fields = &omap_hwmod_sysc_type1,
1599};
1600
1601static struct omap_hwmod_class usbotg_class = {
1602 .name = "usbotg",
1603 .sysc = &omap3xxx_usbhsotg_sysc,
1604};
1605
1606/* usb_otg_hs */
1607static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1608
1609 { .name = "mc", .irq = 92 },
1610 { .name = "dma", .irq = 93 },
1611 { .irq = -1 }
1612};
1613
1614static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1615 .name = "usb_otg_hs",
1616 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1617 .main_clk = "hsotgusb_ick",
1618 .prcm = {
1619 .omap2 = {
1620 .prcm_reg_id = 1,
1621 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1622 .module_offs = CORE_MOD,
1623 .idlest_reg_id = 1,
1624 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1625 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
1626 },
1627 },
1628 .class = &usbotg_class,
1629
1630 /*
1631 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1632 * broken when autoidle is enabled
1633 * workaround is to disable the autoidle bit at module level.
1634 */
1635 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1636 | HWMOD_SWSUP_MSTANDBY,
1637};
1638
1639/* usb_otg_hs */
1640static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001641 { .name = "mc", .irq = 71 },
1642 { .irq = -1 }
1643};
1644
1645static struct omap_hwmod_class am35xx_usbotg_class = {
1646 .name = "am35xx_usbotg",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001647};
1648
1649static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1650 .name = "am35x_otg_hs",
1651 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001652 .main_clk = "hsotgusb_fck",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001653 .class = &am35xx_usbotg_class,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001654 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001655};
1656
1657/* MMC/SD/SDIO common */
1658static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1659 .rev_offs = 0x1fc,
1660 .sysc_offs = 0x10,
1661 .syss_offs = 0x14,
1662 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1663 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1664 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1665 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1666 .sysc_fields = &omap_hwmod_sysc_type1,
1667};
1668
1669static struct omap_hwmod_class omap34xx_mmc_class = {
1670 .name = "mmc",
1671 .sysc = &omap34xx_mmc_sysc,
1672};
1673
1674/* MMC/SD/SDIO1 */
1675
1676static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
1677 { .irq = 83, },
1678 { .irq = -1 }
1679};
1680
1681static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
1682 { .name = "tx", .dma_req = 61, },
1683 { .name = "rx", .dma_req = 62, },
1684 { .dma_req = -1 }
1685};
1686
1687static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1688 { .role = "dbck", .clk = "omap_32k_fck", },
1689};
1690
1691static struct omap_mmc_dev_attr mmc1_dev_attr = {
1692 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1693};
1694
1695/* See 35xx errata 2.1.1.128 in SPRZ278F */
1696static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
1697 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1698 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1699};
1700
1701static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1702 .name = "mmc1",
1703 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1704 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1705 .opt_clks = omap34xx_mmc1_opt_clks,
1706 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1707 .main_clk = "mmchs1_fck",
1708 .prcm = {
1709 .omap2 = {
1710 .module_offs = CORE_MOD,
1711 .prcm_reg_id = 1,
1712 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1713 .idlest_reg_id = 1,
1714 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1715 },
1716 },
1717 .dev_attr = &mmc1_pre_es3_dev_attr,
1718 .class = &omap34xx_mmc_class,
1719};
1720
1721static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1722 .name = "mmc1",
1723 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1724 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1725 .opt_clks = omap34xx_mmc1_opt_clks,
1726 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1727 .main_clk = "mmchs1_fck",
1728 .prcm = {
1729 .omap2 = {
1730 .module_offs = CORE_MOD,
1731 .prcm_reg_id = 1,
1732 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1733 .idlest_reg_id = 1,
1734 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1735 },
1736 },
1737 .dev_attr = &mmc1_dev_attr,
1738 .class = &omap34xx_mmc_class,
1739};
1740
1741/* MMC/SD/SDIO2 */
1742
1743static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
1744 { .irq = INT_24XX_MMC2_IRQ, },
1745 { .irq = -1 }
1746};
1747
1748static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
1749 { .name = "tx", .dma_req = 47, },
1750 { .name = "rx", .dma_req = 48, },
1751 { .dma_req = -1 }
1752};
1753
1754static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1755 { .role = "dbck", .clk = "omap_32k_fck", },
1756};
1757
1758/* See 35xx errata 2.1.1.128 in SPRZ278F */
1759static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
1760 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1761};
1762
1763static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1764 .name = "mmc2",
1765 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1766 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1767 .opt_clks = omap34xx_mmc2_opt_clks,
1768 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1769 .main_clk = "mmchs2_fck",
1770 .prcm = {
1771 .omap2 = {
1772 .module_offs = CORE_MOD,
1773 .prcm_reg_id = 1,
1774 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1775 .idlest_reg_id = 1,
1776 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1777 },
1778 },
1779 .dev_attr = &mmc2_pre_es3_dev_attr,
1780 .class = &omap34xx_mmc_class,
1781};
1782
1783static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1784 .name = "mmc2",
1785 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1786 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1787 .opt_clks = omap34xx_mmc2_opt_clks,
1788 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1789 .main_clk = "mmchs2_fck",
1790 .prcm = {
1791 .omap2 = {
1792 .module_offs = CORE_MOD,
1793 .prcm_reg_id = 1,
1794 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1795 .idlest_reg_id = 1,
1796 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1797 },
1798 },
1799 .class = &omap34xx_mmc_class,
1800};
1801
1802/* MMC/SD/SDIO3 */
1803
1804static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
1805 { .irq = 94, },
1806 { .irq = -1 }
1807};
1808
1809static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
1810 { .name = "tx", .dma_req = 77, },
1811 { .name = "rx", .dma_req = 78, },
1812 { .dma_req = -1 }
1813};
1814
1815static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1816 { .role = "dbck", .clk = "omap_32k_fck", },
1817};
1818
1819static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1820 .name = "mmc3",
1821 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
1822 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
1823 .opt_clks = omap34xx_mmc3_opt_clks,
1824 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1825 .main_clk = "mmchs3_fck",
1826 .prcm = {
1827 .omap2 = {
1828 .prcm_reg_id = 1,
1829 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1830 .idlest_reg_id = 1,
1831 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1832 },
1833 },
1834 .class = &omap34xx_mmc_class,
1835};
1836
1837/*
1838 * 'usb_host_hs' class
1839 * high-speed multi-port usb host controller
1840 */
1841
1842static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1843 .rev_offs = 0x0000,
1844 .sysc_offs = 0x0010,
1845 .syss_offs = 0x0014,
1846 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1847 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1848 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1849 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1850 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1851 .sysc_fields = &omap_hwmod_sysc_type1,
1852};
1853
1854static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1855 .name = "usb_host_hs",
1856 .sysc = &omap3xxx_usb_host_hs_sysc,
1857};
1858
1859static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1860 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
1861};
1862
1863static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
1864 { .name = "ohci-irq", .irq = 76 },
1865 { .name = "ehci-irq", .irq = 77 },
1866 { .irq = -1 }
1867};
1868
1869static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1870 .name = "usb_host_hs",
1871 .class = &omap3xxx_usb_host_hs_hwmod_class,
1872 .clkdm_name = "l3_init_clkdm",
1873 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
1874 .main_clk = "usbhost_48m_fck",
1875 .prcm = {
1876 .omap2 = {
1877 .module_offs = OMAP3430ES2_USBHOST_MOD,
1878 .prcm_reg_id = 1,
1879 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1880 .idlest_reg_id = 1,
1881 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1882 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1883 },
1884 },
1885 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
1886 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
1887
1888 /*
1889 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1890 * id: i660
1891 *
1892 * Description:
1893 * In the following configuration :
1894 * - USBHOST module is set to smart-idle mode
1895 * - PRCM asserts idle_req to the USBHOST module ( This typically
1896 * happens when the system is going to a low power mode : all ports
1897 * have been suspended, the master part of the USBHOST module has
1898 * entered the standby state, and SW has cut the functional clocks)
1899 * - an USBHOST interrupt occurs before the module is able to answer
1900 * idle_ack, typically a remote wakeup IRQ.
1901 * Then the USB HOST module will enter a deadlock situation where it
1902 * is no more accessible nor functional.
1903 *
1904 * Workaround:
1905 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1906 */
1907
1908 /*
1909 * Errata: USB host EHCI may stall when entering smart-standby mode
1910 * Id: i571
1911 *
1912 * Description:
1913 * When the USBHOST module is set to smart-standby mode, and when it is
1914 * ready to enter the standby state (i.e. all ports are suspended and
1915 * all attached devices are in suspend mode), then it can wrongly assert
1916 * the Mstandby signal too early while there are still some residual OCP
1917 * transactions ongoing. If this condition occurs, the internal state
1918 * machine may go to an undefined state and the USB link may be stuck
1919 * upon the next resume.
1920 *
1921 * Workaround:
1922 * Don't use smart standby; use only force standby,
1923 * hence HWMOD_SWSUP_MSTANDBY
1924 */
1925
1926 /*
1927 * During system boot; If the hwmod framework resets the module
1928 * the module will have smart idle settings; which can lead to deadlock
1929 * (above Errata Id:i660); so, dont reset the module during boot;
1930 * Use HWMOD_INIT_NO_RESET.
1931 */
1932
1933 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
1934 HWMOD_INIT_NO_RESET,
1935};
1936
1937/*
1938 * 'usb_tll_hs' class
1939 * usb_tll_hs module is the adapter on the usb_host_hs ports
1940 */
1941static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1942 .rev_offs = 0x0000,
1943 .sysc_offs = 0x0010,
1944 .syss_offs = 0x0014,
1945 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1946 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1947 SYSC_HAS_AUTOIDLE),
1948 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1949 .sysc_fields = &omap_hwmod_sysc_type1,
1950};
1951
1952static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1953 .name = "usb_tll_hs",
1954 .sysc = &omap3xxx_usb_tll_hs_sysc,
1955};
1956
1957static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
1958 { .name = "tll-irq", .irq = 78 },
1959 { .irq = -1 }
1960};
1961
1962static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1963 .name = "usb_tll_hs",
1964 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1965 .clkdm_name = "l3_init_clkdm",
1966 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
1967 .main_clk = "usbtll_fck",
1968 .prcm = {
1969 .omap2 = {
1970 .module_offs = CORE_MOD,
1971 .prcm_reg_id = 3,
1972 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1973 .idlest_reg_id = 3,
1974 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1975 },
1976 },
1977};
1978
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001979static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1980 .name = "hdq1w",
1981 .mpu_irqs = omap2_hdq1w_mpu_irqs,
1982 .main_clk = "hdq_fck",
1983 .prcm = {
1984 .omap2 = {
1985 .module_offs = CORE_MOD,
1986 .prcm_reg_id = 1,
1987 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1988 .idlest_reg_id = 1,
1989 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1990 },
1991 },
1992 .class = &omap2_hdq1w_class,
1993};
1994
Paul Walmsley844a3b62012-04-19 04:04:33 -06001995/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06001996 * '32K sync counter' class
1997 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1998 */
1999static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
2000 .rev_offs = 0x0000,
2001 .sysc_offs = 0x0004,
2002 .sysc_flags = SYSC_HAS_SIDLEMODE,
2003 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2004 .sysc_fields = &omap_hwmod_sysc_type1,
2005};
2006
2007static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2008 .name = "counter",
2009 .sysc = &omap3xxx_counter_sysc,
2010};
2011
2012static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2013 .name = "counter_32k",
2014 .class = &omap3xxx_counter_hwmod_class,
2015 .clkdm_name = "wkup_clkdm",
2016 .flags = HWMOD_SWSUP_SIDLE,
2017 .main_clk = "wkup_32k_fck",
2018 .prcm = {
2019 .omap2 = {
2020 .module_offs = WKUP_MOD,
2021 .prcm_reg_id = 1,
2022 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2023 .idlest_reg_id = 1,
2024 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2025 },
2026 },
2027};
2028
Paul Walmsley844a3b62012-04-19 04:04:33 -06002029/*
2030 * interfaces
2031 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302032
Paul Walmsley73591542010-02-22 22:09:32 -07002033/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002034static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
2035 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002036 .slave = &omap3xxx_l4_core_hwmod,
2037 .user = OCP_USER_MPU | OCP_USER_SDMA,
2038};
2039
2040/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002041static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
2042 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002043 .slave = &omap3xxx_l4_per_hwmod,
2044 .user = OCP_USER_MPU | OCP_USER_SDMA,
2045};
2046
sricharan4bb194d2011-02-08 22:13:37 +05302047static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2048 {
Paul Walmsley844a3b62012-04-19 04:04:33 -06002049 .pa_start = 0x68000000,
2050 .pa_end = 0x6800ffff,
2051 .flags = ADDR_TYPE_RT,
sricharan4bb194d2011-02-08 22:13:37 +05302052 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002053 { }
sricharan4bb194d2011-02-08 22:13:37 +05302054};
2055
Paul Walmsley73591542010-02-22 22:09:32 -07002056/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002057static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05302058 .master = &omap3xxx_mpu_hwmod,
2059 .slave = &omap3xxx_l3_main_hwmod,
2060 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -07002061 .user = OCP_USER_MPU,
2062};
2063
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002064/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06002065static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2066 .master = &omap3430es1_dss_core_hwmod,
2067 .slave = &omap3xxx_l3_main_hwmod,
2068 .user = OCP_USER_MPU | OCP_USER_SDMA,
2069};
2070
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002071static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2072 .master = &omap3xxx_dss_core_hwmod,
2073 .slave = &omap3xxx_l3_main_hwmod,
2074 .fw = {
2075 .omap2 = {
2076 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2077 .flags = OMAP_FIREWALL_L3,
2078 }
2079 },
2080 .user = OCP_USER_MPU | OCP_USER_SDMA,
2081};
2082
Hema HK870ea2b2011-02-17 12:07:18 +05302083/* l3_core -> usbhsotg interface */
2084static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2085 .master = &omap3xxx_usbhsotg_hwmod,
2086 .slave = &omap3xxx_l3_main_hwmod,
2087 .clk = "core_l3_ick",
2088 .user = OCP_USER_MPU,
2089};
Paul Walmsley73591542010-02-22 22:09:32 -07002090
Hema HK273ff8c2011-02-17 12:07:19 +05302091/* l3_core -> am35xx_usbhsotg interface */
2092static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2093 .master = &am35xx_usbhsotg_hwmod,
2094 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002095 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302096 .user = OCP_USER_MPU,
2097};
Paul Walmsley89ea2582012-06-27 14:53:46 -06002098
Paul Walmsley73591542010-02-22 22:09:32 -07002099/* L4_CORE -> L4_WKUP interface */
2100static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2101 .master = &omap3xxx_l4_core_hwmod,
2102 .slave = &omap3xxx_l4_wkup_hwmod,
2103 .user = OCP_USER_MPU | OCP_USER_SDMA,
2104};
2105
Paul Walmsleyb1636052011-03-01 13:12:56 -08002106/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002107static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002108 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002109 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2110 .clk = "mmchs1_ick",
2111 .addr = omap2430_mmc1_addr_space,
2112 .user = OCP_USER_MPU | OCP_USER_SDMA,
2113 .flags = OMAP_FIREWALL_L4
2114};
2115
2116static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2117 .master = &omap3xxx_l4_core_hwmod,
2118 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002119 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002120 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002121 .user = OCP_USER_MPU | OCP_USER_SDMA,
2122 .flags = OMAP_FIREWALL_L4
2123};
2124
2125/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002126static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002127 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002128 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2129 .clk = "mmchs2_ick",
2130 .addr = omap2430_mmc2_addr_space,
2131 .user = OCP_USER_MPU | OCP_USER_SDMA,
2132 .flags = OMAP_FIREWALL_L4
2133};
2134
2135static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2136 .master = &omap3xxx_l4_core_hwmod,
2137 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002138 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002139 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002140 .user = OCP_USER_MPU | OCP_USER_SDMA,
2141 .flags = OMAP_FIREWALL_L4
2142};
2143
2144/* L4 CORE -> MMC3 interface */
2145static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2146 {
2147 .pa_start = 0x480ad000,
2148 .pa_end = 0x480ad1ff,
2149 .flags = ADDR_TYPE_RT,
2150 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002151 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002152};
2153
2154static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2155 .master = &omap3xxx_l4_core_hwmod,
2156 .slave = &omap3xxx_mmc3_hwmod,
2157 .clk = "mmchs3_ick",
2158 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002159 .user = OCP_USER_MPU | OCP_USER_SDMA,
2160 .flags = OMAP_FIREWALL_L4
2161};
2162
Kevin Hilman046465b2010-09-27 20:19:30 +05302163/* L4 CORE -> UART1 interface */
2164static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2165 {
2166 .pa_start = OMAP3_UART1_BASE,
2167 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2168 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2169 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002170 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302171};
2172
2173static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2174 .master = &omap3xxx_l4_core_hwmod,
2175 .slave = &omap3xxx_uart1_hwmod,
2176 .clk = "uart1_ick",
2177 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302178 .user = OCP_USER_MPU | OCP_USER_SDMA,
2179};
2180
2181/* L4 CORE -> UART2 interface */
2182static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2183 {
2184 .pa_start = OMAP3_UART2_BASE,
2185 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2186 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2187 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002188 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302189};
2190
2191static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2192 .master = &omap3xxx_l4_core_hwmod,
2193 .slave = &omap3xxx_uart2_hwmod,
2194 .clk = "uart2_ick",
2195 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302196 .user = OCP_USER_MPU | OCP_USER_SDMA,
2197};
2198
2199/* L4 PER -> UART3 interface */
2200static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2201 {
2202 .pa_start = OMAP3_UART3_BASE,
2203 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2204 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2205 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002206 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302207};
2208
2209static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2210 .master = &omap3xxx_l4_per_hwmod,
2211 .slave = &omap3xxx_uart3_hwmod,
2212 .clk = "uart3_ick",
2213 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302214 .user = OCP_USER_MPU | OCP_USER_SDMA,
2215};
2216
2217/* L4 PER -> UART4 interface */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002218static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302219 {
2220 .pa_start = OMAP3_UART4_BASE,
2221 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2222 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2223 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002224 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302225};
2226
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002227static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302228 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002229 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302230 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002231 .addr = omap36xx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302232 .user = OCP_USER_MPU | OCP_USER_SDMA,
2233};
2234
Kyle Manna4bf90f62011-10-18 13:47:41 -05002235/* AM35xx: L4 CORE -> UART4 interface */
2236static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2237 {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002238 .pa_start = OMAP3_UART4_AM35XX_BASE,
2239 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2240 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002241 },
2242};
2243
2244static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002245 .master = &omap3xxx_l4_core_hwmod,
2246 .slave = &am35xx_uart4_hwmod,
2247 .clk = "uart4_ick",
2248 .addr = am35xx_uart4_addr_space,
2249 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002250};
2251
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302252/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302253static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2254 .master = &omap3xxx_l4_core_hwmod,
2255 .slave = &omap3xxx_i2c1_hwmod,
2256 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002257 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302258 .fw = {
2259 .omap2 = {
2260 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2261 .l4_prot_group = 7,
2262 .flags = OMAP_FIREWALL_L4,
2263 }
2264 },
2265 .user = OCP_USER_MPU | OCP_USER_SDMA,
2266};
2267
2268/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302269static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2270 .master = &omap3xxx_l4_core_hwmod,
2271 .slave = &omap3xxx_i2c2_hwmod,
2272 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002273 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302274 .fw = {
2275 .omap2 = {
2276 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2277 .l4_prot_group = 7,
2278 .flags = OMAP_FIREWALL_L4,
2279 }
2280 },
2281 .user = OCP_USER_MPU | OCP_USER_SDMA,
2282};
2283
2284/* L4 CORE -> I2C3 interface */
2285static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2286 {
2287 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -06002288 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302289 .flags = ADDR_TYPE_RT,
2290 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002291 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302292};
2293
2294static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2295 .master = &omap3xxx_l4_core_hwmod,
2296 .slave = &omap3xxx_i2c3_hwmod,
2297 .clk = "i2c3_ick",
2298 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302299 .fw = {
2300 .omap2 = {
2301 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2302 .l4_prot_group = 7,
2303 .flags = OMAP_FIREWALL_L4,
2304 }
2305 },
2306 .user = OCP_USER_MPU | OCP_USER_SDMA,
2307};
2308
Thara Gopinathd3442722010-05-29 22:02:24 +05302309/* L4 CORE -> SR1 interface */
2310static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2311 {
2312 .pa_start = OMAP34XX_SR1_BASE,
2313 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2314 .flags = ADDR_TYPE_RT,
2315 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002316 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302317};
2318
Paul Walmsley844a3b62012-04-19 04:04:33 -06002319static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302320 .master = &omap3xxx_l4_core_hwmod,
2321 .slave = &omap34xx_sr1_hwmod,
2322 .clk = "sr_l4_ick",
2323 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302324 .user = OCP_USER_MPU,
2325};
2326
Paul Walmsley844a3b62012-04-19 04:04:33 -06002327static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2328 .master = &omap3xxx_l4_core_hwmod,
2329 .slave = &omap36xx_sr1_hwmod,
2330 .clk = "sr_l4_ick",
2331 .addr = omap3_sr1_addr_space,
2332 .user = OCP_USER_MPU,
2333};
2334
Thara Gopinathd3442722010-05-29 22:02:24 +05302335/* L4 CORE -> SR1 interface */
2336static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2337 {
2338 .pa_start = OMAP34XX_SR2_BASE,
2339 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2340 .flags = ADDR_TYPE_RT,
2341 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002342 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302343};
2344
Paul Walmsley844a3b62012-04-19 04:04:33 -06002345static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302346 .master = &omap3xxx_l4_core_hwmod,
2347 .slave = &omap34xx_sr2_hwmod,
2348 .clk = "sr_l4_ick",
2349 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302350 .user = OCP_USER_MPU,
2351};
2352
Paul Walmsley844a3b62012-04-19 04:04:33 -06002353static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2354 .master = &omap3xxx_l4_core_hwmod,
2355 .slave = &omap36xx_sr2_hwmod,
2356 .clk = "sr_l4_ick",
2357 .addr = omap3_sr2_addr_space,
2358 .user = OCP_USER_MPU,
2359};
Hema HK870ea2b2011-02-17 12:07:18 +05302360
2361static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2362 {
2363 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2364 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2365 .flags = ADDR_TYPE_RT
2366 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002367 { }
Hema HK870ea2b2011-02-17 12:07:18 +05302368};
2369
2370/* l4_core -> usbhsotg */
2371static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2372 .master = &omap3xxx_l4_core_hwmod,
2373 .slave = &omap3xxx_usbhsotg_hwmod,
2374 .clk = "l4_ick",
2375 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +05302376 .user = OCP_USER_MPU,
2377};
2378
Hema HK273ff8c2011-02-17 12:07:19 +05302379static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2380 {
2381 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2382 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2383 .flags = ADDR_TYPE_RT
2384 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002385 { }
Hema HK273ff8c2011-02-17 12:07:19 +05302386};
2387
2388/* l4_core -> usbhsotg */
2389static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2390 .master = &omap3xxx_l4_core_hwmod,
2391 .slave = &am35xx_usbhsotg_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002392 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302393 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +05302394 .user = OCP_USER_MPU,
2395};
2396
Paul Walmsley43085702012-04-19 04:03:53 -06002397/* L4_WKUP -> L4_SEC interface */
2398static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2399 .master = &omap3xxx_l4_wkup_hwmod,
2400 .slave = &omap3xxx_l4_sec_hwmod,
2401 .user = OCP_USER_MPU | OCP_USER_SDMA,
2402};
2403
Kevin Hilman540064b2010-07-26 16:34:32 -06002404/* IVA2 <- L3 interface */
2405static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2406 .master = &omap3xxx_l3_main_hwmod,
2407 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002408 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002409 .user = OCP_USER_MPU | OCP_USER_SDMA,
2410};
2411
Thara Gopinathce722d22011-02-23 00:14:05 -07002412static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2413 {
2414 .pa_start = 0x48318000,
2415 .pa_end = 0x48318000 + SZ_1K - 1,
2416 .flags = ADDR_TYPE_RT
2417 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002418 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002419};
2420
2421/* l4_wkup -> timer1 */
2422static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2423 .master = &omap3xxx_l4_wkup_hwmod,
2424 .slave = &omap3xxx_timer1_hwmod,
2425 .clk = "gpt1_ick",
2426 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002427 .user = OCP_USER_MPU | OCP_USER_SDMA,
2428};
2429
Thara Gopinathce722d22011-02-23 00:14:05 -07002430static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2431 {
2432 .pa_start = 0x49032000,
2433 .pa_end = 0x49032000 + SZ_1K - 1,
2434 .flags = ADDR_TYPE_RT
2435 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002436 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002437};
2438
2439/* l4_per -> timer2 */
2440static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2441 .master = &omap3xxx_l4_per_hwmod,
2442 .slave = &omap3xxx_timer2_hwmod,
2443 .clk = "gpt2_ick",
2444 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002445 .user = OCP_USER_MPU | OCP_USER_SDMA,
2446};
2447
Thara Gopinathce722d22011-02-23 00:14:05 -07002448static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2449 {
2450 .pa_start = 0x49034000,
2451 .pa_end = 0x49034000 + SZ_1K - 1,
2452 .flags = ADDR_TYPE_RT
2453 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002454 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002455};
2456
2457/* l4_per -> timer3 */
2458static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2459 .master = &omap3xxx_l4_per_hwmod,
2460 .slave = &omap3xxx_timer3_hwmod,
2461 .clk = "gpt3_ick",
2462 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002463 .user = OCP_USER_MPU | OCP_USER_SDMA,
2464};
2465
Thara Gopinathce722d22011-02-23 00:14:05 -07002466static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2467 {
2468 .pa_start = 0x49036000,
2469 .pa_end = 0x49036000 + SZ_1K - 1,
2470 .flags = ADDR_TYPE_RT
2471 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002472 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002473};
2474
2475/* l4_per -> timer4 */
2476static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2477 .master = &omap3xxx_l4_per_hwmod,
2478 .slave = &omap3xxx_timer4_hwmod,
2479 .clk = "gpt4_ick",
2480 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002481 .user = OCP_USER_MPU | OCP_USER_SDMA,
2482};
2483
Thara Gopinathce722d22011-02-23 00:14:05 -07002484static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2485 {
2486 .pa_start = 0x49038000,
2487 .pa_end = 0x49038000 + SZ_1K - 1,
2488 .flags = ADDR_TYPE_RT
2489 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002490 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002491};
2492
2493/* l4_per -> timer5 */
2494static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2495 .master = &omap3xxx_l4_per_hwmod,
2496 .slave = &omap3xxx_timer5_hwmod,
2497 .clk = "gpt5_ick",
2498 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002499 .user = OCP_USER_MPU | OCP_USER_SDMA,
2500};
2501
Thara Gopinathce722d22011-02-23 00:14:05 -07002502static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2503 {
2504 .pa_start = 0x4903A000,
2505 .pa_end = 0x4903A000 + SZ_1K - 1,
2506 .flags = ADDR_TYPE_RT
2507 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002508 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002509};
2510
2511/* l4_per -> timer6 */
2512static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2513 .master = &omap3xxx_l4_per_hwmod,
2514 .slave = &omap3xxx_timer6_hwmod,
2515 .clk = "gpt6_ick",
2516 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002517 .user = OCP_USER_MPU | OCP_USER_SDMA,
2518};
2519
Thara Gopinathce722d22011-02-23 00:14:05 -07002520static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2521 {
2522 .pa_start = 0x4903C000,
2523 .pa_end = 0x4903C000 + SZ_1K - 1,
2524 .flags = ADDR_TYPE_RT
2525 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002526 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002527};
2528
2529/* l4_per -> timer7 */
2530static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2531 .master = &omap3xxx_l4_per_hwmod,
2532 .slave = &omap3xxx_timer7_hwmod,
2533 .clk = "gpt7_ick",
2534 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002535 .user = OCP_USER_MPU | OCP_USER_SDMA,
2536};
2537
Thara Gopinathce722d22011-02-23 00:14:05 -07002538static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2539 {
2540 .pa_start = 0x4903E000,
2541 .pa_end = 0x4903E000 + SZ_1K - 1,
2542 .flags = ADDR_TYPE_RT
2543 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002544 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002545};
2546
2547/* l4_per -> timer8 */
2548static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2549 .master = &omap3xxx_l4_per_hwmod,
2550 .slave = &omap3xxx_timer8_hwmod,
2551 .clk = "gpt8_ick",
2552 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002553 .user = OCP_USER_MPU | OCP_USER_SDMA,
2554};
2555
Thara Gopinathce722d22011-02-23 00:14:05 -07002556static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2557 {
2558 .pa_start = 0x49040000,
2559 .pa_end = 0x49040000 + SZ_1K - 1,
2560 .flags = ADDR_TYPE_RT
2561 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002562 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002563};
2564
2565/* l4_per -> timer9 */
2566static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2567 .master = &omap3xxx_l4_per_hwmod,
2568 .slave = &omap3xxx_timer9_hwmod,
2569 .clk = "gpt9_ick",
2570 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002571 .user = OCP_USER_MPU | OCP_USER_SDMA,
2572};
2573
Thara Gopinathce722d22011-02-23 00:14:05 -07002574/* l4_core -> timer10 */
2575static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2576 .master = &omap3xxx_l4_core_hwmod,
2577 .slave = &omap3xxx_timer10_hwmod,
2578 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002579 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002580 .user = OCP_USER_MPU | OCP_USER_SDMA,
2581};
2582
Thara Gopinathce722d22011-02-23 00:14:05 -07002583/* l4_core -> timer11 */
2584static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2585 .master = &omap3xxx_l4_core_hwmod,
2586 .slave = &omap3xxx_timer11_hwmod,
2587 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002588 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002589 .user = OCP_USER_MPU | OCP_USER_SDMA,
2590};
2591
Thara Gopinathce722d22011-02-23 00:14:05 -07002592static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2593 {
2594 .pa_start = 0x48304000,
2595 .pa_end = 0x48304000 + SZ_1K - 1,
2596 .flags = ADDR_TYPE_RT
2597 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002598 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002599};
2600
2601/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002602static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2603 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002604 .slave = &omap3xxx_timer12_hwmod,
2605 .clk = "gpt12_ick",
2606 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002607 .user = OCP_USER_MPU | OCP_USER_SDMA,
2608};
2609
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302610/* l4_wkup -> wd_timer2 */
2611static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2612 {
2613 .pa_start = 0x48314000,
2614 .pa_end = 0x4831407f,
2615 .flags = ADDR_TYPE_RT
2616 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002617 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302618};
2619
2620static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2621 .master = &omap3xxx_l4_wkup_hwmod,
2622 .slave = &omap3xxx_wd_timer2_hwmod,
2623 .clk = "wdt2_ick",
2624 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302625 .user = OCP_USER_MPU | OCP_USER_SDMA,
2626};
2627
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002628/* l4_core -> dss */
2629static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2630 .master = &omap3xxx_l4_core_hwmod,
2631 .slave = &omap3430es1_dss_core_hwmod,
2632 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002633 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002634 .fw = {
2635 .omap2 = {
2636 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2637 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2638 .flags = OMAP_FIREWALL_L4,
2639 }
2640 },
2641 .user = OCP_USER_MPU | OCP_USER_SDMA,
2642};
2643
2644static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2645 .master = &omap3xxx_l4_core_hwmod,
2646 .slave = &omap3xxx_dss_core_hwmod,
2647 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002648 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002649 .fw = {
2650 .omap2 = {
2651 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2652 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2653 .flags = OMAP_FIREWALL_L4,
2654 }
2655 },
2656 .user = OCP_USER_MPU | OCP_USER_SDMA,
2657};
2658
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002659/* l4_core -> dss_dispc */
2660static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2661 .master = &omap3xxx_l4_core_hwmod,
2662 .slave = &omap3xxx_dss_dispc_hwmod,
2663 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002664 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002665 .fw = {
2666 .omap2 = {
2667 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2668 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2669 .flags = OMAP_FIREWALL_L4,
2670 }
2671 },
2672 .user = OCP_USER_MPU | OCP_USER_SDMA,
2673};
2674
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002675static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2676 {
2677 .pa_start = 0x4804FC00,
2678 .pa_end = 0x4804FFFF,
2679 .flags = ADDR_TYPE_RT
2680 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002681 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002682};
2683
2684/* l4_core -> dss_dsi1 */
2685static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2686 .master = &omap3xxx_l4_core_hwmod,
2687 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002688 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002689 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002690 .fw = {
2691 .omap2 = {
2692 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2693 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2694 .flags = OMAP_FIREWALL_L4,
2695 }
2696 },
2697 .user = OCP_USER_MPU | OCP_USER_SDMA,
2698};
2699
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002700/* l4_core -> dss_rfbi */
2701static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2702 .master = &omap3xxx_l4_core_hwmod,
2703 .slave = &omap3xxx_dss_rfbi_hwmod,
2704 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002705 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002706 .fw = {
2707 .omap2 = {
2708 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2709 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2710 .flags = OMAP_FIREWALL_L4,
2711 }
2712 },
2713 .user = OCP_USER_MPU | OCP_USER_SDMA,
2714};
2715
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002716/* l4_core -> dss_venc */
2717static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2718 .master = &omap3xxx_l4_core_hwmod,
2719 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002720 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002721 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002722 .fw = {
2723 .omap2 = {
2724 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2725 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2726 .flags = OMAP_FIREWALL_L4,
2727 }
2728 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002729 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002730 .user = OCP_USER_MPU | OCP_USER_SDMA,
2731};
2732
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002733/* l4_wkup -> gpio1 */
2734static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2735 {
2736 .pa_start = 0x48310000,
2737 .pa_end = 0x483101ff,
2738 .flags = ADDR_TYPE_RT
2739 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002740 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002741};
2742
2743static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2744 .master = &omap3xxx_l4_wkup_hwmod,
2745 .slave = &omap3xxx_gpio1_hwmod,
2746 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002747 .user = OCP_USER_MPU | OCP_USER_SDMA,
2748};
2749
2750/* l4_per -> gpio2 */
2751static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2752 {
2753 .pa_start = 0x49050000,
2754 .pa_end = 0x490501ff,
2755 .flags = ADDR_TYPE_RT
2756 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002757 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002758};
2759
2760static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2761 .master = &omap3xxx_l4_per_hwmod,
2762 .slave = &omap3xxx_gpio2_hwmod,
2763 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002764 .user = OCP_USER_MPU | OCP_USER_SDMA,
2765};
2766
2767/* l4_per -> gpio3 */
2768static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2769 {
2770 .pa_start = 0x49052000,
2771 .pa_end = 0x490521ff,
2772 .flags = ADDR_TYPE_RT
2773 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002774 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002775};
2776
2777static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2778 .master = &omap3xxx_l4_per_hwmod,
2779 .slave = &omap3xxx_gpio3_hwmod,
2780 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002781 .user = OCP_USER_MPU | OCP_USER_SDMA,
2782};
2783
2784/* l4_per -> gpio4 */
2785static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2786 {
2787 .pa_start = 0x49054000,
2788 .pa_end = 0x490541ff,
2789 .flags = ADDR_TYPE_RT
2790 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002791 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002792};
2793
2794static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2795 .master = &omap3xxx_l4_per_hwmod,
2796 .slave = &omap3xxx_gpio4_hwmod,
2797 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002798 .user = OCP_USER_MPU | OCP_USER_SDMA,
2799};
2800
2801/* l4_per -> gpio5 */
2802static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2803 {
2804 .pa_start = 0x49056000,
2805 .pa_end = 0x490561ff,
2806 .flags = ADDR_TYPE_RT
2807 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002808 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002809};
2810
2811static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2812 .master = &omap3xxx_l4_per_hwmod,
2813 .slave = &omap3xxx_gpio5_hwmod,
2814 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002815 .user = OCP_USER_MPU | OCP_USER_SDMA,
2816};
2817
2818/* l4_per -> gpio6 */
2819static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2820 {
2821 .pa_start = 0x49058000,
2822 .pa_end = 0x490581ff,
2823 .flags = ADDR_TYPE_RT
2824 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002825 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002826};
2827
2828static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2829 .master = &omap3xxx_l4_per_hwmod,
2830 .slave = &omap3xxx_gpio6_hwmod,
2831 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002832 .user = OCP_USER_MPU | OCP_USER_SDMA,
2833};
2834
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002835/* dma_system -> L3 */
2836static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2837 .master = &omap3xxx_dma_system_hwmod,
2838 .slave = &omap3xxx_l3_main_hwmod,
2839 .clk = "core_l3_ick",
2840 .user = OCP_USER_MPU | OCP_USER_SDMA,
2841};
2842
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002843static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2844 {
2845 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002846 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002847 .flags = ADDR_TYPE_RT
2848 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002849 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002850};
2851
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002852/* l4_cfg -> dma_system */
2853static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2854 .master = &omap3xxx_l4_core_hwmod,
2855 .slave = &omap3xxx_dma_system_hwmod,
2856 .clk = "core_l4_ick",
2857 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002858 .user = OCP_USER_MPU | OCP_USER_SDMA,
2859};
2860
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302861static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2862 {
2863 .name = "mpu",
2864 .pa_start = 0x48074000,
2865 .pa_end = 0x480740ff,
2866 .flags = ADDR_TYPE_RT
2867 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002868 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302869};
2870
2871/* l4_core -> mcbsp1 */
2872static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2873 .master = &omap3xxx_l4_core_hwmod,
2874 .slave = &omap3xxx_mcbsp1_hwmod,
2875 .clk = "mcbsp1_ick",
2876 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302877 .user = OCP_USER_MPU | OCP_USER_SDMA,
2878};
2879
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302880static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2881 {
2882 .name = "mpu",
2883 .pa_start = 0x49022000,
2884 .pa_end = 0x490220ff,
2885 .flags = ADDR_TYPE_RT
2886 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002887 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302888};
2889
2890/* l4_per -> mcbsp2 */
2891static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2892 .master = &omap3xxx_l4_per_hwmod,
2893 .slave = &omap3xxx_mcbsp2_hwmod,
2894 .clk = "mcbsp2_ick",
2895 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302896 .user = OCP_USER_MPU | OCP_USER_SDMA,
2897};
2898
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302899static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2900 {
2901 .name = "mpu",
2902 .pa_start = 0x49024000,
2903 .pa_end = 0x490240ff,
2904 .flags = ADDR_TYPE_RT
2905 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002906 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302907};
2908
2909/* l4_per -> mcbsp3 */
2910static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2911 .master = &omap3xxx_l4_per_hwmod,
2912 .slave = &omap3xxx_mcbsp3_hwmod,
2913 .clk = "mcbsp3_ick",
2914 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302915 .user = OCP_USER_MPU | OCP_USER_SDMA,
2916};
2917
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302918static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2919 {
2920 .name = "mpu",
2921 .pa_start = 0x49026000,
2922 .pa_end = 0x490260ff,
2923 .flags = ADDR_TYPE_RT
2924 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002925 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302926};
2927
2928/* l4_per -> mcbsp4 */
2929static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2930 .master = &omap3xxx_l4_per_hwmod,
2931 .slave = &omap3xxx_mcbsp4_hwmod,
2932 .clk = "mcbsp4_ick",
2933 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302934 .user = OCP_USER_MPU | OCP_USER_SDMA,
2935};
2936
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302937static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2938 {
2939 .name = "mpu",
2940 .pa_start = 0x48096000,
2941 .pa_end = 0x480960ff,
2942 .flags = ADDR_TYPE_RT
2943 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002944 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302945};
2946
2947/* l4_core -> mcbsp5 */
2948static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2949 .master = &omap3xxx_l4_core_hwmod,
2950 .slave = &omap3xxx_mcbsp5_hwmod,
2951 .clk = "mcbsp5_ick",
2952 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302953 .user = OCP_USER_MPU | OCP_USER_SDMA,
2954};
2955
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302956static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2957 {
2958 .name = "sidetone",
2959 .pa_start = 0x49028000,
2960 .pa_end = 0x490280ff,
2961 .flags = ADDR_TYPE_RT
2962 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002963 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302964};
2965
2966/* l4_per -> mcbsp2_sidetone */
2967static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2968 .master = &omap3xxx_l4_per_hwmod,
2969 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2970 .clk = "mcbsp2_ick",
2971 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302972 .user = OCP_USER_MPU,
2973};
2974
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302975static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2976 {
2977 .name = "sidetone",
2978 .pa_start = 0x4902A000,
2979 .pa_end = 0x4902A0ff,
2980 .flags = ADDR_TYPE_RT
2981 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002982 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302983};
2984
2985/* l4_per -> mcbsp3_sidetone */
2986static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2987 .master = &omap3xxx_l4_per_hwmod,
2988 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2989 .clk = "mcbsp3_ick",
2990 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302991 .user = OCP_USER_MPU,
2992};
2993
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002994static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2995 {
2996 .pa_start = 0x48094000,
2997 .pa_end = 0x480941ff,
2998 .flags = ADDR_TYPE_RT,
2999 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003000 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003001};
3002
3003/* l4_core -> mailbox */
3004static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3005 .master = &omap3xxx_l4_core_hwmod,
3006 .slave = &omap3xxx_mailbox_hwmod,
3007 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003008 .user = OCP_USER_MPU | OCP_USER_SDMA,
3009};
3010
Charulatha V0f616a42011-02-17 09:53:10 -08003011/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003012static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3013 .master = &omap3xxx_l4_core_hwmod,
3014 .slave = &omap34xx_mcspi1,
3015 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003016 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003017 .user = OCP_USER_MPU | OCP_USER_SDMA,
3018};
3019
3020/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003021static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3022 .master = &omap3xxx_l4_core_hwmod,
3023 .slave = &omap34xx_mcspi2,
3024 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003025 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003026 .user = OCP_USER_MPU | OCP_USER_SDMA,
3027};
3028
3029/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003030static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3031 .master = &omap3xxx_l4_core_hwmod,
3032 .slave = &omap34xx_mcspi3,
3033 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003034 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003035 .user = OCP_USER_MPU | OCP_USER_SDMA,
3036};
3037
3038/* l4 core -> mcspi4 interface */
3039static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3040 {
3041 .pa_start = 0x480ba000,
3042 .pa_end = 0x480ba0ff,
3043 .flags = ADDR_TYPE_RT,
3044 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003045 { }
Charulatha V0f616a42011-02-17 09:53:10 -08003046};
3047
3048static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3049 .master = &omap3xxx_l4_core_hwmod,
3050 .slave = &omap34xx_mcspi4,
3051 .clk = "mcspi4_ick",
3052 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003053 .user = OCP_USER_MPU | OCP_USER_SDMA,
3054};
3055
Keshava Munegowdade231382011-12-15 23:14:44 -07003056static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3057 .master = &omap3xxx_usb_host_hs_hwmod,
3058 .slave = &omap3xxx_l3_main_hwmod,
3059 .clk = "core_l3_ick",
3060 .user = OCP_USER_MPU,
3061};
3062
Keshava Munegowdade231382011-12-15 23:14:44 -07003063static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3064 {
3065 .name = "uhh",
3066 .pa_start = 0x48064000,
3067 .pa_end = 0x480643ff,
3068 .flags = ADDR_TYPE_RT
3069 },
3070 {
3071 .name = "ohci",
3072 .pa_start = 0x48064400,
3073 .pa_end = 0x480647ff,
3074 },
3075 {
3076 .name = "ehci",
3077 .pa_start = 0x48064800,
3078 .pa_end = 0x48064cff,
3079 },
3080 {}
3081};
3082
3083static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3084 .master = &omap3xxx_l4_core_hwmod,
3085 .slave = &omap3xxx_usb_host_hs_hwmod,
3086 .clk = "usbhost_ick",
3087 .addr = omap3xxx_usb_host_hs_addrs,
3088 .user = OCP_USER_MPU | OCP_USER_SDMA,
3089};
3090
Keshava Munegowdade231382011-12-15 23:14:44 -07003091static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3092 {
3093 .name = "tll",
3094 .pa_start = 0x48062000,
3095 .pa_end = 0x48062fff,
3096 .flags = ADDR_TYPE_RT
3097 },
3098 {}
3099};
3100
3101static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3102 .master = &omap3xxx_l4_core_hwmod,
3103 .slave = &omap3xxx_usb_tll_hs_hwmod,
3104 .clk = "usbtll_ick",
3105 .addr = omap3xxx_usb_tll_hs_addrs,
3106 .user = OCP_USER_MPU | OCP_USER_SDMA,
3107};
3108
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003109/* l4_core -> hdq1w interface */
3110static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3111 .master = &omap3xxx_l4_core_hwmod,
3112 .slave = &omap3xxx_hdq1w_hwmod,
3113 .clk = "hdq_ick",
3114 .addr = omap2_hdq1w_addr_space,
3115 .user = OCP_USER_MPU | OCP_USER_SDMA,
3116 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3117};
3118
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003119/* l4_wkup -> 32ksync_counter */
3120static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3121 {
3122 .pa_start = 0x48320000,
3123 .pa_end = 0x4832001f,
3124 .flags = ADDR_TYPE_RT
3125 },
3126 { }
3127};
3128
3129static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3130 .master = &omap3xxx_l4_wkup_hwmod,
3131 .slave = &omap3xxx_counter_32k_hwmod,
3132 .clk = "omap_32ksync_ick",
3133 .addr = omap3xxx_counter_32k_addrs,
3134 .user = OCP_USER_MPU | OCP_USER_SDMA,
3135};
3136
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003137static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3138 &omap3xxx_l3_main__l4_core,
3139 &omap3xxx_l3_main__l4_per,
3140 &omap3xxx_mpu__l3_main,
3141 &omap3xxx_l4_core__l4_wkup,
3142 &omap3xxx_l4_core__mmc3,
3143 &omap3_l4_core__uart1,
3144 &omap3_l4_core__uart2,
3145 &omap3_l4_per__uart3,
3146 &omap3_l4_core__i2c1,
3147 &omap3_l4_core__i2c2,
3148 &omap3_l4_core__i2c3,
3149 &omap3xxx_l4_wkup__l4_sec,
3150 &omap3xxx_l4_wkup__timer1,
3151 &omap3xxx_l4_per__timer2,
3152 &omap3xxx_l4_per__timer3,
3153 &omap3xxx_l4_per__timer4,
3154 &omap3xxx_l4_per__timer5,
3155 &omap3xxx_l4_per__timer6,
3156 &omap3xxx_l4_per__timer7,
3157 &omap3xxx_l4_per__timer8,
3158 &omap3xxx_l4_per__timer9,
3159 &omap3xxx_l4_core__timer10,
3160 &omap3xxx_l4_core__timer11,
3161 &omap3xxx_l4_wkup__wd_timer2,
3162 &omap3xxx_l4_wkup__gpio1,
3163 &omap3xxx_l4_per__gpio2,
3164 &omap3xxx_l4_per__gpio3,
3165 &omap3xxx_l4_per__gpio4,
3166 &omap3xxx_l4_per__gpio5,
3167 &omap3xxx_l4_per__gpio6,
3168 &omap3xxx_dma_system__l3,
3169 &omap3xxx_l4_core__dma_system,
3170 &omap3xxx_l4_core__mcbsp1,
3171 &omap3xxx_l4_per__mcbsp2,
3172 &omap3xxx_l4_per__mcbsp3,
3173 &omap3xxx_l4_per__mcbsp4,
3174 &omap3xxx_l4_core__mcbsp5,
3175 &omap3xxx_l4_per__mcbsp2_sidetone,
3176 &omap3xxx_l4_per__mcbsp3_sidetone,
3177 &omap34xx_l4_core__mcspi1,
3178 &omap34xx_l4_core__mcspi2,
3179 &omap34xx_l4_core__mcspi3,
3180 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003181 &omap3xxx_l4_wkup__counter_32k,
Paul Walmsley73591542010-02-22 22:09:32 -07003182 NULL,
3183};
3184
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003185/* GP-only hwmod links */
3186static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3187 &omap3xxx_l4_sec__timer12,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003188 NULL
3189};
3190
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003191/* 3430ES1-only hwmod links */
3192static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3193 &omap3430es1_dss__l3,
3194 &omap3430es1_l4_core__dss,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003195 NULL
3196};
3197
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003198/* 3430ES2+-only hwmod links */
3199static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3200 &omap3xxx_dss__l3,
3201 &omap3xxx_l4_core__dss,
3202 &omap3xxx_usbhsotg__l3,
3203 &omap3xxx_l4_core__usbhsotg,
3204 &omap3xxx_usb_host_hs__l3_main_2,
3205 &omap3xxx_l4_core__usb_host_hs,
3206 &omap3xxx_l4_core__usb_tll_hs,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003207 NULL
3208};
3209
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003210/* <= 3430ES3-only hwmod links */
3211static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3212 &omap3xxx_l4_core__pre_es3_mmc1,
3213 &omap3xxx_l4_core__pre_es3_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003214 NULL
3215};
3216
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003217/* 3430ES3+-only hwmod links */
3218static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3219 &omap3xxx_l4_core__es3plus_mmc1,
3220 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003221 NULL
3222};
3223
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003224/* 34xx-only hwmod links (all ES revisions) */
3225static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3226 &omap3xxx_l3__iva,
3227 &omap34xx_l4_core__sr1,
3228 &omap34xx_l4_core__sr2,
3229 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003230 &omap3xxx_l4_core__hdq1w,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003231 NULL
3232};
3233
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003234/* 36xx-only hwmod links (all ES revisions) */
3235static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3236 &omap3xxx_l3__iva,
3237 &omap36xx_l4_per__uart4,
3238 &omap3xxx_dss__l3,
3239 &omap3xxx_l4_core__dss,
3240 &omap36xx_l4_core__sr1,
3241 &omap36xx_l4_core__sr2,
3242 &omap3xxx_usbhsotg__l3,
3243 &omap3xxx_l4_core__usbhsotg,
3244 &omap3xxx_l4_core__mailbox,
3245 &omap3xxx_usb_host_hs__l3_main_2,
3246 &omap3xxx_l4_core__usb_host_hs,
3247 &omap3xxx_l4_core__usb_tll_hs,
3248 &omap3xxx_l4_core__es3plus_mmc1,
3249 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003250 &omap3xxx_l4_core__hdq1w,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003251 NULL
3252};
3253
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003254static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3255 &omap3xxx_dss__l3,
3256 &omap3xxx_l4_core__dss,
3257 &am35xx_usbhsotg__l3,
3258 &am35xx_l4_core__usbhsotg,
3259 &am35xx_l4_core__uart4,
3260 &omap3xxx_usb_host_hs__l3_main_2,
3261 &omap3xxx_l4_core__usb_host_hs,
3262 &omap3xxx_l4_core__usb_tll_hs,
3263 &omap3xxx_l4_core__es3plus_mmc1,
3264 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003265 NULL
3266};
3267
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003268static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3269 &omap3xxx_l4_core__dss_dispc,
3270 &omap3xxx_l4_core__dss_dsi1,
3271 &omap3xxx_l4_core__dss_rfbi,
3272 &omap3xxx_l4_core__dss_venc,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003273 NULL
3274};
3275
Paul Walmsley73591542010-02-22 22:09:32 -07003276int __init omap3xxx_hwmod_init(void)
3277{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003278 int r;
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003279 struct omap_hwmod_ocp_if **h = NULL;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003280 unsigned int rev;
3281
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003282 /* Register hwmod links common to all OMAP3 */
3283 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003284 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003285 return r;
3286
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003287 /* Register GP-only hwmod links. */
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003288 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003289 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003290 if (r < 0)
3291 return r;
3292 }
3293
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003294 rev = omap_rev();
3295
3296 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003297 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003298 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3299 * All possible revisions should be included in this conditional.
3300 */
3301 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3302 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3303 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003304 h = omap34xx_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07003305 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003306 h = am35xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003307 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3308 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003309 h = omap36xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003310 } else {
3311 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3312 return -EINVAL;
3313 };
3314
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003315 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003316 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003317 return r;
3318
3319 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003320 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003321 * particular family of silicon (e.g., 34xx ES1.0)
3322 */
3323 h = NULL;
3324 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003325 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003326 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3327 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3328 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003329 h = omap3430es2plus_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003330 };
3331
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003332 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003333 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003334 if (r < 0)
3335 return r;
3336 }
3337
3338 h = NULL;
3339 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3340 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003341 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003342 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3343 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003344 h = omap3430_es3plus_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003345 };
3346
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003347 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003348 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003349 if (r < 0)
3350 return r;
3351
3352 /*
3353 * DSS code presumes that dss_core hwmod is handled first,
3354 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003355 * DSS hwmod links last to ensure that dss_core is already
3356 * registered. Otherwise some change things may happen, for
3357 * ex. if dispc is handled before dss_core and DSS is enabled
3358 * in bootloader DISPC will be reset with outputs enabled
3359 * which sometimes leads to unrecoverable L3 error. XXX The
3360 * long-term fix to this is to ensure hwmods are set up in
3361 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003362 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003363 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003364
3365 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003366}