blob: 6201422c0606b5103c01e563f67060134658774d [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>
Avinash.H.M6d3c55f2011-07-10 05:27:16 -060025#include <plat/i2c.h>
Benoit Cousson9780a9c2010-12-07 16:26:57 -080026#include <plat/gpio.h>
Benoit Cousson531ce0d2010-12-20 18:27:19 -080027#include <plat/dma.h>
Benoit Cousson905a74d2011-02-18 14:01:06 +010028#include <plat/mcspi.h>
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +053029#include <plat/mcbsp.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080030#include <plat/mmc.h>
Andy Green4d4441a2011-07-10 05:27:16 -060031#include <plat/i2c.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020032
33#include "omap_hwmod_common_data.h"
34
Paul Walmsleyd198b512010-12-21 15:30:54 -070035#include "cm1_44xx.h"
36#include "cm2_44xx.h"
37#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020038#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070039#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020040
41/* Base offset for all OMAP4 interrupts external to MPUSS */
42#define OMAP44XX_IRQ_GIC_START 32
43
44/* Base offset for all OMAP4 dma requests */
45#define OMAP44XX_DMA_REQ_START 1
46
47/* Backward references (IPs with Bus Master capability) */
Benoit Cousson407a6882011-02-15 22:39:48 +010048static struct omap_hwmod omap44xx_aess_hwmod;
Benoit Cousson531ce0d2010-12-20 18:27:19 -080049static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020050static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070051static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Coussond63bd742011-01-27 11:17:03 +000052static struct omap_hwmod omap44xx_dss_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020053static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010054static struct omap_hwmod omap44xx_hsi_hwmod;
55static struct omap_hwmod omap44xx_ipu_hwmod;
56static struct omap_hwmod omap44xx_iss_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070057static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020058static struct omap_hwmod omap44xx_l3_instr_hwmod;
59static struct omap_hwmod omap44xx_l3_main_1_hwmod;
60static struct omap_hwmod omap44xx_l3_main_2_hwmod;
61static struct omap_hwmod omap44xx_l3_main_3_hwmod;
62static struct omap_hwmod omap44xx_l4_abe_hwmod;
63static struct omap_hwmod omap44xx_l4_cfg_hwmod;
64static struct omap_hwmod omap44xx_l4_per_hwmod;
65static struct omap_hwmod omap44xx_l4_wkup_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010066static struct omap_hwmod omap44xx_mmc1_hwmod;
67static struct omap_hwmod omap44xx_mmc2_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020068static struct omap_hwmod omap44xx_mpu_hwmod;
69static struct omap_hwmod omap44xx_mpu_private_hwmod;
Benoit Cousson5844c4e2011-02-17 12:41:05 +000070static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020071
72/*
73 * Interconnects omap_hwmod structures
74 * hwmods that compose the global OMAP interconnect
75 */
76
77/*
78 * 'dmm' class
79 * instance(s): dmm
80 */
81static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +000082 .name = "dmm",
Benoit Cousson55d2cb02010-05-12 17:54:36 +020083};
84
Benoit Cousson7e69ed92011-07-09 19:14:28 -060085/* dmm */
86static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
87 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
88 { .irq = -1 }
89};
90
Benoit Cousson55d2cb02010-05-12 17:54:36 +020091/* l3_main_1 -> dmm */
92static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
93 .master = &omap44xx_l3_main_1_hwmod,
94 .slave = &omap44xx_dmm_hwmod,
95 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070096 .user = OCP_USER_SDMA,
97};
98
99static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
100 {
101 .pa_start = 0x4e000000,
102 .pa_end = 0x4e0007ff,
103 .flags = ADDR_TYPE_RT
104 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600105 { }
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200106};
107
108/* mpu -> dmm */
109static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
110 .master = &omap44xx_mpu_hwmod,
111 .slave = &omap44xx_dmm_hwmod,
112 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700113 .addr = omap44xx_dmm_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700114 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200115};
116
117/* dmm slave ports */
118static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
119 &omap44xx_l3_main_1__dmm,
120 &omap44xx_mpu__dmm,
121};
122
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200123static struct omap_hwmod omap44xx_dmm_hwmod = {
124 .name = "dmm",
125 .class = &omap44xx_dmm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600126 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600127 .prcm = {
128 .omap4 = {
129 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600130 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600131 },
132 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200133 .slaves = omap44xx_dmm_slaves,
134 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
Benoit Coussona5322c62011-07-10 05:56:29 -0600135 .mpu_irqs = omap44xx_dmm_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200136 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
137};
138
139/*
140 * 'emif_fw' class
141 * instance(s): emif_fw
142 */
143static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000144 .name = "emif_fw",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200145};
146
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600147/* emif_fw */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200148/* dmm -> emif_fw */
149static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
150 .master = &omap44xx_dmm_hwmod,
151 .slave = &omap44xx_emif_fw_hwmod,
152 .clk = "l3_div_ck",
153 .user = OCP_USER_MPU | OCP_USER_SDMA,
154};
155
Benoit Cousson659fa822010-12-21 21:08:34 -0700156static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
157 {
158 .pa_start = 0x4a20c000,
159 .pa_end = 0x4a20c0ff,
160 .flags = ADDR_TYPE_RT
161 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600162 { }
Benoit Cousson659fa822010-12-21 21:08:34 -0700163};
164
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200165/* l4_cfg -> emif_fw */
166static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
167 .master = &omap44xx_l4_cfg_hwmod,
168 .slave = &omap44xx_emif_fw_hwmod,
169 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700170 .addr = omap44xx_emif_fw_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700171 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200172};
173
174/* emif_fw slave ports */
175static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
176 &omap44xx_dmm__emif_fw,
177 &omap44xx_l4_cfg__emif_fw,
178};
179
180static struct omap_hwmod omap44xx_emif_fw_hwmod = {
181 .name = "emif_fw",
182 .class = &omap44xx_emif_fw_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600183 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600184 .prcm = {
185 .omap4 = {
186 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600187 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600188 },
189 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200190 .slaves = omap44xx_emif_fw_slaves,
191 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
192 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
193};
194
195/*
196 * 'l3' class
197 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
198 */
199static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000200 .name = "l3",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200201};
202
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600203/* l3_instr */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700204/* iva -> l3_instr */
205static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
206 .master = &omap44xx_iva_hwmod,
207 .slave = &omap44xx_l3_instr_hwmod,
208 .clk = "l3_div_ck",
209 .user = OCP_USER_MPU | OCP_USER_SDMA,
210};
211
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200212/* l3_main_3 -> l3_instr */
213static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
214 .master = &omap44xx_l3_main_3_hwmod,
215 .slave = &omap44xx_l3_instr_hwmod,
216 .clk = "l3_div_ck",
217 .user = OCP_USER_MPU | OCP_USER_SDMA,
218};
219
220/* l3_instr slave ports */
221static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700222 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200223 &omap44xx_l3_main_3__l3_instr,
224};
225
226static struct omap_hwmod omap44xx_l3_instr_hwmod = {
227 .name = "l3_instr",
228 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600229 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600230 .prcm = {
231 .omap4 = {
232 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600233 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600234 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600235 },
236 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200237 .slaves = omap44xx_l3_instr_slaves,
238 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
239 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
240};
241
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600242/* l3_main_1 */
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600243static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
244 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
245 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
246 { .irq = -1 }
247};
248
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700249/* dsp -> l3_main_1 */
250static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
251 .master = &omap44xx_dsp_hwmod,
252 .slave = &omap44xx_l3_main_1_hwmod,
253 .clk = "l3_div_ck",
254 .user = OCP_USER_MPU | OCP_USER_SDMA,
255};
256
Benoit Coussond63bd742011-01-27 11:17:03 +0000257/* dss -> l3_main_1 */
258static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
259 .master = &omap44xx_dss_hwmod,
260 .slave = &omap44xx_l3_main_1_hwmod,
261 .clk = "l3_div_ck",
262 .user = OCP_USER_MPU | OCP_USER_SDMA,
263};
264
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200265/* l3_main_2 -> l3_main_1 */
266static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
267 .master = &omap44xx_l3_main_2_hwmod,
268 .slave = &omap44xx_l3_main_1_hwmod,
269 .clk = "l3_div_ck",
270 .user = OCP_USER_MPU | OCP_USER_SDMA,
271};
272
273/* l4_cfg -> l3_main_1 */
274static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
275 .master = &omap44xx_l4_cfg_hwmod,
276 .slave = &omap44xx_l3_main_1_hwmod,
277 .clk = "l4_div_ck",
278 .user = OCP_USER_MPU | OCP_USER_SDMA,
279};
280
Benoit Cousson407a6882011-02-15 22:39:48 +0100281/* mmc1 -> l3_main_1 */
282static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
283 .master = &omap44xx_mmc1_hwmod,
284 .slave = &omap44xx_l3_main_1_hwmod,
285 .clk = "l3_div_ck",
286 .user = OCP_USER_MPU | OCP_USER_SDMA,
287};
288
289/* mmc2 -> l3_main_1 */
290static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
291 .master = &omap44xx_mmc2_hwmod,
292 .slave = &omap44xx_l3_main_1_hwmod,
293 .clk = "l3_div_ck",
294 .user = OCP_USER_MPU | OCP_USER_SDMA,
295};
296
sricharanc4645232011-02-07 21:12:11 +0530297static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
298 {
299 .pa_start = 0x44000000,
300 .pa_end = 0x44000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600301 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530302 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600303 { }
sricharanc4645232011-02-07 21:12:11 +0530304};
305
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200306/* mpu -> l3_main_1 */
307static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
308 .master = &omap44xx_mpu_hwmod,
309 .slave = &omap44xx_l3_main_1_hwmod,
310 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530311 .addr = omap44xx_l3_main_1_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600312 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200313};
314
315/* l3_main_1 slave ports */
316static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700317 &omap44xx_dsp__l3_main_1,
Benoit Coussond63bd742011-01-27 11:17:03 +0000318 &omap44xx_dss__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200319 &omap44xx_l3_main_2__l3_main_1,
320 &omap44xx_l4_cfg__l3_main_1,
Benoit Cousson407a6882011-02-15 22:39:48 +0100321 &omap44xx_mmc1__l3_main_1,
322 &omap44xx_mmc2__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200323 &omap44xx_mpu__l3_main_1,
324};
325
326static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
327 .name = "l3_main_1",
328 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600329 .clkdm_name = "l3_1_clkdm",
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600330 .mpu_irqs = omap44xx_l3_main_1_irqs,
Benoit Coussond0f06312011-07-10 05:56:30 -0600331 .prcm = {
332 .omap4 = {
333 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600334 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600335 },
336 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200337 .slaves = omap44xx_l3_main_1_slaves,
338 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
339 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
340};
341
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600342/* l3_main_2 */
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000343/* dma_system -> l3_main_2 */
344static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
345 .master = &omap44xx_dma_system_hwmod,
346 .slave = &omap44xx_l3_main_2_hwmod,
347 .clk = "l3_div_ck",
348 .user = OCP_USER_MPU | OCP_USER_SDMA,
349};
350
Benoit Cousson407a6882011-02-15 22:39:48 +0100351/* hsi -> l3_main_2 */
352static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
353 .master = &omap44xx_hsi_hwmod,
354 .slave = &omap44xx_l3_main_2_hwmod,
355 .clk = "l3_div_ck",
356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
359/* ipu -> l3_main_2 */
360static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
361 .master = &omap44xx_ipu_hwmod,
362 .slave = &omap44xx_l3_main_2_hwmod,
363 .clk = "l3_div_ck",
364 .user = OCP_USER_MPU | OCP_USER_SDMA,
365};
366
367/* iss -> l3_main_2 */
368static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
369 .master = &omap44xx_iss_hwmod,
370 .slave = &omap44xx_l3_main_2_hwmod,
371 .clk = "l3_div_ck",
372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
374
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700375/* iva -> l3_main_2 */
376static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
377 .master = &omap44xx_iva_hwmod,
378 .slave = &omap44xx_l3_main_2_hwmod,
379 .clk = "l3_div_ck",
380 .user = OCP_USER_MPU | OCP_USER_SDMA,
381};
382
sricharanc4645232011-02-07 21:12:11 +0530383static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
384 {
385 .pa_start = 0x44800000,
386 .pa_end = 0x44801fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600387 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530388 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600389 { }
sricharanc4645232011-02-07 21:12:11 +0530390};
391
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200392/* l3_main_1 -> l3_main_2 */
393static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
394 .master = &omap44xx_l3_main_1_hwmod,
395 .slave = &omap44xx_l3_main_2_hwmod,
396 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530397 .addr = omap44xx_l3_main_2_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600398 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200399};
400
401/* l4_cfg -> l3_main_2 */
402static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
403 .master = &omap44xx_l4_cfg_hwmod,
404 .slave = &omap44xx_l3_main_2_hwmod,
405 .clk = "l4_div_ck",
406 .user = OCP_USER_MPU | OCP_USER_SDMA,
407};
408
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000409/* usb_otg_hs -> l3_main_2 */
410static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
411 .master = &omap44xx_usb_otg_hs_hwmod,
412 .slave = &omap44xx_l3_main_2_hwmod,
413 .clk = "l3_div_ck",
414 .user = OCP_USER_MPU | OCP_USER_SDMA,
415};
416
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200417/* l3_main_2 slave ports */
418static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800419 &omap44xx_dma_system__l3_main_2,
Benoit Cousson407a6882011-02-15 22:39:48 +0100420 &omap44xx_hsi__l3_main_2,
421 &omap44xx_ipu__l3_main_2,
422 &omap44xx_iss__l3_main_2,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700423 &omap44xx_iva__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200424 &omap44xx_l3_main_1__l3_main_2,
425 &omap44xx_l4_cfg__l3_main_2,
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000426 &omap44xx_usb_otg_hs__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200427};
428
429static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
430 .name = "l3_main_2",
431 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600432 .clkdm_name = "l3_2_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600433 .prcm = {
434 .omap4 = {
435 .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600436 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600437 },
438 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200439 .slaves = omap44xx_l3_main_2_slaves,
440 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
441 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
442};
443
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600444/* l3_main_3 */
sricharanc4645232011-02-07 21:12:11 +0530445static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
446 {
447 .pa_start = 0x45000000,
448 .pa_end = 0x45000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600449 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530450 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600451 { }
sricharanc4645232011-02-07 21:12:11 +0530452};
453
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200454/* l3_main_1 -> l3_main_3 */
455static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
456 .master = &omap44xx_l3_main_1_hwmod,
457 .slave = &omap44xx_l3_main_3_hwmod,
458 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530459 .addr = omap44xx_l3_main_3_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600460 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200461};
462
463/* l3_main_2 -> l3_main_3 */
464static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
465 .master = &omap44xx_l3_main_2_hwmod,
466 .slave = &omap44xx_l3_main_3_hwmod,
467 .clk = "l3_div_ck",
468 .user = OCP_USER_MPU | OCP_USER_SDMA,
469};
470
471/* l4_cfg -> l3_main_3 */
472static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
473 .master = &omap44xx_l4_cfg_hwmod,
474 .slave = &omap44xx_l3_main_3_hwmod,
475 .clk = "l4_div_ck",
476 .user = OCP_USER_MPU | OCP_USER_SDMA,
477};
478
479/* l3_main_3 slave ports */
480static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
481 &omap44xx_l3_main_1__l3_main_3,
482 &omap44xx_l3_main_2__l3_main_3,
483 &omap44xx_l4_cfg__l3_main_3,
484};
485
486static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
487 .name = "l3_main_3",
488 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600489 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600490 .prcm = {
491 .omap4 = {
492 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600493 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600494 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600495 },
496 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200497 .slaves = omap44xx_l3_main_3_slaves,
498 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
499 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
500};
501
502/*
503 * 'l4' class
504 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
505 */
506static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000507 .name = "l4",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200508};
509
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600510/* l4_abe */
Benoit Cousson407a6882011-02-15 22:39:48 +0100511/* aess -> l4_abe */
512static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
513 .master = &omap44xx_aess_hwmod,
514 .slave = &omap44xx_l4_abe_hwmod,
515 .clk = "ocp_abe_iclk",
516 .user = OCP_USER_MPU | OCP_USER_SDMA,
517};
518
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700519/* dsp -> l4_abe */
520static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
521 .master = &omap44xx_dsp_hwmod,
522 .slave = &omap44xx_l4_abe_hwmod,
523 .clk = "ocp_abe_iclk",
524 .user = OCP_USER_MPU | OCP_USER_SDMA,
525};
526
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200527/* l3_main_1 -> l4_abe */
528static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
529 .master = &omap44xx_l3_main_1_hwmod,
530 .slave = &omap44xx_l4_abe_hwmod,
531 .clk = "l3_div_ck",
532 .user = OCP_USER_MPU | OCP_USER_SDMA,
533};
534
535/* mpu -> l4_abe */
536static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
537 .master = &omap44xx_mpu_hwmod,
538 .slave = &omap44xx_l4_abe_hwmod,
539 .clk = "ocp_abe_iclk",
540 .user = OCP_USER_MPU | OCP_USER_SDMA,
541};
542
543/* l4_abe slave ports */
544static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100545 &omap44xx_aess__l4_abe,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700546 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200547 &omap44xx_l3_main_1__l4_abe,
548 &omap44xx_mpu__l4_abe,
549};
550
551static struct omap_hwmod omap44xx_l4_abe_hwmod = {
552 .name = "l4_abe",
553 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600554 .clkdm_name = "abe_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600555 .prcm = {
556 .omap4 = {
557 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
558 },
559 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200560 .slaves = omap44xx_l4_abe_slaves,
561 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
562 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
563};
564
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600565/* l4_cfg */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200566/* l3_main_1 -> l4_cfg */
567static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
568 .master = &omap44xx_l3_main_1_hwmod,
569 .slave = &omap44xx_l4_cfg_hwmod,
570 .clk = "l3_div_ck",
571 .user = OCP_USER_MPU | OCP_USER_SDMA,
572};
573
574/* l4_cfg slave ports */
575static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
576 &omap44xx_l3_main_1__l4_cfg,
577};
578
579static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
580 .name = "l4_cfg",
581 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600582 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600583 .prcm = {
584 .omap4 = {
585 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600586 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600587 },
588 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200589 .slaves = omap44xx_l4_cfg_slaves,
590 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
591 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
592};
593
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600594/* l4_per */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200595/* l3_main_2 -> l4_per */
596static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
597 .master = &omap44xx_l3_main_2_hwmod,
598 .slave = &omap44xx_l4_per_hwmod,
599 .clk = "l3_div_ck",
600 .user = OCP_USER_MPU | OCP_USER_SDMA,
601};
602
603/* l4_per slave ports */
604static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
605 &omap44xx_l3_main_2__l4_per,
606};
607
608static struct omap_hwmod omap44xx_l4_per_hwmod = {
609 .name = "l4_per",
610 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600611 .clkdm_name = "l4_per_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600612 .prcm = {
613 .omap4 = {
614 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600615 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600616 },
617 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200618 .slaves = omap44xx_l4_per_slaves,
619 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
620 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
621};
622
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600623/* l4_wkup */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200624/* l4_cfg -> l4_wkup */
625static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
626 .master = &omap44xx_l4_cfg_hwmod,
627 .slave = &omap44xx_l4_wkup_hwmod,
628 .clk = "l4_div_ck",
629 .user = OCP_USER_MPU | OCP_USER_SDMA,
630};
631
632/* l4_wkup slave ports */
633static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
634 &omap44xx_l4_cfg__l4_wkup,
635};
636
637static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
638 .name = "l4_wkup",
639 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600640 .clkdm_name = "l4_wkup_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600641 .prcm = {
642 .omap4 = {
643 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600644 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600645 },
646 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200647 .slaves = omap44xx_l4_wkup_slaves,
648 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
649 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
650};
651
652/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700653 * 'mpu_bus' class
654 * instance(s): mpu_private
655 */
656static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000657 .name = "mpu_bus",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700658};
659
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600660/* mpu_private */
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700661/* mpu -> mpu_private */
662static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
663 .master = &omap44xx_mpu_hwmod,
664 .slave = &omap44xx_mpu_private_hwmod,
665 .clk = "l3_div_ck",
666 .user = OCP_USER_MPU | OCP_USER_SDMA,
667};
668
669/* mpu_private slave ports */
670static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
671 &omap44xx_mpu__mpu_private,
672};
673
674static struct omap_hwmod omap44xx_mpu_private_hwmod = {
675 .name = "mpu_private",
676 .class = &omap44xx_mpu_bus_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600677 .clkdm_name = "mpuss_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700678 .slaves = omap44xx_mpu_private_slaves,
679 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
680 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
681};
682
683/*
684 * Modules omap_hwmod structures
685 *
686 * The following IPs are excluded for the moment because:
687 * - They do not need an explicit SW control using omap_hwmod API.
688 * - They still need to be validated with the driver
689 * properly adapted to omap_hwmod / omap_device
690 *
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700691 * c2c
692 * c2c_target_fw
693 * cm_core
694 * cm_core_aon
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700695 * ctrl_module_core
696 * ctrl_module_pad_core
697 * ctrl_module_pad_wkup
698 * ctrl_module_wkup
699 * debugss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700700 * efuse_ctrl_cust
701 * efuse_ctrl_std
702 * elm
703 * emif1
704 * emif2
705 * fdif
706 * gpmc
707 * gpu
708 * hdq1w
Benoit Cousson00fe6102011-07-09 19:14:28 -0600709 * mcasp
710 * mpu_c0
711 * mpu_c1
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700712 * ocmc_ram
713 * ocp2scp_usb_phy
714 * ocp_wp_noc
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700715 * prcm_mpu
716 * prm
717 * scrm
718 * sl2if
719 * slimbus1
720 * slimbus2
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700721 * usb_host_fs
722 * usb_host_hs
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700723 * usb_phy_cm
724 * usb_tll_hs
725 * usim
726 */
727
728/*
Benoit Cousson407a6882011-02-15 22:39:48 +0100729 * 'aess' class
730 * audio engine sub system
731 */
732
733static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
734 .rev_offs = 0x0000,
735 .sysc_offs = 0x0010,
736 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
737 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
Benoit Coussonc614ebf2011-07-01 22:54:01 +0200738 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
739 MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +0100740 .sysc_fields = &omap_hwmod_sysc_type2,
741};
742
743static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
744 .name = "aess",
745 .sysc = &omap44xx_aess_sysc,
746};
747
748/* aess */
749static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
750 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600751 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100752};
753
754static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
755 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
756 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
757 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
758 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
759 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
760 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
761 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
762 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -0600763 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100764};
765
766/* aess master ports */
767static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
768 &omap44xx_aess__l4_abe,
769};
770
771static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
772 {
773 .pa_start = 0x401f1000,
774 .pa_end = 0x401f13ff,
775 .flags = ADDR_TYPE_RT
776 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600777 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100778};
779
780/* l4_abe -> aess */
781static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
782 .master = &omap44xx_l4_abe_hwmod,
783 .slave = &omap44xx_aess_hwmod,
784 .clk = "ocp_abe_iclk",
785 .addr = omap44xx_aess_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100786 .user = OCP_USER_MPU,
787};
788
789static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
790 {
791 .pa_start = 0x490f1000,
792 .pa_end = 0x490f13ff,
793 .flags = ADDR_TYPE_RT
794 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600795 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100796};
797
798/* l4_abe -> aess (dma) */
799static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
800 .master = &omap44xx_l4_abe_hwmod,
801 .slave = &omap44xx_aess_hwmod,
802 .clk = "ocp_abe_iclk",
803 .addr = omap44xx_aess_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100804 .user = OCP_USER_SDMA,
805};
806
807/* aess slave ports */
808static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
809 &omap44xx_l4_abe__aess,
810 &omap44xx_l4_abe__aess_dma,
811};
812
813static struct omap_hwmod omap44xx_aess_hwmod = {
814 .name = "aess",
815 .class = &omap44xx_aess_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600816 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100817 .mpu_irqs = omap44xx_aess_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100818 .sdma_reqs = omap44xx_aess_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100819 .main_clk = "aess_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600820 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100821 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600822 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600823 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600824 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +0100825 },
826 },
827 .slaves = omap44xx_aess_slaves,
828 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
829 .masters = omap44xx_aess_masters,
830 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
831 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
832};
833
834/*
835 * 'bandgap' class
836 * bangap reference for ldo regulators
837 */
838
839static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
840 .name = "bandgap",
841};
842
843/* bandgap */
844static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
845 { .role = "fclk", .clk = "bandgap_fclk" },
846};
847
848static struct omap_hwmod omap44xx_bandgap_hwmod = {
849 .name = "bandgap",
850 .class = &omap44xx_bandgap_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600851 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600852 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100853 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600854 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100855 },
856 },
857 .opt_clks = bandgap_opt_clks,
858 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
859 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
860};
861
862/*
863 * 'counter' class
864 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
865 */
866
867static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
868 .rev_offs = 0x0000,
869 .sysc_offs = 0x0004,
870 .sysc_flags = SYSC_HAS_SIDLEMODE,
871 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
872 SIDLE_SMART_WKUP),
873 .sysc_fields = &omap_hwmod_sysc_type1,
874};
875
876static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
877 .name = "counter",
878 .sysc = &omap44xx_counter_sysc,
879};
880
881/* counter_32k */
882static struct omap_hwmod omap44xx_counter_32k_hwmod;
883static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
884 {
885 .pa_start = 0x4a304000,
886 .pa_end = 0x4a30401f,
887 .flags = ADDR_TYPE_RT
888 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600889 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100890};
891
892/* l4_wkup -> counter_32k */
893static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
894 .master = &omap44xx_l4_wkup_hwmod,
895 .slave = &omap44xx_counter_32k_hwmod,
896 .clk = "l4_wkup_clk_mux_ck",
897 .addr = omap44xx_counter_32k_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100898 .user = OCP_USER_MPU | OCP_USER_SDMA,
899};
900
901/* counter_32k slave ports */
902static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
903 &omap44xx_l4_wkup__counter_32k,
904};
905
906static struct omap_hwmod omap44xx_counter_32k_hwmod = {
907 .name = "counter_32k",
908 .class = &omap44xx_counter_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600909 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100910 .flags = HWMOD_SWSUP_SIDLE,
911 .main_clk = "sys_32k_ck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600912 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100913 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600914 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600915 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100916 },
917 },
918 .slaves = omap44xx_counter_32k_slaves,
919 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
920 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
921};
922
923/*
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000924 * 'dma' class
925 * dma controller for data exchange between memory to memory (i.e. internal or
926 * external memory) and gp peripherals to memory or memory to gp peripherals
927 */
928
929static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
930 .rev_offs = 0x0000,
931 .sysc_offs = 0x002c,
932 .syss_offs = 0x0028,
933 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
934 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
935 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
936 SYSS_HAS_RESET_STATUS),
937 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
938 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
939 .sysc_fields = &omap_hwmod_sysc_type1,
940};
941
942static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
943 .name = "dma",
944 .sysc = &omap44xx_dma_sysc,
945};
946
947/* dma dev_attr */
948static struct omap_dma_dev_attr dma_dev_attr = {
949 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
950 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
951 .lch_count = 32,
952};
953
954/* dma_system */
955static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
956 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
957 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
958 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
959 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600960 { .irq = -1 }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000961};
962
963/* dma_system master ports */
964static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
965 &omap44xx_dma_system__l3_main_2,
966};
967
968static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
969 {
970 .pa_start = 0x4a056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -0600971 .pa_end = 0x4a056fff,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000972 .flags = ADDR_TYPE_RT
973 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600974 { }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000975};
976
977/* l4_cfg -> dma_system */
978static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
979 .master = &omap44xx_l4_cfg_hwmod,
980 .slave = &omap44xx_dma_system_hwmod,
981 .clk = "l4_div_ck",
982 .addr = omap44xx_dma_system_addrs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000983 .user = OCP_USER_MPU | OCP_USER_SDMA,
984};
985
986/* dma_system slave ports */
987static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
988 &omap44xx_l4_cfg__dma_system,
989};
990
991static struct omap_hwmod omap44xx_dma_system_hwmod = {
992 .name = "dma_system",
993 .class = &omap44xx_dma_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600994 .clkdm_name = "l3_dma_clkdm",
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000995 .mpu_irqs = omap44xx_dma_system_irqs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000996 .main_clk = "l3_div_ck",
997 .prcm = {
998 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600999 .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001000 .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001001 },
1002 },
1003 .dev_attr = &dma_dev_attr,
1004 .slaves = omap44xx_dma_system_slaves,
1005 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
1006 .masters = omap44xx_dma_system_masters,
1007 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
1008 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1009};
1010
1011/*
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001012 * 'dmic' class
1013 * digital microphone controller
1014 */
1015
1016static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
1017 .rev_offs = 0x0000,
1018 .sysc_offs = 0x0010,
1019 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1020 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1021 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1022 SIDLE_SMART_WKUP),
1023 .sysc_fields = &omap_hwmod_sysc_type2,
1024};
1025
1026static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1027 .name = "dmic",
1028 .sysc = &omap44xx_dmic_sysc,
1029};
1030
1031/* dmic */
1032static struct omap_hwmod omap44xx_dmic_hwmod;
1033static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1034 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001035 { .irq = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001036};
1037
1038static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1039 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001040 { .dma_req = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001041};
1042
1043static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1044 {
1045 .pa_start = 0x4012e000,
1046 .pa_end = 0x4012e07f,
1047 .flags = ADDR_TYPE_RT
1048 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001049 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001050};
1051
1052/* l4_abe -> dmic */
1053static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1054 .master = &omap44xx_l4_abe_hwmod,
1055 .slave = &omap44xx_dmic_hwmod,
1056 .clk = "ocp_abe_iclk",
1057 .addr = omap44xx_dmic_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001058 .user = OCP_USER_MPU,
1059};
1060
1061static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1062 {
1063 .pa_start = 0x4902e000,
1064 .pa_end = 0x4902e07f,
1065 .flags = ADDR_TYPE_RT
1066 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001067 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001068};
1069
1070/* l4_abe -> dmic (dma) */
1071static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1072 .master = &omap44xx_l4_abe_hwmod,
1073 .slave = &omap44xx_dmic_hwmod,
1074 .clk = "ocp_abe_iclk",
1075 .addr = omap44xx_dmic_dma_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001076 .user = OCP_USER_SDMA,
1077};
1078
1079/* dmic slave ports */
1080static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1081 &omap44xx_l4_abe__dmic,
1082 &omap44xx_l4_abe__dmic_dma,
1083};
1084
1085static struct omap_hwmod omap44xx_dmic_hwmod = {
1086 .name = "dmic",
1087 .class = &omap44xx_dmic_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001088 .clkdm_name = "abe_clkdm",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001089 .mpu_irqs = omap44xx_dmic_irqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001090 .sdma_reqs = omap44xx_dmic_sdma_reqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001091 .main_clk = "dmic_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06001092 .prcm = {
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001093 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001094 .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001095 .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001096 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001097 },
1098 },
1099 .slaves = omap44xx_dmic_slaves,
1100 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
1101 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1102};
1103
1104/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001105 * 'dsp' class
1106 * dsp sub-system
1107 */
1108
1109static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001110 .name = "dsp",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001111};
1112
1113/* dsp */
1114static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1115 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001116 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001117};
1118
1119static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1120 { .name = "mmu_cache", .rst_shift = 1 },
1121};
1122
1123static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1124 { .name = "dsp", .rst_shift = 0 },
1125};
1126
1127/* dsp -> iva */
1128static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1129 .master = &omap44xx_dsp_hwmod,
1130 .slave = &omap44xx_iva_hwmod,
1131 .clk = "dpll_iva_m5x2_ck",
1132};
1133
1134/* dsp master ports */
1135static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1136 &omap44xx_dsp__l3_main_1,
1137 &omap44xx_dsp__l4_abe,
1138 &omap44xx_dsp__iva,
1139};
1140
1141/* l4_cfg -> dsp */
1142static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1143 .master = &omap44xx_l4_cfg_hwmod,
1144 .slave = &omap44xx_dsp_hwmod,
1145 .clk = "l4_div_ck",
1146 .user = OCP_USER_MPU | OCP_USER_SDMA,
1147};
1148
1149/* dsp slave ports */
1150static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1151 &omap44xx_l4_cfg__dsp,
1152};
1153
1154/* Pseudo hwmod for reset control purpose only */
1155static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1156 .name = "dsp_c0",
1157 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001158 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001159 .flags = HWMOD_INIT_NO_RESET,
1160 .rst_lines = omap44xx_dsp_c0_resets,
1161 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1162 .prcm = {
1163 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06001164 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001165 },
1166 },
1167 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1168};
1169
1170static struct omap_hwmod omap44xx_dsp_hwmod = {
1171 .name = "dsp",
1172 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001173 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001174 .mpu_irqs = omap44xx_dsp_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001175 .rst_lines = omap44xx_dsp_resets,
1176 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1177 .main_clk = "dsp_fck",
1178 .prcm = {
1179 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001180 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06001181 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001182 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001183 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001184 },
1185 },
1186 .slaves = omap44xx_dsp_slaves,
1187 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1188 .masters = omap44xx_dsp_masters,
1189 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
1190 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1191};
1192
1193/*
Benoit Coussond63bd742011-01-27 11:17:03 +00001194 * 'dss' class
1195 * display sub-system
1196 */
1197
1198static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
1199 .rev_offs = 0x0000,
1200 .syss_offs = 0x0014,
1201 .sysc_flags = SYSS_HAS_RESET_STATUS,
1202};
1203
1204static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1205 .name = "dss",
1206 .sysc = &omap44xx_dss_sysc,
1207};
1208
1209/* dss */
1210/* dss master ports */
1211static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1212 &omap44xx_dss__l3_main_1,
1213};
1214
1215static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1216 {
1217 .pa_start = 0x58000000,
1218 .pa_end = 0x5800007f,
1219 .flags = ADDR_TYPE_RT
1220 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001221 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001222};
1223
1224/* l3_main_2 -> dss */
1225static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1226 .master = &omap44xx_l3_main_2_hwmod,
1227 .slave = &omap44xx_dss_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001228 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001229 .addr = omap44xx_dss_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001230 .user = OCP_USER_SDMA,
1231};
1232
1233static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1234 {
1235 .pa_start = 0x48040000,
1236 .pa_end = 0x4804007f,
1237 .flags = ADDR_TYPE_RT
1238 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001239 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001240};
1241
1242/* l4_per -> dss */
1243static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1244 .master = &omap44xx_l4_per_hwmod,
1245 .slave = &omap44xx_dss_hwmod,
1246 .clk = "l4_div_ck",
1247 .addr = omap44xx_dss_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001248 .user = OCP_USER_MPU,
1249};
1250
1251/* dss slave ports */
1252static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1253 &omap44xx_l3_main_2__dss,
1254 &omap44xx_l4_per__dss,
1255};
1256
1257static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1258 { .role = "sys_clk", .clk = "dss_sys_clk" },
1259 { .role = "tv_clk", .clk = "dss_tv_clk" },
1260 { .role = "dss_clk", .clk = "dss_dss_clk" },
1261 { .role = "video_clk", .clk = "dss_48mhz_clk" },
1262};
1263
1264static struct omap_hwmod omap44xx_dss_hwmod = {
1265 .name = "dss_core",
1266 .class = &omap44xx_dss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001267 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001268 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001269 .prcm = {
1270 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001271 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001272 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001273 },
1274 },
1275 .opt_clks = dss_opt_clks,
1276 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1277 .slaves = omap44xx_dss_slaves,
1278 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1279 .masters = omap44xx_dss_masters,
1280 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
1281 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1282};
1283
1284/*
1285 * 'dispc' class
1286 * display controller
1287 */
1288
1289static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
1290 .rev_offs = 0x0000,
1291 .sysc_offs = 0x0010,
1292 .syss_offs = 0x0014,
1293 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1294 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
1295 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1296 SYSS_HAS_RESET_STATUS),
1297 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1298 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1299 .sysc_fields = &omap_hwmod_sysc_type1,
1300};
1301
1302static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1303 .name = "dispc",
1304 .sysc = &omap44xx_dispc_sysc,
1305};
1306
1307/* dss_dispc */
1308static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1309static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1310 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001311 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001312};
1313
1314static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1315 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001316 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001317};
1318
1319static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1320 {
1321 .pa_start = 0x58001000,
1322 .pa_end = 0x58001fff,
1323 .flags = ADDR_TYPE_RT
1324 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001325 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001326};
1327
1328/* l3_main_2 -> dss_dispc */
1329static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1330 .master = &omap44xx_l3_main_2_hwmod,
1331 .slave = &omap44xx_dss_dispc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001332 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001333 .addr = omap44xx_dss_dispc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001334 .user = OCP_USER_SDMA,
1335};
1336
1337static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1338 {
1339 .pa_start = 0x48041000,
1340 .pa_end = 0x48041fff,
1341 .flags = ADDR_TYPE_RT
1342 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001343 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001344};
1345
1346/* l4_per -> dss_dispc */
1347static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1348 .master = &omap44xx_l4_per_hwmod,
1349 .slave = &omap44xx_dss_dispc_hwmod,
1350 .clk = "l4_div_ck",
1351 .addr = omap44xx_dss_dispc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001352 .user = OCP_USER_MPU,
1353};
1354
1355/* dss_dispc slave ports */
1356static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1357 &omap44xx_l3_main_2__dss_dispc,
1358 &omap44xx_l4_per__dss_dispc,
1359};
1360
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001361static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = {
1362 { .role = "sys_clk", .clk = "dss_sys_clk" },
1363 { .role = "tv_clk", .clk = "dss_tv_clk" },
1364 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
1365};
1366
Benoit Coussond63bd742011-01-27 11:17:03 +00001367static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1368 .name = "dss_dispc",
1369 .class = &omap44xx_dispc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001370 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001371 .mpu_irqs = omap44xx_dss_dispc_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001372 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001373 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001374 .prcm = {
1375 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001376 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001377 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001378 },
1379 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001380 .opt_clks = dss_dispc_opt_clks,
1381 .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001382 .slaves = omap44xx_dss_dispc_slaves,
1383 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
1384 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1385};
1386
1387/*
1388 * 'dsi' class
1389 * display serial interface controller
1390 */
1391
1392static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1393 .rev_offs = 0x0000,
1394 .sysc_offs = 0x0010,
1395 .syss_offs = 0x0014,
1396 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1397 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1398 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1399 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1400 .sysc_fields = &omap_hwmod_sysc_type1,
1401};
1402
1403static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1404 .name = "dsi",
1405 .sysc = &omap44xx_dsi_sysc,
1406};
1407
1408/* dss_dsi1 */
1409static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1410static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1411 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001412 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001413};
1414
1415static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1416 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001417 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001418};
1419
1420static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1421 {
1422 .pa_start = 0x58004000,
1423 .pa_end = 0x580041ff,
1424 .flags = ADDR_TYPE_RT
1425 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001426 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001427};
1428
1429/* l3_main_2 -> dss_dsi1 */
1430static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1431 .master = &omap44xx_l3_main_2_hwmod,
1432 .slave = &omap44xx_dss_dsi1_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001433 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001434 .addr = omap44xx_dss_dsi1_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001435 .user = OCP_USER_SDMA,
1436};
1437
1438static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1439 {
1440 .pa_start = 0x48044000,
1441 .pa_end = 0x480441ff,
1442 .flags = ADDR_TYPE_RT
1443 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001444 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001445};
1446
1447/* l4_per -> dss_dsi1 */
1448static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1449 .master = &omap44xx_l4_per_hwmod,
1450 .slave = &omap44xx_dss_dsi1_hwmod,
1451 .clk = "l4_div_ck",
1452 .addr = omap44xx_dss_dsi1_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001453 .user = OCP_USER_MPU,
1454};
1455
1456/* dss_dsi1 slave ports */
1457static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1458 &omap44xx_l3_main_2__dss_dsi1,
1459 &omap44xx_l4_per__dss_dsi1,
1460};
1461
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001462static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1463 { .role = "sys_clk", .clk = "dss_sys_clk" },
1464};
1465
Benoit Coussond63bd742011-01-27 11:17:03 +00001466static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1467 .name = "dss_dsi1",
1468 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001469 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001470 .mpu_irqs = omap44xx_dss_dsi1_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001471 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001472 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001473 .prcm = {
1474 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001475 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001476 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001477 },
1478 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001479 .opt_clks = dss_dsi1_opt_clks,
1480 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001481 .slaves = omap44xx_dss_dsi1_slaves,
1482 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
1483 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1484};
1485
1486/* dss_dsi2 */
1487static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1488static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1489 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001490 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001491};
1492
1493static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1494 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001495 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001496};
1497
1498static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1499 {
1500 .pa_start = 0x58005000,
1501 .pa_end = 0x580051ff,
1502 .flags = ADDR_TYPE_RT
1503 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001504 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001505};
1506
1507/* l3_main_2 -> dss_dsi2 */
1508static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1509 .master = &omap44xx_l3_main_2_hwmod,
1510 .slave = &omap44xx_dss_dsi2_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001511 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001512 .addr = omap44xx_dss_dsi2_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001513 .user = OCP_USER_SDMA,
1514};
1515
1516static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1517 {
1518 .pa_start = 0x48045000,
1519 .pa_end = 0x480451ff,
1520 .flags = ADDR_TYPE_RT
1521 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001522 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001523};
1524
1525/* l4_per -> dss_dsi2 */
1526static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1527 .master = &omap44xx_l4_per_hwmod,
1528 .slave = &omap44xx_dss_dsi2_hwmod,
1529 .clk = "l4_div_ck",
1530 .addr = omap44xx_dss_dsi2_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001531 .user = OCP_USER_MPU,
1532};
1533
1534/* dss_dsi2 slave ports */
1535static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1536 &omap44xx_l3_main_2__dss_dsi2,
1537 &omap44xx_l4_per__dss_dsi2,
1538};
1539
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001540static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1541 { .role = "sys_clk", .clk = "dss_sys_clk" },
1542};
1543
Benoit Coussond63bd742011-01-27 11:17:03 +00001544static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1545 .name = "dss_dsi2",
1546 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001547 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001548 .mpu_irqs = omap44xx_dss_dsi2_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001549 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001550 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001551 .prcm = {
1552 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001553 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001554 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001555 },
1556 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001557 .opt_clks = dss_dsi2_opt_clks,
1558 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001559 .slaves = omap44xx_dss_dsi2_slaves,
1560 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
1561 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1562};
1563
1564/*
1565 * 'hdmi' class
1566 * hdmi controller
1567 */
1568
1569static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1570 .rev_offs = 0x0000,
1571 .sysc_offs = 0x0010,
1572 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1573 SYSC_HAS_SOFTRESET),
1574 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1575 SIDLE_SMART_WKUP),
1576 .sysc_fields = &omap_hwmod_sysc_type2,
1577};
1578
1579static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1580 .name = "hdmi",
1581 .sysc = &omap44xx_hdmi_sysc,
1582};
1583
1584/* dss_hdmi */
1585static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1586static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1587 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001588 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001589};
1590
1591static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1592 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001593 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001594};
1595
1596static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1597 {
1598 .pa_start = 0x58006000,
1599 .pa_end = 0x58006fff,
1600 .flags = ADDR_TYPE_RT
1601 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001602 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001603};
1604
1605/* l3_main_2 -> dss_hdmi */
1606static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1607 .master = &omap44xx_l3_main_2_hwmod,
1608 .slave = &omap44xx_dss_hdmi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001609 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001610 .addr = omap44xx_dss_hdmi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001611 .user = OCP_USER_SDMA,
1612};
1613
1614static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1615 {
1616 .pa_start = 0x48046000,
1617 .pa_end = 0x48046fff,
1618 .flags = ADDR_TYPE_RT
1619 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001620 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001621};
1622
1623/* l4_per -> dss_hdmi */
1624static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1625 .master = &omap44xx_l4_per_hwmod,
1626 .slave = &omap44xx_dss_hdmi_hwmod,
1627 .clk = "l4_div_ck",
1628 .addr = omap44xx_dss_hdmi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001629 .user = OCP_USER_MPU,
1630};
1631
1632/* dss_hdmi slave ports */
1633static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1634 &omap44xx_l3_main_2__dss_hdmi,
1635 &omap44xx_l4_per__dss_hdmi,
1636};
1637
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001638static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1639 { .role = "sys_clk", .clk = "dss_sys_clk" },
1640};
1641
Benoit Coussond63bd742011-01-27 11:17:03 +00001642static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1643 .name = "dss_hdmi",
1644 .class = &omap44xx_hdmi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001645 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001646 .mpu_irqs = omap44xx_dss_hdmi_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001647 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001648 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001649 .prcm = {
1650 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001651 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001652 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001653 },
1654 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001655 .opt_clks = dss_hdmi_opt_clks,
1656 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001657 .slaves = omap44xx_dss_hdmi_slaves,
1658 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
1659 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1660};
1661
1662/*
1663 * 'rfbi' class
1664 * remote frame buffer interface
1665 */
1666
1667static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1668 .rev_offs = 0x0000,
1669 .sysc_offs = 0x0010,
1670 .syss_offs = 0x0014,
1671 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1672 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1673 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1674 .sysc_fields = &omap_hwmod_sysc_type1,
1675};
1676
1677static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1678 .name = "rfbi",
1679 .sysc = &omap44xx_rfbi_sysc,
1680};
1681
1682/* dss_rfbi */
1683static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1684static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1685 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001686 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001687};
1688
1689static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1690 {
1691 .pa_start = 0x58002000,
1692 .pa_end = 0x580020ff,
1693 .flags = ADDR_TYPE_RT
1694 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001695 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001696};
1697
1698/* l3_main_2 -> dss_rfbi */
1699static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1700 .master = &omap44xx_l3_main_2_hwmod,
1701 .slave = &omap44xx_dss_rfbi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001702 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001703 .addr = omap44xx_dss_rfbi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001704 .user = OCP_USER_SDMA,
1705};
1706
1707static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1708 {
1709 .pa_start = 0x48042000,
1710 .pa_end = 0x480420ff,
1711 .flags = ADDR_TYPE_RT
1712 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001713 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001714};
1715
1716/* l4_per -> dss_rfbi */
1717static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1718 .master = &omap44xx_l4_per_hwmod,
1719 .slave = &omap44xx_dss_rfbi_hwmod,
1720 .clk = "l4_div_ck",
1721 .addr = omap44xx_dss_rfbi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001722 .user = OCP_USER_MPU,
1723};
1724
1725/* dss_rfbi slave ports */
1726static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1727 &omap44xx_l3_main_2__dss_rfbi,
1728 &omap44xx_l4_per__dss_rfbi,
1729};
1730
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001731static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1732 { .role = "ick", .clk = "dss_fck" },
1733};
1734
Benoit Coussond63bd742011-01-27 11:17:03 +00001735static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1736 .name = "dss_rfbi",
1737 .class = &omap44xx_rfbi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001738 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001739 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001740 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001741 .prcm = {
1742 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001743 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001744 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001745 },
1746 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001747 .opt_clks = dss_rfbi_opt_clks,
1748 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001749 .slaves = omap44xx_dss_rfbi_slaves,
1750 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
1751 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1752};
1753
1754/*
1755 * 'venc' class
1756 * video encoder
1757 */
1758
1759static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1760 .name = "venc",
1761};
1762
1763/* dss_venc */
1764static struct omap_hwmod omap44xx_dss_venc_hwmod;
1765static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1766 {
1767 .pa_start = 0x58003000,
1768 .pa_end = 0x580030ff,
1769 .flags = ADDR_TYPE_RT
1770 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001771 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001772};
1773
1774/* l3_main_2 -> dss_venc */
1775static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1776 .master = &omap44xx_l3_main_2_hwmod,
1777 .slave = &omap44xx_dss_venc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001778 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001779 .addr = omap44xx_dss_venc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001780 .user = OCP_USER_SDMA,
1781};
1782
1783static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1784 {
1785 .pa_start = 0x48043000,
1786 .pa_end = 0x480430ff,
1787 .flags = ADDR_TYPE_RT
1788 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001789 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001790};
1791
1792/* l4_per -> dss_venc */
1793static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1794 .master = &omap44xx_l4_per_hwmod,
1795 .slave = &omap44xx_dss_venc_hwmod,
1796 .clk = "l4_div_ck",
1797 .addr = omap44xx_dss_venc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001798 .user = OCP_USER_MPU,
1799};
1800
1801/* dss_venc slave ports */
1802static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1803 &omap44xx_l3_main_2__dss_venc,
1804 &omap44xx_l4_per__dss_venc,
1805};
1806
1807static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1808 .name = "dss_venc",
1809 .class = &omap44xx_venc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001810 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001811 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001812 .prcm = {
1813 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001814 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001815 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001816 },
1817 },
1818 .slaves = omap44xx_dss_venc_slaves,
1819 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
1820 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1821};
1822
1823/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001824 * 'gpio' class
1825 * general purpose io module
1826 */
1827
1828static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1829 .rev_offs = 0x0000,
1830 .sysc_offs = 0x0010,
1831 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001832 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1833 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1834 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001835 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1836 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001837 .sysc_fields = &omap_hwmod_sysc_type1,
1838};
1839
1840static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001841 .name = "gpio",
1842 .sysc = &omap44xx_gpio_sysc,
1843 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001844};
1845
1846/* gpio dev_attr */
1847static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001848 .bank_width = 32,
1849 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001850};
1851
1852/* gpio1 */
1853static struct omap_hwmod omap44xx_gpio1_hwmod;
1854static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1855 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001856 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001857};
1858
1859static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1860 {
1861 .pa_start = 0x4a310000,
1862 .pa_end = 0x4a3101ff,
1863 .flags = ADDR_TYPE_RT
1864 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001865 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001866};
1867
1868/* l4_wkup -> gpio1 */
1869static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1870 .master = &omap44xx_l4_wkup_hwmod,
1871 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001872 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001873 .addr = omap44xx_gpio1_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001874 .user = OCP_USER_MPU | OCP_USER_SDMA,
1875};
1876
1877/* gpio1 slave ports */
1878static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1879 &omap44xx_l4_wkup__gpio1,
1880};
1881
1882static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001883 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001884};
1885
1886static struct omap_hwmod omap44xx_gpio1_hwmod = {
1887 .name = "gpio1",
1888 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001889 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001890 .mpu_irqs = omap44xx_gpio1_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001891 .main_clk = "gpio1_ick",
1892 .prcm = {
1893 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001894 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001895 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001896 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001897 },
1898 },
1899 .opt_clks = gpio1_opt_clks,
1900 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1901 .dev_attr = &gpio_dev_attr,
1902 .slaves = omap44xx_gpio1_slaves,
1903 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
1904 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1905};
1906
1907/* gpio2 */
1908static struct omap_hwmod omap44xx_gpio2_hwmod;
1909static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1910 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001911 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001912};
1913
1914static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1915 {
1916 .pa_start = 0x48055000,
1917 .pa_end = 0x480551ff,
1918 .flags = ADDR_TYPE_RT
1919 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001920 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001921};
1922
1923/* l4_per -> gpio2 */
1924static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1925 .master = &omap44xx_l4_per_hwmod,
1926 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001927 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001928 .addr = omap44xx_gpio2_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001929 .user = OCP_USER_MPU | OCP_USER_SDMA,
1930};
1931
1932/* gpio2 slave ports */
1933static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1934 &omap44xx_l4_per__gpio2,
1935};
1936
1937static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001938 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001939};
1940
1941static struct omap_hwmod omap44xx_gpio2_hwmod = {
1942 .name = "gpio2",
1943 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001944 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001945 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001946 .mpu_irqs = omap44xx_gpio2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001947 .main_clk = "gpio2_ick",
1948 .prcm = {
1949 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001950 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001951 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001952 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001953 },
1954 },
1955 .opt_clks = gpio2_opt_clks,
1956 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1957 .dev_attr = &gpio_dev_attr,
1958 .slaves = omap44xx_gpio2_slaves,
1959 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
1960 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
1961};
1962
1963/* gpio3 */
1964static struct omap_hwmod omap44xx_gpio3_hwmod;
1965static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1966 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001967 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001968};
1969
1970static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1971 {
1972 .pa_start = 0x48057000,
1973 .pa_end = 0x480571ff,
1974 .flags = ADDR_TYPE_RT
1975 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001976 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001977};
1978
1979/* l4_per -> gpio3 */
1980static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1981 .master = &omap44xx_l4_per_hwmod,
1982 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001983 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001984 .addr = omap44xx_gpio3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001985 .user = OCP_USER_MPU | OCP_USER_SDMA,
1986};
1987
1988/* gpio3 slave ports */
1989static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1990 &omap44xx_l4_per__gpio3,
1991};
1992
1993static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001994 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001995};
1996
1997static struct omap_hwmod omap44xx_gpio3_hwmod = {
1998 .name = "gpio3",
1999 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002000 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002001 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002002 .mpu_irqs = omap44xx_gpio3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002003 .main_clk = "gpio3_ick",
2004 .prcm = {
2005 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002006 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002007 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002008 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002009 },
2010 },
2011 .opt_clks = gpio3_opt_clks,
2012 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
2013 .dev_attr = &gpio_dev_attr,
2014 .slaves = omap44xx_gpio3_slaves,
2015 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
2016 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2017};
2018
2019/* gpio4 */
2020static struct omap_hwmod omap44xx_gpio4_hwmod;
2021static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
2022 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002023 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002024};
2025
2026static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
2027 {
2028 .pa_start = 0x48059000,
2029 .pa_end = 0x480591ff,
2030 .flags = ADDR_TYPE_RT
2031 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002032 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002033};
2034
2035/* l4_per -> gpio4 */
2036static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2037 .master = &omap44xx_l4_per_hwmod,
2038 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002039 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002040 .addr = omap44xx_gpio4_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002041 .user = OCP_USER_MPU | OCP_USER_SDMA,
2042};
2043
2044/* gpio4 slave ports */
2045static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2046 &omap44xx_l4_per__gpio4,
2047};
2048
2049static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002050 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002051};
2052
2053static struct omap_hwmod omap44xx_gpio4_hwmod = {
2054 .name = "gpio4",
2055 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002056 .clkdm_name = "l4_per_clkdm",
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_gpio4_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002059 .main_clk = "gpio4_ick",
2060 .prcm = {
2061 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002062 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002063 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002064 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002065 },
2066 },
2067 .opt_clks = gpio4_opt_clks,
2068 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2069 .dev_attr = &gpio_dev_attr,
2070 .slaves = omap44xx_gpio4_slaves,
2071 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
2072 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2073};
2074
2075/* gpio5 */
2076static struct omap_hwmod omap44xx_gpio5_hwmod;
2077static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2078 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002079 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002080};
2081
2082static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2083 {
2084 .pa_start = 0x4805b000,
2085 .pa_end = 0x4805b1ff,
2086 .flags = ADDR_TYPE_RT
2087 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002088 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002089};
2090
2091/* l4_per -> gpio5 */
2092static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2093 .master = &omap44xx_l4_per_hwmod,
2094 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002095 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002096 .addr = omap44xx_gpio5_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002097 .user = OCP_USER_MPU | OCP_USER_SDMA,
2098};
2099
2100/* gpio5 slave ports */
2101static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2102 &omap44xx_l4_per__gpio5,
2103};
2104
2105static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002106 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002107};
2108
2109static struct omap_hwmod omap44xx_gpio5_hwmod = {
2110 .name = "gpio5",
2111 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002112 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002113 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002114 .mpu_irqs = omap44xx_gpio5_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002115 .main_clk = "gpio5_ick",
2116 .prcm = {
2117 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002118 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002119 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002120 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002121 },
2122 },
2123 .opt_clks = gpio5_opt_clks,
2124 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2125 .dev_attr = &gpio_dev_attr,
2126 .slaves = omap44xx_gpio5_slaves,
2127 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
2128 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2129};
2130
2131/* gpio6 */
2132static struct omap_hwmod omap44xx_gpio6_hwmod;
2133static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2134 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002135 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002136};
2137
2138static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2139 {
2140 .pa_start = 0x4805d000,
2141 .pa_end = 0x4805d1ff,
2142 .flags = ADDR_TYPE_RT
2143 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002144 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002145};
2146
2147/* l4_per -> gpio6 */
2148static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2149 .master = &omap44xx_l4_per_hwmod,
2150 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002151 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002152 .addr = omap44xx_gpio6_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002153 .user = OCP_USER_MPU | OCP_USER_SDMA,
2154};
2155
2156/* gpio6 slave ports */
2157static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2158 &omap44xx_l4_per__gpio6,
2159};
2160
2161static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002162 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002163};
2164
2165static struct omap_hwmod omap44xx_gpio6_hwmod = {
2166 .name = "gpio6",
2167 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002168 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002169 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002170 .mpu_irqs = omap44xx_gpio6_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002171 .main_clk = "gpio6_ick",
2172 .prcm = {
2173 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002174 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002175 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002176 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002177 },
2178 },
2179 .opt_clks = gpio6_opt_clks,
2180 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2181 .dev_attr = &gpio_dev_attr,
2182 .slaves = omap44xx_gpio6_slaves,
2183 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
2184 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2185};
2186
2187/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002188 * 'hsi' class
2189 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2190 * serial if)
2191 */
2192
2193static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2194 .rev_offs = 0x0000,
2195 .sysc_offs = 0x0010,
2196 .syss_offs = 0x0014,
2197 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2198 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2199 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2200 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2201 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002202 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002203 .sysc_fields = &omap_hwmod_sysc_type1,
2204};
2205
2206static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2207 .name = "hsi",
2208 .sysc = &omap44xx_hsi_sysc,
2209};
2210
2211/* hsi */
2212static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2213 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2214 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2215 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002216 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002217};
2218
2219/* hsi master ports */
2220static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2221 &omap44xx_hsi__l3_main_2,
2222};
2223
2224static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2225 {
2226 .pa_start = 0x4a058000,
2227 .pa_end = 0x4a05bfff,
2228 .flags = ADDR_TYPE_RT
2229 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002230 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002231};
2232
2233/* l4_cfg -> hsi */
2234static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2235 .master = &omap44xx_l4_cfg_hwmod,
2236 .slave = &omap44xx_hsi_hwmod,
2237 .clk = "l4_div_ck",
2238 .addr = omap44xx_hsi_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002239 .user = OCP_USER_MPU | OCP_USER_SDMA,
2240};
2241
2242/* hsi slave ports */
2243static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2244 &omap44xx_l4_cfg__hsi,
2245};
2246
2247static struct omap_hwmod omap44xx_hsi_hwmod = {
2248 .name = "hsi",
2249 .class = &omap44xx_hsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002250 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002251 .mpu_irqs = omap44xx_hsi_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002252 .main_clk = "hsi_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002253 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002254 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002255 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002256 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002257 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002258 },
2259 },
2260 .slaves = omap44xx_hsi_slaves,
2261 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2262 .masters = omap44xx_hsi_masters,
2263 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
2264 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2265};
2266
2267/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302268 * 'i2c' class
2269 * multimaster high-speed i2c controller
2270 */
2271
2272static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2273 .sysc_offs = 0x0010,
2274 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002275 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2276 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002277 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002278 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2279 SIDLE_SMART_WKUP),
Benoit Coussonf7764712010-09-21 19:37:14 +05302280 .sysc_fields = &omap_hwmod_sysc_type1,
2281};
2282
2283static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002284 .name = "i2c",
2285 .sysc = &omap44xx_i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06002286 .rev = OMAP_I2C_IP_VERSION_2,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002287 .reset = &omap_i2c_reset,
Benoit Coussonf7764712010-09-21 19:37:14 +05302288};
2289
Andy Green4d4441a2011-07-10 05:27:16 -06002290static struct omap_i2c_dev_attr i2c_dev_attr = {
2291 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2292};
2293
Benoit Coussonf7764712010-09-21 19:37:14 +05302294/* i2c1 */
2295static struct omap_hwmod omap44xx_i2c1_hwmod;
2296static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2297 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002298 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302299};
2300
2301static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2302 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2303 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002304 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302305};
2306
2307static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2308 {
2309 .pa_start = 0x48070000,
2310 .pa_end = 0x480700ff,
2311 .flags = ADDR_TYPE_RT
2312 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002313 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302314};
2315
2316/* l4_per -> i2c1 */
2317static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2318 .master = &omap44xx_l4_per_hwmod,
2319 .slave = &omap44xx_i2c1_hwmod,
2320 .clk = "l4_div_ck",
2321 .addr = omap44xx_i2c1_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302322 .user = OCP_USER_MPU | OCP_USER_SDMA,
2323};
2324
2325/* i2c1 slave ports */
2326static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2327 &omap44xx_l4_per__i2c1,
2328};
2329
2330static struct omap_hwmod omap44xx_i2c1_hwmod = {
2331 .name = "i2c1",
2332 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002333 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002334 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302335 .mpu_irqs = omap44xx_i2c1_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302336 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302337 .main_clk = "i2c1_fck",
2338 .prcm = {
2339 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002340 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002341 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002342 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302343 },
2344 },
2345 .slaves = omap44xx_i2c1_slaves,
2346 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002347 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302348 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2349};
2350
2351/* i2c2 */
2352static struct omap_hwmod omap44xx_i2c2_hwmod;
2353static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2354 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002355 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302356};
2357
2358static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2359 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2360 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002361 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302362};
2363
2364static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2365 {
2366 .pa_start = 0x48072000,
2367 .pa_end = 0x480720ff,
2368 .flags = ADDR_TYPE_RT
2369 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002370 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302371};
2372
2373/* l4_per -> i2c2 */
2374static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2375 .master = &omap44xx_l4_per_hwmod,
2376 .slave = &omap44xx_i2c2_hwmod,
2377 .clk = "l4_div_ck",
2378 .addr = omap44xx_i2c2_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302379 .user = OCP_USER_MPU | OCP_USER_SDMA,
2380};
2381
2382/* i2c2 slave ports */
2383static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2384 &omap44xx_l4_per__i2c2,
2385};
2386
2387static struct omap_hwmod omap44xx_i2c2_hwmod = {
2388 .name = "i2c2",
2389 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002390 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002391 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302392 .mpu_irqs = omap44xx_i2c2_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302393 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302394 .main_clk = "i2c2_fck",
2395 .prcm = {
2396 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002397 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002398 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002399 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302400 },
2401 },
2402 .slaves = omap44xx_i2c2_slaves,
2403 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002404 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302405 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2406};
2407
2408/* i2c3 */
2409static struct omap_hwmod omap44xx_i2c3_hwmod;
2410static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2411 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002412 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302413};
2414
2415static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2416 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2417 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002418 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302419};
2420
2421static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2422 {
2423 .pa_start = 0x48060000,
2424 .pa_end = 0x480600ff,
2425 .flags = ADDR_TYPE_RT
2426 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002427 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302428};
2429
2430/* l4_per -> i2c3 */
2431static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2432 .master = &omap44xx_l4_per_hwmod,
2433 .slave = &omap44xx_i2c3_hwmod,
2434 .clk = "l4_div_ck",
2435 .addr = omap44xx_i2c3_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302436 .user = OCP_USER_MPU | OCP_USER_SDMA,
2437};
2438
2439/* i2c3 slave ports */
2440static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2441 &omap44xx_l4_per__i2c3,
2442};
2443
2444static struct omap_hwmod omap44xx_i2c3_hwmod = {
2445 .name = "i2c3",
2446 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002447 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002448 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302449 .mpu_irqs = omap44xx_i2c3_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302450 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302451 .main_clk = "i2c3_fck",
2452 .prcm = {
2453 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002454 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002455 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002456 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302457 },
2458 },
2459 .slaves = omap44xx_i2c3_slaves,
2460 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002461 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302462 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2463};
2464
2465/* i2c4 */
2466static struct omap_hwmod omap44xx_i2c4_hwmod;
2467static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2468 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002469 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302470};
2471
2472static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2473 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2474 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002475 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302476};
2477
2478static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2479 {
2480 .pa_start = 0x48350000,
2481 .pa_end = 0x483500ff,
2482 .flags = ADDR_TYPE_RT
2483 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002484 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302485};
2486
2487/* l4_per -> i2c4 */
2488static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2489 .master = &omap44xx_l4_per_hwmod,
2490 .slave = &omap44xx_i2c4_hwmod,
2491 .clk = "l4_div_ck",
2492 .addr = omap44xx_i2c4_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302493 .user = OCP_USER_MPU | OCP_USER_SDMA,
2494};
2495
2496/* i2c4 slave ports */
2497static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2498 &omap44xx_l4_per__i2c4,
2499};
2500
2501static struct omap_hwmod omap44xx_i2c4_hwmod = {
2502 .name = "i2c4",
2503 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002504 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002505 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302506 .mpu_irqs = omap44xx_i2c4_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302507 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302508 .main_clk = "i2c4_fck",
2509 .prcm = {
2510 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002511 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002512 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002513 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302514 },
2515 },
2516 .slaves = omap44xx_i2c4_slaves,
2517 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002518 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302519 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2520};
2521
2522/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002523 * 'ipu' class
2524 * imaging processor unit
2525 */
2526
2527static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2528 .name = "ipu",
2529};
2530
2531/* ipu */
2532static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2533 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002534 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002535};
2536
2537static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2538 { .name = "cpu0", .rst_shift = 0 },
2539};
2540
2541static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2542 { .name = "cpu1", .rst_shift = 1 },
2543};
2544
2545static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2546 { .name = "mmu_cache", .rst_shift = 2 },
2547};
2548
2549/* ipu master ports */
2550static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2551 &omap44xx_ipu__l3_main_2,
2552};
2553
2554/* l3_main_2 -> ipu */
2555static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2556 .master = &omap44xx_l3_main_2_hwmod,
2557 .slave = &omap44xx_ipu_hwmod,
2558 .clk = "l3_div_ck",
2559 .user = OCP_USER_MPU | OCP_USER_SDMA,
2560};
2561
2562/* ipu slave ports */
2563static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2564 &omap44xx_l3_main_2__ipu,
2565};
2566
2567/* Pseudo hwmod for reset control purpose only */
2568static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2569 .name = "ipu_c0",
2570 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002571 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002572 .flags = HWMOD_INIT_NO_RESET,
2573 .rst_lines = omap44xx_ipu_c0_resets,
2574 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002575 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002576 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002577 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002578 },
2579 },
2580 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2581};
2582
2583/* Pseudo hwmod for reset control purpose only */
2584static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2585 .name = "ipu_c1",
2586 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002587 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002588 .flags = HWMOD_INIT_NO_RESET,
2589 .rst_lines = omap44xx_ipu_c1_resets,
2590 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002591 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002592 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002593 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002594 },
2595 },
2596 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2597};
2598
2599static struct omap_hwmod omap44xx_ipu_hwmod = {
2600 .name = "ipu",
2601 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002602 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002603 .mpu_irqs = omap44xx_ipu_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002604 .rst_lines = omap44xx_ipu_resets,
2605 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2606 .main_clk = "ipu_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002607 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002608 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002609 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002610 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002611 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002612 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002613 },
2614 },
2615 .slaves = omap44xx_ipu_slaves,
2616 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2617 .masters = omap44xx_ipu_masters,
2618 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
2619 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2620};
2621
2622/*
2623 * 'iss' class
2624 * external images sensor pixel data processor
2625 */
2626
2627static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2628 .rev_offs = 0x0000,
2629 .sysc_offs = 0x0010,
2630 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2631 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2632 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2633 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002634 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002635 .sysc_fields = &omap_hwmod_sysc_type2,
2636};
2637
2638static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2639 .name = "iss",
2640 .sysc = &omap44xx_iss_sysc,
2641};
2642
2643/* iss */
2644static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2645 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002646 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002647};
2648
2649static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2650 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2651 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2652 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2653 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002654 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002655};
2656
2657/* iss master ports */
2658static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2659 &omap44xx_iss__l3_main_2,
2660};
2661
2662static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2663 {
2664 .pa_start = 0x52000000,
2665 .pa_end = 0x520000ff,
2666 .flags = ADDR_TYPE_RT
2667 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002668 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002669};
2670
2671/* l3_main_2 -> iss */
2672static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2673 .master = &omap44xx_l3_main_2_hwmod,
2674 .slave = &omap44xx_iss_hwmod,
2675 .clk = "l3_div_ck",
2676 .addr = omap44xx_iss_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002677 .user = OCP_USER_MPU | OCP_USER_SDMA,
2678};
2679
2680/* iss slave ports */
2681static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2682 &omap44xx_l3_main_2__iss,
2683};
2684
2685static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2686 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2687};
2688
2689static struct omap_hwmod omap44xx_iss_hwmod = {
2690 .name = "iss",
2691 .class = &omap44xx_iss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002692 .clkdm_name = "iss_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002693 .mpu_irqs = omap44xx_iss_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002694 .sdma_reqs = omap44xx_iss_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002695 .main_clk = "iss_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002696 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002697 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002698 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002699 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002700 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002701 },
2702 },
2703 .opt_clks = iss_opt_clks,
2704 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2705 .slaves = omap44xx_iss_slaves,
2706 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2707 .masters = omap44xx_iss_masters,
2708 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
2709 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2710};
2711
2712/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002713 * 'iva' class
2714 * multi-standard video encoder/decoder hardware accelerator
2715 */
2716
2717static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002718 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002719};
2720
2721/* iva */
2722static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2723 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2724 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2725 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002726 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002727};
2728
2729static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2730 { .name = "logic", .rst_shift = 2 },
2731};
2732
2733static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2734 { .name = "seq0", .rst_shift = 0 },
2735};
2736
2737static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2738 { .name = "seq1", .rst_shift = 1 },
2739};
2740
2741/* iva master ports */
2742static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2743 &omap44xx_iva__l3_main_2,
2744 &omap44xx_iva__l3_instr,
2745};
2746
2747static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2748 {
2749 .pa_start = 0x5a000000,
2750 .pa_end = 0x5a07ffff,
2751 .flags = ADDR_TYPE_RT
2752 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002753 { }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002754};
2755
2756/* l3_main_2 -> iva */
2757static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2758 .master = &omap44xx_l3_main_2_hwmod,
2759 .slave = &omap44xx_iva_hwmod,
2760 .clk = "l3_div_ck",
2761 .addr = omap44xx_iva_addrs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002762 .user = OCP_USER_MPU,
2763};
2764
2765/* iva slave ports */
2766static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2767 &omap44xx_dsp__iva,
2768 &omap44xx_l3_main_2__iva,
2769};
2770
2771/* Pseudo hwmod for reset control purpose only */
2772static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2773 .name = "iva_seq0",
2774 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002775 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002776 .flags = HWMOD_INIT_NO_RESET,
2777 .rst_lines = omap44xx_iva_seq0_resets,
2778 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2779 .prcm = {
2780 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002781 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002782 },
2783 },
2784 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2785};
2786
2787/* Pseudo hwmod for reset control purpose only */
2788static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2789 .name = "iva_seq1",
2790 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002791 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002792 .flags = HWMOD_INIT_NO_RESET,
2793 .rst_lines = omap44xx_iva_seq1_resets,
2794 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2795 .prcm = {
2796 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002797 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002798 },
2799 },
2800 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2801};
2802
2803static struct omap_hwmod omap44xx_iva_hwmod = {
2804 .name = "iva",
2805 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002806 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002807 .mpu_irqs = omap44xx_iva_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002808 .rst_lines = omap44xx_iva_resets,
2809 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2810 .main_clk = "iva_fck",
2811 .prcm = {
2812 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002813 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002814 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002815 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002816 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002817 },
2818 },
2819 .slaves = omap44xx_iva_slaves,
2820 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2821 .masters = omap44xx_iva_masters,
2822 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
2823 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2824};
2825
2826/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002827 * 'kbd' class
2828 * keyboard controller
2829 */
2830
2831static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2832 .rev_offs = 0x0000,
2833 .sysc_offs = 0x0010,
2834 .syss_offs = 0x0014,
2835 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2836 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2837 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2838 SYSS_HAS_RESET_STATUS),
2839 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2840 .sysc_fields = &omap_hwmod_sysc_type1,
2841};
2842
2843static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2844 .name = "kbd",
2845 .sysc = &omap44xx_kbd_sysc,
2846};
2847
2848/* kbd */
2849static struct omap_hwmod omap44xx_kbd_hwmod;
2850static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2851 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002852 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002853};
2854
2855static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2856 {
2857 .pa_start = 0x4a31c000,
2858 .pa_end = 0x4a31c07f,
2859 .flags = ADDR_TYPE_RT
2860 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002861 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002862};
2863
2864/* l4_wkup -> kbd */
2865static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2866 .master = &omap44xx_l4_wkup_hwmod,
2867 .slave = &omap44xx_kbd_hwmod,
2868 .clk = "l4_wkup_clk_mux_ck",
2869 .addr = omap44xx_kbd_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002870 .user = OCP_USER_MPU | OCP_USER_SDMA,
2871};
2872
2873/* kbd slave ports */
2874static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2875 &omap44xx_l4_wkup__kbd,
2876};
2877
2878static struct omap_hwmod omap44xx_kbd_hwmod = {
2879 .name = "kbd",
2880 .class = &omap44xx_kbd_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002881 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002882 .mpu_irqs = omap44xx_kbd_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002883 .main_clk = "kbd_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002884 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002885 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002886 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002887 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002888 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002889 },
2890 },
2891 .slaves = omap44xx_kbd_slaves,
2892 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
2893 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2894};
2895
2896/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002897 * 'mailbox' class
2898 * mailbox module allowing communication between the on-chip processors using a
2899 * queued mailbox-interrupt mechanism.
2900 */
2901
2902static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2903 .rev_offs = 0x0000,
2904 .sysc_offs = 0x0010,
2905 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2906 SYSC_HAS_SOFTRESET),
2907 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2908 .sysc_fields = &omap_hwmod_sysc_type2,
2909};
2910
2911static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2912 .name = "mailbox",
2913 .sysc = &omap44xx_mailbox_sysc,
2914};
2915
2916/* mailbox */
2917static struct omap_hwmod omap44xx_mailbox_hwmod;
2918static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2919 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002920 { .irq = -1 }
Benoit Coussonec5df922011-02-02 19:27:21 +00002921};
2922
2923static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2924 {
2925 .pa_start = 0x4a0f4000,
2926 .pa_end = 0x4a0f41ff,
2927 .flags = ADDR_TYPE_RT
2928 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002929 { }
Benoit Coussonec5df922011-02-02 19:27:21 +00002930};
2931
2932/* l4_cfg -> mailbox */
2933static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2934 .master = &omap44xx_l4_cfg_hwmod,
2935 .slave = &omap44xx_mailbox_hwmod,
2936 .clk = "l4_div_ck",
2937 .addr = omap44xx_mailbox_addrs,
Benoit Coussonec5df922011-02-02 19:27:21 +00002938 .user = OCP_USER_MPU | OCP_USER_SDMA,
2939};
2940
2941/* mailbox slave ports */
2942static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2943 &omap44xx_l4_cfg__mailbox,
2944};
2945
2946static struct omap_hwmod omap44xx_mailbox_hwmod = {
2947 .name = "mailbox",
2948 .class = &omap44xx_mailbox_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002949 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussonec5df922011-02-02 19:27:21 +00002950 .mpu_irqs = omap44xx_mailbox_irqs,
Benoit Cousson00fe6102011-07-09 19:14:28 -06002951 .prcm = {
Benoit Coussonec5df922011-02-02 19:27:21 +00002952 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002953 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002954 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
Benoit Coussonec5df922011-02-02 19:27:21 +00002955 },
2956 },
2957 .slaves = omap44xx_mailbox_slaves,
2958 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
2959 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2960};
2961
2962/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002963 * 'mcbsp' class
2964 * multi channel buffered serial port controller
2965 */
2966
2967static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2968 .sysc_offs = 0x008c,
2969 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2970 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2971 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2972 .sysc_fields = &omap_hwmod_sysc_type1,
2973};
2974
2975static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2976 .name = "mcbsp",
2977 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302978 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002979};
2980
2981/* mcbsp1 */
2982static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2983static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2984 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002985 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002986};
2987
2988static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2989 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2990 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002991 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002992};
2993
2994static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2995 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302996 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002997 .pa_start = 0x40122000,
2998 .pa_end = 0x401220ff,
2999 .flags = ADDR_TYPE_RT
3000 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003001 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003002};
3003
3004/* l4_abe -> mcbsp1 */
3005static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
3006 .master = &omap44xx_l4_abe_hwmod,
3007 .slave = &omap44xx_mcbsp1_hwmod,
3008 .clk = "ocp_abe_iclk",
3009 .addr = omap44xx_mcbsp1_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003010 .user = OCP_USER_MPU,
3011};
3012
3013static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
3014 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303015 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003016 .pa_start = 0x49022000,
3017 .pa_end = 0x490220ff,
3018 .flags = ADDR_TYPE_RT
3019 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003020 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003021};
3022
3023/* l4_abe -> mcbsp1 (dma) */
3024static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
3025 .master = &omap44xx_l4_abe_hwmod,
3026 .slave = &omap44xx_mcbsp1_hwmod,
3027 .clk = "ocp_abe_iclk",
3028 .addr = omap44xx_mcbsp1_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003029 .user = OCP_USER_SDMA,
3030};
3031
3032/* mcbsp1 slave ports */
3033static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
3034 &omap44xx_l4_abe__mcbsp1,
3035 &omap44xx_l4_abe__mcbsp1_dma,
3036};
3037
3038static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
3039 .name = "mcbsp1",
3040 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003041 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003042 .mpu_irqs = omap44xx_mcbsp1_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003043 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003044 .main_clk = "mcbsp1_fck",
3045 .prcm = {
3046 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003047 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003048 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003049 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003050 },
3051 },
3052 .slaves = omap44xx_mcbsp1_slaves,
3053 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
3054 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3055};
3056
3057/* mcbsp2 */
3058static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3059static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3060 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003061 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003062};
3063
3064static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3065 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
3066 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003067 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003068};
3069
3070static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3071 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303072 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003073 .pa_start = 0x40124000,
3074 .pa_end = 0x401240ff,
3075 .flags = ADDR_TYPE_RT
3076 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003077 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003078};
3079
3080/* l4_abe -> mcbsp2 */
3081static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3082 .master = &omap44xx_l4_abe_hwmod,
3083 .slave = &omap44xx_mcbsp2_hwmod,
3084 .clk = "ocp_abe_iclk",
3085 .addr = omap44xx_mcbsp2_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003086 .user = OCP_USER_MPU,
3087};
3088
3089static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3090 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303091 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003092 .pa_start = 0x49024000,
3093 .pa_end = 0x490240ff,
3094 .flags = ADDR_TYPE_RT
3095 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003096 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003097};
3098
3099/* l4_abe -> mcbsp2 (dma) */
3100static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3101 .master = &omap44xx_l4_abe_hwmod,
3102 .slave = &omap44xx_mcbsp2_hwmod,
3103 .clk = "ocp_abe_iclk",
3104 .addr = omap44xx_mcbsp2_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003105 .user = OCP_USER_SDMA,
3106};
3107
3108/* mcbsp2 slave ports */
3109static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3110 &omap44xx_l4_abe__mcbsp2,
3111 &omap44xx_l4_abe__mcbsp2_dma,
3112};
3113
3114static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3115 .name = "mcbsp2",
3116 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003117 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003118 .mpu_irqs = omap44xx_mcbsp2_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003119 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003120 .main_clk = "mcbsp2_fck",
3121 .prcm = {
3122 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003123 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003124 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003125 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003126 },
3127 },
3128 .slaves = omap44xx_mcbsp2_slaves,
3129 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
3130 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3131};
3132
3133/* mcbsp3 */
3134static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3135static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3136 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003137 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003138};
3139
3140static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3141 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
3142 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003143 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003144};
3145
3146static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3147 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303148 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003149 .pa_start = 0x40126000,
3150 .pa_end = 0x401260ff,
3151 .flags = ADDR_TYPE_RT
3152 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003153 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003154};
3155
3156/* l4_abe -> mcbsp3 */
3157static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3158 .master = &omap44xx_l4_abe_hwmod,
3159 .slave = &omap44xx_mcbsp3_hwmod,
3160 .clk = "ocp_abe_iclk",
3161 .addr = omap44xx_mcbsp3_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003162 .user = OCP_USER_MPU,
3163};
3164
3165static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3166 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303167 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003168 .pa_start = 0x49026000,
3169 .pa_end = 0x490260ff,
3170 .flags = ADDR_TYPE_RT
3171 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003172 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003173};
3174
3175/* l4_abe -> mcbsp3 (dma) */
3176static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3177 .master = &omap44xx_l4_abe_hwmod,
3178 .slave = &omap44xx_mcbsp3_hwmod,
3179 .clk = "ocp_abe_iclk",
3180 .addr = omap44xx_mcbsp3_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003181 .user = OCP_USER_SDMA,
3182};
3183
3184/* mcbsp3 slave ports */
3185static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3186 &omap44xx_l4_abe__mcbsp3,
3187 &omap44xx_l4_abe__mcbsp3_dma,
3188};
3189
3190static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3191 .name = "mcbsp3",
3192 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003193 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003194 .mpu_irqs = omap44xx_mcbsp3_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003195 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003196 .main_clk = "mcbsp3_fck",
3197 .prcm = {
3198 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003199 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003200 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003201 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003202 },
3203 },
3204 .slaves = omap44xx_mcbsp3_slaves,
3205 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
3206 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3207};
3208
3209/* mcbsp4 */
3210static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3211static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3212 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003213 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003214};
3215
3216static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3217 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3218 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003219 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003220};
3221
3222static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3223 {
3224 .pa_start = 0x48096000,
3225 .pa_end = 0x480960ff,
3226 .flags = ADDR_TYPE_RT
3227 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003228 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003229};
3230
3231/* l4_per -> mcbsp4 */
3232static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3233 .master = &omap44xx_l4_per_hwmod,
3234 .slave = &omap44xx_mcbsp4_hwmod,
3235 .clk = "l4_div_ck",
3236 .addr = omap44xx_mcbsp4_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003237 .user = OCP_USER_MPU | OCP_USER_SDMA,
3238};
3239
3240/* mcbsp4 slave ports */
3241static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3242 &omap44xx_l4_per__mcbsp4,
3243};
3244
3245static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3246 .name = "mcbsp4",
3247 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003248 .clkdm_name = "l4_per_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003249 .mpu_irqs = omap44xx_mcbsp4_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003250 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003251 .main_clk = "mcbsp4_fck",
3252 .prcm = {
3253 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003254 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003255 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003256 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003257 },
3258 },
3259 .slaves = omap44xx_mcbsp4_slaves,
3260 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
3261 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3262};
3263
3264/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003265 * 'mcpdm' class
3266 * multi channel pdm controller (proprietary interface with phoenix power
3267 * ic)
3268 */
3269
3270static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3271 .rev_offs = 0x0000,
3272 .sysc_offs = 0x0010,
3273 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3274 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3275 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3276 SIDLE_SMART_WKUP),
3277 .sysc_fields = &omap_hwmod_sysc_type2,
3278};
3279
3280static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3281 .name = "mcpdm",
3282 .sysc = &omap44xx_mcpdm_sysc,
3283};
3284
3285/* mcpdm */
3286static struct omap_hwmod omap44xx_mcpdm_hwmod;
3287static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3288 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003289 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003290};
3291
3292static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3293 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3294 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003295 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003296};
3297
3298static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3299 {
3300 .pa_start = 0x40132000,
3301 .pa_end = 0x4013207f,
3302 .flags = ADDR_TYPE_RT
3303 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003304 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003305};
3306
3307/* l4_abe -> mcpdm */
3308static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3309 .master = &omap44xx_l4_abe_hwmod,
3310 .slave = &omap44xx_mcpdm_hwmod,
3311 .clk = "ocp_abe_iclk",
3312 .addr = omap44xx_mcpdm_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003313 .user = OCP_USER_MPU,
3314};
3315
3316static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3317 {
3318 .pa_start = 0x49032000,
3319 .pa_end = 0x4903207f,
3320 .flags = ADDR_TYPE_RT
3321 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003322 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003323};
3324
3325/* l4_abe -> mcpdm (dma) */
3326static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3327 .master = &omap44xx_l4_abe_hwmod,
3328 .slave = &omap44xx_mcpdm_hwmod,
3329 .clk = "ocp_abe_iclk",
3330 .addr = omap44xx_mcpdm_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003331 .user = OCP_USER_SDMA,
3332};
3333
3334/* mcpdm slave ports */
3335static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3336 &omap44xx_l4_abe__mcpdm,
3337 &omap44xx_l4_abe__mcpdm_dma,
3338};
3339
3340static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3341 .name = "mcpdm",
3342 .class = &omap44xx_mcpdm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003343 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003344 .mpu_irqs = omap44xx_mcpdm_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003345 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003346 .main_clk = "mcpdm_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003347 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003348 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003349 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003350 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003351 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003352 },
3353 },
3354 .slaves = omap44xx_mcpdm_slaves,
3355 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
3356 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3357};
3358
3359/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303360 * 'mcspi' class
3361 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3362 * bus
3363 */
3364
3365static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3366 .rev_offs = 0x0000,
3367 .sysc_offs = 0x0010,
3368 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3369 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3370 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3371 SIDLE_SMART_WKUP),
3372 .sysc_fields = &omap_hwmod_sysc_type2,
3373};
3374
3375static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3376 .name = "mcspi",
3377 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003378 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303379};
3380
3381/* mcspi1 */
3382static struct omap_hwmod omap44xx_mcspi1_hwmod;
3383static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3384 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003385 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303386};
3387
3388static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3389 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3390 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3391 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3392 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3393 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3394 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3395 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3396 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003397 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303398};
3399
3400static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3401 {
3402 .pa_start = 0x48098000,
3403 .pa_end = 0x480981ff,
3404 .flags = ADDR_TYPE_RT
3405 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003406 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303407};
3408
3409/* l4_per -> mcspi1 */
3410static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3411 .master = &omap44xx_l4_per_hwmod,
3412 .slave = &omap44xx_mcspi1_hwmod,
3413 .clk = "l4_div_ck",
3414 .addr = omap44xx_mcspi1_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303415 .user = OCP_USER_MPU | OCP_USER_SDMA,
3416};
3417
3418/* mcspi1 slave ports */
3419static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3420 &omap44xx_l4_per__mcspi1,
3421};
3422
Benoit Cousson905a74d2011-02-18 14:01:06 +01003423/* mcspi1 dev_attr */
3424static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3425 .num_chipselect = 4,
3426};
3427
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303428static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3429 .name = "mcspi1",
3430 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003431 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303432 .mpu_irqs = omap44xx_mcspi1_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303433 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303434 .main_clk = "mcspi1_fck",
3435 .prcm = {
3436 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003437 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003438 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003439 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303440 },
3441 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003442 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303443 .slaves = omap44xx_mcspi1_slaves,
3444 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
3445 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3446};
3447
3448/* mcspi2 */
3449static struct omap_hwmod omap44xx_mcspi2_hwmod;
3450static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3451 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003452 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303453};
3454
3455static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3456 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3457 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3458 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3459 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003460 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303461};
3462
3463static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3464 {
3465 .pa_start = 0x4809a000,
3466 .pa_end = 0x4809a1ff,
3467 .flags = ADDR_TYPE_RT
3468 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003469 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303470};
3471
3472/* l4_per -> mcspi2 */
3473static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3474 .master = &omap44xx_l4_per_hwmod,
3475 .slave = &omap44xx_mcspi2_hwmod,
3476 .clk = "l4_div_ck",
3477 .addr = omap44xx_mcspi2_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303478 .user = OCP_USER_MPU | OCP_USER_SDMA,
3479};
3480
3481/* mcspi2 slave ports */
3482static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3483 &omap44xx_l4_per__mcspi2,
3484};
3485
Benoit Cousson905a74d2011-02-18 14:01:06 +01003486/* mcspi2 dev_attr */
3487static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3488 .num_chipselect = 2,
3489};
3490
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303491static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3492 .name = "mcspi2",
3493 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003494 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303495 .mpu_irqs = omap44xx_mcspi2_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303496 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303497 .main_clk = "mcspi2_fck",
3498 .prcm = {
3499 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003500 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003501 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003502 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303503 },
3504 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003505 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303506 .slaves = omap44xx_mcspi2_slaves,
3507 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
3508 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3509};
3510
3511/* mcspi3 */
3512static struct omap_hwmod omap44xx_mcspi3_hwmod;
3513static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3514 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003515 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303516};
3517
3518static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3519 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3520 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3521 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3522 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003523 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303524};
3525
3526static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3527 {
3528 .pa_start = 0x480b8000,
3529 .pa_end = 0x480b81ff,
3530 .flags = ADDR_TYPE_RT
3531 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003532 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303533};
3534
3535/* l4_per -> mcspi3 */
3536static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3537 .master = &omap44xx_l4_per_hwmod,
3538 .slave = &omap44xx_mcspi3_hwmod,
3539 .clk = "l4_div_ck",
3540 .addr = omap44xx_mcspi3_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303541 .user = OCP_USER_MPU | OCP_USER_SDMA,
3542};
3543
3544/* mcspi3 slave ports */
3545static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3546 &omap44xx_l4_per__mcspi3,
3547};
3548
Benoit Cousson905a74d2011-02-18 14:01:06 +01003549/* mcspi3 dev_attr */
3550static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3551 .num_chipselect = 2,
3552};
3553
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303554static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3555 .name = "mcspi3",
3556 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003557 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303558 .mpu_irqs = omap44xx_mcspi3_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303559 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303560 .main_clk = "mcspi3_fck",
3561 .prcm = {
3562 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003563 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003564 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003565 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303566 },
3567 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003568 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303569 .slaves = omap44xx_mcspi3_slaves,
3570 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
3571 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3572};
3573
3574/* mcspi4 */
3575static struct omap_hwmod omap44xx_mcspi4_hwmod;
3576static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3577 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003578 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303579};
3580
3581static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3582 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3583 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003584 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303585};
3586
3587static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3588 {
3589 .pa_start = 0x480ba000,
3590 .pa_end = 0x480ba1ff,
3591 .flags = ADDR_TYPE_RT
3592 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003593 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303594};
3595
3596/* l4_per -> mcspi4 */
3597static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3598 .master = &omap44xx_l4_per_hwmod,
3599 .slave = &omap44xx_mcspi4_hwmod,
3600 .clk = "l4_div_ck",
3601 .addr = omap44xx_mcspi4_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303602 .user = OCP_USER_MPU | OCP_USER_SDMA,
3603};
3604
3605/* mcspi4 slave ports */
3606static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3607 &omap44xx_l4_per__mcspi4,
3608};
3609
Benoit Cousson905a74d2011-02-18 14:01:06 +01003610/* mcspi4 dev_attr */
3611static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3612 .num_chipselect = 1,
3613};
3614
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303615static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3616 .name = "mcspi4",
3617 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003618 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303619 .mpu_irqs = omap44xx_mcspi4_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303620 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303621 .main_clk = "mcspi4_fck",
3622 .prcm = {
3623 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003624 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003625 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003626 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303627 },
3628 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003629 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303630 .slaves = omap44xx_mcspi4_slaves,
3631 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
3632 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3633};
3634
3635/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003636 * 'mmc' class
3637 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3638 */
3639
3640static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3641 .rev_offs = 0x0000,
3642 .sysc_offs = 0x0010,
3643 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3644 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3645 SYSC_HAS_SOFTRESET),
3646 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3647 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02003648 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01003649 .sysc_fields = &omap_hwmod_sysc_type2,
3650};
3651
3652static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3653 .name = "mmc",
3654 .sysc = &omap44xx_mmc_sysc,
3655};
3656
3657/* mmc1 */
3658static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3659 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003660 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003661};
3662
3663static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3664 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3665 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003666 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003667};
3668
3669/* mmc1 master ports */
3670static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3671 &omap44xx_mmc1__l3_main_1,
3672};
3673
3674static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3675 {
3676 .pa_start = 0x4809c000,
3677 .pa_end = 0x4809c3ff,
3678 .flags = ADDR_TYPE_RT
3679 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003680 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003681};
3682
3683/* l4_per -> mmc1 */
3684static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3685 .master = &omap44xx_l4_per_hwmod,
3686 .slave = &omap44xx_mmc1_hwmod,
3687 .clk = "l4_div_ck",
3688 .addr = omap44xx_mmc1_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003689 .user = OCP_USER_MPU | OCP_USER_SDMA,
3690};
3691
3692/* mmc1 slave ports */
3693static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3694 &omap44xx_l4_per__mmc1,
3695};
3696
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003697/* mmc1 dev_attr */
3698static struct omap_mmc_dev_attr mmc1_dev_attr = {
3699 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3700};
3701
Benoit Cousson407a6882011-02-15 22:39:48 +01003702static struct omap_hwmod omap44xx_mmc1_hwmod = {
3703 .name = "mmc1",
3704 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003705 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003706 .mpu_irqs = omap44xx_mmc1_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003707 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003708 .main_clk = "mmc1_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003709 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003710 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003711 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003712 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003713 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003714 },
3715 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003716 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003717 .slaves = omap44xx_mmc1_slaves,
3718 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3719 .masters = omap44xx_mmc1_masters,
3720 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
3721 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3722};
3723
3724/* mmc2 */
3725static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3726 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003727 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003728};
3729
3730static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3731 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3732 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003733 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003734};
3735
3736/* mmc2 master ports */
3737static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3738 &omap44xx_mmc2__l3_main_1,
3739};
3740
3741static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3742 {
3743 .pa_start = 0x480b4000,
3744 .pa_end = 0x480b43ff,
3745 .flags = ADDR_TYPE_RT
3746 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003747 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003748};
3749
3750/* l4_per -> mmc2 */
3751static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3752 .master = &omap44xx_l4_per_hwmod,
3753 .slave = &omap44xx_mmc2_hwmod,
3754 .clk = "l4_div_ck",
3755 .addr = omap44xx_mmc2_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003756 .user = OCP_USER_MPU | OCP_USER_SDMA,
3757};
3758
3759/* mmc2 slave ports */
3760static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3761 &omap44xx_l4_per__mmc2,
3762};
3763
3764static struct omap_hwmod omap44xx_mmc2_hwmod = {
3765 .name = "mmc2",
3766 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003767 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003768 .mpu_irqs = omap44xx_mmc2_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003769 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003770 .main_clk = "mmc2_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003771 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003772 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003773 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003774 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003775 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003776 },
3777 },
3778 .slaves = omap44xx_mmc2_slaves,
3779 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3780 .masters = omap44xx_mmc2_masters,
3781 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
3782 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3783};
3784
3785/* mmc3 */
3786static struct omap_hwmod omap44xx_mmc3_hwmod;
3787static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3788 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003789 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003790};
3791
3792static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3793 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3794 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003795 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003796};
3797
3798static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3799 {
3800 .pa_start = 0x480ad000,
3801 .pa_end = 0x480ad3ff,
3802 .flags = ADDR_TYPE_RT
3803 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003804 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003805};
3806
3807/* l4_per -> mmc3 */
3808static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3809 .master = &omap44xx_l4_per_hwmod,
3810 .slave = &omap44xx_mmc3_hwmod,
3811 .clk = "l4_div_ck",
3812 .addr = omap44xx_mmc3_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003813 .user = OCP_USER_MPU | OCP_USER_SDMA,
3814};
3815
3816/* mmc3 slave ports */
3817static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3818 &omap44xx_l4_per__mmc3,
3819};
3820
3821static struct omap_hwmod omap44xx_mmc3_hwmod = {
3822 .name = "mmc3",
3823 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003824 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003825 .mpu_irqs = omap44xx_mmc3_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003826 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003827 .main_clk = "mmc3_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003828 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003829 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003830 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003831 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003832 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003833 },
3834 },
3835 .slaves = omap44xx_mmc3_slaves,
3836 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
3837 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3838};
3839
3840/* mmc4 */
3841static struct omap_hwmod omap44xx_mmc4_hwmod;
3842static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3843 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003844 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003845};
3846
3847static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3848 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3849 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003850 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003851};
3852
3853static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3854 {
3855 .pa_start = 0x480d1000,
3856 .pa_end = 0x480d13ff,
3857 .flags = ADDR_TYPE_RT
3858 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003859 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003860};
3861
3862/* l4_per -> mmc4 */
3863static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3864 .master = &omap44xx_l4_per_hwmod,
3865 .slave = &omap44xx_mmc4_hwmod,
3866 .clk = "l4_div_ck",
3867 .addr = omap44xx_mmc4_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003868 .user = OCP_USER_MPU | OCP_USER_SDMA,
3869};
3870
3871/* mmc4 slave ports */
3872static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3873 &omap44xx_l4_per__mmc4,
3874};
3875
3876static struct omap_hwmod omap44xx_mmc4_hwmod = {
3877 .name = "mmc4",
3878 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003879 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003880 .mpu_irqs = omap44xx_mmc4_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003881
Benoit Cousson407a6882011-02-15 22:39:48 +01003882 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003883 .main_clk = "mmc4_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003884 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003885 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003886 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003887 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003888 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003889 },
3890 },
3891 .slaves = omap44xx_mmc4_slaves,
3892 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
3893 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3894};
3895
3896/* mmc5 */
3897static struct omap_hwmod omap44xx_mmc5_hwmod;
3898static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3899 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003900 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003901};
3902
3903static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3904 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3905 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003906 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003907};
3908
3909static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3910 {
3911 .pa_start = 0x480d5000,
3912 .pa_end = 0x480d53ff,
3913 .flags = ADDR_TYPE_RT
3914 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003915 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003916};
3917
3918/* l4_per -> mmc5 */
3919static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3920 .master = &omap44xx_l4_per_hwmod,
3921 .slave = &omap44xx_mmc5_hwmod,
3922 .clk = "l4_div_ck",
3923 .addr = omap44xx_mmc5_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003924 .user = OCP_USER_MPU | OCP_USER_SDMA,
3925};
3926
3927/* mmc5 slave ports */
3928static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3929 &omap44xx_l4_per__mmc5,
3930};
3931
3932static struct omap_hwmod omap44xx_mmc5_hwmod = {
3933 .name = "mmc5",
3934 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003935 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003936 .mpu_irqs = omap44xx_mmc5_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003937 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003938 .main_clk = "mmc5_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003939 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003940 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003941 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003942 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003943 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003944 },
3945 },
3946 .slaves = omap44xx_mmc5_slaves,
3947 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
3948 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3949};
3950
3951/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003952 * 'mpu' class
3953 * mpu sub-system
3954 */
3955
3956static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003957 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003958};
3959
3960/* mpu */
3961static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3962 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3963 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3964 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003965 { .irq = -1 }
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003966};
3967
3968/* mpu master ports */
3969static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3970 &omap44xx_mpu__l3_main_1,
3971 &omap44xx_mpu__l4_abe,
3972 &omap44xx_mpu__dmm,
3973};
3974
3975static struct omap_hwmod omap44xx_mpu_hwmod = {
3976 .name = "mpu",
3977 .class = &omap44xx_mpu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003978 .clkdm_name = "mpuss_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06003979 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003980 .mpu_irqs = omap44xx_mpu_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003981 .main_clk = "dpll_mpu_m2_ck",
3982 .prcm = {
3983 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003984 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003985 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003986 },
3987 },
3988 .masters = omap44xx_mpu_masters,
3989 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
3990 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
3991};
3992
Benoit Cousson92b18d12010-09-23 20:02:41 +05303993/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003994 * 'smartreflex' class
3995 * smartreflex module (monitor silicon performance and outputs a measure of
3996 * performance error)
3997 */
3998
3999/* The IP is not compliant to type1 / type2 scheme */
4000static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
4001 .sidle_shift = 24,
4002 .enwkup_shift = 26,
4003};
4004
4005static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
4006 .sysc_offs = 0x0038,
4007 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
4008 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4009 SIDLE_SMART_WKUP),
4010 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
4011};
4012
4013static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004014 .name = "smartreflex",
4015 .sysc = &omap44xx_smartreflex_sysc,
4016 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004017};
4018
4019/* smartreflex_core */
4020static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
4021static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
4022 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004023 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004024};
4025
4026static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4027 {
4028 .pa_start = 0x4a0dd000,
4029 .pa_end = 0x4a0dd03f,
4030 .flags = ADDR_TYPE_RT
4031 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004032 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004033};
4034
4035/* l4_cfg -> smartreflex_core */
4036static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
4037 .master = &omap44xx_l4_cfg_hwmod,
4038 .slave = &omap44xx_smartreflex_core_hwmod,
4039 .clk = "l4_div_ck",
4040 .addr = omap44xx_smartreflex_core_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004041 .user = OCP_USER_MPU | OCP_USER_SDMA,
4042};
4043
4044/* smartreflex_core slave ports */
4045static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
4046 &omap44xx_l4_cfg__smartreflex_core,
4047};
4048
4049static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
4050 .name = "smartreflex_core",
4051 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004052 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004053 .mpu_irqs = omap44xx_smartreflex_core_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004054
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004055 .main_clk = "smartreflex_core_fck",
4056 .vdd_name = "core",
4057 .prcm = {
4058 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004059 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004060 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004061 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004062 },
4063 },
4064 .slaves = omap44xx_smartreflex_core_slaves,
4065 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
4066 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4067};
4068
4069/* smartreflex_iva */
4070static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4071static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4072 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004073 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004074};
4075
4076static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4077 {
4078 .pa_start = 0x4a0db000,
4079 .pa_end = 0x4a0db03f,
4080 .flags = ADDR_TYPE_RT
4081 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004082 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004083};
4084
4085/* l4_cfg -> smartreflex_iva */
4086static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4087 .master = &omap44xx_l4_cfg_hwmod,
4088 .slave = &omap44xx_smartreflex_iva_hwmod,
4089 .clk = "l4_div_ck",
4090 .addr = omap44xx_smartreflex_iva_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004091 .user = OCP_USER_MPU | OCP_USER_SDMA,
4092};
4093
4094/* smartreflex_iva slave ports */
4095static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4096 &omap44xx_l4_cfg__smartreflex_iva,
4097};
4098
4099static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4100 .name = "smartreflex_iva",
4101 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004102 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004103 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004104 .main_clk = "smartreflex_iva_fck",
4105 .vdd_name = "iva",
4106 .prcm = {
4107 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004108 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004109 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004110 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004111 },
4112 },
4113 .slaves = omap44xx_smartreflex_iva_slaves,
4114 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
4115 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4116};
4117
4118/* smartreflex_mpu */
4119static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4120static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4121 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004122 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004123};
4124
4125static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4126 {
4127 .pa_start = 0x4a0d9000,
4128 .pa_end = 0x4a0d903f,
4129 .flags = ADDR_TYPE_RT
4130 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004131 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004132};
4133
4134/* l4_cfg -> smartreflex_mpu */
4135static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4136 .master = &omap44xx_l4_cfg_hwmod,
4137 .slave = &omap44xx_smartreflex_mpu_hwmod,
4138 .clk = "l4_div_ck",
4139 .addr = omap44xx_smartreflex_mpu_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004140 .user = OCP_USER_MPU | OCP_USER_SDMA,
4141};
4142
4143/* smartreflex_mpu slave ports */
4144static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4145 &omap44xx_l4_cfg__smartreflex_mpu,
4146};
4147
4148static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4149 .name = "smartreflex_mpu",
4150 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004151 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004152 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004153 .main_clk = "smartreflex_mpu_fck",
4154 .vdd_name = "mpu",
4155 .prcm = {
4156 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004157 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004158 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004159 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004160 },
4161 },
4162 .slaves = omap44xx_smartreflex_mpu_slaves,
4163 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
4164 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4165};
4166
4167/*
Benoit Coussond11c2172011-02-02 12:04:36 +00004168 * 'spinlock' class
4169 * spinlock provides hardware assistance for synchronizing the processes
4170 * running on multiple processors
4171 */
4172
4173static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
4174 .rev_offs = 0x0000,
4175 .sysc_offs = 0x0010,
4176 .syss_offs = 0x0014,
4177 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4178 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
4179 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4180 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4181 SIDLE_SMART_WKUP),
4182 .sysc_fields = &omap_hwmod_sysc_type1,
4183};
4184
4185static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4186 .name = "spinlock",
4187 .sysc = &omap44xx_spinlock_sysc,
4188};
4189
4190/* spinlock */
4191static struct omap_hwmod omap44xx_spinlock_hwmod;
4192static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4193 {
4194 .pa_start = 0x4a0f6000,
4195 .pa_end = 0x4a0f6fff,
4196 .flags = ADDR_TYPE_RT
4197 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004198 { }
Benoit Coussond11c2172011-02-02 12:04:36 +00004199};
4200
4201/* l4_cfg -> spinlock */
4202static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4203 .master = &omap44xx_l4_cfg_hwmod,
4204 .slave = &omap44xx_spinlock_hwmod,
4205 .clk = "l4_div_ck",
4206 .addr = omap44xx_spinlock_addrs,
Benoit Coussond11c2172011-02-02 12:04:36 +00004207 .user = OCP_USER_MPU | OCP_USER_SDMA,
4208};
4209
4210/* spinlock slave ports */
4211static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4212 &omap44xx_l4_cfg__spinlock,
4213};
4214
4215static struct omap_hwmod omap44xx_spinlock_hwmod = {
4216 .name = "spinlock",
4217 .class = &omap44xx_spinlock_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004218 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond11c2172011-02-02 12:04:36 +00004219 .prcm = {
4220 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004221 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004222 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
Benoit Coussond11c2172011-02-02 12:04:36 +00004223 },
4224 },
4225 .slaves = omap44xx_spinlock_slaves,
4226 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
4227 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4228};
4229
4230/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004231 * 'timer' class
4232 * general purpose timer module with accurate 1ms tick
4233 * This class contains several variants: ['timer_1ms', 'timer']
4234 */
4235
4236static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4237 .rev_offs = 0x0000,
4238 .sysc_offs = 0x0010,
4239 .syss_offs = 0x0014,
4240 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4241 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4242 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4243 SYSS_HAS_RESET_STATUS),
4244 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4245 .sysc_fields = &omap_hwmod_sysc_type1,
4246};
4247
4248static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4249 .name = "timer",
4250 .sysc = &omap44xx_timer_1ms_sysc,
4251};
4252
4253static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4254 .rev_offs = 0x0000,
4255 .sysc_offs = 0x0010,
4256 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4257 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4258 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4259 SIDLE_SMART_WKUP),
4260 .sysc_fields = &omap_hwmod_sysc_type2,
4261};
4262
4263static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4264 .name = "timer",
4265 .sysc = &omap44xx_timer_sysc,
4266};
4267
4268/* timer1 */
4269static struct omap_hwmod omap44xx_timer1_hwmod;
4270static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4271 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004272 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004273};
4274
4275static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4276 {
4277 .pa_start = 0x4a318000,
4278 .pa_end = 0x4a31807f,
4279 .flags = ADDR_TYPE_RT
4280 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004281 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004282};
4283
4284/* l4_wkup -> timer1 */
4285static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4286 .master = &omap44xx_l4_wkup_hwmod,
4287 .slave = &omap44xx_timer1_hwmod,
4288 .clk = "l4_wkup_clk_mux_ck",
4289 .addr = omap44xx_timer1_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004290 .user = OCP_USER_MPU | OCP_USER_SDMA,
4291};
4292
4293/* timer1 slave ports */
4294static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4295 &omap44xx_l4_wkup__timer1,
4296};
4297
4298static struct omap_hwmod omap44xx_timer1_hwmod = {
4299 .name = "timer1",
4300 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004301 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004302 .mpu_irqs = omap44xx_timer1_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004303 .main_clk = "timer1_fck",
4304 .prcm = {
4305 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004306 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004307 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004308 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004309 },
4310 },
4311 .slaves = omap44xx_timer1_slaves,
4312 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
4313 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4314};
4315
4316/* timer2 */
4317static struct omap_hwmod omap44xx_timer2_hwmod;
4318static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4319 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004320 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004321};
4322
4323static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4324 {
4325 .pa_start = 0x48032000,
4326 .pa_end = 0x4803207f,
4327 .flags = ADDR_TYPE_RT
4328 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004329 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004330};
4331
4332/* l4_per -> timer2 */
4333static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4334 .master = &omap44xx_l4_per_hwmod,
4335 .slave = &omap44xx_timer2_hwmod,
4336 .clk = "l4_div_ck",
4337 .addr = omap44xx_timer2_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004338 .user = OCP_USER_MPU | OCP_USER_SDMA,
4339};
4340
4341/* timer2 slave ports */
4342static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4343 &omap44xx_l4_per__timer2,
4344};
4345
4346static struct omap_hwmod omap44xx_timer2_hwmod = {
4347 .name = "timer2",
4348 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004349 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004350 .mpu_irqs = omap44xx_timer2_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004351 .main_clk = "timer2_fck",
4352 .prcm = {
4353 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004354 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004355 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004356 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004357 },
4358 },
4359 .slaves = omap44xx_timer2_slaves,
4360 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
4361 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4362};
4363
4364/* timer3 */
4365static struct omap_hwmod omap44xx_timer3_hwmod;
4366static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4367 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004368 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004369};
4370
4371static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4372 {
4373 .pa_start = 0x48034000,
4374 .pa_end = 0x4803407f,
4375 .flags = ADDR_TYPE_RT
4376 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004377 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004378};
4379
4380/* l4_per -> timer3 */
4381static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4382 .master = &omap44xx_l4_per_hwmod,
4383 .slave = &omap44xx_timer3_hwmod,
4384 .clk = "l4_div_ck",
4385 .addr = omap44xx_timer3_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004386 .user = OCP_USER_MPU | OCP_USER_SDMA,
4387};
4388
4389/* timer3 slave ports */
4390static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4391 &omap44xx_l4_per__timer3,
4392};
4393
4394static struct omap_hwmod omap44xx_timer3_hwmod = {
4395 .name = "timer3",
4396 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004397 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004398 .mpu_irqs = omap44xx_timer3_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004399 .main_clk = "timer3_fck",
4400 .prcm = {
4401 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004402 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004403 .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004404 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004405 },
4406 },
4407 .slaves = omap44xx_timer3_slaves,
4408 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
4409 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4410};
4411
4412/* timer4 */
4413static struct omap_hwmod omap44xx_timer4_hwmod;
4414static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4415 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004416 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004417};
4418
4419static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4420 {
4421 .pa_start = 0x48036000,
4422 .pa_end = 0x4803607f,
4423 .flags = ADDR_TYPE_RT
4424 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004425 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004426};
4427
4428/* l4_per -> timer4 */
4429static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4430 .master = &omap44xx_l4_per_hwmod,
4431 .slave = &omap44xx_timer4_hwmod,
4432 .clk = "l4_div_ck",
4433 .addr = omap44xx_timer4_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004434 .user = OCP_USER_MPU | OCP_USER_SDMA,
4435};
4436
4437/* timer4 slave ports */
4438static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4439 &omap44xx_l4_per__timer4,
4440};
4441
4442static struct omap_hwmod omap44xx_timer4_hwmod = {
4443 .name = "timer4",
4444 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004445 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004446 .mpu_irqs = omap44xx_timer4_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004447 .main_clk = "timer4_fck",
4448 .prcm = {
4449 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004450 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004451 .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004452 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004453 },
4454 },
4455 .slaves = omap44xx_timer4_slaves,
4456 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
4457 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4458};
4459
4460/* timer5 */
4461static struct omap_hwmod omap44xx_timer5_hwmod;
4462static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4463 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004464 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004465};
4466
4467static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4468 {
4469 .pa_start = 0x40138000,
4470 .pa_end = 0x4013807f,
4471 .flags = ADDR_TYPE_RT
4472 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004473 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004474};
4475
4476/* l4_abe -> timer5 */
4477static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4478 .master = &omap44xx_l4_abe_hwmod,
4479 .slave = &omap44xx_timer5_hwmod,
4480 .clk = "ocp_abe_iclk",
4481 .addr = omap44xx_timer5_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004482 .user = OCP_USER_MPU,
4483};
4484
4485static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4486 {
4487 .pa_start = 0x49038000,
4488 .pa_end = 0x4903807f,
4489 .flags = ADDR_TYPE_RT
4490 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004491 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004492};
4493
4494/* l4_abe -> timer5 (dma) */
4495static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4496 .master = &omap44xx_l4_abe_hwmod,
4497 .slave = &omap44xx_timer5_hwmod,
4498 .clk = "ocp_abe_iclk",
4499 .addr = omap44xx_timer5_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004500 .user = OCP_USER_SDMA,
4501};
4502
4503/* timer5 slave ports */
4504static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4505 &omap44xx_l4_abe__timer5,
4506 &omap44xx_l4_abe__timer5_dma,
4507};
4508
4509static struct omap_hwmod omap44xx_timer5_hwmod = {
4510 .name = "timer5",
4511 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004512 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004513 .mpu_irqs = omap44xx_timer5_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004514 .main_clk = "timer5_fck",
4515 .prcm = {
4516 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004517 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004518 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004519 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004520 },
4521 },
4522 .slaves = omap44xx_timer5_slaves,
4523 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
4524 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4525};
4526
4527/* timer6 */
4528static struct omap_hwmod omap44xx_timer6_hwmod;
4529static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4530 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004531 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004532};
4533
4534static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4535 {
4536 .pa_start = 0x4013a000,
4537 .pa_end = 0x4013a07f,
4538 .flags = ADDR_TYPE_RT
4539 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004540 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004541};
4542
4543/* l4_abe -> timer6 */
4544static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4545 .master = &omap44xx_l4_abe_hwmod,
4546 .slave = &omap44xx_timer6_hwmod,
4547 .clk = "ocp_abe_iclk",
4548 .addr = omap44xx_timer6_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004549 .user = OCP_USER_MPU,
4550};
4551
4552static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4553 {
4554 .pa_start = 0x4903a000,
4555 .pa_end = 0x4903a07f,
4556 .flags = ADDR_TYPE_RT
4557 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004558 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004559};
4560
4561/* l4_abe -> timer6 (dma) */
4562static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4563 .master = &omap44xx_l4_abe_hwmod,
4564 .slave = &omap44xx_timer6_hwmod,
4565 .clk = "ocp_abe_iclk",
4566 .addr = omap44xx_timer6_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004567 .user = OCP_USER_SDMA,
4568};
4569
4570/* timer6 slave ports */
4571static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4572 &omap44xx_l4_abe__timer6,
4573 &omap44xx_l4_abe__timer6_dma,
4574};
4575
4576static struct omap_hwmod omap44xx_timer6_hwmod = {
4577 .name = "timer6",
4578 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004579 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004580 .mpu_irqs = omap44xx_timer6_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004581
Benoit Cousson35d1a662011-02-11 11:17:14 +00004582 .main_clk = "timer6_fck",
4583 .prcm = {
4584 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004585 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004586 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004587 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004588 },
4589 },
4590 .slaves = omap44xx_timer6_slaves,
4591 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
4592 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4593};
4594
4595/* timer7 */
4596static struct omap_hwmod omap44xx_timer7_hwmod;
4597static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4598 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004599 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004600};
4601
4602static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4603 {
4604 .pa_start = 0x4013c000,
4605 .pa_end = 0x4013c07f,
4606 .flags = ADDR_TYPE_RT
4607 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004608 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004609};
4610
4611/* l4_abe -> timer7 */
4612static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4613 .master = &omap44xx_l4_abe_hwmod,
4614 .slave = &omap44xx_timer7_hwmod,
4615 .clk = "ocp_abe_iclk",
4616 .addr = omap44xx_timer7_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004617 .user = OCP_USER_MPU,
4618};
4619
4620static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4621 {
4622 .pa_start = 0x4903c000,
4623 .pa_end = 0x4903c07f,
4624 .flags = ADDR_TYPE_RT
4625 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004626 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004627};
4628
4629/* l4_abe -> timer7 (dma) */
4630static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4631 .master = &omap44xx_l4_abe_hwmod,
4632 .slave = &omap44xx_timer7_hwmod,
4633 .clk = "ocp_abe_iclk",
4634 .addr = omap44xx_timer7_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004635 .user = OCP_USER_SDMA,
4636};
4637
4638/* timer7 slave ports */
4639static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4640 &omap44xx_l4_abe__timer7,
4641 &omap44xx_l4_abe__timer7_dma,
4642};
4643
4644static struct omap_hwmod omap44xx_timer7_hwmod = {
4645 .name = "timer7",
4646 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004647 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004648 .mpu_irqs = omap44xx_timer7_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004649 .main_clk = "timer7_fck",
4650 .prcm = {
4651 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004652 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004653 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004654 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004655 },
4656 },
4657 .slaves = omap44xx_timer7_slaves,
4658 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
4659 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4660};
4661
4662/* timer8 */
4663static struct omap_hwmod omap44xx_timer8_hwmod;
4664static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4665 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004666 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004667};
4668
4669static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4670 {
4671 .pa_start = 0x4013e000,
4672 .pa_end = 0x4013e07f,
4673 .flags = ADDR_TYPE_RT
4674 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004675 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004676};
4677
4678/* l4_abe -> timer8 */
4679static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4680 .master = &omap44xx_l4_abe_hwmod,
4681 .slave = &omap44xx_timer8_hwmod,
4682 .clk = "ocp_abe_iclk",
4683 .addr = omap44xx_timer8_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004684 .user = OCP_USER_MPU,
4685};
4686
4687static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4688 {
4689 .pa_start = 0x4903e000,
4690 .pa_end = 0x4903e07f,
4691 .flags = ADDR_TYPE_RT
4692 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004693 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004694};
4695
4696/* l4_abe -> timer8 (dma) */
4697static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4698 .master = &omap44xx_l4_abe_hwmod,
4699 .slave = &omap44xx_timer8_hwmod,
4700 .clk = "ocp_abe_iclk",
4701 .addr = omap44xx_timer8_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004702 .user = OCP_USER_SDMA,
4703};
4704
4705/* timer8 slave ports */
4706static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4707 &omap44xx_l4_abe__timer8,
4708 &omap44xx_l4_abe__timer8_dma,
4709};
4710
4711static struct omap_hwmod omap44xx_timer8_hwmod = {
4712 .name = "timer8",
4713 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004714 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004715 .mpu_irqs = omap44xx_timer8_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004716 .main_clk = "timer8_fck",
4717 .prcm = {
4718 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004719 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004720 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004721 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004722 },
4723 },
4724 .slaves = omap44xx_timer8_slaves,
4725 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
4726 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4727};
4728
4729/* timer9 */
4730static struct omap_hwmod omap44xx_timer9_hwmod;
4731static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4732 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004733 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004734};
4735
4736static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4737 {
4738 .pa_start = 0x4803e000,
4739 .pa_end = 0x4803e07f,
4740 .flags = ADDR_TYPE_RT
4741 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004742 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004743};
4744
4745/* l4_per -> timer9 */
4746static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4747 .master = &omap44xx_l4_per_hwmod,
4748 .slave = &omap44xx_timer9_hwmod,
4749 .clk = "l4_div_ck",
4750 .addr = omap44xx_timer9_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004751 .user = OCP_USER_MPU | OCP_USER_SDMA,
4752};
4753
4754/* timer9 slave ports */
4755static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4756 &omap44xx_l4_per__timer9,
4757};
4758
4759static struct omap_hwmod omap44xx_timer9_hwmod = {
4760 .name = "timer9",
4761 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004762 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004763 .mpu_irqs = omap44xx_timer9_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004764 .main_clk = "timer9_fck",
4765 .prcm = {
4766 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004767 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004768 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004769 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004770 },
4771 },
4772 .slaves = omap44xx_timer9_slaves,
4773 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
4774 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4775};
4776
4777/* timer10 */
4778static struct omap_hwmod omap44xx_timer10_hwmod;
4779static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4780 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004781 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004782};
4783
4784static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4785 {
4786 .pa_start = 0x48086000,
4787 .pa_end = 0x4808607f,
4788 .flags = ADDR_TYPE_RT
4789 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004790 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004791};
4792
4793/* l4_per -> timer10 */
4794static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4795 .master = &omap44xx_l4_per_hwmod,
4796 .slave = &omap44xx_timer10_hwmod,
4797 .clk = "l4_div_ck",
4798 .addr = omap44xx_timer10_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004799 .user = OCP_USER_MPU | OCP_USER_SDMA,
4800};
4801
4802/* timer10 slave ports */
4803static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4804 &omap44xx_l4_per__timer10,
4805};
4806
4807static struct omap_hwmod omap44xx_timer10_hwmod = {
4808 .name = "timer10",
4809 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004810 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004811 .mpu_irqs = omap44xx_timer10_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004812 .main_clk = "timer10_fck",
4813 .prcm = {
4814 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004815 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004816 .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004817 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004818 },
4819 },
4820 .slaves = omap44xx_timer10_slaves,
4821 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
4822 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4823};
4824
4825/* timer11 */
4826static struct omap_hwmod omap44xx_timer11_hwmod;
4827static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4828 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004829 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004830};
4831
4832static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4833 {
4834 .pa_start = 0x48088000,
4835 .pa_end = 0x4808807f,
4836 .flags = ADDR_TYPE_RT
4837 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004838 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004839};
4840
4841/* l4_per -> timer11 */
4842static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4843 .master = &omap44xx_l4_per_hwmod,
4844 .slave = &omap44xx_timer11_hwmod,
4845 .clk = "l4_div_ck",
4846 .addr = omap44xx_timer11_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004847 .user = OCP_USER_MPU | OCP_USER_SDMA,
4848};
4849
4850/* timer11 slave ports */
4851static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4852 &omap44xx_l4_per__timer11,
4853};
4854
4855static struct omap_hwmod omap44xx_timer11_hwmod = {
4856 .name = "timer11",
4857 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004858 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004859 .mpu_irqs = omap44xx_timer11_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004860 .main_clk = "timer11_fck",
4861 .prcm = {
4862 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004863 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004864 .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004865 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004866 },
4867 },
4868 .slaves = omap44xx_timer11_slaves,
4869 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
4870 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4871};
4872
4873/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304874 * 'uart' class
4875 * universal asynchronous receiver/transmitter (uart)
4876 */
4877
4878static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4879 .rev_offs = 0x0050,
4880 .sysc_offs = 0x0054,
4881 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004882 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004883 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4884 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004885 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4886 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304887 .sysc_fields = &omap_hwmod_sysc_type1,
4888};
4889
4890static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004891 .name = "uart",
4892 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304893};
4894
4895/* uart1 */
4896static struct omap_hwmod omap44xx_uart1_hwmod;
4897static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4898 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004899 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304900};
4901
4902static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4903 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4904 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004905 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304906};
4907
4908static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4909 {
4910 .pa_start = 0x4806a000,
4911 .pa_end = 0x4806a0ff,
4912 .flags = ADDR_TYPE_RT
4913 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004914 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304915};
4916
4917/* l4_per -> uart1 */
4918static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4919 .master = &omap44xx_l4_per_hwmod,
4920 .slave = &omap44xx_uart1_hwmod,
4921 .clk = "l4_div_ck",
4922 .addr = omap44xx_uart1_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304923 .user = OCP_USER_MPU | OCP_USER_SDMA,
4924};
4925
4926/* uart1 slave ports */
4927static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4928 &omap44xx_l4_per__uart1,
4929};
4930
4931static struct omap_hwmod omap44xx_uart1_hwmod = {
4932 .name = "uart1",
4933 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004934 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304935 .mpu_irqs = omap44xx_uart1_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304936 .sdma_reqs = omap44xx_uart1_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304937 .main_clk = "uart1_fck",
4938 .prcm = {
4939 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004940 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004941 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004942 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304943 },
4944 },
4945 .slaves = omap44xx_uart1_slaves,
4946 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
4947 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
4948};
4949
4950/* uart2 */
4951static struct omap_hwmod omap44xx_uart2_hwmod;
4952static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4953 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004954 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304955};
4956
4957static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4958 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4959 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004960 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304961};
4962
4963static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4964 {
4965 .pa_start = 0x4806c000,
4966 .pa_end = 0x4806c0ff,
4967 .flags = ADDR_TYPE_RT
4968 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004969 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304970};
4971
4972/* l4_per -> uart2 */
4973static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4974 .master = &omap44xx_l4_per_hwmod,
4975 .slave = &omap44xx_uart2_hwmod,
4976 .clk = "l4_div_ck",
4977 .addr = omap44xx_uart2_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304978 .user = OCP_USER_MPU | OCP_USER_SDMA,
4979};
4980
4981/* uart2 slave ports */
4982static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4983 &omap44xx_l4_per__uart2,
4984};
4985
4986static struct omap_hwmod omap44xx_uart2_hwmod = {
4987 .name = "uart2",
4988 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004989 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304990 .mpu_irqs = omap44xx_uart2_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304991 .sdma_reqs = omap44xx_uart2_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304992 .main_clk = "uart2_fck",
4993 .prcm = {
4994 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004995 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004996 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004997 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304998 },
4999 },
5000 .slaves = omap44xx_uart2_slaves,
5001 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
5002 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5003};
5004
5005/* uart3 */
5006static struct omap_hwmod omap44xx_uart3_hwmod;
5007static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
5008 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005009 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305010};
5011
5012static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
5013 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
5014 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005015 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305016};
5017
5018static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
5019 {
5020 .pa_start = 0x48020000,
5021 .pa_end = 0x480200ff,
5022 .flags = ADDR_TYPE_RT
5023 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005024 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305025};
5026
5027/* l4_per -> uart3 */
5028static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
5029 .master = &omap44xx_l4_per_hwmod,
5030 .slave = &omap44xx_uart3_hwmod,
5031 .clk = "l4_div_ck",
5032 .addr = omap44xx_uart3_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305033 .user = OCP_USER_MPU | OCP_USER_SDMA,
5034};
5035
5036/* uart3 slave ports */
5037static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
5038 &omap44xx_l4_per__uart3,
5039};
5040
5041static struct omap_hwmod omap44xx_uart3_hwmod = {
5042 .name = "uart3",
5043 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005044 .clkdm_name = "l4_per_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06005045 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305046 .mpu_irqs = omap44xx_uart3_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305047 .sdma_reqs = omap44xx_uart3_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305048 .main_clk = "uart3_fck",
5049 .prcm = {
5050 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005051 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005052 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005053 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305054 },
5055 },
5056 .slaves = omap44xx_uart3_slaves,
5057 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
5058 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5059};
5060
5061/* uart4 */
5062static struct omap_hwmod omap44xx_uart4_hwmod;
5063static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5064 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005065 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305066};
5067
5068static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5069 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
5070 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005071 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305072};
5073
5074static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5075 {
5076 .pa_start = 0x4806e000,
5077 .pa_end = 0x4806e0ff,
5078 .flags = ADDR_TYPE_RT
5079 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005080 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305081};
5082
5083/* l4_per -> uart4 */
5084static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5085 .master = &omap44xx_l4_per_hwmod,
5086 .slave = &omap44xx_uart4_hwmod,
5087 .clk = "l4_div_ck",
5088 .addr = omap44xx_uart4_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305089 .user = OCP_USER_MPU | OCP_USER_SDMA,
5090};
5091
5092/* uart4 slave ports */
5093static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5094 &omap44xx_l4_per__uart4,
5095};
5096
5097static struct omap_hwmod omap44xx_uart4_hwmod = {
5098 .name = "uart4",
5099 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005100 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305101 .mpu_irqs = omap44xx_uart4_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305102 .sdma_reqs = omap44xx_uart4_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305103 .main_clk = "uart4_fck",
5104 .prcm = {
5105 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005106 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005107 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005108 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305109 },
5110 },
5111 .slaves = omap44xx_uart4_slaves,
5112 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
5113 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5114};
5115
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005116/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005117 * 'usb_otg_hs' class
5118 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
5119 */
5120
5121static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
5122 .rev_offs = 0x0400,
5123 .sysc_offs = 0x0404,
5124 .syss_offs = 0x0408,
5125 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
5126 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5127 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
5128 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5129 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5130 MSTANDBY_SMART),
5131 .sysc_fields = &omap_hwmod_sysc_type1,
5132};
5133
5134static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
Benoit Cousson00fe6102011-07-09 19:14:28 -06005135 .name = "usb_otg_hs",
5136 .sysc = &omap44xx_usb_otg_hs_sysc,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005137};
5138
5139/* usb_otg_hs */
5140static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5141 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
5142 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005143 { .irq = -1 }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005144};
5145
5146/* usb_otg_hs master ports */
5147static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5148 &omap44xx_usb_otg_hs__l3_main_2,
5149};
5150
5151static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5152 {
5153 .pa_start = 0x4a0ab000,
5154 .pa_end = 0x4a0ab003,
5155 .flags = ADDR_TYPE_RT
5156 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005157 { }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005158};
5159
5160/* l4_cfg -> usb_otg_hs */
5161static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5162 .master = &omap44xx_l4_cfg_hwmod,
5163 .slave = &omap44xx_usb_otg_hs_hwmod,
5164 .clk = "l4_div_ck",
5165 .addr = omap44xx_usb_otg_hs_addrs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005166 .user = OCP_USER_MPU | OCP_USER_SDMA,
5167};
5168
5169/* usb_otg_hs slave ports */
5170static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5171 &omap44xx_l4_cfg__usb_otg_hs,
5172};
5173
5174static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5175 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5176};
5177
5178static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5179 .name = "usb_otg_hs",
5180 .class = &omap44xx_usb_otg_hs_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005181 .clkdm_name = "l3_init_clkdm",
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005182 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
5183 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005184 .main_clk = "usb_otg_hs_ick",
5185 .prcm = {
5186 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005187 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005188 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005189 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005190 },
5191 },
5192 .opt_clks = usb_otg_hs_opt_clks,
Benoit Cousson00fe6102011-07-09 19:14:28 -06005193 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005194 .slaves = omap44xx_usb_otg_hs_slaves,
5195 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
5196 .masters = omap44xx_usb_otg_hs_masters,
5197 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
5198 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5199};
5200
5201/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005202 * 'wd_timer' class
5203 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
5204 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005205 */
5206
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005207static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005208 .rev_offs = 0x0000,
5209 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005210 .syss_offs = 0x0014,
5211 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07005212 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07005213 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5214 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005215 .sysc_fields = &omap_hwmod_sysc_type1,
5216};
5217
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005218static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5219 .name = "wd_timer",
5220 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00005221 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005222};
5223
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005224/* wd_timer2 */
5225static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5226static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5227 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005228 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005229};
5230
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005231static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005232 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005233 .pa_start = 0x4a314000,
5234 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005235 .flags = ADDR_TYPE_RT
5236 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005237 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005238};
5239
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005240/* l4_wkup -> wd_timer2 */
5241static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005242 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005243 .slave = &omap44xx_wd_timer2_hwmod,
5244 .clk = "l4_wkup_clk_mux_ck",
5245 .addr = omap44xx_wd_timer2_addrs,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005246 .user = OCP_USER_MPU | OCP_USER_SDMA,
5247};
5248
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005249/* wd_timer2 slave ports */
5250static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5251 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005252};
5253
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005254static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5255 .name = "wd_timer2",
5256 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005257 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005258 .mpu_irqs = omap44xx_wd_timer2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005259 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005260 .prcm = {
5261 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005262 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005263 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005264 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005265 },
5266 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005267 .slaves = omap44xx_wd_timer2_slaves,
5268 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005269 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5270};
5271
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005272/* wd_timer3 */
5273static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5274static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5275 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005276 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005277};
5278
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005279static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005280 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005281 .pa_start = 0x40130000,
5282 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005283 .flags = ADDR_TYPE_RT
5284 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005285 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005286};
5287
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005288/* l4_abe -> wd_timer3 */
5289static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5290 .master = &omap44xx_l4_abe_hwmod,
5291 .slave = &omap44xx_wd_timer3_hwmod,
5292 .clk = "ocp_abe_iclk",
5293 .addr = omap44xx_wd_timer3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005294 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005295};
5296
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005297static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005298 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005299 .pa_start = 0x49030000,
5300 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005301 .flags = ADDR_TYPE_RT
5302 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005303 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005304};
5305
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005306/* l4_abe -> wd_timer3 (dma) */
5307static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5308 .master = &omap44xx_l4_abe_hwmod,
5309 .slave = &omap44xx_wd_timer3_hwmod,
5310 .clk = "ocp_abe_iclk",
5311 .addr = omap44xx_wd_timer3_dma_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005312 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005313};
5314
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005315/* wd_timer3 slave ports */
5316static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5317 &omap44xx_l4_abe__wd_timer3,
5318 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005319};
5320
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005321static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5322 .name = "wd_timer3",
5323 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005324 .clkdm_name = "abe_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005325 .mpu_irqs = omap44xx_wd_timer3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005326 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005327 .prcm = {
5328 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005329 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005330 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005331 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005332 },
5333 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005334 .slaves = omap44xx_wd_timer3_slaves,
5335 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005336 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
5337};
5338
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005339static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005340
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005341 /* dmm class */
5342 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005343
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005344 /* emif_fw class */
5345 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005346
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005347 /* l3 class */
5348 &omap44xx_l3_instr_hwmod,
5349 &omap44xx_l3_main_1_hwmod,
5350 &omap44xx_l3_main_2_hwmod,
5351 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005352
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005353 /* l4 class */
5354 &omap44xx_l4_abe_hwmod,
5355 &omap44xx_l4_cfg_hwmod,
5356 &omap44xx_l4_per_hwmod,
5357 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005358
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005359 /* mpu_bus class */
5360 &omap44xx_mpu_private_hwmod,
5361
Benoit Cousson407a6882011-02-15 22:39:48 +01005362 /* aess class */
5363/* &omap44xx_aess_hwmod, */
5364
5365 /* bandgap class */
5366 &omap44xx_bandgap_hwmod,
5367
5368 /* counter class */
5369/* &omap44xx_counter_32k_hwmod, */
5370
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005371 /* dma class */
5372 &omap44xx_dma_system_hwmod,
5373
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005374 /* dmic class */
5375 &omap44xx_dmic_hwmod,
5376
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005377 /* dsp class */
5378 &omap44xx_dsp_hwmod,
5379 &omap44xx_dsp_c0_hwmod,
5380
Benoit Coussond63bd742011-01-27 11:17:03 +00005381 /* dss class */
5382 &omap44xx_dss_hwmod,
5383 &omap44xx_dss_dispc_hwmod,
5384 &omap44xx_dss_dsi1_hwmod,
5385 &omap44xx_dss_dsi2_hwmod,
5386 &omap44xx_dss_hdmi_hwmod,
5387 &omap44xx_dss_rfbi_hwmod,
5388 &omap44xx_dss_venc_hwmod,
5389
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005390 /* gpio class */
5391 &omap44xx_gpio1_hwmod,
5392 &omap44xx_gpio2_hwmod,
5393 &omap44xx_gpio3_hwmod,
5394 &omap44xx_gpio4_hwmod,
5395 &omap44xx_gpio5_hwmod,
5396 &omap44xx_gpio6_hwmod,
5397
Benoit Cousson407a6882011-02-15 22:39:48 +01005398 /* hsi class */
5399/* &omap44xx_hsi_hwmod, */
5400
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005401 /* i2c class */
5402 &omap44xx_i2c1_hwmod,
5403 &omap44xx_i2c2_hwmod,
5404 &omap44xx_i2c3_hwmod,
5405 &omap44xx_i2c4_hwmod,
5406
Benoit Cousson407a6882011-02-15 22:39:48 +01005407 /* ipu class */
5408 &omap44xx_ipu_hwmod,
5409 &omap44xx_ipu_c0_hwmod,
5410 &omap44xx_ipu_c1_hwmod,
5411
5412 /* iss class */
5413/* &omap44xx_iss_hwmod, */
5414
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005415 /* iva class */
5416 &omap44xx_iva_hwmod,
5417 &omap44xx_iva_seq0_hwmod,
5418 &omap44xx_iva_seq1_hwmod,
5419
Benoit Cousson407a6882011-02-15 22:39:48 +01005420 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005421 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005422
Benoit Coussonec5df922011-02-02 19:27:21 +00005423 /* mailbox class */
5424 &omap44xx_mailbox_hwmod,
5425
Benoit Cousson4ddff492011-01-31 14:50:30 +00005426 /* mcbsp class */
5427 &omap44xx_mcbsp1_hwmod,
5428 &omap44xx_mcbsp2_hwmod,
5429 &omap44xx_mcbsp3_hwmod,
5430 &omap44xx_mcbsp4_hwmod,
5431
Benoit Cousson407a6882011-02-15 22:39:48 +01005432 /* mcpdm class */
5433/* &omap44xx_mcpdm_hwmod, */
5434
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305435 /* mcspi class */
5436 &omap44xx_mcspi1_hwmod,
5437 &omap44xx_mcspi2_hwmod,
5438 &omap44xx_mcspi3_hwmod,
5439 &omap44xx_mcspi4_hwmod,
5440
Benoit Cousson407a6882011-02-15 22:39:48 +01005441 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005442 &omap44xx_mmc1_hwmod,
5443 &omap44xx_mmc2_hwmod,
5444 &omap44xx_mmc3_hwmod,
5445 &omap44xx_mmc4_hwmod,
5446 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005447
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005448 /* mpu class */
5449 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305450
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005451 /* smartreflex class */
5452 &omap44xx_smartreflex_core_hwmod,
5453 &omap44xx_smartreflex_iva_hwmod,
5454 &omap44xx_smartreflex_mpu_hwmod,
5455
Benoit Coussond11c2172011-02-02 12:04:36 +00005456 /* spinlock class */
5457 &omap44xx_spinlock_hwmod,
5458
Benoit Cousson35d1a662011-02-11 11:17:14 +00005459 /* timer class */
5460 &omap44xx_timer1_hwmod,
5461 &omap44xx_timer2_hwmod,
5462 &omap44xx_timer3_hwmod,
5463 &omap44xx_timer4_hwmod,
5464 &omap44xx_timer5_hwmod,
5465 &omap44xx_timer6_hwmod,
5466 &omap44xx_timer7_hwmod,
5467 &omap44xx_timer8_hwmod,
5468 &omap44xx_timer9_hwmod,
5469 &omap44xx_timer10_hwmod,
5470 &omap44xx_timer11_hwmod,
5471
Benoit Coussondb12ba52010-09-27 20:19:19 +05305472 /* uart class */
5473 &omap44xx_uart1_hwmod,
5474 &omap44xx_uart2_hwmod,
5475 &omap44xx_uart3_hwmod,
5476 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005477
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005478 /* usb_otg_hs class */
5479 &omap44xx_usb_otg_hs_hwmod,
5480
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005481 /* wd_timer class */
5482 &omap44xx_wd_timer2_hwmod,
5483 &omap44xx_wd_timer3_hwmod,
5484
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005485 NULL,
5486};
5487
5488int __init omap44xx_hwmod_init(void)
5489{
Paul Walmsley550c8092011-02-28 11:58:14 -07005490 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005491}
5492