ARM: DRA7: hwmod: Fixup SATA hwmod
[deliverable/linux.git] / arch / arm / mach-omap2 / omap_hwmod_7xx_data.c
CommitLineData
90020c7b
A
1/*
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
1218/*
1219 * 'qspi' class
1220 *
1221 */
1222
1223static struct omap_hwmod_class_sysconfig dra7xx_qspi_sysc = {
1224 .sysc_offs = 0x0010,
1225 .sysc_flags = SYSC_HAS_SIDLEMODE,
1226 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1227 SIDLE_SMART_WKUP),
1228 .sysc_fields = &omap_hwmod_sysc_type2,
1229};
1230
1231static struct omap_hwmod_class dra7xx_qspi_hwmod_class = {
1232 .name = "qspi",
1233 .sysc = &dra7xx_qspi_sysc,
1234};
1235
1236/* qspi */
1237static struct omap_hwmod dra7xx_qspi_hwmod = {
1238 .name = "qspi",
1239 .class = &dra7xx_qspi_hwmod_class,
1240 .clkdm_name = "l4per2_clkdm",
1241 .main_clk = "qspi_gfclk_div",
1242 .prcm = {
1243 .omap4 = {
1244 .clkctrl_offs = DRA7XX_CM_L4PER2_QSPI_CLKCTRL_OFFSET,
1245 .context_offs = DRA7XX_RM_L4PER2_QSPI_CONTEXT_OFFSET,
1246 .modulemode = MODULEMODE_SWCTRL,
1247 },
1248 },
1249};
1250
1251/*
1252 * 'sata' class
1253 *
1254 */
1255
1256static struct omap_hwmod_class_sysconfig dra7xx_sata_sysc = {
1257 .sysc_offs = 0x0000,
1258 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
1259 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1260 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
1261 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
1262 .sysc_fields = &omap_hwmod_sysc_type2,
1263};
1264
1265static struct omap_hwmod_class dra7xx_sata_hwmod_class = {
1266 .name = "sata",
1267 .sysc = &dra7xx_sata_sysc,
1268};
1269
1270/* sata */
90020c7b
A
1271
1272static struct omap_hwmod dra7xx_sata_hwmod = {
1273 .name = "sata",
1274 .class = &dra7xx_sata_hwmod_class,
1275 .clkdm_name = "l3init_clkdm",
1276 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
1277 .main_clk = "func_48m_fclk",
1ea0999e 1278 .mpu_rt_idx = 1,
90020c7b
A
1279 .prcm = {
1280 .omap4 = {
1281 .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
1282 .context_offs = DRA7XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
1283 .modulemode = MODULEMODE_SWCTRL,
1284 },
1285 },
90020c7b
A
1286};
1287
1288/*
1289 * 'smartreflex' class
1290 *
1291 */
1292
1293/* The IP is not compliant to type1 / type2 scheme */
1294static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
1295 .sidle_shift = 24,
1296 .enwkup_shift = 26,
1297};
1298
1299static struct omap_hwmod_class_sysconfig dra7xx_smartreflex_sysc = {
1300 .sysc_offs = 0x0038,
1301 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
1302 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1303 SIDLE_SMART_WKUP),
1304 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
1305};
1306
1307static struct omap_hwmod_class dra7xx_smartreflex_hwmod_class = {
1308 .name = "smartreflex",
1309 .sysc = &dra7xx_smartreflex_sysc,
1310 .rev = 2,
1311};
1312
1313/* smartreflex_core */
1314/* smartreflex_core dev_attr */
1315static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
1316 .sensor_voltdm_name = "core",
1317};
1318
1319static struct omap_hwmod dra7xx_smartreflex_core_hwmod = {
1320 .name = "smartreflex_core",
1321 .class = &dra7xx_smartreflex_hwmod_class,
1322 .clkdm_name = "coreaon_clkdm",
1323 .main_clk = "wkupaon_iclk_mux",
1324 .prcm = {
1325 .omap4 = {
1326 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_CORE_CLKCTRL_OFFSET,
1327 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_CORE_CONTEXT_OFFSET,
1328 .modulemode = MODULEMODE_SWCTRL,
1329 },
1330 },
1331 .dev_attr = &smartreflex_core_dev_attr,
1332};
1333
1334/* smartreflex_mpu */
1335/* smartreflex_mpu dev_attr */
1336static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
1337 .sensor_voltdm_name = "mpu",
1338};
1339
1340static struct omap_hwmod dra7xx_smartreflex_mpu_hwmod = {
1341 .name = "smartreflex_mpu",
1342 .class = &dra7xx_smartreflex_hwmod_class,
1343 .clkdm_name = "coreaon_clkdm",
1344 .main_clk = "wkupaon_iclk_mux",
1345 .prcm = {
1346 .omap4 = {
1347 .clkctrl_offs = DRA7XX_CM_COREAON_SMARTREFLEX_MPU_CLKCTRL_OFFSET,
1348 .context_offs = DRA7XX_RM_COREAON_SMARTREFLEX_MPU_CONTEXT_OFFSET,
1349 .modulemode = MODULEMODE_SWCTRL,
1350 },
1351 },
1352 .dev_attr = &smartreflex_mpu_dev_attr,
1353};
1354
1355/*
1356 * 'spinlock' class
1357 *
1358 */
1359
1360static struct omap_hwmod_class_sysconfig dra7xx_spinlock_sysc = {
1361 .rev_offs = 0x0000,
1362 .sysc_offs = 0x0010,
1363 .syss_offs = 0x0014,
c317d0f2
SA
1364 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1365 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1366 SYSS_HAS_RESET_STATUS),
1367 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
90020c7b
A
1368 .sysc_fields = &omap_hwmod_sysc_type1,
1369};
1370
1371static struct omap_hwmod_class dra7xx_spinlock_hwmod_class = {
1372 .name = "spinlock",
1373 .sysc = &dra7xx_spinlock_sysc,
1374};
1375
1376/* spinlock */
1377static struct omap_hwmod dra7xx_spinlock_hwmod = {
1378 .name = "spinlock",
1379 .class = &dra7xx_spinlock_hwmod_class,
1380 .clkdm_name = "l4cfg_clkdm",
1381 .main_clk = "l3_iclk_div",
1382 .prcm = {
1383 .omap4 = {
1384 .clkctrl_offs = DRA7XX_CM_L4CFG_SPINLOCK_CLKCTRL_OFFSET,
1385 .context_offs = DRA7XX_RM_L4CFG_SPINLOCK_CONTEXT_OFFSET,
1386 },
1387 },
1388};
1389
1390/*
1391 * 'timer' class
1392 *
1393 * This class contains several variants: ['timer_1ms', 'timer_secure',
1394 * 'timer']
1395 */
1396
1397static struct omap_hwmod_class_sysconfig dra7xx_timer_1ms_sysc = {
1398 .rev_offs = 0x0000,
1399 .sysc_offs = 0x0010,
1400 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1401 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1402 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1403 SIDLE_SMART_WKUP),
1404 .sysc_fields = &omap_hwmod_sysc_type2,
1405};
1406
1407static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1408 .name = "timer",
1409 .sysc = &dra7xx_timer_1ms_sysc,
1410};
1411
1412static struct omap_hwmod_class_sysconfig dra7xx_timer_secure_sysc = {
1413 .rev_offs = 0x0000,
1414 .sysc_offs = 0x0010,
1415 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1416 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1417 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1418 SIDLE_SMART_WKUP),
1419 .sysc_fields = &omap_hwmod_sysc_type2,
1420};
1421
1422static struct omap_hwmod_class dra7xx_timer_secure_hwmod_class = {
1423 .name = "timer",
1424 .sysc = &dra7xx_timer_secure_sysc,
1425};
1426
1427static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1428 .rev_offs = 0x0000,
1429 .sysc_offs = 0x0010,
1430 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1431 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1432 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1433 SIDLE_SMART_WKUP),
1434 .sysc_fields = &omap_hwmod_sysc_type2,
1435};
1436
1437static struct omap_hwmod_class dra7xx_timer_hwmod_class = {
1438 .name = "timer",
1439 .sysc = &dra7xx_timer_sysc,
1440};
1441
1442/* timer1 */
1443static struct omap_hwmod dra7xx_timer1_hwmod = {
1444 .name = "timer1",
1445 .class = &dra7xx_timer_1ms_hwmod_class,
1446 .clkdm_name = "wkupaon_clkdm",
1447 .main_clk = "timer1_gfclk_mux",
1448 .prcm = {
1449 .omap4 = {
1450 .clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER1_CLKCTRL_OFFSET,
1451 .context_offs = DRA7XX_RM_WKUPAON_TIMER1_CONTEXT_OFFSET,
1452 .modulemode = MODULEMODE_SWCTRL,
1453 },
1454 },
1455};
1456
1457/* timer2 */
1458static struct omap_hwmod dra7xx_timer2_hwmod = {
1459 .name = "timer2",
1460 .class = &dra7xx_timer_1ms_hwmod_class,
1461 .clkdm_name = "l4per_clkdm",
1462 .main_clk = "timer2_gfclk_mux",
1463 .prcm = {
1464 .omap4 = {
1465 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER2_CLKCTRL_OFFSET,
1466 .context_offs = DRA7XX_RM_L4PER_TIMER2_CONTEXT_OFFSET,
1467 .modulemode = MODULEMODE_SWCTRL,
1468 },
1469 },
1470};
1471
1472/* timer3 */
1473static struct omap_hwmod dra7xx_timer3_hwmod = {
1474 .name = "timer3",
1475 .class = &dra7xx_timer_hwmod_class,
1476 .clkdm_name = "l4per_clkdm",
1477 .main_clk = "timer3_gfclk_mux",
1478 .prcm = {
1479 .omap4 = {
1480 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER3_CLKCTRL_OFFSET,
1481 .context_offs = DRA7XX_RM_L4PER_TIMER3_CONTEXT_OFFSET,
1482 .modulemode = MODULEMODE_SWCTRL,
1483 },
1484 },
1485};
1486
1487/* timer4 */
1488static struct omap_hwmod dra7xx_timer4_hwmod = {
1489 .name = "timer4",
1490 .class = &dra7xx_timer_secure_hwmod_class,
1491 .clkdm_name = "l4per_clkdm",
1492 .main_clk = "timer4_gfclk_mux",
1493 .prcm = {
1494 .omap4 = {
1495 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER4_CLKCTRL_OFFSET,
1496 .context_offs = DRA7XX_RM_L4PER_TIMER4_CONTEXT_OFFSET,
1497 .modulemode = MODULEMODE_SWCTRL,
1498 },
1499 },
1500};
1501
1502/* timer5 */
1503static struct omap_hwmod dra7xx_timer5_hwmod = {
1504 .name = "timer5",
1505 .class = &dra7xx_timer_hwmod_class,
1506 .clkdm_name = "ipu_clkdm",
1507 .main_clk = "timer5_gfclk_mux",
1508 .prcm = {
1509 .omap4 = {
1510 .clkctrl_offs = DRA7XX_CM_IPU_TIMER5_CLKCTRL_OFFSET,
1511 .context_offs = DRA7XX_RM_IPU_TIMER5_CONTEXT_OFFSET,
1512 .modulemode = MODULEMODE_SWCTRL,
1513 },
1514 },
1515};
1516
1517/* timer6 */
1518static struct omap_hwmod dra7xx_timer6_hwmod = {
1519 .name = "timer6",
1520 .class = &dra7xx_timer_hwmod_class,
1521 .clkdm_name = "ipu_clkdm",
1522 .main_clk = "timer6_gfclk_mux",
1523 .prcm = {
1524 .omap4 = {
1525 .clkctrl_offs = DRA7XX_CM_IPU_TIMER6_CLKCTRL_OFFSET,
1526 .context_offs = DRA7XX_RM_IPU_TIMER6_CONTEXT_OFFSET,
1527 .modulemode = MODULEMODE_SWCTRL,
1528 },
1529 },
1530};
1531
1532/* timer7 */
1533static struct omap_hwmod dra7xx_timer7_hwmod = {
1534 .name = "timer7",
1535 .class = &dra7xx_timer_hwmod_class,
1536 .clkdm_name = "ipu_clkdm",
1537 .main_clk = "timer7_gfclk_mux",
1538 .prcm = {
1539 .omap4 = {
1540 .clkctrl_offs = DRA7XX_CM_IPU_TIMER7_CLKCTRL_OFFSET,
1541 .context_offs = DRA7XX_RM_IPU_TIMER7_CONTEXT_OFFSET,
1542 .modulemode = MODULEMODE_SWCTRL,
1543 },
1544 },
1545};
1546
1547/* timer8 */
1548static struct omap_hwmod dra7xx_timer8_hwmod = {
1549 .name = "timer8",
1550 .class = &dra7xx_timer_hwmod_class,
1551 .clkdm_name = "ipu_clkdm",
1552 .main_clk = "timer8_gfclk_mux",
1553 .prcm = {
1554 .omap4 = {
1555 .clkctrl_offs = DRA7XX_CM_IPU_TIMER8_CLKCTRL_OFFSET,
1556 .context_offs = DRA7XX_RM_IPU_TIMER8_CONTEXT_OFFSET,
1557 .modulemode = MODULEMODE_SWCTRL,
1558 },
1559 },
1560};
1561
1562/* timer9 */
1563static struct omap_hwmod dra7xx_timer9_hwmod = {
1564 .name = "timer9",
1565 .class = &dra7xx_timer_hwmod_class,
1566 .clkdm_name = "l4per_clkdm",
1567 .main_clk = "timer9_gfclk_mux",
1568 .prcm = {
1569 .omap4 = {
1570 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER9_CLKCTRL_OFFSET,
1571 .context_offs = DRA7XX_RM_L4PER_TIMER9_CONTEXT_OFFSET,
1572 .modulemode = MODULEMODE_SWCTRL,
1573 },
1574 },
1575};
1576
1577/* timer10 */
1578static struct omap_hwmod dra7xx_timer10_hwmod = {
1579 .name = "timer10",
1580 .class = &dra7xx_timer_1ms_hwmod_class,
1581 .clkdm_name = "l4per_clkdm",
1582 .main_clk = "timer10_gfclk_mux",
1583 .prcm = {
1584 .omap4 = {
1585 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER10_CLKCTRL_OFFSET,
1586 .context_offs = DRA7XX_RM_L4PER_TIMER10_CONTEXT_OFFSET,
1587 .modulemode = MODULEMODE_SWCTRL,
1588 },
1589 },
1590};
1591
1592/* timer11 */
1593static struct omap_hwmod dra7xx_timer11_hwmod = {
1594 .name = "timer11",
1595 .class = &dra7xx_timer_hwmod_class,
1596 .clkdm_name = "l4per_clkdm",
1597 .main_clk = "timer11_gfclk_mux",
1598 .prcm = {
1599 .omap4 = {
1600 .clkctrl_offs = DRA7XX_CM_L4PER_TIMER11_CLKCTRL_OFFSET,
1601 .context_offs = DRA7XX_RM_L4PER_TIMER11_CONTEXT_OFFSET,
1602 .modulemode = MODULEMODE_SWCTRL,
1603 },
1604 },
1605};
1606
1607/*
1608 * 'uart' class
1609 *
1610 */
1611
1612static struct omap_hwmod_class_sysconfig dra7xx_uart_sysc = {
1613 .rev_offs = 0x0050,
1614 .sysc_offs = 0x0054,
1615 .syss_offs = 0x0058,
1616 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1617 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1618 SYSS_HAS_RESET_STATUS),
1619 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1620 SIDLE_SMART_WKUP),
1621 .sysc_fields = &omap_hwmod_sysc_type1,
1622};
1623
1624static struct omap_hwmod_class dra7xx_uart_hwmod_class = {
1625 .name = "uart",
1626 .sysc = &dra7xx_uart_sysc,
1627};
1628
1629/* uart1 */
1630static struct omap_hwmod dra7xx_uart1_hwmod = {
1631 .name = "uart1",
1632 .class = &dra7xx_uart_hwmod_class,
1633 .clkdm_name = "l4per_clkdm",
1634 .main_clk = "uart1_gfclk_mux",
38958c15 1635 .flags = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP2UART1_FLAGS,
90020c7b
A
1636 .prcm = {
1637 .omap4 = {
1638 .clkctrl_offs = DRA7XX_CM_L4PER_UART1_CLKCTRL_OFFSET,
1639 .context_offs = DRA7XX_RM_L4PER_UART1_CONTEXT_OFFSET,
1640 .modulemode = MODULEMODE_SWCTRL,
1641 },
1642 },
1643};
1644
1645/* uart2 */
1646static struct omap_hwmod dra7xx_uart2_hwmod = {
1647 .name = "uart2",
1648 .class = &dra7xx_uart_hwmod_class,
1649 .clkdm_name = "l4per_clkdm",
1650 .main_clk = "uart2_gfclk_mux",
1651 .flags = HWMOD_SWSUP_SIDLE_ACT,
1652 .prcm = {
1653 .omap4 = {
1654 .clkctrl_offs = DRA7XX_CM_L4PER_UART2_CLKCTRL_OFFSET,
1655 .context_offs = DRA7XX_RM_L4PER_UART2_CONTEXT_OFFSET,
1656 .modulemode = MODULEMODE_SWCTRL,
1657 },
1658 },
1659};
1660
1661/* uart3 */
1662static struct omap_hwmod dra7xx_uart3_hwmod = {
1663 .name = "uart3",
1664 .class = &dra7xx_uart_hwmod_class,
1665 .clkdm_name = "l4per_clkdm",
1666 .main_clk = "uart3_gfclk_mux",
1667 .flags = HWMOD_SWSUP_SIDLE_ACT,
1668 .prcm = {
1669 .omap4 = {
1670 .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
1671 .context_offs = DRA7XX_RM_L4PER_UART3_CONTEXT_OFFSET,
1672 .modulemode = MODULEMODE_SWCTRL,
1673 },
1674 },
1675};
1676
1677/* uart4 */
1678static struct omap_hwmod dra7xx_uart4_hwmod = {
1679 .name = "uart4",
1680 .class = &dra7xx_uart_hwmod_class,
1681 .clkdm_name = "l4per_clkdm",
1682 .main_clk = "uart4_gfclk_mux",
1683 .flags = HWMOD_SWSUP_SIDLE_ACT,
1684 .prcm = {
1685 .omap4 = {
1686 .clkctrl_offs = DRA7XX_CM_L4PER_UART4_CLKCTRL_OFFSET,
1687 .context_offs = DRA7XX_RM_L4PER_UART4_CONTEXT_OFFSET,
1688 .modulemode = MODULEMODE_SWCTRL,
1689 },
1690 },
1691};
1692
1693/* uart5 */
1694static struct omap_hwmod dra7xx_uart5_hwmod = {
1695 .name = "uart5",
1696 .class = &dra7xx_uart_hwmod_class,
1697 .clkdm_name = "l4per_clkdm",
1698 .main_clk = "uart5_gfclk_mux",
1699 .flags = HWMOD_SWSUP_SIDLE_ACT,
1700 .prcm = {
1701 .omap4 = {
1702 .clkctrl_offs = DRA7XX_CM_L4PER_UART5_CLKCTRL_OFFSET,
1703 .context_offs = DRA7XX_RM_L4PER_UART5_CONTEXT_OFFSET,
1704 .modulemode = MODULEMODE_SWCTRL,
1705 },
1706 },
1707};
1708
1709/* uart6 */
1710static struct omap_hwmod dra7xx_uart6_hwmod = {
1711 .name = "uart6",
1712 .class = &dra7xx_uart_hwmod_class,
1713 .clkdm_name = "ipu_clkdm",
1714 .main_clk = "uart6_gfclk_mux",
1715 .flags = HWMOD_SWSUP_SIDLE_ACT,
1716 .prcm = {
1717 .omap4 = {
1718 .clkctrl_offs = DRA7XX_CM_IPU_UART6_CLKCTRL_OFFSET,
1719 .context_offs = DRA7XX_RM_IPU_UART6_CONTEXT_OFFSET,
1720 .modulemode = MODULEMODE_SWCTRL,
1721 },
1722 },
1723};
1724
1725/*
1726 * 'usb_otg_ss' class
1727 *
1728 */
1729
1730static struct omap_hwmod_class dra7xx_usb_otg_ss_hwmod_class = {
1731 .name = "usb_otg_ss",
1732};
1733
1734/* usb_otg_ss1 */
1735static struct omap_hwmod_opt_clk usb_otg_ss1_opt_clks[] = {
1736 { .role = "refclk960m", .clk = "usb_otg_ss1_refclk960m" },
1737};
1738
1739static struct omap_hwmod dra7xx_usb_otg_ss1_hwmod = {
1740 .name = "usb_otg_ss1",
1741 .class = &dra7xx_usb_otg_ss_hwmod_class,
1742 .clkdm_name = "l3init_clkdm",
1743 .main_clk = "dpll_core_h13x2_ck",
1744 .prcm = {
1745 .omap4 = {
1746 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS1_CLKCTRL_OFFSET,
1747 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS1_CONTEXT_OFFSET,
1748 .modulemode = MODULEMODE_HWCTRL,
1749 },
1750 },
1751 .opt_clks = usb_otg_ss1_opt_clks,
1752 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss1_opt_clks),
1753};
1754
1755/* usb_otg_ss2 */
1756static struct omap_hwmod_opt_clk usb_otg_ss2_opt_clks[] = {
1757 { .role = "refclk960m", .clk = "usb_otg_ss2_refclk960m" },
1758};
1759
1760static struct omap_hwmod dra7xx_usb_otg_ss2_hwmod = {
1761 .name = "usb_otg_ss2",
1762 .class = &dra7xx_usb_otg_ss_hwmod_class,
1763 .clkdm_name = "l3init_clkdm",
1764 .main_clk = "dpll_core_h13x2_ck",
1765 .prcm = {
1766 .omap4 = {
1767 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS2_CLKCTRL_OFFSET,
1768 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS2_CONTEXT_OFFSET,
1769 .modulemode = MODULEMODE_HWCTRL,
1770 },
1771 },
1772 .opt_clks = usb_otg_ss2_opt_clks,
1773 .opt_clks_cnt = ARRAY_SIZE(usb_otg_ss2_opt_clks),
1774};
1775
1776/* usb_otg_ss3 */
1777static struct omap_hwmod dra7xx_usb_otg_ss3_hwmod = {
1778 .name = "usb_otg_ss3",
1779 .class = &dra7xx_usb_otg_ss_hwmod_class,
1780 .clkdm_name = "l3init_clkdm",
1781 .main_clk = "dpll_core_h13x2_ck",
1782 .prcm = {
1783 .omap4 = {
1784 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS3_CLKCTRL_OFFSET,
1785 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS3_CONTEXT_OFFSET,
1786 .modulemode = MODULEMODE_HWCTRL,
1787 },
1788 },
1789};
1790
1791/* usb_otg_ss4 */
1792static struct omap_hwmod dra7xx_usb_otg_ss4_hwmod = {
1793 .name = "usb_otg_ss4",
1794 .class = &dra7xx_usb_otg_ss_hwmod_class,
1795 .clkdm_name = "l3init_clkdm",
1796 .main_clk = "dpll_core_h13x2_ck",
1797 .prcm = {
1798 .omap4 = {
1799 .clkctrl_offs = DRA7XX_CM_L3INIT_USB_OTG_SS4_CLKCTRL_OFFSET,
1800 .context_offs = DRA7XX_RM_L3INIT_USB_OTG_SS4_CONTEXT_OFFSET,
1801 .modulemode = MODULEMODE_HWCTRL,
1802 },
1803 },
1804};
1805
1806/*
1807 * 'vcp' class
1808 *
1809 */
1810
1811static struct omap_hwmod_class dra7xx_vcp_hwmod_class = {
1812 .name = "vcp",
1813};
1814
1815/* vcp1 */
1816static struct omap_hwmod dra7xx_vcp1_hwmod = {
1817 .name = "vcp1",
1818 .class = &dra7xx_vcp_hwmod_class,
1819 .clkdm_name = "l3main1_clkdm",
1820 .main_clk = "l3_iclk_div",
1821 .prcm = {
1822 .omap4 = {
1823 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP1_CLKCTRL_OFFSET,
1824 .context_offs = DRA7XX_RM_L3MAIN1_VCP1_CONTEXT_OFFSET,
1825 },
1826 },
1827};
1828
1829/* vcp2 */
1830static struct omap_hwmod dra7xx_vcp2_hwmod = {
1831 .name = "vcp2",
1832 .class = &dra7xx_vcp_hwmod_class,
1833 .clkdm_name = "l3main1_clkdm",
1834 .main_clk = "l3_iclk_div",
1835 .prcm = {
1836 .omap4 = {
1837 .clkctrl_offs = DRA7XX_CM_L3MAIN1_VCP2_CLKCTRL_OFFSET,
1838 .context_offs = DRA7XX_RM_L3MAIN1_VCP2_CONTEXT_OFFSET,
1839 },
1840 },
1841};
1842
1843/*
1844 * 'wd_timer' class
1845 *
1846 */
1847
1848static struct omap_hwmod_class_sysconfig dra7xx_wd_timer_sysc = {
1849 .rev_offs = 0x0000,
1850 .sysc_offs = 0x0010,
1851 .syss_offs = 0x0014,
1852 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
1853 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1854 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1855 SIDLE_SMART_WKUP),
1856 .sysc_fields = &omap_hwmod_sysc_type1,
1857};
1858
1859static struct omap_hwmod_class dra7xx_wd_timer_hwmod_class = {
1860 .name = "wd_timer",
1861 .sysc = &dra7xx_wd_timer_sysc,
1862 .pre_shutdown = &omap2_wd_timer_disable,
1863 .reset = &omap2_wd_timer_reset,
1864};
1865
1866/* wd_timer2 */
1867static struct omap_hwmod dra7xx_wd_timer2_hwmod = {
1868 .name = "wd_timer2",
1869 .class = &dra7xx_wd_timer_hwmod_class,
1870 .clkdm_name = "wkupaon_clkdm",
1871 .main_clk = "sys_32k_ck",
1872 .prcm = {
1873 .omap4 = {
1874 .clkctrl_offs = DRA7XX_CM_WKUPAON_WD_TIMER2_CLKCTRL_OFFSET,
1875 .context_offs = DRA7XX_RM_WKUPAON_WD_TIMER2_CONTEXT_OFFSET,
1876 .modulemode = MODULEMODE_SWCTRL,
1877 },
1878 },
1879};
1880
1881
1882/*
1883 * Interfaces
1884 */
1885
1886/* l3_main_2 -> l3_instr */
1887static struct omap_hwmod_ocp_if dra7xx_l3_main_2__l3_instr = {
1888 .master = &dra7xx_l3_main_2_hwmod,
1889 .slave = &dra7xx_l3_instr_hwmod,
1890 .clk = "l3_iclk_div",
1891 .user = OCP_USER_MPU | OCP_USER_SDMA,
1892};
1893
1894/* l4_cfg -> l3_main_1 */
1895static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_1 = {
1896 .master = &dra7xx_l4_cfg_hwmod,
1897 .slave = &dra7xx_l3_main_1_hwmod,
1898 .clk = "l3_iclk_div",
1899 .user = OCP_USER_MPU | OCP_USER_SDMA,
1900};
1901
1902/* mpu -> l3_main_1 */
1903static struct omap_hwmod_ocp_if dra7xx_mpu__l3_main_1 = {
1904 .master = &dra7xx_mpu_hwmod,
1905 .slave = &dra7xx_l3_main_1_hwmod,
1906 .clk = "l3_iclk_div",
1907 .user = OCP_USER_MPU,
1908};
1909
1910/* l3_main_1 -> l3_main_2 */
1911static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l3_main_2 = {
1912 .master = &dra7xx_l3_main_1_hwmod,
1913 .slave = &dra7xx_l3_main_2_hwmod,
1914 .clk = "l3_iclk_div",
1915 .user = OCP_USER_MPU,
1916};
1917
1918/* l4_cfg -> l3_main_2 */
1919static struct omap_hwmod_ocp_if dra7xx_l4_cfg__l3_main_2 = {
1920 .master = &dra7xx_l4_cfg_hwmod,
1921 .slave = &dra7xx_l3_main_2_hwmod,
1922 .clk = "l3_iclk_div",
1923 .user = OCP_USER_MPU | OCP_USER_SDMA,
1924};
1925
1926/* l3_main_1 -> l4_cfg */
1927static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = {
1928 .master = &dra7xx_l3_main_1_hwmod,
1929 .slave = &dra7xx_l4_cfg_hwmod,
1930 .clk = "l3_iclk_div",
1931 .user = OCP_USER_MPU | OCP_USER_SDMA,
1932};
1933
1934/* l3_main_1 -> l4_per1 */
1935static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per1 = {
1936 .master = &dra7xx_l3_main_1_hwmod,
1937 .slave = &dra7xx_l4_per1_hwmod,
1938 .clk = "l3_iclk_div",
1939 .user = OCP_USER_MPU | OCP_USER_SDMA,
1940};
1941
1942/* l3_main_1 -> l4_per2 */
1943static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per2 = {
1944 .master = &dra7xx_l3_main_1_hwmod,
1945 .slave = &dra7xx_l4_per2_hwmod,
1946 .clk = "l3_iclk_div",
1947 .user = OCP_USER_MPU | OCP_USER_SDMA,
1948};
1949
1950/* l3_main_1 -> l4_per3 */
1951static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_per3 = {
1952 .master = &dra7xx_l3_main_1_hwmod,
1953 .slave = &dra7xx_l4_per3_hwmod,
1954 .clk = "l3_iclk_div",
1955 .user = OCP_USER_MPU | OCP_USER_SDMA,
1956};
1957
1958/* l3_main_1 -> l4_wkup */
1959static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_wkup = {
1960 .master = &dra7xx_l3_main_1_hwmod,
1961 .slave = &dra7xx_l4_wkup_hwmod,
1962 .clk = "wkupaon_iclk_mux",
1963 .user = OCP_USER_MPU | OCP_USER_SDMA,
1964};
1965
1966/* l4_per2 -> atl */
1967static struct omap_hwmod_ocp_if dra7xx_l4_per2__atl = {
1968 .master = &dra7xx_l4_per2_hwmod,
1969 .slave = &dra7xx_atl_hwmod,
1970 .clk = "l3_iclk_div",
1971 .user = OCP_USER_MPU | OCP_USER_SDMA,
1972};
1973
1974/* l3_main_1 -> bb2d */
1975static struct omap_hwmod_ocp_if dra7xx_l3_main_1__bb2d = {
1976 .master = &dra7xx_l3_main_1_hwmod,
1977 .slave = &dra7xx_bb2d_hwmod,
1978 .clk = "l3_iclk_div",
1979 .user = OCP_USER_MPU | OCP_USER_SDMA,
1980};
1981
1982/* l4_wkup -> counter_32k */
1983static struct omap_hwmod_ocp_if dra7xx_l4_wkup__counter_32k = {
1984 .master = &dra7xx_l4_wkup_hwmod,
1985 .slave = &dra7xx_counter_32k_hwmod,
1986 .clk = "wkupaon_iclk_mux",
1987 .user = OCP_USER_MPU | OCP_USER_SDMA,
1988};
1989
1990/* l4_wkup -> ctrl_module_wkup */
1991static struct omap_hwmod_ocp_if dra7xx_l4_wkup__ctrl_module_wkup = {
1992 .master = &dra7xx_l4_wkup_hwmod,
1993 .slave = &dra7xx_ctrl_module_wkup_hwmod,
1994 .clk = "wkupaon_iclk_mux",
1995 .user = OCP_USER_MPU | OCP_USER_SDMA,
1996};
1997
1998/* l4_wkup -> dcan1 */
1999static struct omap_hwmod_ocp_if dra7xx_l4_wkup__dcan1 = {
2000 .master = &dra7xx_l4_wkup_hwmod,
2001 .slave = &dra7xx_dcan1_hwmod,
2002 .clk = "wkupaon_iclk_mux",
2003 .user = OCP_USER_MPU | OCP_USER_SDMA,
2004};
2005
2006/* l4_per2 -> dcan2 */
2007static struct omap_hwmod_ocp_if dra7xx_l4_per2__dcan2 = {
2008 .master = &dra7xx_l4_per2_hwmod,
2009 .slave = &dra7xx_dcan2_hwmod,
2010 .clk = "l3_iclk_div",
2011 .user = OCP_USER_MPU | OCP_USER_SDMA,
2012};
2013
2014static struct omap_hwmod_addr_space dra7xx_dma_system_addrs[] = {
2015 {
2016 .pa_start = 0x4a056000,
2017 .pa_end = 0x4a056fff,
2018 .flags = ADDR_TYPE_RT
2019 },
2020 { }
2021};
2022
2023/* l4_cfg -> dma_system */
2024static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
2025 .master = &dra7xx_l4_cfg_hwmod,
2026 .slave = &dra7xx_dma_system_hwmod,
2027 .clk = "l3_iclk_div",
2028 .addr = dra7xx_dma_system_addrs,
2029 .user = OCP_USER_MPU | OCP_USER_SDMA,
2030};
2031
2032static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
2033 {
2034 .name = "family",
2035 .pa_start = 0x58000000,
2036 .pa_end = 0x5800007f,
2037 .flags = ADDR_TYPE_RT
2038 },
2039};
2040
2041/* l3_main_1 -> dss */
2042static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dss = {
2043 .master = &dra7xx_l3_main_1_hwmod,
2044 .slave = &dra7xx_dss_hwmod,
2045 .clk = "l3_iclk_div",
2046 .addr = dra7xx_dss_addrs,
2047 .user = OCP_USER_MPU | OCP_USER_SDMA,
2048};
2049
2050static struct omap_hwmod_addr_space dra7xx_dss_dispc_addrs[] = {
2051 {
2052 .name = "dispc",
2053 .pa_start = 0x58001000,
2054 .pa_end = 0x58001fff,
2055 .flags = ADDR_TYPE_RT
2056 },
2057};
2058
2059/* l3_main_1 -> dispc */
2060static struct omap_hwmod_ocp_if dra7xx_l3_main_1__dispc = {
2061 .master = &dra7xx_l3_main_1_hwmod,
2062 .slave = &dra7xx_dss_dispc_hwmod,
2063 .clk = "l3_iclk_div",
2064 .addr = dra7xx_dss_dispc_addrs,
2065 .user = OCP_USER_MPU | OCP_USER_SDMA,
2066};
2067
2068static struct omap_hwmod_addr_space dra7xx_dss_hdmi_addrs[] = {
2069 {
2070 .name = "hdmi_wp",
2071 .pa_start = 0x58040000,
2072 .pa_end = 0x580400ff,
2073 .flags = ADDR_TYPE_RT
2074 },
2075 { }
2076};
2077
2078/* l3_main_1 -> dispc */
2079static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2080 .master = &dra7xx_l3_main_1_hwmod,
2081 .slave = &dra7xx_dss_hdmi_hwmod,
2082 .clk = "l3_iclk_div",
2083 .addr = dra7xx_dss_hdmi_addrs,
2084 .user = OCP_USER_MPU | OCP_USER_SDMA,
2085};
2086
2087static struct omap_hwmod_addr_space dra7xx_elm_addrs[] = {
2088 {
2089 .pa_start = 0x48078000,
2090 .pa_end = 0x48078fff,
2091 .flags = ADDR_TYPE_RT
2092 },
2093 { }
2094};
2095
2096/* l4_per1 -> elm */
2097static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2098 .master = &dra7xx_l4_per1_hwmod,
2099 .slave = &dra7xx_elm_hwmod,
2100 .clk = "l3_iclk_div",
2101 .addr = dra7xx_elm_addrs,
2102 .user = OCP_USER_MPU | OCP_USER_SDMA,
2103};
2104
2105/* l4_wkup -> gpio1 */
2106static struct omap_hwmod_ocp_if dra7xx_l4_wkup__gpio1 = {
2107 .master = &dra7xx_l4_wkup_hwmod,
2108 .slave = &dra7xx_gpio1_hwmod,
2109 .clk = "wkupaon_iclk_mux",
2110 .user = OCP_USER_MPU | OCP_USER_SDMA,
2111};
2112
2113/* l4_per1 -> gpio2 */
2114static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio2 = {
2115 .master = &dra7xx_l4_per1_hwmod,
2116 .slave = &dra7xx_gpio2_hwmod,
2117 .clk = "l3_iclk_div",
2118 .user = OCP_USER_MPU | OCP_USER_SDMA,
2119};
2120
2121/* l4_per1 -> gpio3 */
2122static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio3 = {
2123 .master = &dra7xx_l4_per1_hwmod,
2124 .slave = &dra7xx_gpio3_hwmod,
2125 .clk = "l3_iclk_div",
2126 .user = OCP_USER_MPU | OCP_USER_SDMA,
2127};
2128
2129/* l4_per1 -> gpio4 */
2130static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio4 = {
2131 .master = &dra7xx_l4_per1_hwmod,
2132 .slave = &dra7xx_gpio4_hwmod,
2133 .clk = "l3_iclk_div",
2134 .user = OCP_USER_MPU | OCP_USER_SDMA,
2135};
2136
2137/* l4_per1 -> gpio5 */
2138static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio5 = {
2139 .master = &dra7xx_l4_per1_hwmod,
2140 .slave = &dra7xx_gpio5_hwmod,
2141 .clk = "l3_iclk_div",
2142 .user = OCP_USER_MPU | OCP_USER_SDMA,
2143};
2144
2145/* l4_per1 -> gpio6 */
2146static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio6 = {
2147 .master = &dra7xx_l4_per1_hwmod,
2148 .slave = &dra7xx_gpio6_hwmod,
2149 .clk = "l3_iclk_div",
2150 .user = OCP_USER_MPU | OCP_USER_SDMA,
2151};
2152
2153/* l4_per1 -> gpio7 */
2154static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio7 = {
2155 .master = &dra7xx_l4_per1_hwmod,
2156 .slave = &dra7xx_gpio7_hwmod,
2157 .clk = "l3_iclk_div",
2158 .user = OCP_USER_MPU | OCP_USER_SDMA,
2159};
2160
2161/* l4_per1 -> gpio8 */
2162static struct omap_hwmod_ocp_if dra7xx_l4_per1__gpio8 = {
2163 .master = &dra7xx_l4_per1_hwmod,
2164 .slave = &dra7xx_gpio8_hwmod,
2165 .clk = "l3_iclk_div",
2166 .user = OCP_USER_MPU | OCP_USER_SDMA,
2167};
2168
2169static struct omap_hwmod_addr_space dra7xx_gpmc_addrs[] = {
2170 {
2171 .pa_start = 0x50000000,
2172 .pa_end = 0x500003ff,
2173 .flags = ADDR_TYPE_RT
2174 },
2175 { }
2176};
2177
2178/* l3_main_1 -> gpmc */
2179static struct omap_hwmod_ocp_if dra7xx_l3_main_1__gpmc = {
2180 .master = &dra7xx_l3_main_1_hwmod,
2181 .slave = &dra7xx_gpmc_hwmod,
2182 .clk = "l3_iclk_div",
2183 .addr = dra7xx_gpmc_addrs,
2184 .user = OCP_USER_MPU | OCP_USER_SDMA,
2185};
2186
2187static struct omap_hwmod_addr_space dra7xx_hdq1w_addrs[] = {
2188 {
2189 .pa_start = 0x480b2000,
2190 .pa_end = 0x480b201f,
2191 .flags = ADDR_TYPE_RT
2192 },
2193 { }
2194};
2195
2196/* l4_per1 -> hdq1w */
2197static struct omap_hwmod_ocp_if dra7xx_l4_per1__hdq1w = {
2198 .master = &dra7xx_l4_per1_hwmod,
2199 .slave = &dra7xx_hdq1w_hwmod,
2200 .clk = "l3_iclk_div",
2201 .addr = dra7xx_hdq1w_addrs,
2202 .user = OCP_USER_MPU | OCP_USER_SDMA,
2203};
2204
2205/* l4_per1 -> i2c1 */
2206static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c1 = {
2207 .master = &dra7xx_l4_per1_hwmod,
2208 .slave = &dra7xx_i2c1_hwmod,
2209 .clk = "l3_iclk_div",
2210 .user = OCP_USER_MPU | OCP_USER_SDMA,
2211};
2212
2213/* l4_per1 -> i2c2 */
2214static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c2 = {
2215 .master = &dra7xx_l4_per1_hwmod,
2216 .slave = &dra7xx_i2c2_hwmod,
2217 .clk = "l3_iclk_div",
2218 .user = OCP_USER_MPU | OCP_USER_SDMA,
2219};
2220
2221/* l4_per1 -> i2c3 */
2222static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c3 = {
2223 .master = &dra7xx_l4_per1_hwmod,
2224 .slave = &dra7xx_i2c3_hwmod,
2225 .clk = "l3_iclk_div",
2226 .user = OCP_USER_MPU | OCP_USER_SDMA,
2227};
2228
2229/* l4_per1 -> i2c4 */
2230static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c4 = {
2231 .master = &dra7xx_l4_per1_hwmod,
2232 .slave = &dra7xx_i2c4_hwmod,
2233 .clk = "l3_iclk_div",
2234 .user = OCP_USER_MPU | OCP_USER_SDMA,
2235};
2236
2237/* l4_per1 -> i2c5 */
2238static struct omap_hwmod_ocp_if dra7xx_l4_per1__i2c5 = {
2239 .master = &dra7xx_l4_per1_hwmod,
2240 .slave = &dra7xx_i2c5_hwmod,
2241 .clk = "l3_iclk_div",
2242 .user = OCP_USER_MPU | OCP_USER_SDMA,
2243};
2244
2245/* l4_per1 -> mcspi1 */
2246static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi1 = {
2247 .master = &dra7xx_l4_per1_hwmod,
2248 .slave = &dra7xx_mcspi1_hwmod,
2249 .clk = "l3_iclk_div",
2250 .user = OCP_USER_MPU | OCP_USER_SDMA,
2251};
2252
2253/* l4_per1 -> mcspi2 */
2254static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi2 = {
2255 .master = &dra7xx_l4_per1_hwmod,
2256 .slave = &dra7xx_mcspi2_hwmod,
2257 .clk = "l3_iclk_div",
2258 .user = OCP_USER_MPU | OCP_USER_SDMA,
2259};
2260
2261/* l4_per1 -> mcspi3 */
2262static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi3 = {
2263 .master = &dra7xx_l4_per1_hwmod,
2264 .slave = &dra7xx_mcspi3_hwmod,
2265 .clk = "l3_iclk_div",
2266 .user = OCP_USER_MPU | OCP_USER_SDMA,
2267};
2268
2269/* l4_per1 -> mcspi4 */
2270static struct omap_hwmod_ocp_if dra7xx_l4_per1__mcspi4 = {
2271 .master = &dra7xx_l4_per1_hwmod,
2272 .slave = &dra7xx_mcspi4_hwmod,
2273 .clk = "l3_iclk_div",
2274 .user = OCP_USER_MPU | OCP_USER_SDMA,
2275};
2276
2277/* l4_per1 -> mmc1 */
2278static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc1 = {
2279 .master = &dra7xx_l4_per1_hwmod,
2280 .slave = &dra7xx_mmc1_hwmod,
2281 .clk = "l3_iclk_div",
2282 .user = OCP_USER_MPU | OCP_USER_SDMA,
2283};
2284
2285/* l4_per1 -> mmc2 */
2286static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc2 = {
2287 .master = &dra7xx_l4_per1_hwmod,
2288 .slave = &dra7xx_mmc2_hwmod,
2289 .clk = "l3_iclk_div",
2290 .user = OCP_USER_MPU | OCP_USER_SDMA,
2291};
2292
2293/* l4_per1 -> mmc3 */
2294static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc3 = {
2295 .master = &dra7xx_l4_per1_hwmod,
2296 .slave = &dra7xx_mmc3_hwmod,
2297 .clk = "l3_iclk_div",
2298 .user = OCP_USER_MPU | OCP_USER_SDMA,
2299};
2300
2301/* l4_per1 -> mmc4 */
2302static struct omap_hwmod_ocp_if dra7xx_l4_per1__mmc4 = {
2303 .master = &dra7xx_l4_per1_hwmod,
2304 .slave = &dra7xx_mmc4_hwmod,
2305 .clk = "l3_iclk_div",
2306 .user = OCP_USER_MPU | OCP_USER_SDMA,
2307};
2308
2309/* l4_cfg -> mpu */
2310static struct omap_hwmod_ocp_if dra7xx_l4_cfg__mpu = {
2311 .master = &dra7xx_l4_cfg_hwmod,
2312 .slave = &dra7xx_mpu_hwmod,
2313 .clk = "l3_iclk_div",
2314 .user = OCP_USER_MPU | OCP_USER_SDMA,
2315};
2316
90020c7b
A
2317/* l4_cfg -> ocp2scp1 */
2318static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp1 = {
2319 .master = &dra7xx_l4_cfg_hwmod,
2320 .slave = &dra7xx_ocp2scp1_hwmod,
2321 .clk = "l4_root_clk_div",
90020c7b
A
2322 .user = OCP_USER_MPU | OCP_USER_SDMA,
2323};
2324
2325static struct omap_hwmod_addr_space dra7xx_qspi_addrs[] = {
2326 {
2327 .pa_start = 0x4b300000,
2328 .pa_end = 0x4b30007f,
2329 .flags = ADDR_TYPE_RT
2330 },
2331 { }
2332};
2333
2334/* l3_main_1 -> qspi */
2335static struct omap_hwmod_ocp_if dra7xx_l3_main_1__qspi = {
2336 .master = &dra7xx_l3_main_1_hwmod,
2337 .slave = &dra7xx_qspi_hwmod,
2338 .clk = "l3_iclk_div",
2339 .addr = dra7xx_qspi_addrs,
2340 .user = OCP_USER_MPU | OCP_USER_SDMA,
2341};
2342
2343static struct omap_hwmod_addr_space dra7xx_sata_addrs[] = {
2344 {
2345 .name = "sysc",
2346 .pa_start = 0x4a141100,
2347 .pa_end = 0x4a141107,
2348 .flags = ADDR_TYPE_RT
2349 },
2350 { }
2351};
2352
2353/* l4_cfg -> sata */
2354static struct omap_hwmod_ocp_if dra7xx_l4_cfg__sata = {
2355 .master = &dra7xx_l4_cfg_hwmod,
2356 .slave = &dra7xx_sata_hwmod,
2357 .clk = "l3_iclk_div",
2358 .addr = dra7xx_sata_addrs,
2359 .user = OCP_USER_MPU | OCP_USER_SDMA,
2360};
2361
2362static struct omap_hwmod_addr_space dra7xx_smartreflex_core_addrs[] = {
2363 {
2364 .pa_start = 0x4a0dd000,
2365 .pa_end = 0x4a0dd07f,
2366 .flags = ADDR_TYPE_RT
2367 },
2368 { }
2369};
2370
2371/* l4_cfg -> smartreflex_core */
2372static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_core = {
2373 .master = &dra7xx_l4_cfg_hwmod,
2374 .slave = &dra7xx_smartreflex_core_hwmod,
2375 .clk = "l4_root_clk_div",
2376 .addr = dra7xx_smartreflex_core_addrs,
2377 .user = OCP_USER_MPU | OCP_USER_SDMA,
2378};
2379
2380static struct omap_hwmod_addr_space dra7xx_smartreflex_mpu_addrs[] = {
2381 {
2382 .pa_start = 0x4a0d9000,
2383 .pa_end = 0x4a0d907f,
2384 .flags = ADDR_TYPE_RT
2385 },
2386 { }
2387};
2388
2389/* l4_cfg -> smartreflex_mpu */
2390static struct omap_hwmod_ocp_if dra7xx_l4_cfg__smartreflex_mpu = {
2391 .master = &dra7xx_l4_cfg_hwmod,
2392 .slave = &dra7xx_smartreflex_mpu_hwmod,
2393 .clk = "l4_root_clk_div",
2394 .addr = dra7xx_smartreflex_mpu_addrs,
2395 .user = OCP_USER_MPU | OCP_USER_SDMA,
2396};
2397
2398static struct omap_hwmod_addr_space dra7xx_spinlock_addrs[] = {
2399 {
2400 .pa_start = 0x4a0f6000,
2401 .pa_end = 0x4a0f6fff,
2402 .flags = ADDR_TYPE_RT
2403 },
2404 { }
2405};
2406
2407/* l4_cfg -> spinlock */
2408static struct omap_hwmod_ocp_if dra7xx_l4_cfg__spinlock = {
2409 .master = &dra7xx_l4_cfg_hwmod,
2410 .slave = &dra7xx_spinlock_hwmod,
2411 .clk = "l3_iclk_div",
2412 .addr = dra7xx_spinlock_addrs,
2413 .user = OCP_USER_MPU | OCP_USER_SDMA,
2414};
2415
2416/* l4_wkup -> timer1 */
2417static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer1 = {
2418 .master = &dra7xx_l4_wkup_hwmod,
2419 .slave = &dra7xx_timer1_hwmod,
2420 .clk = "wkupaon_iclk_mux",
2421 .user = OCP_USER_MPU | OCP_USER_SDMA,
2422};
2423
2424/* l4_per1 -> timer2 */
2425static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer2 = {
2426 .master = &dra7xx_l4_per1_hwmod,
2427 .slave = &dra7xx_timer2_hwmod,
2428 .clk = "l3_iclk_div",
2429 .user = OCP_USER_MPU | OCP_USER_SDMA,
2430};
2431
2432/* l4_per1 -> timer3 */
2433static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer3 = {
2434 .master = &dra7xx_l4_per1_hwmod,
2435 .slave = &dra7xx_timer3_hwmod,
2436 .clk = "l3_iclk_div",
2437 .user = OCP_USER_MPU | OCP_USER_SDMA,
2438};
2439
2440/* l4_per1 -> timer4 */
2441static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer4 = {
2442 .master = &dra7xx_l4_per1_hwmod,
2443 .slave = &dra7xx_timer4_hwmod,
2444 .clk = "l3_iclk_div",
2445 .user = OCP_USER_MPU | OCP_USER_SDMA,
2446};
2447
2448/* l4_per3 -> timer5 */
2449static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer5 = {
2450 .master = &dra7xx_l4_per3_hwmod,
2451 .slave = &dra7xx_timer5_hwmod,
2452 .clk = "l3_iclk_div",
2453 .user = OCP_USER_MPU | OCP_USER_SDMA,
2454};
2455
2456/* l4_per3 -> timer6 */
2457static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer6 = {
2458 .master = &dra7xx_l4_per3_hwmod,
2459 .slave = &dra7xx_timer6_hwmod,
2460 .clk = "l3_iclk_div",
2461 .user = OCP_USER_MPU | OCP_USER_SDMA,
2462};
2463
2464/* l4_per3 -> timer7 */
2465static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer7 = {
2466 .master = &dra7xx_l4_per3_hwmod,
2467 .slave = &dra7xx_timer7_hwmod,
2468 .clk = "l3_iclk_div",
2469 .user = OCP_USER_MPU | OCP_USER_SDMA,
2470};
2471
2472/* l4_per3 -> timer8 */
2473static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer8 = {
2474 .master = &dra7xx_l4_per3_hwmod,
2475 .slave = &dra7xx_timer8_hwmod,
2476 .clk = "l3_iclk_div",
2477 .user = OCP_USER_MPU | OCP_USER_SDMA,
2478};
2479
2480/* l4_per1 -> timer9 */
2481static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer9 = {
2482 .master = &dra7xx_l4_per1_hwmod,
2483 .slave = &dra7xx_timer9_hwmod,
2484 .clk = "l3_iclk_div",
2485 .user = OCP_USER_MPU | OCP_USER_SDMA,
2486};
2487
2488/* l4_per1 -> timer10 */
2489static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer10 = {
2490 .master = &dra7xx_l4_per1_hwmod,
2491 .slave = &dra7xx_timer10_hwmod,
2492 .clk = "l3_iclk_div",
2493 .user = OCP_USER_MPU | OCP_USER_SDMA,
2494};
2495
2496/* l4_per1 -> timer11 */
2497static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
2498 .master = &dra7xx_l4_per1_hwmod,
2499 .slave = &dra7xx_timer11_hwmod,
2500 .clk = "l3_iclk_div",
2501 .user = OCP_USER_MPU | OCP_USER_SDMA,
2502};
2503
2504/* l4_per1 -> uart1 */
2505static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
2506 .master = &dra7xx_l4_per1_hwmod,
2507 .slave = &dra7xx_uart1_hwmod,
2508 .clk = "l3_iclk_div",
2509 .user = OCP_USER_MPU | OCP_USER_SDMA,
2510};
2511
2512/* l4_per1 -> uart2 */
2513static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart2 = {
2514 .master = &dra7xx_l4_per1_hwmod,
2515 .slave = &dra7xx_uart2_hwmod,
2516 .clk = "l3_iclk_div",
2517 .user = OCP_USER_MPU | OCP_USER_SDMA,
2518};
2519
2520/* l4_per1 -> uart3 */
2521static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart3 = {
2522 .master = &dra7xx_l4_per1_hwmod,
2523 .slave = &dra7xx_uart3_hwmod,
2524 .clk = "l3_iclk_div",
2525 .user = OCP_USER_MPU | OCP_USER_SDMA,
2526};
2527
2528/* l4_per1 -> uart4 */
2529static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart4 = {
2530 .master = &dra7xx_l4_per1_hwmod,
2531 .slave = &dra7xx_uart4_hwmod,
2532 .clk = "l3_iclk_div",
2533 .user = OCP_USER_MPU | OCP_USER_SDMA,
2534};
2535
2536/* l4_per1 -> uart5 */
2537static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart5 = {
2538 .master = &dra7xx_l4_per1_hwmod,
2539 .slave = &dra7xx_uart5_hwmod,
2540 .clk = "l3_iclk_div",
2541 .user = OCP_USER_MPU | OCP_USER_SDMA,
2542};
2543
2544/* l4_per1 -> uart6 */
2545static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = {
2546 .master = &dra7xx_l4_per1_hwmod,
2547 .slave = &dra7xx_uart6_hwmod,
2548 .clk = "l3_iclk_div",
2549 .user = OCP_USER_MPU | OCP_USER_SDMA,
2550};
2551
2552/* l4_per3 -> usb_otg_ss1 */
2553static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = {
2554 .master = &dra7xx_l4_per3_hwmod,
2555 .slave = &dra7xx_usb_otg_ss1_hwmod,
2556 .clk = "dpll_core_h13x2_ck",
2557 .user = OCP_USER_MPU | OCP_USER_SDMA,
2558};
2559
2560/* l4_per3 -> usb_otg_ss2 */
2561static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss2 = {
2562 .master = &dra7xx_l4_per3_hwmod,
2563 .slave = &dra7xx_usb_otg_ss2_hwmod,
2564 .clk = "dpll_core_h13x2_ck",
2565 .user = OCP_USER_MPU | OCP_USER_SDMA,
2566};
2567
2568/* l4_per3 -> usb_otg_ss3 */
2569static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss3 = {
2570 .master = &dra7xx_l4_per3_hwmod,
2571 .slave = &dra7xx_usb_otg_ss3_hwmod,
2572 .clk = "dpll_core_h13x2_ck",
2573 .user = OCP_USER_MPU | OCP_USER_SDMA,
2574};
2575
2576/* l4_per3 -> usb_otg_ss4 */
2577static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss4 = {
2578 .master = &dra7xx_l4_per3_hwmod,
2579 .slave = &dra7xx_usb_otg_ss4_hwmod,
2580 .clk = "dpll_core_h13x2_ck",
2581 .user = OCP_USER_MPU | OCP_USER_SDMA,
2582};
2583
2584/* l3_main_1 -> vcp1 */
2585static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp1 = {
2586 .master = &dra7xx_l3_main_1_hwmod,
2587 .slave = &dra7xx_vcp1_hwmod,
2588 .clk = "l3_iclk_div",
2589 .user = OCP_USER_MPU | OCP_USER_SDMA,
2590};
2591
2592/* l4_per2 -> vcp1 */
2593static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp1 = {
2594 .master = &dra7xx_l4_per2_hwmod,
2595 .slave = &dra7xx_vcp1_hwmod,
2596 .clk = "l3_iclk_div",
2597 .user = OCP_USER_MPU | OCP_USER_SDMA,
2598};
2599
2600/* l3_main_1 -> vcp2 */
2601static struct omap_hwmod_ocp_if dra7xx_l3_main_1__vcp2 = {
2602 .master = &dra7xx_l3_main_1_hwmod,
2603 .slave = &dra7xx_vcp2_hwmod,
2604 .clk = "l3_iclk_div",
2605 .user = OCP_USER_MPU | OCP_USER_SDMA,
2606};
2607
2608/* l4_per2 -> vcp2 */
2609static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = {
2610 .master = &dra7xx_l4_per2_hwmod,
2611 .slave = &dra7xx_vcp2_hwmod,
2612 .clk = "l3_iclk_div",
2613 .user = OCP_USER_MPU | OCP_USER_SDMA,
2614};
2615
2616/* l4_wkup -> wd_timer2 */
2617static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
2618 .master = &dra7xx_l4_wkup_hwmod,
2619 .slave = &dra7xx_wd_timer2_hwmod,
2620 .clk = "wkupaon_iclk_mux",
2621 .user = OCP_USER_MPU | OCP_USER_SDMA,
2622};
2623
2624static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
2625 &dra7xx_l3_main_2__l3_instr,
2626 &dra7xx_l4_cfg__l3_main_1,
2627 &dra7xx_mpu__l3_main_1,
2628 &dra7xx_l3_main_1__l3_main_2,
2629 &dra7xx_l4_cfg__l3_main_2,
2630 &dra7xx_l3_main_1__l4_cfg,
2631 &dra7xx_l3_main_1__l4_per1,
2632 &dra7xx_l3_main_1__l4_per2,
2633 &dra7xx_l3_main_1__l4_per3,
2634 &dra7xx_l3_main_1__l4_wkup,
2635 &dra7xx_l4_per2__atl,
2636 &dra7xx_l3_main_1__bb2d,
2637 &dra7xx_l4_wkup__counter_32k,
2638 &dra7xx_l4_wkup__ctrl_module_wkup,
2639 &dra7xx_l4_wkup__dcan1,
2640 &dra7xx_l4_per2__dcan2,
2641 &dra7xx_l4_cfg__dma_system,
2642 &dra7xx_l3_main_1__dss,
2643 &dra7xx_l3_main_1__dispc,
2644 &dra7xx_l3_main_1__hdmi,
2645 &dra7xx_l4_per1__elm,
2646 &dra7xx_l4_wkup__gpio1,
2647 &dra7xx_l4_per1__gpio2,
2648 &dra7xx_l4_per1__gpio3,
2649 &dra7xx_l4_per1__gpio4,
2650 &dra7xx_l4_per1__gpio5,
2651 &dra7xx_l4_per1__gpio6,
2652 &dra7xx_l4_per1__gpio7,
2653 &dra7xx_l4_per1__gpio8,
2654 &dra7xx_l3_main_1__gpmc,
2655 &dra7xx_l4_per1__hdq1w,
2656 &dra7xx_l4_per1__i2c1,
2657 &dra7xx_l4_per1__i2c2,
2658 &dra7xx_l4_per1__i2c3,
2659 &dra7xx_l4_per1__i2c4,
2660 &dra7xx_l4_per1__i2c5,
2661 &dra7xx_l4_per1__mcspi1,
2662 &dra7xx_l4_per1__mcspi2,
2663 &dra7xx_l4_per1__mcspi3,
2664 &dra7xx_l4_per1__mcspi4,
2665 &dra7xx_l4_per1__mmc1,
2666 &dra7xx_l4_per1__mmc2,
2667 &dra7xx_l4_per1__mmc3,
2668 &dra7xx_l4_per1__mmc4,
2669 &dra7xx_l4_cfg__mpu,
2670 &dra7xx_l4_cfg__ocp2scp1,
2671 &dra7xx_l3_main_1__qspi,
2672 &dra7xx_l4_cfg__sata,
2673 &dra7xx_l4_cfg__smartreflex_core,
2674 &dra7xx_l4_cfg__smartreflex_mpu,
2675 &dra7xx_l4_cfg__spinlock,
2676 &dra7xx_l4_wkup__timer1,
2677 &dra7xx_l4_per1__timer2,
2678 &dra7xx_l4_per1__timer3,
2679 &dra7xx_l4_per1__timer4,
2680 &dra7xx_l4_per3__timer5,
2681 &dra7xx_l4_per3__timer6,
2682 &dra7xx_l4_per3__timer7,
2683 &dra7xx_l4_per3__timer8,
2684 &dra7xx_l4_per1__timer9,
2685 &dra7xx_l4_per1__timer10,
2686 &dra7xx_l4_per1__timer11,
2687 &dra7xx_l4_per1__uart1,
2688 &dra7xx_l4_per1__uart2,
2689 &dra7xx_l4_per1__uart3,
2690 &dra7xx_l4_per1__uart4,
2691 &dra7xx_l4_per1__uart5,
2692 &dra7xx_l4_per1__uart6,
2693 &dra7xx_l4_per3__usb_otg_ss1,
2694 &dra7xx_l4_per3__usb_otg_ss2,
2695 &dra7xx_l4_per3__usb_otg_ss3,
2696 &dra7xx_l4_per3__usb_otg_ss4,
2697 &dra7xx_l3_main_1__vcp1,
2698 &dra7xx_l4_per2__vcp1,
2699 &dra7xx_l3_main_1__vcp2,
2700 &dra7xx_l4_per2__vcp2,
2701 &dra7xx_l4_wkup__wd_timer2,
2702 NULL,
2703};
2704
2705int __init dra7xx_hwmod_init(void)
2706{
2707 omap_hwmod_init();
2708 return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
2709}
This page took 0.165365 seconds and 5 git commands to generate.