2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
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.
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
15 * XXX these should be marked initdata for multi-OMAP kernels
18 #include <linux/i2c-omap.h>
19 #include <linux/power/smartreflex.h>
20 #include <linux/platform_data/gpio-omap.h>
21 #include <linux/platform_data/hsmmc-omap.h>
23 #include <linux/omap-dma.h>
26 #include <linux/platform_data/asoc-ti-mcbsp.h>
27 #include <linux/platform_data/spi-omap2-mcspi.h>
28 #include <plat/dmtimer.h>
31 #include "omap_hwmod.h"
32 #include "omap_hwmod_common_data.h"
33 #include "prm-regbits-34xx.h"
34 #include "cm-regbits-34xx.h"
41 * OMAP3xxx hardware module integration data
43 * All of the data in this section should be autogeneratable from the
44 * TI hardware database or other technical documentation. Data that
45 * is driver-specific or driver-kernel integration-specific belongs
49 #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
57 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
59 .class = &l3_hwmod_class,
60 .flags = HWMOD_NO_IDLEST,
64 static struct omap_hwmod omap3xxx_l4_core_hwmod = {
66 .class = &l4_hwmod_class,
67 .flags = HWMOD_NO_IDLEST,
71 static struct omap_hwmod omap3xxx_l4_per_hwmod = {
73 .class = &l4_hwmod_class,
74 .flags = HWMOD_NO_IDLEST,
78 static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
80 .class = &l4_hwmod_class,
81 .flags = HWMOD_NO_IDLEST,
85 static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
87 .class = &l4_hwmod_class,
88 .flags = HWMOD_NO_IDLEST,
93 static struct omap_hwmod omap3xxx_mpu_hwmod = {
95 .class = &mpu_hwmod_class,
96 .main_clk = "arm_fck",
100 static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
101 { .name = "logic", .rst_shift = 0, .st_shift = 8 },
102 { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
103 { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
106 static struct omap_hwmod omap3xxx_iva_hwmod = {
108 .class = &iva_hwmod_class,
109 .clkdm_name = "iva2_clkdm",
110 .rst_lines = omap3xxx_iva_resets,
111 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
112 .main_clk = "iva2_ck",
115 .module_offs = OMAP3430_IVA2_MOD,
117 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
119 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
126 * debug and emulation sub system
129 static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
134 static struct omap_hwmod omap3xxx_debugss_hwmod = {
136 .class = &omap3xxx_debugss_hwmod_class,
137 .clkdm_name = "emu_clkdm",
138 .main_clk = "emu_src_ck",
139 .flags = HWMOD_NO_IDLEST,
143 static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
147 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
148 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
149 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
150 SYSS_HAS_RESET_STATUS),
151 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
152 .sysc_fields = &omap_hwmod_sysc_type1,
155 static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
157 .sysc = &omap3xxx_timer_sysc,
160 /* secure timers dev attribute */
161 static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
162 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
165 /* always-on timers dev attribute */
166 static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
167 .timer_capability = OMAP_TIMER_ALWON,
170 /* pwm timers dev attribute */
171 static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
172 .timer_capability = OMAP_TIMER_HAS_PWM,
175 /* timers with DSP interrupt dev attribute */
176 static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
177 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
180 /* pwm timers with DSP interrupt dev attribute */
181 static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
182 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
186 static struct omap_hwmod omap3xxx_timer1_hwmod = {
188 .main_clk = "gpt1_fck",
192 .module_bit = OMAP3430_EN_GPT1_SHIFT,
193 .module_offs = WKUP_MOD,
195 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
198 .dev_attr = &capability_alwon_dev_attr,
199 .class = &omap3xxx_timer_hwmod_class,
200 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
204 static struct omap_hwmod omap3xxx_timer2_hwmod = {
206 .main_clk = "gpt2_fck",
210 .module_bit = OMAP3430_EN_GPT2_SHIFT,
211 .module_offs = OMAP3430_PER_MOD,
213 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
216 .class = &omap3xxx_timer_hwmod_class,
217 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
221 static struct omap_hwmod omap3xxx_timer3_hwmod = {
223 .main_clk = "gpt3_fck",
227 .module_bit = OMAP3430_EN_GPT3_SHIFT,
228 .module_offs = OMAP3430_PER_MOD,
230 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
233 .class = &omap3xxx_timer_hwmod_class,
234 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
238 static struct omap_hwmod omap3xxx_timer4_hwmod = {
240 .main_clk = "gpt4_fck",
244 .module_bit = OMAP3430_EN_GPT4_SHIFT,
245 .module_offs = OMAP3430_PER_MOD,
247 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
250 .class = &omap3xxx_timer_hwmod_class,
251 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
255 static struct omap_hwmod omap3xxx_timer5_hwmod = {
257 .main_clk = "gpt5_fck",
261 .module_bit = OMAP3430_EN_GPT5_SHIFT,
262 .module_offs = OMAP3430_PER_MOD,
264 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
267 .dev_attr = &capability_dsp_dev_attr,
268 .class = &omap3xxx_timer_hwmod_class,
269 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
273 static struct omap_hwmod omap3xxx_timer6_hwmod = {
275 .main_clk = "gpt6_fck",
279 .module_bit = OMAP3430_EN_GPT6_SHIFT,
280 .module_offs = OMAP3430_PER_MOD,
282 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
285 .dev_attr = &capability_dsp_dev_attr,
286 .class = &omap3xxx_timer_hwmod_class,
287 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
291 static struct omap_hwmod omap3xxx_timer7_hwmod = {
293 .main_clk = "gpt7_fck",
297 .module_bit = OMAP3430_EN_GPT7_SHIFT,
298 .module_offs = OMAP3430_PER_MOD,
300 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
303 .dev_attr = &capability_dsp_dev_attr,
304 .class = &omap3xxx_timer_hwmod_class,
305 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
309 static struct omap_hwmod omap3xxx_timer8_hwmod = {
311 .main_clk = "gpt8_fck",
315 .module_bit = OMAP3430_EN_GPT8_SHIFT,
316 .module_offs = OMAP3430_PER_MOD,
318 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
321 .dev_attr = &capability_dsp_pwm_dev_attr,
322 .class = &omap3xxx_timer_hwmod_class,
323 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
327 static struct omap_hwmod omap3xxx_timer9_hwmod = {
329 .main_clk = "gpt9_fck",
333 .module_bit = OMAP3430_EN_GPT9_SHIFT,
334 .module_offs = OMAP3430_PER_MOD,
336 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
339 .dev_attr = &capability_pwm_dev_attr,
340 .class = &omap3xxx_timer_hwmod_class,
341 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
345 static struct omap_hwmod omap3xxx_timer10_hwmod = {
347 .main_clk = "gpt10_fck",
351 .module_bit = OMAP3430_EN_GPT10_SHIFT,
352 .module_offs = CORE_MOD,
354 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
357 .dev_attr = &capability_pwm_dev_attr,
358 .class = &omap3xxx_timer_hwmod_class,
359 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
363 static struct omap_hwmod omap3xxx_timer11_hwmod = {
365 .main_clk = "gpt11_fck",
369 .module_bit = OMAP3430_EN_GPT11_SHIFT,
370 .module_offs = CORE_MOD,
372 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
375 .dev_attr = &capability_pwm_dev_attr,
376 .class = &omap3xxx_timer_hwmod_class,
377 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
382 static struct omap_hwmod omap3xxx_timer12_hwmod = {
384 .main_clk = "gpt12_fck",
388 .module_bit = OMAP3430_EN_GPT12_SHIFT,
389 .module_offs = WKUP_MOD,
391 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
394 .dev_attr = &capability_secure_dev_attr,
395 .class = &omap3xxx_timer_hwmod_class,
396 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
401 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
405 static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
409 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
410 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
411 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
412 SYSS_HAS_RESET_STATUS),
413 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
414 .sysc_fields = &omap_hwmod_sysc_type1,
418 static struct omap_hwmod_class_sysconfig i2c_sysc = {
422 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
423 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
424 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
425 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
426 .sysc_fields = &omap_hwmod_sysc_type1,
429 static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
431 .sysc = &omap3xxx_wd_timer_sysc,
432 .pre_shutdown = &omap2_wd_timer_disable,
433 .reset = &omap2_wd_timer_reset,
436 static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
438 .class = &omap3xxx_wd_timer_hwmod_class,
439 .main_clk = "wdt2_fck",
443 .module_bit = OMAP3430_EN_WDT2_SHIFT,
444 .module_offs = WKUP_MOD,
446 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
450 * XXX: Use software supervised mode, HW supervised smartidle seems to
451 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
453 .flags = HWMOD_SWSUP_SIDLE,
457 static struct omap_hwmod omap3xxx_uart1_hwmod = {
459 .main_clk = "uart1_fck",
460 .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE,
463 .module_offs = CORE_MOD,
465 .module_bit = OMAP3430_EN_UART1_SHIFT,
467 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
470 .class = &omap2_uart_class,
474 static struct omap_hwmod omap3xxx_uart2_hwmod = {
476 .main_clk = "uart2_fck",
477 .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE,
480 .module_offs = CORE_MOD,
482 .module_bit = OMAP3430_EN_UART2_SHIFT,
484 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
487 .class = &omap2_uart_class,
491 static struct omap_hwmod omap3xxx_uart3_hwmod = {
493 .main_clk = "uart3_fck",
494 .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
498 .module_offs = OMAP3430_PER_MOD,
500 .module_bit = OMAP3430_EN_UART3_SHIFT,
502 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
505 .class = &omap2_uart_class,
511 static struct omap_hwmod omap36xx_uart4_hwmod = {
513 .main_clk = "uart4_fck",
514 .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE,
517 .module_offs = OMAP3430_PER_MOD,
519 .module_bit = OMAP3630_EN_UART4_SHIFT,
521 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
524 .class = &omap2_uart_class,
530 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
531 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
532 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
533 * should not be needed. The functional clock structure of the AM35xx
534 * UART4 is extremely unclear and opaque; it is unclear what the role
535 * of uart1/2_fck is for the UART4. Any clarification from either
536 * empirical testing or the AM3505/3517 hardware designers would be
539 static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
540 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
543 static struct omap_hwmod am35xx_uart4_hwmod = {
545 .main_clk = "uart4_fck",
548 .module_offs = CORE_MOD,
550 .module_bit = AM35XX_EN_UART4_SHIFT,
552 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
555 .opt_clks = am35xx_uart4_opt_clks,
556 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
557 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
558 .class = &omap2_uart_class,
561 static struct omap_hwmod_class i2c_class = {
564 .rev = OMAP_I2C_IP_VERSION_1,
565 .reset = &omap_i2c_reset,
568 static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
569 { .name = "dispc", .dma_req = 5 },
570 { .name = "dsi1", .dma_req = 74 },
575 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
577 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
578 * driver does not use these clocks.
580 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
581 { .role = "tv_clk", .clk = "dss_tv_fck" },
582 /* required only on OMAP3430 */
583 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
586 static struct omap_hwmod omap3430es1_dss_core_hwmod = {
588 .class = &omap2_dss_hwmod_class,
589 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
590 .sdma_reqs = omap3xxx_dss_sdma_chs,
594 .module_bit = OMAP3430_EN_DSS1_SHIFT,
595 .module_offs = OMAP3430_DSS_MOD,
597 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
600 .opt_clks = dss_opt_clks,
601 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
602 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
605 static struct omap_hwmod omap3xxx_dss_core_hwmod = {
607 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
608 .class = &omap2_dss_hwmod_class,
609 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
610 .sdma_reqs = omap3xxx_dss_sdma_chs,
614 .module_bit = OMAP3430_EN_DSS1_SHIFT,
615 .module_offs = OMAP3430_DSS_MOD,
617 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
618 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
621 .opt_clks = dss_opt_clks,
622 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
630 static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
634 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
635 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
637 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
638 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
639 .sysc_fields = &omap_hwmod_sysc_type1,
642 static struct omap_hwmod_class omap3_dispc_hwmod_class = {
644 .sysc = &omap3_dispc_sysc,
647 static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
649 .class = &omap3_dispc_hwmod_class,
650 .mpu_irqs = omap2_dispc_irqs,
651 .main_clk = "dss1_alwon_fck",
655 .module_bit = OMAP3430_EN_DSS1_SHIFT,
656 .module_offs = OMAP3430_DSS_MOD,
659 .flags = HWMOD_NO_IDLEST,
660 .dev_attr = &omap2_3_dss_dispc_dev_attr,
665 * display serial interface controller
668 static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
672 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
673 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
674 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
675 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
676 .sysc_fields = &omap_hwmod_sysc_type1,
679 static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
681 .sysc = &omap3xxx_dsi_sysc,
685 static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
686 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
689 static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
691 .class = &omap3xxx_dsi_hwmod_class,
692 .main_clk = "dss1_alwon_fck",
696 .module_bit = OMAP3430_EN_DSS1_SHIFT,
697 .module_offs = OMAP3430_DSS_MOD,
700 .opt_clks = dss_dsi1_opt_clks,
701 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
702 .flags = HWMOD_NO_IDLEST,
705 static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
706 { .role = "ick", .clk = "dss_ick" },
709 static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
711 .class = &omap2_rfbi_hwmod_class,
712 .main_clk = "dss1_alwon_fck",
716 .module_bit = OMAP3430_EN_DSS1_SHIFT,
717 .module_offs = OMAP3430_DSS_MOD,
720 .opt_clks = dss_rfbi_opt_clks,
721 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
722 .flags = HWMOD_NO_IDLEST,
725 static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
726 /* required only on OMAP3430 */
727 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
730 static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
732 .class = &omap2_venc_hwmod_class,
733 .main_clk = "dss_tv_fck",
737 .module_bit = OMAP3430_EN_DSS1_SHIFT,
738 .module_offs = OMAP3430_DSS_MOD,
741 .opt_clks = dss_venc_opt_clks,
742 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
743 .flags = HWMOD_NO_IDLEST,
747 static struct omap_i2c_dev_attr i2c1_dev_attr = {
748 .fifo_depth = 8, /* bytes */
749 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
752 static struct omap_hwmod omap3xxx_i2c1_hwmod = {
754 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
755 .main_clk = "i2c1_fck",
758 .module_offs = CORE_MOD,
760 .module_bit = OMAP3430_EN_I2C1_SHIFT,
762 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
766 .dev_attr = &i2c1_dev_attr,
770 static struct omap_i2c_dev_attr i2c2_dev_attr = {
771 .fifo_depth = 8, /* bytes */
772 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
775 static struct omap_hwmod omap3xxx_i2c2_hwmod = {
777 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
778 .main_clk = "i2c2_fck",
781 .module_offs = CORE_MOD,
783 .module_bit = OMAP3430_EN_I2C2_SHIFT,
785 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
789 .dev_attr = &i2c2_dev_attr,
793 static struct omap_i2c_dev_attr i2c3_dev_attr = {
794 .fifo_depth = 64, /* bytes */
795 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
800 static struct omap_hwmod omap3xxx_i2c3_hwmod = {
802 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
803 .main_clk = "i2c3_fck",
806 .module_offs = CORE_MOD,
808 .module_bit = OMAP3430_EN_I2C3_SHIFT,
810 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
814 .dev_attr = &i2c3_dev_attr,
819 * general purpose io module
822 static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
826 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
827 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
828 SYSS_HAS_RESET_STATUS),
829 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
830 .sysc_fields = &omap_hwmod_sysc_type1,
833 static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
835 .sysc = &omap3xxx_gpio_sysc,
840 static struct omap_gpio_dev_attr gpio_dev_attr = {
846 static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
847 { .role = "dbclk", .clk = "gpio1_dbck", },
850 static struct omap_hwmod omap3xxx_gpio1_hwmod = {
852 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
853 .main_clk = "gpio1_ick",
854 .opt_clks = gpio1_opt_clks,
855 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
859 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
860 .module_offs = WKUP_MOD,
862 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
865 .class = &omap3xxx_gpio_hwmod_class,
866 .dev_attr = &gpio_dev_attr,
870 static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
871 { .role = "dbclk", .clk = "gpio2_dbck", },
874 static struct omap_hwmod omap3xxx_gpio2_hwmod = {
876 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
877 .main_clk = "gpio2_ick",
878 .opt_clks = gpio2_opt_clks,
879 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
883 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
884 .module_offs = OMAP3430_PER_MOD,
886 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
889 .class = &omap3xxx_gpio_hwmod_class,
890 .dev_attr = &gpio_dev_attr,
894 static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
895 { .role = "dbclk", .clk = "gpio3_dbck", },
898 static struct omap_hwmod omap3xxx_gpio3_hwmod = {
900 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
901 .main_clk = "gpio3_ick",
902 .opt_clks = gpio3_opt_clks,
903 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
907 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
908 .module_offs = OMAP3430_PER_MOD,
910 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
913 .class = &omap3xxx_gpio_hwmod_class,
914 .dev_attr = &gpio_dev_attr,
918 static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
919 { .role = "dbclk", .clk = "gpio4_dbck", },
922 static struct omap_hwmod omap3xxx_gpio4_hwmod = {
924 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
925 .main_clk = "gpio4_ick",
926 .opt_clks = gpio4_opt_clks,
927 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
931 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
932 .module_offs = OMAP3430_PER_MOD,
934 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
937 .class = &omap3xxx_gpio_hwmod_class,
938 .dev_attr = &gpio_dev_attr,
943 static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
944 { .role = "dbclk", .clk = "gpio5_dbck", },
947 static struct omap_hwmod omap3xxx_gpio5_hwmod = {
949 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
950 .main_clk = "gpio5_ick",
951 .opt_clks = gpio5_opt_clks,
952 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
956 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
957 .module_offs = OMAP3430_PER_MOD,
959 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
962 .class = &omap3xxx_gpio_hwmod_class,
963 .dev_attr = &gpio_dev_attr,
968 static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
969 { .role = "dbclk", .clk = "gpio6_dbck", },
972 static struct omap_hwmod omap3xxx_gpio6_hwmod = {
974 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
975 .main_clk = "gpio6_ick",
976 .opt_clks = gpio6_opt_clks,
977 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
981 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
982 .module_offs = OMAP3430_PER_MOD,
984 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
987 .class = &omap3xxx_gpio_hwmod_class,
988 .dev_attr = &gpio_dev_attr,
992 static struct omap_dma_dev_attr dma_dev_attr = {
993 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
994 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
998 static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1000 .sysc_offs = 0x002c,
1001 .syss_offs = 0x0028,
1002 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1003 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1004 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1005 SYSS_HAS_RESET_STATUS),
1006 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1007 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1008 .sysc_fields = &omap_hwmod_sysc_type1,
1011 static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1013 .sysc = &omap3xxx_dma_sysc,
1017 static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1019 .class = &omap3xxx_dma_hwmod_class,
1020 .mpu_irqs = omap2_dma_system_irqs,
1021 .main_clk = "core_l3_ick",
1024 .module_offs = CORE_MOD,
1026 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1028 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1031 .dev_attr = &dma_dev_attr,
1032 .flags = HWMOD_NO_IDLEST,
1037 * multi channel buffered serial port controller
1040 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1041 .sysc_offs = 0x008c,
1042 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1043 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1044 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1045 .sysc_fields = &omap_hwmod_sysc_type1,
1048 static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1050 .sysc = &omap3xxx_mcbsp_sysc,
1051 .rev = MCBSP_CONFIG_TYPE3,
1054 /* McBSP functional clock mapping */
1055 static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1056 { .role = "pad_fck", .clk = "mcbsp_clks" },
1057 { .role = "prcm_fck", .clk = "core_96m_fck" },
1060 static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1061 { .role = "pad_fck", .clk = "mcbsp_clks" },
1062 { .role = "prcm_fck", .clk = "per_96m_fck" },
1067 static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1069 .class = &omap3xxx_mcbsp_hwmod_class,
1070 .main_clk = "mcbsp1_fck",
1074 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1075 .module_offs = CORE_MOD,
1077 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1080 .opt_clks = mcbsp15_opt_clks,
1081 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
1086 static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1087 .sidetone = "mcbsp2_sidetone",
1090 static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1092 .class = &omap3xxx_mcbsp_hwmod_class,
1093 .main_clk = "mcbsp2_fck",
1097 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1098 .module_offs = OMAP3430_PER_MOD,
1100 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1103 .opt_clks = mcbsp234_opt_clks,
1104 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1105 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1110 static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1111 .sidetone = "mcbsp3_sidetone",
1114 static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1116 .class = &omap3xxx_mcbsp_hwmod_class,
1117 .main_clk = "mcbsp3_fck",
1121 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1122 .module_offs = OMAP3430_PER_MOD,
1124 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1127 .opt_clks = mcbsp234_opt_clks,
1128 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1129 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1135 static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1137 .class = &omap3xxx_mcbsp_hwmod_class,
1138 .main_clk = "mcbsp4_fck",
1142 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1143 .module_offs = OMAP3430_PER_MOD,
1145 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1148 .opt_clks = mcbsp234_opt_clks,
1149 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
1155 static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1157 .class = &omap3xxx_mcbsp_hwmod_class,
1158 .main_clk = "mcbsp5_fck",
1162 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1163 .module_offs = CORE_MOD,
1165 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1168 .opt_clks = mcbsp15_opt_clks,
1169 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
1172 /* 'mcbsp sidetone' class */
1173 static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1174 .sysc_offs = 0x0010,
1175 .sysc_flags = SYSC_HAS_AUTOIDLE,
1176 .sysc_fields = &omap_hwmod_sysc_type1,
1179 static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1180 .name = "mcbsp_sidetone",
1181 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1184 /* mcbsp2_sidetone */
1186 static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1187 .name = "mcbsp2_sidetone",
1188 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1189 .main_clk = "mcbsp2_ick",
1190 .flags = HWMOD_NO_IDLEST,
1193 /* mcbsp3_sidetone */
1195 static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1196 .name = "mcbsp3_sidetone",
1197 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1198 .main_clk = "mcbsp3_ick",
1199 .flags = HWMOD_NO_IDLEST,
1203 static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1207 static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1209 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1210 .sysc_fields = &omap34xx_sr_sysc_fields,
1213 static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1214 .name = "smartreflex",
1215 .sysc = &omap34xx_sr_sysc,
1219 static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1224 static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1226 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1227 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1229 .sysc_fields = &omap36xx_sr_sysc_fields,
1232 static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1233 .name = "smartreflex",
1234 .sysc = &omap36xx_sr_sysc,
1239 static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1240 .sensor_voltdm_name = "mpu_iva",
1244 static struct omap_hwmod omap34xx_sr1_hwmod = {
1245 .name = "smartreflex_mpu_iva",
1246 .class = &omap34xx_smartreflex_hwmod_class,
1247 .main_clk = "sr1_fck",
1251 .module_bit = OMAP3430_EN_SR1_SHIFT,
1252 .module_offs = WKUP_MOD,
1254 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1257 .dev_attr = &sr1_dev_attr,
1258 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1261 static struct omap_hwmod omap36xx_sr1_hwmod = {
1262 .name = "smartreflex_mpu_iva",
1263 .class = &omap36xx_smartreflex_hwmod_class,
1264 .main_clk = "sr1_fck",
1268 .module_bit = OMAP3430_EN_SR1_SHIFT,
1269 .module_offs = WKUP_MOD,
1271 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1274 .dev_attr = &sr1_dev_attr,
1278 static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1279 .sensor_voltdm_name = "core",
1283 static struct omap_hwmod omap34xx_sr2_hwmod = {
1284 .name = "smartreflex_core",
1285 .class = &omap34xx_smartreflex_hwmod_class,
1286 .main_clk = "sr2_fck",
1290 .module_bit = OMAP3430_EN_SR2_SHIFT,
1291 .module_offs = WKUP_MOD,
1293 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1296 .dev_attr = &sr2_dev_attr,
1297 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1300 static struct omap_hwmod omap36xx_sr2_hwmod = {
1301 .name = "smartreflex_core",
1302 .class = &omap36xx_smartreflex_hwmod_class,
1303 .main_clk = "sr2_fck",
1307 .module_bit = OMAP3430_EN_SR2_SHIFT,
1308 .module_offs = WKUP_MOD,
1310 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1313 .dev_attr = &sr2_dev_attr,
1318 * mailbox module allowing communication between the on-chip processors
1319 * using a queued mailbox-interrupt mechanism.
1322 static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1326 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1327 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1328 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1329 .sysc_fields = &omap_hwmod_sysc_type1,
1332 static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1334 .sysc = &omap3xxx_mailbox_sysc,
1337 static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1339 .class = &omap3xxx_mailbox_hwmod_class,
1340 .main_clk = "mailboxes_ick",
1344 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1345 .module_offs = CORE_MOD,
1347 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1354 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1358 static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1360 .sysc_offs = 0x0010,
1361 .syss_offs = 0x0014,
1362 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1363 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1364 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1365 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1366 .sysc_fields = &omap_hwmod_sysc_type1,
1369 static struct omap_hwmod_class omap34xx_mcspi_class = {
1371 .sysc = &omap34xx_mcspi_sysc,
1372 .rev = OMAP3_MCSPI_REV,
1376 static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1377 .num_chipselect = 4,
1380 static struct omap_hwmod omap34xx_mcspi1 = {
1382 .main_clk = "mcspi1_fck",
1385 .module_offs = CORE_MOD,
1387 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1389 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1392 .class = &omap34xx_mcspi_class,
1393 .dev_attr = &omap_mcspi1_dev_attr,
1397 static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1398 .num_chipselect = 2,
1401 static struct omap_hwmod omap34xx_mcspi2 = {
1403 .main_clk = "mcspi2_fck",
1406 .module_offs = CORE_MOD,
1408 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1410 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1413 .class = &omap34xx_mcspi_class,
1414 .dev_attr = &omap_mcspi2_dev_attr,
1420 static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1421 .num_chipselect = 2,
1424 static struct omap_hwmod omap34xx_mcspi3 = {
1426 .main_clk = "mcspi3_fck",
1429 .module_offs = CORE_MOD,
1431 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1433 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1436 .class = &omap34xx_mcspi_class,
1437 .dev_attr = &omap_mcspi3_dev_attr,
1443 static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1444 .num_chipselect = 1,
1447 static struct omap_hwmod omap34xx_mcspi4 = {
1449 .main_clk = "mcspi4_fck",
1452 .module_offs = CORE_MOD,
1454 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1456 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1459 .class = &omap34xx_mcspi_class,
1460 .dev_attr = &omap_mcspi4_dev_attr,
1464 static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1466 .sysc_offs = 0x0404,
1467 .syss_offs = 0x0408,
1468 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1469 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1471 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1472 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1473 .sysc_fields = &omap_hwmod_sysc_type1,
1476 static struct omap_hwmod_class usbotg_class = {
1478 .sysc = &omap3xxx_usbhsotg_sysc,
1483 static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1484 .name = "usb_otg_hs",
1485 .main_clk = "hsotgusb_ick",
1489 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1490 .module_offs = CORE_MOD,
1492 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1493 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT,
1496 .class = &usbotg_class,
1499 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1500 * broken when autoidle is enabled
1501 * workaround is to disable the autoidle bit at module level.
1503 * Enabling the device in any other MIDLEMODE setting but force-idle
1504 * causes core_pwrdm not enter idle states at least on OMAP3630.
1505 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1506 * signal when MIDLEMODE is set to force-idle.
1508 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
1509 HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
1514 static struct omap_hwmod_class am35xx_usbotg_class = {
1515 .name = "am35xx_usbotg",
1518 static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1519 .name = "am35x_otg_hs",
1520 .main_clk = "hsotgusb_fck",
1521 .class = &am35xx_usbotg_class,
1522 .flags = HWMOD_NO_IDLEST,
1525 /* MMC/SD/SDIO common */
1526 static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1530 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1531 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1532 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1533 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1534 .sysc_fields = &omap_hwmod_sysc_type1,
1537 static struct omap_hwmod_class omap34xx_mmc_class = {
1539 .sysc = &omap34xx_mmc_sysc,
1546 static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1547 { .role = "dbck", .clk = "omap_32k_fck", },
1550 static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
1551 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1554 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1555 static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = {
1556 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1557 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1560 static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1562 .opt_clks = omap34xx_mmc1_opt_clks,
1563 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1564 .main_clk = "mmchs1_fck",
1567 .module_offs = CORE_MOD,
1569 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1571 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1574 .dev_attr = &mmc1_pre_es3_dev_attr,
1575 .class = &omap34xx_mmc_class,
1578 static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1580 .opt_clks = omap34xx_mmc1_opt_clks,
1581 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1582 .main_clk = "mmchs1_fck",
1585 .module_offs = CORE_MOD,
1587 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1589 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1592 .dev_attr = &mmc1_dev_attr,
1593 .class = &omap34xx_mmc_class,
1600 static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1601 { .role = "dbck", .clk = "omap_32k_fck", },
1604 /* See 35xx errata 2.1.1.128 in SPRZ278F */
1605 static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = {
1606 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1609 static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1611 .opt_clks = omap34xx_mmc2_opt_clks,
1612 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1613 .main_clk = "mmchs2_fck",
1616 .module_offs = CORE_MOD,
1618 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1620 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1623 .dev_attr = &mmc2_pre_es3_dev_attr,
1624 .class = &omap34xx_mmc_class,
1627 static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1629 .opt_clks = omap34xx_mmc2_opt_clks,
1630 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1631 .main_clk = "mmchs2_fck",
1634 .module_offs = CORE_MOD,
1636 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1638 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1641 .class = &omap34xx_mmc_class,
1648 static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1649 { .role = "dbck", .clk = "omap_32k_fck", },
1652 static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1654 .opt_clks = omap34xx_mmc3_opt_clks,
1655 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1656 .main_clk = "mmchs3_fck",
1660 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1662 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1665 .class = &omap34xx_mmc_class,
1669 * 'usb_host_hs' class
1670 * high-speed multi-port usb host controller
1673 static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1675 .sysc_offs = 0x0010,
1676 .syss_offs = 0x0014,
1677 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1678 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1679 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1680 SYSS_HAS_RESET_STATUS),
1681 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1682 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1683 .sysc_fields = &omap_hwmod_sysc_type1,
1686 static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1687 .name = "usb_host_hs",
1688 .sysc = &omap3xxx_usb_host_hs_sysc,
1692 static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1693 .name = "usb_host_hs",
1694 .class = &omap3xxx_usb_host_hs_hwmod_class,
1695 .clkdm_name = "usbhost_clkdm",
1696 .main_clk = "usbhost_48m_fck",
1699 .module_offs = OMAP3430ES2_USBHOST_MOD,
1701 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1703 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1704 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1709 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1713 * In the following configuration :
1714 * - USBHOST module is set to smart-idle mode
1715 * - PRCM asserts idle_req to the USBHOST module ( This typically
1716 * happens when the system is going to a low power mode : all ports
1717 * have been suspended, the master part of the USBHOST module has
1718 * entered the standby state, and SW has cut the functional clocks)
1719 * - an USBHOST interrupt occurs before the module is able to answer
1720 * idle_ack, typically a remote wakeup IRQ.
1721 * Then the USB HOST module will enter a deadlock situation where it
1722 * is no more accessible nor functional.
1725 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1729 * Errata: USB host EHCI may stall when entering smart-standby mode
1733 * When the USBHOST module is set to smart-standby mode, and when it is
1734 * ready to enter the standby state (i.e. all ports are suspended and
1735 * all attached devices are in suspend mode), then it can wrongly assert
1736 * the Mstandby signal too early while there are still some residual OCP
1737 * transactions ongoing. If this condition occurs, the internal state
1738 * machine may go to an undefined state and the USB link may be stuck
1739 * upon the next resume.
1742 * Don't use smart standby; use only force standby,
1743 * hence HWMOD_SWSUP_MSTANDBY
1746 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1750 * 'usb_tll_hs' class
1751 * usb_tll_hs module is the adapter on the usb_host_hs ports
1753 static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1755 .sysc_offs = 0x0010,
1756 .syss_offs = 0x0014,
1757 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1758 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1760 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1761 .sysc_fields = &omap_hwmod_sysc_type1,
1764 static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1765 .name = "usb_tll_hs",
1766 .sysc = &omap3xxx_usb_tll_hs_sysc,
1770 static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1771 .name = "usb_tll_hs",
1772 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1773 .clkdm_name = "core_l4_clkdm",
1774 .main_clk = "usbtll_fck",
1777 .module_offs = CORE_MOD,
1779 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1781 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1786 static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1788 .main_clk = "hdq_fck",
1791 .module_offs = CORE_MOD,
1793 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1795 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1798 .class = &omap2_hdq1w_class,
1802 static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
1803 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
1804 { .name = "rst_modem_sw", .rst_shift = 1 },
1807 static struct omap_hwmod_class omap3xxx_sad2d_class = {
1811 static struct omap_hwmod omap3xxx_sad2d_hwmod = {
1813 .rst_lines = omap3xxx_sad2d_resets,
1814 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
1815 .main_clk = "sad2d_ick",
1818 .module_offs = CORE_MOD,
1820 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
1822 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
1825 .class = &omap3xxx_sad2d_class,
1829 * '32K sync counter' class
1830 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1832 static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
1834 .sysc_offs = 0x0004,
1835 .sysc_flags = SYSC_HAS_SIDLEMODE,
1836 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
1837 .sysc_fields = &omap_hwmod_sysc_type1,
1840 static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
1842 .sysc = &omap3xxx_counter_sysc,
1845 static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
1846 .name = "counter_32k",
1847 .class = &omap3xxx_counter_hwmod_class,
1848 .clkdm_name = "wkup_clkdm",
1849 .flags = HWMOD_SWSUP_SIDLE,
1850 .main_clk = "wkup_32k_fck",
1853 .module_offs = WKUP_MOD,
1855 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
1857 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
1864 * general purpose memory controller
1867 static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
1869 .sysc_offs = 0x0010,
1870 .syss_offs = 0x0014,
1871 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1872 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1873 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1874 .sysc_fields = &omap_hwmod_sysc_type1,
1877 static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
1879 .sysc = &omap3xxx_gpmc_sysc,
1882 static struct omap_hwmod omap3xxx_gpmc_hwmod = {
1884 .class = &omap3xxx_gpmc_hwmod_class,
1885 .clkdm_name = "core_l3_clkdm",
1886 .main_clk = "gpmc_fck",
1887 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1888 .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
1895 /* L3 -> L4_CORE interface */
1896 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1897 .master = &omap3xxx_l3_main_hwmod,
1898 .slave = &omap3xxx_l4_core_hwmod,
1899 .user = OCP_USER_MPU | OCP_USER_SDMA,
1902 /* L3 -> L4_PER interface */
1903 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1904 .master = &omap3xxx_l3_main_hwmod,
1905 .slave = &omap3xxx_l4_per_hwmod,
1906 .user = OCP_USER_MPU | OCP_USER_SDMA,
1910 /* MPU -> L3 interface */
1911 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
1912 .master = &omap3xxx_mpu_hwmod,
1913 .slave = &omap3xxx_l3_main_hwmod,
1914 .user = OCP_USER_MPU,
1919 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
1920 .master = &omap3xxx_l3_main_hwmod,
1921 .slave = &omap3xxx_debugss_hwmod,
1922 .user = OCP_USER_MPU,
1926 static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
1927 .master = &omap3430es1_dss_core_hwmod,
1928 .slave = &omap3xxx_l3_main_hwmod,
1929 .user = OCP_USER_MPU | OCP_USER_SDMA,
1932 static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
1933 .master = &omap3xxx_dss_core_hwmod,
1934 .slave = &omap3xxx_l3_main_hwmod,
1937 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
1938 .flags = OMAP_FIREWALL_L3,
1941 .user = OCP_USER_MPU | OCP_USER_SDMA,
1944 /* l3_core -> usbhsotg interface */
1945 static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
1946 .master = &omap3xxx_usbhsotg_hwmod,
1947 .slave = &omap3xxx_l3_main_hwmod,
1948 .clk = "core_l3_ick",
1949 .user = OCP_USER_MPU,
1952 /* l3_core -> am35xx_usbhsotg interface */
1953 static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
1954 .master = &am35xx_usbhsotg_hwmod,
1955 .slave = &omap3xxx_l3_main_hwmod,
1956 .clk = "hsotgusb_ick",
1957 .user = OCP_USER_MPU,
1960 /* l3_core -> sad2d interface */
1961 static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
1962 .master = &omap3xxx_sad2d_hwmod,
1963 .slave = &omap3xxx_l3_main_hwmod,
1964 .clk = "core_l3_ick",
1965 .user = OCP_USER_MPU,
1968 /* L4_CORE -> L4_WKUP interface */
1969 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
1970 .master = &omap3xxx_l4_core_hwmod,
1971 .slave = &omap3xxx_l4_wkup_hwmod,
1972 .user = OCP_USER_MPU | OCP_USER_SDMA,
1975 /* L4 CORE -> MMC1 interface */
1976 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
1977 .master = &omap3xxx_l4_core_hwmod,
1978 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
1979 .clk = "mmchs1_ick",
1980 .user = OCP_USER_MPU | OCP_USER_SDMA,
1981 .flags = OMAP_FIREWALL_L4,
1984 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
1985 .master = &omap3xxx_l4_core_hwmod,
1986 .slave = &omap3xxx_es3plus_mmc1_hwmod,
1987 .clk = "mmchs1_ick",
1988 .user = OCP_USER_MPU | OCP_USER_SDMA,
1989 .flags = OMAP_FIREWALL_L4,
1992 /* L4 CORE -> MMC2 interface */
1993 static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
1994 .master = &omap3xxx_l4_core_hwmod,
1995 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
1996 .clk = "mmchs2_ick",
1997 .user = OCP_USER_MPU | OCP_USER_SDMA,
1998 .flags = OMAP_FIREWALL_L4,
2001 static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2002 .master = &omap3xxx_l4_core_hwmod,
2003 .slave = &omap3xxx_es3plus_mmc2_hwmod,
2004 .clk = "mmchs2_ick",
2005 .user = OCP_USER_MPU | OCP_USER_SDMA,
2006 .flags = OMAP_FIREWALL_L4,
2009 /* L4 CORE -> MMC3 interface */
2011 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2012 .master = &omap3xxx_l4_core_hwmod,
2013 .slave = &omap3xxx_mmc3_hwmod,
2014 .clk = "mmchs3_ick",
2015 .user = OCP_USER_MPU | OCP_USER_SDMA,
2016 .flags = OMAP_FIREWALL_L4,
2019 /* L4 CORE -> UART1 interface */
2021 static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2022 .master = &omap3xxx_l4_core_hwmod,
2023 .slave = &omap3xxx_uart1_hwmod,
2025 .user = OCP_USER_MPU | OCP_USER_SDMA,
2028 /* L4 CORE -> UART2 interface */
2030 static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2031 .master = &omap3xxx_l4_core_hwmod,
2032 .slave = &omap3xxx_uart2_hwmod,
2034 .user = OCP_USER_MPU | OCP_USER_SDMA,
2037 /* L4 PER -> UART3 interface */
2039 static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2040 .master = &omap3xxx_l4_per_hwmod,
2041 .slave = &omap3xxx_uart3_hwmod,
2043 .user = OCP_USER_MPU | OCP_USER_SDMA,
2046 /* L4 PER -> UART4 interface */
2048 static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
2049 .master = &omap3xxx_l4_per_hwmod,
2050 .slave = &omap36xx_uart4_hwmod,
2052 .user = OCP_USER_MPU | OCP_USER_SDMA,
2055 /* AM35xx: L4 CORE -> UART4 interface */
2057 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
2058 .master = &omap3xxx_l4_core_hwmod,
2059 .slave = &am35xx_uart4_hwmod,
2061 .user = OCP_USER_MPU | OCP_USER_SDMA,
2064 /* L4 CORE -> I2C1 interface */
2065 static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2066 .master = &omap3xxx_l4_core_hwmod,
2067 .slave = &omap3xxx_i2c1_hwmod,
2071 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2073 .flags = OMAP_FIREWALL_L4,
2076 .user = OCP_USER_MPU | OCP_USER_SDMA,
2079 /* L4 CORE -> I2C2 interface */
2080 static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2081 .master = &omap3xxx_l4_core_hwmod,
2082 .slave = &omap3xxx_i2c2_hwmod,
2086 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2088 .flags = OMAP_FIREWALL_L4,
2091 .user = OCP_USER_MPU | OCP_USER_SDMA,
2094 /* L4 CORE -> I2C3 interface */
2096 static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2097 .master = &omap3xxx_l4_core_hwmod,
2098 .slave = &omap3xxx_i2c3_hwmod,
2102 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2104 .flags = OMAP_FIREWALL_L4,
2107 .user = OCP_USER_MPU | OCP_USER_SDMA,
2110 /* L4 CORE -> SR1 interface */
2111 static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2113 .pa_start = OMAP34XX_SR1_BASE,
2114 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2115 .flags = ADDR_TYPE_RT,
2120 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
2121 .master = &omap3xxx_l4_core_hwmod,
2122 .slave = &omap34xx_sr1_hwmod,
2124 .addr = omap3_sr1_addr_space,
2125 .user = OCP_USER_MPU,
2128 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2129 .master = &omap3xxx_l4_core_hwmod,
2130 .slave = &omap36xx_sr1_hwmod,
2132 .addr = omap3_sr1_addr_space,
2133 .user = OCP_USER_MPU,
2136 /* L4 CORE -> SR1 interface */
2137 static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2139 .pa_start = OMAP34XX_SR2_BASE,
2140 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2141 .flags = ADDR_TYPE_RT,
2146 static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
2147 .master = &omap3xxx_l4_core_hwmod,
2148 .slave = &omap34xx_sr2_hwmod,
2150 .addr = omap3_sr2_addr_space,
2151 .user = OCP_USER_MPU,
2154 static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2155 .master = &omap3xxx_l4_core_hwmod,
2156 .slave = &omap36xx_sr2_hwmod,
2158 .addr = omap3_sr2_addr_space,
2159 .user = OCP_USER_MPU,
2163 /* l4_core -> usbhsotg */
2164 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2165 .master = &omap3xxx_l4_core_hwmod,
2166 .slave = &omap3xxx_usbhsotg_hwmod,
2168 .user = OCP_USER_MPU,
2172 /* l4_core -> usbhsotg */
2173 static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2174 .master = &omap3xxx_l4_core_hwmod,
2175 .slave = &am35xx_usbhsotg_hwmod,
2176 .clk = "hsotgusb_ick",
2177 .user = OCP_USER_MPU,
2180 /* L4_WKUP -> L4_SEC interface */
2181 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2182 .master = &omap3xxx_l4_wkup_hwmod,
2183 .slave = &omap3xxx_l4_sec_hwmod,
2184 .user = OCP_USER_MPU | OCP_USER_SDMA,
2187 /* IVA2 <- L3 interface */
2188 static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2189 .master = &omap3xxx_l3_main_hwmod,
2190 .slave = &omap3xxx_iva_hwmod,
2191 .clk = "core_l3_ick",
2192 .user = OCP_USER_MPU | OCP_USER_SDMA,
2196 /* l4_wkup -> timer1 */
2197 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2198 .master = &omap3xxx_l4_wkup_hwmod,
2199 .slave = &omap3xxx_timer1_hwmod,
2201 .user = OCP_USER_MPU | OCP_USER_SDMA,
2205 /* l4_per -> timer2 */
2206 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2207 .master = &omap3xxx_l4_per_hwmod,
2208 .slave = &omap3xxx_timer2_hwmod,
2210 .user = OCP_USER_MPU | OCP_USER_SDMA,
2214 /* l4_per -> timer3 */
2215 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2216 .master = &omap3xxx_l4_per_hwmod,
2217 .slave = &omap3xxx_timer3_hwmod,
2219 .user = OCP_USER_MPU | OCP_USER_SDMA,
2223 /* l4_per -> timer4 */
2224 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2225 .master = &omap3xxx_l4_per_hwmod,
2226 .slave = &omap3xxx_timer4_hwmod,
2228 .user = OCP_USER_MPU | OCP_USER_SDMA,
2232 /* l4_per -> timer5 */
2233 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2234 .master = &omap3xxx_l4_per_hwmod,
2235 .slave = &omap3xxx_timer5_hwmod,
2237 .user = OCP_USER_MPU | OCP_USER_SDMA,
2241 /* l4_per -> timer6 */
2242 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2243 .master = &omap3xxx_l4_per_hwmod,
2244 .slave = &omap3xxx_timer6_hwmod,
2246 .user = OCP_USER_MPU | OCP_USER_SDMA,
2250 /* l4_per -> timer7 */
2251 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2252 .master = &omap3xxx_l4_per_hwmod,
2253 .slave = &omap3xxx_timer7_hwmod,
2255 .user = OCP_USER_MPU | OCP_USER_SDMA,
2259 /* l4_per -> timer8 */
2260 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2261 .master = &omap3xxx_l4_per_hwmod,
2262 .slave = &omap3xxx_timer8_hwmod,
2264 .user = OCP_USER_MPU | OCP_USER_SDMA,
2268 /* l4_per -> timer9 */
2269 static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2270 .master = &omap3xxx_l4_per_hwmod,
2271 .slave = &omap3xxx_timer9_hwmod,
2273 .user = OCP_USER_MPU | OCP_USER_SDMA,
2276 /* l4_core -> timer10 */
2277 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2278 .master = &omap3xxx_l4_core_hwmod,
2279 .slave = &omap3xxx_timer10_hwmod,
2281 .user = OCP_USER_MPU | OCP_USER_SDMA,
2284 /* l4_core -> timer11 */
2285 static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2286 .master = &omap3xxx_l4_core_hwmod,
2287 .slave = &omap3xxx_timer11_hwmod,
2289 .user = OCP_USER_MPU | OCP_USER_SDMA,
2293 /* l4_core -> timer12 */
2294 static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2295 .master = &omap3xxx_l4_sec_hwmod,
2296 .slave = &omap3xxx_timer12_hwmod,
2298 .user = OCP_USER_MPU | OCP_USER_SDMA,
2301 /* l4_wkup -> wd_timer2 */
2303 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2304 .master = &omap3xxx_l4_wkup_hwmod,
2305 .slave = &omap3xxx_wd_timer2_hwmod,
2307 .user = OCP_USER_MPU | OCP_USER_SDMA,
2310 /* l4_core -> dss */
2311 static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2312 .master = &omap3xxx_l4_core_hwmod,
2313 .slave = &omap3430es1_dss_core_hwmod,
2317 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2318 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2319 .flags = OMAP_FIREWALL_L4,
2322 .user = OCP_USER_MPU | OCP_USER_SDMA,
2325 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2326 .master = &omap3xxx_l4_core_hwmod,
2327 .slave = &omap3xxx_dss_core_hwmod,
2331 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2332 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2333 .flags = OMAP_FIREWALL_L4,
2336 .user = OCP_USER_MPU | OCP_USER_SDMA,
2339 /* l4_core -> dss_dispc */
2340 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2341 .master = &omap3xxx_l4_core_hwmod,
2342 .slave = &omap3xxx_dss_dispc_hwmod,
2346 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2347 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2348 .flags = OMAP_FIREWALL_L4,
2351 .user = OCP_USER_MPU | OCP_USER_SDMA,
2354 /* l4_core -> dss_dsi1 */
2355 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2356 .master = &omap3xxx_l4_core_hwmod,
2357 .slave = &omap3xxx_dss_dsi1_hwmod,
2361 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2362 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2363 .flags = OMAP_FIREWALL_L4,
2366 .user = OCP_USER_MPU | OCP_USER_SDMA,
2369 /* l4_core -> dss_rfbi */
2370 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2371 .master = &omap3xxx_l4_core_hwmod,
2372 .slave = &omap3xxx_dss_rfbi_hwmod,
2376 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2377 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2378 .flags = OMAP_FIREWALL_L4,
2381 .user = OCP_USER_MPU | OCP_USER_SDMA,
2384 /* l4_core -> dss_venc */
2385 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2386 .master = &omap3xxx_l4_core_hwmod,
2387 .slave = &omap3xxx_dss_venc_hwmod,
2391 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2392 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2393 .flags = OMAP_FIREWALL_L4,
2396 .flags = OCPIF_SWSUP_IDLE,
2397 .user = OCP_USER_MPU | OCP_USER_SDMA,
2400 /* l4_wkup -> gpio1 */
2402 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2403 .master = &omap3xxx_l4_wkup_hwmod,
2404 .slave = &omap3xxx_gpio1_hwmod,
2405 .user = OCP_USER_MPU | OCP_USER_SDMA,
2408 /* l4_per -> gpio2 */
2410 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2411 .master = &omap3xxx_l4_per_hwmod,
2412 .slave = &omap3xxx_gpio2_hwmod,
2413 .user = OCP_USER_MPU | OCP_USER_SDMA,
2416 /* l4_per -> gpio3 */
2418 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2419 .master = &omap3xxx_l4_per_hwmod,
2420 .slave = &omap3xxx_gpio3_hwmod,
2421 .user = OCP_USER_MPU | OCP_USER_SDMA,
2426 * The memory management unit performs virtual to physical address translation
2427 * for its requestors.
2430 static struct omap_hwmod_class_sysconfig mmu_sysc = {
2434 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2435 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2436 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2437 .sysc_fields = &omap_hwmod_sysc_type1,
2440 static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2446 static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
2448 /* l4_core -> mmu isp */
2449 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2450 .master = &omap3xxx_l4_core_hwmod,
2451 .slave = &omap3xxx_mmu_isp_hwmod,
2452 .user = OCP_USER_MPU | OCP_USER_SDMA,
2455 static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
2457 .class = &omap3xxx_mmu_hwmod_class,
2458 .main_clk = "cam_ick",
2459 .flags = HWMOD_NO_IDLEST,
2464 static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
2466 static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
2467 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
2470 /* l3_main -> iva mmu */
2471 static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
2472 .master = &omap3xxx_l3_main_hwmod,
2473 .slave = &omap3xxx_mmu_iva_hwmod,
2474 .user = OCP_USER_MPU | OCP_USER_SDMA,
2477 static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
2479 .class = &omap3xxx_mmu_hwmod_class,
2480 .clkdm_name = "iva2_clkdm",
2481 .rst_lines = omap3xxx_mmu_iva_resets,
2482 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
2483 .main_clk = "iva2_ck",
2486 .module_offs = OMAP3430_IVA2_MOD,
2487 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
2489 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
2492 .flags = HWMOD_NO_IDLEST,
2495 /* l4_per -> gpio4 */
2497 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2498 .master = &omap3xxx_l4_per_hwmod,
2499 .slave = &omap3xxx_gpio4_hwmod,
2500 .user = OCP_USER_MPU | OCP_USER_SDMA,
2503 /* l4_per -> gpio5 */
2505 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2506 .master = &omap3xxx_l4_per_hwmod,
2507 .slave = &omap3xxx_gpio5_hwmod,
2508 .user = OCP_USER_MPU | OCP_USER_SDMA,
2511 /* l4_per -> gpio6 */
2513 static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2514 .master = &omap3xxx_l4_per_hwmod,
2515 .slave = &omap3xxx_gpio6_hwmod,
2516 .user = OCP_USER_MPU | OCP_USER_SDMA,
2519 /* dma_system -> L3 */
2520 static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2521 .master = &omap3xxx_dma_system_hwmod,
2522 .slave = &omap3xxx_l3_main_hwmod,
2523 .clk = "core_l3_ick",
2524 .user = OCP_USER_MPU | OCP_USER_SDMA,
2527 static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2529 .pa_start = 0x48056000,
2530 .pa_end = 0x48056fff,
2531 .flags = ADDR_TYPE_RT,
2536 /* l4_cfg -> dma_system */
2537 static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2538 .master = &omap3xxx_l4_core_hwmod,
2539 .slave = &omap3xxx_dma_system_hwmod,
2540 .clk = "core_l4_ick",
2541 .addr = omap3xxx_dma_system_addrs,
2542 .user = OCP_USER_MPU | OCP_USER_SDMA,
2546 /* l4_core -> mcbsp1 */
2547 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2548 .master = &omap3xxx_l4_core_hwmod,
2549 .slave = &omap3xxx_mcbsp1_hwmod,
2550 .clk = "mcbsp1_ick",
2551 .user = OCP_USER_MPU | OCP_USER_SDMA,
2555 /* l4_per -> mcbsp2 */
2556 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2557 .master = &omap3xxx_l4_per_hwmod,
2558 .slave = &omap3xxx_mcbsp2_hwmod,
2559 .clk = "mcbsp2_ick",
2560 .user = OCP_USER_MPU | OCP_USER_SDMA,
2564 /* l4_per -> mcbsp3 */
2565 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2566 .master = &omap3xxx_l4_per_hwmod,
2567 .slave = &omap3xxx_mcbsp3_hwmod,
2568 .clk = "mcbsp3_ick",
2569 .user = OCP_USER_MPU | OCP_USER_SDMA,
2573 /* l4_per -> mcbsp4 */
2574 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2575 .master = &omap3xxx_l4_per_hwmod,
2576 .slave = &omap3xxx_mcbsp4_hwmod,
2577 .clk = "mcbsp4_ick",
2578 .user = OCP_USER_MPU | OCP_USER_SDMA,
2582 /* l4_core -> mcbsp5 */
2583 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2584 .master = &omap3xxx_l4_core_hwmod,
2585 .slave = &omap3xxx_mcbsp5_hwmod,
2586 .clk = "mcbsp5_ick",
2587 .user = OCP_USER_MPU | OCP_USER_SDMA,
2591 /* l4_per -> mcbsp2_sidetone */
2592 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2593 .master = &omap3xxx_l4_per_hwmod,
2594 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2595 .clk = "mcbsp2_ick",
2596 .user = OCP_USER_MPU,
2600 /* l4_per -> mcbsp3_sidetone */
2601 static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2602 .master = &omap3xxx_l4_per_hwmod,
2603 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2604 .clk = "mcbsp3_ick",
2605 .user = OCP_USER_MPU,
2608 /* l4_core -> mailbox */
2609 static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2610 .master = &omap3xxx_l4_core_hwmod,
2611 .slave = &omap3xxx_mailbox_hwmod,
2612 .user = OCP_USER_MPU | OCP_USER_SDMA,
2615 /* l4 core -> mcspi1 interface */
2616 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2617 .master = &omap3xxx_l4_core_hwmod,
2618 .slave = &omap34xx_mcspi1,
2619 .clk = "mcspi1_ick",
2620 .user = OCP_USER_MPU | OCP_USER_SDMA,
2623 /* l4 core -> mcspi2 interface */
2624 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2625 .master = &omap3xxx_l4_core_hwmod,
2626 .slave = &omap34xx_mcspi2,
2627 .clk = "mcspi2_ick",
2628 .user = OCP_USER_MPU | OCP_USER_SDMA,
2631 /* l4 core -> mcspi3 interface */
2632 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2633 .master = &omap3xxx_l4_core_hwmod,
2634 .slave = &omap34xx_mcspi3,
2635 .clk = "mcspi3_ick",
2636 .user = OCP_USER_MPU | OCP_USER_SDMA,
2639 /* l4 core -> mcspi4 interface */
2641 static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2642 .master = &omap3xxx_l4_core_hwmod,
2643 .slave = &omap34xx_mcspi4,
2644 .clk = "mcspi4_ick",
2645 .user = OCP_USER_MPU | OCP_USER_SDMA,
2648 static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
2649 .master = &omap3xxx_usb_host_hs_hwmod,
2650 .slave = &omap3xxx_l3_main_hwmod,
2651 .clk = "core_l3_ick",
2652 .user = OCP_USER_MPU,
2656 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
2657 .master = &omap3xxx_l4_core_hwmod,
2658 .slave = &omap3xxx_usb_host_hs_hwmod,
2659 .clk = "usbhost_ick",
2660 .user = OCP_USER_MPU | OCP_USER_SDMA,
2664 static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
2665 .master = &omap3xxx_l4_core_hwmod,
2666 .slave = &omap3xxx_usb_tll_hs_hwmod,
2667 .clk = "usbtll_ick",
2668 .user = OCP_USER_MPU | OCP_USER_SDMA,
2671 /* l4_core -> hdq1w interface */
2672 static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
2673 .master = &omap3xxx_l4_core_hwmod,
2674 .slave = &omap3xxx_hdq1w_hwmod,
2676 .user = OCP_USER_MPU | OCP_USER_SDMA,
2677 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
2680 /* l4_wkup -> 32ksync_counter */
2683 static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
2684 .master = &omap3xxx_l4_wkup_hwmod,
2685 .slave = &omap3xxx_counter_32k_hwmod,
2686 .clk = "omap_32ksync_ick",
2687 .user = OCP_USER_MPU | OCP_USER_SDMA,
2690 /* am35xx has Davinci MDIO & EMAC */
2691 static struct omap_hwmod_class am35xx_mdio_class = {
2692 .name = "davinci_mdio",
2695 static struct omap_hwmod am35xx_mdio_hwmod = {
2696 .name = "davinci_mdio",
2697 .class = &am35xx_mdio_class,
2698 .flags = HWMOD_NO_IDLEST,
2702 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2703 * but this will probably require some additional hwmod core support,
2704 * so is left as a future to-do item.
2706 static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
2707 .master = &am35xx_mdio_hwmod,
2708 .slave = &omap3xxx_l3_main_hwmod,
2710 .user = OCP_USER_MPU,
2713 /* l4_core -> davinci mdio */
2715 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2716 * but this will probably require some additional hwmod core support,
2717 * so is left as a future to-do item.
2719 static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
2720 .master = &omap3xxx_l4_core_hwmod,
2721 .slave = &am35xx_mdio_hwmod,
2723 .user = OCP_USER_MPU,
2726 static struct omap_hwmod_class am35xx_emac_class = {
2727 .name = "davinci_emac",
2730 static struct omap_hwmod am35xx_emac_hwmod = {
2731 .name = "davinci_emac",
2732 .class = &am35xx_emac_class,
2734 * According to Mark Greer, the MPU will not return from WFI
2735 * when the EMAC signals an interrupt.
2736 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2738 .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
2741 /* l3_core -> davinci emac interface */
2743 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2744 * but this will probably require some additional hwmod core support,
2745 * so is left as a future to-do item.
2747 static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
2748 .master = &am35xx_emac_hwmod,
2749 .slave = &omap3xxx_l3_main_hwmod,
2751 .user = OCP_USER_MPU,
2754 /* l4_core -> davinci emac */
2756 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2757 * but this will probably require some additional hwmod core support,
2758 * so is left as a future to-do item.
2760 static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
2761 .master = &omap3xxx_l4_core_hwmod,
2762 .slave = &am35xx_emac_hwmod,
2764 .user = OCP_USER_MPU,
2767 static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
2768 .master = &omap3xxx_l3_main_hwmod,
2769 .slave = &omap3xxx_gpmc_hwmod,
2770 .clk = "core_l3_ick",
2771 .user = OCP_USER_MPU | OCP_USER_SDMA,
2774 /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2775 static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
2778 .autoidle_shift = 0,
2781 static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
2785 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2786 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2787 .sysc_fields = &omap3_sham_sysc_fields,
2790 static struct omap_hwmod_class omap3xxx_sham_class = {
2792 .sysc = &omap3_sham_sysc,
2797 static struct omap_hwmod omap3xxx_sham_hwmod = {
2799 .main_clk = "sha12_ick",
2802 .module_offs = CORE_MOD,
2804 .module_bit = OMAP3430_EN_SHA12_SHIFT,
2806 .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
2809 .class = &omap3xxx_sham_class,
2813 static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
2814 .master = &omap3xxx_l4_core_hwmod,
2815 .slave = &omap3xxx_sham_hwmod,
2817 .user = OCP_USER_MPU | OCP_USER_SDMA,
2820 /* l4_core -> AES */
2821 static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
2824 .autoidle_shift = 0,
2827 static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
2831 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2832 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2833 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2834 .sysc_fields = &omap3xxx_aes_sysc_fields,
2837 static struct omap_hwmod_class omap3xxx_aes_class = {
2839 .sysc = &omap3_aes_sysc,
2843 static struct omap_hwmod omap3xxx_aes_hwmod = {
2845 .main_clk = "aes2_ick",
2848 .module_offs = CORE_MOD,
2850 .module_bit = OMAP3430_EN_AES2_SHIFT,
2852 .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
2855 .class = &omap3xxx_aes_class,
2859 static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
2860 .master = &omap3xxx_l4_core_hwmod,
2861 .slave = &omap3xxx_aes_hwmod,
2863 .user = OCP_USER_MPU | OCP_USER_SDMA,
2868 * synchronous serial interface (multichannel and full-duplex serial if)
2871 static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
2873 .sysc_offs = 0x0010,
2874 .syss_offs = 0x0014,
2875 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
2876 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2877 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2878 .sysc_fields = &omap_hwmod_sysc_type1,
2881 static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
2883 .sysc = &omap34xx_ssi_sysc,
2886 static struct omap_hwmod omap3xxx_ssi_hwmod = {
2888 .class = &omap3xxx_ssi_hwmod_class,
2889 .clkdm_name = "core_l4_clkdm",
2890 .main_clk = "ssi_ssr_fck",
2894 .module_bit = OMAP3430_EN_SSI_SHIFT,
2895 .module_offs = CORE_MOD,
2897 .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
2902 /* L4 CORE -> SSI */
2903 static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
2904 .master = &omap3xxx_l4_core_hwmod,
2905 .slave = &omap3xxx_ssi_hwmod,
2907 .user = OCP_USER_MPU | OCP_USER_SDMA,
2910 static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
2911 &omap3xxx_l3_main__l4_core,
2912 &omap3xxx_l3_main__l4_per,
2913 &omap3xxx_mpu__l3_main,
2914 &omap3xxx_l3_main__l4_debugss,
2915 &omap3xxx_l4_core__l4_wkup,
2916 &omap3xxx_l4_core__mmc3,
2917 &omap3_l4_core__uart1,
2918 &omap3_l4_core__uart2,
2919 &omap3_l4_per__uart3,
2920 &omap3_l4_core__i2c1,
2921 &omap3_l4_core__i2c2,
2922 &omap3_l4_core__i2c3,
2923 &omap3xxx_l4_wkup__l4_sec,
2924 &omap3xxx_l4_wkup__timer1,
2925 &omap3xxx_l4_per__timer2,
2926 &omap3xxx_l4_per__timer3,
2927 &omap3xxx_l4_per__timer4,
2928 &omap3xxx_l4_per__timer5,
2929 &omap3xxx_l4_per__timer6,
2930 &omap3xxx_l4_per__timer7,
2931 &omap3xxx_l4_per__timer8,
2932 &omap3xxx_l4_per__timer9,
2933 &omap3xxx_l4_core__timer10,
2934 &omap3xxx_l4_core__timer11,
2935 &omap3xxx_l4_wkup__wd_timer2,
2936 &omap3xxx_l4_wkup__gpio1,
2937 &omap3xxx_l4_per__gpio2,
2938 &omap3xxx_l4_per__gpio3,
2939 &omap3xxx_l4_per__gpio4,
2940 &omap3xxx_l4_per__gpio5,
2941 &omap3xxx_l4_per__gpio6,
2942 &omap3xxx_dma_system__l3,
2943 &omap3xxx_l4_core__dma_system,
2944 &omap3xxx_l4_core__mcbsp1,
2945 &omap3xxx_l4_per__mcbsp2,
2946 &omap3xxx_l4_per__mcbsp3,
2947 &omap3xxx_l4_per__mcbsp4,
2948 &omap3xxx_l4_core__mcbsp5,
2949 &omap3xxx_l4_per__mcbsp2_sidetone,
2950 &omap3xxx_l4_per__mcbsp3_sidetone,
2951 &omap34xx_l4_core__mcspi1,
2952 &omap34xx_l4_core__mcspi2,
2953 &omap34xx_l4_core__mcspi3,
2954 &omap34xx_l4_core__mcspi4,
2955 &omap3xxx_l4_wkup__counter_32k,
2956 &omap3xxx_l3_main__gpmc,
2960 /* GP-only hwmod links */
2961 static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
2962 &omap3xxx_l4_sec__timer12,
2966 static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
2967 &omap3xxx_l4_sec__timer12,
2971 static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
2972 &omap3xxx_l4_sec__timer12,
2976 /* crypto hwmod links */
2977 static struct omap_hwmod_ocp_if *omap34xx_sham_hwmod_ocp_ifs[] __initdata = {
2978 &omap3xxx_l4_core__sham,
2982 static struct omap_hwmod_ocp_if *omap34xx_aes_hwmod_ocp_ifs[] __initdata = {
2983 &omap3xxx_l4_core__aes,
2987 static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = {
2988 &omap3xxx_l4_core__sham,
2992 static struct omap_hwmod_ocp_if *omap36xx_aes_hwmod_ocp_ifs[] __initdata = {
2993 &omap3xxx_l4_core__aes,
2998 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2999 * only present on some AM35xx chips, and no one knows which
3001 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
3002 * if you need these IP blocks on an AM35xx, try uncommenting
3003 * the following lines.
3005 static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = {
3006 /* &omap3xxx_l4_core__sham, */
3010 static struct omap_hwmod_ocp_if *am35xx_aes_hwmod_ocp_ifs[] __initdata = {
3011 /* &omap3xxx_l4_core__aes, */
3015 /* 3430ES1-only hwmod links */
3016 static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3017 &omap3430es1_dss__l3,
3018 &omap3430es1_l4_core__dss,
3022 /* 3430ES2+-only hwmod links */
3023 static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3025 &omap3xxx_l4_core__dss,
3026 &omap3xxx_usbhsotg__l3,
3027 &omap3xxx_l4_core__usbhsotg,
3028 &omap3xxx_usb_host_hs__l3_main_2,
3029 &omap3xxx_l4_core__usb_host_hs,
3030 &omap3xxx_l4_core__usb_tll_hs,
3034 /* <= 3430ES3-only hwmod links */
3035 static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3036 &omap3xxx_l4_core__pre_es3_mmc1,
3037 &omap3xxx_l4_core__pre_es3_mmc2,
3041 /* 3430ES3+-only hwmod links */
3042 static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3043 &omap3xxx_l4_core__es3plus_mmc1,
3044 &omap3xxx_l4_core__es3plus_mmc2,
3048 /* 34xx-only hwmod links (all ES revisions) */
3049 static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3051 &omap34xx_l4_core__sr1,
3052 &omap34xx_l4_core__sr2,
3053 &omap3xxx_l4_core__mailbox,
3054 &omap3xxx_l4_core__hdq1w,
3055 &omap3xxx_sad2d__l3,
3056 &omap3xxx_l4_core__mmu_isp,
3057 &omap3xxx_l3_main__mmu_iva,
3058 &omap3xxx_l4_core__ssi,
3062 /* 36xx-only hwmod links (all ES revisions) */
3063 static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3065 &omap36xx_l4_per__uart4,
3067 &omap3xxx_l4_core__dss,
3068 &omap36xx_l4_core__sr1,
3069 &omap36xx_l4_core__sr2,
3070 &omap3xxx_usbhsotg__l3,
3071 &omap3xxx_l4_core__usbhsotg,
3072 &omap3xxx_l4_core__mailbox,
3073 &omap3xxx_usb_host_hs__l3_main_2,
3074 &omap3xxx_l4_core__usb_host_hs,
3075 &omap3xxx_l4_core__usb_tll_hs,
3076 &omap3xxx_l4_core__es3plus_mmc1,
3077 &omap3xxx_l4_core__es3plus_mmc2,
3078 &omap3xxx_l4_core__hdq1w,
3079 &omap3xxx_sad2d__l3,
3080 &omap3xxx_l4_core__mmu_isp,
3081 &omap3xxx_l3_main__mmu_iva,
3082 &omap3xxx_l4_core__ssi,
3086 static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3088 &omap3xxx_l4_core__dss,
3089 &am35xx_usbhsotg__l3,
3090 &am35xx_l4_core__usbhsotg,
3091 &am35xx_l4_core__uart4,
3092 &omap3xxx_usb_host_hs__l3_main_2,
3093 &omap3xxx_l4_core__usb_host_hs,
3094 &omap3xxx_l4_core__usb_tll_hs,
3095 &omap3xxx_l4_core__es3plus_mmc1,
3096 &omap3xxx_l4_core__es3plus_mmc2,
3097 &omap3xxx_l4_core__hdq1w,
3099 &am35xx_l4_core__mdio,
3101 &am35xx_l4_core__emac,
3105 static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3106 &omap3xxx_l4_core__dss_dispc,
3107 &omap3xxx_l4_core__dss_dsi1,
3108 &omap3xxx_l4_core__dss_rfbi,
3109 &omap3xxx_l4_core__dss_venc,
3114 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
3115 * @bus: struct device_node * for the top-level OMAP DT data
3116 * @dev_name: device name used in the DT file
3118 * Determine whether a "secure" IP block @dev_name is usable by Linux.
3119 * There doesn't appear to be a 100% reliable way to determine this,
3120 * so we rely on heuristics. If @bus is null, meaning there's no DT
3121 * data, then we only assume the IP block is accessible if the OMAP is
3122 * fused as a 'general-purpose' SoC. If however DT data is present,
3123 * test to see if the IP block is described in the DT data and set to
3124 * 'status = "okay"'. If so then we assume the ODM has configured the
3125 * OMAP firewalls to allow access to the IP block.
3127 * Return: 0 if device named @dev_name is not likely to be accessible,
3128 * or 1 if it is likely to be accessible.
3130 static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
3131 const char *dev_name)
3133 struct device_node *node;
3137 return omap_type() == OMAP2_DEVICE_TYPE_GP;
3139 node = of_get_child_by_name(bus, dev_name);
3140 available = of_device_is_available(node);
3146 int __init omap3xxx_hwmod_init(void)
3149 struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL;
3150 struct omap_hwmod_ocp_if **h_aes = NULL;
3151 struct device_node *bus = NULL;
3156 /* Register hwmod links common to all OMAP3 */
3157 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
3164 * Register hwmod links common to individual OMAP3 families, all
3165 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3166 * All possible revisions should be included in this conditional.
3168 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3169 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3170 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3171 h = omap34xx_hwmod_ocp_ifs;
3172 h_gp = omap34xx_gp_hwmod_ocp_ifs;
3173 h_sham = omap34xx_sham_hwmod_ocp_ifs;
3174 h_aes = omap34xx_aes_hwmod_ocp_ifs;
3175 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
3176 h = am35xx_hwmod_ocp_ifs;
3177 h_gp = am35xx_gp_hwmod_ocp_ifs;
3178 h_sham = am35xx_sham_hwmod_ocp_ifs;
3179 h_aes = am35xx_aes_hwmod_ocp_ifs;
3180 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3181 rev == OMAP3630_REV_ES1_2) {
3182 h = omap36xx_hwmod_ocp_ifs;
3183 h_gp = omap36xx_gp_hwmod_ocp_ifs;
3184 h_sham = omap36xx_sham_hwmod_ocp_ifs;
3185 h_aes = omap36xx_aes_hwmod_ocp_ifs;
3187 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3191 r = omap_hwmod_register_links(h);
3195 /* Register GP-only hwmod links. */
3196 if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
3197 r = omap_hwmod_register_links(h_gp);
3203 * Register crypto hwmod links only if they are not disabled in DT.
3204 * If DT information is missing, enable them only for GP devices.
3207 bus = of_find_node_by_name(NULL, "ocp");
3209 if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
3210 r = omap_hwmod_register_links(h_sham);
3217 if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
3218 r = omap_hwmod_register_links(h_aes);
3227 * Register hwmod links specific to certain ES levels of a
3228 * particular family of silicon (e.g., 34xx ES1.0)
3231 if (rev == OMAP3430_REV_ES1_0) {
3232 h = omap3430es1_hwmod_ocp_ifs;
3233 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3234 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3235 rev == OMAP3430_REV_ES3_1_2) {
3236 h = omap3430es2plus_hwmod_ocp_ifs;
3240 r = omap_hwmod_register_links(h);
3246 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3247 rev == OMAP3430_REV_ES2_1) {
3248 h = omap3430_pre_es3_hwmod_ocp_ifs;
3249 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3250 rev == OMAP3430_REV_ES3_1_2) {
3251 h = omap3430_es3plus_hwmod_ocp_ifs;
3255 r = omap_hwmod_register_links(h);
3260 * DSS code presumes that dss_core hwmod is handled first,
3261 * _before_ any other DSS related hwmods so register common
3262 * DSS hwmod links last to ensure that dss_core is already
3263 * registered. Otherwise some change things may happen, for
3264 * ex. if dispc is handled before dss_core and DSS is enabled
3265 * in bootloader DISPC will be reset with outputs enabled
3266 * which sometimes leads to unrecoverable L3 error. XXX The
3267 * long-term fix to this is to ensure hwmods are set up in
3268 * dependency order in the hwmod core code.
3270 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);