blob: 12e3e14de27f821b3aa5553cda3b1d8dcf24652b [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>
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +053031#include <plat/dmtimer.h>
Tomi Valkeinen13662dc2011-11-08 03:16:13 -070032#include <plat/common.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020033
34#include "omap_hwmod_common_data.h"
35
Shweta Gulaticea6b942012-02-29 23:33:37 +010036#include "smartreflex.h"
Paul Walmsleyd198b512010-12-21 15:30:54 -070037#include "cm1_44xx.h"
38#include "cm2_44xx.h"
39#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020040#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070041#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020042
43/* Base offset for all OMAP4 interrupts external to MPUSS */
44#define OMAP44XX_IRQ_GIC_START 32
45
46/* Base offset for all OMAP4 dma requests */
47#define OMAP44XX_DMA_REQ_START 1
48
49/* Backward references (IPs with Bus Master capability) */
Benoit Cousson407a6882011-02-15 22:39:48 +010050static struct omap_hwmod omap44xx_aess_hwmod;
Benoit Cousson531ce0d2010-12-20 18:27:19 -080051static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020052static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070053static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Coussond63bd742011-01-27 11:17:03 +000054static struct omap_hwmod omap44xx_dss_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020055static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010056static struct omap_hwmod omap44xx_hsi_hwmod;
57static struct omap_hwmod omap44xx_ipu_hwmod;
58static struct omap_hwmod omap44xx_iss_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070059static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020060static struct omap_hwmod omap44xx_l3_instr_hwmod;
61static struct omap_hwmod omap44xx_l3_main_1_hwmod;
62static struct omap_hwmod omap44xx_l3_main_2_hwmod;
63static struct omap_hwmod omap44xx_l3_main_3_hwmod;
64static struct omap_hwmod omap44xx_l4_abe_hwmod;
65static struct omap_hwmod omap44xx_l4_cfg_hwmod;
66static struct omap_hwmod omap44xx_l4_per_hwmod;
67static struct omap_hwmod omap44xx_l4_wkup_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010068static struct omap_hwmod omap44xx_mmc1_hwmod;
69static struct omap_hwmod omap44xx_mmc2_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020070static struct omap_hwmod omap44xx_mpu_hwmod;
71static struct omap_hwmod omap44xx_mpu_private_hwmod;
Benoit Cousson5844c4e2011-02-17 12:41:05 +000072static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
Benoit Coussonaf88fa92011-12-15 23:15:18 -070073static struct omap_hwmod omap44xx_usb_host_hs_hwmod;
74static struct omap_hwmod omap44xx_usb_tll_hs_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020075
76/*
77 * Interconnects omap_hwmod structures
78 * hwmods that compose the global OMAP interconnect
79 */
80
81/*
82 * 'dmm' class
83 * instance(s): dmm
84 */
85static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +000086 .name = "dmm",
Benoit Cousson55d2cb02010-05-12 17:54:36 +020087};
88
Benoit Cousson7e69ed92011-07-09 19:14:28 -060089/* dmm */
90static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
91 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
92 { .irq = -1 }
93};
94
Benoit Cousson55d2cb02010-05-12 17:54:36 +020095/* l3_main_1 -> dmm */
96static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
97 .master = &omap44xx_l3_main_1_hwmod,
98 .slave = &omap44xx_dmm_hwmod,
99 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700100 .user = OCP_USER_SDMA,
101};
102
103static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
104 {
105 .pa_start = 0x4e000000,
106 .pa_end = 0x4e0007ff,
107 .flags = ADDR_TYPE_RT
108 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600109 { }
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200110};
111
112/* mpu -> dmm */
113static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
114 .master = &omap44xx_mpu_hwmod,
115 .slave = &omap44xx_dmm_hwmod,
116 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700117 .addr = omap44xx_dmm_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700118 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200119};
120
121/* dmm slave ports */
122static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
123 &omap44xx_l3_main_1__dmm,
124 &omap44xx_mpu__dmm,
125};
126
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200127static struct omap_hwmod omap44xx_dmm_hwmod = {
128 .name = "dmm",
129 .class = &omap44xx_dmm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600130 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600131 .prcm = {
132 .omap4 = {
133 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600134 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600135 },
136 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200137 .slaves = omap44xx_dmm_slaves,
138 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
Benoit Coussona5322c62011-07-10 05:56:29 -0600139 .mpu_irqs = omap44xx_dmm_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200140};
141
142/*
143 * 'emif_fw' class
144 * instance(s): emif_fw
145 */
146static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000147 .name = "emif_fw",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200148};
149
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600150/* emif_fw */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200151/* dmm -> emif_fw */
152static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
153 .master = &omap44xx_dmm_hwmod,
154 .slave = &omap44xx_emif_fw_hwmod,
155 .clk = "l3_div_ck",
156 .user = OCP_USER_MPU | OCP_USER_SDMA,
157};
158
Benoit Cousson659fa822010-12-21 21:08:34 -0700159static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
160 {
161 .pa_start = 0x4a20c000,
162 .pa_end = 0x4a20c0ff,
163 .flags = ADDR_TYPE_RT
164 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600165 { }
Benoit Cousson659fa822010-12-21 21:08:34 -0700166};
167
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200168/* l4_cfg -> emif_fw */
169static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
170 .master = &omap44xx_l4_cfg_hwmod,
171 .slave = &omap44xx_emif_fw_hwmod,
172 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700173 .addr = omap44xx_emif_fw_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700174 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200175};
176
177/* emif_fw slave ports */
178static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
179 &omap44xx_dmm__emif_fw,
180 &omap44xx_l4_cfg__emif_fw,
181};
182
183static struct omap_hwmod omap44xx_emif_fw_hwmod = {
184 .name = "emif_fw",
185 .class = &omap44xx_emif_fw_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600186 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600187 .prcm = {
188 .omap4 = {
189 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600190 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600191 },
192 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200193 .slaves = omap44xx_emif_fw_slaves,
194 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200195};
196
197/*
198 * 'l3' class
199 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
200 */
201static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000202 .name = "l3",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200203};
204
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600205/* l3_instr */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700206/* iva -> l3_instr */
207static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
208 .master = &omap44xx_iva_hwmod,
209 .slave = &omap44xx_l3_instr_hwmod,
210 .clk = "l3_div_ck",
211 .user = OCP_USER_MPU | OCP_USER_SDMA,
212};
213
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200214/* l3_main_3 -> l3_instr */
215static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
216 .master = &omap44xx_l3_main_3_hwmod,
217 .slave = &omap44xx_l3_instr_hwmod,
218 .clk = "l3_div_ck",
219 .user = OCP_USER_MPU | OCP_USER_SDMA,
220};
221
222/* l3_instr slave ports */
223static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700224 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200225 &omap44xx_l3_main_3__l3_instr,
226};
227
228static struct omap_hwmod omap44xx_l3_instr_hwmod = {
229 .name = "l3_instr",
230 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600231 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600232 .prcm = {
233 .omap4 = {
234 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600235 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600236 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600237 },
238 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200239 .slaves = omap44xx_l3_instr_slaves,
240 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200241};
242
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600243/* l3_main_1 */
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600244static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
245 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
246 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
247 { .irq = -1 }
248};
249
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700250/* dsp -> l3_main_1 */
251static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
252 .master = &omap44xx_dsp_hwmod,
253 .slave = &omap44xx_l3_main_1_hwmod,
254 .clk = "l3_div_ck",
255 .user = OCP_USER_MPU | OCP_USER_SDMA,
256};
257
Benoit Coussond63bd742011-01-27 11:17:03 +0000258/* dss -> l3_main_1 */
259static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
260 .master = &omap44xx_dss_hwmod,
261 .slave = &omap44xx_l3_main_1_hwmod,
262 .clk = "l3_div_ck",
263 .user = OCP_USER_MPU | OCP_USER_SDMA,
264};
265
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200266/* l3_main_2 -> l3_main_1 */
267static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
268 .master = &omap44xx_l3_main_2_hwmod,
269 .slave = &omap44xx_l3_main_1_hwmod,
270 .clk = "l3_div_ck",
271 .user = OCP_USER_MPU | OCP_USER_SDMA,
272};
273
274/* l4_cfg -> l3_main_1 */
275static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
276 .master = &omap44xx_l4_cfg_hwmod,
277 .slave = &omap44xx_l3_main_1_hwmod,
278 .clk = "l4_div_ck",
279 .user = OCP_USER_MPU | OCP_USER_SDMA,
280};
281
Benoit Cousson407a6882011-02-15 22:39:48 +0100282/* mmc1 -> l3_main_1 */
283static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
284 .master = &omap44xx_mmc1_hwmod,
285 .slave = &omap44xx_l3_main_1_hwmod,
286 .clk = "l3_div_ck",
287 .user = OCP_USER_MPU | OCP_USER_SDMA,
288};
289
290/* mmc2 -> l3_main_1 */
291static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
292 .master = &omap44xx_mmc2_hwmod,
293 .slave = &omap44xx_l3_main_1_hwmod,
294 .clk = "l3_div_ck",
295 .user = OCP_USER_MPU | OCP_USER_SDMA,
296};
297
sricharanc4645232011-02-07 21:12:11 +0530298static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
299 {
300 .pa_start = 0x44000000,
301 .pa_end = 0x44000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600302 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530303 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600304 { }
sricharanc4645232011-02-07 21:12:11 +0530305};
306
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200307/* mpu -> l3_main_1 */
308static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
309 .master = &omap44xx_mpu_hwmod,
310 .slave = &omap44xx_l3_main_1_hwmod,
311 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530312 .addr = omap44xx_l3_main_1_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600313 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200314};
315
316/* l3_main_1 slave ports */
317static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700318 &omap44xx_dsp__l3_main_1,
Benoit Coussond63bd742011-01-27 11:17:03 +0000319 &omap44xx_dss__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200320 &omap44xx_l3_main_2__l3_main_1,
321 &omap44xx_l4_cfg__l3_main_1,
Benoit Cousson407a6882011-02-15 22:39:48 +0100322 &omap44xx_mmc1__l3_main_1,
323 &omap44xx_mmc2__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200324 &omap44xx_mpu__l3_main_1,
325};
326
327static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
328 .name = "l3_main_1",
329 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600330 .clkdm_name = "l3_1_clkdm",
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600331 .mpu_irqs = omap44xx_l3_main_1_irqs,
Benoit Coussond0f06312011-07-10 05:56:30 -0600332 .prcm = {
333 .omap4 = {
334 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600335 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600336 },
337 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200338 .slaves = omap44xx_l3_main_1_slaves,
339 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200340};
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),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200441};
442
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600443/* l3_main_3 */
sricharanc4645232011-02-07 21:12:11 +0530444static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
445 {
446 .pa_start = 0x45000000,
447 .pa_end = 0x45000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600448 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530449 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600450 { }
sricharanc4645232011-02-07 21:12:11 +0530451};
452
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200453/* l3_main_1 -> l3_main_3 */
454static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
455 .master = &omap44xx_l3_main_1_hwmod,
456 .slave = &omap44xx_l3_main_3_hwmod,
457 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530458 .addr = omap44xx_l3_main_3_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600459 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200460};
461
462/* l3_main_2 -> l3_main_3 */
463static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
464 .master = &omap44xx_l3_main_2_hwmod,
465 .slave = &omap44xx_l3_main_3_hwmod,
466 .clk = "l3_div_ck",
467 .user = OCP_USER_MPU | OCP_USER_SDMA,
468};
469
470/* l4_cfg -> l3_main_3 */
471static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
472 .master = &omap44xx_l4_cfg_hwmod,
473 .slave = &omap44xx_l3_main_3_hwmod,
474 .clk = "l4_div_ck",
475 .user = OCP_USER_MPU | OCP_USER_SDMA,
476};
477
478/* l3_main_3 slave ports */
479static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
480 &omap44xx_l3_main_1__l3_main_3,
481 &omap44xx_l3_main_2__l3_main_3,
482 &omap44xx_l4_cfg__l3_main_3,
483};
484
485static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
486 .name = "l3_main_3",
487 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600488 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600489 .prcm = {
490 .omap4 = {
491 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600492 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600493 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600494 },
495 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200496 .slaves = omap44xx_l3_main_3_slaves,
497 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200498};
499
500/*
501 * 'l4' class
502 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
503 */
504static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000505 .name = "l4",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200506};
507
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600508/* l4_abe */
Benoit Cousson407a6882011-02-15 22:39:48 +0100509/* aess -> l4_abe */
510static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
511 .master = &omap44xx_aess_hwmod,
512 .slave = &omap44xx_l4_abe_hwmod,
513 .clk = "ocp_abe_iclk",
514 .user = OCP_USER_MPU | OCP_USER_SDMA,
515};
516
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700517/* dsp -> l4_abe */
518static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
519 .master = &omap44xx_dsp_hwmod,
520 .slave = &omap44xx_l4_abe_hwmod,
521 .clk = "ocp_abe_iclk",
522 .user = OCP_USER_MPU | OCP_USER_SDMA,
523};
524
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200525/* l3_main_1 -> l4_abe */
526static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
527 .master = &omap44xx_l3_main_1_hwmod,
528 .slave = &omap44xx_l4_abe_hwmod,
529 .clk = "l3_div_ck",
530 .user = OCP_USER_MPU | OCP_USER_SDMA,
531};
532
533/* mpu -> l4_abe */
534static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
535 .master = &omap44xx_mpu_hwmod,
536 .slave = &omap44xx_l4_abe_hwmod,
537 .clk = "ocp_abe_iclk",
538 .user = OCP_USER_MPU | OCP_USER_SDMA,
539};
540
541/* l4_abe slave ports */
542static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100543 &omap44xx_aess__l4_abe,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700544 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200545 &omap44xx_l3_main_1__l4_abe,
546 &omap44xx_mpu__l4_abe,
547};
548
549static struct omap_hwmod omap44xx_l4_abe_hwmod = {
550 .name = "l4_abe",
551 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600552 .clkdm_name = "abe_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600553 .prcm = {
554 .omap4 = {
555 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
556 },
557 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200558 .slaves = omap44xx_l4_abe_slaves,
559 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200560};
561
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600562/* l4_cfg */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200563/* l3_main_1 -> l4_cfg */
564static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
565 .master = &omap44xx_l3_main_1_hwmod,
566 .slave = &omap44xx_l4_cfg_hwmod,
567 .clk = "l3_div_ck",
568 .user = OCP_USER_MPU | OCP_USER_SDMA,
569};
570
571/* l4_cfg slave ports */
572static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
573 &omap44xx_l3_main_1__l4_cfg,
574};
575
576static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
577 .name = "l4_cfg",
578 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600579 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600580 .prcm = {
581 .omap4 = {
582 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600583 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600584 },
585 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200586 .slaves = omap44xx_l4_cfg_slaves,
587 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200588};
589
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600590/* l4_per */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200591/* l3_main_2 -> l4_per */
592static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
593 .master = &omap44xx_l3_main_2_hwmod,
594 .slave = &omap44xx_l4_per_hwmod,
595 .clk = "l3_div_ck",
596 .user = OCP_USER_MPU | OCP_USER_SDMA,
597};
598
599/* l4_per slave ports */
600static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
601 &omap44xx_l3_main_2__l4_per,
602};
603
604static struct omap_hwmod omap44xx_l4_per_hwmod = {
605 .name = "l4_per",
606 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600607 .clkdm_name = "l4_per_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600608 .prcm = {
609 .omap4 = {
610 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600611 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600612 },
613 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200614 .slaves = omap44xx_l4_per_slaves,
615 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200616};
617
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600618/* l4_wkup */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200619/* l4_cfg -> l4_wkup */
620static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
621 .master = &omap44xx_l4_cfg_hwmod,
622 .slave = &omap44xx_l4_wkup_hwmod,
623 .clk = "l4_div_ck",
624 .user = OCP_USER_MPU | OCP_USER_SDMA,
625};
626
627/* l4_wkup slave ports */
628static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
629 &omap44xx_l4_cfg__l4_wkup,
630};
631
632static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
633 .name = "l4_wkup",
634 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600635 .clkdm_name = "l4_wkup_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600636 .prcm = {
637 .omap4 = {
638 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600639 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600640 },
641 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200642 .slaves = omap44xx_l4_wkup_slaves,
643 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200644};
645
646/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700647 * 'mpu_bus' class
648 * instance(s): mpu_private
649 */
650static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000651 .name = "mpu_bus",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700652};
653
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600654/* mpu_private */
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700655/* mpu -> mpu_private */
656static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
657 .master = &omap44xx_mpu_hwmod,
658 .slave = &omap44xx_mpu_private_hwmod,
659 .clk = "l3_div_ck",
660 .user = OCP_USER_MPU | OCP_USER_SDMA,
661};
662
663/* mpu_private slave ports */
664static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
665 &omap44xx_mpu__mpu_private,
666};
667
668static struct omap_hwmod omap44xx_mpu_private_hwmod = {
669 .name = "mpu_private",
670 .class = &omap44xx_mpu_bus_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600671 .clkdm_name = "mpuss_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700672 .slaves = omap44xx_mpu_private_slaves,
673 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700674};
675
676/*
677 * Modules omap_hwmod structures
678 *
679 * The following IPs are excluded for the moment because:
680 * - They do not need an explicit SW control using omap_hwmod API.
681 * - They still need to be validated with the driver
682 * properly adapted to omap_hwmod / omap_device
683 *
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700684 * c2c
685 * c2c_target_fw
686 * cm_core
687 * cm_core_aon
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700688 * ctrl_module_core
689 * ctrl_module_pad_core
690 * ctrl_module_pad_wkup
691 * ctrl_module_wkup
692 * debugss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700693 * efuse_ctrl_cust
694 * efuse_ctrl_std
695 * elm
696 * emif1
697 * emif2
698 * fdif
699 * gpmc
700 * gpu
701 * hdq1w
Benoit Cousson00fe6102011-07-09 19:14:28 -0600702 * mcasp
703 * mpu_c0
704 * mpu_c1
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700705 * ocmc_ram
706 * ocp2scp_usb_phy
707 * ocp_wp_noc
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700708 * prcm_mpu
709 * prm
710 * scrm
711 * sl2if
712 * slimbus1
713 * slimbus2
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700714 * usb_host_fs
715 * usb_host_hs
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700716 * usb_phy_cm
717 * usb_tll_hs
718 * usim
719 */
720
721/*
Benoit Cousson407a6882011-02-15 22:39:48 +0100722 * 'aess' class
723 * audio engine sub system
724 */
725
726static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
727 .rev_offs = 0x0000,
728 .sysc_offs = 0x0010,
729 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
730 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
Benoit Coussonc614ebf2011-07-01 22:54:01 +0200731 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
732 MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +0100733 .sysc_fields = &omap_hwmod_sysc_type2,
734};
735
736static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
737 .name = "aess",
738 .sysc = &omap44xx_aess_sysc,
739};
740
741/* aess */
742static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
743 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600744 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100745};
746
747static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
748 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
749 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
750 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
751 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
752 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
753 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
754 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
755 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -0600756 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100757};
758
759/* aess master ports */
760static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
761 &omap44xx_aess__l4_abe,
762};
763
764static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
765 {
Sebastien Guiriecc6a6eb92011-03-03 15:20:41 +0100766 .name = "dmem",
767 .pa_start = 0x40180000,
768 .pa_end = 0x4018ffff
769 },
770 {
771 .name = "cmem",
772 .pa_start = 0x401a0000,
773 .pa_end = 0x401a1fff
774 },
775 {
776 .name = "smem",
777 .pa_start = 0x401c0000,
778 .pa_end = 0x401c5fff
779 },
780 {
781 .name = "pmem",
782 .pa_start = 0x401e0000,
783 .pa_end = 0x401e1fff
784 },
785 {
786 .name = "mpu",
Benoit Cousson407a6882011-02-15 22:39:48 +0100787 .pa_start = 0x401f1000,
788 .pa_end = 0x401f13ff,
789 .flags = ADDR_TYPE_RT
790 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600791 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100792};
793
794/* l4_abe -> aess */
795static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
796 .master = &omap44xx_l4_abe_hwmod,
797 .slave = &omap44xx_aess_hwmod,
798 .clk = "ocp_abe_iclk",
799 .addr = omap44xx_aess_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100800 .user = OCP_USER_MPU,
801};
802
803static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
804 {
Sebastien Guiriecc6a6eb92011-03-03 15:20:41 +0100805 .name = "dmem_dma",
806 .pa_start = 0x49080000,
807 .pa_end = 0x4908ffff
808 },
809 {
810 .name = "cmem_dma",
811 .pa_start = 0x490a0000,
812 .pa_end = 0x490a1fff
813 },
814 {
815 .name = "smem_dma",
816 .pa_start = 0x490c0000,
817 .pa_end = 0x490c5fff
818 },
819 {
820 .name = "pmem_dma",
821 .pa_start = 0x490e0000,
822 .pa_end = 0x490e1fff
823 },
824 {
825 .name = "dma",
Benoit Cousson407a6882011-02-15 22:39:48 +0100826 .pa_start = 0x490f1000,
827 .pa_end = 0x490f13ff,
828 .flags = ADDR_TYPE_RT
829 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600830 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100831};
832
833/* l4_abe -> aess (dma) */
834static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
835 .master = &omap44xx_l4_abe_hwmod,
836 .slave = &omap44xx_aess_hwmod,
837 .clk = "ocp_abe_iclk",
838 .addr = omap44xx_aess_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100839 .user = OCP_USER_SDMA,
840};
841
842/* aess slave ports */
843static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
844 &omap44xx_l4_abe__aess,
845 &omap44xx_l4_abe__aess_dma,
846};
847
848static struct omap_hwmod omap44xx_aess_hwmod = {
849 .name = "aess",
850 .class = &omap44xx_aess_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600851 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100852 .mpu_irqs = omap44xx_aess_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100853 .sdma_reqs = omap44xx_aess_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100854 .main_clk = "aess_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600855 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100856 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600857 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600858 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600859 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +0100860 },
861 },
862 .slaves = omap44xx_aess_slaves,
863 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
864 .masters = omap44xx_aess_masters,
865 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +0100866};
867
868/*
869 * 'bandgap' class
870 * bangap reference for ldo regulators
871 */
872
873static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
874 .name = "bandgap",
875};
876
877/* bandgap */
878static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
879 { .role = "fclk", .clk = "bandgap_fclk" },
880};
881
882static struct omap_hwmod omap44xx_bandgap_hwmod = {
883 .name = "bandgap",
884 .class = &omap44xx_bandgap_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600885 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600886 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100887 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600888 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100889 },
890 },
891 .opt_clks = bandgap_opt_clks,
892 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
Benoit Cousson407a6882011-02-15 22:39:48 +0100893};
894
895/*
896 * 'counter' class
897 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
898 */
899
900static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
901 .rev_offs = 0x0000,
902 .sysc_offs = 0x0004,
903 .sysc_flags = SYSC_HAS_SIDLEMODE,
904 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
905 SIDLE_SMART_WKUP),
906 .sysc_fields = &omap_hwmod_sysc_type1,
907};
908
909static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
910 .name = "counter",
911 .sysc = &omap44xx_counter_sysc,
912};
913
914/* counter_32k */
915static struct omap_hwmod omap44xx_counter_32k_hwmod;
916static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
917 {
918 .pa_start = 0x4a304000,
919 .pa_end = 0x4a30401f,
920 .flags = ADDR_TYPE_RT
921 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600922 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100923};
924
925/* l4_wkup -> counter_32k */
926static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
927 .master = &omap44xx_l4_wkup_hwmod,
928 .slave = &omap44xx_counter_32k_hwmod,
929 .clk = "l4_wkup_clk_mux_ck",
930 .addr = omap44xx_counter_32k_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100931 .user = OCP_USER_MPU | OCP_USER_SDMA,
932};
933
934/* counter_32k slave ports */
935static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
936 &omap44xx_l4_wkup__counter_32k,
937};
938
939static struct omap_hwmod omap44xx_counter_32k_hwmod = {
940 .name = "counter_32k",
941 .class = &omap44xx_counter_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600942 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100943 .flags = HWMOD_SWSUP_SIDLE,
944 .main_clk = "sys_32k_ck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600945 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100946 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600947 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600948 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100949 },
950 },
951 .slaves = omap44xx_counter_32k_slaves,
952 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +0100953};
954
955/*
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000956 * 'dma' class
957 * dma controller for data exchange between memory to memory (i.e. internal or
958 * external memory) and gp peripherals to memory or memory to gp peripherals
959 */
960
961static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
962 .rev_offs = 0x0000,
963 .sysc_offs = 0x002c,
964 .syss_offs = 0x0028,
965 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
966 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
967 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
968 SYSS_HAS_RESET_STATUS),
969 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
970 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
971 .sysc_fields = &omap_hwmod_sysc_type1,
972};
973
974static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
975 .name = "dma",
976 .sysc = &omap44xx_dma_sysc,
977};
978
979/* dma dev_attr */
980static struct omap_dma_dev_attr dma_dev_attr = {
981 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
982 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
983 .lch_count = 32,
984};
985
986/* dma_system */
987static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
988 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
989 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
990 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
991 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600992 { .irq = -1 }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000993};
994
995/* dma_system master ports */
996static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
997 &omap44xx_dma_system__l3_main_2,
998};
999
1000static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
1001 {
1002 .pa_start = 0x4a056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06001003 .pa_end = 0x4a056fff,
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001004 .flags = ADDR_TYPE_RT
1005 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001006 { }
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001007};
1008
1009/* l4_cfg -> dma_system */
1010static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
1011 .master = &omap44xx_l4_cfg_hwmod,
1012 .slave = &omap44xx_dma_system_hwmod,
1013 .clk = "l4_div_ck",
1014 .addr = omap44xx_dma_system_addrs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001015 .user = OCP_USER_MPU | OCP_USER_SDMA,
1016};
1017
1018/* dma_system slave ports */
1019static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
1020 &omap44xx_l4_cfg__dma_system,
1021};
1022
1023static struct omap_hwmod omap44xx_dma_system_hwmod = {
1024 .name = "dma_system",
1025 .class = &omap44xx_dma_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001026 .clkdm_name = "l3_dma_clkdm",
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001027 .mpu_irqs = omap44xx_dma_system_irqs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001028 .main_clk = "l3_div_ck",
1029 .prcm = {
1030 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001031 .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001032 .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001033 },
1034 },
1035 .dev_attr = &dma_dev_attr,
1036 .slaves = omap44xx_dma_system_slaves,
1037 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
1038 .masters = omap44xx_dma_system_masters,
1039 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
Benoit Coussond7cf5f32010-12-23 22:30:31 +00001040};
1041
1042/*
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001043 * 'dmic' class
1044 * digital microphone controller
1045 */
1046
1047static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
1048 .rev_offs = 0x0000,
1049 .sysc_offs = 0x0010,
1050 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1051 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1052 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1053 SIDLE_SMART_WKUP),
1054 .sysc_fields = &omap_hwmod_sysc_type2,
1055};
1056
1057static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1058 .name = "dmic",
1059 .sysc = &omap44xx_dmic_sysc,
1060};
1061
1062/* dmic */
1063static struct omap_hwmod omap44xx_dmic_hwmod;
1064static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1065 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001066 { .irq = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001067};
1068
1069static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1070 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001071 { .dma_req = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001072};
1073
1074static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1075 {
Peter Ujfalusi6af486e2011-11-28 15:45:39 +02001076 .name = "mpu",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001077 .pa_start = 0x4012e000,
1078 .pa_end = 0x4012e07f,
1079 .flags = ADDR_TYPE_RT
1080 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001081 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001082};
1083
1084/* l4_abe -> dmic */
1085static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1086 .master = &omap44xx_l4_abe_hwmod,
1087 .slave = &omap44xx_dmic_hwmod,
1088 .clk = "ocp_abe_iclk",
1089 .addr = omap44xx_dmic_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001090 .user = OCP_USER_MPU,
1091};
1092
1093static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1094 {
Peter Ujfalusi6af486e2011-11-28 15:45:39 +02001095 .name = "dma",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001096 .pa_start = 0x4902e000,
1097 .pa_end = 0x4902e07f,
1098 .flags = ADDR_TYPE_RT
1099 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001100 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001101};
1102
1103/* l4_abe -> dmic (dma) */
1104static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1105 .master = &omap44xx_l4_abe_hwmod,
1106 .slave = &omap44xx_dmic_hwmod,
1107 .clk = "ocp_abe_iclk",
1108 .addr = omap44xx_dmic_dma_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001109 .user = OCP_USER_SDMA,
1110};
1111
1112/* dmic slave ports */
1113static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1114 &omap44xx_l4_abe__dmic,
1115 &omap44xx_l4_abe__dmic_dma,
1116};
1117
1118static struct omap_hwmod omap44xx_dmic_hwmod = {
1119 .name = "dmic",
1120 .class = &omap44xx_dmic_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001121 .clkdm_name = "abe_clkdm",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001122 .mpu_irqs = omap44xx_dmic_irqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001123 .sdma_reqs = omap44xx_dmic_sdma_reqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001124 .main_clk = "dmic_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06001125 .prcm = {
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001126 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001127 .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001128 .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001129 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001130 },
1131 },
1132 .slaves = omap44xx_dmic_slaves,
1133 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001134};
1135
1136/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001137 * 'dsp' class
1138 * dsp sub-system
1139 */
1140
1141static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001142 .name = "dsp",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001143};
1144
1145/* dsp */
1146static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1147 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001148 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001149};
1150
1151static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1152 { .name = "mmu_cache", .rst_shift = 1 },
1153};
1154
1155static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1156 { .name = "dsp", .rst_shift = 0 },
1157};
1158
1159/* dsp -> iva */
1160static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1161 .master = &omap44xx_dsp_hwmod,
1162 .slave = &omap44xx_iva_hwmod,
1163 .clk = "dpll_iva_m5x2_ck",
1164};
1165
1166/* dsp master ports */
1167static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1168 &omap44xx_dsp__l3_main_1,
1169 &omap44xx_dsp__l4_abe,
1170 &omap44xx_dsp__iva,
1171};
1172
1173/* l4_cfg -> dsp */
1174static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1175 .master = &omap44xx_l4_cfg_hwmod,
1176 .slave = &omap44xx_dsp_hwmod,
1177 .clk = "l4_div_ck",
1178 .user = OCP_USER_MPU | OCP_USER_SDMA,
1179};
1180
1181/* dsp slave ports */
1182static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1183 &omap44xx_l4_cfg__dsp,
1184};
1185
1186/* Pseudo hwmod for reset control purpose only */
1187static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1188 .name = "dsp_c0",
1189 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001190 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001191 .flags = HWMOD_INIT_NO_RESET,
1192 .rst_lines = omap44xx_dsp_c0_resets,
1193 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1194 .prcm = {
1195 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06001196 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001197 },
1198 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001199};
1200
1201static struct omap_hwmod omap44xx_dsp_hwmod = {
1202 .name = "dsp",
1203 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001204 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001205 .mpu_irqs = omap44xx_dsp_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001206 .rst_lines = omap44xx_dsp_resets,
1207 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1208 .main_clk = "dsp_fck",
1209 .prcm = {
1210 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001211 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06001212 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001213 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001214 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001215 },
1216 },
1217 .slaves = omap44xx_dsp_slaves,
1218 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1219 .masters = omap44xx_dsp_masters,
1220 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001221};
1222
1223/*
Benoit Coussond63bd742011-01-27 11:17:03 +00001224 * 'dss' class
1225 * display sub-system
1226 */
1227
1228static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
1229 .rev_offs = 0x0000,
1230 .syss_offs = 0x0014,
1231 .sysc_flags = SYSS_HAS_RESET_STATUS,
1232};
1233
1234static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1235 .name = "dss",
1236 .sysc = &omap44xx_dss_sysc,
Tomi Valkeinen13662dc2011-11-08 03:16:13 -07001237 .reset = omap_dss_reset,
Benoit Coussond63bd742011-01-27 11:17:03 +00001238};
1239
1240/* dss */
1241/* dss master ports */
1242static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1243 &omap44xx_dss__l3_main_1,
1244};
1245
1246static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1247 {
1248 .pa_start = 0x58000000,
1249 .pa_end = 0x5800007f,
1250 .flags = ADDR_TYPE_RT
1251 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001252 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001253};
1254
1255/* l3_main_2 -> dss */
1256static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1257 .master = &omap44xx_l3_main_2_hwmod,
1258 .slave = &omap44xx_dss_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001259 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001260 .addr = omap44xx_dss_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001261 .user = OCP_USER_SDMA,
1262};
1263
1264static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1265 {
1266 .pa_start = 0x48040000,
1267 .pa_end = 0x4804007f,
1268 .flags = ADDR_TYPE_RT
1269 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001270 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001271};
1272
1273/* l4_per -> dss */
1274static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1275 .master = &omap44xx_l4_per_hwmod,
1276 .slave = &omap44xx_dss_hwmod,
1277 .clk = "l4_div_ck",
1278 .addr = omap44xx_dss_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001279 .user = OCP_USER_MPU,
1280};
1281
1282/* dss slave ports */
1283static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1284 &omap44xx_l3_main_2__dss,
1285 &omap44xx_l4_per__dss,
1286};
1287
1288static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1289 { .role = "sys_clk", .clk = "dss_sys_clk" },
1290 { .role = "tv_clk", .clk = "dss_tv_clk" },
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001291 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
Benoit Coussond63bd742011-01-27 11:17:03 +00001292};
1293
1294static struct omap_hwmod omap44xx_dss_hwmod = {
1295 .name = "dss_core",
Tomi Valkeinen37ad0852011-11-08 03:16:11 -07001296 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001297 .class = &omap44xx_dss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001298 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001299 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001300 .prcm = {
1301 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001302 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001303 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001304 },
1305 },
1306 .opt_clks = dss_opt_clks,
1307 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1308 .slaves = omap44xx_dss_slaves,
1309 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1310 .masters = omap44xx_dss_masters,
1311 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
Benoit Coussond63bd742011-01-27 11:17:03 +00001312};
1313
1314/*
1315 * 'dispc' class
1316 * display controller
1317 */
1318
1319static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
1320 .rev_offs = 0x0000,
1321 .sysc_offs = 0x0010,
1322 .syss_offs = 0x0014,
1323 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1324 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
1325 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1326 SYSS_HAS_RESET_STATUS),
1327 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1328 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1329 .sysc_fields = &omap_hwmod_sysc_type1,
1330};
1331
1332static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1333 .name = "dispc",
1334 .sysc = &omap44xx_dispc_sysc,
1335};
1336
1337/* dss_dispc */
1338static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1339static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1340 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001341 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001342};
1343
1344static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1345 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001346 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001347};
1348
1349static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1350 {
1351 .pa_start = 0x58001000,
1352 .pa_end = 0x58001fff,
1353 .flags = ADDR_TYPE_RT
1354 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001355 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001356};
1357
1358/* l3_main_2 -> dss_dispc */
1359static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1360 .master = &omap44xx_l3_main_2_hwmod,
1361 .slave = &omap44xx_dss_dispc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001362 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001363 .addr = omap44xx_dss_dispc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001364 .user = OCP_USER_SDMA,
1365};
1366
1367static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1368 {
1369 .pa_start = 0x48041000,
1370 .pa_end = 0x48041fff,
1371 .flags = ADDR_TYPE_RT
1372 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001373 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001374};
1375
Archit Tanejab923d402011-10-06 18:04:08 -06001376static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = {
1377 .manager_count = 3,
1378 .has_framedonetv_irq = 1
1379};
1380
Benoit Coussond63bd742011-01-27 11:17:03 +00001381/* l4_per -> dss_dispc */
1382static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1383 .master = &omap44xx_l4_per_hwmod,
1384 .slave = &omap44xx_dss_dispc_hwmod,
1385 .clk = "l4_div_ck",
1386 .addr = omap44xx_dss_dispc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001387 .user = OCP_USER_MPU,
1388};
1389
1390/* dss_dispc slave ports */
1391static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1392 &omap44xx_l3_main_2__dss_dispc,
1393 &omap44xx_l4_per__dss_dispc,
1394};
1395
1396static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1397 .name = "dss_dispc",
1398 .class = &omap44xx_dispc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001399 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001400 .mpu_irqs = omap44xx_dss_dispc_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001401 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001402 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001403 .prcm = {
1404 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001405 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001406 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001407 },
1408 },
1409 .slaves = omap44xx_dss_dispc_slaves,
1410 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
Archit Tanejab923d402011-10-06 18:04:08 -06001411 .dev_attr = &omap44xx_dss_dispc_dev_attr
Benoit Coussond63bd742011-01-27 11:17:03 +00001412};
1413
1414/*
1415 * 'dsi' class
1416 * display serial interface controller
1417 */
1418
1419static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1420 .rev_offs = 0x0000,
1421 .sysc_offs = 0x0010,
1422 .syss_offs = 0x0014,
1423 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1424 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1425 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1426 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1427 .sysc_fields = &omap_hwmod_sysc_type1,
1428};
1429
1430static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1431 .name = "dsi",
1432 .sysc = &omap44xx_dsi_sysc,
1433};
1434
1435/* dss_dsi1 */
1436static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1437static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1438 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001439 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001440};
1441
1442static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1443 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001444 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001445};
1446
1447static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1448 {
1449 .pa_start = 0x58004000,
1450 .pa_end = 0x580041ff,
1451 .flags = ADDR_TYPE_RT
1452 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001453 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001454};
1455
1456/* l3_main_2 -> dss_dsi1 */
1457static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1458 .master = &omap44xx_l3_main_2_hwmod,
1459 .slave = &omap44xx_dss_dsi1_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001460 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001461 .addr = omap44xx_dss_dsi1_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001462 .user = OCP_USER_SDMA,
1463};
1464
1465static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1466 {
1467 .pa_start = 0x48044000,
1468 .pa_end = 0x480441ff,
1469 .flags = ADDR_TYPE_RT
1470 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001471 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001472};
1473
1474/* l4_per -> dss_dsi1 */
1475static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1476 .master = &omap44xx_l4_per_hwmod,
1477 .slave = &omap44xx_dss_dsi1_hwmod,
1478 .clk = "l4_div_ck",
1479 .addr = omap44xx_dss_dsi1_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001480 .user = OCP_USER_MPU,
1481};
1482
1483/* dss_dsi1 slave ports */
1484static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1485 &omap44xx_l3_main_2__dss_dsi1,
1486 &omap44xx_l4_per__dss_dsi1,
1487};
1488
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001489static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1490 { .role = "sys_clk", .clk = "dss_sys_clk" },
1491};
1492
Benoit Coussond63bd742011-01-27 11:17:03 +00001493static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1494 .name = "dss_dsi1",
1495 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001496 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001497 .mpu_irqs = omap44xx_dss_dsi1_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001498 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001499 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001500 .prcm = {
1501 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001502 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001503 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001504 },
1505 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001506 .opt_clks = dss_dsi1_opt_clks,
1507 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001508 .slaves = omap44xx_dss_dsi1_slaves,
1509 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001510};
1511
1512/* dss_dsi2 */
1513static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1514static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1515 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001516 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001517};
1518
1519static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1520 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001521 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001522};
1523
1524static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1525 {
1526 .pa_start = 0x58005000,
1527 .pa_end = 0x580051ff,
1528 .flags = ADDR_TYPE_RT
1529 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001530 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001531};
1532
1533/* l3_main_2 -> dss_dsi2 */
1534static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1535 .master = &omap44xx_l3_main_2_hwmod,
1536 .slave = &omap44xx_dss_dsi2_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001537 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001538 .addr = omap44xx_dss_dsi2_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001539 .user = OCP_USER_SDMA,
1540};
1541
1542static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1543 {
1544 .pa_start = 0x48045000,
1545 .pa_end = 0x480451ff,
1546 .flags = ADDR_TYPE_RT
1547 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001548 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001549};
1550
1551/* l4_per -> dss_dsi2 */
1552static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1553 .master = &omap44xx_l4_per_hwmod,
1554 .slave = &omap44xx_dss_dsi2_hwmod,
1555 .clk = "l4_div_ck",
1556 .addr = omap44xx_dss_dsi2_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001557 .user = OCP_USER_MPU,
1558};
1559
1560/* dss_dsi2 slave ports */
1561static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1562 &omap44xx_l3_main_2__dss_dsi2,
1563 &omap44xx_l4_per__dss_dsi2,
1564};
1565
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001566static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1567 { .role = "sys_clk", .clk = "dss_sys_clk" },
1568};
1569
Benoit Coussond63bd742011-01-27 11:17:03 +00001570static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1571 .name = "dss_dsi2",
1572 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001573 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001574 .mpu_irqs = omap44xx_dss_dsi2_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001575 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001576 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001577 .prcm = {
1578 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001579 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001580 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001581 },
1582 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001583 .opt_clks = dss_dsi2_opt_clks,
1584 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001585 .slaves = omap44xx_dss_dsi2_slaves,
1586 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001587};
1588
1589/*
1590 * 'hdmi' class
1591 * hdmi controller
1592 */
1593
1594static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1595 .rev_offs = 0x0000,
1596 .sysc_offs = 0x0010,
1597 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1598 SYSC_HAS_SOFTRESET),
1599 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1600 SIDLE_SMART_WKUP),
1601 .sysc_fields = &omap_hwmod_sysc_type2,
1602};
1603
1604static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1605 .name = "hdmi",
1606 .sysc = &omap44xx_hdmi_sysc,
1607};
1608
1609/* dss_hdmi */
1610static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1611static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1612 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001613 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001614};
1615
1616static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1617 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001618 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001619};
1620
1621static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1622 {
1623 .pa_start = 0x58006000,
1624 .pa_end = 0x58006fff,
1625 .flags = ADDR_TYPE_RT
1626 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001627 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001628};
1629
1630/* l3_main_2 -> dss_hdmi */
1631static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1632 .master = &omap44xx_l3_main_2_hwmod,
1633 .slave = &omap44xx_dss_hdmi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001634 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001635 .addr = omap44xx_dss_hdmi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001636 .user = OCP_USER_SDMA,
1637};
1638
1639static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1640 {
1641 .pa_start = 0x48046000,
1642 .pa_end = 0x48046fff,
1643 .flags = ADDR_TYPE_RT
1644 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001645 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001646};
1647
1648/* l4_per -> dss_hdmi */
1649static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1650 .master = &omap44xx_l4_per_hwmod,
1651 .slave = &omap44xx_dss_hdmi_hwmod,
1652 .clk = "l4_div_ck",
1653 .addr = omap44xx_dss_hdmi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001654 .user = OCP_USER_MPU,
1655};
1656
1657/* dss_hdmi slave ports */
1658static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1659 &omap44xx_l3_main_2__dss_hdmi,
1660 &omap44xx_l4_per__dss_hdmi,
1661};
1662
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001663static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1664 { .role = "sys_clk", .clk = "dss_sys_clk" },
1665};
1666
Benoit Coussond63bd742011-01-27 11:17:03 +00001667static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1668 .name = "dss_hdmi",
1669 .class = &omap44xx_hdmi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001670 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001671 .mpu_irqs = omap44xx_dss_hdmi_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001672 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001673 .main_clk = "dss_48mhz_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001674 .prcm = {
1675 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001676 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001677 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001678 },
1679 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001680 .opt_clks = dss_hdmi_opt_clks,
1681 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001682 .slaves = omap44xx_dss_hdmi_slaves,
1683 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001684};
1685
1686/*
1687 * 'rfbi' class
1688 * remote frame buffer interface
1689 */
1690
1691static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1692 .rev_offs = 0x0000,
1693 .sysc_offs = 0x0010,
1694 .syss_offs = 0x0014,
1695 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1696 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1697 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1698 .sysc_fields = &omap_hwmod_sysc_type1,
1699};
1700
1701static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1702 .name = "rfbi",
1703 .sysc = &omap44xx_rfbi_sysc,
1704};
1705
1706/* dss_rfbi */
1707static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1708static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1709 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001710 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001711};
1712
1713static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1714 {
1715 .pa_start = 0x58002000,
1716 .pa_end = 0x580020ff,
1717 .flags = ADDR_TYPE_RT
1718 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001719 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001720};
1721
1722/* l3_main_2 -> dss_rfbi */
1723static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1724 .master = &omap44xx_l3_main_2_hwmod,
1725 .slave = &omap44xx_dss_rfbi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001726 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001727 .addr = omap44xx_dss_rfbi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001728 .user = OCP_USER_SDMA,
1729};
1730
1731static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1732 {
1733 .pa_start = 0x48042000,
1734 .pa_end = 0x480420ff,
1735 .flags = ADDR_TYPE_RT
1736 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001737 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001738};
1739
1740/* l4_per -> dss_rfbi */
1741static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1742 .master = &omap44xx_l4_per_hwmod,
1743 .slave = &omap44xx_dss_rfbi_hwmod,
1744 .clk = "l4_div_ck",
1745 .addr = omap44xx_dss_rfbi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001746 .user = OCP_USER_MPU,
1747};
1748
1749/* dss_rfbi slave ports */
1750static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1751 &omap44xx_l3_main_2__dss_rfbi,
1752 &omap44xx_l4_per__dss_rfbi,
1753};
1754
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001755static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1756 { .role = "ick", .clk = "dss_fck" },
1757};
1758
Benoit Coussond63bd742011-01-27 11:17:03 +00001759static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1760 .name = "dss_rfbi",
1761 .class = &omap44xx_rfbi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001762 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001763 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001764 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001765 .prcm = {
1766 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001767 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001768 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001769 },
1770 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001771 .opt_clks = dss_rfbi_opt_clks,
1772 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001773 .slaves = omap44xx_dss_rfbi_slaves,
1774 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001775};
1776
1777/*
1778 * 'venc' class
1779 * video encoder
1780 */
1781
1782static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1783 .name = "venc",
1784};
1785
1786/* dss_venc */
1787static struct omap_hwmod omap44xx_dss_venc_hwmod;
1788static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1789 {
1790 .pa_start = 0x58003000,
1791 .pa_end = 0x580030ff,
1792 .flags = ADDR_TYPE_RT
1793 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001794 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001795};
1796
1797/* l3_main_2 -> dss_venc */
1798static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1799 .master = &omap44xx_l3_main_2_hwmod,
1800 .slave = &omap44xx_dss_venc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001801 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001802 .addr = omap44xx_dss_venc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001803 .user = OCP_USER_SDMA,
1804};
1805
1806static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1807 {
1808 .pa_start = 0x48043000,
1809 .pa_end = 0x480430ff,
1810 .flags = ADDR_TYPE_RT
1811 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001812 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001813};
1814
1815/* l4_per -> dss_venc */
1816static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1817 .master = &omap44xx_l4_per_hwmod,
1818 .slave = &omap44xx_dss_venc_hwmod,
1819 .clk = "l4_div_ck",
1820 .addr = omap44xx_dss_venc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001821 .user = OCP_USER_MPU,
1822};
1823
1824/* dss_venc slave ports */
1825static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1826 &omap44xx_l3_main_2__dss_venc,
1827 &omap44xx_l4_per__dss_venc,
1828};
1829
1830static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1831 .name = "dss_venc",
1832 .class = &omap44xx_venc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001833 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001834 .main_clk = "dss_tv_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001835 .prcm = {
1836 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001837 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001838 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001839 },
1840 },
1841 .slaves = omap44xx_dss_venc_slaves,
1842 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001843};
1844
1845/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001846 * 'gpio' class
1847 * general purpose io module
1848 */
1849
1850static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1851 .rev_offs = 0x0000,
1852 .sysc_offs = 0x0010,
1853 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001854 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1855 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1856 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001857 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1858 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001859 .sysc_fields = &omap_hwmod_sysc_type1,
1860};
1861
1862static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001863 .name = "gpio",
1864 .sysc = &omap44xx_gpio_sysc,
1865 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001866};
1867
1868/* gpio dev_attr */
1869static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001870 .bank_width = 32,
1871 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001872};
1873
1874/* gpio1 */
1875static struct omap_hwmod omap44xx_gpio1_hwmod;
1876static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1877 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001878 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001879};
1880
1881static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1882 {
1883 .pa_start = 0x4a310000,
1884 .pa_end = 0x4a3101ff,
1885 .flags = ADDR_TYPE_RT
1886 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001887 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001888};
1889
1890/* l4_wkup -> gpio1 */
1891static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1892 .master = &omap44xx_l4_wkup_hwmod,
1893 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001894 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001895 .addr = omap44xx_gpio1_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001896 .user = OCP_USER_MPU | OCP_USER_SDMA,
1897};
1898
1899/* gpio1 slave ports */
1900static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1901 &omap44xx_l4_wkup__gpio1,
1902};
1903
1904static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001905 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001906};
1907
1908static struct omap_hwmod omap44xx_gpio1_hwmod = {
1909 .name = "gpio1",
1910 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001911 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001912 .mpu_irqs = omap44xx_gpio1_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001913 .main_clk = "gpio1_ick",
1914 .prcm = {
1915 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001916 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001917 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001918 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001919 },
1920 },
1921 .opt_clks = gpio1_opt_clks,
1922 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1923 .dev_attr = &gpio_dev_attr,
1924 .slaves = omap44xx_gpio1_slaves,
1925 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001926};
1927
1928/* gpio2 */
1929static struct omap_hwmod omap44xx_gpio2_hwmod;
1930static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1931 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001932 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001933};
1934
1935static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1936 {
1937 .pa_start = 0x48055000,
1938 .pa_end = 0x480551ff,
1939 .flags = ADDR_TYPE_RT
1940 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001941 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001942};
1943
1944/* l4_per -> gpio2 */
1945static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1946 .master = &omap44xx_l4_per_hwmod,
1947 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001948 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001949 .addr = omap44xx_gpio2_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001950 .user = OCP_USER_MPU | OCP_USER_SDMA,
1951};
1952
1953/* gpio2 slave ports */
1954static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1955 &omap44xx_l4_per__gpio2,
1956};
1957
1958static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001959 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001960};
1961
1962static struct omap_hwmod omap44xx_gpio2_hwmod = {
1963 .name = "gpio2",
1964 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001965 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001966 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001967 .mpu_irqs = omap44xx_gpio2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001968 .main_clk = "gpio2_ick",
1969 .prcm = {
1970 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001971 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001972 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001973 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001974 },
1975 },
1976 .opt_clks = gpio2_opt_clks,
1977 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1978 .dev_attr = &gpio_dev_attr,
1979 .slaves = omap44xx_gpio2_slaves,
1980 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001981};
1982
1983/* gpio3 */
1984static struct omap_hwmod omap44xx_gpio3_hwmod;
1985static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1986 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001987 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001988};
1989
1990static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1991 {
1992 .pa_start = 0x48057000,
1993 .pa_end = 0x480571ff,
1994 .flags = ADDR_TYPE_RT
1995 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001996 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001997};
1998
1999/* l4_per -> gpio3 */
2000static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
2001 .master = &omap44xx_l4_per_hwmod,
2002 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002003 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002004 .addr = omap44xx_gpio3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002005 .user = OCP_USER_MPU | OCP_USER_SDMA,
2006};
2007
2008/* gpio3 slave ports */
2009static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
2010 &omap44xx_l4_per__gpio3,
2011};
2012
2013static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002014 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002015};
2016
2017static struct omap_hwmod omap44xx_gpio3_hwmod = {
2018 .name = "gpio3",
2019 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002020 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002021 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002022 .mpu_irqs = omap44xx_gpio3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002023 .main_clk = "gpio3_ick",
2024 .prcm = {
2025 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002026 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002027 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002028 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002029 },
2030 },
2031 .opt_clks = gpio3_opt_clks,
2032 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
2033 .dev_attr = &gpio_dev_attr,
2034 .slaves = omap44xx_gpio3_slaves,
2035 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002036};
2037
2038/* gpio4 */
2039static struct omap_hwmod omap44xx_gpio4_hwmod;
2040static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
2041 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002042 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002043};
2044
2045static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
2046 {
2047 .pa_start = 0x48059000,
2048 .pa_end = 0x480591ff,
2049 .flags = ADDR_TYPE_RT
2050 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002051 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002052};
2053
2054/* l4_per -> gpio4 */
2055static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2056 .master = &omap44xx_l4_per_hwmod,
2057 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002058 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002059 .addr = omap44xx_gpio4_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002060 .user = OCP_USER_MPU | OCP_USER_SDMA,
2061};
2062
2063/* gpio4 slave ports */
2064static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2065 &omap44xx_l4_per__gpio4,
2066};
2067
2068static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002069 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002070};
2071
2072static struct omap_hwmod omap44xx_gpio4_hwmod = {
2073 .name = "gpio4",
2074 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002075 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002076 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002077 .mpu_irqs = omap44xx_gpio4_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002078 .main_clk = "gpio4_ick",
2079 .prcm = {
2080 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002081 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002082 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002083 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002084 },
2085 },
2086 .opt_clks = gpio4_opt_clks,
2087 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2088 .dev_attr = &gpio_dev_attr,
2089 .slaves = omap44xx_gpio4_slaves,
2090 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002091};
2092
2093/* gpio5 */
2094static struct omap_hwmod omap44xx_gpio5_hwmod;
2095static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2096 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002097 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002098};
2099
2100static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2101 {
2102 .pa_start = 0x4805b000,
2103 .pa_end = 0x4805b1ff,
2104 .flags = ADDR_TYPE_RT
2105 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002106 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002107};
2108
2109/* l4_per -> gpio5 */
2110static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2111 .master = &omap44xx_l4_per_hwmod,
2112 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002113 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002114 .addr = omap44xx_gpio5_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002115 .user = OCP_USER_MPU | OCP_USER_SDMA,
2116};
2117
2118/* gpio5 slave ports */
2119static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2120 &omap44xx_l4_per__gpio5,
2121};
2122
2123static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002124 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002125};
2126
2127static struct omap_hwmod omap44xx_gpio5_hwmod = {
2128 .name = "gpio5",
2129 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002130 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002131 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002132 .mpu_irqs = omap44xx_gpio5_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002133 .main_clk = "gpio5_ick",
2134 .prcm = {
2135 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002136 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002137 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002138 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002139 },
2140 },
2141 .opt_clks = gpio5_opt_clks,
2142 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2143 .dev_attr = &gpio_dev_attr,
2144 .slaves = omap44xx_gpio5_slaves,
2145 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002146};
2147
2148/* gpio6 */
2149static struct omap_hwmod omap44xx_gpio6_hwmod;
2150static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2151 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002152 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002153};
2154
2155static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2156 {
2157 .pa_start = 0x4805d000,
2158 .pa_end = 0x4805d1ff,
2159 .flags = ADDR_TYPE_RT
2160 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002161 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002162};
2163
2164/* l4_per -> gpio6 */
2165static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2166 .master = &omap44xx_l4_per_hwmod,
2167 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002168 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002169 .addr = omap44xx_gpio6_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002170 .user = OCP_USER_MPU | OCP_USER_SDMA,
2171};
2172
2173/* gpio6 slave ports */
2174static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2175 &omap44xx_l4_per__gpio6,
2176};
2177
2178static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002179 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002180};
2181
2182static struct omap_hwmod omap44xx_gpio6_hwmod = {
2183 .name = "gpio6",
2184 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002185 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002186 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002187 .mpu_irqs = omap44xx_gpio6_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002188 .main_clk = "gpio6_ick",
2189 .prcm = {
2190 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002191 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002192 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002193 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002194 },
2195 },
2196 .opt_clks = gpio6_opt_clks,
2197 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2198 .dev_attr = &gpio_dev_attr,
2199 .slaves = omap44xx_gpio6_slaves,
2200 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002201};
2202
2203/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002204 * 'hsi' class
2205 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2206 * serial if)
2207 */
2208
2209static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2210 .rev_offs = 0x0000,
2211 .sysc_offs = 0x0010,
2212 .syss_offs = 0x0014,
2213 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2214 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2215 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2216 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2217 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002218 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002219 .sysc_fields = &omap_hwmod_sysc_type1,
2220};
2221
2222static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2223 .name = "hsi",
2224 .sysc = &omap44xx_hsi_sysc,
2225};
2226
2227/* hsi */
2228static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2229 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2230 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2231 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002232 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002233};
2234
2235/* hsi master ports */
2236static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2237 &omap44xx_hsi__l3_main_2,
2238};
2239
2240static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2241 {
2242 .pa_start = 0x4a058000,
2243 .pa_end = 0x4a05bfff,
2244 .flags = ADDR_TYPE_RT
2245 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002246 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002247};
2248
2249/* l4_cfg -> hsi */
2250static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2251 .master = &omap44xx_l4_cfg_hwmod,
2252 .slave = &omap44xx_hsi_hwmod,
2253 .clk = "l4_div_ck",
2254 .addr = omap44xx_hsi_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002255 .user = OCP_USER_MPU | OCP_USER_SDMA,
2256};
2257
2258/* hsi slave ports */
2259static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2260 &omap44xx_l4_cfg__hsi,
2261};
2262
2263static struct omap_hwmod omap44xx_hsi_hwmod = {
2264 .name = "hsi",
2265 .class = &omap44xx_hsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002266 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002267 .mpu_irqs = omap44xx_hsi_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002268 .main_clk = "hsi_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002269 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002270 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002271 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002272 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002273 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002274 },
2275 },
2276 .slaves = omap44xx_hsi_slaves,
2277 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2278 .masters = omap44xx_hsi_masters,
2279 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002280};
2281
2282/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302283 * 'i2c' class
2284 * multimaster high-speed i2c controller
2285 */
2286
2287static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2288 .sysc_offs = 0x0010,
2289 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002290 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2291 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002292 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002293 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2294 SIDLE_SMART_WKUP),
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05302295 .clockact = CLOCKACT_TEST_ICLK,
Benoit Coussonf7764712010-09-21 19:37:14 +05302296 .sysc_fields = &omap_hwmod_sysc_type1,
2297};
2298
2299static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002300 .name = "i2c",
2301 .sysc = &omap44xx_i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06002302 .rev = OMAP_I2C_IP_VERSION_2,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002303 .reset = &omap_i2c_reset,
Benoit Coussonf7764712010-09-21 19:37:14 +05302304};
2305
Andy Green4d4441a2011-07-10 05:27:16 -06002306static struct omap_i2c_dev_attr i2c_dev_attr = {
2307 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2308};
2309
Benoit Coussonf7764712010-09-21 19:37:14 +05302310/* i2c1 */
2311static struct omap_hwmod omap44xx_i2c1_hwmod;
2312static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2313 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002314 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302315};
2316
2317static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2318 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2319 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002320 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302321};
2322
2323static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2324 {
2325 .pa_start = 0x48070000,
2326 .pa_end = 0x480700ff,
2327 .flags = ADDR_TYPE_RT
2328 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002329 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302330};
2331
2332/* l4_per -> i2c1 */
2333static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2334 .master = &omap44xx_l4_per_hwmod,
2335 .slave = &omap44xx_i2c1_hwmod,
2336 .clk = "l4_div_ck",
2337 .addr = omap44xx_i2c1_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302338 .user = OCP_USER_MPU | OCP_USER_SDMA,
2339};
2340
2341/* i2c1 slave ports */
2342static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2343 &omap44xx_l4_per__i2c1,
2344};
2345
2346static struct omap_hwmod omap44xx_i2c1_hwmod = {
2347 .name = "i2c1",
2348 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002349 .clkdm_name = "l4_per_clkdm",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05302350 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Benoit Coussonf7764712010-09-21 19:37:14 +05302351 .mpu_irqs = omap44xx_i2c1_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302352 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302353 .main_clk = "i2c1_fck",
2354 .prcm = {
2355 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002356 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002357 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002358 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302359 },
2360 },
2361 .slaves = omap44xx_i2c1_slaves,
2362 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002363 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302364};
2365
2366/* i2c2 */
2367static struct omap_hwmod omap44xx_i2c2_hwmod;
2368static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2369 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002370 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302371};
2372
2373static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2374 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2375 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002376 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302377};
2378
2379static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2380 {
2381 .pa_start = 0x48072000,
2382 .pa_end = 0x480720ff,
2383 .flags = ADDR_TYPE_RT
2384 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002385 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302386};
2387
2388/* l4_per -> i2c2 */
2389static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2390 .master = &omap44xx_l4_per_hwmod,
2391 .slave = &omap44xx_i2c2_hwmod,
2392 .clk = "l4_div_ck",
2393 .addr = omap44xx_i2c2_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302394 .user = OCP_USER_MPU | OCP_USER_SDMA,
2395};
2396
2397/* i2c2 slave ports */
2398static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2399 &omap44xx_l4_per__i2c2,
2400};
2401
2402static struct omap_hwmod omap44xx_i2c2_hwmod = {
2403 .name = "i2c2",
2404 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002405 .clkdm_name = "l4_per_clkdm",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05302406 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Benoit Coussonf7764712010-09-21 19:37:14 +05302407 .mpu_irqs = omap44xx_i2c2_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302408 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302409 .main_clk = "i2c2_fck",
2410 .prcm = {
2411 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002412 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002413 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002414 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302415 },
2416 },
2417 .slaves = omap44xx_i2c2_slaves,
2418 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002419 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302420};
2421
2422/* i2c3 */
2423static struct omap_hwmod omap44xx_i2c3_hwmod;
2424static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2425 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002426 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302427};
2428
2429static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2430 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2431 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002432 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302433};
2434
2435static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2436 {
2437 .pa_start = 0x48060000,
2438 .pa_end = 0x480600ff,
2439 .flags = ADDR_TYPE_RT
2440 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002441 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302442};
2443
2444/* l4_per -> i2c3 */
2445static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2446 .master = &omap44xx_l4_per_hwmod,
2447 .slave = &omap44xx_i2c3_hwmod,
2448 .clk = "l4_div_ck",
2449 .addr = omap44xx_i2c3_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302450 .user = OCP_USER_MPU | OCP_USER_SDMA,
2451};
2452
2453/* i2c3 slave ports */
2454static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2455 &omap44xx_l4_per__i2c3,
2456};
2457
2458static struct omap_hwmod omap44xx_i2c3_hwmod = {
2459 .name = "i2c3",
2460 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002461 .clkdm_name = "l4_per_clkdm",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05302462 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Benoit Coussonf7764712010-09-21 19:37:14 +05302463 .mpu_irqs = omap44xx_i2c3_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302464 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302465 .main_clk = "i2c3_fck",
2466 .prcm = {
2467 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002468 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002469 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002470 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302471 },
2472 },
2473 .slaves = omap44xx_i2c3_slaves,
2474 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002475 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302476};
2477
2478/* i2c4 */
2479static struct omap_hwmod omap44xx_i2c4_hwmod;
2480static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2481 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002482 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302483};
2484
2485static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2486 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2487 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002488 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302489};
2490
2491static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2492 {
2493 .pa_start = 0x48350000,
2494 .pa_end = 0x483500ff,
2495 .flags = ADDR_TYPE_RT
2496 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002497 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302498};
2499
2500/* l4_per -> i2c4 */
2501static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2502 .master = &omap44xx_l4_per_hwmod,
2503 .slave = &omap44xx_i2c4_hwmod,
2504 .clk = "l4_div_ck",
2505 .addr = omap44xx_i2c4_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302506 .user = OCP_USER_MPU | OCP_USER_SDMA,
2507};
2508
2509/* i2c4 slave ports */
2510static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2511 &omap44xx_l4_per__i2c4,
2512};
2513
2514static struct omap_hwmod omap44xx_i2c4_hwmod = {
2515 .name = "i2c4",
2516 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002517 .clkdm_name = "l4_per_clkdm",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05302518 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Benoit Coussonf7764712010-09-21 19:37:14 +05302519 .mpu_irqs = omap44xx_i2c4_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302520 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302521 .main_clk = "i2c4_fck",
2522 .prcm = {
2523 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002524 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002525 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002526 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302527 },
2528 },
2529 .slaves = omap44xx_i2c4_slaves,
2530 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002531 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302532};
2533
2534/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002535 * 'ipu' class
2536 * imaging processor unit
2537 */
2538
2539static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2540 .name = "ipu",
2541};
2542
2543/* ipu */
2544static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2545 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002546 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002547};
2548
2549static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2550 { .name = "cpu0", .rst_shift = 0 },
2551};
2552
2553static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2554 { .name = "cpu1", .rst_shift = 1 },
2555};
2556
2557static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2558 { .name = "mmu_cache", .rst_shift = 2 },
2559};
2560
2561/* ipu master ports */
2562static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2563 &omap44xx_ipu__l3_main_2,
2564};
2565
2566/* l3_main_2 -> ipu */
2567static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2568 .master = &omap44xx_l3_main_2_hwmod,
2569 .slave = &omap44xx_ipu_hwmod,
2570 .clk = "l3_div_ck",
2571 .user = OCP_USER_MPU | OCP_USER_SDMA,
2572};
2573
2574/* ipu slave ports */
2575static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2576 &omap44xx_l3_main_2__ipu,
2577};
2578
2579/* Pseudo hwmod for reset control purpose only */
2580static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2581 .name = "ipu_c0",
2582 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002583 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002584 .flags = HWMOD_INIT_NO_RESET,
2585 .rst_lines = omap44xx_ipu_c0_resets,
2586 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002587 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002588 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002589 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002590 },
2591 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002592};
2593
2594/* Pseudo hwmod for reset control purpose only */
2595static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2596 .name = "ipu_c1",
2597 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002598 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002599 .flags = HWMOD_INIT_NO_RESET,
2600 .rst_lines = omap44xx_ipu_c1_resets,
2601 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002602 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002603 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002604 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002605 },
2606 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002607};
2608
2609static struct omap_hwmod omap44xx_ipu_hwmod = {
2610 .name = "ipu",
2611 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002612 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002613 .mpu_irqs = omap44xx_ipu_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002614 .rst_lines = omap44xx_ipu_resets,
2615 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2616 .main_clk = "ipu_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002617 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002618 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002619 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002620 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002621 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002622 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002623 },
2624 },
2625 .slaves = omap44xx_ipu_slaves,
2626 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2627 .masters = omap44xx_ipu_masters,
2628 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002629};
2630
2631/*
2632 * 'iss' class
2633 * external images sensor pixel data processor
2634 */
2635
2636static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2637 .rev_offs = 0x0000,
2638 .sysc_offs = 0x0010,
Fernando Guzman Lugod99de7f2012-04-13 05:08:03 -06002639 /*
2640 * ISS needs 100 OCP clk cycles delay after a softreset before
2641 * accessing sysconfig again.
2642 * The lowest frequency at the moment for L3 bus is 100 MHz, so
2643 * 1usec delay is needed. Add an x2 margin to be safe (2 usecs).
2644 *
2645 * TODO: Indicate errata when available.
2646 */
2647 .srst_udelay = 2,
Benoit Cousson407a6882011-02-15 22:39:48 +01002648 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2649 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2650 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2651 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002652 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002653 .sysc_fields = &omap_hwmod_sysc_type2,
2654};
2655
2656static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2657 .name = "iss",
2658 .sysc = &omap44xx_iss_sysc,
2659};
2660
2661/* iss */
2662static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2663 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002664 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002665};
2666
2667static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2668 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2669 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2670 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2671 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002672 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002673};
2674
2675/* iss master ports */
2676static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2677 &omap44xx_iss__l3_main_2,
2678};
2679
2680static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2681 {
2682 .pa_start = 0x52000000,
2683 .pa_end = 0x520000ff,
2684 .flags = ADDR_TYPE_RT
2685 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002686 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002687};
2688
2689/* l3_main_2 -> iss */
2690static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2691 .master = &omap44xx_l3_main_2_hwmod,
2692 .slave = &omap44xx_iss_hwmod,
2693 .clk = "l3_div_ck",
2694 .addr = omap44xx_iss_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002695 .user = OCP_USER_MPU | OCP_USER_SDMA,
2696};
2697
2698/* iss slave ports */
2699static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2700 &omap44xx_l3_main_2__iss,
2701};
2702
2703static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2704 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2705};
2706
2707static struct omap_hwmod omap44xx_iss_hwmod = {
2708 .name = "iss",
2709 .class = &omap44xx_iss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002710 .clkdm_name = "iss_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002711 .mpu_irqs = omap44xx_iss_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002712 .sdma_reqs = omap44xx_iss_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002713 .main_clk = "iss_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002714 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002715 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002716 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002717 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002718 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002719 },
2720 },
2721 .opt_clks = iss_opt_clks,
2722 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2723 .slaves = omap44xx_iss_slaves,
2724 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2725 .masters = omap44xx_iss_masters,
2726 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002727};
2728
2729/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002730 * 'iva' class
2731 * multi-standard video encoder/decoder hardware accelerator
2732 */
2733
2734static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002735 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002736};
2737
2738/* iva */
2739static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2740 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2741 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2742 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002743 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002744};
2745
2746static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2747 { .name = "logic", .rst_shift = 2 },
2748};
2749
2750static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2751 { .name = "seq0", .rst_shift = 0 },
2752};
2753
2754static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2755 { .name = "seq1", .rst_shift = 1 },
2756};
2757
2758/* iva master ports */
2759static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2760 &omap44xx_iva__l3_main_2,
2761 &omap44xx_iva__l3_instr,
2762};
2763
2764static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2765 {
2766 .pa_start = 0x5a000000,
2767 .pa_end = 0x5a07ffff,
2768 .flags = ADDR_TYPE_RT
2769 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002770 { }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002771};
2772
2773/* l3_main_2 -> iva */
2774static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2775 .master = &omap44xx_l3_main_2_hwmod,
2776 .slave = &omap44xx_iva_hwmod,
2777 .clk = "l3_div_ck",
2778 .addr = omap44xx_iva_addrs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002779 .user = OCP_USER_MPU,
2780};
2781
2782/* iva slave ports */
2783static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2784 &omap44xx_dsp__iva,
2785 &omap44xx_l3_main_2__iva,
2786};
2787
2788/* Pseudo hwmod for reset control purpose only */
2789static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2790 .name = "iva_seq0",
2791 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002792 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002793 .flags = HWMOD_INIT_NO_RESET,
2794 .rst_lines = omap44xx_iva_seq0_resets,
2795 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2796 .prcm = {
2797 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002798 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002799 },
2800 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002801};
2802
2803/* Pseudo hwmod for reset control purpose only */
2804static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2805 .name = "iva_seq1",
2806 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002807 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002808 .flags = HWMOD_INIT_NO_RESET,
2809 .rst_lines = omap44xx_iva_seq1_resets,
2810 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2811 .prcm = {
2812 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002813 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002814 },
2815 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002816};
2817
2818static struct omap_hwmod omap44xx_iva_hwmod = {
2819 .name = "iva",
2820 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002821 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002822 .mpu_irqs = omap44xx_iva_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002823 .rst_lines = omap44xx_iva_resets,
2824 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2825 .main_clk = "iva_fck",
2826 .prcm = {
2827 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002828 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002829 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002830 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002831 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002832 },
2833 },
2834 .slaves = omap44xx_iva_slaves,
2835 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2836 .masters = omap44xx_iva_masters,
2837 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002838};
2839
2840/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002841 * 'kbd' class
2842 * keyboard controller
2843 */
2844
2845static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2846 .rev_offs = 0x0000,
2847 .sysc_offs = 0x0010,
2848 .syss_offs = 0x0014,
2849 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2850 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2851 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2852 SYSS_HAS_RESET_STATUS),
2853 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2854 .sysc_fields = &omap_hwmod_sysc_type1,
2855};
2856
2857static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2858 .name = "kbd",
2859 .sysc = &omap44xx_kbd_sysc,
2860};
2861
2862/* kbd */
2863static struct omap_hwmod omap44xx_kbd_hwmod;
2864static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2865 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002866 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002867};
2868
2869static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2870 {
2871 .pa_start = 0x4a31c000,
2872 .pa_end = 0x4a31c07f,
2873 .flags = ADDR_TYPE_RT
2874 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002875 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002876};
2877
2878/* l4_wkup -> kbd */
2879static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2880 .master = &omap44xx_l4_wkup_hwmod,
2881 .slave = &omap44xx_kbd_hwmod,
2882 .clk = "l4_wkup_clk_mux_ck",
2883 .addr = omap44xx_kbd_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002884 .user = OCP_USER_MPU | OCP_USER_SDMA,
2885};
2886
2887/* kbd slave ports */
2888static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2889 &omap44xx_l4_wkup__kbd,
2890};
2891
2892static struct omap_hwmod omap44xx_kbd_hwmod = {
2893 .name = "kbd",
2894 .class = &omap44xx_kbd_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002895 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002896 .mpu_irqs = omap44xx_kbd_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002897 .main_clk = "kbd_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002898 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002899 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002900 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002901 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002902 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002903 },
2904 },
2905 .slaves = omap44xx_kbd_slaves,
2906 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01002907};
2908
2909/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002910 * 'mailbox' class
2911 * mailbox module allowing communication between the on-chip processors using a
2912 * queued mailbox-interrupt mechanism.
2913 */
2914
2915static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2916 .rev_offs = 0x0000,
2917 .sysc_offs = 0x0010,
2918 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2919 SYSC_HAS_SOFTRESET),
2920 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2921 .sysc_fields = &omap_hwmod_sysc_type2,
2922};
2923
2924static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2925 .name = "mailbox",
2926 .sysc = &omap44xx_mailbox_sysc,
2927};
2928
2929/* mailbox */
2930static struct omap_hwmod omap44xx_mailbox_hwmod;
2931static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2932 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002933 { .irq = -1 }
Benoit Coussonec5df922011-02-02 19:27:21 +00002934};
2935
2936static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2937 {
2938 .pa_start = 0x4a0f4000,
2939 .pa_end = 0x4a0f41ff,
2940 .flags = ADDR_TYPE_RT
2941 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002942 { }
Benoit Coussonec5df922011-02-02 19:27:21 +00002943};
2944
2945/* l4_cfg -> mailbox */
2946static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2947 .master = &omap44xx_l4_cfg_hwmod,
2948 .slave = &omap44xx_mailbox_hwmod,
2949 .clk = "l4_div_ck",
2950 .addr = omap44xx_mailbox_addrs,
Benoit Coussonec5df922011-02-02 19:27:21 +00002951 .user = OCP_USER_MPU | OCP_USER_SDMA,
2952};
2953
2954/* mailbox slave ports */
2955static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2956 &omap44xx_l4_cfg__mailbox,
2957};
2958
2959static struct omap_hwmod omap44xx_mailbox_hwmod = {
2960 .name = "mailbox",
2961 .class = &omap44xx_mailbox_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002962 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussonec5df922011-02-02 19:27:21 +00002963 .mpu_irqs = omap44xx_mailbox_irqs,
Benoit Cousson00fe6102011-07-09 19:14:28 -06002964 .prcm = {
Benoit Coussonec5df922011-02-02 19:27:21 +00002965 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002966 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002967 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
Benoit Coussonec5df922011-02-02 19:27:21 +00002968 },
2969 },
2970 .slaves = omap44xx_mailbox_slaves,
2971 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
Benoit Coussonec5df922011-02-02 19:27:21 +00002972};
2973
2974/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002975 * 'mcbsp' class
2976 * multi channel buffered serial port controller
2977 */
2978
2979static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2980 .sysc_offs = 0x008c,
2981 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2982 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2983 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2984 .sysc_fields = &omap_hwmod_sysc_type1,
2985};
2986
2987static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2988 .name = "mcbsp",
2989 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302990 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002991};
2992
2993/* mcbsp1 */
2994static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2995static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2996 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002997 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002998};
2999
3000static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
3001 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
3002 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003003 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003004};
3005
3006static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
3007 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303008 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003009 .pa_start = 0x40122000,
3010 .pa_end = 0x401220ff,
3011 .flags = ADDR_TYPE_RT
3012 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003013 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003014};
3015
3016/* l4_abe -> mcbsp1 */
3017static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
3018 .master = &omap44xx_l4_abe_hwmod,
3019 .slave = &omap44xx_mcbsp1_hwmod,
3020 .clk = "ocp_abe_iclk",
3021 .addr = omap44xx_mcbsp1_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003022 .user = OCP_USER_MPU,
3023};
3024
3025static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
3026 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303027 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003028 .pa_start = 0x49022000,
3029 .pa_end = 0x490220ff,
3030 .flags = ADDR_TYPE_RT
3031 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003032 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003033};
3034
3035/* l4_abe -> mcbsp1 (dma) */
3036static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
3037 .master = &omap44xx_l4_abe_hwmod,
3038 .slave = &omap44xx_mcbsp1_hwmod,
3039 .clk = "ocp_abe_iclk",
3040 .addr = omap44xx_mcbsp1_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003041 .user = OCP_USER_SDMA,
3042};
3043
3044/* mcbsp1 slave ports */
3045static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
3046 &omap44xx_l4_abe__mcbsp1,
3047 &omap44xx_l4_abe__mcbsp1_dma,
3048};
3049
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003050static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
3051 { .role = "pad_fck", .clk = "pad_clks_ck" },
3052 { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" },
3053};
3054
Benoit Cousson4ddff492011-01-31 14:50:30 +00003055static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
3056 .name = "mcbsp1",
3057 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003058 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003059 .mpu_irqs = omap44xx_mcbsp1_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003060 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003061 .main_clk = "mcbsp1_fck",
3062 .prcm = {
3063 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003064 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003065 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003066 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003067 },
3068 },
3069 .slaves = omap44xx_mcbsp1_slaves,
3070 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003071 .opt_clks = mcbsp1_opt_clks,
3072 .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003073};
3074
3075/* mcbsp2 */
3076static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3077static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3078 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003079 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003080};
3081
3082static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3083 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
3084 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003085 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003086};
3087
3088static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3089 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303090 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003091 .pa_start = 0x40124000,
3092 .pa_end = 0x401240ff,
3093 .flags = ADDR_TYPE_RT
3094 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003095 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003096};
3097
3098/* l4_abe -> mcbsp2 */
3099static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3100 .master = &omap44xx_l4_abe_hwmod,
3101 .slave = &omap44xx_mcbsp2_hwmod,
3102 .clk = "ocp_abe_iclk",
3103 .addr = omap44xx_mcbsp2_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003104 .user = OCP_USER_MPU,
3105};
3106
3107static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3108 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303109 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003110 .pa_start = 0x49024000,
3111 .pa_end = 0x490240ff,
3112 .flags = ADDR_TYPE_RT
3113 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003114 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003115};
3116
3117/* l4_abe -> mcbsp2 (dma) */
3118static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3119 .master = &omap44xx_l4_abe_hwmod,
3120 .slave = &omap44xx_mcbsp2_hwmod,
3121 .clk = "ocp_abe_iclk",
3122 .addr = omap44xx_mcbsp2_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003123 .user = OCP_USER_SDMA,
3124};
3125
3126/* mcbsp2 slave ports */
3127static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3128 &omap44xx_l4_abe__mcbsp2,
3129 &omap44xx_l4_abe__mcbsp2_dma,
3130};
3131
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003132static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
3133 { .role = "pad_fck", .clk = "pad_clks_ck" },
3134 { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" },
3135};
3136
Benoit Cousson4ddff492011-01-31 14:50:30 +00003137static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3138 .name = "mcbsp2",
3139 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003140 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003141 .mpu_irqs = omap44xx_mcbsp2_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003142 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003143 .main_clk = "mcbsp2_fck",
3144 .prcm = {
3145 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003146 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003147 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003148 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003149 },
3150 },
3151 .slaves = omap44xx_mcbsp2_slaves,
3152 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003153 .opt_clks = mcbsp2_opt_clks,
3154 .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003155};
3156
3157/* mcbsp3 */
3158static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3159static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3160 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003161 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003162};
3163
3164static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3165 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
3166 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003167 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003168};
3169
3170static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3171 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303172 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003173 .pa_start = 0x40126000,
3174 .pa_end = 0x401260ff,
3175 .flags = ADDR_TYPE_RT
3176 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003177 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003178};
3179
3180/* l4_abe -> mcbsp3 */
3181static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3182 .master = &omap44xx_l4_abe_hwmod,
3183 .slave = &omap44xx_mcbsp3_hwmod,
3184 .clk = "ocp_abe_iclk",
3185 .addr = omap44xx_mcbsp3_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003186 .user = OCP_USER_MPU,
3187};
3188
3189static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3190 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303191 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003192 .pa_start = 0x49026000,
3193 .pa_end = 0x490260ff,
3194 .flags = ADDR_TYPE_RT
3195 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003196 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003197};
3198
3199/* l4_abe -> mcbsp3 (dma) */
3200static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3201 .master = &omap44xx_l4_abe_hwmod,
3202 .slave = &omap44xx_mcbsp3_hwmod,
3203 .clk = "ocp_abe_iclk",
3204 .addr = omap44xx_mcbsp3_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003205 .user = OCP_USER_SDMA,
3206};
3207
3208/* mcbsp3 slave ports */
3209static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3210 &omap44xx_l4_abe__mcbsp3,
3211 &omap44xx_l4_abe__mcbsp3_dma,
3212};
3213
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003214static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
3215 { .role = "pad_fck", .clk = "pad_clks_ck" },
3216 { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" },
3217};
3218
Benoit Cousson4ddff492011-01-31 14:50:30 +00003219static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3220 .name = "mcbsp3",
3221 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003222 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003223 .mpu_irqs = omap44xx_mcbsp3_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003224 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003225 .main_clk = "mcbsp3_fck",
3226 .prcm = {
3227 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003228 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003229 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003230 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003231 },
3232 },
3233 .slaves = omap44xx_mcbsp3_slaves,
3234 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003235 .opt_clks = mcbsp3_opt_clks,
3236 .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003237};
3238
3239/* mcbsp4 */
3240static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3241static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3242 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003243 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003244};
3245
3246static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3247 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3248 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003249 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003250};
3251
3252static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3253 {
3254 .pa_start = 0x48096000,
3255 .pa_end = 0x480960ff,
3256 .flags = ADDR_TYPE_RT
3257 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003258 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003259};
3260
3261/* l4_per -> mcbsp4 */
3262static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3263 .master = &omap44xx_l4_per_hwmod,
3264 .slave = &omap44xx_mcbsp4_hwmod,
3265 .clk = "l4_div_ck",
3266 .addr = omap44xx_mcbsp4_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003267 .user = OCP_USER_MPU | OCP_USER_SDMA,
3268};
3269
3270/* mcbsp4 slave ports */
3271static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3272 &omap44xx_l4_per__mcbsp4,
3273};
3274
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003275static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = {
3276 { .role = "pad_fck", .clk = "pad_clks_ck" },
3277 { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" },
3278};
3279
Benoit Cousson4ddff492011-01-31 14:50:30 +00003280static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3281 .name = "mcbsp4",
3282 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003283 .clkdm_name = "l4_per_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003284 .mpu_irqs = omap44xx_mcbsp4_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003285 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003286 .main_clk = "mcbsp4_fck",
3287 .prcm = {
3288 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003289 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003290 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003291 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003292 },
3293 },
3294 .slaves = omap44xx_mcbsp4_slaves,
3295 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
Paul Walmsley503d0ea2012-04-04 09:11:48 -06003296 .opt_clks = mcbsp4_opt_clks,
3297 .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003298};
3299
3300/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003301 * 'mcpdm' class
3302 * multi channel pdm controller (proprietary interface with phoenix power
3303 * ic)
3304 */
3305
3306static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3307 .rev_offs = 0x0000,
3308 .sysc_offs = 0x0010,
3309 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3310 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3311 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3312 SIDLE_SMART_WKUP),
3313 .sysc_fields = &omap_hwmod_sysc_type2,
3314};
3315
3316static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3317 .name = "mcpdm",
3318 .sysc = &omap44xx_mcpdm_sysc,
3319};
3320
3321/* mcpdm */
3322static struct omap_hwmod omap44xx_mcpdm_hwmod;
3323static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3324 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003325 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003326};
3327
3328static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3329 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3330 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003331 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003332};
3333
3334static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3335 {
3336 .pa_start = 0x40132000,
3337 .pa_end = 0x4013207f,
3338 .flags = ADDR_TYPE_RT
3339 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003340 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003341};
3342
3343/* l4_abe -> mcpdm */
3344static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3345 .master = &omap44xx_l4_abe_hwmod,
3346 .slave = &omap44xx_mcpdm_hwmod,
3347 .clk = "ocp_abe_iclk",
3348 .addr = omap44xx_mcpdm_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003349 .user = OCP_USER_MPU,
3350};
3351
3352static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3353 {
3354 .pa_start = 0x49032000,
3355 .pa_end = 0x4903207f,
3356 .flags = ADDR_TYPE_RT
3357 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003358 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003359};
3360
3361/* l4_abe -> mcpdm (dma) */
3362static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3363 .master = &omap44xx_l4_abe_hwmod,
3364 .slave = &omap44xx_mcpdm_hwmod,
3365 .clk = "ocp_abe_iclk",
3366 .addr = omap44xx_mcpdm_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003367 .user = OCP_USER_SDMA,
3368};
3369
3370/* mcpdm slave ports */
3371static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3372 &omap44xx_l4_abe__mcpdm,
3373 &omap44xx_l4_abe__mcpdm_dma,
3374};
3375
3376static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3377 .name = "mcpdm",
3378 .class = &omap44xx_mcpdm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003379 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003380 .mpu_irqs = omap44xx_mcpdm_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003381 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003382 .main_clk = "mcpdm_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003383 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003384 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003385 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003386 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003387 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003388 },
3389 },
3390 .slaves = omap44xx_mcpdm_slaves,
3391 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003392};
3393
3394/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303395 * 'mcspi' class
3396 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3397 * bus
3398 */
3399
3400static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3401 .rev_offs = 0x0000,
3402 .sysc_offs = 0x0010,
3403 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3404 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3405 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3406 SIDLE_SMART_WKUP),
3407 .sysc_fields = &omap_hwmod_sysc_type2,
3408};
3409
3410static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3411 .name = "mcspi",
3412 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003413 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303414};
3415
3416/* mcspi1 */
3417static struct omap_hwmod omap44xx_mcspi1_hwmod;
3418static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3419 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003420 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303421};
3422
3423static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3424 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3425 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3426 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3427 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3428 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3429 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3430 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3431 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003432 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303433};
3434
3435static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3436 {
3437 .pa_start = 0x48098000,
3438 .pa_end = 0x480981ff,
3439 .flags = ADDR_TYPE_RT
3440 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003441 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303442};
3443
3444/* l4_per -> mcspi1 */
3445static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3446 .master = &omap44xx_l4_per_hwmod,
3447 .slave = &omap44xx_mcspi1_hwmod,
3448 .clk = "l4_div_ck",
3449 .addr = omap44xx_mcspi1_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303450 .user = OCP_USER_MPU | OCP_USER_SDMA,
3451};
3452
3453/* mcspi1 slave ports */
3454static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3455 &omap44xx_l4_per__mcspi1,
3456};
3457
Benoit Cousson905a74d2011-02-18 14:01:06 +01003458/* mcspi1 dev_attr */
3459static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3460 .num_chipselect = 4,
3461};
3462
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303463static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3464 .name = "mcspi1",
3465 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003466 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303467 .mpu_irqs = omap44xx_mcspi1_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303468 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303469 .main_clk = "mcspi1_fck",
3470 .prcm = {
3471 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003472 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003473 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003474 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303475 },
3476 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003477 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303478 .slaves = omap44xx_mcspi1_slaves,
3479 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303480};
3481
3482/* mcspi2 */
3483static struct omap_hwmod omap44xx_mcspi2_hwmod;
3484static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3485 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003486 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303487};
3488
3489static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3490 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3491 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3492 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3493 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003494 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303495};
3496
3497static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3498 {
3499 .pa_start = 0x4809a000,
3500 .pa_end = 0x4809a1ff,
3501 .flags = ADDR_TYPE_RT
3502 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003503 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303504};
3505
3506/* l4_per -> mcspi2 */
3507static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3508 .master = &omap44xx_l4_per_hwmod,
3509 .slave = &omap44xx_mcspi2_hwmod,
3510 .clk = "l4_div_ck",
3511 .addr = omap44xx_mcspi2_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303512 .user = OCP_USER_MPU | OCP_USER_SDMA,
3513};
3514
3515/* mcspi2 slave ports */
3516static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3517 &omap44xx_l4_per__mcspi2,
3518};
3519
Benoit Cousson905a74d2011-02-18 14:01:06 +01003520/* mcspi2 dev_attr */
3521static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3522 .num_chipselect = 2,
3523};
3524
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303525static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3526 .name = "mcspi2",
3527 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003528 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303529 .mpu_irqs = omap44xx_mcspi2_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303530 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303531 .main_clk = "mcspi2_fck",
3532 .prcm = {
3533 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003534 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003535 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003536 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303537 },
3538 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003539 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303540 .slaves = omap44xx_mcspi2_slaves,
3541 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303542};
3543
3544/* mcspi3 */
3545static struct omap_hwmod omap44xx_mcspi3_hwmod;
3546static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3547 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003548 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303549};
3550
3551static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3552 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3553 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3554 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3555 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003556 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303557};
3558
3559static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3560 {
3561 .pa_start = 0x480b8000,
3562 .pa_end = 0x480b81ff,
3563 .flags = ADDR_TYPE_RT
3564 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003565 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303566};
3567
3568/* l4_per -> mcspi3 */
3569static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3570 .master = &omap44xx_l4_per_hwmod,
3571 .slave = &omap44xx_mcspi3_hwmod,
3572 .clk = "l4_div_ck",
3573 .addr = omap44xx_mcspi3_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303574 .user = OCP_USER_MPU | OCP_USER_SDMA,
3575};
3576
3577/* mcspi3 slave ports */
3578static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3579 &omap44xx_l4_per__mcspi3,
3580};
3581
Benoit Cousson905a74d2011-02-18 14:01:06 +01003582/* mcspi3 dev_attr */
3583static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3584 .num_chipselect = 2,
3585};
3586
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303587static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3588 .name = "mcspi3",
3589 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003590 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303591 .mpu_irqs = omap44xx_mcspi3_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303592 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303593 .main_clk = "mcspi3_fck",
3594 .prcm = {
3595 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003596 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003597 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003598 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303599 },
3600 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003601 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303602 .slaves = omap44xx_mcspi3_slaves,
3603 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303604};
3605
3606/* mcspi4 */
3607static struct omap_hwmod omap44xx_mcspi4_hwmod;
3608static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3609 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003610 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303611};
3612
3613static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3614 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3615 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003616 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303617};
3618
3619static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3620 {
3621 .pa_start = 0x480ba000,
3622 .pa_end = 0x480ba1ff,
3623 .flags = ADDR_TYPE_RT
3624 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003625 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303626};
3627
3628/* l4_per -> mcspi4 */
3629static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3630 .master = &omap44xx_l4_per_hwmod,
3631 .slave = &omap44xx_mcspi4_hwmod,
3632 .clk = "l4_div_ck",
3633 .addr = omap44xx_mcspi4_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303634 .user = OCP_USER_MPU | OCP_USER_SDMA,
3635};
3636
3637/* mcspi4 slave ports */
3638static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3639 &omap44xx_l4_per__mcspi4,
3640};
3641
Benoit Cousson905a74d2011-02-18 14:01:06 +01003642/* mcspi4 dev_attr */
3643static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3644 .num_chipselect = 1,
3645};
3646
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303647static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3648 .name = "mcspi4",
3649 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003650 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303651 .mpu_irqs = omap44xx_mcspi4_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303652 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303653 .main_clk = "mcspi4_fck",
3654 .prcm = {
3655 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003656 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003657 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003658 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303659 },
3660 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003661 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303662 .slaves = omap44xx_mcspi4_slaves,
3663 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303664};
3665
3666/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003667 * 'mmc' class
3668 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3669 */
3670
3671static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3672 .rev_offs = 0x0000,
3673 .sysc_offs = 0x0010,
3674 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3675 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3676 SYSC_HAS_SOFTRESET),
3677 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3678 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02003679 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01003680 .sysc_fields = &omap_hwmod_sysc_type2,
3681};
3682
3683static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3684 .name = "mmc",
3685 .sysc = &omap44xx_mmc_sysc,
3686};
3687
3688/* mmc1 */
3689static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3690 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003691 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003692};
3693
3694static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3695 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3696 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003697 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003698};
3699
3700/* mmc1 master ports */
3701static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3702 &omap44xx_mmc1__l3_main_1,
3703};
3704
3705static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3706 {
3707 .pa_start = 0x4809c000,
3708 .pa_end = 0x4809c3ff,
3709 .flags = ADDR_TYPE_RT
3710 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003711 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003712};
3713
3714/* l4_per -> mmc1 */
3715static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3716 .master = &omap44xx_l4_per_hwmod,
3717 .slave = &omap44xx_mmc1_hwmod,
3718 .clk = "l4_div_ck",
3719 .addr = omap44xx_mmc1_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003720 .user = OCP_USER_MPU | OCP_USER_SDMA,
3721};
3722
3723/* mmc1 slave ports */
3724static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3725 &omap44xx_l4_per__mmc1,
3726};
3727
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003728/* mmc1 dev_attr */
3729static struct omap_mmc_dev_attr mmc1_dev_attr = {
3730 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3731};
3732
Benoit Cousson407a6882011-02-15 22:39:48 +01003733static struct omap_hwmod omap44xx_mmc1_hwmod = {
3734 .name = "mmc1",
3735 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003736 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003737 .mpu_irqs = omap44xx_mmc1_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003738 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003739 .main_clk = "mmc1_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003740 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003741 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003742 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003743 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003744 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003745 },
3746 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003747 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003748 .slaves = omap44xx_mmc1_slaves,
3749 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3750 .masters = omap44xx_mmc1_masters,
3751 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003752};
3753
3754/* mmc2 */
3755static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3756 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003757 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003758};
3759
3760static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3761 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3762 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003763 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003764};
3765
3766/* mmc2 master ports */
3767static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3768 &omap44xx_mmc2__l3_main_1,
3769};
3770
3771static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3772 {
3773 .pa_start = 0x480b4000,
3774 .pa_end = 0x480b43ff,
3775 .flags = ADDR_TYPE_RT
3776 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003777 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003778};
3779
3780/* l4_per -> mmc2 */
3781static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3782 .master = &omap44xx_l4_per_hwmod,
3783 .slave = &omap44xx_mmc2_hwmod,
3784 .clk = "l4_div_ck",
3785 .addr = omap44xx_mmc2_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003786 .user = OCP_USER_MPU | OCP_USER_SDMA,
3787};
3788
3789/* mmc2 slave ports */
3790static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3791 &omap44xx_l4_per__mmc2,
3792};
3793
3794static struct omap_hwmod omap44xx_mmc2_hwmod = {
3795 .name = "mmc2",
3796 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003797 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003798 .mpu_irqs = omap44xx_mmc2_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003799 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003800 .main_clk = "mmc2_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003801 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003802 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003803 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003804 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003805 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003806 },
3807 },
3808 .slaves = omap44xx_mmc2_slaves,
3809 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3810 .masters = omap44xx_mmc2_masters,
3811 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003812};
3813
3814/* mmc3 */
3815static struct omap_hwmod omap44xx_mmc3_hwmod;
3816static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3817 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003818 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003819};
3820
3821static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3822 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3823 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003824 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003825};
3826
3827static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3828 {
3829 .pa_start = 0x480ad000,
3830 .pa_end = 0x480ad3ff,
3831 .flags = ADDR_TYPE_RT
3832 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003833 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003834};
3835
3836/* l4_per -> mmc3 */
3837static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3838 .master = &omap44xx_l4_per_hwmod,
3839 .slave = &omap44xx_mmc3_hwmod,
3840 .clk = "l4_div_ck",
3841 .addr = omap44xx_mmc3_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003842 .user = OCP_USER_MPU | OCP_USER_SDMA,
3843};
3844
3845/* mmc3 slave ports */
3846static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3847 &omap44xx_l4_per__mmc3,
3848};
3849
3850static struct omap_hwmod omap44xx_mmc3_hwmod = {
3851 .name = "mmc3",
3852 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003853 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003854 .mpu_irqs = omap44xx_mmc3_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003855 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003856 .main_clk = "mmc3_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003857 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003858 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003859 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003860 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003861 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003862 },
3863 },
3864 .slaves = omap44xx_mmc3_slaves,
3865 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003866};
3867
3868/* mmc4 */
3869static struct omap_hwmod omap44xx_mmc4_hwmod;
3870static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3871 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003872 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003873};
3874
3875static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3876 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3877 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003878 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003879};
3880
3881static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3882 {
3883 .pa_start = 0x480d1000,
3884 .pa_end = 0x480d13ff,
3885 .flags = ADDR_TYPE_RT
3886 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003887 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003888};
3889
3890/* l4_per -> mmc4 */
3891static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3892 .master = &omap44xx_l4_per_hwmod,
3893 .slave = &omap44xx_mmc4_hwmod,
3894 .clk = "l4_div_ck",
3895 .addr = omap44xx_mmc4_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003896 .user = OCP_USER_MPU | OCP_USER_SDMA,
3897};
3898
3899/* mmc4 slave ports */
3900static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3901 &omap44xx_l4_per__mmc4,
3902};
3903
3904static struct omap_hwmod omap44xx_mmc4_hwmod = {
3905 .name = "mmc4",
3906 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003907 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003908 .mpu_irqs = omap44xx_mmc4_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003909
Benoit Cousson407a6882011-02-15 22:39:48 +01003910 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003911 .main_clk = "mmc4_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003912 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003913 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003914 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003915 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003916 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003917 },
3918 },
3919 .slaves = omap44xx_mmc4_slaves,
3920 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003921};
3922
3923/* mmc5 */
3924static struct omap_hwmod omap44xx_mmc5_hwmod;
3925static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3926 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003927 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003928};
3929
3930static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3931 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3932 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003933 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003934};
3935
3936static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3937 {
3938 .pa_start = 0x480d5000,
3939 .pa_end = 0x480d53ff,
3940 .flags = ADDR_TYPE_RT
3941 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003942 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003943};
3944
3945/* l4_per -> mmc5 */
3946static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3947 .master = &omap44xx_l4_per_hwmod,
3948 .slave = &omap44xx_mmc5_hwmod,
3949 .clk = "l4_div_ck",
3950 .addr = omap44xx_mmc5_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003951 .user = OCP_USER_MPU | OCP_USER_SDMA,
3952};
3953
3954/* mmc5 slave ports */
3955static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3956 &omap44xx_l4_per__mmc5,
3957};
3958
3959static struct omap_hwmod omap44xx_mmc5_hwmod = {
3960 .name = "mmc5",
3961 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003962 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003963 .mpu_irqs = omap44xx_mmc5_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003964 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003965 .main_clk = "mmc5_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003966 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003967 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003968 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003969 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003970 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003971 },
3972 },
3973 .slaves = omap44xx_mmc5_slaves,
3974 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003975};
3976
3977/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003978 * 'mpu' class
3979 * mpu sub-system
3980 */
3981
3982static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003983 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003984};
3985
3986/* mpu */
3987static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3988 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3989 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3990 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003991 { .irq = -1 }
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003992};
3993
3994/* mpu master ports */
3995static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3996 &omap44xx_mpu__l3_main_1,
3997 &omap44xx_mpu__l4_abe,
3998 &omap44xx_mpu__dmm,
3999};
4000
4001static struct omap_hwmod omap44xx_mpu_hwmod = {
4002 .name = "mpu",
4003 .class = &omap44xx_mpu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004004 .clkdm_name = "mpuss_clkdm",
Benoit Cousson7ecc5372011-07-09 19:14:28 -06004005 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02004006 .mpu_irqs = omap44xx_mpu_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02004007 .main_clk = "dpll_mpu_m2_ck",
4008 .prcm = {
4009 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004010 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004011 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02004012 },
4013 },
4014 .masters = omap44xx_mpu_masters,
4015 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
Benoit Cousson55d2cb02010-05-12 17:54:36 +02004016};
4017
Benoit Cousson92b18d12010-09-23 20:02:41 +05304018/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004019 * 'smartreflex' class
4020 * smartreflex module (monitor silicon performance and outputs a measure of
4021 * performance error)
4022 */
4023
4024/* The IP is not compliant to type1 / type2 scheme */
4025static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
4026 .sidle_shift = 24,
4027 .enwkup_shift = 26,
4028};
4029
4030static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
4031 .sysc_offs = 0x0038,
4032 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
4033 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4034 SIDLE_SMART_WKUP),
4035 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
4036};
4037
4038static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004039 .name = "smartreflex",
4040 .sysc = &omap44xx_smartreflex_sysc,
4041 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004042};
4043
4044/* smartreflex_core */
Shweta Gulaticea6b942012-02-29 23:33:37 +01004045static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = {
4046 .sensor_voltdm_name = "core",
4047};
4048
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004049static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
4050static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
4051 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004052 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004053};
4054
4055static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
4056 {
4057 .pa_start = 0x4a0dd000,
4058 .pa_end = 0x4a0dd03f,
4059 .flags = ADDR_TYPE_RT
4060 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004061 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004062};
4063
4064/* l4_cfg -> smartreflex_core */
4065static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
4066 .master = &omap44xx_l4_cfg_hwmod,
4067 .slave = &omap44xx_smartreflex_core_hwmod,
4068 .clk = "l4_div_ck",
4069 .addr = omap44xx_smartreflex_core_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004070 .user = OCP_USER_MPU | OCP_USER_SDMA,
4071};
4072
4073/* smartreflex_core slave ports */
4074static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
4075 &omap44xx_l4_cfg__smartreflex_core,
4076};
4077
4078static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
4079 .name = "smartreflex_core",
4080 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004081 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004082 .mpu_irqs = omap44xx_smartreflex_core_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004083
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004084 .main_clk = "smartreflex_core_fck",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004085 .prcm = {
4086 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004087 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004088 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004089 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004090 },
4091 },
4092 .slaves = omap44xx_smartreflex_core_slaves,
4093 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01004094 .dev_attr = &smartreflex_core_dev_attr,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004095};
4096
4097/* smartreflex_iva */
Shweta Gulaticea6b942012-02-29 23:33:37 +01004098static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = {
4099 .sensor_voltdm_name = "iva",
4100};
4101
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004102static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4103static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4104 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004105 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004106};
4107
4108static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4109 {
4110 .pa_start = 0x4a0db000,
4111 .pa_end = 0x4a0db03f,
4112 .flags = ADDR_TYPE_RT
4113 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004114 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004115};
4116
4117/* l4_cfg -> smartreflex_iva */
4118static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4119 .master = &omap44xx_l4_cfg_hwmod,
4120 .slave = &omap44xx_smartreflex_iva_hwmod,
4121 .clk = "l4_div_ck",
4122 .addr = omap44xx_smartreflex_iva_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004123 .user = OCP_USER_MPU | OCP_USER_SDMA,
4124};
4125
4126/* smartreflex_iva slave ports */
4127static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4128 &omap44xx_l4_cfg__smartreflex_iva,
4129};
4130
4131static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4132 .name = "smartreflex_iva",
4133 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004134 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004135 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004136 .main_clk = "smartreflex_iva_fck",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004137 .prcm = {
4138 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004139 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004140 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004141 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004142 },
4143 },
4144 .slaves = omap44xx_smartreflex_iva_slaves,
4145 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01004146 .dev_attr = &smartreflex_iva_dev_attr,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004147};
4148
4149/* smartreflex_mpu */
Shweta Gulaticea6b942012-02-29 23:33:37 +01004150static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = {
4151 .sensor_voltdm_name = "mpu",
4152};
4153
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004154static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4155static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4156 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004157 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004158};
4159
4160static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4161 {
4162 .pa_start = 0x4a0d9000,
4163 .pa_end = 0x4a0d903f,
4164 .flags = ADDR_TYPE_RT
4165 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004166 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004167};
4168
4169/* l4_cfg -> smartreflex_mpu */
4170static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4171 .master = &omap44xx_l4_cfg_hwmod,
4172 .slave = &omap44xx_smartreflex_mpu_hwmod,
4173 .clk = "l4_div_ck",
4174 .addr = omap44xx_smartreflex_mpu_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004175 .user = OCP_USER_MPU | OCP_USER_SDMA,
4176};
4177
4178/* smartreflex_mpu slave ports */
4179static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4180 &omap44xx_l4_cfg__smartreflex_mpu,
4181};
4182
4183static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4184 .name = "smartreflex_mpu",
4185 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004186 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004187 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004188 .main_clk = "smartreflex_mpu_fck",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004189 .prcm = {
4190 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004191 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004192 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004193 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004194 },
4195 },
4196 .slaves = omap44xx_smartreflex_mpu_slaves,
4197 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01004198 .dev_attr = &smartreflex_mpu_dev_attr,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004199};
4200
4201/*
Benoit Coussond11c2172011-02-02 12:04:36 +00004202 * 'spinlock' class
4203 * spinlock provides hardware assistance for synchronizing the processes
4204 * running on multiple processors
4205 */
4206
4207static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
4208 .rev_offs = 0x0000,
4209 .sysc_offs = 0x0010,
4210 .syss_offs = 0x0014,
4211 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4212 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
4213 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4214 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4215 SIDLE_SMART_WKUP),
4216 .sysc_fields = &omap_hwmod_sysc_type1,
4217};
4218
4219static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4220 .name = "spinlock",
4221 .sysc = &omap44xx_spinlock_sysc,
4222};
4223
4224/* spinlock */
4225static struct omap_hwmod omap44xx_spinlock_hwmod;
4226static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4227 {
4228 .pa_start = 0x4a0f6000,
4229 .pa_end = 0x4a0f6fff,
4230 .flags = ADDR_TYPE_RT
4231 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004232 { }
Benoit Coussond11c2172011-02-02 12:04:36 +00004233};
4234
4235/* l4_cfg -> spinlock */
4236static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4237 .master = &omap44xx_l4_cfg_hwmod,
4238 .slave = &omap44xx_spinlock_hwmod,
4239 .clk = "l4_div_ck",
4240 .addr = omap44xx_spinlock_addrs,
Benoit Coussond11c2172011-02-02 12:04:36 +00004241 .user = OCP_USER_MPU | OCP_USER_SDMA,
4242};
4243
4244/* spinlock slave ports */
4245static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4246 &omap44xx_l4_cfg__spinlock,
4247};
4248
4249static struct omap_hwmod omap44xx_spinlock_hwmod = {
4250 .name = "spinlock",
4251 .class = &omap44xx_spinlock_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004252 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond11c2172011-02-02 12:04:36 +00004253 .prcm = {
4254 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004255 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004256 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
Benoit Coussond11c2172011-02-02 12:04:36 +00004257 },
4258 },
4259 .slaves = omap44xx_spinlock_slaves,
4260 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
Benoit Coussond11c2172011-02-02 12:04:36 +00004261};
4262
4263/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004264 * 'timer' class
4265 * general purpose timer module with accurate 1ms tick
4266 * This class contains several variants: ['timer_1ms', 'timer']
4267 */
4268
4269static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4270 .rev_offs = 0x0000,
4271 .sysc_offs = 0x0010,
4272 .syss_offs = 0x0014,
4273 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4274 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4275 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4276 SYSS_HAS_RESET_STATUS),
4277 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4278 .sysc_fields = &omap_hwmod_sysc_type1,
4279};
4280
4281static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4282 .name = "timer",
4283 .sysc = &omap44xx_timer_1ms_sysc,
4284};
4285
4286static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4287 .rev_offs = 0x0000,
4288 .sysc_offs = 0x0010,
4289 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4290 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4291 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4292 SIDLE_SMART_WKUP),
4293 .sysc_fields = &omap_hwmod_sysc_type2,
4294};
4295
4296static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4297 .name = "timer",
4298 .sysc = &omap44xx_timer_sysc,
4299};
4300
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304301/* always-on timers dev attribute */
4302static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
4303 .timer_capability = OMAP_TIMER_ALWON,
4304};
4305
4306/* pwm timers dev attribute */
4307static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
4308 .timer_capability = OMAP_TIMER_HAS_PWM,
4309};
4310
Benoit Cousson35d1a662011-02-11 11:17:14 +00004311/* timer1 */
4312static struct omap_hwmod omap44xx_timer1_hwmod;
4313static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4314 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004315 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004316};
4317
4318static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4319 {
4320 .pa_start = 0x4a318000,
4321 .pa_end = 0x4a31807f,
4322 .flags = ADDR_TYPE_RT
4323 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004324 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004325};
4326
4327/* l4_wkup -> timer1 */
4328static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4329 .master = &omap44xx_l4_wkup_hwmod,
4330 .slave = &omap44xx_timer1_hwmod,
4331 .clk = "l4_wkup_clk_mux_ck",
4332 .addr = omap44xx_timer1_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004333 .user = OCP_USER_MPU | OCP_USER_SDMA,
4334};
4335
4336/* timer1 slave ports */
4337static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4338 &omap44xx_l4_wkup__timer1,
4339};
4340
4341static struct omap_hwmod omap44xx_timer1_hwmod = {
4342 .name = "timer1",
4343 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004344 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004345 .mpu_irqs = omap44xx_timer1_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004346 .main_clk = "timer1_fck",
4347 .prcm = {
4348 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004349 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004350 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004351 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004352 },
4353 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304354 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004355 .slaves = omap44xx_timer1_slaves,
4356 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004357};
4358
4359/* timer2 */
4360static struct omap_hwmod omap44xx_timer2_hwmod;
4361static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4362 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004363 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004364};
4365
4366static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4367 {
4368 .pa_start = 0x48032000,
4369 .pa_end = 0x4803207f,
4370 .flags = ADDR_TYPE_RT
4371 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004372 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004373};
4374
4375/* l4_per -> timer2 */
4376static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4377 .master = &omap44xx_l4_per_hwmod,
4378 .slave = &omap44xx_timer2_hwmod,
4379 .clk = "l4_div_ck",
4380 .addr = omap44xx_timer2_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004381 .user = OCP_USER_MPU | OCP_USER_SDMA,
4382};
4383
4384/* timer2 slave ports */
4385static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4386 &omap44xx_l4_per__timer2,
4387};
4388
4389static struct omap_hwmod omap44xx_timer2_hwmod = {
4390 .name = "timer2",
4391 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004392 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004393 .mpu_irqs = omap44xx_timer2_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004394 .main_clk = "timer2_fck",
4395 .prcm = {
4396 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004397 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004398 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004399 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004400 },
4401 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304402 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004403 .slaves = omap44xx_timer2_slaves,
4404 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004405};
4406
4407/* timer3 */
4408static struct omap_hwmod omap44xx_timer3_hwmod;
4409static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4410 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004411 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004412};
4413
4414static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4415 {
4416 .pa_start = 0x48034000,
4417 .pa_end = 0x4803407f,
4418 .flags = ADDR_TYPE_RT
4419 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004420 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004421};
4422
4423/* l4_per -> timer3 */
4424static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4425 .master = &omap44xx_l4_per_hwmod,
4426 .slave = &omap44xx_timer3_hwmod,
4427 .clk = "l4_div_ck",
4428 .addr = omap44xx_timer3_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004429 .user = OCP_USER_MPU | OCP_USER_SDMA,
4430};
4431
4432/* timer3 slave ports */
4433static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4434 &omap44xx_l4_per__timer3,
4435};
4436
4437static struct omap_hwmod omap44xx_timer3_hwmod = {
4438 .name = "timer3",
4439 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004440 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004441 .mpu_irqs = omap44xx_timer3_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004442 .main_clk = "timer3_fck",
4443 .prcm = {
4444 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004445 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004446 .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004447 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004448 },
4449 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304450 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004451 .slaves = omap44xx_timer3_slaves,
4452 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004453};
4454
4455/* timer4 */
4456static struct omap_hwmod omap44xx_timer4_hwmod;
4457static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4458 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004459 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004460};
4461
4462static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4463 {
4464 .pa_start = 0x48036000,
4465 .pa_end = 0x4803607f,
4466 .flags = ADDR_TYPE_RT
4467 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004468 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004469};
4470
4471/* l4_per -> timer4 */
4472static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4473 .master = &omap44xx_l4_per_hwmod,
4474 .slave = &omap44xx_timer4_hwmod,
4475 .clk = "l4_div_ck",
4476 .addr = omap44xx_timer4_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004477 .user = OCP_USER_MPU | OCP_USER_SDMA,
4478};
4479
4480/* timer4 slave ports */
4481static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4482 &omap44xx_l4_per__timer4,
4483};
4484
4485static struct omap_hwmod omap44xx_timer4_hwmod = {
4486 .name = "timer4",
4487 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004488 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004489 .mpu_irqs = omap44xx_timer4_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004490 .main_clk = "timer4_fck",
4491 .prcm = {
4492 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004493 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004494 .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004495 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004496 },
4497 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304498 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004499 .slaves = omap44xx_timer4_slaves,
4500 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004501};
4502
4503/* timer5 */
4504static struct omap_hwmod omap44xx_timer5_hwmod;
4505static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4506 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004507 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004508};
4509
4510static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4511 {
4512 .pa_start = 0x40138000,
4513 .pa_end = 0x4013807f,
4514 .flags = ADDR_TYPE_RT
4515 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004516 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004517};
4518
4519/* l4_abe -> timer5 */
4520static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4521 .master = &omap44xx_l4_abe_hwmod,
4522 .slave = &omap44xx_timer5_hwmod,
4523 .clk = "ocp_abe_iclk",
4524 .addr = omap44xx_timer5_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004525 .user = OCP_USER_MPU,
4526};
4527
4528static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4529 {
4530 .pa_start = 0x49038000,
4531 .pa_end = 0x4903807f,
4532 .flags = ADDR_TYPE_RT
4533 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004534 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004535};
4536
4537/* l4_abe -> timer5 (dma) */
4538static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4539 .master = &omap44xx_l4_abe_hwmod,
4540 .slave = &omap44xx_timer5_hwmod,
4541 .clk = "ocp_abe_iclk",
4542 .addr = omap44xx_timer5_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004543 .user = OCP_USER_SDMA,
4544};
4545
4546/* timer5 slave ports */
4547static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4548 &omap44xx_l4_abe__timer5,
4549 &omap44xx_l4_abe__timer5_dma,
4550};
4551
4552static struct omap_hwmod omap44xx_timer5_hwmod = {
4553 .name = "timer5",
4554 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004555 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004556 .mpu_irqs = omap44xx_timer5_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004557 .main_clk = "timer5_fck",
4558 .prcm = {
4559 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004560 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004561 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004562 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004563 },
4564 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304565 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004566 .slaves = omap44xx_timer5_slaves,
4567 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004568};
4569
4570/* timer6 */
4571static struct omap_hwmod omap44xx_timer6_hwmod;
4572static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4573 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004574 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004575};
4576
4577static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4578 {
4579 .pa_start = 0x4013a000,
4580 .pa_end = 0x4013a07f,
4581 .flags = ADDR_TYPE_RT
4582 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004583 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004584};
4585
4586/* l4_abe -> timer6 */
4587static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4588 .master = &omap44xx_l4_abe_hwmod,
4589 .slave = &omap44xx_timer6_hwmod,
4590 .clk = "ocp_abe_iclk",
4591 .addr = omap44xx_timer6_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004592 .user = OCP_USER_MPU,
4593};
4594
4595static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4596 {
4597 .pa_start = 0x4903a000,
4598 .pa_end = 0x4903a07f,
4599 .flags = ADDR_TYPE_RT
4600 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004601 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004602};
4603
4604/* l4_abe -> timer6 (dma) */
4605static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4606 .master = &omap44xx_l4_abe_hwmod,
4607 .slave = &omap44xx_timer6_hwmod,
4608 .clk = "ocp_abe_iclk",
4609 .addr = omap44xx_timer6_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004610 .user = OCP_USER_SDMA,
4611};
4612
4613/* timer6 slave ports */
4614static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4615 &omap44xx_l4_abe__timer6,
4616 &omap44xx_l4_abe__timer6_dma,
4617};
4618
4619static struct omap_hwmod omap44xx_timer6_hwmod = {
4620 .name = "timer6",
4621 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004622 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004623 .mpu_irqs = omap44xx_timer6_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004624
Benoit Cousson35d1a662011-02-11 11:17:14 +00004625 .main_clk = "timer6_fck",
4626 .prcm = {
4627 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004628 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004629 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004630 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004631 },
4632 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304633 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004634 .slaves = omap44xx_timer6_slaves,
4635 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004636};
4637
4638/* timer7 */
4639static struct omap_hwmod omap44xx_timer7_hwmod;
4640static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4641 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004642 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004643};
4644
4645static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4646 {
4647 .pa_start = 0x4013c000,
4648 .pa_end = 0x4013c07f,
4649 .flags = ADDR_TYPE_RT
4650 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004651 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004652};
4653
4654/* l4_abe -> timer7 */
4655static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4656 .master = &omap44xx_l4_abe_hwmod,
4657 .slave = &omap44xx_timer7_hwmod,
4658 .clk = "ocp_abe_iclk",
4659 .addr = omap44xx_timer7_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004660 .user = OCP_USER_MPU,
4661};
4662
4663static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4664 {
4665 .pa_start = 0x4903c000,
4666 .pa_end = 0x4903c07f,
4667 .flags = ADDR_TYPE_RT
4668 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004669 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004670};
4671
4672/* l4_abe -> timer7 (dma) */
4673static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4674 .master = &omap44xx_l4_abe_hwmod,
4675 .slave = &omap44xx_timer7_hwmod,
4676 .clk = "ocp_abe_iclk",
4677 .addr = omap44xx_timer7_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004678 .user = OCP_USER_SDMA,
4679};
4680
4681/* timer7 slave ports */
4682static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4683 &omap44xx_l4_abe__timer7,
4684 &omap44xx_l4_abe__timer7_dma,
4685};
4686
4687static struct omap_hwmod omap44xx_timer7_hwmod = {
4688 .name = "timer7",
4689 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004690 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004691 .mpu_irqs = omap44xx_timer7_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004692 .main_clk = "timer7_fck",
4693 .prcm = {
4694 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004695 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004696 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004697 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004698 },
4699 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304700 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004701 .slaves = omap44xx_timer7_slaves,
4702 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004703};
4704
4705/* timer8 */
4706static struct omap_hwmod omap44xx_timer8_hwmod;
4707static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4708 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004709 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004710};
4711
4712static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4713 {
4714 .pa_start = 0x4013e000,
4715 .pa_end = 0x4013e07f,
4716 .flags = ADDR_TYPE_RT
4717 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004718 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004719};
4720
4721/* l4_abe -> timer8 */
4722static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4723 .master = &omap44xx_l4_abe_hwmod,
4724 .slave = &omap44xx_timer8_hwmod,
4725 .clk = "ocp_abe_iclk",
4726 .addr = omap44xx_timer8_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004727 .user = OCP_USER_MPU,
4728};
4729
4730static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4731 {
4732 .pa_start = 0x4903e000,
4733 .pa_end = 0x4903e07f,
4734 .flags = ADDR_TYPE_RT
4735 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004736 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004737};
4738
4739/* l4_abe -> timer8 (dma) */
4740static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4741 .master = &omap44xx_l4_abe_hwmod,
4742 .slave = &omap44xx_timer8_hwmod,
4743 .clk = "ocp_abe_iclk",
4744 .addr = omap44xx_timer8_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004745 .user = OCP_USER_SDMA,
4746};
4747
4748/* timer8 slave ports */
4749static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4750 &omap44xx_l4_abe__timer8,
4751 &omap44xx_l4_abe__timer8_dma,
4752};
4753
4754static struct omap_hwmod omap44xx_timer8_hwmod = {
4755 .name = "timer8",
4756 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004757 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004758 .mpu_irqs = omap44xx_timer8_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004759 .main_clk = "timer8_fck",
4760 .prcm = {
4761 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004762 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004763 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004764 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004765 },
4766 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304767 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004768 .slaves = omap44xx_timer8_slaves,
4769 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004770};
4771
4772/* timer9 */
4773static struct omap_hwmod omap44xx_timer9_hwmod;
4774static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4775 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004776 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004777};
4778
4779static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4780 {
4781 .pa_start = 0x4803e000,
4782 .pa_end = 0x4803e07f,
4783 .flags = ADDR_TYPE_RT
4784 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004785 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004786};
4787
4788/* l4_per -> timer9 */
4789static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4790 .master = &omap44xx_l4_per_hwmod,
4791 .slave = &omap44xx_timer9_hwmod,
4792 .clk = "l4_div_ck",
4793 .addr = omap44xx_timer9_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004794 .user = OCP_USER_MPU | OCP_USER_SDMA,
4795};
4796
4797/* timer9 slave ports */
4798static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4799 &omap44xx_l4_per__timer9,
4800};
4801
4802static struct omap_hwmod omap44xx_timer9_hwmod = {
4803 .name = "timer9",
4804 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004805 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004806 .mpu_irqs = omap44xx_timer9_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004807 .main_clk = "timer9_fck",
4808 .prcm = {
4809 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004810 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004811 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004812 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004813 },
4814 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304815 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004816 .slaves = omap44xx_timer9_slaves,
4817 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004818};
4819
4820/* timer10 */
4821static struct omap_hwmod omap44xx_timer10_hwmod;
4822static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4823 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004824 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004825};
4826
4827static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4828 {
4829 .pa_start = 0x48086000,
4830 .pa_end = 0x4808607f,
4831 .flags = ADDR_TYPE_RT
4832 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004833 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004834};
4835
4836/* l4_per -> timer10 */
4837static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4838 .master = &omap44xx_l4_per_hwmod,
4839 .slave = &omap44xx_timer10_hwmod,
4840 .clk = "l4_div_ck",
4841 .addr = omap44xx_timer10_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004842 .user = OCP_USER_MPU | OCP_USER_SDMA,
4843};
4844
4845/* timer10 slave ports */
4846static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4847 &omap44xx_l4_per__timer10,
4848};
4849
4850static struct omap_hwmod omap44xx_timer10_hwmod = {
4851 .name = "timer10",
4852 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004853 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004854 .mpu_irqs = omap44xx_timer10_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004855 .main_clk = "timer10_fck",
4856 .prcm = {
4857 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004858 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004859 .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004860 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004861 },
4862 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304863 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004864 .slaves = omap44xx_timer10_slaves,
4865 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004866};
4867
4868/* timer11 */
4869static struct omap_hwmod omap44xx_timer11_hwmod;
4870static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4871 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004872 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004873};
4874
4875static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4876 {
4877 .pa_start = 0x48088000,
4878 .pa_end = 0x4808807f,
4879 .flags = ADDR_TYPE_RT
4880 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004881 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004882};
4883
4884/* l4_per -> timer11 */
4885static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4886 .master = &omap44xx_l4_per_hwmod,
4887 .slave = &omap44xx_timer11_hwmod,
4888 .clk = "l4_div_ck",
4889 .addr = omap44xx_timer11_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004890 .user = OCP_USER_MPU | OCP_USER_SDMA,
4891};
4892
4893/* timer11 slave ports */
4894static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4895 &omap44xx_l4_per__timer11,
4896};
4897
4898static struct omap_hwmod omap44xx_timer11_hwmod = {
4899 .name = "timer11",
4900 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004901 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004902 .mpu_irqs = omap44xx_timer11_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004903 .main_clk = "timer11_fck",
4904 .prcm = {
4905 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004906 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004907 .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004908 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004909 },
4910 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304911 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004912 .slaves = omap44xx_timer11_slaves,
4913 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004914};
4915
4916/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304917 * 'uart' class
4918 * universal asynchronous receiver/transmitter (uart)
4919 */
4920
4921static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4922 .rev_offs = 0x0050,
4923 .sysc_offs = 0x0054,
4924 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004925 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004926 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4927 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004928 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4929 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304930 .sysc_fields = &omap_hwmod_sysc_type1,
4931};
4932
4933static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004934 .name = "uart",
4935 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304936};
4937
4938/* uart1 */
4939static struct omap_hwmod omap44xx_uart1_hwmod;
4940static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4941 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004942 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304943};
4944
4945static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4946 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4947 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004948 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304949};
4950
4951static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4952 {
4953 .pa_start = 0x4806a000,
4954 .pa_end = 0x4806a0ff,
4955 .flags = ADDR_TYPE_RT
4956 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004957 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304958};
4959
4960/* l4_per -> uart1 */
4961static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4962 .master = &omap44xx_l4_per_hwmod,
4963 .slave = &omap44xx_uart1_hwmod,
4964 .clk = "l4_div_ck",
4965 .addr = omap44xx_uart1_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304966 .user = OCP_USER_MPU | OCP_USER_SDMA,
4967};
4968
4969/* uart1 slave ports */
4970static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4971 &omap44xx_l4_per__uart1,
4972};
4973
4974static struct omap_hwmod omap44xx_uart1_hwmod = {
4975 .name = "uart1",
4976 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004977 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304978 .mpu_irqs = omap44xx_uart1_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304979 .sdma_reqs = omap44xx_uart1_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304980 .main_clk = "uart1_fck",
4981 .prcm = {
4982 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004983 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004984 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004985 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304986 },
4987 },
4988 .slaves = omap44xx_uart1_slaves,
4989 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304990};
4991
4992/* uart2 */
4993static struct omap_hwmod omap44xx_uart2_hwmod;
4994static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4995 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004996 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304997};
4998
4999static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
5000 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
5001 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005002 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305003};
5004
5005static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
5006 {
5007 .pa_start = 0x4806c000,
5008 .pa_end = 0x4806c0ff,
5009 .flags = ADDR_TYPE_RT
5010 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005011 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305012};
5013
5014/* l4_per -> uart2 */
5015static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
5016 .master = &omap44xx_l4_per_hwmod,
5017 .slave = &omap44xx_uart2_hwmod,
5018 .clk = "l4_div_ck",
5019 .addr = omap44xx_uart2_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305020 .user = OCP_USER_MPU | OCP_USER_SDMA,
5021};
5022
5023/* uart2 slave ports */
5024static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
5025 &omap44xx_l4_per__uart2,
5026};
5027
5028static struct omap_hwmod omap44xx_uart2_hwmod = {
5029 .name = "uart2",
5030 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005031 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305032 .mpu_irqs = omap44xx_uart2_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305033 .sdma_reqs = omap44xx_uart2_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305034 .main_clk = "uart2_fck",
5035 .prcm = {
5036 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005037 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005038 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005039 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305040 },
5041 },
5042 .slaves = omap44xx_uart2_slaves,
5043 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305044};
5045
5046/* uart3 */
5047static struct omap_hwmod omap44xx_uart3_hwmod;
5048static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
5049 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005050 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305051};
5052
5053static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
5054 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
5055 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005056 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305057};
5058
5059static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
5060 {
5061 .pa_start = 0x48020000,
5062 .pa_end = 0x480200ff,
5063 .flags = ADDR_TYPE_RT
5064 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005065 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305066};
5067
5068/* l4_per -> uart3 */
5069static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
5070 .master = &omap44xx_l4_per_hwmod,
5071 .slave = &omap44xx_uart3_hwmod,
5072 .clk = "l4_div_ck",
5073 .addr = omap44xx_uart3_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305074 .user = OCP_USER_MPU | OCP_USER_SDMA,
5075};
5076
5077/* uart3 slave ports */
5078static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
5079 &omap44xx_l4_per__uart3,
5080};
5081
5082static struct omap_hwmod omap44xx_uart3_hwmod = {
5083 .name = "uart3",
5084 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005085 .clkdm_name = "l4_per_clkdm",
Benoit Cousson7ecc5372011-07-09 19:14:28 -06005086 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305087 .mpu_irqs = omap44xx_uart3_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305088 .sdma_reqs = omap44xx_uart3_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305089 .main_clk = "uart3_fck",
5090 .prcm = {
5091 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005092 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005093 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005094 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305095 },
5096 },
5097 .slaves = omap44xx_uart3_slaves,
5098 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305099};
5100
5101/* uart4 */
5102static struct omap_hwmod omap44xx_uart4_hwmod;
5103static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5104 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005105 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305106};
5107
5108static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5109 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
5110 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005111 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305112};
5113
5114static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5115 {
5116 .pa_start = 0x4806e000,
5117 .pa_end = 0x4806e0ff,
5118 .flags = ADDR_TYPE_RT
5119 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005120 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305121};
5122
5123/* l4_per -> uart4 */
5124static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5125 .master = &omap44xx_l4_per_hwmod,
5126 .slave = &omap44xx_uart4_hwmod,
5127 .clk = "l4_div_ck",
5128 .addr = omap44xx_uart4_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305129 .user = OCP_USER_MPU | OCP_USER_SDMA,
5130};
5131
5132/* uart4 slave ports */
5133static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5134 &omap44xx_l4_per__uart4,
5135};
5136
5137static struct omap_hwmod omap44xx_uart4_hwmod = {
5138 .name = "uart4",
5139 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005140 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305141 .mpu_irqs = omap44xx_uart4_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305142 .sdma_reqs = omap44xx_uart4_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305143 .main_clk = "uart4_fck",
5144 .prcm = {
5145 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005146 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005147 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005148 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305149 },
5150 },
5151 .slaves = omap44xx_uart4_slaves,
5152 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305153};
5154
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005155/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005156 * 'usb_otg_hs' class
5157 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
5158 */
5159
5160static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
5161 .rev_offs = 0x0400,
5162 .sysc_offs = 0x0404,
5163 .syss_offs = 0x0408,
5164 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
5165 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5166 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
5167 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5168 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5169 MSTANDBY_SMART),
5170 .sysc_fields = &omap_hwmod_sysc_type1,
5171};
5172
5173static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
Benoit Cousson00fe6102011-07-09 19:14:28 -06005174 .name = "usb_otg_hs",
5175 .sysc = &omap44xx_usb_otg_hs_sysc,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005176};
5177
5178/* usb_otg_hs */
5179static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5180 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
5181 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005182 { .irq = -1 }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005183};
5184
5185/* usb_otg_hs master ports */
5186static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5187 &omap44xx_usb_otg_hs__l3_main_2,
5188};
5189
5190static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5191 {
5192 .pa_start = 0x4a0ab000,
5193 .pa_end = 0x4a0ab003,
5194 .flags = ADDR_TYPE_RT
5195 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005196 { }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005197};
5198
5199/* l4_cfg -> usb_otg_hs */
5200static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5201 .master = &omap44xx_l4_cfg_hwmod,
5202 .slave = &omap44xx_usb_otg_hs_hwmod,
5203 .clk = "l4_div_ck",
5204 .addr = omap44xx_usb_otg_hs_addrs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005205 .user = OCP_USER_MPU | OCP_USER_SDMA,
5206};
5207
5208/* usb_otg_hs slave ports */
5209static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5210 &omap44xx_l4_cfg__usb_otg_hs,
5211};
5212
5213static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5214 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5215};
5216
5217static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5218 .name = "usb_otg_hs",
5219 .class = &omap44xx_usb_otg_hs_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005220 .clkdm_name = "l3_init_clkdm",
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005221 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
5222 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005223 .main_clk = "usb_otg_hs_ick",
5224 .prcm = {
5225 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005226 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005227 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005228 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005229 },
5230 },
5231 .opt_clks = usb_otg_hs_opt_clks,
Benoit Cousson00fe6102011-07-09 19:14:28 -06005232 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005233 .slaves = omap44xx_usb_otg_hs_slaves,
5234 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
5235 .masters = omap44xx_usb_otg_hs_masters,
5236 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005237};
5238
5239/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005240 * 'wd_timer' class
5241 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
5242 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005243 */
5244
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005245static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005246 .rev_offs = 0x0000,
5247 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005248 .syss_offs = 0x0014,
5249 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07005250 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07005251 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5252 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005253 .sysc_fields = &omap_hwmod_sysc_type1,
5254};
5255
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005256static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5257 .name = "wd_timer",
5258 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00005259 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005260};
5261
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005262/* wd_timer2 */
5263static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5264static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5265 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005266 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005267};
5268
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005269static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005270 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005271 .pa_start = 0x4a314000,
5272 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005273 .flags = ADDR_TYPE_RT
5274 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005275 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005276};
5277
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005278/* l4_wkup -> wd_timer2 */
5279static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005280 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005281 .slave = &omap44xx_wd_timer2_hwmod,
5282 .clk = "l4_wkup_clk_mux_ck",
5283 .addr = omap44xx_wd_timer2_addrs,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005284 .user = OCP_USER_MPU | OCP_USER_SDMA,
5285};
5286
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005287/* wd_timer2 slave ports */
5288static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5289 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005290};
5291
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005292static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5293 .name = "wd_timer2",
5294 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005295 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005296 .mpu_irqs = omap44xx_wd_timer2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005297 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005298 .prcm = {
5299 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005300 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005301 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005302 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005303 },
5304 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005305 .slaves = omap44xx_wd_timer2_slaves,
5306 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005307};
5308
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005309/* wd_timer3 */
5310static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5311static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5312 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005313 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005314};
5315
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005316static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005317 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005318 .pa_start = 0x40130000,
5319 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005320 .flags = ADDR_TYPE_RT
5321 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005322 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005323};
5324
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005325/* l4_abe -> wd_timer3 */
5326static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5327 .master = &omap44xx_l4_abe_hwmod,
5328 .slave = &omap44xx_wd_timer3_hwmod,
5329 .clk = "ocp_abe_iclk",
5330 .addr = omap44xx_wd_timer3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005331 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005332};
5333
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005334static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005335 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005336 .pa_start = 0x49030000,
5337 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005338 .flags = ADDR_TYPE_RT
5339 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005340 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005341};
5342
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005343/* l4_abe -> wd_timer3 (dma) */
5344static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5345 .master = &omap44xx_l4_abe_hwmod,
5346 .slave = &omap44xx_wd_timer3_hwmod,
5347 .clk = "ocp_abe_iclk",
5348 .addr = omap44xx_wd_timer3_dma_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005349 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005350};
5351
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005352/* wd_timer3 slave ports */
5353static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5354 &omap44xx_l4_abe__wd_timer3,
5355 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005356};
5357
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005358static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5359 .name = "wd_timer3",
5360 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005361 .clkdm_name = "abe_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005362 .mpu_irqs = omap44xx_wd_timer3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005363 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005364 .prcm = {
5365 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005366 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005367 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005368 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005369 },
5370 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005371 .slaves = omap44xx_wd_timer3_slaves,
5372 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005373};
5374
Benoit Coussonaf88fa92011-12-15 23:15:18 -07005375/*
5376 * 'usb_host_hs' class
5377 * high-speed multi-port usb host controller
5378 */
5379static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = {
5380 .master = &omap44xx_usb_host_hs_hwmod,
5381 .slave = &omap44xx_l3_main_2_hwmod,
5382 .clk = "l3_div_ck",
5383 .user = OCP_USER_MPU | OCP_USER_SDMA,
5384};
5385
5386static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = {
5387 .rev_offs = 0x0000,
5388 .sysc_offs = 0x0010,
5389 .syss_offs = 0x0014,
5390 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5391 SYSC_HAS_SOFTRESET),
5392 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5393 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5394 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
5395 .sysc_fields = &omap_hwmod_sysc_type2,
5396};
5397
5398static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = {
5399 .name = "usb_host_hs",
5400 .sysc = &omap44xx_usb_host_hs_sysc,
5401};
5402
5403static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_masters[] = {
5404 &omap44xx_usb_host_hs__l3_main_2,
5405};
5406
5407static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = {
5408 {
5409 .name = "uhh",
5410 .pa_start = 0x4a064000,
5411 .pa_end = 0x4a0647ff,
5412 .flags = ADDR_TYPE_RT
5413 },
5414 {
5415 .name = "ohci",
5416 .pa_start = 0x4a064800,
5417 .pa_end = 0x4a064bff,
5418 },
5419 {
5420 .name = "ehci",
5421 .pa_start = 0x4a064c00,
5422 .pa_end = 0x4a064fff,
5423 },
5424 {}
5425};
5426
5427static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = {
5428 { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START },
5429 { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START },
5430 { .irq = -1 }
5431};
5432
5433static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = {
5434 .master = &omap44xx_l4_cfg_hwmod,
5435 .slave = &omap44xx_usb_host_hs_hwmod,
5436 .clk = "l4_div_ck",
5437 .addr = omap44xx_usb_host_hs_addrs,
5438 .user = OCP_USER_MPU | OCP_USER_SDMA,
5439};
5440
5441static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_slaves[] = {
5442 &omap44xx_l4_cfg__usb_host_hs,
5443};
5444
5445static struct omap_hwmod omap44xx_usb_host_hs_hwmod = {
5446 .name = "usb_host_hs",
5447 .class = &omap44xx_usb_host_hs_hwmod_class,
5448 .clkdm_name = "l3_init_clkdm",
5449 .main_clk = "usb_host_hs_fck",
5450 .prcm = {
5451 .omap4 = {
5452 .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET,
5453 .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET,
5454 .modulemode = MODULEMODE_SWCTRL,
5455 },
5456 },
5457 .mpu_irqs = omap44xx_usb_host_hs_irqs,
5458 .slaves = omap44xx_usb_host_hs_slaves,
5459 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_slaves),
5460 .masters = omap44xx_usb_host_hs_masters,
5461 .masters_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_masters),
5462
5463 /*
5464 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
5465 * id: i660
5466 *
5467 * Description:
5468 * In the following configuration :
5469 * - USBHOST module is set to smart-idle mode
5470 * - PRCM asserts idle_req to the USBHOST module ( This typically
5471 * happens when the system is going to a low power mode : all ports
5472 * have been suspended, the master part of the USBHOST module has
5473 * entered the standby state, and SW has cut the functional clocks)
5474 * - an USBHOST interrupt occurs before the module is able to answer
5475 * idle_ack, typically a remote wakeup IRQ.
5476 * Then the USB HOST module will enter a deadlock situation where it
5477 * is no more accessible nor functional.
5478 *
5479 * Workaround:
5480 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
5481 */
5482
5483 /*
5484 * Errata: USB host EHCI may stall when entering smart-standby mode
5485 * Id: i571
5486 *
5487 * Description:
5488 * When the USBHOST module is set to smart-standby mode, and when it is
5489 * ready to enter the standby state (i.e. all ports are suspended and
5490 * all attached devices are in suspend mode), then it can wrongly assert
5491 * the Mstandby signal too early while there are still some residual OCP
5492 * transactions ongoing. If this condition occurs, the internal state
5493 * machine may go to an undefined state and the USB link may be stuck
5494 * upon the next resume.
5495 *
5496 * Workaround:
5497 * Don't use smart standby; use only force standby,
5498 * hence HWMOD_SWSUP_MSTANDBY
5499 */
5500
5501 /*
5502 * During system boot; If the hwmod framework resets the module
5503 * the module will have smart idle settings; which can lead to deadlock
5504 * (above Errata Id:i660); so, dont reset the module during boot;
5505 * Use HWMOD_INIT_NO_RESET.
5506 */
5507
5508 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
5509 HWMOD_INIT_NO_RESET,
5510};
5511
5512/*
5513 * 'usb_tll_hs' class
5514 * usb_tll_hs module is the adapter on the usb_host_hs ports
5515 */
5516static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = {
5517 .rev_offs = 0x0000,
5518 .sysc_offs = 0x0010,
5519 .syss_offs = 0x0014,
5520 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
5521 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
5522 SYSC_HAS_AUTOIDLE),
5523 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
5524 .sysc_fields = &omap_hwmod_sysc_type1,
5525};
5526
5527static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = {
5528 .name = "usb_tll_hs",
5529 .sysc = &omap44xx_usb_tll_hs_sysc,
5530};
5531
5532static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = {
5533 { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START },
5534 { .irq = -1 }
5535};
5536
5537static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = {
5538 {
5539 .name = "tll",
5540 .pa_start = 0x4a062000,
5541 .pa_end = 0x4a063fff,
5542 .flags = ADDR_TYPE_RT
5543 },
5544 {}
5545};
5546
5547static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = {
5548 .master = &omap44xx_l4_cfg_hwmod,
5549 .slave = &omap44xx_usb_tll_hs_hwmod,
5550 .clk = "l4_div_ck",
5551 .addr = omap44xx_usb_tll_hs_addrs,
5552 .user = OCP_USER_MPU | OCP_USER_SDMA,
5553};
5554
5555static struct omap_hwmod_ocp_if *omap44xx_usb_tll_hs_slaves[] = {
5556 &omap44xx_l4_cfg__usb_tll_hs,
5557};
5558
5559static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = {
5560 .name = "usb_tll_hs",
5561 .class = &omap44xx_usb_tll_hs_hwmod_class,
5562 .clkdm_name = "l3_init_clkdm",
5563 .main_clk = "usb_tll_hs_ick",
5564 .prcm = {
5565 .omap4 = {
5566 .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET,
5567 .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET,
5568 .modulemode = MODULEMODE_HWCTRL,
5569 },
5570 },
5571 .mpu_irqs = omap44xx_usb_tll_hs_irqs,
5572 .slaves = omap44xx_usb_tll_hs_slaves,
5573 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_slaves),
5574};
5575
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005576static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005577
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005578 /* dmm class */
5579 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005580
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005581 /* emif_fw class */
5582 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005583
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005584 /* l3 class */
5585 &omap44xx_l3_instr_hwmod,
5586 &omap44xx_l3_main_1_hwmod,
5587 &omap44xx_l3_main_2_hwmod,
5588 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005589
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005590 /* l4 class */
5591 &omap44xx_l4_abe_hwmod,
5592 &omap44xx_l4_cfg_hwmod,
5593 &omap44xx_l4_per_hwmod,
5594 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005595
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005596 /* mpu_bus class */
5597 &omap44xx_mpu_private_hwmod,
5598
Benoit Cousson407a6882011-02-15 22:39:48 +01005599 /* aess class */
Liam Girdwood5b31b8d2011-04-30 16:19:33 +01005600 &omap44xx_aess_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005601
5602 /* bandgap class */
5603 &omap44xx_bandgap_hwmod,
5604
5605 /* counter class */
5606/* &omap44xx_counter_32k_hwmod, */
5607
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005608 /* dma class */
5609 &omap44xx_dma_system_hwmod,
5610
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005611 /* dmic class */
5612 &omap44xx_dmic_hwmod,
5613
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005614 /* dsp class */
5615 &omap44xx_dsp_hwmod,
5616 &omap44xx_dsp_c0_hwmod,
5617
Benoit Coussond63bd742011-01-27 11:17:03 +00005618 /* dss class */
5619 &omap44xx_dss_hwmod,
5620 &omap44xx_dss_dispc_hwmod,
5621 &omap44xx_dss_dsi1_hwmod,
5622 &omap44xx_dss_dsi2_hwmod,
5623 &omap44xx_dss_hdmi_hwmod,
5624 &omap44xx_dss_rfbi_hwmod,
5625 &omap44xx_dss_venc_hwmod,
5626
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005627 /* gpio class */
5628 &omap44xx_gpio1_hwmod,
5629 &omap44xx_gpio2_hwmod,
5630 &omap44xx_gpio3_hwmod,
5631 &omap44xx_gpio4_hwmod,
5632 &omap44xx_gpio5_hwmod,
5633 &omap44xx_gpio6_hwmod,
5634
Benoit Cousson407a6882011-02-15 22:39:48 +01005635 /* hsi class */
5636/* &omap44xx_hsi_hwmod, */
5637
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005638 /* i2c class */
5639 &omap44xx_i2c1_hwmod,
5640 &omap44xx_i2c2_hwmod,
5641 &omap44xx_i2c3_hwmod,
5642 &omap44xx_i2c4_hwmod,
5643
Benoit Cousson407a6882011-02-15 22:39:48 +01005644 /* ipu class */
5645 &omap44xx_ipu_hwmod,
5646 &omap44xx_ipu_c0_hwmod,
5647 &omap44xx_ipu_c1_hwmod,
5648
5649 /* iss class */
5650/* &omap44xx_iss_hwmod, */
5651
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005652 /* iva class */
5653 &omap44xx_iva_hwmod,
5654 &omap44xx_iva_seq0_hwmod,
5655 &omap44xx_iva_seq1_hwmod,
5656
Benoit Cousson407a6882011-02-15 22:39:48 +01005657 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005658 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005659
Benoit Coussonec5df922011-02-02 19:27:21 +00005660 /* mailbox class */
5661 &omap44xx_mailbox_hwmod,
5662
Benoit Cousson4ddff492011-01-31 14:50:30 +00005663 /* mcbsp class */
5664 &omap44xx_mcbsp1_hwmod,
5665 &omap44xx_mcbsp2_hwmod,
5666 &omap44xx_mcbsp3_hwmod,
5667 &omap44xx_mcbsp4_hwmod,
5668
Benoit Cousson407a6882011-02-15 22:39:48 +01005669 /* mcpdm class */
Peter Ujfalusid05e2ea2011-05-01 19:33:15 +01005670 &omap44xx_mcpdm_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005671
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305672 /* mcspi class */
5673 &omap44xx_mcspi1_hwmod,
5674 &omap44xx_mcspi2_hwmod,
5675 &omap44xx_mcspi3_hwmod,
5676 &omap44xx_mcspi4_hwmod,
5677
Benoit Cousson407a6882011-02-15 22:39:48 +01005678 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005679 &omap44xx_mmc1_hwmod,
5680 &omap44xx_mmc2_hwmod,
5681 &omap44xx_mmc3_hwmod,
5682 &omap44xx_mmc4_hwmod,
5683 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005684
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005685 /* mpu class */
5686 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305687
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005688 /* smartreflex class */
5689 &omap44xx_smartreflex_core_hwmod,
5690 &omap44xx_smartreflex_iva_hwmod,
5691 &omap44xx_smartreflex_mpu_hwmod,
5692
Benoit Coussond11c2172011-02-02 12:04:36 +00005693 /* spinlock class */
5694 &omap44xx_spinlock_hwmod,
5695
Benoit Cousson35d1a662011-02-11 11:17:14 +00005696 /* timer class */
5697 &omap44xx_timer1_hwmod,
5698 &omap44xx_timer2_hwmod,
5699 &omap44xx_timer3_hwmod,
5700 &omap44xx_timer4_hwmod,
5701 &omap44xx_timer5_hwmod,
5702 &omap44xx_timer6_hwmod,
5703 &omap44xx_timer7_hwmod,
5704 &omap44xx_timer8_hwmod,
5705 &omap44xx_timer9_hwmod,
5706 &omap44xx_timer10_hwmod,
5707 &omap44xx_timer11_hwmod,
5708
Benoit Coussondb12ba52010-09-27 20:19:19 +05305709 /* uart class */
5710 &omap44xx_uart1_hwmod,
5711 &omap44xx_uart2_hwmod,
5712 &omap44xx_uart3_hwmod,
5713 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005714
Benoit Coussonaf88fa92011-12-15 23:15:18 -07005715 /* usb host class */
5716 &omap44xx_usb_host_hs_hwmod,
5717 &omap44xx_usb_tll_hs_hwmod,
5718
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005719 /* usb_otg_hs class */
5720 &omap44xx_usb_otg_hs_hwmod,
5721
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005722 /* wd_timer class */
5723 &omap44xx_wd_timer2_hwmod,
5724 &omap44xx_wd_timer3_hwmod,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005725 NULL,
5726};
5727
5728int __init omap44xx_hwmod_init(void)
5729{
Paul Walmsley550c8092011-02-28 11:58:14 -07005730 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005731}
5732