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.
19 #include "omap_hwmod.h"
20 #include "omap_hwmod_common_data.h"
26 /* Base offset for all DRA7XX interrupts external to MPUSS */
27 #define DRA7XX_IRQ_GIC_START 32
37 static struct omap_hwmod_class dra7xx_dmm_hwmod_class
= {
42 static struct omap_hwmod dra7xx_dmm_hwmod
= {
44 .class = &dra7xx_dmm_hwmod_class
,
45 .clkdm_name
= "emif_clkdm",
48 .clkctrl_offs
= DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET
,
49 .context_offs
= DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET
,
56 * instance(s): l3_instr, l3_main_1, l3_main_2
58 static struct omap_hwmod_class dra7xx_l3_hwmod_class
= {
63 static struct omap_hwmod dra7xx_l3_instr_hwmod
= {
65 .class = &dra7xx_l3_hwmod_class
,
66 .clkdm_name
= "l3instr_clkdm",
69 .clkctrl_offs
= DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET
,
70 .context_offs
= DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET
,
71 .modulemode
= MODULEMODE_HWCTRL
,
77 static struct omap_hwmod dra7xx_l3_main_1_hwmod
= {
79 .class = &dra7xx_l3_hwmod_class
,
80 .clkdm_name
= "l3main1_clkdm",
83 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET
,
84 .context_offs
= DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET
,
90 static struct omap_hwmod dra7xx_l3_main_2_hwmod
= {
92 .class = &dra7xx_l3_hwmod_class
,
93 .clkdm_name
= "l3instr_clkdm",
96 .clkctrl_offs
= DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET
,
97 .context_offs
= DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET
,
98 .modulemode
= MODULEMODE_HWCTRL
,
105 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
107 static struct omap_hwmod_class dra7xx_l4_hwmod_class
= {
112 static struct omap_hwmod dra7xx_l4_cfg_hwmod
= {
114 .class = &dra7xx_l4_hwmod_class
,
115 .clkdm_name
= "l4cfg_clkdm",
118 .clkctrl_offs
= DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET
,
119 .context_offs
= DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET
,
125 static struct omap_hwmod dra7xx_l4_per1_hwmod
= {
127 .class = &dra7xx_l4_hwmod_class
,
128 .clkdm_name
= "l4per_clkdm",
131 .clkctrl_offs
= DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET
,
132 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
138 static struct omap_hwmod dra7xx_l4_per2_hwmod
= {
140 .class = &dra7xx_l4_hwmod_class
,
141 .clkdm_name
= "l4per2_clkdm",
144 .clkctrl_offs
= DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET
,
145 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
151 static struct omap_hwmod dra7xx_l4_per3_hwmod
= {
153 .class = &dra7xx_l4_hwmod_class
,
154 .clkdm_name
= "l4per3_clkdm",
157 .clkctrl_offs
= DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET
,
158 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
164 static struct omap_hwmod dra7xx_l4_wkup_hwmod
= {
166 .class = &dra7xx_l4_hwmod_class
,
167 .clkdm_name
= "wkupaon_clkdm",
170 .clkctrl_offs
= DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET
,
171 .context_offs
= DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET
,
181 static struct omap_hwmod_class dra7xx_atl_hwmod_class
= {
186 static struct omap_hwmod dra7xx_atl_hwmod
= {
188 .class = &dra7xx_atl_hwmod_class
,
189 .clkdm_name
= "atl_clkdm",
190 .main_clk
= "atl_gfclk_mux",
193 .clkctrl_offs
= DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET
,
194 .context_offs
= DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET
,
195 .modulemode
= MODULEMODE_SWCTRL
,
205 static struct omap_hwmod_class dra7xx_bb2d_hwmod_class
= {
210 static struct omap_hwmod dra7xx_bb2d_hwmod
= {
212 .class = &dra7xx_bb2d_hwmod_class
,
213 .clkdm_name
= "dss_clkdm",
214 .main_clk
= "dpll_core_h24x2_ck",
217 .clkctrl_offs
= DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET
,
218 .context_offs
= DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET
,
219 .modulemode
= MODULEMODE_SWCTRL
,
229 static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc
= {
232 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
233 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
235 .sysc_fields
= &omap_hwmod_sysc_type1
,
238 static struct omap_hwmod_class dra7xx_counter_hwmod_class
= {
240 .sysc
= &dra7xx_counter_sysc
,
244 static struct omap_hwmod dra7xx_counter_32k_hwmod
= {
245 .name
= "counter_32k",
246 .class = &dra7xx_counter_hwmod_class
,
247 .clkdm_name
= "wkupaon_clkdm",
248 .flags
= HWMOD_SWSUP_SIDLE
,
249 .main_clk
= "wkupaon_iclk_mux",
252 .clkctrl_offs
= DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET
,
253 .context_offs
= DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET
,
259 * 'ctrl_module' class
263 static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class
= {
264 .name
= "ctrl_module",
267 /* ctrl_module_wkup */
268 static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod
= {
269 .name
= "ctrl_module_wkup",
270 .class = &dra7xx_ctrl_module_hwmod_class
,
271 .clkdm_name
= "wkupaon_clkdm",
274 .flags
= HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT
,
284 static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc
= {
288 .sysc_flags
= (SYSC_HAS_AUTOIDLE
| SYSC_HAS_SIDLEMODE
|
289 SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
290 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
),
291 .sysc_fields
= &omap_hwmod_sysc_type1
,
294 static struct omap_hwmod_class dra7xx_gpmc_hwmod_class
= {
296 .sysc
= &dra7xx_gpmc_sysc
,
301 static struct omap_hwmod dra7xx_gpmc_hwmod
= {
303 .class = &dra7xx_gpmc_hwmod_class
,
304 .clkdm_name
= "l3main1_clkdm",
305 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
306 .flags
= DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
307 .main_clk
= "l3_iclk_div",
310 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET
,
311 .context_offs
= DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET
,
312 .modulemode
= MODULEMODE_HWCTRL
,
324 static struct omap_hwmod_class dra7xx_mpu_hwmod_class
= {
329 static struct omap_hwmod dra7xx_mpu_hwmod
= {
331 .class = &dra7xx_mpu_hwmod_class
,
332 .clkdm_name
= "mpu_clkdm",
333 .flags
= HWMOD_INIT_NO_IDLE
| HWMOD_INIT_NO_RESET
,
334 .main_clk
= "dpll_mpu_m2_ck",
337 .clkctrl_offs
= DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET
,
338 .context_offs
= DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET
,
350 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
351 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
352 * associated with an IP automatically leaving the driver to handle that
353 * by itself. This does not work for PCIeSS which needs the reset lines
354 * deasserted for the driver to start accessing registers.
356 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
357 * lines after asserting them.
359 int dra7xx_pciess_reset(struct omap_hwmod
*oh
)
363 for (i
= 0; i
< oh
->rst_lines_cnt
; i
++) {
364 omap_hwmod_assert_hardreset(oh
, oh
->rst_lines
[i
].name
);
365 omap_hwmod_deassert_hardreset(oh
, oh
->rst_lines
[i
].name
);
371 static struct omap_hwmod_class dra7xx_pciess_hwmod_class
= {
373 .reset
= dra7xx_pciess_reset
,
377 static struct omap_hwmod_rst_info dra7xx_pciess1_resets
[] = {
378 { .name
= "pcie", .rst_shift
= 0 },
381 static struct omap_hwmod dra7xx_pciess1_hwmod
= {
383 .class = &dra7xx_pciess_hwmod_class
,
384 .clkdm_name
= "pcie_clkdm",
385 .rst_lines
= dra7xx_pciess1_resets
,
386 .rst_lines_cnt
= ARRAY_SIZE(dra7xx_pciess1_resets
),
387 .main_clk
= "l4_root_clk_div",
390 .clkctrl_offs
= DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET
,
391 .rstctrl_offs
= DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET
,
392 .context_offs
= DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET
,
393 .modulemode
= MODULEMODE_SWCTRL
,
399 static struct omap_hwmod_rst_info dra7xx_pciess2_resets
[] = {
400 { .name
= "pcie", .rst_shift
= 1 },
404 static struct omap_hwmod dra7xx_pciess2_hwmod
= {
406 .class = &dra7xx_pciess_hwmod_class
,
407 .clkdm_name
= "pcie_clkdm",
408 .rst_lines
= dra7xx_pciess2_resets
,
409 .rst_lines_cnt
= ARRAY_SIZE(dra7xx_pciess2_resets
),
410 .main_clk
= "l4_root_clk_div",
413 .clkctrl_offs
= DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET
,
414 .rstctrl_offs
= DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET
,
415 .context_offs
= DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET
,
416 .modulemode
= MODULEMODE_SWCTRL
,
426 static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc
= {
429 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
430 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
432 .sysc_fields
= &omap_hwmod_sysc_type2
,
435 static struct omap_hwmod_class dra7xx_qspi_hwmod_class
= {
437 .sysc
= &dra7xx_qspi_sysc
,
441 static struct omap_hwmod dra7xx_qspi_hwmod
= {
443 .class = &dra7xx_qspi_hwmod_class
,
444 .clkdm_name
= "l4per2_clkdm",
445 .main_clk
= "qspi_gfclk_div",
448 .clkctrl_offs
= DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET
,
449 .context_offs
= DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET
,
450 .modulemode
= MODULEMODE_SWCTRL
,
459 static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc
= {
462 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
463 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
465 .sysc_fields
= &omap_hwmod_sysc_type3
,
468 static struct omap_hwmod_class dra7xx_rtcss_hwmod_class
= {
470 .sysc
= &dra7xx_rtcss_sysc
,
471 .unlock
= &omap_hwmod_rtc_unlock
,
472 .lock
= &omap_hwmod_rtc_lock
,
476 static struct omap_hwmod dra7xx_rtcss_hwmod
= {
478 .class = &dra7xx_rtcss_hwmod_class
,
479 .clkdm_name
= "rtc_clkdm",
480 .main_clk
= "sys_32k_ck",
483 .clkctrl_offs
= DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET
,
484 .context_offs
= DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET
,
485 .modulemode
= MODULEMODE_SWCTRL
,
495 static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc
= {
498 .sysc_flags
= (SYSC_HAS_MIDLEMODE
| SYSC_HAS_SIDLEMODE
),
499 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
500 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
501 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
502 .sysc_fields
= &omap_hwmod_sysc_type2
,
505 static struct omap_hwmod_class dra7xx_sata_hwmod_class
= {
507 .sysc
= &dra7xx_sata_sysc
,
512 static struct omap_hwmod dra7xx_sata_hwmod
= {
514 .class = &dra7xx_sata_hwmod_class
,
515 .clkdm_name
= "l3init_clkdm",
516 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
517 .main_clk
= "func_48m_fclk",
521 .clkctrl_offs
= DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET
,
522 .context_offs
= DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET
,
523 .modulemode
= MODULEMODE_SWCTRL
,
531 * This class contains several variants: ['timer_1ms', 'timer_secure',
535 static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc
= {
538 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_RESET_STATUS
|
539 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
540 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
542 .sysc_fields
= &omap_hwmod_sysc_type2
,
545 static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class
= {
547 .sysc
= &dra7xx_timer_1ms_sysc
,
550 static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc
= {
553 .sysc_flags
= (SYSC_HAS_EMUFREE
| SYSC_HAS_RESET_STATUS
|
554 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
),
555 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
557 .sysc_fields
= &omap_hwmod_sysc_type2
,
560 static struct omap_hwmod_class dra7xx_timer_hwmod_class
= {
562 .sysc
= &dra7xx_timer_sysc
,
566 static struct omap_hwmod dra7xx_timer1_hwmod
= {
568 .class = &dra7xx_timer_1ms_hwmod_class
,
569 .clkdm_name
= "wkupaon_clkdm",
570 .main_clk
= "timer1_gfclk_mux",
573 .clkctrl_offs
= DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET
,
574 .context_offs
= DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET
,
575 .modulemode
= MODULEMODE_SWCTRL
,
581 static struct omap_hwmod dra7xx_timer2_hwmod
= {
583 .class = &dra7xx_timer_1ms_hwmod_class
,
584 .clkdm_name
= "l4per_clkdm",
585 .main_clk
= "timer2_gfclk_mux",
588 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET
,
589 .context_offs
= DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET
,
590 .modulemode
= MODULEMODE_SWCTRL
,
596 static struct omap_hwmod dra7xx_timer3_hwmod
= {
598 .class = &dra7xx_timer_hwmod_class
,
599 .clkdm_name
= "l4per_clkdm",
600 .main_clk
= "timer3_gfclk_mux",
603 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET
,
604 .context_offs
= DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET
,
605 .modulemode
= MODULEMODE_SWCTRL
,
611 static struct omap_hwmod dra7xx_timer4_hwmod
= {
613 .class = &dra7xx_timer_hwmod_class
,
614 .clkdm_name
= "l4per_clkdm",
615 .main_clk
= "timer4_gfclk_mux",
618 .clkctrl_offs
= DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET
,
619 .context_offs
= DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET
,
620 .modulemode
= MODULEMODE_SWCTRL
,
630 static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc
= {
633 .sysc_flags
= (SYSC_HAS_DMADISABLE
| SYSC_HAS_MIDLEMODE
|
635 .idlemodes
= (SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
636 SIDLE_SMART_WKUP
| MSTANDBY_FORCE
| MSTANDBY_NO
|
637 MSTANDBY_SMART
| MSTANDBY_SMART_WKUP
),
638 .sysc_fields
= &omap_hwmod_sysc_type2
,
641 static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class
= {
642 .name
= "usb_otg_ss",
643 .sysc
= &dra7xx_usb_otg_ss_sysc
,
647 static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks
[] = {
648 { .role
= "refclk960m", .clk
= "usb_otg_ss1_refclk960m" },
651 static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod
= {
652 .name
= "usb_otg_ss1",
653 .class = &dra7xx_usb_otg_ss_hwmod_class
,
654 .clkdm_name
= "l3init_clkdm",
655 .main_clk
= "dpll_core_h13x2_ck",
656 .flags
= HWMOD_CLKDM_NOAUTO
,
659 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET
,
660 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET
,
661 .modulemode
= MODULEMODE_HWCTRL
,
664 .opt_clks
= usb_otg_ss1_opt_clks
,
665 .opt_clks_cnt
= ARRAY_SIZE(usb_otg_ss1_opt_clks
),
669 static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks
[] = {
670 { .role
= "refclk960m", .clk
= "usb_otg_ss2_refclk960m" },
673 static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod
= {
674 .name
= "usb_otg_ss2",
675 .class = &dra7xx_usb_otg_ss_hwmod_class
,
676 .clkdm_name
= "l3init_clkdm",
677 .main_clk
= "dpll_core_h13x2_ck",
678 .flags
= HWMOD_CLKDM_NOAUTO
,
681 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET
,
682 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET
,
683 .modulemode
= MODULEMODE_HWCTRL
,
686 .opt_clks
= usb_otg_ss2_opt_clks
,
687 .opt_clks_cnt
= ARRAY_SIZE(usb_otg_ss2_opt_clks
),
691 static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod
= {
692 .name
= "usb_otg_ss3",
693 .class = &dra7xx_usb_otg_ss_hwmod_class
,
694 .clkdm_name
= "l3init_clkdm",
695 .main_clk
= "dpll_core_h13x2_ck",
698 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET
,
699 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET
,
700 .modulemode
= MODULEMODE_HWCTRL
,
706 static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod
= {
707 .name
= "usb_otg_ss4",
708 .class = &dra7xx_usb_otg_ss_hwmod_class
,
709 .clkdm_name
= "l3init_clkdm",
710 .main_clk
= "dpll_core_h13x2_ck",
713 .clkctrl_offs
= DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET
,
714 .context_offs
= DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET
,
715 .modulemode
= MODULEMODE_HWCTRL
,
725 static struct omap_hwmod_class dra7xx_vcp_hwmod_class
= {
730 static struct omap_hwmod dra7xx_vcp1_hwmod
= {
732 .class = &dra7xx_vcp_hwmod_class
,
733 .clkdm_name
= "l3main1_clkdm",
734 .main_clk
= "l3_iclk_div",
737 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET
,
738 .context_offs
= DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET
,
744 static struct omap_hwmod dra7xx_vcp2_hwmod
= {
746 .class = &dra7xx_vcp_hwmod_class
,
747 .clkdm_name
= "l3main1_clkdm",
748 .main_clk
= "l3_iclk_div",
751 .clkctrl_offs
= DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET
,
752 .context_offs
= DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET
,
763 /* l3_main_1 -> dmm */
764 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm
= {
765 .master
= &dra7xx_l3_main_1_hwmod
,
766 .slave
= &dra7xx_dmm_hwmod
,
767 .clk
= "l3_iclk_div",
768 .user
= OCP_USER_SDMA
,
771 /* l3_main_2 -> l3_instr */
772 static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr
= {
773 .master
= &dra7xx_l3_main_2_hwmod
,
774 .slave
= &dra7xx_l3_instr_hwmod
,
775 .clk
= "l3_iclk_div",
776 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
779 /* l4_cfg -> l3_main_1 */
780 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1
= {
781 .master
= &dra7xx_l4_cfg_hwmod
,
782 .slave
= &dra7xx_l3_main_1_hwmod
,
783 .clk
= "l3_iclk_div",
784 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
787 /* mpu -> l3_main_1 */
788 static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1
= {
789 .master
= &dra7xx_mpu_hwmod
,
790 .slave
= &dra7xx_l3_main_1_hwmod
,
791 .clk
= "l3_iclk_div",
792 .user
= OCP_USER_MPU
,
795 /* l3_main_1 -> l3_main_2 */
796 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2
= {
797 .master
= &dra7xx_l3_main_1_hwmod
,
798 .slave
= &dra7xx_l3_main_2_hwmod
,
799 .clk
= "l3_iclk_div",
800 .user
= OCP_USER_MPU
,
803 /* l4_cfg -> l3_main_2 */
804 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2
= {
805 .master
= &dra7xx_l4_cfg_hwmod
,
806 .slave
= &dra7xx_l3_main_2_hwmod
,
807 .clk
= "l3_iclk_div",
808 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
811 /* l3_main_1 -> l4_cfg */
812 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg
= {
813 .master
= &dra7xx_l3_main_1_hwmod
,
814 .slave
= &dra7xx_l4_cfg_hwmod
,
815 .clk
= "l3_iclk_div",
816 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
819 /* l3_main_1 -> l4_per1 */
820 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1
= {
821 .master
= &dra7xx_l3_main_1_hwmod
,
822 .slave
= &dra7xx_l4_per1_hwmod
,
823 .clk
= "l3_iclk_div",
824 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
827 /* l3_main_1 -> l4_per2 */
828 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2
= {
829 .master
= &dra7xx_l3_main_1_hwmod
,
830 .slave
= &dra7xx_l4_per2_hwmod
,
831 .clk
= "l3_iclk_div",
832 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
835 /* l3_main_1 -> l4_per3 */
836 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3
= {
837 .master
= &dra7xx_l3_main_1_hwmod
,
838 .slave
= &dra7xx_l4_per3_hwmod
,
839 .clk
= "l3_iclk_div",
840 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
843 /* l3_main_1 -> l4_wkup */
844 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup
= {
845 .master
= &dra7xx_l3_main_1_hwmod
,
846 .slave
= &dra7xx_l4_wkup_hwmod
,
847 .clk
= "wkupaon_iclk_mux",
848 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
852 static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl
= {
853 .master
= &dra7xx_l4_per2_hwmod
,
854 .slave
= &dra7xx_atl_hwmod
,
855 .clk
= "l3_iclk_div",
856 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
859 /* l3_main_1 -> bb2d */
860 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d
= {
861 .master
= &dra7xx_l3_main_1_hwmod
,
862 .slave
= &dra7xx_bb2d_hwmod
,
863 .clk
= "l3_iclk_div",
864 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
867 /* l4_wkup -> counter_32k */
868 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k
= {
869 .master
= &dra7xx_l4_wkup_hwmod
,
870 .slave
= &dra7xx_counter_32k_hwmod
,
871 .clk
= "wkupaon_iclk_mux",
872 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
875 /* l4_wkup -> ctrl_module_wkup */
876 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup
= {
877 .master
= &dra7xx_l4_wkup_hwmod
,
878 .slave
= &dra7xx_ctrl_module_wkup_hwmod
,
879 .clk
= "wkupaon_iclk_mux",
880 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
883 /* l3_main_1 -> gpmc */
884 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc
= {
885 .master
= &dra7xx_l3_main_1_hwmod
,
886 .slave
= &dra7xx_gpmc_hwmod
,
887 .clk
= "l3_iclk_div",
888 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
892 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu
= {
893 .master
= &dra7xx_l4_cfg_hwmod
,
894 .slave
= &dra7xx_mpu_hwmod
,
895 .clk
= "l3_iclk_div",
896 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
899 /* l3_main_1 -> pciess1 */
900 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1
= {
901 .master
= &dra7xx_l3_main_1_hwmod
,
902 .slave
= &dra7xx_pciess1_hwmod
,
903 .clk
= "l3_iclk_div",
904 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
907 /* l4_cfg -> pciess1 */
908 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1
= {
909 .master
= &dra7xx_l4_cfg_hwmod
,
910 .slave
= &dra7xx_pciess1_hwmod
,
911 .clk
= "l4_root_clk_div",
912 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
915 /* l3_main_1 -> pciess2 */
916 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2
= {
917 .master
= &dra7xx_l3_main_1_hwmod
,
918 .slave
= &dra7xx_pciess2_hwmod
,
919 .clk
= "l3_iclk_div",
920 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
923 /* l4_cfg -> pciess2 */
924 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2
= {
925 .master
= &dra7xx_l4_cfg_hwmod
,
926 .slave
= &dra7xx_pciess2_hwmod
,
927 .clk
= "l4_root_clk_div",
928 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
931 /* l3_main_1 -> qspi */
932 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi
= {
933 .master
= &dra7xx_l3_main_1_hwmod
,
934 .slave
= &dra7xx_qspi_hwmod
,
935 .clk
= "l3_iclk_div",
936 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
939 /* l4_per3 -> rtcss */
940 static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss
= {
941 .master
= &dra7xx_l4_per3_hwmod
,
942 .slave
= &dra7xx_rtcss_hwmod
,
943 .clk
= "l4_root_clk_div",
944 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
948 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata
= {
949 .master
= &dra7xx_l4_cfg_hwmod
,
950 .slave
= &dra7xx_sata_hwmod
,
951 .clk
= "l3_iclk_div",
952 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
955 /* l4_wkup -> timer1 */
956 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1
= {
957 .master
= &dra7xx_l4_wkup_hwmod
,
958 .slave
= &dra7xx_timer1_hwmod
,
959 .clk
= "wkupaon_iclk_mux",
960 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
963 /* l4_per1 -> timer2 */
964 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2
= {
965 .master
= &dra7xx_l4_per1_hwmod
,
966 .slave
= &dra7xx_timer2_hwmod
,
967 .clk
= "l3_iclk_div",
968 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
971 /* l4_per1 -> timer3 */
972 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3
= {
973 .master
= &dra7xx_l4_per1_hwmod
,
974 .slave
= &dra7xx_timer3_hwmod
,
975 .clk
= "l3_iclk_div",
976 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
979 /* l4_per1 -> timer4 */
980 static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4
= {
981 .master
= &dra7xx_l4_per1_hwmod
,
982 .slave
= &dra7xx_timer4_hwmod
,
983 .clk
= "l3_iclk_div",
984 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
987 /* l4_per3 -> usb_otg_ss1 */
988 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1
= {
989 .master
= &dra7xx_l4_per3_hwmod
,
990 .slave
= &dra7xx_usb_otg_ss1_hwmod
,
991 .clk
= "dpll_core_h13x2_ck",
992 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
995 /* l4_per3 -> usb_otg_ss2 */
996 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2
= {
997 .master
= &dra7xx_l4_per3_hwmod
,
998 .slave
= &dra7xx_usb_otg_ss2_hwmod
,
999 .clk
= "dpll_core_h13x2_ck",
1000 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1003 /* l4_per3 -> usb_otg_ss3 */
1004 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3
= {
1005 .master
= &dra7xx_l4_per3_hwmod
,
1006 .slave
= &dra7xx_usb_otg_ss3_hwmod
,
1007 .clk
= "dpll_core_h13x2_ck",
1008 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1011 /* l4_per3 -> usb_otg_ss4 */
1012 static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4
= {
1013 .master
= &dra7xx_l4_per3_hwmod
,
1014 .slave
= &dra7xx_usb_otg_ss4_hwmod
,
1015 .clk
= "dpll_core_h13x2_ck",
1016 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1019 /* l3_main_1 -> vcp1 */
1020 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1
= {
1021 .master
= &dra7xx_l3_main_1_hwmod
,
1022 .slave
= &dra7xx_vcp1_hwmod
,
1023 .clk
= "l3_iclk_div",
1024 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1027 /* l4_per2 -> vcp1 */
1028 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1
= {
1029 .master
= &dra7xx_l4_per2_hwmod
,
1030 .slave
= &dra7xx_vcp1_hwmod
,
1031 .clk
= "l3_iclk_div",
1032 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1035 /* l3_main_1 -> vcp2 */
1036 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2
= {
1037 .master
= &dra7xx_l3_main_1_hwmod
,
1038 .slave
= &dra7xx_vcp2_hwmod
,
1039 .clk
= "l3_iclk_div",
1040 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1043 /* l4_per2 -> vcp2 */
1044 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2
= {
1045 .master
= &dra7xx_l4_per2_hwmod
,
1046 .slave
= &dra7xx_vcp2_hwmod
,
1047 .clk
= "l3_iclk_div",
1048 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
1051 static struct omap_hwmod_ocp_if
*dra7xx_hwmod_ocp_ifs
[] __initdata
= {
1052 &dra7xx_l3_main_1__dmm
,
1053 &dra7xx_l3_main_2__l3_instr
,
1054 &dra7xx_l4_cfg__l3_main_1
,
1055 &dra7xx_mpu__l3_main_1
,
1056 &dra7xx_l3_main_1__l3_main_2
,
1057 &dra7xx_l4_cfg__l3_main_2
,
1058 &dra7xx_l3_main_1__l4_cfg
,
1059 &dra7xx_l3_main_1__l4_per1
,
1060 &dra7xx_l3_main_1__l4_per2
,
1061 &dra7xx_l3_main_1__l4_per3
,
1062 &dra7xx_l3_main_1__l4_wkup
,
1063 &dra7xx_l4_per2__atl
,
1064 &dra7xx_l3_main_1__bb2d
,
1065 &dra7xx_l4_wkup__counter_32k
,
1066 &dra7xx_l4_wkup__ctrl_module_wkup
,
1067 &dra7xx_l3_main_1__gpmc
,
1068 &dra7xx_l4_cfg__mpu
,
1069 &dra7xx_l3_main_1__pciess1
,
1070 &dra7xx_l4_cfg__pciess1
,
1071 &dra7xx_l3_main_1__pciess2
,
1072 &dra7xx_l4_cfg__pciess2
,
1073 &dra7xx_l3_main_1__qspi
,
1074 &dra7xx_l4_cfg__sata
,
1075 &dra7xx_l4_wkup__timer1
,
1076 &dra7xx_l4_per1__timer2
,
1077 &dra7xx_l4_per1__timer3
,
1078 &dra7xx_l4_per1__timer4
,
1079 &dra7xx_l4_per3__usb_otg_ss1
,
1080 &dra7xx_l4_per3__usb_otg_ss2
,
1081 &dra7xx_l4_per3__usb_otg_ss3
,
1082 &dra7xx_l3_main_1__vcp1
,
1083 &dra7xx_l4_per2__vcp1
,
1084 &dra7xx_l3_main_1__vcp2
,
1085 &dra7xx_l4_per2__vcp2
,
1089 /* SoC variant specific hwmod links */
1090 static struct omap_hwmod_ocp_if
*dra76x_hwmod_ocp_ifs
[] __initdata
= {
1091 &dra7xx_l4_per3__usb_otg_ss4
,
1095 static struct omap_hwmod_ocp_if
*acd_76x_hwmod_ocp_ifs
[] __initdata
= {
1099 static struct omap_hwmod_ocp_if
*dra74x_hwmod_ocp_ifs
[] __initdata
= {
1100 &dra7xx_l4_per3__usb_otg_ss4
,
1104 static struct omap_hwmod_ocp_if
*dra72x_hwmod_ocp_ifs
[] __initdata
= {
1108 static struct omap_hwmod_ocp_if
*rtc_hwmod_ocp_ifs
[] __initdata
= {
1109 &dra7xx_l4_per3__rtcss
,
1113 int __init
dra7xx_hwmod_init(void)
1118 ret
= omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs
);
1120 if (!ret
&& soc_is_dra74x()) {
1121 ret
= omap_hwmod_register_links(dra74x_hwmod_ocp_ifs
);
1123 ret
= omap_hwmod_register_links(rtc_hwmod_ocp_ifs
);
1124 } else if (!ret
&& soc_is_dra72x()) {
1125 ret
= omap_hwmod_register_links(dra72x_hwmod_ocp_ifs
);
1126 if (!ret
&& !of_machine_is_compatible("ti,dra718"))
1127 ret
= omap_hwmod_register_links(rtc_hwmod_ocp_ifs
);
1128 } else if (!ret
&& soc_is_dra76x()) {
1129 ret
= omap_hwmod_register_links(dra76x_hwmod_ocp_ifs
);
1131 if (!ret
&& soc_is_dra76x_acd()) {
1132 ret
= omap_hwmod_register_links(acd_76x_hwmod_ocp_ifs
);
1133 } else if (!ret
&& soc_is_dra76x_abz()) {
1134 ret
= omap_hwmod_register_links(rtc_hwmod_ocp_ifs
);