blob: cadf0bb2d3b72beecdc51586954481e8d6208ba6 [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" },
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001243 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
Benoit Coussond63bd742011-01-27 11:17:03 +00001244};
1245
1246static struct omap_hwmod omap44xx_dss_hwmod = {
1247 .name = "dss_core",
Tomi Valkeinen37ad0852011-11-08 03:16:11 -07001248 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001249 .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
1343static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1344 .name = "dss_dispc",
1345 .class = &omap44xx_dispc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001346 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001347 .mpu_irqs = omap44xx_dss_dispc_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001348 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001349 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001350 .prcm = {
1351 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001352 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001353 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001354 },
1355 },
1356 .slaves = omap44xx_dss_dispc_slaves,
1357 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001358};
1359
1360/*
1361 * 'dsi' class
1362 * display serial interface controller
1363 */
1364
1365static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1366 .rev_offs = 0x0000,
1367 .sysc_offs = 0x0010,
1368 .syss_offs = 0x0014,
1369 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1370 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1371 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1372 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1373 .sysc_fields = &omap_hwmod_sysc_type1,
1374};
1375
1376static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1377 .name = "dsi",
1378 .sysc = &omap44xx_dsi_sysc,
1379};
1380
1381/* dss_dsi1 */
1382static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1383static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1384 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001385 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001386};
1387
1388static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1389 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001390 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001391};
1392
1393static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1394 {
1395 .pa_start = 0x58004000,
1396 .pa_end = 0x580041ff,
1397 .flags = ADDR_TYPE_RT
1398 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001399 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001400};
1401
1402/* l3_main_2 -> dss_dsi1 */
1403static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1404 .master = &omap44xx_l3_main_2_hwmod,
1405 .slave = &omap44xx_dss_dsi1_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001406 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001407 .addr = omap44xx_dss_dsi1_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001408 .user = OCP_USER_SDMA,
1409};
1410
1411static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1412 {
1413 .pa_start = 0x48044000,
1414 .pa_end = 0x480441ff,
1415 .flags = ADDR_TYPE_RT
1416 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001417 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001418};
1419
1420/* l4_per -> dss_dsi1 */
1421static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1422 .master = &omap44xx_l4_per_hwmod,
1423 .slave = &omap44xx_dss_dsi1_hwmod,
1424 .clk = "l4_div_ck",
1425 .addr = omap44xx_dss_dsi1_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001426 .user = OCP_USER_MPU,
1427};
1428
1429/* dss_dsi1 slave ports */
1430static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1431 &omap44xx_l3_main_2__dss_dsi1,
1432 &omap44xx_l4_per__dss_dsi1,
1433};
1434
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001435static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1436 { .role = "sys_clk", .clk = "dss_sys_clk" },
1437};
1438
Benoit Coussond63bd742011-01-27 11:17:03 +00001439static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1440 .name = "dss_dsi1",
1441 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001442 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001443 .mpu_irqs = omap44xx_dss_dsi1_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001444 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001445 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001446 .prcm = {
1447 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001448 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001449 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001450 },
1451 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001452 .opt_clks = dss_dsi1_opt_clks,
1453 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001454 .slaves = omap44xx_dss_dsi1_slaves,
1455 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001456};
1457
1458/* dss_dsi2 */
1459static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1460static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1461 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001462 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001463};
1464
1465static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1466 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001467 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001468};
1469
1470static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1471 {
1472 .pa_start = 0x58005000,
1473 .pa_end = 0x580051ff,
1474 .flags = ADDR_TYPE_RT
1475 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001476 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001477};
1478
1479/* l3_main_2 -> dss_dsi2 */
1480static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1481 .master = &omap44xx_l3_main_2_hwmod,
1482 .slave = &omap44xx_dss_dsi2_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001483 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001484 .addr = omap44xx_dss_dsi2_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001485 .user = OCP_USER_SDMA,
1486};
1487
1488static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1489 {
1490 .pa_start = 0x48045000,
1491 .pa_end = 0x480451ff,
1492 .flags = ADDR_TYPE_RT
1493 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001494 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001495};
1496
1497/* l4_per -> dss_dsi2 */
1498static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1499 .master = &omap44xx_l4_per_hwmod,
1500 .slave = &omap44xx_dss_dsi2_hwmod,
1501 .clk = "l4_div_ck",
1502 .addr = omap44xx_dss_dsi2_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001503 .user = OCP_USER_MPU,
1504};
1505
1506/* dss_dsi2 slave ports */
1507static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1508 &omap44xx_l3_main_2__dss_dsi2,
1509 &omap44xx_l4_per__dss_dsi2,
1510};
1511
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001512static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1513 { .role = "sys_clk", .clk = "dss_sys_clk" },
1514};
1515
Benoit Coussond63bd742011-01-27 11:17:03 +00001516static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1517 .name = "dss_dsi2",
1518 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001519 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001520 .mpu_irqs = omap44xx_dss_dsi2_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001521 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001522 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001523 .prcm = {
1524 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001525 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001526 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001527 },
1528 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001529 .opt_clks = dss_dsi2_opt_clks,
1530 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001531 .slaves = omap44xx_dss_dsi2_slaves,
1532 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001533};
1534
1535/*
1536 * 'hdmi' class
1537 * hdmi controller
1538 */
1539
1540static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1541 .rev_offs = 0x0000,
1542 .sysc_offs = 0x0010,
1543 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1544 SYSC_HAS_SOFTRESET),
1545 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1546 SIDLE_SMART_WKUP),
1547 .sysc_fields = &omap_hwmod_sysc_type2,
1548};
1549
1550static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1551 .name = "hdmi",
1552 .sysc = &omap44xx_hdmi_sysc,
1553};
1554
1555/* dss_hdmi */
1556static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1557static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1558 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001559 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001560};
1561
1562static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1563 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001564 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001565};
1566
1567static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1568 {
1569 .pa_start = 0x58006000,
1570 .pa_end = 0x58006fff,
1571 .flags = ADDR_TYPE_RT
1572 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001573 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001574};
1575
1576/* l3_main_2 -> dss_hdmi */
1577static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1578 .master = &omap44xx_l3_main_2_hwmod,
1579 .slave = &omap44xx_dss_hdmi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001580 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001581 .addr = omap44xx_dss_hdmi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001582 .user = OCP_USER_SDMA,
1583};
1584
1585static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1586 {
1587 .pa_start = 0x48046000,
1588 .pa_end = 0x48046fff,
1589 .flags = ADDR_TYPE_RT
1590 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001591 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001592};
1593
1594/* l4_per -> dss_hdmi */
1595static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1596 .master = &omap44xx_l4_per_hwmod,
1597 .slave = &omap44xx_dss_hdmi_hwmod,
1598 .clk = "l4_div_ck",
1599 .addr = omap44xx_dss_hdmi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001600 .user = OCP_USER_MPU,
1601};
1602
1603/* dss_hdmi slave ports */
1604static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1605 &omap44xx_l3_main_2__dss_hdmi,
1606 &omap44xx_l4_per__dss_hdmi,
1607};
1608
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001609static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1610 { .role = "sys_clk", .clk = "dss_sys_clk" },
1611};
1612
Benoit Coussond63bd742011-01-27 11:17:03 +00001613static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1614 .name = "dss_hdmi",
1615 .class = &omap44xx_hdmi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001616 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001617 .mpu_irqs = omap44xx_dss_hdmi_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001618 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001619 .main_clk = "dss_48mhz_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001620 .prcm = {
1621 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001622 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001623 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001624 },
1625 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001626 .opt_clks = dss_hdmi_opt_clks,
1627 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001628 .slaves = omap44xx_dss_hdmi_slaves,
1629 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001630};
1631
1632/*
1633 * 'rfbi' class
1634 * remote frame buffer interface
1635 */
1636
1637static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1638 .rev_offs = 0x0000,
1639 .sysc_offs = 0x0010,
1640 .syss_offs = 0x0014,
1641 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1642 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1643 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1644 .sysc_fields = &omap_hwmod_sysc_type1,
1645};
1646
1647static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1648 .name = "rfbi",
1649 .sysc = &omap44xx_rfbi_sysc,
1650};
1651
1652/* dss_rfbi */
1653static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1654static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1655 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001656 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001657};
1658
1659static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1660 {
1661 .pa_start = 0x58002000,
1662 .pa_end = 0x580020ff,
1663 .flags = ADDR_TYPE_RT
1664 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001665 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001666};
1667
1668/* l3_main_2 -> dss_rfbi */
1669static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1670 .master = &omap44xx_l3_main_2_hwmod,
1671 .slave = &omap44xx_dss_rfbi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001672 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001673 .addr = omap44xx_dss_rfbi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001674 .user = OCP_USER_SDMA,
1675};
1676
1677static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1678 {
1679 .pa_start = 0x48042000,
1680 .pa_end = 0x480420ff,
1681 .flags = ADDR_TYPE_RT
1682 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001683 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001684};
1685
1686/* l4_per -> dss_rfbi */
1687static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1688 .master = &omap44xx_l4_per_hwmod,
1689 .slave = &omap44xx_dss_rfbi_hwmod,
1690 .clk = "l4_div_ck",
1691 .addr = omap44xx_dss_rfbi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001692 .user = OCP_USER_MPU,
1693};
1694
1695/* dss_rfbi slave ports */
1696static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1697 &omap44xx_l3_main_2__dss_rfbi,
1698 &omap44xx_l4_per__dss_rfbi,
1699};
1700
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001701static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1702 { .role = "ick", .clk = "dss_fck" },
1703};
1704
Benoit Coussond63bd742011-01-27 11:17:03 +00001705static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1706 .name = "dss_rfbi",
1707 .class = &omap44xx_rfbi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001708 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001709 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001710 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001711 .prcm = {
1712 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001713 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001714 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001715 },
1716 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001717 .opt_clks = dss_rfbi_opt_clks,
1718 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001719 .slaves = omap44xx_dss_rfbi_slaves,
1720 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001721};
1722
1723/*
1724 * 'venc' class
1725 * video encoder
1726 */
1727
1728static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1729 .name = "venc",
1730};
1731
1732/* dss_venc */
1733static struct omap_hwmod omap44xx_dss_venc_hwmod;
1734static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1735 {
1736 .pa_start = 0x58003000,
1737 .pa_end = 0x580030ff,
1738 .flags = ADDR_TYPE_RT
1739 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001740 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001741};
1742
1743/* l3_main_2 -> dss_venc */
1744static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1745 .master = &omap44xx_l3_main_2_hwmod,
1746 .slave = &omap44xx_dss_venc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001747 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001748 .addr = omap44xx_dss_venc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001749 .user = OCP_USER_SDMA,
1750};
1751
1752static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1753 {
1754 .pa_start = 0x48043000,
1755 .pa_end = 0x480430ff,
1756 .flags = ADDR_TYPE_RT
1757 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001758 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001759};
1760
1761/* l4_per -> dss_venc */
1762static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1763 .master = &omap44xx_l4_per_hwmod,
1764 .slave = &omap44xx_dss_venc_hwmod,
1765 .clk = "l4_div_ck",
1766 .addr = omap44xx_dss_venc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001767 .user = OCP_USER_MPU,
1768};
1769
1770/* dss_venc slave ports */
1771static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1772 &omap44xx_l3_main_2__dss_venc,
1773 &omap44xx_l4_per__dss_venc,
1774};
1775
1776static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1777 .name = "dss_venc",
1778 .class = &omap44xx_venc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001779 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001780 .main_clk = "dss_tv_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001781 .prcm = {
1782 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001783 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001784 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001785 },
1786 },
1787 .slaves = omap44xx_dss_venc_slaves,
1788 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001789};
1790
1791/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001792 * 'gpio' class
1793 * general purpose io module
1794 */
1795
1796static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1797 .rev_offs = 0x0000,
1798 .sysc_offs = 0x0010,
1799 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001800 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1801 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1802 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001803 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1804 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001805 .sysc_fields = &omap_hwmod_sysc_type1,
1806};
1807
1808static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001809 .name = "gpio",
1810 .sysc = &omap44xx_gpio_sysc,
1811 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001812};
1813
1814/* gpio dev_attr */
1815static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001816 .bank_width = 32,
1817 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001818};
1819
1820/* gpio1 */
1821static struct omap_hwmod omap44xx_gpio1_hwmod;
1822static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1823 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001824 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001825};
1826
1827static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1828 {
1829 .pa_start = 0x4a310000,
1830 .pa_end = 0x4a3101ff,
1831 .flags = ADDR_TYPE_RT
1832 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001833 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001834};
1835
1836/* l4_wkup -> gpio1 */
1837static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1838 .master = &omap44xx_l4_wkup_hwmod,
1839 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001840 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001841 .addr = omap44xx_gpio1_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001842 .user = OCP_USER_MPU | OCP_USER_SDMA,
1843};
1844
1845/* gpio1 slave ports */
1846static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1847 &omap44xx_l4_wkup__gpio1,
1848};
1849
1850static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001851 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001852};
1853
1854static struct omap_hwmod omap44xx_gpio1_hwmod = {
1855 .name = "gpio1",
1856 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001857 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001858 .mpu_irqs = omap44xx_gpio1_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001859 .main_clk = "gpio1_ick",
1860 .prcm = {
1861 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001862 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001863 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001864 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001865 },
1866 },
1867 .opt_clks = gpio1_opt_clks,
1868 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1869 .dev_attr = &gpio_dev_attr,
1870 .slaves = omap44xx_gpio1_slaves,
1871 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001872};
1873
1874/* gpio2 */
1875static struct omap_hwmod omap44xx_gpio2_hwmod;
1876static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1877 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001878 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001879};
1880
1881static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1882 {
1883 .pa_start = 0x48055000,
1884 .pa_end = 0x480551ff,
1885 .flags = ADDR_TYPE_RT
1886 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001887 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001888};
1889
1890/* l4_per -> gpio2 */
1891static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1892 .master = &omap44xx_l4_per_hwmod,
1893 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001894 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001895 .addr = omap44xx_gpio2_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001896 .user = OCP_USER_MPU | OCP_USER_SDMA,
1897};
1898
1899/* gpio2 slave ports */
1900static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1901 &omap44xx_l4_per__gpio2,
1902};
1903
1904static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001905 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001906};
1907
1908static struct omap_hwmod omap44xx_gpio2_hwmod = {
1909 .name = "gpio2",
1910 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001911 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001912 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001913 .mpu_irqs = omap44xx_gpio2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001914 .main_clk = "gpio2_ick",
1915 .prcm = {
1916 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001917 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001918 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001919 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001920 },
1921 },
1922 .opt_clks = gpio2_opt_clks,
1923 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1924 .dev_attr = &gpio_dev_attr,
1925 .slaves = omap44xx_gpio2_slaves,
1926 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001927};
1928
1929/* gpio3 */
1930static struct omap_hwmod omap44xx_gpio3_hwmod;
1931static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1932 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001933 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001934};
1935
1936static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1937 {
1938 .pa_start = 0x48057000,
1939 .pa_end = 0x480571ff,
1940 .flags = ADDR_TYPE_RT
1941 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001942 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001943};
1944
1945/* l4_per -> gpio3 */
1946static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1947 .master = &omap44xx_l4_per_hwmod,
1948 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001949 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001950 .addr = omap44xx_gpio3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001951 .user = OCP_USER_MPU | OCP_USER_SDMA,
1952};
1953
1954/* gpio3 slave ports */
1955static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1956 &omap44xx_l4_per__gpio3,
1957};
1958
1959static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001960 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001961};
1962
1963static struct omap_hwmod omap44xx_gpio3_hwmod = {
1964 .name = "gpio3",
1965 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001966 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001967 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001968 .mpu_irqs = omap44xx_gpio3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001969 .main_clk = "gpio3_ick",
1970 .prcm = {
1971 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001972 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001973 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001974 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001975 },
1976 },
1977 .opt_clks = gpio3_opt_clks,
1978 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1979 .dev_attr = &gpio_dev_attr,
1980 .slaves = omap44xx_gpio3_slaves,
1981 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001982};
1983
1984/* gpio4 */
1985static struct omap_hwmod omap44xx_gpio4_hwmod;
1986static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1987 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001988 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001989};
1990
1991static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
1992 {
1993 .pa_start = 0x48059000,
1994 .pa_end = 0x480591ff,
1995 .flags = ADDR_TYPE_RT
1996 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001997 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001998};
1999
2000/* l4_per -> gpio4 */
2001static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2002 .master = &omap44xx_l4_per_hwmod,
2003 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002004 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002005 .addr = omap44xx_gpio4_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002006 .user = OCP_USER_MPU | OCP_USER_SDMA,
2007};
2008
2009/* gpio4 slave ports */
2010static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2011 &omap44xx_l4_per__gpio4,
2012};
2013
2014static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002015 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002016};
2017
2018static struct omap_hwmod omap44xx_gpio4_hwmod = {
2019 .name = "gpio4",
2020 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002021 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002022 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002023 .mpu_irqs = omap44xx_gpio4_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002024 .main_clk = "gpio4_ick",
2025 .prcm = {
2026 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002027 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002028 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002029 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002030 },
2031 },
2032 .opt_clks = gpio4_opt_clks,
2033 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2034 .dev_attr = &gpio_dev_attr,
2035 .slaves = omap44xx_gpio4_slaves,
2036 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002037};
2038
2039/* gpio5 */
2040static struct omap_hwmod omap44xx_gpio5_hwmod;
2041static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2042 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002043 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002044};
2045
2046static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2047 {
2048 .pa_start = 0x4805b000,
2049 .pa_end = 0x4805b1ff,
2050 .flags = ADDR_TYPE_RT
2051 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002052 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002053};
2054
2055/* l4_per -> gpio5 */
2056static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2057 .master = &omap44xx_l4_per_hwmod,
2058 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002059 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002060 .addr = omap44xx_gpio5_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002061 .user = OCP_USER_MPU | OCP_USER_SDMA,
2062};
2063
2064/* gpio5 slave ports */
2065static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2066 &omap44xx_l4_per__gpio5,
2067};
2068
2069static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002070 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002071};
2072
2073static struct omap_hwmod omap44xx_gpio5_hwmod = {
2074 .name = "gpio5",
2075 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002076 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002077 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002078 .mpu_irqs = omap44xx_gpio5_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002079 .main_clk = "gpio5_ick",
2080 .prcm = {
2081 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002082 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002083 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002084 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002085 },
2086 },
2087 .opt_clks = gpio5_opt_clks,
2088 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2089 .dev_attr = &gpio_dev_attr,
2090 .slaves = omap44xx_gpio5_slaves,
2091 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002092};
2093
2094/* gpio6 */
2095static struct omap_hwmod omap44xx_gpio6_hwmod;
2096static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2097 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002098 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002099};
2100
2101static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2102 {
2103 .pa_start = 0x4805d000,
2104 .pa_end = 0x4805d1ff,
2105 .flags = ADDR_TYPE_RT
2106 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002107 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002108};
2109
2110/* l4_per -> gpio6 */
2111static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2112 .master = &omap44xx_l4_per_hwmod,
2113 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002114 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002115 .addr = omap44xx_gpio6_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002116 .user = OCP_USER_MPU | OCP_USER_SDMA,
2117};
2118
2119/* gpio6 slave ports */
2120static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2121 &omap44xx_l4_per__gpio6,
2122};
2123
2124static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002125 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002126};
2127
2128static struct omap_hwmod omap44xx_gpio6_hwmod = {
2129 .name = "gpio6",
2130 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002131 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002132 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002133 .mpu_irqs = omap44xx_gpio6_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002134 .main_clk = "gpio6_ick",
2135 .prcm = {
2136 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002137 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002138 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002139 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002140 },
2141 },
2142 .opt_clks = gpio6_opt_clks,
2143 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2144 .dev_attr = &gpio_dev_attr,
2145 .slaves = omap44xx_gpio6_slaves,
2146 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002147};
2148
2149/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002150 * 'hsi' class
2151 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2152 * serial if)
2153 */
2154
2155static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2156 .rev_offs = 0x0000,
2157 .sysc_offs = 0x0010,
2158 .syss_offs = 0x0014,
2159 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2160 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2161 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2162 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2163 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002164 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002165 .sysc_fields = &omap_hwmod_sysc_type1,
2166};
2167
2168static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2169 .name = "hsi",
2170 .sysc = &omap44xx_hsi_sysc,
2171};
2172
2173/* hsi */
2174static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2175 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2176 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2177 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002178 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002179};
2180
2181/* hsi master ports */
2182static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2183 &omap44xx_hsi__l3_main_2,
2184};
2185
2186static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2187 {
2188 .pa_start = 0x4a058000,
2189 .pa_end = 0x4a05bfff,
2190 .flags = ADDR_TYPE_RT
2191 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002192 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002193};
2194
2195/* l4_cfg -> hsi */
2196static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2197 .master = &omap44xx_l4_cfg_hwmod,
2198 .slave = &omap44xx_hsi_hwmod,
2199 .clk = "l4_div_ck",
2200 .addr = omap44xx_hsi_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002201 .user = OCP_USER_MPU | OCP_USER_SDMA,
2202};
2203
2204/* hsi slave ports */
2205static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2206 &omap44xx_l4_cfg__hsi,
2207};
2208
2209static struct omap_hwmod omap44xx_hsi_hwmod = {
2210 .name = "hsi",
2211 .class = &omap44xx_hsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002212 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002213 .mpu_irqs = omap44xx_hsi_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002214 .main_clk = "hsi_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002215 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002216 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002217 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002218 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002219 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002220 },
2221 },
2222 .slaves = omap44xx_hsi_slaves,
2223 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2224 .masters = omap44xx_hsi_masters,
2225 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002226};
2227
2228/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302229 * 'i2c' class
2230 * multimaster high-speed i2c controller
2231 */
2232
2233static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2234 .sysc_offs = 0x0010,
2235 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002236 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2237 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002238 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002239 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2240 SIDLE_SMART_WKUP),
Benoit Coussonf7764712010-09-21 19:37:14 +05302241 .sysc_fields = &omap_hwmod_sysc_type1,
2242};
2243
2244static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002245 .name = "i2c",
2246 .sysc = &omap44xx_i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06002247 .rev = OMAP_I2C_IP_VERSION_2,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002248 .reset = &omap_i2c_reset,
Benoit Coussonf7764712010-09-21 19:37:14 +05302249};
2250
Andy Green4d4441a2011-07-10 05:27:16 -06002251static struct omap_i2c_dev_attr i2c_dev_attr = {
2252 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2253};
2254
Benoit Coussonf7764712010-09-21 19:37:14 +05302255/* i2c1 */
2256static struct omap_hwmod omap44xx_i2c1_hwmod;
2257static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2258 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002259 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302260};
2261
2262static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2263 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2264 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002265 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302266};
2267
2268static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2269 {
2270 .pa_start = 0x48070000,
2271 .pa_end = 0x480700ff,
2272 .flags = ADDR_TYPE_RT
2273 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002274 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302275};
2276
2277/* l4_per -> i2c1 */
2278static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2279 .master = &omap44xx_l4_per_hwmod,
2280 .slave = &omap44xx_i2c1_hwmod,
2281 .clk = "l4_div_ck",
2282 .addr = omap44xx_i2c1_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302283 .user = OCP_USER_MPU | OCP_USER_SDMA,
2284};
2285
2286/* i2c1 slave ports */
2287static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2288 &omap44xx_l4_per__i2c1,
2289};
2290
2291static struct omap_hwmod omap44xx_i2c1_hwmod = {
2292 .name = "i2c1",
2293 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002294 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002295 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302296 .mpu_irqs = omap44xx_i2c1_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302297 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302298 .main_clk = "i2c1_fck",
2299 .prcm = {
2300 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002301 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002302 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002303 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302304 },
2305 },
2306 .slaves = omap44xx_i2c1_slaves,
2307 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002308 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302309};
2310
2311/* i2c2 */
2312static struct omap_hwmod omap44xx_i2c2_hwmod;
2313static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2314 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002315 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302316};
2317
2318static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2319 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2320 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002321 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302322};
2323
2324static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2325 {
2326 .pa_start = 0x48072000,
2327 .pa_end = 0x480720ff,
2328 .flags = ADDR_TYPE_RT
2329 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002330 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302331};
2332
2333/* l4_per -> i2c2 */
2334static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2335 .master = &omap44xx_l4_per_hwmod,
2336 .slave = &omap44xx_i2c2_hwmod,
2337 .clk = "l4_div_ck",
2338 .addr = omap44xx_i2c2_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302339 .user = OCP_USER_MPU | OCP_USER_SDMA,
2340};
2341
2342/* i2c2 slave ports */
2343static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2344 &omap44xx_l4_per__i2c2,
2345};
2346
2347static struct omap_hwmod omap44xx_i2c2_hwmod = {
2348 .name = "i2c2",
2349 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002350 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002351 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302352 .mpu_irqs = omap44xx_i2c2_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302353 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302354 .main_clk = "i2c2_fck",
2355 .prcm = {
2356 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002357 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002358 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002359 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302360 },
2361 },
2362 .slaves = omap44xx_i2c2_slaves,
2363 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002364 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302365};
2366
2367/* i2c3 */
2368static struct omap_hwmod omap44xx_i2c3_hwmod;
2369static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2370 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002371 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302372};
2373
2374static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2375 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2376 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002377 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302378};
2379
2380static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2381 {
2382 .pa_start = 0x48060000,
2383 .pa_end = 0x480600ff,
2384 .flags = ADDR_TYPE_RT
2385 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002386 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302387};
2388
2389/* l4_per -> i2c3 */
2390static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2391 .master = &omap44xx_l4_per_hwmod,
2392 .slave = &omap44xx_i2c3_hwmod,
2393 .clk = "l4_div_ck",
2394 .addr = omap44xx_i2c3_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302395 .user = OCP_USER_MPU | OCP_USER_SDMA,
2396};
2397
2398/* i2c3 slave ports */
2399static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2400 &omap44xx_l4_per__i2c3,
2401};
2402
2403static struct omap_hwmod omap44xx_i2c3_hwmod = {
2404 .name = "i2c3",
2405 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002406 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002407 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302408 .mpu_irqs = omap44xx_i2c3_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302409 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302410 .main_clk = "i2c3_fck",
2411 .prcm = {
2412 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002413 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002414 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002415 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302416 },
2417 },
2418 .slaves = omap44xx_i2c3_slaves,
2419 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002420 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302421};
2422
2423/* i2c4 */
2424static struct omap_hwmod omap44xx_i2c4_hwmod;
2425static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2426 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002427 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302428};
2429
2430static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2431 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2432 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002433 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302434};
2435
2436static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2437 {
2438 .pa_start = 0x48350000,
2439 .pa_end = 0x483500ff,
2440 .flags = ADDR_TYPE_RT
2441 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002442 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302443};
2444
2445/* l4_per -> i2c4 */
2446static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2447 .master = &omap44xx_l4_per_hwmod,
2448 .slave = &omap44xx_i2c4_hwmod,
2449 .clk = "l4_div_ck",
2450 .addr = omap44xx_i2c4_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302451 .user = OCP_USER_MPU | OCP_USER_SDMA,
2452};
2453
2454/* i2c4 slave ports */
2455static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2456 &omap44xx_l4_per__i2c4,
2457};
2458
2459static struct omap_hwmod omap44xx_i2c4_hwmod = {
2460 .name = "i2c4",
2461 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002462 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002463 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302464 .mpu_irqs = omap44xx_i2c4_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302465 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302466 .main_clk = "i2c4_fck",
2467 .prcm = {
2468 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002469 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002470 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002471 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302472 },
2473 },
2474 .slaves = omap44xx_i2c4_slaves,
2475 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002476 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302477};
2478
2479/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002480 * 'ipu' class
2481 * imaging processor unit
2482 */
2483
2484static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2485 .name = "ipu",
2486};
2487
2488/* ipu */
2489static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2490 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002491 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002492};
2493
2494static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2495 { .name = "cpu0", .rst_shift = 0 },
2496};
2497
2498static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2499 { .name = "cpu1", .rst_shift = 1 },
2500};
2501
2502static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2503 { .name = "mmu_cache", .rst_shift = 2 },
2504};
2505
2506/* ipu master ports */
2507static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2508 &omap44xx_ipu__l3_main_2,
2509};
2510
2511/* l3_main_2 -> ipu */
2512static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2513 .master = &omap44xx_l3_main_2_hwmod,
2514 .slave = &omap44xx_ipu_hwmod,
2515 .clk = "l3_div_ck",
2516 .user = OCP_USER_MPU | OCP_USER_SDMA,
2517};
2518
2519/* ipu slave ports */
2520static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2521 &omap44xx_l3_main_2__ipu,
2522};
2523
2524/* Pseudo hwmod for reset control purpose only */
2525static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2526 .name = "ipu_c0",
2527 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002528 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002529 .flags = HWMOD_INIT_NO_RESET,
2530 .rst_lines = omap44xx_ipu_c0_resets,
2531 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002532 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002533 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002534 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002535 },
2536 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002537};
2538
2539/* Pseudo hwmod for reset control purpose only */
2540static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2541 .name = "ipu_c1",
2542 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002543 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002544 .flags = HWMOD_INIT_NO_RESET,
2545 .rst_lines = omap44xx_ipu_c1_resets,
2546 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002547 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002548 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002549 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002550 },
2551 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002552};
2553
2554static struct omap_hwmod omap44xx_ipu_hwmod = {
2555 .name = "ipu",
2556 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002557 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002558 .mpu_irqs = omap44xx_ipu_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002559 .rst_lines = omap44xx_ipu_resets,
2560 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2561 .main_clk = "ipu_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002562 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002563 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002564 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002565 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002566 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002567 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002568 },
2569 },
2570 .slaves = omap44xx_ipu_slaves,
2571 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2572 .masters = omap44xx_ipu_masters,
2573 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002574};
2575
2576/*
2577 * 'iss' class
2578 * external images sensor pixel data processor
2579 */
2580
2581static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2582 .rev_offs = 0x0000,
2583 .sysc_offs = 0x0010,
2584 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2585 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2586 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2587 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002588 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002589 .sysc_fields = &omap_hwmod_sysc_type2,
2590};
2591
2592static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2593 .name = "iss",
2594 .sysc = &omap44xx_iss_sysc,
2595};
2596
2597/* iss */
2598static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2599 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002600 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002601};
2602
2603static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2604 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2605 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2606 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2607 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002608 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002609};
2610
2611/* iss master ports */
2612static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2613 &omap44xx_iss__l3_main_2,
2614};
2615
2616static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2617 {
2618 .pa_start = 0x52000000,
2619 .pa_end = 0x520000ff,
2620 .flags = ADDR_TYPE_RT
2621 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002622 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002623};
2624
2625/* l3_main_2 -> iss */
2626static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2627 .master = &omap44xx_l3_main_2_hwmod,
2628 .slave = &omap44xx_iss_hwmod,
2629 .clk = "l3_div_ck",
2630 .addr = omap44xx_iss_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002631 .user = OCP_USER_MPU | OCP_USER_SDMA,
2632};
2633
2634/* iss slave ports */
2635static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2636 &omap44xx_l3_main_2__iss,
2637};
2638
2639static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2640 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2641};
2642
2643static struct omap_hwmod omap44xx_iss_hwmod = {
2644 .name = "iss",
2645 .class = &omap44xx_iss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002646 .clkdm_name = "iss_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002647 .mpu_irqs = omap44xx_iss_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002648 .sdma_reqs = omap44xx_iss_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002649 .main_clk = "iss_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002650 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002651 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002652 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002653 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002654 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002655 },
2656 },
2657 .opt_clks = iss_opt_clks,
2658 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2659 .slaves = omap44xx_iss_slaves,
2660 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2661 .masters = omap44xx_iss_masters,
2662 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002663};
2664
2665/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002666 * 'iva' class
2667 * multi-standard video encoder/decoder hardware accelerator
2668 */
2669
2670static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002671 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002672};
2673
2674/* iva */
2675static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2676 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2677 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2678 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002679 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002680};
2681
2682static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2683 { .name = "logic", .rst_shift = 2 },
2684};
2685
2686static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2687 { .name = "seq0", .rst_shift = 0 },
2688};
2689
2690static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2691 { .name = "seq1", .rst_shift = 1 },
2692};
2693
2694/* iva master ports */
2695static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2696 &omap44xx_iva__l3_main_2,
2697 &omap44xx_iva__l3_instr,
2698};
2699
2700static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2701 {
2702 .pa_start = 0x5a000000,
2703 .pa_end = 0x5a07ffff,
2704 .flags = ADDR_TYPE_RT
2705 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002706 { }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002707};
2708
2709/* l3_main_2 -> iva */
2710static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2711 .master = &omap44xx_l3_main_2_hwmod,
2712 .slave = &omap44xx_iva_hwmod,
2713 .clk = "l3_div_ck",
2714 .addr = omap44xx_iva_addrs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002715 .user = OCP_USER_MPU,
2716};
2717
2718/* iva slave ports */
2719static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2720 &omap44xx_dsp__iva,
2721 &omap44xx_l3_main_2__iva,
2722};
2723
2724/* Pseudo hwmod for reset control purpose only */
2725static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2726 .name = "iva_seq0",
2727 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002728 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002729 .flags = HWMOD_INIT_NO_RESET,
2730 .rst_lines = omap44xx_iva_seq0_resets,
2731 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2732 .prcm = {
2733 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002734 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002735 },
2736 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002737};
2738
2739/* Pseudo hwmod for reset control purpose only */
2740static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2741 .name = "iva_seq1",
2742 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002743 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002744 .flags = HWMOD_INIT_NO_RESET,
2745 .rst_lines = omap44xx_iva_seq1_resets,
2746 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2747 .prcm = {
2748 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002749 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002750 },
2751 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002752};
2753
2754static struct omap_hwmod omap44xx_iva_hwmod = {
2755 .name = "iva",
2756 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002757 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002758 .mpu_irqs = omap44xx_iva_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002759 .rst_lines = omap44xx_iva_resets,
2760 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2761 .main_clk = "iva_fck",
2762 .prcm = {
2763 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002764 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002765 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002766 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002767 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002768 },
2769 },
2770 .slaves = omap44xx_iva_slaves,
2771 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2772 .masters = omap44xx_iva_masters,
2773 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002774};
2775
2776/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002777 * 'kbd' class
2778 * keyboard controller
2779 */
2780
2781static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2782 .rev_offs = 0x0000,
2783 .sysc_offs = 0x0010,
2784 .syss_offs = 0x0014,
2785 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2786 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2787 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2788 SYSS_HAS_RESET_STATUS),
2789 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2790 .sysc_fields = &omap_hwmod_sysc_type1,
2791};
2792
2793static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2794 .name = "kbd",
2795 .sysc = &omap44xx_kbd_sysc,
2796};
2797
2798/* kbd */
2799static struct omap_hwmod omap44xx_kbd_hwmod;
2800static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2801 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002802 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002803};
2804
2805static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2806 {
2807 .pa_start = 0x4a31c000,
2808 .pa_end = 0x4a31c07f,
2809 .flags = ADDR_TYPE_RT
2810 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002811 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002812};
2813
2814/* l4_wkup -> kbd */
2815static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2816 .master = &omap44xx_l4_wkup_hwmod,
2817 .slave = &omap44xx_kbd_hwmod,
2818 .clk = "l4_wkup_clk_mux_ck",
2819 .addr = omap44xx_kbd_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002820 .user = OCP_USER_MPU | OCP_USER_SDMA,
2821};
2822
2823/* kbd slave ports */
2824static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2825 &omap44xx_l4_wkup__kbd,
2826};
2827
2828static struct omap_hwmod omap44xx_kbd_hwmod = {
2829 .name = "kbd",
2830 .class = &omap44xx_kbd_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002831 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002832 .mpu_irqs = omap44xx_kbd_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002833 .main_clk = "kbd_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002834 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002835 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002836 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002837 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002838 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002839 },
2840 },
2841 .slaves = omap44xx_kbd_slaves,
2842 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01002843};
2844
2845/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002846 * 'mailbox' class
2847 * mailbox module allowing communication between the on-chip processors using a
2848 * queued mailbox-interrupt mechanism.
2849 */
2850
2851static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2852 .rev_offs = 0x0000,
2853 .sysc_offs = 0x0010,
2854 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2855 SYSC_HAS_SOFTRESET),
2856 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2857 .sysc_fields = &omap_hwmod_sysc_type2,
2858};
2859
2860static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2861 .name = "mailbox",
2862 .sysc = &omap44xx_mailbox_sysc,
2863};
2864
2865/* mailbox */
2866static struct omap_hwmod omap44xx_mailbox_hwmod;
2867static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2868 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002869 { .irq = -1 }
Benoit Coussonec5df922011-02-02 19:27:21 +00002870};
2871
2872static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2873 {
2874 .pa_start = 0x4a0f4000,
2875 .pa_end = 0x4a0f41ff,
2876 .flags = ADDR_TYPE_RT
2877 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002878 { }
Benoit Coussonec5df922011-02-02 19:27:21 +00002879};
2880
2881/* l4_cfg -> mailbox */
2882static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2883 .master = &omap44xx_l4_cfg_hwmod,
2884 .slave = &omap44xx_mailbox_hwmod,
2885 .clk = "l4_div_ck",
2886 .addr = omap44xx_mailbox_addrs,
Benoit Coussonec5df922011-02-02 19:27:21 +00002887 .user = OCP_USER_MPU | OCP_USER_SDMA,
2888};
2889
2890/* mailbox slave ports */
2891static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2892 &omap44xx_l4_cfg__mailbox,
2893};
2894
2895static struct omap_hwmod omap44xx_mailbox_hwmod = {
2896 .name = "mailbox",
2897 .class = &omap44xx_mailbox_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002898 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussonec5df922011-02-02 19:27:21 +00002899 .mpu_irqs = omap44xx_mailbox_irqs,
Benoit Cousson00fe6102011-07-09 19:14:28 -06002900 .prcm = {
Benoit Coussonec5df922011-02-02 19:27:21 +00002901 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002902 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002903 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
Benoit Coussonec5df922011-02-02 19:27:21 +00002904 },
2905 },
2906 .slaves = omap44xx_mailbox_slaves,
2907 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
Benoit Coussonec5df922011-02-02 19:27:21 +00002908};
2909
2910/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002911 * 'mcbsp' class
2912 * multi channel buffered serial port controller
2913 */
2914
2915static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2916 .sysc_offs = 0x008c,
2917 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2918 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2919 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2920 .sysc_fields = &omap_hwmod_sysc_type1,
2921};
2922
2923static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2924 .name = "mcbsp",
2925 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302926 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002927};
2928
2929/* mcbsp1 */
2930static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2931static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2932 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002933 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002934};
2935
2936static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2937 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2938 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002939 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002940};
2941
2942static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2943 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302944 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002945 .pa_start = 0x40122000,
2946 .pa_end = 0x401220ff,
2947 .flags = ADDR_TYPE_RT
2948 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002949 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002950};
2951
2952/* l4_abe -> mcbsp1 */
2953static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2954 .master = &omap44xx_l4_abe_hwmod,
2955 .slave = &omap44xx_mcbsp1_hwmod,
2956 .clk = "ocp_abe_iclk",
2957 .addr = omap44xx_mcbsp1_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002958 .user = OCP_USER_MPU,
2959};
2960
2961static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2962 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302963 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002964 .pa_start = 0x49022000,
2965 .pa_end = 0x490220ff,
2966 .flags = ADDR_TYPE_RT
2967 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002968 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002969};
2970
2971/* l4_abe -> mcbsp1 (dma) */
2972static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2973 .master = &omap44xx_l4_abe_hwmod,
2974 .slave = &omap44xx_mcbsp1_hwmod,
2975 .clk = "ocp_abe_iclk",
2976 .addr = omap44xx_mcbsp1_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002977 .user = OCP_USER_SDMA,
2978};
2979
2980/* mcbsp1 slave ports */
2981static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2982 &omap44xx_l4_abe__mcbsp1,
2983 &omap44xx_l4_abe__mcbsp1_dma,
2984};
2985
2986static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2987 .name = "mcbsp1",
2988 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002989 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002990 .mpu_irqs = omap44xx_mcbsp1_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002991 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002992 .main_clk = "mcbsp1_fck",
2993 .prcm = {
2994 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002995 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002996 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002997 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002998 },
2999 },
3000 .slaves = omap44xx_mcbsp1_slaves,
3001 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003002};
3003
3004/* mcbsp2 */
3005static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3006static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3007 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003008 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003009};
3010
3011static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3012 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
3013 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003014 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003015};
3016
3017static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3018 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303019 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003020 .pa_start = 0x40124000,
3021 .pa_end = 0x401240ff,
3022 .flags = ADDR_TYPE_RT
3023 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003024 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003025};
3026
3027/* l4_abe -> mcbsp2 */
3028static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3029 .master = &omap44xx_l4_abe_hwmod,
3030 .slave = &omap44xx_mcbsp2_hwmod,
3031 .clk = "ocp_abe_iclk",
3032 .addr = omap44xx_mcbsp2_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003033 .user = OCP_USER_MPU,
3034};
3035
3036static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3037 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303038 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003039 .pa_start = 0x49024000,
3040 .pa_end = 0x490240ff,
3041 .flags = ADDR_TYPE_RT
3042 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003043 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003044};
3045
3046/* l4_abe -> mcbsp2 (dma) */
3047static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3048 .master = &omap44xx_l4_abe_hwmod,
3049 .slave = &omap44xx_mcbsp2_hwmod,
3050 .clk = "ocp_abe_iclk",
3051 .addr = omap44xx_mcbsp2_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003052 .user = OCP_USER_SDMA,
3053};
3054
3055/* mcbsp2 slave ports */
3056static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3057 &omap44xx_l4_abe__mcbsp2,
3058 &omap44xx_l4_abe__mcbsp2_dma,
3059};
3060
3061static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3062 .name = "mcbsp2",
3063 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003064 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003065 .mpu_irqs = omap44xx_mcbsp2_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003066 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003067 .main_clk = "mcbsp2_fck",
3068 .prcm = {
3069 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003070 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003071 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003072 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003073 },
3074 },
3075 .slaves = omap44xx_mcbsp2_slaves,
3076 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003077};
3078
3079/* mcbsp3 */
3080static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3081static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3082 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003083 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003084};
3085
3086static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3087 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
3088 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003089 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003090};
3091
3092static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3093 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303094 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003095 .pa_start = 0x40126000,
3096 .pa_end = 0x401260ff,
3097 .flags = ADDR_TYPE_RT
3098 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003099 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003100};
3101
3102/* l4_abe -> mcbsp3 */
3103static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3104 .master = &omap44xx_l4_abe_hwmod,
3105 .slave = &omap44xx_mcbsp3_hwmod,
3106 .clk = "ocp_abe_iclk",
3107 .addr = omap44xx_mcbsp3_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003108 .user = OCP_USER_MPU,
3109};
3110
3111static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3112 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303113 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003114 .pa_start = 0x49026000,
3115 .pa_end = 0x490260ff,
3116 .flags = ADDR_TYPE_RT
3117 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003118 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003119};
3120
3121/* l4_abe -> mcbsp3 (dma) */
3122static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3123 .master = &omap44xx_l4_abe_hwmod,
3124 .slave = &omap44xx_mcbsp3_hwmod,
3125 .clk = "ocp_abe_iclk",
3126 .addr = omap44xx_mcbsp3_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003127 .user = OCP_USER_SDMA,
3128};
3129
3130/* mcbsp3 slave ports */
3131static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3132 &omap44xx_l4_abe__mcbsp3,
3133 &omap44xx_l4_abe__mcbsp3_dma,
3134};
3135
3136static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3137 .name = "mcbsp3",
3138 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003139 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003140 .mpu_irqs = omap44xx_mcbsp3_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003141 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003142 .main_clk = "mcbsp3_fck",
3143 .prcm = {
3144 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003145 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003146 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003147 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003148 },
3149 },
3150 .slaves = omap44xx_mcbsp3_slaves,
3151 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003152};
3153
3154/* mcbsp4 */
3155static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3156static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3157 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003158 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003159};
3160
3161static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3162 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3163 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003164 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003165};
3166
3167static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3168 {
3169 .pa_start = 0x48096000,
3170 .pa_end = 0x480960ff,
3171 .flags = ADDR_TYPE_RT
3172 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003173 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003174};
3175
3176/* l4_per -> mcbsp4 */
3177static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3178 .master = &omap44xx_l4_per_hwmod,
3179 .slave = &omap44xx_mcbsp4_hwmod,
3180 .clk = "l4_div_ck",
3181 .addr = omap44xx_mcbsp4_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003182 .user = OCP_USER_MPU | OCP_USER_SDMA,
3183};
3184
3185/* mcbsp4 slave ports */
3186static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3187 &omap44xx_l4_per__mcbsp4,
3188};
3189
3190static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3191 .name = "mcbsp4",
3192 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003193 .clkdm_name = "l4_per_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003194 .mpu_irqs = omap44xx_mcbsp4_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003195 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003196 .main_clk = "mcbsp4_fck",
3197 .prcm = {
3198 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003199 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003200 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003201 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003202 },
3203 },
3204 .slaves = omap44xx_mcbsp4_slaves,
3205 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003206};
3207
3208/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003209 * 'mcpdm' class
3210 * multi channel pdm controller (proprietary interface with phoenix power
3211 * ic)
3212 */
3213
3214static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3215 .rev_offs = 0x0000,
3216 .sysc_offs = 0x0010,
3217 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3218 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3219 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3220 SIDLE_SMART_WKUP),
3221 .sysc_fields = &omap_hwmod_sysc_type2,
3222};
3223
3224static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3225 .name = "mcpdm",
3226 .sysc = &omap44xx_mcpdm_sysc,
3227};
3228
3229/* mcpdm */
3230static struct omap_hwmod omap44xx_mcpdm_hwmod;
3231static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3232 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003233 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003234};
3235
3236static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3237 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3238 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003239 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003240};
3241
3242static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3243 {
3244 .pa_start = 0x40132000,
3245 .pa_end = 0x4013207f,
3246 .flags = ADDR_TYPE_RT
3247 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003248 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003249};
3250
3251/* l4_abe -> mcpdm */
3252static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3253 .master = &omap44xx_l4_abe_hwmod,
3254 .slave = &omap44xx_mcpdm_hwmod,
3255 .clk = "ocp_abe_iclk",
3256 .addr = omap44xx_mcpdm_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003257 .user = OCP_USER_MPU,
3258};
3259
3260static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3261 {
3262 .pa_start = 0x49032000,
3263 .pa_end = 0x4903207f,
3264 .flags = ADDR_TYPE_RT
3265 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003266 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003267};
3268
3269/* l4_abe -> mcpdm (dma) */
3270static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3271 .master = &omap44xx_l4_abe_hwmod,
3272 .slave = &omap44xx_mcpdm_hwmod,
3273 .clk = "ocp_abe_iclk",
3274 .addr = omap44xx_mcpdm_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003275 .user = OCP_USER_SDMA,
3276};
3277
3278/* mcpdm slave ports */
3279static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3280 &omap44xx_l4_abe__mcpdm,
3281 &omap44xx_l4_abe__mcpdm_dma,
3282};
3283
3284static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3285 .name = "mcpdm",
3286 .class = &omap44xx_mcpdm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003287 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003288 .mpu_irqs = omap44xx_mcpdm_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003289 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003290 .main_clk = "mcpdm_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003291 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003292 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003293 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003294 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003295 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003296 },
3297 },
3298 .slaves = omap44xx_mcpdm_slaves,
3299 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003300};
3301
3302/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303303 * 'mcspi' class
3304 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3305 * bus
3306 */
3307
3308static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3309 .rev_offs = 0x0000,
3310 .sysc_offs = 0x0010,
3311 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3312 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3313 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3314 SIDLE_SMART_WKUP),
3315 .sysc_fields = &omap_hwmod_sysc_type2,
3316};
3317
3318static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3319 .name = "mcspi",
3320 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003321 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303322};
3323
3324/* mcspi1 */
3325static struct omap_hwmod omap44xx_mcspi1_hwmod;
3326static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3327 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003328 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303329};
3330
3331static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3332 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3333 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3334 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3335 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3336 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3337 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3338 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3339 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003340 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303341};
3342
3343static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3344 {
3345 .pa_start = 0x48098000,
3346 .pa_end = 0x480981ff,
3347 .flags = ADDR_TYPE_RT
3348 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003349 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303350};
3351
3352/* l4_per -> mcspi1 */
3353static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3354 .master = &omap44xx_l4_per_hwmod,
3355 .slave = &omap44xx_mcspi1_hwmod,
3356 .clk = "l4_div_ck",
3357 .addr = omap44xx_mcspi1_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303358 .user = OCP_USER_MPU | OCP_USER_SDMA,
3359};
3360
3361/* mcspi1 slave ports */
3362static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3363 &omap44xx_l4_per__mcspi1,
3364};
3365
Benoit Cousson905a74d2011-02-18 14:01:06 +01003366/* mcspi1 dev_attr */
3367static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3368 .num_chipselect = 4,
3369};
3370
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303371static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3372 .name = "mcspi1",
3373 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003374 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303375 .mpu_irqs = omap44xx_mcspi1_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303376 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303377 .main_clk = "mcspi1_fck",
3378 .prcm = {
3379 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003380 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003381 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003382 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303383 },
3384 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003385 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303386 .slaves = omap44xx_mcspi1_slaves,
3387 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303388};
3389
3390/* mcspi2 */
3391static struct omap_hwmod omap44xx_mcspi2_hwmod;
3392static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3393 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003394 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303395};
3396
3397static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3398 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3399 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3400 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3401 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003402 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303403};
3404
3405static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3406 {
3407 .pa_start = 0x4809a000,
3408 .pa_end = 0x4809a1ff,
3409 .flags = ADDR_TYPE_RT
3410 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003411 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303412};
3413
3414/* l4_per -> mcspi2 */
3415static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3416 .master = &omap44xx_l4_per_hwmod,
3417 .slave = &omap44xx_mcspi2_hwmod,
3418 .clk = "l4_div_ck",
3419 .addr = omap44xx_mcspi2_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303420 .user = OCP_USER_MPU | OCP_USER_SDMA,
3421};
3422
3423/* mcspi2 slave ports */
3424static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3425 &omap44xx_l4_per__mcspi2,
3426};
3427
Benoit Cousson905a74d2011-02-18 14:01:06 +01003428/* mcspi2 dev_attr */
3429static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3430 .num_chipselect = 2,
3431};
3432
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303433static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3434 .name = "mcspi2",
3435 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003436 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303437 .mpu_irqs = omap44xx_mcspi2_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303438 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303439 .main_clk = "mcspi2_fck",
3440 .prcm = {
3441 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003442 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003443 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003444 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303445 },
3446 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003447 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303448 .slaves = omap44xx_mcspi2_slaves,
3449 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303450};
3451
3452/* mcspi3 */
3453static struct omap_hwmod omap44xx_mcspi3_hwmod;
3454static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3455 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003456 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303457};
3458
3459static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3460 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3461 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3462 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3463 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003464 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303465};
3466
3467static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3468 {
3469 .pa_start = 0x480b8000,
3470 .pa_end = 0x480b81ff,
3471 .flags = ADDR_TYPE_RT
3472 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003473 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303474};
3475
3476/* l4_per -> mcspi3 */
3477static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3478 .master = &omap44xx_l4_per_hwmod,
3479 .slave = &omap44xx_mcspi3_hwmod,
3480 .clk = "l4_div_ck",
3481 .addr = omap44xx_mcspi3_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303482 .user = OCP_USER_MPU | OCP_USER_SDMA,
3483};
3484
3485/* mcspi3 slave ports */
3486static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3487 &omap44xx_l4_per__mcspi3,
3488};
3489
Benoit Cousson905a74d2011-02-18 14:01:06 +01003490/* mcspi3 dev_attr */
3491static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3492 .num_chipselect = 2,
3493};
3494
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303495static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3496 .name = "mcspi3",
3497 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003498 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303499 .mpu_irqs = omap44xx_mcspi3_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303500 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303501 .main_clk = "mcspi3_fck",
3502 .prcm = {
3503 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003504 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003505 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003506 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303507 },
3508 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003509 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303510 .slaves = omap44xx_mcspi3_slaves,
3511 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303512};
3513
3514/* mcspi4 */
3515static struct omap_hwmod omap44xx_mcspi4_hwmod;
3516static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3517 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003518 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303519};
3520
3521static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3522 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3523 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003524 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303525};
3526
3527static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3528 {
3529 .pa_start = 0x480ba000,
3530 .pa_end = 0x480ba1ff,
3531 .flags = ADDR_TYPE_RT
3532 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003533 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303534};
3535
3536/* l4_per -> mcspi4 */
3537static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3538 .master = &omap44xx_l4_per_hwmod,
3539 .slave = &omap44xx_mcspi4_hwmod,
3540 .clk = "l4_div_ck",
3541 .addr = omap44xx_mcspi4_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303542 .user = OCP_USER_MPU | OCP_USER_SDMA,
3543};
3544
3545/* mcspi4 slave ports */
3546static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3547 &omap44xx_l4_per__mcspi4,
3548};
3549
Benoit Cousson905a74d2011-02-18 14:01:06 +01003550/* mcspi4 dev_attr */
3551static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3552 .num_chipselect = 1,
3553};
3554
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303555static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3556 .name = "mcspi4",
3557 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003558 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303559 .mpu_irqs = omap44xx_mcspi4_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303560 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303561 .main_clk = "mcspi4_fck",
3562 .prcm = {
3563 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003564 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003565 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003566 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303567 },
3568 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003569 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303570 .slaves = omap44xx_mcspi4_slaves,
3571 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303572};
3573
3574/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003575 * 'mmc' class
3576 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3577 */
3578
3579static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3580 .rev_offs = 0x0000,
3581 .sysc_offs = 0x0010,
3582 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3583 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3584 SYSC_HAS_SOFTRESET),
3585 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3586 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02003587 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01003588 .sysc_fields = &omap_hwmod_sysc_type2,
3589};
3590
3591static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3592 .name = "mmc",
3593 .sysc = &omap44xx_mmc_sysc,
3594};
3595
3596/* mmc1 */
3597static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3598 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003599 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003600};
3601
3602static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3603 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3604 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003605 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003606};
3607
3608/* mmc1 master ports */
3609static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3610 &omap44xx_mmc1__l3_main_1,
3611};
3612
3613static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3614 {
3615 .pa_start = 0x4809c000,
3616 .pa_end = 0x4809c3ff,
3617 .flags = ADDR_TYPE_RT
3618 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003619 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003620};
3621
3622/* l4_per -> mmc1 */
3623static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3624 .master = &omap44xx_l4_per_hwmod,
3625 .slave = &omap44xx_mmc1_hwmod,
3626 .clk = "l4_div_ck",
3627 .addr = omap44xx_mmc1_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003628 .user = OCP_USER_MPU | OCP_USER_SDMA,
3629};
3630
3631/* mmc1 slave ports */
3632static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3633 &omap44xx_l4_per__mmc1,
3634};
3635
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003636/* mmc1 dev_attr */
3637static struct omap_mmc_dev_attr mmc1_dev_attr = {
3638 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3639};
3640
Benoit Cousson407a6882011-02-15 22:39:48 +01003641static struct omap_hwmod omap44xx_mmc1_hwmod = {
3642 .name = "mmc1",
3643 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003644 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003645 .mpu_irqs = omap44xx_mmc1_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003646 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003647 .main_clk = "mmc1_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003648 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003649 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003650 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003651 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003652 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003653 },
3654 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003655 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003656 .slaves = omap44xx_mmc1_slaves,
3657 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3658 .masters = omap44xx_mmc1_masters,
3659 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003660};
3661
3662/* mmc2 */
3663static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3664 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003665 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003666};
3667
3668static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3669 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3670 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003671 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003672};
3673
3674/* mmc2 master ports */
3675static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3676 &omap44xx_mmc2__l3_main_1,
3677};
3678
3679static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3680 {
3681 .pa_start = 0x480b4000,
3682 .pa_end = 0x480b43ff,
3683 .flags = ADDR_TYPE_RT
3684 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003685 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003686};
3687
3688/* l4_per -> mmc2 */
3689static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3690 .master = &omap44xx_l4_per_hwmod,
3691 .slave = &omap44xx_mmc2_hwmod,
3692 .clk = "l4_div_ck",
3693 .addr = omap44xx_mmc2_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003694 .user = OCP_USER_MPU | OCP_USER_SDMA,
3695};
3696
3697/* mmc2 slave ports */
3698static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3699 &omap44xx_l4_per__mmc2,
3700};
3701
3702static struct omap_hwmod omap44xx_mmc2_hwmod = {
3703 .name = "mmc2",
3704 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003705 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003706 .mpu_irqs = omap44xx_mmc2_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003707 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003708 .main_clk = "mmc2_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003709 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003710 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003711 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003712 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003713 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003714 },
3715 },
3716 .slaves = omap44xx_mmc2_slaves,
3717 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3718 .masters = omap44xx_mmc2_masters,
3719 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003720};
3721
3722/* mmc3 */
3723static struct omap_hwmod omap44xx_mmc3_hwmod;
3724static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3725 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003726 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003727};
3728
3729static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3730 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3731 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003732 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003733};
3734
3735static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3736 {
3737 .pa_start = 0x480ad000,
3738 .pa_end = 0x480ad3ff,
3739 .flags = ADDR_TYPE_RT
3740 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003741 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003742};
3743
3744/* l4_per -> mmc3 */
3745static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3746 .master = &omap44xx_l4_per_hwmod,
3747 .slave = &omap44xx_mmc3_hwmod,
3748 .clk = "l4_div_ck",
3749 .addr = omap44xx_mmc3_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003750 .user = OCP_USER_MPU | OCP_USER_SDMA,
3751};
3752
3753/* mmc3 slave ports */
3754static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3755 &omap44xx_l4_per__mmc3,
3756};
3757
3758static struct omap_hwmod omap44xx_mmc3_hwmod = {
3759 .name = "mmc3",
3760 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003761 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003762 .mpu_irqs = omap44xx_mmc3_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003763 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003764 .main_clk = "mmc3_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003765 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003766 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003767 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003768 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003769 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003770 },
3771 },
3772 .slaves = omap44xx_mmc3_slaves,
3773 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003774};
3775
3776/* mmc4 */
3777static struct omap_hwmod omap44xx_mmc4_hwmod;
3778static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3779 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003780 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003781};
3782
3783static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3784 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3785 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003786 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003787};
3788
3789static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3790 {
3791 .pa_start = 0x480d1000,
3792 .pa_end = 0x480d13ff,
3793 .flags = ADDR_TYPE_RT
3794 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003795 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003796};
3797
3798/* l4_per -> mmc4 */
3799static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3800 .master = &omap44xx_l4_per_hwmod,
3801 .slave = &omap44xx_mmc4_hwmod,
3802 .clk = "l4_div_ck",
3803 .addr = omap44xx_mmc4_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003804 .user = OCP_USER_MPU | OCP_USER_SDMA,
3805};
3806
3807/* mmc4 slave ports */
3808static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3809 &omap44xx_l4_per__mmc4,
3810};
3811
3812static struct omap_hwmod omap44xx_mmc4_hwmod = {
3813 .name = "mmc4",
3814 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003815 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003816 .mpu_irqs = omap44xx_mmc4_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003817
Benoit Cousson407a6882011-02-15 22:39:48 +01003818 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003819 .main_clk = "mmc4_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003820 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003821 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003822 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003823 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003824 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003825 },
3826 },
3827 .slaves = omap44xx_mmc4_slaves,
3828 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003829};
3830
3831/* mmc5 */
3832static struct omap_hwmod omap44xx_mmc5_hwmod;
3833static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3834 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003835 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003836};
3837
3838static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3839 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3840 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003841 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003842};
3843
3844static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3845 {
3846 .pa_start = 0x480d5000,
3847 .pa_end = 0x480d53ff,
3848 .flags = ADDR_TYPE_RT
3849 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003850 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003851};
3852
3853/* l4_per -> mmc5 */
3854static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3855 .master = &omap44xx_l4_per_hwmod,
3856 .slave = &omap44xx_mmc5_hwmod,
3857 .clk = "l4_div_ck",
3858 .addr = omap44xx_mmc5_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003859 .user = OCP_USER_MPU | OCP_USER_SDMA,
3860};
3861
3862/* mmc5 slave ports */
3863static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3864 &omap44xx_l4_per__mmc5,
3865};
3866
3867static struct omap_hwmod omap44xx_mmc5_hwmod = {
3868 .name = "mmc5",
3869 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003870 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003871 .mpu_irqs = omap44xx_mmc5_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003872 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003873 .main_clk = "mmc5_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003874 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003875 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003876 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003877 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003878 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003879 },
3880 },
3881 .slaves = omap44xx_mmc5_slaves,
3882 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003883};
3884
3885/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003886 * 'mpu' class
3887 * mpu sub-system
3888 */
3889
3890static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003891 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003892};
3893
3894/* mpu */
3895static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3896 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3897 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3898 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003899 { .irq = -1 }
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003900};
3901
3902/* mpu master ports */
3903static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3904 &omap44xx_mpu__l3_main_1,
3905 &omap44xx_mpu__l4_abe,
3906 &omap44xx_mpu__dmm,
3907};
3908
3909static struct omap_hwmod omap44xx_mpu_hwmod = {
3910 .name = "mpu",
3911 .class = &omap44xx_mpu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003912 .clkdm_name = "mpuss_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06003913 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003914 .mpu_irqs = omap44xx_mpu_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003915 .main_clk = "dpll_mpu_m2_ck",
3916 .prcm = {
3917 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003918 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003919 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003920 },
3921 },
3922 .masters = omap44xx_mpu_masters,
3923 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003924};
3925
Benoit Cousson92b18d12010-09-23 20:02:41 +05303926/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003927 * 'smartreflex' class
3928 * smartreflex module (monitor silicon performance and outputs a measure of
3929 * performance error)
3930 */
3931
3932/* The IP is not compliant to type1 / type2 scheme */
3933static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
3934 .sidle_shift = 24,
3935 .enwkup_shift = 26,
3936};
3937
3938static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
3939 .sysc_offs = 0x0038,
3940 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
3941 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3942 SIDLE_SMART_WKUP),
3943 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
3944};
3945
3946static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003947 .name = "smartreflex",
3948 .sysc = &omap44xx_smartreflex_sysc,
3949 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003950};
3951
3952/* smartreflex_core */
3953static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3954static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
3955 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003956 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003957};
3958
3959static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
3960 {
3961 .pa_start = 0x4a0dd000,
3962 .pa_end = 0x4a0dd03f,
3963 .flags = ADDR_TYPE_RT
3964 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003965 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003966};
3967
3968/* l4_cfg -> smartreflex_core */
3969static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
3970 .master = &omap44xx_l4_cfg_hwmod,
3971 .slave = &omap44xx_smartreflex_core_hwmod,
3972 .clk = "l4_div_ck",
3973 .addr = omap44xx_smartreflex_core_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003974 .user = OCP_USER_MPU | OCP_USER_SDMA,
3975};
3976
3977/* smartreflex_core slave ports */
3978static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
3979 &omap44xx_l4_cfg__smartreflex_core,
3980};
3981
3982static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3983 .name = "smartreflex_core",
3984 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003985 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003986 .mpu_irqs = omap44xx_smartreflex_core_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003987
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003988 .main_clk = "smartreflex_core_fck",
3989 .vdd_name = "core",
3990 .prcm = {
3991 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003992 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003993 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003994 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003995 },
3996 },
3997 .slaves = omap44xx_smartreflex_core_slaves,
3998 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003999};
4000
4001/* smartreflex_iva */
4002static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4003static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4004 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004005 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004006};
4007
4008static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4009 {
4010 .pa_start = 0x4a0db000,
4011 .pa_end = 0x4a0db03f,
4012 .flags = ADDR_TYPE_RT
4013 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004014 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004015};
4016
4017/* l4_cfg -> smartreflex_iva */
4018static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4019 .master = &omap44xx_l4_cfg_hwmod,
4020 .slave = &omap44xx_smartreflex_iva_hwmod,
4021 .clk = "l4_div_ck",
4022 .addr = omap44xx_smartreflex_iva_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004023 .user = OCP_USER_MPU | OCP_USER_SDMA,
4024};
4025
4026/* smartreflex_iva slave ports */
4027static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4028 &omap44xx_l4_cfg__smartreflex_iva,
4029};
4030
4031static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4032 .name = "smartreflex_iva",
4033 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004034 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004035 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004036 .main_clk = "smartreflex_iva_fck",
4037 .vdd_name = "iva",
4038 .prcm = {
4039 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004040 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004041 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004042 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004043 },
4044 },
4045 .slaves = omap44xx_smartreflex_iva_slaves,
4046 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004047};
4048
4049/* smartreflex_mpu */
4050static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4051static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4052 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004053 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004054};
4055
4056static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4057 {
4058 .pa_start = 0x4a0d9000,
4059 .pa_end = 0x4a0d903f,
4060 .flags = ADDR_TYPE_RT
4061 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004062 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004063};
4064
4065/* l4_cfg -> smartreflex_mpu */
4066static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4067 .master = &omap44xx_l4_cfg_hwmod,
4068 .slave = &omap44xx_smartreflex_mpu_hwmod,
4069 .clk = "l4_div_ck",
4070 .addr = omap44xx_smartreflex_mpu_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004071 .user = OCP_USER_MPU | OCP_USER_SDMA,
4072};
4073
4074/* smartreflex_mpu slave ports */
4075static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4076 &omap44xx_l4_cfg__smartreflex_mpu,
4077};
4078
4079static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4080 .name = "smartreflex_mpu",
4081 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004082 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004083 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004084 .main_clk = "smartreflex_mpu_fck",
4085 .vdd_name = "mpu",
4086 .prcm = {
4087 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004088 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004089 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004090 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004091 },
4092 },
4093 .slaves = omap44xx_smartreflex_mpu_slaves,
4094 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004095};
4096
4097/*
Benoit Coussond11c2172011-02-02 12:04:36 +00004098 * 'spinlock' class
4099 * spinlock provides hardware assistance for synchronizing the processes
4100 * running on multiple processors
4101 */
4102
4103static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
4104 .rev_offs = 0x0000,
4105 .sysc_offs = 0x0010,
4106 .syss_offs = 0x0014,
4107 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4108 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
4109 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4110 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4111 SIDLE_SMART_WKUP),
4112 .sysc_fields = &omap_hwmod_sysc_type1,
4113};
4114
4115static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4116 .name = "spinlock",
4117 .sysc = &omap44xx_spinlock_sysc,
4118};
4119
4120/* spinlock */
4121static struct omap_hwmod omap44xx_spinlock_hwmod;
4122static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4123 {
4124 .pa_start = 0x4a0f6000,
4125 .pa_end = 0x4a0f6fff,
4126 .flags = ADDR_TYPE_RT
4127 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004128 { }
Benoit Coussond11c2172011-02-02 12:04:36 +00004129};
4130
4131/* l4_cfg -> spinlock */
4132static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4133 .master = &omap44xx_l4_cfg_hwmod,
4134 .slave = &omap44xx_spinlock_hwmod,
4135 .clk = "l4_div_ck",
4136 .addr = omap44xx_spinlock_addrs,
Benoit Coussond11c2172011-02-02 12:04:36 +00004137 .user = OCP_USER_MPU | OCP_USER_SDMA,
4138};
4139
4140/* spinlock slave ports */
4141static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4142 &omap44xx_l4_cfg__spinlock,
4143};
4144
4145static struct omap_hwmod omap44xx_spinlock_hwmod = {
4146 .name = "spinlock",
4147 .class = &omap44xx_spinlock_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004148 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond11c2172011-02-02 12:04:36 +00004149 .prcm = {
4150 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004151 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004152 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
Benoit Coussond11c2172011-02-02 12:04:36 +00004153 },
4154 },
4155 .slaves = omap44xx_spinlock_slaves,
4156 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
Benoit Coussond11c2172011-02-02 12:04:36 +00004157};
4158
4159/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004160 * 'timer' class
4161 * general purpose timer module with accurate 1ms tick
4162 * This class contains several variants: ['timer_1ms', 'timer']
4163 */
4164
4165static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4166 .rev_offs = 0x0000,
4167 .sysc_offs = 0x0010,
4168 .syss_offs = 0x0014,
4169 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4170 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4171 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4172 SYSS_HAS_RESET_STATUS),
4173 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4174 .sysc_fields = &omap_hwmod_sysc_type1,
4175};
4176
4177static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4178 .name = "timer",
4179 .sysc = &omap44xx_timer_1ms_sysc,
4180};
4181
4182static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4183 .rev_offs = 0x0000,
4184 .sysc_offs = 0x0010,
4185 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4186 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4187 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4188 SIDLE_SMART_WKUP),
4189 .sysc_fields = &omap_hwmod_sysc_type2,
4190};
4191
4192static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4193 .name = "timer",
4194 .sysc = &omap44xx_timer_sysc,
4195};
4196
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304197/* always-on timers dev attribute */
4198static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
4199 .timer_capability = OMAP_TIMER_ALWON,
4200};
4201
4202/* pwm timers dev attribute */
4203static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
4204 .timer_capability = OMAP_TIMER_HAS_PWM,
4205};
4206
Benoit Cousson35d1a662011-02-11 11:17:14 +00004207/* timer1 */
4208static struct omap_hwmod omap44xx_timer1_hwmod;
4209static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4210 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004211 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004212};
4213
4214static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4215 {
4216 .pa_start = 0x4a318000,
4217 .pa_end = 0x4a31807f,
4218 .flags = ADDR_TYPE_RT
4219 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004220 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004221};
4222
4223/* l4_wkup -> timer1 */
4224static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4225 .master = &omap44xx_l4_wkup_hwmod,
4226 .slave = &omap44xx_timer1_hwmod,
4227 .clk = "l4_wkup_clk_mux_ck",
4228 .addr = omap44xx_timer1_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004229 .user = OCP_USER_MPU | OCP_USER_SDMA,
4230};
4231
4232/* timer1 slave ports */
4233static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4234 &omap44xx_l4_wkup__timer1,
4235};
4236
4237static struct omap_hwmod omap44xx_timer1_hwmod = {
4238 .name = "timer1",
4239 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004240 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004241 .mpu_irqs = omap44xx_timer1_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004242 .main_clk = "timer1_fck",
4243 .prcm = {
4244 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004245 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004246 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004247 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004248 },
4249 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304250 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004251 .slaves = omap44xx_timer1_slaves,
4252 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004253};
4254
4255/* timer2 */
4256static struct omap_hwmod omap44xx_timer2_hwmod;
4257static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4258 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004259 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004260};
4261
4262static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4263 {
4264 .pa_start = 0x48032000,
4265 .pa_end = 0x4803207f,
4266 .flags = ADDR_TYPE_RT
4267 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004268 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004269};
4270
4271/* l4_per -> timer2 */
4272static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4273 .master = &omap44xx_l4_per_hwmod,
4274 .slave = &omap44xx_timer2_hwmod,
4275 .clk = "l4_div_ck",
4276 .addr = omap44xx_timer2_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004277 .user = OCP_USER_MPU | OCP_USER_SDMA,
4278};
4279
4280/* timer2 slave ports */
4281static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4282 &omap44xx_l4_per__timer2,
4283};
4284
4285static struct omap_hwmod omap44xx_timer2_hwmod = {
4286 .name = "timer2",
4287 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004288 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004289 .mpu_irqs = omap44xx_timer2_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004290 .main_clk = "timer2_fck",
4291 .prcm = {
4292 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004293 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004294 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004295 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004296 },
4297 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304298 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004299 .slaves = omap44xx_timer2_slaves,
4300 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004301};
4302
4303/* timer3 */
4304static struct omap_hwmod omap44xx_timer3_hwmod;
4305static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4306 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004307 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004308};
4309
4310static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4311 {
4312 .pa_start = 0x48034000,
4313 .pa_end = 0x4803407f,
4314 .flags = ADDR_TYPE_RT
4315 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004316 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004317};
4318
4319/* l4_per -> timer3 */
4320static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4321 .master = &omap44xx_l4_per_hwmod,
4322 .slave = &omap44xx_timer3_hwmod,
4323 .clk = "l4_div_ck",
4324 .addr = omap44xx_timer3_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004325 .user = OCP_USER_MPU | OCP_USER_SDMA,
4326};
4327
4328/* timer3 slave ports */
4329static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4330 &omap44xx_l4_per__timer3,
4331};
4332
4333static struct omap_hwmod omap44xx_timer3_hwmod = {
4334 .name = "timer3",
4335 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004336 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004337 .mpu_irqs = omap44xx_timer3_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004338 .main_clk = "timer3_fck",
4339 .prcm = {
4340 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004341 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004342 .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004343 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004344 },
4345 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304346 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004347 .slaves = omap44xx_timer3_slaves,
4348 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004349};
4350
4351/* timer4 */
4352static struct omap_hwmod omap44xx_timer4_hwmod;
4353static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4354 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004355 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004356};
4357
4358static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4359 {
4360 .pa_start = 0x48036000,
4361 .pa_end = 0x4803607f,
4362 .flags = ADDR_TYPE_RT
4363 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004364 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004365};
4366
4367/* l4_per -> timer4 */
4368static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4369 .master = &omap44xx_l4_per_hwmod,
4370 .slave = &omap44xx_timer4_hwmod,
4371 .clk = "l4_div_ck",
4372 .addr = omap44xx_timer4_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004373 .user = OCP_USER_MPU | OCP_USER_SDMA,
4374};
4375
4376/* timer4 slave ports */
4377static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4378 &omap44xx_l4_per__timer4,
4379};
4380
4381static struct omap_hwmod omap44xx_timer4_hwmod = {
4382 .name = "timer4",
4383 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004384 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004385 .mpu_irqs = omap44xx_timer4_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004386 .main_clk = "timer4_fck",
4387 .prcm = {
4388 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004389 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004390 .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004391 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004392 },
4393 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304394 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004395 .slaves = omap44xx_timer4_slaves,
4396 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004397};
4398
4399/* timer5 */
4400static struct omap_hwmod omap44xx_timer5_hwmod;
4401static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4402 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004403 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004404};
4405
4406static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4407 {
4408 .pa_start = 0x40138000,
4409 .pa_end = 0x4013807f,
4410 .flags = ADDR_TYPE_RT
4411 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004412 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004413};
4414
4415/* l4_abe -> timer5 */
4416static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4417 .master = &omap44xx_l4_abe_hwmod,
4418 .slave = &omap44xx_timer5_hwmod,
4419 .clk = "ocp_abe_iclk",
4420 .addr = omap44xx_timer5_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004421 .user = OCP_USER_MPU,
4422};
4423
4424static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4425 {
4426 .pa_start = 0x49038000,
4427 .pa_end = 0x4903807f,
4428 .flags = ADDR_TYPE_RT
4429 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004430 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004431};
4432
4433/* l4_abe -> timer5 (dma) */
4434static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4435 .master = &omap44xx_l4_abe_hwmod,
4436 .slave = &omap44xx_timer5_hwmod,
4437 .clk = "ocp_abe_iclk",
4438 .addr = omap44xx_timer5_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004439 .user = OCP_USER_SDMA,
4440};
4441
4442/* timer5 slave ports */
4443static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4444 &omap44xx_l4_abe__timer5,
4445 &omap44xx_l4_abe__timer5_dma,
4446};
4447
4448static struct omap_hwmod omap44xx_timer5_hwmod = {
4449 .name = "timer5",
4450 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004451 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004452 .mpu_irqs = omap44xx_timer5_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004453 .main_clk = "timer5_fck",
4454 .prcm = {
4455 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004456 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004457 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004458 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004459 },
4460 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304461 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004462 .slaves = omap44xx_timer5_slaves,
4463 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004464};
4465
4466/* timer6 */
4467static struct omap_hwmod omap44xx_timer6_hwmod;
4468static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4469 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004470 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004471};
4472
4473static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4474 {
4475 .pa_start = 0x4013a000,
4476 .pa_end = 0x4013a07f,
4477 .flags = ADDR_TYPE_RT
4478 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004479 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004480};
4481
4482/* l4_abe -> timer6 */
4483static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4484 .master = &omap44xx_l4_abe_hwmod,
4485 .slave = &omap44xx_timer6_hwmod,
4486 .clk = "ocp_abe_iclk",
4487 .addr = omap44xx_timer6_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004488 .user = OCP_USER_MPU,
4489};
4490
4491static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4492 {
4493 .pa_start = 0x4903a000,
4494 .pa_end = 0x4903a07f,
4495 .flags = ADDR_TYPE_RT
4496 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004497 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004498};
4499
4500/* l4_abe -> timer6 (dma) */
4501static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4502 .master = &omap44xx_l4_abe_hwmod,
4503 .slave = &omap44xx_timer6_hwmod,
4504 .clk = "ocp_abe_iclk",
4505 .addr = omap44xx_timer6_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004506 .user = OCP_USER_SDMA,
4507};
4508
4509/* timer6 slave ports */
4510static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4511 &omap44xx_l4_abe__timer6,
4512 &omap44xx_l4_abe__timer6_dma,
4513};
4514
4515static struct omap_hwmod omap44xx_timer6_hwmod = {
4516 .name = "timer6",
4517 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004518 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004519 .mpu_irqs = omap44xx_timer6_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004520
Benoit Cousson35d1a662011-02-11 11:17:14 +00004521 .main_clk = "timer6_fck",
4522 .prcm = {
4523 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004524 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004525 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004526 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004527 },
4528 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304529 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004530 .slaves = omap44xx_timer6_slaves,
4531 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004532};
4533
4534/* timer7 */
4535static struct omap_hwmod omap44xx_timer7_hwmod;
4536static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4537 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004538 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004539};
4540
4541static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4542 {
4543 .pa_start = 0x4013c000,
4544 .pa_end = 0x4013c07f,
4545 .flags = ADDR_TYPE_RT
4546 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004547 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004548};
4549
4550/* l4_abe -> timer7 */
4551static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4552 .master = &omap44xx_l4_abe_hwmod,
4553 .slave = &omap44xx_timer7_hwmod,
4554 .clk = "ocp_abe_iclk",
4555 .addr = omap44xx_timer7_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004556 .user = OCP_USER_MPU,
4557};
4558
4559static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4560 {
4561 .pa_start = 0x4903c000,
4562 .pa_end = 0x4903c07f,
4563 .flags = ADDR_TYPE_RT
4564 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004565 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004566};
4567
4568/* l4_abe -> timer7 (dma) */
4569static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4570 .master = &omap44xx_l4_abe_hwmod,
4571 .slave = &omap44xx_timer7_hwmod,
4572 .clk = "ocp_abe_iclk",
4573 .addr = omap44xx_timer7_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004574 .user = OCP_USER_SDMA,
4575};
4576
4577/* timer7 slave ports */
4578static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4579 &omap44xx_l4_abe__timer7,
4580 &omap44xx_l4_abe__timer7_dma,
4581};
4582
4583static struct omap_hwmod omap44xx_timer7_hwmod = {
4584 .name = "timer7",
4585 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004586 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004587 .mpu_irqs = omap44xx_timer7_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004588 .main_clk = "timer7_fck",
4589 .prcm = {
4590 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004591 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004592 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004593 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004594 },
4595 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304596 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004597 .slaves = omap44xx_timer7_slaves,
4598 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004599};
4600
4601/* timer8 */
4602static struct omap_hwmod omap44xx_timer8_hwmod;
4603static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4604 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004605 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004606};
4607
4608static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4609 {
4610 .pa_start = 0x4013e000,
4611 .pa_end = 0x4013e07f,
4612 .flags = ADDR_TYPE_RT
4613 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004614 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004615};
4616
4617/* l4_abe -> timer8 */
4618static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4619 .master = &omap44xx_l4_abe_hwmod,
4620 .slave = &omap44xx_timer8_hwmod,
4621 .clk = "ocp_abe_iclk",
4622 .addr = omap44xx_timer8_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004623 .user = OCP_USER_MPU,
4624};
4625
4626static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4627 {
4628 .pa_start = 0x4903e000,
4629 .pa_end = 0x4903e07f,
4630 .flags = ADDR_TYPE_RT
4631 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004632 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004633};
4634
4635/* l4_abe -> timer8 (dma) */
4636static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4637 .master = &omap44xx_l4_abe_hwmod,
4638 .slave = &omap44xx_timer8_hwmod,
4639 .clk = "ocp_abe_iclk",
4640 .addr = omap44xx_timer8_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004641 .user = OCP_USER_SDMA,
4642};
4643
4644/* timer8 slave ports */
4645static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4646 &omap44xx_l4_abe__timer8,
4647 &omap44xx_l4_abe__timer8_dma,
4648};
4649
4650static struct omap_hwmod omap44xx_timer8_hwmod = {
4651 .name = "timer8",
4652 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004653 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004654 .mpu_irqs = omap44xx_timer8_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004655 .main_clk = "timer8_fck",
4656 .prcm = {
4657 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004658 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004659 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004660 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004661 },
4662 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304663 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004664 .slaves = omap44xx_timer8_slaves,
4665 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004666};
4667
4668/* timer9 */
4669static struct omap_hwmod omap44xx_timer9_hwmod;
4670static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4671 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004672 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004673};
4674
4675static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4676 {
4677 .pa_start = 0x4803e000,
4678 .pa_end = 0x4803e07f,
4679 .flags = ADDR_TYPE_RT
4680 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004681 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004682};
4683
4684/* l4_per -> timer9 */
4685static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4686 .master = &omap44xx_l4_per_hwmod,
4687 .slave = &omap44xx_timer9_hwmod,
4688 .clk = "l4_div_ck",
4689 .addr = omap44xx_timer9_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004690 .user = OCP_USER_MPU | OCP_USER_SDMA,
4691};
4692
4693/* timer9 slave ports */
4694static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4695 &omap44xx_l4_per__timer9,
4696};
4697
4698static struct omap_hwmod omap44xx_timer9_hwmod = {
4699 .name = "timer9",
4700 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004701 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004702 .mpu_irqs = omap44xx_timer9_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004703 .main_clk = "timer9_fck",
4704 .prcm = {
4705 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004706 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004707 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004708 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004709 },
4710 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304711 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004712 .slaves = omap44xx_timer9_slaves,
4713 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004714};
4715
4716/* timer10 */
4717static struct omap_hwmod omap44xx_timer10_hwmod;
4718static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4719 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004720 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004721};
4722
4723static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4724 {
4725 .pa_start = 0x48086000,
4726 .pa_end = 0x4808607f,
4727 .flags = ADDR_TYPE_RT
4728 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004729 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004730};
4731
4732/* l4_per -> timer10 */
4733static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4734 .master = &omap44xx_l4_per_hwmod,
4735 .slave = &omap44xx_timer10_hwmod,
4736 .clk = "l4_div_ck",
4737 .addr = omap44xx_timer10_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004738 .user = OCP_USER_MPU | OCP_USER_SDMA,
4739};
4740
4741/* timer10 slave ports */
4742static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4743 &omap44xx_l4_per__timer10,
4744};
4745
4746static struct omap_hwmod omap44xx_timer10_hwmod = {
4747 .name = "timer10",
4748 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004749 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004750 .mpu_irqs = omap44xx_timer10_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004751 .main_clk = "timer10_fck",
4752 .prcm = {
4753 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004754 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004755 .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004756 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004757 },
4758 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304759 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004760 .slaves = omap44xx_timer10_slaves,
4761 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004762};
4763
4764/* timer11 */
4765static struct omap_hwmod omap44xx_timer11_hwmod;
4766static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4767 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004768 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004769};
4770
4771static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4772 {
4773 .pa_start = 0x48088000,
4774 .pa_end = 0x4808807f,
4775 .flags = ADDR_TYPE_RT
4776 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004777 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004778};
4779
4780/* l4_per -> timer11 */
4781static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4782 .master = &omap44xx_l4_per_hwmod,
4783 .slave = &omap44xx_timer11_hwmod,
4784 .clk = "l4_div_ck",
4785 .addr = omap44xx_timer11_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004786 .user = OCP_USER_MPU | OCP_USER_SDMA,
4787};
4788
4789/* timer11 slave ports */
4790static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4791 &omap44xx_l4_per__timer11,
4792};
4793
4794static struct omap_hwmod omap44xx_timer11_hwmod = {
4795 .name = "timer11",
4796 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004797 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004798 .mpu_irqs = omap44xx_timer11_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004799 .main_clk = "timer11_fck",
4800 .prcm = {
4801 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004802 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004803 .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004804 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004805 },
4806 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304807 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004808 .slaves = omap44xx_timer11_slaves,
4809 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004810};
4811
4812/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304813 * 'uart' class
4814 * universal asynchronous receiver/transmitter (uart)
4815 */
4816
4817static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4818 .rev_offs = 0x0050,
4819 .sysc_offs = 0x0054,
4820 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004821 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004822 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4823 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004824 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4825 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304826 .sysc_fields = &omap_hwmod_sysc_type1,
4827};
4828
4829static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004830 .name = "uart",
4831 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304832};
4833
4834/* uart1 */
4835static struct omap_hwmod omap44xx_uart1_hwmod;
4836static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4837 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004838 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304839};
4840
4841static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4842 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4843 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004844 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304845};
4846
4847static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4848 {
4849 .pa_start = 0x4806a000,
4850 .pa_end = 0x4806a0ff,
4851 .flags = ADDR_TYPE_RT
4852 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004853 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304854};
4855
4856/* l4_per -> uart1 */
4857static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4858 .master = &omap44xx_l4_per_hwmod,
4859 .slave = &omap44xx_uart1_hwmod,
4860 .clk = "l4_div_ck",
4861 .addr = omap44xx_uart1_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304862 .user = OCP_USER_MPU | OCP_USER_SDMA,
4863};
4864
4865/* uart1 slave ports */
4866static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4867 &omap44xx_l4_per__uart1,
4868};
4869
4870static struct omap_hwmod omap44xx_uart1_hwmod = {
4871 .name = "uart1",
4872 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004873 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304874 .mpu_irqs = omap44xx_uart1_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304875 .sdma_reqs = omap44xx_uart1_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304876 .main_clk = "uart1_fck",
4877 .prcm = {
4878 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004879 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004880 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004881 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304882 },
4883 },
4884 .slaves = omap44xx_uart1_slaves,
4885 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304886};
4887
4888/* uart2 */
4889static struct omap_hwmod omap44xx_uart2_hwmod;
4890static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4891 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004892 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304893};
4894
4895static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4896 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4897 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004898 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304899};
4900
4901static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4902 {
4903 .pa_start = 0x4806c000,
4904 .pa_end = 0x4806c0ff,
4905 .flags = ADDR_TYPE_RT
4906 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004907 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304908};
4909
4910/* l4_per -> uart2 */
4911static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4912 .master = &omap44xx_l4_per_hwmod,
4913 .slave = &omap44xx_uart2_hwmod,
4914 .clk = "l4_div_ck",
4915 .addr = omap44xx_uart2_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304916 .user = OCP_USER_MPU | OCP_USER_SDMA,
4917};
4918
4919/* uart2 slave ports */
4920static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4921 &omap44xx_l4_per__uart2,
4922};
4923
4924static struct omap_hwmod omap44xx_uart2_hwmod = {
4925 .name = "uart2",
4926 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004927 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304928 .mpu_irqs = omap44xx_uart2_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304929 .sdma_reqs = omap44xx_uart2_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304930 .main_clk = "uart2_fck",
4931 .prcm = {
4932 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004933 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004934 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004935 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304936 },
4937 },
4938 .slaves = omap44xx_uart2_slaves,
4939 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304940};
4941
4942/* uart3 */
4943static struct omap_hwmod omap44xx_uart3_hwmod;
4944static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4945 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004946 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304947};
4948
4949static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
4950 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
4951 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004952 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304953};
4954
4955static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4956 {
4957 .pa_start = 0x48020000,
4958 .pa_end = 0x480200ff,
4959 .flags = ADDR_TYPE_RT
4960 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004961 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304962};
4963
4964/* l4_per -> uart3 */
4965static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4966 .master = &omap44xx_l4_per_hwmod,
4967 .slave = &omap44xx_uart3_hwmod,
4968 .clk = "l4_div_ck",
4969 .addr = omap44xx_uart3_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304970 .user = OCP_USER_MPU | OCP_USER_SDMA,
4971};
4972
4973/* uart3 slave ports */
4974static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
4975 &omap44xx_l4_per__uart3,
4976};
4977
4978static struct omap_hwmod omap44xx_uart3_hwmod = {
4979 .name = "uart3",
4980 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004981 .clkdm_name = "l4_per_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06004982 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304983 .mpu_irqs = omap44xx_uart3_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304984 .sdma_reqs = omap44xx_uart3_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304985 .main_clk = "uart3_fck",
4986 .prcm = {
4987 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004988 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004989 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004990 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304991 },
4992 },
4993 .slaves = omap44xx_uart3_slaves,
4994 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304995};
4996
4997/* uart4 */
4998static struct omap_hwmod omap44xx_uart4_hwmod;
4999static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5000 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005001 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305002};
5003
5004static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5005 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
5006 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005007 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305008};
5009
5010static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5011 {
5012 .pa_start = 0x4806e000,
5013 .pa_end = 0x4806e0ff,
5014 .flags = ADDR_TYPE_RT
5015 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005016 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305017};
5018
5019/* l4_per -> uart4 */
5020static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5021 .master = &omap44xx_l4_per_hwmod,
5022 .slave = &omap44xx_uart4_hwmod,
5023 .clk = "l4_div_ck",
5024 .addr = omap44xx_uart4_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305025 .user = OCP_USER_MPU | OCP_USER_SDMA,
5026};
5027
5028/* uart4 slave ports */
5029static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5030 &omap44xx_l4_per__uart4,
5031};
5032
5033static struct omap_hwmod omap44xx_uart4_hwmod = {
5034 .name = "uart4",
5035 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005036 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305037 .mpu_irqs = omap44xx_uart4_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305038 .sdma_reqs = omap44xx_uart4_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305039 .main_clk = "uart4_fck",
5040 .prcm = {
5041 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005042 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005043 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005044 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305045 },
5046 },
5047 .slaves = omap44xx_uart4_slaves,
5048 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305049};
5050
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005051/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005052 * 'usb_otg_hs' class
5053 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
5054 */
5055
5056static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
5057 .rev_offs = 0x0400,
5058 .sysc_offs = 0x0404,
5059 .syss_offs = 0x0408,
5060 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
5061 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5062 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
5063 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5064 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5065 MSTANDBY_SMART),
5066 .sysc_fields = &omap_hwmod_sysc_type1,
5067};
5068
5069static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
Benoit Cousson00fe6102011-07-09 19:14:28 -06005070 .name = "usb_otg_hs",
5071 .sysc = &omap44xx_usb_otg_hs_sysc,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005072};
5073
5074/* usb_otg_hs */
5075static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5076 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
5077 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005078 { .irq = -1 }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005079};
5080
5081/* usb_otg_hs master ports */
5082static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5083 &omap44xx_usb_otg_hs__l3_main_2,
5084};
5085
5086static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5087 {
5088 .pa_start = 0x4a0ab000,
5089 .pa_end = 0x4a0ab003,
5090 .flags = ADDR_TYPE_RT
5091 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005092 { }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005093};
5094
5095/* l4_cfg -> usb_otg_hs */
5096static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5097 .master = &omap44xx_l4_cfg_hwmod,
5098 .slave = &omap44xx_usb_otg_hs_hwmod,
5099 .clk = "l4_div_ck",
5100 .addr = omap44xx_usb_otg_hs_addrs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005101 .user = OCP_USER_MPU | OCP_USER_SDMA,
5102};
5103
5104/* usb_otg_hs slave ports */
5105static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5106 &omap44xx_l4_cfg__usb_otg_hs,
5107};
5108
5109static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5110 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5111};
5112
5113static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5114 .name = "usb_otg_hs",
5115 .class = &omap44xx_usb_otg_hs_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005116 .clkdm_name = "l3_init_clkdm",
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005117 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
5118 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005119 .main_clk = "usb_otg_hs_ick",
5120 .prcm = {
5121 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005122 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005123 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005124 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005125 },
5126 },
5127 .opt_clks = usb_otg_hs_opt_clks,
Benoit Cousson00fe6102011-07-09 19:14:28 -06005128 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005129 .slaves = omap44xx_usb_otg_hs_slaves,
5130 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
5131 .masters = omap44xx_usb_otg_hs_masters,
5132 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005133};
5134
5135/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005136 * 'wd_timer' class
5137 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
5138 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005139 */
5140
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005141static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005142 .rev_offs = 0x0000,
5143 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005144 .syss_offs = 0x0014,
5145 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07005146 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07005147 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5148 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005149 .sysc_fields = &omap_hwmod_sysc_type1,
5150};
5151
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005152static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5153 .name = "wd_timer",
5154 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00005155 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005156};
5157
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005158/* wd_timer2 */
5159static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5160static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5161 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005162 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005163};
5164
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005165static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005166 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005167 .pa_start = 0x4a314000,
5168 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005169 .flags = ADDR_TYPE_RT
5170 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005171 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005172};
5173
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005174/* l4_wkup -> wd_timer2 */
5175static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005176 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005177 .slave = &omap44xx_wd_timer2_hwmod,
5178 .clk = "l4_wkup_clk_mux_ck",
5179 .addr = omap44xx_wd_timer2_addrs,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005180 .user = OCP_USER_MPU | OCP_USER_SDMA,
5181};
5182
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005183/* wd_timer2 slave ports */
5184static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5185 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005186};
5187
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005188static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5189 .name = "wd_timer2",
5190 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005191 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005192 .mpu_irqs = omap44xx_wd_timer2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005193 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005194 .prcm = {
5195 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005196 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005197 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005198 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005199 },
5200 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005201 .slaves = omap44xx_wd_timer2_slaves,
5202 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005203};
5204
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005205/* wd_timer3 */
5206static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5207static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5208 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005209 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005210};
5211
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005212static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005213 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005214 .pa_start = 0x40130000,
5215 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005216 .flags = ADDR_TYPE_RT
5217 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005218 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005219};
5220
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005221/* l4_abe -> wd_timer3 */
5222static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5223 .master = &omap44xx_l4_abe_hwmod,
5224 .slave = &omap44xx_wd_timer3_hwmod,
5225 .clk = "ocp_abe_iclk",
5226 .addr = omap44xx_wd_timer3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005227 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005228};
5229
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005230static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005231 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005232 .pa_start = 0x49030000,
5233 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005234 .flags = ADDR_TYPE_RT
5235 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005236 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005237};
5238
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005239/* l4_abe -> wd_timer3 (dma) */
5240static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5241 .master = &omap44xx_l4_abe_hwmod,
5242 .slave = &omap44xx_wd_timer3_hwmod,
5243 .clk = "ocp_abe_iclk",
5244 .addr = omap44xx_wd_timer3_dma_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005245 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005246};
5247
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005248/* wd_timer3 slave ports */
5249static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5250 &omap44xx_l4_abe__wd_timer3,
5251 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005252};
5253
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005254static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5255 .name = "wd_timer3",
5256 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005257 .clkdm_name = "abe_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005258 .mpu_irqs = omap44xx_wd_timer3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005259 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005260 .prcm = {
5261 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005262 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005263 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005264 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005265 },
5266 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005267 .slaves = omap44xx_wd_timer3_slaves,
5268 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005269};
5270
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005271static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005272
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005273 /* dmm class */
5274 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005275
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005276 /* emif_fw class */
5277 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005278
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005279 /* l3 class */
5280 &omap44xx_l3_instr_hwmod,
5281 &omap44xx_l3_main_1_hwmod,
5282 &omap44xx_l3_main_2_hwmod,
5283 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005284
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005285 /* l4 class */
5286 &omap44xx_l4_abe_hwmod,
5287 &omap44xx_l4_cfg_hwmod,
5288 &omap44xx_l4_per_hwmod,
5289 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005290
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005291 /* mpu_bus class */
5292 &omap44xx_mpu_private_hwmod,
5293
Benoit Cousson407a6882011-02-15 22:39:48 +01005294 /* aess class */
5295/* &omap44xx_aess_hwmod, */
5296
5297 /* bandgap class */
5298 &omap44xx_bandgap_hwmod,
5299
5300 /* counter class */
5301/* &omap44xx_counter_32k_hwmod, */
5302
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005303 /* dma class */
5304 &omap44xx_dma_system_hwmod,
5305
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005306 /* dmic class */
5307 &omap44xx_dmic_hwmod,
5308
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005309 /* dsp class */
5310 &omap44xx_dsp_hwmod,
5311 &omap44xx_dsp_c0_hwmod,
5312
Benoit Coussond63bd742011-01-27 11:17:03 +00005313 /* dss class */
5314 &omap44xx_dss_hwmod,
5315 &omap44xx_dss_dispc_hwmod,
5316 &omap44xx_dss_dsi1_hwmod,
5317 &omap44xx_dss_dsi2_hwmod,
5318 &omap44xx_dss_hdmi_hwmod,
5319 &omap44xx_dss_rfbi_hwmod,
5320 &omap44xx_dss_venc_hwmod,
5321
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005322 /* gpio class */
5323 &omap44xx_gpio1_hwmod,
5324 &omap44xx_gpio2_hwmod,
5325 &omap44xx_gpio3_hwmod,
5326 &omap44xx_gpio4_hwmod,
5327 &omap44xx_gpio5_hwmod,
5328 &omap44xx_gpio6_hwmod,
5329
Benoit Cousson407a6882011-02-15 22:39:48 +01005330 /* hsi class */
5331/* &omap44xx_hsi_hwmod, */
5332
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005333 /* i2c class */
5334 &omap44xx_i2c1_hwmod,
5335 &omap44xx_i2c2_hwmod,
5336 &omap44xx_i2c3_hwmod,
5337 &omap44xx_i2c4_hwmod,
5338
Benoit Cousson407a6882011-02-15 22:39:48 +01005339 /* ipu class */
5340 &omap44xx_ipu_hwmod,
5341 &omap44xx_ipu_c0_hwmod,
5342 &omap44xx_ipu_c1_hwmod,
5343
5344 /* iss class */
5345/* &omap44xx_iss_hwmod, */
5346
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005347 /* iva class */
5348 &omap44xx_iva_hwmod,
5349 &omap44xx_iva_seq0_hwmod,
5350 &omap44xx_iva_seq1_hwmod,
5351
Benoit Cousson407a6882011-02-15 22:39:48 +01005352 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005353 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005354
Benoit Coussonec5df922011-02-02 19:27:21 +00005355 /* mailbox class */
5356 &omap44xx_mailbox_hwmod,
5357
Benoit Cousson4ddff492011-01-31 14:50:30 +00005358 /* mcbsp class */
5359 &omap44xx_mcbsp1_hwmod,
5360 &omap44xx_mcbsp2_hwmod,
5361 &omap44xx_mcbsp3_hwmod,
5362 &omap44xx_mcbsp4_hwmod,
5363
Benoit Cousson407a6882011-02-15 22:39:48 +01005364 /* mcpdm class */
Peter Ujfalusid05e2ea2011-05-01 19:33:15 +01005365 &omap44xx_mcpdm_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005366
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305367 /* mcspi class */
5368 &omap44xx_mcspi1_hwmod,
5369 &omap44xx_mcspi2_hwmod,
5370 &omap44xx_mcspi3_hwmod,
5371 &omap44xx_mcspi4_hwmod,
5372
Benoit Cousson407a6882011-02-15 22:39:48 +01005373 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005374 &omap44xx_mmc1_hwmod,
5375 &omap44xx_mmc2_hwmod,
5376 &omap44xx_mmc3_hwmod,
5377 &omap44xx_mmc4_hwmod,
5378 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005379
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005380 /* mpu class */
5381 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305382
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005383 /* smartreflex class */
5384 &omap44xx_smartreflex_core_hwmod,
5385 &omap44xx_smartreflex_iva_hwmod,
5386 &omap44xx_smartreflex_mpu_hwmod,
5387
Benoit Coussond11c2172011-02-02 12:04:36 +00005388 /* spinlock class */
5389 &omap44xx_spinlock_hwmod,
5390
Benoit Cousson35d1a662011-02-11 11:17:14 +00005391 /* timer class */
5392 &omap44xx_timer1_hwmod,
5393 &omap44xx_timer2_hwmod,
5394 &omap44xx_timer3_hwmod,
5395 &omap44xx_timer4_hwmod,
5396 &omap44xx_timer5_hwmod,
5397 &omap44xx_timer6_hwmod,
5398 &omap44xx_timer7_hwmod,
5399 &omap44xx_timer8_hwmod,
5400 &omap44xx_timer9_hwmod,
5401 &omap44xx_timer10_hwmod,
5402 &omap44xx_timer11_hwmod,
5403
Benoit Coussondb12ba52010-09-27 20:19:19 +05305404 /* uart class */
5405 &omap44xx_uart1_hwmod,
5406 &omap44xx_uart2_hwmod,
5407 &omap44xx_uart3_hwmod,
5408 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005409
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005410 /* usb_otg_hs class */
5411 &omap44xx_usb_otg_hs_hwmod,
5412
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005413 /* wd_timer class */
5414 &omap44xx_wd_timer2_hwmod,
5415 &omap44xx_wd_timer3_hwmod,
5416
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005417 NULL,
5418};
5419
5420int __init omap44xx_hwmod_init(void)
5421{
Paul Walmsley550c8092011-02-28 11:58:14 -07005422 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005423}
5424