1 // SPDX-License-Identifier: GPL-2.0-only
3 * Hardware modules present on the OMAP44xx chips
5 * Copyright (C) 2009-2012 Texas Instruments, Inc.
6 * Copyright (C) 2009-2010 Nokia Corporation
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 * Note that this file is currently not in sync with autogeneration scripts.
17 * The above note to be removed, once it is synced up.
22 #include "omap_hwmod.h"
23 #include "omap_hwmod_common_data.h"
27 #include "prm-regbits-44xx.h"
29 /* Base offset for all OMAP4 interrupts external to MPUSS */
30 #define OMAP44XX_IRQ_GIC_START 32
38 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
40 static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
45 static struct omap_hwmod omap44xx_l3_instr_hwmod = {
47 .class = &omap44xx_l3_hwmod_class,
48 .clkdm_name = "l3_instr_clkdm",
51 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
52 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
53 .modulemode = MODULEMODE_HWCTRL,
59 static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
61 .class = &omap44xx_l3_hwmod_class,
62 .clkdm_name = "l3_1_clkdm",
65 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
66 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
72 static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
74 .class = &omap44xx_l3_hwmod_class,
75 .clkdm_name = "l3_2_clkdm",
78 .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
79 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
85 static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
87 .class = &omap44xx_l3_hwmod_class,
88 .clkdm_name = "l3_instr_clkdm",
91 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
92 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
93 .modulemode = MODULEMODE_HWCTRL,
100 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
102 static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
107 static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
109 .class = &omap44xx_l4_hwmod_class,
110 .clkdm_name = "l4_cfg_clkdm",
113 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
114 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
120 static struct omap_hwmod omap44xx_l4_per_hwmod = {
122 .class = &omap44xx_l4_hwmod_class,
123 .clkdm_name = "l4_per_clkdm",
126 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
127 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
133 static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
135 .class = &omap44xx_l4_hwmod_class,
136 .clkdm_name = "l4_wkup_clkdm",
139 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
140 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
147 * instance(s): mpu_private
149 static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
154 static struct omap_hwmod omap44xx_mpu_private_hwmod = {
155 .name = "mpu_private",
156 .class = &omap44xx_mpu_bus_hwmod_class,
157 .clkdm_name = "mpuss_clkdm",
160 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
167 * instance(s): ocp_wp_noc
169 static struct omap_hwmod_class omap44xx_ocp_wp_noc_hwmod_class = {
170 .name = "ocp_wp_noc",
174 static struct omap_hwmod omap44xx_ocp_wp_noc_hwmod = {
175 .name = "ocp_wp_noc",
176 .class = &omap44xx_ocp_wp_noc_hwmod_class,
177 .clkdm_name = "l3_instr_clkdm",
180 .clkctrl_offs = OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_OFFSET,
181 .context_offs = OMAP4_RM_L3INSTR_OCP_WP1_CONTEXT_OFFSET,
182 .modulemode = MODULEMODE_HWCTRL,
188 * Modules omap_hwmod structures
190 * The following IPs are excluded for the moment because:
191 * - They do not need an explicit SW control using omap_hwmod API.
192 * - They still need to be validated with the driver
193 * properly adapted to omap_hwmod / omap_device
200 * debug and emulation sub system
203 static struct omap_hwmod_class omap44xx_debugss_hwmod_class = {
208 static struct omap_hwmod omap44xx_debugss_hwmod = {
210 .class = &omap44xx_debugss_hwmod_class,
211 .clkdm_name = "emu_sys_clkdm",
212 .main_clk = "trace_clk_div_ck",
215 .clkctrl_offs = OMAP4_CM_EMU_DEBUGSS_CLKCTRL_OFFSET,
216 .context_offs = OMAP4_RM_EMU_DEBUGSS_CONTEXT_OFFSET,
223 * external memory interface no1
226 static struct omap_hwmod_class_sysconfig omap44xx_emif_sysc = {
230 static struct omap_hwmod_class omap44xx_emif_hwmod_class = {
232 .sysc = &omap44xx_emif_sysc,
236 static struct omap_hwmod omap44xx_emif1_hwmod = {
238 .class = &omap44xx_emif_hwmod_class,
239 .clkdm_name = "l3_emif_clkdm",
240 .flags = HWMOD_INIT_NO_IDLE,
241 .main_clk = "ddrphy_ck",
244 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_1_CLKCTRL_OFFSET,
245 .context_offs = OMAP4_RM_MEMIF_EMIF_1_CONTEXT_OFFSET,
246 .modulemode = MODULEMODE_HWCTRL,
252 static struct omap_hwmod omap44xx_emif2_hwmod = {
254 .class = &omap44xx_emif_hwmod_class,
255 .clkdm_name = "l3_emif_clkdm",
256 .flags = HWMOD_INIT_NO_IDLE,
257 .main_clk = "ddrphy_ck",
260 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_2_CLKCTRL_OFFSET,
261 .context_offs = OMAP4_RM_MEMIF_EMIF_2_CONTEXT_OFFSET,
262 .modulemode = MODULEMODE_HWCTRL,
272 static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
277 static struct omap_hwmod omap44xx_mpu_hwmod = {
279 .class = &omap44xx_mpu_hwmod_class,
280 .clkdm_name = "mpuss_clkdm",
281 .flags = HWMOD_INIT_NO_IDLE,
282 .main_clk = "dpll_mpu_m2_ck",
285 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
286 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
293 * top-level core on-chip ram
296 static struct omap_hwmod_class omap44xx_ocmc_ram_hwmod_class = {
301 static struct omap_hwmod omap44xx_ocmc_ram_hwmod = {
303 .class = &omap44xx_ocmc_ram_hwmod_class,
304 .clkdm_name = "l3_2_clkdm",
307 .clkctrl_offs = OMAP4_CM_L3_2_OCMC_RAM_CLKCTRL_OFFSET,
308 .context_offs = OMAP4_RM_L3_2_OCMC_RAM_CONTEXT_OFFSET,
316 * power and reset manager (part of the prcm infrastructure) + clock manager 2
317 * + clock manager 1 (in always on power domain) + local prm in mpu
320 static struct omap_hwmod_class omap44xx_prcm_hwmod_class = {
325 static struct omap_hwmod omap44xx_prcm_mpu_hwmod = {
327 .class = &omap44xx_prcm_hwmod_class,
328 .clkdm_name = "l4_wkup_clkdm",
329 .flags = HWMOD_NO_IDLEST,
332 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
338 static struct omap_hwmod omap44xx_cm_core_aon_hwmod = {
339 .name = "cm_core_aon",
340 .class = &omap44xx_prcm_hwmod_class,
341 .flags = HWMOD_NO_IDLEST,
344 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
350 static struct omap_hwmod omap44xx_cm_core_hwmod = {
352 .class = &omap44xx_prcm_hwmod_class,
353 .flags = HWMOD_NO_IDLEST,
356 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
362 static struct omap_hwmod_rst_info omap44xx_prm_resets[] = {
363 { .name = "rst_global_warm_sw", .rst_shift = 0 },
364 { .name = "rst_global_cold_sw", .rst_shift = 1 },
367 static struct omap_hwmod omap44xx_prm_hwmod = {
369 .class = &omap44xx_prcm_hwmod_class,
370 .rst_lines = omap44xx_prm_resets,
371 .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets),
376 * system clock and reset manager
379 static struct omap_hwmod_class omap44xx_scrm_hwmod_class = {
384 static struct omap_hwmod omap44xx_scrm_hwmod = {
386 .class = &omap44xx_scrm_hwmod_class,
387 .clkdm_name = "l4_wkup_clkdm",
390 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
397 * shared level 2 memory interface
400 static struct omap_hwmod_class omap44xx_sl2if_hwmod_class = {
405 static struct omap_hwmod omap44xx_sl2if_hwmod = {
407 .class = &omap44xx_sl2if_hwmod_class,
408 .clkdm_name = "ivahd_clkdm",
411 .clkctrl_offs = OMAP4_CM_IVAHD_SL2_CLKCTRL_OFFSET,
412 .context_offs = OMAP4_RM_IVAHD_SL2_CONTEXT_OFFSET,
413 .modulemode = MODULEMODE_HWCTRL,
422 /* l3_main_3 -> l3_instr */
423 static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
424 .master = &omap44xx_l3_main_3_hwmod,
425 .slave = &omap44xx_l3_instr_hwmod,
427 .user = OCP_USER_MPU | OCP_USER_SDMA,
430 /* ocp_wp_noc -> l3_instr */
431 static struct omap_hwmod_ocp_if omap44xx_ocp_wp_noc__l3_instr = {
432 .master = &omap44xx_ocp_wp_noc_hwmod,
433 .slave = &omap44xx_l3_instr_hwmod,
435 .user = OCP_USER_MPU | OCP_USER_SDMA,
438 /* l3_main_2 -> l3_main_1 */
439 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
440 .master = &omap44xx_l3_main_2_hwmod,
441 .slave = &omap44xx_l3_main_1_hwmod,
443 .user = OCP_USER_MPU | OCP_USER_SDMA,
446 /* l4_cfg -> l3_main_1 */
447 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
448 .master = &omap44xx_l4_cfg_hwmod,
449 .slave = &omap44xx_l3_main_1_hwmod,
451 .user = OCP_USER_MPU | OCP_USER_SDMA,
454 /* mpu -> l3_main_1 */
455 static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
456 .master = &omap44xx_mpu_hwmod,
457 .slave = &omap44xx_l3_main_1_hwmod,
459 .user = OCP_USER_MPU,
462 /* debugss -> l3_main_2 */
463 static struct omap_hwmod_ocp_if omap44xx_debugss__l3_main_2 = {
464 .master = &omap44xx_debugss_hwmod,
465 .slave = &omap44xx_l3_main_2_hwmod,
466 .clk = "dbgclk_mux_ck",
467 .user = OCP_USER_MPU | OCP_USER_SDMA,
470 /* l3_main_1 -> l3_main_2 */
471 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
472 .master = &omap44xx_l3_main_1_hwmod,
473 .slave = &omap44xx_l3_main_2_hwmod,
475 .user = OCP_USER_MPU,
478 /* l4_cfg -> l3_main_2 */
479 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
480 .master = &omap44xx_l4_cfg_hwmod,
481 .slave = &omap44xx_l3_main_2_hwmod,
483 .user = OCP_USER_MPU | OCP_USER_SDMA,
486 /* l3_main_1 -> l3_main_3 */
487 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
488 .master = &omap44xx_l3_main_1_hwmod,
489 .slave = &omap44xx_l3_main_3_hwmod,
491 .user = OCP_USER_MPU,
494 /* l3_main_2 -> l3_main_3 */
495 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
496 .master = &omap44xx_l3_main_2_hwmod,
497 .slave = &omap44xx_l3_main_3_hwmod,
499 .user = OCP_USER_MPU | OCP_USER_SDMA,
502 /* l4_cfg -> l3_main_3 */
503 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
504 .master = &omap44xx_l4_cfg_hwmod,
505 .slave = &omap44xx_l3_main_3_hwmod,
507 .user = OCP_USER_MPU | OCP_USER_SDMA,
510 /* l3_main_1 -> l4_cfg */
511 static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
512 .master = &omap44xx_l3_main_1_hwmod,
513 .slave = &omap44xx_l4_cfg_hwmod,
515 .user = OCP_USER_MPU | OCP_USER_SDMA,
518 /* l3_main_2 -> l4_per */
519 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
520 .master = &omap44xx_l3_main_2_hwmod,
521 .slave = &omap44xx_l4_per_hwmod,
523 .user = OCP_USER_MPU | OCP_USER_SDMA,
526 /* l4_cfg -> l4_wkup */
527 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
528 .master = &omap44xx_l4_cfg_hwmod,
529 .slave = &omap44xx_l4_wkup_hwmod,
531 .user = OCP_USER_MPU | OCP_USER_SDMA,
534 /* mpu -> mpu_private */
535 static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
536 .master = &omap44xx_mpu_hwmod,
537 .slave = &omap44xx_mpu_private_hwmod,
539 .user = OCP_USER_MPU | OCP_USER_SDMA,
542 /* l4_cfg -> ocp_wp_noc */
543 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__ocp_wp_noc = {
544 .master = &omap44xx_l4_cfg_hwmod,
545 .slave = &omap44xx_ocp_wp_noc_hwmod,
547 .user = OCP_USER_MPU | OCP_USER_SDMA,
550 /* l3_instr -> debugss */
551 static struct omap_hwmod_ocp_if omap44xx_l3_instr__debugss = {
552 .master = &omap44xx_l3_instr_hwmod,
553 .slave = &omap44xx_debugss_hwmod,
555 .user = OCP_USER_MPU | OCP_USER_SDMA,
558 /* l3_main_2 -> ocmc_ram */
559 static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ocmc_ram = {
560 .master = &omap44xx_l3_main_2_hwmod,
561 .slave = &omap44xx_ocmc_ram_hwmod,
563 .user = OCP_USER_MPU | OCP_USER_SDMA,
566 /* mpu_private -> prcm_mpu */
567 static struct omap_hwmod_ocp_if omap44xx_mpu_private__prcm_mpu = {
568 .master = &omap44xx_mpu_private_hwmod,
569 .slave = &omap44xx_prcm_mpu_hwmod,
571 .user = OCP_USER_MPU | OCP_USER_SDMA,
574 /* l4_wkup -> cm_core_aon */
575 static struct omap_hwmod_ocp_if omap44xx_l4_wkup__cm_core_aon = {
576 .master = &omap44xx_l4_wkup_hwmod,
577 .slave = &omap44xx_cm_core_aon_hwmod,
578 .clk = "l4_wkup_clk_mux_ck",
579 .user = OCP_USER_MPU | OCP_USER_SDMA,
582 /* l4_cfg -> cm_core */
583 static struct omap_hwmod_ocp_if omap44xx_l4_cfg__cm_core = {
584 .master = &omap44xx_l4_cfg_hwmod,
585 .slave = &omap44xx_cm_core_hwmod,
587 .user = OCP_USER_MPU | OCP_USER_SDMA,
591 static struct omap_hwmod_ocp_if omap44xx_l4_wkup__prm = {
592 .master = &omap44xx_l4_wkup_hwmod,
593 .slave = &omap44xx_prm_hwmod,
594 .clk = "l4_wkup_clk_mux_ck",
595 .user = OCP_USER_MPU | OCP_USER_SDMA,
598 /* l4_wkup -> scrm */
599 static struct omap_hwmod_ocp_if omap44xx_l4_wkup__scrm = {
600 .master = &omap44xx_l4_wkup_hwmod,
601 .slave = &omap44xx_scrm_hwmod,
602 .clk = "l4_wkup_clk_mux_ck",
603 .user = OCP_USER_MPU | OCP_USER_SDMA,
606 /* l3_main_2 -> sl2if */
607 static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l3_main_2__sl2if = {
608 .master = &omap44xx_l3_main_2_hwmod,
609 .slave = &omap44xx_sl2if_hwmod,
611 .user = OCP_USER_MPU | OCP_USER_SDMA,
615 static struct omap_hwmod_ocp_if omap44xx_mpu__emif1 = {
616 .master = &omap44xx_mpu_hwmod,
617 .slave = &omap44xx_emif1_hwmod,
619 .user = OCP_USER_MPU | OCP_USER_SDMA,
623 static struct omap_hwmod_ocp_if omap44xx_mpu__emif2 = {
624 .master = &omap44xx_mpu_hwmod,
625 .slave = &omap44xx_emif2_hwmod,
627 .user = OCP_USER_MPU | OCP_USER_SDMA,
630 static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = {
631 &omap44xx_l3_main_3__l3_instr,
632 &omap44xx_ocp_wp_noc__l3_instr,
633 &omap44xx_l3_main_2__l3_main_1,
634 &omap44xx_l4_cfg__l3_main_1,
635 &omap44xx_mpu__l3_main_1,
636 &omap44xx_debugss__l3_main_2,
637 &omap44xx_l3_main_1__l3_main_2,
638 &omap44xx_l4_cfg__l3_main_2,
639 &omap44xx_l3_main_1__l3_main_3,
640 &omap44xx_l3_main_2__l3_main_3,
641 &omap44xx_l4_cfg__l3_main_3,
642 &omap44xx_l3_main_1__l4_cfg,
643 &omap44xx_l3_main_2__l4_per,
644 &omap44xx_l4_cfg__l4_wkup,
645 &omap44xx_mpu__mpu_private,
646 &omap44xx_l4_cfg__ocp_wp_noc,
647 &omap44xx_l3_instr__debugss,
648 &omap44xx_l3_main_2__ocmc_ram,
649 &omap44xx_mpu_private__prcm_mpu,
650 &omap44xx_l4_wkup__cm_core_aon,
651 &omap44xx_l4_cfg__cm_core,
652 &omap44xx_l4_wkup__prm,
653 &omap44xx_l4_wkup__scrm,
654 /* &omap44xx_l3_main_2__sl2if, */
655 &omap44xx_mpu__emif1,
656 &omap44xx_mpu__emif2,
660 int __init omap44xx_hwmod_init(void)
663 return omap_hwmod_register_links(omap44xx_hwmod_ocp_ifs);