blob: c9daee46d9802b962fef0ddc46fd8cde043df131 [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>
22#include <linux/power/smartreflex.h>
23#include <linux/i2c-omap.h>
24
25#include <linux/omap-dma.h>
26#include <linux/platform_data/spi-omap2-mcspi.h>
27#include <linux/platform_data/asoc-ti-mcbsp.h>
28#include <plat/dmtimer.h>
29
30#include "omap_hwmod.h"
31#include "omap_hwmod_common_data.h"
32#include "cm1_7xx.h"
33#include "cm2_7xx.h"
34#include "prm7xx.h"
35#include "i2c.h"
36#include "mmc.h"
37#include "wd_timer.h"
38
39/* Base offset for all DRA7XX interrupts external to MPUSS */
40#define DRA7XX_IRQ_GIC_START 32
41
42/* Base offset for all DRA7XX dma requests */
43#define DRA7XX_DMA_REQ_START 1
44
45
46/*
47 * IP blocks
48 */
49
50/*
51 * 'l3' class
52 * instance(s): l3_instr, l3_main_1, l3_main_2
53 */
54static struct omap_hwmod_class dra7xx_l3_hwmod_class = {
55 .name = "l3",
56};
57
58/* l3_instr */
59static struct omap_hwmod dra7xx_l3_instr_hwmod = {
60 .name = "l3_instr",
61 .class = &dra7xx_l3_hwmod_class,
62 .clkdm_name = "l3instr_clkdm",
63 .prcm = {
64 .omap4 = {
65 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
66 .context_offs = DRA7XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
67 .modulemode = MODULEMODE_HWCTRL,
68 },
69 },
70};
71
72/* l3_main_1 */
73static struct omap_hwmod dra7xx_l3_main_1_hwmod = {
74 .name = "l3_main_1",
75 .class = &dra7xx_l3_hwmod_class,
76 .clkdm_name = "l3main1_clkdm",
77 .prcm = {
78 .omap4 = {
79 .clkctrl_offs = DRA7XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
80 .context_offs = DRA7XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
81 },
82 },
83};
84
85/* l3_main_2 */
86static struct omap_hwmod dra7xx_l3_main_2_hwmod = {
87 .name = "l3_main_2",
88 .class = &dra7xx_l3_hwmod_class,
89 .clkdm_name = "l3instr_clkdm",
90 .prcm = {
91 .omap4 = {
92 .clkctrl_offs = DRA7XX_CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET,
93 .context_offs = DRA7XX_RM_L3INSTR_L3_MAIN_2_CONTEXT_OFFSET,
94 .modulemode = MODULEMODE_HWCTRL,
95 },
96 },
97};
98
99/*
100 * 'l4' class
101 * instance(s): l4_cfg, l4_per1, l4_per2, l4_per3, l4_wkup
102 */
103static struct omap_hwmod_class dra7xx_l4_hwmod_class = {
104 .name = "l4",
105};
106
107/* l4_cfg */
108static struct omap_hwmod dra7xx_l4_cfg_hwmod = {
109 .name = "l4_cfg",
110 .class = &dra7xx_l4_hwmod_class,
111 .clkdm_name = "l4cfg_clkdm",
112 .prcm = {
113 .omap4 = {
114 .clkctrl_offs = DRA7XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
115 .context_offs = DRA7XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
116 },
117 },
118};
119
120/* l4_per1 */
121static struct omap_hwmod dra7xx_l4_per1_hwmod = {
122 .name = "l4_per1",
123 .class = &dra7xx_l4_hwmod_class,
124 .clkdm_name = "l4per_clkdm",
125 .prcm = {
126 .omap4 = {
127 .clkctrl_offs = DRA7XX_CM_L4PER_L4_PER1_CLKCTRL_OFFSET,
128 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
129 },
130 },
131};
132
133/* l4_per2 */
134static struct omap_hwmod dra7xx_l4_per2_hwmod = {
135 .name = "l4_per2",
136 .class = &dra7xx_l4_hwmod_class,
137 .clkdm_name = "l4per2_clkdm",
138 .prcm = {
139 .omap4 = {
140 .clkctrl_offs = DRA7XX_CM_L4PER2_L4_PER2_CLKCTRL_OFFSET,
141 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
142 },
143 },
144};
145
146/* l4_per3 */
147static struct omap_hwmod dra7xx_l4_per3_hwmod = {
148 .name = "l4_per3",
149 .class = &dra7xx_l4_hwmod_class,
150 .clkdm_name = "l4per3_clkdm",
151 .prcm = {
152 .omap4 = {
153 .clkctrl_offs = DRA7XX_CM_L4PER3_L4_PER3_CLKCTRL_OFFSET,
154 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
155 },
156 },
157};
158
159/* l4_wkup */
160static struct omap_hwmod dra7xx_l4_wkup_hwmod = {
161 .name = "l4_wkup",
162 .class = &dra7xx_l4_hwmod_class,
163 .clkdm_name = "wkupaon_clkdm",
164 .prcm = {
165 .omap4 = {
166 .clkctrl_offs = DRA7XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
167 .context_offs = DRA7XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
168 },
169 },
170};
171
172/*
173 * 'atl' class
174 *
175 */
176
177static struct omap_hwmod_class dra7xx_atl_hwmod_class = {
178 .name = "atl",
179};
180
181/* atl */
182static struct omap_hwmod dra7xx_atl_hwmod = {
183 .name = "atl",
184 .class = &dra7xx_atl_hwmod_class,
185 .clkdm_name = "atl_clkdm",
186 .main_clk = "atl_gfclk_mux",
187 .prcm = {
188 .omap4 = {
189 .clkctrl_offs = DRA7XX_CM_ATL_ATL_CLKCTRL_OFFSET,
190 .context_offs = DRA7XX_RM_ATL_ATL_CONTEXT_OFFSET,
191 .modulemode = MODULEMODE_SWCTRL,
192 },
193 },
194};
195
196/*
197 * 'bb2d' class
198 *
199 */
200
201static struct omap_hwmod_class dra7xx_bb2d_hwmod_class = {
202 .name = "bb2d",
203};
204
205/* bb2d */
206static struct omap_hwmod dra7xx_bb2d_hwmod = {
207 .name = "bb2d",
208 .class = &dra7xx_bb2d_hwmod_class,
209 .clkdm_name = "dss_clkdm",
210 .main_clk = "dpll_core_h24x2_ck",
211 .prcm = {
212 .omap4 = {
213 .clkctrl_offs = DRA7XX_CM_DSS_BB2D_CLKCTRL_OFFSET,
214 .context_offs = DRA7XX_RM_DSS_BB2D_CONTEXT_OFFSET,
215 .modulemode = MODULEMODE_SWCTRL,
216 },
217 },
218};
219
220/*
221 * 'counter' class
222 *
223 */
224
225static struct omap_hwmod_class_sysconfig dra7xx_counter_sysc = {
226 .rev_offs = 0x0000,
227 .sysc_offs = 0x0010,
228 .sysc_flags = SYSC_HAS_SIDLEMODE,
229 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
230 SIDLE_SMART_WKUP),
231 .sysc_fields = &omap_hwmod_sysc_type1,
232};
233
234static struct omap_hwmod_class dra7xx_counter_hwmod_class = {
235 .name = "counter",
236 .sysc = &dra7xx_counter_sysc,
237};
238
239/* counter_32k */
240static struct omap_hwmod dra7xx_counter_32k_hwmod = {
241 .name = "counter_32k",
242 .class = &dra7xx_counter_hwmod_class,
243 .clkdm_name = "wkupaon_clkdm",
244 .flags = HWMOD_SWSUP_SIDLE,
245 .main_clk = "wkupaon_iclk_mux",
246 .prcm = {
247 .omap4 = {
248 .clkctrl_offs = DRA7XX_CM_WKUPAON_COUNTER_32K_CLKCTRL_OFFSET,
249 .context_offs = DRA7XX_RM_WKUPAON_COUNTER_32K_CONTEXT_OFFSET,
250 },
251 },
252};
253
254/*
255 * 'ctrl_module' class
256 *
257 */
258
259static struct omap_hwmod_class dra7xx_ctrl_module_hwmod_class = {
260 .name = "ctrl_module",
261};
262
263/* ctrl_module_wkup */
264static struct omap_hwmod dra7xx_ctrl_module_wkup_hwmod = {
265 .name = "ctrl_module_wkup",
266 .class = &dra7xx_ctrl_module_hwmod_class,
267 .clkdm_name = "wkupaon_clkdm",
268 .prcm = {
269 .omap4 = {
270 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
271 },
272 },
273};
274
275/*
276 * 'dcan' class
277 *
278 */
279
280static struct omap_hwmod_class dra7xx_dcan_hwmod_class = {
281 .name = "dcan",
282};
283
284/* dcan1 */
285static struct omap_hwmod dra7xx_dcan1_hwmod = {
286 .name = "dcan1",
287 .class = &dra7xx_dcan_hwmod_class,
288 .clkdm_name = "wkupaon_clkdm",
289 .main_clk = "dcan1_sys_clk_mux",
290 .prcm = {
291 .omap4 = {
292 .clkctrl_offs = DRA7XX_CM_WKUPAON_DCAN1_CLKCTRL_OFFSET,
293 .context_offs = DRA7XX_RM_WKUPAON_DCAN1_CONTEXT_OFFSET,
294 .modulemode = MODULEMODE_SWCTRL,
295 },
296 },
297};
298
299/* dcan2 */
300static struct omap_hwmod dra7xx_dcan2_hwmod = {
301 .name = "dcan2",
302 .class = &dra7xx_dcan_hwmod_class,
303 .clkdm_name = "l4per2_clkdm",
304 .main_clk = "sys_clkin1",
305 .prcm = {
306 .omap4 = {
307 .clkctrl_offs = DRA7XX_CM_L4PER2_DCAN2_CLKCTRL_OFFSET,
308 .context_offs = DRA7XX_RM_L4PER2_DCAN2_CONTEXT_OFFSET,
309 .modulemode = MODULEMODE_SWCTRL,
310 },
311 },
312};
313
314/*
315 * 'dma' class
316 *
317 */
318
319static struct omap_hwmod_class_sysconfig dra7xx_dma_sysc = {
320 .rev_offs = 0x0000,
321 .sysc_offs = 0x002c,
322 .syss_offs = 0x0028,
323 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
324 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
325 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
326 SYSS_HAS_RESET_STATUS),
327 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
328 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
329 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
330 .sysc_fields = &omap_hwmod_sysc_type1,
331};
332
333static struct omap_hwmod_class dra7xx_dma_hwmod_class = {
334 .name = "dma",
335 .sysc = &dra7xx_dma_sysc,
336};
337
338/* dma dev_attr */
339static struct omap_dma_dev_attr dma_dev_attr = {
340 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
341 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
342 .lch_count = 32,
343};
344
345/* dma_system */
346static struct omap_hwmod_irq_info dra7xx_dma_system_irqs[] = {
347 { .name = "0", .irq = 12 + DRA7XX_IRQ_GIC_START },
348 { .name = "1", .irq = 13 + DRA7XX_IRQ_GIC_START },
349 { .name = "2", .irq = 14 + DRA7XX_IRQ_GIC_START },
350 { .name = "3", .irq = 15 + DRA7XX_IRQ_GIC_START },
351 { .irq = -1 }
352};
353
354static struct omap_hwmod dra7xx_dma_system_hwmod = {
355 .name = "dma_system",
356 .class = &dra7xx_dma_hwmod_class,
357 .clkdm_name = "dma_clkdm",
358 .mpu_irqs = dra7xx_dma_system_irqs,
359 .main_clk = "l3_iclk_div",
360 .prcm = {
361 .omap4 = {
362 .clkctrl_offs = DRA7XX_CM_DMA_DMA_SYSTEM_CLKCTRL_OFFSET,
363 .context_offs = DRA7XX_RM_DMA_DMA_SYSTEM_CONTEXT_OFFSET,
364 },
365 },
366 .dev_attr = &dma_dev_attr,
367};
368
369/*
370 * 'dss' class
371 *
372 */
373
374static struct omap_hwmod_class_sysconfig dra7xx_dss_sysc = {
375 .rev_offs = 0x0000,
376 .syss_offs = 0x0014,
377 .sysc_flags = SYSS_HAS_RESET_STATUS,
378};
379
380static struct omap_hwmod_class dra7xx_dss_hwmod_class = {
381 .name = "dss",
382 .sysc = &dra7xx_dss_sysc,
383 .reset = omap_dss_reset,
384};
385
386/* dss */
387static struct omap_hwmod_dma_info dra7xx_dss_sdma_reqs[] = {
388 { .dma_req = 75 + DRA7XX_DMA_REQ_START },
389 { .dma_req = -1 }
390};
391
392static struct omap_hwmod_opt_clk dss_opt_clks[] = {
393 { .role = "dss_clk", .clk = "dss_dss_clk" },
394 { .role = "hdmi_phy_clk", .clk = "dss_48mhz_clk" },
395 { .role = "32khz_clk", .clk = "dss_32khz_clk" },
396 { .role = "video2_clk", .clk = "dss_video2_clk" },
397 { .role = "video1_clk", .clk = "dss_video1_clk" },
398 { .role = "hdmi_clk", .clk = "dss_hdmi_clk" },
399};
400
401static struct omap_hwmod dra7xx_dss_hwmod = {
402 .name = "dss_core",
403 .class = &dra7xx_dss_hwmod_class,
404 .clkdm_name = "dss_clkdm",
405 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
406 .sdma_reqs = dra7xx_dss_sdma_reqs,
407 .main_clk = "dss_dss_clk",
408 .prcm = {
409 .omap4 = {
410 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
411 .context_offs = DRA7XX_RM_DSS_DSS_CONTEXT_OFFSET,
412 .modulemode = MODULEMODE_SWCTRL,
413 },
414 },
415 .opt_clks = dss_opt_clks,
416 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
417};
418
419/*
420 * 'dispc' class
421 * display controller
422 */
423
424static struct omap_hwmod_class_sysconfig dra7xx_dispc_sysc = {
425 .rev_offs = 0x0000,
426 .sysc_offs = 0x0010,
427 .syss_offs = 0x0014,
428 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
429 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
430 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
431 SYSS_HAS_RESET_STATUS),
432 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
433 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
434 .sysc_fields = &omap_hwmod_sysc_type1,
435};
436
437static struct omap_hwmod_class dra7xx_dispc_hwmod_class = {
438 .name = "dispc",
439 .sysc = &dra7xx_dispc_sysc,
440};
441
442/* dss_dispc */
443/* dss_dispc dev_attr */
444static struct omap_dss_dispc_dev_attr dss_dispc_dev_attr = {
445 .has_framedonetv_irq = 1,
446 .manager_count = 4,
447};
448
449static struct omap_hwmod dra7xx_dss_dispc_hwmod = {
450 .name = "dss_dispc",
451 .class = &dra7xx_dispc_hwmod_class,
452 .clkdm_name = "dss_clkdm",
453 .main_clk = "dss_dss_clk",
454 .prcm = {
455 .omap4 = {
456 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
457 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
458 },
459 },
460 .dev_attr = &dss_dispc_dev_attr,
461};
462
463/*
464 * 'hdmi' class
465 * hdmi controller
466 */
467
468static struct omap_hwmod_class_sysconfig dra7xx_hdmi_sysc = {
469 .rev_offs = 0x0000,
470 .sysc_offs = 0x0010,
471 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
472 SYSC_HAS_SOFTRESET),
473 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
474 SIDLE_SMART_WKUP),
475 .sysc_fields = &omap_hwmod_sysc_type2,
476};
477
478static struct omap_hwmod_class dra7xx_hdmi_hwmod_class = {
479 .name = "hdmi",
480 .sysc = &dra7xx_hdmi_sysc,
481};
482
483/* dss_hdmi */
484
485static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
486 { .role = "sys_clk", .clk = "dss_hdmi_clk" },
487};
488
489static struct omap_hwmod dra7xx_dss_hdmi_hwmod = {
490 .name = "dss_hdmi",
491 .class = &dra7xx_hdmi_hwmod_class,
492 .clkdm_name = "dss_clkdm",
493 .main_clk = "dss_48mhz_clk",
494 .prcm = {
495 .omap4 = {
496 .clkctrl_offs = DRA7XX_CM_DSS_DSS_CLKCTRL_OFFSET,
497 .flags = HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT,
498 },
499 },
500 .opt_clks = dss_hdmi_opt_clks,
501 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
502};
503
504/*
505 * 'elm' class
506 *
507 */
508
509static struct omap_hwmod_class_sysconfig dra7xx_elm_sysc = {
510 .rev_offs = 0x0000,
511 .sysc_offs = 0x0010,
512 .syss_offs = 0x0014,
513 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
514 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
515 SYSS_HAS_RESET_STATUS),
516 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
517 SIDLE_SMART_WKUP),
518 .sysc_fields = &omap_hwmod_sysc_type1,
519};
520
521static struct omap_hwmod_class dra7xx_elm_hwmod_class = {
522 .name = "elm",
523 .sysc = &dra7xx_elm_sysc,
524};
525
526/* elm */
527
528static struct omap_hwmod dra7xx_elm_hwmod = {
529 .name = "elm",
530 .class = &dra7xx_elm_hwmod_class,
531 .clkdm_name = "l4per_clkdm",
532 .main_clk = "l3_iclk_div",
533 .prcm = {
534 .omap4 = {
535 .clkctrl_offs = DRA7XX_CM_L4PER_ELM_CLKCTRL_OFFSET,
536 .context_offs = DRA7XX_RM_L4PER_ELM_CONTEXT_OFFSET,
537 },
538 },
539};
540
541/*
542 * 'gpio' class
543 *
544 */
545
546static struct omap_hwmod_class_sysconfig dra7xx_gpio_sysc = {
547 .rev_offs = 0x0000,
548 .sysc_offs = 0x0010,
549 .syss_offs = 0x0114,
550 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
551 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
552 SYSS_HAS_RESET_STATUS),
553 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
554 SIDLE_SMART_WKUP),
555 .sysc_fields = &omap_hwmod_sysc_type1,
556};
557
558static struct omap_hwmod_class dra7xx_gpio_hwmod_class = {
559 .name = "gpio",
560 .sysc = &dra7xx_gpio_sysc,
561 .rev = 2,
562};
563
564/* gpio dev_attr */
565static struct omap_gpio_dev_attr gpio_dev_attr = {
566 .bank_width = 32,
567 .dbck_flag = true,
568};
569
570/* gpio1 */
571static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
572 { .role = "dbclk", .clk = "gpio1_dbclk" },
573};
574
575static struct omap_hwmod dra7xx_gpio1_hwmod = {
576 .name = "gpio1",
577 .class = &dra7xx_gpio_hwmod_class,
578 .clkdm_name = "wkupaon_clkdm",
579 .main_clk = "wkupaon_iclk_mux",
580 .prcm = {
581 .omap4 = {
582 .clkctrl_offs = DRA7XX_CM_WKUPAON_GPIO1_CLKCTRL_OFFSET,
583 .context_offs = DRA7XX_RM_WKUPAON_GPIO1_CONTEXT_OFFSET,
584 .modulemode = MODULEMODE_HWCTRL,
585 },
586 },
587 .opt_clks = gpio1_opt_clks,
588 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
589 .dev_attr = &gpio_dev_attr,
590};
591
592/* gpio2 */
593static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
594 { .role = "dbclk", .clk = "gpio2_dbclk" },
595};
596
597static struct omap_hwmod dra7xx_gpio2_hwmod = {
598 .name = "gpio2",
599 .class = &dra7xx_gpio_hwmod_class,
600 .clkdm_name = "l4per_clkdm",
601 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
602 .main_clk = "l3_iclk_div",
603 .prcm = {
604 .omap4 = {
605 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
606 .context_offs = DRA7XX_RM_L4PER_GPIO2_CONTEXT_OFFSET,
607 .modulemode = MODULEMODE_HWCTRL,
608 },
609 },
610 .opt_clks = gpio2_opt_clks,
611 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
612 .dev_attr = &gpio_dev_attr,
613};
614
615/* gpio3 */
616static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
617 { .role = "dbclk", .clk = "gpio3_dbclk" },
618};
619
620static struct omap_hwmod dra7xx_gpio3_hwmod = {
621 .name = "gpio3",
622 .class = &dra7xx_gpio_hwmod_class,
623 .clkdm_name = "l4per_clkdm",
624 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
625 .main_clk = "l3_iclk_div",
626 .prcm = {
627 .omap4 = {
628 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
629 .context_offs = DRA7XX_RM_L4PER_GPIO3_CONTEXT_OFFSET,
630 .modulemode = MODULEMODE_HWCTRL,
631 },
632 },
633 .opt_clks = gpio3_opt_clks,
634 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
635 .dev_attr = &gpio_dev_attr,
636};
637
638/* gpio4 */
639static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
640 { .role = "dbclk", .clk = "gpio4_dbclk" },
641};
642
643static struct omap_hwmod dra7xx_gpio4_hwmod = {
644 .name = "gpio4",
645 .class = &dra7xx_gpio_hwmod_class,
646 .clkdm_name = "l4per_clkdm",
647 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
648 .main_clk = "l3_iclk_div",
649 .prcm = {
650 .omap4 = {
651 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
652 .context_offs = DRA7XX_RM_L4PER_GPIO4_CONTEXT_OFFSET,
653 .modulemode = MODULEMODE_HWCTRL,
654 },
655 },
656 .opt_clks = gpio4_opt_clks,
657 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
658 .dev_attr = &gpio_dev_attr,
659};
660
661/* gpio5 */
662static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
663 { .role = "dbclk", .clk = "gpio5_dbclk" },
664};
665
666static struct omap_hwmod dra7xx_gpio5_hwmod = {
667 .name = "gpio5",
668 .class = &dra7xx_gpio_hwmod_class,
669 .clkdm_name = "l4per_clkdm",
670 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
671 .main_clk = "l3_iclk_div",
672 .prcm = {
673 .omap4 = {
674 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
675 .context_offs = DRA7XX_RM_L4PER_GPIO5_CONTEXT_OFFSET,
676 .modulemode = MODULEMODE_HWCTRL,
677 },
678 },
679 .opt_clks = gpio5_opt_clks,
680 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
681 .dev_attr = &gpio_dev_attr,
682};
683
684/* gpio6 */
685static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
686 { .role = "dbclk", .clk = "gpio6_dbclk" },
687};
688
689static struct omap_hwmod dra7xx_gpio6_hwmod = {
690 .name = "gpio6",
691 .class = &dra7xx_gpio_hwmod_class,
692 .clkdm_name = "l4per_clkdm",
693 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
694 .main_clk = "l3_iclk_div",
695 .prcm = {
696 .omap4 = {
697 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
698 .context_offs = DRA7XX_RM_L4PER_GPIO6_CONTEXT_OFFSET,
699 .modulemode = MODULEMODE_HWCTRL,
700 },
701 },
702 .opt_clks = gpio6_opt_clks,
703 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
704 .dev_attr = &gpio_dev_attr,
705};
706
707/* gpio7 */
708static struct omap_hwmod_opt_clk gpio7_opt_clks[] = {
709 { .role = "dbclk", .clk = "gpio7_dbclk" },
710};
711
712static struct omap_hwmod dra7xx_gpio7_hwmod = {
713 .name = "gpio7",
714 .class = &dra7xx_gpio_hwmod_class,
715 .clkdm_name = "l4per_clkdm",
716 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
717 .main_clk = "l3_iclk_div",
718 .prcm = {
719 .omap4 = {
720 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO7_CLKCTRL_OFFSET,
721 .context_offs = DRA7XX_RM_L4PER_GPIO7_CONTEXT_OFFSET,
722 .modulemode = MODULEMODE_HWCTRL,
723 },
724 },
725 .opt_clks = gpio7_opt_clks,
726 .opt_clks_cnt = ARRAY_SIZE(gpio7_opt_clks),
727 .dev_attr = &gpio_dev_attr,
728};
729
730/* gpio8 */
731static struct omap_hwmod_opt_clk gpio8_opt_clks[] = {
732 { .role = "dbclk", .clk = "gpio8_dbclk" },
733};
734
735static struct omap_hwmod dra7xx_gpio8_hwmod = {
736 .name = "gpio8",
737 .class = &dra7xx_gpio_hwmod_class,
738 .clkdm_name = "l4per_clkdm",
739 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
740 .main_clk = "l3_iclk_div",
741 .prcm = {
742 .omap4 = {
743 .clkctrl_offs = DRA7XX_CM_L4PER_GPIO8_CLKCTRL_OFFSET,
744 .context_offs = DRA7XX_RM_L4PER_GPIO8_CONTEXT_OFFSET,
745 .modulemode = MODULEMODE_HWCTRL,
746 },
747 },
748 .opt_clks = gpio8_opt_clks,
749 .opt_clks_cnt = ARRAY_SIZE(gpio8_opt_clks),
750 .dev_attr = &gpio_dev_attr,
751};
752
753/*
754 * 'gpmc' class
755 *
756 */
757
758static struct omap_hwmod_class_sysconfig dra7xx_gpmc_sysc = {
759 .rev_offs = 0x0000,
760 .sysc_offs = 0x0010,
761 .syss_offs = 0x0014,
762 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
763 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
764 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
765 SIDLE_SMART_WKUP),
766 .sysc_fields = &omap_hwmod_sysc_type1,
767};
768
769static struct omap_hwmod_class dra7xx_gpmc_hwmod_class = {
770 .name = "gpmc",
771 .sysc = &dra7xx_gpmc_sysc,
772};
773
774/* gpmc */
775
776static struct omap_hwmod dra7xx_gpmc_hwmod = {
777 .name = "gpmc",
778 .class = &dra7xx_gpmc_hwmod_class,
779 .clkdm_name = "l3main1_clkdm",
780 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
781 .main_clk = "l3_iclk_div",
782 .prcm = {
783 .omap4 = {
784 .clkctrl_offs = DRA7XX_CM_L3MAIN1_GPMC_CLKCTRL_OFFSET,
785 .context_offs = DRA7XX_RM_L3MAIN1_GPMC_CONTEXT_OFFSET,
786 .modulemode = MODULEMODE_HWCTRL,
787 },
788 },
789};
790
791/*
792 * 'hdq1w' class
793 *
794 */
795
796static struct omap_hwmod_class_sysconfig dra7xx_hdq1w_sysc = {
797 .rev_offs = 0x0000,
798 .sysc_offs = 0x0014,
799 .syss_offs = 0x0018,
800 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
801 SYSS_HAS_RESET_STATUS),
802 .sysc_fields = &omap_hwmod_sysc_type1,
803};
804
805static struct omap_hwmod_class dra7xx_hdq1w_hwmod_class = {
806 .name = "hdq1w",
807 .sysc = &dra7xx_hdq1w_sysc,
808};
809
810/* hdq1w */
811
812static struct omap_hwmod dra7xx_hdq1w_hwmod = {
813 .name = "hdq1w",
814 .class = &dra7xx_hdq1w_hwmod_class,
815 .clkdm_name = "l4per_clkdm",
816 .flags = HWMOD_INIT_NO_RESET,
817 .main_clk = "func_12m_fclk",
818 .prcm = {
819 .omap4 = {
820 .clkctrl_offs = DRA7XX_CM_L4PER_HDQ1W_CLKCTRL_OFFSET,
821 .context_offs = DRA7XX_RM_L4PER_HDQ1W_CONTEXT_OFFSET,
822 .modulemode = MODULEMODE_SWCTRL,
823 },
824 },
825};
826
827/*
828 * 'i2c' class
829 *
830 */
831
832static struct omap_hwmod_class_sysconfig dra7xx_i2c_sysc = {
833 .sysc_offs = 0x0010,
834 .syss_offs = 0x0090,
835 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
836 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
837 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
838 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
839 SIDLE_SMART_WKUP),
840 .clockact = CLOCKACT_TEST_ICLK,
841 .sysc_fields = &omap_hwmod_sysc_type1,
842};
843
844static struct omap_hwmod_class dra7xx_i2c_hwmod_class = {
845 .name = "i2c",
846 .sysc = &dra7xx_i2c_sysc,
847 .reset = &omap_i2c_reset,
848 .rev = OMAP_I2C_IP_VERSION_2,
849};
850
851/* i2c dev_attr */
852static struct omap_i2c_dev_attr i2c_dev_attr = {
853 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
854};
855
856/* i2c1 */
857static struct omap_hwmod dra7xx_i2c1_hwmod = {
858 .name = "i2c1",
859 .class = &dra7xx_i2c_hwmod_class,
860 .clkdm_name = "l4per_clkdm",
861 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
862 .main_clk = "func_96m_fclk",
863 .prcm = {
864 .omap4 = {
865 .clkctrl_offs = DRA7XX_CM_L4PER_I2C1_CLKCTRL_OFFSET,
866 .context_offs = DRA7XX_RM_L4PER_I2C1_CONTEXT_OFFSET,
867 .modulemode = MODULEMODE_SWCTRL,
868 },
869 },
870 .dev_attr = &i2c_dev_attr,
871};
872
873/* i2c2 */
874static struct omap_hwmod dra7xx_i2c2_hwmod = {
875 .name = "i2c2",
876 .class = &dra7xx_i2c_hwmod_class,
877 .clkdm_name = "l4per_clkdm",
878 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
879 .main_clk = "func_96m_fclk",
880 .prcm = {
881 .omap4 = {
882 .clkctrl_offs = DRA7XX_CM_L4PER_I2C2_CLKCTRL_OFFSET,
883 .context_offs = DRA7XX_RM_L4PER_I2C2_CONTEXT_OFFSET,
884 .modulemode = MODULEMODE_SWCTRL,
885 },
886 },
887 .dev_attr = &i2c_dev_attr,
888};
889
890/* i2c3 */
891static struct omap_hwmod dra7xx_i2c3_hwmod = {
892 .name = "i2c3",
893 .class = &dra7xx_i2c_hwmod_class,
894 .clkdm_name = "l4per_clkdm",
895 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
896 .main_clk = "func_96m_fclk",
897 .prcm = {
898 .omap4 = {
899 .clkctrl_offs = DRA7XX_CM_L4PER_I2C3_CLKCTRL_OFFSET,
900 .context_offs = DRA7XX_RM_L4PER_I2C3_CONTEXT_OFFSET,
901 .modulemode = MODULEMODE_SWCTRL,
902 },
903 },
904 .dev_attr = &i2c_dev_attr,
905};
906
907/* i2c4 */
908static struct omap_hwmod dra7xx_i2c4_hwmod = {
909 .name = "i2c4",
910 .class = &dra7xx_i2c_hwmod_class,
911 .clkdm_name = "l4per_clkdm",
912 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
913 .main_clk = "func_96m_fclk",
914 .prcm = {
915 .omap4 = {
916 .clkctrl_offs = DRA7XX_CM_L4PER_I2C4_CLKCTRL_OFFSET,
917 .context_offs = DRA7XX_RM_L4PER_I2C4_CONTEXT_OFFSET,
918 .modulemode = MODULEMODE_SWCTRL,
919 },
920 },
921 .dev_attr = &i2c_dev_attr,
922};
923
924/* i2c5 */
925static struct omap_hwmod dra7xx_i2c5_hwmod = {
926 .name = "i2c5",
927 .class = &dra7xx_i2c_hwmod_class,
928 .clkdm_name = "ipu_clkdm",
929 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
930 .main_clk = "func_96m_fclk",
931 .prcm = {
932 .omap4 = {
933 .clkctrl_offs = DRA7XX_CM_IPU_I2C5_CLKCTRL_OFFSET,
934 .context_offs = DRA7XX_RM_IPU_I2C5_CONTEXT_OFFSET,
935 .modulemode = MODULEMODE_SWCTRL,
936 },
937 },
938 .dev_attr = &i2c_dev_attr,
939};
940
941/*
942 * 'mcspi' class
943 *
944 */
945
946static struct omap_hwmod_class_sysconfig dra7xx_mcspi_sysc = {
947 .rev_offs = 0x0000,
948 .sysc_offs = 0x0010,
949 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
950 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
951 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
952 SIDLE_SMART_WKUP),
953 .sysc_fields = &omap_hwmod_sysc_type2,
954};
955
956static struct omap_hwmod_class dra7xx_mcspi_hwmod_class = {
957 .name = "mcspi",
958 .sysc = &dra7xx_mcspi_sysc,
959 .rev = OMAP4_MCSPI_REV,
960};
961
962/* mcspi1 */
963/* mcspi1 dev_attr */
964static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
965 .num_chipselect = 4,
966};
967
968static struct omap_hwmod dra7xx_mcspi1_hwmod = {
969 .name = "mcspi1",
970 .class = &dra7xx_mcspi_hwmod_class,
971 .clkdm_name = "l4per_clkdm",
972 .main_clk = "func_48m_fclk",
973 .prcm = {
974 .omap4 = {
975 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
976 .context_offs = DRA7XX_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
977 .modulemode = MODULEMODE_SWCTRL,
978 },
979 },
980 .dev_attr = &mcspi1_dev_attr,
981};
982
983/* mcspi2 */
984/* mcspi2 dev_attr */
985static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
986 .num_chipselect = 2,
987};
988
989static struct omap_hwmod dra7xx_mcspi2_hwmod = {
990 .name = "mcspi2",
991 .class = &dra7xx_mcspi_hwmod_class,
992 .clkdm_name = "l4per_clkdm",
993 .main_clk = "func_48m_fclk",
994 .prcm = {
995 .omap4 = {
996 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
997 .context_offs = DRA7XX_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
998 .modulemode = MODULEMODE_SWCTRL,
999 },
1000 },
1001 .dev_attr = &mcspi2_dev_attr,
1002};
1003
1004/* mcspi3 */
1005/* mcspi3 dev_attr */
1006static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
1007 .num_chipselect = 2,
1008};
1009
1010static struct omap_hwmod dra7xx_mcspi3_hwmod = {
1011 .name = "mcspi3",
1012 .class = &dra7xx_mcspi_hwmod_class,
1013 .clkdm_name = "l4per_clkdm",
1014 .main_clk = "func_48m_fclk",
1015 .prcm = {
1016 .omap4 = {
1017 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
1018 .context_offs = DRA7XX_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
1019 .modulemode = MODULEMODE_SWCTRL,
1020 },
1021 },
1022 .dev_attr = &mcspi3_dev_attr,
1023};
1024
1025/* mcspi4 */
1026/* mcspi4 dev_attr */
1027static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
1028 .num_chipselect = 1,
1029};
1030
1031static struct omap_hwmod dra7xx_mcspi4_hwmod = {
1032 .name = "mcspi4",
1033 .class = &dra7xx_mcspi_hwmod_class,
1034 .clkdm_name = "l4per_clkdm",
1035 .main_clk = "func_48m_fclk",
1036 .prcm = {
1037 .omap4 = {
1038 .clkctrl_offs = DRA7XX_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
1039 .context_offs = DRA7XX_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
1040 .modulemode = MODULEMODE_SWCTRL,
1041 },
1042 },
1043 .dev_attr = &mcspi4_dev_attr,
1044};
1045
1046/*
1047 * 'mmc' class
1048 *
1049 */
1050
1051static struct omap_hwmod_class_sysconfig dra7xx_mmc_sysc = {
1052 .rev_offs = 0x0000,
1053 .sysc_offs = 0x0010,
1054 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1055 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1056 SYSC_HAS_SOFTRESET),
1057 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1058 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1059 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1060 .sysc_fields = &omap_hwmod_sysc_type2,
1061};
1062
1063static struct omap_hwmod_class dra7xx_mmc_hwmod_class = {
1064 .name = "mmc",
1065 .sysc = &dra7xx_mmc_sysc,
1066};
1067
1068/* mmc1 */
1069static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
1070 { .role = "clk32k", .clk = "mmc1_clk32k" },
1071};
1072
1073/* mmc1 dev_attr */
1074static struct omap_mmc_dev_attr mmc1_dev_attr = {
1075 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1076};
1077
1078static struct omap_hwmod dra7xx_mmc1_hwmod = {
1079 .name = "mmc1",
1080 .class = &dra7xx_mmc_hwmod_class,
1081 .clkdm_name = "l3init_clkdm",
1082 .main_clk = "mmc1_fclk_div",
1083 .prcm = {
1084 .omap4 = {
1085 .clkctrl_offs = DRA7XX_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
1086 .context_offs = DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET,
1087 .modulemode = MODULEMODE_SWCTRL,
1088 },
1089 },
1090 .opt_clks = mmc1_opt_clks,
1091 .opt_clks_cnt = ARRAY_SIZE(mmc1_opt_clks),
1092 .dev_attr = &mmc1_dev_attr,
1093};
1094
1095/* mmc2 */
1096static struct omap_hwmod_opt_clk mmc2_opt_clks[] = {
1097 { .role = "clk32k", .clk = "mmc2_clk32k" },
1098};
1099
1100static struct omap_hwmod dra7xx_mmc2_hwmod = {
1101 .name = "mmc2",
1102 .class = &dra7xx_mmc_hwmod_class,
1103 .clkdm_name = "l3init_clkdm",
1104 .main_clk = "mmc2_fclk_div",
1105 .prcm = {
1106 .omap4 = {
1107 .clkctrl_offs = DRA7XX_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
1108 .context_offs = DRA7XX_RM_L3INIT_MMC2_CONTEXT_OFFSET,
1109 .modulemode = MODULEMODE_SWCTRL,
1110 },
1111 },
1112 .opt_clks = mmc2_opt_clks,
1113 .opt_clks_cnt = ARRAY_SIZE(mmc2_opt_clks),
1114};
1115
1116/* mmc3 */
1117static struct omap_hwmod_opt_clk mmc3_opt_clks[] = {
1118 { .role = "clk32k", .clk = "mmc3_clk32k" },
1119};
1120
1121static struct omap_hwmod dra7xx_mmc3_hwmod = {
1122 .name = "mmc3",
1123 .class = &dra7xx_mmc_hwmod_class,
1124 .clkdm_name = "l4per_clkdm",
1125 .main_clk = "mmc3_gfclk_div",
1126 .prcm = {
1127 .omap4 = {
1128 .clkctrl_offs = DRA7XX_CM_L4PER_MMC3_CLKCTRL_OFFSET,
1129 .context_offs = DRA7XX_RM_L4PER_MMC3_CONTEXT_OFFSET,
1130 .modulemode = MODULEMODE_SWCTRL,
1131 },
1132 },
1133 .opt_clks = mmc3_opt_clks,
1134 .opt_clks_cnt = ARRAY_SIZE(mmc3_opt_clks),
1135};
1136
1137/* mmc4 */
1138static struct omap_hwmod_opt_clk mmc4_opt_clks[] = {
1139 { .role = "clk32k", .clk = "mmc4_clk32k" },
1140};
1141
1142static struct omap_hwmod dra7xx_mmc4_hwmod = {
1143 .name = "mmc4",
1144 .class = &dra7xx_mmc_hwmod_class,
1145 .clkdm_name = "l4per_clkdm",
1146 .main_clk = "mmc4_gfclk_div",
1147 .prcm = {
1148 .omap4 = {
1149 .clkctrl_offs = DRA7XX_CM_L4PER_MMC4_CLKCTRL_OFFSET,
1150 .context_offs = DRA7XX_RM_L4PER_MMC4_CONTEXT_OFFSET,
1151 .modulemode = MODULEMODE_SWCTRL,
1152 },
1153 },
1154 .opt_clks = mmc4_opt_clks,
1155 .opt_clks_cnt = ARRAY_SIZE(mmc4_opt_clks),
1156};
1157
1158/*
1159 * 'mpu' class
1160 *
1161 */
1162
1163static struct omap_hwmod_class dra7xx_mpu_hwmod_class = {
1164 .name = "mpu",
1165};
1166
1167/* mpu */
1168static struct omap_hwmod dra7xx_mpu_hwmod = {
1169 .name = "mpu",
1170 .class = &dra7xx_mpu_hwmod_class,
1171 .clkdm_name = "mpu_clkdm",
1172 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
1173 .main_clk = "dpll_mpu_m2_ck",
1174 .prcm = {
1175 .omap4 = {
1176 .clkctrl_offs = DRA7XX_CM_MPU_MPU_CLKCTRL_OFFSET,
1177 .context_offs = DRA7XX_RM_MPU_MPU_CONTEXT_OFFSET,
1178 },
1179 },
1180};
1181
1182/*
1183 * 'ocp2scp' class
1184 *
1185 */
1186
1187static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
1188 .rev_offs = 0x0000,
1189 .sysc_offs = 0x0010,
1190 .syss_offs = 0x0014,
1191 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1192 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1193 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1194 SIDLE_SMART_WKUP),
1195 .sysc_fields = &omap_hwmod_sysc_type1,
1196};
1197
1198static struct omap_hwmod_class dra7xx_ocp2scp_hwmod_class = {
1199 .name = "ocp2scp",
1200 .sysc = &dra7xx_ocp2scp_sysc,
1201};
1202
1203/* ocp2scp1 */
1204static struct omap_hwmod dra7xx_ocp2scp1_hwmod = {
1205 .name = "ocp2scp1",
1206 .class = &dra7xx_ocp2scp_hwmod_class,
1207 .clkdm_name = "l3init_clkdm",
1208 .main_clk = "l4_root_clk_div",
1209 .prcm = {
1210 .omap4 = {
1211 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP1_CLKCTRL_OFFSET,
1212 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP1_CONTEXT_OFFSET,
1213 .modulemode = MODULEMODE_HWCTRL,
1214 },
1215 },
1216};
1217
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06001218/* ocp2scp3 */
1219static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
1220 .name = "ocp2scp3",
1221 .class = &dra7xx_ocp2scp_hwmod_class,
1222 .clkdm_name = "l3init_clkdm",
1223 .main_clk = "l4_root_clk_div",
1224 .prcm = {
1225 .omap4 = {
1226 .clkctrl_offs = DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
1227 .context_offs = DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
1228 .modulemode = MODULEMODE_HWCTRL,
1229 },
1230 },
1231};
1232
Ambresh K90020c72013-07-09 13:02:16 +05301233/*
1234 * 'qspi' class
1235 *
1236 */
1237
1238static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
1239 .sysc_offs = 0x0010,
1240 .sysc_flags = SYSC_HAS_SIDLEMODE,
1241 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1242 SIDLE_SMART_WKUP),
1243 .sysc_fields = &omap_hwmod_sysc_type2,
1244};
1245
1246static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1247 .name = "qspi",
1248 .sysc = &dra7xx_qspi_sysc,
1249};
1250
1251/* qspi */
1252static struct omap_hwmod dra7xx_qspi_hwmod = {
1253 .name = "qspi",
1254 .class = &dra7xx_qspi_hwmod_class,
1255 .clkdm_name = "l4per2_clkdm",
1256 .main_clk = "qspi_gfclk_div",
1257 .prcm = {
1258 .omap4 = {
1259 .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1260 .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1261 .modulemode = MODULEMODE_SWCTRL,
1262 },
1263 },
1264};
1265
1266/*
1267 * 'sata' class
1268 *
1269 */
1270
1271static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
1272 .sysc_offs = 0x0000,
1273 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1274 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1275 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1276 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1277 .sysc_fields = &omap_hwmod_sysc_type2,
1278};
1279
1280static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1281 .name = "sata",
1282 .sysc = &dra7xx_sata_sysc,
1283};
1284
1285/* sata */
1286static struct omap_hwmod_opt_clk sata_opt_clks[] = {
1287 { .role = "ref_clk", .clk = "sata_ref_clk" },
1288};
1289
1290static struct omap_hwmod dra7xx_sata_hwmod = {
1291 .name = "sata",
1292 .class = &dra7xx_sata_hwmod_class,
1293 .clkdm_name = "l3init_clkdm",
1294 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1295 .main_clk = "func_48m_fclk",
1296 .prcm = {
1297 .omap4 = {
1298 .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1299 .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1300 .modulemode = MODULEMODE_SWCTRL,
1301 },
1302 },
1303 .opt_clks = sata_opt_clks,
1304 .opt_clks_cnt = ARRAY_SIZE(sata_opt_clks),
1305};
1306
1307/*
1308 * 'smartreflex' class
1309 *
1310 */
1311
1312/* The IP is not compliant to type1 / type2 scheme */
1313static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
1314 .sidle_shift = 24,
1315 .enwkup_shift = 26,
1316};
1317
1318static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
1319 .sysc_offs = 0x0038,
1320 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1321 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1322 SIDLE_SMART_WKUP),
1323 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
1324};
1325
1326static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1327 .name = "smartreflex",
1328 .sysc = &dra7xx_smartreflex_sysc,
1329 .rev = 2,
1330};
1331
1332/* smartreflex_core */
1333/* smartreflex_core dev_attr */
1334static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1335 .sensor_voltdm_name = "core",
1336};
1337
1338static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1339 .name = "smartreflex_core",
1340 .class = &dra7xx_smartreflex_hwmod_class,
1341 .clkdm_name = "coreaon_clkdm",
1342 .main_clk = "wkupaon_iclk_mux",
1343 .prcm = {
1344 .omap4 = {
1345 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1346 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1347 .modulemode = MODULEMODE_SWCTRL,
1348 },
1349 },
1350 .dev_attr = &smartreflex_core_dev_attr,
1351};
1352
1353/* smartreflex_mpu */
1354/* smartreflex_mpu dev_attr */
1355static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1356 .sensor_voltdm_name = "mpu",
1357};
1358
1359static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1360 .name = "smartreflex_mpu",
1361 .class = &dra7xx_smartreflex_hwmod_class,
1362 .clkdm_name = "coreaon_clkdm",
1363 .main_clk = "wkupaon_iclk_mux",
1364 .prcm = {
1365 .omap4 = {
1366 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1367 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1368 .modulemode = MODULEMODE_SWCTRL,
1369 },
1370 },
1371 .dev_attr = &smartreflex_mpu_dev_attr,
1372};
1373
1374/*
1375 * 'spinlock' class
1376 *
1377 */
1378
1379static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1380 .rev_offs = 0x0000,
1381 .sysc_offs = 0x0010,
1382 .syss_offs = 0x0014,
Suman Annac317d0f2014-01-10 17:43:08 -06001383 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1384 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1385 SYSS_HAS_RESET_STATUS),
1386 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Ambresh K90020c72013-07-09 13:02:16 +05301387 .sysc_fields = &omap_hwmod_sysc_type1,
1388};
1389
1390static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
1391 .name = "spinlock",
1392 .sysc = &dra7xx_spinlock_sysc,
1393};
1394
1395/* spinlock */
1396static struct omap_hwmod dra7xx_spinlock_hwmod = {
1397 .name = "spinlock",
1398 .class = &dra7xx_spinlock_hwmod_class,
1399 .clkdm_name = "l4cfg_clkdm",
1400 .main_clk = "l3_iclk_div",
1401 .prcm = {
1402 .omap4 = {
1403 .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
1404 .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
1405 },
1406 },
1407};
1408
1409/*
1410 * 'timer' class
1411 *
1412 * This class contains several variants: ['timer_1ms', 'timer_secure',
1413 * 'timer']
1414 */
1415
1416static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
1417 .rev_offs = 0x0000,
1418 .sysc_offs = 0x0010,
1419 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1420 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1421 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1422 SIDLE_SMART_WKUP),
1423 .sysc_fields = &omap_hwmod_sysc_type2,
1424};
1425
1426static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1427 .name = "timer",
1428 .sysc = &dra7xx_timer_1ms_sysc,
1429};
1430
1431static struct omap_hwmod_class_sysconfig dra7xx_timer_secure_sysc = {
1432 .rev_offs = 0x0000,
1433 .sysc_offs = 0x0010,
1434 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1435 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1436 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1437 SIDLE_SMART_WKUP),
1438 .sysc_fields = &omap_hwmod_sysc_type2,
1439};
1440
1441static struct omap_hwmod_class dra7xx_timer_secure_hwmod_class = {
1442 .name = "timer",
1443 .sysc = &dra7xx_timer_secure_sysc,
1444};
1445
1446static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1447 .rev_offs = 0x0000,
1448 .sysc_offs = 0x0010,
1449 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1450 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1451 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1452 SIDLE_SMART_WKUP),
1453 .sysc_fields = &omap_hwmod_sysc_type2,
1454};
1455
1456static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
1457 .name = "timer",
1458 .sysc = &dra7xx_timer_sysc,
1459};
1460
1461/* timer1 */
1462static struct omap_hwmod dra7xx_timer1_hwmod = {
1463 .name = "timer1",
1464 .class = &dra7xx_timer_1ms_hwmod_class,
1465 .clkdm_name = "wkupaon_clkdm",
1466 .main_clk = "timer1_gfclk_mux",
1467 .prcm = {
1468 .omap4 = {
1469 .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1470 .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1471 .modulemode = MODULEMODE_SWCTRL,
1472 },
1473 },
1474};
1475
1476/* timer2 */
1477static struct omap_hwmod dra7xx_timer2_hwmod = {
1478 .name = "timer2",
1479 .class = &dra7xx_timer_1ms_hwmod_class,
1480 .clkdm_name = "l4per_clkdm",
1481 .main_clk = "timer2_gfclk_mux",
1482 .prcm = {
1483 .omap4 = {
1484 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1485 .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1486 .modulemode = MODULEMODE_SWCTRL,
1487 },
1488 },
1489};
1490
1491/* timer3 */
1492static struct omap_hwmod dra7xx_timer3_hwmod = {
1493 .name = "timer3",
1494 .class = &dra7xx_timer_hwmod_class,
1495 .clkdm_name = "l4per_clkdm",
1496 .main_clk = "timer3_gfclk_mux",
1497 .prcm = {
1498 .omap4 = {
1499 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1500 .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1501 .modulemode = MODULEMODE_SWCTRL,
1502 },
1503 },
1504};
1505
1506/* timer4 */
1507static struct omap_hwmod dra7xx_timer4_hwmod = {
1508 .name = "timer4",
1509 .class = &dra7xx_timer_secure_hwmod_class,
1510 .clkdm_name = "l4per_clkdm",
1511 .main_clk = "timer4_gfclk_mux",
1512 .prcm = {
1513 .omap4 = {
1514 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1515 .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1516 .modulemode = MODULEMODE_SWCTRL,
1517 },
1518 },
1519};
1520
1521/* timer5 */
1522static struct omap_hwmod dra7xx_timer5_hwmod = {
1523 .name = "timer5",
1524 .class = &dra7xx_timer_hwmod_class,
1525 .clkdm_name = "ipu_clkdm",
1526 .main_clk = "timer5_gfclk_mux",
1527 .prcm = {
1528 .omap4 = {
1529 .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
1530 .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
1531 .modulemode = MODULEMODE_SWCTRL,
1532 },
1533 },
1534};
1535
1536/* timer6 */
1537static struct omap_hwmod dra7xx_timer6_hwmod = {
1538 .name = "timer6",
1539 .class = &dra7xx_timer_hwmod_class,
1540 .clkdm_name = "ipu_clkdm",
1541 .main_clk = "timer6_gfclk_mux",
1542 .prcm = {
1543 .omap4 = {
1544 .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
1545 .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
1546 .modulemode = MODULEMODE_SWCTRL,
1547 },
1548 },
1549};
1550
1551/* timer7 */
1552static struct omap_hwmod dra7xx_timer7_hwmod = {
1553 .name = "timer7",
1554 .class = &dra7xx_timer_hwmod_class,
1555 .clkdm_name = "ipu_clkdm",
1556 .main_clk = "timer7_gfclk_mux",
1557 .prcm = {
1558 .omap4 = {
1559 .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
1560 .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
1561 .modulemode = MODULEMODE_SWCTRL,
1562 },
1563 },
1564};
1565
1566/* timer8 */
1567static struct omap_hwmod dra7xx_timer8_hwmod = {
1568 .name = "timer8",
1569 .class = &dra7xx_timer_hwmod_class,
1570 .clkdm_name = "ipu_clkdm",
1571 .main_clk = "timer8_gfclk_mux",
1572 .prcm = {
1573 .omap4 = {
1574 .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
1575 .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
1576 .modulemode = MODULEMODE_SWCTRL,
1577 },
1578 },
1579};
1580
1581/* timer9 */
1582static struct omap_hwmod dra7xx_timer9_hwmod = {
1583 .name = "timer9",
1584 .class = &dra7xx_timer_hwmod_class,
1585 .clkdm_name = "l4per_clkdm",
1586 .main_clk = "timer9_gfclk_mux",
1587 .prcm = {
1588 .omap4 = {
1589 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1590 .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1591 .modulemode = MODULEMODE_SWCTRL,
1592 },
1593 },
1594};
1595
1596/* timer10 */
1597static struct omap_hwmod dra7xx_timer10_hwmod = {
1598 .name = "timer10",
1599 .class = &dra7xx_timer_1ms_hwmod_class,
1600 .clkdm_name = "l4per_clkdm",
1601 .main_clk = "timer10_gfclk_mux",
1602 .prcm = {
1603 .omap4 = {
1604 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1605 .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1606 .modulemode = MODULEMODE_SWCTRL,
1607 },
1608 },
1609};
1610
1611/* timer11 */
1612static struct omap_hwmod dra7xx_timer11_hwmod = {
1613 .name = "timer11",
1614 .class = &dra7xx_timer_hwmod_class,
1615 .clkdm_name = "l4per_clkdm",
1616 .main_clk = "timer11_gfclk_mux",
1617 .prcm = {
1618 .omap4 = {
1619 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1620 .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1621 .modulemode = MODULEMODE_SWCTRL,
1622 },
1623 },
1624};
1625
1626/*
1627 * 'uart' class
1628 *
1629 */
1630
1631static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
1632 .rev_offs = 0x0050,
1633 .sysc_offs = 0x0054,
1634 .syss_offs = 0x0058,
1635 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1636 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1637 SYSS_HAS_RESET_STATUS),
1638 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1639 SIDLE_SMART_WKUP),
1640 .sysc_fields = &omap_hwmod_sysc_type1,
1641};
1642
1643static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
1644 .name = "uart",
1645 .sysc = &dra7xx_uart_sysc,
1646};
1647
1648/* uart1 */
1649static struct omap_hwmod dra7xx_uart1_hwmod = {
1650 .name = "uart1",
1651 .class = &dra7xx_uart_hwmod_class,
1652 .clkdm_name = "l4per_clkdm",
1653 .main_clk = "uart1_gfclk_mux",
Rajendra Nayak38958c12013-12-12 15:22:49 +05301654 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
Ambresh K90020c72013-07-09 13:02:16 +05301655 .prcm = {
1656 .omap4 = {
1657 .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
1658 .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
1659 .modulemode = MODULEMODE_SWCTRL,
1660 },
1661 },
1662};
1663
1664/* uart2 */
1665static struct omap_hwmod dra7xx_uart2_hwmod = {
1666 .name = "uart2",
1667 .class = &dra7xx_uart_hwmod_class,
1668 .clkdm_name = "l4per_clkdm",
1669 .main_clk = "uart2_gfclk_mux",
1670 .flags = HWMOD_SWSUP_SIDLE_ACT,
1671 .prcm = {
1672 .omap4 = {
1673 .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
1674 .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
1675 .modulemode = MODULEMODE_SWCTRL,
1676 },
1677 },
1678};
1679
1680/* uart3 */
1681static struct omap_hwmod dra7xx_uart3_hwmod = {
1682 .name = "uart3",
1683 .class = &dra7xx_uart_hwmod_class,
1684 .clkdm_name = "l4per_clkdm",
1685 .main_clk = "uart3_gfclk_mux",
1686 .flags = HWMOD_SWSUP_SIDLE_ACT,
1687 .prcm = {
1688 .omap4 = {
1689 .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
1690 .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
1691 .modulemode = MODULEMODE_SWCTRL,
1692 },
1693 },
1694};
1695
1696/* uart4 */
1697static struct omap_hwmod dra7xx_uart4_hwmod = {
1698 .name = "uart4",
1699 .class = &dra7xx_uart_hwmod_class,
1700 .clkdm_name = "l4per_clkdm",
1701 .main_clk = "uart4_gfclk_mux",
1702 .flags = HWMOD_SWSUP_SIDLE_ACT,
1703 .prcm = {
1704 .omap4 = {
1705 .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
1706 .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
1707 .modulemode = MODULEMODE_SWCTRL,
1708 },
1709 },
1710};
1711
1712/* uart5 */
1713static struct omap_hwmod dra7xx_uart5_hwmod = {
1714 .name = "uart5",
1715 .class = &dra7xx_uart_hwmod_class,
1716 .clkdm_name = "l4per_clkdm",
1717 .main_clk = "uart5_gfclk_mux",
1718 .flags = HWMOD_SWSUP_SIDLE_ACT,
1719 .prcm = {
1720 .omap4 = {
1721 .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
1722 .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
1723 .modulemode = MODULEMODE_SWCTRL,
1724 },
1725 },
1726};
1727
1728/* uart6 */
1729static struct omap_hwmod dra7xx_uart6_hwmod = {
1730 .name = "uart6",
1731 .class = &dra7xx_uart_hwmod_class,
1732 .clkdm_name = "ipu_clkdm",
1733 .main_clk = "uart6_gfclk_mux",
1734 .flags = HWMOD_SWSUP_SIDLE_ACT,
1735 .prcm = {
1736 .omap4 = {
1737 .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
1738 .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
1739 .modulemode = MODULEMODE_SWCTRL,
1740 },
1741 },
1742};
1743
1744/*
1745 * 'usb_otg_ss' class
1746 *
1747 */
1748
1749static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
1750 .name = "usb_otg_ss",
1751};
1752
1753/* usb_otg_ss1 */
1754static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
1755 { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
1756};
1757
1758static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
1759 .name = "usb_otg_ss1",
1760 .class = &dra7xx_usb_otg_ss_hwmod_class,
1761 .clkdm_name = "l3init_clkdm",
1762 .main_clk = "dpll_core_h13x2_ck",
1763 .prcm = {
1764 .omap4 = {
1765 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
1766 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
1767 .modulemode = MODULEMODE_HWCTRL,
1768 },
1769 },
1770 .opt_clks = usb_otg_ss1_opt_clks,
1771 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
1772};
1773
1774/* usb_otg_ss2 */
1775static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
1776 { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
1777};
1778
1779static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
1780 .name = "usb_otg_ss2",
1781 .class = &dra7xx_usb_otg_ss_hwmod_class,
1782 .clkdm_name = "l3init_clkdm",
1783 .main_clk = "dpll_core_h13x2_ck",
1784 .prcm = {
1785 .omap4 = {
1786 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
1787 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
1788 .modulemode = MODULEMODE_HWCTRL,
1789 },
1790 },
1791 .opt_clks = usb_otg_ss2_opt_clks,
1792 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
1793};
1794
1795/* usb_otg_ss3 */
1796static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
1797 .name = "usb_otg_ss3",
1798 .class = &dra7xx_usb_otg_ss_hwmod_class,
1799 .clkdm_name = "l3init_clkdm",
1800 .main_clk = "dpll_core_h13x2_ck",
1801 .prcm = {
1802 .omap4 = {
1803 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
1804 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
1805 .modulemode = MODULEMODE_HWCTRL,
1806 },
1807 },
1808};
1809
1810/* usb_otg_ss4 */
1811static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
1812 .name = "usb_otg_ss4",
1813 .class = &dra7xx_usb_otg_ss_hwmod_class,
1814 .clkdm_name = "l3init_clkdm",
1815 .main_clk = "dpll_core_h13x2_ck",
1816 .prcm = {
1817 .omap4 = {
1818 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
1819 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
1820 .modulemode = MODULEMODE_HWCTRL,
1821 },
1822 },
1823};
1824
1825/*
1826 * 'vcp' class
1827 *
1828 */
1829
1830static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
1831 .name = "vcp",
1832};
1833
1834/* vcp1 */
1835static struct omap_hwmod dra7xx_vcp1_hwmod = {
1836 .name = "vcp1",
1837 .class = &dra7xx_vcp_hwmod_class,
1838 .clkdm_name = "l3main1_clkdm",
1839 .main_clk = "l3_iclk_div",
1840 .prcm = {
1841 .omap4 = {
1842 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
1843 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
1844 },
1845 },
1846};
1847
1848/* vcp2 */
1849static struct omap_hwmod dra7xx_vcp2_hwmod = {
1850 .name = "vcp2",
1851 .class = &dra7xx_vcp_hwmod_class,
1852 .clkdm_name = "l3main1_clkdm",
1853 .main_clk = "l3_iclk_div",
1854 .prcm = {
1855 .omap4 = {
1856 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
1857 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
1858 },
1859 },
1860};
1861
1862/*
1863 * 'wd_timer' class
1864 *
1865 */
1866
1867static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
1868 .rev_offs = 0x0000,
1869 .sysc_offs = 0x0010,
1870 .syss_offs = 0x0014,
1871 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
1872 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1873 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1874 SIDLE_SMART_WKUP),
1875 .sysc_fields = &omap_hwmod_sysc_type1,
1876};
1877
1878static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
1879 .name = "wd_timer",
1880 .sysc = &dra7xx_wd_timer_sysc,
1881 .pre_shutdown = &omap2_wd_timer_disable,
1882 .reset = &omap2_wd_timer_reset,
1883};
1884
1885/* wd_timer2 */
1886static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
1887 .name = "wd_timer2",
1888 .class = &dra7xx_wd_timer_hwmod_class,
1889 .clkdm_name = "wkupaon_clkdm",
1890 .main_clk = "sys_32k_ck",
1891 .prcm = {
1892 .omap4 = {
1893 .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
1894 .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
1895 .modulemode = MODULEMODE_SWCTRL,
1896 },
1897 },
1898};
1899
1900
1901/*
1902 * Interfaces
1903 */
1904
1905/* l3_main_2 -> l3_instr */
1906static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
1907 .master = &dra7xx_l3_main_2_hwmod,
1908 .slave = &dra7xx_l3_instr_hwmod,
1909 .clk = "l3_iclk_div",
1910 .user = OCP_USER_MPU | OCP_USER_SDMA,
1911};
1912
1913/* l4_cfg -> l3_main_1 */
1914static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
1915 .master = &dra7xx_l4_cfg_hwmod,
1916 .slave = &dra7xx_l3_main_1_hwmod,
1917 .clk = "l3_iclk_div",
1918 .user = OCP_USER_MPU | OCP_USER_SDMA,
1919};
1920
1921/* mpu -> l3_main_1 */
1922static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
1923 .master = &dra7xx_mpu_hwmod,
1924 .slave = &dra7xx_l3_main_1_hwmod,
1925 .clk = "l3_iclk_div",
1926 .user = OCP_USER_MPU,
1927};
1928
1929/* l3_main_1 -> l3_main_2 */
1930static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
1931 .master = &dra7xx_l3_main_1_hwmod,
1932 .slave = &dra7xx_l3_main_2_hwmod,
1933 .clk = "l3_iclk_div",
1934 .user = OCP_USER_MPU,
1935};
1936
1937/* l4_cfg -> l3_main_2 */
1938static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
1939 .master = &dra7xx_l4_cfg_hwmod,
1940 .slave = &dra7xx_l3_main_2_hwmod,
1941 .clk = "l3_iclk_div",
1942 .user = OCP_USER_MPU | OCP_USER_SDMA,
1943};
1944
1945/* l3_main_1 -> l4_cfg */
1946static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
1947 .master = &dra7xx_l3_main_1_hwmod,
1948 .slave = &dra7xx_l4_cfg_hwmod,
1949 .clk = "l3_iclk_div",
1950 .user = OCP_USER_MPU | OCP_USER_SDMA,
1951};
1952
1953/* l3_main_1 -> l4_per1 */
1954static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
1955 .master = &dra7xx_l3_main_1_hwmod,
1956 .slave = &dra7xx_l4_per1_hwmod,
1957 .clk = "l3_iclk_div",
1958 .user = OCP_USER_MPU | OCP_USER_SDMA,
1959};
1960
1961/* l3_main_1 -> l4_per2 */
1962static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
1963 .master = &dra7xx_l3_main_1_hwmod,
1964 .slave = &dra7xx_l4_per2_hwmod,
1965 .clk = "l3_iclk_div",
1966 .user = OCP_USER_MPU | OCP_USER_SDMA,
1967};
1968
1969/* l3_main_1 -> l4_per3 */
1970static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
1971 .master = &dra7xx_l3_main_1_hwmod,
1972 .slave = &dra7xx_l4_per3_hwmod,
1973 .clk = "l3_iclk_div",
1974 .user = OCP_USER_MPU | OCP_USER_SDMA,
1975};
1976
1977/* l3_main_1 -> l4_wkup */
1978static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
1979 .master = &dra7xx_l3_main_1_hwmod,
1980 .slave = &dra7xx_l4_wkup_hwmod,
1981 .clk = "wkupaon_iclk_mux",
1982 .user = OCP_USER_MPU | OCP_USER_SDMA,
1983};
1984
1985/* l4_per2 -> atl */
1986static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
1987 .master = &dra7xx_l4_per2_hwmod,
1988 .slave = &dra7xx_atl_hwmod,
1989 .clk = "l3_iclk_div",
1990 .user = OCP_USER_MPU | OCP_USER_SDMA,
1991};
1992
1993/* l3_main_1 -> bb2d */
1994static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
1995 .master = &dra7xx_l3_main_1_hwmod,
1996 .slave = &dra7xx_bb2d_hwmod,
1997 .clk = "l3_iclk_div",
1998 .user = OCP_USER_MPU | OCP_USER_SDMA,
1999};
2000
2001/* l4_wkup -> counter_32k */
2002static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
2003 .master = &dra7xx_l4_wkup_hwmod,
2004 .slave = &dra7xx_counter_32k_hwmod,
2005 .clk = "wkupaon_iclk_mux",
2006 .user = OCP_USER_MPU | OCP_USER_SDMA,
2007};
2008
2009/* l4_wkup -> ctrl_module_wkup */
2010static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
2011 .master = &dra7xx_l4_wkup_hwmod,
2012 .slave = &dra7xx_ctrl_module_wkup_hwmod,
2013 .clk = "wkupaon_iclk_mux",
2014 .user = OCP_USER_MPU | OCP_USER_SDMA,
2015};
2016
2017/* l4_wkup -> dcan1 */
2018static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
2019 .master = &dra7xx_l4_wkup_hwmod,
2020 .slave = &dra7xx_dcan1_hwmod,
2021 .clk = "wkupaon_iclk_mux",
2022 .user = OCP_USER_MPU | OCP_USER_SDMA,
2023};
2024
2025/* l4_per2 -> dcan2 */
2026static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
2027 .master = &dra7xx_l4_per2_hwmod,
2028 .slave = &dra7xx_dcan2_hwmod,
2029 .clk = "l3_iclk_div",
2030 .user = OCP_USER_MPU | OCP_USER_SDMA,
2031};
2032
2033static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
2034 {
2035 .pa_start = 0x4a056000,
2036 .pa_end = 0x4a056fff,
2037 .flags = ADDR_TYPE_RT
2038 },
2039 { }
2040};
2041
2042/* l4_cfg -> dma_system */
2043static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
2044 .master = &dra7xx_l4_cfg_hwmod,
2045 .slave = &dra7xx_dma_system_hwmod,
2046 .clk = "l3_iclk_div",
2047 .addr = dra7xx_dma_system_addrs,
2048 .user = OCP_USER_MPU | OCP_USER_SDMA,
2049};
2050
2051static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
2052 {
2053 .name = "family",
2054 .pa_start = 0x58000000,
2055 .pa_end = 0x5800007f,
2056 .flags = ADDR_TYPE_RT
2057 },
2058};
2059
2060/* l3_main_1 -> dss */
2061static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
2062 .master = &dra7xx_l3_main_1_hwmod,
2063 .slave = &dra7xx_dss_hwmod,
2064 .clk = "l3_iclk_div",
2065 .addr = dra7xx_dss_addrs,
2066 .user = OCP_USER_MPU | OCP_USER_SDMA,
2067};
2068
2069static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
2070 {
2071 .name = "dispc",
2072 .pa_start = 0x58001000,
2073 .pa_end = 0x58001fff,
2074 .flags = ADDR_TYPE_RT
2075 },
2076};
2077
2078/* l3_main_1 -> dispc */
2079static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
2080 .master = &dra7xx_l3_main_1_hwmod,
2081 .slave = &dra7xx_dss_dispc_hwmod,
2082 .clk = "l3_iclk_div",
2083 .addr = dra7xx_dss_dispc_addrs,
2084 .user = OCP_USER_MPU | OCP_USER_SDMA,
2085};
2086
2087static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
2088 {
2089 .name = "hdmi_wp",
2090 .pa_start = 0x58040000,
2091 .pa_end = 0x580400ff,
2092 .flags = ADDR_TYPE_RT
2093 },
2094 { }
2095};
2096
2097/* l3_main_1 -> dispc */
2098static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2099 .master = &dra7xx_l3_main_1_hwmod,
2100 .slave = &dra7xx_dss_hdmi_hwmod,
2101 .clk = "l3_iclk_div",
2102 .addr = dra7xx_dss_hdmi_addrs,
2103 .user = OCP_USER_MPU | OCP_USER_SDMA,
2104};
2105
2106static struct omap_hwmod_addr_space dra7xx_elm_addrs[] = {
2107 {
2108 .pa_start = 0x48078000,
2109 .pa_end = 0x48078fff,
2110 .flags = ADDR_TYPE_RT
2111 },
2112 { }
2113};
2114
2115/* l4_per1 -> elm */
2116static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2117 .master = &dra7xx_l4_per1_hwmod,
2118 .slave = &dra7xx_elm_hwmod,
2119 .clk = "l3_iclk_div",
2120 .addr = dra7xx_elm_addrs,
2121 .user = OCP_USER_MPU | OCP_USER_SDMA,
2122};
2123
2124/* l4_wkup -> gpio1 */
2125static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
2126 .master = &dra7xx_l4_wkup_hwmod,
2127 .slave = &dra7xx_gpio1_hwmod,
2128 .clk = "wkupaon_iclk_mux",
2129 .user = OCP_USER_MPU | OCP_USER_SDMA,
2130};
2131
2132/* l4_per1 -> gpio2 */
2133static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
2134 .master = &dra7xx_l4_per1_hwmod,
2135 .slave = &dra7xx_gpio2_hwmod,
2136 .clk = "l3_iclk_div",
2137 .user = OCP_USER_MPU | OCP_USER_SDMA,
2138};
2139
2140/* l4_per1 -> gpio3 */
2141static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
2142 .master = &dra7xx_l4_per1_hwmod,
2143 .slave = &dra7xx_gpio3_hwmod,
2144 .clk = "l3_iclk_div",
2145 .user = OCP_USER_MPU | OCP_USER_SDMA,
2146};
2147
2148/* l4_per1 -> gpio4 */
2149static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
2150 .master = &dra7xx_l4_per1_hwmod,
2151 .slave = &dra7xx_gpio4_hwmod,
2152 .clk = "l3_iclk_div",
2153 .user = OCP_USER_MPU | OCP_USER_SDMA,
2154};
2155
2156/* l4_per1 -> gpio5 */
2157static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
2158 .master = &dra7xx_l4_per1_hwmod,
2159 .slave = &dra7xx_gpio5_hwmod,
2160 .clk = "l3_iclk_div",
2161 .user = OCP_USER_MPU | OCP_USER_SDMA,
2162};
2163
2164/* l4_per1 -> gpio6 */
2165static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
2166 .master = &dra7xx_l4_per1_hwmod,
2167 .slave = &dra7xx_gpio6_hwmod,
2168 .clk = "l3_iclk_div",
2169 .user = OCP_USER_MPU | OCP_USER_SDMA,
2170};
2171
2172/* l4_per1 -> gpio7 */
2173static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
2174 .master = &dra7xx_l4_per1_hwmod,
2175 .slave = &dra7xx_gpio7_hwmod,
2176 .clk = "l3_iclk_div",
2177 .user = OCP_USER_MPU | OCP_USER_SDMA,
2178};
2179
2180/* l4_per1 -> gpio8 */
2181static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
2182 .master = &dra7xx_l4_per1_hwmod,
2183 .slave = &dra7xx_gpio8_hwmod,
2184 .clk = "l3_iclk_div",
2185 .user = OCP_USER_MPU | OCP_USER_SDMA,
2186};
2187
2188static struct omap_hwmod_addr_space dra7xx_gpmc_addrs[] = {
2189 {
2190 .pa_start = 0x50000000,
2191 .pa_end = 0x500003ff,
2192 .flags = ADDR_TYPE_RT
2193 },
2194 { }
2195};
2196
2197/* l3_main_1 -> gpmc */
2198static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
2199 .master = &dra7xx_l3_main_1_hwmod,
2200 .slave = &dra7xx_gpmc_hwmod,
2201 .clk = "l3_iclk_div",
2202 .addr = dra7xx_gpmc_addrs,
2203 .user = OCP_USER_MPU | OCP_USER_SDMA,
2204};
2205
2206static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
2207 {
2208 .pa_start = 0x480b2000,
2209 .pa_end = 0x480b201f,
2210 .flags = ADDR_TYPE_RT
2211 },
2212 { }
2213};
2214
2215/* l4_per1 -> hdq1w */
2216static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
2217 .master = &dra7xx_l4_per1_hwmod,
2218 .slave = &dra7xx_hdq1w_hwmod,
2219 .clk = "l3_iclk_div",
2220 .addr = dra7xx_hdq1w_addrs,
2221 .user = OCP_USER_MPU | OCP_USER_SDMA,
2222};
2223
2224/* l4_per1 -> i2c1 */
2225static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
2226 .master = &dra7xx_l4_per1_hwmod,
2227 .slave = &dra7xx_i2c1_hwmod,
2228 .clk = "l3_iclk_div",
2229 .user = OCP_USER_MPU | OCP_USER_SDMA,
2230};
2231
2232/* l4_per1 -> i2c2 */
2233static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
2234 .master = &dra7xx_l4_per1_hwmod,
2235 .slave = &dra7xx_i2c2_hwmod,
2236 .clk = "l3_iclk_div",
2237 .user = OCP_USER_MPU | OCP_USER_SDMA,
2238};
2239
2240/* l4_per1 -> i2c3 */
2241static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
2242 .master = &dra7xx_l4_per1_hwmod,
2243 .slave = &dra7xx_i2c3_hwmod,
2244 .clk = "l3_iclk_div",
2245 .user = OCP_USER_MPU | OCP_USER_SDMA,
2246};
2247
2248/* l4_per1 -> i2c4 */
2249static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
2250 .master = &dra7xx_l4_per1_hwmod,
2251 .slave = &dra7xx_i2c4_hwmod,
2252 .clk = "l3_iclk_div",
2253 .user = OCP_USER_MPU | OCP_USER_SDMA,
2254};
2255
2256/* l4_per1 -> i2c5 */
2257static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
2258 .master = &dra7xx_l4_per1_hwmod,
2259 .slave = &dra7xx_i2c5_hwmod,
2260 .clk = "l3_iclk_div",
2261 .user = OCP_USER_MPU | OCP_USER_SDMA,
2262};
2263
2264/* l4_per1 -> mcspi1 */
2265static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
2266 .master = &dra7xx_l4_per1_hwmod,
2267 .slave = &dra7xx_mcspi1_hwmod,
2268 .clk = "l3_iclk_div",
2269 .user = OCP_USER_MPU | OCP_USER_SDMA,
2270};
2271
2272/* l4_per1 -> mcspi2 */
2273static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
2274 .master = &dra7xx_l4_per1_hwmod,
2275 .slave = &dra7xx_mcspi2_hwmod,
2276 .clk = "l3_iclk_div",
2277 .user = OCP_USER_MPU | OCP_USER_SDMA,
2278};
2279
2280/* l4_per1 -> mcspi3 */
2281static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
2282 .master = &dra7xx_l4_per1_hwmod,
2283 .slave = &dra7xx_mcspi3_hwmod,
2284 .clk = "l3_iclk_div",
2285 .user = OCP_USER_MPU | OCP_USER_SDMA,
2286};
2287
2288/* l4_per1 -> mcspi4 */
2289static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
2290 .master = &dra7xx_l4_per1_hwmod,
2291 .slave = &dra7xx_mcspi4_hwmod,
2292 .clk = "l3_iclk_div",
2293 .user = OCP_USER_MPU | OCP_USER_SDMA,
2294};
2295
2296/* l4_per1 -> mmc1 */
2297static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
2298 .master = &dra7xx_l4_per1_hwmod,
2299 .slave = &dra7xx_mmc1_hwmod,
2300 .clk = "l3_iclk_div",
2301 .user = OCP_USER_MPU | OCP_USER_SDMA,
2302};
2303
2304/* l4_per1 -> mmc2 */
2305static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
2306 .master = &dra7xx_l4_per1_hwmod,
2307 .slave = &dra7xx_mmc2_hwmod,
2308 .clk = "l3_iclk_div",
2309 .user = OCP_USER_MPU | OCP_USER_SDMA,
2310};
2311
2312/* l4_per1 -> mmc3 */
2313static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
2314 .master = &dra7xx_l4_per1_hwmod,
2315 .slave = &dra7xx_mmc3_hwmod,
2316 .clk = "l3_iclk_div",
2317 .user = OCP_USER_MPU | OCP_USER_SDMA,
2318};
2319
2320/* l4_per1 -> mmc4 */
2321static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
2322 .master = &dra7xx_l4_per1_hwmod,
2323 .slave = &dra7xx_mmc4_hwmod,
2324 .clk = "l3_iclk_div",
2325 .user = OCP_USER_MPU | OCP_USER_SDMA,
2326};
2327
2328/* l4_cfg -> mpu */
2329static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
2330 .master = &dra7xx_l4_cfg_hwmod,
2331 .slave = &dra7xx_mpu_hwmod,
2332 .clk = "l3_iclk_div",
2333 .user = OCP_USER_MPU | OCP_USER_SDMA,
2334};
2335
Ambresh K90020c72013-07-09 13:02:16 +05302336/* l4_cfg -> ocp2scp1 */
2337static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
2338 .master = &dra7xx_l4_cfg_hwmod,
2339 .slave = &dra7xx_ocp2scp1_hwmod,
2340 .clk = "l4_root_clk_div",
Ambresh K90020c72013-07-09 13:02:16 +05302341 .user = OCP_USER_MPU | OCP_USER_SDMA,
2342};
2343
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06002344/* l4_cfg -> ocp2scp3 */
2345static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = {
2346 .master = &dra7xx_l4_cfg_hwmod,
2347 .slave = &dra7xx_ocp2scp3_hwmod,
2348 .clk = "l4_root_clk_div",
2349 .user = OCP_USER_MPU | OCP_USER_SDMA,
2350};
2351
Ambresh K90020c72013-07-09 13:02:16 +05302352static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
2353 {
2354 .pa_start = 0x4b300000,
2355 .pa_end = 0x4b30007f,
2356 .flags = ADDR_TYPE_RT
2357 },
2358 { }
2359};
2360
2361/* l3_main_1 -> qspi */
2362static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
2363 .master = &dra7xx_l3_main_1_hwmod,
2364 .slave = &dra7xx_qspi_hwmod,
2365 .clk = "l3_iclk_div",
2366 .addr = dra7xx_qspi_addrs,
2367 .user = OCP_USER_MPU | OCP_USER_SDMA,
2368};
2369
2370static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
2371 {
2372 .name = "sysc",
2373 .pa_start = 0x4a141100,
2374 .pa_end = 0x4a141107,
2375 .flags = ADDR_TYPE_RT
2376 },
2377 { }
2378};
2379
2380/* l4_cfg -> sata */
2381static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
2382 .master = &dra7xx_l4_cfg_hwmod,
2383 .slave = &dra7xx_sata_hwmod,
2384 .clk = "l3_iclk_div",
2385 .addr = dra7xx_sata_addrs,
2386 .user = OCP_USER_MPU | OCP_USER_SDMA,
2387};
2388
2389static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
2390 {
2391 .pa_start = 0x4a0dd000,
2392 .pa_end = 0x4a0dd07f,
2393 .flags = ADDR_TYPE_RT
2394 },
2395 { }
2396};
2397
2398/* l4_cfg -> smartreflex_core */
2399static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
2400 .master = &dra7xx_l4_cfg_hwmod,
2401 .slave = &dra7xx_smartreflex_core_hwmod,
2402 .clk = "l4_root_clk_div",
2403 .addr = dra7xx_smartreflex_core_addrs,
2404 .user = OCP_USER_MPU | OCP_USER_SDMA,
2405};
2406
2407static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
2408 {
2409 .pa_start = 0x4a0d9000,
2410 .pa_end = 0x4a0d907f,
2411 .flags = ADDR_TYPE_RT
2412 },
2413 { }
2414};
2415
2416/* l4_cfg -> smartreflex_mpu */
2417static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
2418 .master = &dra7xx_l4_cfg_hwmod,
2419 .slave = &dra7xx_smartreflex_mpu_hwmod,
2420 .clk = "l4_root_clk_div",
2421 .addr = dra7xx_smartreflex_mpu_addrs,
2422 .user = OCP_USER_MPU | OCP_USER_SDMA,
2423};
2424
2425static struct omap_hwmod_addr_space dra7xx_spinlock_addrs[] = {
2426 {
2427 .pa_start = 0x4a0f6000,
2428 .pa_end = 0x4a0f6fff,
2429 .flags = ADDR_TYPE_RT
2430 },
2431 { }
2432};
2433
2434/* l4_cfg -> spinlock */
2435static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
2436 .master = &dra7xx_l4_cfg_hwmod,
2437 .slave = &dra7xx_spinlock_hwmod,
2438 .clk = "l3_iclk_div",
2439 .addr = dra7xx_spinlock_addrs,
2440 .user = OCP_USER_MPU | OCP_USER_SDMA,
2441};
2442
2443/* l4_wkup -> timer1 */
2444static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
2445 .master = &dra7xx_l4_wkup_hwmod,
2446 .slave = &dra7xx_timer1_hwmod,
2447 .clk = "wkupaon_iclk_mux",
2448 .user = OCP_USER_MPU | OCP_USER_SDMA,
2449};
2450
2451/* l4_per1 -> timer2 */
2452static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
2453 .master = &dra7xx_l4_per1_hwmod,
2454 .slave = &dra7xx_timer2_hwmod,
2455 .clk = "l3_iclk_div",
2456 .user = OCP_USER_MPU | OCP_USER_SDMA,
2457};
2458
2459/* l4_per1 -> timer3 */
2460static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
2461 .master = &dra7xx_l4_per1_hwmod,
2462 .slave = &dra7xx_timer3_hwmod,
2463 .clk = "l3_iclk_div",
2464 .user = OCP_USER_MPU | OCP_USER_SDMA,
2465};
2466
2467/* l4_per1 -> timer4 */
2468static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
2469 .master = &dra7xx_l4_per1_hwmod,
2470 .slave = &dra7xx_timer4_hwmod,
2471 .clk = "l3_iclk_div",
2472 .user = OCP_USER_MPU | OCP_USER_SDMA,
2473};
2474
2475/* l4_per3 -> timer5 */
2476static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
2477 .master = &dra7xx_l4_per3_hwmod,
2478 .slave = &dra7xx_timer5_hwmod,
2479 .clk = "l3_iclk_div",
2480 .user = OCP_USER_MPU | OCP_USER_SDMA,
2481};
2482
2483/* l4_per3 -> timer6 */
2484static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
2485 .master = &dra7xx_l4_per3_hwmod,
2486 .slave = &dra7xx_timer6_hwmod,
2487 .clk = "l3_iclk_div",
2488 .user = OCP_USER_MPU | OCP_USER_SDMA,
2489};
2490
2491/* l4_per3 -> timer7 */
2492static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
2493 .master = &dra7xx_l4_per3_hwmod,
2494 .slave = &dra7xx_timer7_hwmod,
2495 .clk = "l3_iclk_div",
2496 .user = OCP_USER_MPU | OCP_USER_SDMA,
2497};
2498
2499/* l4_per3 -> timer8 */
2500static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
2501 .master = &dra7xx_l4_per3_hwmod,
2502 .slave = &dra7xx_timer8_hwmod,
2503 .clk = "l3_iclk_div",
2504 .user = OCP_USER_MPU | OCP_USER_SDMA,
2505};
2506
2507/* l4_per1 -> timer9 */
2508static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
2509 .master = &dra7xx_l4_per1_hwmod,
2510 .slave = &dra7xx_timer9_hwmod,
2511 .clk = "l3_iclk_div",
2512 .user = OCP_USER_MPU | OCP_USER_SDMA,
2513};
2514
2515/* l4_per1 -> timer10 */
2516static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
2517 .master = &dra7xx_l4_per1_hwmod,
2518 .slave = &dra7xx_timer10_hwmod,
2519 .clk = "l3_iclk_div",
2520 .user = OCP_USER_MPU | OCP_USER_SDMA,
2521};
2522
2523/* l4_per1 -> timer11 */
2524static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
2525 .master = &dra7xx_l4_per1_hwmod,
2526 .slave = &dra7xx_timer11_hwmod,
2527 .clk = "l3_iclk_div",
2528 .user = OCP_USER_MPU | OCP_USER_SDMA,
2529};
2530
2531/* l4_per1 -> uart1 */
2532static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
2533 .master = &dra7xx_l4_per1_hwmod,
2534 .slave = &dra7xx_uart1_hwmod,
2535 .clk = "l3_iclk_div",
2536 .user = OCP_USER_MPU | OCP_USER_SDMA,
2537};
2538
2539/* l4_per1 -> uart2 */
2540static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
2541 .master = &dra7xx_l4_per1_hwmod,
2542 .slave = &dra7xx_uart2_hwmod,
2543 .clk = "l3_iclk_div",
2544 .user = OCP_USER_MPU | OCP_USER_SDMA,
2545};
2546
2547/* l4_per1 -> uart3 */
2548static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
2549 .master = &dra7xx_l4_per1_hwmod,
2550 .slave = &dra7xx_uart3_hwmod,
2551 .clk = "l3_iclk_div",
2552 .user = OCP_USER_MPU | OCP_USER_SDMA,
2553};
2554
2555/* l4_per1 -> uart4 */
2556static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
2557 .master = &dra7xx_l4_per1_hwmod,
2558 .slave = &dra7xx_uart4_hwmod,
2559 .clk = "l3_iclk_div",
2560 .user = OCP_USER_MPU | OCP_USER_SDMA,
2561};
2562
2563/* l4_per1 -> uart5 */
2564static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
2565 .master = &dra7xx_l4_per1_hwmod,
2566 .slave = &dra7xx_uart5_hwmod,
2567 .clk = "l3_iclk_div",
2568 .user = OCP_USER_MPU | OCP_USER_SDMA,
2569};
2570
2571/* l4_per1 -> uart6 */
2572static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
2573 .master = &dra7xx_l4_per1_hwmod,
2574 .slave = &dra7xx_uart6_hwmod,
2575 .clk = "l3_iclk_div",
2576 .user = OCP_USER_MPU | OCP_USER_SDMA,
2577};
2578
2579/* l4_per3 -> usb_otg_ss1 */
2580static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
2581 .master = &dra7xx_l4_per3_hwmod,
2582 .slave = &dra7xx_usb_otg_ss1_hwmod,
2583 .clk = "dpll_core_h13x2_ck",
2584 .user = OCP_USER_MPU | OCP_USER_SDMA,
2585};
2586
2587/* l4_per3 -> usb_otg_ss2 */
2588static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
2589 .master = &dra7xx_l4_per3_hwmod,
2590 .slave = &dra7xx_usb_otg_ss2_hwmod,
2591 .clk = "dpll_core_h13x2_ck",
2592 .user = OCP_USER_MPU | OCP_USER_SDMA,
2593};
2594
2595/* l4_per3 -> usb_otg_ss3 */
2596static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
2597 .master = &dra7xx_l4_per3_hwmod,
2598 .slave = &dra7xx_usb_otg_ss3_hwmod,
2599 .clk = "dpll_core_h13x2_ck",
2600 .user = OCP_USER_MPU | OCP_USER_SDMA,
2601};
2602
2603/* l4_per3 -> usb_otg_ss4 */
2604static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
2605 .master = &dra7xx_l4_per3_hwmod,
2606 .slave = &dra7xx_usb_otg_ss4_hwmod,
2607 .clk = "dpll_core_h13x2_ck",
2608 .user = OCP_USER_MPU | OCP_USER_SDMA,
2609};
2610
2611/* l3_main_1 -> vcp1 */
2612static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
2613 .master = &dra7xx_l3_main_1_hwmod,
2614 .slave = &dra7xx_vcp1_hwmod,
2615 .clk = "l3_iclk_div",
2616 .user = OCP_USER_MPU | OCP_USER_SDMA,
2617};
2618
2619/* l4_per2 -> vcp1 */
2620static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
2621 .master = &dra7xx_l4_per2_hwmod,
2622 .slave = &dra7xx_vcp1_hwmod,
2623 .clk = "l3_iclk_div",
2624 .user = OCP_USER_MPU | OCP_USER_SDMA,
2625};
2626
2627/* l3_main_1 -> vcp2 */
2628static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
2629 .master = &dra7xx_l3_main_1_hwmod,
2630 .slave = &dra7xx_vcp2_hwmod,
2631 .clk = "l3_iclk_div",
2632 .user = OCP_USER_MPU | OCP_USER_SDMA,
2633};
2634
2635/* l4_per2 -> vcp2 */
2636static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
2637 .master = &dra7xx_l4_per2_hwmod,
2638 .slave = &dra7xx_vcp2_hwmod,
2639 .clk = "l3_iclk_div",
2640 .user = OCP_USER_MPU | OCP_USER_SDMA,
2641};
2642
2643/* l4_wkup -> wd_timer2 */
2644static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
2645 .master = &dra7xx_l4_wkup_hwmod,
2646 .slave = &dra7xx_wd_timer2_hwmod,
2647 .clk = "wkupaon_iclk_mux",
2648 .user = OCP_USER_MPU | OCP_USER_SDMA,
2649};
2650
2651static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
2652 &dra7xx_l3_main_2__l3_instr,
2653 &dra7xx_l4_cfg__l3_main_1,
2654 &dra7xx_mpu__l3_main_1,
2655 &dra7xx_l3_main_1__l3_main_2,
2656 &dra7xx_l4_cfg__l3_main_2,
2657 &dra7xx_l3_main_1__l4_cfg,
2658 &dra7xx_l3_main_1__l4_per1,
2659 &dra7xx_l3_main_1__l4_per2,
2660 &dra7xx_l3_main_1__l4_per3,
2661 &dra7xx_l3_main_1__l4_wkup,
2662 &dra7xx_l4_per2__atl,
2663 &dra7xx_l3_main_1__bb2d,
2664 &dra7xx_l4_wkup__counter_32k,
2665 &dra7xx_l4_wkup__ctrl_module_wkup,
2666 &dra7xx_l4_wkup__dcan1,
2667 &dra7xx_l4_per2__dcan2,
2668 &dra7xx_l4_cfg__dma_system,
2669 &dra7xx_l3_main_1__dss,
2670 &dra7xx_l3_main_1__dispc,
2671 &dra7xx_l3_main_1__hdmi,
2672 &dra7xx_l4_per1__elm,
2673 &dra7xx_l4_wkup__gpio1,
2674 &dra7xx_l4_per1__gpio2,
2675 &dra7xx_l4_per1__gpio3,
2676 &dra7xx_l4_per1__gpio4,
2677 &dra7xx_l4_per1__gpio5,
2678 &dra7xx_l4_per1__gpio6,
2679 &dra7xx_l4_per1__gpio7,
2680 &dra7xx_l4_per1__gpio8,
2681 &dra7xx_l3_main_1__gpmc,
2682 &dra7xx_l4_per1__hdq1w,
2683 &dra7xx_l4_per1__i2c1,
2684 &dra7xx_l4_per1__i2c2,
2685 &dra7xx_l4_per1__i2c3,
2686 &dra7xx_l4_per1__i2c4,
2687 &dra7xx_l4_per1__i2c5,
2688 &dra7xx_l4_per1__mcspi1,
2689 &dra7xx_l4_per1__mcspi2,
2690 &dra7xx_l4_per1__mcspi3,
2691 &dra7xx_l4_per1__mcspi4,
2692 &dra7xx_l4_per1__mmc1,
2693 &dra7xx_l4_per1__mmc2,
2694 &dra7xx_l4_per1__mmc3,
2695 &dra7xx_l4_per1__mmc4,
2696 &dra7xx_l4_cfg__mpu,
2697 &dra7xx_l4_cfg__ocp2scp1,
Roger Quadrosdf0d0f12014-07-05 17:44:58 -06002698 &dra7xx_l4_cfg__ocp2scp3,
Ambresh K90020c72013-07-09 13:02:16 +05302699 &dra7xx_l3_main_1__qspi,
2700 &dra7xx_l4_cfg__sata,
2701 &dra7xx_l4_cfg__smartreflex_core,
2702 &dra7xx_l4_cfg__smartreflex_mpu,
2703 &dra7xx_l4_cfg__spinlock,
2704 &dra7xx_l4_wkup__timer1,
2705 &dra7xx_l4_per1__timer2,
2706 &dra7xx_l4_per1__timer3,
2707 &dra7xx_l4_per1__timer4,
2708 &dra7xx_l4_per3__timer5,
2709 &dra7xx_l4_per3__timer6,
2710 &dra7xx_l4_per3__timer7,
2711 &dra7xx_l4_per3__timer8,
2712 &dra7xx_l4_per1__timer9,
2713 &dra7xx_l4_per1__timer10,
2714 &dra7xx_l4_per1__timer11,
2715 &dra7xx_l4_per1__uart1,
2716 &dra7xx_l4_per1__uart2,
2717 &dra7xx_l4_per1__uart3,
2718 &dra7xx_l4_per1__uart4,
2719 &dra7xx_l4_per1__uart5,
2720 &dra7xx_l4_per1__uart6,
2721 &dra7xx_l4_per3__usb_otg_ss1,
2722 &dra7xx_l4_per3__usb_otg_ss2,
2723 &dra7xx_l4_per3__usb_otg_ss3,
2724 &dra7xx_l4_per3__usb_otg_ss4,
2725 &dra7xx_l3_main_1__vcp1,
2726 &dra7xx_l4_per2__vcp1,
2727 &dra7xx_l3_main_1__vcp2,
2728 &dra7xx_l4_per2__vcp2,
2729 &dra7xx_l4_wkup__wd_timer2,
2730 NULL,
2731};
2732
2733int __init dra7xx_hwmod_init(void)
2734{
2735 omap_hwmod_init();
2736 return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
2737}