2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 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 * XXX handle crossbar/shared link difference for L3?
13 * XXX these should be marked initdata for multi-OMAP kernels
16 #include <linux/platform_data/i2c-omap.h>
17 #include <linux/platform_data/hsmmc-omap.h>
18 #include <linux/omap-dma.h>
20 #include "omap_hwmod.h"
24 #include "omap_hwmod_common_data.h"
25 #include "prm-regbits-24xx.h"
26 #include "cm-regbits-24xx.h"
31 * OMAP2430 hardware module integration data
33 * All of the data in this section should be autogeneratable from the
34 * TI hardware database or other technical documentation. Data that
35 * is driver-specific or driver-kernel integration-specific belongs
44 static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
45 { .name = "logic", .rst_shift = 0 },
46 { .name = "mmu", .rst_shift = 1 },
49 static struct omap_hwmod omap2430_iva_hwmod = {
51 .class = &iva_hwmod_class,
52 .clkdm_name = "dsp_clkdm",
53 .rst_lines = omap2430_iva_resets,
54 .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
55 .main_clk = "dsp_fck",
59 static struct omap_hwmod_class_sysconfig i2c_sysc = {
63 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
64 SYSS_HAS_RESET_STATUS),
65 .sysc_fields = &omap_hwmod_sysc_type1,
68 static struct omap_hwmod_class i2c_class = {
71 .rev = OMAP_I2C_IP_VERSION_1,
72 .reset = &omap_i2c_reset,
76 static struct omap_hwmod omap2430_i2c1_hwmod = {
78 .flags = HWMOD_16BIT_REG,
79 .main_clk = "i2chs1_fck",
83 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
84 * I2CHS IP's do not follow the usual pattern.
85 * prcm_reg_id alone cannot be used to program
86 * the iclk and fclk. Needs to be handled using
87 * additional flags when clk handling is moved
90 .module_offs = CORE_MOD,
92 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
99 static struct omap_hwmod omap2430_i2c2_hwmod = {
101 .flags = HWMOD_16BIT_REG,
102 .main_clk = "i2chs2_fck",
105 .module_offs = CORE_MOD,
107 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
114 static struct omap_hwmod omap2430_gpio5_hwmod = {
116 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
117 .main_clk = "gpio5_fck",
120 .module_offs = CORE_MOD,
122 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
125 .class = &omap2xxx_gpio_hwmod_class,
129 static struct omap_dma_dev_attr dma_dev_attr = {
130 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
131 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
135 static struct omap_hwmod omap2430_dma_system_hwmod = {
137 .class = &omap2xxx_dma_hwmod_class,
138 .main_clk = "core_l3_ck",
139 .dev_attr = &dma_dev_attr,
140 .flags = HWMOD_NO_IDLEST,
144 static struct omap_hwmod omap2430_mailbox_hwmod = {
146 .class = &omap2xxx_mailbox_hwmod_class,
147 .main_clk = "mailboxes_ick",
150 .module_offs = CORE_MOD,
152 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
158 static struct omap_hwmod omap2430_mcspi3_hwmod = {
160 .main_clk = "mcspi3_fck",
163 .module_offs = CORE_MOD,
165 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
168 .class = &omap2xxx_mcspi_class,
172 static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
176 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
177 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
179 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
180 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
181 .sysc_fields = &omap_hwmod_sysc_type1,
184 static struct omap_hwmod_class usbotg_class = {
186 .sysc = &omap2430_usbhsotg_sysc,
190 static struct omap_hwmod omap2430_usbhsotg_hwmod = {
191 .name = "usb_otg_hs",
192 .main_clk = "usbhs_ick",
195 .module_offs = CORE_MOD,
197 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
200 .class = &usbotg_class,
202 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
203 * broken when autoidle is enabled
204 * workaround is to disable the autoidle bit at module level.
206 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
207 | HWMOD_SWSUP_MSTANDBY,
212 * multi channel buffered serial port controller
215 static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
218 .sysc_flags = (SYSC_HAS_SOFTRESET),
219 .sysc_fields = &omap_hwmod_sysc_type1,
222 static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
224 .sysc = &omap2430_mcbsp_sysc,
227 static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
228 { .role = "pad_fck", .clk = "mcbsp_clks" },
229 { .role = "prcm_fck", .clk = "func_96m_ck" },
233 static struct omap_hwmod omap2430_mcbsp1_hwmod = {
235 .class = &omap2430_mcbsp_hwmod_class,
236 .main_clk = "mcbsp1_fck",
239 .module_offs = CORE_MOD,
241 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
244 .opt_clks = mcbsp_opt_clks,
245 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
249 static struct omap_hwmod omap2430_mcbsp2_hwmod = {
251 .class = &omap2430_mcbsp_hwmod_class,
252 .main_clk = "mcbsp2_fck",
255 .module_offs = CORE_MOD,
257 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
260 .opt_clks = mcbsp_opt_clks,
261 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
265 static struct omap_hwmod omap2430_mcbsp3_hwmod = {
267 .class = &omap2430_mcbsp_hwmod_class,
268 .main_clk = "mcbsp3_fck",
271 .module_offs = CORE_MOD,
273 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
276 .opt_clks = mcbsp_opt_clks,
277 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
281 static struct omap_hwmod omap2430_mcbsp4_hwmod = {
283 .class = &omap2430_mcbsp_hwmod_class,
284 .main_clk = "mcbsp4_fck",
287 .module_offs = CORE_MOD,
289 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
292 .opt_clks = mcbsp_opt_clks,
293 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
297 static struct omap_hwmod omap2430_mcbsp5_hwmod = {
299 .class = &omap2430_mcbsp_hwmod_class,
300 .main_clk = "mcbsp5_fck",
303 .module_offs = CORE_MOD,
305 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
308 .opt_clks = mcbsp_opt_clks,
309 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
312 /* MMC/SD/SDIO common */
313 static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
317 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
318 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
319 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
320 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
321 .sysc_fields = &omap_hwmod_sysc_type1,
324 static struct omap_hwmod_class omap2430_mmc_class = {
326 .sysc = &omap2430_mmc_sysc,
330 static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
331 { .role = "dbck", .clk = "mmchsdb1_fck" },
334 static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
335 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
338 static struct omap_hwmod omap2430_mmc1_hwmod = {
340 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
341 .opt_clks = omap2430_mmc1_opt_clks,
342 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
343 .main_clk = "mmchs1_fck",
346 .module_offs = CORE_MOD,
348 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
351 .dev_attr = &mmc1_dev_attr,
352 .class = &omap2430_mmc_class,
356 static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
357 { .role = "dbck", .clk = "mmchsdb2_fck" },
360 static struct omap_hwmod omap2430_mmc2_hwmod = {
362 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
363 .opt_clks = omap2430_mmc2_opt_clks,
364 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
365 .main_clk = "mmchs2_fck",
368 .module_offs = CORE_MOD,
370 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
373 .class = &omap2430_mmc_class,
377 static struct omap_hwmod omap2430_hdq1w_hwmod = {
379 .main_clk = "hdq_fck",
382 .module_offs = CORE_MOD,
384 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
387 .class = &omap2_hdq1w_class,
394 /* L3 -> L4_CORE interface */
395 /* l3_core -> usbhsotg interface */
396 static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
397 .master = &omap2430_usbhsotg_hwmod,
398 .slave = &omap2xxx_l3_main_hwmod,
400 .user = OCP_USER_MPU,
403 /* L4 CORE -> I2C1 interface */
404 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
405 .master = &omap2xxx_l4_core_hwmod,
406 .slave = &omap2430_i2c1_hwmod,
408 .user = OCP_USER_MPU | OCP_USER_SDMA,
411 /* L4 CORE -> I2C2 interface */
412 static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
413 .master = &omap2xxx_l4_core_hwmod,
414 .slave = &omap2430_i2c2_hwmod,
416 .user = OCP_USER_MPU | OCP_USER_SDMA,
419 /* l4_core ->usbhsotg interface */
420 static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
421 .master = &omap2xxx_l4_core_hwmod,
422 .slave = &omap2430_usbhsotg_hwmod,
424 .user = OCP_USER_MPU,
427 /* L4 CORE -> MMC1 interface */
428 static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
429 .master = &omap2xxx_l4_core_hwmod,
430 .slave = &omap2430_mmc1_hwmod,
432 .user = OCP_USER_MPU | OCP_USER_SDMA,
435 /* L4 CORE -> MMC2 interface */
436 static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
437 .master = &omap2xxx_l4_core_hwmod,
438 .slave = &omap2430_mmc2_hwmod,
440 .user = OCP_USER_MPU | OCP_USER_SDMA,
443 /* l4 core -> mcspi3 interface */
444 static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
445 .master = &omap2xxx_l4_core_hwmod,
446 .slave = &omap2430_mcspi3_hwmod,
448 .user = OCP_USER_MPU | OCP_USER_SDMA,
451 /* IVA2 <- L3 interface */
452 static struct omap_hwmod_ocp_if omap2430_l3__iva = {
453 .master = &omap2xxx_l3_main_hwmod,
454 .slave = &omap2430_iva_hwmod,
456 .user = OCP_USER_MPU | OCP_USER_SDMA,
459 /* l4_wkup -> timer1 */
460 static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
461 .master = &omap2xxx_l4_wkup_hwmod,
462 .slave = &omap2xxx_timer1_hwmod,
464 .user = OCP_USER_MPU | OCP_USER_SDMA,
467 /* l4_wkup -> wd_timer2 */
468 static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
469 .master = &omap2xxx_l4_wkup_hwmod,
470 .slave = &omap2xxx_wd_timer2_hwmod,
471 .clk = "mpu_wdt_ick",
472 .user = OCP_USER_MPU | OCP_USER_SDMA,
475 /* l4_wkup -> gpio1 */
476 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
477 .master = &omap2xxx_l4_wkup_hwmod,
478 .slave = &omap2xxx_gpio1_hwmod,
480 .user = OCP_USER_MPU | OCP_USER_SDMA,
483 /* l4_wkup -> gpio2 */
484 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
485 .master = &omap2xxx_l4_wkup_hwmod,
486 .slave = &omap2xxx_gpio2_hwmod,
488 .user = OCP_USER_MPU | OCP_USER_SDMA,
491 /* l4_wkup -> gpio3 */
492 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
493 .master = &omap2xxx_l4_wkup_hwmod,
494 .slave = &omap2xxx_gpio3_hwmod,
496 .user = OCP_USER_MPU | OCP_USER_SDMA,
499 /* l4_wkup -> gpio4 */
500 static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
501 .master = &omap2xxx_l4_wkup_hwmod,
502 .slave = &omap2xxx_gpio4_hwmod,
504 .user = OCP_USER_MPU | OCP_USER_SDMA,
507 /* l4_core -> gpio5 */
508 static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
509 .master = &omap2xxx_l4_core_hwmod,
510 .slave = &omap2430_gpio5_hwmod,
512 .user = OCP_USER_MPU | OCP_USER_SDMA,
515 /* dma_system -> L3 */
516 static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
517 .master = &omap2430_dma_system_hwmod,
518 .slave = &omap2xxx_l3_main_hwmod,
520 .user = OCP_USER_MPU | OCP_USER_SDMA,
523 /* l4_core -> dma_system */
524 static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
525 .master = &omap2xxx_l4_core_hwmod,
526 .slave = &omap2430_dma_system_hwmod,
528 .user = OCP_USER_MPU | OCP_USER_SDMA,
531 /* l4_core -> mailbox */
532 static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
533 .master = &omap2xxx_l4_core_hwmod,
534 .slave = &omap2430_mailbox_hwmod,
535 .user = OCP_USER_MPU | OCP_USER_SDMA,
538 /* l4_core -> mcbsp1 */
539 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
540 .master = &omap2xxx_l4_core_hwmod,
541 .slave = &omap2430_mcbsp1_hwmod,
543 .user = OCP_USER_MPU | OCP_USER_SDMA,
546 /* l4_core -> mcbsp2 */
547 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
548 .master = &omap2xxx_l4_core_hwmod,
549 .slave = &omap2430_mcbsp2_hwmod,
551 .user = OCP_USER_MPU | OCP_USER_SDMA,
554 /* l4_core -> mcbsp3 */
555 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
556 .master = &omap2xxx_l4_core_hwmod,
557 .slave = &omap2430_mcbsp3_hwmod,
559 .user = OCP_USER_MPU | OCP_USER_SDMA,
562 /* l4_core -> mcbsp4 */
563 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
564 .master = &omap2xxx_l4_core_hwmod,
565 .slave = &omap2430_mcbsp4_hwmod,
567 .user = OCP_USER_MPU | OCP_USER_SDMA,
570 /* l4_core -> mcbsp5 */
571 static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
572 .master = &omap2xxx_l4_core_hwmod,
573 .slave = &omap2430_mcbsp5_hwmod,
575 .user = OCP_USER_MPU | OCP_USER_SDMA,
578 /* l4_core -> hdq1w */
579 static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
580 .master = &omap2xxx_l4_core_hwmod,
581 .slave = &omap2430_hdq1w_hwmod,
583 .user = OCP_USER_MPU | OCP_USER_SDMA,
584 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
587 /* l4_wkup -> 32ksync_counter */
588 static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
589 .master = &omap2xxx_l4_wkup_hwmod,
590 .slave = &omap2xxx_counter_32k_hwmod,
591 .clk = "sync_32k_ick",
592 .user = OCP_USER_MPU | OCP_USER_SDMA,
595 static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
596 .master = &omap2xxx_l3_main_hwmod,
597 .slave = &omap2xxx_gpmc_hwmod,
599 .user = OCP_USER_MPU | OCP_USER_SDMA,
602 static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
603 &omap2xxx_l3_main__l4_core,
604 &omap2xxx_mpu__l3_main,
606 &omap2430_usbhsotg__l3,
607 &omap2430_l4_core__i2c1,
608 &omap2430_l4_core__i2c2,
609 &omap2xxx_l4_core__l4_wkup,
610 &omap2_l4_core__uart1,
611 &omap2_l4_core__uart2,
612 &omap2_l4_core__uart3,
613 &omap2430_l4_core__usbhsotg,
614 &omap2430_l4_core__mmc1,
615 &omap2430_l4_core__mmc2,
616 &omap2xxx_l4_core__mcspi1,
617 &omap2xxx_l4_core__mcspi2,
618 &omap2430_l4_core__mcspi3,
620 &omap2430_l4_wkup__timer1,
621 &omap2xxx_l4_core__timer2,
622 &omap2xxx_l4_core__timer3,
623 &omap2xxx_l4_core__timer4,
624 &omap2xxx_l4_core__timer5,
625 &omap2xxx_l4_core__timer6,
626 &omap2xxx_l4_core__timer7,
627 &omap2xxx_l4_core__timer8,
628 &omap2xxx_l4_core__timer9,
629 &omap2xxx_l4_core__timer10,
630 &omap2xxx_l4_core__timer11,
631 &omap2xxx_l4_core__timer12,
632 &omap2430_l4_wkup__wd_timer2,
633 &omap2xxx_l4_core__dss,
634 &omap2xxx_l4_core__dss_dispc,
635 &omap2xxx_l4_core__dss_rfbi,
636 &omap2xxx_l4_core__dss_venc,
637 &omap2430_l4_wkup__gpio1,
638 &omap2430_l4_wkup__gpio2,
639 &omap2430_l4_wkup__gpio3,
640 &omap2430_l4_wkup__gpio4,
641 &omap2430_l4_core__gpio5,
642 &omap2430_dma_system__l3,
643 &omap2430_l4_core__dma_system,
644 &omap2430_l4_core__mailbox,
645 &omap2430_l4_core__mcbsp1,
646 &omap2430_l4_core__mcbsp2,
647 &omap2430_l4_core__mcbsp3,
648 &omap2430_l4_core__mcbsp4,
649 &omap2430_l4_core__mcbsp5,
650 &omap2430_l4_core__hdq1w,
651 &omap2xxx_l4_core__rng,
652 &omap2xxx_l4_core__sham,
653 &omap2xxx_l4_core__aes,
654 &omap2430_l4_wkup__counter_32k,
659 int __init omap2430_hwmod_init(void)
662 return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);