1 // SPDX-License-Identifier: GPL-2.0-only
3 * Hardware modules present on the DRA7xx chips
5 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
18 #include <linux/power/smartreflex.h>
20 #include <linux/omap-dma.h>
22 #include "omap_hwmod.h"
23 #include "omap_hwmod_common_data.h"
29 /* Base offset for all DRA7XX interrupts external to MPUSS */
30 #define DRA7XX_IRQ_GIC_START 32
32 /* Base offset for all DRA7XX dma requests */
33 #define DRA7XX_DMA_REQ_START 1
44 static struct omap_hwmod_class dra7xx_dmm_hwmod_class
= {
49 static struct omap_hwmod dra7xx_dmm_hwmod
= {
51 .class = &dra7xx_dmm_hwmod_class
,
52 .clkdm_name
= "emif_clkdm",
55 .clkctrl_offs
= DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET
,
56 .context_offs
= DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET
,
63 * instance(s): l3_instr, l3_main_1, l3_main_2
65 static struct omap_hwmod_class dra7xx_l3_hwmod_class
= {
70 static struct omap_hwmod dra7xx_l3_instr_hwmod
= {
72 .class = &dra7xx_l3_hwmod_class
,
73 .clkdm_name
= "l3instr_clkdm",
76 .clkctrl_offs
= DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET
,
77 .context_offs
= DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET
,
78 .modulemode
= MODULEMODE_HWCTRL
,
84 static struct omap_hwmod dra7xx_l3_main_1_hwmod
= {
86 .class = &dra7xx_l3_hwmod_class
,
87 .clkdm_name
= "l3main1_clkdm",
90 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET
,
91 .context_offs
= DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET
,
97 static struct omap_hwmod dra7xx_l3_main_2_hwmod
= {
99 .class = &dra7xx_l3_hwmod_class
,
100 .clkdm_name
= "l3instr_clkdm",
103 .clkctrl_offs
= DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET
,
104 .context_offs
= DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET
,
105 .modulemode
= MODULEMODE_HWCTRL
,
112 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
114 static struct omap_hwmod_class dra7xx_l4_hwmod_class
= {
119 static struct omap_hwmod dra7xx_l4_cfg_hwmod
= {
121 .class = &dra7xx_l4_hwmod_class
,
122 .clkdm_name
= "l4cfg_clkdm",
125 .clkctrl_offs
= DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET
,
126 .context_offs
= DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET
,
132 static struct omap_hwmod dra7xx_l4_per1_hwmod
= {
134 .class = &dra7xx_l4_hwmod_class
,
135 .clkdm_name
= "l4per_clkdm",
138 .clkctrl_offs
= DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET
,
139 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
145 static struct omap_hwmod dra7xx_l4_per2_hwmod
= {
147 .class = &dra7xx_l4_hwmod_class
,
148 .clkdm_name
= "l4per2_clkdm",
151 .clkctrl_offs
= DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET
,
152 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
158 static struct omap_hwmod dra7xx_l4_per3_hwmod
= {
160 .class = &dra7xx_l4_hwmod_class
,
161 .clkdm_name
= "l4per3_clkdm",
164 .clkctrl_offs
= DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET
,
165 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
171 static struct omap_hwmod dra7xx_l4_wkup_hwmod
= {
173 .class = &dra7xx_l4_hwmod_class
,
174 .clkdm_name
= "wkupaon_clkdm",
177 .clkctrl_offs
= DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET
,
178 .context_offs
= DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET
,
188 static struct omap_hwmod_class dra7xx_atl_hwmod_class
= {
193 static struct omap_hwmod dra7xx_atl_hwmod
= {
195 .class = &dra7xx_atl_hwmod_class
,
196 .clkdm_name
= "atl_clkdm",
197 .main_clk
= "atl_gfclk_mux",
200 .clkctrl_offs
= DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET
,
201 .context_offs
= DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET
,
202 .modulemode
= MODULEMODE_SWCTRL
,
212 static struct omap_hwmod_class dra7xx_bb2d_hwmod_class
= {
217 static struct omap_hwmod dra7xx_bb2d_hwmod
= {
219 .class = &dra7xx_bb2d_hwmod_class
,
220 .clkdm_name
= "dss_clkdm",
221 .main_clk
= "dpll_core_h24x2_ck",
224 .clkctrl_offs
= DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET
,
225 .context_offs
= DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET
,
226 .modulemode
= MODULEMODE_SWCTRL
,
236 static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc
= {
239 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
240 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
242 .sysc_fields
= &omap_hwmod_sysc_type1
,
245 static struct omap_hwmod_class dra7xx_counter_hwmod_class
= {
247 .sysc
= &dra7xx_counter_sysc
,
251 static struct omap_hwmod dra7xx_counter_32k_hwmod
= {
252 .name
= "counter_32k",
253 .class = &dra7xx_counter_hwmod_class
,
254 .clkdm_name
= "wkupaon_clkdm",
255 .flags
= HWMOD_SWSUP_SIDLE
,
256 .main_clk
= "wkupaon_iclk_mux",
259 .clkctrl_offs
= DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET
,
260 .context_offs
= DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET
,
266 * 'ctrl_module' class
270 static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class
= {
271 .name
= "ctrl_module",
274 /* ctrl_module_wkup */
275 static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod
= {
276 .name
= "ctrl_module_wkup",
277 .class = &dra7xx_ctrl_module_hwmod_class
,
278 .clkdm_name
= "wkupaon_clkdm",
281 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
291 static struct omap_hwmod_class dra7xx_dcan_hwmod_class
= {
296 static struct omap_hwmod dra7xx_dcan1_hwmod
= {
298 .class = &dra7xx_dcan_hwmod_class
,
299 .clkdm_name
= "wkupaon_clkdm",
300 .main_clk
= "dcan1_sys_clk_mux",
301 .flags
= HWMOD_CLKDM_NOAUTO
,
304 .clkctrl_offs
= DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET
,
305 .context_offs
= DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET
,
306 .modulemode
= MODULEMODE_SWCTRL
,
312 static struct omap_hwmod dra7xx_dcan2_hwmod
= {
314 .class = &dra7xx_dcan_hwmod_class
,
315 .clkdm_name
= "l4per2_clkdm",
316 .main_clk
= "sys_clkin1",
317 .flags
= HWMOD_CLKDM_NOAUTO
,
320 .clkctrl_offs
= DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET
,
321 .context_offs
= DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET
,
322 .modulemode
= MODULEMODE_SWCTRL
,
328 static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc
= {
331 .sysc_flags
= SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
332 SYSC_HAS_RESET_STATUS
,
333 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
334 .sysc_fields
= &omap_hwmod_sysc_type2
,
340 static struct omap_hwmod_class dra7xx_epwmss_hwmod_class
= {
342 .sysc
= &dra7xx_epwmss_sysc
,
346 static struct omap_hwmod dra7xx_epwmss0_hwmod
= {
348 .class = &dra7xx_epwmss_hwmod_class
,
349 .clkdm_name
= "l4per2_clkdm",
350 .main_clk
= "l4_root_clk_div",
353 .modulemode
= MODULEMODE_SWCTRL
,
354 .clkctrl_offs
= DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET
,
355 .context_offs
= DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET
,
361 static struct omap_hwmod dra7xx_epwmss1_hwmod
= {
363 .class = &dra7xx_epwmss_hwmod_class
,
364 .clkdm_name
= "l4per2_clkdm",
365 .main_clk
= "l4_root_clk_div",
368 .modulemode
= MODULEMODE_SWCTRL
,
369 .clkctrl_offs
= DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET
,
370 .context_offs
= DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET
,
376 static struct omap_hwmod dra7xx_epwmss2_hwmod
= {
378 .class = &dra7xx_epwmss_hwmod_class
,
379 .clkdm_name
= "l4per2_clkdm",
380 .main_clk
= "l4_root_clk_div",
383 .modulemode
= MODULEMODE_SWCTRL
,
384 .clkctrl_offs
= DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET
,
385 .context_offs
= DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET
,
395 static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc
= {
399 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
400 SYSC_HAS_EMUFREE
| SYSC_HAS_MIDLEMODE
|
401 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
402 SYSS_HAS_RESET_STATUS
),
403 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
404 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
405 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
406 .sysc_fields
= &omap_hwmod_sysc_type1
,
409 static struct omap_hwmod_class dra7xx_dma_hwmod_class
= {
411 .sysc
= &dra7xx_dma_sysc
,
415 static struct omap_dma_dev_attr dma_dev_attr
= {
416 .dev_caps
= RESERVE_CHANNEL
| DMA_LINKED_LCH
| GLOBAL_PRIORITY
|
417 IS_CSSA_32
| IS_CDSA_32
| IS_RW_PRIORITY
,
422 static struct omap_hwmod dra7xx_dma_system_hwmod
= {
423 .name
= "dma_system",
424 .class = &dra7xx_dma_hwmod_class
,
425 .clkdm_name
= "dma_clkdm",
426 .main_clk
= "l3_iclk_div",
429 .clkctrl_offs
= DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET
,
430 .context_offs
= DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET
,
433 .dev_attr
= &dma_dev_attr
,
440 static struct omap_hwmod_class dra7xx_tpcc_hwmod_class
= {
444 static struct omap_hwmod dra7xx_tpcc_hwmod
= {
446 .class = &dra7xx_tpcc_hwmod_class
,
447 .clkdm_name
= "l3main1_clkdm",
448 .main_clk
= "l3_iclk_div",
451 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET
,
452 .context_offs
= DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET
,
461 static struct omap_hwmod_class dra7xx_tptc_hwmod_class
= {
466 static struct omap_hwmod dra7xx_tptc0_hwmod
= {
468 .class = &dra7xx_tptc_hwmod_class
,
469 .clkdm_name
= "l3main1_clkdm",
470 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
471 .main_clk
= "l3_iclk_div",
474 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET
,
475 .context_offs
= DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET
,
476 .modulemode
= MODULEMODE_HWCTRL
,
482 static struct omap_hwmod dra7xx_tptc1_hwmod
= {
484 .class = &dra7xx_tptc_hwmod_class
,
485 .clkdm_name
= "l3main1_clkdm",
486 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
487 .main_clk
= "l3_iclk_div",
490 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET
,
491 .context_offs
= DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET
,
492 .modulemode
= MODULEMODE_HWCTRL
,
502 static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc
= {
505 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
508 static struct omap_hwmod_class dra7xx_dss_hwmod_class
= {
510 .sysc
= &dra7xx_dss_sysc
,
511 .reset
= omap_dss_reset
,
515 static struct omap_hwmod_opt_clk dss_opt_clks
[] = {
516 { .role
= "dss_clk", .clk
= "dss_dss_clk" },
517 { .role
= "hdmi_phy_clk", .clk
= "dss_48mhz_clk" },
518 { .role
= "32khz_clk", .clk
= "dss_32khz_clk" },
519 { .role
= "video2_clk", .clk
= "dss_video2_clk" },
520 { .role
= "video1_clk", .clk
= "dss_video1_clk" },
521 { .role
= "hdmi_clk", .clk
= "dss_hdmi_clk" },
522 { .role
= "hdcp_clk", .clk
= "dss_deshdcp_clk" },
525 static struct omap_hwmod dra7xx_dss_hwmod
= {
527 .class = &dra7xx_dss_hwmod_class
,
528 .clkdm_name
= "dss_clkdm",
529 .flags
= HWMOD_CONTROL_OPT_CLKS_IN_RESET
,
530 .main_clk
= "dss_dss_clk",
533 .clkctrl_offs
= DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET
,
534 .context_offs
= DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET
,
535 .modulemode
= MODULEMODE_SWCTRL
,
538 .opt_clks
= dss_opt_clks
,
539 .opt_clks_cnt
= ARRAY_SIZE(dss_opt_clks
),
547 static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc
= {
551 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
552 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_MIDLEMODE
|
553 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
554 SYSS_HAS_RESET_STATUS
),
555 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
556 MSTANDBY_FORCE
| MSTANDBY_NO
| MSTANDBY_SMART
),
557 .sysc_fields
= &omap_hwmod_sysc_type1
,
560 static struct omap_hwmod_class dra7xx_dispc_hwmod_class
= {
562 .sysc
= &dra7xx_dispc_sysc
,
566 /* dss_dispc dev_attr */
567 static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr
= {
568 .has_framedonetv_irq
= 1,
572 static struct omap_hwmod dra7xx_dss_dispc_hwmod
= {
574 .class = &dra7xx_dispc_hwmod_class
,
575 .clkdm_name
= "dss_clkdm",
576 .main_clk
= "dss_dss_clk",
579 .clkctrl_offs
= DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET
,
580 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
583 .dev_attr
= &dss_dispc_dev_attr
,
584 .parent_hwmod
= &dra7xx_dss_hwmod
,
592 static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc
= {
595 .sysc_flags
= (SYSC_HAS_RESET_STATUS
| SYSC_HAS_SIDLEMODE
|
597 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
599 .sysc_fields
= &omap_hwmod_sysc_type2
,
602 static struct omap_hwmod_class dra7xx_hdmi_hwmod_class
= {
604 .sysc
= &dra7xx_hdmi_sysc
,
609 static struct omap_hwmod_opt_clk dss_hdmi_opt_clks
[] = {
610 { .role
= "sys_clk", .clk
= "dss_hdmi_clk" },
613 static struct omap_hwmod dra7xx_dss_hdmi_hwmod
= {
615 .class = &dra7xx_hdmi_hwmod_class
,
616 .clkdm_name
= "dss_clkdm",
617 .main_clk
= "dss_48mhz_clk",
620 .clkctrl_offs
= DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET
,
621 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
624 .opt_clks
= dss_hdmi_opt_clks
,
625 .opt_clks_cnt
= ARRAY_SIZE(dss_hdmi_opt_clks
),
626 .parent_hwmod
= &dra7xx_dss_hwmod
,
629 /* AES (the 'P' (public) device) */
630 static struct omap_hwmod_class_sysconfig dra7xx_aes_sysc
= {
634 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
637 static struct omap_hwmod_class dra7xx_aes_hwmod_class
= {
639 .sysc
= &dra7xx_aes_sysc
,
643 static struct omap_hwmod dra7xx_aes1_hwmod
= {
645 .class = &dra7xx_aes_hwmod_class
,
646 .clkdm_name
= "l4sec_clkdm",
647 .main_clk
= "l3_iclk_div",
650 .clkctrl_offs
= DRA7XX_CM_L4SEC_AES1_CLKCTRL_OFFSET
,
651 .context_offs
= DRA7XX_RM_L4SEC_AES1_CONTEXT_OFFSET
,
652 .modulemode
= MODULEMODE_HWCTRL
,
658 static struct omap_hwmod dra7xx_aes2_hwmod
= {
660 .class = &dra7xx_aes_hwmod_class
,
661 .clkdm_name
= "l4sec_clkdm",
662 .main_clk
= "l3_iclk_div",
665 .clkctrl_offs
= DRA7XX_CM_L4SEC_AES2_CLKCTRL_OFFSET
,
666 .context_offs
= DRA7XX_RM_L4SEC_AES2_CONTEXT_OFFSET
,
667 .modulemode
= MODULEMODE_HWCTRL
,
672 /* sha0 HIB2 (the 'P' (public) device) */
673 static struct omap_hwmod_class_sysconfig dra7xx_sha0_sysc
= {
677 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
680 static struct omap_hwmod_class dra7xx_sha0_hwmod_class
= {
682 .sysc
= &dra7xx_sha0_sysc
,
685 static struct omap_hwmod dra7xx_sha0_hwmod
= {
687 .class = &dra7xx_sha0_hwmod_class
,
688 .clkdm_name
= "l4sec_clkdm",
689 .main_clk
= "l3_iclk_div",
692 .clkctrl_offs
= DRA7XX_CM_L4SEC_SHA2MD51_CLKCTRL_OFFSET
,
693 .context_offs
= DRA7XX_RM_L4SEC_SHA2MD51_CONTEXT_OFFSET
,
694 .modulemode
= MODULEMODE_HWCTRL
,
704 static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc
= {
708 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_CLOCKACTIVITY
|
709 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
710 SYSS_HAS_RESET_STATUS
),
711 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
713 .sysc_fields
= &omap_hwmod_sysc_type1
,
716 static struct omap_hwmod_class dra7xx_elm_hwmod_class
= {
718 .sysc
= &dra7xx_elm_sysc
,
723 static struct omap_hwmod dra7xx_elm_hwmod
= {
725 .class = &dra7xx_elm_hwmod_class
,
726 .clkdm_name
= "l4per_clkdm",
727 .main_clk
= "l3_iclk_div",
730 .clkctrl_offs
= DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET
,
731 .context_offs
= DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET
,
741 static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc
= {
745 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
746 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
747 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
748 .sysc_fields
= &omap_hwmod_sysc_type1
,
751 static struct omap_hwmod_class dra7xx_gpmc_hwmod_class
= {
753 .sysc
= &dra7xx_gpmc_sysc
,
758 static struct omap_hwmod dra7xx_gpmc_hwmod
= {
760 .class = &dra7xx_gpmc_hwmod_class
,
761 .clkdm_name
= "l3main1_clkdm",
762 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
763 .flags
= DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
764 .main_clk
= "l3_iclk_div",
767 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET
,
768 .context_offs
= DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET
,
769 .modulemode
= MODULEMODE_HWCTRL
,
781 static struct omap_hwmod_class dra7xx_mpu_hwmod_class
= {
786 static struct omap_hwmod dra7xx_mpu_hwmod
= {
788 .class = &dra7xx_mpu_hwmod_class
,
789 .clkdm_name
= "mpu_clkdm",
790 .flags
= HWMOD_INIT_NO_IDLE
| HWMOD_INIT_NO_RESET
,
791 .main_clk
= "dpll_mpu_m2_ck",
794 .clkctrl_offs
= DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET
,
795 .context_offs
= DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET
,
805 static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc
= {
809 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
810 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
811 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
812 .sysc_fields
= &omap_hwmod_sysc_type1
,
815 static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class
= {
817 .sysc
= &dra7xx_ocp2scp_sysc
,
821 static struct omap_hwmod dra7xx_ocp2scp1_hwmod
= {
823 .class = &dra7xx_ocp2scp_hwmod_class
,
824 .clkdm_name
= "l3init_clkdm",
825 .main_clk
= "l4_root_clk_div",
828 .clkctrl_offs
= DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET
,
829 .context_offs
= DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET
,
830 .modulemode
= MODULEMODE_HWCTRL
,
836 static struct omap_hwmod dra7xx_ocp2scp3_hwmod
= {
838 .class = &dra7xx_ocp2scp_hwmod_class
,
839 .clkdm_name
= "l3init_clkdm",
840 .main_clk
= "l4_root_clk_div",
843 .clkctrl_offs
= DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET
,
844 .context_offs
= DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET
,
845 .modulemode
= MODULEMODE_HWCTRL
,
856 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
857 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
858 * associated with an IP automatically leaving the driver to handle that
859 * by itself. This does not work for PCIeSS which needs the reset lines
860 * deasserted for the driver to start accessing registers.
862 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
863 * lines after asserting them.
865 int dra7xx_pciess_reset(struct omap_hwmod
*oh
)
869 for (i
= 0; i
< oh
->rst_lines_cnt
; i
++) {
870 omap_hwmod_assert_hardreset(oh
, oh
->rst_lines
[i
].name
);
871 omap_hwmod_deassert_hardreset(oh
, oh
->rst_lines
[i
].name
);
877 static struct omap_hwmod_class dra7xx_pciess_hwmod_class
= {
879 .reset
= dra7xx_pciess_reset
,
883 static struct omap_hwmod_rst_info dra7xx_pciess1_resets
[] = {
884 { .name
= "pcie", .rst_shift
= 0 },
887 static struct omap_hwmod dra7xx_pciess1_hwmod
= {
889 .class = &dra7xx_pciess_hwmod_class
,
890 .clkdm_name
= "pcie_clkdm",
891 .rst_lines
= dra7xx_pciess1_resets
,
892 .rst_lines_cnt
= ARRAY_SIZE(dra7xx_pciess1_resets
),
893 .main_clk
= "l4_root_clk_div",
896 .clkctrl_offs
= DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET
,
897 .rstctrl_offs
= DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET
,
898 .context_offs
= DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET
,
899 .modulemode
= MODULEMODE_SWCTRL
,
905 static struct omap_hwmod_rst_info dra7xx_pciess2_resets
[] = {
906 { .name
= "pcie", .rst_shift
= 1 },
910 static struct omap_hwmod dra7xx_pciess2_hwmod
= {
912 .class = &dra7xx_pciess_hwmod_class
,
913 .clkdm_name
= "pcie_clkdm",
914 .rst_lines
= dra7xx_pciess2_resets
,
915 .rst_lines_cnt
= ARRAY_SIZE(dra7xx_pciess2_resets
),
916 .main_clk
= "l4_root_clk_div",
919 .clkctrl_offs
= DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET
,
920 .rstctrl_offs
= DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET
,
921 .context_offs
= DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET
,
922 .modulemode
= MODULEMODE_SWCTRL
,
932 static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc
= {
935 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
936 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
938 .sysc_fields
= &omap_hwmod_sysc_type2
,
941 static struct omap_hwmod_class dra7xx_qspi_hwmod_class
= {
943 .sysc
= &dra7xx_qspi_sysc
,
947 static struct omap_hwmod dra7xx_qspi_hwmod
= {
949 .class = &dra7xx_qspi_hwmod_class
,
950 .clkdm_name
= "l4per2_clkdm",
951 .main_clk
= "qspi_gfclk_div",
954 .clkctrl_offs
= DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET
,
955 .context_offs
= DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET
,
956 .modulemode
= MODULEMODE_SWCTRL
,
965 static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc
= {
968 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
969 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
971 .sysc_fields
= &omap_hwmod_sysc_type3
,
974 static struct omap_hwmod_class dra7xx_rtcss_hwmod_class
= {
976 .sysc
= &dra7xx_rtcss_sysc
,
977 .unlock
= &omap_hwmod_rtc_unlock
,
978 .lock
= &omap_hwmod_rtc_lock
,
982 static struct omap_hwmod dra7xx_rtcss_hwmod
= {
984 .class = &dra7xx_rtcss_hwmod_class
,
985 .clkdm_name
= "rtc_clkdm",
986 .main_clk
= "sys_32k_ck",
989 .clkctrl_offs
= DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET
,
990 .context_offs
= DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET
,
991 .modulemode
= MODULEMODE_SWCTRL
,
1001 static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc
= {
1003 .sysc_offs
= 0x0000,
1004 .sysc_flags
= (SYSC_HAS_MIDLEMODE
| SYSC_HAS_SIDLEMODE
),
1005 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1006 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
1007 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
1008 .sysc_fields
= &omap_hwmod_sysc_type2
,
1011 static struct omap_hwmod_class dra7xx_sata_hwmod_class
= {
1013 .sysc
= &dra7xx_sata_sysc
,
1018 static struct omap_hwmod dra7xx_sata_hwmod
= {
1020 .class = &dra7xx_sata_hwmod_class
,
1021 .clkdm_name
= "l3init_clkdm",
1022 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
1023 .main_clk
= "func_48m_fclk",
1027 .clkctrl_offs
= DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET
,
1028 .context_offs
= DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET
,
1029 .modulemode
= MODULEMODE_SWCTRL
,
1035 * 'smartreflex' class
1039 /* The IP is not compliant to type1 / type2 scheme */
1040 static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc
= {
1041 .rev_offs
= -ENODEV
,
1042 .sysc_offs
= 0x0038,
1043 .sysc_flags
= (SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
),
1044 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1046 .sysc_fields
= &omap36xx_sr_sysc_fields
,
1049 static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class
= {
1050 .name
= "smartreflex",
1051 .sysc
= &dra7xx_smartreflex_sysc
,
1054 /* smartreflex_core */
1055 /* smartreflex_core dev_attr */
1056 static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr
= {
1057 .sensor_voltdm_name
= "core",
1060 static struct omap_hwmod dra7xx_smartreflex_core_hwmod
= {
1061 .name
= "smartreflex_core",
1062 .class = &dra7xx_smartreflex_hwmod_class
,
1063 .clkdm_name
= "coreaon_clkdm",
1064 .main_clk
= "wkupaon_iclk_mux",
1067 .clkctrl_offs
= DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET
,
1068 .context_offs
= DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET
,
1069 .modulemode
= MODULEMODE_SWCTRL
,
1072 .dev_attr
= &smartreflex_core_dev_attr
,
1075 /* smartreflex_mpu */
1076 /* smartreflex_mpu dev_attr */
1077 static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr
= {
1078 .sensor_voltdm_name
= "mpu",
1081 static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod
= {
1082 .name
= "smartreflex_mpu",
1083 .class = &dra7xx_smartreflex_hwmod_class
,
1084 .clkdm_name
= "coreaon_clkdm",
1085 .main_clk
= "wkupaon_iclk_mux",
1088 .clkctrl_offs
= DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET
,
1089 .context_offs
= DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET
,
1090 .modulemode
= MODULEMODE_SWCTRL
,
1093 .dev_attr
= &smartreflex_mpu_dev_attr
,
1101 static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc
= {
1103 .sysc_offs
= 0x0010,
1104 .syss_offs
= 0x0014,
1105 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_ENAWAKEUP
|
1106 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
1107 SYSS_HAS_RESET_STATUS
),
1108 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
1109 .sysc_fields
= &omap_hwmod_sysc_type1
,
1112 static struct omap_hwmod_class dra7xx_spinlock_hwmod_class
= {
1114 .sysc
= &dra7xx_spinlock_sysc
,
1118 static struct omap_hwmod dra7xx_spinlock_hwmod
= {
1120 .class = &dra7xx_spinlock_hwmod_class
,
1121 .clkdm_name
= "l4cfg_clkdm",
1122 .main_clk
= "l3_iclk_div",
1125 .clkctrl_offs
= DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET
,
1126 .context_offs
= DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET
,
1134 * This class contains several variants: ['timer_1ms', 'timer_secure',
1138 static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc
= {
1140 .sysc_offs
= 0x0010,
1141 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_RESET_STATUS
|
1142 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
1143 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1145 .sysc_fields
= &omap_hwmod_sysc_type2
,
1148 static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class
= {
1150 .sysc
= &dra7xx_timer_1ms_sysc
,
1153 static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc
= {
1155 .sysc_offs
= 0x0010,
1156 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_RESET_STATUS
|
1157 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
1158 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1160 .sysc_fields
= &omap_hwmod_sysc_type2
,
1163 static struct omap_hwmod_class dra7xx_timer_hwmod_class
= {
1165 .sysc
= &dra7xx_timer_sysc
,
1169 static struct omap_hwmod dra7xx_timer1_hwmod
= {
1171 .class = &dra7xx_timer_1ms_hwmod_class
,
1172 .clkdm_name
= "wkupaon_clkdm",
1173 .main_clk
= "timer1_gfclk_mux",
1176 .clkctrl_offs
= DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET
,
1177 .context_offs
= DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET
,
1178 .modulemode
= MODULEMODE_SWCTRL
,
1184 static struct omap_hwmod dra7xx_timer2_hwmod
= {
1186 .class = &dra7xx_timer_1ms_hwmod_class
,
1187 .clkdm_name
= "l4per_clkdm",
1188 .main_clk
= "timer2_gfclk_mux",
1191 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET
,
1192 .context_offs
= DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET
,
1193 .modulemode
= MODULEMODE_SWCTRL
,
1199 static struct omap_hwmod dra7xx_timer3_hwmod
= {
1201 .class = &dra7xx_timer_hwmod_class
,
1202 .clkdm_name
= "l4per_clkdm",
1203 .main_clk
= "timer3_gfclk_mux",
1206 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET
,
1207 .context_offs
= DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET
,
1208 .modulemode
= MODULEMODE_SWCTRL
,
1214 static struct omap_hwmod dra7xx_timer4_hwmod
= {
1216 .class = &dra7xx_timer_hwmod_class
,
1217 .clkdm_name
= "l4per_clkdm",
1218 .main_clk
= "timer4_gfclk_mux",
1221 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET
,
1222 .context_offs
= DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET
,
1223 .modulemode
= MODULEMODE_SWCTRL
,
1229 static struct omap_hwmod dra7xx_timer5_hwmod
= {
1231 .class = &dra7xx_timer_hwmod_class
,
1232 .clkdm_name
= "ipu_clkdm",
1233 .main_clk
= "timer5_gfclk_mux",
1236 .clkctrl_offs
= DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET
,
1237 .context_offs
= DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET
,
1238 .modulemode
= MODULEMODE_SWCTRL
,
1244 static struct omap_hwmod dra7xx_timer6_hwmod
= {
1246 .class = &dra7xx_timer_hwmod_class
,
1247 .clkdm_name
= "ipu_clkdm",
1248 .main_clk
= "timer6_gfclk_mux",
1251 .clkctrl_offs
= DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET
,
1252 .context_offs
= DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET
,
1253 .modulemode
= MODULEMODE_SWCTRL
,
1259 static struct omap_hwmod dra7xx_timer7_hwmod
= {
1261 .class = &dra7xx_timer_hwmod_class
,
1262 .clkdm_name
= "ipu_clkdm",
1263 .main_clk
= "timer7_gfclk_mux",
1266 .clkctrl_offs
= DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET
,
1267 .context_offs
= DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET
,
1268 .modulemode
= MODULEMODE_SWCTRL
,
1274 static struct omap_hwmod dra7xx_timer8_hwmod
= {
1276 .class = &dra7xx_timer_hwmod_class
,
1277 .clkdm_name
= "ipu_clkdm",
1278 .main_clk
= "timer8_gfclk_mux",
1281 .clkctrl_offs
= DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET
,
1282 .context_offs
= DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET
,
1283 .modulemode
= MODULEMODE_SWCTRL
,
1289 static struct omap_hwmod dra7xx_timer9_hwmod
= {
1291 .class = &dra7xx_timer_hwmod_class
,
1292 .clkdm_name
= "l4per_clkdm",
1293 .main_clk
= "timer9_gfclk_mux",
1296 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET
,
1297 .context_offs
= DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET
,
1298 .modulemode
= MODULEMODE_SWCTRL
,
1304 static struct omap_hwmod dra7xx_timer10_hwmod
= {
1306 .class = &dra7xx_timer_1ms_hwmod_class
,
1307 .clkdm_name
= "l4per_clkdm",
1308 .main_clk
= "timer10_gfclk_mux",
1311 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET
,
1312 .context_offs
= DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET
,
1313 .modulemode
= MODULEMODE_SWCTRL
,
1319 static struct omap_hwmod dra7xx_timer11_hwmod
= {
1321 .class = &dra7xx_timer_hwmod_class
,
1322 .clkdm_name
= "l4per_clkdm",
1323 .main_clk
= "timer11_gfclk_mux",
1326 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET
,
1327 .context_offs
= DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET
,
1328 .modulemode
= MODULEMODE_SWCTRL
,
1334 static struct omap_hwmod dra7xx_timer12_hwmod
= {
1336 .class = &dra7xx_timer_hwmod_class
,
1337 .clkdm_name
= "wkupaon_clkdm",
1338 .main_clk
= "secure_32k_clk_src_ck",
1341 .clkctrl_offs
= DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET
,
1342 .context_offs
= DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET
,
1348 static struct omap_hwmod dra7xx_timer13_hwmod
= {
1350 .class = &dra7xx_timer_hwmod_class
,
1351 .clkdm_name
= "l4per3_clkdm",
1352 .main_clk
= "timer13_gfclk_mux",
1355 .clkctrl_offs
= DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET
,
1356 .context_offs
= DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET
,
1357 .modulemode
= MODULEMODE_SWCTRL
,
1363 static struct omap_hwmod dra7xx_timer14_hwmod
= {
1365 .class = &dra7xx_timer_hwmod_class
,
1366 .clkdm_name
= "l4per3_clkdm",
1367 .main_clk
= "timer14_gfclk_mux",
1370 .clkctrl_offs
= DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET
,
1371 .context_offs
= DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET
,
1372 .modulemode
= MODULEMODE_SWCTRL
,
1378 static struct omap_hwmod dra7xx_timer15_hwmod
= {
1380 .class = &dra7xx_timer_hwmod_class
,
1381 .clkdm_name
= "l4per3_clkdm",
1382 .main_clk
= "timer15_gfclk_mux",
1385 .clkctrl_offs
= DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET
,
1386 .context_offs
= DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET
,
1387 .modulemode
= MODULEMODE_SWCTRL
,
1393 static struct omap_hwmod dra7xx_timer16_hwmod
= {
1395 .class = &dra7xx_timer_hwmod_class
,
1396 .clkdm_name
= "l4per3_clkdm",
1397 .main_clk
= "timer16_gfclk_mux",
1400 .clkctrl_offs
= DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET
,
1401 .context_offs
= DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET
,
1402 .modulemode
= MODULEMODE_SWCTRL
,
1407 /* DES (the 'P' (public) device) */
1408 static struct omap_hwmod_class_sysconfig dra7xx_des_sysc
= {
1410 .sysc_offs
= 0x0034,
1411 .syss_offs
= 0x0038,
1412 .sysc_flags
= SYSS_HAS_RESET_STATUS
,
1415 static struct omap_hwmod_class dra7xx_des_hwmod_class
= {
1417 .sysc
= &dra7xx_des_sysc
,
1421 static struct omap_hwmod dra7xx_des_hwmod
= {
1423 .class = &dra7xx_des_hwmod_class
,
1424 .clkdm_name
= "l4sec_clkdm",
1425 .main_clk
= "l3_iclk_div",
1428 .clkctrl_offs
= DRA7XX_CM_L4SEC_DES3DES_CLKCTRL_OFFSET
,
1429 .context_offs
= DRA7XX_RM_L4SEC_DES3DES_CONTEXT_OFFSET
,
1430 .modulemode
= MODULEMODE_HWCTRL
,
1436 * 'usb_otg_ss' class
1440 static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc
= {
1442 .sysc_offs
= 0x0010,
1443 .sysc_flags
= (SYSC_HAS_DMADISABLE
| SYSC_HAS_MIDLEMODE
|
1444 SYSC_HAS_SIDLEMODE
),
1445 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
1446 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
1447 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
1448 .sysc_fields
= &omap_hwmod_sysc_type2
,
1451 static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class
= {
1452 .name
= "usb_otg_ss",
1453 .sysc
= &dra7xx_usb_otg_ss_sysc
,
1457 static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks
[] = {
1458 { .role
= "refclk960m", .clk
= "usb_otg_ss1_refclk960m" },
1461 static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod
= {
1462 .name
= "usb_otg_ss1",
1463 .class = &dra7xx_usb_otg_ss_hwmod_class
,
1464 .clkdm_name
= "l3init_clkdm",
1465 .main_clk
= "dpll_core_h13x2_ck",
1466 .flags
= HWMOD_CLKDM_NOAUTO
,
1469 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET
,
1470 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET
,
1471 .modulemode
= MODULEMODE_HWCTRL
,
1474 .opt_clks
= usb_otg_ss1_opt_clks
,
1475 .opt_clks_cnt
= ARRAY_SIZE(usb_otg_ss1_opt_clks
),
1479 static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks
[] = {
1480 { .role
= "refclk960m", .clk
= "usb_otg_ss2_refclk960m" },
1483 static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod
= {
1484 .name
= "usb_otg_ss2",
1485 .class = &dra7xx_usb_otg_ss_hwmod_class
,
1486 .clkdm_name
= "l3init_clkdm",
1487 .main_clk
= "dpll_core_h13x2_ck",
1488 .flags
= HWMOD_CLKDM_NOAUTO
,
1491 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET
,
1492 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET
,
1493 .modulemode
= MODULEMODE_HWCTRL
,
1496 .opt_clks
= usb_otg_ss2_opt_clks
,
1497 .opt_clks_cnt
= ARRAY_SIZE(usb_otg_ss2_opt_clks
),
1501 static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod
= {
1502 .name
= "usb_otg_ss3",
1503 .class = &dra7xx_usb_otg_ss_hwmod_class
,
1504 .clkdm_name
= "l3init_clkdm",
1505 .main_clk
= "dpll_core_h13x2_ck",
1508 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET
,
1509 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET
,
1510 .modulemode
= MODULEMODE_HWCTRL
,
1516 static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod
= {
1517 .name
= "usb_otg_ss4",
1518 .class = &dra7xx_usb_otg_ss_hwmod_class
,
1519 .clkdm_name
= "l3init_clkdm",
1520 .main_clk
= "dpll_core_h13x2_ck",
1523 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET
,
1524 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET
,
1525 .modulemode
= MODULEMODE_HWCTRL
,
1535 static struct omap_hwmod_class dra7xx_vcp_hwmod_class
= {
1540 static struct omap_hwmod dra7xx_vcp1_hwmod
= {
1542 .class = &dra7xx_vcp_hwmod_class
,
1543 .clkdm_name
= "l3main1_clkdm",
1544 .main_clk
= "l3_iclk_div",
1547 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET
,
1548 .context_offs
= DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET
,
1554 static struct omap_hwmod dra7xx_vcp2_hwmod
= {
1556 .class = &dra7xx_vcp_hwmod_class
,
1557 .clkdm_name
= "l3main1_clkdm",
1558 .main_clk
= "l3_iclk_div",
1561 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET
,
1562 .context_offs
= DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET
,
1573 /* l3_main_1 -> dmm */
1574 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm
= {
1575 .master
= &dra7xx_l3_main_1_hwmod
,
1576 .slave
= &dra7xx_dmm_hwmod
,
1577 .clk
= "l3_iclk_div",
1578 .user
= OCP_USER_SDMA
,
1581 /* l3_main_2 -> l3_instr */
1582 static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr
= {
1583 .master
= &dra7xx_l3_main_2_hwmod
,
1584 .slave
= &dra7xx_l3_instr_hwmod
,
1585 .clk
= "l3_iclk_div",
1586 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1589 /* l4_cfg -> l3_main_1 */
1590 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1
= {
1591 .master
= &dra7xx_l4_cfg_hwmod
,
1592 .slave
= &dra7xx_l3_main_1_hwmod
,
1593 .clk
= "l3_iclk_div",
1594 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1597 /* mpu -> l3_main_1 */
1598 static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1
= {
1599 .master
= &dra7xx_mpu_hwmod
,
1600 .slave
= &dra7xx_l3_main_1_hwmod
,
1601 .clk
= "l3_iclk_div",
1602 .user
= OCP_USER_MPU
,
1605 /* l3_main_1 -> l3_main_2 */
1606 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2
= {
1607 .master
= &dra7xx_l3_main_1_hwmod
,
1608 .slave
= &dra7xx_l3_main_2_hwmod
,
1609 .clk
= "l3_iclk_div",
1610 .user
= OCP_USER_MPU
,
1613 /* l4_cfg -> l3_main_2 */
1614 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2
= {
1615 .master
= &dra7xx_l4_cfg_hwmod
,
1616 .slave
= &dra7xx_l3_main_2_hwmod
,
1617 .clk
= "l3_iclk_div",
1618 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1621 /* l3_main_1 -> l4_cfg */
1622 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg
= {
1623 .master
= &dra7xx_l3_main_1_hwmod
,
1624 .slave
= &dra7xx_l4_cfg_hwmod
,
1625 .clk
= "l3_iclk_div",
1626 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1629 /* l3_main_1 -> l4_per1 */
1630 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1
= {
1631 .master
= &dra7xx_l3_main_1_hwmod
,
1632 .slave
= &dra7xx_l4_per1_hwmod
,
1633 .clk
= "l3_iclk_div",
1634 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1637 /* l3_main_1 -> l4_per2 */
1638 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2
= {
1639 .master
= &dra7xx_l3_main_1_hwmod
,
1640 .slave
= &dra7xx_l4_per2_hwmod
,
1641 .clk
= "l3_iclk_div",
1642 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1645 /* l3_main_1 -> l4_per3 */
1646 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3
= {
1647 .master
= &dra7xx_l3_main_1_hwmod
,
1648 .slave
= &dra7xx_l4_per3_hwmod
,
1649 .clk
= "l3_iclk_div",
1650 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1653 /* l3_main_1 -> l4_wkup */
1654 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup
= {
1655 .master
= &dra7xx_l3_main_1_hwmod
,
1656 .slave
= &dra7xx_l4_wkup_hwmod
,
1657 .clk
= "wkupaon_iclk_mux",
1658 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1661 /* l4_per2 -> atl */
1662 static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl
= {
1663 .master
= &dra7xx_l4_per2_hwmod
,
1664 .slave
= &dra7xx_atl_hwmod
,
1665 .clk
= "l3_iclk_div",
1666 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1669 /* l3_main_1 -> bb2d */
1670 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d
= {
1671 .master
= &dra7xx_l3_main_1_hwmod
,
1672 .slave
= &dra7xx_bb2d_hwmod
,
1673 .clk
= "l3_iclk_div",
1674 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1677 /* l4_wkup -> counter_32k */
1678 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k
= {
1679 .master
= &dra7xx_l4_wkup_hwmod
,
1680 .slave
= &dra7xx_counter_32k_hwmod
,
1681 .clk
= "wkupaon_iclk_mux",
1682 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1685 /* l4_wkup -> ctrl_module_wkup */
1686 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup
= {
1687 .master
= &dra7xx_l4_wkup_hwmod
,
1688 .slave
= &dra7xx_ctrl_module_wkup_hwmod
,
1689 .clk
= "wkupaon_iclk_mux",
1690 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1693 /* l4_wkup -> dcan1 */
1694 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1
= {
1695 .master
= &dra7xx_l4_wkup_hwmod
,
1696 .slave
= &dra7xx_dcan1_hwmod
,
1697 .clk
= "wkupaon_iclk_mux",
1698 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1701 /* l4_per2 -> dcan2 */
1702 static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2
= {
1703 .master
= &dra7xx_l4_per2_hwmod
,
1704 .slave
= &dra7xx_dcan2_hwmod
,
1705 .clk
= "l3_iclk_div",
1706 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1709 /* l4_cfg -> dma_system */
1710 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system
= {
1711 .master
= &dra7xx_l4_cfg_hwmod
,
1712 .slave
= &dra7xx_dma_system_hwmod
,
1713 .clk
= "l3_iclk_div",
1714 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1717 /* l3_main_1 -> tpcc */
1718 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc
= {
1719 .master
= &dra7xx_l3_main_1_hwmod
,
1720 .slave
= &dra7xx_tpcc_hwmod
,
1721 .clk
= "l3_iclk_div",
1722 .user
= OCP_USER_MPU
,
1725 /* l3_main_1 -> tptc0 */
1726 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0
= {
1727 .master
= &dra7xx_l3_main_1_hwmod
,
1728 .slave
= &dra7xx_tptc0_hwmod
,
1729 .clk
= "l3_iclk_div",
1730 .user
= OCP_USER_MPU
,
1733 /* l3_main_1 -> tptc1 */
1734 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1
= {
1735 .master
= &dra7xx_l3_main_1_hwmod
,
1736 .slave
= &dra7xx_tptc1_hwmod
,
1737 .clk
= "l3_iclk_div",
1738 .user
= OCP_USER_MPU
,
1741 /* l3_main_1 -> dss */
1742 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss
= {
1743 .master
= &dra7xx_l3_main_1_hwmod
,
1744 .slave
= &dra7xx_dss_hwmod
,
1745 .clk
= "l3_iclk_div",
1746 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1749 /* l3_main_1 -> dispc */
1750 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc
= {
1751 .master
= &dra7xx_l3_main_1_hwmod
,
1752 .slave
= &dra7xx_dss_dispc_hwmod
,
1753 .clk
= "l3_iclk_div",
1754 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1757 /* l3_main_1 -> dispc */
1758 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi
= {
1759 .master
= &dra7xx_l3_main_1_hwmod
,
1760 .slave
= &dra7xx_dss_hdmi_hwmod
,
1761 .clk
= "l3_iclk_div",
1762 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1765 /* l3_main_1 -> aes1 */
1766 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes1
= {
1767 .master
= &dra7xx_l3_main_1_hwmod
,
1768 .slave
= &dra7xx_aes1_hwmod
,
1769 .clk
= "l3_iclk_div",
1770 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1773 /* l3_main_1 -> aes2 */
1774 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__aes2
= {
1775 .master
= &dra7xx_l3_main_1_hwmod
,
1776 .slave
= &dra7xx_aes2_hwmod
,
1777 .clk
= "l3_iclk_div",
1778 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1781 /* l3_main_1 -> sha0 */
1782 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__sha0
= {
1783 .master
= &dra7xx_l3_main_1_hwmod
,
1784 .slave
= &dra7xx_sha0_hwmod
,
1785 .clk
= "l3_iclk_div",
1786 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1789 /* l4_per1 -> elm */
1790 static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm
= {
1791 .master
= &dra7xx_l4_per1_hwmod
,
1792 .slave
= &dra7xx_elm_hwmod
,
1793 .clk
= "l3_iclk_div",
1794 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1797 /* l3_main_1 -> gpmc */
1798 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc
= {
1799 .master
= &dra7xx_l3_main_1_hwmod
,
1800 .slave
= &dra7xx_gpmc_hwmod
,
1801 .clk
= "l3_iclk_div",
1802 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1806 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu
= {
1807 .master
= &dra7xx_l4_cfg_hwmod
,
1808 .slave
= &dra7xx_mpu_hwmod
,
1809 .clk
= "l3_iclk_div",
1810 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1813 /* l4_cfg -> ocp2scp1 */
1814 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1
= {
1815 .master
= &dra7xx_l4_cfg_hwmod
,
1816 .slave
= &dra7xx_ocp2scp1_hwmod
,
1817 .clk
= "l4_root_clk_div",
1818 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1821 /* l4_cfg -> ocp2scp3 */
1822 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3
= {
1823 .master
= &dra7xx_l4_cfg_hwmod
,
1824 .slave
= &dra7xx_ocp2scp3_hwmod
,
1825 .clk
= "l4_root_clk_div",
1826 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1829 /* l3_main_1 -> pciess1 */
1830 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1
= {
1831 .master
= &dra7xx_l3_main_1_hwmod
,
1832 .slave
= &dra7xx_pciess1_hwmod
,
1833 .clk
= "l3_iclk_div",
1834 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1837 /* l4_cfg -> pciess1 */
1838 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1
= {
1839 .master
= &dra7xx_l4_cfg_hwmod
,
1840 .slave
= &dra7xx_pciess1_hwmod
,
1841 .clk
= "l4_root_clk_div",
1842 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1845 /* l3_main_1 -> pciess2 */
1846 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2
= {
1847 .master
= &dra7xx_l3_main_1_hwmod
,
1848 .slave
= &dra7xx_pciess2_hwmod
,
1849 .clk
= "l3_iclk_div",
1850 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1853 /* l4_cfg -> pciess2 */
1854 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2
= {
1855 .master
= &dra7xx_l4_cfg_hwmod
,
1856 .slave
= &dra7xx_pciess2_hwmod
,
1857 .clk
= "l4_root_clk_div",
1858 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1861 /* l3_main_1 -> qspi */
1862 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi
= {
1863 .master
= &dra7xx_l3_main_1_hwmod
,
1864 .slave
= &dra7xx_qspi_hwmod
,
1865 .clk
= "l3_iclk_div",
1866 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1869 /* l4_per3 -> rtcss */
1870 static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss
= {
1871 .master
= &dra7xx_l4_per3_hwmod
,
1872 .slave
= &dra7xx_rtcss_hwmod
,
1873 .clk
= "l4_root_clk_div",
1874 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1877 /* l4_cfg -> sata */
1878 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata
= {
1879 .master
= &dra7xx_l4_cfg_hwmod
,
1880 .slave
= &dra7xx_sata_hwmod
,
1881 .clk
= "l3_iclk_div",
1882 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1885 /* l4_cfg -> smartreflex_core */
1886 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core
= {
1887 .master
= &dra7xx_l4_cfg_hwmod
,
1888 .slave
= &dra7xx_smartreflex_core_hwmod
,
1889 .clk
= "l4_root_clk_div",
1890 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1893 /* l4_cfg -> smartreflex_mpu */
1894 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu
= {
1895 .master
= &dra7xx_l4_cfg_hwmod
,
1896 .slave
= &dra7xx_smartreflex_mpu_hwmod
,
1897 .clk
= "l4_root_clk_div",
1898 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1901 /* l4_cfg -> spinlock */
1902 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock
= {
1903 .master
= &dra7xx_l4_cfg_hwmod
,
1904 .slave
= &dra7xx_spinlock_hwmod
,
1905 .clk
= "l3_iclk_div",
1906 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1909 /* l4_wkup -> timer1 */
1910 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1
= {
1911 .master
= &dra7xx_l4_wkup_hwmod
,
1912 .slave
= &dra7xx_timer1_hwmod
,
1913 .clk
= "wkupaon_iclk_mux",
1914 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1917 /* l4_per1 -> timer2 */
1918 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2
= {
1919 .master
= &dra7xx_l4_per1_hwmod
,
1920 .slave
= &dra7xx_timer2_hwmod
,
1921 .clk
= "l3_iclk_div",
1922 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1925 /* l4_per1 -> timer3 */
1926 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3
= {
1927 .master
= &dra7xx_l4_per1_hwmod
,
1928 .slave
= &dra7xx_timer3_hwmod
,
1929 .clk
= "l3_iclk_div",
1930 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1933 /* l4_per1 -> timer4 */
1934 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4
= {
1935 .master
= &dra7xx_l4_per1_hwmod
,
1936 .slave
= &dra7xx_timer4_hwmod
,
1937 .clk
= "l3_iclk_div",
1938 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1941 /* l4_per3 -> timer5 */
1942 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5
= {
1943 .master
= &dra7xx_l4_per3_hwmod
,
1944 .slave
= &dra7xx_timer5_hwmod
,
1945 .clk
= "l3_iclk_div",
1946 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1949 /* l4_per3 -> timer6 */
1950 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6
= {
1951 .master
= &dra7xx_l4_per3_hwmod
,
1952 .slave
= &dra7xx_timer6_hwmod
,
1953 .clk
= "l3_iclk_div",
1954 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1957 /* l4_per3 -> timer7 */
1958 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7
= {
1959 .master
= &dra7xx_l4_per3_hwmod
,
1960 .slave
= &dra7xx_timer7_hwmod
,
1961 .clk
= "l3_iclk_div",
1962 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1965 /* l4_per3 -> timer8 */
1966 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8
= {
1967 .master
= &dra7xx_l4_per3_hwmod
,
1968 .slave
= &dra7xx_timer8_hwmod
,
1969 .clk
= "l3_iclk_div",
1970 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1973 /* l4_per1 -> timer9 */
1974 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9
= {
1975 .master
= &dra7xx_l4_per1_hwmod
,
1976 .slave
= &dra7xx_timer9_hwmod
,
1977 .clk
= "l3_iclk_div",
1978 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1981 /* l4_per1 -> timer10 */
1982 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10
= {
1983 .master
= &dra7xx_l4_per1_hwmod
,
1984 .slave
= &dra7xx_timer10_hwmod
,
1985 .clk
= "l3_iclk_div",
1986 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1989 /* l4_per1 -> timer11 */
1990 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11
= {
1991 .master
= &dra7xx_l4_per1_hwmod
,
1992 .slave
= &dra7xx_timer11_hwmod
,
1993 .clk
= "l3_iclk_div",
1994 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1997 /* l4_wkup -> timer12 */
1998 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12
= {
1999 .master
= &dra7xx_l4_wkup_hwmod
,
2000 .slave
= &dra7xx_timer12_hwmod
,
2001 .clk
= "wkupaon_iclk_mux",
2002 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2005 /* l4_per3 -> timer13 */
2006 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13
= {
2007 .master
= &dra7xx_l4_per3_hwmod
,
2008 .slave
= &dra7xx_timer13_hwmod
,
2009 .clk
= "l3_iclk_div",
2010 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2013 /* l4_per3 -> timer14 */
2014 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14
= {
2015 .master
= &dra7xx_l4_per3_hwmod
,
2016 .slave
= &dra7xx_timer14_hwmod
,
2017 .clk
= "l3_iclk_div",
2018 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2021 /* l4_per3 -> timer15 */
2022 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15
= {
2023 .master
= &dra7xx_l4_per3_hwmod
,
2024 .slave
= &dra7xx_timer15_hwmod
,
2025 .clk
= "l3_iclk_div",
2026 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2029 /* l4_per3 -> timer16 */
2030 static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16
= {
2031 .master
= &dra7xx_l4_per3_hwmod
,
2032 .slave
= &dra7xx_timer16_hwmod
,
2033 .clk
= "l3_iclk_div",
2034 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2037 /* l4_per1 -> des */
2038 static struct omap_hwmod_ocp_if dra7xx_l4_per1__des
= {
2039 .master
= &dra7xx_l4_per1_hwmod
,
2040 .slave
= &dra7xx_des_hwmod
,
2041 .clk
= "l3_iclk_div",
2042 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2045 /* l4_per3 -> usb_otg_ss1 */
2046 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1
= {
2047 .master
= &dra7xx_l4_per3_hwmod
,
2048 .slave
= &dra7xx_usb_otg_ss1_hwmod
,
2049 .clk
= "dpll_core_h13x2_ck",
2050 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2053 /* l4_per3 -> usb_otg_ss2 */
2054 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2
= {
2055 .master
= &dra7xx_l4_per3_hwmod
,
2056 .slave
= &dra7xx_usb_otg_ss2_hwmod
,
2057 .clk
= "dpll_core_h13x2_ck",
2058 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2061 /* l4_per3 -> usb_otg_ss3 */
2062 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3
= {
2063 .master
= &dra7xx_l4_per3_hwmod
,
2064 .slave
= &dra7xx_usb_otg_ss3_hwmod
,
2065 .clk
= "dpll_core_h13x2_ck",
2066 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2069 /* l4_per3 -> usb_otg_ss4 */
2070 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4
= {
2071 .master
= &dra7xx_l4_per3_hwmod
,
2072 .slave
= &dra7xx_usb_otg_ss4_hwmod
,
2073 .clk
= "dpll_core_h13x2_ck",
2074 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2077 /* l3_main_1 -> vcp1 */
2078 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1
= {
2079 .master
= &dra7xx_l3_main_1_hwmod
,
2080 .slave
= &dra7xx_vcp1_hwmod
,
2081 .clk
= "l3_iclk_div",
2082 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2085 /* l4_per2 -> vcp1 */
2086 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1
= {
2087 .master
= &dra7xx_l4_per2_hwmod
,
2088 .slave
= &dra7xx_vcp1_hwmod
,
2089 .clk
= "l3_iclk_div",
2090 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2093 /* l3_main_1 -> vcp2 */
2094 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2
= {
2095 .master
= &dra7xx_l3_main_1_hwmod
,
2096 .slave
= &dra7xx_vcp2_hwmod
,
2097 .clk
= "l3_iclk_div",
2098 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2101 /* l4_per2 -> vcp2 */
2102 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2
= {
2103 .master
= &dra7xx_l4_per2_hwmod
,
2104 .slave
= &dra7xx_vcp2_hwmod
,
2105 .clk
= "l3_iclk_div",
2106 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
2109 /* l4_per2 -> epwmss0 */
2110 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0
= {
2111 .master
= &dra7xx_l4_per2_hwmod
,
2112 .slave
= &dra7xx_epwmss0_hwmod
,
2113 .clk
= "l4_root_clk_div",
2114 .user
= OCP_USER_MPU
,
2117 /* l4_per2 -> epwmss1 */
2118 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1
= {
2119 .master
= &dra7xx_l4_per2_hwmod
,
2120 .slave
= &dra7xx_epwmss1_hwmod
,
2121 .clk
= "l4_root_clk_div",
2122 .user
= OCP_USER_MPU
,
2125 /* l4_per2 -> epwmss2 */
2126 static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2
= {
2127 .master
= &dra7xx_l4_per2_hwmod
,
2128 .slave
= &dra7xx_epwmss2_hwmod
,
2129 .clk
= "l4_root_clk_div",
2130 .user
= OCP_USER_MPU
,
2133 static struct omap_hwmod_ocp_if
*dra7xx_hwmod_ocp_ifs
[] __initdata
= {
2134 &dra7xx_l3_main_1__dmm
,
2135 &dra7xx_l3_main_2__l3_instr
,
2136 &dra7xx_l4_cfg__l3_main_1
,
2137 &dra7xx_mpu__l3_main_1
,
2138 &dra7xx_l3_main_1__l3_main_2
,
2139 &dra7xx_l4_cfg__l3_main_2
,
2140 &dra7xx_l3_main_1__l4_cfg
,
2141 &dra7xx_l3_main_1__l4_per1
,
2142 &dra7xx_l3_main_1__l4_per2
,
2143 &dra7xx_l3_main_1__l4_per3
,
2144 &dra7xx_l3_main_1__l4_wkup
,
2145 &dra7xx_l4_per2__atl
,
2146 &dra7xx_l3_main_1__bb2d
,
2147 &dra7xx_l4_wkup__counter_32k
,
2148 &dra7xx_l4_wkup__ctrl_module_wkup
,
2149 &dra7xx_l4_wkup__dcan1
,
2150 &dra7xx_l4_per2__dcan2
,
2151 &dra7xx_l4_cfg__dma_system
,
2152 &dra7xx_l3_main_1__tpcc
,
2153 &dra7xx_l3_main_1__tptc0
,
2154 &dra7xx_l3_main_1__tptc1
,
2155 &dra7xx_l3_main_1__dss
,
2156 &dra7xx_l3_main_1__dispc
,
2157 &dra7xx_l3_main_1__hdmi
,
2158 &dra7xx_l3_main_1__aes1
,
2159 &dra7xx_l3_main_1__aes2
,
2160 &dra7xx_l3_main_1__sha0
,
2161 &dra7xx_l4_per1__elm
,
2162 &dra7xx_l3_main_1__gpmc
,
2163 &dra7xx_l4_cfg__mpu
,
2164 &dra7xx_l4_cfg__ocp2scp1
,
2165 &dra7xx_l4_cfg__ocp2scp3
,
2166 &dra7xx_l3_main_1__pciess1
,
2167 &dra7xx_l4_cfg__pciess1
,
2168 &dra7xx_l3_main_1__pciess2
,
2169 &dra7xx_l4_cfg__pciess2
,
2170 &dra7xx_l3_main_1__qspi
,
2171 &dra7xx_l4_cfg__sata
,
2172 &dra7xx_l4_cfg__smartreflex_core
,
2173 &dra7xx_l4_cfg__smartreflex_mpu
,
2174 &dra7xx_l4_cfg__spinlock
,
2175 &dra7xx_l4_wkup__timer1
,
2176 &dra7xx_l4_per1__timer2
,
2177 &dra7xx_l4_per1__timer3
,
2178 &dra7xx_l4_per1__timer4
,
2179 &dra7xx_l4_per3__timer5
,
2180 &dra7xx_l4_per3__timer6
,
2181 &dra7xx_l4_per3__timer7
,
2182 &dra7xx_l4_per3__timer8
,
2183 &dra7xx_l4_per1__timer9
,
2184 &dra7xx_l4_per1__timer10
,
2185 &dra7xx_l4_per1__timer11
,
2186 &dra7xx_l4_per3__timer13
,
2187 &dra7xx_l4_per3__timer14
,
2188 &dra7xx_l4_per3__timer15
,
2189 &dra7xx_l4_per3__timer16
,
2190 &dra7xx_l4_per1__des
,
2191 &dra7xx_l4_per3__usb_otg_ss1
,
2192 &dra7xx_l4_per3__usb_otg_ss2
,
2193 &dra7xx_l4_per3__usb_otg_ss3
,
2194 &dra7xx_l3_main_1__vcp1
,
2195 &dra7xx_l4_per2__vcp1
,
2196 &dra7xx_l3_main_1__vcp2
,
2197 &dra7xx_l4_per2__vcp2
,
2198 &dra7xx_l4_per2__epwmss0
,
2199 &dra7xx_l4_per2__epwmss1
,
2200 &dra7xx_l4_per2__epwmss2
,
2204 /* GP-only hwmod links */
2205 static struct omap_hwmod_ocp_if
*dra7xx_gp_hwmod_ocp_ifs
[] __initdata
= {
2206 &dra7xx_l4_wkup__timer12
,
2210 /* SoC variant specific hwmod links */
2211 static struct omap_hwmod_ocp_if
*dra76x_hwmod_ocp_ifs
[] __initdata
= {
2212 &dra7xx_l4_per3__usb_otg_ss4
,
2216 static struct omap_hwmod_ocp_if
*acd_76x_hwmod_ocp_ifs
[] __initdata
= {
2220 static struct omap_hwmod_ocp_if
*dra74x_hwmod_ocp_ifs
[] __initdata
= {
2221 &dra7xx_l4_per3__usb_otg_ss4
,
2225 static struct omap_hwmod_ocp_if
*dra72x_hwmod_ocp_ifs
[] __initdata
= {
2229 static struct omap_hwmod_ocp_if
*rtc_hwmod_ocp_ifs
[] __initdata
= {
2230 &dra7xx_l4_per3__rtcss
,
2234 int __init
dra7xx_hwmod_init(void)
2239 ret
= omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs
);
2241 if (!ret
&& soc_is_dra74x()) {
2242 ret
= omap_hwmod_register_links(dra74x_hwmod_ocp_ifs
);
2244 ret
= omap_hwmod_register_links(rtc_hwmod_ocp_ifs
);
2245 } else if (!ret
&& soc_is_dra72x()) {
2246 ret
= omap_hwmod_register_links(dra72x_hwmod_ocp_ifs
);
2247 if (!ret
&& !of_machine_is_compatible("ti,dra718"))
2248 ret
= omap_hwmod_register_links(rtc_hwmod_ocp_ifs
);
2249 } else if (!ret
&& soc_is_dra76x()) {
2250 ret
= omap_hwmod_register_links(dra76x_hwmod_ocp_ifs
);
2252 if (!ret
&& soc_is_dra76x_acd()) {
2253 ret
= omap_hwmod_register_links(acd_76x_hwmod_ocp_ifs
);
2254 } else if (!ret
&& soc_is_dra76x_abz()) {
2255 ret
= omap_hwmod_register_links(rtc_hwmod_ocp_ifs
);
2259 if (!ret
&& omap_type() == OMAP2_DEVICE_TYPE_GP
)
2260 ret
= omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs
);