blob: 701234d8db1b90e927f4772a2c9d3bebabbaebfd [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/*
52 * 'l3' class
53 * instance(s): l3_instr, l3_main_1, l3_main_2
54 */
55static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
56 .name = "l3",
57};
58
59/* l3_instr */
60static struct omap_hwmod dra7xx_l3_instr_hwmod = {
61 .name = "l3_instr",
62 .class = &dra7xx_l3_hwmod_class,
63 .clkdm_name = "l3instr_clkdm",
64 .prcm = {
65 .omap4 = {
66 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
67 .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
68 .modulemode = MODULEMODE_HWCTRL,
69 },
70 },
71};
72
73/* l3_main_1 */
74static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
75 .name = "l3_main_1",
76 .class = &dra7xx_l3_hwmod_class,
77 .clkdm_name = "l3main1_clkdm",
78 .prcm = {
79 .omap4 = {
80 .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
81 .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
82 },
83 },
84};
85
86/* l3_main_2 */
87static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
88 .name = "l3_main_2",
89 .class = &dra7xx_l3_hwmod_class,
90 .clkdm_name = "l3instr_clkdm",
91 .prcm = {
92 .omap4 = {
93 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
94 .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
95 .modulemode = MODULEMODE_HWCTRL,
96 },
97 },
98};
99
100/*
101 * 'l4' class
102 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
103 */
104static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
105 .name = "l4",
106};
107
108/* l4_cfg */
109static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
110 .name = "l4_cfg",
111 .class = &dra7xx_l4_hwmod_class,
112 .clkdm_name = "l4cfg_clkdm",
113 .prcm = {
114 .omap4 = {
115 .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
116 .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
117 },
118 },
119};
120
121/* l4_per1 */
122static struct omap_hwmod dra7xx_l4_per1_hwmod = {
123 .name = "l4_per1",
124 .class = &dra7xx_l4_hwmod_class,
125 .clkdm_name = "l4per_clkdm",
126 .prcm = {
127 .omap4 = {
128 .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
129 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
130 },
131 },
132};
133
134/* l4_per2 */
135static struct omap_hwmod dra7xx_l4_per2_hwmod = {
136 .name = "l4_per2",
137 .class = &dra7xx_l4_hwmod_class,
138 .clkdm_name = "l4per2_clkdm",
139 .prcm = {
140 .omap4 = {
141 .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
142 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
143 },
144 },
145};
146
147/* l4_per3 */
148static struct omap_hwmod dra7xx_l4_per3_hwmod = {
149 .name = "l4_per3",
150 .class = &dra7xx_l4_hwmod_class,
151 .clkdm_name = "l4per3_clkdm",
152 .prcm = {
153 .omap4 = {
154 .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
155 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
156 },
157 },
158};
159
160/* l4_wkup */
161static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
162 .name = "l4_wkup",
163 .class = &dra7xx_l4_hwmod_class,
164 .clkdm_name = "wkupaon_clkdm",
165 .prcm = {
166 .omap4 = {
167 .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
168 .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
169 },
170 },
171};
172
173/*
174 * 'atl' class
175 *
176 */
177
178static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
179 .name = "atl",
180};
181
182/* atl */
183static struct omap_hwmod dra7xx_atl_hwmod = {
184 .name = "atl",
185 .class = &dra7xx_atl_hwmod_class,
186 .clkdm_name = "atl_clkdm",
187 .main_clk = "atl_gfclk_mux",
188 .prcm = {
189 .omap4 = {
190 .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
191 .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
192 .modulemode = MODULEMODE_SWCTRL,
193 },
194 },
195};
196
197/*
198 * 'bb2d' class
199 *
200 */
201
202static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
203 .name = "bb2d",
204};
205
206/* bb2d */
207static struct omap_hwmod dra7xx_bb2d_hwmod = {
208 .name = "bb2d",
209 .class = &dra7xx_bb2d_hwmod_class,
210 .clkdm_name = "dss_clkdm",
211 .main_clk = "dpll_core_h24x2_ck",
212 .prcm = {
213 .omap4 = {
214 .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
215 .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
216 .modulemode = MODULEMODE_SWCTRL,
217 },
218 },
219};
220
221/*
222 * 'counter' class
223 *
224 */
225
226static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
227 .rev_offs = 0x0000,
228 .sysc_offs = 0x0010,
229 .sysc_flags = SYSC_HAS_SIDLEMODE,
230 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
231 SIDLE_SMART_WKUP),
232 .sysc_fields = &omap_hwmod_sysc_type1,
233};
234
235static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
236 .name = "counter",
237 .sysc = &dra7xx_counter_sysc,
238};
239
240/* counter_32k */
241static struct omap_hwmod dra7xx_counter_32k_hwmod = {
242 .name = "counter_32k",
243 .class = &dra7xx_counter_hwmod_class,
244 .clkdm_name = "wkupaon_clkdm",
245 .flags = HWMOD_SWSUP_SIDLE,
246 .main_clk = "wkupaon_iclk_mux",
247 .prcm = {
248 .omap4 = {
249 .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
250 .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
251 },
252 },
253};
254
255/*
256 * 'ctrl_module' class
257 *
258 */
259
260static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
261 .name = "ctrl_module",
262};
263
264/* ctrl_module_wkup */
265static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
266 .name = "ctrl_module_wkup",
267 .class = &dra7xx_ctrl_module_hwmod_class,
268 .clkdm_name = "wkupaon_clkdm",
269 .prcm = {
270 .omap4 = {
271 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
272 },
273 },
274};
275
276/*
Mugunthan V N077c42f2014-07-08 18:46:39 +0530277 * 'gmac' class
278 * cpsw/gmac sub system
279 */
280static struct omap_hwmod_class_sysconfig dra7xx_gmac_sysc = {
281 .rev_offs = 0x0,
282 .sysc_offs = 0x8,
283 .syss_offs = 0x4,
284 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
285 SYSS_HAS_RESET_STATUS),
286 .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
287 MSTANDBY_NO),
288 .sysc_fields = &omap_hwmod_sysc_type3,
289};
290
291static struct omap_hwmod_class dra7xx_gmac_hwmod_class = {
292 .name = "gmac",
293 .sysc = &dra7xx_gmac_sysc,
294};
295
296static struct omap_hwmod dra7xx_gmac_hwmod = {
297 .name = "gmac",
298 .class = &dra7xx_gmac_hwmod_class,
299 .clkdm_name = "gmac_clkdm",
300 .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
301 .main_clk = "dpll_gmac_ck",
302 .mpu_rt_idx = 1,
303 .prcm = {
304 .omap4 = {
305 .clkctrl_offs = DRA7XX_CM_GMAC_GMAC_CLKCTRL_OFFSET,
306 .context_offs = DRA7XX_RM_GMAC_GMAC_CONTEXT_OFFSET,
307 .modulemode = MODULEMODE_SWCTRL,
308 },
309 },
310};
311
312/*
313 * 'mdio' class
314 */
315static struct omap_hwmod_class dra7xx_mdio_hwmod_class = {
316 .name = "davinci_mdio",
317};
318
319static struct omap_hwmod dra7xx_mdio_hwmod = {
320 .name = "davinci_mdio",
321 .class = &dra7xx_mdio_hwmod_class,
322 .clkdm_name = "gmac_clkdm",
323 .main_clk = "dpll_gmac_ck",
324};
325
326/*
Ambresh K90020c72013-07-09 13:02:16 +0530327 * 'dcan' class
328 *
329 */
330
331static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
332 .name = "dcan",
333};
334
335/* dcan1 */
336static struct omap_hwmod dra7xx_dcan1_hwmod = {
337 .name = "dcan1",
338 .class = &dra7xx_dcan_hwmod_class,
339 .clkdm_name = "wkupaon_clkdm",
340 .main_clk = "dcan1_sys_clk_mux",
341 .prcm = {
342 .omap4 = {
343 .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
344 .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
345 .modulemode = MODULEMODE_SWCTRL,
346 },
347 },
348};
349
350/* dcan2 */
351static struct omap_hwmod dra7xx_dcan2_hwmod = {
352 .name = "dcan2",
353 .class = &dra7xx_dcan_hwmod_class,
354 .clkdm_name = "l4per2_clkdm",
355 .main_clk = "sys_clkin1",
356 .prcm = {
357 .omap4 = {
358 .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
359 .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
360 .modulemode = MODULEMODE_SWCTRL,
361 },
362 },
363};
364
365/*
366 * 'dma' class
367 *
368 */
369
370static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
371 .rev_offs = 0x0000,
372 .sysc_offs = 0x002c,
373 .syss_offs = 0x0028,
374 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
375 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
376 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
377 SYSS_HAS_RESET_STATUS),
378 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
379 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
380 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
381 .sysc_fields = &omap_hwmod_sysc_type1,
382};
383
384static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
385 .name = "dma",
386 .sysc = &dra7xx_dma_sysc,
387};
388
389/* dma dev_attr */
390static struct omap_dma_dev_attr dma_dev_attr = {
391 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
392 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
393 .lch_count = 32,
394};
395
396/* dma_system */
Ambresh K90020c72013-07-09 13:02:16 +0530397static struct omap_hwmod dra7xx_dma_system_hwmod = {
398 .name = "dma_system",
399 .class = &dra7xx_dma_hwmod_class,
400 .clkdm_name = "dma_clkdm",
Ambresh K90020c72013-07-09 13:02:16 +0530401 .main_clk = "l3_iclk_div",
402 .prcm = {
403 .omap4 = {
404 .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
405 .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
406 },
407 },
408 .dev_attr = &dma_dev_attr,
409};
410
411/*
412 * 'dss' class
413 *
414 */
415
416static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
417 .rev_offs = 0x0000,
418 .syss_offs = 0x0014,
419 .sysc_flags = SYSS_HAS_RESET_STATUS,
420};
421
422static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
423 .name = "dss",
424 .sysc = &dra7xx_dss_sysc,
425 .reset = omap_dss_reset,
426};
427
428/* dss */
429static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
430 { .dma_req = 75 + DRA7XX_DMA_REQ_START },
431 { .dma_req = -1 }
432};
433
434static struct omap_hwmod_opt_clk dss_opt_clks[] = {
435 { .role = "dss_clk", .clk = "dss_dss_clk" },
436 { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
437 { .role = "32khz_clk", .clk = "dss_32khz_clk" },
438 { .role = "video2_clk", .clk = "dss_video2_clk" },
439 { .role = "video1_clk", .clk = "dss_video1_clk" },
440 { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
441};
442
443static struct omap_hwmod dra7xx_dss_hwmod = {
444 .name = "dss_core",
445 .class = &dra7xx_dss_hwmod_class,
446 .clkdm_name = "dss_clkdm",
447 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
448 .sdma_reqs = dra7xx_dss_sdma_reqs,
449 .main_clk = "dss_dss_clk",
450 .prcm = {
451 .omap4 = {
452 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
453 .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
454 .modulemode = MODULEMODE_SWCTRL,
455 },
456 },
457 .opt_clks = dss_opt_clks,
458 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
459};
460
461/*
462 * 'dispc' class
463 * display controller
464 */
465
466static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
467 .rev_offs = 0x0000,
468 .sysc_offs = 0x0010,
469 .syss_offs = 0x0014,
470 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
471 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
472 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
473 SYSS_HAS_RESET_STATUS),
474 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
475 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
476 .sysc_fields = &omap_hwmod_sysc_type1,
477};
478
479static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
480 .name = "dispc",
481 .sysc = &dra7xx_dispc_sysc,
482};
483
484/* dss_dispc */
485/* dss_dispc dev_attr */
486static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
487 .has_framedonetv_irq = 1,
488 .manager_count = 4,
489};
490
491static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
492 .name = "dss_dispc",
493 .class = &dra7xx_dispc_hwmod_class,
494 .clkdm_name = "dss_clkdm",
495 .main_clk = "dss_dss_clk",
496 .prcm = {
497 .omap4 = {
498 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
499 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
500 },
501 },
502 .dev_attr = &dss_dispc_dev_attr,
503};
504
505/*
506 * 'hdmi' class
507 * hdmi controller
508 */
509
510static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
511 .rev_offs = 0x0000,
512 .sysc_offs = 0x0010,
513 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
514 SYSC_HAS_SOFTRESET),
515 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
516 SIDLE_SMART_WKUP),
517 .sysc_fields = &omap_hwmod_sysc_type2,
518};
519
520static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
521 .name = "hdmi",
522 .sysc = &dra7xx_hdmi_sysc,
523};
524
525/* dss_hdmi */
526
527static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
528 { .role = "sys_clk", .clk = "dss_hdmi_clk" },
529};
530
531static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
532 .name = "dss_hdmi",
533 .class = &dra7xx_hdmi_hwmod_class,
534 .clkdm_name = "dss_clkdm",
535 .main_clk = "dss_48mhz_clk",
536 .prcm = {
537 .omap4 = {
538 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
539 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
540 },
541 },
542 .opt_clks = dss_hdmi_opt_clks,
543 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
544};
545
546/*
547 * 'elm' class
548 *
549 */
550
551static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
552 .rev_offs = 0x0000,
553 .sysc_offs = 0x0010,
554 .syss_offs = 0x0014,
555 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
556 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
557 SYSS_HAS_RESET_STATUS),
558 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
559 SIDLE_SMART_WKUP),
560 .sysc_fields = &omap_hwmod_sysc_type1,
561};
562
563static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
564 .name = "elm",
565 .sysc = &dra7xx_elm_sysc,
566};
567
568/* elm */
569
570static struct omap_hwmod dra7xx_elm_hwmod = {
571 .name = "elm",
572 .class = &dra7xx_elm_hwmod_class,
573 .clkdm_name = "l4per_clkdm",
574 .main_clk = "l3_iclk_div",
575 .prcm = {
576 .omap4 = {
577 .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
578 .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
579 },
580 },
581};
582
583/*
584 * 'gpio' class
585 *
586 */
587
588static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
589 .rev_offs = 0x0000,
590 .sysc_offs = 0x0010,
591 .syss_offs = 0x0114,
592 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
593 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
594 SYSS_HAS_RESET_STATUS),
595 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
596 SIDLE_SMART_WKUP),
597 .sysc_fields = &omap_hwmod_sysc_type1,
598};
599
600static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
601 .name = "gpio",
602 .sysc = &dra7xx_gpio_sysc,
603 .rev = 2,
604};
605
606/* gpio dev_attr */
607static struct omap_gpio_dev_attr gpio_dev_attr = {
608 .bank_width = 32,
609 .dbck_flag = true,
610};
611
612/* gpio1 */
613static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
614 { .role = "dbclk", .clk = "gpio1_dbclk" },
615};
616
617static struct omap_hwmod dra7xx_gpio1_hwmod = {
618 .name = "gpio1",
619 .class = &dra7xx_gpio_hwmod_class,
620 .clkdm_name = "wkupaon_clkdm",
621 .main_clk = "wkupaon_iclk_mux",
622 .prcm = {
623 .omap4 = {
624 .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
625 .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
626 .modulemode = MODULEMODE_HWCTRL,
627 },
628 },
629 .opt_clks = gpio1_opt_clks,
630 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
631 .dev_attr = &gpio_dev_attr,
632};
633
634/* gpio2 */
635static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
636 { .role = "dbclk", .clk = "gpio2_dbclk" },
637};
638
639static struct omap_hwmod dra7xx_gpio2_hwmod = {
640 .name = "gpio2",
641 .class = &dra7xx_gpio_hwmod_class,
642 .clkdm_name = "l4per_clkdm",
643 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
644 .main_clk = "l3_iclk_div",
645 .prcm = {
646 .omap4 = {
647 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
648 .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
649 .modulemode = MODULEMODE_HWCTRL,
650 },
651 },
652 .opt_clks = gpio2_opt_clks,
653 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
654 .dev_attr = &gpio_dev_attr,
655};
656
657/* gpio3 */
658static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
659 { .role = "dbclk", .clk = "gpio3_dbclk" },
660};
661
662static struct omap_hwmod dra7xx_gpio3_hwmod = {
663 .name = "gpio3",
664 .class = &dra7xx_gpio_hwmod_class,
665 .clkdm_name = "l4per_clkdm",
666 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
667 .main_clk = "l3_iclk_div",
668 .prcm = {
669 .omap4 = {
670 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
671 .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
672 .modulemode = MODULEMODE_HWCTRL,
673 },
674 },
675 .opt_clks = gpio3_opt_clks,
676 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
677 .dev_attr = &gpio_dev_attr,
678};
679
680/* gpio4 */
681static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
682 { .role = "dbclk", .clk = "gpio4_dbclk" },
683};
684
685static struct omap_hwmod dra7xx_gpio4_hwmod = {
686 .name = "gpio4",
687 .class = &dra7xx_gpio_hwmod_class,
688 .clkdm_name = "l4per_clkdm",
689 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
690 .main_clk = "l3_iclk_div",
691 .prcm = {
692 .omap4 = {
693 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
694 .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
695 .modulemode = MODULEMODE_HWCTRL,
696 },
697 },
698 .opt_clks = gpio4_opt_clks,
699 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
700 .dev_attr = &gpio_dev_attr,
701};
702
703/* gpio5 */
704static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
705 { .role = "dbclk", .clk = "gpio5_dbclk" },
706};
707
708static struct omap_hwmod dra7xx_gpio5_hwmod = {
709 .name = "gpio5",
710 .class = &dra7xx_gpio_hwmod_class,
711 .clkdm_name = "l4per_clkdm",
712 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
713 .main_clk = "l3_iclk_div",
714 .prcm = {
715 .omap4 = {
716 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
717 .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
718 .modulemode = MODULEMODE_HWCTRL,
719 },
720 },
721 .opt_clks = gpio5_opt_clks,
722 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
723 .dev_attr = &gpio_dev_attr,
724};
725
726/* gpio6 */
727static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
728 { .role = "dbclk", .clk = "gpio6_dbclk" },
729};
730
731static struct omap_hwmod dra7xx_gpio6_hwmod = {
732 .name = "gpio6",
733 .class = &dra7xx_gpio_hwmod_class,
734 .clkdm_name = "l4per_clkdm",
735 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
736 .main_clk = "l3_iclk_div",
737 .prcm = {
738 .omap4 = {
739 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
740 .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
741 .modulemode = MODULEMODE_HWCTRL,
742 },
743 },
744 .opt_clks = gpio6_opt_clks,
745 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
746 .dev_attr = &gpio_dev_attr,
747};
748
749/* gpio7 */
750static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
751 { .role = "dbclk", .clk = "gpio7_dbclk" },
752};
753
754static struct omap_hwmod dra7xx_gpio7_hwmod = {
755 .name = "gpio7",
756 .class = &dra7xx_gpio_hwmod_class,
757 .clkdm_name = "l4per_clkdm",
758 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
759 .main_clk = "l3_iclk_div",
760 .prcm = {
761 .omap4 = {
762 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
763 .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
764 .modulemode = MODULEMODE_HWCTRL,
765 },
766 },
767 .opt_clks = gpio7_opt_clks,
768 .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
769 .dev_attr = &gpio_dev_attr,
770};
771
772/* gpio8 */
773static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
774 { .role = "dbclk", .clk = "gpio8_dbclk" },
775};
776
777static struct omap_hwmod dra7xx_gpio8_hwmod = {
778 .name = "gpio8",
779 .class = &dra7xx_gpio_hwmod_class,
780 .clkdm_name = "l4per_clkdm",
781 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
782 .main_clk = "l3_iclk_div",
783 .prcm = {
784 .omap4 = {
785 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
786 .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
787 .modulemode = MODULEMODE_HWCTRL,
788 },
789 },
790 .opt_clks = gpio8_opt_clks,
791 .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
792 .dev_attr = &gpio_dev_attr,
793};
794
795/*
796 * 'gpmc' class
797 *
798 */
799
800static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
801 .rev_offs = 0x0000,
802 .sysc_offs = 0x0010,
803 .syss_offs = 0x0014,
804 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
805 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
806 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
807 SIDLE_SMART_WKUP),
808 .sysc_fields = &omap_hwmod_sysc_type1,
809};
810
811static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
812 .name = "gpmc",
813 .sysc = &dra7xx_gpmc_sysc,
814};
815
816/* gpmc */
817
818static struct omap_hwmod dra7xx_gpmc_hwmod = {
819 .name = "gpmc",
820 .class = &dra7xx_gpmc_hwmod_class,
821 .clkdm_name = "l3main1_clkdm",
Keerthy556708f2015-01-13 14:21:25 +0530822 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
823 HWMOD_SWSUP_SIDLE),
Ambresh K90020c72013-07-09 13:02:16 +0530824 .main_clk = "l3_iclk_div",
825 .prcm = {
826 .omap4 = {
827 .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
828 .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
829 .modulemode = MODULEMODE_HWCTRL,
830 },
831 },
832};
833
834/*
835 * 'hdq1w' class
836 *
837 */
838
839static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
840 .rev_offs = 0x0000,
841 .sysc_offs = 0x0014,
842 .syss_offs = 0x0018,
843 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
844 SYSS_HAS_RESET_STATUS),
845 .sysc_fields = &omap_hwmod_sysc_type1,
846};
847
848static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
849 .name = "hdq1w",
850 .sysc = &dra7xx_hdq1w_sysc,
851};
852
853/* hdq1w */
854
855static struct omap_hwmod dra7xx_hdq1w_hwmod = {
856 .name = "hdq1w",
857 .class = &dra7xx_hdq1w_hwmod_class,
858 .clkdm_name = "l4per_clkdm",
859 .flags = HWMOD_INIT_NO_RESET,
860 .main_clk = "func_12m_fclk",
861 .prcm = {
862 .omap4 = {
863 .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
864 .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
865 .modulemode = MODULEMODE_SWCTRL,
866 },
867 },
868};
869
870/*
871 * 'i2c' class
872 *
873 */
874
875static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
876 .sysc_offs = 0x0010,
877 .syss_offs = 0x0090,
878 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
879 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
880 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
881 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
882 SIDLE_SMART_WKUP),
883 .clockact = CLOCKACT_TEST_ICLK,
884 .sysc_fields = &omap_hwmod_sysc_type1,
885};
886
887static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
888 .name = "i2c",
889 .sysc = &dra7xx_i2c_sysc,
890 .reset = &omap_i2c_reset,
891 .rev = OMAP_I2C_IP_VERSION_2,
892};
893
894/* i2c dev_attr */
895static struct omap_i2c_dev_attr i2c_dev_attr = {
896 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
897};
898
899/* i2c1 */
900static struct omap_hwmod dra7xx_i2c1_hwmod = {
901 .name = "i2c1",
902 .class = &dra7xx_i2c_hwmod_class,
903 .clkdm_name = "l4per_clkdm",
904 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
905 .main_clk = "func_96m_fclk",
906 .prcm = {
907 .omap4 = {
908 .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
909 .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
910 .modulemode = MODULEMODE_SWCTRL,
911 },
912 },
913 .dev_attr = &i2c_dev_attr,
914};
915
916/* i2c2 */
917static struct omap_hwmod dra7xx_i2c2_hwmod = {
918 .name = "i2c2",
919 .class = &dra7xx_i2c_hwmod_class,
920 .clkdm_name = "l4per_clkdm",
921 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
922 .main_clk = "func_96m_fclk",
923 .prcm = {
924 .omap4 = {
925 .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
926 .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
927 .modulemode = MODULEMODE_SWCTRL,
928 },
929 },
930 .dev_attr = &i2c_dev_attr,
931};
932
933/* i2c3 */
934static struct omap_hwmod dra7xx_i2c3_hwmod = {
935 .name = "i2c3",
936 .class = &dra7xx_i2c_hwmod_class,
937 .clkdm_name = "l4per_clkdm",
938 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
939 .main_clk = "func_96m_fclk",
940 .prcm = {
941 .omap4 = {
942 .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
943 .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
944 .modulemode = MODULEMODE_SWCTRL,
945 },
946 },
947 .dev_attr = &i2c_dev_attr,
948};
949
950/* i2c4 */
951static struct omap_hwmod dra7xx_i2c4_hwmod = {
952 .name = "i2c4",
953 .class = &dra7xx_i2c_hwmod_class,
954 .clkdm_name = "l4per_clkdm",
955 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
956 .main_clk = "func_96m_fclk",
957 .prcm = {
958 .omap4 = {
959 .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
960 .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
961 .modulemode = MODULEMODE_SWCTRL,
962 },
963 },
964 .dev_attr = &i2c_dev_attr,
965};
966
967/* i2c5 */
968static struct omap_hwmod dra7xx_i2c5_hwmod = {
969 .name = "i2c5",
970 .class = &dra7xx_i2c_hwmod_class,
971 .clkdm_name = "ipu_clkdm",
972 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
973 .main_clk = "func_96m_fclk",
974 .prcm = {
975 .omap4 = {
976 .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
977 .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
978 .modulemode = MODULEMODE_SWCTRL,
979 },
980 },
981 .dev_attr = &i2c_dev_attr,
982};
983
984/*
Suman Anna067395d2014-07-11 16:44:39 -0500985 * 'mailbox' class
986 *
987 */
988
989static struct omap_hwmod_class_sysconfig dra7xx_mailbox_sysc = {
990 .rev_offs = 0x0000,
991 .sysc_offs = 0x0010,
992 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
993 SYSC_HAS_SOFTRESET),
994 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
995 .sysc_fields = &omap_hwmod_sysc_type2,
996};
997
998static struct omap_hwmod_class dra7xx_mailbox_hwmod_class = {
999 .name = "mailbox",
1000 .sysc = &dra7xx_mailbox_sysc,
1001};
1002
1003/* mailbox1 */
1004static struct omap_hwmod dra7xx_mailbox1_hwmod = {
1005 .name = "mailbox1",
1006 .class = &dra7xx_mailbox_hwmod_class,
1007 .clkdm_name = "l4cfg_clkdm",
1008 .prcm = {
1009 .omap4 = {
1010 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX1_CLKCTRL_OFFSET,
1011 .context_offs = DRA7XX_RM_L4CFG_MAILBOX1_CONTEXT_OFFSET,
1012 },
1013 },
1014};
1015
1016/* mailbox2 */
1017static struct omap_hwmod dra7xx_mailbox2_hwmod = {
1018 .name = "mailbox2",
1019 .class = &dra7xx_mailbox_hwmod_class,
1020 .clkdm_name = "l4cfg_clkdm",
1021 .prcm = {
1022 .omap4 = {
1023 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX2_CLKCTRL_OFFSET,
1024 .context_offs = DRA7XX_RM_L4CFG_MAILBOX2_CONTEXT_OFFSET,
1025 },
1026 },
1027};
1028
1029/* mailbox3 */
1030static struct omap_hwmod dra7xx_mailbox3_hwmod = {
1031 .name = "mailbox3",
1032 .class = &dra7xx_mailbox_hwmod_class,
1033 .clkdm_name = "l4cfg_clkdm",
1034 .prcm = {
1035 .omap4 = {
1036 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX3_CLKCTRL_OFFSET,
1037 .context_offs = DRA7XX_RM_L4CFG_MAILBOX3_CONTEXT_OFFSET,
1038 },
1039 },
1040};
1041
1042/* mailbox4 */
1043static struct omap_hwmod dra7xx_mailbox4_hwmod = {
1044 .name = "mailbox4",
1045 .class = &dra7xx_mailbox_hwmod_class,
1046 .clkdm_name = "l4cfg_clkdm",
1047 .prcm = {
1048 .omap4 = {
1049 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX4_CLKCTRL_OFFSET,
1050 .context_offs = DRA7XX_RM_L4CFG_MAILBOX4_CONTEXT_OFFSET,
1051 },
1052 },
1053};
1054
1055/* mailbox5 */
1056static struct omap_hwmod dra7xx_mailbox5_hwmod = {
1057 .name = "mailbox5",
1058 .class = &dra7xx_mailbox_hwmod_class,
1059 .clkdm_name = "l4cfg_clkdm",
1060 .prcm = {
1061 .omap4 = {
1062 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX5_CLKCTRL_OFFSET,
1063 .context_offs = DRA7XX_RM_L4CFG_MAILBOX5_CONTEXT_OFFSET,
1064 },
1065 },
1066};
1067
1068/* mailbox6 */
1069static struct omap_hwmod dra7xx_mailbox6_hwmod = {
1070 .name = "mailbox6",
1071 .class = &dra7xx_mailbox_hwmod_class,
1072 .clkdm_name = "l4cfg_clkdm",
1073 .prcm = {
1074 .omap4 = {
1075 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX6_CLKCTRL_OFFSET,
1076 .context_offs = DRA7XX_RM_L4CFG_MAILBOX6_CONTEXT_OFFSET,
1077 },
1078 },
1079};
1080
1081/* mailbox7 */
1082static struct omap_hwmod dra7xx_mailbox7_hwmod = {
1083 .name = "mailbox7",
1084 .class = &dra7xx_mailbox_hwmod_class,
1085 .clkdm_name = "l4cfg_clkdm",
1086 .prcm = {
1087 .omap4 = {
1088 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX7_CLKCTRL_OFFSET,
1089 .context_offs = DRA7XX_RM_L4CFG_MAILBOX7_CONTEXT_OFFSET,
1090 },
1091 },
1092};
1093
1094/* mailbox8 */
1095static struct omap_hwmod dra7xx_mailbox8_hwmod = {
1096 .name = "mailbox8",
1097 .class = &dra7xx_mailbox_hwmod_class,
1098 .clkdm_name = "l4cfg_clkdm",
1099 .prcm = {
1100 .omap4 = {
1101 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX8_CLKCTRL_OFFSET,
1102 .context_offs = DRA7XX_RM_L4CFG_MAILBOX8_CONTEXT_OFFSET,
1103 },
1104 },
1105};
1106
1107/* mailbox9 */
1108static struct omap_hwmod dra7xx_mailbox9_hwmod = {
1109 .name = "mailbox9",
1110 .class = &dra7xx_mailbox_hwmod_class,
1111 .clkdm_name = "l4cfg_clkdm",
1112 .prcm = {
1113 .omap4 = {
1114 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX9_CLKCTRL_OFFSET,
1115 .context_offs = DRA7XX_RM_L4CFG_MAILBOX9_CONTEXT_OFFSET,
1116 },
1117 },
1118};
1119
1120/* mailbox10 */
1121static struct omap_hwmod dra7xx_mailbox10_hwmod = {
1122 .name = "mailbox10",
1123 .class = &dra7xx_mailbox_hwmod_class,
1124 .clkdm_name = "l4cfg_clkdm",
1125 .prcm = {
1126 .omap4 = {
1127 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX10_CLKCTRL_OFFSET,
1128 .context_offs = DRA7XX_RM_L4CFG_MAILBOX10_CONTEXT_OFFSET,
1129 },
1130 },
1131};
1132
1133/* mailbox11 */
1134static struct omap_hwmod dra7xx_mailbox11_hwmod = {
1135 .name = "mailbox11",
1136 .class = &dra7xx_mailbox_hwmod_class,
1137 .clkdm_name = "l4cfg_clkdm",
1138 .prcm = {
1139 .omap4 = {
1140 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX11_CLKCTRL_OFFSET,
1141 .context_offs = DRA7XX_RM_L4CFG_MAILBOX11_CONTEXT_OFFSET,
1142 },
1143 },
1144};
1145
1146/* mailbox12 */
1147static struct omap_hwmod dra7xx_mailbox12_hwmod = {
1148 .name = "mailbox12",
1149 .class = &dra7xx_mailbox_hwmod_class,
1150 .clkdm_name = "l4cfg_clkdm",
1151 .prcm = {
1152 .omap4 = {
1153 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX12_CLKCTRL_OFFSET,
1154 .context_offs = DRA7XX_RM_L4CFG_MAILBOX12_CONTEXT_OFFSET,
1155 },
1156 },
1157};
1158
1159/* mailbox13 */
1160static struct omap_hwmod dra7xx_mailbox13_hwmod = {
1161 .name = "mailbox13",
1162 .class = &dra7xx_mailbox_hwmod_class,
1163 .clkdm_name = "l4cfg_clkdm",
1164 .prcm = {
1165 .omap4 = {
1166 .clkctrl_offs = DRA7XX_CM_L4CFG_MAILBOX13_CLKCTRL_OFFSET,
1167 .context_offs = DRA7XX_RM_L4CFG_MAILBOX13_CONTEXT_OFFSET,
1168 },
1169 },
1170};
1171
1172/*
Ambresh K90020c72013-07-09 13:02:16 +05301173 * 'mcspi' class
1174 *
1175 */
1176
1177static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
1178 .rev_offs = 0x0000,
1179 .sysc_offs = 0x0010,
1180 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1181 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1182 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1183 SIDLE_SMART_WKUP),
1184 .sysc_fields = &omap_hwmod_sysc_type2,
1185};
1186
1187static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
1188 .name = "mcspi",
1189 .sysc = &dra7xx_mcspi_sysc,
1190 .rev = OMAP4_MCSPI_REV,
1191};
1192
1193/* mcspi1 */
1194/* mcspi1 dev_attr */
1195static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
1196 .num_chipselect = 4,
1197};
1198
1199static struct omap_hwmod dra7xx_mcspi1_hwmod = {
1200 .name = "mcspi1",
1201 .class = &dra7xx_mcspi_hwmod_class,
1202 .clkdm_name = "l4per_clkdm",
1203 .main_clk = "func_48m_fclk",
1204 .prcm = {
1205 .omap4 = {
1206 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
1207 .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
1208 .modulemode = MODULEMODE_SWCTRL,
1209 },
1210 },
1211 .dev_attr = &mcspi1_dev_attr,
1212};
1213
1214/* mcspi2 */
1215/* mcspi2 dev_attr */
1216static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
1217 .num_chipselect = 2,
1218};
1219
1220static struct omap_hwmod dra7xx_mcspi2_hwmod = {
1221 .name = "mcspi2",
1222 .class = &dra7xx_mcspi_hwmod_class,
1223 .clkdm_name = "l4per_clkdm",
1224 .main_clk = "func_48m_fclk",
1225 .prcm = {
1226 .omap4 = {
1227 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
1228 .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
1229 .modulemode = MODULEMODE_SWCTRL,
1230 },
1231 },
1232 .dev_attr = &mcspi2_dev_attr,
1233};
1234
1235/* mcspi3 */
1236/* mcspi3 dev_attr */
1237static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
1238 .num_chipselect = 2,
1239};
1240
1241static struct omap_hwmod dra7xx_mcspi3_hwmod = {
1242 .name = "mcspi3",
1243 .class = &dra7xx_mcspi_hwmod_class,
1244 .clkdm_name = "l4per_clkdm",
1245 .main_clk = "func_48m_fclk",
1246 .prcm = {
1247 .omap4 = {
1248 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
1249 .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
1250 .modulemode = MODULEMODE_SWCTRL,
1251 },
1252 },
1253 .dev_attr = &mcspi3_dev_attr,
1254};
1255
1256/* mcspi4 */
1257/* mcspi4 dev_attr */
1258static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
1259 .num_chipselect = 1,
1260};
1261
1262static struct omap_hwmod dra7xx_mcspi4_hwmod = {
1263 .name = "mcspi4",
1264 .class = &dra7xx_mcspi_hwmod_class,
1265 .clkdm_name = "l4per_clkdm",
1266 .main_clk = "func_48m_fclk",
1267 .prcm = {
1268 .omap4 = {
1269 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
1270 .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
1271 .modulemode = MODULEMODE_SWCTRL,
1272 },
1273 },
1274 .dev_attr = &mcspi4_dev_attr,
1275};
1276
1277/*
1278 * 'mmc' class
1279 *
1280 */
1281
1282static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
1283 .rev_offs = 0x0000,
1284 .sysc_offs = 0x0010,
1285 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1286 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1287 SYSC_HAS_SOFTRESET),
1288 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1289 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1290 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1291 .sysc_fields = &omap_hwmod_sysc_type2,
1292};
1293
1294static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
1295 .name = "mmc",
1296 .sysc = &dra7xx_mmc_sysc,
1297};
1298
1299/* mmc1 */
1300static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
1301 { .role = "clk32k", .clk = "mmc1_clk32k" },
1302};
1303
1304/* mmc1 dev_attr */
Andreas Fenkart551434382014-11-08 15:33:09 +01001305static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Ambresh K90020c72013-07-09 13:02:16 +05301306 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1307};
1308
1309static struct omap_hwmod dra7xx_mmc1_hwmod = {
1310 .name = "mmc1",
1311 .class = &dra7xx_mmc_hwmod_class,
1312 .clkdm_name = "l3init_clkdm",
1313 .main_clk = "mmc1_fclk_div",
1314 .prcm = {
1315 .omap4 = {
1316 .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
1317 .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
1318 .modulemode = MODULEMODE_SWCTRL,
1319 },
1320 },
1321 .opt_clks = mmc1_opt_clks,
1322 .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
1323 .dev_attr = &mmc1_dev_attr,
1324};
1325
1326/* mmc2 */
1327static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
1328 { .role = "clk32k", .clk = "mmc2_clk32k" },
1329};
1330
1331static struct omap_hwmod dra7xx_mmc2_hwmod = {
1332 .name = "mmc2",
1333 .class = &dra7xx_mmc_hwmod_class,
1334 .clkdm_name = "l3init_clkdm",
1335 .main_clk = "mmc2_fclk_div",
1336 .prcm = {
1337 .omap4 = {
1338 .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
1339 .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
1340 .modulemode = MODULEMODE_SWCTRL,
1341 },
1342 },
1343 .opt_clks = mmc2_opt_clks,
1344 .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
1345};
1346
1347/* mmc3 */
1348static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
1349 { .role = "clk32k", .clk = "mmc3_clk32k" },
1350};
1351
1352static struct omap_hwmod dra7xx_mmc3_hwmod = {
1353 .name = "mmc3",
1354 .class = &dra7xx_mmc_hwmod_class,
1355 .clkdm_name = "l4per_clkdm",
1356 .main_clk = "mmc3_gfclk_div",
1357 .prcm = {
1358 .omap4 = {
1359 .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
1360 .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
1361 .modulemode = MODULEMODE_SWCTRL,
1362 },
1363 },
1364 .opt_clks = mmc3_opt_clks,
1365 .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
1366};
1367
1368/* mmc4 */
1369static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
1370 { .role = "clk32k", .clk = "mmc4_clk32k" },
1371};
1372
1373static struct omap_hwmod dra7xx_mmc4_hwmod = {
1374 .name = "mmc4",
1375 .class = &dra7xx_mmc_hwmod_class,
1376 .clkdm_name = "l4per_clkdm",
1377 .main_clk = "mmc4_gfclk_div",
1378 .prcm = {
1379 .omap4 = {
1380 .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
1381 .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
1382 .modulemode = MODULEMODE_SWCTRL,
1383 },
1384 },
1385 .opt_clks = mmc4_opt_clks,
1386 .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
1387};
1388
1389/*
1390 * 'mpu' class
1391 *
1392 */
1393
1394static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
1395 .name = "mpu",
1396};
1397
1398/* mpu */
1399static struct omap_hwmod dra7xx_mpu_hwmod = {
1400 .name = "mpu",
1401 .class = &dra7xx_mpu_hwmod_class,
1402 .clkdm_name = "mpu_clkdm",
1403 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1404 .main_clk = "dpll_mpu_m2_ck",
1405 .prcm = {
1406 .omap4 = {
1407 .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1408 .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
1409 },
1410 },
1411};
1412
1413/*
1414 * 'ocp2scp' class
1415 *
1416 */
1417
1418static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
1419 .rev_offs = 0x0000,
1420 .sysc_offs = 0x0010,
1421 .syss_offs = 0x0014,
1422 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1423 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1424 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1425 SIDLE_SMART_WKUP),
1426 .sysc_fields = &omap_hwmod_sysc_type1,
1427};
1428
1429static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
1430 .name = "ocp2scp",
1431 .sysc = &dra7xx_ocp2scp_sysc,
1432};
1433
1434/* ocp2scp1 */
1435static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
1436 .name = "ocp2scp1",
1437 .class = &dra7xx_ocp2scp_hwmod_class,
1438 .clkdm_name = "l3init_clkdm",
1439 .main_clk = "l4_root_clk_div",
1440 .prcm = {
1441 .omap4 = {
1442 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
1443 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
1444 .modulemode = MODULEMODE_HWCTRL,
1445 },
1446 },
1447};
1448
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06001449/* ocp2scp3 */
1450static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
1451 .name = "ocp2scp3",
1452 .class = &dra7xx_ocp2scp_hwmod_class,
1453 .clkdm_name = "l3init_clkdm",
1454 .main_clk = "l4_root_clk_div",
1455 .prcm = {
1456 .omap4 = {
1457 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
1458 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
1459 .modulemode = MODULEMODE_HWCTRL,
1460 },
1461 },
1462};
1463
Ambresh K90020c72013-07-09 13:02:16 +05301464/*
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05301465 * 'PCIE' class
1466 *
1467 */
1468
1469static struct omap_hwmod_class dra7xx_pcie_hwmod_class = {
1470 .name = "pcie",
1471};
1472
1473/* pcie1 */
1474static struct omap_hwmod dra7xx_pcie1_hwmod = {
1475 .name = "pcie1",
1476 .class = &dra7xx_pcie_hwmod_class,
1477 .clkdm_name = "pcie_clkdm",
1478 .main_clk = "l4_root_clk_div",
1479 .prcm = {
1480 .omap4 = {
1481 .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET,
1482 .modulemode = MODULEMODE_SWCTRL,
1483 },
1484 },
1485};
1486
1487/* pcie2 */
1488static struct omap_hwmod dra7xx_pcie2_hwmod = {
1489 .name = "pcie2",
1490 .class = &dra7xx_pcie_hwmod_class,
1491 .clkdm_name = "pcie_clkdm",
1492 .main_clk = "l4_root_clk_div",
1493 .prcm = {
1494 .omap4 = {
1495 .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET,
1496 .modulemode = MODULEMODE_SWCTRL,
1497 },
1498 },
1499};
1500
1501/*
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05301502 * 'PCIE PHY' class
1503 *
1504 */
1505
1506static struct omap_hwmod_class dra7xx_pcie_phy_hwmod_class = {
1507 .name = "pcie-phy",
1508};
1509
1510/* pcie1 phy */
1511static struct omap_hwmod dra7xx_pcie1_phy_hwmod = {
1512 .name = "pcie1-phy",
1513 .class = &dra7xx_pcie_phy_hwmod_class,
1514 .clkdm_name = "l3init_clkdm",
1515 .main_clk = "l4_root_clk_div",
1516 .prcm = {
1517 .omap4 = {
1518 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
1519 .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
1520 .modulemode = MODULEMODE_SWCTRL,
1521 },
1522 },
1523};
1524
1525/* pcie2 phy */
1526static struct omap_hwmod dra7xx_pcie2_phy_hwmod = {
1527 .name = "pcie2-phy",
1528 .class = &dra7xx_pcie_phy_hwmod_class,
1529 .clkdm_name = "l3init_clkdm",
1530 .main_clk = "l4_root_clk_div",
1531 .prcm = {
1532 .omap4 = {
1533 .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
1534 .context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
1535 .modulemode = MODULEMODE_SWCTRL,
1536 },
1537 },
1538};
1539
Ambresh K90020c72013-07-09 13:02:16 +05301540/*
1541 * 'qspi' class
1542 *
1543 */
1544
1545static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
1546 .sysc_offs = 0x0010,
1547 .sysc_flags = SYSC_HAS_SIDLEMODE,
1548 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1549 SIDLE_SMART_WKUP),
1550 .sysc_fields = &omap_hwmod_sysc_type2,
1551};
1552
1553static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1554 .name = "qspi",
1555 .sysc = &dra7xx_qspi_sysc,
1556};
1557
1558/* qspi */
1559static struct omap_hwmod dra7xx_qspi_hwmod = {
1560 .name = "qspi",
1561 .class = &dra7xx_qspi_hwmod_class,
1562 .clkdm_name = "l4per2_clkdm",
1563 .main_clk = "qspi_gfclk_div",
1564 .prcm = {
1565 .omap4 = {
1566 .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1567 .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1568 .modulemode = MODULEMODE_SWCTRL,
1569 },
1570 },
1571};
1572
1573/*
Lokesh Vutlac913c8a2014-07-22 13:15:57 -06001574 * 'rtcss' class
1575 *
1576 */
1577static struct omap_hwmod_class_sysconfig dra7xx_rtcss_sysc = {
1578 .sysc_offs = 0x0078,
1579 .sysc_flags = SYSC_HAS_SIDLEMODE,
1580 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1581 SIDLE_SMART_WKUP),
1582 .sysc_fields = &omap_hwmod_sysc_type3,
1583};
1584
1585static struct omap_hwmod_class dra7xx_rtcss_hwmod_class = {
1586 .name = "rtcss",
1587 .sysc = &dra7xx_rtcss_sysc,
1588};
1589
1590/* rtcss */
1591static struct omap_hwmod dra7xx_rtcss_hwmod = {
1592 .name = "rtcss",
1593 .class = &dra7xx_rtcss_hwmod_class,
1594 .clkdm_name = "rtc_clkdm",
1595 .main_clk = "sys_32k_ck",
1596 .prcm = {
1597 .omap4 = {
1598 .clkctrl_offs = DRA7XX_CM_RTC_RTCSS_CLKCTRL_OFFSET,
1599 .context_offs = DRA7XX_RM_RTC_RTCSS_CONTEXT_OFFSET,
1600 .modulemode = MODULEMODE_SWCTRL,
1601 },
1602 },
1603};
1604
1605/*
Ambresh K90020c72013-07-09 13:02:16 +05301606 * 'sata' class
1607 *
1608 */
1609
1610static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
1611 .sysc_offs = 0x0000,
1612 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1613 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1614 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1615 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1616 .sysc_fields = &omap_hwmod_sysc_type2,
1617};
1618
1619static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1620 .name = "sata",
1621 .sysc = &dra7xx_sata_sysc,
1622};
1623
1624/* sata */
Ambresh K90020c72013-07-09 13:02:16 +05301625
1626static struct omap_hwmod dra7xx_sata_hwmod = {
1627 .name = "sata",
1628 .class = &dra7xx_sata_hwmod_class,
1629 .clkdm_name = "l3init_clkdm",
1630 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1631 .main_clk = "func_48m_fclk",
Roger Quadros1ea09992014-07-06 15:51:24 -06001632 .mpu_rt_idx = 1,
Ambresh K90020c72013-07-09 13:02:16 +05301633 .prcm = {
1634 .omap4 = {
1635 .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1636 .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1637 .modulemode = MODULEMODE_SWCTRL,
1638 },
1639 },
Ambresh K90020c72013-07-09 13:02:16 +05301640};
1641
1642/*
1643 * 'smartreflex' class
1644 *
1645 */
1646
1647/* The IP is not compliant to type1 / type2 scheme */
1648static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
1649 .sidle_shift = 24,
1650 .enwkup_shift = 26,
1651};
1652
1653static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
1654 .sysc_offs = 0x0038,
1655 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1656 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1657 SIDLE_SMART_WKUP),
1658 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
1659};
1660
1661static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1662 .name = "smartreflex",
1663 .sysc = &dra7xx_smartreflex_sysc,
1664 .rev = 2,
1665};
1666
1667/* smartreflex_core */
1668/* smartreflex_core dev_attr */
1669static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1670 .sensor_voltdm_name = "core",
1671};
1672
1673static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1674 .name = "smartreflex_core",
1675 .class = &dra7xx_smartreflex_hwmod_class,
1676 .clkdm_name = "coreaon_clkdm",
1677 .main_clk = "wkupaon_iclk_mux",
1678 .prcm = {
1679 .omap4 = {
1680 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1681 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1682 .modulemode = MODULEMODE_SWCTRL,
1683 },
1684 },
1685 .dev_attr = &smartreflex_core_dev_attr,
1686};
1687
1688/* smartreflex_mpu */
1689/* smartreflex_mpu dev_attr */
1690static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1691 .sensor_voltdm_name = "mpu",
1692};
1693
1694static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1695 .name = "smartreflex_mpu",
1696 .class = &dra7xx_smartreflex_hwmod_class,
1697 .clkdm_name = "coreaon_clkdm",
1698 .main_clk = "wkupaon_iclk_mux",
1699 .prcm = {
1700 .omap4 = {
1701 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1702 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1703 .modulemode = MODULEMODE_SWCTRL,
1704 },
1705 },
1706 .dev_attr = &smartreflex_mpu_dev_attr,
1707};
1708
1709/*
1710 * 'spinlock' class
1711 *
1712 */
1713
1714static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1715 .rev_offs = 0x0000,
1716 .sysc_offs = 0x0010,
1717 .syss_offs = 0x0014,
Suman Annac317d0f2014-01-10 17:43:08 -06001718 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1719 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1720 SYSS_HAS_RESET_STATUS),
1721 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Ambresh K90020c72013-07-09 13:02:16 +05301722 .sysc_fields = &omap_hwmod_sysc_type1,
1723};
1724
1725static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
1726 .name = "spinlock",
1727 .sysc = &dra7xx_spinlock_sysc,
1728};
1729
1730/* spinlock */
1731static struct omap_hwmod dra7xx_spinlock_hwmod = {
1732 .name = "spinlock",
1733 .class = &dra7xx_spinlock_hwmod_class,
1734 .clkdm_name = "l4cfg_clkdm",
1735 .main_clk = "l3_iclk_div",
1736 .prcm = {
1737 .omap4 = {
1738 .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
1739 .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
1740 },
1741 },
1742};
1743
1744/*
1745 * 'timer' class
1746 *
1747 * This class contains several variants: ['timer_1ms', 'timer_secure',
1748 * 'timer']
1749 */
1750
1751static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
1752 .rev_offs = 0x0000,
1753 .sysc_offs = 0x0010,
1754 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1755 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1756 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1757 SIDLE_SMART_WKUP),
1758 .sysc_fields = &omap_hwmod_sysc_type2,
1759};
1760
1761static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1762 .name = "timer",
1763 .sysc = &dra7xx_timer_1ms_sysc,
1764};
1765
Ambresh K90020c72013-07-09 13:02:16 +05301766static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1767 .rev_offs = 0x0000,
1768 .sysc_offs = 0x0010,
1769 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1770 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1771 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1772 SIDLE_SMART_WKUP),
1773 .sysc_fields = &omap_hwmod_sysc_type2,
1774};
1775
1776static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
1777 .name = "timer",
1778 .sysc = &dra7xx_timer_sysc,
1779};
1780
1781/* timer1 */
1782static struct omap_hwmod dra7xx_timer1_hwmod = {
1783 .name = "timer1",
1784 .class = &dra7xx_timer_1ms_hwmod_class,
1785 .clkdm_name = "wkupaon_clkdm",
1786 .main_clk = "timer1_gfclk_mux",
1787 .prcm = {
1788 .omap4 = {
1789 .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1790 .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1791 .modulemode = MODULEMODE_SWCTRL,
1792 },
1793 },
1794};
1795
1796/* timer2 */
1797static struct omap_hwmod dra7xx_timer2_hwmod = {
1798 .name = "timer2",
1799 .class = &dra7xx_timer_1ms_hwmod_class,
1800 .clkdm_name = "l4per_clkdm",
1801 .main_clk = "timer2_gfclk_mux",
1802 .prcm = {
1803 .omap4 = {
1804 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1805 .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1806 .modulemode = MODULEMODE_SWCTRL,
1807 },
1808 },
1809};
1810
1811/* timer3 */
1812static struct omap_hwmod dra7xx_timer3_hwmod = {
1813 .name = "timer3",
1814 .class = &dra7xx_timer_hwmod_class,
1815 .clkdm_name = "l4per_clkdm",
1816 .main_clk = "timer3_gfclk_mux",
1817 .prcm = {
1818 .omap4 = {
1819 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1820 .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1821 .modulemode = MODULEMODE_SWCTRL,
1822 },
1823 },
1824};
1825
1826/* timer4 */
1827static struct omap_hwmod dra7xx_timer4_hwmod = {
1828 .name = "timer4",
Suman Annaedec1782015-03-16 15:54:54 -05001829 .class = &dra7xx_timer_hwmod_class,
Ambresh K90020c72013-07-09 13:02:16 +05301830 .clkdm_name = "l4per_clkdm",
1831 .main_clk = "timer4_gfclk_mux",
1832 .prcm = {
1833 .omap4 = {
1834 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1835 .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1836 .modulemode = MODULEMODE_SWCTRL,
1837 },
1838 },
1839};
1840
1841/* timer5 */
1842static struct omap_hwmod dra7xx_timer5_hwmod = {
1843 .name = "timer5",
1844 .class = &dra7xx_timer_hwmod_class,
1845 .clkdm_name = "ipu_clkdm",
1846 .main_clk = "timer5_gfclk_mux",
1847 .prcm = {
1848 .omap4 = {
1849 .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
1850 .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
1851 .modulemode = MODULEMODE_SWCTRL,
1852 },
1853 },
1854};
1855
1856/* timer6 */
1857static struct omap_hwmod dra7xx_timer6_hwmod = {
1858 .name = "timer6",
1859 .class = &dra7xx_timer_hwmod_class,
1860 .clkdm_name = "ipu_clkdm",
1861 .main_clk = "timer6_gfclk_mux",
1862 .prcm = {
1863 .omap4 = {
1864 .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
1865 .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
1866 .modulemode = MODULEMODE_SWCTRL,
1867 },
1868 },
1869};
1870
1871/* timer7 */
1872static struct omap_hwmod dra7xx_timer7_hwmod = {
1873 .name = "timer7",
1874 .class = &dra7xx_timer_hwmod_class,
1875 .clkdm_name = "ipu_clkdm",
1876 .main_clk = "timer7_gfclk_mux",
1877 .prcm = {
1878 .omap4 = {
1879 .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
1880 .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
1881 .modulemode = MODULEMODE_SWCTRL,
1882 },
1883 },
1884};
1885
1886/* timer8 */
1887static struct omap_hwmod dra7xx_timer8_hwmod = {
1888 .name = "timer8",
1889 .class = &dra7xx_timer_hwmod_class,
1890 .clkdm_name = "ipu_clkdm",
1891 .main_clk = "timer8_gfclk_mux",
1892 .prcm = {
1893 .omap4 = {
1894 .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
1895 .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
1896 .modulemode = MODULEMODE_SWCTRL,
1897 },
1898 },
1899};
1900
1901/* timer9 */
1902static struct omap_hwmod dra7xx_timer9_hwmod = {
1903 .name = "timer9",
1904 .class = &dra7xx_timer_hwmod_class,
1905 .clkdm_name = "l4per_clkdm",
1906 .main_clk = "timer9_gfclk_mux",
1907 .prcm = {
1908 .omap4 = {
1909 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1910 .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1911 .modulemode = MODULEMODE_SWCTRL,
1912 },
1913 },
1914};
1915
1916/* timer10 */
1917static struct omap_hwmod dra7xx_timer10_hwmod = {
1918 .name = "timer10",
1919 .class = &dra7xx_timer_1ms_hwmod_class,
1920 .clkdm_name = "l4per_clkdm",
1921 .main_clk = "timer10_gfclk_mux",
1922 .prcm = {
1923 .omap4 = {
1924 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1925 .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1926 .modulemode = MODULEMODE_SWCTRL,
1927 },
1928 },
1929};
1930
1931/* timer11 */
1932static struct omap_hwmod dra7xx_timer11_hwmod = {
1933 .name = "timer11",
1934 .class = &dra7xx_timer_hwmod_class,
1935 .clkdm_name = "l4per_clkdm",
1936 .main_clk = "timer11_gfclk_mux",
1937 .prcm = {
1938 .omap4 = {
1939 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1940 .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1941 .modulemode = MODULEMODE_SWCTRL,
1942 },
1943 },
1944};
1945
Suman Anna1ac964f2015-03-16 15:54:53 -05001946/* timer13 */
1947static struct omap_hwmod dra7xx_timer13_hwmod = {
1948 .name = "timer13",
1949 .class = &dra7xx_timer_hwmod_class,
1950 .clkdm_name = "l4per3_clkdm",
1951 .main_clk = "timer13_gfclk_mux",
1952 .prcm = {
1953 .omap4 = {
1954 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
1955 .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
1956 .modulemode = MODULEMODE_SWCTRL,
1957 },
1958 },
1959};
1960
1961/* timer14 */
1962static struct omap_hwmod dra7xx_timer14_hwmod = {
1963 .name = "timer14",
1964 .class = &dra7xx_timer_hwmod_class,
1965 .clkdm_name = "l4per3_clkdm",
1966 .main_clk = "timer14_gfclk_mux",
1967 .prcm = {
1968 .omap4 = {
1969 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
1970 .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
1971 .modulemode = MODULEMODE_SWCTRL,
1972 },
1973 },
1974};
1975
1976/* timer15 */
1977static struct omap_hwmod dra7xx_timer15_hwmod = {
1978 .name = "timer15",
1979 .class = &dra7xx_timer_hwmod_class,
1980 .clkdm_name = "l4per3_clkdm",
1981 .main_clk = "timer15_gfclk_mux",
1982 .prcm = {
1983 .omap4 = {
1984 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
1985 .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
1986 .modulemode = MODULEMODE_SWCTRL,
1987 },
1988 },
1989};
1990
1991/* timer16 */
1992static struct omap_hwmod dra7xx_timer16_hwmod = {
1993 .name = "timer16",
1994 .class = &dra7xx_timer_hwmod_class,
1995 .clkdm_name = "l4per3_clkdm",
1996 .main_clk = "timer16_gfclk_mux",
1997 .prcm = {
1998 .omap4 = {
1999 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
2000 .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
2001 .modulemode = MODULEMODE_SWCTRL,
2002 },
2003 },
2004};
2005
Ambresh K90020c72013-07-09 13:02:16 +05302006/*
2007 * 'uart' class
2008 *
2009 */
2010
2011static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
2012 .rev_offs = 0x0050,
2013 .sysc_offs = 0x0054,
2014 .syss_offs = 0x0058,
2015 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
2016 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2017 SYSS_HAS_RESET_STATUS),
2018 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2019 SIDLE_SMART_WKUP),
2020 .sysc_fields = &omap_hwmod_sysc_type1,
2021};
2022
2023static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
2024 .name = "uart",
2025 .sysc = &dra7xx_uart_sysc,
2026};
2027
2028/* uart1 */
2029static struct omap_hwmod dra7xx_uart1_hwmod = {
2030 .name = "uart1",
2031 .class = &dra7xx_uart_hwmod_class,
2032 .clkdm_name = "l4per_clkdm",
2033 .main_clk = "uart1_gfclk_mux",
Rajendra Nayak38958c12013-12-12 15:22:49 +05302034 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +05302035 .prcm = {
2036 .omap4 = {
2037 .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
2038 .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
2039 .modulemode = MODULEMODE_SWCTRL,
2040 },
2041 },
2042};
2043
2044/* uart2 */
2045static struct omap_hwmod dra7xx_uart2_hwmod = {
2046 .name = "uart2",
2047 .class = &dra7xx_uart_hwmod_class,
2048 .clkdm_name = "l4per_clkdm",
2049 .main_clk = "uart2_gfclk_mux",
2050 .flags = HWMOD_SWSUP_SIDLE_ACT,
2051 .prcm = {
2052 .omap4 = {
2053 .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
2054 .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
2055 .modulemode = MODULEMODE_SWCTRL,
2056 },
2057 },
2058};
2059
2060/* uart3 */
2061static struct omap_hwmod dra7xx_uart3_hwmod = {
2062 .name = "uart3",
2063 .class = &dra7xx_uart_hwmod_class,
2064 .clkdm_name = "l4per_clkdm",
2065 .main_clk = "uart3_gfclk_mux",
Lokesh Vutla1c7e36b2015-01-08 17:22:04 +05302066 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +05302067 .prcm = {
2068 .omap4 = {
2069 .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
2070 .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
2071 .modulemode = MODULEMODE_SWCTRL,
2072 },
2073 },
2074};
2075
2076/* uart4 */
2077static struct omap_hwmod dra7xx_uart4_hwmod = {
2078 .name = "uart4",
2079 .class = &dra7xx_uart_hwmod_class,
2080 .clkdm_name = "l4per_clkdm",
2081 .main_clk = "uart4_gfclk_mux",
2082 .flags = HWMOD_SWSUP_SIDLE_ACT,
2083 .prcm = {
2084 .omap4 = {
2085 .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
2086 .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
2087 .modulemode = MODULEMODE_SWCTRL,
2088 },
2089 },
2090};
2091
2092/* uart5 */
2093static struct omap_hwmod dra7xx_uart5_hwmod = {
2094 .name = "uart5",
2095 .class = &dra7xx_uart_hwmod_class,
2096 .clkdm_name = "l4per_clkdm",
2097 .main_clk = "uart5_gfclk_mux",
2098 .flags = HWMOD_SWSUP_SIDLE_ACT,
2099 .prcm = {
2100 .omap4 = {
2101 .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
2102 .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
2103 .modulemode = MODULEMODE_SWCTRL,
2104 },
2105 },
2106};
2107
2108/* uart6 */
2109static struct omap_hwmod dra7xx_uart6_hwmod = {
2110 .name = "uart6",
2111 .class = &dra7xx_uart_hwmod_class,
2112 .clkdm_name = "ipu_clkdm",
2113 .main_clk = "uart6_gfclk_mux",
2114 .flags = HWMOD_SWSUP_SIDLE_ACT,
2115 .prcm = {
2116 .omap4 = {
2117 .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
2118 .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
2119 .modulemode = MODULEMODE_SWCTRL,
2120 },
2121 },
2122};
2123
Ambresh K33acc9f2014-10-21 11:17:51 -05002124/* uart7 */
2125static struct omap_hwmod dra7xx_uart7_hwmod = {
2126 .name = "uart7",
2127 .class = &dra7xx_uart_hwmod_class,
2128 .clkdm_name = "l4per2_clkdm",
2129 .main_clk = "uart7_gfclk_mux",
2130 .flags = HWMOD_SWSUP_SIDLE_ACT,
2131 .prcm = {
2132 .omap4 = {
2133 .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET,
2134 .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET,
2135 .modulemode = MODULEMODE_SWCTRL,
2136 },
2137 },
2138};
2139
2140/* uart8 */
2141static struct omap_hwmod dra7xx_uart8_hwmod = {
2142 .name = "uart8",
2143 .class = &dra7xx_uart_hwmod_class,
2144 .clkdm_name = "l4per2_clkdm",
2145 .main_clk = "uart8_gfclk_mux",
2146 .flags = HWMOD_SWSUP_SIDLE_ACT,
2147 .prcm = {
2148 .omap4 = {
2149 .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET,
2150 .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET,
2151 .modulemode = MODULEMODE_SWCTRL,
2152 },
2153 },
2154};
2155
2156/* uart9 */
2157static struct omap_hwmod dra7xx_uart9_hwmod = {
2158 .name = "uart9",
2159 .class = &dra7xx_uart_hwmod_class,
2160 .clkdm_name = "l4per2_clkdm",
2161 .main_clk = "uart9_gfclk_mux",
2162 .flags = HWMOD_SWSUP_SIDLE_ACT,
2163 .prcm = {
2164 .omap4 = {
2165 .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET,
2166 .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET,
2167 .modulemode = MODULEMODE_SWCTRL,
2168 },
2169 },
2170};
2171
2172/* uart10 */
2173static struct omap_hwmod dra7xx_uart10_hwmod = {
2174 .name = "uart10",
2175 .class = &dra7xx_uart_hwmod_class,
2176 .clkdm_name = "wkupaon_clkdm",
2177 .main_clk = "uart10_gfclk_mux",
2178 .flags = HWMOD_SWSUP_SIDLE_ACT,
2179 .prcm = {
2180 .omap4 = {
2181 .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET,
2182 .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET,
2183 .modulemode = MODULEMODE_SWCTRL,
2184 },
2185 },
2186};
2187
Ambresh K90020c72013-07-09 13:02:16 +05302188/*
2189 * 'usb_otg_ss' class
2190 *
2191 */
2192
Roger Quadrosd904b382014-07-06 15:51:24 -06002193static struct omap_hwmod_class_sysconfig dra7xx_usb_otg_ss_sysc = {
2194 .rev_offs = 0x0000,
2195 .sysc_offs = 0x0010,
2196 .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE |
2197 SYSC_HAS_SIDLEMODE),
2198 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2199 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2200 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2201 .sysc_fields = &omap_hwmod_sysc_type2,
2202};
2203
Ambresh K90020c72013-07-09 13:02:16 +05302204static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
2205 .name = "usb_otg_ss",
Roger Quadrosd904b382014-07-06 15:51:24 -06002206 .sysc = &dra7xx_usb_otg_ss_sysc,
Ambresh K90020c72013-07-09 13:02:16 +05302207};
2208
2209/* usb_otg_ss1 */
2210static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
2211 { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
2212};
2213
2214static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
2215 .name = "usb_otg_ss1",
2216 .class = &dra7xx_usb_otg_ss_hwmod_class,
2217 .clkdm_name = "l3init_clkdm",
2218 .main_clk = "dpll_core_h13x2_ck",
2219 .prcm = {
2220 .omap4 = {
2221 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
2222 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
2223 .modulemode = MODULEMODE_HWCTRL,
2224 },
2225 },
2226 .opt_clks = usb_otg_ss1_opt_clks,
2227 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
2228};
2229
2230/* usb_otg_ss2 */
2231static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
2232 { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
2233};
2234
2235static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
2236 .name = "usb_otg_ss2",
2237 .class = &dra7xx_usb_otg_ss_hwmod_class,
2238 .clkdm_name = "l3init_clkdm",
2239 .main_clk = "dpll_core_h13x2_ck",
2240 .prcm = {
2241 .omap4 = {
2242 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
2243 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
2244 .modulemode = MODULEMODE_HWCTRL,
2245 },
2246 },
2247 .opt_clks = usb_otg_ss2_opt_clks,
2248 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
2249};
2250
2251/* usb_otg_ss3 */
2252static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
2253 .name = "usb_otg_ss3",
2254 .class = &dra7xx_usb_otg_ss_hwmod_class,
2255 .clkdm_name = "l3init_clkdm",
2256 .main_clk = "dpll_core_h13x2_ck",
2257 .prcm = {
2258 .omap4 = {
2259 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
2260 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
2261 .modulemode = MODULEMODE_HWCTRL,
2262 },
2263 },
2264};
2265
2266/* usb_otg_ss4 */
2267static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
2268 .name = "usb_otg_ss4",
2269 .class = &dra7xx_usb_otg_ss_hwmod_class,
2270 .clkdm_name = "l3init_clkdm",
2271 .main_clk = "dpll_core_h13x2_ck",
2272 .prcm = {
2273 .omap4 = {
2274 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
2275 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
2276 .modulemode = MODULEMODE_HWCTRL,
2277 },
2278 },
2279};
2280
2281/*
2282 * 'vcp' class
2283 *
2284 */
2285
2286static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
2287 .name = "vcp",
2288};
2289
2290/* vcp1 */
2291static struct omap_hwmod dra7xx_vcp1_hwmod = {
2292 .name = "vcp1",
2293 .class = &dra7xx_vcp_hwmod_class,
2294 .clkdm_name = "l3main1_clkdm",
2295 .main_clk = "l3_iclk_div",
2296 .prcm = {
2297 .omap4 = {
2298 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
2299 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
2300 },
2301 },
2302};
2303
2304/* vcp2 */
2305static struct omap_hwmod dra7xx_vcp2_hwmod = {
2306 .name = "vcp2",
2307 .class = &dra7xx_vcp_hwmod_class,
2308 .clkdm_name = "l3main1_clkdm",
2309 .main_clk = "l3_iclk_div",
2310 .prcm = {
2311 .omap4 = {
2312 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
2313 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
2314 },
2315 },
2316};
2317
2318/*
2319 * 'wd_timer' class
2320 *
2321 */
2322
2323static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
2324 .rev_offs = 0x0000,
2325 .sysc_offs = 0x0010,
2326 .syss_offs = 0x0014,
2327 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
2328 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2329 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2330 SIDLE_SMART_WKUP),
2331 .sysc_fields = &omap_hwmod_sysc_type1,
2332};
2333
2334static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
2335 .name = "wd_timer",
2336 .sysc = &dra7xx_wd_timer_sysc,
2337 .pre_shutdown = &omap2_wd_timer_disable,
2338 .reset = &omap2_wd_timer_reset,
2339};
2340
2341/* wd_timer2 */
2342static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
2343 .name = "wd_timer2",
2344 .class = &dra7xx_wd_timer_hwmod_class,
2345 .clkdm_name = "wkupaon_clkdm",
2346 .main_clk = "sys_32k_ck",
2347 .prcm = {
2348 .omap4 = {
2349 .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
2350 .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
2351 .modulemode = MODULEMODE_SWCTRL,
2352 },
2353 },
2354};
2355
2356
2357/*
2358 * Interfaces
2359 */
2360
2361/* l3_main_2 -> l3_instr */
2362static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
2363 .master = &dra7xx_l3_main_2_hwmod,
2364 .slave = &dra7xx_l3_instr_hwmod,
2365 .clk = "l3_iclk_div",
2366 .user = OCP_USER_MPU | OCP_USER_SDMA,
2367};
2368
2369/* l4_cfg -> l3_main_1 */
2370static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
2371 .master = &dra7xx_l4_cfg_hwmod,
2372 .slave = &dra7xx_l3_main_1_hwmod,
2373 .clk = "l3_iclk_div",
2374 .user = OCP_USER_MPU | OCP_USER_SDMA,
2375};
2376
2377/* mpu -> l3_main_1 */
2378static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
2379 .master = &dra7xx_mpu_hwmod,
2380 .slave = &dra7xx_l3_main_1_hwmod,
2381 .clk = "l3_iclk_div",
2382 .user = OCP_USER_MPU,
2383};
2384
2385/* l3_main_1 -> l3_main_2 */
2386static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
2387 .master = &dra7xx_l3_main_1_hwmod,
2388 .slave = &dra7xx_l3_main_2_hwmod,
2389 .clk = "l3_iclk_div",
2390 .user = OCP_USER_MPU,
2391};
2392
2393/* l4_cfg -> l3_main_2 */
2394static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
2395 .master = &dra7xx_l4_cfg_hwmod,
2396 .slave = &dra7xx_l3_main_2_hwmod,
2397 .clk = "l3_iclk_div",
2398 .user = OCP_USER_MPU | OCP_USER_SDMA,
2399};
2400
2401/* l3_main_1 -> l4_cfg */
2402static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
2403 .master = &dra7xx_l3_main_1_hwmod,
2404 .slave = &dra7xx_l4_cfg_hwmod,
2405 .clk = "l3_iclk_div",
2406 .user = OCP_USER_MPU | OCP_USER_SDMA,
2407};
2408
2409/* l3_main_1 -> l4_per1 */
2410static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
2411 .master = &dra7xx_l3_main_1_hwmod,
2412 .slave = &dra7xx_l4_per1_hwmod,
2413 .clk = "l3_iclk_div",
2414 .user = OCP_USER_MPU | OCP_USER_SDMA,
2415};
2416
2417/* l3_main_1 -> l4_per2 */
2418static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
2419 .master = &dra7xx_l3_main_1_hwmod,
2420 .slave = &dra7xx_l4_per2_hwmod,
2421 .clk = "l3_iclk_div",
2422 .user = OCP_USER_MPU | OCP_USER_SDMA,
2423};
2424
2425/* l3_main_1 -> l4_per3 */
2426static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
2427 .master = &dra7xx_l3_main_1_hwmod,
2428 .slave = &dra7xx_l4_per3_hwmod,
2429 .clk = "l3_iclk_div",
2430 .user = OCP_USER_MPU | OCP_USER_SDMA,
2431};
2432
2433/* l3_main_1 -> l4_wkup */
2434static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
2435 .master = &dra7xx_l3_main_1_hwmod,
2436 .slave = &dra7xx_l4_wkup_hwmod,
2437 .clk = "wkupaon_iclk_mux",
2438 .user = OCP_USER_MPU | OCP_USER_SDMA,
2439};
2440
2441/* l4_per2 -> atl */
2442static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
2443 .master = &dra7xx_l4_per2_hwmod,
2444 .slave = &dra7xx_atl_hwmod,
2445 .clk = "l3_iclk_div",
2446 .user = OCP_USER_MPU | OCP_USER_SDMA,
2447};
2448
2449/* l3_main_1 -> bb2d */
2450static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
2451 .master = &dra7xx_l3_main_1_hwmod,
2452 .slave = &dra7xx_bb2d_hwmod,
2453 .clk = "l3_iclk_div",
2454 .user = OCP_USER_MPU | OCP_USER_SDMA,
2455};
2456
2457/* l4_wkup -> counter_32k */
2458static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
2459 .master = &dra7xx_l4_wkup_hwmod,
2460 .slave = &dra7xx_counter_32k_hwmod,
2461 .clk = "wkupaon_iclk_mux",
2462 .user = OCP_USER_MPU | OCP_USER_SDMA,
2463};
2464
2465/* l4_wkup -> ctrl_module_wkup */
2466static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
2467 .master = &dra7xx_l4_wkup_hwmod,
2468 .slave = &dra7xx_ctrl_module_wkup_hwmod,
2469 .clk = "wkupaon_iclk_mux",
2470 .user = OCP_USER_MPU | OCP_USER_SDMA,
2471};
2472
Mugunthan V N077c42f2014-07-08 18:46:39 +05302473static struct omap_hwmod_ocp_if dra7xx_l4_per2__cpgmac0 = {
2474 .master = &dra7xx_l4_per2_hwmod,
2475 .slave = &dra7xx_gmac_hwmod,
2476 .clk = "dpll_gmac_ck",
2477 .user = OCP_USER_MPU,
2478};
2479
2480static struct omap_hwmod_ocp_if dra7xx_gmac__mdio = {
2481 .master = &dra7xx_gmac_hwmod,
2482 .slave = &dra7xx_mdio_hwmod,
2483 .user = OCP_USER_MPU,
2484};
2485
Ambresh K90020c72013-07-09 13:02:16 +05302486/* l4_wkup -> dcan1 */
2487static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
2488 .master = &dra7xx_l4_wkup_hwmod,
2489 .slave = &dra7xx_dcan1_hwmod,
2490 .clk = "wkupaon_iclk_mux",
2491 .user = OCP_USER_MPU | OCP_USER_SDMA,
2492};
2493
2494/* l4_per2 -> dcan2 */
2495static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
2496 .master = &dra7xx_l4_per2_hwmod,
2497 .slave = &dra7xx_dcan2_hwmod,
2498 .clk = "l3_iclk_div",
2499 .user = OCP_USER_MPU | OCP_USER_SDMA,
2500};
2501
2502static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
2503 {
2504 .pa_start = 0x4a056000,
2505 .pa_end = 0x4a056fff,
2506 .flags = ADDR_TYPE_RT
2507 },
2508 { }
2509};
2510
2511/* l4_cfg -> dma_system */
2512static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
2513 .master = &dra7xx_l4_cfg_hwmod,
2514 .slave = &dra7xx_dma_system_hwmod,
2515 .clk = "l3_iclk_div",
2516 .addr = dra7xx_dma_system_addrs,
2517 .user = OCP_USER_MPU | OCP_USER_SDMA,
2518};
2519
2520static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
2521 {
2522 .name = "family",
2523 .pa_start = 0x58000000,
2524 .pa_end = 0x5800007f,
2525 .flags = ADDR_TYPE_RT
2526 },
2527};
2528
2529/* l3_main_1 -> dss */
2530static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
2531 .master = &dra7xx_l3_main_1_hwmod,
2532 .slave = &dra7xx_dss_hwmod,
2533 .clk = "l3_iclk_div",
2534 .addr = dra7xx_dss_addrs,
2535 .user = OCP_USER_MPU | OCP_USER_SDMA,
2536};
2537
2538static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
2539 {
2540 .name = "dispc",
2541 .pa_start = 0x58001000,
2542 .pa_end = 0x58001fff,
2543 .flags = ADDR_TYPE_RT
2544 },
2545};
2546
2547/* l3_main_1 -> dispc */
2548static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
2549 .master = &dra7xx_l3_main_1_hwmod,
2550 .slave = &dra7xx_dss_dispc_hwmod,
2551 .clk = "l3_iclk_div",
2552 .addr = dra7xx_dss_dispc_addrs,
2553 .user = OCP_USER_MPU | OCP_USER_SDMA,
2554};
2555
2556static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
2557 {
2558 .name = "hdmi_wp",
2559 .pa_start = 0x58040000,
2560 .pa_end = 0x580400ff,
2561 .flags = ADDR_TYPE_RT
2562 },
2563 { }
2564};
2565
2566/* l3_main_1 -> dispc */
2567static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2568 .master = &dra7xx_l3_main_1_hwmod,
2569 .slave = &dra7xx_dss_hdmi_hwmod,
2570 .clk = "l3_iclk_div",
2571 .addr = dra7xx_dss_hdmi_addrs,
2572 .user = OCP_USER_MPU | OCP_USER_SDMA,
2573};
2574
2575static struct omap_hwmod_addr_space dra7xx_elm_addrs[] = {
2576 {
2577 .pa_start = 0x48078000,
2578 .pa_end = 0x48078fff,
2579 .flags = ADDR_TYPE_RT
2580 },
2581 { }
2582};
2583
2584/* l4_per1 -> elm */
2585static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2586 .master = &dra7xx_l4_per1_hwmod,
2587 .slave = &dra7xx_elm_hwmod,
2588 .clk = "l3_iclk_div",
2589 .addr = dra7xx_elm_addrs,
2590 .user = OCP_USER_MPU | OCP_USER_SDMA,
2591};
2592
2593/* l4_wkup -> gpio1 */
2594static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
2595 .master = &dra7xx_l4_wkup_hwmod,
2596 .slave = &dra7xx_gpio1_hwmod,
2597 .clk = "wkupaon_iclk_mux",
2598 .user = OCP_USER_MPU | OCP_USER_SDMA,
2599};
2600
2601/* l4_per1 -> gpio2 */
2602static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
2603 .master = &dra7xx_l4_per1_hwmod,
2604 .slave = &dra7xx_gpio2_hwmod,
2605 .clk = "l3_iclk_div",
2606 .user = OCP_USER_MPU | OCP_USER_SDMA,
2607};
2608
2609/* l4_per1 -> gpio3 */
2610static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
2611 .master = &dra7xx_l4_per1_hwmod,
2612 .slave = &dra7xx_gpio3_hwmod,
2613 .clk = "l3_iclk_div",
2614 .user = OCP_USER_MPU | OCP_USER_SDMA,
2615};
2616
2617/* l4_per1 -> gpio4 */
2618static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
2619 .master = &dra7xx_l4_per1_hwmod,
2620 .slave = &dra7xx_gpio4_hwmod,
2621 .clk = "l3_iclk_div",
2622 .user = OCP_USER_MPU | OCP_USER_SDMA,
2623};
2624
2625/* l4_per1 -> gpio5 */
2626static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
2627 .master = &dra7xx_l4_per1_hwmod,
2628 .slave = &dra7xx_gpio5_hwmod,
2629 .clk = "l3_iclk_div",
2630 .user = OCP_USER_MPU | OCP_USER_SDMA,
2631};
2632
2633/* l4_per1 -> gpio6 */
2634static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
2635 .master = &dra7xx_l4_per1_hwmod,
2636 .slave = &dra7xx_gpio6_hwmod,
2637 .clk = "l3_iclk_div",
2638 .user = OCP_USER_MPU | OCP_USER_SDMA,
2639};
2640
2641/* l4_per1 -> gpio7 */
2642static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
2643 .master = &dra7xx_l4_per1_hwmod,
2644 .slave = &dra7xx_gpio7_hwmod,
2645 .clk = "l3_iclk_div",
2646 .user = OCP_USER_MPU | OCP_USER_SDMA,
2647};
2648
2649/* l4_per1 -> gpio8 */
2650static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
2651 .master = &dra7xx_l4_per1_hwmod,
2652 .slave = &dra7xx_gpio8_hwmod,
2653 .clk = "l3_iclk_div",
2654 .user = OCP_USER_MPU | OCP_USER_SDMA,
2655};
2656
2657static struct omap_hwmod_addr_space dra7xx_gpmc_addrs[] = {
2658 {
2659 .pa_start = 0x50000000,
2660 .pa_end = 0x500003ff,
2661 .flags = ADDR_TYPE_RT
2662 },
2663 { }
2664};
2665
2666/* l3_main_1 -> gpmc */
2667static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
2668 .master = &dra7xx_l3_main_1_hwmod,
2669 .slave = &dra7xx_gpmc_hwmod,
2670 .clk = "l3_iclk_div",
2671 .addr = dra7xx_gpmc_addrs,
2672 .user = OCP_USER_MPU | OCP_USER_SDMA,
2673};
2674
2675static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
2676 {
2677 .pa_start = 0x480b2000,
2678 .pa_end = 0x480b201f,
2679 .flags = ADDR_TYPE_RT
2680 },
2681 { }
2682};
2683
2684/* l4_per1 -> hdq1w */
2685static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
2686 .master = &dra7xx_l4_per1_hwmod,
2687 .slave = &dra7xx_hdq1w_hwmod,
2688 .clk = "l3_iclk_div",
2689 .addr = dra7xx_hdq1w_addrs,
2690 .user = OCP_USER_MPU | OCP_USER_SDMA,
2691};
2692
2693/* l4_per1 -> i2c1 */
2694static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
2695 .master = &dra7xx_l4_per1_hwmod,
2696 .slave = &dra7xx_i2c1_hwmod,
2697 .clk = "l3_iclk_div",
2698 .user = OCP_USER_MPU | OCP_USER_SDMA,
2699};
2700
2701/* l4_per1 -> i2c2 */
2702static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
2703 .master = &dra7xx_l4_per1_hwmod,
2704 .slave = &dra7xx_i2c2_hwmod,
2705 .clk = "l3_iclk_div",
2706 .user = OCP_USER_MPU | OCP_USER_SDMA,
2707};
2708
2709/* l4_per1 -> i2c3 */
2710static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
2711 .master = &dra7xx_l4_per1_hwmod,
2712 .slave = &dra7xx_i2c3_hwmod,
2713 .clk = "l3_iclk_div",
2714 .user = OCP_USER_MPU | OCP_USER_SDMA,
2715};
2716
2717/* l4_per1 -> i2c4 */
2718static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
2719 .master = &dra7xx_l4_per1_hwmod,
2720 .slave = &dra7xx_i2c4_hwmod,
2721 .clk = "l3_iclk_div",
2722 .user = OCP_USER_MPU | OCP_USER_SDMA,
2723};
2724
2725/* l4_per1 -> i2c5 */
2726static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
2727 .master = &dra7xx_l4_per1_hwmod,
2728 .slave = &dra7xx_i2c5_hwmod,
2729 .clk = "l3_iclk_div",
2730 .user = OCP_USER_MPU | OCP_USER_SDMA,
2731};
2732
Suman Anna067395d2014-07-11 16:44:39 -05002733/* l4_cfg -> mailbox1 */
2734static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mailbox1 = {
2735 .master = &dra7xx_l4_cfg_hwmod,
2736 .slave = &dra7xx_mailbox1_hwmod,
2737 .clk = "l3_iclk_div",
2738 .user = OCP_USER_MPU | OCP_USER_SDMA,
2739};
2740
2741/* l4_per3 -> mailbox2 */
2742static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox2 = {
2743 .master = &dra7xx_l4_per3_hwmod,
2744 .slave = &dra7xx_mailbox2_hwmod,
2745 .clk = "l3_iclk_div",
2746 .user = OCP_USER_MPU | OCP_USER_SDMA,
2747};
2748
2749/* l4_per3 -> mailbox3 */
2750static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox3 = {
2751 .master = &dra7xx_l4_per3_hwmod,
2752 .slave = &dra7xx_mailbox3_hwmod,
2753 .clk = "l3_iclk_div",
2754 .user = OCP_USER_MPU | OCP_USER_SDMA,
2755};
2756
2757/* l4_per3 -> mailbox4 */
2758static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox4 = {
2759 .master = &dra7xx_l4_per3_hwmod,
2760 .slave = &dra7xx_mailbox4_hwmod,
2761 .clk = "l3_iclk_div",
2762 .user = OCP_USER_MPU | OCP_USER_SDMA,
2763};
2764
2765/* l4_per3 -> mailbox5 */
2766static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox5 = {
2767 .master = &dra7xx_l4_per3_hwmod,
2768 .slave = &dra7xx_mailbox5_hwmod,
2769 .clk = "l3_iclk_div",
2770 .user = OCP_USER_MPU | OCP_USER_SDMA,
2771};
2772
2773/* l4_per3 -> mailbox6 */
2774static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox6 = {
2775 .master = &dra7xx_l4_per3_hwmod,
2776 .slave = &dra7xx_mailbox6_hwmod,
2777 .clk = "l3_iclk_div",
2778 .user = OCP_USER_MPU | OCP_USER_SDMA,
2779};
2780
2781/* l4_per3 -> mailbox7 */
2782static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox7 = {
2783 .master = &dra7xx_l4_per3_hwmod,
2784 .slave = &dra7xx_mailbox7_hwmod,
2785 .clk = "l3_iclk_div",
2786 .user = OCP_USER_MPU | OCP_USER_SDMA,
2787};
2788
2789/* l4_per3 -> mailbox8 */
2790static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox8 = {
2791 .master = &dra7xx_l4_per3_hwmod,
2792 .slave = &dra7xx_mailbox8_hwmod,
2793 .clk = "l3_iclk_div",
2794 .user = OCP_USER_MPU | OCP_USER_SDMA,
2795};
2796
2797/* l4_per3 -> mailbox9 */
2798static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox9 = {
2799 .master = &dra7xx_l4_per3_hwmod,
2800 .slave = &dra7xx_mailbox9_hwmod,
2801 .clk = "l3_iclk_div",
2802 .user = OCP_USER_MPU | OCP_USER_SDMA,
2803};
2804
2805/* l4_per3 -> mailbox10 */
2806static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox10 = {
2807 .master = &dra7xx_l4_per3_hwmod,
2808 .slave = &dra7xx_mailbox10_hwmod,
2809 .clk = "l3_iclk_div",
2810 .user = OCP_USER_MPU | OCP_USER_SDMA,
2811};
2812
2813/* l4_per3 -> mailbox11 */
2814static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox11 = {
2815 .master = &dra7xx_l4_per3_hwmod,
2816 .slave = &dra7xx_mailbox11_hwmod,
2817 .clk = "l3_iclk_div",
2818 .user = OCP_USER_MPU | OCP_USER_SDMA,
2819};
2820
2821/* l4_per3 -> mailbox12 */
2822static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox12 = {
2823 .master = &dra7xx_l4_per3_hwmod,
2824 .slave = &dra7xx_mailbox12_hwmod,
2825 .clk = "l3_iclk_div",
2826 .user = OCP_USER_MPU | OCP_USER_SDMA,
2827};
2828
2829/* l4_per3 -> mailbox13 */
2830static struct omap_hwmod_ocp_if dra7xx_l4_per3__mailbox13 = {
2831 .master = &dra7xx_l4_per3_hwmod,
2832 .slave = &dra7xx_mailbox13_hwmod,
2833 .clk = "l3_iclk_div",
2834 .user = OCP_USER_MPU | OCP_USER_SDMA,
2835};
2836
Ambresh K90020c72013-07-09 13:02:16 +05302837/* l4_per1 -> mcspi1 */
2838static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
2839 .master = &dra7xx_l4_per1_hwmod,
2840 .slave = &dra7xx_mcspi1_hwmod,
2841 .clk = "l3_iclk_div",
2842 .user = OCP_USER_MPU | OCP_USER_SDMA,
2843};
2844
2845/* l4_per1 -> mcspi2 */
2846static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
2847 .master = &dra7xx_l4_per1_hwmod,
2848 .slave = &dra7xx_mcspi2_hwmod,
2849 .clk = "l3_iclk_div",
2850 .user = OCP_USER_MPU | OCP_USER_SDMA,
2851};
2852
2853/* l4_per1 -> mcspi3 */
2854static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
2855 .master = &dra7xx_l4_per1_hwmod,
2856 .slave = &dra7xx_mcspi3_hwmod,
2857 .clk = "l3_iclk_div",
2858 .user = OCP_USER_MPU | OCP_USER_SDMA,
2859};
2860
2861/* l4_per1 -> mcspi4 */
2862static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
2863 .master = &dra7xx_l4_per1_hwmod,
2864 .slave = &dra7xx_mcspi4_hwmod,
2865 .clk = "l3_iclk_div",
2866 .user = OCP_USER_MPU | OCP_USER_SDMA,
2867};
2868
2869/* l4_per1 -> mmc1 */
2870static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
2871 .master = &dra7xx_l4_per1_hwmod,
2872 .slave = &dra7xx_mmc1_hwmod,
2873 .clk = "l3_iclk_div",
2874 .user = OCP_USER_MPU | OCP_USER_SDMA,
2875};
2876
2877/* l4_per1 -> mmc2 */
2878static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
2879 .master = &dra7xx_l4_per1_hwmod,
2880 .slave = &dra7xx_mmc2_hwmod,
2881 .clk = "l3_iclk_div",
2882 .user = OCP_USER_MPU | OCP_USER_SDMA,
2883};
2884
2885/* l4_per1 -> mmc3 */
2886static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
2887 .master = &dra7xx_l4_per1_hwmod,
2888 .slave = &dra7xx_mmc3_hwmod,
2889 .clk = "l3_iclk_div",
2890 .user = OCP_USER_MPU | OCP_USER_SDMA,
2891};
2892
2893/* l4_per1 -> mmc4 */
2894static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
2895 .master = &dra7xx_l4_per1_hwmod,
2896 .slave = &dra7xx_mmc4_hwmod,
2897 .clk = "l3_iclk_div",
2898 .user = OCP_USER_MPU | OCP_USER_SDMA,
2899};
2900
2901/* l4_cfg -> mpu */
2902static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
2903 .master = &dra7xx_l4_cfg_hwmod,
2904 .slave = &dra7xx_mpu_hwmod,
2905 .clk = "l3_iclk_div",
2906 .user = OCP_USER_MPU | OCP_USER_SDMA,
2907};
2908
Ambresh K90020c72013-07-09 13:02:16 +05302909/* l4_cfg -> ocp2scp1 */
2910static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
2911 .master = &dra7xx_l4_cfg_hwmod,
2912 .slave = &dra7xx_ocp2scp1_hwmod,
2913 .clk = "l4_root_clk_div",
Ambresh K90020c72013-07-09 13:02:16 +05302914 .user = OCP_USER_MPU | OCP_USER_SDMA,
2915};
2916
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06002917/* l4_cfg -> ocp2scp3 */
2918static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
2919 .master = &dra7xx_l4_cfg_hwmod,
2920 .slave = &dra7xx_ocp2scp3_hwmod,
2921 .clk = "l4_root_clk_div",
2922 .user = OCP_USER_MPU | OCP_USER_SDMA,
2923};
2924
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05302925/* l3_main_1 -> pcie1 */
2926static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie1 = {
2927 .master = &dra7xx_l3_main_1_hwmod,
2928 .slave = &dra7xx_pcie1_hwmod,
2929 .clk = "l3_iclk_div",
2930 .user = OCP_USER_MPU | OCP_USER_SDMA,
2931};
2932
2933/* l4_cfg -> pcie1 */
2934static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1 = {
2935 .master = &dra7xx_l4_cfg_hwmod,
2936 .slave = &dra7xx_pcie1_hwmod,
2937 .clk = "l4_root_clk_div",
2938 .user = OCP_USER_MPU | OCP_USER_SDMA,
2939};
2940
2941/* l3_main_1 -> pcie2 */
2942static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie2 = {
2943 .master = &dra7xx_l3_main_1_hwmod,
2944 .slave = &dra7xx_pcie2_hwmod,
2945 .clk = "l3_iclk_div",
2946 .user = OCP_USER_MPU | OCP_USER_SDMA,
2947};
2948
2949/* l4_cfg -> pcie2 */
2950static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2 = {
2951 .master = &dra7xx_l4_cfg_hwmod,
2952 .slave = &dra7xx_pcie2_hwmod,
2953 .clk = "l4_root_clk_div",
2954 .user = OCP_USER_MPU | OCP_USER_SDMA,
2955};
2956
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05302957/* l4_cfg -> pcie1 phy */
2958static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1_phy = {
2959 .master = &dra7xx_l4_cfg_hwmod,
2960 .slave = &dra7xx_pcie1_phy_hwmod,
2961 .clk = "l4_root_clk_div",
2962 .user = OCP_USER_MPU | OCP_USER_SDMA,
2963};
2964
2965/* l4_cfg -> pcie2 phy */
2966static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2_phy = {
2967 .master = &dra7xx_l4_cfg_hwmod,
2968 .slave = &dra7xx_pcie2_phy_hwmod,
2969 .clk = "l4_root_clk_div",
2970 .user = OCP_USER_MPU | OCP_USER_SDMA,
2971};
2972
Ambresh K90020c72013-07-09 13:02:16 +05302973static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
2974 {
2975 .pa_start = 0x4b300000,
2976 .pa_end = 0x4b30007f,
2977 .flags = ADDR_TYPE_RT
2978 },
2979 { }
2980};
2981
2982/* l3_main_1 -> qspi */
2983static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
2984 .master = &dra7xx_l3_main_1_hwmod,
2985 .slave = &dra7xx_qspi_hwmod,
2986 .clk = "l3_iclk_div",
2987 .addr = dra7xx_qspi_addrs,
2988 .user = OCP_USER_MPU | OCP_USER_SDMA,
2989};
2990
Lokesh Vutlac913c8a2014-07-22 13:15:57 -06002991/* l4_per3 -> rtcss */
2992static struct omap_hwmod_ocp_if dra7xx_l4_per3__rtcss = {
2993 .master = &dra7xx_l4_per3_hwmod,
2994 .slave = &dra7xx_rtcss_hwmod,
2995 .clk = "l4_root_clk_div",
2996 .user = OCP_USER_MPU | OCP_USER_SDMA,
2997};
2998
Ambresh K90020c72013-07-09 13:02:16 +05302999static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
3000 {
3001 .name = "sysc",
3002 .pa_start = 0x4a141100,
3003 .pa_end = 0x4a141107,
3004 .flags = ADDR_TYPE_RT
3005 },
3006 { }
3007};
3008
3009/* l4_cfg -> sata */
3010static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
3011 .master = &dra7xx_l4_cfg_hwmod,
3012 .slave = &dra7xx_sata_hwmod,
3013 .clk = "l3_iclk_div",
3014 .addr = dra7xx_sata_addrs,
3015 .user = OCP_USER_MPU | OCP_USER_SDMA,
3016};
3017
3018static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
3019 {
3020 .pa_start = 0x4a0dd000,
3021 .pa_end = 0x4a0dd07f,
3022 .flags = ADDR_TYPE_RT
3023 },
3024 { }
3025};
3026
3027/* l4_cfg -> smartreflex_core */
3028static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
3029 .master = &dra7xx_l4_cfg_hwmod,
3030 .slave = &dra7xx_smartreflex_core_hwmod,
3031 .clk = "l4_root_clk_div",
3032 .addr = dra7xx_smartreflex_core_addrs,
3033 .user = OCP_USER_MPU | OCP_USER_SDMA,
3034};
3035
3036static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
3037 {
3038 .pa_start = 0x4a0d9000,
3039 .pa_end = 0x4a0d907f,
3040 .flags = ADDR_TYPE_RT
3041 },
3042 { }
3043};
3044
3045/* l4_cfg -> smartreflex_mpu */
3046static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
3047 .master = &dra7xx_l4_cfg_hwmod,
3048 .slave = &dra7xx_smartreflex_mpu_hwmod,
3049 .clk = "l4_root_clk_div",
3050 .addr = dra7xx_smartreflex_mpu_addrs,
3051 .user = OCP_USER_MPU | OCP_USER_SDMA,
3052};
3053
3054static struct omap_hwmod_addr_space dra7xx_spinlock_addrs[] = {
3055 {
3056 .pa_start = 0x4a0f6000,
3057 .pa_end = 0x4a0f6fff,
3058 .flags = ADDR_TYPE_RT
3059 },
3060 { }
3061};
3062
3063/* l4_cfg -> spinlock */
3064static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
3065 .master = &dra7xx_l4_cfg_hwmod,
3066 .slave = &dra7xx_spinlock_hwmod,
3067 .clk = "l3_iclk_div",
3068 .addr = dra7xx_spinlock_addrs,
3069 .user = OCP_USER_MPU | OCP_USER_SDMA,
3070};
3071
3072/* l4_wkup -> timer1 */
3073static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
3074 .master = &dra7xx_l4_wkup_hwmod,
3075 .slave = &dra7xx_timer1_hwmod,
3076 .clk = "wkupaon_iclk_mux",
3077 .user = OCP_USER_MPU | OCP_USER_SDMA,
3078};
3079
3080/* l4_per1 -> timer2 */
3081static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
3082 .master = &dra7xx_l4_per1_hwmod,
3083 .slave = &dra7xx_timer2_hwmod,
3084 .clk = "l3_iclk_div",
3085 .user = OCP_USER_MPU | OCP_USER_SDMA,
3086};
3087
3088/* l4_per1 -> timer3 */
3089static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
3090 .master = &dra7xx_l4_per1_hwmod,
3091 .slave = &dra7xx_timer3_hwmod,
3092 .clk = "l3_iclk_div",
3093 .user = OCP_USER_MPU | OCP_USER_SDMA,
3094};
3095
3096/* l4_per1 -> timer4 */
3097static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
3098 .master = &dra7xx_l4_per1_hwmod,
3099 .slave = &dra7xx_timer4_hwmod,
3100 .clk = "l3_iclk_div",
3101 .user = OCP_USER_MPU | OCP_USER_SDMA,
3102};
3103
3104/* l4_per3 -> timer5 */
3105static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
3106 .master = &dra7xx_l4_per3_hwmod,
3107 .slave = &dra7xx_timer5_hwmod,
3108 .clk = "l3_iclk_div",
3109 .user = OCP_USER_MPU | OCP_USER_SDMA,
3110};
3111
3112/* l4_per3 -> timer6 */
3113static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
3114 .master = &dra7xx_l4_per3_hwmod,
3115 .slave = &dra7xx_timer6_hwmod,
3116 .clk = "l3_iclk_div",
3117 .user = OCP_USER_MPU | OCP_USER_SDMA,
3118};
3119
3120/* l4_per3 -> timer7 */
3121static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
3122 .master = &dra7xx_l4_per3_hwmod,
3123 .slave = &dra7xx_timer7_hwmod,
3124 .clk = "l3_iclk_div",
3125 .user = OCP_USER_MPU | OCP_USER_SDMA,
3126};
3127
3128/* l4_per3 -> timer8 */
3129static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
3130 .master = &dra7xx_l4_per3_hwmod,
3131 .slave = &dra7xx_timer8_hwmod,
3132 .clk = "l3_iclk_div",
3133 .user = OCP_USER_MPU | OCP_USER_SDMA,
3134};
3135
3136/* l4_per1 -> timer9 */
3137static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
3138 .master = &dra7xx_l4_per1_hwmod,
3139 .slave = &dra7xx_timer9_hwmod,
3140 .clk = "l3_iclk_div",
3141 .user = OCP_USER_MPU | OCP_USER_SDMA,
3142};
3143
3144/* l4_per1 -> timer10 */
3145static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
3146 .master = &dra7xx_l4_per1_hwmod,
3147 .slave = &dra7xx_timer10_hwmod,
3148 .clk = "l3_iclk_div",
3149 .user = OCP_USER_MPU | OCP_USER_SDMA,
3150};
3151
3152/* l4_per1 -> timer11 */
3153static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
3154 .master = &dra7xx_l4_per1_hwmod,
3155 .slave = &dra7xx_timer11_hwmod,
3156 .clk = "l3_iclk_div",
3157 .user = OCP_USER_MPU | OCP_USER_SDMA,
3158};
3159
Suman Anna1ac964f2015-03-16 15:54:53 -05003160/* l4_per3 -> timer13 */
3161static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
3162 .master = &dra7xx_l4_per3_hwmod,
3163 .slave = &dra7xx_timer13_hwmod,
3164 .clk = "l3_iclk_div",
3165 .user = OCP_USER_MPU | OCP_USER_SDMA,
3166};
3167
3168/* l4_per3 -> timer14 */
3169static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
3170 .master = &dra7xx_l4_per3_hwmod,
3171 .slave = &dra7xx_timer14_hwmod,
3172 .clk = "l3_iclk_div",
3173 .user = OCP_USER_MPU | OCP_USER_SDMA,
3174};
3175
3176/* l4_per3 -> timer15 */
3177static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
3178 .master = &dra7xx_l4_per3_hwmod,
3179 .slave = &dra7xx_timer15_hwmod,
3180 .clk = "l3_iclk_div",
3181 .user = OCP_USER_MPU | OCP_USER_SDMA,
3182};
3183
3184/* l4_per3 -> timer16 */
3185static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
3186 .master = &dra7xx_l4_per3_hwmod,
3187 .slave = &dra7xx_timer16_hwmod,
3188 .clk = "l3_iclk_div",
3189 .user = OCP_USER_MPU | OCP_USER_SDMA,
3190};
3191
Ambresh K90020c72013-07-09 13:02:16 +05303192/* l4_per1 -> uart1 */
3193static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
3194 .master = &dra7xx_l4_per1_hwmod,
3195 .slave = &dra7xx_uart1_hwmod,
3196 .clk = "l3_iclk_div",
3197 .user = OCP_USER_MPU | OCP_USER_SDMA,
3198};
3199
3200/* l4_per1 -> uart2 */
3201static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
3202 .master = &dra7xx_l4_per1_hwmod,
3203 .slave = &dra7xx_uart2_hwmod,
3204 .clk = "l3_iclk_div",
3205 .user = OCP_USER_MPU | OCP_USER_SDMA,
3206};
3207
3208/* l4_per1 -> uart3 */
3209static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
3210 .master = &dra7xx_l4_per1_hwmod,
3211 .slave = &dra7xx_uart3_hwmod,
3212 .clk = "l3_iclk_div",
3213 .user = OCP_USER_MPU | OCP_USER_SDMA,
3214};
3215
3216/* l4_per1 -> uart4 */
3217static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
3218 .master = &dra7xx_l4_per1_hwmod,
3219 .slave = &dra7xx_uart4_hwmod,
3220 .clk = "l3_iclk_div",
3221 .user = OCP_USER_MPU | OCP_USER_SDMA,
3222};
3223
3224/* l4_per1 -> uart5 */
3225static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
3226 .master = &dra7xx_l4_per1_hwmod,
3227 .slave = &dra7xx_uart5_hwmod,
3228 .clk = "l3_iclk_div",
3229 .user = OCP_USER_MPU | OCP_USER_SDMA,
3230};
3231
3232/* l4_per1 -> uart6 */
3233static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
3234 .master = &dra7xx_l4_per1_hwmod,
3235 .slave = &dra7xx_uart6_hwmod,
3236 .clk = "l3_iclk_div",
3237 .user = OCP_USER_MPU | OCP_USER_SDMA,
3238};
3239
Ambresh K33acc9f2014-10-21 11:17:51 -05003240/* l4_per2 -> uart7 */
3241static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = {
3242 .master = &dra7xx_l4_per2_hwmod,
3243 .slave = &dra7xx_uart7_hwmod,
3244 .clk = "l3_iclk_div",
3245 .user = OCP_USER_MPU | OCP_USER_SDMA,
3246};
3247
3248/* l4_per2 -> uart8 */
3249static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = {
3250 .master = &dra7xx_l4_per2_hwmod,
3251 .slave = &dra7xx_uart8_hwmod,
3252 .clk = "l3_iclk_div",
3253 .user = OCP_USER_MPU | OCP_USER_SDMA,
3254};
3255
3256/* l4_per2 -> uart9 */
3257static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = {
3258 .master = &dra7xx_l4_per2_hwmod,
3259 .slave = &dra7xx_uart9_hwmod,
3260 .clk = "l3_iclk_div",
3261 .user = OCP_USER_MPU | OCP_USER_SDMA,
3262};
3263
3264/* l4_wkup -> uart10 */
3265static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = {
3266 .master = &dra7xx_l4_wkup_hwmod,
3267 .slave = &dra7xx_uart10_hwmod,
3268 .clk = "wkupaon_iclk_mux",
3269 .user = OCP_USER_MPU | OCP_USER_SDMA,
3270};
3271
Ambresh K90020c72013-07-09 13:02:16 +05303272/* l4_per3 -> usb_otg_ss1 */
3273static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
3274 .master = &dra7xx_l4_per3_hwmod,
3275 .slave = &dra7xx_usb_otg_ss1_hwmod,
3276 .clk = "dpll_core_h13x2_ck",
3277 .user = OCP_USER_MPU | OCP_USER_SDMA,
3278};
3279
3280/* l4_per3 -> usb_otg_ss2 */
3281static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
3282 .master = &dra7xx_l4_per3_hwmod,
3283 .slave = &dra7xx_usb_otg_ss2_hwmod,
3284 .clk = "dpll_core_h13x2_ck",
3285 .user = OCP_USER_MPU | OCP_USER_SDMA,
3286};
3287
3288/* l4_per3 -> usb_otg_ss3 */
3289static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
3290 .master = &dra7xx_l4_per3_hwmod,
3291 .slave = &dra7xx_usb_otg_ss3_hwmod,
3292 .clk = "dpll_core_h13x2_ck",
3293 .user = OCP_USER_MPU | OCP_USER_SDMA,
3294};
3295
3296/* l4_per3 -> usb_otg_ss4 */
3297static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
3298 .master = &dra7xx_l4_per3_hwmod,
3299 .slave = &dra7xx_usb_otg_ss4_hwmod,
3300 .clk = "dpll_core_h13x2_ck",
3301 .user = OCP_USER_MPU | OCP_USER_SDMA,
3302};
3303
3304/* l3_main_1 -> vcp1 */
3305static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
3306 .master = &dra7xx_l3_main_1_hwmod,
3307 .slave = &dra7xx_vcp1_hwmod,
3308 .clk = "l3_iclk_div",
3309 .user = OCP_USER_MPU | OCP_USER_SDMA,
3310};
3311
3312/* l4_per2 -> vcp1 */
3313static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
3314 .master = &dra7xx_l4_per2_hwmod,
3315 .slave = &dra7xx_vcp1_hwmod,
3316 .clk = "l3_iclk_div",
3317 .user = OCP_USER_MPU | OCP_USER_SDMA,
3318};
3319
3320/* l3_main_1 -> vcp2 */
3321static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
3322 .master = &dra7xx_l3_main_1_hwmod,
3323 .slave = &dra7xx_vcp2_hwmod,
3324 .clk = "l3_iclk_div",
3325 .user = OCP_USER_MPU | OCP_USER_SDMA,
3326};
3327
3328/* l4_per2 -> vcp2 */
3329static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
3330 .master = &dra7xx_l4_per2_hwmod,
3331 .slave = &dra7xx_vcp2_hwmod,
3332 .clk = "l3_iclk_div",
3333 .user = OCP_USER_MPU | OCP_USER_SDMA,
3334};
3335
3336/* l4_wkup -> wd_timer2 */
3337static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
3338 .master = &dra7xx_l4_wkup_hwmod,
3339 .slave = &dra7xx_wd_timer2_hwmod,
3340 .clk = "wkupaon_iclk_mux",
3341 .user = OCP_USER_MPU | OCP_USER_SDMA,
3342};
3343
3344static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3345 &dra7xx_l3_main_2__l3_instr,
3346 &dra7xx_l4_cfg__l3_main_1,
3347 &dra7xx_mpu__l3_main_1,
3348 &dra7xx_l3_main_1__l3_main_2,
3349 &dra7xx_l4_cfg__l3_main_2,
3350 &dra7xx_l3_main_1__l4_cfg,
3351 &dra7xx_l3_main_1__l4_per1,
3352 &dra7xx_l3_main_1__l4_per2,
3353 &dra7xx_l3_main_1__l4_per3,
3354 &dra7xx_l3_main_1__l4_wkup,
3355 &dra7xx_l4_per2__atl,
3356 &dra7xx_l3_main_1__bb2d,
3357 &dra7xx_l4_wkup__counter_32k,
3358 &dra7xx_l4_wkup__ctrl_module_wkup,
3359 &dra7xx_l4_wkup__dcan1,
3360 &dra7xx_l4_per2__dcan2,
Mugunthan V N077c42f2014-07-08 18:46:39 +05303361 &dra7xx_l4_per2__cpgmac0,
3362 &dra7xx_gmac__mdio,
Ambresh K90020c72013-07-09 13:02:16 +05303363 &dra7xx_l4_cfg__dma_system,
3364 &dra7xx_l3_main_1__dss,
3365 &dra7xx_l3_main_1__dispc,
3366 &dra7xx_l3_main_1__hdmi,
3367 &dra7xx_l4_per1__elm,
3368 &dra7xx_l4_wkup__gpio1,
3369 &dra7xx_l4_per1__gpio2,
3370 &dra7xx_l4_per1__gpio3,
3371 &dra7xx_l4_per1__gpio4,
3372 &dra7xx_l4_per1__gpio5,
3373 &dra7xx_l4_per1__gpio6,
3374 &dra7xx_l4_per1__gpio7,
3375 &dra7xx_l4_per1__gpio8,
3376 &dra7xx_l3_main_1__gpmc,
3377 &dra7xx_l4_per1__hdq1w,
3378 &dra7xx_l4_per1__i2c1,
3379 &dra7xx_l4_per1__i2c2,
3380 &dra7xx_l4_per1__i2c3,
3381 &dra7xx_l4_per1__i2c4,
3382 &dra7xx_l4_per1__i2c5,
Suman Anna067395d2014-07-11 16:44:39 -05003383 &dra7xx_l4_cfg__mailbox1,
3384 &dra7xx_l4_per3__mailbox2,
3385 &dra7xx_l4_per3__mailbox3,
3386 &dra7xx_l4_per3__mailbox4,
3387 &dra7xx_l4_per3__mailbox5,
3388 &dra7xx_l4_per3__mailbox6,
3389 &dra7xx_l4_per3__mailbox7,
3390 &dra7xx_l4_per3__mailbox8,
3391 &dra7xx_l4_per3__mailbox9,
3392 &dra7xx_l4_per3__mailbox10,
3393 &dra7xx_l4_per3__mailbox11,
3394 &dra7xx_l4_per3__mailbox12,
3395 &dra7xx_l4_per3__mailbox13,
Ambresh K90020c72013-07-09 13:02:16 +05303396 &dra7xx_l4_per1__mcspi1,
3397 &dra7xx_l4_per1__mcspi2,
3398 &dra7xx_l4_per1__mcspi3,
3399 &dra7xx_l4_per1__mcspi4,
3400 &dra7xx_l4_per1__mmc1,
3401 &dra7xx_l4_per1__mmc2,
3402 &dra7xx_l4_per1__mmc3,
3403 &dra7xx_l4_per1__mmc4,
3404 &dra7xx_l4_cfg__mpu,
3405 &dra7xx_l4_cfg__ocp2scp1,
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06003406 &dra7xx_l4_cfg__ocp2scp3,
Kishon Vijay Abraham I8dd3eb72014-07-09 14:32:47 +05303407 &dra7xx_l3_main_1__pcie1,
3408 &dra7xx_l4_cfg__pcie1,
3409 &dra7xx_l3_main_1__pcie2,
3410 &dra7xx_l4_cfg__pcie2,
Kishon Vijay Abraham I70c18ef72014-06-25 23:32:45 +05303411 &dra7xx_l4_cfg__pcie1_phy,
3412 &dra7xx_l4_cfg__pcie2_phy,
Ambresh K90020c72013-07-09 13:02:16 +05303413 &dra7xx_l3_main_1__qspi,
Lokesh Vutlac913c8a2014-07-22 13:15:57 -06003414 &dra7xx_l4_per3__rtcss,
Ambresh K90020c72013-07-09 13:02:16 +05303415 &dra7xx_l4_cfg__sata,
3416 &dra7xx_l4_cfg__smartreflex_core,
3417 &dra7xx_l4_cfg__smartreflex_mpu,
3418 &dra7xx_l4_cfg__spinlock,
3419 &dra7xx_l4_wkup__timer1,
3420 &dra7xx_l4_per1__timer2,
3421 &dra7xx_l4_per1__timer3,
3422 &dra7xx_l4_per1__timer4,
3423 &dra7xx_l4_per3__timer5,
3424 &dra7xx_l4_per3__timer6,
3425 &dra7xx_l4_per3__timer7,
3426 &dra7xx_l4_per3__timer8,
3427 &dra7xx_l4_per1__timer9,
3428 &dra7xx_l4_per1__timer10,
3429 &dra7xx_l4_per1__timer11,
Suman Anna1ac964f2015-03-16 15:54:53 -05003430 &dra7xx_l4_per3__timer13,
3431 &dra7xx_l4_per3__timer14,
3432 &dra7xx_l4_per3__timer15,
3433 &dra7xx_l4_per3__timer16,
Ambresh K90020c72013-07-09 13:02:16 +05303434 &dra7xx_l4_per1__uart1,
3435 &dra7xx_l4_per1__uart2,
3436 &dra7xx_l4_per1__uart3,
3437 &dra7xx_l4_per1__uart4,
3438 &dra7xx_l4_per1__uart5,
3439 &dra7xx_l4_per1__uart6,
Ambresh K33acc9f2014-10-21 11:17:51 -05003440 &dra7xx_l4_per2__uart7,
3441 &dra7xx_l4_per2__uart8,
3442 &dra7xx_l4_per2__uart9,
3443 &dra7xx_l4_wkup__uart10,
Ambresh K90020c72013-07-09 13:02:16 +05303444 &dra7xx_l4_per3__usb_otg_ss1,
3445 &dra7xx_l4_per3__usb_otg_ss2,
3446 &dra7xx_l4_per3__usb_otg_ss3,
Ambresh K90020c72013-07-09 13:02:16 +05303447 &dra7xx_l3_main_1__vcp1,
3448 &dra7xx_l4_per2__vcp1,
3449 &dra7xx_l3_main_1__vcp2,
3450 &dra7xx_l4_per2__vcp2,
3451 &dra7xx_l4_wkup__wd_timer2,
3452 NULL,
3453};
3454
Rajendra Nayakf7f7a292014-08-27 19:38:23 -06003455static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
3456 &dra7xx_l4_per3__usb_otg_ss4,
3457 NULL,
3458};
3459
3460static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
3461 NULL,
3462};
3463
Ambresh K90020c72013-07-09 13:02:16 +05303464int __init dra7xx_hwmod_init(void)
3465{
Rajendra Nayakf7f7a292014-08-27 19:38:23 -06003466 int ret;
3467
Ambresh K90020c72013-07-09 13:02:16 +05303468 omap_hwmod_init();
Rajendra Nayakf7f7a292014-08-27 19:38:23 -06003469 ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
3470
3471 if (!ret && soc_is_dra74x())
3472 return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
3473 else if (!ret && soc_is_dra72x())
3474 return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
3475
3476 return ret;
Ambresh K90020c72013-07-09 13:02:16 +05303477}