blob: 7610f3ef28b7c45832b1ec396636bcf5718cd061 [file] [log] [blame]
Ambresh K90020c72013-07-09 13:02:16 +05301/*
2 * Hardware modules present on the DRA7xx chips
3 *
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Paul Walmsley
7 * Benoit Cousson
8 *
9 * This file is automatically generated from the OMAP hardware databases.
10 * We respectfully ask that any modifications to this file be coordinated
11 * with the public linux-omap@vger.kernel.org mailing list and the
12 * authors above to ensure that the autogeneration scripts are kept
13 * up-to-date with the file contents.
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation.
18 */
19
20#include <linux/io.h>
21#include <linux/platform_data/gpio-omap.h>
Andreas Fenkart551434382014-11-08 15:33:09 +010022#include <linux/platform_data/hsmmc-omap.h>
Ambresh K90020c72013-07-09 13:02:16 +053023#include <linux/power/smartreflex.h>
24#include <linux/i2c-omap.h>
25
26#include <linux/omap-dma.h>
27#include <linux/platform_data/spi-omap2-mcspi.h>
28#include <linux/platform_data/asoc-ti-mcbsp.h>
29#include <plat/dmtimer.h>
30
31#include "omap_hwmod.h"
32#include "omap_hwmod_common_data.h"
33#include "cm1_7xx.h"
34#include "cm2_7xx.h"
35#include "prm7xx.h"
36#include "i2c.h"
Ambresh K90020c72013-07-09 13:02:16 +053037#include "wd_timer.h"
Rajendra Nayakf7f7a292014-08-27 19:38:23 -060038#include "soc.h"
Ambresh K90020c72013-07-09 13:02:16 +053039
40/* Base offset for all DRA7XX interrupts external to MPUSS */
41#define DRA7XX_IRQ_GIC_START 32
42
43/* Base offset for all DRA7XX dma requests */
44#define DRA7XX_DMA_REQ_START 1
45
46
47/*
48 * IP blocks
49 */
50
51/*
Tomi Valkeinen42121682014-09-15 13:12:18 -050052 * 'dmm' class
53 * instance(s): dmm
54 */
55static struct omap_hwmod_class dra7xx_dmm_hwmod_class = {
56 .name = "dmm",
57};
58
59/* dmm */
60static struct omap_hwmod dra7xx_dmm_hwmod = {
61 .name = "dmm",
62 .class = &dra7xx_dmm_hwmod_class,
63 .clkdm_name = "emif_clkdm",
64 .prcm = {
65 .omap4 = {
66 .clkctrl_offs = DRA7XX_CM_EMIF_DMM_CLKCTRL_OFFSET,
67 .context_offs = DRA7XX_RM_EMIF_DMM_CONTEXT_OFFSET,
68 },
69 },
70};
71
72/*
Ambresh K90020c72013-07-09 13:02:16 +053073 * 'l3' class
74 * instance(s): l3_instr, l3_main_1, l3_main_2
75 */
76static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
77 .name = "l3",
78};
79
80/* l3_instr */
81static struct omap_hwmod dra7xx_l3_instr_hwmod = {
82 .name = "l3_instr",
83 .class = &dra7xx_l3_hwmod_class,
84 .clkdm_name = "l3instr_clkdm",
85 .prcm = {
86 .omap4 = {
87 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
88 .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
89 .modulemode = MODULEMODE_HWCTRL,
90 },
91 },
92};
93
94/* l3_main_1 */
95static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
96 .name = "l3_main_1",
97 .class = &dra7xx_l3_hwmod_class,
98 .clkdm_name = "l3main1_clkdm",
99 .prcm = {
100 .omap4 = {
101 .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
102 .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
103 },
104 },
105};
106
107/* l3_main_2 */
108static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
109 .name = "l3_main_2",
110 .class = &dra7xx_l3_hwmod_class,
111 .clkdm_name = "l3instr_clkdm",
112 .prcm = {
113 .omap4 = {
114 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
115 .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
116 .modulemode = MODULEMODE_HWCTRL,
117 },
118 },
119};
120
121/*
122 * 'l4' class
123 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
124 */
125static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
126 .name = "l4",
127};
128
129/* l4_cfg */
130static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
131 .name = "l4_cfg",
132 .class = &dra7xx_l4_hwmod_class,
133 .clkdm_name = "l4cfg_clkdm",
134 .prcm = {
135 .omap4 = {
136 .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
137 .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
138 },
139 },
140};
141
142/* l4_per1 */
143static struct omap_hwmod dra7xx_l4_per1_hwmod = {
144 .name = "l4_per1",
145 .class = &dra7xx_l4_hwmod_class,
146 .clkdm_name = "l4per_clkdm",
147 .prcm = {
148 .omap4 = {
149 .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
150 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
151 },
152 },
153};
154
155/* l4_per2 */
156static struct omap_hwmod dra7xx_l4_per2_hwmod = {
157 .name = "l4_per2",
158 .class = &dra7xx_l4_hwmod_class,
159 .clkdm_name = "l4per2_clkdm",
160 .prcm = {
161 .omap4 = {
162 .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
163 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
164 },
165 },
166};
167
168/* l4_per3 */
169static struct omap_hwmod dra7xx_l4_per3_hwmod = {
170 .name = "l4_per3",
171 .class = &dra7xx_l4_hwmod_class,
172 .clkdm_name = "l4per3_clkdm",
173 .prcm = {
174 .omap4 = {
175 .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
176 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
177 },
178 },
179};
180
181/* l4_wkup */
182static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
183 .name = "l4_wkup",
184 .class = &dra7xx_l4_hwmod_class,
185 .clkdm_name = "wkupaon_clkdm",
186 .prcm = {
187 .omap4 = {
188 .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
189 .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
190 },
191 },
192};
193
194/*
195 * 'atl' class
196 *
197 */
198
199static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
200 .name = "atl",
201};
202
203/* atl */
204static struct omap_hwmod dra7xx_atl_hwmod = {
205 .name = "atl",
206 .class = &dra7xx_atl_hwmod_class,
207 .clkdm_name = "atl_clkdm",
208 .main_clk = "atl_gfclk_mux",
209 .prcm = {
210 .omap4 = {
211 .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
212 .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
213 .modulemode = MODULEMODE_SWCTRL,
214 },
215 },
216};
217
218/*
219 * 'bb2d' class
220 *
221 */
222
223static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
224 .name = "bb2d",
225};
226
227/* bb2d */
228static struct omap_hwmod dra7xx_bb2d_hwmod = {
229 .name = "bb2d",
230 .class = &dra7xx_bb2d_hwmod_class,
231 .clkdm_name = "dss_clkdm",
232 .main_clk = "dpll_core_h24x2_ck",
233 .prcm = {
234 .omap4 = {
235 .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
236 .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
237 .modulemode = MODULEMODE_SWCTRL,
238 },
239 },
240};
241
242/*
243 * 'counter' class
244 *
245 */
246
247static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
248 .rev_offs = 0x0000,
249 .sysc_offs = 0x0010,
250 .sysc_flags = SYSC_HAS_SIDLEMODE,
251 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
252 SIDLE_SMART_WKUP),
253 .sysc_fields = &omap_hwmod_sysc_type1,
254};
255
256static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
257 .name = "counter",
258 .sysc = &dra7xx_counter_sysc,
259};
260
261/* counter_32k */
262static struct omap_hwmod dra7xx_counter_32k_hwmod = {
263 .name = "counter_32k",
264 .class = &dra7xx_counter_hwmod_class,
265 .clkdm_name = "wkupaon_clkdm",
266 .flags = HWMOD_SWSUP_SIDLE,
267 .main_clk = "wkupaon_iclk_mux",
268 .prcm = {
269 .omap4 = {
270 .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
271 .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
272 },
273 },
274};
275
276/*
277 * 'ctrl_module' class
278 *
279 */
280
281static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
282 .name = "ctrl_module",
283};
284
285/* ctrl_module_wkup */
286static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
287 .name = "ctrl_module_wkup",
288 .class = &dra7xx_ctrl_module_hwmod_class,
289 .clkdm_name = "wkupaon_clkdm",
290 .prcm = {
291 .omap4 = {
292 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
293 },
294 },
295};
296
297/*
Mugunthan V N077c42f2014-07-08 18:46:39 +0530298 * 'gmac' class
299 * cpsw/gmac sub system
300 */
301static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = {
302 .rev_offs = 0x0,
303 .sysc_offs = 0x8,
304 .syss_offs = 0x4,
305 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
306 SYSS_HAS_RESET_STATUS),
307 .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
308 MSTANDBY_NO),
309 .sysc_fields = &omap_hwmod_sysc_type3,
310};
311
312static struct omap_hwmod_class dra7xx_gmac_hwmod_class = {
313 .name = "gmac",
314 .sysc = &dra7xx_gmac_sysc,
315};
316
317static struct omap_hwmod dra7xx_gmac_hwmod = {
318 .name = "gmac",
319 .class = &dra7xx_gmac_hwmod_class,
320 .clkdm_name = "gmac_clkdm",
321 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
322 .main_clk = "dpll_gmac_ck",
323 .mpu_rt_idx = 1,
324 .prcm = {
325 .omap4 = {
326 .clkctrl_offs = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET,
327 .context_offs = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET,
328 .modulemode = MODULEMODE_SWCTRL,
329 },
330 },
331};
332
333/*
334 * 'mdio' class
335 */
336static struct omap_hwmod_class dra7xx_mdio_hwmod_class = {
337 .name = "davinci_mdio",
338};
339
340static struct omap_hwmod dra7xx_mdio_hwmod = {
341 .name = "davinci_mdio",
342 .class = &dra7xx_mdio_hwmod_class,
343 .clkdm_name = "gmac_clkdm",
344 .main_clk = "dpll_gmac_ck",
345};
346
347/*
Ambresh K90020c72013-07-09 13:02:16 +0530348 * 'dcan' class
349 *
350 */
351
352static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
353 .name = "dcan",
354};
355
356/* dcan1 */
357static struct omap_hwmod dra7xx_dcan1_hwmod = {
358 .name = "dcan1",
359 .class = &dra7xx_dcan_hwmod_class,
360 .clkdm_name = "wkupaon_clkdm",
361 .main_clk = "dcan1_sys_clk_mux",
362 .prcm = {
363 .omap4 = {
364 .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
365 .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
366 .modulemode = MODULEMODE_SWCTRL,
367 },
368 },
369};
370
371/* dcan2 */
372static struct omap_hwmod dra7xx_dcan2_hwmod = {
373 .name = "dcan2",
374 .class = &dra7xx_dcan_hwmod_class,
375 .clkdm_name = "l4per2_clkdm",
376 .main_clk = "sys_clkin1",
377 .prcm = {
378 .omap4 = {
379 .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
380 .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
381 .modulemode = MODULEMODE_SWCTRL,
382 },
383 },
384};
385
386/*
387 * 'dma' class
388 *
389 */
390
391static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
392 .rev_offs = 0x0000,
393 .sysc_offs = 0x002c,
394 .syss_offs = 0x0028,
395 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
396 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
397 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
398 SYSS_HAS_RESET_STATUS),
399 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
400 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
401 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
402 .sysc_fields = &omap_hwmod_sysc_type1,
403};
404
405static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
406 .name = "dma",
407 .sysc = &dra7xx_dma_sysc,
408};
409
410/* dma dev_attr */
411static struct omap_dma_dev_attr dma_dev_attr = {
412 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
413 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
414 .lch_count = 32,
415};
416
417/* dma_system */
Ambresh K90020c72013-07-09 13:02:16 +0530418static struct omap_hwmod dra7xx_dma_system_hwmod = {
419 .name = "dma_system",
420 .class = &dra7xx_dma_hwmod_class,
421 .clkdm_name = "dma_clkdm",
Ambresh K90020c72013-07-09 13:02:16 +0530422 .main_clk = "l3_iclk_div",
423 .prcm = {
424 .omap4 = {
425 .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
426 .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
427 },
428 },
429 .dev_attr = &dma_dev_attr,
430};
431
432/*
Peter Ujfalusi34b41822016-02-25 16:50:18 +0200433 * 'tpcc' class
434 *
435 */
436static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
437 .name = "tpcc",
438};
439
440static struct omap_hwmod dra7xx_tpcc_hwmod = {
441 .name = "tpcc",
442 .class = &dra7xx_tpcc_hwmod_class,
443 .clkdm_name = "l3main1_clkdm",
444 .main_clk = "l3_iclk_div",
445 .prcm = {
446 .omap4 = {
447 .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
448 .context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
449 },
450 },
451};
452
453/*
454 * 'tptc' class
455 *
456 */
457static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
458 .name = "tptc",
459};
460
461/* tptc0 */
462static struct omap_hwmod dra7xx_tptc0_hwmod = {
463 .name = "tptc0",
464 .class = &dra7xx_tptc_hwmod_class,
465 .clkdm_name = "l3main1_clkdm",
466 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
467 .main_clk = "l3_iclk_div",
468 .prcm = {
469 .omap4 = {
470 .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
471 .context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
472 .modulemode = MODULEMODE_HWCTRL,
473 },
474 },
475};
476
477/* tptc1 */
478static struct omap_hwmod dra7xx_tptc1_hwmod = {
479 .name = "tptc1",
480 .class = &dra7xx_tptc_hwmod_class,
481 .clkdm_name = "l3main1_clkdm",
482 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
483 .main_clk = "l3_iclk_div",
484 .prcm = {
485 .omap4 = {
486 .clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
487 .context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
488 .modulemode = MODULEMODE_HWCTRL,
489 },
490 },
491};
492
493/*
Ambresh K90020c72013-07-09 13:02:16 +0530494 * 'dss' class
495 *
496 */
497
498static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
499 .rev_offs = 0x0000,
500 .syss_offs = 0x0014,
501 .sysc_flags = SYSS_HAS_RESET_STATUS,
502};
503
504static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
505 .name = "dss",
506 .sysc = &dra7xx_dss_sysc,
507 .reset = omap_dss_reset,
508};
509
510/* dss */
511static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
512 { .dma_req = 75 + DRA7XX_DMA_REQ_START },
513 { .dma_req = -1 }
514};
515
516static struct omap_hwmod_opt_clk dss_opt_clks[] = {
517 { .role = "dss_clk", .clk = "dss_dss_clk" },
518 { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
519 { .role = "32khz_clk", .clk = "dss_32khz_clk" },
520 { .role = "video2_clk", .clk = "dss_video2_clk" },
521 { .role = "video1_clk", .clk = "dss_video1_clk" },
522 { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
Tomi Valkeinen2d5a3c82015-02-23 12:53:56 +0200523 { .role = "hdcp_clk", .clk = "dss_deshdcp_clk" },
Ambresh K90020c72013-07-09 13:02:16 +0530524};
525
526static struct omap_hwmod dra7xx_dss_hwmod = {
527 .name = "dss_core",
528 .class = &dra7xx_dss_hwmod_class,
529 .clkdm_name = "dss_clkdm",
530 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
531 .sdma_reqs = dra7xx_dss_sdma_reqs,
532 .main_clk = "dss_dss_clk",
533 .prcm = {
534 .omap4 = {
535 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
536 .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
537 .modulemode = MODULEMODE_SWCTRL,
538 },
539 },
540 .opt_clks = dss_opt_clks,
541 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
542};
543
544/*
545 * 'dispc' class
546 * display controller
547 */
548
549static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
550 .rev_offs = 0x0000,
551 .sysc_offs = 0x0010,
552 .syss_offs = 0x0014,
553 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
554 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
555 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
556 SYSS_HAS_RESET_STATUS),
557 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
558 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
559 .sysc_fields = &omap_hwmod_sysc_type1,
560};
561
562static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
563 .name = "dispc",
564 .sysc = &dra7xx_dispc_sysc,
565};
566
567/* dss_dispc */
568/* dss_dispc dev_attr */
569static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
570 .has_framedonetv_irq = 1,
571 .manager_count = 4,
572};
573
574static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
575 .name = "dss_dispc",
576 .class = &dra7xx_dispc_hwmod_class,
577 .clkdm_name = "dss_clkdm",
578 .main_clk = "dss_dss_clk",
579 .prcm = {
580 .omap4 = {
581 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
582 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
583 },
584 },
585 .dev_attr = &dss_dispc_dev_attr,
Tomi Valkeinena3818c62014-10-09 16:45:56 +0300586 .parent_hwmod = &dra7xx_dss_hwmod,
Ambresh K90020c72013-07-09 13:02:16 +0530587};
588
589/*
590 * 'hdmi' class
591 * hdmi controller
592 */
593
594static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
595 .rev_offs = 0x0000,
596 .sysc_offs = 0x0010,
597 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
598 SYSC_HAS_SOFTRESET),
599 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
600 SIDLE_SMART_WKUP),
601 .sysc_fields = &omap_hwmod_sysc_type2,
602};
603
604static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
605 .name = "hdmi",
606 .sysc = &dra7xx_hdmi_sysc,
607};
608
609/* dss_hdmi */
610
611static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
612 { .role = "sys_clk", .clk = "dss_hdmi_clk" },
613};
614
615static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
616 .name = "dss_hdmi",
617 .class = &dra7xx_hdmi_hwmod_class,
618 .clkdm_name = "dss_clkdm",
619 .main_clk = "dss_48mhz_clk",
620 .prcm = {
621 .omap4 = {
622 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
623 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
624 },
625 },
626 .opt_clks = dss_hdmi_opt_clks,
627 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Tomi Valkeinena3818c62014-10-09 16:45:56 +0300628 .parent_hwmod = &dra7xx_dss_hwmod,
Ambresh K90020c72013-07-09 13:02:16 +0530629};
630
631/*
632 * 'elm' class
633 *
634 */
635
636static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
637 .rev_offs = 0x0000,
638 .sysc_offs = 0x0010,
639 .syss_offs = 0x0014,
640 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
641 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
642 SYSS_HAS_RESET_STATUS),
643 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
644 SIDLE_SMART_WKUP),
645 .sysc_fields = &omap_hwmod_sysc_type1,
646};
647
648static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
649 .name = "elm",
650 .sysc = &dra7xx_elm_sysc,
651};
652
653/* elm */
654
655static struct omap_hwmod dra7xx_elm_hwmod = {
656 .name = "elm",
657 .class = &dra7xx_elm_hwmod_class,
658 .clkdm_name = "l4per_clkdm",
659 .main_clk = "l3_iclk_div",
660 .prcm = {
661 .omap4 = {
662 .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
663 .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
664 },
665 },
666};
667
668/*
669 * 'gpio' class
670 *
671 */
672
673static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
674 .rev_offs = 0x0000,
675 .sysc_offs = 0x0010,
676 .syss_offs = 0x0114,
677 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
678 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
679 SYSS_HAS_RESET_STATUS),
680 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
681 SIDLE_SMART_WKUP),
682 .sysc_fields = &omap_hwmod_sysc_type1,
683};
684
685static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
686 .name = "gpio",
687 .sysc = &dra7xx_gpio_sysc,
688 .rev = 2,
689};
690
691/* gpio dev_attr */
692static struct omap_gpio_dev_attr gpio_dev_attr = {
693 .bank_width = 32,
694 .dbck_flag = true,
695};
696
697/* gpio1 */
698static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
699 { .role = "dbclk", .clk = "gpio1_dbclk" },
700};
701
702static struct omap_hwmod dra7xx_gpio1_hwmod = {
703 .name = "gpio1",
704 .class = &dra7xx_gpio_hwmod_class,
705 .clkdm_name = "wkupaon_clkdm",
706 .main_clk = "wkupaon_iclk_mux",
707 .prcm = {
708 .omap4 = {
709 .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
710 .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
711 .modulemode = MODULEMODE_HWCTRL,
712 },
713 },
714 .opt_clks = gpio1_opt_clks,
715 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
716 .dev_attr = &gpio_dev_attr,
717};
718
719/* gpio2 */
720static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
721 { .role = "dbclk", .clk = "gpio2_dbclk" },
722};
723
724static struct omap_hwmod dra7xx_gpio2_hwmod = {
725 .name = "gpio2",
726 .class = &dra7xx_gpio_hwmod_class,
727 .clkdm_name = "l4per_clkdm",
728 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
729 .main_clk = "l3_iclk_div",
730 .prcm = {
731 .omap4 = {
732 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
733 .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
734 .modulemode = MODULEMODE_HWCTRL,
735 },
736 },
737 .opt_clks = gpio2_opt_clks,
738 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
739 .dev_attr = &gpio_dev_attr,
740};
741
742/* gpio3 */
743static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
744 { .role = "dbclk", .clk = "gpio3_dbclk" },
745};
746
747static struct omap_hwmod dra7xx_gpio3_hwmod = {
748 .name = "gpio3",
749 .class = &dra7xx_gpio_hwmod_class,
750 .clkdm_name = "l4per_clkdm",
751 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
752 .main_clk = "l3_iclk_div",
753 .prcm = {
754 .omap4 = {
755 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
756 .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
757 .modulemode = MODULEMODE_HWCTRL,
758 },
759 },
760 .opt_clks = gpio3_opt_clks,
761 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
762 .dev_attr = &gpio_dev_attr,
763};
764
765/* gpio4 */
766static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
767 { .role = "dbclk", .clk = "gpio4_dbclk" },
768};
769
770static struct omap_hwmod dra7xx_gpio4_hwmod = {
771 .name = "gpio4",
772 .class = &dra7xx_gpio_hwmod_class,
773 .clkdm_name = "l4per_clkdm",
774 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
775 .main_clk = "l3_iclk_div",
776 .prcm = {
777 .omap4 = {
778 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
779 .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
780 .modulemode = MODULEMODE_HWCTRL,
781 },
782 },
783 .opt_clks = gpio4_opt_clks,
784 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
785 .dev_attr = &gpio_dev_attr,
786};
787
788/* gpio5 */
789static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
790 { .role = "dbclk", .clk = "gpio5_dbclk" },
791};
792
793static struct omap_hwmod dra7xx_gpio5_hwmod = {
794 .name = "gpio5",
795 .class = &dra7xx_gpio_hwmod_class,
796 .clkdm_name = "l4per_clkdm",
797 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
798 .main_clk = "l3_iclk_div",
799 .prcm = {
800 .omap4 = {
801 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
802 .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
803 .modulemode = MODULEMODE_HWCTRL,
804 },
805 },
806 .opt_clks = gpio5_opt_clks,
807 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
808 .dev_attr = &gpio_dev_attr,
809};
810
811/* gpio6 */
812static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
813 { .role = "dbclk", .clk = "gpio6_dbclk" },
814};
815
816static struct omap_hwmod dra7xx_gpio6_hwmod = {
817 .name = "gpio6",
818 .class = &dra7xx_gpio_hwmod_class,
819 .clkdm_name = "l4per_clkdm",
820 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
821 .main_clk = "l3_iclk_div",
822 .prcm = {
823 .omap4 = {
824 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
825 .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
826 .modulemode = MODULEMODE_HWCTRL,
827 },
828 },
829 .opt_clks = gpio6_opt_clks,
830 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
831 .dev_attr = &gpio_dev_attr,
832};
833
834/* gpio7 */
835static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
836 { .role = "dbclk", .clk = "gpio7_dbclk" },
837};
838
839static struct omap_hwmod dra7xx_gpio7_hwmod = {
840 .name = "gpio7",
841 .class = &dra7xx_gpio_hwmod_class,
842 .clkdm_name = "l4per_clkdm",
843 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
844 .main_clk = "l3_iclk_div",
845 .prcm = {
846 .omap4 = {
847 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
848 .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
849 .modulemode = MODULEMODE_HWCTRL,
850 },
851 },
852 .opt_clks = gpio7_opt_clks,
853 .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
854 .dev_attr = &gpio_dev_attr,
855};
856
857/* gpio8 */
858static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
859 { .role = "dbclk", .clk = "gpio8_dbclk" },
860};
861
862static struct omap_hwmod dra7xx_gpio8_hwmod = {
863 .name = "gpio8",
864 .class = &dra7xx_gpio_hwmod_class,
865 .clkdm_name = "l4per_clkdm",
866 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
867 .main_clk = "l3_iclk_div",
868 .prcm = {
869 .omap4 = {
870 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
871 .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
872 .modulemode = MODULEMODE_HWCTRL,
873 },
874 },
875 .opt_clks = gpio8_opt_clks,
876 .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
877 .dev_attr = &gpio_dev_attr,
878};
879
880/*
881 * 'gpmc' class
882 *
883 */
884
885static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
886 .rev_offs = 0x0000,
887 .sysc_offs = 0x0010,
888 .syss_offs = 0x0014,
889 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
890 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Roger Quadros91a57732015-07-08 17:34:43 +0300891 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Ambresh K90020c72013-07-09 13:02:16 +0530892 .sysc_fields = &omap_hwmod_sysc_type1,
893};
894
895static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
896 .name = "gpmc",
897 .sysc = &dra7xx_gpmc_sysc,
898};
899
900/* gpmc */
901
902static struct omap_hwmod dra7xx_gpmc_hwmod = {
903 .name = "gpmc",
904 .class = &dra7xx_gpmc_hwmod_class,
905 .clkdm_name = "l3main1_clkdm",
Tony Lindgren63aa9452015-06-01 19:22:10 -0600906 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
Roger Quadros91a57732015-07-08 17:34:43 +0300907 .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +0530908 .main_clk = "l3_iclk_div",
909 .prcm = {
910 .omap4 = {
911 .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
912 .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
913 .modulemode = MODULEMODE_HWCTRL,
914 },
915 },
916};
917
918/*
919 * 'hdq1w' class
920 *
921 */
922
923static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
924 .rev_offs = 0x0000,
925 .sysc_offs = 0x0014,
926 .syss_offs = 0x0018,
927 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
928 SYSS_HAS_RESET_STATUS),
929 .sysc_fields = &omap_hwmod_sysc_type1,
930};
931
932static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
933 .name = "hdq1w",
934 .sysc = &dra7xx_hdq1w_sysc,
935};
936
937/* hdq1w */
938
939static struct omap_hwmod dra7xx_hdq1w_hwmod = {
940 .name = "hdq1w",
941 .class = &dra7xx_hdq1w_hwmod_class,
942 .clkdm_name = "l4per_clkdm",
943 .flags = HWMOD_INIT_NO_RESET,
944 .main_clk = "func_12m_fclk",
945 .prcm = {
946 .omap4 = {
947 .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
948 .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
949 .modulemode = MODULEMODE_SWCTRL,
950 },
951 },
952};
953
954/*
955 * 'i2c' class
956 *
957 */
958
959static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
960 .sysc_offs = 0x0010,
961 .syss_offs = 0x0090,
962 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
963 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
964 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
965 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
966 SIDLE_SMART_WKUP),
967 .clockact = CLOCKACT_TEST_ICLK,
968 .sysc_fields = &omap_hwmod_sysc_type1,
969};
970
971static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
972 .name = "i2c",
973 .sysc = &dra7xx_i2c_sysc,
974 .reset = &omap_i2c_reset,
975 .rev = OMAP_I2C_IP_VERSION_2,
976};
977
978/* i2c dev_attr */
979static struct omap_i2c_dev_attr i2c_dev_attr = {
980 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
981};
982
983/* i2c1 */
984static struct omap_hwmod dra7xx_i2c1_hwmod = {
985 .name = "i2c1",
986 .class = &dra7xx_i2c_hwmod_class,
987 .clkdm_name = "l4per_clkdm",
988 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
989 .main_clk = "func_96m_fclk",
990 .prcm = {
991 .omap4 = {
992 .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
993 .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
994 .modulemode = MODULEMODE_SWCTRL,
995 },
996 },
997 .dev_attr = &i2c_dev_attr,
998};
999
1000/* i2c2 */
1001static struct omap_hwmod dra7xx_i2c2_hwmod = {
1002 .name = "i2c2",
1003 .class = &dra7xx_i2c_hwmod_class,
1004 .clkdm_name = "l4per_clkdm",
1005 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1006 .main_clk = "func_96m_fclk",
1007 .prcm = {
1008 .omap4 = {
1009 .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
1010 .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
1011 .modulemode = MODULEMODE_SWCTRL,
1012 },
1013 },
1014 .dev_attr = &i2c_dev_attr,
1015};
1016
1017/* i2c3 */
1018static struct omap_hwmod dra7xx_i2c3_hwmod = {
1019 .name = "i2c3",
1020 .class = &dra7xx_i2c_hwmod_class,
1021 .clkdm_name = "l4per_clkdm",
1022 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1023 .main_clk = "func_96m_fclk",
1024 .prcm = {
1025 .omap4 = {
1026 .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
1027 .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
1028 .modulemode = MODULEMODE_SWCTRL,
1029 },
1030 },
1031 .dev_attr = &i2c_dev_attr,
1032};
1033
1034/* i2c4 */
1035static struct omap_hwmod dra7xx_i2c4_hwmod = {
1036 .name = "i2c4",
1037 .class = &dra7xx_i2c_hwmod_class,
1038 .clkdm_name = "l4per_clkdm",
1039 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1040 .main_clk = "func_96m_fclk",
1041 .prcm = {
1042 .omap4 = {
1043 .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
1044 .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
1045 .modulemode = MODULEMODE_SWCTRL,
1046 },
1047 },
1048 .dev_attr = &i2c_dev_attr,
1049};
1050
1051/* i2c5 */
1052static struct omap_hwmod dra7xx_i2c5_hwmod = {
1053 .name = "i2c5",
1054 .class = &dra7xx_i2c_hwmod_class,
1055 .clkdm_name = "ipu_clkdm",
1056 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
1057 .main_clk = "func_96m_fclk",
1058 .prcm = {
1059 .omap4 = {
1060 .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
1061 .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
1062 .modulemode = MODULEMODE_SWCTRL,
1063 },
1064 },
1065 .dev_attr = &i2c_dev_attr,
1066};
1067
1068/*
Suman Anna067395d2014-07-11 16:44:39 -05001069 * 'mailbox' class
1070 *
1071 */
1072
1073static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
1074 .rev_offs = 0x0000,
1075 .sysc_offs = 0x0010,
1076 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1077 SYSC_HAS_SOFTRESET),
1078 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1079 .sysc_fields = &omap_hwmod_sysc_type2,
1080};
1081
1082static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
1083 .name = "mailbox",
1084 .sysc = &dra7xx_mailbox_sysc,
1085};
1086
1087/* mailbox1 */
1088static struct omap_hwmod dra7xx_mailbox1_hwmod = {
1089 .name = "mailbox1",
1090 .class = &dra7xx_mailbox_hwmod_class,
1091 .clkdm_name = "l4cfg_clkdm",
1092 .prcm = {
1093 .omap4 = {
1094 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
1095 .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
1096 },
1097 },
1098};
1099
1100/* mailbox2 */
1101static struct omap_hwmod dra7xx_mailbox2_hwmod = {
1102 .name = "mailbox2",
1103 .class = &dra7xx_mailbox_hwmod_class,
1104 .clkdm_name = "l4cfg_clkdm",
1105 .prcm = {
1106 .omap4 = {
1107 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
1108 .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
1109 },
1110 },
1111};
1112
1113/* mailbox3 */
1114static struct omap_hwmod dra7xx_mailbox3_hwmod = {
1115 .name = "mailbox3",
1116 .class = &dra7xx_mailbox_hwmod_class,
1117 .clkdm_name = "l4cfg_clkdm",
1118 .prcm = {
1119 .omap4 = {
1120 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
1121 .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
1122 },
1123 },
1124};
1125
1126/* mailbox4 */
1127static struct omap_hwmod dra7xx_mailbox4_hwmod = {
1128 .name = "mailbox4",
1129 .class = &dra7xx_mailbox_hwmod_class,
1130 .clkdm_name = "l4cfg_clkdm",
1131 .prcm = {
1132 .omap4 = {
1133 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
1134 .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
1135 },
1136 },
1137};
1138
1139/* mailbox5 */
1140static struct omap_hwmod dra7xx_mailbox5_hwmod = {
1141 .name = "mailbox5",
1142 .class = &dra7xx_mailbox_hwmod_class,
1143 .clkdm_name = "l4cfg_clkdm",
1144 .prcm = {
1145 .omap4 = {
1146 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
1147 .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
1148 },
1149 },
1150};
1151
1152/* mailbox6 */
1153static struct omap_hwmod dra7xx_mailbox6_hwmod = {
1154 .name = "mailbox6",
1155 .class = &dra7xx_mailbox_hwmod_class,
1156 .clkdm_name = "l4cfg_clkdm",
1157 .prcm = {
1158 .omap4 = {
1159 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
1160 .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
1161 },
1162 },
1163};
1164
1165/* mailbox7 */
1166static struct omap_hwmod dra7xx_mailbox7_hwmod = {
1167 .name = "mailbox7",
1168 .class = &dra7xx_mailbox_hwmod_class,
1169 .clkdm_name = "l4cfg_clkdm",
1170 .prcm = {
1171 .omap4 = {
1172 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
1173 .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
1174 },
1175 },
1176};
1177
1178/* mailbox8 */
1179static struct omap_hwmod dra7xx_mailbox8_hwmod = {
1180 .name = "mailbox8",
1181 .class = &dra7xx_mailbox_hwmod_class,
1182 .clkdm_name = "l4cfg_clkdm",
1183 .prcm = {
1184 .omap4 = {
1185 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
1186 .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
1187 },
1188 },
1189};
1190
1191/* mailbox9 */
1192static struct omap_hwmod dra7xx_mailbox9_hwmod = {
1193 .name = "mailbox9",
1194 .class = &dra7xx_mailbox_hwmod_class,
1195 .clkdm_name = "l4cfg_clkdm",
1196 .prcm = {
1197 .omap4 = {
1198 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
1199 .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
1200 },
1201 },
1202};
1203
1204/* mailbox10 */
1205static struct omap_hwmod dra7xx_mailbox10_hwmod = {
1206 .name = "mailbox10",
1207 .class = &dra7xx_mailbox_hwmod_class,
1208 .clkdm_name = "l4cfg_clkdm",
1209 .prcm = {
1210 .omap4 = {
1211 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
1212 .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
1213 },
1214 },
1215};
1216
1217/* mailbox11 */
1218static struct omap_hwmod dra7xx_mailbox11_hwmod = {
1219 .name = "mailbox11",
1220 .class = &dra7xx_mailbox_hwmod_class,
1221 .clkdm_name = "l4cfg_clkdm",
1222 .prcm = {
1223 .omap4 = {
1224 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
1225 .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
1226 },
1227 },
1228};
1229
1230/* mailbox12 */
1231static struct omap_hwmod dra7xx_mailbox12_hwmod = {
1232 .name = "mailbox12",
1233 .class = &dra7xx_mailbox_hwmod_class,
1234 .clkdm_name = "l4cfg_clkdm",
1235 .prcm = {
1236 .omap4 = {
1237 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
1238 .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
1239 },
1240 },
1241};
1242
1243/* mailbox13 */
1244static struct omap_hwmod dra7xx_mailbox13_hwmod = {
1245 .name = "mailbox13",
1246 .class = &dra7xx_mailbox_hwmod_class,
1247 .clkdm_name = "l4cfg_clkdm",
1248 .prcm = {
1249 .omap4 = {
1250 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
1251 .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
1252 },
1253 },
1254};
1255
1256/*
Ambresh K90020c72013-07-09 13:02:16 +05301257 * 'mcspi' class
1258 *
1259 */
1260
1261static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
1262 .rev_offs = 0x0000,
1263 .sysc_offs = 0x0010,
1264 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1265 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1266 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1267 SIDLE_SMART_WKUP),
1268 .sysc_fields = &omap_hwmod_sysc_type2,
1269};
1270
1271static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
1272 .name = "mcspi",
1273 .sysc = &dra7xx_mcspi_sysc,
1274 .rev = OMAP4_MCSPI_REV,
1275};
1276
1277/* mcspi1 */
1278/* mcspi1 dev_attr */
1279static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
1280 .num_chipselect = 4,
1281};
1282
1283static struct omap_hwmod dra7xx_mcspi1_hwmod = {
1284 .name = "mcspi1",
1285 .class = &dra7xx_mcspi_hwmod_class,
1286 .clkdm_name = "l4per_clkdm",
1287 .main_clk = "func_48m_fclk",
1288 .prcm = {
1289 .omap4 = {
1290 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
1291 .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
1292 .modulemode = MODULEMODE_SWCTRL,
1293 },
1294 },
1295 .dev_attr = &mcspi1_dev_attr,
1296};
1297
1298/* mcspi2 */
1299/* mcspi2 dev_attr */
1300static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
1301 .num_chipselect = 2,
1302};
1303
1304static struct omap_hwmod dra7xx_mcspi2_hwmod = {
1305 .name = "mcspi2",
1306 .class = &dra7xx_mcspi_hwmod_class,
1307 .clkdm_name = "l4per_clkdm",
1308 .main_clk = "func_48m_fclk",
1309 .prcm = {
1310 .omap4 = {
1311 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
1312 .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
1313 .modulemode = MODULEMODE_SWCTRL,
1314 },
1315 },
1316 .dev_attr = &mcspi2_dev_attr,
1317};
1318
1319/* mcspi3 */
1320/* mcspi3 dev_attr */
1321static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
1322 .num_chipselect = 2,
1323};
1324
1325static struct omap_hwmod dra7xx_mcspi3_hwmod = {
1326 .name = "mcspi3",
1327 .class = &dra7xx_mcspi_hwmod_class,
1328 .clkdm_name = "l4per_clkdm",
1329 .main_clk = "func_48m_fclk",
1330 .prcm = {
1331 .omap4 = {
1332 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
1333 .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
1334 .modulemode = MODULEMODE_SWCTRL,
1335 },
1336 },
1337 .dev_attr = &mcspi3_dev_attr,
1338};
1339
1340/* mcspi4 */
1341/* mcspi4 dev_attr */
1342static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
1343 .num_chipselect = 1,
1344};
1345
1346static struct omap_hwmod dra7xx_mcspi4_hwmod = {
1347 .name = "mcspi4",
1348 .class = &dra7xx_mcspi_hwmod_class,
1349 .clkdm_name = "l4per_clkdm",
1350 .main_clk = "func_48m_fclk",
1351 .prcm = {
1352 .omap4 = {
1353 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
1354 .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
1355 .modulemode = MODULEMODE_SWCTRL,
1356 },
1357 },
1358 .dev_attr = &mcspi4_dev_attr,
1359};
1360
1361/*
Peter Ujfalusi469689a452015-11-12 09:32:59 +02001362 * 'mcasp' class
1363 *
1364 */
1365static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = {
1366 .sysc_offs = 0x0004,
1367 .sysc_flags = SYSC_HAS_SIDLEMODE,
1368 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1369 .sysc_fields = &omap_hwmod_sysc_type3,
1370};
1371
1372static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = {
1373 .name = "mcasp",
1374 .sysc = &dra7xx_mcasp_sysc,
1375};
1376
Peter Ujfalusi9ad4d9a2016-04-10 13:20:09 -06001377/* mcasp1 */
1378static struct omap_hwmod_opt_clk mcasp1_opt_clks[] = {
1379 { .role = "ahclkx", .clk = "mcasp1_ahclkx_mux" },
1380 { .role = "ahclkr", .clk = "mcasp1_ahclkr_mux" },
1381};
1382
1383static struct omap_hwmod dra7xx_mcasp1_hwmod = {
1384 .name = "mcasp1",
1385 .class = &dra7xx_mcasp_hwmod_class,
1386 .clkdm_name = "ipu_clkdm",
1387 .main_clk = "mcasp1_aux_gfclk_mux",
1388 .flags = HWMOD_OPT_CLKS_NEEDED,
1389 .prcm = {
1390 .omap4 = {
1391 .clkctrl_offs = DRA7XX_CM_IPU_MCASP1_CLKCTRL_OFFSET,
1392 .context_offs = DRA7XX_RM_IPU_MCASP1_CONTEXT_OFFSET,
1393 .modulemode = MODULEMODE_SWCTRL,
1394 },
1395 },
1396 .opt_clks = mcasp1_opt_clks,
1397 .opt_clks_cnt = ARRAY_SIZE(mcasp1_opt_clks),
1398};
1399
1400/* mcasp2 */
1401static struct omap_hwmod_opt_clk mcasp2_opt_clks[] = {
1402 { .role = "ahclkx", .clk = "mcasp2_ahclkx_mux" },
1403 { .role = "ahclkr", .clk = "mcasp2_ahclkr_mux" },
1404};
1405
1406static struct omap_hwmod dra7xx_mcasp2_hwmod = {
1407 .name = "mcasp2",
1408 .class = &dra7xx_mcasp_hwmod_class,
1409 .clkdm_name = "l4per2_clkdm",
1410 .main_clk = "mcasp2_aux_gfclk_mux",
1411 .flags = HWMOD_OPT_CLKS_NEEDED,
1412 .prcm = {
1413 .omap4 = {
1414 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP2_CLKCTRL_OFFSET,
1415 .context_offs = DRA7XX_RM_L4PER2_MCASP2_CONTEXT_OFFSET,
1416 .modulemode = MODULEMODE_SWCTRL,
1417 },
1418 },
1419 .opt_clks = mcasp2_opt_clks,
1420 .opt_clks_cnt = ARRAY_SIZE(mcasp2_opt_clks),
1421};
1422
Peter Ujfalusi469689a452015-11-12 09:32:59 +02001423/* mcasp3 */
1424static struct omap_hwmod_opt_clk mcasp3_opt_clks[] = {
1425 { .role = "ahclkx", .clk = "mcasp3_ahclkx_mux" },
1426};
1427
1428static struct omap_hwmod dra7xx_mcasp3_hwmod = {
1429 .name = "mcasp3",
1430 .class = &dra7xx_mcasp_hwmod_class,
1431 .clkdm_name = "l4per2_clkdm",
1432 .main_clk = "mcasp3_aux_gfclk_mux",
1433 .flags = HWMOD_OPT_CLKS_NEEDED,
1434 .prcm = {
1435 .omap4 = {
1436 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
1437 .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET,
1438 .modulemode = MODULEMODE_SWCTRL,
1439 },
1440 },
1441 .opt_clks = mcasp3_opt_clks,
1442 .opt_clks_cnt = ARRAY_SIZE(mcasp3_opt_clks),
1443};
1444
Peter Ujfalusi9ad4d9a2016-04-10 13:20:09 -06001445/* mcasp4 */
1446static struct omap_hwmod_opt_clk mcasp4_opt_clks[] = {
1447 { .role = "ahclkx", .clk = "mcasp4_ahclkx_mux" },
1448};
1449
1450static struct omap_hwmod dra7xx_mcasp4_hwmod = {
1451 .name = "mcasp4",
1452 .class = &dra7xx_mcasp_hwmod_class,
1453 .clkdm_name = "l4per2_clkdm",
1454 .main_clk = "mcasp4_aux_gfclk_mux",
1455 .flags = HWMOD_OPT_CLKS_NEEDED,
1456 .prcm = {
1457 .omap4 = {
1458 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP4_CLKCTRL_OFFSET,
1459 .context_offs = DRA7XX_RM_L4PER2_MCASP4_CONTEXT_OFFSET,
1460 .modulemode = MODULEMODE_SWCTRL,
1461 },
1462 },
1463 .opt_clks = mcasp4_opt_clks,
1464 .opt_clks_cnt = ARRAY_SIZE(mcasp4_opt_clks),
1465};
1466
1467/* mcasp5 */
1468static struct omap_hwmod_opt_clk mcasp5_opt_clks[] = {
1469 { .role = "ahclkx", .clk = "mcasp5_ahclkx_mux" },
1470};
1471
1472static struct omap_hwmod dra7xx_mcasp5_hwmod = {
1473 .name = "mcasp5",
1474 .class = &dra7xx_mcasp_hwmod_class,
1475 .clkdm_name = "l4per2_clkdm",
1476 .main_clk = "mcasp5_aux_gfclk_mux",
1477 .flags = HWMOD_OPT_CLKS_NEEDED,
1478 .prcm = {
1479 .omap4 = {
1480 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP5_CLKCTRL_OFFSET,
1481 .context_offs = DRA7XX_RM_L4PER2_MCASP5_CONTEXT_OFFSET,
1482 .modulemode = MODULEMODE_SWCTRL,
1483 },
1484 },
1485 .opt_clks = mcasp5_opt_clks,
1486 .opt_clks_cnt = ARRAY_SIZE(mcasp5_opt_clks),
1487};
1488
1489/* mcasp6 */
1490static struct omap_hwmod_opt_clk mcasp6_opt_clks[] = {
1491 { .role = "ahclkx", .clk = "mcasp6_ahclkx_mux" },
1492};
1493
1494static struct omap_hwmod dra7xx_mcasp6_hwmod = {
1495 .name = "mcasp6",
1496 .class = &dra7xx_mcasp_hwmod_class,
1497 .clkdm_name = "l4per2_clkdm",
1498 .main_clk = "mcasp6_aux_gfclk_mux",
1499 .flags = HWMOD_OPT_CLKS_NEEDED,
1500 .prcm = {
1501 .omap4 = {
1502 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP6_CLKCTRL_OFFSET,
1503 .context_offs = DRA7XX_RM_L4PER2_MCASP6_CONTEXT_OFFSET,
1504 .modulemode = MODULEMODE_SWCTRL,
1505 },
1506 },
1507 .opt_clks = mcasp6_opt_clks,
1508 .opt_clks_cnt = ARRAY_SIZE(mcasp6_opt_clks),
1509};
1510
1511/* mcasp7 */
1512static struct omap_hwmod_opt_clk mcasp7_opt_clks[] = {
1513 { .role = "ahclkx", .clk = "mcasp7_ahclkx_mux" },
1514};
1515
1516static struct omap_hwmod dra7xx_mcasp7_hwmod = {
1517 .name = "mcasp7",
1518 .class = &dra7xx_mcasp_hwmod_class,
1519 .clkdm_name = "l4per2_clkdm",
1520 .main_clk = "mcasp7_aux_gfclk_mux",
1521 .flags = HWMOD_OPT_CLKS_NEEDED,
1522 .prcm = {
1523 .omap4 = {
1524 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP7_CLKCTRL_OFFSET,
1525 .context_offs = DRA7XX_RM_L4PER2_MCASP7_CONTEXT_OFFSET,
1526 .modulemode = MODULEMODE_SWCTRL,
1527 },
1528 },
1529 .opt_clks = mcasp7_opt_clks,
1530 .opt_clks_cnt = ARRAY_SIZE(mcasp7_opt_clks),
1531};
1532
1533/* mcasp8 */
1534static struct omap_hwmod_opt_clk mcasp8_opt_clks[] = {
1535 { .role = "ahclkx", .clk = "mcasp8_ahclkx_mux" },
1536};
1537
1538static struct omap_hwmod dra7xx_mcasp8_hwmod = {
1539 .name = "mcasp8",
1540 .class = &dra7xx_mcasp_hwmod_class,
1541 .clkdm_name = "l4per2_clkdm",
1542 .main_clk = "mcasp8_aux_gfclk_mux",
1543 .flags = HWMOD_OPT_CLKS_NEEDED,
1544 .prcm = {
1545 .omap4 = {
1546 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP8_CLKCTRL_OFFSET,
1547 .context_offs = DRA7XX_RM_L4PER2_MCASP8_CONTEXT_OFFSET,
1548 .modulemode = MODULEMODE_SWCTRL,
1549 },
1550 },
1551 .opt_clks = mcasp8_opt_clks,
1552 .opt_clks_cnt = ARRAY_SIZE(mcasp8_opt_clks),
1553};
1554
Peter Ujfalusi469689a452015-11-12 09:32:59 +02001555/*
Ambresh K90020c72013-07-09 13:02:16 +05301556 * 'mmc' class
1557 *
1558 */
1559
1560static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
1561 .rev_offs = 0x0000,
1562 .sysc_offs = 0x0010,
1563 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1564 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1565 SYSC_HAS_SOFTRESET),
1566 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1567 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1568 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1569 .sysc_fields = &omap_hwmod_sysc_type2,
1570};
1571
1572static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
1573 .name = "mmc",
1574 .sysc = &dra7xx_mmc_sysc,
1575};
1576
1577/* mmc1 */
1578static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
1579 { .role = "clk32k", .clk = "mmc1_clk32k" },
1580};
1581
1582/* mmc1 dev_attr */
Andreas Fenkart551434382014-11-08 15:33:09 +01001583static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Ambresh K90020c72013-07-09 13:02:16 +05301584 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1585};
1586
1587static struct omap_hwmod dra7xx_mmc1_hwmod = {
1588 .name = "mmc1",
1589 .class = &dra7xx_mmc_hwmod_class,
1590 .clkdm_name = "l3init_clkdm",
1591 .main_clk = "mmc1_fclk_div",
1592 .prcm = {
1593 .omap4 = {
1594 .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
1595 .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
1596 .modulemode = MODULEMODE_SWCTRL,
1597 },
1598 },
1599 .opt_clks = mmc1_opt_clks,
1600 .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
1601 .dev_attr = &mmc1_dev_attr,
1602};
1603
1604/* mmc2 */
1605static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
1606 { .role = "clk32k", .clk = "mmc2_clk32k" },
1607};
1608
1609static struct omap_hwmod dra7xx_mmc2_hwmod = {
1610 .name = "mmc2",
1611 .class = &dra7xx_mmc_hwmod_class,
1612 .clkdm_name = "l3init_clkdm",
1613 .main_clk = "mmc2_fclk_div",
1614 .prcm = {
1615 .omap4 = {
1616 .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
1617 .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
1618 .modulemode = MODULEMODE_SWCTRL,
1619 },
1620 },
1621 .opt_clks = mmc2_opt_clks,
1622 .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
1623};
1624
1625/* mmc3 */
1626static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
1627 { .role = "clk32k", .clk = "mmc3_clk32k" },
1628};
1629
1630static struct omap_hwmod dra7xx_mmc3_hwmod = {
1631 .name = "mmc3",
1632 .class = &dra7xx_mmc_hwmod_class,
1633 .clkdm_name = "l4per_clkdm",
1634 .main_clk = "mmc3_gfclk_div",
1635 .prcm = {
1636 .omap4 = {
1637 .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
1638 .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
1639 .modulemode = MODULEMODE_SWCTRL,
1640 },
1641 },
1642 .opt_clks = mmc3_opt_clks,
1643 .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
1644};
1645
1646/* mmc4 */
1647static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
1648 { .role = "clk32k", .clk = "mmc4_clk32k" },
1649};
1650
1651static struct omap_hwmod dra7xx_mmc4_hwmod = {
1652 .name = "mmc4",
1653 .class = &dra7xx_mmc_hwmod_class,
1654 .clkdm_name = "l4per_clkdm",
1655 .main_clk = "mmc4_gfclk_div",
1656 .prcm = {
1657 .omap4 = {
1658 .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
1659 .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
1660 .modulemode = MODULEMODE_SWCTRL,
1661 },
1662 },
1663 .opt_clks = mmc4_opt_clks,
1664 .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
1665};
1666
1667/*
1668 * 'mpu' class
1669 *
1670 */
1671
1672static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
1673 .name = "mpu",
1674};
1675
1676/* mpu */
1677static struct omap_hwmod dra7xx_mpu_hwmod = {
1678 .name = "mpu",
1679 .class = &dra7xx_mpu_hwmod_class,
1680 .clkdm_name = "mpu_clkdm",
1681 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1682 .main_clk = "dpll_mpu_m2_ck",
1683 .prcm = {
1684 .omap4 = {
1685 .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1686 .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
1687 },
1688 },
1689};
1690
1691/*
1692 * 'ocp2scp' class
1693 *
1694 */
1695
1696static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
1697 .rev_offs = 0x0000,
1698 .sysc_offs = 0x0010,
1699 .syss_offs = 0x0014,
1700 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1701 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Kishon Vijay Abraham I4965be12016-02-09 14:35:43 +05301702 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Ambresh K90020c72013-07-09 13:02:16 +05301703 .sysc_fields = &omap_hwmod_sysc_type1,
1704};
1705
1706static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
1707 .name = "ocp2scp",
1708 .sysc = &dra7xx_ocp2scp_sysc,
1709};
1710
1711/* ocp2scp1 */
1712static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
1713 .name = "ocp2scp1",
1714 .class = &dra7xx_ocp2scp_hwmod_class,
1715 .clkdm_name = "l3init_clkdm",
1716 .main_clk = "l4_root_clk_div",
1717 .prcm = {
1718 .omap4 = {
1719 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
1720 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
1721 .modulemode = MODULEMODE_HWCTRL,
1722 },
1723 },
1724};
1725
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06001726/* ocp2scp3 */
1727static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
1728 .name = "ocp2scp3",
1729 .class = &dra7xx_ocp2scp_hwmod_class,
1730 .clkdm_name = "l3init_clkdm",
1731 .main_clk = "l4_root_clk_div",
1732 .prcm = {
1733 .omap4 = {
1734 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
1735 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
1736 .modulemode = MODULEMODE_HWCTRL,
1737 },
1738 },
1739};
1740
Ambresh K90020c72013-07-09 13:02:16 +05301741/*
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301742 * 'PCIE' class
1743 *
1744 */
1745
Sekhar Nori1c96bee2016-02-18 16:49:56 +05301746/*
1747 * As noted in documentation for _reset() in omap_hwmod.c, the stock reset
1748 * functionality of OMAP HWMOD layer does not deassert the hardreset lines
1749 * associated with an IP automatically leaving the driver to handle that
1750 * by itself. This does not work for PCIeSS which needs the reset lines
1751 * deasserted for the driver to start accessing registers.
1752 *
1753 * We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
1754 * lines after asserting them.
1755 */
1756static int dra7xx_pciess_reset(struct omap_hwmod *oh)
1757{
1758 int i;
1759
1760 for (i = 0; i < oh->rst_lines_cnt; i++) {
1761 omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
1762 omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
1763 }
1764
1765 return 0;
1766}
1767
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05301768static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301769 .name = "pcie",
Sekhar Nori1c96bee2016-02-18 16:49:56 +05301770 .reset = dra7xx_pciess_reset,
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301771};
1772
1773/* pcie1 */
Kishon Vijay Abraham I8fe097a2016-01-14 19:41:10 +05301774static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
1775 { .name = "pcie", .rst_shift = 0 },
1776};
1777
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05301778static struct omap_hwmod dra7xx_pciess1_hwmod = {
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301779 .name = "pcie1",
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05301780 .class = &dra7xx_pciess_hwmod_class,
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301781 .clkdm_name = "pcie_clkdm",
Kishon Vijay Abraham I8fe097a2016-01-14 19:41:10 +05301782 .rst_lines = dra7xx_pciess1_resets,
1783 .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets),
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301784 .main_clk = "l4_root_clk_div",
1785 .prcm = {
1786 .omap4 = {
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05301787 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
Kishon Vijay Abraham I8fe097a2016-01-14 19:41:10 +05301788 .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05301789 .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
1790 .modulemode = MODULEMODE_SWCTRL,
1791 },
1792 },
1793};
1794
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05301795/* pcie2 */
Kishon Vijay Abraham I8fe097a2016-01-14 19:41:10 +05301796static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
1797 { .name = "pcie", .rst_shift = 1 },
1798};
1799
1800/* pcie2 */
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05301801static struct omap_hwmod dra7xx_pciess2_hwmod = {
1802 .name = "pcie2",
1803 .class = &dra7xx_pciess_hwmod_class,
1804 .clkdm_name = "pcie_clkdm",
Kishon Vijay Abraham I8fe097a2016-01-14 19:41:10 +05301805 .rst_lines = dra7xx_pciess2_resets,
1806 .rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets),
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05301807 .main_clk = "l4_root_clk_div",
1808 .prcm = {
1809 .omap4 = {
1810 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
Kishon Vijay Abraham I8fe097a2016-01-14 19:41:10 +05301811 .rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05301812 .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
1813 .modulemode = MODULEMODE_SWCTRL,
1814 },
1815 },
1816};
1817
Ambresh K90020c72013-07-09 13:02:16 +05301818/*
1819 * 'qspi' class
1820 *
1821 */
1822
1823static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
1824 .sysc_offs = 0x0010,
1825 .sysc_flags = SYSC_HAS_SIDLEMODE,
1826 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1827 SIDLE_SMART_WKUP),
1828 .sysc_fields = &omap_hwmod_sysc_type2,
1829};
1830
1831static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1832 .name = "qspi",
1833 .sysc = &dra7xx_qspi_sysc,
1834};
1835
1836/* qspi */
1837static struct omap_hwmod dra7xx_qspi_hwmod = {
1838 .name = "qspi",
1839 .class = &dra7xx_qspi_hwmod_class,
1840 .clkdm_name = "l4per2_clkdm",
1841 .main_clk = "qspi_gfclk_div",
1842 .prcm = {
1843 .omap4 = {
1844 .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1845 .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1846 .modulemode = MODULEMODE_SWCTRL,
1847 },
1848 },
1849};
1850
1851/*
Lokesh Vutlac913c8a2014-07-22 13:15:57 -06001852 * 'rtcss' class
1853 *
1854 */
1855static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
1856 .sysc_offs = 0x0078,
1857 .sysc_flags = SYSC_HAS_SIDLEMODE,
1858 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1859 SIDLE_SMART_WKUP),
1860 .sysc_fields = &omap_hwmod_sysc_type3,
1861};
1862
1863static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
1864 .name = "rtcss",
1865 .sysc = &dra7xx_rtcss_sysc,
1866};
1867
1868/* rtcss */
1869static struct omap_hwmod dra7xx_rtcss_hwmod = {
1870 .name = "rtcss",
1871 .class = &dra7xx_rtcss_hwmod_class,
1872 .clkdm_name = "rtc_clkdm",
1873 .main_clk = "sys_32k_ck",
1874 .prcm = {
1875 .omap4 = {
1876 .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
1877 .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
1878 .modulemode = MODULEMODE_SWCTRL,
1879 },
1880 },
1881};
1882
1883/*
Ambresh K90020c72013-07-09 13:02:16 +05301884 * 'sata' class
1885 *
1886 */
1887
1888static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
1889 .sysc_offs = 0x0000,
1890 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1891 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1892 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1893 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1894 .sysc_fields = &omap_hwmod_sysc_type2,
1895};
1896
1897static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1898 .name = "sata",
1899 .sysc = &dra7xx_sata_sysc,
1900};
1901
1902/* sata */
Ambresh K90020c72013-07-09 13:02:16 +05301903
1904static struct omap_hwmod dra7xx_sata_hwmod = {
1905 .name = "sata",
1906 .class = &dra7xx_sata_hwmod_class,
1907 .clkdm_name = "l3init_clkdm",
1908 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1909 .main_clk = "func_48m_fclk",
Roger Quadros1ea09992014-07-06 15:51:24 -06001910 .mpu_rt_idx = 1,
Ambresh K90020c72013-07-09 13:02:16 +05301911 .prcm = {
1912 .omap4 = {
1913 .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1914 .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1915 .modulemode = MODULEMODE_SWCTRL,
1916 },
1917 },
Ambresh K90020c72013-07-09 13:02:16 +05301918};
1919
1920/*
1921 * 'smartreflex' class
1922 *
1923 */
1924
1925/* The IP is not compliant to type1 / type2 scheme */
1926static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
1927 .sidle_shift = 24,
1928 .enwkup_shift = 26,
1929};
1930
1931static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
1932 .sysc_offs = 0x0038,
1933 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1934 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1935 SIDLE_SMART_WKUP),
1936 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
1937};
1938
1939static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1940 .name = "smartreflex",
1941 .sysc = &dra7xx_smartreflex_sysc,
1942 .rev = 2,
1943};
1944
1945/* smartreflex_core */
1946/* smartreflex_core dev_attr */
1947static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1948 .sensor_voltdm_name = "core",
1949};
1950
1951static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1952 .name = "smartreflex_core",
1953 .class = &dra7xx_smartreflex_hwmod_class,
1954 .clkdm_name = "coreaon_clkdm",
1955 .main_clk = "wkupaon_iclk_mux",
1956 .prcm = {
1957 .omap4 = {
1958 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1959 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1960 .modulemode = MODULEMODE_SWCTRL,
1961 },
1962 },
1963 .dev_attr = &smartreflex_core_dev_attr,
1964};
1965
1966/* smartreflex_mpu */
1967/* smartreflex_mpu dev_attr */
1968static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1969 .sensor_voltdm_name = "mpu",
1970};
1971
1972static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1973 .name = "smartreflex_mpu",
1974 .class = &dra7xx_smartreflex_hwmod_class,
1975 .clkdm_name = "coreaon_clkdm",
1976 .main_clk = "wkupaon_iclk_mux",
1977 .prcm = {
1978 .omap4 = {
1979 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1980 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1981 .modulemode = MODULEMODE_SWCTRL,
1982 },
1983 },
1984 .dev_attr = &smartreflex_mpu_dev_attr,
1985};
1986
1987/*
1988 * 'spinlock' class
1989 *
1990 */
1991
1992static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1993 .rev_offs = 0x0000,
1994 .sysc_offs = 0x0010,
1995 .syss_offs = 0x0014,
Suman Annac317d0f2014-01-10 17:43:08 -06001996 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1997 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1998 SYSS_HAS_RESET_STATUS),
1999 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Ambresh K90020c72013-07-09 13:02:16 +05302000 .sysc_fields = &omap_hwmod_sysc_type1,
2001};
2002
2003static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
2004 .name = "spinlock",
2005 .sysc = &dra7xx_spinlock_sysc,
2006};
2007
2008/* spinlock */
2009static struct omap_hwmod dra7xx_spinlock_hwmod = {
2010 .name = "spinlock",
2011 .class = &dra7xx_spinlock_hwmod_class,
2012 .clkdm_name = "l4cfg_clkdm",
2013 .main_clk = "l3_iclk_div",
2014 .prcm = {
2015 .omap4 = {
2016 .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
2017 .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
2018 },
2019 },
2020};
2021
2022/*
2023 * 'timer' class
2024 *
2025 * This class contains several variants: ['timer_1ms', 'timer_secure',
2026 * 'timer']
2027 */
2028
2029static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
2030 .rev_offs = 0x0000,
2031 .sysc_offs = 0x0010,
2032 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
2033 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2034 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2035 SIDLE_SMART_WKUP),
2036 .sysc_fields = &omap_hwmod_sysc_type2,
2037};
2038
2039static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
2040 .name = "timer",
2041 .sysc = &dra7xx_timer_1ms_sysc,
2042};
2043
Ambresh K90020c72013-07-09 13:02:16 +05302044static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
2045 .rev_offs = 0x0000,
2046 .sysc_offs = 0x0010,
2047 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
2048 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2049 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2050 SIDLE_SMART_WKUP),
2051 .sysc_fields = &omap_hwmod_sysc_type2,
2052};
2053
2054static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
2055 .name = "timer",
2056 .sysc = &dra7xx_timer_sysc,
2057};
2058
2059/* timer1 */
2060static struct omap_hwmod dra7xx_timer1_hwmod = {
2061 .name = "timer1",
2062 .class = &dra7xx_timer_1ms_hwmod_class,
2063 .clkdm_name = "wkupaon_clkdm",
2064 .main_clk = "timer1_gfclk_mux",
2065 .prcm = {
2066 .omap4 = {
2067 .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
2068 .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
2069 .modulemode = MODULEMODE_SWCTRL,
2070 },
2071 },
2072};
2073
2074/* timer2 */
2075static struct omap_hwmod dra7xx_timer2_hwmod = {
2076 .name = "timer2",
2077 .class = &dra7xx_timer_1ms_hwmod_class,
2078 .clkdm_name = "l4per_clkdm",
2079 .main_clk = "timer2_gfclk_mux",
2080 .prcm = {
2081 .omap4 = {
2082 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
2083 .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
2084 .modulemode = MODULEMODE_SWCTRL,
2085 },
2086 },
2087};
2088
2089/* timer3 */
2090static struct omap_hwmod dra7xx_timer3_hwmod = {
2091 .name = "timer3",
2092 .class = &dra7xx_timer_hwmod_class,
2093 .clkdm_name = "l4per_clkdm",
2094 .main_clk = "timer3_gfclk_mux",
2095 .prcm = {
2096 .omap4 = {
2097 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
2098 .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
2099 .modulemode = MODULEMODE_SWCTRL,
2100 },
2101 },
2102};
2103
2104/* timer4 */
2105static struct omap_hwmod dra7xx_timer4_hwmod = {
2106 .name = "timer4",
Suman Annaedec1782015-03-16 15:54:54 -05002107 .class = &dra7xx_timer_hwmod_class,
Ambresh K90020c72013-07-09 13:02:16 +05302108 .clkdm_name = "l4per_clkdm",
2109 .main_clk = "timer4_gfclk_mux",
2110 .prcm = {
2111 .omap4 = {
2112 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
2113 .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
2114 .modulemode = MODULEMODE_SWCTRL,
2115 },
2116 },
2117};
2118
2119/* timer5 */
2120static struct omap_hwmod dra7xx_timer5_hwmod = {
2121 .name = "timer5",
2122 .class = &dra7xx_timer_hwmod_class,
2123 .clkdm_name = "ipu_clkdm",
2124 .main_clk = "timer5_gfclk_mux",
2125 .prcm = {
2126 .omap4 = {
2127 .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
2128 .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
2129 .modulemode = MODULEMODE_SWCTRL,
2130 },
2131 },
2132};
2133
2134/* timer6 */
2135static struct omap_hwmod dra7xx_timer6_hwmod = {
2136 .name = "timer6",
2137 .class = &dra7xx_timer_hwmod_class,
2138 .clkdm_name = "ipu_clkdm",
2139 .main_clk = "timer6_gfclk_mux",
2140 .prcm = {
2141 .omap4 = {
2142 .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
2143 .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
2144 .modulemode = MODULEMODE_SWCTRL,
2145 },
2146 },
2147};
2148
2149/* timer7 */
2150static struct omap_hwmod dra7xx_timer7_hwmod = {
2151 .name = "timer7",
2152 .class = &dra7xx_timer_hwmod_class,
2153 .clkdm_name = "ipu_clkdm",
2154 .main_clk = "timer7_gfclk_mux",
2155 .prcm = {
2156 .omap4 = {
2157 .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
2158 .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
2159 .modulemode = MODULEMODE_SWCTRL,
2160 },
2161 },
2162};
2163
2164/* timer8 */
2165static struct omap_hwmod dra7xx_timer8_hwmod = {
2166 .name = "timer8",
2167 .class = &dra7xx_timer_hwmod_class,
2168 .clkdm_name = "ipu_clkdm",
2169 .main_clk = "timer8_gfclk_mux",
2170 .prcm = {
2171 .omap4 = {
2172 .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
2173 .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
2174 .modulemode = MODULEMODE_SWCTRL,
2175 },
2176 },
2177};
2178
2179/* timer9 */
2180static struct omap_hwmod dra7xx_timer9_hwmod = {
2181 .name = "timer9",
2182 .class = &dra7xx_timer_hwmod_class,
2183 .clkdm_name = "l4per_clkdm",
2184 .main_clk = "timer9_gfclk_mux",
2185 .prcm = {
2186 .omap4 = {
2187 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
2188 .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
2189 .modulemode = MODULEMODE_SWCTRL,
2190 },
2191 },
2192};
2193
2194/* timer10 */
2195static struct omap_hwmod dra7xx_timer10_hwmod = {
2196 .name = "timer10",
2197 .class = &dra7xx_timer_1ms_hwmod_class,
2198 .clkdm_name = "l4per_clkdm",
2199 .main_clk = "timer10_gfclk_mux",
2200 .prcm = {
2201 .omap4 = {
2202 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
2203 .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
2204 .modulemode = MODULEMODE_SWCTRL,
2205 },
2206 },
2207};
2208
2209/* timer11 */
2210static struct omap_hwmod dra7xx_timer11_hwmod = {
2211 .name = "timer11",
2212 .class = &dra7xx_timer_hwmod_class,
2213 .clkdm_name = "l4per_clkdm",
2214 .main_clk = "timer11_gfclk_mux",
2215 .prcm = {
2216 .omap4 = {
2217 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
2218 .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
2219 .modulemode = MODULEMODE_SWCTRL,
2220 },
2221 },
2222};
2223
Suman Anna1ac964f2015-03-16 15:54:53 -05002224/* timer13 */
2225static struct omap_hwmod dra7xx_timer13_hwmod = {
2226 .name = "timer13",
2227 .class = &dra7xx_timer_hwmod_class,
2228 .clkdm_name = "l4per3_clkdm",
2229 .main_clk = "timer13_gfclk_mux",
2230 .prcm = {
2231 .omap4 = {
2232 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
2233 .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
2234 .modulemode = MODULEMODE_SWCTRL,
2235 },
2236 },
2237};
2238
2239/* timer14 */
2240static struct omap_hwmod dra7xx_timer14_hwmod = {
2241 .name = "timer14",
2242 .class = &dra7xx_timer_hwmod_class,
2243 .clkdm_name = "l4per3_clkdm",
2244 .main_clk = "timer14_gfclk_mux",
2245 .prcm = {
2246 .omap4 = {
2247 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
2248 .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
2249 .modulemode = MODULEMODE_SWCTRL,
2250 },
2251 },
2252};
2253
2254/* timer15 */
2255static struct omap_hwmod dra7xx_timer15_hwmod = {
2256 .name = "timer15",
2257 .class = &dra7xx_timer_hwmod_class,
2258 .clkdm_name = "l4per3_clkdm",
2259 .main_clk = "timer15_gfclk_mux",
2260 .prcm = {
2261 .omap4 = {
2262 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
2263 .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
2264 .modulemode = MODULEMODE_SWCTRL,
2265 },
2266 },
2267};
2268
2269/* timer16 */
2270static struct omap_hwmod dra7xx_timer16_hwmod = {
2271 .name = "timer16",
2272 .class = &dra7xx_timer_hwmod_class,
2273 .clkdm_name = "l4per3_clkdm",
2274 .main_clk = "timer16_gfclk_mux",
2275 .prcm = {
2276 .omap4 = {
2277 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
2278 .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
2279 .modulemode = MODULEMODE_SWCTRL,
2280 },
2281 },
2282};
2283
Ambresh K90020c72013-07-09 13:02:16 +05302284/*
2285 * 'uart' class
2286 *
2287 */
2288
2289static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
2290 .rev_offs = 0x0050,
2291 .sysc_offs = 0x0054,
2292 .syss_offs = 0x0058,
2293 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
2294 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2295 SYSS_HAS_RESET_STATUS),
2296 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2297 SIDLE_SMART_WKUP),
2298 .sysc_fields = &omap_hwmod_sysc_type1,
2299};
2300
2301static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
2302 .name = "uart",
2303 .sysc = &dra7xx_uart_sysc,
2304};
2305
2306/* uart1 */
2307static struct omap_hwmod dra7xx_uart1_hwmod = {
2308 .name = "uart1",
2309 .class = &dra7xx_uart_hwmod_class,
2310 .clkdm_name = "l4per_clkdm",
2311 .main_clk = "uart1_gfclk_mux",
Rajendra Nayak38958c12013-12-12 15:22:49 +05302312 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +05302313 .prcm = {
2314 .omap4 = {
2315 .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
2316 .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
2317 .modulemode = MODULEMODE_SWCTRL,
2318 },
2319 },
2320};
2321
2322/* uart2 */
2323static struct omap_hwmod dra7xx_uart2_hwmod = {
2324 .name = "uart2",
2325 .class = &dra7xx_uart_hwmod_class,
2326 .clkdm_name = "l4per_clkdm",
2327 .main_clk = "uart2_gfclk_mux",
2328 .flags = HWMOD_SWSUP_SIDLE_ACT,
2329 .prcm = {
2330 .omap4 = {
2331 .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
2332 .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
2333 .modulemode = MODULEMODE_SWCTRL,
2334 },
2335 },
2336};
2337
2338/* uart3 */
2339static struct omap_hwmod dra7xx_uart3_hwmod = {
2340 .name = "uart3",
2341 .class = &dra7xx_uart_hwmod_class,
2342 .clkdm_name = "l4per_clkdm",
2343 .main_clk = "uart3_gfclk_mux",
Lokesh Vutla1c7e36b2015-01-08 17:22:04 +05302344 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +05302345 .prcm = {
2346 .omap4 = {
2347 .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
2348 .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
2349 .modulemode = MODULEMODE_SWCTRL,
2350 },
2351 },
2352};
2353
2354/* uart4 */
2355static struct omap_hwmod dra7xx_uart4_hwmod = {
2356 .name = "uart4",
2357 .class = &dra7xx_uart_hwmod_class,
2358 .clkdm_name = "l4per_clkdm",
2359 .main_clk = "uart4_gfclk_mux",
J.D. Schroederb0340852015-10-22 19:24:16 -05002360 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART4_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +05302361 .prcm = {
2362 .omap4 = {
2363 .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
2364 .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
2365 .modulemode = MODULEMODE_SWCTRL,
2366 },
2367 },
2368};
2369
2370/* uart5 */
2371static struct omap_hwmod dra7xx_uart5_hwmod = {
2372 .name = "uart5",
2373 .class = &dra7xx_uart_hwmod_class,
2374 .clkdm_name = "l4per_clkdm",
2375 .main_clk = "uart5_gfclk_mux",
2376 .flags = HWMOD_SWSUP_SIDLE_ACT,
2377 .prcm = {
2378 .omap4 = {
2379 .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
2380 .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
2381 .modulemode = MODULEMODE_SWCTRL,
2382 },
2383 },
2384};
2385
2386/* uart6 */
2387static struct omap_hwmod dra7xx_uart6_hwmod = {
2388 .name = "uart6",
2389 .class = &dra7xx_uart_hwmod_class,
2390 .clkdm_name = "ipu_clkdm",
2391 .main_clk = "uart6_gfclk_mux",
2392 .flags = HWMOD_SWSUP_SIDLE_ACT,
2393 .prcm = {
2394 .omap4 = {
2395 .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
2396 .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
2397 .modulemode = MODULEMODE_SWCTRL,
2398 },
2399 },
2400};
2401
Ambresh K33acc9f2014-10-21 11:17:51 -05002402/* uart7 */
2403static struct omap_hwmod dra7xx_uart7_hwmod = {
2404 .name = "uart7",
2405 .class = &dra7xx_uart_hwmod_class,
2406 .clkdm_name = "l4per2_clkdm",
2407 .main_clk = "uart7_gfclk_mux",
2408 .flags = HWMOD_SWSUP_SIDLE_ACT,
2409 .prcm = {
2410 .omap4 = {
2411 .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET,
2412 .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET,
2413 .modulemode = MODULEMODE_SWCTRL,
2414 },
2415 },
2416};
2417
2418/* uart8 */
2419static struct omap_hwmod dra7xx_uart8_hwmod = {
2420 .name = "uart8",
2421 .class = &dra7xx_uart_hwmod_class,
2422 .clkdm_name = "l4per2_clkdm",
2423 .main_clk = "uart8_gfclk_mux",
2424 .flags = HWMOD_SWSUP_SIDLE_ACT,
2425 .prcm = {
2426 .omap4 = {
2427 .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET,
2428 .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET,
2429 .modulemode = MODULEMODE_SWCTRL,
2430 },
2431 },
2432};
2433
2434/* uart9 */
2435static struct omap_hwmod dra7xx_uart9_hwmod = {
2436 .name = "uart9",
2437 .class = &dra7xx_uart_hwmod_class,
2438 .clkdm_name = "l4per2_clkdm",
2439 .main_clk = "uart9_gfclk_mux",
2440 .flags = HWMOD_SWSUP_SIDLE_ACT,
2441 .prcm = {
2442 .omap4 = {
2443 .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET,
2444 .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET,
2445 .modulemode = MODULEMODE_SWCTRL,
2446 },
2447 },
2448};
2449
2450/* uart10 */
2451static struct omap_hwmod dra7xx_uart10_hwmod = {
2452 .name = "uart10",
2453 .class = &dra7xx_uart_hwmod_class,
2454 .clkdm_name = "wkupaon_clkdm",
2455 .main_clk = "uart10_gfclk_mux",
2456 .flags = HWMOD_SWSUP_SIDLE_ACT,
2457 .prcm = {
2458 .omap4 = {
2459 .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET,
2460 .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET,
2461 .modulemode = MODULEMODE_SWCTRL,
2462 },
2463 },
2464};
2465
Ambresh K90020c72013-07-09 13:02:16 +05302466/*
2467 * 'usb_otg_ss' class
2468 *
2469 */
2470
Roger Quadrosd904b382014-07-06 15:51:24 -06002471static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
2472 .rev_offs = 0x0000,
2473 .sysc_offs = 0x0010,
2474 .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
2475 SYSC_HAS_SIDLEMODE),
2476 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2477 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2478 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2479 .sysc_fields = &omap_hwmod_sysc_type2,
2480};
2481
Ambresh K90020c72013-07-09 13:02:16 +05302482static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
2483 .name = "usb_otg_ss",
Roger Quadrosd904b382014-07-06 15:51:24 -06002484 .sysc = &dra7xx_usb_otg_ss_sysc,
Ambresh K90020c72013-07-09 13:02:16 +05302485};
2486
2487/* usb_otg_ss1 */
2488static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
2489 { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
2490};
2491
2492static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
2493 .name = "usb_otg_ss1",
2494 .class = &dra7xx_usb_otg_ss_hwmod_class,
2495 .clkdm_name = "l3init_clkdm",
2496 .main_clk = "dpll_core_h13x2_ck",
2497 .prcm = {
2498 .omap4 = {
2499 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
2500 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
2501 .modulemode = MODULEMODE_HWCTRL,
2502 },
2503 },
2504 .opt_clks = usb_otg_ss1_opt_clks,
2505 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
2506};
2507
2508/* usb_otg_ss2 */
2509static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
2510 { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
2511};
2512
2513static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
2514 .name = "usb_otg_ss2",
2515 .class = &dra7xx_usb_otg_ss_hwmod_class,
2516 .clkdm_name = "l3init_clkdm",
2517 .main_clk = "dpll_core_h13x2_ck",
2518 .prcm = {
2519 .omap4 = {
2520 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
2521 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
2522 .modulemode = MODULEMODE_HWCTRL,
2523 },
2524 },
2525 .opt_clks = usb_otg_ss2_opt_clks,
2526 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
2527};
2528
2529/* usb_otg_ss3 */
2530static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
2531 .name = "usb_otg_ss3",
2532 .class = &dra7xx_usb_otg_ss_hwmod_class,
2533 .clkdm_name = "l3init_clkdm",
2534 .main_clk = "dpll_core_h13x2_ck",
2535 .prcm = {
2536 .omap4 = {
2537 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
2538 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
2539 .modulemode = MODULEMODE_HWCTRL,
2540 },
2541 },
2542};
2543
2544/* usb_otg_ss4 */
2545static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
2546 .name = "usb_otg_ss4",
2547 .class = &dra7xx_usb_otg_ss_hwmod_class,
2548 .clkdm_name = "l3init_clkdm",
2549 .main_clk = "dpll_core_h13x2_ck",
2550 .prcm = {
2551 .omap4 = {
2552 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
2553 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
2554 .modulemode = MODULEMODE_HWCTRL,
2555 },
2556 },
2557};
2558
2559/*
2560 * 'vcp' class
2561 *
2562 */
2563
2564static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
2565 .name = "vcp",
2566};
2567
2568/* vcp1 */
2569static struct omap_hwmod dra7xx_vcp1_hwmod = {
2570 .name = "vcp1",
2571 .class = &dra7xx_vcp_hwmod_class,
2572 .clkdm_name = "l3main1_clkdm",
2573 .main_clk = "l3_iclk_div",
2574 .prcm = {
2575 .omap4 = {
2576 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
2577 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
2578 },
2579 },
2580};
2581
2582/* vcp2 */
2583static struct omap_hwmod dra7xx_vcp2_hwmod = {
2584 .name = "vcp2",
2585 .class = &dra7xx_vcp_hwmod_class,
2586 .clkdm_name = "l3main1_clkdm",
2587 .main_clk = "l3_iclk_div",
2588 .prcm = {
2589 .omap4 = {
2590 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
2591 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
2592 },
2593 },
2594};
2595
2596/*
2597 * 'wd_timer' class
2598 *
2599 */
2600
2601static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
2602 .rev_offs = 0x0000,
2603 .sysc_offs = 0x0010,
2604 .syss_offs = 0x0014,
2605 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
2606 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2607 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2608 SIDLE_SMART_WKUP),
2609 .sysc_fields = &omap_hwmod_sysc_type1,
2610};
2611
2612static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
2613 .name = "wd_timer",
2614 .sysc = &dra7xx_wd_timer_sysc,
2615 .pre_shutdown = &omap2_wd_timer_disable,
2616 .reset = &omap2_wd_timer_reset,
2617};
2618
2619/* wd_timer2 */
2620static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
2621 .name = "wd_timer2",
2622 .class = &dra7xx_wd_timer_hwmod_class,
2623 .clkdm_name = "wkupaon_clkdm",
2624 .main_clk = "sys_32k_ck",
2625 .prcm = {
2626 .omap4 = {
2627 .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
2628 .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
2629 .modulemode = MODULEMODE_SWCTRL,
2630 },
2631 },
2632};
2633
2634
2635/*
2636 * Interfaces
2637 */
2638
Tomi Valkeinen42121682014-09-15 13:12:18 -05002639/* l3_main_1 -> dmm */
2640static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dmm = {
2641 .master = &dra7xx_l3_main_1_hwmod,
2642 .slave = &dra7xx_dmm_hwmod,
2643 .clk = "l3_iclk_div",
2644 .user = OCP_USER_SDMA,
2645};
2646
Ambresh K90020c72013-07-09 13:02:16 +05302647/* l3_main_2 -> l3_instr */
2648static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
2649 .master = &dra7xx_l3_main_2_hwmod,
2650 .slave = &dra7xx_l3_instr_hwmod,
2651 .clk = "l3_iclk_div",
2652 .user = OCP_USER_MPU | OCP_USER_SDMA,
2653};
2654
2655/* l4_cfg -> l3_main_1 */
2656static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
2657 .master = &dra7xx_l4_cfg_hwmod,
2658 .slave = &dra7xx_l3_main_1_hwmod,
2659 .clk = "l3_iclk_div",
2660 .user = OCP_USER_MPU | OCP_USER_SDMA,
2661};
2662
2663/* mpu -> l3_main_1 */
2664static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
2665 .master = &dra7xx_mpu_hwmod,
2666 .slave = &dra7xx_l3_main_1_hwmod,
2667 .clk = "l3_iclk_div",
2668 .user = OCP_USER_MPU,
2669};
2670
2671/* l3_main_1 -> l3_main_2 */
2672static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
2673 .master = &dra7xx_l3_main_1_hwmod,
2674 .slave = &dra7xx_l3_main_2_hwmod,
2675 .clk = "l3_iclk_div",
2676 .user = OCP_USER_MPU,
2677};
2678
2679/* l4_cfg -> l3_main_2 */
2680static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
2681 .master = &dra7xx_l4_cfg_hwmod,
2682 .slave = &dra7xx_l3_main_2_hwmod,
2683 .clk = "l3_iclk_div",
2684 .user = OCP_USER_MPU | OCP_USER_SDMA,
2685};
2686
2687/* l3_main_1 -> l4_cfg */
2688static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
2689 .master = &dra7xx_l3_main_1_hwmod,
2690 .slave = &dra7xx_l4_cfg_hwmod,
2691 .clk = "l3_iclk_div",
2692 .user = OCP_USER_MPU | OCP_USER_SDMA,
2693};
2694
2695/* l3_main_1 -> l4_per1 */
2696static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
2697 .master = &dra7xx_l3_main_1_hwmod,
2698 .slave = &dra7xx_l4_per1_hwmod,
2699 .clk = "l3_iclk_div",
2700 .user = OCP_USER_MPU | OCP_USER_SDMA,
2701};
2702
2703/* l3_main_1 -> l4_per2 */
2704static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
2705 .master = &dra7xx_l3_main_1_hwmod,
2706 .slave = &dra7xx_l4_per2_hwmod,
2707 .clk = "l3_iclk_div",
2708 .user = OCP_USER_MPU | OCP_USER_SDMA,
2709};
2710
2711/* l3_main_1 -> l4_per3 */
2712static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
2713 .master = &dra7xx_l3_main_1_hwmod,
2714 .slave = &dra7xx_l4_per3_hwmod,
2715 .clk = "l3_iclk_div",
2716 .user = OCP_USER_MPU | OCP_USER_SDMA,
2717};
2718
2719/* l3_main_1 -> l4_wkup */
2720static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
2721 .master = &dra7xx_l3_main_1_hwmod,
2722 .slave = &dra7xx_l4_wkup_hwmod,
2723 .clk = "wkupaon_iclk_mux",
2724 .user = OCP_USER_MPU | OCP_USER_SDMA,
2725};
2726
2727/* l4_per2 -> atl */
2728static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
2729 .master = &dra7xx_l4_per2_hwmod,
2730 .slave = &dra7xx_atl_hwmod,
2731 .clk = "l3_iclk_div",
2732 .user = OCP_USER_MPU | OCP_USER_SDMA,
2733};
2734
2735/* l3_main_1 -> bb2d */
2736static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
2737 .master = &dra7xx_l3_main_1_hwmod,
2738 .slave = &dra7xx_bb2d_hwmod,
2739 .clk = "l3_iclk_div",
2740 .user = OCP_USER_MPU | OCP_USER_SDMA,
2741};
2742
2743/* l4_wkup -> counter_32k */
2744static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
2745 .master = &dra7xx_l4_wkup_hwmod,
2746 .slave = &dra7xx_counter_32k_hwmod,
2747 .clk = "wkupaon_iclk_mux",
2748 .user = OCP_USER_MPU | OCP_USER_SDMA,
2749};
2750
2751/* l4_wkup -> ctrl_module_wkup */
2752static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
2753 .master = &dra7xx_l4_wkup_hwmod,
2754 .slave = &dra7xx_ctrl_module_wkup_hwmod,
2755 .clk = "wkupaon_iclk_mux",
2756 .user = OCP_USER_MPU | OCP_USER_SDMA,
2757};
2758
Mugunthan V N077c42f2014-07-08 18:46:39 +05302759static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
2760 .master = &dra7xx_l4_per2_hwmod,
2761 .slave = &dra7xx_gmac_hwmod,
2762 .clk = "dpll_gmac_ck",
2763 .user = OCP_USER_MPU,
2764};
2765
2766static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
2767 .master = &dra7xx_gmac_hwmod,
2768 .slave = &dra7xx_mdio_hwmod,
2769 .user = OCP_USER_MPU,
2770};
2771
Ambresh K90020c72013-07-09 13:02:16 +05302772/* l4_wkup -> dcan1 */
2773static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
2774 .master = &dra7xx_l4_wkup_hwmod,
2775 .slave = &dra7xx_dcan1_hwmod,
2776 .clk = "wkupaon_iclk_mux",
2777 .user = OCP_USER_MPU | OCP_USER_SDMA,
2778};
2779
2780/* l4_per2 -> dcan2 */
2781static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
2782 .master = &dra7xx_l4_per2_hwmod,
2783 .slave = &dra7xx_dcan2_hwmod,
2784 .clk = "l3_iclk_div",
2785 .user = OCP_USER_MPU | OCP_USER_SDMA,
2786};
2787
2788static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
2789 {
2790 .pa_start = 0x4a056000,
2791 .pa_end = 0x4a056fff,
2792 .flags = ADDR_TYPE_RT
2793 },
2794 { }
2795};
2796
2797/* l4_cfg -> dma_system */
2798static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
2799 .master = &dra7xx_l4_cfg_hwmod,
2800 .slave = &dra7xx_dma_system_hwmod,
2801 .clk = "l3_iclk_div",
2802 .addr = dra7xx_dma_system_addrs,
2803 .user = OCP_USER_MPU | OCP_USER_SDMA,
2804};
2805
Peter Ujfalusi34b41822016-02-25 16:50:18 +02002806/* l3_main_1 -> tpcc */
2807static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
2808 .master = &dra7xx_l3_main_1_hwmod,
2809 .slave = &dra7xx_tpcc_hwmod,
2810 .clk = "l3_iclk_div",
2811 .user = OCP_USER_MPU,
2812};
2813
2814/* l3_main_1 -> tptc0 */
2815static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
2816 .master = &dra7xx_l3_main_1_hwmod,
2817 .slave = &dra7xx_tptc0_hwmod,
2818 .clk = "l3_iclk_div",
2819 .user = OCP_USER_MPU,
2820};
2821
2822/* l3_main_1 -> tptc1 */
2823static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
2824 .master = &dra7xx_l3_main_1_hwmod,
2825 .slave = &dra7xx_tptc1_hwmod,
2826 .clk = "l3_iclk_div",
2827 .user = OCP_USER_MPU,
2828};
2829
Ambresh K90020c72013-07-09 13:02:16 +05302830static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
2831 {
2832 .name = "family",
2833 .pa_start = 0x58000000,
2834 .pa_end = 0x5800007f,
2835 .flags = ADDR_TYPE_RT
2836 },
2837};
2838
2839/* l3_main_1 -> dss */
2840static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
2841 .master = &dra7xx_l3_main_1_hwmod,
2842 .slave = &dra7xx_dss_hwmod,
2843 .clk = "l3_iclk_div",
2844 .addr = dra7xx_dss_addrs,
2845 .user = OCP_USER_MPU | OCP_USER_SDMA,
2846};
2847
2848static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
2849 {
2850 .name = "dispc",
2851 .pa_start = 0x58001000,
2852 .pa_end = 0x58001fff,
2853 .flags = ADDR_TYPE_RT
2854 },
2855};
2856
2857/* l3_main_1 -> dispc */
2858static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
2859 .master = &dra7xx_l3_main_1_hwmod,
2860 .slave = &dra7xx_dss_dispc_hwmod,
2861 .clk = "l3_iclk_div",
2862 .addr = dra7xx_dss_dispc_addrs,
2863 .user = OCP_USER_MPU | OCP_USER_SDMA,
2864};
2865
2866static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
2867 {
2868 .name = "hdmi_wp",
2869 .pa_start = 0x58040000,
2870 .pa_end = 0x580400ff,
2871 .flags = ADDR_TYPE_RT
2872 },
2873 { }
2874};
2875
2876/* l3_main_1 -> dispc */
2877static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2878 .master = &dra7xx_l3_main_1_hwmod,
2879 .slave = &dra7xx_dss_hdmi_hwmod,
2880 .clk = "l3_iclk_div",
2881 .addr = dra7xx_dss_hdmi_addrs,
2882 .user = OCP_USER_MPU | OCP_USER_SDMA,
2883};
2884
Peter Ujfalusi9ad4d9a2016-04-10 13:20:09 -06002885/* l4_per2 -> mcasp1 */
2886static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp1 = {
2887 .master = &dra7xx_l4_per2_hwmod,
2888 .slave = &dra7xx_mcasp1_hwmod,
2889 .clk = "l4_root_clk_div",
2890 .user = OCP_USER_MPU | OCP_USER_SDMA,
2891};
2892
2893/* l3_main_1 -> mcasp1 */
2894static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp1 = {
2895 .master = &dra7xx_l3_main_1_hwmod,
2896 .slave = &dra7xx_mcasp1_hwmod,
2897 .clk = "l3_iclk_div",
2898 .user = OCP_USER_MPU | OCP_USER_SDMA,
2899};
2900
2901/* l4_per2 -> mcasp2 */
2902static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp2 = {
2903 .master = &dra7xx_l4_per2_hwmod,
2904 .slave = &dra7xx_mcasp2_hwmod,
2905 .clk = "l4_root_clk_div",
2906 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907};
2908
2909/* l3_main_1 -> mcasp2 */
2910static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp2 = {
2911 .master = &dra7xx_l3_main_1_hwmod,
2912 .slave = &dra7xx_mcasp2_hwmod,
2913 .clk = "l3_iclk_div",
2914 .user = OCP_USER_MPU | OCP_USER_SDMA,
2915};
2916
Peter Ujfalusi469689a452015-11-12 09:32:59 +02002917/* l4_per2 -> mcasp3 */
2918static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = {
2919 .master = &dra7xx_l4_per2_hwmod,
2920 .slave = &dra7xx_mcasp3_hwmod,
2921 .clk = "l4_root_clk_div",
2922 .user = OCP_USER_MPU | OCP_USER_SDMA,
2923};
2924
2925/* l3_main_1 -> mcasp3 */
2926static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp3 = {
2927 .master = &dra7xx_l3_main_1_hwmod,
2928 .slave = &dra7xx_mcasp3_hwmod,
2929 .clk = "l3_iclk_div",
2930 .user = OCP_USER_MPU | OCP_USER_SDMA,
2931};
2932
Peter Ujfalusi9ad4d9a2016-04-10 13:20:09 -06002933/* l4_per2 -> mcasp4 */
2934static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp4 = {
2935 .master = &dra7xx_l4_per2_hwmod,
2936 .slave = &dra7xx_mcasp4_hwmod,
2937 .clk = "l4_root_clk_div",
2938 .user = OCP_USER_MPU | OCP_USER_SDMA,
2939};
2940
2941/* l4_per2 -> mcasp5 */
2942static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp5 = {
2943 .master = &dra7xx_l4_per2_hwmod,
2944 .slave = &dra7xx_mcasp5_hwmod,
2945 .clk = "l4_root_clk_div",
2946 .user = OCP_USER_MPU | OCP_USER_SDMA,
2947};
2948
2949/* l4_per2 -> mcasp6 */
2950static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp6 = {
2951 .master = &dra7xx_l4_per2_hwmod,
2952 .slave = &dra7xx_mcasp6_hwmod,
2953 .clk = "l4_root_clk_div",
2954 .user = OCP_USER_MPU | OCP_USER_SDMA,
2955};
2956
2957/* l4_per2 -> mcasp7 */
2958static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp7 = {
2959 .master = &dra7xx_l4_per2_hwmod,
2960 .slave = &dra7xx_mcasp7_hwmod,
2961 .clk = "l4_root_clk_div",
2962 .user = OCP_USER_MPU | OCP_USER_SDMA,
2963};
2964
2965/* l4_per2 -> mcasp8 */
2966static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp8 = {
2967 .master = &dra7xx_l4_per2_hwmod,
2968 .slave = &dra7xx_mcasp8_hwmod,
2969 .clk = "l4_root_clk_div",
2970 .user = OCP_USER_MPU | OCP_USER_SDMA,
2971};
2972
Ambresh K90020c72013-07-09 13:02:16 +05302973/* l4_per1 -> elm */
2974static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2975 .master = &dra7xx_l4_per1_hwmod,
2976 .slave = &dra7xx_elm_hwmod,
2977 .clk = "l3_iclk_div",
Ambresh K90020c72013-07-09 13:02:16 +05302978 .user = OCP_USER_MPU | OCP_USER_SDMA,
2979};
2980
2981/* l4_wkup -> gpio1 */
2982static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
2983 .master = &dra7xx_l4_wkup_hwmod,
2984 .slave = &dra7xx_gpio1_hwmod,
2985 .clk = "wkupaon_iclk_mux",
2986 .user = OCP_USER_MPU | OCP_USER_SDMA,
2987};
2988
2989/* l4_per1 -> gpio2 */
2990static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
2991 .master = &dra7xx_l4_per1_hwmod,
2992 .slave = &dra7xx_gpio2_hwmod,
2993 .clk = "l3_iclk_div",
2994 .user = OCP_USER_MPU | OCP_USER_SDMA,
2995};
2996
2997/* l4_per1 -> gpio3 */
2998static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
2999 .master = &dra7xx_l4_per1_hwmod,
3000 .slave = &dra7xx_gpio3_hwmod,
3001 .clk = "l3_iclk_div",
3002 .user = OCP_USER_MPU | OCP_USER_SDMA,
3003};
3004
3005/* l4_per1 -> gpio4 */
3006static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
3007 .master = &dra7xx_l4_per1_hwmod,
3008 .slave = &dra7xx_gpio4_hwmod,
3009 .clk = "l3_iclk_div",
3010 .user = OCP_USER_MPU | OCP_USER_SDMA,
3011};
3012
3013/* l4_per1 -> gpio5 */
3014static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
3015 .master = &dra7xx_l4_per1_hwmod,
3016 .slave = &dra7xx_gpio5_hwmod,
3017 .clk = "l3_iclk_div",
3018 .user = OCP_USER_MPU | OCP_USER_SDMA,
3019};
3020
3021/* l4_per1 -> gpio6 */
3022static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
3023 .master = &dra7xx_l4_per1_hwmod,
3024 .slave = &dra7xx_gpio6_hwmod,
3025 .clk = "l3_iclk_div",
3026 .user = OCP_USER_MPU | OCP_USER_SDMA,
3027};
3028
3029/* l4_per1 -> gpio7 */
3030static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
3031 .master = &dra7xx_l4_per1_hwmod,
3032 .slave = &dra7xx_gpio7_hwmod,
3033 .clk = "l3_iclk_div",
3034 .user = OCP_USER_MPU | OCP_USER_SDMA,
3035};
3036
3037/* l4_per1 -> gpio8 */
3038static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
3039 .master = &dra7xx_l4_per1_hwmod,
3040 .slave = &dra7xx_gpio8_hwmod,
3041 .clk = "l3_iclk_div",
3042 .user = OCP_USER_MPU | OCP_USER_SDMA,
3043};
3044
Ambresh K90020c72013-07-09 13:02:16 +05303045/* l3_main_1 -> gpmc */
3046static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
3047 .master = &dra7xx_l3_main_1_hwmod,
3048 .slave = &dra7xx_gpmc_hwmod,
3049 .clk = "l3_iclk_div",
Ambresh K90020c72013-07-09 13:02:16 +05303050 .user = OCP_USER_MPU | OCP_USER_SDMA,
3051};
3052
3053static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
3054 {
3055 .pa_start = 0x480b2000,
3056 .pa_end = 0x480b201f,
3057 .flags = ADDR_TYPE_RT
3058 },
3059 { }
3060};
3061
3062/* l4_per1 -> hdq1w */
3063static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
3064 .master = &dra7xx_l4_per1_hwmod,
3065 .slave = &dra7xx_hdq1w_hwmod,
3066 .clk = "l3_iclk_div",
3067 .addr = dra7xx_hdq1w_addrs,
3068 .user = OCP_USER_MPU | OCP_USER_SDMA,
3069};
3070
3071/* l4_per1 -> i2c1 */
3072static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
3073 .master = &dra7xx_l4_per1_hwmod,
3074 .slave = &dra7xx_i2c1_hwmod,
3075 .clk = "l3_iclk_div",
3076 .user = OCP_USER_MPU | OCP_USER_SDMA,
3077};
3078
3079/* l4_per1 -> i2c2 */
3080static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
3081 .master = &dra7xx_l4_per1_hwmod,
3082 .slave = &dra7xx_i2c2_hwmod,
3083 .clk = "l3_iclk_div",
3084 .user = OCP_USER_MPU | OCP_USER_SDMA,
3085};
3086
3087/* l4_per1 -> i2c3 */
3088static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
3089 .master = &dra7xx_l4_per1_hwmod,
3090 .slave = &dra7xx_i2c3_hwmod,
3091 .clk = "l3_iclk_div",
3092 .user = OCP_USER_MPU | OCP_USER_SDMA,
3093};
3094
3095/* l4_per1 -> i2c4 */
3096static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
3097 .master = &dra7xx_l4_per1_hwmod,
3098 .slave = &dra7xx_i2c4_hwmod,
3099 .clk = "l3_iclk_div",
3100 .user = OCP_USER_MPU | OCP_USER_SDMA,
3101};
3102
3103/* l4_per1 -> i2c5 */
3104static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
3105 .master = &dra7xx_l4_per1_hwmod,
3106 .slave = &dra7xx_i2c5_hwmod,
3107 .clk = "l3_iclk_div",
3108 .user = OCP_USER_MPU | OCP_USER_SDMA,
3109};
3110
Suman Anna067395d2014-07-11 16:44:39 -05003111/* l4_cfg -> mailbox1 */
3112static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
3113 .master = &dra7xx_l4_cfg_hwmod,
3114 .slave = &dra7xx_mailbox1_hwmod,
3115 .clk = "l3_iclk_div",
3116 .user = OCP_USER_MPU | OCP_USER_SDMA,
3117};
3118
3119/* l4_per3 -> mailbox2 */
3120static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
3121 .master = &dra7xx_l4_per3_hwmod,
3122 .slave = &dra7xx_mailbox2_hwmod,
3123 .clk = "l3_iclk_div",
3124 .user = OCP_USER_MPU | OCP_USER_SDMA,
3125};
3126
3127/* l4_per3 -> mailbox3 */
3128static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
3129 .master = &dra7xx_l4_per3_hwmod,
3130 .slave = &dra7xx_mailbox3_hwmod,
3131 .clk = "l3_iclk_div",
3132 .user = OCP_USER_MPU | OCP_USER_SDMA,
3133};
3134
3135/* l4_per3 -> mailbox4 */
3136static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
3137 .master = &dra7xx_l4_per3_hwmod,
3138 .slave = &dra7xx_mailbox4_hwmod,
3139 .clk = "l3_iclk_div",
3140 .user = OCP_USER_MPU | OCP_USER_SDMA,
3141};
3142
3143/* l4_per3 -> mailbox5 */
3144static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
3145 .master = &dra7xx_l4_per3_hwmod,
3146 .slave = &dra7xx_mailbox5_hwmod,
3147 .clk = "l3_iclk_div",
3148 .user = OCP_USER_MPU | OCP_USER_SDMA,
3149};
3150
3151/* l4_per3 -> mailbox6 */
3152static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
3153 .master = &dra7xx_l4_per3_hwmod,
3154 .slave = &dra7xx_mailbox6_hwmod,
3155 .clk = "l3_iclk_div",
3156 .user = OCP_USER_MPU | OCP_USER_SDMA,
3157};
3158
3159/* l4_per3 -> mailbox7 */
3160static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
3161 .master = &dra7xx_l4_per3_hwmod,
3162 .slave = &dra7xx_mailbox7_hwmod,
3163 .clk = "l3_iclk_div",
3164 .user = OCP_USER_MPU | OCP_USER_SDMA,
3165};
3166
3167/* l4_per3 -> mailbox8 */
3168static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
3169 .master = &dra7xx_l4_per3_hwmod,
3170 .slave = &dra7xx_mailbox8_hwmod,
3171 .clk = "l3_iclk_div",
3172 .user = OCP_USER_MPU | OCP_USER_SDMA,
3173};
3174
3175/* l4_per3 -> mailbox9 */
3176static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
3177 .master = &dra7xx_l4_per3_hwmod,
3178 .slave = &dra7xx_mailbox9_hwmod,
3179 .clk = "l3_iclk_div",
3180 .user = OCP_USER_MPU | OCP_USER_SDMA,
3181};
3182
3183/* l4_per3 -> mailbox10 */
3184static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
3185 .master = &dra7xx_l4_per3_hwmod,
3186 .slave = &dra7xx_mailbox10_hwmod,
3187 .clk = "l3_iclk_div",
3188 .user = OCP_USER_MPU | OCP_USER_SDMA,
3189};
3190
3191/* l4_per3 -> mailbox11 */
3192static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
3193 .master = &dra7xx_l4_per3_hwmod,
3194 .slave = &dra7xx_mailbox11_hwmod,
3195 .clk = "l3_iclk_div",
3196 .user = OCP_USER_MPU | OCP_USER_SDMA,
3197};
3198
3199/* l4_per3 -> mailbox12 */
3200static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
3201 .master = &dra7xx_l4_per3_hwmod,
3202 .slave = &dra7xx_mailbox12_hwmod,
3203 .clk = "l3_iclk_div",
3204 .user = OCP_USER_MPU | OCP_USER_SDMA,
3205};
3206
3207/* l4_per3 -> mailbox13 */
3208static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
3209 .master = &dra7xx_l4_per3_hwmod,
3210 .slave = &dra7xx_mailbox13_hwmod,
3211 .clk = "l3_iclk_div",
3212 .user = OCP_USER_MPU | OCP_USER_SDMA,
3213};
3214
Ambresh K90020c72013-07-09 13:02:16 +05303215/* l4_per1 -> mcspi1 */
3216static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
3217 .master = &dra7xx_l4_per1_hwmod,
3218 .slave = &dra7xx_mcspi1_hwmod,
3219 .clk = "l3_iclk_div",
3220 .user = OCP_USER_MPU | OCP_USER_SDMA,
3221};
3222
3223/* l4_per1 -> mcspi2 */
3224static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
3225 .master = &dra7xx_l4_per1_hwmod,
3226 .slave = &dra7xx_mcspi2_hwmod,
3227 .clk = "l3_iclk_div",
3228 .user = OCP_USER_MPU | OCP_USER_SDMA,
3229};
3230
3231/* l4_per1 -> mcspi3 */
3232static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
3233 .master = &dra7xx_l4_per1_hwmod,
3234 .slave = &dra7xx_mcspi3_hwmod,
3235 .clk = "l3_iclk_div",
3236 .user = OCP_USER_MPU | OCP_USER_SDMA,
3237};
3238
3239/* l4_per1 -> mcspi4 */
3240static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
3241 .master = &dra7xx_l4_per1_hwmod,
3242 .slave = &dra7xx_mcspi4_hwmod,
3243 .clk = "l3_iclk_div",
3244 .user = OCP_USER_MPU | OCP_USER_SDMA,
3245};
3246
3247/* l4_per1 -> mmc1 */
3248static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
3249 .master = &dra7xx_l4_per1_hwmod,
3250 .slave = &dra7xx_mmc1_hwmod,
3251 .clk = "l3_iclk_div",
3252 .user = OCP_USER_MPU | OCP_USER_SDMA,
3253};
3254
3255/* l4_per1 -> mmc2 */
3256static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
3257 .master = &dra7xx_l4_per1_hwmod,
3258 .slave = &dra7xx_mmc2_hwmod,
3259 .clk = "l3_iclk_div",
3260 .user = OCP_USER_MPU | OCP_USER_SDMA,
3261};
3262
3263/* l4_per1 -> mmc3 */
3264static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
3265 .master = &dra7xx_l4_per1_hwmod,
3266 .slave = &dra7xx_mmc3_hwmod,
3267 .clk = "l3_iclk_div",
3268 .user = OCP_USER_MPU | OCP_USER_SDMA,
3269};
3270
3271/* l4_per1 -> mmc4 */
3272static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
3273 .master = &dra7xx_l4_per1_hwmod,
3274 .slave = &dra7xx_mmc4_hwmod,
3275 .clk = "l3_iclk_div",
3276 .user = OCP_USER_MPU | OCP_USER_SDMA,
3277};
3278
3279/* l4_cfg -> mpu */
3280static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
3281 .master = &dra7xx_l4_cfg_hwmod,
3282 .slave = &dra7xx_mpu_hwmod,
3283 .clk = "l3_iclk_div",
3284 .user = OCP_USER_MPU | OCP_USER_SDMA,
3285};
3286
Ambresh K90020c72013-07-09 13:02:16 +05303287/* l4_cfg -> ocp2scp1 */
3288static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
3289 .master = &dra7xx_l4_cfg_hwmod,
3290 .slave = &dra7xx_ocp2scp1_hwmod,
3291 .clk = "l4_root_clk_div",
Ambresh K90020c72013-07-09 13:02:16 +05303292 .user = OCP_USER_MPU | OCP_USER_SDMA,
3293};
3294
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06003295/* l4_cfg -> ocp2scp3 */
3296static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
3297 .master = &dra7xx_l4_cfg_hwmod,
3298 .slave = &dra7xx_ocp2scp3_hwmod,
3299 .clk = "l4_root_clk_div",
3300 .user = OCP_USER_MPU | OCP_USER_SDMA,
3301};
3302
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303303/* l3_main_1 -> pciess1 */
3304static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = {
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303305 .master = &dra7xx_l3_main_1_hwmod,
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303306 .slave = &dra7xx_pciess1_hwmod,
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303307 .clk = "l3_iclk_div",
3308 .user = OCP_USER_MPU | OCP_USER_SDMA,
3309};
3310
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303311/* l4_cfg -> pciess1 */
3312static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = {
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303313 .master = &dra7xx_l4_cfg_hwmod,
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303314 .slave = &dra7xx_pciess1_hwmod,
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303315 .clk = "l4_root_clk_div",
3316 .user = OCP_USER_MPU | OCP_USER_SDMA,
3317};
3318
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303319/* l3_main_1 -> pciess2 */
3320static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = {
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303321 .master = &dra7xx_l3_main_1_hwmod,
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303322 .slave = &dra7xx_pciess2_hwmod,
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303323 .clk = "l3_iclk_div",
3324 .user = OCP_USER_MPU | OCP_USER_SDMA,
3325};
3326
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303327/* l4_cfg -> pciess2 */
3328static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = {
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303329 .master = &dra7xx_l4_cfg_hwmod,
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303330 .slave = &dra7xx_pciess2_hwmod,
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05303331 .clk = "l4_root_clk_div",
3332 .user = OCP_USER_MPU | OCP_USER_SDMA,
3333};
3334
Ambresh K90020c72013-07-09 13:02:16 +05303335static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
3336 {
3337 .pa_start = 0x4b300000,
3338 .pa_end = 0x4b30007f,
3339 .flags = ADDR_TYPE_RT
3340 },
3341 { }
3342};
3343
3344/* l3_main_1 -> qspi */
3345static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
3346 .master = &dra7xx_l3_main_1_hwmod,
3347 .slave = &dra7xx_qspi_hwmod,
3348 .clk = "l3_iclk_div",
3349 .addr = dra7xx_qspi_addrs,
3350 .user = OCP_USER_MPU | OCP_USER_SDMA,
3351};
3352
Lokesh Vutlac913c8a2014-07-22 13:15:57 -06003353/* l4_per3 -> rtcss */
3354static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
3355 .master = &dra7xx_l4_per3_hwmod,
3356 .slave = &dra7xx_rtcss_hwmod,
3357 .clk = "l4_root_clk_div",
3358 .user = OCP_USER_MPU | OCP_USER_SDMA,
3359};
3360
Ambresh K90020c72013-07-09 13:02:16 +05303361static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
3362 {
3363 .name = "sysc",
3364 .pa_start = 0x4a141100,
3365 .pa_end = 0x4a141107,
3366 .flags = ADDR_TYPE_RT
3367 },
3368 { }
3369};
3370
3371/* l4_cfg -> sata */
3372static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
3373 .master = &dra7xx_l4_cfg_hwmod,
3374 .slave = &dra7xx_sata_hwmod,
3375 .clk = "l3_iclk_div",
3376 .addr = dra7xx_sata_addrs,
3377 .user = OCP_USER_MPU | OCP_USER_SDMA,
3378};
3379
3380static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
3381 {
3382 .pa_start = 0x4a0dd000,
3383 .pa_end = 0x4a0dd07f,
3384 .flags = ADDR_TYPE_RT
3385 },
3386 { }
3387};
3388
3389/* l4_cfg -> smartreflex_core */
3390static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
3391 .master = &dra7xx_l4_cfg_hwmod,
3392 .slave = &dra7xx_smartreflex_core_hwmod,
3393 .clk = "l4_root_clk_div",
3394 .addr = dra7xx_smartreflex_core_addrs,
3395 .user = OCP_USER_MPU | OCP_USER_SDMA,
3396};
3397
3398static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
3399 {
3400 .pa_start = 0x4a0d9000,
3401 .pa_end = 0x4a0d907f,
3402 .flags = ADDR_TYPE_RT
3403 },
3404 { }
3405};
3406
3407/* l4_cfg -> smartreflex_mpu */
3408static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
3409 .master = &dra7xx_l4_cfg_hwmod,
3410 .slave = &dra7xx_smartreflex_mpu_hwmod,
3411 .clk = "l4_root_clk_div",
3412 .addr = dra7xx_smartreflex_mpu_addrs,
3413 .user = OCP_USER_MPU | OCP_USER_SDMA,
3414};
3415
Ambresh K90020c72013-07-09 13:02:16 +05303416/* l4_cfg -> spinlock */
3417static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
3418 .master = &dra7xx_l4_cfg_hwmod,
3419 .slave = &dra7xx_spinlock_hwmod,
3420 .clk = "l3_iclk_div",
Ambresh K90020c72013-07-09 13:02:16 +05303421 .user = OCP_USER_MPU | OCP_USER_SDMA,
3422};
3423
3424/* l4_wkup -> timer1 */
3425static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
3426 .master = &dra7xx_l4_wkup_hwmod,
3427 .slave = &dra7xx_timer1_hwmod,
3428 .clk = "wkupaon_iclk_mux",
3429 .user = OCP_USER_MPU | OCP_USER_SDMA,
3430};
3431
3432/* l4_per1 -> timer2 */
3433static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
3434 .master = &dra7xx_l4_per1_hwmod,
3435 .slave = &dra7xx_timer2_hwmod,
3436 .clk = "l3_iclk_div",
3437 .user = OCP_USER_MPU | OCP_USER_SDMA,
3438};
3439
3440/* l4_per1 -> timer3 */
3441static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
3442 .master = &dra7xx_l4_per1_hwmod,
3443 .slave = &dra7xx_timer3_hwmod,
3444 .clk = "l3_iclk_div",
3445 .user = OCP_USER_MPU | OCP_USER_SDMA,
3446};
3447
3448/* l4_per1 -> timer4 */
3449static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
3450 .master = &dra7xx_l4_per1_hwmod,
3451 .slave = &dra7xx_timer4_hwmod,
3452 .clk = "l3_iclk_div",
3453 .user = OCP_USER_MPU | OCP_USER_SDMA,
3454};
3455
3456/* l4_per3 -> timer5 */
3457static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
3458 .master = &dra7xx_l4_per3_hwmod,
3459 .slave = &dra7xx_timer5_hwmod,
3460 .clk = "l3_iclk_div",
3461 .user = OCP_USER_MPU | OCP_USER_SDMA,
3462};
3463
3464/* l4_per3 -> timer6 */
3465static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
3466 .master = &dra7xx_l4_per3_hwmod,
3467 .slave = &dra7xx_timer6_hwmod,
3468 .clk = "l3_iclk_div",
3469 .user = OCP_USER_MPU | OCP_USER_SDMA,
3470};
3471
3472/* l4_per3 -> timer7 */
3473static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
3474 .master = &dra7xx_l4_per3_hwmod,
3475 .slave = &dra7xx_timer7_hwmod,
3476 .clk = "l3_iclk_div",
3477 .user = OCP_USER_MPU | OCP_USER_SDMA,
3478};
3479
3480/* l4_per3 -> timer8 */
3481static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
3482 .master = &dra7xx_l4_per3_hwmod,
3483 .slave = &dra7xx_timer8_hwmod,
3484 .clk = "l3_iclk_div",
3485 .user = OCP_USER_MPU | OCP_USER_SDMA,
3486};
3487
3488/* l4_per1 -> timer9 */
3489static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
3490 .master = &dra7xx_l4_per1_hwmod,
3491 .slave = &dra7xx_timer9_hwmod,
3492 .clk = "l3_iclk_div",
3493 .user = OCP_USER_MPU | OCP_USER_SDMA,
3494};
3495
3496/* l4_per1 -> timer10 */
3497static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
3498 .master = &dra7xx_l4_per1_hwmod,
3499 .slave = &dra7xx_timer10_hwmod,
3500 .clk = "l3_iclk_div",
3501 .user = OCP_USER_MPU | OCP_USER_SDMA,
3502};
3503
3504/* l4_per1 -> timer11 */
3505static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
3506 .master = &dra7xx_l4_per1_hwmod,
3507 .slave = &dra7xx_timer11_hwmod,
3508 .clk = "l3_iclk_div",
3509 .user = OCP_USER_MPU | OCP_USER_SDMA,
3510};
3511
Suman Anna1ac964f2015-03-16 15:54:53 -05003512/* l4_per3 -> timer13 */
3513static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
3514 .master = &dra7xx_l4_per3_hwmod,
3515 .slave = &dra7xx_timer13_hwmod,
3516 .clk = "l3_iclk_div",
3517 .user = OCP_USER_MPU | OCP_USER_SDMA,
3518};
3519
3520/* l4_per3 -> timer14 */
3521static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
3522 .master = &dra7xx_l4_per3_hwmod,
3523 .slave = &dra7xx_timer14_hwmod,
3524 .clk = "l3_iclk_div",
3525 .user = OCP_USER_MPU | OCP_USER_SDMA,
3526};
3527
3528/* l4_per3 -> timer15 */
3529static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
3530 .master = &dra7xx_l4_per3_hwmod,
3531 .slave = &dra7xx_timer15_hwmod,
3532 .clk = "l3_iclk_div",
3533 .user = OCP_USER_MPU | OCP_USER_SDMA,
3534};
3535
3536/* l4_per3 -> timer16 */
3537static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
3538 .master = &dra7xx_l4_per3_hwmod,
3539 .slave = &dra7xx_timer16_hwmod,
3540 .clk = "l3_iclk_div",
3541 .user = OCP_USER_MPU | OCP_USER_SDMA,
3542};
3543
Ambresh K90020c72013-07-09 13:02:16 +05303544/* l4_per1 -> uart1 */
3545static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
3546 .master = &dra7xx_l4_per1_hwmod,
3547 .slave = &dra7xx_uart1_hwmod,
3548 .clk = "l3_iclk_div",
3549 .user = OCP_USER_MPU | OCP_USER_SDMA,
3550};
3551
3552/* l4_per1 -> uart2 */
3553static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
3554 .master = &dra7xx_l4_per1_hwmod,
3555 .slave = &dra7xx_uart2_hwmod,
3556 .clk = "l3_iclk_div",
3557 .user = OCP_USER_MPU | OCP_USER_SDMA,
3558};
3559
3560/* l4_per1 -> uart3 */
3561static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
3562 .master = &dra7xx_l4_per1_hwmod,
3563 .slave = &dra7xx_uart3_hwmod,
3564 .clk = "l3_iclk_div",
3565 .user = OCP_USER_MPU | OCP_USER_SDMA,
3566};
3567
3568/* l4_per1 -> uart4 */
3569static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
3570 .master = &dra7xx_l4_per1_hwmod,
3571 .slave = &dra7xx_uart4_hwmod,
3572 .clk = "l3_iclk_div",
3573 .user = OCP_USER_MPU | OCP_USER_SDMA,
3574};
3575
3576/* l4_per1 -> uart5 */
3577static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
3578 .master = &dra7xx_l4_per1_hwmod,
3579 .slave = &dra7xx_uart5_hwmod,
3580 .clk = "l3_iclk_div",
3581 .user = OCP_USER_MPU | OCP_USER_SDMA,
3582};
3583
3584/* l4_per1 -> uart6 */
3585static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
3586 .master = &dra7xx_l4_per1_hwmod,
3587 .slave = &dra7xx_uart6_hwmod,
3588 .clk = "l3_iclk_div",
3589 .user = OCP_USER_MPU | OCP_USER_SDMA,
3590};
3591
Ambresh K33acc9f2014-10-21 11:17:51 -05003592/* l4_per2 -> uart7 */
3593static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
3594 .master = &dra7xx_l4_per2_hwmod,
3595 .slave = &dra7xx_uart7_hwmod,
3596 .clk = "l3_iclk_div",
3597 .user = OCP_USER_MPU | OCP_USER_SDMA,
3598};
3599
3600/* l4_per2 -> uart8 */
3601static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
3602 .master = &dra7xx_l4_per2_hwmod,
3603 .slave = &dra7xx_uart8_hwmod,
3604 .clk = "l3_iclk_div",
3605 .user = OCP_USER_MPU | OCP_USER_SDMA,
3606};
3607
3608/* l4_per2 -> uart9 */
3609static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = {
3610 .master = &dra7xx_l4_per2_hwmod,
3611 .slave = &dra7xx_uart9_hwmod,
3612 .clk = "l3_iclk_div",
3613 .user = OCP_USER_MPU | OCP_USER_SDMA,
3614};
3615
3616/* l4_wkup -> uart10 */
3617static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
3618 .master = &dra7xx_l4_wkup_hwmod,
3619 .slave = &dra7xx_uart10_hwmod,
3620 .clk = "wkupaon_iclk_mux",
3621 .user = OCP_USER_MPU | OCP_USER_SDMA,
3622};
3623
Ambresh K90020c72013-07-09 13:02:16 +05303624/* l4_per3 -> usb_otg_ss1 */
3625static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
3626 .master = &dra7xx_l4_per3_hwmod,
3627 .slave = &dra7xx_usb_otg_ss1_hwmod,
3628 .clk = "dpll_core_h13x2_ck",
3629 .user = OCP_USER_MPU | OCP_USER_SDMA,
3630};
3631
3632/* l4_per3 -> usb_otg_ss2 */
3633static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
3634 .master = &dra7xx_l4_per3_hwmod,
3635 .slave = &dra7xx_usb_otg_ss2_hwmod,
3636 .clk = "dpll_core_h13x2_ck",
3637 .user = OCP_USER_MPU | OCP_USER_SDMA,
3638};
3639
3640/* l4_per3 -> usb_otg_ss3 */
3641static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
3642 .master = &dra7xx_l4_per3_hwmod,
3643 .slave = &dra7xx_usb_otg_ss3_hwmod,
3644 .clk = "dpll_core_h13x2_ck",
3645 .user = OCP_USER_MPU | OCP_USER_SDMA,
3646};
3647
3648/* l4_per3 -> usb_otg_ss4 */
3649static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
3650 .master = &dra7xx_l4_per3_hwmod,
3651 .slave = &dra7xx_usb_otg_ss4_hwmod,
3652 .clk = "dpll_core_h13x2_ck",
3653 .user = OCP_USER_MPU | OCP_USER_SDMA,
3654};
3655
3656/* l3_main_1 -> vcp1 */
3657static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
3658 .master = &dra7xx_l3_main_1_hwmod,
3659 .slave = &dra7xx_vcp1_hwmod,
3660 .clk = "l3_iclk_div",
3661 .user = OCP_USER_MPU | OCP_USER_SDMA,
3662};
3663
3664/* l4_per2 -> vcp1 */
3665static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
3666 .master = &dra7xx_l4_per2_hwmod,
3667 .slave = &dra7xx_vcp1_hwmod,
3668 .clk = "l3_iclk_div",
3669 .user = OCP_USER_MPU | OCP_USER_SDMA,
3670};
3671
3672/* l3_main_1 -> vcp2 */
3673static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
3674 .master = &dra7xx_l3_main_1_hwmod,
3675 .slave = &dra7xx_vcp2_hwmod,
3676 .clk = "l3_iclk_div",
3677 .user = OCP_USER_MPU | OCP_USER_SDMA,
3678};
3679
3680/* l4_per2 -> vcp2 */
3681static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
3682 .master = &dra7xx_l4_per2_hwmod,
3683 .slave = &dra7xx_vcp2_hwmod,
3684 .clk = "l3_iclk_div",
3685 .user = OCP_USER_MPU | OCP_USER_SDMA,
3686};
3687
3688/* l4_wkup -> wd_timer2 */
3689static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
3690 .master = &dra7xx_l4_wkup_hwmod,
3691 .slave = &dra7xx_wd_timer2_hwmod,
3692 .clk = "wkupaon_iclk_mux",
3693 .user = OCP_USER_MPU | OCP_USER_SDMA,
3694};
3695
3696static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
Tomi Valkeinen42121682014-09-15 13:12:18 -05003697 &dra7xx_l3_main_1__dmm,
Ambresh K90020c72013-07-09 13:02:16 +05303698 &dra7xx_l3_main_2__l3_instr,
3699 &dra7xx_l4_cfg__l3_main_1,
3700 &dra7xx_mpu__l3_main_1,
3701 &dra7xx_l3_main_1__l3_main_2,
3702 &dra7xx_l4_cfg__l3_main_2,
3703 &dra7xx_l3_main_1__l4_cfg,
3704 &dra7xx_l3_main_1__l4_per1,
3705 &dra7xx_l3_main_1__l4_per2,
3706 &dra7xx_l3_main_1__l4_per3,
3707 &dra7xx_l3_main_1__l4_wkup,
3708 &dra7xx_l4_per2__atl,
3709 &dra7xx_l3_main_1__bb2d,
3710 &dra7xx_l4_wkup__counter_32k,
3711 &dra7xx_l4_wkup__ctrl_module_wkup,
3712 &dra7xx_l4_wkup__dcan1,
3713 &dra7xx_l4_per2__dcan2,
Mugunthan V N077c42f2014-07-08 18:46:39 +05303714 &dra7xx_l4_per2__cpgmac0,
Peter Ujfalusi9ad4d9a2016-04-10 13:20:09 -06003715 &dra7xx_l4_per2__mcasp1,
3716 &dra7xx_l3_main_1__mcasp1,
3717 &dra7xx_l4_per2__mcasp2,
3718 &dra7xx_l3_main_1__mcasp2,
Peter Ujfalusi469689a452015-11-12 09:32:59 +02003719 &dra7xx_l4_per2__mcasp3,
3720 &dra7xx_l3_main_1__mcasp3,
Peter Ujfalusi9ad4d9a2016-04-10 13:20:09 -06003721 &dra7xx_l4_per2__mcasp4,
3722 &dra7xx_l4_per2__mcasp5,
3723 &dra7xx_l4_per2__mcasp6,
3724 &dra7xx_l4_per2__mcasp7,
3725 &dra7xx_l4_per2__mcasp8,
Mugunthan V N077c42f2014-07-08 18:46:39 +05303726 &dra7xx_gmac__mdio,
Ambresh K90020c72013-07-09 13:02:16 +05303727 &dra7xx_l4_cfg__dma_system,
Peter Ujfalusi34b41822016-02-25 16:50:18 +02003728 &dra7xx_l3_main_1__tpcc,
3729 &dra7xx_l3_main_1__tptc0,
3730 &dra7xx_l3_main_1__tptc1,
Ambresh K90020c72013-07-09 13:02:16 +05303731 &dra7xx_l3_main_1__dss,
3732 &dra7xx_l3_main_1__dispc,
3733 &dra7xx_l3_main_1__hdmi,
3734 &dra7xx_l4_per1__elm,
3735 &dra7xx_l4_wkup__gpio1,
3736 &dra7xx_l4_per1__gpio2,
3737 &dra7xx_l4_per1__gpio3,
3738 &dra7xx_l4_per1__gpio4,
3739 &dra7xx_l4_per1__gpio5,
3740 &dra7xx_l4_per1__gpio6,
3741 &dra7xx_l4_per1__gpio7,
3742 &dra7xx_l4_per1__gpio8,
3743 &dra7xx_l3_main_1__gpmc,
3744 &dra7xx_l4_per1__hdq1w,
3745 &dra7xx_l4_per1__i2c1,
3746 &dra7xx_l4_per1__i2c2,
3747 &dra7xx_l4_per1__i2c3,
3748 &dra7xx_l4_per1__i2c4,
3749 &dra7xx_l4_per1__i2c5,
Suman Anna067395d2014-07-11 16:44:39 -05003750 &dra7xx_l4_cfg__mailbox1,
3751 &dra7xx_l4_per3__mailbox2,
3752 &dra7xx_l4_per3__mailbox3,
3753 &dra7xx_l4_per3__mailbox4,
3754 &dra7xx_l4_per3__mailbox5,
3755 &dra7xx_l4_per3__mailbox6,
3756 &dra7xx_l4_per3__mailbox7,
3757 &dra7xx_l4_per3__mailbox8,
3758 &dra7xx_l4_per3__mailbox9,
3759 &dra7xx_l4_per3__mailbox10,
3760 &dra7xx_l4_per3__mailbox11,
3761 &dra7xx_l4_per3__mailbox12,
3762 &dra7xx_l4_per3__mailbox13,
Ambresh K90020c72013-07-09 13:02:16 +05303763 &dra7xx_l4_per1__mcspi1,
3764 &dra7xx_l4_per1__mcspi2,
3765 &dra7xx_l4_per1__mcspi3,
3766 &dra7xx_l4_per1__mcspi4,
3767 &dra7xx_l4_per1__mmc1,
3768 &dra7xx_l4_per1__mmc2,
3769 &dra7xx_l4_per1__mmc3,
3770 &dra7xx_l4_per1__mmc4,
3771 &dra7xx_l4_cfg__mpu,
3772 &dra7xx_l4_cfg__ocp2scp1,
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06003773 &dra7xx_l4_cfg__ocp2scp3,
Kishon Vijay Abraham I07171032015-02-20 14:21:13 +05303774 &dra7xx_l3_main_1__pciess1,
3775 &dra7xx_l4_cfg__pciess1,
3776 &dra7xx_l3_main_1__pciess2,
3777 &dra7xx_l4_cfg__pciess2,
Ambresh K90020c72013-07-09 13:02:16 +05303778 &dra7xx_l3_main_1__qspi,
Lokesh Vutlac913c8a2014-07-22 13:15:57 -06003779 &dra7xx_l4_per3__rtcss,
Ambresh K90020c72013-07-09 13:02:16 +05303780 &dra7xx_l4_cfg__sata,
3781 &dra7xx_l4_cfg__smartreflex_core,
3782 &dra7xx_l4_cfg__smartreflex_mpu,
3783 &dra7xx_l4_cfg__spinlock,
3784 &dra7xx_l4_wkup__timer1,
3785 &dra7xx_l4_per1__timer2,
3786 &dra7xx_l4_per1__timer3,
3787 &dra7xx_l4_per1__timer4,
3788 &dra7xx_l4_per3__timer5,
3789 &dra7xx_l4_per3__timer6,
3790 &dra7xx_l4_per3__timer7,
3791 &dra7xx_l4_per3__timer8,
3792 &dra7xx_l4_per1__timer9,
3793 &dra7xx_l4_per1__timer10,
3794 &dra7xx_l4_per1__timer11,
Suman Anna1ac964f2015-03-16 15:54:53 -05003795 &dra7xx_l4_per3__timer13,
3796 &dra7xx_l4_per3__timer14,
3797 &dra7xx_l4_per3__timer15,
3798 &dra7xx_l4_per3__timer16,
Ambresh K90020c72013-07-09 13:02:16 +05303799 &dra7xx_l4_per1__uart1,
3800 &dra7xx_l4_per1__uart2,
3801 &dra7xx_l4_per1__uart3,
3802 &dra7xx_l4_per1__uart4,
3803 &dra7xx_l4_per1__uart5,
3804 &dra7xx_l4_per1__uart6,
Ambresh K33acc9f2014-10-21 11:17:51 -05003805 &dra7xx_l4_per2__uart7,
3806 &dra7xx_l4_per2__uart8,
3807 &dra7xx_l4_per2__uart9,
3808 &dra7xx_l4_wkup__uart10,
Ambresh K90020c72013-07-09 13:02:16 +05303809 &dra7xx_l4_per3__usb_otg_ss1,
3810 &dra7xx_l4_per3__usb_otg_ss2,
3811 &dra7xx_l4_per3__usb_otg_ss3,
Ambresh K90020c72013-07-09 13:02:16 +05303812 &dra7xx_l3_main_1__vcp1,
3813 &dra7xx_l4_per2__vcp1,
3814 &dra7xx_l3_main_1__vcp2,
3815 &dra7xx_l4_per2__vcp2,
3816 &dra7xx_l4_wkup__wd_timer2,
3817 NULL,
3818};
3819
Rajendra Nayakf7f7a292014-08-27 19:38:23 -06003820static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
3821 &dra7xx_l4_per3__usb_otg_ss4,
3822 NULL,
3823};
3824
3825static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
3826 NULL,
3827};
3828
Ambresh K90020c72013-07-09 13:02:16 +05303829int __init dra7xx_hwmod_init(void)
3830{
Rajendra Nayakf7f7a292014-08-27 19:38:23 -06003831 int ret;
3832
Ambresh K90020c72013-07-09 13:02:16 +05303833 omap_hwmod_init();
Rajendra Nayakf7f7a292014-08-27 19:38:23 -06003834 ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
3835
3836 if (!ret && soc_is_dra74x())
3837 return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
3838 else if (!ret && soc_is_dra72x())
3839 return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
3840
3841 return ret;
Ambresh K90020c72013-07-09 13:02:16 +05303842}