2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
4 * Copyright (C) 2009-2011 Nokia Corporation
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * XXX handle crossbar/shared link difference for L3?
12 * XXX these should be marked initdata for multi-OMAP kernels
14 #include <plat/omap_hwmod.h>
15 #include <mach/irqs.h>
18 #include <plat/serial.h>
20 #include <plat/gpio.h>
21 #include <plat/mcspi.h>
22 #include <plat/dmtimer.h>
23 #include <plat/l3_2xxx.h>
24 #include <plat/l4_2xxx.h>
26 #include "omap_hwmod_common_data.h"
28 #include "cm-regbits-24xx.h"
29 #include "prm-regbits-24xx.h"
33 * OMAP2420 hardware module integration data
35 * ALl of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs
41 static struct omap_hwmod omap2420_mpu_hwmod;
42 static struct omap_hwmod omap2420_iva_hwmod;
43 static struct omap_hwmod omap2420_l3_main_hwmod;
44 static struct omap_hwmod omap2420_l4_core_hwmod;
45 static struct omap_hwmod omap2420_dss_core_hwmod;
46 static struct omap_hwmod omap2420_dss_dispc_hwmod;
47 static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48 static struct omap_hwmod omap2420_dss_venc_hwmod;
49 static struct omap_hwmod omap2420_wd_timer2_hwmod;
50 static struct omap_hwmod omap2420_gpio1_hwmod;
51 static struct omap_hwmod omap2420_gpio2_hwmod;
52 static struct omap_hwmod omap2420_gpio3_hwmod;
53 static struct omap_hwmod omap2420_gpio4_hwmod;
54 static struct omap_hwmod omap2420_dma_system_hwmod;
55 static struct omap_hwmod omap2420_mcspi1_hwmod;
56 static struct omap_hwmod omap2420_mcspi2_hwmod;
58 /* L3 -> L4_CORE interface */
59 static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
60 .master = &omap2420_l3_main_hwmod,
61 .slave = &omap2420_l4_core_hwmod,
62 .user = OCP_USER_MPU | OCP_USER_SDMA,
65 /* MPU -> L3 interface */
66 static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
67 .master = &omap2420_mpu_hwmod,
68 .slave = &omap2420_l3_main_hwmod,
72 /* Slave interfaces on the L3 interconnect */
73 static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74 &omap2420_mpu__l3_main,
78 static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
79 .master = &omap2420_dss_core_hwmod,
80 .slave = &omap2420_l3_main_hwmod,
83 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
84 .flags = OMAP_FIREWALL_L3,
87 .user = OCP_USER_MPU | OCP_USER_SDMA,
90 /* Master interfaces on the L3 interconnect */
91 static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92 &omap2420_l3_main__l4_core,
96 static struct omap_hwmod omap2420_l3_main_hwmod = {
98 .class = &l3_hwmod_class,
99 .masters = omap2420_l3_main_masters,
100 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
101 .slaves = omap2420_l3_main_slaves,
102 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
103 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
104 .flags = HWMOD_NO_IDLEST,
107 static struct omap_hwmod omap2420_l4_wkup_hwmod;
108 static struct omap_hwmod omap2420_uart1_hwmod;
109 static struct omap_hwmod omap2420_uart2_hwmod;
110 static struct omap_hwmod omap2420_uart3_hwmod;
111 static struct omap_hwmod omap2420_i2c1_hwmod;
112 static struct omap_hwmod omap2420_i2c2_hwmod;
113 static struct omap_hwmod omap2420_mcbsp1_hwmod;
114 static struct omap_hwmod omap2420_mcbsp2_hwmod;
116 /* l4 core -> mcspi1 interface */
117 static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
118 .master = &omap2420_l4_core_hwmod,
119 .slave = &omap2420_mcspi1_hwmod,
121 .addr = omap2_mcspi1_addr_space,
122 .user = OCP_USER_MPU | OCP_USER_SDMA,
125 /* l4 core -> mcspi2 interface */
126 static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
127 .master = &omap2420_l4_core_hwmod,
128 .slave = &omap2420_mcspi2_hwmod,
130 .addr = omap2_mcspi2_addr_space,
131 .user = OCP_USER_MPU | OCP_USER_SDMA,
134 /* L4_CORE -> L4_WKUP interface */
135 static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
136 .master = &omap2420_l4_core_hwmod,
137 .slave = &omap2420_l4_wkup_hwmod,
138 .user = OCP_USER_MPU | OCP_USER_SDMA,
141 /* L4 CORE -> UART1 interface */
142 static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
143 .master = &omap2420_l4_core_hwmod,
144 .slave = &omap2420_uart1_hwmod,
146 .addr = omap2xxx_uart1_addr_space,
147 .user = OCP_USER_MPU | OCP_USER_SDMA,
150 /* L4 CORE -> UART2 interface */
151 static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
152 .master = &omap2420_l4_core_hwmod,
153 .slave = &omap2420_uart2_hwmod,
155 .addr = omap2xxx_uart2_addr_space,
156 .user = OCP_USER_MPU | OCP_USER_SDMA,
159 /* L4 PER -> UART3 interface */
160 static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
161 .master = &omap2420_l4_core_hwmod,
162 .slave = &omap2420_uart3_hwmod,
164 .addr = omap2xxx_uart3_addr_space,
165 .user = OCP_USER_MPU | OCP_USER_SDMA,
168 /* L4 CORE -> I2C1 interface */
169 static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
170 .master = &omap2420_l4_core_hwmod,
171 .slave = &omap2420_i2c1_hwmod,
173 .addr = omap2_i2c1_addr_space,
174 .user = OCP_USER_MPU | OCP_USER_SDMA,
177 /* L4 CORE -> I2C2 interface */
178 static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
179 .master = &omap2420_l4_core_hwmod,
180 .slave = &omap2420_i2c2_hwmod,
182 .addr = omap2_i2c2_addr_space,
183 .user = OCP_USER_MPU | OCP_USER_SDMA,
186 /* Slave interfaces on the L4_CORE interconnect */
187 static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
188 &omap2420_l3_main__l4_core,
191 /* Master interfaces on the L4_CORE interconnect */
192 static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
193 &omap2420_l4_core__l4_wkup,
194 &omap2_l4_core__uart1,
195 &omap2_l4_core__uart2,
196 &omap2_l4_core__uart3,
197 &omap2420_l4_core__i2c1,
198 &omap2420_l4_core__i2c2
202 static struct omap_hwmod omap2420_l4_core_hwmod = {
204 .class = &l4_hwmod_class,
205 .masters = omap2420_l4_core_masters,
206 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
207 .slaves = omap2420_l4_core_slaves,
208 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
209 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
210 .flags = HWMOD_NO_IDLEST,
213 /* Slave interfaces on the L4_WKUP interconnect */
214 static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
215 &omap2420_l4_core__l4_wkup,
218 /* Master interfaces on the L4_WKUP interconnect */
219 static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
223 static struct omap_hwmod omap2420_l4_wkup_hwmod = {
225 .class = &l4_hwmod_class,
226 .masters = omap2420_l4_wkup_masters,
227 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
228 .slaves = omap2420_l4_wkup_slaves,
229 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
230 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
231 .flags = HWMOD_NO_IDLEST,
234 /* Master interfaces on the MPU device */
235 static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
236 &omap2420_mpu__l3_main,
240 static struct omap_hwmod omap2420_mpu_hwmod = {
242 .class = &mpu_hwmod_class,
243 .main_clk = "mpu_ck",
244 .masters = omap2420_mpu_masters,
245 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
246 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
250 * IVA1 interface data
253 /* IVA <- L3 interface */
254 static struct omap_hwmod_ocp_if omap2420_l3__iva = {
255 .master = &omap2420_l3_main_hwmod,
256 .slave = &omap2420_iva_hwmod,
258 .user = OCP_USER_MPU | OCP_USER_SDMA,
261 static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
269 static struct omap_hwmod omap2420_iva_hwmod = {
271 .class = &iva_hwmod_class,
272 .masters = omap2420_iva_masters,
273 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
274 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
278 static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
282 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
283 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
285 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
286 .sysc_fields = &omap_hwmod_sysc_type1,
289 static struct omap_hwmod_class omap2420_timer_hwmod_class = {
291 .sysc = &omap2420_timer_sysc,
292 .rev = OMAP_TIMER_IP_VERSION_1,
296 static struct omap_hwmod omap2420_timer1_hwmod;
297 static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = {
301 static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
303 .pa_start = 0x48028000,
304 .pa_end = 0x48028000 + SZ_1K - 1,
305 .flags = ADDR_TYPE_RT
310 /* l4_wkup -> timer1 */
311 static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
312 .master = &omap2420_l4_wkup_hwmod,
313 .slave = &omap2420_timer1_hwmod,
315 .addr = omap2420_timer1_addrs,
316 .user = OCP_USER_MPU | OCP_USER_SDMA,
319 /* timer1 slave port */
320 static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
321 &omap2420_l4_wkup__timer1,
325 static struct omap_hwmod omap2420_timer1_hwmod = {
327 .mpu_irqs = omap2420_timer1_mpu_irqs,
328 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer1_mpu_irqs),
329 .main_clk = "gpt1_fck",
333 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
334 .module_offs = WKUP_MOD,
336 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
339 .slaves = omap2420_timer1_slaves,
340 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
341 .class = &omap2420_timer_hwmod_class,
342 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
346 static struct omap_hwmod omap2420_timer2_hwmod;
347 static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = {
352 /* l4_core -> timer2 */
353 static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
354 .master = &omap2420_l4_core_hwmod,
355 .slave = &omap2420_timer2_hwmod,
357 .addr = omap2xxx_timer2_addrs,
358 .user = OCP_USER_MPU | OCP_USER_SDMA,
361 /* timer2 slave port */
362 static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
363 &omap2420_l4_core__timer2,
367 static struct omap_hwmod omap2420_timer2_hwmod = {
369 .mpu_irqs = omap2420_timer2_mpu_irqs,
370 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer2_mpu_irqs),
371 .main_clk = "gpt2_fck",
375 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
376 .module_offs = CORE_MOD,
378 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
381 .slaves = omap2420_timer2_slaves,
382 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
383 .class = &omap2420_timer_hwmod_class,
384 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
388 static struct omap_hwmod omap2420_timer3_hwmod;
389 static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = {
393 /* l4_core -> timer3 */
394 static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
395 .master = &omap2420_l4_core_hwmod,
396 .slave = &omap2420_timer3_hwmod,
398 .addr = omap2xxx_timer3_addrs,
399 .user = OCP_USER_MPU | OCP_USER_SDMA,
402 /* timer3 slave port */
403 static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
404 &omap2420_l4_core__timer3,
408 static struct omap_hwmod omap2420_timer3_hwmod = {
410 .mpu_irqs = omap2420_timer3_mpu_irqs,
411 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer3_mpu_irqs),
412 .main_clk = "gpt3_fck",
416 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
417 .module_offs = CORE_MOD,
419 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
422 .slaves = omap2420_timer3_slaves,
423 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
424 .class = &omap2420_timer_hwmod_class,
425 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
429 static struct omap_hwmod omap2420_timer4_hwmod;
430 static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = {
434 /* l4_core -> timer4 */
435 static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
436 .master = &omap2420_l4_core_hwmod,
437 .slave = &omap2420_timer4_hwmod,
439 .addr = omap2xxx_timer4_addrs,
440 .user = OCP_USER_MPU | OCP_USER_SDMA,
443 /* timer4 slave port */
444 static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
445 &omap2420_l4_core__timer4,
449 static struct omap_hwmod omap2420_timer4_hwmod = {
451 .mpu_irqs = omap2420_timer4_mpu_irqs,
452 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer4_mpu_irqs),
453 .main_clk = "gpt4_fck",
457 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
458 .module_offs = CORE_MOD,
460 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
463 .slaves = omap2420_timer4_slaves,
464 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
465 .class = &omap2420_timer_hwmod_class,
466 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
470 static struct omap_hwmod omap2420_timer5_hwmod;
471 static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = {
475 /* l4_core -> timer5 */
476 static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
477 .master = &omap2420_l4_core_hwmod,
478 .slave = &omap2420_timer5_hwmod,
480 .addr = omap2xxx_timer5_addrs,
481 .user = OCP_USER_MPU | OCP_USER_SDMA,
484 /* timer5 slave port */
485 static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
486 &omap2420_l4_core__timer5,
490 static struct omap_hwmod omap2420_timer5_hwmod = {
492 .mpu_irqs = omap2420_timer5_mpu_irqs,
493 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer5_mpu_irqs),
494 .main_clk = "gpt5_fck",
498 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
499 .module_offs = CORE_MOD,
501 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
504 .slaves = omap2420_timer5_slaves,
505 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
506 .class = &omap2420_timer_hwmod_class,
507 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
512 static struct omap_hwmod omap2420_timer6_hwmod;
513 static struct omap_hwmod_irq_info omap2420_timer6_mpu_irqs[] = {
517 /* l4_core -> timer6 */
518 static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
519 .master = &omap2420_l4_core_hwmod,
520 .slave = &omap2420_timer6_hwmod,
522 .addr = omap2xxx_timer6_addrs,
523 .user = OCP_USER_MPU | OCP_USER_SDMA,
526 /* timer6 slave port */
527 static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
528 &omap2420_l4_core__timer6,
532 static struct omap_hwmod omap2420_timer6_hwmod = {
534 .mpu_irqs = omap2420_timer6_mpu_irqs,
535 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer6_mpu_irqs),
536 .main_clk = "gpt6_fck",
540 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
541 .module_offs = CORE_MOD,
543 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
546 .slaves = omap2420_timer6_slaves,
547 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
548 .class = &omap2420_timer_hwmod_class,
549 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
553 static struct omap_hwmod omap2420_timer7_hwmod;
554 static struct omap_hwmod_irq_info omap2420_timer7_mpu_irqs[] = {
558 /* l4_core -> timer7 */
559 static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
560 .master = &omap2420_l4_core_hwmod,
561 .slave = &omap2420_timer7_hwmod,
563 .addr = omap2xxx_timer7_addrs,
564 .user = OCP_USER_MPU | OCP_USER_SDMA,
567 /* timer7 slave port */
568 static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
569 &omap2420_l4_core__timer7,
573 static struct omap_hwmod omap2420_timer7_hwmod = {
575 .mpu_irqs = omap2420_timer7_mpu_irqs,
576 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer7_mpu_irqs),
577 .main_clk = "gpt7_fck",
581 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
582 .module_offs = CORE_MOD,
584 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
587 .slaves = omap2420_timer7_slaves,
588 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
589 .class = &omap2420_timer_hwmod_class,
590 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
594 static struct omap_hwmod omap2420_timer8_hwmod;
595 static struct omap_hwmod_irq_info omap2420_timer8_mpu_irqs[] = {
599 /* l4_core -> timer8 */
600 static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
601 .master = &omap2420_l4_core_hwmod,
602 .slave = &omap2420_timer8_hwmod,
604 .addr = omap2xxx_timer8_addrs,
605 .user = OCP_USER_MPU | OCP_USER_SDMA,
608 /* timer8 slave port */
609 static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
610 &omap2420_l4_core__timer8,
614 static struct omap_hwmod omap2420_timer8_hwmod = {
616 .mpu_irqs = omap2420_timer8_mpu_irqs,
617 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer8_mpu_irqs),
618 .main_clk = "gpt8_fck",
622 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
623 .module_offs = CORE_MOD,
625 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
628 .slaves = omap2420_timer8_slaves,
629 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
630 .class = &omap2420_timer_hwmod_class,
631 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
635 static struct omap_hwmod omap2420_timer9_hwmod;
636 static struct omap_hwmod_irq_info omap2420_timer9_mpu_irqs[] = {
640 /* l4_core -> timer9 */
641 static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
642 .master = &omap2420_l4_core_hwmod,
643 .slave = &omap2420_timer9_hwmod,
645 .addr = omap2xxx_timer9_addrs,
646 .user = OCP_USER_MPU | OCP_USER_SDMA,
649 /* timer9 slave port */
650 static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
651 &omap2420_l4_core__timer9,
655 static struct omap_hwmod omap2420_timer9_hwmod = {
657 .mpu_irqs = omap2420_timer9_mpu_irqs,
658 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer9_mpu_irqs),
659 .main_clk = "gpt9_fck",
663 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
664 .module_offs = CORE_MOD,
666 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
669 .slaves = omap2420_timer9_slaves,
670 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
671 .class = &omap2420_timer_hwmod_class,
672 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
676 static struct omap_hwmod omap2420_timer10_hwmod;
677 static struct omap_hwmod_irq_info omap2420_timer10_mpu_irqs[] = {
681 /* l4_core -> timer10 */
682 static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
683 .master = &omap2420_l4_core_hwmod,
684 .slave = &omap2420_timer10_hwmod,
686 .addr = omap2_timer10_addrs,
687 .user = OCP_USER_MPU | OCP_USER_SDMA,
690 /* timer10 slave port */
691 static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
692 &omap2420_l4_core__timer10,
696 static struct omap_hwmod omap2420_timer10_hwmod = {
698 .mpu_irqs = omap2420_timer10_mpu_irqs,
699 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer10_mpu_irqs),
700 .main_clk = "gpt10_fck",
704 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
705 .module_offs = CORE_MOD,
707 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
710 .slaves = omap2420_timer10_slaves,
711 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
712 .class = &omap2420_timer_hwmod_class,
713 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
717 static struct omap_hwmod omap2420_timer11_hwmod;
718 static struct omap_hwmod_irq_info omap2420_timer11_mpu_irqs[] = {
722 /* l4_core -> timer11 */
723 static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
724 .master = &omap2420_l4_core_hwmod,
725 .slave = &omap2420_timer11_hwmod,
727 .addr = omap2_timer11_addrs,
728 .user = OCP_USER_MPU | OCP_USER_SDMA,
731 /* timer11 slave port */
732 static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
733 &omap2420_l4_core__timer11,
737 static struct omap_hwmod omap2420_timer11_hwmod = {
739 .mpu_irqs = omap2420_timer11_mpu_irqs,
740 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer11_mpu_irqs),
741 .main_clk = "gpt11_fck",
745 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
746 .module_offs = CORE_MOD,
748 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
751 .slaves = omap2420_timer11_slaves,
752 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
753 .class = &omap2420_timer_hwmod_class,
754 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
758 static struct omap_hwmod omap2420_timer12_hwmod;
759 static struct omap_hwmod_irq_info omap2420_timer12_mpu_irqs[] = {
763 /* l4_core -> timer12 */
764 static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
765 .master = &omap2420_l4_core_hwmod,
766 .slave = &omap2420_timer12_hwmod,
768 .addr = omap2xxx_timer12_addrs,
769 .user = OCP_USER_MPU | OCP_USER_SDMA,
772 /* timer12 slave port */
773 static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
774 &omap2420_l4_core__timer12,
778 static struct omap_hwmod omap2420_timer12_hwmod = {
780 .mpu_irqs = omap2420_timer12_mpu_irqs,
781 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer12_mpu_irqs),
782 .main_clk = "gpt12_fck",
786 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
787 .module_offs = CORE_MOD,
789 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
792 .slaves = omap2420_timer12_slaves,
793 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
794 .class = &omap2420_timer_hwmod_class,
795 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
798 /* l4_wkup -> wd_timer2 */
799 static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
801 .pa_start = 0x48022000,
802 .pa_end = 0x4802207f,
803 .flags = ADDR_TYPE_RT
808 static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
809 .master = &omap2420_l4_wkup_hwmod,
810 .slave = &omap2420_wd_timer2_hwmod,
811 .clk = "mpu_wdt_ick",
812 .addr = omap2420_wd_timer2_addrs,
813 .user = OCP_USER_MPU | OCP_USER_SDMA,
818 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
822 static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
826 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
827 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
828 .sysc_fields = &omap_hwmod_sysc_type1,
831 static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
833 .sysc = &omap2420_wd_timer_sysc,
834 .pre_shutdown = &omap2_wd_timer_disable
838 static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
839 &omap2420_l4_wkup__wd_timer2,
842 static struct omap_hwmod omap2420_wd_timer2_hwmod = {
844 .class = &omap2420_wd_timer_hwmod_class,
845 .main_clk = "mpu_wdt_fck",
849 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
850 .module_offs = WKUP_MOD,
852 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
855 .slaves = omap2420_wd_timer2_slaves,
856 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
857 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
862 static struct omap_hwmod_class_sysconfig uart_sysc = {
866 .sysc_flags = (SYSC_HAS_SIDLEMODE |
867 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
868 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
869 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
870 .sysc_fields = &omap_hwmod_sysc_type1,
873 static struct omap_hwmod_class uart_class = {
880 static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
881 { .irq = INT_24XX_UART1_IRQ, },
884 static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
885 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
886 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
889 static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
890 &omap2_l4_core__uart1,
893 static struct omap_hwmod omap2420_uart1_hwmod = {
895 .mpu_irqs = uart1_mpu_irqs,
896 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
897 .sdma_reqs = uart1_sdma_reqs,
898 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
899 .main_clk = "uart1_fck",
902 .module_offs = CORE_MOD,
904 .module_bit = OMAP24XX_EN_UART1_SHIFT,
906 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
909 .slaves = omap2420_uart1_slaves,
910 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
911 .class = &uart_class,
912 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
917 static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
918 { .irq = INT_24XX_UART2_IRQ, },
921 static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
922 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
923 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
926 static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
927 &omap2_l4_core__uart2,
930 static struct omap_hwmod omap2420_uart2_hwmod = {
932 .mpu_irqs = uart2_mpu_irqs,
933 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
934 .sdma_reqs = uart2_sdma_reqs,
935 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
936 .main_clk = "uart2_fck",
939 .module_offs = CORE_MOD,
941 .module_bit = OMAP24XX_EN_UART2_SHIFT,
943 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
946 .slaves = omap2420_uart2_slaves,
947 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
948 .class = &uart_class,
949 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
954 static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
955 { .irq = INT_24XX_UART3_IRQ, },
958 static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
959 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
960 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
963 static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
964 &omap2_l4_core__uart3,
967 static struct omap_hwmod omap2420_uart3_hwmod = {
969 .mpu_irqs = uart3_mpu_irqs,
970 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
971 .sdma_reqs = uart3_sdma_reqs,
972 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
973 .main_clk = "uart3_fck",
976 .module_offs = CORE_MOD,
978 .module_bit = OMAP24XX_EN_UART3_SHIFT,
980 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
983 .slaves = omap2420_uart3_slaves,
984 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
985 .class = &uart_class,
986 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
994 static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = {
998 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
999 .sysc_fields = &omap_hwmod_sysc_type1,
1002 static struct omap_hwmod_class omap2420_dss_hwmod_class = {
1004 .sysc = &omap2420_dss_sysc,
1007 static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = {
1008 { .name = "dispc", .dma_req = 5 },
1012 /* dss master ports */
1013 static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
1017 /* l4_core -> dss */
1018 static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
1019 .master = &omap2420_l4_core_hwmod,
1020 .slave = &omap2420_dss_core_hwmod,
1022 .addr = omap2_dss_addrs,
1025 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
1026 .flags = OMAP_FIREWALL_L4,
1029 .user = OCP_USER_MPU | OCP_USER_SDMA,
1032 /* dss slave ports */
1033 static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
1034 &omap2420_l4_core__dss,
1037 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1038 { .role = "tv_clk", .clk = "dss_54m_fck" },
1039 { .role = "sys_clk", .clk = "dss2_fck" },
1042 static struct omap_hwmod omap2420_dss_core_hwmod = {
1044 .class = &omap2420_dss_hwmod_class,
1045 .main_clk = "dss1_fck", /* instead of dss_fck */
1046 .sdma_reqs = omap2420_dss_sdma_chs,
1047 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_dss_sdma_chs),
1051 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1052 .module_offs = CORE_MOD,
1054 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1057 .opt_clks = dss_opt_clks,
1058 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1059 .slaves = omap2420_dss_slaves,
1060 .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
1061 .masters = omap2420_dss_masters,
1062 .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
1063 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1064 .flags = HWMOD_NO_IDLEST,
1069 * display controller
1072 static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = {
1074 .sysc_offs = 0x0010,
1075 .syss_offs = 0x0014,
1076 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
1077 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1078 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1079 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1080 .sysc_fields = &omap_hwmod_sysc_type1,
1083 static struct omap_hwmod_class omap2420_dispc_hwmod_class = {
1085 .sysc = &omap2420_dispc_sysc,
1088 static struct omap_hwmod_irq_info omap2420_dispc_irqs[] = {
1092 /* l4_core -> dss_dispc */
1093 static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
1094 .master = &omap2420_l4_core_hwmod,
1095 .slave = &omap2420_dss_dispc_hwmod,
1097 .addr = omap2_dss_dispc_addrs,
1100 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
1101 .flags = OMAP_FIREWALL_L4,
1104 .user = OCP_USER_MPU | OCP_USER_SDMA,
1107 /* dss_dispc slave ports */
1108 static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
1109 &omap2420_l4_core__dss_dispc,
1112 static struct omap_hwmod omap2420_dss_dispc_hwmod = {
1113 .name = "dss_dispc",
1114 .class = &omap2420_dispc_hwmod_class,
1115 .mpu_irqs = omap2420_dispc_irqs,
1116 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dispc_irqs),
1117 .main_clk = "dss1_fck",
1121 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1122 .module_offs = CORE_MOD,
1124 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
1127 .slaves = omap2420_dss_dispc_slaves,
1128 .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
1129 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1130 .flags = HWMOD_NO_IDLEST,
1135 * remote frame buffer interface
1138 static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = {
1140 .sysc_offs = 0x0010,
1141 .syss_offs = 0x0014,
1142 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1144 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1145 .sysc_fields = &omap_hwmod_sysc_type1,
1148 static struct omap_hwmod_class omap2420_rfbi_hwmod_class = {
1150 .sysc = &omap2420_rfbi_sysc,
1153 /* l4_core -> dss_rfbi */
1154 static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
1155 .master = &omap2420_l4_core_hwmod,
1156 .slave = &omap2420_dss_rfbi_hwmod,
1158 .addr = omap2_dss_rfbi_addrs,
1161 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
1162 .flags = OMAP_FIREWALL_L4,
1165 .user = OCP_USER_MPU | OCP_USER_SDMA,
1168 /* dss_rfbi slave ports */
1169 static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
1170 &omap2420_l4_core__dss_rfbi,
1173 static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
1175 .class = &omap2420_rfbi_hwmod_class,
1176 .main_clk = "dss1_fck",
1180 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1181 .module_offs = CORE_MOD,
1184 .slaves = omap2420_dss_rfbi_slaves,
1185 .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
1186 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1187 .flags = HWMOD_NO_IDLEST,
1195 static struct omap_hwmod_class omap2420_venc_hwmod_class = {
1199 /* l4_core -> dss_venc */
1200 static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
1201 .master = &omap2420_l4_core_hwmod,
1202 .slave = &omap2420_dss_venc_hwmod,
1203 .clk = "dss_54m_fck",
1204 .addr = omap2_dss_venc_addrs,
1207 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
1208 .flags = OMAP_FIREWALL_L4,
1211 .flags = OCPIF_SWSUP_IDLE,
1212 .user = OCP_USER_MPU | OCP_USER_SDMA,
1215 /* dss_venc slave ports */
1216 static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1217 &omap2420_l4_core__dss_venc,
1220 static struct omap_hwmod omap2420_dss_venc_hwmod = {
1222 .class = &omap2420_venc_hwmod_class,
1223 .main_clk = "dss1_fck",
1227 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1228 .module_offs = CORE_MOD,
1231 .slaves = omap2420_dss_venc_slaves,
1232 .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
1233 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1234 .flags = HWMOD_NO_IDLEST,
1238 static struct omap_hwmod_class_sysconfig i2c_sysc = {
1242 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1243 .sysc_fields = &omap_hwmod_sysc_type1,
1246 static struct omap_hwmod_class i2c_class = {
1251 static struct omap_i2c_dev_attr i2c_dev_attr;
1255 static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1256 { .irq = INT_24XX_I2C1_IRQ, },
1259 static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1260 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1261 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1264 static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1265 &omap2420_l4_core__i2c1,
1268 static struct omap_hwmod omap2420_i2c1_hwmod = {
1270 .mpu_irqs = i2c1_mpu_irqs,
1271 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
1272 .sdma_reqs = i2c1_sdma_reqs,
1273 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1274 .main_clk = "i2c1_fck",
1277 .module_offs = CORE_MOD,
1279 .module_bit = OMAP2420_EN_I2C1_SHIFT,
1281 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1284 .slaves = omap2420_i2c1_slaves,
1285 .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1286 .class = &i2c_class,
1287 .dev_attr = &i2c_dev_attr,
1288 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1289 .flags = HWMOD_16BIT_REG,
1294 static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1295 { .irq = INT_24XX_I2C2_IRQ, },
1298 static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1299 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1300 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1303 static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1304 &omap2420_l4_core__i2c2,
1307 static struct omap_hwmod omap2420_i2c2_hwmod = {
1309 .mpu_irqs = i2c2_mpu_irqs,
1310 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
1311 .sdma_reqs = i2c2_sdma_reqs,
1312 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1313 .main_clk = "i2c2_fck",
1316 .module_offs = CORE_MOD,
1318 .module_bit = OMAP2420_EN_I2C2_SHIFT,
1320 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1323 .slaves = omap2420_i2c2_slaves,
1324 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1325 .class = &i2c_class,
1326 .dev_attr = &i2c_dev_attr,
1327 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1328 .flags = HWMOD_16BIT_REG,
1331 /* l4_wkup -> gpio1 */
1332 static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1334 .pa_start = 0x48018000,
1335 .pa_end = 0x480181ff,
1336 .flags = ADDR_TYPE_RT
1341 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1342 .master = &omap2420_l4_wkup_hwmod,
1343 .slave = &omap2420_gpio1_hwmod,
1345 .addr = omap2420_gpio1_addr_space,
1346 .user = OCP_USER_MPU | OCP_USER_SDMA,
1349 /* l4_wkup -> gpio2 */
1350 static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1352 .pa_start = 0x4801a000,
1353 .pa_end = 0x4801a1ff,
1354 .flags = ADDR_TYPE_RT
1359 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1360 .master = &omap2420_l4_wkup_hwmod,
1361 .slave = &omap2420_gpio2_hwmod,
1363 .addr = omap2420_gpio2_addr_space,
1364 .user = OCP_USER_MPU | OCP_USER_SDMA,
1367 /* l4_wkup -> gpio3 */
1368 static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1370 .pa_start = 0x4801c000,
1371 .pa_end = 0x4801c1ff,
1372 .flags = ADDR_TYPE_RT
1377 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1378 .master = &omap2420_l4_wkup_hwmod,
1379 .slave = &omap2420_gpio3_hwmod,
1381 .addr = omap2420_gpio3_addr_space,
1382 .user = OCP_USER_MPU | OCP_USER_SDMA,
1385 /* l4_wkup -> gpio4 */
1386 static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1388 .pa_start = 0x4801e000,
1389 .pa_end = 0x4801e1ff,
1390 .flags = ADDR_TYPE_RT
1395 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1396 .master = &omap2420_l4_wkup_hwmod,
1397 .slave = &omap2420_gpio4_hwmod,
1399 .addr = omap2420_gpio4_addr_space,
1400 .user = OCP_USER_MPU | OCP_USER_SDMA,
1404 static struct omap_gpio_dev_attr gpio_dev_attr = {
1409 static struct omap_hwmod_class_sysconfig omap242x_gpio_sysc = {
1411 .sysc_offs = 0x0010,
1412 .syss_offs = 0x0014,
1413 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1414 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1415 SYSS_HAS_RESET_STATUS),
1416 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1417 .sysc_fields = &omap_hwmod_sysc_type1,
1422 * general purpose io module
1424 static struct omap_hwmod_class omap242x_gpio_hwmod_class = {
1426 .sysc = &omap242x_gpio_sysc,
1431 static struct omap_hwmod_irq_info omap242x_gpio1_irqs[] = {
1432 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
1435 static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1436 &omap2420_l4_wkup__gpio1,
1439 static struct omap_hwmod omap2420_gpio1_hwmod = {
1441 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1442 .mpu_irqs = omap242x_gpio1_irqs,
1443 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio1_irqs),
1444 .main_clk = "gpios_fck",
1448 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1449 .module_offs = WKUP_MOD,
1451 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1454 .slaves = omap2420_gpio1_slaves,
1455 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
1456 .class = &omap242x_gpio_hwmod_class,
1457 .dev_attr = &gpio_dev_attr,
1458 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1462 static struct omap_hwmod_irq_info omap242x_gpio2_irqs[] = {
1463 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
1466 static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1467 &omap2420_l4_wkup__gpio2,
1470 static struct omap_hwmod omap2420_gpio2_hwmod = {
1472 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1473 .mpu_irqs = omap242x_gpio2_irqs,
1474 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio2_irqs),
1475 .main_clk = "gpios_fck",
1479 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1480 .module_offs = WKUP_MOD,
1482 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1485 .slaves = omap2420_gpio2_slaves,
1486 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
1487 .class = &omap242x_gpio_hwmod_class,
1488 .dev_attr = &gpio_dev_attr,
1489 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1493 static struct omap_hwmod_irq_info omap242x_gpio3_irqs[] = {
1494 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
1497 static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1498 &omap2420_l4_wkup__gpio3,
1501 static struct omap_hwmod omap2420_gpio3_hwmod = {
1503 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1504 .mpu_irqs = omap242x_gpio3_irqs,
1505 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio3_irqs),
1506 .main_clk = "gpios_fck",
1510 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1511 .module_offs = WKUP_MOD,
1513 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1516 .slaves = omap2420_gpio3_slaves,
1517 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
1518 .class = &omap242x_gpio_hwmod_class,
1519 .dev_attr = &gpio_dev_attr,
1520 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1524 static struct omap_hwmod_irq_info omap242x_gpio4_irqs[] = {
1525 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
1528 static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1529 &omap2420_l4_wkup__gpio4,
1532 static struct omap_hwmod omap2420_gpio4_hwmod = {
1534 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1535 .mpu_irqs = omap242x_gpio4_irqs,
1536 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio4_irqs),
1537 .main_clk = "gpios_fck",
1541 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1542 .module_offs = WKUP_MOD,
1544 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1547 .slaves = omap2420_gpio4_slaves,
1548 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
1549 .class = &omap242x_gpio_hwmod_class,
1550 .dev_attr = &gpio_dev_attr,
1551 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1555 static struct omap_hwmod_class_sysconfig omap2420_dma_sysc = {
1557 .sysc_offs = 0x002c,
1558 .syss_offs = 0x0028,
1559 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
1560 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
1561 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1562 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1563 .sysc_fields = &omap_hwmod_sysc_type1,
1566 static struct omap_hwmod_class omap2420_dma_hwmod_class = {
1568 .sysc = &omap2420_dma_sysc,
1571 /* dma attributes */
1572 static struct omap_dma_dev_attr dma_dev_attr = {
1573 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1574 IS_CSSA_32 | IS_CDSA_32,
1578 static struct omap_hwmod_irq_info omap2420_dma_system_irqs[] = {
1579 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
1580 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
1581 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
1582 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
1585 /* dma_system -> L3 */
1586 static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1587 .master = &omap2420_dma_system_hwmod,
1588 .slave = &omap2420_l3_main_hwmod,
1589 .clk = "core_l3_ck",
1590 .user = OCP_USER_MPU | OCP_USER_SDMA,
1593 /* dma_system master ports */
1594 static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1595 &omap2420_dma_system__l3,
1598 /* l4_core -> dma_system */
1599 static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1600 .master = &omap2420_l4_core_hwmod,
1601 .slave = &omap2420_dma_system_hwmod,
1603 .addr = omap2_dma_system_addrs,
1604 .user = OCP_USER_MPU | OCP_USER_SDMA,
1607 /* dma_system slave ports */
1608 static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1609 &omap2420_l4_core__dma_system,
1612 static struct omap_hwmod omap2420_dma_system_hwmod = {
1614 .class = &omap2420_dma_hwmod_class,
1615 .mpu_irqs = omap2420_dma_system_irqs,
1616 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dma_system_irqs),
1617 .main_clk = "core_l3_ck",
1618 .slaves = omap2420_dma_system_slaves,
1619 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1620 .masters = omap2420_dma_system_masters,
1621 .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1622 .dev_attr = &dma_dev_attr,
1623 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1624 .flags = HWMOD_NO_IDLEST,
1629 * mailbox module allowing communication between the on-chip processors
1630 * using a queued mailbox-interrupt mechanism.
1633 static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = {
1637 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1638 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1639 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1640 .sysc_fields = &omap_hwmod_sysc_type1,
1643 static struct omap_hwmod_class omap2420_mailbox_hwmod_class = {
1645 .sysc = &omap2420_mailbox_sysc,
1649 static struct omap_hwmod omap2420_mailbox_hwmod;
1650 static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1651 { .name = "dsp", .irq = 26 },
1652 { .name = "iva", .irq = 34 },
1655 /* l4_core -> mailbox */
1656 static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1657 .master = &omap2420_l4_core_hwmod,
1658 .slave = &omap2420_mailbox_hwmod,
1659 .addr = omap2_mailbox_addrs,
1660 .user = OCP_USER_MPU | OCP_USER_SDMA,
1663 /* mailbox slave ports */
1664 static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1665 &omap2420_l4_core__mailbox,
1668 static struct omap_hwmod omap2420_mailbox_hwmod = {
1670 .class = &omap2420_mailbox_hwmod_class,
1671 .mpu_irqs = omap2420_mailbox_irqs,
1672 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mailbox_irqs),
1673 .main_clk = "mailboxes_ick",
1677 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1678 .module_offs = CORE_MOD,
1680 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1683 .slaves = omap2420_mailbox_slaves,
1684 .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
1685 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1690 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1694 static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = {
1696 .sysc_offs = 0x0010,
1697 .syss_offs = 0x0014,
1698 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1699 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1700 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1701 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1702 .sysc_fields = &omap_hwmod_sysc_type1,
1705 static struct omap_hwmod_class omap2420_mcspi_class = {
1707 .sysc = &omap2420_mcspi_sysc,
1708 .rev = OMAP2_MCSPI_REV,
1712 static struct omap_hwmod_irq_info omap2420_mcspi1_mpu_irqs[] = {
1716 static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = {
1717 { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
1718 { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
1719 { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
1720 { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
1721 { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
1722 { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
1723 { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
1724 { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
1727 static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1728 &omap2420_l4_core__mcspi1,
1731 static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1732 .num_chipselect = 4,
1735 static struct omap_hwmod omap2420_mcspi1_hwmod = {
1736 .name = "mcspi1_hwmod",
1737 .mpu_irqs = omap2420_mcspi1_mpu_irqs,
1738 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi1_mpu_irqs),
1739 .sdma_reqs = omap2420_mcspi1_sdma_reqs,
1740 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi1_sdma_reqs),
1741 .main_clk = "mcspi1_fck",
1744 .module_offs = CORE_MOD,
1746 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1748 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1751 .slaves = omap2420_mcspi1_slaves,
1752 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
1753 .class = &omap2420_mcspi_class,
1754 .dev_attr = &omap_mcspi1_dev_attr,
1755 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1759 static struct omap_hwmod_irq_info omap2420_mcspi2_mpu_irqs[] = {
1763 static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = {
1764 { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
1765 { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
1766 { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
1767 { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
1770 static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1771 &omap2420_l4_core__mcspi2,
1774 static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1775 .num_chipselect = 2,
1778 static struct omap_hwmod omap2420_mcspi2_hwmod = {
1779 .name = "mcspi2_hwmod",
1780 .mpu_irqs = omap2420_mcspi2_mpu_irqs,
1781 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi2_mpu_irqs),
1782 .sdma_reqs = omap2420_mcspi2_sdma_reqs,
1783 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi2_sdma_reqs),
1784 .main_clk = "mcspi2_fck",
1787 .module_offs = CORE_MOD,
1789 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1791 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1794 .slaves = omap2420_mcspi2_slaves,
1795 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
1796 .class = &omap2420_mcspi_class,
1797 .dev_attr = &omap_mcspi2_dev_attr,
1798 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1803 * multi channel buffered serial port controller
1806 static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1811 static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1812 { .name = "tx", .irq = 59 },
1813 { .name = "rx", .irq = 60 },
1816 static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
1817 { .name = "rx", .dma_req = 32 },
1818 { .name = "tx", .dma_req = 31 },
1821 /* l4_core -> mcbsp1 */
1822 static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1823 .master = &omap2420_l4_core_hwmod,
1824 .slave = &omap2420_mcbsp1_hwmod,
1825 .clk = "mcbsp1_ick",
1826 .addr = omap2_mcbsp1_addrs,
1827 .user = OCP_USER_MPU | OCP_USER_SDMA,
1830 /* mcbsp1 slave ports */
1831 static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1832 &omap2420_l4_core__mcbsp1,
1835 static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1837 .class = &omap2420_mcbsp_hwmod_class,
1838 .mpu_irqs = omap2420_mcbsp1_irqs,
1839 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_irqs),
1840 .sdma_reqs = omap2420_mcbsp1_sdma_chs,
1841 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs),
1842 .main_clk = "mcbsp1_fck",
1846 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1847 .module_offs = CORE_MOD,
1849 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1852 .slaves = omap2420_mcbsp1_slaves,
1853 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
1854 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1858 static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1859 { .name = "tx", .irq = 62 },
1860 { .name = "rx", .irq = 63 },
1863 static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
1864 { .name = "rx", .dma_req = 34 },
1865 { .name = "tx", .dma_req = 33 },
1868 /* l4_core -> mcbsp2 */
1869 static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1870 .master = &omap2420_l4_core_hwmod,
1871 .slave = &omap2420_mcbsp2_hwmod,
1872 .clk = "mcbsp2_ick",
1873 .addr = omap2xxx_mcbsp2_addrs,
1874 .user = OCP_USER_MPU | OCP_USER_SDMA,
1877 /* mcbsp2 slave ports */
1878 static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
1879 &omap2420_l4_core__mcbsp2,
1882 static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1884 .class = &omap2420_mcbsp_hwmod_class,
1885 .mpu_irqs = omap2420_mcbsp2_irqs,
1886 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_irqs),
1887 .sdma_reqs = omap2420_mcbsp2_sdma_chs,
1888 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs),
1889 .main_clk = "mcbsp2_fck",
1893 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1894 .module_offs = CORE_MOD,
1896 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1899 .slaves = omap2420_mcbsp2_slaves,
1900 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
1901 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1904 static __initdata struct omap_hwmod *omap2420_hwmods[] = {
1905 &omap2420_l3_main_hwmod,
1906 &omap2420_l4_core_hwmod,
1907 &omap2420_l4_wkup_hwmod,
1908 &omap2420_mpu_hwmod,
1909 &omap2420_iva_hwmod,
1911 &omap2420_timer1_hwmod,
1912 &omap2420_timer2_hwmod,
1913 &omap2420_timer3_hwmod,
1914 &omap2420_timer4_hwmod,
1915 &omap2420_timer5_hwmod,
1916 &omap2420_timer6_hwmod,
1917 &omap2420_timer7_hwmod,
1918 &omap2420_timer8_hwmod,
1919 &omap2420_timer9_hwmod,
1920 &omap2420_timer10_hwmod,
1921 &omap2420_timer11_hwmod,
1922 &omap2420_timer12_hwmod,
1924 &omap2420_wd_timer2_hwmod,
1925 &omap2420_uart1_hwmod,
1926 &omap2420_uart2_hwmod,
1927 &omap2420_uart3_hwmod,
1929 &omap2420_dss_core_hwmod,
1930 &omap2420_dss_dispc_hwmod,
1931 &omap2420_dss_rfbi_hwmod,
1932 &omap2420_dss_venc_hwmod,
1934 &omap2420_i2c1_hwmod,
1935 &omap2420_i2c2_hwmod,
1938 &omap2420_gpio1_hwmod,
1939 &omap2420_gpio2_hwmod,
1940 &omap2420_gpio3_hwmod,
1941 &omap2420_gpio4_hwmod,
1943 /* dma_system class*/
1944 &omap2420_dma_system_hwmod,
1947 &omap2420_mailbox_hwmod,
1950 &omap2420_mcbsp1_hwmod,
1951 &omap2420_mcbsp2_hwmod,
1954 &omap2420_mcspi1_hwmod,
1955 &omap2420_mcspi2_hwmod,
1959 int __init omap2420_hwmod_init(void)
1961 return omap_hwmod_register(omap2420_hwmods);