blob: efc614de7f690832d9f8d28959f229a74712937e [file] [log] [blame]
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001/*
2 * Hardware modules present on the OMAP44xx chips
3 *
4 * Copyright (C) 2009-2010 Texas Instruments, Inc.
5 * Copyright (C) 2009-2010 Nokia Corporation
6 *
7 * Paul Walmsley
8 * Benoit Cousson
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#include <linux/io.h>
22
23#include <plat/omap_hwmod.h>
24#include <plat/cpu.h>
Benoit Cousson9780a9c2010-12-07 16:26:57 -080025#include <plat/gpio.h>
Benoit Cousson531ce0d2010-12-20 18:27:19 -080026#include <plat/dma.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020027
28#include "omap_hwmod_common_data.h"
29
Paul Walmsleyd198b512010-12-21 15:30:54 -070030#include "cm1_44xx.h"
31#include "cm2_44xx.h"
32#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020033#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070034#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020035
36/* Base offset for all OMAP4 interrupts external to MPUSS */
37#define OMAP44XX_IRQ_GIC_START 32
38
39/* Base offset for all OMAP4 dma requests */
40#define OMAP44XX_DMA_REQ_START 1
41
42/* Backward references (IPs with Bus Master capability) */
Benoit Cousson531ce0d2010-12-20 18:27:19 -080043static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020044static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070045static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020046static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070047static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020048static struct omap_hwmod omap44xx_l3_instr_hwmod;
49static struct omap_hwmod omap44xx_l3_main_1_hwmod;
50static struct omap_hwmod omap44xx_l3_main_2_hwmod;
51static struct omap_hwmod omap44xx_l3_main_3_hwmod;
52static struct omap_hwmod omap44xx_l4_abe_hwmod;
53static struct omap_hwmod omap44xx_l4_cfg_hwmod;
54static struct omap_hwmod omap44xx_l4_per_hwmod;
55static struct omap_hwmod omap44xx_l4_wkup_hwmod;
56static struct omap_hwmod omap44xx_mpu_hwmod;
57static struct omap_hwmod omap44xx_mpu_private_hwmod;
58
59/*
60 * Interconnects omap_hwmod structures
61 * hwmods that compose the global OMAP interconnect
62 */
63
64/*
65 * 'dmm' class
66 * instance(s): dmm
67 */
68static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
69 .name = "dmm",
70};
71
72/* dmm interface data */
73/* l3_main_1 -> dmm */
74static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
75 .master = &omap44xx_l3_main_1_hwmod,
76 .slave = &omap44xx_dmm_hwmod,
77 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070078 .user = OCP_USER_SDMA,
79};
80
81static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
82 {
83 .pa_start = 0x4e000000,
84 .pa_end = 0x4e0007ff,
85 .flags = ADDR_TYPE_RT
86 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +020087};
88
89/* mpu -> dmm */
90static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
91 .master = &omap44xx_mpu_hwmod,
92 .slave = &omap44xx_dmm_hwmod,
93 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070094 .addr = omap44xx_dmm_addrs,
95 .addr_cnt = ARRAY_SIZE(omap44xx_dmm_addrs),
96 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +020097};
98
99/* dmm slave ports */
100static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
101 &omap44xx_l3_main_1__dmm,
102 &omap44xx_mpu__dmm,
103};
104
105static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
106 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
107};
108
109static struct omap_hwmod omap44xx_dmm_hwmod = {
110 .name = "dmm",
111 .class = &omap44xx_dmm_hwmod_class,
112 .slaves = omap44xx_dmm_slaves,
113 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
114 .mpu_irqs = omap44xx_dmm_irqs,
115 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs),
116 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
117};
118
119/*
120 * 'emif_fw' class
121 * instance(s): emif_fw
122 */
123static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
124 .name = "emif_fw",
125};
126
127/* emif_fw interface data */
128/* dmm -> emif_fw */
129static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
130 .master = &omap44xx_dmm_hwmod,
131 .slave = &omap44xx_emif_fw_hwmod,
132 .clk = "l3_div_ck",
133 .user = OCP_USER_MPU | OCP_USER_SDMA,
134};
135
Benoit Cousson659fa822010-12-21 21:08:34 -0700136static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
137 {
138 .pa_start = 0x4a20c000,
139 .pa_end = 0x4a20c0ff,
140 .flags = ADDR_TYPE_RT
141 },
142};
143
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200144/* l4_cfg -> emif_fw */
145static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
146 .master = &omap44xx_l4_cfg_hwmod,
147 .slave = &omap44xx_emif_fw_hwmod,
148 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700149 .addr = omap44xx_emif_fw_addrs,
150 .addr_cnt = ARRAY_SIZE(omap44xx_emif_fw_addrs),
151 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200152};
153
154/* emif_fw slave ports */
155static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
156 &omap44xx_dmm__emif_fw,
157 &omap44xx_l4_cfg__emif_fw,
158};
159
160static struct omap_hwmod omap44xx_emif_fw_hwmod = {
161 .name = "emif_fw",
162 .class = &omap44xx_emif_fw_hwmod_class,
163 .slaves = omap44xx_emif_fw_slaves,
164 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
165 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
166};
167
168/*
169 * 'l3' class
170 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
171 */
172static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
173 .name = "l3",
174};
175
176/* l3_instr interface data */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700177/* iva -> l3_instr */
178static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
179 .master = &omap44xx_iva_hwmod,
180 .slave = &omap44xx_l3_instr_hwmod,
181 .clk = "l3_div_ck",
182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200185/* l3_main_3 -> l3_instr */
186static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
187 .master = &omap44xx_l3_main_3_hwmod,
188 .slave = &omap44xx_l3_instr_hwmod,
189 .clk = "l3_div_ck",
190 .user = OCP_USER_MPU | OCP_USER_SDMA,
191};
192
193/* l3_instr slave ports */
194static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700195 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200196 &omap44xx_l3_main_3__l3_instr,
197};
198
199static struct omap_hwmod omap44xx_l3_instr_hwmod = {
200 .name = "l3_instr",
201 .class = &omap44xx_l3_hwmod_class,
202 .slaves = omap44xx_l3_instr_slaves,
203 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
204 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
205};
206
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700207/* l3_main_1 interface data */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700208/* dsp -> l3_main_1 */
209static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
210 .master = &omap44xx_dsp_hwmod,
211 .slave = &omap44xx_l3_main_1_hwmod,
212 .clk = "l3_div_ck",
213 .user = OCP_USER_MPU | OCP_USER_SDMA,
214};
215
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200216/* l3_main_2 -> l3_main_1 */
217static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
218 .master = &omap44xx_l3_main_2_hwmod,
219 .slave = &omap44xx_l3_main_1_hwmod,
220 .clk = "l3_div_ck",
221 .user = OCP_USER_MPU | OCP_USER_SDMA,
222};
223
224/* l4_cfg -> l3_main_1 */
225static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
226 .master = &omap44xx_l4_cfg_hwmod,
227 .slave = &omap44xx_l3_main_1_hwmod,
228 .clk = "l4_div_ck",
229 .user = OCP_USER_MPU | OCP_USER_SDMA,
230};
231
232/* mpu -> l3_main_1 */
233static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
234 .master = &omap44xx_mpu_hwmod,
235 .slave = &omap44xx_l3_main_1_hwmod,
236 .clk = "l3_div_ck",
237 .user = OCP_USER_MPU | OCP_USER_SDMA,
238};
239
240/* l3_main_1 slave ports */
241static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700242 &omap44xx_dsp__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200243 &omap44xx_l3_main_2__l3_main_1,
244 &omap44xx_l4_cfg__l3_main_1,
245 &omap44xx_mpu__l3_main_1,
246};
247
248static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
249 .name = "l3_main_1",
250 .class = &omap44xx_l3_hwmod_class,
251 .slaves = omap44xx_l3_main_1_slaves,
252 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
253 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
254};
255
256/* l3_main_2 interface data */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700257/* iva -> l3_main_2 */
258static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
259 .master = &omap44xx_iva_hwmod,
260 .slave = &omap44xx_l3_main_2_hwmod,
261 .clk = "l3_div_ck",
262 .user = OCP_USER_MPU | OCP_USER_SDMA,
263};
264
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200265/* l3_main_1 -> l3_main_2 */
266static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
267 .master = &omap44xx_l3_main_1_hwmod,
268 .slave = &omap44xx_l3_main_2_hwmod,
269 .clk = "l3_div_ck",
270 .user = OCP_USER_MPU | OCP_USER_SDMA,
271};
272
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800273/* dma_system -> l3_main_2 */
274static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
275 .master = &omap44xx_dma_system_hwmod,
276 .slave = &omap44xx_l3_main_2_hwmod,
277 .clk = "l3_div_ck",
278 .user = OCP_USER_MPU | OCP_USER_SDMA,
279};
280
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200281/* l4_cfg -> l3_main_2 */
282static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
283 .master = &omap44xx_l4_cfg_hwmod,
284 .slave = &omap44xx_l3_main_2_hwmod,
285 .clk = "l4_div_ck",
286 .user = OCP_USER_MPU | OCP_USER_SDMA,
287};
288
289/* l3_main_2 slave ports */
290static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800291 &omap44xx_dma_system__l3_main_2,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700292 &omap44xx_iva__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200293 &omap44xx_l3_main_1__l3_main_2,
294 &omap44xx_l4_cfg__l3_main_2,
295};
296
297static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
298 .name = "l3_main_2",
299 .class = &omap44xx_l3_hwmod_class,
300 .slaves = omap44xx_l3_main_2_slaves,
301 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
302 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
303};
304
305/* l3_main_3 interface data */
306/* l3_main_1 -> l3_main_3 */
307static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
308 .master = &omap44xx_l3_main_1_hwmod,
309 .slave = &omap44xx_l3_main_3_hwmod,
310 .clk = "l3_div_ck",
311 .user = OCP_USER_MPU | OCP_USER_SDMA,
312};
313
314/* l3_main_2 -> l3_main_3 */
315static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
316 .master = &omap44xx_l3_main_2_hwmod,
317 .slave = &omap44xx_l3_main_3_hwmod,
318 .clk = "l3_div_ck",
319 .user = OCP_USER_MPU | OCP_USER_SDMA,
320};
321
322/* l4_cfg -> l3_main_3 */
323static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
324 .master = &omap44xx_l4_cfg_hwmod,
325 .slave = &omap44xx_l3_main_3_hwmod,
326 .clk = "l4_div_ck",
327 .user = OCP_USER_MPU | OCP_USER_SDMA,
328};
329
330/* l3_main_3 slave ports */
331static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
332 &omap44xx_l3_main_1__l3_main_3,
333 &omap44xx_l3_main_2__l3_main_3,
334 &omap44xx_l4_cfg__l3_main_3,
335};
336
337static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
338 .name = "l3_main_3",
339 .class = &omap44xx_l3_hwmod_class,
340 .slaves = omap44xx_l3_main_3_slaves,
341 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
342 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
343};
344
345/*
346 * 'l4' class
347 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
348 */
349static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
350 .name = "l4",
351};
352
353/* l4_abe interface data */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700354/* dsp -> l4_abe */
355static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
356 .master = &omap44xx_dsp_hwmod,
357 .slave = &omap44xx_l4_abe_hwmod,
358 .clk = "ocp_abe_iclk",
359 .user = OCP_USER_MPU | OCP_USER_SDMA,
360};
361
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200362/* l3_main_1 -> l4_abe */
363static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
364 .master = &omap44xx_l3_main_1_hwmod,
365 .slave = &omap44xx_l4_abe_hwmod,
366 .clk = "l3_div_ck",
367 .user = OCP_USER_MPU | OCP_USER_SDMA,
368};
369
370/* mpu -> l4_abe */
371static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
372 .master = &omap44xx_mpu_hwmod,
373 .slave = &omap44xx_l4_abe_hwmod,
374 .clk = "ocp_abe_iclk",
375 .user = OCP_USER_MPU | OCP_USER_SDMA,
376};
377
378/* l4_abe slave ports */
379static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700380 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200381 &omap44xx_l3_main_1__l4_abe,
382 &omap44xx_mpu__l4_abe,
383};
384
385static struct omap_hwmod omap44xx_l4_abe_hwmod = {
386 .name = "l4_abe",
387 .class = &omap44xx_l4_hwmod_class,
388 .slaves = omap44xx_l4_abe_slaves,
389 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
390 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
391};
392
393/* l4_cfg interface data */
394/* l3_main_1 -> l4_cfg */
395static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
396 .master = &omap44xx_l3_main_1_hwmod,
397 .slave = &omap44xx_l4_cfg_hwmod,
398 .clk = "l3_div_ck",
399 .user = OCP_USER_MPU | OCP_USER_SDMA,
400};
401
402/* l4_cfg slave ports */
403static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
404 &omap44xx_l3_main_1__l4_cfg,
405};
406
407static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
408 .name = "l4_cfg",
409 .class = &omap44xx_l4_hwmod_class,
410 .slaves = omap44xx_l4_cfg_slaves,
411 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
412 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
413};
414
415/* l4_per interface data */
416/* l3_main_2 -> l4_per */
417static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
418 .master = &omap44xx_l3_main_2_hwmod,
419 .slave = &omap44xx_l4_per_hwmod,
420 .clk = "l3_div_ck",
421 .user = OCP_USER_MPU | OCP_USER_SDMA,
422};
423
424/* l4_per slave ports */
425static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
426 &omap44xx_l3_main_2__l4_per,
427};
428
429static struct omap_hwmod omap44xx_l4_per_hwmod = {
430 .name = "l4_per",
431 .class = &omap44xx_l4_hwmod_class,
432 .slaves = omap44xx_l4_per_slaves,
433 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
434 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
435};
436
437/* l4_wkup interface data */
438/* l4_cfg -> l4_wkup */
439static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
440 .master = &omap44xx_l4_cfg_hwmod,
441 .slave = &omap44xx_l4_wkup_hwmod,
442 .clk = "l4_div_ck",
443 .user = OCP_USER_MPU | OCP_USER_SDMA,
444};
445
446/* l4_wkup slave ports */
447static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
448 &omap44xx_l4_cfg__l4_wkup,
449};
450
451static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
452 .name = "l4_wkup",
453 .class = &omap44xx_l4_hwmod_class,
454 .slaves = omap44xx_l4_wkup_slaves,
455 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
456 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
457};
458
459/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700460 * 'mpu_bus' class
461 * instance(s): mpu_private
462 */
463static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
464 .name = "mpu_bus",
465};
466
467/* mpu_private interface data */
468/* mpu -> mpu_private */
469static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
470 .master = &omap44xx_mpu_hwmod,
471 .slave = &omap44xx_mpu_private_hwmod,
472 .clk = "l3_div_ck",
473 .user = OCP_USER_MPU | OCP_USER_SDMA,
474};
475
476/* mpu_private slave ports */
477static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
478 &omap44xx_mpu__mpu_private,
479};
480
481static struct omap_hwmod omap44xx_mpu_private_hwmod = {
482 .name = "mpu_private",
483 .class = &omap44xx_mpu_bus_hwmod_class,
484 .slaves = omap44xx_mpu_private_slaves,
485 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
486 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
487};
488
489/*
490 * Modules omap_hwmod structures
491 *
492 * The following IPs are excluded for the moment because:
493 * - They do not need an explicit SW control using omap_hwmod API.
494 * - They still need to be validated with the driver
495 * properly adapted to omap_hwmod / omap_device
496 *
497 * aess
498 * bandgap
499 * c2c
500 * c2c_target_fw
501 * cm_core
502 * cm_core_aon
503 * counter_32k
504 * ctrl_module_core
505 * ctrl_module_pad_core
506 * ctrl_module_pad_wkup
507 * ctrl_module_wkup
508 * debugss
509 * dma_system
510 * dmic
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700511 * dss
512 * dss_dispc
513 * dss_dsi1
514 * dss_dsi2
515 * dss_hdmi
516 * dss_rfbi
517 * dss_venc
518 * efuse_ctrl_cust
519 * efuse_ctrl_std
520 * elm
521 * emif1
522 * emif2
523 * fdif
524 * gpmc
525 * gpu
526 * hdq1w
527 * hsi
528 * ipu
529 * iss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700530 * kbd
531 * mailbox
532 * mcasp
533 * mcbsp1
534 * mcbsp2
535 * mcbsp3
536 * mcbsp4
537 * mcpdm
538 * mcspi1
539 * mcspi2
540 * mcspi3
541 * mcspi4
542 * mmc1
543 * mmc2
544 * mmc3
545 * mmc4
546 * mmc5
547 * mpu_c0
548 * mpu_c1
549 * ocmc_ram
550 * ocp2scp_usb_phy
551 * ocp_wp_noc
552 * prcm
553 * prcm_mpu
554 * prm
555 * scrm
556 * sl2if
557 * slimbus1
558 * slimbus2
559 * smartreflex_core
560 * smartreflex_iva
561 * smartreflex_mpu
562 * spinlock
563 * timer1
564 * timer10
565 * timer11
566 * timer2
567 * timer3
568 * timer4
569 * timer5
570 * timer6
571 * timer7
572 * timer8
573 * timer9
574 * usb_host_fs
575 * usb_host_hs
576 * usb_otg_hs
577 * usb_phy_cm
578 * usb_tll_hs
579 * usim
580 */
581
582/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700583 * 'dsp' class
584 * dsp sub-system
585 */
586
587static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
588 .name = "dsp",
589};
590
591/* dsp */
592static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
593 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
594};
595
596static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
597 { .name = "mmu_cache", .rst_shift = 1 },
598};
599
600static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
601 { .name = "dsp", .rst_shift = 0 },
602};
603
604/* dsp -> iva */
605static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
606 .master = &omap44xx_dsp_hwmod,
607 .slave = &omap44xx_iva_hwmod,
608 .clk = "dpll_iva_m5x2_ck",
609};
610
611/* dsp master ports */
612static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
613 &omap44xx_dsp__l3_main_1,
614 &omap44xx_dsp__l4_abe,
615 &omap44xx_dsp__iva,
616};
617
618/* l4_cfg -> dsp */
619static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
620 .master = &omap44xx_l4_cfg_hwmod,
621 .slave = &omap44xx_dsp_hwmod,
622 .clk = "l4_div_ck",
623 .user = OCP_USER_MPU | OCP_USER_SDMA,
624};
625
626/* dsp slave ports */
627static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
628 &omap44xx_l4_cfg__dsp,
629};
630
631/* Pseudo hwmod for reset control purpose only */
632static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
633 .name = "dsp_c0",
634 .class = &omap44xx_dsp_hwmod_class,
635 .flags = HWMOD_INIT_NO_RESET,
636 .rst_lines = omap44xx_dsp_c0_resets,
637 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
638 .prcm = {
639 .omap4 = {
640 .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL,
641 },
642 },
643 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
644};
645
646static struct omap_hwmod omap44xx_dsp_hwmod = {
647 .name = "dsp",
648 .class = &omap44xx_dsp_hwmod_class,
649 .mpu_irqs = omap44xx_dsp_irqs,
650 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dsp_irqs),
651 .rst_lines = omap44xx_dsp_resets,
652 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
653 .main_clk = "dsp_fck",
654 .prcm = {
655 .omap4 = {
656 .clkctrl_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
657 .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL,
658 },
659 },
660 .slaves = omap44xx_dsp_slaves,
661 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
662 .masters = omap44xx_dsp_masters,
663 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
664 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
665};
666
667/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700668 * 'gpio' class
669 * general purpose io module
670 */
671
672static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
673 .rev_offs = 0x0000,
674 .sysc_offs = 0x0010,
675 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -0700676 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
677 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
678 SYSS_HAS_RESET_STATUS),
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700679 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
680 .sysc_fields = &omap_hwmod_sysc_type1,
681};
682
683static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
684 .name = "gpio",
685 .sysc = &omap44xx_gpio_sysc,
686 .rev = 2,
687};
688
689/* gpio dev_attr */
690static struct omap_gpio_dev_attr gpio_dev_attr = {
691 .bank_width = 32,
692 .dbck_flag = true,
693};
694
695/* gpio1 */
696static struct omap_hwmod omap44xx_gpio1_hwmod;
697static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
698 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
699};
700
701static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
702 {
703 .pa_start = 0x4a310000,
704 .pa_end = 0x4a3101ff,
705 .flags = ADDR_TYPE_RT
706 },
707};
708
709/* l4_wkup -> gpio1 */
710static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
711 .master = &omap44xx_l4_wkup_hwmod,
712 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700713 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700714 .addr = omap44xx_gpio1_addrs,
715 .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs),
716 .user = OCP_USER_MPU | OCP_USER_SDMA,
717};
718
719/* gpio1 slave ports */
720static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
721 &omap44xx_l4_wkup__gpio1,
722};
723
724static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -0700725 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700726};
727
728static struct omap_hwmod omap44xx_gpio1_hwmod = {
729 .name = "gpio1",
730 .class = &omap44xx_gpio_hwmod_class,
731 .mpu_irqs = omap44xx_gpio1_irqs,
732 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs),
733 .main_clk = "gpio1_ick",
734 .prcm = {
735 .omap4 = {
736 .clkctrl_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
737 },
738 },
739 .opt_clks = gpio1_opt_clks,
740 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
741 .dev_attr = &gpio_dev_attr,
742 .slaves = omap44xx_gpio1_slaves,
743 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
744 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
745};
746
747/* gpio2 */
748static struct omap_hwmod omap44xx_gpio2_hwmod;
749static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
750 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
751};
752
753static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
754 {
755 .pa_start = 0x48055000,
756 .pa_end = 0x480551ff,
757 .flags = ADDR_TYPE_RT
758 },
759};
760
761/* l4_per -> gpio2 */
762static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
763 .master = &omap44xx_l4_per_hwmod,
764 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700765 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700766 .addr = omap44xx_gpio2_addrs,
767 .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs),
768 .user = OCP_USER_MPU | OCP_USER_SDMA,
769};
770
771/* gpio2 slave ports */
772static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
773 &omap44xx_l4_per__gpio2,
774};
775
776static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -0700777 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700778};
779
780static struct omap_hwmod omap44xx_gpio2_hwmod = {
781 .name = "gpio2",
782 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700783 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700784 .mpu_irqs = omap44xx_gpio2_irqs,
785 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs),
786 .main_clk = "gpio2_ick",
787 .prcm = {
788 .omap4 = {
789 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
790 },
791 },
792 .opt_clks = gpio2_opt_clks,
793 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
794 .dev_attr = &gpio_dev_attr,
795 .slaves = omap44xx_gpio2_slaves,
796 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
797 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
798};
799
800/* gpio3 */
801static struct omap_hwmod omap44xx_gpio3_hwmod;
802static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
803 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
804};
805
806static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
807 {
808 .pa_start = 0x48057000,
809 .pa_end = 0x480571ff,
810 .flags = ADDR_TYPE_RT
811 },
812};
813
814/* l4_per -> gpio3 */
815static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
816 .master = &omap44xx_l4_per_hwmod,
817 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700818 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700819 .addr = omap44xx_gpio3_addrs,
820 .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs),
821 .user = OCP_USER_MPU | OCP_USER_SDMA,
822};
823
824/* gpio3 slave ports */
825static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
826 &omap44xx_l4_per__gpio3,
827};
828
829static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -0700830 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700831};
832
833static struct omap_hwmod omap44xx_gpio3_hwmod = {
834 .name = "gpio3",
835 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700836 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700837 .mpu_irqs = omap44xx_gpio3_irqs,
838 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs),
839 .main_clk = "gpio3_ick",
840 .prcm = {
841 .omap4 = {
842 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
843 },
844 },
845 .opt_clks = gpio3_opt_clks,
846 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
847 .dev_attr = &gpio_dev_attr,
848 .slaves = omap44xx_gpio3_slaves,
849 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
850 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
851};
852
853/* gpio4 */
854static struct omap_hwmod omap44xx_gpio4_hwmod;
855static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
856 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
857};
858
859static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
860 {
861 .pa_start = 0x48059000,
862 .pa_end = 0x480591ff,
863 .flags = ADDR_TYPE_RT
864 },
865};
866
867/* l4_per -> gpio4 */
868static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
869 .master = &omap44xx_l4_per_hwmod,
870 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700871 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700872 .addr = omap44xx_gpio4_addrs,
873 .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs),
874 .user = OCP_USER_MPU | OCP_USER_SDMA,
875};
876
877/* gpio4 slave ports */
878static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
879 &omap44xx_l4_per__gpio4,
880};
881
882static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -0700883 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700884};
885
886static struct omap_hwmod omap44xx_gpio4_hwmod = {
887 .name = "gpio4",
888 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700889 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700890 .mpu_irqs = omap44xx_gpio4_irqs,
891 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs),
892 .main_clk = "gpio4_ick",
893 .prcm = {
894 .omap4 = {
895 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
896 },
897 },
898 .opt_clks = gpio4_opt_clks,
899 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
900 .dev_attr = &gpio_dev_attr,
901 .slaves = omap44xx_gpio4_slaves,
902 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
903 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
904};
905
906/* gpio5 */
907static struct omap_hwmod omap44xx_gpio5_hwmod;
908static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
909 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
910};
911
912static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
913 {
914 .pa_start = 0x4805b000,
915 .pa_end = 0x4805b1ff,
916 .flags = ADDR_TYPE_RT
917 },
918};
919
920/* l4_per -> gpio5 */
921static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
922 .master = &omap44xx_l4_per_hwmod,
923 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700924 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700925 .addr = omap44xx_gpio5_addrs,
926 .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs),
927 .user = OCP_USER_MPU | OCP_USER_SDMA,
928};
929
930/* gpio5 slave ports */
931static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
932 &omap44xx_l4_per__gpio5,
933};
934
935static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -0700936 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700937};
938
939static struct omap_hwmod omap44xx_gpio5_hwmod = {
940 .name = "gpio5",
941 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700942 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700943 .mpu_irqs = omap44xx_gpio5_irqs,
944 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs),
945 .main_clk = "gpio5_ick",
946 .prcm = {
947 .omap4 = {
948 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
949 },
950 },
951 .opt_clks = gpio5_opt_clks,
952 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
953 .dev_attr = &gpio_dev_attr,
954 .slaves = omap44xx_gpio5_slaves,
955 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
956 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
957};
958
959/* gpio6 */
960static struct omap_hwmod omap44xx_gpio6_hwmod;
961static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
962 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
963};
964
965static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
966 {
967 .pa_start = 0x4805d000,
968 .pa_end = 0x4805d1ff,
969 .flags = ADDR_TYPE_RT
970 },
971};
972
973/* l4_per -> gpio6 */
974static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
975 .master = &omap44xx_l4_per_hwmod,
976 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700977 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700978 .addr = omap44xx_gpio6_addrs,
979 .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs),
980 .user = OCP_USER_MPU | OCP_USER_SDMA,
981};
982
983/* gpio6 slave ports */
984static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
985 &omap44xx_l4_per__gpio6,
986};
987
988static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -0700989 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700990};
991
992static struct omap_hwmod omap44xx_gpio6_hwmod = {
993 .name = "gpio6",
994 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -0700995 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700996 .mpu_irqs = omap44xx_gpio6_irqs,
997 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs),
998 .main_clk = "gpio6_ick",
999 .prcm = {
1000 .omap4 = {
1001 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
1002 },
1003 },
1004 .opt_clks = gpio6_opt_clks,
1005 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1006 .dev_attr = &gpio_dev_attr,
1007 .slaves = omap44xx_gpio6_slaves,
1008 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
1009 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1010};
1011
1012/*
Benoit Coussonf7764712010-09-21 19:37:14 +05301013 * 'i2c' class
1014 * multimaster high-speed i2c controller
1015 */
1016
1017static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
1018 .sysc_offs = 0x0010,
1019 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001020 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1021 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001022 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Coussonf7764712010-09-21 19:37:14 +05301023 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1024 .sysc_fields = &omap_hwmod_sysc_type1,
1025};
1026
1027static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
1028 .name = "i2c",
1029 .sysc = &omap44xx_i2c_sysc,
1030};
1031
1032/* i2c1 */
1033static struct omap_hwmod omap44xx_i2c1_hwmod;
1034static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
1035 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
1036};
1037
1038static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
1039 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
1040 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
1041};
1042
1043static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
1044 {
1045 .pa_start = 0x48070000,
1046 .pa_end = 0x480700ff,
1047 .flags = ADDR_TYPE_RT
1048 },
1049};
1050
1051/* l4_per -> i2c1 */
1052static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
1053 .master = &omap44xx_l4_per_hwmod,
1054 .slave = &omap44xx_i2c1_hwmod,
1055 .clk = "l4_div_ck",
1056 .addr = omap44xx_i2c1_addrs,
1057 .addr_cnt = ARRAY_SIZE(omap44xx_i2c1_addrs),
1058 .user = OCP_USER_MPU | OCP_USER_SDMA,
1059};
1060
1061/* i2c1 slave ports */
1062static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
1063 &omap44xx_l4_per__i2c1,
1064};
1065
1066static struct omap_hwmod omap44xx_i2c1_hwmod = {
1067 .name = "i2c1",
1068 .class = &omap44xx_i2c_hwmod_class,
1069 .flags = HWMOD_INIT_NO_RESET,
1070 .mpu_irqs = omap44xx_i2c1_irqs,
1071 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c1_irqs),
1072 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
1073 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs),
1074 .main_clk = "i2c1_fck",
1075 .prcm = {
1076 .omap4 = {
1077 .clkctrl_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
1078 },
1079 },
1080 .slaves = omap44xx_i2c1_slaves,
1081 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
1082 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1083};
1084
1085/* i2c2 */
1086static struct omap_hwmod omap44xx_i2c2_hwmod;
1087static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
1088 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
1089};
1090
1091static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
1092 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
1093 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
1094};
1095
1096static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
1097 {
1098 .pa_start = 0x48072000,
1099 .pa_end = 0x480720ff,
1100 .flags = ADDR_TYPE_RT
1101 },
1102};
1103
1104/* l4_per -> i2c2 */
1105static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
1106 .master = &omap44xx_l4_per_hwmod,
1107 .slave = &omap44xx_i2c2_hwmod,
1108 .clk = "l4_div_ck",
1109 .addr = omap44xx_i2c2_addrs,
1110 .addr_cnt = ARRAY_SIZE(omap44xx_i2c2_addrs),
1111 .user = OCP_USER_MPU | OCP_USER_SDMA,
1112};
1113
1114/* i2c2 slave ports */
1115static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
1116 &omap44xx_l4_per__i2c2,
1117};
1118
1119static struct omap_hwmod omap44xx_i2c2_hwmod = {
1120 .name = "i2c2",
1121 .class = &omap44xx_i2c_hwmod_class,
1122 .flags = HWMOD_INIT_NO_RESET,
1123 .mpu_irqs = omap44xx_i2c2_irqs,
1124 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c2_irqs),
1125 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
1126 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs),
1127 .main_clk = "i2c2_fck",
1128 .prcm = {
1129 .omap4 = {
1130 .clkctrl_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
1131 },
1132 },
1133 .slaves = omap44xx_i2c2_slaves,
1134 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
1135 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1136};
1137
1138/* i2c3 */
1139static struct omap_hwmod omap44xx_i2c3_hwmod;
1140static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
1141 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
1142};
1143
1144static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
1145 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
1146 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
1147};
1148
1149static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
1150 {
1151 .pa_start = 0x48060000,
1152 .pa_end = 0x480600ff,
1153 .flags = ADDR_TYPE_RT
1154 },
1155};
1156
1157/* l4_per -> i2c3 */
1158static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
1159 .master = &omap44xx_l4_per_hwmod,
1160 .slave = &omap44xx_i2c3_hwmod,
1161 .clk = "l4_div_ck",
1162 .addr = omap44xx_i2c3_addrs,
1163 .addr_cnt = ARRAY_SIZE(omap44xx_i2c3_addrs),
1164 .user = OCP_USER_MPU | OCP_USER_SDMA,
1165};
1166
1167/* i2c3 slave ports */
1168static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
1169 &omap44xx_l4_per__i2c3,
1170};
1171
1172static struct omap_hwmod omap44xx_i2c3_hwmod = {
1173 .name = "i2c3",
1174 .class = &omap44xx_i2c_hwmod_class,
1175 .flags = HWMOD_INIT_NO_RESET,
1176 .mpu_irqs = omap44xx_i2c3_irqs,
1177 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c3_irqs),
1178 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
1179 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs),
1180 .main_clk = "i2c3_fck",
1181 .prcm = {
1182 .omap4 = {
1183 .clkctrl_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
1184 },
1185 },
1186 .slaves = omap44xx_i2c3_slaves,
1187 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
1188 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1189};
1190
1191/* i2c4 */
1192static struct omap_hwmod omap44xx_i2c4_hwmod;
1193static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
1194 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
1195};
1196
1197static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
1198 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
1199 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
1200};
1201
1202static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
1203 {
1204 .pa_start = 0x48350000,
1205 .pa_end = 0x483500ff,
1206 .flags = ADDR_TYPE_RT
1207 },
1208};
1209
1210/* l4_per -> i2c4 */
1211static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
1212 .master = &omap44xx_l4_per_hwmod,
1213 .slave = &omap44xx_i2c4_hwmod,
1214 .clk = "l4_div_ck",
1215 .addr = omap44xx_i2c4_addrs,
1216 .addr_cnt = ARRAY_SIZE(omap44xx_i2c4_addrs),
1217 .user = OCP_USER_MPU | OCP_USER_SDMA,
1218};
1219
1220/* i2c4 slave ports */
1221static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
1222 &omap44xx_l4_per__i2c4,
1223};
1224
1225static struct omap_hwmod omap44xx_i2c4_hwmod = {
1226 .name = "i2c4",
1227 .class = &omap44xx_i2c_hwmod_class,
1228 .flags = HWMOD_INIT_NO_RESET,
1229 .mpu_irqs = omap44xx_i2c4_irqs,
1230 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c4_irqs),
1231 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
1232 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs),
1233 .main_clk = "i2c4_fck",
1234 .prcm = {
1235 .omap4 = {
1236 .clkctrl_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
1237 },
1238 },
1239 .slaves = omap44xx_i2c4_slaves,
1240 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
1241 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1242};
1243
1244/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001245 * 'iva' class
1246 * multi-standard video encoder/decoder hardware accelerator
1247 */
1248
1249static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
1250 .name = "iva",
1251};
1252
1253/* iva */
1254static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
1255 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
1256 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
1257 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
1258};
1259
1260static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
1261 { .name = "logic", .rst_shift = 2 },
1262};
1263
1264static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
1265 { .name = "seq0", .rst_shift = 0 },
1266};
1267
1268static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
1269 { .name = "seq1", .rst_shift = 1 },
1270};
1271
1272/* iva master ports */
1273static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
1274 &omap44xx_iva__l3_main_2,
1275 &omap44xx_iva__l3_instr,
1276};
1277
1278static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
1279 {
1280 .pa_start = 0x5a000000,
1281 .pa_end = 0x5a07ffff,
1282 .flags = ADDR_TYPE_RT
1283 },
1284};
1285
1286/* l3_main_2 -> iva */
1287static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
1288 .master = &omap44xx_l3_main_2_hwmod,
1289 .slave = &omap44xx_iva_hwmod,
1290 .clk = "l3_div_ck",
1291 .addr = omap44xx_iva_addrs,
1292 .addr_cnt = ARRAY_SIZE(omap44xx_iva_addrs),
1293 .user = OCP_USER_MPU,
1294};
1295
1296/* iva slave ports */
1297static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
1298 &omap44xx_dsp__iva,
1299 &omap44xx_l3_main_2__iva,
1300};
1301
1302/* Pseudo hwmod for reset control purpose only */
1303static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
1304 .name = "iva_seq0",
1305 .class = &omap44xx_iva_hwmod_class,
1306 .flags = HWMOD_INIT_NO_RESET,
1307 .rst_lines = omap44xx_iva_seq0_resets,
1308 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
1309 .prcm = {
1310 .omap4 = {
1311 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
1312 },
1313 },
1314 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1315};
1316
1317/* Pseudo hwmod for reset control purpose only */
1318static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
1319 .name = "iva_seq1",
1320 .class = &omap44xx_iva_hwmod_class,
1321 .flags = HWMOD_INIT_NO_RESET,
1322 .rst_lines = omap44xx_iva_seq1_resets,
1323 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
1324 .prcm = {
1325 .omap4 = {
1326 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
1327 },
1328 },
1329 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1330};
1331
1332static struct omap_hwmod omap44xx_iva_hwmod = {
1333 .name = "iva",
1334 .class = &omap44xx_iva_hwmod_class,
1335 .mpu_irqs = omap44xx_iva_irqs,
1336 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iva_irqs),
1337 .rst_lines = omap44xx_iva_resets,
1338 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
1339 .main_clk = "iva_fck",
1340 .prcm = {
1341 .omap4 = {
1342 .clkctrl_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
1343 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
1344 },
1345 },
1346 .slaves = omap44xx_iva_slaves,
1347 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
1348 .masters = omap44xx_iva_masters,
1349 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
1350 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1351};
1352
1353/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001354 * 'mpu' class
1355 * mpu sub-system
1356 */
1357
1358static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
1359 .name = "mpu",
1360};
1361
1362/* mpu */
1363static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
1364 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
1365 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
1366 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
1367};
1368
1369/* mpu master ports */
1370static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
1371 &omap44xx_mpu__l3_main_1,
1372 &omap44xx_mpu__l4_abe,
1373 &omap44xx_mpu__dmm,
1374};
1375
1376static struct omap_hwmod omap44xx_mpu_hwmod = {
1377 .name = "mpu",
1378 .class = &omap44xx_mpu_hwmod_class,
1379 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
1380 .mpu_irqs = omap44xx_mpu_irqs,
1381 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs),
1382 .main_clk = "dpll_mpu_m2_ck",
1383 .prcm = {
1384 .omap4 = {
1385 .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL,
1386 },
1387 },
1388 .masters = omap44xx_mpu_masters,
1389 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
1390 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1391};
1392
Benoit Cousson92b18d12010-09-23 20:02:41 +05301393/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05301394 * 'uart' class
1395 * universal asynchronous receiver/transmitter (uart)
1396 */
1397
1398static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
1399 .rev_offs = 0x0050,
1400 .sysc_offs = 0x0054,
1401 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001402 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001403 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1404 SYSS_HAS_RESET_STATUS),
Benoit Coussondb12ba52010-09-27 20:19:19 +05301405 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1406 .sysc_fields = &omap_hwmod_sysc_type1,
1407};
1408
1409static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
1410 .name = "uart",
1411 .sysc = &omap44xx_uart_sysc,
1412};
1413
1414/* uart1 */
1415static struct omap_hwmod omap44xx_uart1_hwmod;
1416static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
1417 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
1418};
1419
1420static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
1421 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
1422 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
1423};
1424
1425static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
1426 {
1427 .pa_start = 0x4806a000,
1428 .pa_end = 0x4806a0ff,
1429 .flags = ADDR_TYPE_RT
1430 },
1431};
1432
1433/* l4_per -> uart1 */
1434static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
1435 .master = &omap44xx_l4_per_hwmod,
1436 .slave = &omap44xx_uart1_hwmod,
1437 .clk = "l4_div_ck",
1438 .addr = omap44xx_uart1_addrs,
1439 .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs),
1440 .user = OCP_USER_MPU | OCP_USER_SDMA,
1441};
1442
1443/* uart1 slave ports */
1444static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
1445 &omap44xx_l4_per__uart1,
1446};
1447
1448static struct omap_hwmod omap44xx_uart1_hwmod = {
1449 .name = "uart1",
1450 .class = &omap44xx_uart_hwmod_class,
1451 .mpu_irqs = omap44xx_uart1_irqs,
1452 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs),
1453 .sdma_reqs = omap44xx_uart1_sdma_reqs,
1454 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
1455 .main_clk = "uart1_fck",
1456 .prcm = {
1457 .omap4 = {
1458 .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
1459 },
1460 },
1461 .slaves = omap44xx_uart1_slaves,
1462 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
1463 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1464};
1465
1466/* uart2 */
1467static struct omap_hwmod omap44xx_uart2_hwmod;
1468static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
1469 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
1470};
1471
1472static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
1473 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
1474 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
1475};
1476
1477static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
1478 {
1479 .pa_start = 0x4806c000,
1480 .pa_end = 0x4806c0ff,
1481 .flags = ADDR_TYPE_RT
1482 },
1483};
1484
1485/* l4_per -> uart2 */
1486static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
1487 .master = &omap44xx_l4_per_hwmod,
1488 .slave = &omap44xx_uart2_hwmod,
1489 .clk = "l4_div_ck",
1490 .addr = omap44xx_uart2_addrs,
1491 .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs),
1492 .user = OCP_USER_MPU | OCP_USER_SDMA,
1493};
1494
1495/* uart2 slave ports */
1496static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
1497 &omap44xx_l4_per__uart2,
1498};
1499
1500static struct omap_hwmod omap44xx_uart2_hwmod = {
1501 .name = "uart2",
1502 .class = &omap44xx_uart_hwmod_class,
1503 .mpu_irqs = omap44xx_uart2_irqs,
1504 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs),
1505 .sdma_reqs = omap44xx_uart2_sdma_reqs,
1506 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
1507 .main_clk = "uart2_fck",
1508 .prcm = {
1509 .omap4 = {
1510 .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
1511 },
1512 },
1513 .slaves = omap44xx_uart2_slaves,
1514 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
1515 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1516};
1517
1518/* uart3 */
1519static struct omap_hwmod omap44xx_uart3_hwmod;
1520static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
1521 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
1522};
1523
1524static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
1525 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
1526 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
1527};
1528
1529static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
1530 {
1531 .pa_start = 0x48020000,
1532 .pa_end = 0x480200ff,
1533 .flags = ADDR_TYPE_RT
1534 },
1535};
1536
1537/* l4_per -> uart3 */
1538static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
1539 .master = &omap44xx_l4_per_hwmod,
1540 .slave = &omap44xx_uart3_hwmod,
1541 .clk = "l4_div_ck",
1542 .addr = omap44xx_uart3_addrs,
1543 .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs),
1544 .user = OCP_USER_MPU | OCP_USER_SDMA,
1545};
1546
1547/* uart3 slave ports */
1548static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
1549 &omap44xx_l4_per__uart3,
1550};
1551
1552static struct omap_hwmod omap44xx_uart3_hwmod = {
1553 .name = "uart3",
1554 .class = &omap44xx_uart_hwmod_class,
1555 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
1556 .mpu_irqs = omap44xx_uart3_irqs,
1557 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs),
1558 .sdma_reqs = omap44xx_uart3_sdma_reqs,
1559 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
1560 .main_clk = "uart3_fck",
1561 .prcm = {
1562 .omap4 = {
1563 .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
1564 },
1565 },
1566 .slaves = omap44xx_uart3_slaves,
1567 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
1568 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1569};
1570
1571/* uart4 */
1572static struct omap_hwmod omap44xx_uart4_hwmod;
1573static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
1574 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
1575};
1576
1577static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
1578 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
1579 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
1580};
1581
1582static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
1583 {
1584 .pa_start = 0x4806e000,
1585 .pa_end = 0x4806e0ff,
1586 .flags = ADDR_TYPE_RT
1587 },
1588};
1589
1590/* l4_per -> uart4 */
1591static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
1592 .master = &omap44xx_l4_per_hwmod,
1593 .slave = &omap44xx_uart4_hwmod,
1594 .clk = "l4_div_ck",
1595 .addr = omap44xx_uart4_addrs,
1596 .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs),
1597 .user = OCP_USER_MPU | OCP_USER_SDMA,
1598};
1599
1600/* uart4 slave ports */
1601static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
1602 &omap44xx_l4_per__uart4,
1603};
1604
1605static struct omap_hwmod omap44xx_uart4_hwmod = {
1606 .name = "uart4",
1607 .class = &omap44xx_uart_hwmod_class,
1608 .mpu_irqs = omap44xx_uart4_irqs,
1609 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs),
1610 .sdma_reqs = omap44xx_uart4_sdma_reqs,
1611 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
1612 .main_clk = "uart4_fck",
1613 .prcm = {
1614 .omap4 = {
1615 .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
1616 },
1617 },
1618 .slaves = omap44xx_uart4_slaves,
1619 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
1620 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1621};
1622
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001623/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001624 * 'wd_timer' class
1625 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1626 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001627 */
1628
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001629static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001630 .rev_offs = 0x0000,
1631 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001632 .syss_offs = 0x0014,
1633 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001634 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001635 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1636 .sysc_fields = &omap_hwmod_sysc_type1,
1637};
1638
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001639static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
1640 .name = "wd_timer",
1641 .sysc = &omap44xx_wd_timer_sysc,
1642 .pre_shutdown = &omap2_wd_timer_disable
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001643};
1644
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001645/* wd_timer2 */
1646static struct omap_hwmod omap44xx_wd_timer2_hwmod;
1647static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
1648 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001649};
1650
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001651static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001652 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001653 .pa_start = 0x4a314000,
1654 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001655 .flags = ADDR_TYPE_RT
1656 },
1657};
1658
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001659/* l4_wkup -> wd_timer2 */
1660static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001661 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001662 .slave = &omap44xx_wd_timer2_hwmod,
1663 .clk = "l4_wkup_clk_mux_ck",
1664 .addr = omap44xx_wd_timer2_addrs,
1665 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001666 .user = OCP_USER_MPU | OCP_USER_SDMA,
1667};
1668
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001669/* wd_timer2 slave ports */
1670static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
1671 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001672};
1673
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001674static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
1675 .name = "wd_timer2",
1676 .class = &omap44xx_wd_timer_hwmod_class,
1677 .mpu_irqs = omap44xx_wd_timer2_irqs,
1678 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs),
1679 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001680 .prcm = {
1681 .omap4 = {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001682 .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001683 },
1684 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001685 .slaves = omap44xx_wd_timer2_slaves,
1686 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001687 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1688};
1689
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001690/* wd_timer3 */
1691static struct omap_hwmod omap44xx_wd_timer3_hwmod;
1692static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
1693 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001694};
1695
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001696static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001697 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001698 .pa_start = 0x40130000,
1699 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001700 .flags = ADDR_TYPE_RT
1701 },
1702};
1703
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001704/* l4_abe -> wd_timer3 */
1705static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
1706 .master = &omap44xx_l4_abe_hwmod,
1707 .slave = &omap44xx_wd_timer3_hwmod,
1708 .clk = "ocp_abe_iclk",
1709 .addr = omap44xx_wd_timer3_addrs,
1710 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs),
1711 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001712};
1713
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001714static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001715 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001716 .pa_start = 0x49030000,
1717 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001718 .flags = ADDR_TYPE_RT
1719 },
1720};
1721
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001722/* l4_abe -> wd_timer3 (dma) */
1723static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
1724 .master = &omap44xx_l4_abe_hwmod,
1725 .slave = &omap44xx_wd_timer3_hwmod,
1726 .clk = "ocp_abe_iclk",
1727 .addr = omap44xx_wd_timer3_dma_addrs,
1728 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs),
1729 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001730};
1731
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001732/* wd_timer3 slave ports */
1733static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
1734 &omap44xx_l4_abe__wd_timer3,
1735 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001736};
1737
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001738static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
1739 .name = "wd_timer3",
1740 .class = &omap44xx_wd_timer_hwmod_class,
1741 .mpu_irqs = omap44xx_wd_timer3_irqs,
1742 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs),
1743 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001744 .prcm = {
1745 .omap4 = {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001746 .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001747 },
1748 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001749 .slaves = omap44xx_wd_timer3_slaves,
1750 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001751 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1752};
1753
Benoit Cousson531ce0d2010-12-20 18:27:19 -08001754
1755/*
1756 * 'dma' class
1757 * dma controller for data exchange between memory to memory (i.e. internal or
1758 * external memory) and gp peripherals to memory or memory to gp peripherals
1759 */
1760
1761static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
1762 .rev_offs = 0x0000,
1763 .sysc_offs = 0x002c,
1764 .syss_offs = 0x0028,
1765 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1766 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
1767 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1768 SYSS_HAS_RESET_STATUS),
1769 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1770 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1771 .sysc_fields = &omap_hwmod_sysc_type1,
1772};
1773
1774/* dma attributes */
1775static struct omap_dma_dev_attr dma_dev_attr = {
1776 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1777 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1778 .lch_count = 32,
1779};
1780
1781static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
1782 .name = "dma",
1783 .sysc = &omap44xx_dma_sysc,
1784};
1785
1786/* dma_system */
1787static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
1788 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
1789 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
1790 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
1791 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
1792};
1793
1794/* dma_system master ports */
1795static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
1796 &omap44xx_dma_system__l3_main_2,
1797};
1798
1799static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
1800 {
1801 .pa_start = 0x4a056000,
1802 .pa_end = 0x4a0560ff,
1803 .flags = ADDR_TYPE_RT
1804 },
1805};
1806
1807/* l4_cfg -> dma_system */
1808static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
1809 .master = &omap44xx_l4_cfg_hwmod,
1810 .slave = &omap44xx_dma_system_hwmod,
1811 .clk = "l4_div_ck",
1812 .addr = omap44xx_dma_system_addrs,
1813 .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs),
1814 .user = OCP_USER_MPU | OCP_USER_SDMA,
1815};
1816
1817/* dma_system slave ports */
1818static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
1819 &omap44xx_l4_cfg__dma_system,
1820};
1821
1822static struct omap_hwmod omap44xx_dma_system_hwmod = {
1823 .name = "dma_system",
1824 .class = &omap44xx_dma_hwmod_class,
1825 .mpu_irqs = omap44xx_dma_system_irqs,
1826 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs),
1827 .main_clk = "l3_div_ck",
1828 .prcm = {
1829 .omap4 = {
1830 .clkctrl_reg = OMAP4430_CM_SDMA_SDMA_CLKCTRL,
1831 },
1832 },
1833 .slaves = omap44xx_dma_system_slaves,
1834 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
1835 .masters = omap44xx_dma_system_masters,
1836 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
1837 .dev_attr = &dma_dev_attr,
1838 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1839};
1840
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001841static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
1842 /* dmm class */
1843 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001844
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001845 /* emif_fw class */
1846 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001847
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001848 /* l3 class */
1849 &omap44xx_l3_instr_hwmod,
1850 &omap44xx_l3_main_1_hwmod,
1851 &omap44xx_l3_main_2_hwmod,
1852 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001853
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001854 /* l4 class */
1855 &omap44xx_l4_abe_hwmod,
1856 &omap44xx_l4_cfg_hwmod,
1857 &omap44xx_l4_per_hwmod,
1858 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08001859
1860 /* dma class */
1861 &omap44xx_dma_system_hwmod,
1862
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001863 /* mpu_bus class */
1864 &omap44xx_mpu_private_hwmod,
1865
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001866 /* dsp class */
1867 &omap44xx_dsp_hwmod,
1868 &omap44xx_dsp_c0_hwmod,
1869
Benoit Cousson9780a9c2010-12-07 16:26:57 -08001870 /* gpio class */
1871 &omap44xx_gpio1_hwmod,
1872 &omap44xx_gpio2_hwmod,
1873 &omap44xx_gpio3_hwmod,
1874 &omap44xx_gpio4_hwmod,
1875 &omap44xx_gpio5_hwmod,
1876 &omap44xx_gpio6_hwmod,
1877
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001878 /* i2c class */
1879 &omap44xx_i2c1_hwmod,
1880 &omap44xx_i2c2_hwmod,
1881 &omap44xx_i2c3_hwmod,
1882 &omap44xx_i2c4_hwmod,
1883
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001884 /* iva class */
1885 &omap44xx_iva_hwmod,
1886 &omap44xx_iva_seq0_hwmod,
1887 &omap44xx_iva_seq1_hwmod,
1888
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001889 /* mpu class */
1890 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05301891
1892 /* uart class */
1893 &omap44xx_uart1_hwmod,
1894 &omap44xx_uart2_hwmod,
1895 &omap44xx_uart3_hwmod,
1896 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001897
1898 /* wd_timer class */
1899 &omap44xx_wd_timer2_hwmod,
1900 &omap44xx_wd_timer3_hwmod,
1901
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001902 NULL,
1903};
1904
1905int __init omap44xx_hwmod_init(void)
1906{
1907 return omap_hwmod_init(omap44xx_hwmods);
1908}
1909