blob: 7b330944b3f7920692111eb643544a49e58ca044 [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 = {
Jon Hunter139486f2012-06-05 12:34:53 -0500153 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600154};
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 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600198 .class = &omap3xxx_timer_1ms_hwmod_class,
199};
200
201/* timer3 */
202static struct omap_hwmod omap3xxx_timer3_hwmod = {
203 .name = "timer3",
204 .mpu_irqs = omap2_timer3_mpu_irqs,
205 .main_clk = "gpt3_fck",
206 .prcm = {
207 .omap2 = {
208 .prcm_reg_id = 1,
209 .module_bit = OMAP3430_EN_GPT3_SHIFT,
210 .module_offs = OMAP3430_PER_MOD,
211 .idlest_reg_id = 1,
212 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
213 },
214 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600215 .class = &omap3xxx_timer_hwmod_class,
216};
217
218/* timer4 */
219static struct omap_hwmod omap3xxx_timer4_hwmod = {
220 .name = "timer4",
221 .mpu_irqs = omap2_timer4_mpu_irqs,
222 .main_clk = "gpt4_fck",
223 .prcm = {
224 .omap2 = {
225 .prcm_reg_id = 1,
226 .module_bit = OMAP3430_EN_GPT4_SHIFT,
227 .module_offs = OMAP3430_PER_MOD,
228 .idlest_reg_id = 1,
229 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
230 },
231 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600232 .class = &omap3xxx_timer_hwmod_class,
233};
234
235/* timer5 */
236static struct omap_hwmod omap3xxx_timer5_hwmod = {
237 .name = "timer5",
238 .mpu_irqs = omap2_timer5_mpu_irqs,
239 .main_clk = "gpt5_fck",
240 .prcm = {
241 .omap2 = {
242 .prcm_reg_id = 1,
243 .module_bit = OMAP3430_EN_GPT5_SHIFT,
244 .module_offs = OMAP3430_PER_MOD,
245 .idlest_reg_id = 1,
246 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
247 },
248 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600249 .class = &omap3xxx_timer_hwmod_class,
250};
251
252/* timer6 */
253static struct omap_hwmod omap3xxx_timer6_hwmod = {
254 .name = "timer6",
255 .mpu_irqs = omap2_timer6_mpu_irqs,
256 .main_clk = "gpt6_fck",
257 .prcm = {
258 .omap2 = {
259 .prcm_reg_id = 1,
260 .module_bit = OMAP3430_EN_GPT6_SHIFT,
261 .module_offs = OMAP3430_PER_MOD,
262 .idlest_reg_id = 1,
263 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
264 },
265 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600266 .class = &omap3xxx_timer_hwmod_class,
267};
268
269/* timer7 */
270static struct omap_hwmod omap3xxx_timer7_hwmod = {
271 .name = "timer7",
272 .mpu_irqs = omap2_timer7_mpu_irqs,
273 .main_clk = "gpt7_fck",
274 .prcm = {
275 .omap2 = {
276 .prcm_reg_id = 1,
277 .module_bit = OMAP3430_EN_GPT7_SHIFT,
278 .module_offs = OMAP3430_PER_MOD,
279 .idlest_reg_id = 1,
280 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
281 },
282 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600283 .class = &omap3xxx_timer_hwmod_class,
284};
285
286/* timer8 */
287static struct omap_hwmod omap3xxx_timer8_hwmod = {
288 .name = "timer8",
289 .mpu_irqs = omap2_timer8_mpu_irqs,
290 .main_clk = "gpt8_fck",
291 .prcm = {
292 .omap2 = {
293 .prcm_reg_id = 1,
294 .module_bit = OMAP3430_EN_GPT8_SHIFT,
295 .module_offs = OMAP3430_PER_MOD,
296 .idlest_reg_id = 1,
297 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
298 },
299 },
300 .dev_attr = &capability_pwm_dev_attr,
301 .class = &omap3xxx_timer_hwmod_class,
302};
303
304/* timer9 */
305static struct omap_hwmod omap3xxx_timer9_hwmod = {
306 .name = "timer9",
307 .mpu_irqs = omap2_timer9_mpu_irqs,
308 .main_clk = "gpt9_fck",
309 .prcm = {
310 .omap2 = {
311 .prcm_reg_id = 1,
312 .module_bit = OMAP3430_EN_GPT9_SHIFT,
313 .module_offs = OMAP3430_PER_MOD,
314 .idlest_reg_id = 1,
315 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
316 },
317 },
318 .dev_attr = &capability_pwm_dev_attr,
319 .class = &omap3xxx_timer_hwmod_class,
320};
321
322/* timer10 */
323static struct omap_hwmod omap3xxx_timer10_hwmod = {
324 .name = "timer10",
325 .mpu_irqs = omap2_timer10_mpu_irqs,
326 .main_clk = "gpt10_fck",
327 .prcm = {
328 .omap2 = {
329 .prcm_reg_id = 1,
330 .module_bit = OMAP3430_EN_GPT10_SHIFT,
331 .module_offs = CORE_MOD,
332 .idlest_reg_id = 1,
333 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
334 },
335 },
336 .dev_attr = &capability_pwm_dev_attr,
337 .class = &omap3xxx_timer_1ms_hwmod_class,
338};
339
340/* timer11 */
341static struct omap_hwmod omap3xxx_timer11_hwmod = {
342 .name = "timer11",
343 .mpu_irqs = omap2_timer11_mpu_irqs,
344 .main_clk = "gpt11_fck",
345 .prcm = {
346 .omap2 = {
347 .prcm_reg_id = 1,
348 .module_bit = OMAP3430_EN_GPT11_SHIFT,
349 .module_offs = CORE_MOD,
350 .idlest_reg_id = 1,
351 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
352 },
353 },
354 .dev_attr = &capability_pwm_dev_attr,
355 .class = &omap3xxx_timer_hwmod_class,
356};
357
358/* timer12 */
359static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
360 { .irq = 95, },
361 { .irq = -1 }
362};
363
364static struct omap_hwmod omap3xxx_timer12_hwmod = {
365 .name = "timer12",
366 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
367 .main_clk = "gpt12_fck",
368 .prcm = {
369 .omap2 = {
370 .prcm_reg_id = 1,
371 .module_bit = OMAP3430_EN_GPT12_SHIFT,
372 .module_offs = WKUP_MOD,
373 .idlest_reg_id = 1,
374 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
375 },
376 },
377 .dev_attr = &capability_secure_dev_attr,
378 .class = &omap3xxx_timer_hwmod_class,
379};
380
381/*
382 * 'wd_timer' class
383 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
384 * overflow condition
385 */
386
387static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
388 .rev_offs = 0x0000,
389 .sysc_offs = 0x0010,
390 .syss_offs = 0x0014,
391 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
392 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
393 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
394 SYSS_HAS_RESET_STATUS),
395 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
396 .sysc_fields = &omap_hwmod_sysc_type1,
397};
398
399/* I2C common */
400static struct omap_hwmod_class_sysconfig i2c_sysc = {
401 .rev_offs = 0x00,
402 .sysc_offs = 0x20,
403 .syss_offs = 0x10,
404 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
405 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
406 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
407 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
408 .clockact = CLOCKACT_TEST_ICLK,
409 .sysc_fields = &omap_hwmod_sysc_type1,
410};
411
412static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
413 .name = "wd_timer",
414 .sysc = &omap3xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -0600415 .pre_shutdown = &omap2_wd_timer_disable,
416 .reset = &omap2_wd_timer_reset,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600417};
418
419static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
420 .name = "wd_timer2",
421 .class = &omap3xxx_wd_timer_hwmod_class,
422 .main_clk = "wdt2_fck",
423 .prcm = {
424 .omap2 = {
425 .prcm_reg_id = 1,
426 .module_bit = OMAP3430_EN_WDT2_SHIFT,
427 .module_offs = WKUP_MOD,
428 .idlest_reg_id = 1,
429 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
430 },
431 },
432 /*
433 * XXX: Use software supervised mode, HW supervised smartidle seems to
434 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
435 */
436 .flags = HWMOD_SWSUP_SIDLE,
437};
438
439/* UART1 */
440static struct omap_hwmod omap3xxx_uart1_hwmod = {
441 .name = "uart1",
442 .mpu_irqs = omap2_uart1_mpu_irqs,
443 .sdma_reqs = omap2_uart1_sdma_reqs,
444 .main_clk = "uart1_fck",
445 .prcm = {
446 .omap2 = {
447 .module_offs = CORE_MOD,
448 .prcm_reg_id = 1,
449 .module_bit = OMAP3430_EN_UART1_SHIFT,
450 .idlest_reg_id = 1,
451 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
452 },
453 },
454 .class = &omap2_uart_class,
455};
456
457/* UART2 */
458static struct omap_hwmod omap3xxx_uart2_hwmod = {
459 .name = "uart2",
460 .mpu_irqs = omap2_uart2_mpu_irqs,
461 .sdma_reqs = omap2_uart2_sdma_reqs,
462 .main_clk = "uart2_fck",
463 .prcm = {
464 .omap2 = {
465 .module_offs = CORE_MOD,
466 .prcm_reg_id = 1,
467 .module_bit = OMAP3430_EN_UART2_SHIFT,
468 .idlest_reg_id = 1,
469 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
470 },
471 },
472 .class = &omap2_uart_class,
473};
474
475/* UART3 */
476static struct omap_hwmod omap3xxx_uart3_hwmod = {
477 .name = "uart3",
478 .mpu_irqs = omap2_uart3_mpu_irqs,
479 .sdma_reqs = omap2_uart3_sdma_reqs,
480 .main_clk = "uart3_fck",
481 .prcm = {
482 .omap2 = {
483 .module_offs = OMAP3430_PER_MOD,
484 .prcm_reg_id = 1,
485 .module_bit = OMAP3430_EN_UART3_SHIFT,
486 .idlest_reg_id = 1,
487 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
488 },
489 },
490 .class = &omap2_uart_class,
491};
492
493/* UART4 */
494static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
495 { .irq = INT_36XX_UART4_IRQ, },
496 { .irq = -1 }
497};
498
499static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
500 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
501 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
502 { .dma_req = -1 }
503};
504
505static struct omap_hwmod omap36xx_uart4_hwmod = {
506 .name = "uart4",
507 .mpu_irqs = uart4_mpu_irqs,
508 .sdma_reqs = uart4_sdma_reqs,
509 .main_clk = "uart4_fck",
510 .prcm = {
511 .omap2 = {
512 .module_offs = OMAP3430_PER_MOD,
513 .prcm_reg_id = 1,
514 .module_bit = OMAP3630_EN_UART4_SHIFT,
515 .idlest_reg_id = 1,
516 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
517 },
518 },
519 .class = &omap2_uart_class,
520};
521
522static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
523 { .irq = INT_35XX_UART4_IRQ, },
524};
525
526static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
527 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
528 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
529};
530
531static struct omap_hwmod am35xx_uart4_hwmod = {
532 .name = "uart4",
533 .mpu_irqs = am35xx_uart4_mpu_irqs,
534 .sdma_reqs = am35xx_uart4_sdma_reqs,
535 .main_clk = "uart4_fck",
536 .prcm = {
537 .omap2 = {
538 .module_offs = CORE_MOD,
539 .prcm_reg_id = 1,
540 .module_bit = OMAP3430_EN_UART4_SHIFT,
541 .idlest_reg_id = 1,
542 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
543 },
544 },
545 .class = &omap2_uart_class,
546};
547
548static struct omap_hwmod_class i2c_class = {
549 .name = "i2c",
550 .sysc = &i2c_sysc,
551 .rev = OMAP_I2C_IP_VERSION_1,
552 .reset = &omap_i2c_reset,
553};
554
555static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
556 { .name = "dispc", .dma_req = 5 },
557 { .name = "dsi1", .dma_req = 74 },
558 { .dma_req = -1 }
559};
560
561/* dss */
562static struct omap_hwmod_opt_clk dss_opt_clks[] = {
563 /*
564 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
565 * driver does not use these clocks.
566 */
567 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
568 { .role = "tv_clk", .clk = "dss_tv_fck" },
569 /* required only on OMAP3430 */
570 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
571};
572
573static struct omap_hwmod omap3430es1_dss_core_hwmod = {
574 .name = "dss_core",
575 .class = &omap2_dss_hwmod_class,
576 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
577 .sdma_reqs = omap3xxx_dss_sdma_chs,
578 .prcm = {
579 .omap2 = {
580 .prcm_reg_id = 1,
581 .module_bit = OMAP3430_EN_DSS1_SHIFT,
582 .module_offs = OMAP3430_DSS_MOD,
583 .idlest_reg_id = 1,
584 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
585 },
586 },
587 .opt_clks = dss_opt_clks,
588 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
589 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
590};
591
592static struct omap_hwmod omap3xxx_dss_core_hwmod = {
593 .name = "dss_core",
594 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
595 .class = &omap2_dss_hwmod_class,
596 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
597 .sdma_reqs = omap3xxx_dss_sdma_chs,
598 .prcm = {
599 .omap2 = {
600 .prcm_reg_id = 1,
601 .module_bit = OMAP3430_EN_DSS1_SHIFT,
602 .module_offs = OMAP3430_DSS_MOD,
603 .idlest_reg_id = 1,
604 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
605 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
606 },
607 },
608 .opt_clks = dss_opt_clks,
609 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
610};
611
612/*
613 * 'dispc' class
614 * display controller
615 */
616
617static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
618 .rev_offs = 0x0000,
619 .sysc_offs = 0x0010,
620 .syss_offs = 0x0014,
621 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
622 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
623 SYSC_HAS_ENAWAKEUP),
624 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
625 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
626 .sysc_fields = &omap_hwmod_sysc_type1,
627};
628
629static struct omap_hwmod_class omap3_dispc_hwmod_class = {
630 .name = "dispc",
631 .sysc = &omap3_dispc_sysc,
632};
633
634static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
635 .name = "dss_dispc",
636 .class = &omap3_dispc_hwmod_class,
637 .mpu_irqs = omap2_dispc_irqs,
638 .main_clk = "dss1_alwon_fck",
639 .prcm = {
640 .omap2 = {
641 .prcm_reg_id = 1,
642 .module_bit = OMAP3430_EN_DSS1_SHIFT,
643 .module_offs = OMAP3430_DSS_MOD,
644 },
645 },
646 .flags = HWMOD_NO_IDLEST,
647 .dev_attr = &omap2_3_dss_dispc_dev_attr
648};
649
650/*
651 * 'dsi' class
652 * display serial interface controller
653 */
654
655static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
656 .name = "dsi",
657};
658
659static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
660 { .irq = 25 },
661 { .irq = -1 }
662};
663
664/* dss_dsi1 */
665static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
666 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
667};
668
669static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
670 .name = "dss_dsi1",
671 .class = &omap3xxx_dsi_hwmod_class,
672 .mpu_irqs = omap3xxx_dsi1_irqs,
673 .main_clk = "dss1_alwon_fck",
674 .prcm = {
675 .omap2 = {
676 .prcm_reg_id = 1,
677 .module_bit = OMAP3430_EN_DSS1_SHIFT,
678 .module_offs = OMAP3430_DSS_MOD,
679 },
680 },
681 .opt_clks = dss_dsi1_opt_clks,
682 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
683 .flags = HWMOD_NO_IDLEST,
684};
685
686static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
687 { .role = "ick", .clk = "dss_ick" },
688};
689
690static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
691 .name = "dss_rfbi",
692 .class = &omap2_rfbi_hwmod_class,
693 .main_clk = "dss1_alwon_fck",
694 .prcm = {
695 .omap2 = {
696 .prcm_reg_id = 1,
697 .module_bit = OMAP3430_EN_DSS1_SHIFT,
698 .module_offs = OMAP3430_DSS_MOD,
699 },
700 },
701 .opt_clks = dss_rfbi_opt_clks,
702 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
703 .flags = HWMOD_NO_IDLEST,
704};
705
706static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
707 /* required only on OMAP3430 */
708 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
709};
710
711static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
712 .name = "dss_venc",
713 .class = &omap2_venc_hwmod_class,
714 .main_clk = "dss_tv_fck",
715 .prcm = {
716 .omap2 = {
717 .prcm_reg_id = 1,
718 .module_bit = OMAP3430_EN_DSS1_SHIFT,
719 .module_offs = OMAP3430_DSS_MOD,
720 },
721 },
722 .opt_clks = dss_venc_opt_clks,
723 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
724 .flags = HWMOD_NO_IDLEST,
725};
726
727/* I2C1 */
728static struct omap_i2c_dev_attr i2c1_dev_attr = {
729 .fifo_depth = 8, /* bytes */
730 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
731 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
732 OMAP_I2C_FLAG_BUS_SHIFT_2,
733};
734
735static struct omap_hwmod omap3xxx_i2c1_hwmod = {
736 .name = "i2c1",
737 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
738 .mpu_irqs = omap2_i2c1_mpu_irqs,
739 .sdma_reqs = omap2_i2c1_sdma_reqs,
740 .main_clk = "i2c1_fck",
741 .prcm = {
742 .omap2 = {
743 .module_offs = CORE_MOD,
744 .prcm_reg_id = 1,
745 .module_bit = OMAP3430_EN_I2C1_SHIFT,
746 .idlest_reg_id = 1,
747 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
748 },
749 },
750 .class = &i2c_class,
751 .dev_attr = &i2c1_dev_attr,
752};
753
754/* I2C2 */
755static struct omap_i2c_dev_attr i2c2_dev_attr = {
756 .fifo_depth = 8, /* bytes */
757 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
758 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
759 OMAP_I2C_FLAG_BUS_SHIFT_2,
760};
761
762static struct omap_hwmod omap3xxx_i2c2_hwmod = {
763 .name = "i2c2",
764 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
765 .mpu_irqs = omap2_i2c2_mpu_irqs,
766 .sdma_reqs = omap2_i2c2_sdma_reqs,
767 .main_clk = "i2c2_fck",
768 .prcm = {
769 .omap2 = {
770 .module_offs = CORE_MOD,
771 .prcm_reg_id = 1,
772 .module_bit = OMAP3430_EN_I2C2_SHIFT,
773 .idlest_reg_id = 1,
774 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
775 },
776 },
777 .class = &i2c_class,
778 .dev_attr = &i2c2_dev_attr,
779};
780
781/* I2C3 */
782static struct omap_i2c_dev_attr i2c3_dev_attr = {
783 .fifo_depth = 64, /* bytes */
784 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
785 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
786 OMAP_I2C_FLAG_BUS_SHIFT_2,
787};
788
789static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
790 { .irq = INT_34XX_I2C3_IRQ, },
791 { .irq = -1 }
792};
793
794static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
795 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
796 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
797 { .dma_req = -1 }
798};
799
800static struct omap_hwmod omap3xxx_i2c3_hwmod = {
801 .name = "i2c3",
802 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
803 .mpu_irqs = i2c3_mpu_irqs,
804 .sdma_reqs = i2c3_sdma_reqs,
805 .main_clk = "i2c3_fck",
806 .prcm = {
807 .omap2 = {
808 .module_offs = CORE_MOD,
809 .prcm_reg_id = 1,
810 .module_bit = OMAP3430_EN_I2C3_SHIFT,
811 .idlest_reg_id = 1,
812 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
813 },
814 },
815 .class = &i2c_class,
816 .dev_attr = &i2c3_dev_attr,
817};
818
819/*
820 * 'gpio' class
821 * general purpose io module
822 */
823
824static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
825 .rev_offs = 0x0000,
826 .sysc_offs = 0x0010,
827 .syss_offs = 0x0014,
828 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
829 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
830 SYSS_HAS_RESET_STATUS),
831 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
832 .sysc_fields = &omap_hwmod_sysc_type1,
833};
834
835static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
836 .name = "gpio",
837 .sysc = &omap3xxx_gpio_sysc,
838 .rev = 1,
839};
840
841/* gpio_dev_attr */
842static struct omap_gpio_dev_attr gpio_dev_attr = {
843 .bank_width = 32,
844 .dbck_flag = true,
845};
846
847/* gpio1 */
848static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
849 { .role = "dbclk", .clk = "gpio1_dbck", },
850};
851
852static struct omap_hwmod omap3xxx_gpio1_hwmod = {
853 .name = "gpio1",
854 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
855 .mpu_irqs = omap2_gpio1_irqs,
856 .main_clk = "gpio1_ick",
857 .opt_clks = gpio1_opt_clks,
858 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
859 .prcm = {
860 .omap2 = {
861 .prcm_reg_id = 1,
862 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
863 .module_offs = WKUP_MOD,
864 .idlest_reg_id = 1,
865 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
866 },
867 },
868 .class = &omap3xxx_gpio_hwmod_class,
869 .dev_attr = &gpio_dev_attr,
870};
871
872/* gpio2 */
873static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
874 { .role = "dbclk", .clk = "gpio2_dbck", },
875};
876
877static struct omap_hwmod omap3xxx_gpio2_hwmod = {
878 .name = "gpio2",
879 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
880 .mpu_irqs = omap2_gpio2_irqs,
881 .main_clk = "gpio2_ick",
882 .opt_clks = gpio2_opt_clks,
883 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
884 .prcm = {
885 .omap2 = {
886 .prcm_reg_id = 1,
887 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
888 .module_offs = OMAP3430_PER_MOD,
889 .idlest_reg_id = 1,
890 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
891 },
892 },
893 .class = &omap3xxx_gpio_hwmod_class,
894 .dev_attr = &gpio_dev_attr,
895};
896
897/* gpio3 */
898static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
899 { .role = "dbclk", .clk = "gpio3_dbck", },
900};
901
902static struct omap_hwmod omap3xxx_gpio3_hwmod = {
903 .name = "gpio3",
904 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
905 .mpu_irqs = omap2_gpio3_irqs,
906 .main_clk = "gpio3_ick",
907 .opt_clks = gpio3_opt_clks,
908 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
909 .prcm = {
910 .omap2 = {
911 .prcm_reg_id = 1,
912 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
913 .module_offs = OMAP3430_PER_MOD,
914 .idlest_reg_id = 1,
915 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
916 },
917 },
918 .class = &omap3xxx_gpio_hwmod_class,
919 .dev_attr = &gpio_dev_attr,
920};
921
922/* gpio4 */
923static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
924 { .role = "dbclk", .clk = "gpio4_dbck", },
925};
926
927static struct omap_hwmod omap3xxx_gpio4_hwmod = {
928 .name = "gpio4",
929 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
930 .mpu_irqs = omap2_gpio4_irqs,
931 .main_clk = "gpio4_ick",
932 .opt_clks = gpio4_opt_clks,
933 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
934 .prcm = {
935 .omap2 = {
936 .prcm_reg_id = 1,
937 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
938 .module_offs = OMAP3430_PER_MOD,
939 .idlest_reg_id = 1,
940 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
941 },
942 },
943 .class = &omap3xxx_gpio_hwmod_class,
944 .dev_attr = &gpio_dev_attr,
945};
946
947/* gpio5 */
948static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
949 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
950 { .irq = -1 }
951};
952
953static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
954 { .role = "dbclk", .clk = "gpio5_dbck", },
955};
956
957static struct omap_hwmod omap3xxx_gpio5_hwmod = {
958 .name = "gpio5",
959 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
960 .mpu_irqs = omap3xxx_gpio5_irqs,
961 .main_clk = "gpio5_ick",
962 .opt_clks = gpio5_opt_clks,
963 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
964 .prcm = {
965 .omap2 = {
966 .prcm_reg_id = 1,
967 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
968 .module_offs = OMAP3430_PER_MOD,
969 .idlest_reg_id = 1,
970 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
971 },
972 },
973 .class = &omap3xxx_gpio_hwmod_class,
974 .dev_attr = &gpio_dev_attr,
975};
976
977/* gpio6 */
978static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
979 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
980 { .irq = -1 }
981};
982
983static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
984 { .role = "dbclk", .clk = "gpio6_dbck", },
985};
986
987static struct omap_hwmod omap3xxx_gpio6_hwmod = {
988 .name = "gpio6",
989 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
990 .mpu_irqs = omap3xxx_gpio6_irqs,
991 .main_clk = "gpio6_ick",
992 .opt_clks = gpio6_opt_clks,
993 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
994 .prcm = {
995 .omap2 = {
996 .prcm_reg_id = 1,
997 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
998 .module_offs = OMAP3430_PER_MOD,
999 .idlest_reg_id = 1,
1000 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1001 },
1002 },
1003 .class = &omap3xxx_gpio_hwmod_class,
1004 .dev_attr = &gpio_dev_attr,
1005};
1006
1007/* dma attributes */
1008static struct omap_dma_dev_attr dma_dev_attr = {
1009 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1010 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1011 .lch_count = 32,
1012};
1013
1014static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1015 .rev_offs = 0x0000,
1016 .sysc_offs = 0x002c,
1017 .syss_offs = 0x0028,
1018 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1019 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1020 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1021 SYSS_HAS_RESET_STATUS),
1022 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1023 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1024 .sysc_fields = &omap_hwmod_sysc_type1,
1025};
1026
1027static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1028 .name = "dma",
1029 .sysc = &omap3xxx_dma_sysc,
1030};
1031
1032/* dma_system */
1033static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1034 .name = "dma",
1035 .class = &omap3xxx_dma_hwmod_class,
1036 .mpu_irqs = omap2_dma_system_irqs,
1037 .main_clk = "core_l3_ick",
1038 .prcm = {
1039 .omap2 = {
1040 .module_offs = CORE_MOD,
1041 .prcm_reg_id = 1,
1042 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1043 .idlest_reg_id = 1,
1044 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1045 },
1046 },
1047 .dev_attr = &dma_dev_attr,
1048 .flags = HWMOD_NO_IDLEST,
1049};
1050
1051/*
1052 * 'mcbsp' class
1053 * multi channel buffered serial port controller
1054 */
1055
1056static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1057 .sysc_offs = 0x008c,
1058 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1059 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1060 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1061 .sysc_fields = &omap_hwmod_sysc_type1,
1062 .clockact = 0x2,
1063};
1064
1065static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1066 .name = "mcbsp",
1067 .sysc = &omap3xxx_mcbsp_sysc,
1068 .rev = MCBSP_CONFIG_TYPE3,
1069};
1070
1071/* mcbsp1 */
1072static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001073 { .name = "common", .irq = 16 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001074 { .name = "tx", .irq = 59 },
1075 { .name = "rx", .irq = 60 },
1076 { .irq = -1 }
1077};
1078
1079static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1080 .name = "mcbsp1",
1081 .class = &omap3xxx_mcbsp_hwmod_class,
1082 .mpu_irqs = omap3xxx_mcbsp1_irqs,
1083 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1084 .main_clk = "mcbsp1_fck",
1085 .prcm = {
1086 .omap2 = {
1087 .prcm_reg_id = 1,
1088 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1089 .module_offs = CORE_MOD,
1090 .idlest_reg_id = 1,
1091 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1092 },
1093 },
1094};
1095
1096/* mcbsp2 */
1097static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001098 { .name = "common", .irq = 17 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001099 { .name = "tx", .irq = 62 },
1100 { .name = "rx", .irq = 63 },
1101 { .irq = -1 }
1102};
1103
1104static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1105 .sidetone = "mcbsp2_sidetone",
1106};
1107
1108static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1109 .name = "mcbsp2",
1110 .class = &omap3xxx_mcbsp_hwmod_class,
1111 .mpu_irqs = omap3xxx_mcbsp2_irqs,
1112 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1113 .main_clk = "mcbsp2_fck",
1114 .prcm = {
1115 .omap2 = {
1116 .prcm_reg_id = 1,
1117 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1118 .module_offs = OMAP3430_PER_MOD,
1119 .idlest_reg_id = 1,
1120 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1121 },
1122 },
1123 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1124};
1125
1126/* mcbsp3 */
1127static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001128 { .name = "common", .irq = 22 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001129 { .name = "tx", .irq = 89 },
1130 { .name = "rx", .irq = 90 },
1131 { .irq = -1 }
1132};
1133
1134static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1135 .sidetone = "mcbsp3_sidetone",
1136};
1137
1138static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1139 .name = "mcbsp3",
1140 .class = &omap3xxx_mcbsp_hwmod_class,
1141 .mpu_irqs = omap3xxx_mcbsp3_irqs,
1142 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1143 .main_clk = "mcbsp3_fck",
1144 .prcm = {
1145 .omap2 = {
1146 .prcm_reg_id = 1,
1147 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1148 .module_offs = OMAP3430_PER_MOD,
1149 .idlest_reg_id = 1,
1150 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1151 },
1152 },
1153 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1154};
1155
1156/* mcbsp4 */
1157static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001158 { .name = "common", .irq = 23 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001159 { .name = "tx", .irq = 54 },
1160 { .name = "rx", .irq = 55 },
1161 { .irq = -1 }
1162};
1163
1164static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
1165 { .name = "rx", .dma_req = 20 },
1166 { .name = "tx", .dma_req = 19 },
1167 { .dma_req = -1 }
1168};
1169
1170static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1171 .name = "mcbsp4",
1172 .class = &omap3xxx_mcbsp_hwmod_class,
1173 .mpu_irqs = omap3xxx_mcbsp4_irqs,
1174 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
1175 .main_clk = "mcbsp4_fck",
1176 .prcm = {
1177 .omap2 = {
1178 .prcm_reg_id = 1,
1179 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1180 .module_offs = OMAP3430_PER_MOD,
1181 .idlest_reg_id = 1,
1182 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1183 },
1184 },
1185};
1186
1187/* mcbsp5 */
1188static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
Peter Ujfalusi1c2badc2012-05-08 11:34:28 -06001189 { .name = "common", .irq = 27 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001190 { .name = "tx", .irq = 81 },
1191 { .name = "rx", .irq = 82 },
1192 { .irq = -1 }
1193};
1194
1195static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
1196 { .name = "rx", .dma_req = 22 },
1197 { .name = "tx", .dma_req = 21 },
1198 { .dma_req = -1 }
1199};
1200
1201static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1202 .name = "mcbsp5",
1203 .class = &omap3xxx_mcbsp_hwmod_class,
1204 .mpu_irqs = omap3xxx_mcbsp5_irqs,
1205 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
1206 .main_clk = "mcbsp5_fck",
1207 .prcm = {
1208 .omap2 = {
1209 .prcm_reg_id = 1,
1210 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1211 .module_offs = CORE_MOD,
1212 .idlest_reg_id = 1,
1213 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1214 },
1215 },
1216};
1217
1218/* 'mcbsp sidetone' class */
1219static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1220 .sysc_offs = 0x0010,
1221 .sysc_flags = SYSC_HAS_AUTOIDLE,
1222 .sysc_fields = &omap_hwmod_sysc_type1,
1223};
1224
1225static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1226 .name = "mcbsp_sidetone",
1227 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1228};
1229
1230/* mcbsp2_sidetone */
1231static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
1232 { .name = "irq", .irq = 4 },
1233 { .irq = -1 }
1234};
1235
1236static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1237 .name = "mcbsp2_sidetone",
1238 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1239 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
1240 .main_clk = "mcbsp2_fck",
1241 .prcm = {
1242 .omap2 = {
1243 .prcm_reg_id = 1,
1244 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1245 .module_offs = OMAP3430_PER_MOD,
1246 .idlest_reg_id = 1,
1247 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1248 },
1249 },
1250};
1251
1252/* mcbsp3_sidetone */
1253static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
1254 { .name = "irq", .irq = 5 },
1255 { .irq = -1 }
1256};
1257
1258static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1259 .name = "mcbsp3_sidetone",
1260 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1261 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
1262 .main_clk = "mcbsp3_fck",
1263 .prcm = {
1264 .omap2 = {
1265 .prcm_reg_id = 1,
1266 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1267 .module_offs = OMAP3430_PER_MOD,
1268 .idlest_reg_id = 1,
1269 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1270 },
1271 },
1272};
1273
1274/* SR common */
1275static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1276 .clkact_shift = 20,
1277};
1278
1279static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1280 .sysc_offs = 0x24,
1281 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1282 .clockact = CLOCKACT_TEST_ICLK,
1283 .sysc_fields = &omap34xx_sr_sysc_fields,
1284};
1285
1286static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1287 .name = "smartreflex",
1288 .sysc = &omap34xx_sr_sysc,
1289 .rev = 1,
1290};
1291
1292static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1293 .sidle_shift = 24,
1294 .enwkup_shift = 26,
1295};
1296
1297static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1298 .sysc_offs = 0x38,
1299 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1300 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1301 SYSC_NO_CACHE),
1302 .sysc_fields = &omap36xx_sr_sysc_fields,
1303};
1304
1305static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1306 .name = "smartreflex",
1307 .sysc = &omap36xx_sr_sysc,
1308 .rev = 2,
1309};
1310
1311/* SR1 */
1312static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1313 .sensor_voltdm_name = "mpu_iva",
1314};
1315
1316static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
1317 { .irq = 18 },
1318 { .irq = -1 }
1319};
1320
1321static struct omap_hwmod omap34xx_sr1_hwmod = {
1322 .name = "sr1",
1323 .class = &omap34xx_smartreflex_hwmod_class,
1324 .main_clk = "sr1_fck",
1325 .prcm = {
1326 .omap2 = {
1327 .prcm_reg_id = 1,
1328 .module_bit = OMAP3430_EN_SR1_SHIFT,
1329 .module_offs = WKUP_MOD,
1330 .idlest_reg_id = 1,
1331 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1332 },
1333 },
1334 .dev_attr = &sr1_dev_attr,
1335 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1336 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1337};
1338
1339static struct omap_hwmod omap36xx_sr1_hwmod = {
1340 .name = "sr1",
1341 .class = &omap36xx_smartreflex_hwmod_class,
1342 .main_clk = "sr1_fck",
1343 .prcm = {
1344 .omap2 = {
1345 .prcm_reg_id = 1,
1346 .module_bit = OMAP3430_EN_SR1_SHIFT,
1347 .module_offs = WKUP_MOD,
1348 .idlest_reg_id = 1,
1349 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1350 },
1351 },
1352 .dev_attr = &sr1_dev_attr,
1353 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1354};
1355
1356/* SR2 */
1357static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1358 .sensor_voltdm_name = "core",
1359};
1360
1361static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
1362 { .irq = 19 },
1363 { .irq = -1 }
1364};
1365
1366static struct omap_hwmod omap34xx_sr2_hwmod = {
1367 .name = "sr2",
1368 .class = &omap34xx_smartreflex_hwmod_class,
1369 .main_clk = "sr2_fck",
1370 .prcm = {
1371 .omap2 = {
1372 .prcm_reg_id = 1,
1373 .module_bit = OMAP3430_EN_SR2_SHIFT,
1374 .module_offs = WKUP_MOD,
1375 .idlest_reg_id = 1,
1376 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1377 },
1378 },
1379 .dev_attr = &sr2_dev_attr,
1380 .mpu_irqs = omap3_smartreflex_core_irqs,
1381 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1382};
1383
1384static struct omap_hwmod omap36xx_sr2_hwmod = {
1385 .name = "sr2",
1386 .class = &omap36xx_smartreflex_hwmod_class,
1387 .main_clk = "sr2_fck",
1388 .prcm = {
1389 .omap2 = {
1390 .prcm_reg_id = 1,
1391 .module_bit = OMAP3430_EN_SR2_SHIFT,
1392 .module_offs = WKUP_MOD,
1393 .idlest_reg_id = 1,
1394 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1395 },
1396 },
1397 .dev_attr = &sr2_dev_attr,
1398 .mpu_irqs = omap3_smartreflex_core_irqs,
1399};
1400
1401/*
1402 * 'mailbox' class
1403 * mailbox module allowing communication between the on-chip processors
1404 * using a queued mailbox-interrupt mechanism.
1405 */
1406
1407static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1408 .rev_offs = 0x000,
1409 .sysc_offs = 0x010,
1410 .syss_offs = 0x014,
1411 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1412 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1413 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1414 .sysc_fields = &omap_hwmod_sysc_type1,
1415};
1416
1417static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1418 .name = "mailbox",
1419 .sysc = &omap3xxx_mailbox_sysc,
1420};
1421
1422static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
1423 { .irq = 26 },
1424 { .irq = -1 }
1425};
1426
1427static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1428 .name = "mailbox",
1429 .class = &omap3xxx_mailbox_hwmod_class,
1430 .mpu_irqs = omap3xxx_mailbox_irqs,
1431 .main_clk = "mailboxes_ick",
1432 .prcm = {
1433 .omap2 = {
1434 .prcm_reg_id = 1,
1435 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1436 .module_offs = CORE_MOD,
1437 .idlest_reg_id = 1,
1438 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1439 },
1440 },
1441};
1442
1443/*
1444 * 'mcspi' class
1445 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1446 * bus
1447 */
1448
1449static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1450 .rev_offs = 0x0000,
1451 .sysc_offs = 0x0010,
1452 .syss_offs = 0x0014,
1453 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1454 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1455 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1456 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1457 .sysc_fields = &omap_hwmod_sysc_type1,
1458};
1459
1460static struct omap_hwmod_class omap34xx_mcspi_class = {
1461 .name = "mcspi",
1462 .sysc = &omap34xx_mcspi_sysc,
1463 .rev = OMAP3_MCSPI_REV,
1464};
1465
1466/* mcspi1 */
1467static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1468 .num_chipselect = 4,
1469};
1470
1471static struct omap_hwmod omap34xx_mcspi1 = {
1472 .name = "mcspi1",
1473 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1474 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1475 .main_clk = "mcspi1_fck",
1476 .prcm = {
1477 .omap2 = {
1478 .module_offs = CORE_MOD,
1479 .prcm_reg_id = 1,
1480 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1481 .idlest_reg_id = 1,
1482 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1483 },
1484 },
1485 .class = &omap34xx_mcspi_class,
1486 .dev_attr = &omap_mcspi1_dev_attr,
1487};
1488
1489/* mcspi2 */
1490static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1491 .num_chipselect = 2,
1492};
1493
1494static struct omap_hwmod omap34xx_mcspi2 = {
1495 .name = "mcspi2",
1496 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1497 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1498 .main_clk = "mcspi2_fck",
1499 .prcm = {
1500 .omap2 = {
1501 .module_offs = CORE_MOD,
1502 .prcm_reg_id = 1,
1503 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1504 .idlest_reg_id = 1,
1505 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1506 },
1507 },
1508 .class = &omap34xx_mcspi_class,
1509 .dev_attr = &omap_mcspi2_dev_attr,
1510};
1511
1512/* mcspi3 */
1513static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
1514 { .name = "irq", .irq = 91 }, /* 91 */
1515 { .irq = -1 }
1516};
1517
1518static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
1519 { .name = "tx0", .dma_req = 15 },
1520 { .name = "rx0", .dma_req = 16 },
1521 { .name = "tx1", .dma_req = 23 },
1522 { .name = "rx1", .dma_req = 24 },
1523 { .dma_req = -1 }
1524};
1525
1526static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1527 .num_chipselect = 2,
1528};
1529
1530static struct omap_hwmod omap34xx_mcspi3 = {
1531 .name = "mcspi3",
1532 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
1533 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
1534 .main_clk = "mcspi3_fck",
1535 .prcm = {
1536 .omap2 = {
1537 .module_offs = CORE_MOD,
1538 .prcm_reg_id = 1,
1539 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1540 .idlest_reg_id = 1,
1541 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1542 },
1543 },
1544 .class = &omap34xx_mcspi_class,
1545 .dev_attr = &omap_mcspi3_dev_attr,
1546};
1547
1548/* mcspi4 */
1549static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
1550 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
1551 { .irq = -1 }
1552};
1553
1554static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
1555 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
1556 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
1557 { .dma_req = -1 }
1558};
1559
1560static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1561 .num_chipselect = 1,
1562};
1563
1564static struct omap_hwmod omap34xx_mcspi4 = {
1565 .name = "mcspi4",
1566 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
1567 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
1568 .main_clk = "mcspi4_fck",
1569 .prcm = {
1570 .omap2 = {
1571 .module_offs = CORE_MOD,
1572 .prcm_reg_id = 1,
1573 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1574 .idlest_reg_id = 1,
1575 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1576 },
1577 },
1578 .class = &omap34xx_mcspi_class,
1579 .dev_attr = &omap_mcspi4_dev_attr,
1580};
1581
1582/* usbhsotg */
1583static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1584 .rev_offs = 0x0400,
1585 .sysc_offs = 0x0404,
1586 .syss_offs = 0x0408,
1587 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1588 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1589 SYSC_HAS_AUTOIDLE),
1590 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1591 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1592 .sysc_fields = &omap_hwmod_sysc_type1,
1593};
1594
1595static struct omap_hwmod_class usbotg_class = {
1596 .name = "usbotg",
1597 .sysc = &omap3xxx_usbhsotg_sysc,
1598};
1599
1600/* usb_otg_hs */
1601static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1602
1603 { .name = "mc", .irq = 92 },
1604 { .name = "dma", .irq = 93 },
1605 { .irq = -1 }
1606};
1607
1608static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1609 .name = "usb_otg_hs",
1610 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1611 .main_clk = "hsotgusb_ick",
1612 .prcm = {
1613 .omap2 = {
1614 .prcm_reg_id = 1,
1615 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1616 .module_offs = CORE_MOD,
1617 .idlest_reg_id = 1,
1618 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1619 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
1620 },
1621 },
1622 .class = &usbotg_class,
1623
1624 /*
1625 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1626 * broken when autoidle is enabled
1627 * workaround is to disable the autoidle bit at module level.
1628 */
1629 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1630 | HWMOD_SWSUP_MSTANDBY,
1631};
1632
1633/* usb_otg_hs */
1634static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
1635
1636 { .name = "mc", .irq = 71 },
1637 { .irq = -1 }
1638};
1639
1640static struct omap_hwmod_class am35xx_usbotg_class = {
1641 .name = "am35xx_usbotg",
1642 .sysc = NULL,
1643};
1644
1645static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1646 .name = "am35x_otg_hs",
1647 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
1648 .main_clk = NULL,
1649 .prcm = {
1650 .omap2 = {
1651 },
1652 },
1653 .class = &am35xx_usbotg_class,
1654};
1655
1656/* MMC/SD/SDIO common */
1657static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1658 .rev_offs = 0x1fc,
1659 .sysc_offs = 0x10,
1660 .syss_offs = 0x14,
1661 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1662 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1663 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1664 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1665 .sysc_fields = &omap_hwmod_sysc_type1,
1666};
1667
1668static struct omap_hwmod_class omap34xx_mmc_class = {
1669 .name = "mmc",
1670 .sysc = &omap34xx_mmc_sysc,
1671};
1672
1673/* MMC/SD/SDIO1 */
1674
1675static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
1676 { .irq = 83, },
1677 { .irq = -1 }
1678};
1679
1680static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
1681 { .name = "tx", .dma_req = 61, },
1682 { .name = "rx", .dma_req = 62, },
1683 { .dma_req = -1 }
1684};
1685
1686static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1687 { .role = "dbck", .clk = "omap_32k_fck", },
1688};
1689
1690static struct omap_mmc_dev_attr mmc1_dev_attr = {
1691 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1692};
1693
1694/* See 35xx errata 2.1.1.128 in SPRZ278F */
1695static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
1696 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1697 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1698};
1699
1700static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1701 .name = "mmc1",
1702 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1703 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1704 .opt_clks = omap34xx_mmc1_opt_clks,
1705 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1706 .main_clk = "mmchs1_fck",
1707 .prcm = {
1708 .omap2 = {
1709 .module_offs = CORE_MOD,
1710 .prcm_reg_id = 1,
1711 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1712 .idlest_reg_id = 1,
1713 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1714 },
1715 },
1716 .dev_attr = &mmc1_pre_es3_dev_attr,
1717 .class = &omap34xx_mmc_class,
1718};
1719
1720static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1721 .name = "mmc1",
1722 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1723 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1724 .opt_clks = omap34xx_mmc1_opt_clks,
1725 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1726 .main_clk = "mmchs1_fck",
1727 .prcm = {
1728 .omap2 = {
1729 .module_offs = CORE_MOD,
1730 .prcm_reg_id = 1,
1731 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1732 .idlest_reg_id = 1,
1733 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1734 },
1735 },
1736 .dev_attr = &mmc1_dev_attr,
1737 .class = &omap34xx_mmc_class,
1738};
1739
1740/* MMC/SD/SDIO2 */
1741
1742static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
1743 { .irq = INT_24XX_MMC2_IRQ, },
1744 { .irq = -1 }
1745};
1746
1747static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
1748 { .name = "tx", .dma_req = 47, },
1749 { .name = "rx", .dma_req = 48, },
1750 { .dma_req = -1 }
1751};
1752
1753static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1754 { .role = "dbck", .clk = "omap_32k_fck", },
1755};
1756
1757/* See 35xx errata 2.1.1.128 in SPRZ278F */
1758static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
1759 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1760};
1761
1762static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1763 .name = "mmc2",
1764 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1765 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1766 .opt_clks = omap34xx_mmc2_opt_clks,
1767 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1768 .main_clk = "mmchs2_fck",
1769 .prcm = {
1770 .omap2 = {
1771 .module_offs = CORE_MOD,
1772 .prcm_reg_id = 1,
1773 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1774 .idlest_reg_id = 1,
1775 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1776 },
1777 },
1778 .dev_attr = &mmc2_pre_es3_dev_attr,
1779 .class = &omap34xx_mmc_class,
1780};
1781
1782static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1783 .name = "mmc2",
1784 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1785 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1786 .opt_clks = omap34xx_mmc2_opt_clks,
1787 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1788 .main_clk = "mmchs2_fck",
1789 .prcm = {
1790 .omap2 = {
1791 .module_offs = CORE_MOD,
1792 .prcm_reg_id = 1,
1793 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1794 .idlest_reg_id = 1,
1795 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1796 },
1797 },
1798 .class = &omap34xx_mmc_class,
1799};
1800
1801/* MMC/SD/SDIO3 */
1802
1803static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
1804 { .irq = 94, },
1805 { .irq = -1 }
1806};
1807
1808static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
1809 { .name = "tx", .dma_req = 77, },
1810 { .name = "rx", .dma_req = 78, },
1811 { .dma_req = -1 }
1812};
1813
1814static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1815 { .role = "dbck", .clk = "omap_32k_fck", },
1816};
1817
1818static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1819 .name = "mmc3",
1820 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
1821 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
1822 .opt_clks = omap34xx_mmc3_opt_clks,
1823 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1824 .main_clk = "mmchs3_fck",
1825 .prcm = {
1826 .omap2 = {
1827 .prcm_reg_id = 1,
1828 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1829 .idlest_reg_id = 1,
1830 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1831 },
1832 },
1833 .class = &omap34xx_mmc_class,
1834};
1835
1836/*
1837 * 'usb_host_hs' class
1838 * high-speed multi-port usb host controller
1839 */
1840
1841static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1842 .rev_offs = 0x0000,
1843 .sysc_offs = 0x0010,
1844 .syss_offs = 0x0014,
1845 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1846 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1847 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1848 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1849 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1850 .sysc_fields = &omap_hwmod_sysc_type1,
1851};
1852
1853static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1854 .name = "usb_host_hs",
1855 .sysc = &omap3xxx_usb_host_hs_sysc,
1856};
1857
1858static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1859 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
1860};
1861
1862static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
1863 { .name = "ohci-irq", .irq = 76 },
1864 { .name = "ehci-irq", .irq = 77 },
1865 { .irq = -1 }
1866};
1867
1868static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1869 .name = "usb_host_hs",
1870 .class = &omap3xxx_usb_host_hs_hwmod_class,
1871 .clkdm_name = "l3_init_clkdm",
1872 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
1873 .main_clk = "usbhost_48m_fck",
1874 .prcm = {
1875 .omap2 = {
1876 .module_offs = OMAP3430ES2_USBHOST_MOD,
1877 .prcm_reg_id = 1,
1878 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1879 .idlest_reg_id = 1,
1880 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1881 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1882 },
1883 },
1884 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
1885 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
1886
1887 /*
1888 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1889 * id: i660
1890 *
1891 * Description:
1892 * In the following configuration :
1893 * - USBHOST module is set to smart-idle mode
1894 * - PRCM asserts idle_req to the USBHOST module ( This typically
1895 * happens when the system is going to a low power mode : all ports
1896 * have been suspended, the master part of the USBHOST module has
1897 * entered the standby state, and SW has cut the functional clocks)
1898 * - an USBHOST interrupt occurs before the module is able to answer
1899 * idle_ack, typically a remote wakeup IRQ.
1900 * Then the USB HOST module will enter a deadlock situation where it
1901 * is no more accessible nor functional.
1902 *
1903 * Workaround:
1904 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1905 */
1906
1907 /*
1908 * Errata: USB host EHCI may stall when entering smart-standby mode
1909 * Id: i571
1910 *
1911 * Description:
1912 * When the USBHOST module is set to smart-standby mode, and when it is
1913 * ready to enter the standby state (i.e. all ports are suspended and
1914 * all attached devices are in suspend mode), then it can wrongly assert
1915 * the Mstandby signal too early while there are still some residual OCP
1916 * transactions ongoing. If this condition occurs, the internal state
1917 * machine may go to an undefined state and the USB link may be stuck
1918 * upon the next resume.
1919 *
1920 * Workaround:
1921 * Don't use smart standby; use only force standby,
1922 * hence HWMOD_SWSUP_MSTANDBY
1923 */
1924
1925 /*
1926 * During system boot; If the hwmod framework resets the module
1927 * the module will have smart idle settings; which can lead to deadlock
1928 * (above Errata Id:i660); so, dont reset the module during boot;
1929 * Use HWMOD_INIT_NO_RESET.
1930 */
1931
1932 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
1933 HWMOD_INIT_NO_RESET,
1934};
1935
1936/*
1937 * 'usb_tll_hs' class
1938 * usb_tll_hs module is the adapter on the usb_host_hs ports
1939 */
1940static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1941 .rev_offs = 0x0000,
1942 .sysc_offs = 0x0010,
1943 .syss_offs = 0x0014,
1944 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1945 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1946 SYSC_HAS_AUTOIDLE),
1947 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1948 .sysc_fields = &omap_hwmod_sysc_type1,
1949};
1950
1951static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1952 .name = "usb_tll_hs",
1953 .sysc = &omap3xxx_usb_tll_hs_sysc,
1954};
1955
1956static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
1957 { .name = "tll-irq", .irq = 78 },
1958 { .irq = -1 }
1959};
1960
1961static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1962 .name = "usb_tll_hs",
1963 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1964 .clkdm_name = "l3_init_clkdm",
1965 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
1966 .main_clk = "usbtll_fck",
1967 .prcm = {
1968 .omap2 = {
1969 .module_offs = CORE_MOD,
1970 .prcm_reg_id = 3,
1971 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1972 .idlest_reg_id = 3,
1973 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1974 },
1975 },
1976};
1977
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001978static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1979 .name = "hdq1w",
1980 .mpu_irqs = omap2_hdq1w_mpu_irqs,
1981 .main_clk = "hdq_fck",
1982 .prcm = {
1983 .omap2 = {
1984 .module_offs = CORE_MOD,
1985 .prcm_reg_id = 1,
1986 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1987 .idlest_reg_id = 1,
1988 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1989 },
1990 },
1991 .class = &omap2_hdq1w_class,
1992};
1993
Paul Walmsley844a3b62012-04-19 04:04:33 -06001994/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06001995 * '32K sync counter' class
1996 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1997 */
1998static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
1999 .rev_offs = 0x0000,
2000 .sysc_offs = 0x0004,
2001 .sysc_flags = SYSC_HAS_SIDLEMODE,
2002 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2003 .sysc_fields = &omap_hwmod_sysc_type1,
2004};
2005
2006static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2007 .name = "counter",
2008 .sysc = &omap3xxx_counter_sysc,
2009};
2010
2011static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2012 .name = "counter_32k",
2013 .class = &omap3xxx_counter_hwmod_class,
2014 .clkdm_name = "wkup_clkdm",
2015 .flags = HWMOD_SWSUP_SIDLE,
2016 .main_clk = "wkup_32k_fck",
2017 .prcm = {
2018 .omap2 = {
2019 .module_offs = WKUP_MOD,
2020 .prcm_reg_id = 1,
2021 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2022 .idlest_reg_id = 1,
2023 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2024 },
2025 },
2026};
2027
Paul Walmsley844a3b62012-04-19 04:04:33 -06002028/*
2029 * interfaces
2030 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302031
Paul Walmsley73591542010-02-22 22:09:32 -07002032/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002033static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
2034 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002035 .slave = &omap3xxx_l4_core_hwmod,
2036 .user = OCP_USER_MPU | OCP_USER_SDMA,
2037};
2038
2039/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002040static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
2041 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002042 .slave = &omap3xxx_l4_per_hwmod,
2043 .user = OCP_USER_MPU | OCP_USER_SDMA,
2044};
2045
sricharan4bb194d2011-02-08 22:13:37 +05302046static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2047 {
Paul Walmsley844a3b62012-04-19 04:04:33 -06002048 .pa_start = 0x68000000,
2049 .pa_end = 0x6800ffff,
2050 .flags = ADDR_TYPE_RT,
sricharan4bb194d2011-02-08 22:13:37 +05302051 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002052 { }
sricharan4bb194d2011-02-08 22:13:37 +05302053};
2054
Paul Walmsley73591542010-02-22 22:09:32 -07002055/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002056static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05302057 .master = &omap3xxx_mpu_hwmod,
2058 .slave = &omap3xxx_l3_main_hwmod,
2059 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -07002060 .user = OCP_USER_MPU,
2061};
2062
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002063/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06002064static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2065 .master = &omap3430es1_dss_core_hwmod,
2066 .slave = &omap3xxx_l3_main_hwmod,
2067 .user = OCP_USER_MPU | OCP_USER_SDMA,
2068};
2069
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002070static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2071 .master = &omap3xxx_dss_core_hwmod,
2072 .slave = &omap3xxx_l3_main_hwmod,
2073 .fw = {
2074 .omap2 = {
2075 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2076 .flags = OMAP_FIREWALL_L3,
2077 }
2078 },
2079 .user = OCP_USER_MPU | OCP_USER_SDMA,
2080};
2081
Hema HK870ea2b2011-02-17 12:07:18 +05302082/* l3_core -> usbhsotg interface */
2083static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2084 .master = &omap3xxx_usbhsotg_hwmod,
2085 .slave = &omap3xxx_l3_main_hwmod,
2086 .clk = "core_l3_ick",
2087 .user = OCP_USER_MPU,
2088};
Paul Walmsley73591542010-02-22 22:09:32 -07002089
Hema HK273ff8c2011-02-17 12:07:19 +05302090/* l3_core -> am35xx_usbhsotg interface */
2091static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2092 .master = &am35xx_usbhsotg_hwmod,
2093 .slave = &omap3xxx_l3_main_hwmod,
2094 .clk = "core_l3_ick",
2095 .user = OCP_USER_MPU,
2096};
Paul Walmsley73591542010-02-22 22:09:32 -07002097/* L4_CORE -> L4_WKUP interface */
2098static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2099 .master = &omap3xxx_l4_core_hwmod,
2100 .slave = &omap3xxx_l4_wkup_hwmod,
2101 .user = OCP_USER_MPU | OCP_USER_SDMA,
2102};
2103
Paul Walmsleyb1636052011-03-01 13:12:56 -08002104/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002105static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002106 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002107 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2108 .clk = "mmchs1_ick",
2109 .addr = omap2430_mmc1_addr_space,
2110 .user = OCP_USER_MPU | OCP_USER_SDMA,
2111 .flags = OMAP_FIREWALL_L4
2112};
2113
2114static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2115 .master = &omap3xxx_l4_core_hwmod,
2116 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002117 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002118 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002119 .user = OCP_USER_MPU | OCP_USER_SDMA,
2120 .flags = OMAP_FIREWALL_L4
2121};
2122
2123/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002124static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002125 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002126 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2127 .clk = "mmchs2_ick",
2128 .addr = omap2430_mmc2_addr_space,
2129 .user = OCP_USER_MPU | OCP_USER_SDMA,
2130 .flags = OMAP_FIREWALL_L4
2131};
2132
2133static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2134 .master = &omap3xxx_l4_core_hwmod,
2135 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002136 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002137 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002138 .user = OCP_USER_MPU | OCP_USER_SDMA,
2139 .flags = OMAP_FIREWALL_L4
2140};
2141
2142/* L4 CORE -> MMC3 interface */
2143static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2144 {
2145 .pa_start = 0x480ad000,
2146 .pa_end = 0x480ad1ff,
2147 .flags = ADDR_TYPE_RT,
2148 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002149 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002150};
2151
2152static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2153 .master = &omap3xxx_l4_core_hwmod,
2154 .slave = &omap3xxx_mmc3_hwmod,
2155 .clk = "mmchs3_ick",
2156 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002157 .user = OCP_USER_MPU | OCP_USER_SDMA,
2158 .flags = OMAP_FIREWALL_L4
2159};
2160
Kevin Hilman046465b2010-09-27 20:19:30 +05302161/* L4 CORE -> UART1 interface */
2162static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2163 {
2164 .pa_start = OMAP3_UART1_BASE,
2165 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2166 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2167 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002168 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302169};
2170
2171static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2172 .master = &omap3xxx_l4_core_hwmod,
2173 .slave = &omap3xxx_uart1_hwmod,
2174 .clk = "uart1_ick",
2175 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302176 .user = OCP_USER_MPU | OCP_USER_SDMA,
2177};
2178
2179/* L4 CORE -> UART2 interface */
2180static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2181 {
2182 .pa_start = OMAP3_UART2_BASE,
2183 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2184 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2185 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002186 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302187};
2188
2189static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2190 .master = &omap3xxx_l4_core_hwmod,
2191 .slave = &omap3xxx_uart2_hwmod,
2192 .clk = "uart2_ick",
2193 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302194 .user = OCP_USER_MPU | OCP_USER_SDMA,
2195};
2196
2197/* L4 PER -> UART3 interface */
2198static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2199 {
2200 .pa_start = OMAP3_UART3_BASE,
2201 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2202 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2203 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002204 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302205};
2206
2207static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2208 .master = &omap3xxx_l4_per_hwmod,
2209 .slave = &omap3xxx_uart3_hwmod,
2210 .clk = "uart3_ick",
2211 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302212 .user = OCP_USER_MPU | OCP_USER_SDMA,
2213};
2214
2215/* L4 PER -> UART4 interface */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002216static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302217 {
2218 .pa_start = OMAP3_UART4_BASE,
2219 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2220 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2221 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002222 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302223};
2224
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002225static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302226 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002227 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302228 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002229 .addr = omap36xx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302230 .user = OCP_USER_MPU | OCP_USER_SDMA,
2231};
2232
Kyle Manna4bf90f62011-10-18 13:47:41 -05002233/* AM35xx: L4 CORE -> UART4 interface */
2234static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2235 {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002236 .pa_start = OMAP3_UART4_AM35XX_BASE,
2237 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2238 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002239 },
2240};
2241
2242static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002243 .master = &omap3xxx_l4_core_hwmod,
2244 .slave = &am35xx_uart4_hwmod,
2245 .clk = "uart4_ick",
2246 .addr = am35xx_uart4_addr_space,
2247 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002248};
2249
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302250/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302251static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2252 .master = &omap3xxx_l4_core_hwmod,
2253 .slave = &omap3xxx_i2c1_hwmod,
2254 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002255 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302256 .fw = {
2257 .omap2 = {
2258 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2259 .l4_prot_group = 7,
2260 .flags = OMAP_FIREWALL_L4,
2261 }
2262 },
2263 .user = OCP_USER_MPU | OCP_USER_SDMA,
2264};
2265
2266/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302267static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2268 .master = &omap3xxx_l4_core_hwmod,
2269 .slave = &omap3xxx_i2c2_hwmod,
2270 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002271 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302272 .fw = {
2273 .omap2 = {
2274 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2275 .l4_prot_group = 7,
2276 .flags = OMAP_FIREWALL_L4,
2277 }
2278 },
2279 .user = OCP_USER_MPU | OCP_USER_SDMA,
2280};
2281
2282/* L4 CORE -> I2C3 interface */
2283static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2284 {
2285 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -06002286 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302287 .flags = ADDR_TYPE_RT,
2288 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002289 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302290};
2291
2292static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2293 .master = &omap3xxx_l4_core_hwmod,
2294 .slave = &omap3xxx_i2c3_hwmod,
2295 .clk = "i2c3_ick",
2296 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302297 .fw = {
2298 .omap2 = {
2299 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2300 .l4_prot_group = 7,
2301 .flags = OMAP_FIREWALL_L4,
2302 }
2303 },
2304 .user = OCP_USER_MPU | OCP_USER_SDMA,
2305};
2306
Thara Gopinathd3442722010-05-29 22:02:24 +05302307/* L4 CORE -> SR1 interface */
2308static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2309 {
2310 .pa_start = OMAP34XX_SR1_BASE,
2311 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2312 .flags = ADDR_TYPE_RT,
2313 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002314 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302315};
2316
Paul Walmsley844a3b62012-04-19 04:04:33 -06002317static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302318 .master = &omap3xxx_l4_core_hwmod,
2319 .slave = &omap34xx_sr1_hwmod,
2320 .clk = "sr_l4_ick",
2321 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302322 .user = OCP_USER_MPU,
2323};
2324
Paul Walmsley844a3b62012-04-19 04:04:33 -06002325static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2326 .master = &omap3xxx_l4_core_hwmod,
2327 .slave = &omap36xx_sr1_hwmod,
2328 .clk = "sr_l4_ick",
2329 .addr = omap3_sr1_addr_space,
2330 .user = OCP_USER_MPU,
2331};
2332
Thara Gopinathd3442722010-05-29 22:02:24 +05302333/* L4 CORE -> SR1 interface */
2334static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2335 {
2336 .pa_start = OMAP34XX_SR2_BASE,
2337 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2338 .flags = ADDR_TYPE_RT,
2339 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002340 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302341};
2342
Paul Walmsley844a3b62012-04-19 04:04:33 -06002343static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302344 .master = &omap3xxx_l4_core_hwmod,
2345 .slave = &omap34xx_sr2_hwmod,
2346 .clk = "sr_l4_ick",
2347 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302348 .user = OCP_USER_MPU,
2349};
2350
Paul Walmsley844a3b62012-04-19 04:04:33 -06002351static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2352 .master = &omap3xxx_l4_core_hwmod,
2353 .slave = &omap36xx_sr2_hwmod,
2354 .clk = "sr_l4_ick",
2355 .addr = omap3_sr2_addr_space,
2356 .user = OCP_USER_MPU,
2357};
Hema HK870ea2b2011-02-17 12:07:18 +05302358
2359static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2360 {
2361 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2362 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2363 .flags = ADDR_TYPE_RT
2364 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002365 { }
Hema HK870ea2b2011-02-17 12:07:18 +05302366};
2367
2368/* l4_core -> usbhsotg */
2369static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2370 .master = &omap3xxx_l4_core_hwmod,
2371 .slave = &omap3xxx_usbhsotg_hwmod,
2372 .clk = "l4_ick",
2373 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +05302374 .user = OCP_USER_MPU,
2375};
2376
Hema HK273ff8c2011-02-17 12:07:19 +05302377static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2378 {
2379 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2380 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2381 .flags = ADDR_TYPE_RT
2382 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002383 { }
Hema HK273ff8c2011-02-17 12:07:19 +05302384};
2385
2386/* l4_core -> usbhsotg */
2387static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2388 .master = &omap3xxx_l4_core_hwmod,
2389 .slave = &am35xx_usbhsotg_hwmod,
2390 .clk = "l4_ick",
2391 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +05302392 .user = OCP_USER_MPU,
2393};
2394
Paul Walmsley43085702012-04-19 04:03:53 -06002395/* L4_WKUP -> L4_SEC interface */
2396static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2397 .master = &omap3xxx_l4_wkup_hwmod,
2398 .slave = &omap3xxx_l4_sec_hwmod,
2399 .user = OCP_USER_MPU | OCP_USER_SDMA,
2400};
2401
Kevin Hilman540064b2010-07-26 16:34:32 -06002402/* IVA2 <- L3 interface */
2403static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2404 .master = &omap3xxx_l3_main_hwmod,
2405 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002406 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002407 .user = OCP_USER_MPU | OCP_USER_SDMA,
2408};
2409
Thara Gopinathce722d22011-02-23 00:14:05 -07002410static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2411 {
2412 .pa_start = 0x48318000,
2413 .pa_end = 0x48318000 + SZ_1K - 1,
2414 .flags = ADDR_TYPE_RT
2415 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002416 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002417};
2418
2419/* l4_wkup -> timer1 */
2420static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2421 .master = &omap3xxx_l4_wkup_hwmod,
2422 .slave = &omap3xxx_timer1_hwmod,
2423 .clk = "gpt1_ick",
2424 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002425 .user = OCP_USER_MPU | OCP_USER_SDMA,
2426};
2427
Thara Gopinathce722d22011-02-23 00:14:05 -07002428static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2429 {
2430 .pa_start = 0x49032000,
2431 .pa_end = 0x49032000 + SZ_1K - 1,
2432 .flags = ADDR_TYPE_RT
2433 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002434 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002435};
2436
2437/* l4_per -> timer2 */
2438static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2439 .master = &omap3xxx_l4_per_hwmod,
2440 .slave = &omap3xxx_timer2_hwmod,
2441 .clk = "gpt2_ick",
2442 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002443 .user = OCP_USER_MPU | OCP_USER_SDMA,
2444};
2445
Thara Gopinathce722d22011-02-23 00:14:05 -07002446static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2447 {
2448 .pa_start = 0x49034000,
2449 .pa_end = 0x49034000 + SZ_1K - 1,
2450 .flags = ADDR_TYPE_RT
2451 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002452 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002453};
2454
2455/* l4_per -> timer3 */
2456static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2457 .master = &omap3xxx_l4_per_hwmod,
2458 .slave = &omap3xxx_timer3_hwmod,
2459 .clk = "gpt3_ick",
2460 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002461 .user = OCP_USER_MPU | OCP_USER_SDMA,
2462};
2463
Thara Gopinathce722d22011-02-23 00:14:05 -07002464static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2465 {
2466 .pa_start = 0x49036000,
2467 .pa_end = 0x49036000 + SZ_1K - 1,
2468 .flags = ADDR_TYPE_RT
2469 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002470 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002471};
2472
2473/* l4_per -> timer4 */
2474static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2475 .master = &omap3xxx_l4_per_hwmod,
2476 .slave = &omap3xxx_timer4_hwmod,
2477 .clk = "gpt4_ick",
2478 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002479 .user = OCP_USER_MPU | OCP_USER_SDMA,
2480};
2481
Thara Gopinathce722d22011-02-23 00:14:05 -07002482static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2483 {
2484 .pa_start = 0x49038000,
2485 .pa_end = 0x49038000 + SZ_1K - 1,
2486 .flags = ADDR_TYPE_RT
2487 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002488 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002489};
2490
2491/* l4_per -> timer5 */
2492static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2493 .master = &omap3xxx_l4_per_hwmod,
2494 .slave = &omap3xxx_timer5_hwmod,
2495 .clk = "gpt5_ick",
2496 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002497 .user = OCP_USER_MPU | OCP_USER_SDMA,
2498};
2499
Thara Gopinathce722d22011-02-23 00:14:05 -07002500static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2501 {
2502 .pa_start = 0x4903A000,
2503 .pa_end = 0x4903A000 + SZ_1K - 1,
2504 .flags = ADDR_TYPE_RT
2505 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002506 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002507};
2508
2509/* l4_per -> timer6 */
2510static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2511 .master = &omap3xxx_l4_per_hwmod,
2512 .slave = &omap3xxx_timer6_hwmod,
2513 .clk = "gpt6_ick",
2514 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002515 .user = OCP_USER_MPU | OCP_USER_SDMA,
2516};
2517
Thara Gopinathce722d22011-02-23 00:14:05 -07002518static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2519 {
2520 .pa_start = 0x4903C000,
2521 .pa_end = 0x4903C000 + SZ_1K - 1,
2522 .flags = ADDR_TYPE_RT
2523 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002524 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002525};
2526
2527/* l4_per -> timer7 */
2528static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2529 .master = &omap3xxx_l4_per_hwmod,
2530 .slave = &omap3xxx_timer7_hwmod,
2531 .clk = "gpt7_ick",
2532 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002533 .user = OCP_USER_MPU | OCP_USER_SDMA,
2534};
2535
Thara Gopinathce722d22011-02-23 00:14:05 -07002536static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2537 {
2538 .pa_start = 0x4903E000,
2539 .pa_end = 0x4903E000 + SZ_1K - 1,
2540 .flags = ADDR_TYPE_RT
2541 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002542 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002543};
2544
2545/* l4_per -> timer8 */
2546static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2547 .master = &omap3xxx_l4_per_hwmod,
2548 .slave = &omap3xxx_timer8_hwmod,
2549 .clk = "gpt8_ick",
2550 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002551 .user = OCP_USER_MPU | OCP_USER_SDMA,
2552};
2553
Thara Gopinathce722d22011-02-23 00:14:05 -07002554static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2555 {
2556 .pa_start = 0x49040000,
2557 .pa_end = 0x49040000 + SZ_1K - 1,
2558 .flags = ADDR_TYPE_RT
2559 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002560 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002561};
2562
2563/* l4_per -> timer9 */
2564static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2565 .master = &omap3xxx_l4_per_hwmod,
2566 .slave = &omap3xxx_timer9_hwmod,
2567 .clk = "gpt9_ick",
2568 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002569 .user = OCP_USER_MPU | OCP_USER_SDMA,
2570};
2571
Thara Gopinathce722d22011-02-23 00:14:05 -07002572/* l4_core -> timer10 */
2573static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2574 .master = &omap3xxx_l4_core_hwmod,
2575 .slave = &omap3xxx_timer10_hwmod,
2576 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002577 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002578 .user = OCP_USER_MPU | OCP_USER_SDMA,
2579};
2580
Thara Gopinathce722d22011-02-23 00:14:05 -07002581/* l4_core -> timer11 */
2582static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2583 .master = &omap3xxx_l4_core_hwmod,
2584 .slave = &omap3xxx_timer11_hwmod,
2585 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002586 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002587 .user = OCP_USER_MPU | OCP_USER_SDMA,
2588};
2589
Thara Gopinathce722d22011-02-23 00:14:05 -07002590static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2591 {
2592 .pa_start = 0x48304000,
2593 .pa_end = 0x48304000 + SZ_1K - 1,
2594 .flags = ADDR_TYPE_RT
2595 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002596 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002597};
2598
2599/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002600static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2601 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002602 .slave = &omap3xxx_timer12_hwmod,
2603 .clk = "gpt12_ick",
2604 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002605 .user = OCP_USER_MPU | OCP_USER_SDMA,
2606};
2607
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302608/* l4_wkup -> wd_timer2 */
2609static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2610 {
2611 .pa_start = 0x48314000,
2612 .pa_end = 0x4831407f,
2613 .flags = ADDR_TYPE_RT
2614 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002615 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302616};
2617
2618static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2619 .master = &omap3xxx_l4_wkup_hwmod,
2620 .slave = &omap3xxx_wd_timer2_hwmod,
2621 .clk = "wdt2_ick",
2622 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302623 .user = OCP_USER_MPU | OCP_USER_SDMA,
2624};
2625
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002626/* l4_core -> dss */
2627static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2628 .master = &omap3xxx_l4_core_hwmod,
2629 .slave = &omap3430es1_dss_core_hwmod,
2630 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002631 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002632 .fw = {
2633 .omap2 = {
2634 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2635 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2636 .flags = OMAP_FIREWALL_L4,
2637 }
2638 },
2639 .user = OCP_USER_MPU | OCP_USER_SDMA,
2640};
2641
2642static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2643 .master = &omap3xxx_l4_core_hwmod,
2644 .slave = &omap3xxx_dss_core_hwmod,
2645 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002646 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002647 .fw = {
2648 .omap2 = {
2649 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2650 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2651 .flags = OMAP_FIREWALL_L4,
2652 }
2653 },
2654 .user = OCP_USER_MPU | OCP_USER_SDMA,
2655};
2656
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002657/* l4_core -> dss_dispc */
2658static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2659 .master = &omap3xxx_l4_core_hwmod,
2660 .slave = &omap3xxx_dss_dispc_hwmod,
2661 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002662 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002663 .fw = {
2664 .omap2 = {
2665 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2666 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2667 .flags = OMAP_FIREWALL_L4,
2668 }
2669 },
2670 .user = OCP_USER_MPU | OCP_USER_SDMA,
2671};
2672
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002673static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2674 {
2675 .pa_start = 0x4804FC00,
2676 .pa_end = 0x4804FFFF,
2677 .flags = ADDR_TYPE_RT
2678 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002679 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002680};
2681
2682/* l4_core -> dss_dsi1 */
2683static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2684 .master = &omap3xxx_l4_core_hwmod,
2685 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002686 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002687 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002688 .fw = {
2689 .omap2 = {
2690 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2691 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2692 .flags = OMAP_FIREWALL_L4,
2693 }
2694 },
2695 .user = OCP_USER_MPU | OCP_USER_SDMA,
2696};
2697
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002698/* l4_core -> dss_rfbi */
2699static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2700 .master = &omap3xxx_l4_core_hwmod,
2701 .slave = &omap3xxx_dss_rfbi_hwmod,
2702 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002703 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002704 .fw = {
2705 .omap2 = {
2706 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2707 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2708 .flags = OMAP_FIREWALL_L4,
2709 }
2710 },
2711 .user = OCP_USER_MPU | OCP_USER_SDMA,
2712};
2713
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002714/* l4_core -> dss_venc */
2715static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2716 .master = &omap3xxx_l4_core_hwmod,
2717 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002718 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002719 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002720 .fw = {
2721 .omap2 = {
2722 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2723 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2724 .flags = OMAP_FIREWALL_L4,
2725 }
2726 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002727 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002728 .user = OCP_USER_MPU | OCP_USER_SDMA,
2729};
2730
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002731/* l4_wkup -> gpio1 */
2732static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2733 {
2734 .pa_start = 0x48310000,
2735 .pa_end = 0x483101ff,
2736 .flags = ADDR_TYPE_RT
2737 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002738 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002739};
2740
2741static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2742 .master = &omap3xxx_l4_wkup_hwmod,
2743 .slave = &omap3xxx_gpio1_hwmod,
2744 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002745 .user = OCP_USER_MPU | OCP_USER_SDMA,
2746};
2747
2748/* l4_per -> gpio2 */
2749static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2750 {
2751 .pa_start = 0x49050000,
2752 .pa_end = 0x490501ff,
2753 .flags = ADDR_TYPE_RT
2754 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002755 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002756};
2757
2758static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2759 .master = &omap3xxx_l4_per_hwmod,
2760 .slave = &omap3xxx_gpio2_hwmod,
2761 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002762 .user = OCP_USER_MPU | OCP_USER_SDMA,
2763};
2764
2765/* l4_per -> gpio3 */
2766static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2767 {
2768 .pa_start = 0x49052000,
2769 .pa_end = 0x490521ff,
2770 .flags = ADDR_TYPE_RT
2771 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002772 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002773};
2774
2775static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2776 .master = &omap3xxx_l4_per_hwmod,
2777 .slave = &omap3xxx_gpio3_hwmod,
2778 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002779 .user = OCP_USER_MPU | OCP_USER_SDMA,
2780};
2781
2782/* l4_per -> gpio4 */
2783static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2784 {
2785 .pa_start = 0x49054000,
2786 .pa_end = 0x490541ff,
2787 .flags = ADDR_TYPE_RT
2788 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002789 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002790};
2791
2792static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2793 .master = &omap3xxx_l4_per_hwmod,
2794 .slave = &omap3xxx_gpio4_hwmod,
2795 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002796 .user = OCP_USER_MPU | OCP_USER_SDMA,
2797};
2798
2799/* l4_per -> gpio5 */
2800static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2801 {
2802 .pa_start = 0x49056000,
2803 .pa_end = 0x490561ff,
2804 .flags = ADDR_TYPE_RT
2805 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002806 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002807};
2808
2809static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2810 .master = &omap3xxx_l4_per_hwmod,
2811 .slave = &omap3xxx_gpio5_hwmod,
2812 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002813 .user = OCP_USER_MPU | OCP_USER_SDMA,
2814};
2815
2816/* l4_per -> gpio6 */
2817static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2818 {
2819 .pa_start = 0x49058000,
2820 .pa_end = 0x490581ff,
2821 .flags = ADDR_TYPE_RT
2822 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002823 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002824};
2825
2826static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2827 .master = &omap3xxx_l4_per_hwmod,
2828 .slave = &omap3xxx_gpio6_hwmod,
2829 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002830 .user = OCP_USER_MPU | OCP_USER_SDMA,
2831};
2832
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002833/* dma_system -> L3 */
2834static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2835 .master = &omap3xxx_dma_system_hwmod,
2836 .slave = &omap3xxx_l3_main_hwmod,
2837 .clk = "core_l3_ick",
2838 .user = OCP_USER_MPU | OCP_USER_SDMA,
2839};
2840
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002841static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2842 {
2843 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002844 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002845 .flags = ADDR_TYPE_RT
2846 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002847 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002848};
2849
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002850/* l4_cfg -> dma_system */
2851static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2852 .master = &omap3xxx_l4_core_hwmod,
2853 .slave = &omap3xxx_dma_system_hwmod,
2854 .clk = "core_l4_ick",
2855 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002856 .user = OCP_USER_MPU | OCP_USER_SDMA,
2857};
2858
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302859static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2860 {
2861 .name = "mpu",
2862 .pa_start = 0x48074000,
2863 .pa_end = 0x480740ff,
2864 .flags = ADDR_TYPE_RT
2865 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002866 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302867};
2868
2869/* l4_core -> mcbsp1 */
2870static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2871 .master = &omap3xxx_l4_core_hwmod,
2872 .slave = &omap3xxx_mcbsp1_hwmod,
2873 .clk = "mcbsp1_ick",
2874 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302875 .user = OCP_USER_MPU | OCP_USER_SDMA,
2876};
2877
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302878static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2879 {
2880 .name = "mpu",
2881 .pa_start = 0x49022000,
2882 .pa_end = 0x490220ff,
2883 .flags = ADDR_TYPE_RT
2884 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002885 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302886};
2887
2888/* l4_per -> mcbsp2 */
2889static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2890 .master = &omap3xxx_l4_per_hwmod,
2891 .slave = &omap3xxx_mcbsp2_hwmod,
2892 .clk = "mcbsp2_ick",
2893 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302894 .user = OCP_USER_MPU | OCP_USER_SDMA,
2895};
2896
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302897static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2898 {
2899 .name = "mpu",
2900 .pa_start = 0x49024000,
2901 .pa_end = 0x490240ff,
2902 .flags = ADDR_TYPE_RT
2903 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002904 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302905};
2906
2907/* l4_per -> mcbsp3 */
2908static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2909 .master = &omap3xxx_l4_per_hwmod,
2910 .slave = &omap3xxx_mcbsp3_hwmod,
2911 .clk = "mcbsp3_ick",
2912 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302913 .user = OCP_USER_MPU | OCP_USER_SDMA,
2914};
2915
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302916static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2917 {
2918 .name = "mpu",
2919 .pa_start = 0x49026000,
2920 .pa_end = 0x490260ff,
2921 .flags = ADDR_TYPE_RT
2922 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002923 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302924};
2925
2926/* l4_per -> mcbsp4 */
2927static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2928 .master = &omap3xxx_l4_per_hwmod,
2929 .slave = &omap3xxx_mcbsp4_hwmod,
2930 .clk = "mcbsp4_ick",
2931 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302932 .user = OCP_USER_MPU | OCP_USER_SDMA,
2933};
2934
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302935static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2936 {
2937 .name = "mpu",
2938 .pa_start = 0x48096000,
2939 .pa_end = 0x480960ff,
2940 .flags = ADDR_TYPE_RT
2941 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002942 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302943};
2944
2945/* l4_core -> mcbsp5 */
2946static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2947 .master = &omap3xxx_l4_core_hwmod,
2948 .slave = &omap3xxx_mcbsp5_hwmod,
2949 .clk = "mcbsp5_ick",
2950 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302951 .user = OCP_USER_MPU | OCP_USER_SDMA,
2952};
2953
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302954static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2955 {
2956 .name = "sidetone",
2957 .pa_start = 0x49028000,
2958 .pa_end = 0x490280ff,
2959 .flags = ADDR_TYPE_RT
2960 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002961 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302962};
2963
2964/* l4_per -> mcbsp2_sidetone */
2965static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2966 .master = &omap3xxx_l4_per_hwmod,
2967 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2968 .clk = "mcbsp2_ick",
2969 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302970 .user = OCP_USER_MPU,
2971};
2972
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302973static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2974 {
2975 .name = "sidetone",
2976 .pa_start = 0x4902A000,
2977 .pa_end = 0x4902A0ff,
2978 .flags = ADDR_TYPE_RT
2979 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002980 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302981};
2982
2983/* l4_per -> mcbsp3_sidetone */
2984static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2985 .master = &omap3xxx_l4_per_hwmod,
2986 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2987 .clk = "mcbsp3_ick",
2988 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302989 .user = OCP_USER_MPU,
2990};
2991
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002992static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2993 {
2994 .pa_start = 0x48094000,
2995 .pa_end = 0x480941ff,
2996 .flags = ADDR_TYPE_RT,
2997 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002998 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002999};
3000
3001/* l4_core -> mailbox */
3002static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3003 .master = &omap3xxx_l4_core_hwmod,
3004 .slave = &omap3xxx_mailbox_hwmod,
3005 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003006 .user = OCP_USER_MPU | OCP_USER_SDMA,
3007};
3008
Charulatha V0f616a42011-02-17 09:53:10 -08003009/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003010static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3011 .master = &omap3xxx_l4_core_hwmod,
3012 .slave = &omap34xx_mcspi1,
3013 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003014 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003015 .user = OCP_USER_MPU | OCP_USER_SDMA,
3016};
3017
3018/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003019static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3020 .master = &omap3xxx_l4_core_hwmod,
3021 .slave = &omap34xx_mcspi2,
3022 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003023 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003024 .user = OCP_USER_MPU | OCP_USER_SDMA,
3025};
3026
3027/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003028static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3029 .master = &omap3xxx_l4_core_hwmod,
3030 .slave = &omap34xx_mcspi3,
3031 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003032 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003033 .user = OCP_USER_MPU | OCP_USER_SDMA,
3034};
3035
3036/* l4 core -> mcspi4 interface */
3037static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3038 {
3039 .pa_start = 0x480ba000,
3040 .pa_end = 0x480ba0ff,
3041 .flags = ADDR_TYPE_RT,
3042 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003043 { }
Charulatha V0f616a42011-02-17 09:53:10 -08003044};
3045
3046static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3047 .master = &omap3xxx_l4_core_hwmod,
3048 .slave = &omap34xx_mcspi4,
3049 .clk = "mcspi4_ick",
3050 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003051 .user = OCP_USER_MPU | OCP_USER_SDMA,
3052};
3053
Keshava Munegowdade231382011-12-15 23:14:44 -07003054static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3055 .master = &omap3xxx_usb_host_hs_hwmod,
3056 .slave = &omap3xxx_l3_main_hwmod,
3057 .clk = "core_l3_ick",
3058 .user = OCP_USER_MPU,
3059};
3060
Keshava Munegowdade231382011-12-15 23:14:44 -07003061static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3062 {
3063 .name = "uhh",
3064 .pa_start = 0x48064000,
3065 .pa_end = 0x480643ff,
3066 .flags = ADDR_TYPE_RT
3067 },
3068 {
3069 .name = "ohci",
3070 .pa_start = 0x48064400,
3071 .pa_end = 0x480647ff,
3072 },
3073 {
3074 .name = "ehci",
3075 .pa_start = 0x48064800,
3076 .pa_end = 0x48064cff,
3077 },
3078 {}
3079};
3080
3081static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3082 .master = &omap3xxx_l4_core_hwmod,
3083 .slave = &omap3xxx_usb_host_hs_hwmod,
3084 .clk = "usbhost_ick",
3085 .addr = omap3xxx_usb_host_hs_addrs,
3086 .user = OCP_USER_MPU | OCP_USER_SDMA,
3087};
3088
Keshava Munegowdade231382011-12-15 23:14:44 -07003089static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3090 {
3091 .name = "tll",
3092 .pa_start = 0x48062000,
3093 .pa_end = 0x48062fff,
3094 .flags = ADDR_TYPE_RT
3095 },
3096 {}
3097};
3098
3099static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3100 .master = &omap3xxx_l4_core_hwmod,
3101 .slave = &omap3xxx_usb_tll_hs_hwmod,
3102 .clk = "usbtll_ick",
3103 .addr = omap3xxx_usb_tll_hs_addrs,
3104 .user = OCP_USER_MPU | OCP_USER_SDMA,
3105};
3106
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003107/* l4_core -> hdq1w interface */
3108static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3109 .master = &omap3xxx_l4_core_hwmod,
3110 .slave = &omap3xxx_hdq1w_hwmod,
3111 .clk = "hdq_ick",
3112 .addr = omap2_hdq1w_addr_space,
3113 .user = OCP_USER_MPU | OCP_USER_SDMA,
3114 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3115};
3116
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003117/* l4_wkup -> 32ksync_counter */
3118static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3119 {
3120 .pa_start = 0x48320000,
3121 .pa_end = 0x4832001f,
3122 .flags = ADDR_TYPE_RT
3123 },
3124 { }
3125};
3126
3127static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3128 .master = &omap3xxx_l4_wkup_hwmod,
3129 .slave = &omap3xxx_counter_32k_hwmod,
3130 .clk = "omap_32ksync_ick",
3131 .addr = omap3xxx_counter_32k_addrs,
3132 .user = OCP_USER_MPU | OCP_USER_SDMA,
3133};
3134
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003135static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3136 &omap3xxx_l3_main__l4_core,
3137 &omap3xxx_l3_main__l4_per,
3138 &omap3xxx_mpu__l3_main,
3139 &omap3xxx_l4_core__l4_wkup,
3140 &omap3xxx_l4_core__mmc3,
3141 &omap3_l4_core__uart1,
3142 &omap3_l4_core__uart2,
3143 &omap3_l4_per__uart3,
3144 &omap3_l4_core__i2c1,
3145 &omap3_l4_core__i2c2,
3146 &omap3_l4_core__i2c3,
3147 &omap3xxx_l4_wkup__l4_sec,
3148 &omap3xxx_l4_wkup__timer1,
3149 &omap3xxx_l4_per__timer2,
3150 &omap3xxx_l4_per__timer3,
3151 &omap3xxx_l4_per__timer4,
3152 &omap3xxx_l4_per__timer5,
3153 &omap3xxx_l4_per__timer6,
3154 &omap3xxx_l4_per__timer7,
3155 &omap3xxx_l4_per__timer8,
3156 &omap3xxx_l4_per__timer9,
3157 &omap3xxx_l4_core__timer10,
3158 &omap3xxx_l4_core__timer11,
3159 &omap3xxx_l4_wkup__wd_timer2,
3160 &omap3xxx_l4_wkup__gpio1,
3161 &omap3xxx_l4_per__gpio2,
3162 &omap3xxx_l4_per__gpio3,
3163 &omap3xxx_l4_per__gpio4,
3164 &omap3xxx_l4_per__gpio5,
3165 &omap3xxx_l4_per__gpio6,
3166 &omap3xxx_dma_system__l3,
3167 &omap3xxx_l4_core__dma_system,
3168 &omap3xxx_l4_core__mcbsp1,
3169 &omap3xxx_l4_per__mcbsp2,
3170 &omap3xxx_l4_per__mcbsp3,
3171 &omap3xxx_l4_per__mcbsp4,
3172 &omap3xxx_l4_core__mcbsp5,
3173 &omap3xxx_l4_per__mcbsp2_sidetone,
3174 &omap3xxx_l4_per__mcbsp3_sidetone,
3175 &omap34xx_l4_core__mcspi1,
3176 &omap34xx_l4_core__mcspi2,
3177 &omap34xx_l4_core__mcspi3,
3178 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003179 &omap3xxx_l4_wkup__counter_32k,
Paul Walmsley73591542010-02-22 22:09:32 -07003180 NULL,
3181};
3182
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003183/* GP-only hwmod links */
3184static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3185 &omap3xxx_l4_sec__timer12,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003186 NULL
3187};
3188
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003189/* 3430ES1-only hwmod links */
3190static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3191 &omap3430es1_dss__l3,
3192 &omap3430es1_l4_core__dss,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003193 NULL
3194};
3195
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003196/* 3430ES2+-only hwmod links */
3197static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3198 &omap3xxx_dss__l3,
3199 &omap3xxx_l4_core__dss,
3200 &omap3xxx_usbhsotg__l3,
3201 &omap3xxx_l4_core__usbhsotg,
3202 &omap3xxx_usb_host_hs__l3_main_2,
3203 &omap3xxx_l4_core__usb_host_hs,
3204 &omap3xxx_l4_core__usb_tll_hs,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003205 NULL
3206};
3207
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003208/* <= 3430ES3-only hwmod links */
3209static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3210 &omap3xxx_l4_core__pre_es3_mmc1,
3211 &omap3xxx_l4_core__pre_es3_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003212 NULL
3213};
3214
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003215/* 3430ES3+-only hwmod links */
3216static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3217 &omap3xxx_l4_core__es3plus_mmc1,
3218 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003219 NULL
3220};
3221
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003222/* 34xx-only hwmod links (all ES revisions) */
3223static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3224 &omap3xxx_l3__iva,
3225 &omap34xx_l4_core__sr1,
3226 &omap34xx_l4_core__sr2,
3227 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003228 &omap3xxx_l4_core__hdq1w,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003229 NULL
3230};
3231
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003232/* 36xx-only hwmod links (all ES revisions) */
3233static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3234 &omap3xxx_l3__iva,
3235 &omap36xx_l4_per__uart4,
3236 &omap3xxx_dss__l3,
3237 &omap3xxx_l4_core__dss,
3238 &omap36xx_l4_core__sr1,
3239 &omap36xx_l4_core__sr2,
3240 &omap3xxx_usbhsotg__l3,
3241 &omap3xxx_l4_core__usbhsotg,
3242 &omap3xxx_l4_core__mailbox,
3243 &omap3xxx_usb_host_hs__l3_main_2,
3244 &omap3xxx_l4_core__usb_host_hs,
3245 &omap3xxx_l4_core__usb_tll_hs,
3246 &omap3xxx_l4_core__es3plus_mmc1,
3247 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003248 &omap3xxx_l4_core__hdq1w,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003249 NULL
3250};
3251
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003252static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3253 &omap3xxx_dss__l3,
3254 &omap3xxx_l4_core__dss,
3255 &am35xx_usbhsotg__l3,
3256 &am35xx_l4_core__usbhsotg,
3257 &am35xx_l4_core__uart4,
3258 &omap3xxx_usb_host_hs__l3_main_2,
3259 &omap3xxx_l4_core__usb_host_hs,
3260 &omap3xxx_l4_core__usb_tll_hs,
3261 &omap3xxx_l4_core__es3plus_mmc1,
3262 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003263 NULL
3264};
3265
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003266static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3267 &omap3xxx_l4_core__dss_dispc,
3268 &omap3xxx_l4_core__dss_dsi1,
3269 &omap3xxx_l4_core__dss_rfbi,
3270 &omap3xxx_l4_core__dss_venc,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003271 NULL
3272};
3273
Paul Walmsley73591542010-02-22 22:09:32 -07003274int __init omap3xxx_hwmod_init(void)
3275{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003276 int r;
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003277 struct omap_hwmod_ocp_if **h = NULL;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003278 unsigned int rev;
3279
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003280 /* Register hwmod links common to all OMAP3 */
3281 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003282 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003283 return r;
3284
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003285 /* Register GP-only hwmod links. */
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003286 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003287 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003288 if (r < 0)
3289 return r;
3290 }
3291
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003292 rev = omap_rev();
3293
3294 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003295 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003296 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3297 * All possible revisions should be included in this conditional.
3298 */
3299 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3300 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3301 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003302 h = omap34xx_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07003303 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003304 h = am35xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003305 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3306 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003307 h = omap36xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003308 } else {
3309 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3310 return -EINVAL;
3311 };
3312
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003313 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003314 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003315 return r;
3316
3317 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003318 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003319 * particular family of silicon (e.g., 34xx ES1.0)
3320 */
3321 h = NULL;
3322 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003323 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003324 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3325 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3326 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003327 h = omap3430es2plus_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003328 };
3329
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003330 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003331 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003332 if (r < 0)
3333 return r;
3334 }
3335
3336 h = NULL;
3337 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3338 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003339 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003340 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3341 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003342 h = omap3430_es3plus_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003343 };
3344
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003345 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003346 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003347 if (r < 0)
3348 return r;
3349
3350 /*
3351 * DSS code presumes that dss_core hwmod is handled first,
3352 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003353 * DSS hwmod links last to ensure that dss_core is already
3354 * registered. Otherwise some change things may happen, for
3355 * ex. if dispc is handled before dss_core and DSS is enabled
3356 * in bootloader DISPC will be reset with outputs enabled
3357 * which sometimes leads to unrecoverable L3 error. XXX The
3358 * long-term fix to this is to ensure hwmods are set up in
3359 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003360 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003361 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003362
3363 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003364}