1 // SPDX-License-Identifier: GPL-2.0-only
3 * Hardware modules present on the DRA7xx chips
5 * Copyright (C) 2013 Texas Instruments Incorporated - https://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,
225 * 'ctrl_module' class
229 static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
230 .name = "ctrl_module",
233 /* ctrl_module_wkup */
234 static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
235 .name = "ctrl_module_wkup",
236 .class = &dra7xx_ctrl_module_hwmod_class,
237 .clkdm_name = "wkupaon_clkdm",
240 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
250 static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
255 static struct omap_hwmod dra7xx_mpu_hwmod = {
257 .class = &dra7xx_mpu_hwmod_class,
258 .clkdm_name = "mpu_clkdm",
259 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
260 .main_clk = "dpll_mpu_m2_ck",
263 .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
264 .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
274 static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
279 static struct omap_hwmod dra7xx_vcp1_hwmod = {
281 .class = &dra7xx_vcp_hwmod_class,
282 .clkdm_name = "l3main1_clkdm",
283 .main_clk = "l3_iclk_div",
286 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
287 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
293 static struct omap_hwmod dra7xx_vcp2_hwmod = {
295 .class = &dra7xx_vcp_hwmod_class,
296 .clkdm_name = "l3main1_clkdm",
297 .main_clk = "l3_iclk_div",
300 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
301 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
312 /* l3_main_1 -> dmm */
313 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
314 .master = &dra7xx_l3_main_1_hwmod,
315 .slave = &dra7xx_dmm_hwmod,
316 .clk = "l3_iclk_div",
317 .user = OCP_USER_SDMA,
320 /* l3_main_2 -> l3_instr */
321 static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
322 .master = &dra7xx_l3_main_2_hwmod,
323 .slave = &dra7xx_l3_instr_hwmod,
324 .clk = "l3_iclk_div",
325 .user = OCP_USER_MPU | OCP_USER_SDMA,
328 /* l4_cfg -> l3_main_1 */
329 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
330 .master = &dra7xx_l4_cfg_hwmod,
331 .slave = &dra7xx_l3_main_1_hwmod,
332 .clk = "l3_iclk_div",
333 .user = OCP_USER_MPU | OCP_USER_SDMA,
336 /* mpu -> l3_main_1 */
337 static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
338 .master = &dra7xx_mpu_hwmod,
339 .slave = &dra7xx_l3_main_1_hwmod,
340 .clk = "l3_iclk_div",
341 .user = OCP_USER_MPU,
344 /* l3_main_1 -> l3_main_2 */
345 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
346 .master = &dra7xx_l3_main_1_hwmod,
347 .slave = &dra7xx_l3_main_2_hwmod,
348 .clk = "l3_iclk_div",
349 .user = OCP_USER_MPU,
352 /* l4_cfg -> l3_main_2 */
353 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
354 .master = &dra7xx_l4_cfg_hwmod,
355 .slave = &dra7xx_l3_main_2_hwmod,
356 .clk = "l3_iclk_div",
357 .user = OCP_USER_MPU | OCP_USER_SDMA,
360 /* l3_main_1 -> l4_cfg */
361 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
362 .master = &dra7xx_l3_main_1_hwmod,
363 .slave = &dra7xx_l4_cfg_hwmod,
364 .clk = "l3_iclk_div",
365 .user = OCP_USER_MPU | OCP_USER_SDMA,
368 /* l3_main_1 -> l4_per1 */
369 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
370 .master = &dra7xx_l3_main_1_hwmod,
371 .slave = &dra7xx_l4_per1_hwmod,
372 .clk = "l3_iclk_div",
373 .user = OCP_USER_MPU | OCP_USER_SDMA,
376 /* l3_main_1 -> l4_per2 */
377 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
378 .master = &dra7xx_l3_main_1_hwmod,
379 .slave = &dra7xx_l4_per2_hwmod,
380 .clk = "l3_iclk_div",
381 .user = OCP_USER_MPU | OCP_USER_SDMA,
384 /* l3_main_1 -> l4_per3 */
385 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
386 .master = &dra7xx_l3_main_1_hwmod,
387 .slave = &dra7xx_l4_per3_hwmod,
388 .clk = "l3_iclk_div",
389 .user = OCP_USER_MPU | OCP_USER_SDMA,
392 /* l3_main_1 -> l4_wkup */
393 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
394 .master = &dra7xx_l3_main_1_hwmod,
395 .slave = &dra7xx_l4_wkup_hwmod,
396 .clk = "wkupaon_iclk_mux",
397 .user = OCP_USER_MPU | OCP_USER_SDMA,
401 static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
402 .master = &dra7xx_l4_per2_hwmod,
403 .slave = &dra7xx_atl_hwmod,
404 .clk = "l3_iclk_div",
405 .user = OCP_USER_MPU | OCP_USER_SDMA,
408 /* l3_main_1 -> bb2d */
409 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
410 .master = &dra7xx_l3_main_1_hwmod,
411 .slave = &dra7xx_bb2d_hwmod,
412 .clk = "l3_iclk_div",
413 .user = OCP_USER_MPU | OCP_USER_SDMA,
416 /* l4_wkup -> ctrl_module_wkup */
417 static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
418 .master = &dra7xx_l4_wkup_hwmod,
419 .slave = &dra7xx_ctrl_module_wkup_hwmod,
420 .clk = "wkupaon_iclk_mux",
421 .user = OCP_USER_MPU | OCP_USER_SDMA,
425 static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
426 .master = &dra7xx_l4_cfg_hwmod,
427 .slave = &dra7xx_mpu_hwmod,
428 .clk = "l3_iclk_div",
429 .user = OCP_USER_MPU | OCP_USER_SDMA,
432 /* l3_main_1 -> vcp1 */
433 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
434 .master = &dra7xx_l3_main_1_hwmod,
435 .slave = &dra7xx_vcp1_hwmod,
436 .clk = "l3_iclk_div",
437 .user = OCP_USER_MPU | OCP_USER_SDMA,
440 /* l4_per2 -> vcp1 */
441 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
442 .master = &dra7xx_l4_per2_hwmod,
443 .slave = &dra7xx_vcp1_hwmod,
444 .clk = "l3_iclk_div",
445 .user = OCP_USER_MPU | OCP_USER_SDMA,
448 /* l3_main_1 -> vcp2 */
449 static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
450 .master = &dra7xx_l3_main_1_hwmod,
451 .slave = &dra7xx_vcp2_hwmod,
452 .clk = "l3_iclk_div",
453 .user = OCP_USER_MPU | OCP_USER_SDMA,
456 /* l4_per2 -> vcp2 */
457 static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
458 .master = &dra7xx_l4_per2_hwmod,
459 .slave = &dra7xx_vcp2_hwmod,
460 .clk = "l3_iclk_div",
461 .user = OCP_USER_MPU | OCP_USER_SDMA,
464 static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
465 &dra7xx_l3_main_1__dmm,
466 &dra7xx_l3_main_2__l3_instr,
467 &dra7xx_l4_cfg__l3_main_1,
468 &dra7xx_mpu__l3_main_1,
469 &dra7xx_l3_main_1__l3_main_2,
470 &dra7xx_l4_cfg__l3_main_2,
471 &dra7xx_l3_main_1__l4_cfg,
472 &dra7xx_l3_main_1__l4_per1,
473 &dra7xx_l3_main_1__l4_per2,
474 &dra7xx_l3_main_1__l4_per3,
475 &dra7xx_l3_main_1__l4_wkup,
476 &dra7xx_l4_per2__atl,
477 &dra7xx_l3_main_1__bb2d,
478 &dra7xx_l4_wkup__ctrl_module_wkup,
480 &dra7xx_l3_main_1__vcp1,
481 &dra7xx_l4_per2__vcp1,
482 &dra7xx_l3_main_1__vcp2,
483 &dra7xx_l4_per2__vcp2,
487 /* SoC variant specific hwmod links */
488 static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
492 static struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = {
496 int __init dra7xx_hwmod_init(void)
501 ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
503 if (!ret && soc_is_dra74x()) {
504 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
505 } else if (!ret && soc_is_dra72x()) {
506 ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
507 if (!ret && !of_machine_is_compatible("ti,dra718"))
508 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);
509 } else if (!ret && soc_is_dra76x()) {
510 if (!ret && soc_is_dra76x_abz())
511 ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs);