blob: 393afac9caf6d2cb15605749e9e5786bdfb4c857 [file] [log] [blame]
Benoit Cousson55d2cb02010-05-12 17:54:36 +02001/*
2 * Hardware modules present on the OMAP44xx chips
3 *
Benoit Coussond63bd742011-01-27 11:17:03 +00004 * Copyright (C) 2009-2011 Texas Instruments, Inc.
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005 * Copyright (C) 2009-2010 Nokia Corporation
6 *
7 * Paul Walmsley
8 * Benoit Cousson
9 *
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
20
21#include <linux/io.h>
22
23#include <plat/omap_hwmod.h>
24#include <plat/cpu.h>
Avinash.H.M6d3c55f2011-07-10 05:27:16 -060025#include <plat/i2c.h>
Benoit Cousson9780a9c2010-12-07 16:26:57 -080026#include <plat/gpio.h>
Benoit Cousson531ce0d2010-12-20 18:27:19 -080027#include <plat/dma.h>
Benoit Cousson905a74d2011-02-18 14:01:06 +010028#include <plat/mcspi.h>
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +053029#include <plat/mcbsp.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080030#include <plat/mmc.h>
Andy Green4d4441a2011-07-10 05:27:16 -060031#include <plat/i2c.h>
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +053032#include <plat/dmtimer.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020033
34#include "omap_hwmod_common_data.h"
35
Paul Walmsleyd198b512010-12-21 15:30:54 -070036#include "cm1_44xx.h"
37#include "cm2_44xx.h"
38#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020039#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070040#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020041
42/* Base offset for all OMAP4 interrupts external to MPUSS */
43#define OMAP44XX_IRQ_GIC_START 32
44
45/* Base offset for all OMAP4 dma requests */
46#define OMAP44XX_DMA_REQ_START 1
47
48/* Backward references (IPs with Bus Master capability) */
Benoit Cousson407a6882011-02-15 22:39:48 +010049static struct omap_hwmod omap44xx_aess_hwmod;
Benoit Cousson531ce0d2010-12-20 18:27:19 -080050static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020051static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070052static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Coussond63bd742011-01-27 11:17:03 +000053static struct omap_hwmod omap44xx_dss_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020054static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010055static struct omap_hwmod omap44xx_hsi_hwmod;
56static struct omap_hwmod omap44xx_ipu_hwmod;
57static struct omap_hwmod omap44xx_iss_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070058static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020059static struct omap_hwmod omap44xx_l3_instr_hwmod;
60static struct omap_hwmod omap44xx_l3_main_1_hwmod;
61static struct omap_hwmod omap44xx_l3_main_2_hwmod;
62static struct omap_hwmod omap44xx_l3_main_3_hwmod;
63static struct omap_hwmod omap44xx_l4_abe_hwmod;
64static struct omap_hwmod omap44xx_l4_cfg_hwmod;
65static struct omap_hwmod omap44xx_l4_per_hwmod;
66static struct omap_hwmod omap44xx_l4_wkup_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010067static struct omap_hwmod omap44xx_mmc1_hwmod;
68static struct omap_hwmod omap44xx_mmc2_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020069static struct omap_hwmod omap44xx_mpu_hwmod;
70static struct omap_hwmod omap44xx_mpu_private_hwmod;
Benoit Cousson5844c4e2011-02-17 12:41:05 +000071static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020072
73/*
74 * Interconnects omap_hwmod structures
75 * hwmods that compose the global OMAP interconnect
76 */
77
78/*
79 * 'dmm' class
80 * instance(s): dmm
81 */
82static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +000083 .name = "dmm",
Benoit Cousson55d2cb02010-05-12 17:54:36 +020084};
85
Benoit Cousson7e69ed92011-07-09 19:14:28 -060086/* dmm */
87static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
88 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
89 { .irq = -1 }
90};
91
Benoit Cousson55d2cb02010-05-12 17:54:36 +020092/* l3_main_1 -> dmm */
93static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
94 .master = &omap44xx_l3_main_1_hwmod,
95 .slave = &omap44xx_dmm_hwmod,
96 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070097 .user = OCP_USER_SDMA,
98};
99
100static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
101 {
102 .pa_start = 0x4e000000,
103 .pa_end = 0x4e0007ff,
104 .flags = ADDR_TYPE_RT
105 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600106 { }
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200107};
108
109/* mpu -> dmm */
110static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
111 .master = &omap44xx_mpu_hwmod,
112 .slave = &omap44xx_dmm_hwmod,
113 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700114 .addr = omap44xx_dmm_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700115 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200116};
117
118/* dmm slave ports */
119static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
120 &omap44xx_l3_main_1__dmm,
121 &omap44xx_mpu__dmm,
122};
123
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200124static struct omap_hwmod omap44xx_dmm_hwmod = {
125 .name = "dmm",
126 .class = &omap44xx_dmm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600127 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600128 .prcm = {
129 .omap4 = {
130 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600131 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600132 },
133 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200134 .slaves = omap44xx_dmm_slaves,
135 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
Benoit Coussona5322c62011-07-10 05:56:29 -0600136 .mpu_irqs = omap44xx_dmm_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200137};
138
139/*
140 * 'emif_fw' class
141 * instance(s): emif_fw
142 */
143static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000144 .name = "emif_fw",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200145};
146
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600147/* emif_fw */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200148/* dmm -> emif_fw */
149static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
150 .master = &omap44xx_dmm_hwmod,
151 .slave = &omap44xx_emif_fw_hwmod,
152 .clk = "l3_div_ck",
153 .user = OCP_USER_MPU | OCP_USER_SDMA,
154};
155
Benoit Cousson659fa822010-12-21 21:08:34 -0700156static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
157 {
158 .pa_start = 0x4a20c000,
159 .pa_end = 0x4a20c0ff,
160 .flags = ADDR_TYPE_RT
161 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600162 { }
Benoit Cousson659fa822010-12-21 21:08:34 -0700163};
164
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200165/* l4_cfg -> emif_fw */
166static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
167 .master = &omap44xx_l4_cfg_hwmod,
168 .slave = &omap44xx_emif_fw_hwmod,
169 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700170 .addr = omap44xx_emif_fw_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700171 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200172};
173
174/* emif_fw slave ports */
175static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
176 &omap44xx_dmm__emif_fw,
177 &omap44xx_l4_cfg__emif_fw,
178};
179
180static struct omap_hwmod omap44xx_emif_fw_hwmod = {
181 .name = "emif_fw",
182 .class = &omap44xx_emif_fw_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600183 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600184 .prcm = {
185 .omap4 = {
186 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600187 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600188 },
189 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200190 .slaves = omap44xx_emif_fw_slaves,
191 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200192};
193
194/*
195 * 'l3' class
196 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
197 */
198static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000199 .name = "l3",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200200};
201
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600202/* l3_instr */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700203/* iva -> l3_instr */
204static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
205 .master = &omap44xx_iva_hwmod,
206 .slave = &omap44xx_l3_instr_hwmod,
207 .clk = "l3_div_ck",
208 .user = OCP_USER_MPU | OCP_USER_SDMA,
209};
210
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200211/* l3_main_3 -> l3_instr */
212static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
213 .master = &omap44xx_l3_main_3_hwmod,
214 .slave = &omap44xx_l3_instr_hwmod,
215 .clk = "l3_div_ck",
216 .user = OCP_USER_MPU | OCP_USER_SDMA,
217};
218
219/* l3_instr slave ports */
220static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700221 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200222 &omap44xx_l3_main_3__l3_instr,
223};
224
225static struct omap_hwmod omap44xx_l3_instr_hwmod = {
226 .name = "l3_instr",
227 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600228 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600229 .prcm = {
230 .omap4 = {
231 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600232 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600233 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600234 },
235 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200236 .slaves = omap44xx_l3_instr_slaves,
237 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200238};
239
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600240/* l3_main_1 */
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600241static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
242 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
243 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
244 { .irq = -1 }
245};
246
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700247/* dsp -> l3_main_1 */
248static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
249 .master = &omap44xx_dsp_hwmod,
250 .slave = &omap44xx_l3_main_1_hwmod,
251 .clk = "l3_div_ck",
252 .user = OCP_USER_MPU | OCP_USER_SDMA,
253};
254
Benoit Coussond63bd742011-01-27 11:17:03 +0000255/* dss -> l3_main_1 */
256static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
257 .master = &omap44xx_dss_hwmod,
258 .slave = &omap44xx_l3_main_1_hwmod,
259 .clk = "l3_div_ck",
260 .user = OCP_USER_MPU | OCP_USER_SDMA,
261};
262
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200263/* l3_main_2 -> l3_main_1 */
264static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
265 .master = &omap44xx_l3_main_2_hwmod,
266 .slave = &omap44xx_l3_main_1_hwmod,
267 .clk = "l3_div_ck",
268 .user = OCP_USER_MPU | OCP_USER_SDMA,
269};
270
271/* l4_cfg -> l3_main_1 */
272static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
273 .master = &omap44xx_l4_cfg_hwmod,
274 .slave = &omap44xx_l3_main_1_hwmod,
275 .clk = "l4_div_ck",
276 .user = OCP_USER_MPU | OCP_USER_SDMA,
277};
278
Benoit Cousson407a6882011-02-15 22:39:48 +0100279/* mmc1 -> l3_main_1 */
280static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
281 .master = &omap44xx_mmc1_hwmod,
282 .slave = &omap44xx_l3_main_1_hwmod,
283 .clk = "l3_div_ck",
284 .user = OCP_USER_MPU | OCP_USER_SDMA,
285};
286
287/* mmc2 -> l3_main_1 */
288static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
289 .master = &omap44xx_mmc2_hwmod,
290 .slave = &omap44xx_l3_main_1_hwmod,
291 .clk = "l3_div_ck",
292 .user = OCP_USER_MPU | OCP_USER_SDMA,
293};
294
sricharanc4645232011-02-07 21:12:11 +0530295static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
296 {
297 .pa_start = 0x44000000,
298 .pa_end = 0x44000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600299 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530300 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600301 { }
sricharanc4645232011-02-07 21:12:11 +0530302};
303
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200304/* mpu -> l3_main_1 */
305static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
306 .master = &omap44xx_mpu_hwmod,
307 .slave = &omap44xx_l3_main_1_hwmod,
308 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530309 .addr = omap44xx_l3_main_1_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600310 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200311};
312
313/* l3_main_1 slave ports */
314static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700315 &omap44xx_dsp__l3_main_1,
Benoit Coussond63bd742011-01-27 11:17:03 +0000316 &omap44xx_dss__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200317 &omap44xx_l3_main_2__l3_main_1,
318 &omap44xx_l4_cfg__l3_main_1,
Benoit Cousson407a6882011-02-15 22:39:48 +0100319 &omap44xx_mmc1__l3_main_1,
320 &omap44xx_mmc2__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200321 &omap44xx_mpu__l3_main_1,
322};
323
324static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
325 .name = "l3_main_1",
326 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600327 .clkdm_name = "l3_1_clkdm",
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600328 .mpu_irqs = omap44xx_l3_main_1_irqs,
Benoit Coussond0f06312011-07-10 05:56:30 -0600329 .prcm = {
330 .omap4 = {
331 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600332 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600333 },
334 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200335 .slaves = omap44xx_l3_main_1_slaves,
336 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200337};
338
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600339/* l3_main_2 */
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000340/* dma_system -> l3_main_2 */
341static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
342 .master = &omap44xx_dma_system_hwmod,
343 .slave = &omap44xx_l3_main_2_hwmod,
344 .clk = "l3_div_ck",
345 .user = OCP_USER_MPU | OCP_USER_SDMA,
346};
347
Benoit Cousson407a6882011-02-15 22:39:48 +0100348/* hsi -> l3_main_2 */
349static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
350 .master = &omap44xx_hsi_hwmod,
351 .slave = &omap44xx_l3_main_2_hwmod,
352 .clk = "l3_div_ck",
353 .user = OCP_USER_MPU | OCP_USER_SDMA,
354};
355
356/* ipu -> l3_main_2 */
357static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
358 .master = &omap44xx_ipu_hwmod,
359 .slave = &omap44xx_l3_main_2_hwmod,
360 .clk = "l3_div_ck",
361 .user = OCP_USER_MPU | OCP_USER_SDMA,
362};
363
364/* iss -> l3_main_2 */
365static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
366 .master = &omap44xx_iss_hwmod,
367 .slave = &omap44xx_l3_main_2_hwmod,
368 .clk = "l3_div_ck",
369 .user = OCP_USER_MPU | OCP_USER_SDMA,
370};
371
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700372/* iva -> l3_main_2 */
373static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
374 .master = &omap44xx_iva_hwmod,
375 .slave = &omap44xx_l3_main_2_hwmod,
376 .clk = "l3_div_ck",
377 .user = OCP_USER_MPU | OCP_USER_SDMA,
378};
379
sricharanc4645232011-02-07 21:12:11 +0530380static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
381 {
382 .pa_start = 0x44800000,
383 .pa_end = 0x44801fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600384 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530385 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600386 { }
sricharanc4645232011-02-07 21:12:11 +0530387};
388
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200389/* l3_main_1 -> l3_main_2 */
390static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
391 .master = &omap44xx_l3_main_1_hwmod,
392 .slave = &omap44xx_l3_main_2_hwmod,
393 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530394 .addr = omap44xx_l3_main_2_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600395 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200396};
397
398/* l4_cfg -> l3_main_2 */
399static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
400 .master = &omap44xx_l4_cfg_hwmod,
401 .slave = &omap44xx_l3_main_2_hwmod,
402 .clk = "l4_div_ck",
403 .user = OCP_USER_MPU | OCP_USER_SDMA,
404};
405
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000406/* usb_otg_hs -> l3_main_2 */
407static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
408 .master = &omap44xx_usb_otg_hs_hwmod,
409 .slave = &omap44xx_l3_main_2_hwmod,
410 .clk = "l3_div_ck",
411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200414/* l3_main_2 slave ports */
415static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800416 &omap44xx_dma_system__l3_main_2,
Benoit Cousson407a6882011-02-15 22:39:48 +0100417 &omap44xx_hsi__l3_main_2,
418 &omap44xx_ipu__l3_main_2,
419 &omap44xx_iss__l3_main_2,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700420 &omap44xx_iva__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200421 &omap44xx_l3_main_1__l3_main_2,
422 &omap44xx_l4_cfg__l3_main_2,
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000423 &omap44xx_usb_otg_hs__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200424};
425
426static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
427 .name = "l3_main_2",
428 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600429 .clkdm_name = "l3_2_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600430 .prcm = {
431 .omap4 = {
432 .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600433 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600434 },
435 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200436 .slaves = omap44xx_l3_main_2_slaves,
437 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200438};
439
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600440/* l3_main_3 */
sricharanc4645232011-02-07 21:12:11 +0530441static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
442 {
443 .pa_start = 0x45000000,
444 .pa_end = 0x45000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600445 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530446 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600447 { }
sricharanc4645232011-02-07 21:12:11 +0530448};
449
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200450/* l3_main_1 -> l3_main_3 */
451static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
452 .master = &omap44xx_l3_main_1_hwmod,
453 .slave = &omap44xx_l3_main_3_hwmod,
454 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530455 .addr = omap44xx_l3_main_3_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600456 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200457};
458
459/* l3_main_2 -> l3_main_3 */
460static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
461 .master = &omap44xx_l3_main_2_hwmod,
462 .slave = &omap44xx_l3_main_3_hwmod,
463 .clk = "l3_div_ck",
464 .user = OCP_USER_MPU | OCP_USER_SDMA,
465};
466
467/* l4_cfg -> l3_main_3 */
468static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
469 .master = &omap44xx_l4_cfg_hwmod,
470 .slave = &omap44xx_l3_main_3_hwmod,
471 .clk = "l4_div_ck",
472 .user = OCP_USER_MPU | OCP_USER_SDMA,
473};
474
475/* l3_main_3 slave ports */
476static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
477 &omap44xx_l3_main_1__l3_main_3,
478 &omap44xx_l3_main_2__l3_main_3,
479 &omap44xx_l4_cfg__l3_main_3,
480};
481
482static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
483 .name = "l3_main_3",
484 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600485 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600486 .prcm = {
487 .omap4 = {
488 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600489 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600490 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600491 },
492 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200493 .slaves = omap44xx_l3_main_3_slaves,
494 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200495};
496
497/*
498 * 'l4' class
499 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
500 */
501static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000502 .name = "l4",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200503};
504
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600505/* l4_abe */
Benoit Cousson407a6882011-02-15 22:39:48 +0100506/* aess -> l4_abe */
507static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
508 .master = &omap44xx_aess_hwmod,
509 .slave = &omap44xx_l4_abe_hwmod,
510 .clk = "ocp_abe_iclk",
511 .user = OCP_USER_MPU | OCP_USER_SDMA,
512};
513
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700514/* dsp -> l4_abe */
515static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
516 .master = &omap44xx_dsp_hwmod,
517 .slave = &omap44xx_l4_abe_hwmod,
518 .clk = "ocp_abe_iclk",
519 .user = OCP_USER_MPU | OCP_USER_SDMA,
520};
521
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200522/* l3_main_1 -> l4_abe */
523static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
524 .master = &omap44xx_l3_main_1_hwmod,
525 .slave = &omap44xx_l4_abe_hwmod,
526 .clk = "l3_div_ck",
527 .user = OCP_USER_MPU | OCP_USER_SDMA,
528};
529
530/* mpu -> l4_abe */
531static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
532 .master = &omap44xx_mpu_hwmod,
533 .slave = &omap44xx_l4_abe_hwmod,
534 .clk = "ocp_abe_iclk",
535 .user = OCP_USER_MPU | OCP_USER_SDMA,
536};
537
538/* l4_abe slave ports */
539static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100540 &omap44xx_aess__l4_abe,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700541 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200542 &omap44xx_l3_main_1__l4_abe,
543 &omap44xx_mpu__l4_abe,
544};
545
546static struct omap_hwmod omap44xx_l4_abe_hwmod = {
547 .name = "l4_abe",
548 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600549 .clkdm_name = "abe_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600550 .prcm = {
551 .omap4 = {
552 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
553 },
554 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200555 .slaves = omap44xx_l4_abe_slaves,
556 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200557};
558
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600559/* l4_cfg */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200560/* l3_main_1 -> l4_cfg */
561static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
562 .master = &omap44xx_l3_main_1_hwmod,
563 .slave = &omap44xx_l4_cfg_hwmod,
564 .clk = "l3_div_ck",
565 .user = OCP_USER_MPU | OCP_USER_SDMA,
566};
567
568/* l4_cfg slave ports */
569static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
570 &omap44xx_l3_main_1__l4_cfg,
571};
572
573static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
574 .name = "l4_cfg",
575 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600576 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600577 .prcm = {
578 .omap4 = {
579 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600580 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600581 },
582 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200583 .slaves = omap44xx_l4_cfg_slaves,
584 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200585};
586
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600587/* l4_per */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200588/* l3_main_2 -> l4_per */
589static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
590 .master = &omap44xx_l3_main_2_hwmod,
591 .slave = &omap44xx_l4_per_hwmod,
592 .clk = "l3_div_ck",
593 .user = OCP_USER_MPU | OCP_USER_SDMA,
594};
595
596/* l4_per slave ports */
597static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
598 &omap44xx_l3_main_2__l4_per,
599};
600
601static struct omap_hwmod omap44xx_l4_per_hwmod = {
602 .name = "l4_per",
603 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600604 .clkdm_name = "l4_per_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600605 .prcm = {
606 .omap4 = {
607 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600608 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600609 },
610 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200611 .slaves = omap44xx_l4_per_slaves,
612 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200613};
614
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600615/* l4_wkup */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200616/* l4_cfg -> l4_wkup */
617static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
618 .master = &omap44xx_l4_cfg_hwmod,
619 .slave = &omap44xx_l4_wkup_hwmod,
620 .clk = "l4_div_ck",
621 .user = OCP_USER_MPU | OCP_USER_SDMA,
622};
623
624/* l4_wkup slave ports */
625static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
626 &omap44xx_l4_cfg__l4_wkup,
627};
628
629static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
630 .name = "l4_wkup",
631 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600632 .clkdm_name = "l4_wkup_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600633 .prcm = {
634 .omap4 = {
635 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600636 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600637 },
638 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200639 .slaves = omap44xx_l4_wkup_slaves,
640 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200641};
642
643/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700644 * 'mpu_bus' class
645 * instance(s): mpu_private
646 */
647static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000648 .name = "mpu_bus",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700649};
650
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600651/* mpu_private */
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700652/* mpu -> mpu_private */
653static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
654 .master = &omap44xx_mpu_hwmod,
655 .slave = &omap44xx_mpu_private_hwmod,
656 .clk = "l3_div_ck",
657 .user = OCP_USER_MPU | OCP_USER_SDMA,
658};
659
660/* mpu_private slave ports */
661static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
662 &omap44xx_mpu__mpu_private,
663};
664
665static struct omap_hwmod omap44xx_mpu_private_hwmod = {
666 .name = "mpu_private",
667 .class = &omap44xx_mpu_bus_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600668 .clkdm_name = "mpuss_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700669 .slaves = omap44xx_mpu_private_slaves,
670 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700671};
672
673/*
674 * Modules omap_hwmod structures
675 *
676 * The following IPs are excluded for the moment because:
677 * - They do not need an explicit SW control using omap_hwmod API.
678 * - They still need to be validated with the driver
679 * properly adapted to omap_hwmod / omap_device
680 *
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700681 * c2c
682 * c2c_target_fw
683 * cm_core
684 * cm_core_aon
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700685 * ctrl_module_core
686 * ctrl_module_pad_core
687 * ctrl_module_pad_wkup
688 * ctrl_module_wkup
689 * debugss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700690 * efuse_ctrl_cust
691 * efuse_ctrl_std
692 * elm
693 * emif1
694 * emif2
695 * fdif
696 * gpmc
697 * gpu
698 * hdq1w
Benoit Cousson00fe6102011-07-09 19:14:28 -0600699 * mcasp
700 * mpu_c0
701 * mpu_c1
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700702 * ocmc_ram
703 * ocp2scp_usb_phy
704 * ocp_wp_noc
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700705 * prcm_mpu
706 * prm
707 * scrm
708 * sl2if
709 * slimbus1
710 * slimbus2
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700711 * usb_host_fs
712 * usb_host_hs
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700713 * usb_phy_cm
714 * usb_tll_hs
715 * usim
716 */
717
718/*
Benoit Cousson407a6882011-02-15 22:39:48 +0100719 * 'aess' class
720 * audio engine sub system
721 */
722
723static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
724 .rev_offs = 0x0000,
725 .sysc_offs = 0x0010,
726 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
727 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
Benoit Coussonc614ebf2011-07-01 22:54:01 +0200728 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
729 MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +0100730 .sysc_fields = &omap_hwmod_sysc_type2,
731};
732
733static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
734 .name = "aess",
735 .sysc = &omap44xx_aess_sysc,
736};
737
738/* aess */
739static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
740 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600741 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100742};
743
744static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
745 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
746 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
747 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
748 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
749 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
750 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
751 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
752 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -0600753 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100754};
755
756/* aess master ports */
757static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
758 &omap44xx_aess__l4_abe,
759};
760
761static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
762 {
763 .pa_start = 0x401f1000,
764 .pa_end = 0x401f13ff,
765 .flags = ADDR_TYPE_RT
766 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600767 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100768};
769
770/* l4_abe -> aess */
771static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
772 .master = &omap44xx_l4_abe_hwmod,
773 .slave = &omap44xx_aess_hwmod,
774 .clk = "ocp_abe_iclk",
775 .addr = omap44xx_aess_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100776 .user = OCP_USER_MPU,
777};
778
779static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
780 {
781 .pa_start = 0x490f1000,
782 .pa_end = 0x490f13ff,
783 .flags = ADDR_TYPE_RT
784 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600785 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100786};
787
788/* l4_abe -> aess (dma) */
789static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
790 .master = &omap44xx_l4_abe_hwmod,
791 .slave = &omap44xx_aess_hwmod,
792 .clk = "ocp_abe_iclk",
793 .addr = omap44xx_aess_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100794 .user = OCP_USER_SDMA,
795};
796
797/* aess slave ports */
798static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
799 &omap44xx_l4_abe__aess,
800 &omap44xx_l4_abe__aess_dma,
801};
802
803static struct omap_hwmod omap44xx_aess_hwmod = {
804 .name = "aess",
805 .class = &omap44xx_aess_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600806 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100807 .mpu_irqs = omap44xx_aess_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100808 .sdma_reqs = omap44xx_aess_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100809 .main_clk = "aess_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600810 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100811 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600812 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600813 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600814 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +0100815 },
816 },
817 .slaves = omap44xx_aess_slaves,
818 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
819 .masters = omap44xx_aess_masters,
820 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +0100821};
822
823/*
824 * 'bandgap' class
825 * bangap reference for ldo regulators
826 */
827
828static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
829 .name = "bandgap",
830};
831
832/* bandgap */
833static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
834 { .role = "fclk", .clk = "bandgap_fclk" },
835};
836
837static struct omap_hwmod omap44xx_bandgap_hwmod = {
838 .name = "bandgap",
839 .class = &omap44xx_bandgap_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600840 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600841 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100842 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600843 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100844 },
845 },
846 .opt_clks = bandgap_opt_clks,
847 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
Benoit Cousson407a6882011-02-15 22:39:48 +0100848};
849
850/*
851 * 'counter' class
852 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
853 */
854
855static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
856 .rev_offs = 0x0000,
857 .sysc_offs = 0x0004,
858 .sysc_flags = SYSC_HAS_SIDLEMODE,
859 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
860 SIDLE_SMART_WKUP),
861 .sysc_fields = &omap_hwmod_sysc_type1,
862};
863
864static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
865 .name = "counter",
866 .sysc = &omap44xx_counter_sysc,
867};
868
869/* counter_32k */
870static struct omap_hwmod omap44xx_counter_32k_hwmod;
871static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
872 {
873 .pa_start = 0x4a304000,
874 .pa_end = 0x4a30401f,
875 .flags = ADDR_TYPE_RT
876 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600877 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100878};
879
880/* l4_wkup -> counter_32k */
881static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
882 .master = &omap44xx_l4_wkup_hwmod,
883 .slave = &omap44xx_counter_32k_hwmod,
884 .clk = "l4_wkup_clk_mux_ck",
885 .addr = omap44xx_counter_32k_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100886 .user = OCP_USER_MPU | OCP_USER_SDMA,
887};
888
889/* counter_32k slave ports */
890static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
891 &omap44xx_l4_wkup__counter_32k,
892};
893
894static struct omap_hwmod omap44xx_counter_32k_hwmod = {
895 .name = "counter_32k",
896 .class = &omap44xx_counter_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600897 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100898 .flags = HWMOD_SWSUP_SIDLE,
899 .main_clk = "sys_32k_ck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600900 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100901 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600902 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600903 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100904 },
905 },
906 .slaves = omap44xx_counter_32k_slaves,
907 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +0100908};
909
910/*
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000911 * 'dma' class
912 * dma controller for data exchange between memory to memory (i.e. internal or
913 * external memory) and gp peripherals to memory or memory to gp peripherals
914 */
915
916static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
917 .rev_offs = 0x0000,
918 .sysc_offs = 0x002c,
919 .syss_offs = 0x0028,
920 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
921 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
922 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
923 SYSS_HAS_RESET_STATUS),
924 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
925 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
926 .sysc_fields = &omap_hwmod_sysc_type1,
927};
928
929static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
930 .name = "dma",
931 .sysc = &omap44xx_dma_sysc,
932};
933
934/* dma dev_attr */
935static struct omap_dma_dev_attr dma_dev_attr = {
936 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
937 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
938 .lch_count = 32,
939};
940
941/* dma_system */
942static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
943 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
944 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
945 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
946 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600947 { .irq = -1 }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000948};
949
950/* dma_system master ports */
951static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
952 &omap44xx_dma_system__l3_main_2,
953};
954
955static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
956 {
957 .pa_start = 0x4a056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -0600958 .pa_end = 0x4a056fff,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000959 .flags = ADDR_TYPE_RT
960 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600961 { }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000962};
963
964/* l4_cfg -> dma_system */
965static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
966 .master = &omap44xx_l4_cfg_hwmod,
967 .slave = &omap44xx_dma_system_hwmod,
968 .clk = "l4_div_ck",
969 .addr = omap44xx_dma_system_addrs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000970 .user = OCP_USER_MPU | OCP_USER_SDMA,
971};
972
973/* dma_system slave ports */
974static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
975 &omap44xx_l4_cfg__dma_system,
976};
977
978static struct omap_hwmod omap44xx_dma_system_hwmod = {
979 .name = "dma_system",
980 .class = &omap44xx_dma_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600981 .clkdm_name = "l3_dma_clkdm",
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000982 .mpu_irqs = omap44xx_dma_system_irqs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000983 .main_clk = "l3_div_ck",
984 .prcm = {
985 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600986 .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600987 .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000988 },
989 },
990 .dev_attr = &dma_dev_attr,
991 .slaves = omap44xx_dma_system_slaves,
992 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
993 .masters = omap44xx_dma_system_masters,
994 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000995};
996
997/*
Benoit Cousson8ca476d2011-01-25 22:01:00 +0000998 * 'dmic' class
999 * digital microphone controller
1000 */
1001
1002static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
1003 .rev_offs = 0x0000,
1004 .sysc_offs = 0x0010,
1005 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1006 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1007 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1008 SIDLE_SMART_WKUP),
1009 .sysc_fields = &omap_hwmod_sysc_type2,
1010};
1011
1012static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1013 .name = "dmic",
1014 .sysc = &omap44xx_dmic_sysc,
1015};
1016
1017/* dmic */
1018static struct omap_hwmod omap44xx_dmic_hwmod;
1019static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1020 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001021 { .irq = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001022};
1023
1024static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1025 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001026 { .dma_req = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001027};
1028
1029static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1030 {
1031 .pa_start = 0x4012e000,
1032 .pa_end = 0x4012e07f,
1033 .flags = ADDR_TYPE_RT
1034 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001035 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001036};
1037
1038/* l4_abe -> dmic */
1039static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1040 .master = &omap44xx_l4_abe_hwmod,
1041 .slave = &omap44xx_dmic_hwmod,
1042 .clk = "ocp_abe_iclk",
1043 .addr = omap44xx_dmic_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001044 .user = OCP_USER_MPU,
1045};
1046
1047static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1048 {
1049 .pa_start = 0x4902e000,
1050 .pa_end = 0x4902e07f,
1051 .flags = ADDR_TYPE_RT
1052 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001053 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001054};
1055
1056/* l4_abe -> dmic (dma) */
1057static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1058 .master = &omap44xx_l4_abe_hwmod,
1059 .slave = &omap44xx_dmic_hwmod,
1060 .clk = "ocp_abe_iclk",
1061 .addr = omap44xx_dmic_dma_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001062 .user = OCP_USER_SDMA,
1063};
1064
1065/* dmic slave ports */
1066static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1067 &omap44xx_l4_abe__dmic,
1068 &omap44xx_l4_abe__dmic_dma,
1069};
1070
1071static struct omap_hwmod omap44xx_dmic_hwmod = {
1072 .name = "dmic",
1073 .class = &omap44xx_dmic_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001074 .clkdm_name = "abe_clkdm",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001075 .mpu_irqs = omap44xx_dmic_irqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001076 .sdma_reqs = omap44xx_dmic_sdma_reqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001077 .main_clk = "dmic_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06001078 .prcm = {
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001079 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001080 .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001081 .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001082 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001083 },
1084 },
1085 .slaves = omap44xx_dmic_slaves,
1086 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001087};
1088
1089/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001090 * 'dsp' class
1091 * dsp sub-system
1092 */
1093
1094static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001095 .name = "dsp",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001096};
1097
1098/* dsp */
1099static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1100 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001101 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001102};
1103
1104static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1105 { .name = "mmu_cache", .rst_shift = 1 },
1106};
1107
1108static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1109 { .name = "dsp", .rst_shift = 0 },
1110};
1111
1112/* dsp -> iva */
1113static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1114 .master = &omap44xx_dsp_hwmod,
1115 .slave = &omap44xx_iva_hwmod,
1116 .clk = "dpll_iva_m5x2_ck",
1117};
1118
1119/* dsp master ports */
1120static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1121 &omap44xx_dsp__l3_main_1,
1122 &omap44xx_dsp__l4_abe,
1123 &omap44xx_dsp__iva,
1124};
1125
1126/* l4_cfg -> dsp */
1127static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1128 .master = &omap44xx_l4_cfg_hwmod,
1129 .slave = &omap44xx_dsp_hwmod,
1130 .clk = "l4_div_ck",
1131 .user = OCP_USER_MPU | OCP_USER_SDMA,
1132};
1133
1134/* dsp slave ports */
1135static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1136 &omap44xx_l4_cfg__dsp,
1137};
1138
1139/* Pseudo hwmod for reset control purpose only */
1140static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1141 .name = "dsp_c0",
1142 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001143 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001144 .flags = HWMOD_INIT_NO_RESET,
1145 .rst_lines = omap44xx_dsp_c0_resets,
1146 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1147 .prcm = {
1148 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06001149 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001150 },
1151 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001152};
1153
1154static struct omap_hwmod omap44xx_dsp_hwmod = {
1155 .name = "dsp",
1156 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001157 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001158 .mpu_irqs = omap44xx_dsp_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001159 .rst_lines = omap44xx_dsp_resets,
1160 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1161 .main_clk = "dsp_fck",
1162 .prcm = {
1163 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001164 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06001165 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001166 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001167 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001168 },
1169 },
1170 .slaves = omap44xx_dsp_slaves,
1171 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1172 .masters = omap44xx_dsp_masters,
1173 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001174};
1175
1176/*
Benoit Coussond63bd742011-01-27 11:17:03 +00001177 * 'dss' class
1178 * display sub-system
1179 */
1180
1181static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
1182 .rev_offs = 0x0000,
1183 .syss_offs = 0x0014,
1184 .sysc_flags = SYSS_HAS_RESET_STATUS,
1185};
1186
1187static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1188 .name = "dss",
1189 .sysc = &omap44xx_dss_sysc,
1190};
1191
1192/* dss */
1193/* dss master ports */
1194static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1195 &omap44xx_dss__l3_main_1,
1196};
1197
1198static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1199 {
1200 .pa_start = 0x58000000,
1201 .pa_end = 0x5800007f,
1202 .flags = ADDR_TYPE_RT
1203 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001204 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001205};
1206
1207/* l3_main_2 -> dss */
1208static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1209 .master = &omap44xx_l3_main_2_hwmod,
1210 .slave = &omap44xx_dss_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001211 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001212 .addr = omap44xx_dss_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001213 .user = OCP_USER_SDMA,
1214};
1215
1216static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1217 {
1218 .pa_start = 0x48040000,
1219 .pa_end = 0x4804007f,
1220 .flags = ADDR_TYPE_RT
1221 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001222 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001223};
1224
1225/* l4_per -> dss */
1226static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1227 .master = &omap44xx_l4_per_hwmod,
1228 .slave = &omap44xx_dss_hwmod,
1229 .clk = "l4_div_ck",
1230 .addr = omap44xx_dss_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001231 .user = OCP_USER_MPU,
1232};
1233
1234/* dss slave ports */
1235static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1236 &omap44xx_l3_main_2__dss,
1237 &omap44xx_l4_per__dss,
1238};
1239
1240static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1241 { .role = "sys_clk", .clk = "dss_sys_clk" },
1242 { .role = "tv_clk", .clk = "dss_tv_clk" },
1243 { .role = "dss_clk", .clk = "dss_dss_clk" },
1244 { .role = "video_clk", .clk = "dss_48mhz_clk" },
1245};
1246
1247static struct omap_hwmod omap44xx_dss_hwmod = {
1248 .name = "dss_core",
1249 .class = &omap44xx_dss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001250 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001251 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001252 .prcm = {
1253 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001254 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001255 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001256 },
1257 },
1258 .opt_clks = dss_opt_clks,
1259 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1260 .slaves = omap44xx_dss_slaves,
1261 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1262 .masters = omap44xx_dss_masters,
1263 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
Benoit Coussond63bd742011-01-27 11:17:03 +00001264};
1265
1266/*
1267 * 'dispc' class
1268 * display controller
1269 */
1270
1271static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
1272 .rev_offs = 0x0000,
1273 .sysc_offs = 0x0010,
1274 .syss_offs = 0x0014,
1275 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1276 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
1277 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1278 SYSS_HAS_RESET_STATUS),
1279 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1280 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1281 .sysc_fields = &omap_hwmod_sysc_type1,
1282};
1283
1284static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1285 .name = "dispc",
1286 .sysc = &omap44xx_dispc_sysc,
1287};
1288
1289/* dss_dispc */
1290static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1291static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1292 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001293 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001294};
1295
1296static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1297 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001298 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001299};
1300
1301static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1302 {
1303 .pa_start = 0x58001000,
1304 .pa_end = 0x58001fff,
1305 .flags = ADDR_TYPE_RT
1306 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001307 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001308};
1309
1310/* l3_main_2 -> dss_dispc */
1311static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1312 .master = &omap44xx_l3_main_2_hwmod,
1313 .slave = &omap44xx_dss_dispc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001314 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001315 .addr = omap44xx_dss_dispc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001316 .user = OCP_USER_SDMA,
1317};
1318
1319static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1320 {
1321 .pa_start = 0x48041000,
1322 .pa_end = 0x48041fff,
1323 .flags = ADDR_TYPE_RT
1324 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001325 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001326};
1327
1328/* l4_per -> dss_dispc */
1329static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1330 .master = &omap44xx_l4_per_hwmod,
1331 .slave = &omap44xx_dss_dispc_hwmod,
1332 .clk = "l4_div_ck",
1333 .addr = omap44xx_dss_dispc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001334 .user = OCP_USER_MPU,
1335};
1336
1337/* dss_dispc slave ports */
1338static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1339 &omap44xx_l3_main_2__dss_dispc,
1340 &omap44xx_l4_per__dss_dispc,
1341};
1342
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001343static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = {
1344 { .role = "sys_clk", .clk = "dss_sys_clk" },
1345 { .role = "tv_clk", .clk = "dss_tv_clk" },
1346 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
1347};
1348
Benoit Coussond63bd742011-01-27 11:17:03 +00001349static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1350 .name = "dss_dispc",
1351 .class = &omap44xx_dispc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001352 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001353 .mpu_irqs = omap44xx_dss_dispc_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001354 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001355 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001356 .prcm = {
1357 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001358 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001359 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001360 },
1361 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001362 .opt_clks = dss_dispc_opt_clks,
1363 .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001364 .slaves = omap44xx_dss_dispc_slaves,
1365 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001366};
1367
1368/*
1369 * 'dsi' class
1370 * display serial interface controller
1371 */
1372
1373static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1374 .rev_offs = 0x0000,
1375 .sysc_offs = 0x0010,
1376 .syss_offs = 0x0014,
1377 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1378 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1379 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1380 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1381 .sysc_fields = &omap_hwmod_sysc_type1,
1382};
1383
1384static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1385 .name = "dsi",
1386 .sysc = &omap44xx_dsi_sysc,
1387};
1388
1389/* dss_dsi1 */
1390static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1391static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1392 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001393 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001394};
1395
1396static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1397 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001398 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001399};
1400
1401static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1402 {
1403 .pa_start = 0x58004000,
1404 .pa_end = 0x580041ff,
1405 .flags = ADDR_TYPE_RT
1406 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001407 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001408};
1409
1410/* l3_main_2 -> dss_dsi1 */
1411static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1412 .master = &omap44xx_l3_main_2_hwmod,
1413 .slave = &omap44xx_dss_dsi1_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001414 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001415 .addr = omap44xx_dss_dsi1_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001416 .user = OCP_USER_SDMA,
1417};
1418
1419static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1420 {
1421 .pa_start = 0x48044000,
1422 .pa_end = 0x480441ff,
1423 .flags = ADDR_TYPE_RT
1424 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001425 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001426};
1427
1428/* l4_per -> dss_dsi1 */
1429static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1430 .master = &omap44xx_l4_per_hwmod,
1431 .slave = &omap44xx_dss_dsi1_hwmod,
1432 .clk = "l4_div_ck",
1433 .addr = omap44xx_dss_dsi1_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001434 .user = OCP_USER_MPU,
1435};
1436
1437/* dss_dsi1 slave ports */
1438static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1439 &omap44xx_l3_main_2__dss_dsi1,
1440 &omap44xx_l4_per__dss_dsi1,
1441};
1442
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001443static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1444 { .role = "sys_clk", .clk = "dss_sys_clk" },
1445};
1446
Benoit Coussond63bd742011-01-27 11:17:03 +00001447static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1448 .name = "dss_dsi1",
1449 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001450 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001451 .mpu_irqs = omap44xx_dss_dsi1_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001452 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001453 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001454 .prcm = {
1455 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001456 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001457 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001458 },
1459 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001460 .opt_clks = dss_dsi1_opt_clks,
1461 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001462 .slaves = omap44xx_dss_dsi1_slaves,
1463 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001464};
1465
1466/* dss_dsi2 */
1467static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1468static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1469 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001470 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001471};
1472
1473static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1474 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001475 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001476};
1477
1478static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1479 {
1480 .pa_start = 0x58005000,
1481 .pa_end = 0x580051ff,
1482 .flags = ADDR_TYPE_RT
1483 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001484 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001485};
1486
1487/* l3_main_2 -> dss_dsi2 */
1488static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1489 .master = &omap44xx_l3_main_2_hwmod,
1490 .slave = &omap44xx_dss_dsi2_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001491 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001492 .addr = omap44xx_dss_dsi2_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001493 .user = OCP_USER_SDMA,
1494};
1495
1496static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1497 {
1498 .pa_start = 0x48045000,
1499 .pa_end = 0x480451ff,
1500 .flags = ADDR_TYPE_RT
1501 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001502 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001503};
1504
1505/* l4_per -> dss_dsi2 */
1506static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1507 .master = &omap44xx_l4_per_hwmod,
1508 .slave = &omap44xx_dss_dsi2_hwmod,
1509 .clk = "l4_div_ck",
1510 .addr = omap44xx_dss_dsi2_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001511 .user = OCP_USER_MPU,
1512};
1513
1514/* dss_dsi2 slave ports */
1515static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1516 &omap44xx_l3_main_2__dss_dsi2,
1517 &omap44xx_l4_per__dss_dsi2,
1518};
1519
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001520static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1521 { .role = "sys_clk", .clk = "dss_sys_clk" },
1522};
1523
Benoit Coussond63bd742011-01-27 11:17:03 +00001524static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1525 .name = "dss_dsi2",
1526 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001527 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001528 .mpu_irqs = omap44xx_dss_dsi2_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001529 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001530 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001531 .prcm = {
1532 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001533 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001534 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001535 },
1536 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001537 .opt_clks = dss_dsi2_opt_clks,
1538 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001539 .slaves = omap44xx_dss_dsi2_slaves,
1540 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001541};
1542
1543/*
1544 * 'hdmi' class
1545 * hdmi controller
1546 */
1547
1548static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1549 .rev_offs = 0x0000,
1550 .sysc_offs = 0x0010,
1551 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1552 SYSC_HAS_SOFTRESET),
1553 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1554 SIDLE_SMART_WKUP),
1555 .sysc_fields = &omap_hwmod_sysc_type2,
1556};
1557
1558static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1559 .name = "hdmi",
1560 .sysc = &omap44xx_hdmi_sysc,
1561};
1562
1563/* dss_hdmi */
1564static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1565static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1566 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001567 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001568};
1569
1570static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1571 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001572 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001573};
1574
1575static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1576 {
1577 .pa_start = 0x58006000,
1578 .pa_end = 0x58006fff,
1579 .flags = ADDR_TYPE_RT
1580 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001581 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001582};
1583
1584/* l3_main_2 -> dss_hdmi */
1585static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1586 .master = &omap44xx_l3_main_2_hwmod,
1587 .slave = &omap44xx_dss_hdmi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001588 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001589 .addr = omap44xx_dss_hdmi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001590 .user = OCP_USER_SDMA,
1591};
1592
1593static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1594 {
1595 .pa_start = 0x48046000,
1596 .pa_end = 0x48046fff,
1597 .flags = ADDR_TYPE_RT
1598 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001599 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001600};
1601
1602/* l4_per -> dss_hdmi */
1603static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1604 .master = &omap44xx_l4_per_hwmod,
1605 .slave = &omap44xx_dss_hdmi_hwmod,
1606 .clk = "l4_div_ck",
1607 .addr = omap44xx_dss_hdmi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001608 .user = OCP_USER_MPU,
1609};
1610
1611/* dss_hdmi slave ports */
1612static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1613 &omap44xx_l3_main_2__dss_hdmi,
1614 &omap44xx_l4_per__dss_hdmi,
1615};
1616
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001617static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1618 { .role = "sys_clk", .clk = "dss_sys_clk" },
1619};
1620
Benoit Coussond63bd742011-01-27 11:17:03 +00001621static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1622 .name = "dss_hdmi",
1623 .class = &omap44xx_hdmi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001624 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001625 .mpu_irqs = omap44xx_dss_hdmi_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001626 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001627 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001628 .prcm = {
1629 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001630 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001631 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001632 },
1633 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001634 .opt_clks = dss_hdmi_opt_clks,
1635 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001636 .slaves = omap44xx_dss_hdmi_slaves,
1637 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001638};
1639
1640/*
1641 * 'rfbi' class
1642 * remote frame buffer interface
1643 */
1644
1645static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1646 .rev_offs = 0x0000,
1647 .sysc_offs = 0x0010,
1648 .syss_offs = 0x0014,
1649 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1650 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1651 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1652 .sysc_fields = &omap_hwmod_sysc_type1,
1653};
1654
1655static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1656 .name = "rfbi",
1657 .sysc = &omap44xx_rfbi_sysc,
1658};
1659
1660/* dss_rfbi */
1661static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1662static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1663 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001664 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001665};
1666
1667static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1668 {
1669 .pa_start = 0x58002000,
1670 .pa_end = 0x580020ff,
1671 .flags = ADDR_TYPE_RT
1672 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001673 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001674};
1675
1676/* l3_main_2 -> dss_rfbi */
1677static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1678 .master = &omap44xx_l3_main_2_hwmod,
1679 .slave = &omap44xx_dss_rfbi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001680 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001681 .addr = omap44xx_dss_rfbi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001682 .user = OCP_USER_SDMA,
1683};
1684
1685static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1686 {
1687 .pa_start = 0x48042000,
1688 .pa_end = 0x480420ff,
1689 .flags = ADDR_TYPE_RT
1690 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001691 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001692};
1693
1694/* l4_per -> dss_rfbi */
1695static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1696 .master = &omap44xx_l4_per_hwmod,
1697 .slave = &omap44xx_dss_rfbi_hwmod,
1698 .clk = "l4_div_ck",
1699 .addr = omap44xx_dss_rfbi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001700 .user = OCP_USER_MPU,
1701};
1702
1703/* dss_rfbi slave ports */
1704static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1705 &omap44xx_l3_main_2__dss_rfbi,
1706 &omap44xx_l4_per__dss_rfbi,
1707};
1708
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001709static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1710 { .role = "ick", .clk = "dss_fck" },
1711};
1712
Benoit Coussond63bd742011-01-27 11:17:03 +00001713static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1714 .name = "dss_rfbi",
1715 .class = &omap44xx_rfbi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001716 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001717 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001718 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001719 .prcm = {
1720 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001721 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001722 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001723 },
1724 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001725 .opt_clks = dss_rfbi_opt_clks,
1726 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001727 .slaves = omap44xx_dss_rfbi_slaves,
1728 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001729};
1730
1731/*
1732 * 'venc' class
1733 * video encoder
1734 */
1735
1736static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1737 .name = "venc",
1738};
1739
1740/* dss_venc */
1741static struct omap_hwmod omap44xx_dss_venc_hwmod;
1742static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1743 {
1744 .pa_start = 0x58003000,
1745 .pa_end = 0x580030ff,
1746 .flags = ADDR_TYPE_RT
1747 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001748 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001749};
1750
1751/* l3_main_2 -> dss_venc */
1752static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1753 .master = &omap44xx_l3_main_2_hwmod,
1754 .slave = &omap44xx_dss_venc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001755 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001756 .addr = omap44xx_dss_venc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001757 .user = OCP_USER_SDMA,
1758};
1759
1760static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1761 {
1762 .pa_start = 0x48043000,
1763 .pa_end = 0x480430ff,
1764 .flags = ADDR_TYPE_RT
1765 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001766 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001767};
1768
1769/* l4_per -> dss_venc */
1770static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1771 .master = &omap44xx_l4_per_hwmod,
1772 .slave = &omap44xx_dss_venc_hwmod,
1773 .clk = "l4_div_ck",
1774 .addr = omap44xx_dss_venc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001775 .user = OCP_USER_MPU,
1776};
1777
1778/* dss_venc slave ports */
1779static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1780 &omap44xx_l3_main_2__dss_venc,
1781 &omap44xx_l4_per__dss_venc,
1782};
1783
1784static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1785 .name = "dss_venc",
1786 .class = &omap44xx_venc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001787 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001788 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001789 .prcm = {
1790 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001791 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001792 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001793 },
1794 },
1795 .slaves = omap44xx_dss_venc_slaves,
1796 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001797};
1798
1799/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001800 * 'gpio' class
1801 * general purpose io module
1802 */
1803
1804static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1805 .rev_offs = 0x0000,
1806 .sysc_offs = 0x0010,
1807 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001808 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1809 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1810 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001811 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1812 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001813 .sysc_fields = &omap_hwmod_sysc_type1,
1814};
1815
1816static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001817 .name = "gpio",
1818 .sysc = &omap44xx_gpio_sysc,
1819 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001820};
1821
1822/* gpio dev_attr */
1823static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001824 .bank_width = 32,
1825 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001826};
1827
1828/* gpio1 */
1829static struct omap_hwmod omap44xx_gpio1_hwmod;
1830static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1831 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001832 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001833};
1834
1835static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1836 {
1837 .pa_start = 0x4a310000,
1838 .pa_end = 0x4a3101ff,
1839 .flags = ADDR_TYPE_RT
1840 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001841 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001842};
1843
1844/* l4_wkup -> gpio1 */
1845static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1846 .master = &omap44xx_l4_wkup_hwmod,
1847 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001848 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001849 .addr = omap44xx_gpio1_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001850 .user = OCP_USER_MPU | OCP_USER_SDMA,
1851};
1852
1853/* gpio1 slave ports */
1854static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1855 &omap44xx_l4_wkup__gpio1,
1856};
1857
1858static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001859 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001860};
1861
1862static struct omap_hwmod omap44xx_gpio1_hwmod = {
1863 .name = "gpio1",
1864 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001865 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001866 .mpu_irqs = omap44xx_gpio1_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001867 .main_clk = "gpio1_ick",
1868 .prcm = {
1869 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001870 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001871 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001872 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001873 },
1874 },
1875 .opt_clks = gpio1_opt_clks,
1876 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1877 .dev_attr = &gpio_dev_attr,
1878 .slaves = omap44xx_gpio1_slaves,
1879 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001880};
1881
1882/* gpio2 */
1883static struct omap_hwmod omap44xx_gpio2_hwmod;
1884static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1885 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001886 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001887};
1888
1889static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1890 {
1891 .pa_start = 0x48055000,
1892 .pa_end = 0x480551ff,
1893 .flags = ADDR_TYPE_RT
1894 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001895 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001896};
1897
1898/* l4_per -> gpio2 */
1899static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1900 .master = &omap44xx_l4_per_hwmod,
1901 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001902 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001903 .addr = omap44xx_gpio2_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001904 .user = OCP_USER_MPU | OCP_USER_SDMA,
1905};
1906
1907/* gpio2 slave ports */
1908static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1909 &omap44xx_l4_per__gpio2,
1910};
1911
1912static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001913 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001914};
1915
1916static struct omap_hwmod omap44xx_gpio2_hwmod = {
1917 .name = "gpio2",
1918 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001919 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001920 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001921 .mpu_irqs = omap44xx_gpio2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001922 .main_clk = "gpio2_ick",
1923 .prcm = {
1924 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001925 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001926 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001927 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001928 },
1929 },
1930 .opt_clks = gpio2_opt_clks,
1931 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1932 .dev_attr = &gpio_dev_attr,
1933 .slaves = omap44xx_gpio2_slaves,
1934 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001935};
1936
1937/* gpio3 */
1938static struct omap_hwmod omap44xx_gpio3_hwmod;
1939static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1940 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001941 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001942};
1943
1944static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1945 {
1946 .pa_start = 0x48057000,
1947 .pa_end = 0x480571ff,
1948 .flags = ADDR_TYPE_RT
1949 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001950 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001951};
1952
1953/* l4_per -> gpio3 */
1954static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1955 .master = &omap44xx_l4_per_hwmod,
1956 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001957 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001958 .addr = omap44xx_gpio3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001959 .user = OCP_USER_MPU | OCP_USER_SDMA,
1960};
1961
1962/* gpio3 slave ports */
1963static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1964 &omap44xx_l4_per__gpio3,
1965};
1966
1967static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001968 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001969};
1970
1971static struct omap_hwmod omap44xx_gpio3_hwmod = {
1972 .name = "gpio3",
1973 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001974 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001975 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001976 .mpu_irqs = omap44xx_gpio3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001977 .main_clk = "gpio3_ick",
1978 .prcm = {
1979 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001980 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001981 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001982 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001983 },
1984 },
1985 .opt_clks = gpio3_opt_clks,
1986 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1987 .dev_attr = &gpio_dev_attr,
1988 .slaves = omap44xx_gpio3_slaves,
1989 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001990};
1991
1992/* gpio4 */
1993static struct omap_hwmod omap44xx_gpio4_hwmod;
1994static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1995 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001996 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001997};
1998
1999static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
2000 {
2001 .pa_start = 0x48059000,
2002 .pa_end = 0x480591ff,
2003 .flags = ADDR_TYPE_RT
2004 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002005 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002006};
2007
2008/* l4_per -> gpio4 */
2009static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2010 .master = &omap44xx_l4_per_hwmod,
2011 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002012 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002013 .addr = omap44xx_gpio4_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002014 .user = OCP_USER_MPU | OCP_USER_SDMA,
2015};
2016
2017/* gpio4 slave ports */
2018static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2019 &omap44xx_l4_per__gpio4,
2020};
2021
2022static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002023 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002024};
2025
2026static struct omap_hwmod omap44xx_gpio4_hwmod = {
2027 .name = "gpio4",
2028 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002029 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002030 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002031 .mpu_irqs = omap44xx_gpio4_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002032 .main_clk = "gpio4_ick",
2033 .prcm = {
2034 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002035 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002036 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002037 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002038 },
2039 },
2040 .opt_clks = gpio4_opt_clks,
2041 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2042 .dev_attr = &gpio_dev_attr,
2043 .slaves = omap44xx_gpio4_slaves,
2044 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002045};
2046
2047/* gpio5 */
2048static struct omap_hwmod omap44xx_gpio5_hwmod;
2049static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2050 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002051 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002052};
2053
2054static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2055 {
2056 .pa_start = 0x4805b000,
2057 .pa_end = 0x4805b1ff,
2058 .flags = ADDR_TYPE_RT
2059 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002060 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002061};
2062
2063/* l4_per -> gpio5 */
2064static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2065 .master = &omap44xx_l4_per_hwmod,
2066 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002067 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002068 .addr = omap44xx_gpio5_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002069 .user = OCP_USER_MPU | OCP_USER_SDMA,
2070};
2071
2072/* gpio5 slave ports */
2073static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2074 &omap44xx_l4_per__gpio5,
2075};
2076
2077static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002078 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002079};
2080
2081static struct omap_hwmod omap44xx_gpio5_hwmod = {
2082 .name = "gpio5",
2083 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002084 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002085 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002086 .mpu_irqs = omap44xx_gpio5_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002087 .main_clk = "gpio5_ick",
2088 .prcm = {
2089 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002090 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002091 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002092 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002093 },
2094 },
2095 .opt_clks = gpio5_opt_clks,
2096 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2097 .dev_attr = &gpio_dev_attr,
2098 .slaves = omap44xx_gpio5_slaves,
2099 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002100};
2101
2102/* gpio6 */
2103static struct omap_hwmod omap44xx_gpio6_hwmod;
2104static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2105 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002106 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002107};
2108
2109static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2110 {
2111 .pa_start = 0x4805d000,
2112 .pa_end = 0x4805d1ff,
2113 .flags = ADDR_TYPE_RT
2114 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002115 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002116};
2117
2118/* l4_per -> gpio6 */
2119static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2120 .master = &omap44xx_l4_per_hwmod,
2121 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002122 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002123 .addr = omap44xx_gpio6_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002124 .user = OCP_USER_MPU | OCP_USER_SDMA,
2125};
2126
2127/* gpio6 slave ports */
2128static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2129 &omap44xx_l4_per__gpio6,
2130};
2131
2132static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002133 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002134};
2135
2136static struct omap_hwmod omap44xx_gpio6_hwmod = {
2137 .name = "gpio6",
2138 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002139 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002140 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002141 .mpu_irqs = omap44xx_gpio6_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002142 .main_clk = "gpio6_ick",
2143 .prcm = {
2144 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002145 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002146 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002147 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002148 },
2149 },
2150 .opt_clks = gpio6_opt_clks,
2151 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2152 .dev_attr = &gpio_dev_attr,
2153 .slaves = omap44xx_gpio6_slaves,
2154 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002155};
2156
2157/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002158 * 'hsi' class
2159 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2160 * serial if)
2161 */
2162
2163static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2164 .rev_offs = 0x0000,
2165 .sysc_offs = 0x0010,
2166 .syss_offs = 0x0014,
2167 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2168 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2169 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2170 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2171 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002172 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002173 .sysc_fields = &omap_hwmod_sysc_type1,
2174};
2175
2176static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2177 .name = "hsi",
2178 .sysc = &omap44xx_hsi_sysc,
2179};
2180
2181/* hsi */
2182static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2183 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2184 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2185 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002186 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002187};
2188
2189/* hsi master ports */
2190static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2191 &omap44xx_hsi__l3_main_2,
2192};
2193
2194static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2195 {
2196 .pa_start = 0x4a058000,
2197 .pa_end = 0x4a05bfff,
2198 .flags = ADDR_TYPE_RT
2199 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002200 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002201};
2202
2203/* l4_cfg -> hsi */
2204static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2205 .master = &omap44xx_l4_cfg_hwmod,
2206 .slave = &omap44xx_hsi_hwmod,
2207 .clk = "l4_div_ck",
2208 .addr = omap44xx_hsi_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002209 .user = OCP_USER_MPU | OCP_USER_SDMA,
2210};
2211
2212/* hsi slave ports */
2213static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2214 &omap44xx_l4_cfg__hsi,
2215};
2216
2217static struct omap_hwmod omap44xx_hsi_hwmod = {
2218 .name = "hsi",
2219 .class = &omap44xx_hsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002220 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002221 .mpu_irqs = omap44xx_hsi_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002222 .main_clk = "hsi_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002223 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002224 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002225 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002226 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002227 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002228 },
2229 },
2230 .slaves = omap44xx_hsi_slaves,
2231 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2232 .masters = omap44xx_hsi_masters,
2233 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002234};
2235
2236/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302237 * 'i2c' class
2238 * multimaster high-speed i2c controller
2239 */
2240
2241static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2242 .sysc_offs = 0x0010,
2243 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002244 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2245 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002246 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002247 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2248 SIDLE_SMART_WKUP),
Benoit Coussonf7764712010-09-21 19:37:14 +05302249 .sysc_fields = &omap_hwmod_sysc_type1,
2250};
2251
2252static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002253 .name = "i2c",
2254 .sysc = &omap44xx_i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06002255 .rev = OMAP_I2C_IP_VERSION_2,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002256 .reset = &omap_i2c_reset,
Benoit Coussonf7764712010-09-21 19:37:14 +05302257};
2258
Andy Green4d4441a2011-07-10 05:27:16 -06002259static struct omap_i2c_dev_attr i2c_dev_attr = {
2260 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2261};
2262
Benoit Coussonf7764712010-09-21 19:37:14 +05302263/* i2c1 */
2264static struct omap_hwmod omap44xx_i2c1_hwmod;
2265static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2266 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002267 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302268};
2269
2270static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2271 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2272 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002273 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302274};
2275
2276static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2277 {
2278 .pa_start = 0x48070000,
2279 .pa_end = 0x480700ff,
2280 .flags = ADDR_TYPE_RT
2281 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002282 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302283};
2284
2285/* l4_per -> i2c1 */
2286static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2287 .master = &omap44xx_l4_per_hwmod,
2288 .slave = &omap44xx_i2c1_hwmod,
2289 .clk = "l4_div_ck",
2290 .addr = omap44xx_i2c1_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302291 .user = OCP_USER_MPU | OCP_USER_SDMA,
2292};
2293
2294/* i2c1 slave ports */
2295static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2296 &omap44xx_l4_per__i2c1,
2297};
2298
2299static struct omap_hwmod omap44xx_i2c1_hwmod = {
2300 .name = "i2c1",
2301 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002302 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002303 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302304 .mpu_irqs = omap44xx_i2c1_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302305 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302306 .main_clk = "i2c1_fck",
2307 .prcm = {
2308 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002309 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002310 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002311 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302312 },
2313 },
2314 .slaves = omap44xx_i2c1_slaves,
2315 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002316 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302317};
2318
2319/* i2c2 */
2320static struct omap_hwmod omap44xx_i2c2_hwmod;
2321static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2322 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002323 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302324};
2325
2326static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2327 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2328 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002329 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302330};
2331
2332static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2333 {
2334 .pa_start = 0x48072000,
2335 .pa_end = 0x480720ff,
2336 .flags = ADDR_TYPE_RT
2337 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002338 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302339};
2340
2341/* l4_per -> i2c2 */
2342static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2343 .master = &omap44xx_l4_per_hwmod,
2344 .slave = &omap44xx_i2c2_hwmod,
2345 .clk = "l4_div_ck",
2346 .addr = omap44xx_i2c2_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302347 .user = OCP_USER_MPU | OCP_USER_SDMA,
2348};
2349
2350/* i2c2 slave ports */
2351static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2352 &omap44xx_l4_per__i2c2,
2353};
2354
2355static struct omap_hwmod omap44xx_i2c2_hwmod = {
2356 .name = "i2c2",
2357 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002358 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002359 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302360 .mpu_irqs = omap44xx_i2c2_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302361 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302362 .main_clk = "i2c2_fck",
2363 .prcm = {
2364 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002365 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002366 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002367 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302368 },
2369 },
2370 .slaves = omap44xx_i2c2_slaves,
2371 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002372 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302373};
2374
2375/* i2c3 */
2376static struct omap_hwmod omap44xx_i2c3_hwmod;
2377static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2378 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002379 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302380};
2381
2382static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2383 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2384 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002385 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302386};
2387
2388static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2389 {
2390 .pa_start = 0x48060000,
2391 .pa_end = 0x480600ff,
2392 .flags = ADDR_TYPE_RT
2393 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002394 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302395};
2396
2397/* l4_per -> i2c3 */
2398static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2399 .master = &omap44xx_l4_per_hwmod,
2400 .slave = &omap44xx_i2c3_hwmod,
2401 .clk = "l4_div_ck",
2402 .addr = omap44xx_i2c3_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302403 .user = OCP_USER_MPU | OCP_USER_SDMA,
2404};
2405
2406/* i2c3 slave ports */
2407static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2408 &omap44xx_l4_per__i2c3,
2409};
2410
2411static struct omap_hwmod omap44xx_i2c3_hwmod = {
2412 .name = "i2c3",
2413 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002414 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002415 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302416 .mpu_irqs = omap44xx_i2c3_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302417 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302418 .main_clk = "i2c3_fck",
2419 .prcm = {
2420 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002421 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002422 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002423 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302424 },
2425 },
2426 .slaves = omap44xx_i2c3_slaves,
2427 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002428 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302429};
2430
2431/* i2c4 */
2432static struct omap_hwmod omap44xx_i2c4_hwmod;
2433static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2434 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002435 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302436};
2437
2438static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2439 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2440 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002441 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302442};
2443
2444static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2445 {
2446 .pa_start = 0x48350000,
2447 .pa_end = 0x483500ff,
2448 .flags = ADDR_TYPE_RT
2449 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002450 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302451};
2452
2453/* l4_per -> i2c4 */
2454static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2455 .master = &omap44xx_l4_per_hwmod,
2456 .slave = &omap44xx_i2c4_hwmod,
2457 .clk = "l4_div_ck",
2458 .addr = omap44xx_i2c4_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302459 .user = OCP_USER_MPU | OCP_USER_SDMA,
2460};
2461
2462/* i2c4 slave ports */
2463static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2464 &omap44xx_l4_per__i2c4,
2465};
2466
2467static struct omap_hwmod omap44xx_i2c4_hwmod = {
2468 .name = "i2c4",
2469 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002470 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002471 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302472 .mpu_irqs = omap44xx_i2c4_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302473 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302474 .main_clk = "i2c4_fck",
2475 .prcm = {
2476 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002477 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002478 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002479 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302480 },
2481 },
2482 .slaves = omap44xx_i2c4_slaves,
2483 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002484 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302485};
2486
2487/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002488 * 'ipu' class
2489 * imaging processor unit
2490 */
2491
2492static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2493 .name = "ipu",
2494};
2495
2496/* ipu */
2497static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2498 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002499 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002500};
2501
2502static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2503 { .name = "cpu0", .rst_shift = 0 },
2504};
2505
2506static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2507 { .name = "cpu1", .rst_shift = 1 },
2508};
2509
2510static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2511 { .name = "mmu_cache", .rst_shift = 2 },
2512};
2513
2514/* ipu master ports */
2515static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2516 &omap44xx_ipu__l3_main_2,
2517};
2518
2519/* l3_main_2 -> ipu */
2520static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2521 .master = &omap44xx_l3_main_2_hwmod,
2522 .slave = &omap44xx_ipu_hwmod,
2523 .clk = "l3_div_ck",
2524 .user = OCP_USER_MPU | OCP_USER_SDMA,
2525};
2526
2527/* ipu slave ports */
2528static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2529 &omap44xx_l3_main_2__ipu,
2530};
2531
2532/* Pseudo hwmod for reset control purpose only */
2533static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2534 .name = "ipu_c0",
2535 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002536 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002537 .flags = HWMOD_INIT_NO_RESET,
2538 .rst_lines = omap44xx_ipu_c0_resets,
2539 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002540 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002541 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002542 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002543 },
2544 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002545};
2546
2547/* Pseudo hwmod for reset control purpose only */
2548static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2549 .name = "ipu_c1",
2550 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002551 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002552 .flags = HWMOD_INIT_NO_RESET,
2553 .rst_lines = omap44xx_ipu_c1_resets,
2554 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002555 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002556 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002557 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002558 },
2559 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002560};
2561
2562static struct omap_hwmod omap44xx_ipu_hwmod = {
2563 .name = "ipu",
2564 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002565 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002566 .mpu_irqs = omap44xx_ipu_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002567 .rst_lines = omap44xx_ipu_resets,
2568 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2569 .main_clk = "ipu_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002570 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002571 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002572 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002573 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002574 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002575 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002576 },
2577 },
2578 .slaves = omap44xx_ipu_slaves,
2579 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2580 .masters = omap44xx_ipu_masters,
2581 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002582};
2583
2584/*
2585 * 'iss' class
2586 * external images sensor pixel data processor
2587 */
2588
2589static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2590 .rev_offs = 0x0000,
2591 .sysc_offs = 0x0010,
2592 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2593 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2594 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2595 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002596 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002597 .sysc_fields = &omap_hwmod_sysc_type2,
2598};
2599
2600static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2601 .name = "iss",
2602 .sysc = &omap44xx_iss_sysc,
2603};
2604
2605/* iss */
2606static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2607 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002608 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002609};
2610
2611static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2612 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2613 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2614 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2615 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002616 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002617};
2618
2619/* iss master ports */
2620static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2621 &omap44xx_iss__l3_main_2,
2622};
2623
2624static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2625 {
2626 .pa_start = 0x52000000,
2627 .pa_end = 0x520000ff,
2628 .flags = ADDR_TYPE_RT
2629 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002630 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002631};
2632
2633/* l3_main_2 -> iss */
2634static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2635 .master = &omap44xx_l3_main_2_hwmod,
2636 .slave = &omap44xx_iss_hwmod,
2637 .clk = "l3_div_ck",
2638 .addr = omap44xx_iss_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002639 .user = OCP_USER_MPU | OCP_USER_SDMA,
2640};
2641
2642/* iss slave ports */
2643static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2644 &omap44xx_l3_main_2__iss,
2645};
2646
2647static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2648 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2649};
2650
2651static struct omap_hwmod omap44xx_iss_hwmod = {
2652 .name = "iss",
2653 .class = &omap44xx_iss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002654 .clkdm_name = "iss_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002655 .mpu_irqs = omap44xx_iss_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002656 .sdma_reqs = omap44xx_iss_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002657 .main_clk = "iss_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002658 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002659 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002660 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002661 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002662 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002663 },
2664 },
2665 .opt_clks = iss_opt_clks,
2666 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2667 .slaves = omap44xx_iss_slaves,
2668 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2669 .masters = omap44xx_iss_masters,
2670 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002671};
2672
2673/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002674 * 'iva' class
2675 * multi-standard video encoder/decoder hardware accelerator
2676 */
2677
2678static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002679 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002680};
2681
2682/* iva */
2683static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2684 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2685 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2686 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002687 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002688};
2689
2690static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2691 { .name = "logic", .rst_shift = 2 },
2692};
2693
2694static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2695 { .name = "seq0", .rst_shift = 0 },
2696};
2697
2698static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2699 { .name = "seq1", .rst_shift = 1 },
2700};
2701
2702/* iva master ports */
2703static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2704 &omap44xx_iva__l3_main_2,
2705 &omap44xx_iva__l3_instr,
2706};
2707
2708static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2709 {
2710 .pa_start = 0x5a000000,
2711 .pa_end = 0x5a07ffff,
2712 .flags = ADDR_TYPE_RT
2713 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002714 { }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002715};
2716
2717/* l3_main_2 -> iva */
2718static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2719 .master = &omap44xx_l3_main_2_hwmod,
2720 .slave = &omap44xx_iva_hwmod,
2721 .clk = "l3_div_ck",
2722 .addr = omap44xx_iva_addrs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002723 .user = OCP_USER_MPU,
2724};
2725
2726/* iva slave ports */
2727static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2728 &omap44xx_dsp__iva,
2729 &omap44xx_l3_main_2__iva,
2730};
2731
2732/* Pseudo hwmod for reset control purpose only */
2733static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2734 .name = "iva_seq0",
2735 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002736 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002737 .flags = HWMOD_INIT_NO_RESET,
2738 .rst_lines = omap44xx_iva_seq0_resets,
2739 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2740 .prcm = {
2741 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002742 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002743 },
2744 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002745};
2746
2747/* Pseudo hwmod for reset control purpose only */
2748static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2749 .name = "iva_seq1",
2750 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002751 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002752 .flags = HWMOD_INIT_NO_RESET,
2753 .rst_lines = omap44xx_iva_seq1_resets,
2754 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2755 .prcm = {
2756 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002757 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002758 },
2759 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002760};
2761
2762static struct omap_hwmod omap44xx_iva_hwmod = {
2763 .name = "iva",
2764 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002765 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002766 .mpu_irqs = omap44xx_iva_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002767 .rst_lines = omap44xx_iva_resets,
2768 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2769 .main_clk = "iva_fck",
2770 .prcm = {
2771 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002772 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002773 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002774 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002775 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002776 },
2777 },
2778 .slaves = omap44xx_iva_slaves,
2779 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2780 .masters = omap44xx_iva_masters,
2781 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002782};
2783
2784/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002785 * 'kbd' class
2786 * keyboard controller
2787 */
2788
2789static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2790 .rev_offs = 0x0000,
2791 .sysc_offs = 0x0010,
2792 .syss_offs = 0x0014,
2793 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2794 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2795 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2796 SYSS_HAS_RESET_STATUS),
2797 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2798 .sysc_fields = &omap_hwmod_sysc_type1,
2799};
2800
2801static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2802 .name = "kbd",
2803 .sysc = &omap44xx_kbd_sysc,
2804};
2805
2806/* kbd */
2807static struct omap_hwmod omap44xx_kbd_hwmod;
2808static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2809 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002810 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002811};
2812
2813static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2814 {
2815 .pa_start = 0x4a31c000,
2816 .pa_end = 0x4a31c07f,
2817 .flags = ADDR_TYPE_RT
2818 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002819 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002820};
2821
2822/* l4_wkup -> kbd */
2823static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2824 .master = &omap44xx_l4_wkup_hwmod,
2825 .slave = &omap44xx_kbd_hwmod,
2826 .clk = "l4_wkup_clk_mux_ck",
2827 .addr = omap44xx_kbd_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002828 .user = OCP_USER_MPU | OCP_USER_SDMA,
2829};
2830
2831/* kbd slave ports */
2832static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2833 &omap44xx_l4_wkup__kbd,
2834};
2835
2836static struct omap_hwmod omap44xx_kbd_hwmod = {
2837 .name = "kbd",
2838 .class = &omap44xx_kbd_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002839 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002840 .mpu_irqs = omap44xx_kbd_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002841 .main_clk = "kbd_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002842 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002843 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002844 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002845 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002846 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002847 },
2848 },
2849 .slaves = omap44xx_kbd_slaves,
2850 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01002851};
2852
2853/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002854 * 'mailbox' class
2855 * mailbox module allowing communication between the on-chip processors using a
2856 * queued mailbox-interrupt mechanism.
2857 */
2858
2859static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2860 .rev_offs = 0x0000,
2861 .sysc_offs = 0x0010,
2862 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2863 SYSC_HAS_SOFTRESET),
2864 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2865 .sysc_fields = &omap_hwmod_sysc_type2,
2866};
2867
2868static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2869 .name = "mailbox",
2870 .sysc = &omap44xx_mailbox_sysc,
2871};
2872
2873/* mailbox */
2874static struct omap_hwmod omap44xx_mailbox_hwmod;
2875static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2876 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002877 { .irq = -1 }
Benoit Coussonec5df922011-02-02 19:27:21 +00002878};
2879
2880static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2881 {
2882 .pa_start = 0x4a0f4000,
2883 .pa_end = 0x4a0f41ff,
2884 .flags = ADDR_TYPE_RT
2885 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002886 { }
Benoit Coussonec5df922011-02-02 19:27:21 +00002887};
2888
2889/* l4_cfg -> mailbox */
2890static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2891 .master = &omap44xx_l4_cfg_hwmod,
2892 .slave = &omap44xx_mailbox_hwmod,
2893 .clk = "l4_div_ck",
2894 .addr = omap44xx_mailbox_addrs,
Benoit Coussonec5df922011-02-02 19:27:21 +00002895 .user = OCP_USER_MPU | OCP_USER_SDMA,
2896};
2897
2898/* mailbox slave ports */
2899static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2900 &omap44xx_l4_cfg__mailbox,
2901};
2902
2903static struct omap_hwmod omap44xx_mailbox_hwmod = {
2904 .name = "mailbox",
2905 .class = &omap44xx_mailbox_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002906 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussonec5df922011-02-02 19:27:21 +00002907 .mpu_irqs = omap44xx_mailbox_irqs,
Benoit Cousson00fe6102011-07-09 19:14:28 -06002908 .prcm = {
Benoit Coussonec5df922011-02-02 19:27:21 +00002909 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002910 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002911 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
Benoit Coussonec5df922011-02-02 19:27:21 +00002912 },
2913 },
2914 .slaves = omap44xx_mailbox_slaves,
2915 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
Benoit Coussonec5df922011-02-02 19:27:21 +00002916};
2917
2918/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002919 * 'mcbsp' class
2920 * multi channel buffered serial port controller
2921 */
2922
2923static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2924 .sysc_offs = 0x008c,
2925 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2926 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2927 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2928 .sysc_fields = &omap_hwmod_sysc_type1,
2929};
2930
2931static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2932 .name = "mcbsp",
2933 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302934 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002935};
2936
2937/* mcbsp1 */
2938static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2939static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2940 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002941 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002942};
2943
2944static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2945 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2946 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002947 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002948};
2949
2950static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2951 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302952 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002953 .pa_start = 0x40122000,
2954 .pa_end = 0x401220ff,
2955 .flags = ADDR_TYPE_RT
2956 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002957 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002958};
2959
2960/* l4_abe -> mcbsp1 */
2961static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2962 .master = &omap44xx_l4_abe_hwmod,
2963 .slave = &omap44xx_mcbsp1_hwmod,
2964 .clk = "ocp_abe_iclk",
2965 .addr = omap44xx_mcbsp1_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002966 .user = OCP_USER_MPU,
2967};
2968
2969static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2970 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302971 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002972 .pa_start = 0x49022000,
2973 .pa_end = 0x490220ff,
2974 .flags = ADDR_TYPE_RT
2975 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002976 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002977};
2978
2979/* l4_abe -> mcbsp1 (dma) */
2980static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2981 .master = &omap44xx_l4_abe_hwmod,
2982 .slave = &omap44xx_mcbsp1_hwmod,
2983 .clk = "ocp_abe_iclk",
2984 .addr = omap44xx_mcbsp1_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002985 .user = OCP_USER_SDMA,
2986};
2987
2988/* mcbsp1 slave ports */
2989static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2990 &omap44xx_l4_abe__mcbsp1,
2991 &omap44xx_l4_abe__mcbsp1_dma,
2992};
2993
2994static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2995 .name = "mcbsp1",
2996 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002997 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002998 .mpu_irqs = omap44xx_mcbsp1_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002999 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003000 .main_clk = "mcbsp1_fck",
3001 .prcm = {
3002 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003003 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003004 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003005 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003006 },
3007 },
3008 .slaves = omap44xx_mcbsp1_slaves,
3009 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003010};
3011
3012/* mcbsp2 */
3013static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3014static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3015 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003016 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003017};
3018
3019static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3020 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
3021 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003022 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003023};
3024
3025static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3026 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303027 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003028 .pa_start = 0x40124000,
3029 .pa_end = 0x401240ff,
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 -> mcbsp2 */
3036static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3037 .master = &omap44xx_l4_abe_hwmod,
3038 .slave = &omap44xx_mcbsp2_hwmod,
3039 .clk = "ocp_abe_iclk",
3040 .addr = omap44xx_mcbsp2_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003041 .user = OCP_USER_MPU,
3042};
3043
3044static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3045 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303046 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003047 .pa_start = 0x49024000,
3048 .pa_end = 0x490240ff,
3049 .flags = ADDR_TYPE_RT
3050 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003051 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003052};
3053
3054/* l4_abe -> mcbsp2 (dma) */
3055static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3056 .master = &omap44xx_l4_abe_hwmod,
3057 .slave = &omap44xx_mcbsp2_hwmod,
3058 .clk = "ocp_abe_iclk",
3059 .addr = omap44xx_mcbsp2_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003060 .user = OCP_USER_SDMA,
3061};
3062
3063/* mcbsp2 slave ports */
3064static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3065 &omap44xx_l4_abe__mcbsp2,
3066 &omap44xx_l4_abe__mcbsp2_dma,
3067};
3068
3069static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3070 .name = "mcbsp2",
3071 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003072 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003073 .mpu_irqs = omap44xx_mcbsp2_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003074 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003075 .main_clk = "mcbsp2_fck",
3076 .prcm = {
3077 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003078 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003079 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003080 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003081 },
3082 },
3083 .slaves = omap44xx_mcbsp2_slaves,
3084 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003085};
3086
3087/* mcbsp3 */
3088static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3089static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3090 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003091 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003092};
3093
3094static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3095 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
3096 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003097 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003098};
3099
3100static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3101 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303102 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003103 .pa_start = 0x40126000,
3104 .pa_end = 0x401260ff,
3105 .flags = ADDR_TYPE_RT
3106 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003107 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003108};
3109
3110/* l4_abe -> mcbsp3 */
3111static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3112 .master = &omap44xx_l4_abe_hwmod,
3113 .slave = &omap44xx_mcbsp3_hwmod,
3114 .clk = "ocp_abe_iclk",
3115 .addr = omap44xx_mcbsp3_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003116 .user = OCP_USER_MPU,
3117};
3118
3119static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3120 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303121 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003122 .pa_start = 0x49026000,
3123 .pa_end = 0x490260ff,
3124 .flags = ADDR_TYPE_RT
3125 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003126 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003127};
3128
3129/* l4_abe -> mcbsp3 (dma) */
3130static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3131 .master = &omap44xx_l4_abe_hwmod,
3132 .slave = &omap44xx_mcbsp3_hwmod,
3133 .clk = "ocp_abe_iclk",
3134 .addr = omap44xx_mcbsp3_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003135 .user = OCP_USER_SDMA,
3136};
3137
3138/* mcbsp3 slave ports */
3139static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3140 &omap44xx_l4_abe__mcbsp3,
3141 &omap44xx_l4_abe__mcbsp3_dma,
3142};
3143
3144static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3145 .name = "mcbsp3",
3146 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003147 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003148 .mpu_irqs = omap44xx_mcbsp3_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003149 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003150 .main_clk = "mcbsp3_fck",
3151 .prcm = {
3152 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003153 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003154 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003155 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003156 },
3157 },
3158 .slaves = omap44xx_mcbsp3_slaves,
3159 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003160};
3161
3162/* mcbsp4 */
3163static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3164static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3165 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003166 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003167};
3168
3169static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3170 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3171 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003172 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003173};
3174
3175static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3176 {
3177 .pa_start = 0x48096000,
3178 .pa_end = 0x480960ff,
3179 .flags = ADDR_TYPE_RT
3180 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003181 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003182};
3183
3184/* l4_per -> mcbsp4 */
3185static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3186 .master = &omap44xx_l4_per_hwmod,
3187 .slave = &omap44xx_mcbsp4_hwmod,
3188 .clk = "l4_div_ck",
3189 .addr = omap44xx_mcbsp4_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003190 .user = OCP_USER_MPU | OCP_USER_SDMA,
3191};
3192
3193/* mcbsp4 slave ports */
3194static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3195 &omap44xx_l4_per__mcbsp4,
3196};
3197
3198static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3199 .name = "mcbsp4",
3200 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003201 .clkdm_name = "l4_per_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003202 .mpu_irqs = omap44xx_mcbsp4_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003203 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003204 .main_clk = "mcbsp4_fck",
3205 .prcm = {
3206 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003207 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003208 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003209 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003210 },
3211 },
3212 .slaves = omap44xx_mcbsp4_slaves,
3213 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003214};
3215
3216/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003217 * 'mcpdm' class
3218 * multi channel pdm controller (proprietary interface with phoenix power
3219 * ic)
3220 */
3221
3222static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3223 .rev_offs = 0x0000,
3224 .sysc_offs = 0x0010,
3225 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3226 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3227 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3228 SIDLE_SMART_WKUP),
3229 .sysc_fields = &omap_hwmod_sysc_type2,
3230};
3231
3232static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3233 .name = "mcpdm",
3234 .sysc = &omap44xx_mcpdm_sysc,
3235};
3236
3237/* mcpdm */
3238static struct omap_hwmod omap44xx_mcpdm_hwmod;
3239static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3240 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003241 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003242};
3243
3244static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3245 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3246 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003247 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003248};
3249
3250static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3251 {
3252 .pa_start = 0x40132000,
3253 .pa_end = 0x4013207f,
3254 .flags = ADDR_TYPE_RT
3255 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003256 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003257};
3258
3259/* l4_abe -> mcpdm */
3260static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3261 .master = &omap44xx_l4_abe_hwmod,
3262 .slave = &omap44xx_mcpdm_hwmod,
3263 .clk = "ocp_abe_iclk",
3264 .addr = omap44xx_mcpdm_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003265 .user = OCP_USER_MPU,
3266};
3267
3268static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3269 {
3270 .pa_start = 0x49032000,
3271 .pa_end = 0x4903207f,
3272 .flags = ADDR_TYPE_RT
3273 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003274 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003275};
3276
3277/* l4_abe -> mcpdm (dma) */
3278static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3279 .master = &omap44xx_l4_abe_hwmod,
3280 .slave = &omap44xx_mcpdm_hwmod,
3281 .clk = "ocp_abe_iclk",
3282 .addr = omap44xx_mcpdm_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003283 .user = OCP_USER_SDMA,
3284};
3285
3286/* mcpdm slave ports */
3287static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3288 &omap44xx_l4_abe__mcpdm,
3289 &omap44xx_l4_abe__mcpdm_dma,
3290};
3291
3292static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3293 .name = "mcpdm",
3294 .class = &omap44xx_mcpdm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003295 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003296 .mpu_irqs = omap44xx_mcpdm_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003297 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003298 .main_clk = "mcpdm_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003299 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003300 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003301 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003302 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003303 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003304 },
3305 },
3306 .slaves = omap44xx_mcpdm_slaves,
3307 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003308};
3309
3310/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303311 * 'mcspi' class
3312 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3313 * bus
3314 */
3315
3316static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3317 .rev_offs = 0x0000,
3318 .sysc_offs = 0x0010,
3319 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3320 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3321 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3322 SIDLE_SMART_WKUP),
3323 .sysc_fields = &omap_hwmod_sysc_type2,
3324};
3325
3326static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3327 .name = "mcspi",
3328 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003329 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303330};
3331
3332/* mcspi1 */
3333static struct omap_hwmod omap44xx_mcspi1_hwmod;
3334static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3335 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003336 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303337};
3338
3339static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3340 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3341 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3342 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3343 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3344 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3345 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3346 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3347 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003348 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303349};
3350
3351static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3352 {
3353 .pa_start = 0x48098000,
3354 .pa_end = 0x480981ff,
3355 .flags = ADDR_TYPE_RT
3356 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003357 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303358};
3359
3360/* l4_per -> mcspi1 */
3361static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3362 .master = &omap44xx_l4_per_hwmod,
3363 .slave = &omap44xx_mcspi1_hwmod,
3364 .clk = "l4_div_ck",
3365 .addr = omap44xx_mcspi1_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303366 .user = OCP_USER_MPU | OCP_USER_SDMA,
3367};
3368
3369/* mcspi1 slave ports */
3370static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3371 &omap44xx_l4_per__mcspi1,
3372};
3373
Benoit Cousson905a74d2011-02-18 14:01:06 +01003374/* mcspi1 dev_attr */
3375static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3376 .num_chipselect = 4,
3377};
3378
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303379static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3380 .name = "mcspi1",
3381 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003382 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303383 .mpu_irqs = omap44xx_mcspi1_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303384 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303385 .main_clk = "mcspi1_fck",
3386 .prcm = {
3387 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003388 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003389 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003390 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303391 },
3392 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003393 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303394 .slaves = omap44xx_mcspi1_slaves,
3395 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303396};
3397
3398/* mcspi2 */
3399static struct omap_hwmod omap44xx_mcspi2_hwmod;
3400static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3401 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003402 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303403};
3404
3405static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3406 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3407 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3408 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3409 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003410 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303411};
3412
3413static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3414 {
3415 .pa_start = 0x4809a000,
3416 .pa_end = 0x4809a1ff,
3417 .flags = ADDR_TYPE_RT
3418 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003419 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303420};
3421
3422/* l4_per -> mcspi2 */
3423static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3424 .master = &omap44xx_l4_per_hwmod,
3425 .slave = &omap44xx_mcspi2_hwmod,
3426 .clk = "l4_div_ck",
3427 .addr = omap44xx_mcspi2_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303428 .user = OCP_USER_MPU | OCP_USER_SDMA,
3429};
3430
3431/* mcspi2 slave ports */
3432static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3433 &omap44xx_l4_per__mcspi2,
3434};
3435
Benoit Cousson905a74d2011-02-18 14:01:06 +01003436/* mcspi2 dev_attr */
3437static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3438 .num_chipselect = 2,
3439};
3440
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303441static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3442 .name = "mcspi2",
3443 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003444 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303445 .mpu_irqs = omap44xx_mcspi2_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303446 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303447 .main_clk = "mcspi2_fck",
3448 .prcm = {
3449 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003450 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003451 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003452 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303453 },
3454 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003455 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303456 .slaves = omap44xx_mcspi2_slaves,
3457 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303458};
3459
3460/* mcspi3 */
3461static struct omap_hwmod omap44xx_mcspi3_hwmod;
3462static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3463 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003464 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303465};
3466
3467static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3468 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3469 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3470 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3471 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003472 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303473};
3474
3475static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3476 {
3477 .pa_start = 0x480b8000,
3478 .pa_end = 0x480b81ff,
3479 .flags = ADDR_TYPE_RT
3480 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003481 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303482};
3483
3484/* l4_per -> mcspi3 */
3485static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3486 .master = &omap44xx_l4_per_hwmod,
3487 .slave = &omap44xx_mcspi3_hwmod,
3488 .clk = "l4_div_ck",
3489 .addr = omap44xx_mcspi3_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303490 .user = OCP_USER_MPU | OCP_USER_SDMA,
3491};
3492
3493/* mcspi3 slave ports */
3494static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3495 &omap44xx_l4_per__mcspi3,
3496};
3497
Benoit Cousson905a74d2011-02-18 14:01:06 +01003498/* mcspi3 dev_attr */
3499static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3500 .num_chipselect = 2,
3501};
3502
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303503static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3504 .name = "mcspi3",
3505 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003506 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303507 .mpu_irqs = omap44xx_mcspi3_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303508 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303509 .main_clk = "mcspi3_fck",
3510 .prcm = {
3511 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003512 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003513 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003514 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303515 },
3516 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003517 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303518 .slaves = omap44xx_mcspi3_slaves,
3519 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303520};
3521
3522/* mcspi4 */
3523static struct omap_hwmod omap44xx_mcspi4_hwmod;
3524static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3525 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003526 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303527};
3528
3529static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3530 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3531 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003532 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303533};
3534
3535static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3536 {
3537 .pa_start = 0x480ba000,
3538 .pa_end = 0x480ba1ff,
3539 .flags = ADDR_TYPE_RT
3540 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003541 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303542};
3543
3544/* l4_per -> mcspi4 */
3545static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3546 .master = &omap44xx_l4_per_hwmod,
3547 .slave = &omap44xx_mcspi4_hwmod,
3548 .clk = "l4_div_ck",
3549 .addr = omap44xx_mcspi4_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303550 .user = OCP_USER_MPU | OCP_USER_SDMA,
3551};
3552
3553/* mcspi4 slave ports */
3554static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3555 &omap44xx_l4_per__mcspi4,
3556};
3557
Benoit Cousson905a74d2011-02-18 14:01:06 +01003558/* mcspi4 dev_attr */
3559static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3560 .num_chipselect = 1,
3561};
3562
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303563static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3564 .name = "mcspi4",
3565 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003566 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303567 .mpu_irqs = omap44xx_mcspi4_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303568 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303569 .main_clk = "mcspi4_fck",
3570 .prcm = {
3571 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003572 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003573 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003574 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303575 },
3576 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003577 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303578 .slaves = omap44xx_mcspi4_slaves,
3579 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303580};
3581
3582/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003583 * 'mmc' class
3584 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3585 */
3586
3587static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3588 .rev_offs = 0x0000,
3589 .sysc_offs = 0x0010,
3590 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3591 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3592 SYSC_HAS_SOFTRESET),
3593 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3594 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02003595 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01003596 .sysc_fields = &omap_hwmod_sysc_type2,
3597};
3598
3599static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3600 .name = "mmc",
3601 .sysc = &omap44xx_mmc_sysc,
3602};
3603
3604/* mmc1 */
3605static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3606 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003607 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003608};
3609
3610static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3611 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3612 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003613 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003614};
3615
3616/* mmc1 master ports */
3617static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3618 &omap44xx_mmc1__l3_main_1,
3619};
3620
3621static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3622 {
3623 .pa_start = 0x4809c000,
3624 .pa_end = 0x4809c3ff,
3625 .flags = ADDR_TYPE_RT
3626 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003627 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003628};
3629
3630/* l4_per -> mmc1 */
3631static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3632 .master = &omap44xx_l4_per_hwmod,
3633 .slave = &omap44xx_mmc1_hwmod,
3634 .clk = "l4_div_ck",
3635 .addr = omap44xx_mmc1_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003636 .user = OCP_USER_MPU | OCP_USER_SDMA,
3637};
3638
3639/* mmc1 slave ports */
3640static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3641 &omap44xx_l4_per__mmc1,
3642};
3643
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003644/* mmc1 dev_attr */
3645static struct omap_mmc_dev_attr mmc1_dev_attr = {
3646 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3647};
3648
Benoit Cousson407a6882011-02-15 22:39:48 +01003649static struct omap_hwmod omap44xx_mmc1_hwmod = {
3650 .name = "mmc1",
3651 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003652 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003653 .mpu_irqs = omap44xx_mmc1_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003654 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003655 .main_clk = "mmc1_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003656 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003657 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003658 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003659 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003660 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003661 },
3662 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003663 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003664 .slaves = omap44xx_mmc1_slaves,
3665 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3666 .masters = omap44xx_mmc1_masters,
3667 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003668};
3669
3670/* mmc2 */
3671static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3672 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003673 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003674};
3675
3676static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3677 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3678 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003679 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003680};
3681
3682/* mmc2 master ports */
3683static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3684 &omap44xx_mmc2__l3_main_1,
3685};
3686
3687static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3688 {
3689 .pa_start = 0x480b4000,
3690 .pa_end = 0x480b43ff,
3691 .flags = ADDR_TYPE_RT
3692 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003693 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003694};
3695
3696/* l4_per -> mmc2 */
3697static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3698 .master = &omap44xx_l4_per_hwmod,
3699 .slave = &omap44xx_mmc2_hwmod,
3700 .clk = "l4_div_ck",
3701 .addr = omap44xx_mmc2_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003702 .user = OCP_USER_MPU | OCP_USER_SDMA,
3703};
3704
3705/* mmc2 slave ports */
3706static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3707 &omap44xx_l4_per__mmc2,
3708};
3709
3710static struct omap_hwmod omap44xx_mmc2_hwmod = {
3711 .name = "mmc2",
3712 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003713 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003714 .mpu_irqs = omap44xx_mmc2_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003715 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003716 .main_clk = "mmc2_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003717 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003718 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003719 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003720 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003721 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003722 },
3723 },
3724 .slaves = omap44xx_mmc2_slaves,
3725 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3726 .masters = omap44xx_mmc2_masters,
3727 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003728};
3729
3730/* mmc3 */
3731static struct omap_hwmod omap44xx_mmc3_hwmod;
3732static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3733 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003734 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003735};
3736
3737static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3738 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3739 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003740 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003741};
3742
3743static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3744 {
3745 .pa_start = 0x480ad000,
3746 .pa_end = 0x480ad3ff,
3747 .flags = ADDR_TYPE_RT
3748 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003749 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003750};
3751
3752/* l4_per -> mmc3 */
3753static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3754 .master = &omap44xx_l4_per_hwmod,
3755 .slave = &omap44xx_mmc3_hwmod,
3756 .clk = "l4_div_ck",
3757 .addr = omap44xx_mmc3_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003758 .user = OCP_USER_MPU | OCP_USER_SDMA,
3759};
3760
3761/* mmc3 slave ports */
3762static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3763 &omap44xx_l4_per__mmc3,
3764};
3765
3766static struct omap_hwmod omap44xx_mmc3_hwmod = {
3767 .name = "mmc3",
3768 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003769 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003770 .mpu_irqs = omap44xx_mmc3_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003771 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003772 .main_clk = "mmc3_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003773 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003774 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003775 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003776 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003777 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003778 },
3779 },
3780 .slaves = omap44xx_mmc3_slaves,
3781 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003782};
3783
3784/* mmc4 */
3785static struct omap_hwmod omap44xx_mmc4_hwmod;
3786static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3787 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003788 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003789};
3790
3791static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3792 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3793 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003794 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003795};
3796
3797static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3798 {
3799 .pa_start = 0x480d1000,
3800 .pa_end = 0x480d13ff,
3801 .flags = ADDR_TYPE_RT
3802 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003803 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003804};
3805
3806/* l4_per -> mmc4 */
3807static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3808 .master = &omap44xx_l4_per_hwmod,
3809 .slave = &omap44xx_mmc4_hwmod,
3810 .clk = "l4_div_ck",
3811 .addr = omap44xx_mmc4_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003812 .user = OCP_USER_MPU | OCP_USER_SDMA,
3813};
3814
3815/* mmc4 slave ports */
3816static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3817 &omap44xx_l4_per__mmc4,
3818};
3819
3820static struct omap_hwmod omap44xx_mmc4_hwmod = {
3821 .name = "mmc4",
3822 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003823 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003824 .mpu_irqs = omap44xx_mmc4_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003825
Benoit Cousson407a6882011-02-15 22:39:48 +01003826 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003827 .main_clk = "mmc4_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003828 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003829 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003830 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003831 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003832 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003833 },
3834 },
3835 .slaves = omap44xx_mmc4_slaves,
3836 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003837};
3838
3839/* mmc5 */
3840static struct omap_hwmod omap44xx_mmc5_hwmod;
3841static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3842 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003843 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003844};
3845
3846static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3847 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3848 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003849 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003850};
3851
3852static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3853 {
3854 .pa_start = 0x480d5000,
3855 .pa_end = 0x480d53ff,
3856 .flags = ADDR_TYPE_RT
3857 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003858 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003859};
3860
3861/* l4_per -> mmc5 */
3862static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3863 .master = &omap44xx_l4_per_hwmod,
3864 .slave = &omap44xx_mmc5_hwmod,
3865 .clk = "l4_div_ck",
3866 .addr = omap44xx_mmc5_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003867 .user = OCP_USER_MPU | OCP_USER_SDMA,
3868};
3869
3870/* mmc5 slave ports */
3871static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3872 &omap44xx_l4_per__mmc5,
3873};
3874
3875static struct omap_hwmod omap44xx_mmc5_hwmod = {
3876 .name = "mmc5",
3877 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003878 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003879 .mpu_irqs = omap44xx_mmc5_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003880 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003881 .main_clk = "mmc5_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003882 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003883 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003884 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003885 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003886 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003887 },
3888 },
3889 .slaves = omap44xx_mmc5_slaves,
3890 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003891};
3892
3893/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003894 * 'mpu' class
3895 * mpu sub-system
3896 */
3897
3898static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003899 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003900};
3901
3902/* mpu */
3903static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3904 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3905 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3906 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003907 { .irq = -1 }
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003908};
3909
3910/* mpu master ports */
3911static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3912 &omap44xx_mpu__l3_main_1,
3913 &omap44xx_mpu__l4_abe,
3914 &omap44xx_mpu__dmm,
3915};
3916
3917static struct omap_hwmod omap44xx_mpu_hwmod = {
3918 .name = "mpu",
3919 .class = &omap44xx_mpu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003920 .clkdm_name = "mpuss_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06003921 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003922 .mpu_irqs = omap44xx_mpu_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003923 .main_clk = "dpll_mpu_m2_ck",
3924 .prcm = {
3925 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003926 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003927 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003928 },
3929 },
3930 .masters = omap44xx_mpu_masters,
3931 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003932};
3933
Benoit Cousson92b18d12010-09-23 20:02:41 +05303934/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003935 * 'smartreflex' class
3936 * smartreflex module (monitor silicon performance and outputs a measure of
3937 * performance error)
3938 */
3939
3940/* The IP is not compliant to type1 / type2 scheme */
3941static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
3942 .sidle_shift = 24,
3943 .enwkup_shift = 26,
3944};
3945
3946static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
3947 .sysc_offs = 0x0038,
3948 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
3949 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3950 SIDLE_SMART_WKUP),
3951 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
3952};
3953
3954static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003955 .name = "smartreflex",
3956 .sysc = &omap44xx_smartreflex_sysc,
3957 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003958};
3959
3960/* smartreflex_core */
3961static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3962static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
3963 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003964 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003965};
3966
3967static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
3968 {
3969 .pa_start = 0x4a0dd000,
3970 .pa_end = 0x4a0dd03f,
3971 .flags = ADDR_TYPE_RT
3972 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003973 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003974};
3975
3976/* l4_cfg -> smartreflex_core */
3977static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
3978 .master = &omap44xx_l4_cfg_hwmod,
3979 .slave = &omap44xx_smartreflex_core_hwmod,
3980 .clk = "l4_div_ck",
3981 .addr = omap44xx_smartreflex_core_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003982 .user = OCP_USER_MPU | OCP_USER_SDMA,
3983};
3984
3985/* smartreflex_core slave ports */
3986static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
3987 &omap44xx_l4_cfg__smartreflex_core,
3988};
3989
3990static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3991 .name = "smartreflex_core",
3992 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003993 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003994 .mpu_irqs = omap44xx_smartreflex_core_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003995
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003996 .main_clk = "smartreflex_core_fck",
3997 .vdd_name = "core",
3998 .prcm = {
3999 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004000 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004001 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004002 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004003 },
4004 },
4005 .slaves = omap44xx_smartreflex_core_slaves,
4006 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004007};
4008
4009/* smartreflex_iva */
4010static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4011static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4012 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004013 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004014};
4015
4016static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4017 {
4018 .pa_start = 0x4a0db000,
4019 .pa_end = 0x4a0db03f,
4020 .flags = ADDR_TYPE_RT
4021 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004022 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004023};
4024
4025/* l4_cfg -> smartreflex_iva */
4026static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4027 .master = &omap44xx_l4_cfg_hwmod,
4028 .slave = &omap44xx_smartreflex_iva_hwmod,
4029 .clk = "l4_div_ck",
4030 .addr = omap44xx_smartreflex_iva_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004031 .user = OCP_USER_MPU | OCP_USER_SDMA,
4032};
4033
4034/* smartreflex_iva slave ports */
4035static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4036 &omap44xx_l4_cfg__smartreflex_iva,
4037};
4038
4039static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4040 .name = "smartreflex_iva",
4041 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004042 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004043 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004044 .main_clk = "smartreflex_iva_fck",
4045 .vdd_name = "iva",
4046 .prcm = {
4047 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004048 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004049 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004050 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004051 },
4052 },
4053 .slaves = omap44xx_smartreflex_iva_slaves,
4054 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004055};
4056
4057/* smartreflex_mpu */
4058static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4059static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4060 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004061 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004062};
4063
4064static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4065 {
4066 .pa_start = 0x4a0d9000,
4067 .pa_end = 0x4a0d903f,
4068 .flags = ADDR_TYPE_RT
4069 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004070 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004071};
4072
4073/* l4_cfg -> smartreflex_mpu */
4074static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4075 .master = &omap44xx_l4_cfg_hwmod,
4076 .slave = &omap44xx_smartreflex_mpu_hwmod,
4077 .clk = "l4_div_ck",
4078 .addr = omap44xx_smartreflex_mpu_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004079 .user = OCP_USER_MPU | OCP_USER_SDMA,
4080};
4081
4082/* smartreflex_mpu slave ports */
4083static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4084 &omap44xx_l4_cfg__smartreflex_mpu,
4085};
4086
4087static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4088 .name = "smartreflex_mpu",
4089 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004090 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004091 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004092 .main_clk = "smartreflex_mpu_fck",
4093 .vdd_name = "mpu",
4094 .prcm = {
4095 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004096 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004097 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004098 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004099 },
4100 },
4101 .slaves = omap44xx_smartreflex_mpu_slaves,
4102 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004103};
4104
4105/*
Benoit Coussond11c2172011-02-02 12:04:36 +00004106 * 'spinlock' class
4107 * spinlock provides hardware assistance for synchronizing the processes
4108 * running on multiple processors
4109 */
4110
4111static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
4112 .rev_offs = 0x0000,
4113 .sysc_offs = 0x0010,
4114 .syss_offs = 0x0014,
4115 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4116 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
4117 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4118 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4119 SIDLE_SMART_WKUP),
4120 .sysc_fields = &omap_hwmod_sysc_type1,
4121};
4122
4123static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4124 .name = "spinlock",
4125 .sysc = &omap44xx_spinlock_sysc,
4126};
4127
4128/* spinlock */
4129static struct omap_hwmod omap44xx_spinlock_hwmod;
4130static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4131 {
4132 .pa_start = 0x4a0f6000,
4133 .pa_end = 0x4a0f6fff,
4134 .flags = ADDR_TYPE_RT
4135 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004136 { }
Benoit Coussond11c2172011-02-02 12:04:36 +00004137};
4138
4139/* l4_cfg -> spinlock */
4140static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4141 .master = &omap44xx_l4_cfg_hwmod,
4142 .slave = &omap44xx_spinlock_hwmod,
4143 .clk = "l4_div_ck",
4144 .addr = omap44xx_spinlock_addrs,
Benoit Coussond11c2172011-02-02 12:04:36 +00004145 .user = OCP_USER_MPU | OCP_USER_SDMA,
4146};
4147
4148/* spinlock slave ports */
4149static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4150 &omap44xx_l4_cfg__spinlock,
4151};
4152
4153static struct omap_hwmod omap44xx_spinlock_hwmod = {
4154 .name = "spinlock",
4155 .class = &omap44xx_spinlock_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004156 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond11c2172011-02-02 12:04:36 +00004157 .prcm = {
4158 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004159 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004160 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
Benoit Coussond11c2172011-02-02 12:04:36 +00004161 },
4162 },
4163 .slaves = omap44xx_spinlock_slaves,
4164 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
Benoit Coussond11c2172011-02-02 12:04:36 +00004165};
4166
4167/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004168 * 'timer' class
4169 * general purpose timer module with accurate 1ms tick
4170 * This class contains several variants: ['timer_1ms', 'timer']
4171 */
4172
4173static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4174 .rev_offs = 0x0000,
4175 .sysc_offs = 0x0010,
4176 .syss_offs = 0x0014,
4177 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4178 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4179 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4180 SYSS_HAS_RESET_STATUS),
4181 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4182 .sysc_fields = &omap_hwmod_sysc_type1,
4183};
4184
4185static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4186 .name = "timer",
4187 .sysc = &omap44xx_timer_1ms_sysc,
4188};
4189
4190static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4191 .rev_offs = 0x0000,
4192 .sysc_offs = 0x0010,
4193 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4194 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4195 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4196 SIDLE_SMART_WKUP),
4197 .sysc_fields = &omap_hwmod_sysc_type2,
4198};
4199
4200static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4201 .name = "timer",
4202 .sysc = &omap44xx_timer_sysc,
4203};
4204
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304205/* always-on timers dev attribute */
4206static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
4207 .timer_capability = OMAP_TIMER_ALWON,
4208};
4209
4210/* pwm timers dev attribute */
4211static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
4212 .timer_capability = OMAP_TIMER_HAS_PWM,
4213};
4214
Benoit Cousson35d1a662011-02-11 11:17:14 +00004215/* timer1 */
4216static struct omap_hwmod omap44xx_timer1_hwmod;
4217static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4218 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004219 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004220};
4221
4222static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4223 {
4224 .pa_start = 0x4a318000,
4225 .pa_end = 0x4a31807f,
4226 .flags = ADDR_TYPE_RT
4227 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004228 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004229};
4230
4231/* l4_wkup -> timer1 */
4232static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4233 .master = &omap44xx_l4_wkup_hwmod,
4234 .slave = &omap44xx_timer1_hwmod,
4235 .clk = "l4_wkup_clk_mux_ck",
4236 .addr = omap44xx_timer1_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004237 .user = OCP_USER_MPU | OCP_USER_SDMA,
4238};
4239
4240/* timer1 slave ports */
4241static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4242 &omap44xx_l4_wkup__timer1,
4243};
4244
4245static struct omap_hwmod omap44xx_timer1_hwmod = {
4246 .name = "timer1",
4247 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004248 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004249 .mpu_irqs = omap44xx_timer1_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004250 .main_clk = "timer1_fck",
4251 .prcm = {
4252 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004253 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004254 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004255 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004256 },
4257 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304258 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004259 .slaves = omap44xx_timer1_slaves,
4260 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004261};
4262
4263/* timer2 */
4264static struct omap_hwmod omap44xx_timer2_hwmod;
4265static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4266 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004267 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004268};
4269
4270static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4271 {
4272 .pa_start = 0x48032000,
4273 .pa_end = 0x4803207f,
4274 .flags = ADDR_TYPE_RT
4275 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004276 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004277};
4278
4279/* l4_per -> timer2 */
4280static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4281 .master = &omap44xx_l4_per_hwmod,
4282 .slave = &omap44xx_timer2_hwmod,
4283 .clk = "l4_div_ck",
4284 .addr = omap44xx_timer2_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004285 .user = OCP_USER_MPU | OCP_USER_SDMA,
4286};
4287
4288/* timer2 slave ports */
4289static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4290 &omap44xx_l4_per__timer2,
4291};
4292
4293static struct omap_hwmod omap44xx_timer2_hwmod = {
4294 .name = "timer2",
4295 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004296 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004297 .mpu_irqs = omap44xx_timer2_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004298 .main_clk = "timer2_fck",
4299 .prcm = {
4300 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004301 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004302 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004303 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004304 },
4305 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304306 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004307 .slaves = omap44xx_timer2_slaves,
4308 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004309};
4310
4311/* timer3 */
4312static struct omap_hwmod omap44xx_timer3_hwmod;
4313static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4314 { .irq = 39 + 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_timer3_addrs[] = {
4319 {
4320 .pa_start = 0x48034000,
4321 .pa_end = 0x4803407f,
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_per -> timer3 */
4328static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4329 .master = &omap44xx_l4_per_hwmod,
4330 .slave = &omap44xx_timer3_hwmod,
4331 .clk = "l4_div_ck",
4332 .addr = omap44xx_timer3_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004333 .user = OCP_USER_MPU | OCP_USER_SDMA,
4334};
4335
4336/* timer3 slave ports */
4337static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4338 &omap44xx_l4_per__timer3,
4339};
4340
4341static struct omap_hwmod omap44xx_timer3_hwmod = {
4342 .name = "timer3",
4343 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004344 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004345 .mpu_irqs = omap44xx_timer3_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004346 .main_clk = "timer3_fck",
4347 .prcm = {
4348 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004349 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004350 .context_offs = OMAP4_RM_L4PER_DMTIMER3_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_timer3_slaves,
4356 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004357};
4358
4359/* timer4 */
4360static struct omap_hwmod omap44xx_timer4_hwmod;
4361static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4362 { .irq = 40 + 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_timer4_addrs[] = {
4367 {
4368 .pa_start = 0x48036000,
4369 .pa_end = 0x4803607f,
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 -> timer4 */
4376static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4377 .master = &omap44xx_l4_per_hwmod,
4378 .slave = &omap44xx_timer4_hwmod,
4379 .clk = "l4_div_ck",
4380 .addr = omap44xx_timer4_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004381 .user = OCP_USER_MPU | OCP_USER_SDMA,
4382};
4383
4384/* timer4 slave ports */
4385static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4386 &omap44xx_l4_per__timer4,
4387};
4388
4389static struct omap_hwmod omap44xx_timer4_hwmod = {
4390 .name = "timer4",
4391 .class = &omap44xx_timer_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_timer4_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004394 .main_clk = "timer4_fck",
4395 .prcm = {
4396 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004397 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004398 .context_offs = OMAP4_RM_L4PER_DMTIMER4_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_timer4_slaves,
4404 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004405};
4406
4407/* timer5 */
4408static struct omap_hwmod omap44xx_timer5_hwmod;
4409static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4410 { .irq = 41 + 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_timer5_addrs[] = {
4415 {
4416 .pa_start = 0x40138000,
4417 .pa_end = 0x4013807f,
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_abe -> timer5 */
4424static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4425 .master = &omap44xx_l4_abe_hwmod,
4426 .slave = &omap44xx_timer5_hwmod,
4427 .clk = "ocp_abe_iclk",
4428 .addr = omap44xx_timer5_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004429 .user = OCP_USER_MPU,
4430};
4431
4432static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4433 {
4434 .pa_start = 0x49038000,
4435 .pa_end = 0x4903807f,
4436 .flags = ADDR_TYPE_RT
4437 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004438 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004439};
4440
4441/* l4_abe -> timer5 (dma) */
4442static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4443 .master = &omap44xx_l4_abe_hwmod,
4444 .slave = &omap44xx_timer5_hwmod,
4445 .clk = "ocp_abe_iclk",
4446 .addr = omap44xx_timer5_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004447 .user = OCP_USER_SDMA,
4448};
4449
4450/* timer5 slave ports */
4451static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4452 &omap44xx_l4_abe__timer5,
4453 &omap44xx_l4_abe__timer5_dma,
4454};
4455
4456static struct omap_hwmod omap44xx_timer5_hwmod = {
4457 .name = "timer5",
4458 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004459 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004460 .mpu_irqs = omap44xx_timer5_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004461 .main_clk = "timer5_fck",
4462 .prcm = {
4463 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004464 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004465 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004466 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004467 },
4468 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304469 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004470 .slaves = omap44xx_timer5_slaves,
4471 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004472};
4473
4474/* timer6 */
4475static struct omap_hwmod omap44xx_timer6_hwmod;
4476static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4477 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004478 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004479};
4480
4481static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4482 {
4483 .pa_start = 0x4013a000,
4484 .pa_end = 0x4013a07f,
4485 .flags = ADDR_TYPE_RT
4486 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004487 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004488};
4489
4490/* l4_abe -> timer6 */
4491static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4492 .master = &omap44xx_l4_abe_hwmod,
4493 .slave = &omap44xx_timer6_hwmod,
4494 .clk = "ocp_abe_iclk",
4495 .addr = omap44xx_timer6_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004496 .user = OCP_USER_MPU,
4497};
4498
4499static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4500 {
4501 .pa_start = 0x4903a000,
4502 .pa_end = 0x4903a07f,
4503 .flags = ADDR_TYPE_RT
4504 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004505 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004506};
4507
4508/* l4_abe -> timer6 (dma) */
4509static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4510 .master = &omap44xx_l4_abe_hwmod,
4511 .slave = &omap44xx_timer6_hwmod,
4512 .clk = "ocp_abe_iclk",
4513 .addr = omap44xx_timer6_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004514 .user = OCP_USER_SDMA,
4515};
4516
4517/* timer6 slave ports */
4518static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4519 &omap44xx_l4_abe__timer6,
4520 &omap44xx_l4_abe__timer6_dma,
4521};
4522
4523static struct omap_hwmod omap44xx_timer6_hwmod = {
4524 .name = "timer6",
4525 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004526 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004527 .mpu_irqs = omap44xx_timer6_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004528
Benoit Cousson35d1a662011-02-11 11:17:14 +00004529 .main_clk = "timer6_fck",
4530 .prcm = {
4531 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004532 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004533 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004534 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004535 },
4536 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304537 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004538 .slaves = omap44xx_timer6_slaves,
4539 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004540};
4541
4542/* timer7 */
4543static struct omap_hwmod omap44xx_timer7_hwmod;
4544static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4545 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004546 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004547};
4548
4549static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4550 {
4551 .pa_start = 0x4013c000,
4552 .pa_end = 0x4013c07f,
4553 .flags = ADDR_TYPE_RT
4554 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004555 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004556};
4557
4558/* l4_abe -> timer7 */
4559static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4560 .master = &omap44xx_l4_abe_hwmod,
4561 .slave = &omap44xx_timer7_hwmod,
4562 .clk = "ocp_abe_iclk",
4563 .addr = omap44xx_timer7_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004564 .user = OCP_USER_MPU,
4565};
4566
4567static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4568 {
4569 .pa_start = 0x4903c000,
4570 .pa_end = 0x4903c07f,
4571 .flags = ADDR_TYPE_RT
4572 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004573 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004574};
4575
4576/* l4_abe -> timer7 (dma) */
4577static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4578 .master = &omap44xx_l4_abe_hwmod,
4579 .slave = &omap44xx_timer7_hwmod,
4580 .clk = "ocp_abe_iclk",
4581 .addr = omap44xx_timer7_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004582 .user = OCP_USER_SDMA,
4583};
4584
4585/* timer7 slave ports */
4586static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4587 &omap44xx_l4_abe__timer7,
4588 &omap44xx_l4_abe__timer7_dma,
4589};
4590
4591static struct omap_hwmod omap44xx_timer7_hwmod = {
4592 .name = "timer7",
4593 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004594 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004595 .mpu_irqs = omap44xx_timer7_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004596 .main_clk = "timer7_fck",
4597 .prcm = {
4598 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004599 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004600 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004601 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004602 },
4603 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304604 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004605 .slaves = omap44xx_timer7_slaves,
4606 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004607};
4608
4609/* timer8 */
4610static struct omap_hwmod omap44xx_timer8_hwmod;
4611static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4612 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004613 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004614};
4615
4616static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4617 {
4618 .pa_start = 0x4013e000,
4619 .pa_end = 0x4013e07f,
4620 .flags = ADDR_TYPE_RT
4621 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004622 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004623};
4624
4625/* l4_abe -> timer8 */
4626static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4627 .master = &omap44xx_l4_abe_hwmod,
4628 .slave = &omap44xx_timer8_hwmod,
4629 .clk = "ocp_abe_iclk",
4630 .addr = omap44xx_timer8_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004631 .user = OCP_USER_MPU,
4632};
4633
4634static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4635 {
4636 .pa_start = 0x4903e000,
4637 .pa_end = 0x4903e07f,
4638 .flags = ADDR_TYPE_RT
4639 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004640 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004641};
4642
4643/* l4_abe -> timer8 (dma) */
4644static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4645 .master = &omap44xx_l4_abe_hwmod,
4646 .slave = &omap44xx_timer8_hwmod,
4647 .clk = "ocp_abe_iclk",
4648 .addr = omap44xx_timer8_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004649 .user = OCP_USER_SDMA,
4650};
4651
4652/* timer8 slave ports */
4653static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4654 &omap44xx_l4_abe__timer8,
4655 &omap44xx_l4_abe__timer8_dma,
4656};
4657
4658static struct omap_hwmod omap44xx_timer8_hwmod = {
4659 .name = "timer8",
4660 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004661 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004662 .mpu_irqs = omap44xx_timer8_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004663 .main_clk = "timer8_fck",
4664 .prcm = {
4665 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004666 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004667 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004668 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004669 },
4670 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304671 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004672 .slaves = omap44xx_timer8_slaves,
4673 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004674};
4675
4676/* timer9 */
4677static struct omap_hwmod omap44xx_timer9_hwmod;
4678static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4679 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004680 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004681};
4682
4683static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4684 {
4685 .pa_start = 0x4803e000,
4686 .pa_end = 0x4803e07f,
4687 .flags = ADDR_TYPE_RT
4688 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004689 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004690};
4691
4692/* l4_per -> timer9 */
4693static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4694 .master = &omap44xx_l4_per_hwmod,
4695 .slave = &omap44xx_timer9_hwmod,
4696 .clk = "l4_div_ck",
4697 .addr = omap44xx_timer9_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004698 .user = OCP_USER_MPU | OCP_USER_SDMA,
4699};
4700
4701/* timer9 slave ports */
4702static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4703 &omap44xx_l4_per__timer9,
4704};
4705
4706static struct omap_hwmod omap44xx_timer9_hwmod = {
4707 .name = "timer9",
4708 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004709 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004710 .mpu_irqs = omap44xx_timer9_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004711 .main_clk = "timer9_fck",
4712 .prcm = {
4713 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004714 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004715 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004716 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004717 },
4718 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304719 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004720 .slaves = omap44xx_timer9_slaves,
4721 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004722};
4723
4724/* timer10 */
4725static struct omap_hwmod omap44xx_timer10_hwmod;
4726static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4727 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004728 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004729};
4730
4731static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4732 {
4733 .pa_start = 0x48086000,
4734 .pa_end = 0x4808607f,
4735 .flags = ADDR_TYPE_RT
4736 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004737 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004738};
4739
4740/* l4_per -> timer10 */
4741static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4742 .master = &omap44xx_l4_per_hwmod,
4743 .slave = &omap44xx_timer10_hwmod,
4744 .clk = "l4_div_ck",
4745 .addr = omap44xx_timer10_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004746 .user = OCP_USER_MPU | OCP_USER_SDMA,
4747};
4748
4749/* timer10 slave ports */
4750static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4751 &omap44xx_l4_per__timer10,
4752};
4753
4754static struct omap_hwmod omap44xx_timer10_hwmod = {
4755 .name = "timer10",
4756 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004757 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004758 .mpu_irqs = omap44xx_timer10_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004759 .main_clk = "timer10_fck",
4760 .prcm = {
4761 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004762 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004763 .context_offs = OMAP4_RM_L4PER_DMTIMER10_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_timer10_slaves,
4769 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004770};
4771
4772/* timer11 */
4773static struct omap_hwmod omap44xx_timer11_hwmod;
4774static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4775 { .irq = 47 + 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_timer11_addrs[] = {
4780 {
4781 .pa_start = 0x48088000,
4782 .pa_end = 0x4808807f,
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 -> timer11 */
4789static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4790 .master = &omap44xx_l4_per_hwmod,
4791 .slave = &omap44xx_timer11_hwmod,
4792 .clk = "l4_div_ck",
4793 .addr = omap44xx_timer11_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004794 .user = OCP_USER_MPU | OCP_USER_SDMA,
4795};
4796
4797/* timer11 slave ports */
4798static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4799 &omap44xx_l4_per__timer11,
4800};
4801
4802static struct omap_hwmod omap44xx_timer11_hwmod = {
4803 .name = "timer11",
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_timer11_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004807 .main_clk = "timer11_fck",
4808 .prcm = {
4809 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004810 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004811 .context_offs = OMAP4_RM_L4PER_DMTIMER11_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_timer11_slaves,
4817 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004818};
4819
4820/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304821 * 'uart' class
4822 * universal asynchronous receiver/transmitter (uart)
4823 */
4824
4825static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4826 .rev_offs = 0x0050,
4827 .sysc_offs = 0x0054,
4828 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004829 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004830 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4831 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004832 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4833 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304834 .sysc_fields = &omap_hwmod_sysc_type1,
4835};
4836
4837static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004838 .name = "uart",
4839 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304840};
4841
4842/* uart1 */
4843static struct omap_hwmod omap44xx_uart1_hwmod;
4844static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4845 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004846 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304847};
4848
4849static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4850 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4851 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004852 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304853};
4854
4855static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4856 {
4857 .pa_start = 0x4806a000,
4858 .pa_end = 0x4806a0ff,
4859 .flags = ADDR_TYPE_RT
4860 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004861 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304862};
4863
4864/* l4_per -> uart1 */
4865static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4866 .master = &omap44xx_l4_per_hwmod,
4867 .slave = &omap44xx_uart1_hwmod,
4868 .clk = "l4_div_ck",
4869 .addr = omap44xx_uart1_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304870 .user = OCP_USER_MPU | OCP_USER_SDMA,
4871};
4872
4873/* uart1 slave ports */
4874static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4875 &omap44xx_l4_per__uart1,
4876};
4877
4878static struct omap_hwmod omap44xx_uart1_hwmod = {
4879 .name = "uart1",
4880 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004881 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304882 .mpu_irqs = omap44xx_uart1_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304883 .sdma_reqs = omap44xx_uart1_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304884 .main_clk = "uart1_fck",
4885 .prcm = {
4886 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004887 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004888 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004889 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304890 },
4891 },
4892 .slaves = omap44xx_uart1_slaves,
4893 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304894};
4895
4896/* uart2 */
4897static struct omap_hwmod omap44xx_uart2_hwmod;
4898static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4899 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004900 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304901};
4902
4903static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4904 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4905 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004906 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304907};
4908
4909static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4910 {
4911 .pa_start = 0x4806c000,
4912 .pa_end = 0x4806c0ff,
4913 .flags = ADDR_TYPE_RT
4914 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004915 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304916};
4917
4918/* l4_per -> uart2 */
4919static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4920 .master = &omap44xx_l4_per_hwmod,
4921 .slave = &omap44xx_uart2_hwmod,
4922 .clk = "l4_div_ck",
4923 .addr = omap44xx_uart2_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304924 .user = OCP_USER_MPU | OCP_USER_SDMA,
4925};
4926
4927/* uart2 slave ports */
4928static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4929 &omap44xx_l4_per__uart2,
4930};
4931
4932static struct omap_hwmod omap44xx_uart2_hwmod = {
4933 .name = "uart2",
4934 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004935 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304936 .mpu_irqs = omap44xx_uart2_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304937 .sdma_reqs = omap44xx_uart2_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304938 .main_clk = "uart2_fck",
4939 .prcm = {
4940 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004941 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004942 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004943 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304944 },
4945 },
4946 .slaves = omap44xx_uart2_slaves,
4947 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304948};
4949
4950/* uart3 */
4951static struct omap_hwmod omap44xx_uart3_hwmod;
4952static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4953 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004954 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304955};
4956
4957static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
4958 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
4959 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004960 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304961};
4962
4963static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4964 {
4965 .pa_start = 0x48020000,
4966 .pa_end = 0x480200ff,
4967 .flags = ADDR_TYPE_RT
4968 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004969 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304970};
4971
4972/* l4_per -> uart3 */
4973static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4974 .master = &omap44xx_l4_per_hwmod,
4975 .slave = &omap44xx_uart3_hwmod,
4976 .clk = "l4_div_ck",
4977 .addr = omap44xx_uart3_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304978 .user = OCP_USER_MPU | OCP_USER_SDMA,
4979};
4980
4981/* uart3 slave ports */
4982static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
4983 &omap44xx_l4_per__uart3,
4984};
4985
4986static struct omap_hwmod omap44xx_uart3_hwmod = {
4987 .name = "uart3",
4988 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004989 .clkdm_name = "l4_per_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06004990 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304991 .mpu_irqs = omap44xx_uart3_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304992 .sdma_reqs = omap44xx_uart3_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304993 .main_clk = "uart3_fck",
4994 .prcm = {
4995 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004996 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004997 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004998 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304999 },
5000 },
5001 .slaves = omap44xx_uart3_slaves,
5002 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305003};
5004
5005/* uart4 */
5006static struct omap_hwmod omap44xx_uart4_hwmod;
5007static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5008 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005009 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305010};
5011
5012static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5013 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
5014 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005015 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305016};
5017
5018static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5019 {
5020 .pa_start = 0x4806e000,
5021 .pa_end = 0x4806e0ff,
5022 .flags = ADDR_TYPE_RT
5023 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005024 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305025};
5026
5027/* l4_per -> uart4 */
5028static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5029 .master = &omap44xx_l4_per_hwmod,
5030 .slave = &omap44xx_uart4_hwmod,
5031 .clk = "l4_div_ck",
5032 .addr = omap44xx_uart4_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305033 .user = OCP_USER_MPU | OCP_USER_SDMA,
5034};
5035
5036/* uart4 slave ports */
5037static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5038 &omap44xx_l4_per__uart4,
5039};
5040
5041static struct omap_hwmod omap44xx_uart4_hwmod = {
5042 .name = "uart4",
5043 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005044 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305045 .mpu_irqs = omap44xx_uart4_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305046 .sdma_reqs = omap44xx_uart4_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305047 .main_clk = "uart4_fck",
5048 .prcm = {
5049 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005050 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005051 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005052 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305053 },
5054 },
5055 .slaves = omap44xx_uart4_slaves,
5056 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305057};
5058
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005059/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005060 * 'usb_otg_hs' class
5061 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
5062 */
5063
5064static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
5065 .rev_offs = 0x0400,
5066 .sysc_offs = 0x0404,
5067 .syss_offs = 0x0408,
5068 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
5069 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5070 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
5071 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5072 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5073 MSTANDBY_SMART),
5074 .sysc_fields = &omap_hwmod_sysc_type1,
5075};
5076
5077static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
Benoit Cousson00fe6102011-07-09 19:14:28 -06005078 .name = "usb_otg_hs",
5079 .sysc = &omap44xx_usb_otg_hs_sysc,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005080};
5081
5082/* usb_otg_hs */
5083static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5084 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
5085 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005086 { .irq = -1 }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005087};
5088
5089/* usb_otg_hs master ports */
5090static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5091 &omap44xx_usb_otg_hs__l3_main_2,
5092};
5093
5094static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5095 {
5096 .pa_start = 0x4a0ab000,
5097 .pa_end = 0x4a0ab003,
5098 .flags = ADDR_TYPE_RT
5099 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005100 { }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005101};
5102
5103/* l4_cfg -> usb_otg_hs */
5104static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5105 .master = &omap44xx_l4_cfg_hwmod,
5106 .slave = &omap44xx_usb_otg_hs_hwmod,
5107 .clk = "l4_div_ck",
5108 .addr = omap44xx_usb_otg_hs_addrs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005109 .user = OCP_USER_MPU | OCP_USER_SDMA,
5110};
5111
5112/* usb_otg_hs slave ports */
5113static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5114 &omap44xx_l4_cfg__usb_otg_hs,
5115};
5116
5117static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5118 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5119};
5120
5121static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5122 .name = "usb_otg_hs",
5123 .class = &omap44xx_usb_otg_hs_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005124 .clkdm_name = "l3_init_clkdm",
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005125 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
5126 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005127 .main_clk = "usb_otg_hs_ick",
5128 .prcm = {
5129 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005130 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005131 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005132 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005133 },
5134 },
5135 .opt_clks = usb_otg_hs_opt_clks,
Benoit Cousson00fe6102011-07-09 19:14:28 -06005136 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005137 .slaves = omap44xx_usb_otg_hs_slaves,
5138 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
5139 .masters = omap44xx_usb_otg_hs_masters,
5140 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005141};
5142
5143/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005144 * 'wd_timer' class
5145 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
5146 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005147 */
5148
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005149static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005150 .rev_offs = 0x0000,
5151 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005152 .syss_offs = 0x0014,
5153 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07005154 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07005155 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5156 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005157 .sysc_fields = &omap_hwmod_sysc_type1,
5158};
5159
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005160static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5161 .name = "wd_timer",
5162 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00005163 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005164};
5165
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005166/* wd_timer2 */
5167static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5168static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5169 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005170 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005171};
5172
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005173static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005174 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005175 .pa_start = 0x4a314000,
5176 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005177 .flags = ADDR_TYPE_RT
5178 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005179 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005180};
5181
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005182/* l4_wkup -> wd_timer2 */
5183static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005184 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005185 .slave = &omap44xx_wd_timer2_hwmod,
5186 .clk = "l4_wkup_clk_mux_ck",
5187 .addr = omap44xx_wd_timer2_addrs,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005188 .user = OCP_USER_MPU | OCP_USER_SDMA,
5189};
5190
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005191/* wd_timer2 slave ports */
5192static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5193 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005194};
5195
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005196static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5197 .name = "wd_timer2",
5198 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005199 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005200 .mpu_irqs = omap44xx_wd_timer2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005201 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005202 .prcm = {
5203 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005204 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005205 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005206 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005207 },
5208 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005209 .slaves = omap44xx_wd_timer2_slaves,
5210 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005211};
5212
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005213/* wd_timer3 */
5214static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5215static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5216 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005217 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005218};
5219
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005220static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005221 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005222 .pa_start = 0x40130000,
5223 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005224 .flags = ADDR_TYPE_RT
5225 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005226 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005227};
5228
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005229/* l4_abe -> wd_timer3 */
5230static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5231 .master = &omap44xx_l4_abe_hwmod,
5232 .slave = &omap44xx_wd_timer3_hwmod,
5233 .clk = "ocp_abe_iclk",
5234 .addr = omap44xx_wd_timer3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005235 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005236};
5237
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005238static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005239 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005240 .pa_start = 0x49030000,
5241 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005242 .flags = ADDR_TYPE_RT
5243 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005244 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005245};
5246
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005247/* l4_abe -> wd_timer3 (dma) */
5248static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5249 .master = &omap44xx_l4_abe_hwmod,
5250 .slave = &omap44xx_wd_timer3_hwmod,
5251 .clk = "ocp_abe_iclk",
5252 .addr = omap44xx_wd_timer3_dma_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005253 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005254};
5255
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005256/* wd_timer3 slave ports */
5257static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5258 &omap44xx_l4_abe__wd_timer3,
5259 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005260};
5261
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005262static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5263 .name = "wd_timer3",
5264 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005265 .clkdm_name = "abe_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005266 .mpu_irqs = omap44xx_wd_timer3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005267 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005268 .prcm = {
5269 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005270 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005271 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005272 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005273 },
5274 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005275 .slaves = omap44xx_wd_timer3_slaves,
5276 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005277};
5278
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005279static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005280
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005281 /* dmm class */
5282 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005283
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005284 /* emif_fw class */
5285 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005286
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005287 /* l3 class */
5288 &omap44xx_l3_instr_hwmod,
5289 &omap44xx_l3_main_1_hwmod,
5290 &omap44xx_l3_main_2_hwmod,
5291 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005292
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005293 /* l4 class */
5294 &omap44xx_l4_abe_hwmod,
5295 &omap44xx_l4_cfg_hwmod,
5296 &omap44xx_l4_per_hwmod,
5297 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005298
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005299 /* mpu_bus class */
5300 &omap44xx_mpu_private_hwmod,
5301
Benoit Cousson407a6882011-02-15 22:39:48 +01005302 /* aess class */
5303/* &omap44xx_aess_hwmod, */
5304
5305 /* bandgap class */
5306 &omap44xx_bandgap_hwmod,
5307
5308 /* counter class */
5309/* &omap44xx_counter_32k_hwmod, */
5310
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005311 /* dma class */
5312 &omap44xx_dma_system_hwmod,
5313
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005314 /* dmic class */
5315 &omap44xx_dmic_hwmod,
5316
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005317 /* dsp class */
5318 &omap44xx_dsp_hwmod,
5319 &omap44xx_dsp_c0_hwmod,
5320
Benoit Coussond63bd742011-01-27 11:17:03 +00005321 /* dss class */
5322 &omap44xx_dss_hwmod,
5323 &omap44xx_dss_dispc_hwmod,
5324 &omap44xx_dss_dsi1_hwmod,
5325 &omap44xx_dss_dsi2_hwmod,
5326 &omap44xx_dss_hdmi_hwmod,
5327 &omap44xx_dss_rfbi_hwmod,
5328 &omap44xx_dss_venc_hwmod,
5329
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005330 /* gpio class */
5331 &omap44xx_gpio1_hwmod,
5332 &omap44xx_gpio2_hwmod,
5333 &omap44xx_gpio3_hwmod,
5334 &omap44xx_gpio4_hwmod,
5335 &omap44xx_gpio5_hwmod,
5336 &omap44xx_gpio6_hwmod,
5337
Benoit Cousson407a6882011-02-15 22:39:48 +01005338 /* hsi class */
5339/* &omap44xx_hsi_hwmod, */
5340
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005341 /* i2c class */
5342 &omap44xx_i2c1_hwmod,
5343 &omap44xx_i2c2_hwmod,
5344 &omap44xx_i2c3_hwmod,
5345 &omap44xx_i2c4_hwmod,
5346
Benoit Cousson407a6882011-02-15 22:39:48 +01005347 /* ipu class */
5348 &omap44xx_ipu_hwmod,
5349 &omap44xx_ipu_c0_hwmod,
5350 &omap44xx_ipu_c1_hwmod,
5351
5352 /* iss class */
5353/* &omap44xx_iss_hwmod, */
5354
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005355 /* iva class */
5356 &omap44xx_iva_hwmod,
5357 &omap44xx_iva_seq0_hwmod,
5358 &omap44xx_iva_seq1_hwmod,
5359
Benoit Cousson407a6882011-02-15 22:39:48 +01005360 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005361 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005362
Benoit Coussonec5df922011-02-02 19:27:21 +00005363 /* mailbox class */
5364 &omap44xx_mailbox_hwmod,
5365
Benoit Cousson4ddff492011-01-31 14:50:30 +00005366 /* mcbsp class */
5367 &omap44xx_mcbsp1_hwmod,
5368 &omap44xx_mcbsp2_hwmod,
5369 &omap44xx_mcbsp3_hwmod,
5370 &omap44xx_mcbsp4_hwmod,
5371
Benoit Cousson407a6882011-02-15 22:39:48 +01005372 /* mcpdm class */
5373/* &omap44xx_mcpdm_hwmod, */
5374
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305375 /* mcspi class */
5376 &omap44xx_mcspi1_hwmod,
5377 &omap44xx_mcspi2_hwmod,
5378 &omap44xx_mcspi3_hwmod,
5379 &omap44xx_mcspi4_hwmod,
5380
Benoit Cousson407a6882011-02-15 22:39:48 +01005381 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005382 &omap44xx_mmc1_hwmod,
5383 &omap44xx_mmc2_hwmod,
5384 &omap44xx_mmc3_hwmod,
5385 &omap44xx_mmc4_hwmod,
5386 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005387
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005388 /* mpu class */
5389 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305390
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005391 /* smartreflex class */
5392 &omap44xx_smartreflex_core_hwmod,
5393 &omap44xx_smartreflex_iva_hwmod,
5394 &omap44xx_smartreflex_mpu_hwmod,
5395
Benoit Coussond11c2172011-02-02 12:04:36 +00005396 /* spinlock class */
5397 &omap44xx_spinlock_hwmod,
5398
Benoit Cousson35d1a662011-02-11 11:17:14 +00005399 /* timer class */
5400 &omap44xx_timer1_hwmod,
5401 &omap44xx_timer2_hwmod,
5402 &omap44xx_timer3_hwmod,
5403 &omap44xx_timer4_hwmod,
5404 &omap44xx_timer5_hwmod,
5405 &omap44xx_timer6_hwmod,
5406 &omap44xx_timer7_hwmod,
5407 &omap44xx_timer8_hwmod,
5408 &omap44xx_timer9_hwmod,
5409 &omap44xx_timer10_hwmod,
5410 &omap44xx_timer11_hwmod,
5411
Benoit Coussondb12ba52010-09-27 20:19:19 +05305412 /* uart class */
5413 &omap44xx_uart1_hwmod,
5414 &omap44xx_uart2_hwmod,
5415 &omap44xx_uart3_hwmod,
5416 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005417
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005418 /* usb_otg_hs class */
5419 &omap44xx_usb_otg_hs_hwmod,
5420
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005421 /* wd_timer class */
5422 &omap44xx_wd_timer2_hwmod,
5423 &omap44xx_wd_timer3_hwmod,
5424
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005425 NULL,
5426};
5427
5428int __init omap44xx_hwmod_init(void)
5429{
Paul Walmsley550c8092011-02-28 11:58:14 -07005430 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005431}
5432