blob: e8ffd2c1750ab56ba7ef6eff4dcf2003fdbefe7d [file] [log] [blame]
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001/*
2 * Hardware modules present on the OMAP44xx chips
3 *
Benoit Coussond63bd742011-01-27 11:17:03 +00004 * Copyright (C) 2009-2011 Texas Instruments, Inc.
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005 * 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 Cousson905a74d2011-02-18 14:01:06 +010027#include <plat/mcspi.h>
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +053028#include <plat/mcbsp.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080029#include <plat/mmc.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020030
31#include "omap_hwmod_common_data.h"
32
Paul Walmsleyd198b512010-12-21 15:30:54 -070033#include "cm1_44xx.h"
34#include "cm2_44xx.h"
35#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020036#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070037#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020038
39/* Base offset for all OMAP4 interrupts external to MPUSS */
40#define OMAP44XX_IRQ_GIC_START 32
41
42/* Base offset for all OMAP4 dma requests */
43#define OMAP44XX_DMA_REQ_START 1
44
45/* Backward references (IPs with Bus Master capability) */
Benoit Cousson407a6882011-02-15 22:39:48 +010046static struct omap_hwmod omap44xx_aess_hwmod;
Benoit Cousson531ce0d2010-12-20 18:27:19 -080047static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020048static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070049static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Coussond63bd742011-01-27 11:17:03 +000050static struct omap_hwmod omap44xx_dss_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020051static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010052static struct omap_hwmod omap44xx_hsi_hwmod;
53static struct omap_hwmod omap44xx_ipu_hwmod;
54static struct omap_hwmod omap44xx_iss_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070055static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020056static struct omap_hwmod omap44xx_l3_instr_hwmod;
57static struct omap_hwmod omap44xx_l3_main_1_hwmod;
58static struct omap_hwmod omap44xx_l3_main_2_hwmod;
59static struct omap_hwmod omap44xx_l3_main_3_hwmod;
60static struct omap_hwmod omap44xx_l4_abe_hwmod;
61static struct omap_hwmod omap44xx_l4_cfg_hwmod;
62static struct omap_hwmod omap44xx_l4_per_hwmod;
63static struct omap_hwmod omap44xx_l4_wkup_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010064static struct omap_hwmod omap44xx_mmc1_hwmod;
65static struct omap_hwmod omap44xx_mmc2_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020066static struct omap_hwmod omap44xx_mpu_hwmod;
67static struct omap_hwmod omap44xx_mpu_private_hwmod;
Benoit Cousson5844c4e2011-02-17 12:41:05 +000068static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020069
70/*
71 * Interconnects omap_hwmod structures
72 * hwmods that compose the global OMAP interconnect
73 */
74
75/*
76 * 'dmm' class
77 * instance(s): dmm
78 */
79static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +000080 .name = "dmm",
Benoit Cousson55d2cb02010-05-12 17:54:36 +020081};
82
83/* dmm interface data */
84/* l3_main_1 -> dmm */
85static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
86 .master = &omap44xx_l3_main_1_hwmod,
87 .slave = &omap44xx_dmm_hwmod,
88 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070089 .user = OCP_USER_SDMA,
90};
91
92static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
93 {
94 .pa_start = 0x4e000000,
95 .pa_end = 0x4e0007ff,
96 .flags = ADDR_TYPE_RT
97 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +020098};
99
100/* mpu -> dmm */
101static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
102 .master = &omap44xx_mpu_hwmod,
103 .slave = &omap44xx_dmm_hwmod,
104 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700105 .addr = omap44xx_dmm_addrs,
106 .addr_cnt = ARRAY_SIZE(omap44xx_dmm_addrs),
107 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200108};
109
110/* dmm slave ports */
111static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
112 &omap44xx_l3_main_1__dmm,
113 &omap44xx_mpu__dmm,
114};
115
116static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
117 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
118};
119
120static struct omap_hwmod omap44xx_dmm_hwmod = {
121 .name = "dmm",
122 .class = &omap44xx_dmm_hwmod_class,
123 .slaves = omap44xx_dmm_slaves,
124 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
125 .mpu_irqs = omap44xx_dmm_irqs,
126 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs),
127 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
128};
129
130/*
131 * 'emif_fw' class
132 * instance(s): emif_fw
133 */
134static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000135 .name = "emif_fw",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200136};
137
138/* emif_fw interface data */
139/* dmm -> emif_fw */
140static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
141 .master = &omap44xx_dmm_hwmod,
142 .slave = &omap44xx_emif_fw_hwmod,
143 .clk = "l3_div_ck",
144 .user = OCP_USER_MPU | OCP_USER_SDMA,
145};
146
Benoit Cousson659fa822010-12-21 21:08:34 -0700147static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
148 {
149 .pa_start = 0x4a20c000,
150 .pa_end = 0x4a20c0ff,
151 .flags = ADDR_TYPE_RT
152 },
153};
154
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200155/* l4_cfg -> emif_fw */
156static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
157 .master = &omap44xx_l4_cfg_hwmod,
158 .slave = &omap44xx_emif_fw_hwmod,
159 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700160 .addr = omap44xx_emif_fw_addrs,
161 .addr_cnt = ARRAY_SIZE(omap44xx_emif_fw_addrs),
162 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200163};
164
165/* emif_fw slave ports */
166static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
167 &omap44xx_dmm__emif_fw,
168 &omap44xx_l4_cfg__emif_fw,
169};
170
171static struct omap_hwmod omap44xx_emif_fw_hwmod = {
172 .name = "emif_fw",
173 .class = &omap44xx_emif_fw_hwmod_class,
174 .slaves = omap44xx_emif_fw_slaves,
175 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
176 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
177};
178
179/*
180 * 'l3' class
181 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
182 */
183static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000184 .name = "l3",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200185};
186
187/* l3_instr interface data */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700188/* iva -> l3_instr */
189static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
190 .master = &omap44xx_iva_hwmod,
191 .slave = &omap44xx_l3_instr_hwmod,
192 .clk = "l3_div_ck",
193 .user = OCP_USER_MPU | OCP_USER_SDMA,
194};
195
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200196/* l3_main_3 -> l3_instr */
197static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
198 .master = &omap44xx_l3_main_3_hwmod,
199 .slave = &omap44xx_l3_instr_hwmod,
200 .clk = "l3_div_ck",
201 .user = OCP_USER_MPU | OCP_USER_SDMA,
202};
203
204/* l3_instr slave ports */
205static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700206 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200207 &omap44xx_l3_main_3__l3_instr,
208};
209
210static struct omap_hwmod omap44xx_l3_instr_hwmod = {
211 .name = "l3_instr",
212 .class = &omap44xx_l3_hwmod_class,
213 .slaves = omap44xx_l3_instr_slaves,
214 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
215 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
216};
217
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700218/* l3_main_1 interface data */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700219/* dsp -> l3_main_1 */
220static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
221 .master = &omap44xx_dsp_hwmod,
222 .slave = &omap44xx_l3_main_1_hwmod,
223 .clk = "l3_div_ck",
224 .user = OCP_USER_MPU | OCP_USER_SDMA,
225};
226
Benoit Coussond63bd742011-01-27 11:17:03 +0000227/* dss -> l3_main_1 */
228static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
229 .master = &omap44xx_dss_hwmod,
230 .slave = &omap44xx_l3_main_1_hwmod,
231 .clk = "l3_div_ck",
232 .user = OCP_USER_MPU | OCP_USER_SDMA,
233};
234
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200235/* l3_main_2 -> l3_main_1 */
236static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
237 .master = &omap44xx_l3_main_2_hwmod,
238 .slave = &omap44xx_l3_main_1_hwmod,
239 .clk = "l3_div_ck",
240 .user = OCP_USER_MPU | OCP_USER_SDMA,
241};
242
243/* l4_cfg -> l3_main_1 */
244static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
245 .master = &omap44xx_l4_cfg_hwmod,
246 .slave = &omap44xx_l3_main_1_hwmod,
247 .clk = "l4_div_ck",
248 .user = OCP_USER_MPU | OCP_USER_SDMA,
249};
250
Benoit Cousson407a6882011-02-15 22:39:48 +0100251/* mmc1 -> l3_main_1 */
252static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
253 .master = &omap44xx_mmc1_hwmod,
254 .slave = &omap44xx_l3_main_1_hwmod,
255 .clk = "l3_div_ck",
256 .user = OCP_USER_MPU | OCP_USER_SDMA,
257};
258
259/* mmc2 -> l3_main_1 */
260static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
261 .master = &omap44xx_mmc2_hwmod,
262 .slave = &omap44xx_l3_main_1_hwmod,
263 .clk = "l3_div_ck",
264 .user = OCP_USER_MPU | OCP_USER_SDMA,
265};
266
sricharanc4645232011-02-07 21:12:11 +0530267/* L3 target configuration and error log registers */
268static struct omap_hwmod_irq_info omap44xx_l3_targ_irqs[] = {
269 { .irq = 9 + OMAP44XX_IRQ_GIC_START },
270 { .irq = 10 + OMAP44XX_IRQ_GIC_START },
271};
272
273static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
274 {
275 .pa_start = 0x44000000,
276 .pa_end = 0x44000fff,
277 .flags = ADDR_TYPE_RT,
278 },
279};
280
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200281/* mpu -> l3_main_1 */
282static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
283 .master = &omap44xx_mpu_hwmod,
284 .slave = &omap44xx_l3_main_1_hwmod,
285 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530286 .addr = omap44xx_l3_main_1_addrs,
287 .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_1_addrs),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200288 .user = OCP_USER_MPU | OCP_USER_SDMA,
289};
290
291/* l3_main_1 slave ports */
292static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700293 &omap44xx_dsp__l3_main_1,
Benoit Coussond63bd742011-01-27 11:17:03 +0000294 &omap44xx_dss__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200295 &omap44xx_l3_main_2__l3_main_1,
296 &omap44xx_l4_cfg__l3_main_1,
Benoit Cousson407a6882011-02-15 22:39:48 +0100297 &omap44xx_mmc1__l3_main_1,
298 &omap44xx_mmc2__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200299 &omap44xx_mpu__l3_main_1,
300};
301
302static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
303 .name = "l3_main_1",
304 .class = &omap44xx_l3_hwmod_class,
sricharanc4645232011-02-07 21:12:11 +0530305 .mpu_irqs = omap44xx_l3_targ_irqs,
306 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_l3_targ_irqs),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200307 .slaves = omap44xx_l3_main_1_slaves,
308 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
309 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
310};
311
312/* l3_main_2 interface data */
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000313/* dma_system -> l3_main_2 */
314static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
315 .master = &omap44xx_dma_system_hwmod,
316 .slave = &omap44xx_l3_main_2_hwmod,
317 .clk = "l3_div_ck",
318 .user = OCP_USER_MPU | OCP_USER_SDMA,
319};
320
Benoit Cousson407a6882011-02-15 22:39:48 +0100321/* hsi -> l3_main_2 */
322static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
323 .master = &omap44xx_hsi_hwmod,
324 .slave = &omap44xx_l3_main_2_hwmod,
325 .clk = "l3_div_ck",
326 .user = OCP_USER_MPU | OCP_USER_SDMA,
327};
328
329/* ipu -> l3_main_2 */
330static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
331 .master = &omap44xx_ipu_hwmod,
332 .slave = &omap44xx_l3_main_2_hwmod,
333 .clk = "l3_div_ck",
334 .user = OCP_USER_MPU | OCP_USER_SDMA,
335};
336
337/* iss -> l3_main_2 */
338static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
339 .master = &omap44xx_iss_hwmod,
340 .slave = &omap44xx_l3_main_2_hwmod,
341 .clk = "l3_div_ck",
342 .user = OCP_USER_MPU | OCP_USER_SDMA,
343};
344
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700345/* iva -> l3_main_2 */
346static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
347 .master = &omap44xx_iva_hwmod,
348 .slave = &omap44xx_l3_main_2_hwmod,
349 .clk = "l3_div_ck",
350 .user = OCP_USER_MPU | OCP_USER_SDMA,
351};
352
sricharanc4645232011-02-07 21:12:11 +0530353static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
354 {
355 .pa_start = 0x44800000,
356 .pa_end = 0x44801fff,
357 .flags = ADDR_TYPE_RT,
358 },
359};
360
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200361/* l3_main_1 -> l3_main_2 */
362static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
363 .master = &omap44xx_l3_main_1_hwmod,
364 .slave = &omap44xx_l3_main_2_hwmod,
365 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530366 .addr = omap44xx_l3_main_2_addrs,
367 .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_2_addrs),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200368 .user = OCP_USER_MPU | OCP_USER_SDMA,
369};
370
371/* l4_cfg -> l3_main_2 */
372static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
373 .master = &omap44xx_l4_cfg_hwmod,
374 .slave = &omap44xx_l3_main_2_hwmod,
375 .clk = "l4_div_ck",
376 .user = OCP_USER_MPU | OCP_USER_SDMA,
377};
378
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000379/* usb_otg_hs -> l3_main_2 */
380static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
381 .master = &omap44xx_usb_otg_hs_hwmod,
382 .slave = &omap44xx_l3_main_2_hwmod,
383 .clk = "l3_div_ck",
384 .user = OCP_USER_MPU | OCP_USER_SDMA,
385};
386
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200387/* l3_main_2 slave ports */
388static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800389 &omap44xx_dma_system__l3_main_2,
Benoit Cousson407a6882011-02-15 22:39:48 +0100390 &omap44xx_hsi__l3_main_2,
391 &omap44xx_ipu__l3_main_2,
392 &omap44xx_iss__l3_main_2,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700393 &omap44xx_iva__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200394 &omap44xx_l3_main_1__l3_main_2,
395 &omap44xx_l4_cfg__l3_main_2,
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000396 &omap44xx_usb_otg_hs__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200397};
398
399static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
400 .name = "l3_main_2",
401 .class = &omap44xx_l3_hwmod_class,
402 .slaves = omap44xx_l3_main_2_slaves,
403 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
404 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
405};
406
407/* l3_main_3 interface data */
sricharanc4645232011-02-07 21:12:11 +0530408static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
409 {
410 .pa_start = 0x45000000,
411 .pa_end = 0x45000fff,
412 .flags = ADDR_TYPE_RT,
413 },
414};
415
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200416/* l3_main_1 -> l3_main_3 */
417static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
418 .master = &omap44xx_l3_main_1_hwmod,
419 .slave = &omap44xx_l3_main_3_hwmod,
420 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530421 .addr = omap44xx_l3_main_3_addrs,
422 .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_3_addrs),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200423 .user = OCP_USER_MPU | OCP_USER_SDMA,
424};
425
426/* l3_main_2 -> l3_main_3 */
427static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
428 .master = &omap44xx_l3_main_2_hwmod,
429 .slave = &omap44xx_l3_main_3_hwmod,
430 .clk = "l3_div_ck",
431 .user = OCP_USER_MPU | OCP_USER_SDMA,
432};
433
434/* l4_cfg -> l3_main_3 */
435static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
436 .master = &omap44xx_l4_cfg_hwmod,
437 .slave = &omap44xx_l3_main_3_hwmod,
438 .clk = "l4_div_ck",
439 .user = OCP_USER_MPU | OCP_USER_SDMA,
440};
441
442/* l3_main_3 slave ports */
443static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
444 &omap44xx_l3_main_1__l3_main_3,
445 &omap44xx_l3_main_2__l3_main_3,
446 &omap44xx_l4_cfg__l3_main_3,
447};
448
449static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
450 .name = "l3_main_3",
451 .class = &omap44xx_l3_hwmod_class,
452 .slaves = omap44xx_l3_main_3_slaves,
453 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
454 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
455};
456
457/*
458 * 'l4' class
459 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
460 */
461static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000462 .name = "l4",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200463};
464
465/* l4_abe interface data */
Benoit Cousson407a6882011-02-15 22:39:48 +0100466/* aess -> l4_abe */
467static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
468 .master = &omap44xx_aess_hwmod,
469 .slave = &omap44xx_l4_abe_hwmod,
470 .clk = "ocp_abe_iclk",
471 .user = OCP_USER_MPU | OCP_USER_SDMA,
472};
473
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700474/* dsp -> l4_abe */
475static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
476 .master = &omap44xx_dsp_hwmod,
477 .slave = &omap44xx_l4_abe_hwmod,
478 .clk = "ocp_abe_iclk",
479 .user = OCP_USER_MPU | OCP_USER_SDMA,
480};
481
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200482/* l3_main_1 -> l4_abe */
483static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
484 .master = &omap44xx_l3_main_1_hwmod,
485 .slave = &omap44xx_l4_abe_hwmod,
486 .clk = "l3_div_ck",
487 .user = OCP_USER_MPU | OCP_USER_SDMA,
488};
489
490/* mpu -> l4_abe */
491static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
492 .master = &omap44xx_mpu_hwmod,
493 .slave = &omap44xx_l4_abe_hwmod,
494 .clk = "ocp_abe_iclk",
495 .user = OCP_USER_MPU | OCP_USER_SDMA,
496};
497
498/* l4_abe slave ports */
499static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100500 &omap44xx_aess__l4_abe,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700501 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200502 &omap44xx_l3_main_1__l4_abe,
503 &omap44xx_mpu__l4_abe,
504};
505
506static struct omap_hwmod omap44xx_l4_abe_hwmod = {
507 .name = "l4_abe",
508 .class = &omap44xx_l4_hwmod_class,
509 .slaves = omap44xx_l4_abe_slaves,
510 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
511 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
512};
513
514/* l4_cfg interface data */
515/* l3_main_1 -> l4_cfg */
516static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
517 .master = &omap44xx_l3_main_1_hwmod,
518 .slave = &omap44xx_l4_cfg_hwmod,
519 .clk = "l3_div_ck",
520 .user = OCP_USER_MPU | OCP_USER_SDMA,
521};
522
523/* l4_cfg slave ports */
524static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
525 &omap44xx_l3_main_1__l4_cfg,
526};
527
528static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
529 .name = "l4_cfg",
530 .class = &omap44xx_l4_hwmod_class,
531 .slaves = omap44xx_l4_cfg_slaves,
532 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
533 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
534};
535
536/* l4_per interface data */
537/* l3_main_2 -> l4_per */
538static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
539 .master = &omap44xx_l3_main_2_hwmod,
540 .slave = &omap44xx_l4_per_hwmod,
541 .clk = "l3_div_ck",
542 .user = OCP_USER_MPU | OCP_USER_SDMA,
543};
544
545/* l4_per slave ports */
546static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
547 &omap44xx_l3_main_2__l4_per,
548};
549
550static struct omap_hwmod omap44xx_l4_per_hwmod = {
551 .name = "l4_per",
552 .class = &omap44xx_l4_hwmod_class,
553 .slaves = omap44xx_l4_per_slaves,
554 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
555 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
556};
557
558/* l4_wkup interface data */
559/* l4_cfg -> l4_wkup */
560static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
561 .master = &omap44xx_l4_cfg_hwmod,
562 .slave = &omap44xx_l4_wkup_hwmod,
563 .clk = "l4_div_ck",
564 .user = OCP_USER_MPU | OCP_USER_SDMA,
565};
566
567/* l4_wkup slave ports */
568static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
569 &omap44xx_l4_cfg__l4_wkup,
570};
571
572static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
573 .name = "l4_wkup",
574 .class = &omap44xx_l4_hwmod_class,
575 .slaves = omap44xx_l4_wkup_slaves,
576 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
577 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
578};
579
580/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700581 * 'mpu_bus' class
582 * instance(s): mpu_private
583 */
584static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000585 .name = "mpu_bus",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700586};
587
588/* mpu_private interface data */
589/* mpu -> mpu_private */
590static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
591 .master = &omap44xx_mpu_hwmod,
592 .slave = &omap44xx_mpu_private_hwmod,
593 .clk = "l3_div_ck",
594 .user = OCP_USER_MPU | OCP_USER_SDMA,
595};
596
597/* mpu_private slave ports */
598static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
599 &omap44xx_mpu__mpu_private,
600};
601
602static struct omap_hwmod omap44xx_mpu_private_hwmod = {
603 .name = "mpu_private",
604 .class = &omap44xx_mpu_bus_hwmod_class,
605 .slaves = omap44xx_mpu_private_slaves,
606 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
607 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
608};
609
610/*
611 * Modules omap_hwmod structures
612 *
613 * The following IPs are excluded for the moment because:
614 * - They do not need an explicit SW control using omap_hwmod API.
615 * - They still need to be validated with the driver
616 * properly adapted to omap_hwmod / omap_device
617 *
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700618 * c2c
619 * c2c_target_fw
620 * cm_core
621 * cm_core_aon
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700622 * ctrl_module_core
623 * ctrl_module_pad_core
624 * ctrl_module_pad_wkup
625 * ctrl_module_wkup
626 * debugss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700627 * efuse_ctrl_cust
628 * efuse_ctrl_std
629 * elm
630 * emif1
631 * emif2
632 * fdif
633 * gpmc
634 * gpu
635 * hdq1w
636 * hsi
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700637 * ocmc_ram
638 * ocp2scp_usb_phy
639 * ocp_wp_noc
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700640 * prcm_mpu
641 * prm
642 * scrm
643 * sl2if
644 * slimbus1
645 * slimbus2
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700646 * usb_host_fs
647 * usb_host_hs
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700648 * usb_phy_cm
649 * usb_tll_hs
650 * usim
651 */
652
653/*
Benoit Cousson407a6882011-02-15 22:39:48 +0100654 * 'aess' class
655 * audio engine sub system
656 */
657
658static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
659 .rev_offs = 0x0000,
660 .sysc_offs = 0x0010,
661 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
662 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
663 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
664 .sysc_fields = &omap_hwmod_sysc_type2,
665};
666
667static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
668 .name = "aess",
669 .sysc = &omap44xx_aess_sysc,
670};
671
672/* aess */
673static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
674 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
675};
676
677static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
678 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
679 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
680 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
681 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
682 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
683 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
684 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
685 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
686};
687
688/* aess master ports */
689static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
690 &omap44xx_aess__l4_abe,
691};
692
693static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
694 {
Sebastien Guiriecc6a6eb92011-03-03 15:20:41 +0100695 .name = "dmem",
696 .pa_start = 0x40180000,
697 .pa_end = 0x4018ffff
698 },
699 {
700 .name = "cmem",
701 .pa_start = 0x401a0000,
702 .pa_end = 0x401a1fff
703 },
704 {
705 .name = "smem",
706 .pa_start = 0x401c0000,
707 .pa_end = 0x401c5fff
708 },
709 {
710 .name = "pmem",
711 .pa_start = 0x401e0000,
712 .pa_end = 0x401e1fff
713 },
714 {
715 .name = "mpu",
Benoit Cousson407a6882011-02-15 22:39:48 +0100716 .pa_start = 0x401f1000,
717 .pa_end = 0x401f13ff,
718 .flags = ADDR_TYPE_RT
719 },
720};
721
722/* l4_abe -> aess */
723static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
724 .master = &omap44xx_l4_abe_hwmod,
725 .slave = &omap44xx_aess_hwmod,
726 .clk = "ocp_abe_iclk",
727 .addr = omap44xx_aess_addrs,
728 .addr_cnt = ARRAY_SIZE(omap44xx_aess_addrs),
729 .user = OCP_USER_MPU,
730};
731
732static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
733 {
Sebastien Guiriecc6a6eb92011-03-03 15:20:41 +0100734 .name = "dmem_dma",
735 .pa_start = 0x49080000,
736 .pa_end = 0x4908ffff
737 },
738 {
739 .name = "cmem_dma",
740 .pa_start = 0x490a0000,
741 .pa_end = 0x490a1fff
742 },
743 {
744 .name = "smem_dma",
745 .pa_start = 0x490c0000,
746 .pa_end = 0x490c5fff
747 },
748 {
749 .name = "pmem_dma",
750 .pa_start = 0x490e0000,
751 .pa_end = 0x490e1fff
752 },
753 {
754 .name = "dma",
Benoit Cousson407a6882011-02-15 22:39:48 +0100755 .pa_start = 0x490f1000,
756 .pa_end = 0x490f13ff,
757 .flags = ADDR_TYPE_RT
758 },
759};
760
761/* l4_abe -> aess (dma) */
762static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
763 .master = &omap44xx_l4_abe_hwmod,
764 .slave = &omap44xx_aess_hwmod,
765 .clk = "ocp_abe_iclk",
766 .addr = omap44xx_aess_dma_addrs,
767 .addr_cnt = ARRAY_SIZE(omap44xx_aess_dma_addrs),
768 .user = OCP_USER_SDMA,
769};
770
771/* aess slave ports */
772static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
773 &omap44xx_l4_abe__aess,
774 &omap44xx_l4_abe__aess_dma,
775};
776
777static struct omap_hwmod omap44xx_aess_hwmod = {
778 .name = "aess",
779 .class = &omap44xx_aess_hwmod_class,
780 .mpu_irqs = omap44xx_aess_irqs,
781 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_aess_irqs),
782 .sdma_reqs = omap44xx_aess_sdma_reqs,
783 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_aess_sdma_reqs),
784 .main_clk = "aess_fck",
785 .prcm = {
786 .omap4 = {
787 .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
788 },
789 },
790 .slaves = omap44xx_aess_slaves,
791 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
792 .masters = omap44xx_aess_masters,
793 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
794 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
795};
796
797/*
798 * 'bandgap' class
799 * bangap reference for ldo regulators
800 */
801
802static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
803 .name = "bandgap",
804};
805
806/* bandgap */
807static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
808 { .role = "fclk", .clk = "bandgap_fclk" },
809};
810
811static struct omap_hwmod omap44xx_bandgap_hwmod = {
812 .name = "bandgap",
813 .class = &omap44xx_bandgap_hwmod_class,
814 .prcm = {
815 .omap4 = {
816 .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
817 },
818 },
819 .opt_clks = bandgap_opt_clks,
820 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
821 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
822};
823
824/*
825 * 'counter' class
826 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
827 */
828
829static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
830 .rev_offs = 0x0000,
831 .sysc_offs = 0x0004,
832 .sysc_flags = SYSC_HAS_SIDLEMODE,
833 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
834 SIDLE_SMART_WKUP),
835 .sysc_fields = &omap_hwmod_sysc_type1,
836};
837
838static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
839 .name = "counter",
840 .sysc = &omap44xx_counter_sysc,
841};
842
843/* counter_32k */
844static struct omap_hwmod omap44xx_counter_32k_hwmod;
845static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
846 {
847 .pa_start = 0x4a304000,
848 .pa_end = 0x4a30401f,
849 .flags = ADDR_TYPE_RT
850 },
851};
852
853/* l4_wkup -> counter_32k */
854static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
855 .master = &omap44xx_l4_wkup_hwmod,
856 .slave = &omap44xx_counter_32k_hwmod,
857 .clk = "l4_wkup_clk_mux_ck",
858 .addr = omap44xx_counter_32k_addrs,
859 .addr_cnt = ARRAY_SIZE(omap44xx_counter_32k_addrs),
860 .user = OCP_USER_MPU | OCP_USER_SDMA,
861};
862
863/* counter_32k slave ports */
864static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
865 &omap44xx_l4_wkup__counter_32k,
866};
867
868static struct omap_hwmod omap44xx_counter_32k_hwmod = {
869 .name = "counter_32k",
870 .class = &omap44xx_counter_hwmod_class,
871 .flags = HWMOD_SWSUP_SIDLE,
872 .main_clk = "sys_32k_ck",
873 .prcm = {
874 .omap4 = {
875 .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL,
876 },
877 },
878 .slaves = omap44xx_counter_32k_slaves,
879 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
880 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
881};
882
883/*
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000884 * 'dma' class
885 * dma controller for data exchange between memory to memory (i.e. internal or
886 * external memory) and gp peripherals to memory or memory to gp peripherals
887 */
888
889static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
890 .rev_offs = 0x0000,
891 .sysc_offs = 0x002c,
892 .syss_offs = 0x0028,
893 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
894 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
895 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
896 SYSS_HAS_RESET_STATUS),
897 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
898 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
899 .sysc_fields = &omap_hwmod_sysc_type1,
900};
901
902static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
903 .name = "dma",
904 .sysc = &omap44xx_dma_sysc,
905};
906
907/* dma dev_attr */
908static struct omap_dma_dev_attr dma_dev_attr = {
909 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
910 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
911 .lch_count = 32,
912};
913
914/* dma_system */
915static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
916 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
917 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
918 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
919 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
920};
921
922/* dma_system master ports */
923static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
924 &omap44xx_dma_system__l3_main_2,
925};
926
927static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
928 {
929 .pa_start = 0x4a056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -0600930 .pa_end = 0x4a056fff,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000931 .flags = ADDR_TYPE_RT
932 },
933};
934
935/* l4_cfg -> dma_system */
936static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
937 .master = &omap44xx_l4_cfg_hwmod,
938 .slave = &omap44xx_dma_system_hwmod,
939 .clk = "l4_div_ck",
940 .addr = omap44xx_dma_system_addrs,
941 .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs),
942 .user = OCP_USER_MPU | OCP_USER_SDMA,
943};
944
945/* dma_system slave ports */
946static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
947 &omap44xx_l4_cfg__dma_system,
948};
949
950static struct omap_hwmod omap44xx_dma_system_hwmod = {
951 .name = "dma_system",
952 .class = &omap44xx_dma_hwmod_class,
953 .mpu_irqs = omap44xx_dma_system_irqs,
954 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs),
955 .main_clk = "l3_div_ck",
956 .prcm = {
957 .omap4 = {
958 .clkctrl_reg = OMAP4430_CM_SDMA_SDMA_CLKCTRL,
959 },
960 },
961 .dev_attr = &dma_dev_attr,
962 .slaves = omap44xx_dma_system_slaves,
963 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
964 .masters = omap44xx_dma_system_masters,
965 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
966 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
967};
968
969/*
Benoit Cousson8ca476d2011-01-25 22:01:00 +0000970 * 'dmic' class
971 * digital microphone controller
972 */
973
974static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
975 .rev_offs = 0x0000,
976 .sysc_offs = 0x0010,
977 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
978 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
979 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
980 SIDLE_SMART_WKUP),
981 .sysc_fields = &omap_hwmod_sysc_type2,
982};
983
984static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
985 .name = "dmic",
986 .sysc = &omap44xx_dmic_sysc,
987};
988
989/* dmic */
990static struct omap_hwmod omap44xx_dmic_hwmod;
991static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
992 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
993};
994
995static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
996 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
997};
998
999static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1000 {
1001 .pa_start = 0x4012e000,
1002 .pa_end = 0x4012e07f,
1003 .flags = ADDR_TYPE_RT
1004 },
1005};
1006
1007/* l4_abe -> dmic */
1008static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1009 .master = &omap44xx_l4_abe_hwmod,
1010 .slave = &omap44xx_dmic_hwmod,
1011 .clk = "ocp_abe_iclk",
1012 .addr = omap44xx_dmic_addrs,
1013 .addr_cnt = ARRAY_SIZE(omap44xx_dmic_addrs),
1014 .user = OCP_USER_MPU,
1015};
1016
1017static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1018 {
1019 .pa_start = 0x4902e000,
1020 .pa_end = 0x4902e07f,
1021 .flags = ADDR_TYPE_RT
1022 },
1023};
1024
1025/* l4_abe -> dmic (dma) */
1026static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1027 .master = &omap44xx_l4_abe_hwmod,
1028 .slave = &omap44xx_dmic_hwmod,
1029 .clk = "ocp_abe_iclk",
1030 .addr = omap44xx_dmic_dma_addrs,
1031 .addr_cnt = ARRAY_SIZE(omap44xx_dmic_dma_addrs),
1032 .user = OCP_USER_SDMA,
1033};
1034
1035/* dmic slave ports */
1036static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1037 &omap44xx_l4_abe__dmic,
1038 &omap44xx_l4_abe__dmic_dma,
1039};
1040
1041static struct omap_hwmod omap44xx_dmic_hwmod = {
1042 .name = "dmic",
1043 .class = &omap44xx_dmic_hwmod_class,
1044 .mpu_irqs = omap44xx_dmic_irqs,
1045 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmic_irqs),
1046 .sdma_reqs = omap44xx_dmic_sdma_reqs,
1047 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dmic_sdma_reqs),
1048 .main_clk = "dmic_fck",
1049 .prcm = {
1050 .omap4 = {
1051 .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
1052 },
1053 },
1054 .slaves = omap44xx_dmic_slaves,
1055 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
1056 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1057};
1058
1059/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001060 * 'dsp' class
1061 * dsp sub-system
1062 */
1063
1064static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001065 .name = "dsp",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001066};
1067
1068/* dsp */
1069static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1070 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
1071};
1072
1073static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1074 { .name = "mmu_cache", .rst_shift = 1 },
1075};
1076
1077static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1078 { .name = "dsp", .rst_shift = 0 },
1079};
1080
1081/* dsp -> iva */
1082static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1083 .master = &omap44xx_dsp_hwmod,
1084 .slave = &omap44xx_iva_hwmod,
1085 .clk = "dpll_iva_m5x2_ck",
1086};
1087
1088/* dsp master ports */
1089static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1090 &omap44xx_dsp__l3_main_1,
1091 &omap44xx_dsp__l4_abe,
1092 &omap44xx_dsp__iva,
1093};
1094
1095/* l4_cfg -> dsp */
1096static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1097 .master = &omap44xx_l4_cfg_hwmod,
1098 .slave = &omap44xx_dsp_hwmod,
1099 .clk = "l4_div_ck",
1100 .user = OCP_USER_MPU | OCP_USER_SDMA,
1101};
1102
1103/* dsp slave ports */
1104static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1105 &omap44xx_l4_cfg__dsp,
1106};
1107
1108/* Pseudo hwmod for reset control purpose only */
1109static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1110 .name = "dsp_c0",
1111 .class = &omap44xx_dsp_hwmod_class,
1112 .flags = HWMOD_INIT_NO_RESET,
1113 .rst_lines = omap44xx_dsp_c0_resets,
1114 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1115 .prcm = {
1116 .omap4 = {
1117 .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL,
1118 },
1119 },
1120 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1121};
1122
1123static struct omap_hwmod omap44xx_dsp_hwmod = {
1124 .name = "dsp",
1125 .class = &omap44xx_dsp_hwmod_class,
1126 .mpu_irqs = omap44xx_dsp_irqs,
1127 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dsp_irqs),
1128 .rst_lines = omap44xx_dsp_resets,
1129 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1130 .main_clk = "dsp_fck",
1131 .prcm = {
1132 .omap4 = {
1133 .clkctrl_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL,
1134 .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL,
1135 },
1136 },
1137 .slaves = omap44xx_dsp_slaves,
1138 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1139 .masters = omap44xx_dsp_masters,
1140 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
1141 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1142};
1143
1144/*
Benoit Coussond63bd742011-01-27 11:17:03 +00001145 * 'dss' class
1146 * display sub-system
1147 */
1148
1149static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
1150 .rev_offs = 0x0000,
1151 .syss_offs = 0x0014,
1152 .sysc_flags = SYSS_HAS_RESET_STATUS,
1153};
1154
1155static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1156 .name = "dss",
1157 .sysc = &omap44xx_dss_sysc,
1158};
1159
1160/* dss */
1161/* dss master ports */
1162static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1163 &omap44xx_dss__l3_main_1,
1164};
1165
1166static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1167 {
1168 .pa_start = 0x58000000,
1169 .pa_end = 0x5800007f,
1170 .flags = ADDR_TYPE_RT
1171 },
1172};
1173
1174/* l3_main_2 -> dss */
1175static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1176 .master = &omap44xx_l3_main_2_hwmod,
1177 .slave = &omap44xx_dss_hwmod,
1178 .clk = "l3_div_ck",
1179 .addr = omap44xx_dss_dma_addrs,
1180 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dma_addrs),
1181 .user = OCP_USER_SDMA,
1182};
1183
1184static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1185 {
1186 .pa_start = 0x48040000,
1187 .pa_end = 0x4804007f,
1188 .flags = ADDR_TYPE_RT
1189 },
1190};
1191
1192/* l4_per -> dss */
1193static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1194 .master = &omap44xx_l4_per_hwmod,
1195 .slave = &omap44xx_dss_hwmod,
1196 .clk = "l4_div_ck",
1197 .addr = omap44xx_dss_addrs,
1198 .addr_cnt = ARRAY_SIZE(omap44xx_dss_addrs),
1199 .user = OCP_USER_MPU,
1200};
1201
1202/* dss slave ports */
1203static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1204 &omap44xx_l3_main_2__dss,
1205 &omap44xx_l4_per__dss,
1206};
1207
1208static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1209 { .role = "sys_clk", .clk = "dss_sys_clk" },
1210 { .role = "tv_clk", .clk = "dss_tv_clk" },
1211 { .role = "dss_clk", .clk = "dss_dss_clk" },
1212 { .role = "video_clk", .clk = "dss_48mhz_clk" },
1213};
1214
1215static struct omap_hwmod omap44xx_dss_hwmod = {
1216 .name = "dss_core",
1217 .class = &omap44xx_dss_hwmod_class,
1218 .main_clk = "dss_fck",
1219 .prcm = {
1220 .omap4 = {
1221 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1222 },
1223 },
1224 .opt_clks = dss_opt_clks,
1225 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1226 .slaves = omap44xx_dss_slaves,
1227 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1228 .masters = omap44xx_dss_masters,
1229 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
1230 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1231};
1232
1233/*
1234 * 'dispc' class
1235 * display controller
1236 */
1237
1238static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
1239 .rev_offs = 0x0000,
1240 .sysc_offs = 0x0010,
1241 .syss_offs = 0x0014,
1242 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1243 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
1244 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1245 SYSS_HAS_RESET_STATUS),
1246 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1247 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1248 .sysc_fields = &omap_hwmod_sysc_type1,
1249};
1250
1251static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1252 .name = "dispc",
1253 .sysc = &omap44xx_dispc_sysc,
1254};
1255
1256/* dss_dispc */
1257static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1258static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1259 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
1260};
1261
1262static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1263 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
1264};
1265
1266static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1267 {
1268 .pa_start = 0x58001000,
1269 .pa_end = 0x58001fff,
1270 .flags = ADDR_TYPE_RT
1271 },
1272};
1273
1274/* l3_main_2 -> dss_dispc */
1275static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1276 .master = &omap44xx_l3_main_2_hwmod,
1277 .slave = &omap44xx_dss_dispc_hwmod,
1278 .clk = "l3_div_ck",
1279 .addr = omap44xx_dss_dispc_dma_addrs,
1280 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_dma_addrs),
1281 .user = OCP_USER_SDMA,
1282};
1283
1284static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1285 {
1286 .pa_start = 0x48041000,
1287 .pa_end = 0x48041fff,
1288 .flags = ADDR_TYPE_RT
1289 },
1290};
1291
1292/* l4_per -> dss_dispc */
1293static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1294 .master = &omap44xx_l4_per_hwmod,
1295 .slave = &omap44xx_dss_dispc_hwmod,
1296 .clk = "l4_div_ck",
1297 .addr = omap44xx_dss_dispc_addrs,
1298 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_addrs),
1299 .user = OCP_USER_MPU,
1300};
1301
1302/* dss_dispc slave ports */
1303static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1304 &omap44xx_l3_main_2__dss_dispc,
1305 &omap44xx_l4_per__dss_dispc,
1306};
1307
1308static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1309 .name = "dss_dispc",
1310 .class = &omap44xx_dispc_hwmod_class,
1311 .mpu_irqs = omap44xx_dss_dispc_irqs,
1312 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_irqs),
1313 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
1314 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_sdma_reqs),
1315 .main_clk = "dss_fck",
1316 .prcm = {
1317 .omap4 = {
1318 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1319 },
1320 },
1321 .slaves = omap44xx_dss_dispc_slaves,
1322 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
1323 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1324};
1325
1326/*
1327 * 'dsi' class
1328 * display serial interface controller
1329 */
1330
1331static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1332 .rev_offs = 0x0000,
1333 .sysc_offs = 0x0010,
1334 .syss_offs = 0x0014,
1335 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1336 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1337 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1338 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1339 .sysc_fields = &omap_hwmod_sysc_type1,
1340};
1341
1342static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1343 .name = "dsi",
1344 .sysc = &omap44xx_dsi_sysc,
1345};
1346
1347/* dss_dsi1 */
1348static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1349static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1350 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
1351};
1352
1353static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1354 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
1355};
1356
1357static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1358 {
1359 .pa_start = 0x58004000,
1360 .pa_end = 0x580041ff,
1361 .flags = ADDR_TYPE_RT
1362 },
1363};
1364
1365/* l3_main_2 -> dss_dsi1 */
1366static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1367 .master = &omap44xx_l3_main_2_hwmod,
1368 .slave = &omap44xx_dss_dsi1_hwmod,
1369 .clk = "l3_div_ck",
1370 .addr = omap44xx_dss_dsi1_dma_addrs,
1371 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_dma_addrs),
1372 .user = OCP_USER_SDMA,
1373};
1374
1375static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1376 {
1377 .pa_start = 0x48044000,
1378 .pa_end = 0x480441ff,
1379 .flags = ADDR_TYPE_RT
1380 },
1381};
1382
1383/* l4_per -> dss_dsi1 */
1384static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1385 .master = &omap44xx_l4_per_hwmod,
1386 .slave = &omap44xx_dss_dsi1_hwmod,
1387 .clk = "l4_div_ck",
1388 .addr = omap44xx_dss_dsi1_addrs,
1389 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_addrs),
1390 .user = OCP_USER_MPU,
1391};
1392
1393/* dss_dsi1 slave ports */
1394static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1395 &omap44xx_l3_main_2__dss_dsi1,
1396 &omap44xx_l4_per__dss_dsi1,
1397};
1398
1399static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1400 .name = "dss_dsi1",
1401 .class = &omap44xx_dsi_hwmod_class,
1402 .mpu_irqs = omap44xx_dss_dsi1_irqs,
1403 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_irqs),
1404 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
1405 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_sdma_reqs),
1406 .main_clk = "dss_fck",
1407 .prcm = {
1408 .omap4 = {
1409 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1410 },
1411 },
1412 .slaves = omap44xx_dss_dsi1_slaves,
1413 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
1414 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1415};
1416
1417/* dss_dsi2 */
1418static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1419static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1420 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
1421};
1422
1423static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1424 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
1425};
1426
1427static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1428 {
1429 .pa_start = 0x58005000,
1430 .pa_end = 0x580051ff,
1431 .flags = ADDR_TYPE_RT
1432 },
1433};
1434
1435/* l3_main_2 -> dss_dsi2 */
1436static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1437 .master = &omap44xx_l3_main_2_hwmod,
1438 .slave = &omap44xx_dss_dsi2_hwmod,
1439 .clk = "l3_div_ck",
1440 .addr = omap44xx_dss_dsi2_dma_addrs,
1441 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_dma_addrs),
1442 .user = OCP_USER_SDMA,
1443};
1444
1445static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1446 {
1447 .pa_start = 0x48045000,
1448 .pa_end = 0x480451ff,
1449 .flags = ADDR_TYPE_RT
1450 },
1451};
1452
1453/* l4_per -> dss_dsi2 */
1454static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1455 .master = &omap44xx_l4_per_hwmod,
1456 .slave = &omap44xx_dss_dsi2_hwmod,
1457 .clk = "l4_div_ck",
1458 .addr = omap44xx_dss_dsi2_addrs,
1459 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_addrs),
1460 .user = OCP_USER_MPU,
1461};
1462
1463/* dss_dsi2 slave ports */
1464static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1465 &omap44xx_l3_main_2__dss_dsi2,
1466 &omap44xx_l4_per__dss_dsi2,
1467};
1468
1469static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1470 .name = "dss_dsi2",
1471 .class = &omap44xx_dsi_hwmod_class,
1472 .mpu_irqs = omap44xx_dss_dsi2_irqs,
1473 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_irqs),
1474 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
1475 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_sdma_reqs),
1476 .main_clk = "dss_fck",
1477 .prcm = {
1478 .omap4 = {
1479 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1480 },
1481 },
1482 .slaves = omap44xx_dss_dsi2_slaves,
1483 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
1484 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1485};
1486
1487/*
1488 * 'hdmi' class
1489 * hdmi controller
1490 */
1491
1492static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1493 .rev_offs = 0x0000,
1494 .sysc_offs = 0x0010,
1495 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1496 SYSC_HAS_SOFTRESET),
1497 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1498 SIDLE_SMART_WKUP),
1499 .sysc_fields = &omap_hwmod_sysc_type2,
1500};
1501
1502static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1503 .name = "hdmi",
1504 .sysc = &omap44xx_hdmi_sysc,
1505};
1506
1507/* dss_hdmi */
1508static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1509static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1510 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
1511};
1512
1513static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1514 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
1515};
1516
1517static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1518 {
1519 .pa_start = 0x58006000,
1520 .pa_end = 0x58006fff,
1521 .flags = ADDR_TYPE_RT
1522 },
1523};
1524
1525/* l3_main_2 -> dss_hdmi */
1526static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1527 .master = &omap44xx_l3_main_2_hwmod,
1528 .slave = &omap44xx_dss_hdmi_hwmod,
1529 .clk = "l3_div_ck",
1530 .addr = omap44xx_dss_hdmi_dma_addrs,
1531 .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_dma_addrs),
1532 .user = OCP_USER_SDMA,
1533};
1534
1535static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1536 {
1537 .pa_start = 0x48046000,
1538 .pa_end = 0x48046fff,
1539 .flags = ADDR_TYPE_RT
1540 },
1541};
1542
1543/* l4_per -> dss_hdmi */
1544static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1545 .master = &omap44xx_l4_per_hwmod,
1546 .slave = &omap44xx_dss_hdmi_hwmod,
1547 .clk = "l4_div_ck",
1548 .addr = omap44xx_dss_hdmi_addrs,
1549 .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_addrs),
1550 .user = OCP_USER_MPU,
1551};
1552
1553/* dss_hdmi slave ports */
1554static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1555 &omap44xx_l3_main_2__dss_hdmi,
1556 &omap44xx_l4_per__dss_hdmi,
1557};
1558
1559static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1560 .name = "dss_hdmi",
1561 .class = &omap44xx_hdmi_hwmod_class,
1562 .mpu_irqs = omap44xx_dss_hdmi_irqs,
1563 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_irqs),
1564 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
1565 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_sdma_reqs),
1566 .main_clk = "dss_fck",
1567 .prcm = {
1568 .omap4 = {
1569 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1570 },
1571 },
1572 .slaves = omap44xx_dss_hdmi_slaves,
1573 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
1574 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1575};
1576
1577/*
1578 * 'rfbi' class
1579 * remote frame buffer interface
1580 */
1581
1582static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1583 .rev_offs = 0x0000,
1584 .sysc_offs = 0x0010,
1585 .syss_offs = 0x0014,
1586 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1587 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1588 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1589 .sysc_fields = &omap_hwmod_sysc_type1,
1590};
1591
1592static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1593 .name = "rfbi",
1594 .sysc = &omap44xx_rfbi_sysc,
1595};
1596
1597/* dss_rfbi */
1598static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1599static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1600 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
1601};
1602
1603static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1604 {
1605 .pa_start = 0x58002000,
1606 .pa_end = 0x580020ff,
1607 .flags = ADDR_TYPE_RT
1608 },
1609};
1610
1611/* l3_main_2 -> dss_rfbi */
1612static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1613 .master = &omap44xx_l3_main_2_hwmod,
1614 .slave = &omap44xx_dss_rfbi_hwmod,
1615 .clk = "l3_div_ck",
1616 .addr = omap44xx_dss_rfbi_dma_addrs,
1617 .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_dma_addrs),
1618 .user = OCP_USER_SDMA,
1619};
1620
1621static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1622 {
1623 .pa_start = 0x48042000,
1624 .pa_end = 0x480420ff,
1625 .flags = ADDR_TYPE_RT
1626 },
1627};
1628
1629/* l4_per -> dss_rfbi */
1630static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1631 .master = &omap44xx_l4_per_hwmod,
1632 .slave = &omap44xx_dss_rfbi_hwmod,
1633 .clk = "l4_div_ck",
1634 .addr = omap44xx_dss_rfbi_addrs,
1635 .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_addrs),
1636 .user = OCP_USER_MPU,
1637};
1638
1639/* dss_rfbi slave ports */
1640static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1641 &omap44xx_l3_main_2__dss_rfbi,
1642 &omap44xx_l4_per__dss_rfbi,
1643};
1644
1645static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1646 .name = "dss_rfbi",
1647 .class = &omap44xx_rfbi_hwmod_class,
1648 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
1649 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_sdma_reqs),
1650 .main_clk = "dss_fck",
1651 .prcm = {
1652 .omap4 = {
1653 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1654 },
1655 },
1656 .slaves = omap44xx_dss_rfbi_slaves,
1657 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
1658 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1659};
1660
1661/*
1662 * 'venc' class
1663 * video encoder
1664 */
1665
1666static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1667 .name = "venc",
1668};
1669
1670/* dss_venc */
1671static struct omap_hwmod omap44xx_dss_venc_hwmod;
1672static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1673 {
1674 .pa_start = 0x58003000,
1675 .pa_end = 0x580030ff,
1676 .flags = ADDR_TYPE_RT
1677 },
1678};
1679
1680/* l3_main_2 -> dss_venc */
1681static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1682 .master = &omap44xx_l3_main_2_hwmod,
1683 .slave = &omap44xx_dss_venc_hwmod,
1684 .clk = "l3_div_ck",
1685 .addr = omap44xx_dss_venc_dma_addrs,
1686 .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_dma_addrs),
1687 .user = OCP_USER_SDMA,
1688};
1689
1690static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1691 {
1692 .pa_start = 0x48043000,
1693 .pa_end = 0x480430ff,
1694 .flags = ADDR_TYPE_RT
1695 },
1696};
1697
1698/* l4_per -> dss_venc */
1699static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1700 .master = &omap44xx_l4_per_hwmod,
1701 .slave = &omap44xx_dss_venc_hwmod,
1702 .clk = "l4_div_ck",
1703 .addr = omap44xx_dss_venc_addrs,
1704 .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_addrs),
1705 .user = OCP_USER_MPU,
1706};
1707
1708/* dss_venc slave ports */
1709static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1710 &omap44xx_l3_main_2__dss_venc,
1711 &omap44xx_l4_per__dss_venc,
1712};
1713
1714static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1715 .name = "dss_venc",
1716 .class = &omap44xx_venc_hwmod_class,
1717 .main_clk = "dss_fck",
1718 .prcm = {
1719 .omap4 = {
1720 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL,
1721 },
1722 },
1723 .slaves = omap44xx_dss_venc_slaves,
1724 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
1725 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1726};
1727
1728/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001729 * 'gpio' class
1730 * general purpose io module
1731 */
1732
1733static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1734 .rev_offs = 0x0000,
1735 .sysc_offs = 0x0010,
1736 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001737 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1738 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1739 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001740 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1741 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001742 .sysc_fields = &omap_hwmod_sysc_type1,
1743};
1744
1745static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001746 .name = "gpio",
1747 .sysc = &omap44xx_gpio_sysc,
1748 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001749};
1750
1751/* gpio dev_attr */
1752static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001753 .bank_width = 32,
1754 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001755};
1756
1757/* gpio1 */
1758static struct omap_hwmod omap44xx_gpio1_hwmod;
1759static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1760 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
1761};
1762
1763static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1764 {
1765 .pa_start = 0x4a310000,
1766 .pa_end = 0x4a3101ff,
1767 .flags = ADDR_TYPE_RT
1768 },
1769};
1770
1771/* l4_wkup -> gpio1 */
1772static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1773 .master = &omap44xx_l4_wkup_hwmod,
1774 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001775 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001776 .addr = omap44xx_gpio1_addrs,
1777 .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs),
1778 .user = OCP_USER_MPU | OCP_USER_SDMA,
1779};
1780
1781/* gpio1 slave ports */
1782static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1783 &omap44xx_l4_wkup__gpio1,
1784};
1785
1786static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001787 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001788};
1789
1790static struct omap_hwmod omap44xx_gpio1_hwmod = {
1791 .name = "gpio1",
1792 .class = &omap44xx_gpio_hwmod_class,
1793 .mpu_irqs = omap44xx_gpio1_irqs,
1794 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs),
1795 .main_clk = "gpio1_ick",
1796 .prcm = {
1797 .omap4 = {
1798 .clkctrl_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL,
1799 },
1800 },
1801 .opt_clks = gpio1_opt_clks,
1802 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1803 .dev_attr = &gpio_dev_attr,
1804 .slaves = omap44xx_gpio1_slaves,
1805 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
1806 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1807};
1808
1809/* gpio2 */
1810static struct omap_hwmod omap44xx_gpio2_hwmod;
1811static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1812 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
1813};
1814
1815static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1816 {
1817 .pa_start = 0x48055000,
1818 .pa_end = 0x480551ff,
1819 .flags = ADDR_TYPE_RT
1820 },
1821};
1822
1823/* l4_per -> gpio2 */
1824static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1825 .master = &omap44xx_l4_per_hwmod,
1826 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001827 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001828 .addr = omap44xx_gpio2_addrs,
1829 .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs),
1830 .user = OCP_USER_MPU | OCP_USER_SDMA,
1831};
1832
1833/* gpio2 slave ports */
1834static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1835 &omap44xx_l4_per__gpio2,
1836};
1837
1838static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001839 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001840};
1841
1842static struct omap_hwmod omap44xx_gpio2_hwmod = {
1843 .name = "gpio2",
1844 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001845 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001846 .mpu_irqs = omap44xx_gpio2_irqs,
1847 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs),
1848 .main_clk = "gpio2_ick",
1849 .prcm = {
1850 .omap4 = {
1851 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL,
1852 },
1853 },
1854 .opt_clks = gpio2_opt_clks,
1855 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1856 .dev_attr = &gpio_dev_attr,
1857 .slaves = omap44xx_gpio2_slaves,
1858 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
1859 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1860};
1861
1862/* gpio3 */
1863static struct omap_hwmod omap44xx_gpio3_hwmod;
1864static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1865 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
1866};
1867
1868static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1869 {
1870 .pa_start = 0x48057000,
1871 .pa_end = 0x480571ff,
1872 .flags = ADDR_TYPE_RT
1873 },
1874};
1875
1876/* l4_per -> gpio3 */
1877static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1878 .master = &omap44xx_l4_per_hwmod,
1879 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001880 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001881 .addr = omap44xx_gpio3_addrs,
1882 .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs),
1883 .user = OCP_USER_MPU | OCP_USER_SDMA,
1884};
1885
1886/* gpio3 slave ports */
1887static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1888 &omap44xx_l4_per__gpio3,
1889};
1890
1891static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001892 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001893};
1894
1895static struct omap_hwmod omap44xx_gpio3_hwmod = {
1896 .name = "gpio3",
1897 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001898 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001899 .mpu_irqs = omap44xx_gpio3_irqs,
1900 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs),
1901 .main_clk = "gpio3_ick",
1902 .prcm = {
1903 .omap4 = {
1904 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL,
1905 },
1906 },
1907 .opt_clks = gpio3_opt_clks,
1908 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1909 .dev_attr = &gpio_dev_attr,
1910 .slaves = omap44xx_gpio3_slaves,
1911 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
1912 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1913};
1914
1915/* gpio4 */
1916static struct omap_hwmod omap44xx_gpio4_hwmod;
1917static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1918 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
1919};
1920
1921static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
1922 {
1923 .pa_start = 0x48059000,
1924 .pa_end = 0x480591ff,
1925 .flags = ADDR_TYPE_RT
1926 },
1927};
1928
1929/* l4_per -> gpio4 */
1930static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
1931 .master = &omap44xx_l4_per_hwmod,
1932 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001933 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001934 .addr = omap44xx_gpio4_addrs,
1935 .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs),
1936 .user = OCP_USER_MPU | OCP_USER_SDMA,
1937};
1938
1939/* gpio4 slave ports */
1940static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
1941 &omap44xx_l4_per__gpio4,
1942};
1943
1944static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001945 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001946};
1947
1948static struct omap_hwmod omap44xx_gpio4_hwmod = {
1949 .name = "gpio4",
1950 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001951 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001952 .mpu_irqs = omap44xx_gpio4_irqs,
1953 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs),
1954 .main_clk = "gpio4_ick",
1955 .prcm = {
1956 .omap4 = {
1957 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL,
1958 },
1959 },
1960 .opt_clks = gpio4_opt_clks,
1961 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
1962 .dev_attr = &gpio_dev_attr,
1963 .slaves = omap44xx_gpio4_slaves,
1964 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
1965 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1966};
1967
1968/* gpio5 */
1969static struct omap_hwmod omap44xx_gpio5_hwmod;
1970static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
1971 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
1972};
1973
1974static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
1975 {
1976 .pa_start = 0x4805b000,
1977 .pa_end = 0x4805b1ff,
1978 .flags = ADDR_TYPE_RT
1979 },
1980};
1981
1982/* l4_per -> gpio5 */
1983static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
1984 .master = &omap44xx_l4_per_hwmod,
1985 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001986 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001987 .addr = omap44xx_gpio5_addrs,
1988 .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs),
1989 .user = OCP_USER_MPU | OCP_USER_SDMA,
1990};
1991
1992/* gpio5 slave ports */
1993static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
1994 &omap44xx_l4_per__gpio5,
1995};
1996
1997static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001998 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001999};
2000
2001static struct omap_hwmod omap44xx_gpio5_hwmod = {
2002 .name = "gpio5",
2003 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002004 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002005 .mpu_irqs = omap44xx_gpio5_irqs,
2006 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs),
2007 .main_clk = "gpio5_ick",
2008 .prcm = {
2009 .omap4 = {
2010 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL,
2011 },
2012 },
2013 .opt_clks = gpio5_opt_clks,
2014 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2015 .dev_attr = &gpio_dev_attr,
2016 .slaves = omap44xx_gpio5_slaves,
2017 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
2018 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2019};
2020
2021/* gpio6 */
2022static struct omap_hwmod omap44xx_gpio6_hwmod;
2023static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2024 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
2025};
2026
2027static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2028 {
2029 .pa_start = 0x4805d000,
2030 .pa_end = 0x4805d1ff,
2031 .flags = ADDR_TYPE_RT
2032 },
2033};
2034
2035/* l4_per -> gpio6 */
2036static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2037 .master = &omap44xx_l4_per_hwmod,
2038 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002039 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002040 .addr = omap44xx_gpio6_addrs,
2041 .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs),
2042 .user = OCP_USER_MPU | OCP_USER_SDMA,
2043};
2044
2045/* gpio6 slave ports */
2046static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2047 &omap44xx_l4_per__gpio6,
2048};
2049
2050static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002051 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002052};
2053
2054static struct omap_hwmod omap44xx_gpio6_hwmod = {
2055 .name = "gpio6",
2056 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002057 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002058 .mpu_irqs = omap44xx_gpio6_irqs,
2059 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs),
2060 .main_clk = "gpio6_ick",
2061 .prcm = {
2062 .omap4 = {
2063 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL,
2064 },
2065 },
2066 .opt_clks = gpio6_opt_clks,
2067 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2068 .dev_attr = &gpio_dev_attr,
2069 .slaves = omap44xx_gpio6_slaves,
2070 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
2071 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2072};
2073
2074/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002075 * 'hsi' class
2076 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2077 * serial if)
2078 */
2079
2080static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2081 .rev_offs = 0x0000,
2082 .sysc_offs = 0x0010,
2083 .syss_offs = 0x0014,
2084 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2085 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2086 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2087 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2088 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2089 MSTANDBY_SMART),
2090 .sysc_fields = &omap_hwmod_sysc_type1,
2091};
2092
2093static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2094 .name = "hsi",
2095 .sysc = &omap44xx_hsi_sysc,
2096};
2097
2098/* hsi */
2099static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2100 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2101 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2102 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
2103};
2104
2105/* hsi master ports */
2106static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2107 &omap44xx_hsi__l3_main_2,
2108};
2109
2110static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2111 {
2112 .pa_start = 0x4a058000,
2113 .pa_end = 0x4a05bfff,
2114 .flags = ADDR_TYPE_RT
2115 },
2116};
2117
2118/* l4_cfg -> hsi */
2119static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2120 .master = &omap44xx_l4_cfg_hwmod,
2121 .slave = &omap44xx_hsi_hwmod,
2122 .clk = "l4_div_ck",
2123 .addr = omap44xx_hsi_addrs,
2124 .addr_cnt = ARRAY_SIZE(omap44xx_hsi_addrs),
2125 .user = OCP_USER_MPU | OCP_USER_SDMA,
2126};
2127
2128/* hsi slave ports */
2129static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2130 &omap44xx_l4_cfg__hsi,
2131};
2132
2133static struct omap_hwmod omap44xx_hsi_hwmod = {
2134 .name = "hsi",
2135 .class = &omap44xx_hsi_hwmod_class,
2136 .mpu_irqs = omap44xx_hsi_irqs,
2137 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_hsi_irqs),
2138 .main_clk = "hsi_fck",
2139 .prcm = {
2140 .omap4 = {
2141 .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
2142 },
2143 },
2144 .slaves = omap44xx_hsi_slaves,
2145 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2146 .masters = omap44xx_hsi_masters,
2147 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
2148 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2149};
2150
2151/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302152 * 'i2c' class
2153 * multimaster high-speed i2c controller
2154 */
2155
2156static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2157 .sysc_offs = 0x0010,
2158 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002159 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2160 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002161 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002162 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2163 SIDLE_SMART_WKUP),
Benoit Coussonf7764712010-09-21 19:37:14 +05302164 .sysc_fields = &omap_hwmod_sysc_type1,
2165};
2166
2167static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002168 .name = "i2c",
2169 .sysc = &omap44xx_i2c_sysc,
Benoit Coussonf7764712010-09-21 19:37:14 +05302170};
2171
2172/* i2c1 */
2173static struct omap_hwmod omap44xx_i2c1_hwmod;
2174static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2175 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
2176};
2177
2178static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2179 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2180 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
2181};
2182
2183static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2184 {
2185 .pa_start = 0x48070000,
2186 .pa_end = 0x480700ff,
2187 .flags = ADDR_TYPE_RT
2188 },
2189};
2190
2191/* l4_per -> i2c1 */
2192static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2193 .master = &omap44xx_l4_per_hwmod,
2194 .slave = &omap44xx_i2c1_hwmod,
2195 .clk = "l4_div_ck",
2196 .addr = omap44xx_i2c1_addrs,
2197 .addr_cnt = ARRAY_SIZE(omap44xx_i2c1_addrs),
2198 .user = OCP_USER_MPU | OCP_USER_SDMA,
2199};
2200
2201/* i2c1 slave ports */
2202static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2203 &omap44xx_l4_per__i2c1,
2204};
2205
2206static struct omap_hwmod omap44xx_i2c1_hwmod = {
2207 .name = "i2c1",
2208 .class = &omap44xx_i2c_hwmod_class,
2209 .flags = HWMOD_INIT_NO_RESET,
2210 .mpu_irqs = omap44xx_i2c1_irqs,
2211 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c1_irqs),
2212 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
2213 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs),
2214 .main_clk = "i2c1_fck",
2215 .prcm = {
2216 .omap4 = {
2217 .clkctrl_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL,
2218 },
2219 },
2220 .slaves = omap44xx_i2c1_slaves,
2221 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
2222 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2223};
2224
2225/* i2c2 */
2226static struct omap_hwmod omap44xx_i2c2_hwmod;
2227static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2228 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
2229};
2230
2231static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2232 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2233 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
2234};
2235
2236static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2237 {
2238 .pa_start = 0x48072000,
2239 .pa_end = 0x480720ff,
2240 .flags = ADDR_TYPE_RT
2241 },
2242};
2243
2244/* l4_per -> i2c2 */
2245static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2246 .master = &omap44xx_l4_per_hwmod,
2247 .slave = &omap44xx_i2c2_hwmod,
2248 .clk = "l4_div_ck",
2249 .addr = omap44xx_i2c2_addrs,
2250 .addr_cnt = ARRAY_SIZE(omap44xx_i2c2_addrs),
2251 .user = OCP_USER_MPU | OCP_USER_SDMA,
2252};
2253
2254/* i2c2 slave ports */
2255static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2256 &omap44xx_l4_per__i2c2,
2257};
2258
2259static struct omap_hwmod omap44xx_i2c2_hwmod = {
2260 .name = "i2c2",
2261 .class = &omap44xx_i2c_hwmod_class,
2262 .flags = HWMOD_INIT_NO_RESET,
2263 .mpu_irqs = omap44xx_i2c2_irqs,
2264 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c2_irqs),
2265 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
2266 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs),
2267 .main_clk = "i2c2_fck",
2268 .prcm = {
2269 .omap4 = {
2270 .clkctrl_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL,
2271 },
2272 },
2273 .slaves = omap44xx_i2c2_slaves,
2274 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
2275 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2276};
2277
2278/* i2c3 */
2279static struct omap_hwmod omap44xx_i2c3_hwmod;
2280static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2281 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
2282};
2283
2284static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2285 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2286 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
2287};
2288
2289static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2290 {
2291 .pa_start = 0x48060000,
2292 .pa_end = 0x480600ff,
2293 .flags = ADDR_TYPE_RT
2294 },
2295};
2296
2297/* l4_per -> i2c3 */
2298static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2299 .master = &omap44xx_l4_per_hwmod,
2300 .slave = &omap44xx_i2c3_hwmod,
2301 .clk = "l4_div_ck",
2302 .addr = omap44xx_i2c3_addrs,
2303 .addr_cnt = ARRAY_SIZE(omap44xx_i2c3_addrs),
2304 .user = OCP_USER_MPU | OCP_USER_SDMA,
2305};
2306
2307/* i2c3 slave ports */
2308static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2309 &omap44xx_l4_per__i2c3,
2310};
2311
2312static struct omap_hwmod omap44xx_i2c3_hwmod = {
2313 .name = "i2c3",
2314 .class = &omap44xx_i2c_hwmod_class,
2315 .flags = HWMOD_INIT_NO_RESET,
2316 .mpu_irqs = omap44xx_i2c3_irqs,
2317 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c3_irqs),
2318 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
2319 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs),
2320 .main_clk = "i2c3_fck",
2321 .prcm = {
2322 .omap4 = {
2323 .clkctrl_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL,
2324 },
2325 },
2326 .slaves = omap44xx_i2c3_slaves,
2327 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
2328 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2329};
2330
2331/* i2c4 */
2332static struct omap_hwmod omap44xx_i2c4_hwmod;
2333static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2334 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
2335};
2336
2337static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2338 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2339 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
2340};
2341
2342static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2343 {
2344 .pa_start = 0x48350000,
2345 .pa_end = 0x483500ff,
2346 .flags = ADDR_TYPE_RT
2347 },
2348};
2349
2350/* l4_per -> i2c4 */
2351static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2352 .master = &omap44xx_l4_per_hwmod,
2353 .slave = &omap44xx_i2c4_hwmod,
2354 .clk = "l4_div_ck",
2355 .addr = omap44xx_i2c4_addrs,
2356 .addr_cnt = ARRAY_SIZE(omap44xx_i2c4_addrs),
2357 .user = OCP_USER_MPU | OCP_USER_SDMA,
2358};
2359
2360/* i2c4 slave ports */
2361static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2362 &omap44xx_l4_per__i2c4,
2363};
2364
2365static struct omap_hwmod omap44xx_i2c4_hwmod = {
2366 .name = "i2c4",
2367 .class = &omap44xx_i2c_hwmod_class,
2368 .flags = HWMOD_INIT_NO_RESET,
2369 .mpu_irqs = omap44xx_i2c4_irqs,
2370 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c4_irqs),
2371 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
2372 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs),
2373 .main_clk = "i2c4_fck",
2374 .prcm = {
2375 .omap4 = {
2376 .clkctrl_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL,
2377 },
2378 },
2379 .slaves = omap44xx_i2c4_slaves,
2380 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
2381 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2382};
2383
2384/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002385 * 'ipu' class
2386 * imaging processor unit
2387 */
2388
2389static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2390 .name = "ipu",
2391};
2392
2393/* ipu */
2394static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2395 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
2396};
2397
2398static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2399 { .name = "cpu0", .rst_shift = 0 },
2400};
2401
2402static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2403 { .name = "cpu1", .rst_shift = 1 },
2404};
2405
2406static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2407 { .name = "mmu_cache", .rst_shift = 2 },
2408};
2409
2410/* ipu master ports */
2411static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2412 &omap44xx_ipu__l3_main_2,
2413};
2414
2415/* l3_main_2 -> ipu */
2416static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2417 .master = &omap44xx_l3_main_2_hwmod,
2418 .slave = &omap44xx_ipu_hwmod,
2419 .clk = "l3_div_ck",
2420 .user = OCP_USER_MPU | OCP_USER_SDMA,
2421};
2422
2423/* ipu slave ports */
2424static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2425 &omap44xx_l3_main_2__ipu,
2426};
2427
2428/* Pseudo hwmod for reset control purpose only */
2429static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2430 .name = "ipu_c0",
2431 .class = &omap44xx_ipu_hwmod_class,
2432 .flags = HWMOD_INIT_NO_RESET,
2433 .rst_lines = omap44xx_ipu_c0_resets,
2434 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
2435 .prcm = {
2436 .omap4 = {
2437 .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
2438 },
2439 },
2440 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2441};
2442
2443/* Pseudo hwmod for reset control purpose only */
2444static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2445 .name = "ipu_c1",
2446 .class = &omap44xx_ipu_hwmod_class,
2447 .flags = HWMOD_INIT_NO_RESET,
2448 .rst_lines = omap44xx_ipu_c1_resets,
2449 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
2450 .prcm = {
2451 .omap4 = {
2452 .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
2453 },
2454 },
2455 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2456};
2457
2458static struct omap_hwmod omap44xx_ipu_hwmod = {
2459 .name = "ipu",
2460 .class = &omap44xx_ipu_hwmod_class,
2461 .mpu_irqs = omap44xx_ipu_irqs,
2462 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_ipu_irqs),
2463 .rst_lines = omap44xx_ipu_resets,
2464 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2465 .main_clk = "ipu_fck",
2466 .prcm = {
2467 .omap4 = {
2468 .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
2469 .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
2470 },
2471 },
2472 .slaves = omap44xx_ipu_slaves,
2473 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2474 .masters = omap44xx_ipu_masters,
2475 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
2476 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2477};
2478
2479/*
2480 * 'iss' class
2481 * external images sensor pixel data processor
2482 */
2483
2484static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2485 .rev_offs = 0x0000,
2486 .sysc_offs = 0x0010,
2487 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2488 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2489 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2490 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2491 MSTANDBY_SMART),
2492 .sysc_fields = &omap_hwmod_sysc_type2,
2493};
2494
2495static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2496 .name = "iss",
2497 .sysc = &omap44xx_iss_sysc,
2498};
2499
2500/* iss */
2501static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2502 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
2503};
2504
2505static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2506 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2507 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2508 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2509 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
2510};
2511
2512/* iss master ports */
2513static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2514 &omap44xx_iss__l3_main_2,
2515};
2516
2517static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2518 {
2519 .pa_start = 0x52000000,
2520 .pa_end = 0x520000ff,
2521 .flags = ADDR_TYPE_RT
2522 },
2523};
2524
2525/* l3_main_2 -> iss */
2526static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2527 .master = &omap44xx_l3_main_2_hwmod,
2528 .slave = &omap44xx_iss_hwmod,
2529 .clk = "l3_div_ck",
2530 .addr = omap44xx_iss_addrs,
2531 .addr_cnt = ARRAY_SIZE(omap44xx_iss_addrs),
2532 .user = OCP_USER_MPU | OCP_USER_SDMA,
2533};
2534
2535/* iss slave ports */
2536static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2537 &omap44xx_l3_main_2__iss,
2538};
2539
2540static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2541 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2542};
2543
2544static struct omap_hwmod omap44xx_iss_hwmod = {
2545 .name = "iss",
2546 .class = &omap44xx_iss_hwmod_class,
2547 .mpu_irqs = omap44xx_iss_irqs,
2548 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iss_irqs),
2549 .sdma_reqs = omap44xx_iss_sdma_reqs,
2550 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_iss_sdma_reqs),
2551 .main_clk = "iss_fck",
2552 .prcm = {
2553 .omap4 = {
2554 .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
2555 },
2556 },
2557 .opt_clks = iss_opt_clks,
2558 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2559 .slaves = omap44xx_iss_slaves,
2560 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2561 .masters = omap44xx_iss_masters,
2562 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
2563 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2564};
2565
2566/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002567 * 'iva' class
2568 * multi-standard video encoder/decoder hardware accelerator
2569 */
2570
2571static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002572 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002573};
2574
2575/* iva */
2576static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2577 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2578 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2579 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
2580};
2581
2582static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2583 { .name = "logic", .rst_shift = 2 },
2584};
2585
2586static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2587 { .name = "seq0", .rst_shift = 0 },
2588};
2589
2590static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2591 { .name = "seq1", .rst_shift = 1 },
2592};
2593
2594/* iva master ports */
2595static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2596 &omap44xx_iva__l3_main_2,
2597 &omap44xx_iva__l3_instr,
2598};
2599
2600static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2601 {
2602 .pa_start = 0x5a000000,
2603 .pa_end = 0x5a07ffff,
2604 .flags = ADDR_TYPE_RT
2605 },
2606};
2607
2608/* l3_main_2 -> iva */
2609static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2610 .master = &omap44xx_l3_main_2_hwmod,
2611 .slave = &omap44xx_iva_hwmod,
2612 .clk = "l3_div_ck",
2613 .addr = omap44xx_iva_addrs,
2614 .addr_cnt = ARRAY_SIZE(omap44xx_iva_addrs),
2615 .user = OCP_USER_MPU,
2616};
2617
2618/* iva slave ports */
2619static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2620 &omap44xx_dsp__iva,
2621 &omap44xx_l3_main_2__iva,
2622};
2623
2624/* Pseudo hwmod for reset control purpose only */
2625static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2626 .name = "iva_seq0",
2627 .class = &omap44xx_iva_hwmod_class,
2628 .flags = HWMOD_INIT_NO_RESET,
2629 .rst_lines = omap44xx_iva_seq0_resets,
2630 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2631 .prcm = {
2632 .omap4 = {
2633 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
2634 },
2635 },
2636 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2637};
2638
2639/* Pseudo hwmod for reset control purpose only */
2640static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2641 .name = "iva_seq1",
2642 .class = &omap44xx_iva_hwmod_class,
2643 .flags = HWMOD_INIT_NO_RESET,
2644 .rst_lines = omap44xx_iva_seq1_resets,
2645 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2646 .prcm = {
2647 .omap4 = {
2648 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
2649 },
2650 },
2651 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2652};
2653
2654static struct omap_hwmod omap44xx_iva_hwmod = {
2655 .name = "iva",
2656 .class = &omap44xx_iva_hwmod_class,
2657 .mpu_irqs = omap44xx_iva_irqs,
2658 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iva_irqs),
2659 .rst_lines = omap44xx_iva_resets,
2660 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2661 .main_clk = "iva_fck",
2662 .prcm = {
2663 .omap4 = {
2664 .clkctrl_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL,
2665 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL,
2666 },
2667 },
2668 .slaves = omap44xx_iva_slaves,
2669 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2670 .masters = omap44xx_iva_masters,
2671 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
2672 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2673};
2674
2675/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002676 * 'kbd' class
2677 * keyboard controller
2678 */
2679
2680static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2681 .rev_offs = 0x0000,
2682 .sysc_offs = 0x0010,
2683 .syss_offs = 0x0014,
2684 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2685 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2686 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2687 SYSS_HAS_RESET_STATUS),
2688 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2689 .sysc_fields = &omap_hwmod_sysc_type1,
2690};
2691
2692static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2693 .name = "kbd",
2694 .sysc = &omap44xx_kbd_sysc,
2695};
2696
2697/* kbd */
2698static struct omap_hwmod omap44xx_kbd_hwmod;
2699static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2700 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
2701};
2702
2703static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2704 {
2705 .pa_start = 0x4a31c000,
2706 .pa_end = 0x4a31c07f,
2707 .flags = ADDR_TYPE_RT
2708 },
2709};
2710
2711/* l4_wkup -> kbd */
2712static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2713 .master = &omap44xx_l4_wkup_hwmod,
2714 .slave = &omap44xx_kbd_hwmod,
2715 .clk = "l4_wkup_clk_mux_ck",
2716 .addr = omap44xx_kbd_addrs,
2717 .addr_cnt = ARRAY_SIZE(omap44xx_kbd_addrs),
2718 .user = OCP_USER_MPU | OCP_USER_SDMA,
2719};
2720
2721/* kbd slave ports */
2722static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2723 &omap44xx_l4_wkup__kbd,
2724};
2725
2726static struct omap_hwmod omap44xx_kbd_hwmod = {
2727 .name = "kbd",
2728 .class = &omap44xx_kbd_hwmod_class,
2729 .mpu_irqs = omap44xx_kbd_irqs,
2730 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_kbd_irqs),
2731 .main_clk = "kbd_fck",
2732 .prcm = {
2733 .omap4 = {
2734 .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
2735 },
2736 },
2737 .slaves = omap44xx_kbd_slaves,
2738 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
2739 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2740};
2741
2742/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002743 * 'mailbox' class
2744 * mailbox module allowing communication between the on-chip processors using a
2745 * queued mailbox-interrupt mechanism.
2746 */
2747
2748static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2749 .rev_offs = 0x0000,
2750 .sysc_offs = 0x0010,
2751 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2752 SYSC_HAS_SOFTRESET),
2753 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2754 .sysc_fields = &omap_hwmod_sysc_type2,
2755};
2756
2757static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2758 .name = "mailbox",
2759 .sysc = &omap44xx_mailbox_sysc,
2760};
2761
2762/* mailbox */
2763static struct omap_hwmod omap44xx_mailbox_hwmod;
2764static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2765 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
2766};
2767
2768static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2769 {
2770 .pa_start = 0x4a0f4000,
2771 .pa_end = 0x4a0f41ff,
2772 .flags = ADDR_TYPE_RT
2773 },
2774};
2775
2776/* l4_cfg -> mailbox */
2777static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2778 .master = &omap44xx_l4_cfg_hwmod,
2779 .slave = &omap44xx_mailbox_hwmod,
2780 .clk = "l4_div_ck",
2781 .addr = omap44xx_mailbox_addrs,
2782 .addr_cnt = ARRAY_SIZE(omap44xx_mailbox_addrs),
2783 .user = OCP_USER_MPU | OCP_USER_SDMA,
2784};
2785
2786/* mailbox slave ports */
2787static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2788 &omap44xx_l4_cfg__mailbox,
2789};
2790
2791static struct omap_hwmod omap44xx_mailbox_hwmod = {
2792 .name = "mailbox",
2793 .class = &omap44xx_mailbox_hwmod_class,
2794 .mpu_irqs = omap44xx_mailbox_irqs,
2795 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mailbox_irqs),
2796 .prcm = {
2797 .omap4 = {
2798 .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL,
2799 },
2800 },
2801 .slaves = omap44xx_mailbox_slaves,
2802 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
2803 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2804};
2805
2806/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002807 * 'mcbsp' class
2808 * multi channel buffered serial port controller
2809 */
2810
2811static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2812 .sysc_offs = 0x008c,
2813 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2814 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2815 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2816 .sysc_fields = &omap_hwmod_sysc_type1,
2817};
2818
2819static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2820 .name = "mcbsp",
2821 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302822 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002823};
2824
2825/* mcbsp1 */
2826static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2827static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2828 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
2829};
2830
2831static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2832 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2833 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
2834};
2835
2836static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2837 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302838 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002839 .pa_start = 0x40122000,
2840 .pa_end = 0x401220ff,
2841 .flags = ADDR_TYPE_RT
2842 },
2843};
2844
2845/* l4_abe -> mcbsp1 */
2846static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2847 .master = &omap44xx_l4_abe_hwmod,
2848 .slave = &omap44xx_mcbsp1_hwmod,
2849 .clk = "ocp_abe_iclk",
2850 .addr = omap44xx_mcbsp1_addrs,
2851 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_addrs),
2852 .user = OCP_USER_MPU,
2853};
2854
2855static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2856 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302857 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002858 .pa_start = 0x49022000,
2859 .pa_end = 0x490220ff,
2860 .flags = ADDR_TYPE_RT
2861 },
2862};
2863
2864/* l4_abe -> mcbsp1 (dma) */
2865static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2866 .master = &omap44xx_l4_abe_hwmod,
2867 .slave = &omap44xx_mcbsp1_hwmod,
2868 .clk = "ocp_abe_iclk",
2869 .addr = omap44xx_mcbsp1_dma_addrs,
2870 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs),
2871 .user = OCP_USER_SDMA,
2872};
2873
2874/* mcbsp1 slave ports */
2875static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2876 &omap44xx_l4_abe__mcbsp1,
2877 &omap44xx_l4_abe__mcbsp1_dma,
2878};
2879
2880static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2881 .name = "mcbsp1",
2882 .class = &omap44xx_mcbsp_hwmod_class,
2883 .mpu_irqs = omap44xx_mcbsp1_irqs,
2884 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_irqs),
2885 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
2886 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs),
2887 .main_clk = "mcbsp1_fck",
2888 .prcm = {
2889 .omap4 = {
2890 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL,
2891 },
2892 },
2893 .slaves = omap44xx_mcbsp1_slaves,
2894 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
2895 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2896};
2897
2898/* mcbsp2 */
2899static struct omap_hwmod omap44xx_mcbsp2_hwmod;
2900static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
2901 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
2902};
2903
2904static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
2905 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
2906 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
2907};
2908
2909static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
2910 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302911 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002912 .pa_start = 0x40124000,
2913 .pa_end = 0x401240ff,
2914 .flags = ADDR_TYPE_RT
2915 },
2916};
2917
2918/* l4_abe -> mcbsp2 */
2919static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
2920 .master = &omap44xx_l4_abe_hwmod,
2921 .slave = &omap44xx_mcbsp2_hwmod,
2922 .clk = "ocp_abe_iclk",
2923 .addr = omap44xx_mcbsp2_addrs,
2924 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_addrs),
2925 .user = OCP_USER_MPU,
2926};
2927
2928static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
2929 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302930 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002931 .pa_start = 0x49024000,
2932 .pa_end = 0x490240ff,
2933 .flags = ADDR_TYPE_RT
2934 },
2935};
2936
2937/* l4_abe -> mcbsp2 (dma) */
2938static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
2939 .master = &omap44xx_l4_abe_hwmod,
2940 .slave = &omap44xx_mcbsp2_hwmod,
2941 .clk = "ocp_abe_iclk",
2942 .addr = omap44xx_mcbsp2_dma_addrs,
2943 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs),
2944 .user = OCP_USER_SDMA,
2945};
2946
2947/* mcbsp2 slave ports */
2948static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
2949 &omap44xx_l4_abe__mcbsp2,
2950 &omap44xx_l4_abe__mcbsp2_dma,
2951};
2952
2953static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
2954 .name = "mcbsp2",
2955 .class = &omap44xx_mcbsp_hwmod_class,
2956 .mpu_irqs = omap44xx_mcbsp2_irqs,
2957 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_irqs),
2958 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
2959 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs),
2960 .main_clk = "mcbsp2_fck",
2961 .prcm = {
2962 .omap4 = {
2963 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL,
2964 },
2965 },
2966 .slaves = omap44xx_mcbsp2_slaves,
2967 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
2968 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2969};
2970
2971/* mcbsp3 */
2972static struct omap_hwmod omap44xx_mcbsp3_hwmod;
2973static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
2974 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
2975};
2976
2977static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
2978 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
2979 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
2980};
2981
2982static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
2983 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302984 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002985 .pa_start = 0x40126000,
2986 .pa_end = 0x401260ff,
2987 .flags = ADDR_TYPE_RT
2988 },
2989};
2990
2991/* l4_abe -> mcbsp3 */
2992static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
2993 .master = &omap44xx_l4_abe_hwmod,
2994 .slave = &omap44xx_mcbsp3_hwmod,
2995 .clk = "ocp_abe_iclk",
2996 .addr = omap44xx_mcbsp3_addrs,
2997 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_addrs),
2998 .user = OCP_USER_MPU,
2999};
3000
3001static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3002 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303003 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003004 .pa_start = 0x49026000,
3005 .pa_end = 0x490260ff,
3006 .flags = ADDR_TYPE_RT
3007 },
3008};
3009
3010/* l4_abe -> mcbsp3 (dma) */
3011static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3012 .master = &omap44xx_l4_abe_hwmod,
3013 .slave = &omap44xx_mcbsp3_hwmod,
3014 .clk = "ocp_abe_iclk",
3015 .addr = omap44xx_mcbsp3_dma_addrs,
3016 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs),
3017 .user = OCP_USER_SDMA,
3018};
3019
3020/* mcbsp3 slave ports */
3021static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3022 &omap44xx_l4_abe__mcbsp3,
3023 &omap44xx_l4_abe__mcbsp3_dma,
3024};
3025
3026static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3027 .name = "mcbsp3",
3028 .class = &omap44xx_mcbsp_hwmod_class,
3029 .mpu_irqs = omap44xx_mcbsp3_irqs,
3030 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_irqs),
3031 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
3032 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs),
3033 .main_clk = "mcbsp3_fck",
3034 .prcm = {
3035 .omap4 = {
3036 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL,
3037 },
3038 },
3039 .slaves = omap44xx_mcbsp3_slaves,
3040 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
3041 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3042};
3043
3044/* mcbsp4 */
3045static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3046static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3047 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
3048};
3049
3050static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3051 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3052 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
3053};
3054
3055static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3056 {
3057 .pa_start = 0x48096000,
3058 .pa_end = 0x480960ff,
3059 .flags = ADDR_TYPE_RT
3060 },
3061};
3062
3063/* l4_per -> mcbsp4 */
3064static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3065 .master = &omap44xx_l4_per_hwmod,
3066 .slave = &omap44xx_mcbsp4_hwmod,
3067 .clk = "l4_div_ck",
3068 .addr = omap44xx_mcbsp4_addrs,
3069 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp4_addrs),
3070 .user = OCP_USER_MPU | OCP_USER_SDMA,
3071};
3072
3073/* mcbsp4 slave ports */
3074static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3075 &omap44xx_l4_per__mcbsp4,
3076};
3077
3078static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3079 .name = "mcbsp4",
3080 .class = &omap44xx_mcbsp_hwmod_class,
3081 .mpu_irqs = omap44xx_mcbsp4_irqs,
3082 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_irqs),
3083 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
3084 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs),
3085 .main_clk = "mcbsp4_fck",
3086 .prcm = {
3087 .omap4 = {
3088 .clkctrl_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
3089 },
3090 },
3091 .slaves = omap44xx_mcbsp4_slaves,
3092 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
3093 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3094};
3095
3096/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003097 * 'mcpdm' class
3098 * multi channel pdm controller (proprietary interface with phoenix power
3099 * ic)
3100 */
3101
3102static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3103 .rev_offs = 0x0000,
3104 .sysc_offs = 0x0010,
3105 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3106 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3107 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3108 SIDLE_SMART_WKUP),
3109 .sysc_fields = &omap_hwmod_sysc_type2,
3110};
3111
3112static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3113 .name = "mcpdm",
3114 .sysc = &omap44xx_mcpdm_sysc,
3115};
3116
3117/* mcpdm */
3118static struct omap_hwmod omap44xx_mcpdm_hwmod;
3119static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3120 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
3121};
3122
3123static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3124 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3125 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
3126};
3127
3128static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3129 {
3130 .pa_start = 0x40132000,
3131 .pa_end = 0x4013207f,
3132 .flags = ADDR_TYPE_RT
3133 },
3134};
3135
3136/* l4_abe -> mcpdm */
3137static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3138 .master = &omap44xx_l4_abe_hwmod,
3139 .slave = &omap44xx_mcpdm_hwmod,
3140 .clk = "ocp_abe_iclk",
3141 .addr = omap44xx_mcpdm_addrs,
3142 .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_addrs),
3143 .user = OCP_USER_MPU,
3144};
3145
3146static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3147 {
3148 .pa_start = 0x49032000,
3149 .pa_end = 0x4903207f,
3150 .flags = ADDR_TYPE_RT
3151 },
3152};
3153
3154/* l4_abe -> mcpdm (dma) */
3155static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3156 .master = &omap44xx_l4_abe_hwmod,
3157 .slave = &omap44xx_mcpdm_hwmod,
3158 .clk = "ocp_abe_iclk",
3159 .addr = omap44xx_mcpdm_dma_addrs,
3160 .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_dma_addrs),
3161 .user = OCP_USER_SDMA,
3162};
3163
3164/* mcpdm slave ports */
3165static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3166 &omap44xx_l4_abe__mcpdm,
3167 &omap44xx_l4_abe__mcpdm_dma,
3168};
3169
3170static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3171 .name = "mcpdm",
3172 .class = &omap44xx_mcpdm_hwmod_class,
3173 .mpu_irqs = omap44xx_mcpdm_irqs,
3174 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_irqs),
3175 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
3176 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_sdma_reqs),
3177 .main_clk = "mcpdm_fck",
3178 .prcm = {
3179 .omap4 = {
3180 .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
3181 },
3182 },
3183 .slaves = omap44xx_mcpdm_slaves,
3184 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
3185 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3186};
3187
3188/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303189 * 'mcspi' class
3190 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3191 * bus
3192 */
3193
3194static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3195 .rev_offs = 0x0000,
3196 .sysc_offs = 0x0010,
3197 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3198 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3199 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3200 SIDLE_SMART_WKUP),
3201 .sysc_fields = &omap_hwmod_sysc_type2,
3202};
3203
3204static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3205 .name = "mcspi",
3206 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003207 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303208};
3209
3210/* mcspi1 */
3211static struct omap_hwmod omap44xx_mcspi1_hwmod;
3212static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3213 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
3214};
3215
3216static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3217 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3218 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3219 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3220 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3221 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3222 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3223 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3224 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
3225};
3226
3227static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3228 {
3229 .pa_start = 0x48098000,
3230 .pa_end = 0x480981ff,
3231 .flags = ADDR_TYPE_RT
3232 },
3233};
3234
3235/* l4_per -> mcspi1 */
3236static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3237 .master = &omap44xx_l4_per_hwmod,
3238 .slave = &omap44xx_mcspi1_hwmod,
3239 .clk = "l4_div_ck",
3240 .addr = omap44xx_mcspi1_addrs,
3241 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi1_addrs),
3242 .user = OCP_USER_MPU | OCP_USER_SDMA,
3243};
3244
3245/* mcspi1 slave ports */
3246static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3247 &omap44xx_l4_per__mcspi1,
3248};
3249
Benoit Cousson905a74d2011-02-18 14:01:06 +01003250/* mcspi1 dev_attr */
3251static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3252 .num_chipselect = 4,
3253};
3254
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303255static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3256 .name = "mcspi1",
3257 .class = &omap44xx_mcspi_hwmod_class,
3258 .mpu_irqs = omap44xx_mcspi1_irqs,
3259 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_irqs),
3260 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
3261 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs),
3262 .main_clk = "mcspi1_fck",
3263 .prcm = {
3264 .omap4 = {
3265 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL,
3266 },
3267 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003268 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303269 .slaves = omap44xx_mcspi1_slaves,
3270 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
3271 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3272};
3273
3274/* mcspi2 */
3275static struct omap_hwmod omap44xx_mcspi2_hwmod;
3276static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3277 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
3278};
3279
3280static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3281 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3282 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3283 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3284 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
3285};
3286
3287static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3288 {
3289 .pa_start = 0x4809a000,
3290 .pa_end = 0x4809a1ff,
3291 .flags = ADDR_TYPE_RT
3292 },
3293};
3294
3295/* l4_per -> mcspi2 */
3296static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3297 .master = &omap44xx_l4_per_hwmod,
3298 .slave = &omap44xx_mcspi2_hwmod,
3299 .clk = "l4_div_ck",
3300 .addr = omap44xx_mcspi2_addrs,
3301 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi2_addrs),
3302 .user = OCP_USER_MPU | OCP_USER_SDMA,
3303};
3304
3305/* mcspi2 slave ports */
3306static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3307 &omap44xx_l4_per__mcspi2,
3308};
3309
Benoit Cousson905a74d2011-02-18 14:01:06 +01003310/* mcspi2 dev_attr */
3311static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3312 .num_chipselect = 2,
3313};
3314
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303315static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3316 .name = "mcspi2",
3317 .class = &omap44xx_mcspi_hwmod_class,
3318 .mpu_irqs = omap44xx_mcspi2_irqs,
3319 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_irqs),
3320 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
3321 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs),
3322 .main_clk = "mcspi2_fck",
3323 .prcm = {
3324 .omap4 = {
3325 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL,
3326 },
3327 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003328 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303329 .slaves = omap44xx_mcspi2_slaves,
3330 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
3331 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3332};
3333
3334/* mcspi3 */
3335static struct omap_hwmod omap44xx_mcspi3_hwmod;
3336static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3337 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
3338};
3339
3340static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3341 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3342 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3343 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3344 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
3345};
3346
3347static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3348 {
3349 .pa_start = 0x480b8000,
3350 .pa_end = 0x480b81ff,
3351 .flags = ADDR_TYPE_RT
3352 },
3353};
3354
3355/* l4_per -> mcspi3 */
3356static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3357 .master = &omap44xx_l4_per_hwmod,
3358 .slave = &omap44xx_mcspi3_hwmod,
3359 .clk = "l4_div_ck",
3360 .addr = omap44xx_mcspi3_addrs,
3361 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi3_addrs),
3362 .user = OCP_USER_MPU | OCP_USER_SDMA,
3363};
3364
3365/* mcspi3 slave ports */
3366static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3367 &omap44xx_l4_per__mcspi3,
3368};
3369
Benoit Cousson905a74d2011-02-18 14:01:06 +01003370/* mcspi3 dev_attr */
3371static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3372 .num_chipselect = 2,
3373};
3374
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303375static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3376 .name = "mcspi3",
3377 .class = &omap44xx_mcspi_hwmod_class,
3378 .mpu_irqs = omap44xx_mcspi3_irqs,
3379 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_irqs),
3380 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
3381 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs),
3382 .main_clk = "mcspi3_fck",
3383 .prcm = {
3384 .omap4 = {
3385 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL,
3386 },
3387 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003388 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303389 .slaves = omap44xx_mcspi3_slaves,
3390 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
3391 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3392};
3393
3394/* mcspi4 */
3395static struct omap_hwmod omap44xx_mcspi4_hwmod;
3396static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3397 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
3398};
3399
3400static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3401 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3402 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
3403};
3404
3405static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3406 {
3407 .pa_start = 0x480ba000,
3408 .pa_end = 0x480ba1ff,
3409 .flags = ADDR_TYPE_RT
3410 },
3411};
3412
3413/* l4_per -> mcspi4 */
3414static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3415 .master = &omap44xx_l4_per_hwmod,
3416 .slave = &omap44xx_mcspi4_hwmod,
3417 .clk = "l4_div_ck",
3418 .addr = omap44xx_mcspi4_addrs,
3419 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi4_addrs),
3420 .user = OCP_USER_MPU | OCP_USER_SDMA,
3421};
3422
3423/* mcspi4 slave ports */
3424static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3425 &omap44xx_l4_per__mcspi4,
3426};
3427
Benoit Cousson905a74d2011-02-18 14:01:06 +01003428/* mcspi4 dev_attr */
3429static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3430 .num_chipselect = 1,
3431};
3432
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303433static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3434 .name = "mcspi4",
3435 .class = &omap44xx_mcspi_hwmod_class,
3436 .mpu_irqs = omap44xx_mcspi4_irqs,
3437 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_irqs),
3438 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
3439 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs),
3440 .main_clk = "mcspi4_fck",
3441 .prcm = {
3442 .omap4 = {
3443 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL,
3444 },
3445 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003446 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303447 .slaves = omap44xx_mcspi4_slaves,
3448 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
3449 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3450};
3451
3452/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003453 * 'mmc' class
3454 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3455 */
3456
3457static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3458 .rev_offs = 0x0000,
3459 .sysc_offs = 0x0010,
3460 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3461 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3462 SYSC_HAS_SOFTRESET),
3463 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3464 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
3465 MSTANDBY_SMART),
3466 .sysc_fields = &omap_hwmod_sysc_type2,
3467};
3468
3469static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3470 .name = "mmc",
3471 .sysc = &omap44xx_mmc_sysc,
3472};
3473
3474/* mmc1 */
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003475
Benoit Cousson407a6882011-02-15 22:39:48 +01003476static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3477 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
3478};
3479
3480static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3481 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3482 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
3483};
3484
3485/* mmc1 master ports */
3486static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3487 &omap44xx_mmc1__l3_main_1,
3488};
3489
3490static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3491 {
3492 .pa_start = 0x4809c000,
3493 .pa_end = 0x4809c3ff,
3494 .flags = ADDR_TYPE_RT
3495 },
3496};
3497
3498/* l4_per -> mmc1 */
3499static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3500 .master = &omap44xx_l4_per_hwmod,
3501 .slave = &omap44xx_mmc1_hwmod,
3502 .clk = "l4_div_ck",
3503 .addr = omap44xx_mmc1_addrs,
3504 .addr_cnt = ARRAY_SIZE(omap44xx_mmc1_addrs),
3505 .user = OCP_USER_MPU | OCP_USER_SDMA,
3506};
3507
3508/* mmc1 slave ports */
3509static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3510 &omap44xx_l4_per__mmc1,
3511};
3512
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003513/* mmc1 dev_attr */
3514static struct omap_mmc_dev_attr mmc1_dev_attr = {
3515 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3516};
3517
Benoit Cousson407a6882011-02-15 22:39:48 +01003518static struct omap_hwmod omap44xx_mmc1_hwmod = {
3519 .name = "mmc1",
3520 .class = &omap44xx_mmc_hwmod_class,
3521 .mpu_irqs = omap44xx_mmc1_irqs,
3522 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc1_irqs),
3523 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
3524 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc1_sdma_reqs),
3525 .main_clk = "mmc1_fck",
3526 .prcm = {
3527 .omap4 = {
3528 .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
3529 },
3530 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003531 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003532 .slaves = omap44xx_mmc1_slaves,
3533 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3534 .masters = omap44xx_mmc1_masters,
3535 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
3536 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3537};
3538
3539/* mmc2 */
3540static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3541 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
3542};
3543
3544static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3545 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3546 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
3547};
3548
3549/* mmc2 master ports */
3550static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3551 &omap44xx_mmc2__l3_main_1,
3552};
3553
3554static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3555 {
3556 .pa_start = 0x480b4000,
3557 .pa_end = 0x480b43ff,
3558 .flags = ADDR_TYPE_RT
3559 },
3560};
3561
3562/* l4_per -> mmc2 */
3563static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3564 .master = &omap44xx_l4_per_hwmod,
3565 .slave = &omap44xx_mmc2_hwmod,
3566 .clk = "l4_div_ck",
3567 .addr = omap44xx_mmc2_addrs,
3568 .addr_cnt = ARRAY_SIZE(omap44xx_mmc2_addrs),
3569 .user = OCP_USER_MPU | OCP_USER_SDMA,
3570};
3571
3572/* mmc2 slave ports */
3573static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3574 &omap44xx_l4_per__mmc2,
3575};
3576
3577static struct omap_hwmod omap44xx_mmc2_hwmod = {
3578 .name = "mmc2",
3579 .class = &omap44xx_mmc_hwmod_class,
3580 .mpu_irqs = omap44xx_mmc2_irqs,
3581 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc2_irqs),
3582 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
3583 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc2_sdma_reqs),
3584 .main_clk = "mmc2_fck",
3585 .prcm = {
3586 .omap4 = {
3587 .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
3588 },
3589 },
3590 .slaves = omap44xx_mmc2_slaves,
3591 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3592 .masters = omap44xx_mmc2_masters,
3593 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
3594 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3595};
3596
3597/* mmc3 */
3598static struct omap_hwmod omap44xx_mmc3_hwmod;
3599static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3600 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
3601};
3602
3603static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3604 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3605 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
3606};
3607
3608static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3609 {
3610 .pa_start = 0x480ad000,
3611 .pa_end = 0x480ad3ff,
3612 .flags = ADDR_TYPE_RT
3613 },
3614};
3615
3616/* l4_per -> mmc3 */
3617static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3618 .master = &omap44xx_l4_per_hwmod,
3619 .slave = &omap44xx_mmc3_hwmod,
3620 .clk = "l4_div_ck",
3621 .addr = omap44xx_mmc3_addrs,
3622 .addr_cnt = ARRAY_SIZE(omap44xx_mmc3_addrs),
3623 .user = OCP_USER_MPU | OCP_USER_SDMA,
3624};
3625
3626/* mmc3 slave ports */
3627static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3628 &omap44xx_l4_per__mmc3,
3629};
3630
3631static struct omap_hwmod omap44xx_mmc3_hwmod = {
3632 .name = "mmc3",
3633 .class = &omap44xx_mmc_hwmod_class,
3634 .mpu_irqs = omap44xx_mmc3_irqs,
3635 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc3_irqs),
3636 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
3637 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc3_sdma_reqs),
3638 .main_clk = "mmc3_fck",
3639 .prcm = {
3640 .omap4 = {
3641 .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL,
3642 },
3643 },
3644 .slaves = omap44xx_mmc3_slaves,
3645 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
3646 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3647};
3648
3649/* mmc4 */
3650static struct omap_hwmod omap44xx_mmc4_hwmod;
3651static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3652 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
3653};
3654
3655static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3656 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3657 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
3658};
3659
3660static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3661 {
3662 .pa_start = 0x480d1000,
3663 .pa_end = 0x480d13ff,
3664 .flags = ADDR_TYPE_RT
3665 },
3666};
3667
3668/* l4_per -> mmc4 */
3669static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3670 .master = &omap44xx_l4_per_hwmod,
3671 .slave = &omap44xx_mmc4_hwmod,
3672 .clk = "l4_div_ck",
3673 .addr = omap44xx_mmc4_addrs,
3674 .addr_cnt = ARRAY_SIZE(omap44xx_mmc4_addrs),
3675 .user = OCP_USER_MPU | OCP_USER_SDMA,
3676};
3677
3678/* mmc4 slave ports */
3679static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3680 &omap44xx_l4_per__mmc4,
3681};
3682
3683static struct omap_hwmod omap44xx_mmc4_hwmod = {
3684 .name = "mmc4",
3685 .class = &omap44xx_mmc_hwmod_class,
3686 .mpu_irqs = omap44xx_mmc4_irqs,
3687 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc4_irqs),
3688 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
3689 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc4_sdma_reqs),
3690 .main_clk = "mmc4_fck",
3691 .prcm = {
3692 .omap4 = {
3693 .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL,
3694 },
3695 },
3696 .slaves = omap44xx_mmc4_slaves,
3697 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
3698 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3699};
3700
3701/* mmc5 */
3702static struct omap_hwmod omap44xx_mmc5_hwmod;
3703static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3704 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
3705};
3706
3707static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3708 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3709 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
3710};
3711
3712static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3713 {
3714 .pa_start = 0x480d5000,
3715 .pa_end = 0x480d53ff,
3716 .flags = ADDR_TYPE_RT
3717 },
3718};
3719
3720/* l4_per -> mmc5 */
3721static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3722 .master = &omap44xx_l4_per_hwmod,
3723 .slave = &omap44xx_mmc5_hwmod,
3724 .clk = "l4_div_ck",
3725 .addr = omap44xx_mmc5_addrs,
3726 .addr_cnt = ARRAY_SIZE(omap44xx_mmc5_addrs),
3727 .user = OCP_USER_MPU | OCP_USER_SDMA,
3728};
3729
3730/* mmc5 slave ports */
3731static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3732 &omap44xx_l4_per__mmc5,
3733};
3734
3735static struct omap_hwmod omap44xx_mmc5_hwmod = {
3736 .name = "mmc5",
3737 .class = &omap44xx_mmc_hwmod_class,
3738 .mpu_irqs = omap44xx_mmc5_irqs,
3739 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc5_irqs),
3740 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
3741 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc5_sdma_reqs),
3742 .main_clk = "mmc5_fck",
3743 .prcm = {
3744 .omap4 = {
3745 .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL,
3746 },
3747 },
3748 .slaves = omap44xx_mmc5_slaves,
3749 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
3750 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3751};
3752
3753/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003754 * 'mpu' class
3755 * mpu sub-system
3756 */
3757
3758static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003759 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003760};
3761
3762/* mpu */
3763static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3764 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3765 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3766 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
3767};
3768
3769/* mpu master ports */
3770static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3771 &omap44xx_mpu__l3_main_1,
3772 &omap44xx_mpu__l4_abe,
3773 &omap44xx_mpu__dmm,
3774};
3775
3776static struct omap_hwmod omap44xx_mpu_hwmod = {
3777 .name = "mpu",
3778 .class = &omap44xx_mpu_hwmod_class,
3779 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
3780 .mpu_irqs = omap44xx_mpu_irqs,
3781 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs),
3782 .main_clk = "dpll_mpu_m2_ck",
3783 .prcm = {
3784 .omap4 = {
3785 .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL,
3786 },
3787 },
3788 .masters = omap44xx_mpu_masters,
3789 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
3790 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3791};
3792
Benoit Cousson92b18d12010-09-23 20:02:41 +05303793/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003794 * 'smartreflex' class
3795 * smartreflex module (monitor silicon performance and outputs a measure of
3796 * performance error)
3797 */
3798
3799/* The IP is not compliant to type1 / type2 scheme */
3800static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
3801 .sidle_shift = 24,
3802 .enwkup_shift = 26,
3803};
3804
3805static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
3806 .sysc_offs = 0x0038,
3807 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
3808 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3809 SIDLE_SMART_WKUP),
3810 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
3811};
3812
3813static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003814 .name = "smartreflex",
3815 .sysc = &omap44xx_smartreflex_sysc,
3816 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003817};
3818
3819/* smartreflex_core */
3820static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3821static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
3822 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
3823};
3824
3825static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
3826 {
3827 .pa_start = 0x4a0dd000,
3828 .pa_end = 0x4a0dd03f,
3829 .flags = ADDR_TYPE_RT
3830 },
3831};
3832
3833/* l4_cfg -> smartreflex_core */
3834static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
3835 .master = &omap44xx_l4_cfg_hwmod,
3836 .slave = &omap44xx_smartreflex_core_hwmod,
3837 .clk = "l4_div_ck",
3838 .addr = omap44xx_smartreflex_core_addrs,
3839 .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_addrs),
3840 .user = OCP_USER_MPU | OCP_USER_SDMA,
3841};
3842
3843/* smartreflex_core slave ports */
3844static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
3845 &omap44xx_l4_cfg__smartreflex_core,
3846};
3847
3848static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3849 .name = "smartreflex_core",
3850 .class = &omap44xx_smartreflex_hwmod_class,
3851 .mpu_irqs = omap44xx_smartreflex_core_irqs,
3852 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_irqs),
3853 .main_clk = "smartreflex_core_fck",
3854 .vdd_name = "core",
3855 .prcm = {
3856 .omap4 = {
3857 .clkctrl_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL,
3858 },
3859 },
3860 .slaves = omap44xx_smartreflex_core_slaves,
3861 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
3862 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3863};
3864
3865/* smartreflex_iva */
3866static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
3867static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
3868 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
3869};
3870
3871static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
3872 {
3873 .pa_start = 0x4a0db000,
3874 .pa_end = 0x4a0db03f,
3875 .flags = ADDR_TYPE_RT
3876 },
3877};
3878
3879/* l4_cfg -> smartreflex_iva */
3880static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
3881 .master = &omap44xx_l4_cfg_hwmod,
3882 .slave = &omap44xx_smartreflex_iva_hwmod,
3883 .clk = "l4_div_ck",
3884 .addr = omap44xx_smartreflex_iva_addrs,
3885 .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_addrs),
3886 .user = OCP_USER_MPU | OCP_USER_SDMA,
3887};
3888
3889/* smartreflex_iva slave ports */
3890static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
3891 &omap44xx_l4_cfg__smartreflex_iva,
3892};
3893
3894static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
3895 .name = "smartreflex_iva",
3896 .class = &omap44xx_smartreflex_hwmod_class,
3897 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
3898 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_irqs),
3899 .main_clk = "smartreflex_iva_fck",
3900 .vdd_name = "iva",
3901 .prcm = {
3902 .omap4 = {
3903 .clkctrl_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL,
3904 },
3905 },
3906 .slaves = omap44xx_smartreflex_iva_slaves,
3907 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
3908 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3909};
3910
3911/* smartreflex_mpu */
3912static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
3913static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
3914 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
3915};
3916
3917static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
3918 {
3919 .pa_start = 0x4a0d9000,
3920 .pa_end = 0x4a0d903f,
3921 .flags = ADDR_TYPE_RT
3922 },
3923};
3924
3925/* l4_cfg -> smartreflex_mpu */
3926static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
3927 .master = &omap44xx_l4_cfg_hwmod,
3928 .slave = &omap44xx_smartreflex_mpu_hwmod,
3929 .clk = "l4_div_ck",
3930 .addr = omap44xx_smartreflex_mpu_addrs,
3931 .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_addrs),
3932 .user = OCP_USER_MPU | OCP_USER_SDMA,
3933};
3934
3935/* smartreflex_mpu slave ports */
3936static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
3937 &omap44xx_l4_cfg__smartreflex_mpu,
3938};
3939
3940static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
3941 .name = "smartreflex_mpu",
3942 .class = &omap44xx_smartreflex_hwmod_class,
3943 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
3944 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_irqs),
3945 .main_clk = "smartreflex_mpu_fck",
3946 .vdd_name = "mpu",
3947 .prcm = {
3948 .omap4 = {
3949 .clkctrl_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL,
3950 },
3951 },
3952 .slaves = omap44xx_smartreflex_mpu_slaves,
3953 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
3954 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3955};
3956
3957/*
Benoit Coussond11c2172011-02-02 12:04:36 +00003958 * 'spinlock' class
3959 * spinlock provides hardware assistance for synchronizing the processes
3960 * running on multiple processors
3961 */
3962
3963static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
3964 .rev_offs = 0x0000,
3965 .sysc_offs = 0x0010,
3966 .syss_offs = 0x0014,
3967 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
3968 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
3969 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
3970 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3971 SIDLE_SMART_WKUP),
3972 .sysc_fields = &omap_hwmod_sysc_type1,
3973};
3974
3975static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
3976 .name = "spinlock",
3977 .sysc = &omap44xx_spinlock_sysc,
3978};
3979
3980/* spinlock */
3981static struct omap_hwmod omap44xx_spinlock_hwmod;
3982static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
3983 {
3984 .pa_start = 0x4a0f6000,
3985 .pa_end = 0x4a0f6fff,
3986 .flags = ADDR_TYPE_RT
3987 },
3988};
3989
3990/* l4_cfg -> spinlock */
3991static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
3992 .master = &omap44xx_l4_cfg_hwmod,
3993 .slave = &omap44xx_spinlock_hwmod,
3994 .clk = "l4_div_ck",
3995 .addr = omap44xx_spinlock_addrs,
3996 .addr_cnt = ARRAY_SIZE(omap44xx_spinlock_addrs),
3997 .user = OCP_USER_MPU | OCP_USER_SDMA,
3998};
3999
4000/* spinlock slave ports */
4001static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4002 &omap44xx_l4_cfg__spinlock,
4003};
4004
4005static struct omap_hwmod omap44xx_spinlock_hwmod = {
4006 .name = "spinlock",
4007 .class = &omap44xx_spinlock_hwmod_class,
4008 .prcm = {
4009 .omap4 = {
4010 .clkctrl_reg = OMAP4430_CM_L4CFG_HW_SEM_CLKCTRL,
4011 },
4012 },
4013 .slaves = omap44xx_spinlock_slaves,
4014 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
4015 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4016};
4017
4018/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004019 * 'timer' class
4020 * general purpose timer module with accurate 1ms tick
4021 * This class contains several variants: ['timer_1ms', 'timer']
4022 */
4023
4024static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4025 .rev_offs = 0x0000,
4026 .sysc_offs = 0x0010,
4027 .syss_offs = 0x0014,
4028 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4029 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4030 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4031 SYSS_HAS_RESET_STATUS),
4032 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4033 .sysc_fields = &omap_hwmod_sysc_type1,
4034};
4035
4036static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4037 .name = "timer",
4038 .sysc = &omap44xx_timer_1ms_sysc,
4039};
4040
4041static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4042 .rev_offs = 0x0000,
4043 .sysc_offs = 0x0010,
4044 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4045 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4046 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4047 SIDLE_SMART_WKUP),
4048 .sysc_fields = &omap_hwmod_sysc_type2,
4049};
4050
4051static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4052 .name = "timer",
4053 .sysc = &omap44xx_timer_sysc,
4054};
4055
4056/* timer1 */
4057static struct omap_hwmod omap44xx_timer1_hwmod;
4058static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4059 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
4060};
4061
4062static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4063 {
4064 .pa_start = 0x4a318000,
4065 .pa_end = 0x4a31807f,
4066 .flags = ADDR_TYPE_RT
4067 },
4068};
4069
4070/* l4_wkup -> timer1 */
4071static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4072 .master = &omap44xx_l4_wkup_hwmod,
4073 .slave = &omap44xx_timer1_hwmod,
4074 .clk = "l4_wkup_clk_mux_ck",
4075 .addr = omap44xx_timer1_addrs,
4076 .addr_cnt = ARRAY_SIZE(omap44xx_timer1_addrs),
4077 .user = OCP_USER_MPU | OCP_USER_SDMA,
4078};
4079
4080/* timer1 slave ports */
4081static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4082 &omap44xx_l4_wkup__timer1,
4083};
4084
4085static struct omap_hwmod omap44xx_timer1_hwmod = {
4086 .name = "timer1",
4087 .class = &omap44xx_timer_1ms_hwmod_class,
4088 .mpu_irqs = omap44xx_timer1_irqs,
4089 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer1_irqs),
4090 .main_clk = "timer1_fck",
4091 .prcm = {
4092 .omap4 = {
4093 .clkctrl_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL,
4094 },
4095 },
4096 .slaves = omap44xx_timer1_slaves,
4097 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
4098 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4099};
4100
4101/* timer2 */
4102static struct omap_hwmod omap44xx_timer2_hwmod;
4103static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4104 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
4105};
4106
4107static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4108 {
4109 .pa_start = 0x48032000,
4110 .pa_end = 0x4803207f,
4111 .flags = ADDR_TYPE_RT
4112 },
4113};
4114
4115/* l4_per -> timer2 */
4116static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4117 .master = &omap44xx_l4_per_hwmod,
4118 .slave = &omap44xx_timer2_hwmod,
4119 .clk = "l4_div_ck",
4120 .addr = omap44xx_timer2_addrs,
4121 .addr_cnt = ARRAY_SIZE(omap44xx_timer2_addrs),
4122 .user = OCP_USER_MPU | OCP_USER_SDMA,
4123};
4124
4125/* timer2 slave ports */
4126static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4127 &omap44xx_l4_per__timer2,
4128};
4129
4130static struct omap_hwmod omap44xx_timer2_hwmod = {
4131 .name = "timer2",
4132 .class = &omap44xx_timer_1ms_hwmod_class,
4133 .mpu_irqs = omap44xx_timer2_irqs,
4134 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer2_irqs),
4135 .main_clk = "timer2_fck",
4136 .prcm = {
4137 .omap4 = {
4138 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL,
4139 },
4140 },
4141 .slaves = omap44xx_timer2_slaves,
4142 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
4143 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4144};
4145
4146/* timer3 */
4147static struct omap_hwmod omap44xx_timer3_hwmod;
4148static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4149 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
4150};
4151
4152static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4153 {
4154 .pa_start = 0x48034000,
4155 .pa_end = 0x4803407f,
4156 .flags = ADDR_TYPE_RT
4157 },
4158};
4159
4160/* l4_per -> timer3 */
4161static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4162 .master = &omap44xx_l4_per_hwmod,
4163 .slave = &omap44xx_timer3_hwmod,
4164 .clk = "l4_div_ck",
4165 .addr = omap44xx_timer3_addrs,
4166 .addr_cnt = ARRAY_SIZE(omap44xx_timer3_addrs),
4167 .user = OCP_USER_MPU | OCP_USER_SDMA,
4168};
4169
4170/* timer3 slave ports */
4171static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4172 &omap44xx_l4_per__timer3,
4173};
4174
4175static struct omap_hwmod omap44xx_timer3_hwmod = {
4176 .name = "timer3",
4177 .class = &omap44xx_timer_hwmod_class,
4178 .mpu_irqs = omap44xx_timer3_irqs,
4179 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer3_irqs),
4180 .main_clk = "timer3_fck",
4181 .prcm = {
4182 .omap4 = {
4183 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL,
4184 },
4185 },
4186 .slaves = omap44xx_timer3_slaves,
4187 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
4188 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4189};
4190
4191/* timer4 */
4192static struct omap_hwmod omap44xx_timer4_hwmod;
4193static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4194 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
4195};
4196
4197static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4198 {
4199 .pa_start = 0x48036000,
4200 .pa_end = 0x4803607f,
4201 .flags = ADDR_TYPE_RT
4202 },
4203};
4204
4205/* l4_per -> timer4 */
4206static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4207 .master = &omap44xx_l4_per_hwmod,
4208 .slave = &omap44xx_timer4_hwmod,
4209 .clk = "l4_div_ck",
4210 .addr = omap44xx_timer4_addrs,
4211 .addr_cnt = ARRAY_SIZE(omap44xx_timer4_addrs),
4212 .user = OCP_USER_MPU | OCP_USER_SDMA,
4213};
4214
4215/* timer4 slave ports */
4216static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4217 &omap44xx_l4_per__timer4,
4218};
4219
4220static struct omap_hwmod omap44xx_timer4_hwmod = {
4221 .name = "timer4",
4222 .class = &omap44xx_timer_hwmod_class,
4223 .mpu_irqs = omap44xx_timer4_irqs,
4224 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer4_irqs),
4225 .main_clk = "timer4_fck",
4226 .prcm = {
4227 .omap4 = {
4228 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL,
4229 },
4230 },
4231 .slaves = omap44xx_timer4_slaves,
4232 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
4233 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4234};
4235
4236/* timer5 */
4237static struct omap_hwmod omap44xx_timer5_hwmod;
4238static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4239 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
4240};
4241
4242static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4243 {
4244 .pa_start = 0x40138000,
4245 .pa_end = 0x4013807f,
4246 .flags = ADDR_TYPE_RT
4247 },
4248};
4249
4250/* l4_abe -> timer5 */
4251static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4252 .master = &omap44xx_l4_abe_hwmod,
4253 .slave = &omap44xx_timer5_hwmod,
4254 .clk = "ocp_abe_iclk",
4255 .addr = omap44xx_timer5_addrs,
4256 .addr_cnt = ARRAY_SIZE(omap44xx_timer5_addrs),
4257 .user = OCP_USER_MPU,
4258};
4259
4260static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4261 {
4262 .pa_start = 0x49038000,
4263 .pa_end = 0x4903807f,
4264 .flags = ADDR_TYPE_RT
4265 },
4266};
4267
4268/* l4_abe -> timer5 (dma) */
4269static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4270 .master = &omap44xx_l4_abe_hwmod,
4271 .slave = &omap44xx_timer5_hwmod,
4272 .clk = "ocp_abe_iclk",
4273 .addr = omap44xx_timer5_dma_addrs,
4274 .addr_cnt = ARRAY_SIZE(omap44xx_timer5_dma_addrs),
4275 .user = OCP_USER_SDMA,
4276};
4277
4278/* timer5 slave ports */
4279static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4280 &omap44xx_l4_abe__timer5,
4281 &omap44xx_l4_abe__timer5_dma,
4282};
4283
4284static struct omap_hwmod omap44xx_timer5_hwmod = {
4285 .name = "timer5",
4286 .class = &omap44xx_timer_hwmod_class,
4287 .mpu_irqs = omap44xx_timer5_irqs,
4288 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer5_irqs),
4289 .main_clk = "timer5_fck",
4290 .prcm = {
4291 .omap4 = {
4292 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL,
4293 },
4294 },
4295 .slaves = omap44xx_timer5_slaves,
4296 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
4297 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4298};
4299
4300/* timer6 */
4301static struct omap_hwmod omap44xx_timer6_hwmod;
4302static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4303 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
4304};
4305
4306static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4307 {
4308 .pa_start = 0x4013a000,
4309 .pa_end = 0x4013a07f,
4310 .flags = ADDR_TYPE_RT
4311 },
4312};
4313
4314/* l4_abe -> timer6 */
4315static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4316 .master = &omap44xx_l4_abe_hwmod,
4317 .slave = &omap44xx_timer6_hwmod,
4318 .clk = "ocp_abe_iclk",
4319 .addr = omap44xx_timer6_addrs,
4320 .addr_cnt = ARRAY_SIZE(omap44xx_timer6_addrs),
4321 .user = OCP_USER_MPU,
4322};
4323
4324static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4325 {
4326 .pa_start = 0x4903a000,
4327 .pa_end = 0x4903a07f,
4328 .flags = ADDR_TYPE_RT
4329 },
4330};
4331
4332/* l4_abe -> timer6 (dma) */
4333static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4334 .master = &omap44xx_l4_abe_hwmod,
4335 .slave = &omap44xx_timer6_hwmod,
4336 .clk = "ocp_abe_iclk",
4337 .addr = omap44xx_timer6_dma_addrs,
4338 .addr_cnt = ARRAY_SIZE(omap44xx_timer6_dma_addrs),
4339 .user = OCP_USER_SDMA,
4340};
4341
4342/* timer6 slave ports */
4343static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4344 &omap44xx_l4_abe__timer6,
4345 &omap44xx_l4_abe__timer6_dma,
4346};
4347
4348static struct omap_hwmod omap44xx_timer6_hwmod = {
4349 .name = "timer6",
4350 .class = &omap44xx_timer_hwmod_class,
4351 .mpu_irqs = omap44xx_timer6_irqs,
4352 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer6_irqs),
4353 .main_clk = "timer6_fck",
4354 .prcm = {
4355 .omap4 = {
4356 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL,
4357 },
4358 },
4359 .slaves = omap44xx_timer6_slaves,
4360 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
4361 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4362};
4363
4364/* timer7 */
4365static struct omap_hwmod omap44xx_timer7_hwmod;
4366static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4367 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
4368};
4369
4370static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4371 {
4372 .pa_start = 0x4013c000,
4373 .pa_end = 0x4013c07f,
4374 .flags = ADDR_TYPE_RT
4375 },
4376};
4377
4378/* l4_abe -> timer7 */
4379static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4380 .master = &omap44xx_l4_abe_hwmod,
4381 .slave = &omap44xx_timer7_hwmod,
4382 .clk = "ocp_abe_iclk",
4383 .addr = omap44xx_timer7_addrs,
4384 .addr_cnt = ARRAY_SIZE(omap44xx_timer7_addrs),
4385 .user = OCP_USER_MPU,
4386};
4387
4388static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4389 {
4390 .pa_start = 0x4903c000,
4391 .pa_end = 0x4903c07f,
4392 .flags = ADDR_TYPE_RT
4393 },
4394};
4395
4396/* l4_abe -> timer7 (dma) */
4397static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4398 .master = &omap44xx_l4_abe_hwmod,
4399 .slave = &omap44xx_timer7_hwmod,
4400 .clk = "ocp_abe_iclk",
4401 .addr = omap44xx_timer7_dma_addrs,
4402 .addr_cnt = ARRAY_SIZE(omap44xx_timer7_dma_addrs),
4403 .user = OCP_USER_SDMA,
4404};
4405
4406/* timer7 slave ports */
4407static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4408 &omap44xx_l4_abe__timer7,
4409 &omap44xx_l4_abe__timer7_dma,
4410};
4411
4412static struct omap_hwmod omap44xx_timer7_hwmod = {
4413 .name = "timer7",
4414 .class = &omap44xx_timer_hwmod_class,
4415 .mpu_irqs = omap44xx_timer7_irqs,
4416 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer7_irqs),
4417 .main_clk = "timer7_fck",
4418 .prcm = {
4419 .omap4 = {
4420 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL,
4421 },
4422 },
4423 .slaves = omap44xx_timer7_slaves,
4424 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
4425 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4426};
4427
4428/* timer8 */
4429static struct omap_hwmod omap44xx_timer8_hwmod;
4430static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4431 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
4432};
4433
4434static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4435 {
4436 .pa_start = 0x4013e000,
4437 .pa_end = 0x4013e07f,
4438 .flags = ADDR_TYPE_RT
4439 },
4440};
4441
4442/* l4_abe -> timer8 */
4443static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4444 .master = &omap44xx_l4_abe_hwmod,
4445 .slave = &omap44xx_timer8_hwmod,
4446 .clk = "ocp_abe_iclk",
4447 .addr = omap44xx_timer8_addrs,
4448 .addr_cnt = ARRAY_SIZE(omap44xx_timer8_addrs),
4449 .user = OCP_USER_MPU,
4450};
4451
4452static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4453 {
4454 .pa_start = 0x4903e000,
4455 .pa_end = 0x4903e07f,
4456 .flags = ADDR_TYPE_RT
4457 },
4458};
4459
4460/* l4_abe -> timer8 (dma) */
4461static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4462 .master = &omap44xx_l4_abe_hwmod,
4463 .slave = &omap44xx_timer8_hwmod,
4464 .clk = "ocp_abe_iclk",
4465 .addr = omap44xx_timer8_dma_addrs,
4466 .addr_cnt = ARRAY_SIZE(omap44xx_timer8_dma_addrs),
4467 .user = OCP_USER_SDMA,
4468};
4469
4470/* timer8 slave ports */
4471static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4472 &omap44xx_l4_abe__timer8,
4473 &omap44xx_l4_abe__timer8_dma,
4474};
4475
4476static struct omap_hwmod omap44xx_timer8_hwmod = {
4477 .name = "timer8",
4478 .class = &omap44xx_timer_hwmod_class,
4479 .mpu_irqs = omap44xx_timer8_irqs,
4480 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer8_irqs),
4481 .main_clk = "timer8_fck",
4482 .prcm = {
4483 .omap4 = {
4484 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL,
4485 },
4486 },
4487 .slaves = omap44xx_timer8_slaves,
4488 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
4489 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4490};
4491
4492/* timer9 */
4493static struct omap_hwmod omap44xx_timer9_hwmod;
4494static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4495 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
4496};
4497
4498static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4499 {
4500 .pa_start = 0x4803e000,
4501 .pa_end = 0x4803e07f,
4502 .flags = ADDR_TYPE_RT
4503 },
4504};
4505
4506/* l4_per -> timer9 */
4507static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4508 .master = &omap44xx_l4_per_hwmod,
4509 .slave = &omap44xx_timer9_hwmod,
4510 .clk = "l4_div_ck",
4511 .addr = omap44xx_timer9_addrs,
4512 .addr_cnt = ARRAY_SIZE(omap44xx_timer9_addrs),
4513 .user = OCP_USER_MPU | OCP_USER_SDMA,
4514};
4515
4516/* timer9 slave ports */
4517static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4518 &omap44xx_l4_per__timer9,
4519};
4520
4521static struct omap_hwmod omap44xx_timer9_hwmod = {
4522 .name = "timer9",
4523 .class = &omap44xx_timer_hwmod_class,
4524 .mpu_irqs = omap44xx_timer9_irqs,
4525 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer9_irqs),
4526 .main_clk = "timer9_fck",
4527 .prcm = {
4528 .omap4 = {
4529 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL,
4530 },
4531 },
4532 .slaves = omap44xx_timer9_slaves,
4533 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
4534 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4535};
4536
4537/* timer10 */
4538static struct omap_hwmod omap44xx_timer10_hwmod;
4539static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4540 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
4541};
4542
4543static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4544 {
4545 .pa_start = 0x48086000,
4546 .pa_end = 0x4808607f,
4547 .flags = ADDR_TYPE_RT
4548 },
4549};
4550
4551/* l4_per -> timer10 */
4552static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4553 .master = &omap44xx_l4_per_hwmod,
4554 .slave = &omap44xx_timer10_hwmod,
4555 .clk = "l4_div_ck",
4556 .addr = omap44xx_timer10_addrs,
4557 .addr_cnt = ARRAY_SIZE(omap44xx_timer10_addrs),
4558 .user = OCP_USER_MPU | OCP_USER_SDMA,
4559};
4560
4561/* timer10 slave ports */
4562static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4563 &omap44xx_l4_per__timer10,
4564};
4565
4566static struct omap_hwmod omap44xx_timer10_hwmod = {
4567 .name = "timer10",
4568 .class = &omap44xx_timer_1ms_hwmod_class,
4569 .mpu_irqs = omap44xx_timer10_irqs,
4570 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer10_irqs),
4571 .main_clk = "timer10_fck",
4572 .prcm = {
4573 .omap4 = {
4574 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL,
4575 },
4576 },
4577 .slaves = omap44xx_timer10_slaves,
4578 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
4579 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4580};
4581
4582/* timer11 */
4583static struct omap_hwmod omap44xx_timer11_hwmod;
4584static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4585 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
4586};
4587
4588static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4589 {
4590 .pa_start = 0x48088000,
4591 .pa_end = 0x4808807f,
4592 .flags = ADDR_TYPE_RT
4593 },
4594};
4595
4596/* l4_per -> timer11 */
4597static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4598 .master = &omap44xx_l4_per_hwmod,
4599 .slave = &omap44xx_timer11_hwmod,
4600 .clk = "l4_div_ck",
4601 .addr = omap44xx_timer11_addrs,
4602 .addr_cnt = ARRAY_SIZE(omap44xx_timer11_addrs),
4603 .user = OCP_USER_MPU | OCP_USER_SDMA,
4604};
4605
4606/* timer11 slave ports */
4607static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4608 &omap44xx_l4_per__timer11,
4609};
4610
4611static struct omap_hwmod omap44xx_timer11_hwmod = {
4612 .name = "timer11",
4613 .class = &omap44xx_timer_hwmod_class,
4614 .mpu_irqs = omap44xx_timer11_irqs,
4615 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer11_irqs),
4616 .main_clk = "timer11_fck",
4617 .prcm = {
4618 .omap4 = {
4619 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL,
4620 },
4621 },
4622 .slaves = omap44xx_timer11_slaves,
4623 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
4624 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4625};
4626
4627/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304628 * 'uart' class
4629 * universal asynchronous receiver/transmitter (uart)
4630 */
4631
4632static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4633 .rev_offs = 0x0050,
4634 .sysc_offs = 0x0054,
4635 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004636 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004637 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4638 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004639 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4640 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304641 .sysc_fields = &omap_hwmod_sysc_type1,
4642};
4643
4644static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004645 .name = "uart",
4646 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304647};
4648
4649/* uart1 */
4650static struct omap_hwmod omap44xx_uart1_hwmod;
4651static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4652 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
4653};
4654
4655static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4656 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4657 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
4658};
4659
4660static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4661 {
4662 .pa_start = 0x4806a000,
4663 .pa_end = 0x4806a0ff,
4664 .flags = ADDR_TYPE_RT
4665 },
4666};
4667
4668/* l4_per -> uart1 */
4669static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4670 .master = &omap44xx_l4_per_hwmod,
4671 .slave = &omap44xx_uart1_hwmod,
4672 .clk = "l4_div_ck",
4673 .addr = omap44xx_uart1_addrs,
4674 .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs),
4675 .user = OCP_USER_MPU | OCP_USER_SDMA,
4676};
4677
4678/* uart1 slave ports */
4679static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4680 &omap44xx_l4_per__uart1,
4681};
4682
4683static struct omap_hwmod omap44xx_uart1_hwmod = {
4684 .name = "uart1",
4685 .class = &omap44xx_uart_hwmod_class,
4686 .mpu_irqs = omap44xx_uart1_irqs,
4687 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs),
4688 .sdma_reqs = omap44xx_uart1_sdma_reqs,
4689 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
4690 .main_clk = "uart1_fck",
4691 .prcm = {
4692 .omap4 = {
4693 .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL,
4694 },
4695 },
4696 .slaves = omap44xx_uart1_slaves,
4697 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
4698 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4699};
4700
4701/* uart2 */
4702static struct omap_hwmod omap44xx_uart2_hwmod;
4703static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4704 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
4705};
4706
4707static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4708 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4709 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
4710};
4711
4712static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4713 {
4714 .pa_start = 0x4806c000,
4715 .pa_end = 0x4806c0ff,
4716 .flags = ADDR_TYPE_RT
4717 },
4718};
4719
4720/* l4_per -> uart2 */
4721static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4722 .master = &omap44xx_l4_per_hwmod,
4723 .slave = &omap44xx_uart2_hwmod,
4724 .clk = "l4_div_ck",
4725 .addr = omap44xx_uart2_addrs,
4726 .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs),
4727 .user = OCP_USER_MPU | OCP_USER_SDMA,
4728};
4729
4730/* uart2 slave ports */
4731static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4732 &omap44xx_l4_per__uart2,
4733};
4734
4735static struct omap_hwmod omap44xx_uart2_hwmod = {
4736 .name = "uart2",
4737 .class = &omap44xx_uart_hwmod_class,
4738 .mpu_irqs = omap44xx_uart2_irqs,
4739 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs),
4740 .sdma_reqs = omap44xx_uart2_sdma_reqs,
4741 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
4742 .main_clk = "uart2_fck",
4743 .prcm = {
4744 .omap4 = {
4745 .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL,
4746 },
4747 },
4748 .slaves = omap44xx_uart2_slaves,
4749 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
4750 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4751};
4752
4753/* uart3 */
4754static struct omap_hwmod omap44xx_uart3_hwmod;
4755static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4756 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
4757};
4758
4759static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
4760 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
4761 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
4762};
4763
4764static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4765 {
4766 .pa_start = 0x48020000,
4767 .pa_end = 0x480200ff,
4768 .flags = ADDR_TYPE_RT
4769 },
4770};
4771
4772/* l4_per -> uart3 */
4773static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4774 .master = &omap44xx_l4_per_hwmod,
4775 .slave = &omap44xx_uart3_hwmod,
4776 .clk = "l4_div_ck",
4777 .addr = omap44xx_uart3_addrs,
4778 .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs),
4779 .user = OCP_USER_MPU | OCP_USER_SDMA,
4780};
4781
4782/* uart3 slave ports */
4783static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
4784 &omap44xx_l4_per__uart3,
4785};
4786
4787static struct omap_hwmod omap44xx_uart3_hwmod = {
4788 .name = "uart3",
4789 .class = &omap44xx_uart_hwmod_class,
4790 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
4791 .mpu_irqs = omap44xx_uart3_irqs,
4792 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs),
4793 .sdma_reqs = omap44xx_uart3_sdma_reqs,
4794 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
4795 .main_clk = "uart3_fck",
4796 .prcm = {
4797 .omap4 = {
4798 .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL,
4799 },
4800 },
4801 .slaves = omap44xx_uart3_slaves,
4802 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
4803 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4804};
4805
4806/* uart4 */
4807static struct omap_hwmod omap44xx_uart4_hwmod;
4808static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
4809 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
4810};
4811
4812static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
4813 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
4814 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
4815};
4816
4817static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
4818 {
4819 .pa_start = 0x4806e000,
4820 .pa_end = 0x4806e0ff,
4821 .flags = ADDR_TYPE_RT
4822 },
4823};
4824
4825/* l4_per -> uart4 */
4826static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
4827 .master = &omap44xx_l4_per_hwmod,
4828 .slave = &omap44xx_uart4_hwmod,
4829 .clk = "l4_div_ck",
4830 .addr = omap44xx_uart4_addrs,
4831 .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs),
4832 .user = OCP_USER_MPU | OCP_USER_SDMA,
4833};
4834
4835/* uart4 slave ports */
4836static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
4837 &omap44xx_l4_per__uart4,
4838};
4839
4840static struct omap_hwmod omap44xx_uart4_hwmod = {
4841 .name = "uart4",
4842 .class = &omap44xx_uart_hwmod_class,
4843 .mpu_irqs = omap44xx_uart4_irqs,
4844 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs),
4845 .sdma_reqs = omap44xx_uart4_sdma_reqs,
4846 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
4847 .main_clk = "uart4_fck",
4848 .prcm = {
4849 .omap4 = {
4850 .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL,
4851 },
4852 },
4853 .slaves = omap44xx_uart4_slaves,
4854 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
4855 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4856};
4857
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004858/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00004859 * 'usb_otg_hs' class
4860 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
4861 */
4862
4863static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
4864 .rev_offs = 0x0400,
4865 .sysc_offs = 0x0404,
4866 .syss_offs = 0x0408,
4867 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
4868 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
4869 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4870 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4871 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
4872 MSTANDBY_SMART),
4873 .sysc_fields = &omap_hwmod_sysc_type1,
4874};
4875
4876static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
4877 .name = "usb_otg_hs",
4878 .sysc = &omap44xx_usb_otg_hs_sysc,
4879};
4880
4881/* usb_otg_hs */
4882static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
4883 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
4884 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
4885};
4886
4887/* usb_otg_hs master ports */
4888static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
4889 &omap44xx_usb_otg_hs__l3_main_2,
4890};
4891
4892static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
4893 {
4894 .pa_start = 0x4a0ab000,
4895 .pa_end = 0x4a0ab003,
4896 .flags = ADDR_TYPE_RT
4897 },
4898};
4899
4900/* l4_cfg -> usb_otg_hs */
4901static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
4902 .master = &omap44xx_l4_cfg_hwmod,
4903 .slave = &omap44xx_usb_otg_hs_hwmod,
4904 .clk = "l4_div_ck",
4905 .addr = omap44xx_usb_otg_hs_addrs,
4906 .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs),
4907 .user = OCP_USER_MPU | OCP_USER_SDMA,
4908};
4909
4910/* usb_otg_hs slave ports */
4911static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
4912 &omap44xx_l4_cfg__usb_otg_hs,
4913};
4914
4915static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
4916 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
4917};
4918
4919static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
4920 .name = "usb_otg_hs",
4921 .class = &omap44xx_usb_otg_hs_hwmod_class,
4922 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
4923 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
4924 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs),
4925 .main_clk = "usb_otg_hs_ick",
4926 .prcm = {
4927 .omap4 = {
4928 .clkctrl_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL,
4929 },
4930 },
4931 .opt_clks = usb_otg_hs_opt_clks,
4932 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
4933 .slaves = omap44xx_usb_otg_hs_slaves,
4934 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
4935 .masters = omap44xx_usb_otg_hs_masters,
4936 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
4937 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4938};
4939
4940/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004941 * 'wd_timer' class
4942 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
4943 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004944 */
4945
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004946static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004947 .rev_offs = 0x0000,
4948 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004949 .syss_offs = 0x0014,
4950 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004951 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004952 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4953 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004954 .sysc_fields = &omap_hwmod_sysc_type1,
4955};
4956
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004957static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
4958 .name = "wd_timer",
4959 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00004960 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004961};
4962
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004963/* wd_timer2 */
4964static struct omap_hwmod omap44xx_wd_timer2_hwmod;
4965static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
4966 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004967};
4968
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004969static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004970 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004971 .pa_start = 0x4a314000,
4972 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004973 .flags = ADDR_TYPE_RT
4974 },
4975};
4976
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004977/* l4_wkup -> wd_timer2 */
4978static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004979 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004980 .slave = &omap44xx_wd_timer2_hwmod,
4981 .clk = "l4_wkup_clk_mux_ck",
4982 .addr = omap44xx_wd_timer2_addrs,
4983 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004984 .user = OCP_USER_MPU | OCP_USER_SDMA,
4985};
4986
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004987/* wd_timer2 slave ports */
4988static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
4989 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004990};
4991
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004992static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
4993 .name = "wd_timer2",
4994 .class = &omap44xx_wd_timer_hwmod_class,
4995 .mpu_irqs = omap44xx_wd_timer2_irqs,
4996 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs),
4997 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08004998 .prcm = {
4999 .omap4 = {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005000 .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005001 },
5002 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005003 .slaves = omap44xx_wd_timer2_slaves,
5004 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005005 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5006};
5007
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005008/* wd_timer3 */
5009static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5010static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5011 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005012};
5013
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005014static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005015 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005016 .pa_start = 0x40130000,
5017 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005018 .flags = ADDR_TYPE_RT
5019 },
5020};
5021
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005022/* l4_abe -> wd_timer3 */
5023static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5024 .master = &omap44xx_l4_abe_hwmod,
5025 .slave = &omap44xx_wd_timer3_hwmod,
5026 .clk = "ocp_abe_iclk",
5027 .addr = omap44xx_wd_timer3_addrs,
5028 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs),
5029 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005030};
5031
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005032static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005033 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005034 .pa_start = 0x49030000,
5035 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005036 .flags = ADDR_TYPE_RT
5037 },
5038};
5039
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005040/* l4_abe -> wd_timer3 (dma) */
5041static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5042 .master = &omap44xx_l4_abe_hwmod,
5043 .slave = &omap44xx_wd_timer3_hwmod,
5044 .clk = "ocp_abe_iclk",
5045 .addr = omap44xx_wd_timer3_dma_addrs,
5046 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs),
5047 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005048};
5049
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005050/* wd_timer3 slave ports */
5051static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5052 &omap44xx_l4_abe__wd_timer3,
5053 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005054};
5055
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005056static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5057 .name = "wd_timer3",
5058 .class = &omap44xx_wd_timer_hwmod_class,
5059 .mpu_irqs = omap44xx_wd_timer3_irqs,
5060 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs),
5061 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005062 .prcm = {
5063 .omap4 = {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005064 .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005065 },
5066 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005067 .slaves = omap44xx_wd_timer3_slaves,
5068 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005069 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5070};
5071
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005072static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005073
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005074 /* dmm class */
5075 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005076
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005077 /* emif_fw class */
5078 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005079
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005080 /* l3 class */
5081 &omap44xx_l3_instr_hwmod,
5082 &omap44xx_l3_main_1_hwmod,
5083 &omap44xx_l3_main_2_hwmod,
5084 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005085
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005086 /* l4 class */
5087 &omap44xx_l4_abe_hwmod,
5088 &omap44xx_l4_cfg_hwmod,
5089 &omap44xx_l4_per_hwmod,
5090 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005091
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005092 /* mpu_bus class */
5093 &omap44xx_mpu_private_hwmod,
5094
Benoit Cousson407a6882011-02-15 22:39:48 +01005095 /* aess class */
Liam Girdwood5b31b8d2011-04-30 16:19:33 +01005096 &omap44xx_aess_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005097
5098 /* bandgap class */
5099 &omap44xx_bandgap_hwmod,
5100
5101 /* counter class */
5102/* &omap44xx_counter_32k_hwmod, */
5103
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005104 /* dma class */
5105 &omap44xx_dma_system_hwmod,
5106
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005107 /* dmic class */
5108 &omap44xx_dmic_hwmod,
5109
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005110 /* dsp class */
5111 &omap44xx_dsp_hwmod,
5112 &omap44xx_dsp_c0_hwmod,
5113
Benoit Coussond63bd742011-01-27 11:17:03 +00005114 /* dss class */
5115 &omap44xx_dss_hwmod,
5116 &omap44xx_dss_dispc_hwmod,
5117 &omap44xx_dss_dsi1_hwmod,
5118 &omap44xx_dss_dsi2_hwmod,
5119 &omap44xx_dss_hdmi_hwmod,
5120 &omap44xx_dss_rfbi_hwmod,
5121 &omap44xx_dss_venc_hwmod,
5122
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005123 /* gpio class */
5124 &omap44xx_gpio1_hwmod,
5125 &omap44xx_gpio2_hwmod,
5126 &omap44xx_gpio3_hwmod,
5127 &omap44xx_gpio4_hwmod,
5128 &omap44xx_gpio5_hwmod,
5129 &omap44xx_gpio6_hwmod,
5130
Benoit Cousson407a6882011-02-15 22:39:48 +01005131 /* hsi class */
5132/* &omap44xx_hsi_hwmod, */
5133
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005134 /* i2c class */
5135 &omap44xx_i2c1_hwmod,
5136 &omap44xx_i2c2_hwmod,
5137 &omap44xx_i2c3_hwmod,
5138 &omap44xx_i2c4_hwmod,
5139
Benoit Cousson407a6882011-02-15 22:39:48 +01005140 /* ipu class */
5141 &omap44xx_ipu_hwmod,
5142 &omap44xx_ipu_c0_hwmod,
5143 &omap44xx_ipu_c1_hwmod,
5144
5145 /* iss class */
5146/* &omap44xx_iss_hwmod, */
5147
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005148 /* iva class */
5149 &omap44xx_iva_hwmod,
5150 &omap44xx_iva_seq0_hwmod,
5151 &omap44xx_iva_seq1_hwmod,
5152
Benoit Cousson407a6882011-02-15 22:39:48 +01005153 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005154 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005155
Benoit Coussonec5df922011-02-02 19:27:21 +00005156 /* mailbox class */
5157 &omap44xx_mailbox_hwmod,
5158
Benoit Cousson4ddff492011-01-31 14:50:30 +00005159 /* mcbsp class */
5160 &omap44xx_mcbsp1_hwmod,
5161 &omap44xx_mcbsp2_hwmod,
5162 &omap44xx_mcbsp3_hwmod,
5163 &omap44xx_mcbsp4_hwmod,
5164
Benoit Cousson407a6882011-02-15 22:39:48 +01005165 /* mcpdm class */
Liam Girdwood43adf032011-05-01 19:33:15 +01005166 &omap44xx_mcpdm_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005167
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305168 /* mcspi class */
5169 &omap44xx_mcspi1_hwmod,
5170 &omap44xx_mcspi2_hwmod,
5171 &omap44xx_mcspi3_hwmod,
5172 &omap44xx_mcspi4_hwmod,
5173
Benoit Cousson407a6882011-02-15 22:39:48 +01005174 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005175 &omap44xx_mmc1_hwmod,
5176 &omap44xx_mmc2_hwmod,
5177 &omap44xx_mmc3_hwmod,
5178 &omap44xx_mmc4_hwmod,
5179 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005180
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005181 /* mpu class */
5182 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305183
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005184 /* smartreflex class */
5185 &omap44xx_smartreflex_core_hwmod,
5186 &omap44xx_smartreflex_iva_hwmod,
5187 &omap44xx_smartreflex_mpu_hwmod,
5188
Benoit Coussond11c2172011-02-02 12:04:36 +00005189 /* spinlock class */
5190 &omap44xx_spinlock_hwmod,
5191
Benoit Cousson35d1a662011-02-11 11:17:14 +00005192 /* timer class */
5193 &omap44xx_timer1_hwmod,
5194 &omap44xx_timer2_hwmod,
5195 &omap44xx_timer3_hwmod,
5196 &omap44xx_timer4_hwmod,
5197 &omap44xx_timer5_hwmod,
5198 &omap44xx_timer6_hwmod,
5199 &omap44xx_timer7_hwmod,
5200 &omap44xx_timer8_hwmod,
5201 &omap44xx_timer9_hwmod,
5202 &omap44xx_timer10_hwmod,
5203 &omap44xx_timer11_hwmod,
5204
Benoit Coussondb12ba52010-09-27 20:19:19 +05305205 /* uart class */
5206 &omap44xx_uart1_hwmod,
5207 &omap44xx_uart2_hwmod,
5208 &omap44xx_uart3_hwmod,
5209 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005210
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005211 /* usb_otg_hs class */
5212 &omap44xx_usb_otg_hs_hwmod,
5213
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005214 /* wd_timer class */
5215 &omap44xx_wd_timer2_hwmod,
5216 &omap44xx_wd_timer3_hwmod,
5217
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005218 NULL,
5219};
5220
5221int __init omap44xx_hwmod_init(void)
5222{
Paul Walmsley550c8092011-02-28 11:58:14 -07005223 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005224}
5225