blob: 3b04d63316f5840ded6c00fd6a4e83b96fb4a896 [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>
Tomi Valkeinen13662dc2011-11-08 03:16:13 -070033#include <plat/common.h>
Benoit Cousson55d2cb02010-05-12 17:54:36 +020034
35#include "omap_hwmod_common_data.h"
36
Paul Walmsleyd198b512010-12-21 15:30:54 -070037#include "cm1_44xx.h"
38#include "cm2_44xx.h"
39#include "prm44xx.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020040#include "prm-regbits-44xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070041#include "wd_timer.h"
Benoit Cousson55d2cb02010-05-12 17:54:36 +020042
43/* Base offset for all OMAP4 interrupts external to MPUSS */
44#define OMAP44XX_IRQ_GIC_START 32
45
46/* Base offset for all OMAP4 dma requests */
47#define OMAP44XX_DMA_REQ_START 1
48
49/* Backward references (IPs with Bus Master capability) */
Benoit Cousson407a6882011-02-15 22:39:48 +010050static struct omap_hwmod omap44xx_aess_hwmod;
Benoit Cousson531ce0d2010-12-20 18:27:19 -080051static struct omap_hwmod omap44xx_dma_system_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020052static struct omap_hwmod omap44xx_dmm_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070053static struct omap_hwmod omap44xx_dsp_hwmod;
Benoit Coussond63bd742011-01-27 11:17:03 +000054static struct omap_hwmod omap44xx_dss_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020055static struct omap_hwmod omap44xx_emif_fw_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010056static struct omap_hwmod omap44xx_hsi_hwmod;
57static struct omap_hwmod omap44xx_ipu_hwmod;
58static struct omap_hwmod omap44xx_iss_hwmod;
Benoit Cousson8f25bdc2010-12-21 21:08:34 -070059static struct omap_hwmod omap44xx_iva_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020060static struct omap_hwmod omap44xx_l3_instr_hwmod;
61static struct omap_hwmod omap44xx_l3_main_1_hwmod;
62static struct omap_hwmod omap44xx_l3_main_2_hwmod;
63static struct omap_hwmod omap44xx_l3_main_3_hwmod;
64static struct omap_hwmod omap44xx_l4_abe_hwmod;
65static struct omap_hwmod omap44xx_l4_cfg_hwmod;
66static struct omap_hwmod omap44xx_l4_per_hwmod;
67static struct omap_hwmod omap44xx_l4_wkup_hwmod;
Benoit Cousson407a6882011-02-15 22:39:48 +010068static struct omap_hwmod omap44xx_mmc1_hwmod;
69static struct omap_hwmod omap44xx_mmc2_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020070static struct omap_hwmod omap44xx_mpu_hwmod;
71static struct omap_hwmod omap44xx_mpu_private_hwmod;
Benoit Cousson5844c4e2011-02-17 12:41:05 +000072static struct omap_hwmod omap44xx_usb_otg_hs_hwmod;
Benoit Cousson55d2cb02010-05-12 17:54:36 +020073
74/*
75 * Interconnects omap_hwmod structures
76 * hwmods that compose the global OMAP interconnect
77 */
78
79/*
80 * 'dmm' class
81 * instance(s): dmm
82 */
83static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +000084 .name = "dmm",
Benoit Cousson55d2cb02010-05-12 17:54:36 +020085};
86
Benoit Cousson7e69ed92011-07-09 19:14:28 -060087/* dmm */
88static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
89 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
90 { .irq = -1 }
91};
92
Benoit Cousson55d2cb02010-05-12 17:54:36 +020093/* l3_main_1 -> dmm */
94static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
95 .master = &omap44xx_l3_main_1_hwmod,
96 .slave = &omap44xx_dmm_hwmod,
97 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -070098 .user = OCP_USER_SDMA,
99};
100
101static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
102 {
103 .pa_start = 0x4e000000,
104 .pa_end = 0x4e0007ff,
105 .flags = ADDR_TYPE_RT
106 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600107 { }
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200108};
109
110/* mpu -> dmm */
111static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
112 .master = &omap44xx_mpu_hwmod,
113 .slave = &omap44xx_dmm_hwmod,
114 .clk = "l3_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700115 .addr = omap44xx_dmm_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700116 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200117};
118
119/* dmm slave ports */
120static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
121 &omap44xx_l3_main_1__dmm,
122 &omap44xx_mpu__dmm,
123};
124
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200125static struct omap_hwmod omap44xx_dmm_hwmod = {
126 .name = "dmm",
127 .class = &omap44xx_dmm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600128 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600129 .prcm = {
130 .omap4 = {
131 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600132 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600133 },
134 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200135 .slaves = omap44xx_dmm_slaves,
136 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
Benoit Coussona5322c62011-07-10 05:56:29 -0600137 .mpu_irqs = omap44xx_dmm_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200138};
139
140/*
141 * 'emif_fw' class
142 * instance(s): emif_fw
143 */
144static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000145 .name = "emif_fw",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200146};
147
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600148/* emif_fw */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200149/* dmm -> emif_fw */
150static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
151 .master = &omap44xx_dmm_hwmod,
152 .slave = &omap44xx_emif_fw_hwmod,
153 .clk = "l3_div_ck",
154 .user = OCP_USER_MPU | OCP_USER_SDMA,
155};
156
Benoit Cousson659fa822010-12-21 21:08:34 -0700157static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
158 {
159 .pa_start = 0x4a20c000,
160 .pa_end = 0x4a20c0ff,
161 .flags = ADDR_TYPE_RT
162 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600163 { }
Benoit Cousson659fa822010-12-21 21:08:34 -0700164};
165
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200166/* l4_cfg -> emif_fw */
167static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
168 .master = &omap44xx_l4_cfg_hwmod,
169 .slave = &omap44xx_emif_fw_hwmod,
170 .clk = "l4_div_ck",
Benoit Cousson659fa822010-12-21 21:08:34 -0700171 .addr = omap44xx_emif_fw_addrs,
Benoit Cousson659fa822010-12-21 21:08:34 -0700172 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200173};
174
175/* emif_fw slave ports */
176static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
177 &omap44xx_dmm__emif_fw,
178 &omap44xx_l4_cfg__emif_fw,
179};
180
181static struct omap_hwmod omap44xx_emif_fw_hwmod = {
182 .name = "emif_fw",
183 .class = &omap44xx_emif_fw_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600184 .clkdm_name = "l3_emif_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600185 .prcm = {
186 .omap4 = {
187 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600188 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600189 },
190 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200191 .slaves = omap44xx_emif_fw_slaves,
192 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200193};
194
195/*
196 * 'l3' class
197 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
198 */
199static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000200 .name = "l3",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200201};
202
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600203/* l3_instr */
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700204/* iva -> l3_instr */
205static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
206 .master = &omap44xx_iva_hwmod,
207 .slave = &omap44xx_l3_instr_hwmod,
208 .clk = "l3_div_ck",
209 .user = OCP_USER_MPU | OCP_USER_SDMA,
210};
211
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200212/* l3_main_3 -> l3_instr */
213static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = {
214 .master = &omap44xx_l3_main_3_hwmod,
215 .slave = &omap44xx_l3_instr_hwmod,
216 .clk = "l3_div_ck",
217 .user = OCP_USER_MPU | OCP_USER_SDMA,
218};
219
220/* l3_instr slave ports */
221static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700222 &omap44xx_iva__l3_instr,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200223 &omap44xx_l3_main_3__l3_instr,
224};
225
226static struct omap_hwmod omap44xx_l3_instr_hwmod = {
227 .name = "l3_instr",
228 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600229 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600230 .prcm = {
231 .omap4 = {
232 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600233 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600234 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600235 },
236 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200237 .slaves = omap44xx_l3_instr_slaves,
238 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200239};
240
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600241/* l3_main_1 */
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600242static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
243 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
244 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
245 { .irq = -1 }
246};
247
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700248/* dsp -> l3_main_1 */
249static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
250 .master = &omap44xx_dsp_hwmod,
251 .slave = &omap44xx_l3_main_1_hwmod,
252 .clk = "l3_div_ck",
253 .user = OCP_USER_MPU | OCP_USER_SDMA,
254};
255
Benoit Coussond63bd742011-01-27 11:17:03 +0000256/* dss -> l3_main_1 */
257static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = {
258 .master = &omap44xx_dss_hwmod,
259 .slave = &omap44xx_l3_main_1_hwmod,
260 .clk = "l3_div_ck",
261 .user = OCP_USER_MPU | OCP_USER_SDMA,
262};
263
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200264/* l3_main_2 -> l3_main_1 */
265static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = {
266 .master = &omap44xx_l3_main_2_hwmod,
267 .slave = &omap44xx_l3_main_1_hwmod,
268 .clk = "l3_div_ck",
269 .user = OCP_USER_MPU | OCP_USER_SDMA,
270};
271
272/* l4_cfg -> l3_main_1 */
273static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = {
274 .master = &omap44xx_l4_cfg_hwmod,
275 .slave = &omap44xx_l3_main_1_hwmod,
276 .clk = "l4_div_ck",
277 .user = OCP_USER_MPU | OCP_USER_SDMA,
278};
279
Benoit Cousson407a6882011-02-15 22:39:48 +0100280/* mmc1 -> l3_main_1 */
281static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = {
282 .master = &omap44xx_mmc1_hwmod,
283 .slave = &omap44xx_l3_main_1_hwmod,
284 .clk = "l3_div_ck",
285 .user = OCP_USER_MPU | OCP_USER_SDMA,
286};
287
288/* mmc2 -> l3_main_1 */
289static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
290 .master = &omap44xx_mmc2_hwmod,
291 .slave = &omap44xx_l3_main_1_hwmod,
292 .clk = "l3_div_ck",
293 .user = OCP_USER_MPU | OCP_USER_SDMA,
294};
295
sricharanc4645232011-02-07 21:12:11 +0530296static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
297 {
298 .pa_start = 0x44000000,
299 .pa_end = 0x44000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600300 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530301 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600302 { }
sricharanc4645232011-02-07 21:12:11 +0530303};
304
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200305/* mpu -> l3_main_1 */
306static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
307 .master = &omap44xx_mpu_hwmod,
308 .slave = &omap44xx_l3_main_1_hwmod,
309 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530310 .addr = omap44xx_l3_main_1_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600311 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200312};
313
314/* l3_main_1 slave ports */
315static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700316 &omap44xx_dsp__l3_main_1,
Benoit Coussond63bd742011-01-27 11:17:03 +0000317 &omap44xx_dss__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200318 &omap44xx_l3_main_2__l3_main_1,
319 &omap44xx_l4_cfg__l3_main_1,
Benoit Cousson407a6882011-02-15 22:39:48 +0100320 &omap44xx_mmc1__l3_main_1,
321 &omap44xx_mmc2__l3_main_1,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200322 &omap44xx_mpu__l3_main_1,
323};
324
325static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
326 .name = "l3_main_1",
327 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600328 .clkdm_name = "l3_1_clkdm",
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600329 .mpu_irqs = omap44xx_l3_main_1_irqs,
Benoit Coussond0f06312011-07-10 05:56:30 -0600330 .prcm = {
331 .omap4 = {
332 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600333 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600334 },
335 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200336 .slaves = omap44xx_l3_main_1_slaves,
337 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200338};
339
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600340/* l3_main_2 */
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000341/* dma_system -> l3_main_2 */
342static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
343 .master = &omap44xx_dma_system_hwmod,
344 .slave = &omap44xx_l3_main_2_hwmod,
345 .clk = "l3_div_ck",
346 .user = OCP_USER_MPU | OCP_USER_SDMA,
347};
348
Benoit Cousson407a6882011-02-15 22:39:48 +0100349/* hsi -> l3_main_2 */
350static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = {
351 .master = &omap44xx_hsi_hwmod,
352 .slave = &omap44xx_l3_main_2_hwmod,
353 .clk = "l3_div_ck",
354 .user = OCP_USER_MPU | OCP_USER_SDMA,
355};
356
357/* ipu -> l3_main_2 */
358static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = {
359 .master = &omap44xx_ipu_hwmod,
360 .slave = &omap44xx_l3_main_2_hwmod,
361 .clk = "l3_div_ck",
362 .user = OCP_USER_MPU | OCP_USER_SDMA,
363};
364
365/* iss -> l3_main_2 */
366static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = {
367 .master = &omap44xx_iss_hwmod,
368 .slave = &omap44xx_l3_main_2_hwmod,
369 .clk = "l3_div_ck",
370 .user = OCP_USER_MPU | OCP_USER_SDMA,
371};
372
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700373/* iva -> l3_main_2 */
374static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = {
375 .master = &omap44xx_iva_hwmod,
376 .slave = &omap44xx_l3_main_2_hwmod,
377 .clk = "l3_div_ck",
378 .user = OCP_USER_MPU | OCP_USER_SDMA,
379};
380
sricharanc4645232011-02-07 21:12:11 +0530381static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
382 {
383 .pa_start = 0x44800000,
384 .pa_end = 0x44801fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600385 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530386 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600387 { }
sricharanc4645232011-02-07 21:12:11 +0530388};
389
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200390/* l3_main_1 -> l3_main_2 */
391static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
392 .master = &omap44xx_l3_main_1_hwmod,
393 .slave = &omap44xx_l3_main_2_hwmod,
394 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530395 .addr = omap44xx_l3_main_2_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600396 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200397};
398
399/* l4_cfg -> l3_main_2 */
400static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = {
401 .master = &omap44xx_l4_cfg_hwmod,
402 .slave = &omap44xx_l3_main_2_hwmod,
403 .clk = "l4_div_ck",
404 .user = OCP_USER_MPU | OCP_USER_SDMA,
405};
406
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000407/* usb_otg_hs -> l3_main_2 */
408static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = {
409 .master = &omap44xx_usb_otg_hs_hwmod,
410 .slave = &omap44xx_l3_main_2_hwmod,
411 .clk = "l3_div_ck",
412 .user = OCP_USER_MPU | OCP_USER_SDMA,
413};
414
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200415/* l3_main_2 slave ports */
416static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
Benoit Cousson531ce0d2010-12-20 18:27:19 -0800417 &omap44xx_dma_system__l3_main_2,
Benoit Cousson407a6882011-02-15 22:39:48 +0100418 &omap44xx_hsi__l3_main_2,
419 &omap44xx_ipu__l3_main_2,
420 &omap44xx_iss__l3_main_2,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700421 &omap44xx_iva__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200422 &omap44xx_l3_main_1__l3_main_2,
423 &omap44xx_l4_cfg__l3_main_2,
Benoit Cousson5844c4e2011-02-17 12:41:05 +0000424 &omap44xx_usb_otg_hs__l3_main_2,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200425};
426
427static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
428 .name = "l3_main_2",
429 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600430 .clkdm_name = "l3_2_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600431 .prcm = {
432 .omap4 = {
433 .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600434 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600435 },
436 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200437 .slaves = omap44xx_l3_main_2_slaves,
438 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200439};
440
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600441/* l3_main_3 */
sricharanc4645232011-02-07 21:12:11 +0530442static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
443 {
444 .pa_start = 0x45000000,
445 .pa_end = 0x45000fff,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600446 .flags = ADDR_TYPE_RT
sricharanc4645232011-02-07 21:12:11 +0530447 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600448 { }
sricharanc4645232011-02-07 21:12:11 +0530449};
450
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200451/* l3_main_1 -> l3_main_3 */
452static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
453 .master = &omap44xx_l3_main_1_hwmod,
454 .slave = &omap44xx_l3_main_3_hwmod,
455 .clk = "l3_div_ck",
sricharanc4645232011-02-07 21:12:11 +0530456 .addr = omap44xx_l3_main_3_addrs,
Benoit Cousson9b4021b2011-07-09 19:14:27 -0600457 .user = OCP_USER_MPU,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200458};
459
460/* l3_main_2 -> l3_main_3 */
461static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = {
462 .master = &omap44xx_l3_main_2_hwmod,
463 .slave = &omap44xx_l3_main_3_hwmod,
464 .clk = "l3_div_ck",
465 .user = OCP_USER_MPU | OCP_USER_SDMA,
466};
467
468/* l4_cfg -> l3_main_3 */
469static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = {
470 .master = &omap44xx_l4_cfg_hwmod,
471 .slave = &omap44xx_l3_main_3_hwmod,
472 .clk = "l4_div_ck",
473 .user = OCP_USER_MPU | OCP_USER_SDMA,
474};
475
476/* l3_main_3 slave ports */
477static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
478 &omap44xx_l3_main_1__l3_main_3,
479 &omap44xx_l3_main_2__l3_main_3,
480 &omap44xx_l4_cfg__l3_main_3,
481};
482
483static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
484 .name = "l3_main_3",
485 .class = &omap44xx_l3_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600486 .clkdm_name = "l3_instr_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600487 .prcm = {
488 .omap4 = {
489 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600490 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600491 .modulemode = MODULEMODE_HWCTRL,
Benoit Coussond0f06312011-07-10 05:56:30 -0600492 },
493 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200494 .slaves = omap44xx_l3_main_3_slaves,
495 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200496};
497
498/*
499 * 'l4' class
500 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
501 */
502static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000503 .name = "l4",
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200504};
505
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600506/* l4_abe */
Benoit Cousson407a6882011-02-15 22:39:48 +0100507/* aess -> l4_abe */
508static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
509 .master = &omap44xx_aess_hwmod,
510 .slave = &omap44xx_l4_abe_hwmod,
511 .clk = "ocp_abe_iclk",
512 .user = OCP_USER_MPU | OCP_USER_SDMA,
513};
514
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700515/* dsp -> l4_abe */
516static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = {
517 .master = &omap44xx_dsp_hwmod,
518 .slave = &omap44xx_l4_abe_hwmod,
519 .clk = "ocp_abe_iclk",
520 .user = OCP_USER_MPU | OCP_USER_SDMA,
521};
522
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200523/* l3_main_1 -> l4_abe */
524static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = {
525 .master = &omap44xx_l3_main_1_hwmod,
526 .slave = &omap44xx_l4_abe_hwmod,
527 .clk = "l3_div_ck",
528 .user = OCP_USER_MPU | OCP_USER_SDMA,
529};
530
531/* mpu -> l4_abe */
532static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = {
533 .master = &omap44xx_mpu_hwmod,
534 .slave = &omap44xx_l4_abe_hwmod,
535 .clk = "ocp_abe_iclk",
536 .user = OCP_USER_MPU | OCP_USER_SDMA,
537};
538
539/* l4_abe slave ports */
540static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100541 &omap44xx_aess__l4_abe,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -0700542 &omap44xx_dsp__l4_abe,
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200543 &omap44xx_l3_main_1__l4_abe,
544 &omap44xx_mpu__l4_abe,
545};
546
547static struct omap_hwmod omap44xx_l4_abe_hwmod = {
548 .name = "l4_abe",
549 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600550 .clkdm_name = "abe_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600551 .prcm = {
552 .omap4 = {
553 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
554 },
555 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200556 .slaves = omap44xx_l4_abe_slaves,
557 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200558};
559
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600560/* l4_cfg */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200561/* l3_main_1 -> l4_cfg */
562static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
563 .master = &omap44xx_l3_main_1_hwmod,
564 .slave = &omap44xx_l4_cfg_hwmod,
565 .clk = "l3_div_ck",
566 .user = OCP_USER_MPU | OCP_USER_SDMA,
567};
568
569/* l4_cfg slave ports */
570static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
571 &omap44xx_l3_main_1__l4_cfg,
572};
573
574static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
575 .name = "l4_cfg",
576 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600577 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600578 .prcm = {
579 .omap4 = {
580 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600581 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600582 },
583 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200584 .slaves = omap44xx_l4_cfg_slaves,
585 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200586};
587
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600588/* l4_per */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200589/* l3_main_2 -> l4_per */
590static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
591 .master = &omap44xx_l3_main_2_hwmod,
592 .slave = &omap44xx_l4_per_hwmod,
593 .clk = "l3_div_ck",
594 .user = OCP_USER_MPU | OCP_USER_SDMA,
595};
596
597/* l4_per slave ports */
598static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
599 &omap44xx_l3_main_2__l4_per,
600};
601
602static struct omap_hwmod omap44xx_l4_per_hwmod = {
603 .name = "l4_per",
604 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600605 .clkdm_name = "l4_per_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600606 .prcm = {
607 .omap4 = {
608 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600609 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600610 },
611 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200612 .slaves = omap44xx_l4_per_slaves,
613 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200614};
615
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600616/* l4_wkup */
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200617/* l4_cfg -> l4_wkup */
618static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
619 .master = &omap44xx_l4_cfg_hwmod,
620 .slave = &omap44xx_l4_wkup_hwmod,
621 .clk = "l4_div_ck",
622 .user = OCP_USER_MPU | OCP_USER_SDMA,
623};
624
625/* l4_wkup slave ports */
626static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
627 &omap44xx_l4_cfg__l4_wkup,
628};
629
630static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
631 .name = "l4_wkup",
632 .class = &omap44xx_l4_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600633 .clkdm_name = "l4_wkup_clkdm",
Benoit Coussond0f06312011-07-10 05:56:30 -0600634 .prcm = {
635 .omap4 = {
636 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600637 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
Benoit Coussond0f06312011-07-10 05:56:30 -0600638 },
639 },
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200640 .slaves = omap44xx_l4_wkup_slaves,
641 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
Benoit Cousson55d2cb02010-05-12 17:54:36 +0200642};
643
644/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700645 * 'mpu_bus' class
646 * instance(s): mpu_private
647 */
648static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +0000649 .name = "mpu_bus",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700650};
651
Benoit Cousson7e69ed92011-07-09 19:14:28 -0600652/* mpu_private */
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700653/* mpu -> mpu_private */
654static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
655 .master = &omap44xx_mpu_hwmod,
656 .slave = &omap44xx_mpu_private_hwmod,
657 .clk = "l3_div_ck",
658 .user = OCP_USER_MPU | OCP_USER_SDMA,
659};
660
661/* mpu_private slave ports */
662static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
663 &omap44xx_mpu__mpu_private,
664};
665
666static struct omap_hwmod omap44xx_mpu_private_hwmod = {
667 .name = "mpu_private",
668 .class = &omap44xx_mpu_bus_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600669 .clkdm_name = "mpuss_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700670 .slaves = omap44xx_mpu_private_slaves,
671 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700672};
673
674/*
675 * Modules omap_hwmod structures
676 *
677 * The following IPs are excluded for the moment because:
678 * - They do not need an explicit SW control using omap_hwmod API.
679 * - They still need to be validated with the driver
680 * properly adapted to omap_hwmod / omap_device
681 *
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700682 * c2c
683 * c2c_target_fw
684 * cm_core
685 * cm_core_aon
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700686 * ctrl_module_core
687 * ctrl_module_pad_core
688 * ctrl_module_pad_wkup
689 * ctrl_module_wkup
690 * debugss
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700691 * efuse_ctrl_cust
692 * efuse_ctrl_std
693 * elm
694 * emif1
695 * emif2
696 * fdif
697 * gpmc
698 * gpu
699 * hdq1w
Benoit Cousson00fe6102011-07-09 19:14:28 -0600700 * mcasp
701 * mpu_c0
702 * mpu_c1
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700703 * ocmc_ram
704 * ocp2scp_usb_phy
705 * ocp_wp_noc
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700706 * prcm_mpu
707 * prm
708 * scrm
709 * sl2if
710 * slimbus1
711 * slimbus2
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700712 * usb_host_fs
713 * usb_host_hs
Benoit Cousson3b54baa2010-12-21 21:08:33 -0700714 * usb_phy_cm
715 * usb_tll_hs
716 * usim
717 */
718
719/*
Benoit Cousson407a6882011-02-15 22:39:48 +0100720 * 'aess' class
721 * audio engine sub system
722 */
723
724static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
725 .rev_offs = 0x0000,
726 .sysc_offs = 0x0010,
727 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
728 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
Benoit Coussonc614ebf2011-07-01 22:54:01 +0200729 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
730 MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +0100731 .sysc_fields = &omap_hwmod_sysc_type2,
732};
733
734static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
735 .name = "aess",
736 .sysc = &omap44xx_aess_sysc,
737};
738
739/* aess */
740static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
741 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600742 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100743};
744
745static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
746 { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START },
747 { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START },
748 { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START },
749 { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START },
750 { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START },
751 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
752 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
753 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -0600754 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +0100755};
756
757/* aess master ports */
758static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = {
759 &omap44xx_aess__l4_abe,
760};
761
762static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
763 {
764 .pa_start = 0x401f1000,
765 .pa_end = 0x401f13ff,
766 .flags = ADDR_TYPE_RT
767 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600768 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100769};
770
771/* l4_abe -> aess */
772static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
773 .master = &omap44xx_l4_abe_hwmod,
774 .slave = &omap44xx_aess_hwmod,
775 .clk = "ocp_abe_iclk",
776 .addr = omap44xx_aess_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100777 .user = OCP_USER_MPU,
778};
779
780static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
781 {
782 .pa_start = 0x490f1000,
783 .pa_end = 0x490f13ff,
784 .flags = ADDR_TYPE_RT
785 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600786 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100787};
788
789/* l4_abe -> aess (dma) */
790static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
791 .master = &omap44xx_l4_abe_hwmod,
792 .slave = &omap44xx_aess_hwmod,
793 .clk = "ocp_abe_iclk",
794 .addr = omap44xx_aess_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100795 .user = OCP_USER_SDMA,
796};
797
798/* aess slave ports */
799static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
800 &omap44xx_l4_abe__aess,
801 &omap44xx_l4_abe__aess_dma,
802};
803
804static struct omap_hwmod omap44xx_aess_hwmod = {
805 .name = "aess",
806 .class = &omap44xx_aess_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600807 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100808 .mpu_irqs = omap44xx_aess_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100809 .sdma_reqs = omap44xx_aess_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100810 .main_clk = "aess_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600811 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100812 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600813 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600814 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -0600815 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +0100816 },
817 },
818 .slaves = omap44xx_aess_slaves,
819 .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves),
820 .masters = omap44xx_aess_masters,
821 .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +0100822};
823
824/*
825 * 'bandgap' class
826 * bangap reference for ldo regulators
827 */
828
829static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = {
830 .name = "bandgap",
831};
832
833/* bandgap */
834static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
835 { .role = "fclk", .clk = "bandgap_fclk" },
836};
837
838static struct omap_hwmod omap44xx_bandgap_hwmod = {
839 .name = "bandgap",
840 .class = &omap44xx_bandgap_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600841 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600842 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100843 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600844 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100845 },
846 },
847 .opt_clks = bandgap_opt_clks,
848 .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks),
Benoit Cousson407a6882011-02-15 22:39:48 +0100849};
850
851/*
852 * 'counter' class
853 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
854 */
855
856static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = {
857 .rev_offs = 0x0000,
858 .sysc_offs = 0x0004,
859 .sysc_flags = SYSC_HAS_SIDLEMODE,
860 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
861 SIDLE_SMART_WKUP),
862 .sysc_fields = &omap_hwmod_sysc_type1,
863};
864
865static struct omap_hwmod_class omap44xx_counter_hwmod_class = {
866 .name = "counter",
867 .sysc = &omap44xx_counter_sysc,
868};
869
870/* counter_32k */
871static struct omap_hwmod omap44xx_counter_32k_hwmod;
872static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
873 {
874 .pa_start = 0x4a304000,
875 .pa_end = 0x4a30401f,
876 .flags = ADDR_TYPE_RT
877 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600878 { }
Benoit Cousson407a6882011-02-15 22:39:48 +0100879};
880
881/* l4_wkup -> counter_32k */
882static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
883 .master = &omap44xx_l4_wkup_hwmod,
884 .slave = &omap44xx_counter_32k_hwmod,
885 .clk = "l4_wkup_clk_mux_ck",
886 .addr = omap44xx_counter_32k_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +0100887 .user = OCP_USER_MPU | OCP_USER_SDMA,
888};
889
890/* counter_32k slave ports */
891static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
892 &omap44xx_l4_wkup__counter_32k,
893};
894
895static struct omap_hwmod omap44xx_counter_32k_hwmod = {
896 .name = "counter_32k",
897 .class = &omap44xx_counter_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600898 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +0100899 .flags = HWMOD_SWSUP_SIDLE,
900 .main_clk = "sys_32k_ck",
Benoit Cousson00fe6102011-07-09 19:14:28 -0600901 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +0100902 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600903 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600904 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +0100905 },
906 },
907 .slaves = omap44xx_counter_32k_slaves,
908 .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +0100909};
910
911/*
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000912 * 'dma' class
913 * dma controller for data exchange between memory to memory (i.e. internal or
914 * external memory) and gp peripherals to memory or memory to gp peripherals
915 */
916
917static struct omap_hwmod_class_sysconfig omap44xx_dma_sysc = {
918 .rev_offs = 0x0000,
919 .sysc_offs = 0x002c,
920 .syss_offs = 0x0028,
921 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
922 SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
923 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
924 SYSS_HAS_RESET_STATUS),
925 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
926 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
927 .sysc_fields = &omap_hwmod_sysc_type1,
928};
929
930static struct omap_hwmod_class omap44xx_dma_hwmod_class = {
931 .name = "dma",
932 .sysc = &omap44xx_dma_sysc,
933};
934
935/* dma dev_attr */
936static struct omap_dma_dev_attr dma_dev_attr = {
937 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
938 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
939 .lch_count = 32,
940};
941
942/* dma_system */
943static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
944 { .name = "0", .irq = 12 + OMAP44XX_IRQ_GIC_START },
945 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
946 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
947 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -0600948 { .irq = -1 }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000949};
950
951/* dma_system master ports */
952static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = {
953 &omap44xx_dma_system__l3_main_2,
954};
955
956static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
957 {
958 .pa_start = 0x4a056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -0600959 .pa_end = 0x4a056fff,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000960 .flags = ADDR_TYPE_RT
961 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600962 { }
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000963};
964
965/* l4_cfg -> dma_system */
966static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
967 .master = &omap44xx_l4_cfg_hwmod,
968 .slave = &omap44xx_dma_system_hwmod,
969 .clk = "l4_div_ck",
970 .addr = omap44xx_dma_system_addrs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000971 .user = OCP_USER_MPU | OCP_USER_SDMA,
972};
973
974/* dma_system slave ports */
975static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
976 &omap44xx_l4_cfg__dma_system,
977};
978
979static struct omap_hwmod omap44xx_dma_system_hwmod = {
980 .name = "dma_system",
981 .class = &omap44xx_dma_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -0600982 .clkdm_name = "l3_dma_clkdm",
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000983 .mpu_irqs = omap44xx_dma_system_irqs,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000984 .main_clk = "l3_div_ck",
985 .prcm = {
986 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -0600987 .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -0600988 .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000989 },
990 },
991 .dev_attr = &dma_dev_attr,
992 .slaves = omap44xx_dma_system_slaves,
993 .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves),
994 .masters = omap44xx_dma_system_masters,
995 .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters),
Benoit Coussond7cf5f32010-12-23 22:30:31 +0000996};
997
998/*
Benoit Cousson8ca476d2011-01-25 22:01:00 +0000999 * 'dmic' class
1000 * digital microphone controller
1001 */
1002
1003static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = {
1004 .rev_offs = 0x0000,
1005 .sysc_offs = 0x0010,
1006 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1007 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1008 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1009 SIDLE_SMART_WKUP),
1010 .sysc_fields = &omap_hwmod_sysc_type2,
1011};
1012
1013static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
1014 .name = "dmic",
1015 .sysc = &omap44xx_dmic_sysc,
1016};
1017
1018/* dmic */
1019static struct omap_hwmod omap44xx_dmic_hwmod;
1020static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
1021 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001022 { .irq = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001023};
1024
1025static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
1026 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001027 { .dma_req = -1 }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001028};
1029
1030static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
1031 {
1032 .pa_start = 0x4012e000,
1033 .pa_end = 0x4012e07f,
1034 .flags = ADDR_TYPE_RT
1035 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001036 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001037};
1038
1039/* l4_abe -> dmic */
1040static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
1041 .master = &omap44xx_l4_abe_hwmod,
1042 .slave = &omap44xx_dmic_hwmod,
1043 .clk = "ocp_abe_iclk",
1044 .addr = omap44xx_dmic_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001045 .user = OCP_USER_MPU,
1046};
1047
1048static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
1049 {
1050 .pa_start = 0x4902e000,
1051 .pa_end = 0x4902e07f,
1052 .flags = ADDR_TYPE_RT
1053 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001054 { }
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001055};
1056
1057/* l4_abe -> dmic (dma) */
1058static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
1059 .master = &omap44xx_l4_abe_hwmod,
1060 .slave = &omap44xx_dmic_hwmod,
1061 .clk = "ocp_abe_iclk",
1062 .addr = omap44xx_dmic_dma_addrs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001063 .user = OCP_USER_SDMA,
1064};
1065
1066/* dmic slave ports */
1067static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
1068 &omap44xx_l4_abe__dmic,
1069 &omap44xx_l4_abe__dmic_dma,
1070};
1071
1072static struct omap_hwmod omap44xx_dmic_hwmod = {
1073 .name = "dmic",
1074 .class = &omap44xx_dmic_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001075 .clkdm_name = "abe_clkdm",
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001076 .mpu_irqs = omap44xx_dmic_irqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001077 .sdma_reqs = omap44xx_dmic_sdma_reqs,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001078 .main_clk = "dmic_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06001079 .prcm = {
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001080 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001081 .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001082 .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001083 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001084 },
1085 },
1086 .slaves = omap44xx_dmic_slaves,
1087 .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves),
Benoit Cousson8ca476d2011-01-25 22:01:00 +00001088};
1089
1090/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001091 * 'dsp' class
1092 * dsp sub-system
1093 */
1094
1095static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001096 .name = "dsp",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001097};
1098
1099/* dsp */
1100static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1101 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001102 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001103};
1104
1105static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
1106 { .name = "mmu_cache", .rst_shift = 1 },
1107};
1108
1109static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = {
1110 { .name = "dsp", .rst_shift = 0 },
1111};
1112
1113/* dsp -> iva */
1114static struct omap_hwmod_ocp_if omap44xx_dsp__iva = {
1115 .master = &omap44xx_dsp_hwmod,
1116 .slave = &omap44xx_iva_hwmod,
1117 .clk = "dpll_iva_m5x2_ck",
1118};
1119
1120/* dsp master ports */
1121static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = {
1122 &omap44xx_dsp__l3_main_1,
1123 &omap44xx_dsp__l4_abe,
1124 &omap44xx_dsp__iva,
1125};
1126
1127/* l4_cfg -> dsp */
1128static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = {
1129 .master = &omap44xx_l4_cfg_hwmod,
1130 .slave = &omap44xx_dsp_hwmod,
1131 .clk = "l4_div_ck",
1132 .user = OCP_USER_MPU | OCP_USER_SDMA,
1133};
1134
1135/* dsp slave ports */
1136static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1137 &omap44xx_l4_cfg__dsp,
1138};
1139
1140/* Pseudo hwmod for reset control purpose only */
1141static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1142 .name = "dsp_c0",
1143 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001144 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001145 .flags = HWMOD_INIT_NO_RESET,
1146 .rst_lines = omap44xx_dsp_c0_resets,
1147 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1148 .prcm = {
1149 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06001150 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001151 },
1152 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001153};
1154
1155static struct omap_hwmod omap44xx_dsp_hwmod = {
1156 .name = "dsp",
1157 .class = &omap44xx_dsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001158 .clkdm_name = "tesla_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001159 .mpu_irqs = omap44xx_dsp_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001160 .rst_lines = omap44xx_dsp_resets,
1161 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1162 .main_clk = "dsp_fck",
1163 .prcm = {
1164 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001165 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06001166 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001167 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001168 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001169 },
1170 },
1171 .slaves = omap44xx_dsp_slaves,
1172 .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves),
1173 .masters = omap44xx_dsp_masters,
1174 .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07001175};
1176
1177/*
Benoit Coussond63bd742011-01-27 11:17:03 +00001178 * 'dss' class
1179 * display sub-system
1180 */
1181
1182static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = {
1183 .rev_offs = 0x0000,
1184 .syss_offs = 0x0014,
1185 .sysc_flags = SYSS_HAS_RESET_STATUS,
1186};
1187
1188static struct omap_hwmod_class omap44xx_dss_hwmod_class = {
1189 .name = "dss",
1190 .sysc = &omap44xx_dss_sysc,
Tomi Valkeinen13662dc2011-11-08 03:16:13 -07001191 .reset = omap_dss_reset,
Benoit Coussond63bd742011-01-27 11:17:03 +00001192};
1193
1194/* dss */
1195/* dss master ports */
1196static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = {
1197 &omap44xx_dss__l3_main_1,
1198};
1199
1200static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1201 {
1202 .pa_start = 0x58000000,
1203 .pa_end = 0x5800007f,
1204 .flags = ADDR_TYPE_RT
1205 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001206 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001207};
1208
1209/* l3_main_2 -> dss */
1210static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1211 .master = &omap44xx_l3_main_2_hwmod,
1212 .slave = &omap44xx_dss_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001213 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001214 .addr = omap44xx_dss_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001215 .user = OCP_USER_SDMA,
1216};
1217
1218static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1219 {
1220 .pa_start = 0x48040000,
1221 .pa_end = 0x4804007f,
1222 .flags = ADDR_TYPE_RT
1223 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001224 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001225};
1226
1227/* l4_per -> dss */
1228static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1229 .master = &omap44xx_l4_per_hwmod,
1230 .slave = &omap44xx_dss_hwmod,
1231 .clk = "l4_div_ck",
1232 .addr = omap44xx_dss_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001233 .user = OCP_USER_MPU,
1234};
1235
1236/* dss slave ports */
1237static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = {
1238 &omap44xx_l3_main_2__dss,
1239 &omap44xx_l4_per__dss,
1240};
1241
1242static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1243 { .role = "sys_clk", .clk = "dss_sys_clk" },
1244 { .role = "tv_clk", .clk = "dss_tv_clk" },
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001245 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
Benoit Coussond63bd742011-01-27 11:17:03 +00001246};
1247
1248static struct omap_hwmod omap44xx_dss_hwmod = {
1249 .name = "dss_core",
Tomi Valkeinen37ad0852011-11-08 03:16:11 -07001250 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001251 .class = &omap44xx_dss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001252 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001253 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001254 .prcm = {
1255 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001256 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001257 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001258 },
1259 },
1260 .opt_clks = dss_opt_clks,
1261 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1262 .slaves = omap44xx_dss_slaves,
1263 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves),
1264 .masters = omap44xx_dss_masters,
1265 .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters),
Benoit Coussond63bd742011-01-27 11:17:03 +00001266};
1267
1268/*
1269 * 'dispc' class
1270 * display controller
1271 */
1272
1273static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = {
1274 .rev_offs = 0x0000,
1275 .sysc_offs = 0x0010,
1276 .syss_offs = 0x0014,
1277 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1278 SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE |
1279 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1280 SYSS_HAS_RESET_STATUS),
1281 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1282 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1283 .sysc_fields = &omap_hwmod_sysc_type1,
1284};
1285
1286static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1287 .name = "dispc",
1288 .sysc = &omap44xx_dispc_sysc,
1289};
1290
1291/* dss_dispc */
1292static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1293static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1294 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001295 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001296};
1297
1298static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1299 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001300 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001301};
1302
1303static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1304 {
1305 .pa_start = 0x58001000,
1306 .pa_end = 0x58001fff,
1307 .flags = ADDR_TYPE_RT
1308 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001309 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001310};
1311
1312/* l3_main_2 -> dss_dispc */
1313static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1314 .master = &omap44xx_l3_main_2_hwmod,
1315 .slave = &omap44xx_dss_dispc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001316 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001317 .addr = omap44xx_dss_dispc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001318 .user = OCP_USER_SDMA,
1319};
1320
1321static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1322 {
1323 .pa_start = 0x48041000,
1324 .pa_end = 0x48041fff,
1325 .flags = ADDR_TYPE_RT
1326 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001327 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001328};
1329
1330/* l4_per -> dss_dispc */
1331static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1332 .master = &omap44xx_l4_per_hwmod,
1333 .slave = &omap44xx_dss_dispc_hwmod,
1334 .clk = "l4_div_ck",
1335 .addr = omap44xx_dss_dispc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001336 .user = OCP_USER_MPU,
1337};
1338
1339/* dss_dispc slave ports */
1340static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1341 &omap44xx_l3_main_2__dss_dispc,
1342 &omap44xx_l4_per__dss_dispc,
1343};
1344
1345static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1346 .name = "dss_dispc",
1347 .class = &omap44xx_dispc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001348 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001349 .mpu_irqs = omap44xx_dss_dispc_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001350 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001351 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001352 .prcm = {
1353 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001354 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001355 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001356 },
1357 },
1358 .slaves = omap44xx_dss_dispc_slaves,
1359 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001360};
1361
1362/*
1363 * 'dsi' class
1364 * display serial interface controller
1365 */
1366
1367static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = {
1368 .rev_offs = 0x0000,
1369 .sysc_offs = 0x0010,
1370 .syss_offs = 0x0014,
1371 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1372 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1373 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1374 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1375 .sysc_fields = &omap_hwmod_sysc_type1,
1376};
1377
1378static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1379 .name = "dsi",
1380 .sysc = &omap44xx_dsi_sysc,
1381};
1382
1383/* dss_dsi1 */
1384static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1385static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1386 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001387 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001388};
1389
1390static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1391 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001392 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001393};
1394
1395static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1396 {
1397 .pa_start = 0x58004000,
1398 .pa_end = 0x580041ff,
1399 .flags = ADDR_TYPE_RT
1400 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001401 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001402};
1403
1404/* l3_main_2 -> dss_dsi1 */
1405static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1406 .master = &omap44xx_l3_main_2_hwmod,
1407 .slave = &omap44xx_dss_dsi1_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001408 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001409 .addr = omap44xx_dss_dsi1_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001410 .user = OCP_USER_SDMA,
1411};
1412
1413static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1414 {
1415 .pa_start = 0x48044000,
1416 .pa_end = 0x480441ff,
1417 .flags = ADDR_TYPE_RT
1418 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001419 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001420};
1421
1422/* l4_per -> dss_dsi1 */
1423static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1424 .master = &omap44xx_l4_per_hwmod,
1425 .slave = &omap44xx_dss_dsi1_hwmod,
1426 .clk = "l4_div_ck",
1427 .addr = omap44xx_dss_dsi1_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001428 .user = OCP_USER_MPU,
1429};
1430
1431/* dss_dsi1 slave ports */
1432static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1433 &omap44xx_l3_main_2__dss_dsi1,
1434 &omap44xx_l4_per__dss_dsi1,
1435};
1436
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001437static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1438 { .role = "sys_clk", .clk = "dss_sys_clk" },
1439};
1440
Benoit Coussond63bd742011-01-27 11:17:03 +00001441static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1442 .name = "dss_dsi1",
1443 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001444 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001445 .mpu_irqs = omap44xx_dss_dsi1_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001446 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001447 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001448 .prcm = {
1449 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001450 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001451 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001452 },
1453 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001454 .opt_clks = dss_dsi1_opt_clks,
1455 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001456 .slaves = omap44xx_dss_dsi1_slaves,
1457 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001458};
1459
1460/* dss_dsi2 */
1461static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1462static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1463 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001464 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001465};
1466
1467static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1468 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001469 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001470};
1471
1472static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1473 {
1474 .pa_start = 0x58005000,
1475 .pa_end = 0x580051ff,
1476 .flags = ADDR_TYPE_RT
1477 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001478 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001479};
1480
1481/* l3_main_2 -> dss_dsi2 */
1482static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1483 .master = &omap44xx_l3_main_2_hwmod,
1484 .slave = &omap44xx_dss_dsi2_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001485 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001486 .addr = omap44xx_dss_dsi2_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001487 .user = OCP_USER_SDMA,
1488};
1489
1490static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1491 {
1492 .pa_start = 0x48045000,
1493 .pa_end = 0x480451ff,
1494 .flags = ADDR_TYPE_RT
1495 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001496 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001497};
1498
1499/* l4_per -> dss_dsi2 */
1500static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1501 .master = &omap44xx_l4_per_hwmod,
1502 .slave = &omap44xx_dss_dsi2_hwmod,
1503 .clk = "l4_div_ck",
1504 .addr = omap44xx_dss_dsi2_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001505 .user = OCP_USER_MPU,
1506};
1507
1508/* dss_dsi2 slave ports */
1509static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1510 &omap44xx_l3_main_2__dss_dsi2,
1511 &omap44xx_l4_per__dss_dsi2,
1512};
1513
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001514static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1515 { .role = "sys_clk", .clk = "dss_sys_clk" },
1516};
1517
Benoit Coussond63bd742011-01-27 11:17:03 +00001518static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1519 .name = "dss_dsi2",
1520 .class = &omap44xx_dsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001521 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001522 .mpu_irqs = omap44xx_dss_dsi2_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001523 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001524 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001525 .prcm = {
1526 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001527 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001528 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001529 },
1530 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001531 .opt_clks = dss_dsi2_opt_clks,
1532 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001533 .slaves = omap44xx_dss_dsi2_slaves,
1534 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001535};
1536
1537/*
1538 * 'hdmi' class
1539 * hdmi controller
1540 */
1541
1542static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = {
1543 .rev_offs = 0x0000,
1544 .sysc_offs = 0x0010,
1545 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
1546 SYSC_HAS_SOFTRESET),
1547 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1548 SIDLE_SMART_WKUP),
1549 .sysc_fields = &omap_hwmod_sysc_type2,
1550};
1551
1552static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1553 .name = "hdmi",
1554 .sysc = &omap44xx_hdmi_sysc,
1555};
1556
1557/* dss_hdmi */
1558static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1559static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1560 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001561 { .irq = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001562};
1563
1564static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1565 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001566 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001567};
1568
1569static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1570 {
1571 .pa_start = 0x58006000,
1572 .pa_end = 0x58006fff,
1573 .flags = ADDR_TYPE_RT
1574 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001575 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001576};
1577
1578/* l3_main_2 -> dss_hdmi */
1579static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1580 .master = &omap44xx_l3_main_2_hwmod,
1581 .slave = &omap44xx_dss_hdmi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001582 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001583 .addr = omap44xx_dss_hdmi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001584 .user = OCP_USER_SDMA,
1585};
1586
1587static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1588 {
1589 .pa_start = 0x48046000,
1590 .pa_end = 0x48046fff,
1591 .flags = ADDR_TYPE_RT
1592 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001593 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001594};
1595
1596/* l4_per -> dss_hdmi */
1597static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1598 .master = &omap44xx_l4_per_hwmod,
1599 .slave = &omap44xx_dss_hdmi_hwmod,
1600 .clk = "l4_div_ck",
1601 .addr = omap44xx_dss_hdmi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001602 .user = OCP_USER_MPU,
1603};
1604
1605/* dss_hdmi slave ports */
1606static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1607 &omap44xx_l3_main_2__dss_hdmi,
1608 &omap44xx_l4_per__dss_hdmi,
1609};
1610
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001611static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1612 { .role = "sys_clk", .clk = "dss_sys_clk" },
1613};
1614
Benoit Coussond63bd742011-01-27 11:17:03 +00001615static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1616 .name = "dss_hdmi",
1617 .class = &omap44xx_hdmi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001618 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001619 .mpu_irqs = omap44xx_dss_hdmi_irqs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001620 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001621 .main_clk = "dss_48mhz_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001622 .prcm = {
1623 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001624 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001625 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001626 },
1627 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001628 .opt_clks = dss_hdmi_opt_clks,
1629 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001630 .slaves = omap44xx_dss_hdmi_slaves,
1631 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001632};
1633
1634/*
1635 * 'rfbi' class
1636 * remote frame buffer interface
1637 */
1638
1639static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = {
1640 .rev_offs = 0x0000,
1641 .sysc_offs = 0x0010,
1642 .syss_offs = 0x0014,
1643 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1644 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1645 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1646 .sysc_fields = &omap_hwmod_sysc_type1,
1647};
1648
1649static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1650 .name = "rfbi",
1651 .sysc = &omap44xx_rfbi_sysc,
1652};
1653
1654/* dss_rfbi */
1655static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1656static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1657 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06001658 { .dma_req = -1 }
Benoit Coussond63bd742011-01-27 11:17:03 +00001659};
1660
1661static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1662 {
1663 .pa_start = 0x58002000,
1664 .pa_end = 0x580020ff,
1665 .flags = ADDR_TYPE_RT
1666 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001667 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001668};
1669
1670/* l3_main_2 -> dss_rfbi */
1671static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1672 .master = &omap44xx_l3_main_2_hwmod,
1673 .slave = &omap44xx_dss_rfbi_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001674 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001675 .addr = omap44xx_dss_rfbi_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001676 .user = OCP_USER_SDMA,
1677};
1678
1679static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1680 {
1681 .pa_start = 0x48042000,
1682 .pa_end = 0x480420ff,
1683 .flags = ADDR_TYPE_RT
1684 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001685 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001686};
1687
1688/* l4_per -> dss_rfbi */
1689static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1690 .master = &omap44xx_l4_per_hwmod,
1691 .slave = &omap44xx_dss_rfbi_hwmod,
1692 .clk = "l4_div_ck",
1693 .addr = omap44xx_dss_rfbi_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001694 .user = OCP_USER_MPU,
1695};
1696
1697/* dss_rfbi slave ports */
1698static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1699 &omap44xx_l3_main_2__dss_rfbi,
1700 &omap44xx_l4_per__dss_rfbi,
1701};
1702
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001703static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1704 { .role = "ick", .clk = "dss_fck" },
1705};
1706
Benoit Coussond63bd742011-01-27 11:17:03 +00001707static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1708 .name = "dss_rfbi",
1709 .class = &omap44xx_rfbi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001710 .clkdm_name = "l3_dss_clkdm",
Benoit Coussond63bd742011-01-27 11:17:03 +00001711 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001712 .main_clk = "dss_dss_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001713 .prcm = {
1714 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001715 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001716 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001717 },
1718 },
Tomi Valkeinen3a23aaf2011-07-09 20:39:44 -06001719 .opt_clks = dss_rfbi_opt_clks,
1720 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Benoit Coussond63bd742011-01-27 11:17:03 +00001721 .slaves = omap44xx_dss_rfbi_slaves,
1722 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001723};
1724
1725/*
1726 * 'venc' class
1727 * video encoder
1728 */
1729
1730static struct omap_hwmod_class omap44xx_venc_hwmod_class = {
1731 .name = "venc",
1732};
1733
1734/* dss_venc */
1735static struct omap_hwmod omap44xx_dss_venc_hwmod;
1736static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1737 {
1738 .pa_start = 0x58003000,
1739 .pa_end = 0x580030ff,
1740 .flags = ADDR_TYPE_RT
1741 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001742 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001743};
1744
1745/* l3_main_2 -> dss_venc */
1746static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1747 .master = &omap44xx_l3_main_2_hwmod,
1748 .slave = &omap44xx_dss_venc_hwmod,
Tomi Valkeinenda7cdfa2011-07-09 20:39:45 -06001749 .clk = "dss_fck",
Benoit Coussond63bd742011-01-27 11:17:03 +00001750 .addr = omap44xx_dss_venc_dma_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001751 .user = OCP_USER_SDMA,
1752};
1753
1754static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1755 {
1756 .pa_start = 0x48043000,
1757 .pa_end = 0x480430ff,
1758 .flags = ADDR_TYPE_RT
1759 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001760 { }
Benoit Coussond63bd742011-01-27 11:17:03 +00001761};
1762
1763/* l4_per -> dss_venc */
1764static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1765 .master = &omap44xx_l4_per_hwmod,
1766 .slave = &omap44xx_dss_venc_hwmod,
1767 .clk = "l4_div_ck",
1768 .addr = omap44xx_dss_venc_addrs,
Benoit Coussond63bd742011-01-27 11:17:03 +00001769 .user = OCP_USER_MPU,
1770};
1771
1772/* dss_venc slave ports */
1773static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1774 &omap44xx_l3_main_2__dss_venc,
1775 &omap44xx_l4_per__dss_venc,
1776};
1777
1778static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1779 .name = "dss_venc",
1780 .class = &omap44xx_venc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001781 .clkdm_name = "l3_dss_clkdm",
Tomi Valkeinen4d0698d2011-11-08 03:16:12 -07001782 .main_clk = "dss_tv_clk",
Benoit Coussond63bd742011-01-27 11:17:03 +00001783 .prcm = {
1784 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001785 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001786 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
Benoit Coussond63bd742011-01-27 11:17:03 +00001787 },
1788 },
1789 .slaves = omap44xx_dss_venc_slaves,
1790 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves),
Benoit Coussond63bd742011-01-27 11:17:03 +00001791};
1792
1793/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001794 * 'gpio' class
1795 * general purpose io module
1796 */
1797
1798static struct omap_hwmod_class_sysconfig omap44xx_gpio_sysc = {
1799 .rev_offs = 0x0000,
1800 .sysc_offs = 0x0010,
1801 .syss_offs = 0x0114,
Benoit Cousson0cfe8752010-12-21 21:08:33 -07001802 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
1803 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1804 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07001805 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1806 SIDLE_SMART_WKUP),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001807 .sysc_fields = &omap_hwmod_sysc_type1,
1808};
1809
1810static struct omap_hwmod_class omap44xx_gpio_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001811 .name = "gpio",
1812 .sysc = &omap44xx_gpio_sysc,
1813 .rev = 2,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001814};
1815
1816/* gpio dev_attr */
1817static struct omap_gpio_dev_attr gpio_dev_attr = {
Benoit Coussonfe134712010-12-23 22:30:32 +00001818 .bank_width = 32,
1819 .dbck_flag = true,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001820};
1821
1822/* gpio1 */
1823static struct omap_hwmod omap44xx_gpio1_hwmod;
1824static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1825 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001826 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001827};
1828
1829static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1830 {
1831 .pa_start = 0x4a310000,
1832 .pa_end = 0x4a3101ff,
1833 .flags = ADDR_TYPE_RT
1834 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001835 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001836};
1837
1838/* l4_wkup -> gpio1 */
1839static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1840 .master = &omap44xx_l4_wkup_hwmod,
1841 .slave = &omap44xx_gpio1_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001842 .clk = "l4_wkup_clk_mux_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001843 .addr = omap44xx_gpio1_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001844 .user = OCP_USER_MPU | OCP_USER_SDMA,
1845};
1846
1847/* gpio1 slave ports */
1848static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = {
1849 &omap44xx_l4_wkup__gpio1,
1850};
1851
1852static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001853 { .role = "dbclk", .clk = "gpio1_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001854};
1855
1856static struct omap_hwmod omap44xx_gpio1_hwmod = {
1857 .name = "gpio1",
1858 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001859 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001860 .mpu_irqs = omap44xx_gpio1_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001861 .main_clk = "gpio1_ick",
1862 .prcm = {
1863 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001864 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001865 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001866 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001867 },
1868 },
1869 .opt_clks = gpio1_opt_clks,
1870 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1871 .dev_attr = &gpio_dev_attr,
1872 .slaves = omap44xx_gpio1_slaves,
1873 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001874};
1875
1876/* gpio2 */
1877static struct omap_hwmod omap44xx_gpio2_hwmod;
1878static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1879 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001880 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001881};
1882
1883static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1884 {
1885 .pa_start = 0x48055000,
1886 .pa_end = 0x480551ff,
1887 .flags = ADDR_TYPE_RT
1888 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001889 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001890};
1891
1892/* l4_per -> gpio2 */
1893static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1894 .master = &omap44xx_l4_per_hwmod,
1895 .slave = &omap44xx_gpio2_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001896 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001897 .addr = omap44xx_gpio2_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001898 .user = OCP_USER_MPU | OCP_USER_SDMA,
1899};
1900
1901/* gpio2 slave ports */
1902static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = {
1903 &omap44xx_l4_per__gpio2,
1904};
1905
1906static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001907 { .role = "dbclk", .clk = "gpio2_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001908};
1909
1910static struct omap_hwmod omap44xx_gpio2_hwmod = {
1911 .name = "gpio2",
1912 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001913 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001914 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001915 .mpu_irqs = omap44xx_gpio2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001916 .main_clk = "gpio2_ick",
1917 .prcm = {
1918 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001919 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001920 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001921 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001922 },
1923 },
1924 .opt_clks = gpio2_opt_clks,
1925 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1926 .dev_attr = &gpio_dev_attr,
1927 .slaves = omap44xx_gpio2_slaves,
1928 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001929};
1930
1931/* gpio3 */
1932static struct omap_hwmod omap44xx_gpio3_hwmod;
1933static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1934 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001935 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001936};
1937
1938static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1939 {
1940 .pa_start = 0x48057000,
1941 .pa_end = 0x480571ff,
1942 .flags = ADDR_TYPE_RT
1943 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001944 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001945};
1946
1947/* l4_per -> gpio3 */
1948static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1949 .master = &omap44xx_l4_per_hwmod,
1950 .slave = &omap44xx_gpio3_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07001951 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001952 .addr = omap44xx_gpio3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001953 .user = OCP_USER_MPU | OCP_USER_SDMA,
1954};
1955
1956/* gpio3 slave ports */
1957static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = {
1958 &omap44xx_l4_per__gpio3,
1959};
1960
1961static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07001962 { .role = "dbclk", .clk = "gpio3_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001963};
1964
1965static struct omap_hwmod omap44xx_gpio3_hwmod = {
1966 .name = "gpio3",
1967 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06001968 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07001969 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001970 .mpu_irqs = omap44xx_gpio3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001971 .main_clk = "gpio3_ick",
1972 .prcm = {
1973 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06001974 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06001975 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06001976 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001977 },
1978 },
1979 .opt_clks = gpio3_opt_clks,
1980 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1981 .dev_attr = &gpio_dev_attr,
1982 .slaves = omap44xx_gpio3_slaves,
1983 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001984};
1985
1986/* gpio4 */
1987static struct omap_hwmod omap44xx_gpio4_hwmod;
1988static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1989 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06001990 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07001991};
1992
1993static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
1994 {
1995 .pa_start = 0x48059000,
1996 .pa_end = 0x480591ff,
1997 .flags = ADDR_TYPE_RT
1998 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001999 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002000};
2001
2002/* l4_per -> gpio4 */
2003static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
2004 .master = &omap44xx_l4_per_hwmod,
2005 .slave = &omap44xx_gpio4_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002006 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002007 .addr = omap44xx_gpio4_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002008 .user = OCP_USER_MPU | OCP_USER_SDMA,
2009};
2010
2011/* gpio4 slave ports */
2012static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = {
2013 &omap44xx_l4_per__gpio4,
2014};
2015
2016static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002017 { .role = "dbclk", .clk = "gpio4_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002018};
2019
2020static struct omap_hwmod omap44xx_gpio4_hwmod = {
2021 .name = "gpio4",
2022 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002023 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002024 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002025 .mpu_irqs = omap44xx_gpio4_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002026 .main_clk = "gpio4_ick",
2027 .prcm = {
2028 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002029 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002030 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002031 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002032 },
2033 },
2034 .opt_clks = gpio4_opt_clks,
2035 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2036 .dev_attr = &gpio_dev_attr,
2037 .slaves = omap44xx_gpio4_slaves,
2038 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002039};
2040
2041/* gpio5 */
2042static struct omap_hwmod omap44xx_gpio5_hwmod;
2043static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
2044 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002045 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002046};
2047
2048static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
2049 {
2050 .pa_start = 0x4805b000,
2051 .pa_end = 0x4805b1ff,
2052 .flags = ADDR_TYPE_RT
2053 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002054 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002055};
2056
2057/* l4_per -> gpio5 */
2058static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
2059 .master = &omap44xx_l4_per_hwmod,
2060 .slave = &omap44xx_gpio5_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002061 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002062 .addr = omap44xx_gpio5_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002063 .user = OCP_USER_MPU | OCP_USER_SDMA,
2064};
2065
2066/* gpio5 slave ports */
2067static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = {
2068 &omap44xx_l4_per__gpio5,
2069};
2070
2071static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002072 { .role = "dbclk", .clk = "gpio5_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002073};
2074
2075static struct omap_hwmod omap44xx_gpio5_hwmod = {
2076 .name = "gpio5",
2077 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002078 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002079 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002080 .mpu_irqs = omap44xx_gpio5_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002081 .main_clk = "gpio5_ick",
2082 .prcm = {
2083 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002084 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002085 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002086 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002087 },
2088 },
2089 .opt_clks = gpio5_opt_clks,
2090 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2091 .dev_attr = &gpio_dev_attr,
2092 .slaves = omap44xx_gpio5_slaves,
2093 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002094};
2095
2096/* gpio6 */
2097static struct omap_hwmod omap44xx_gpio6_hwmod;
2098static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
2099 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002100 { .irq = -1 }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002101};
2102
2103static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
2104 {
2105 .pa_start = 0x4805d000,
2106 .pa_end = 0x4805d1ff,
2107 .flags = ADDR_TYPE_RT
2108 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002109 { }
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002110};
2111
2112/* l4_per -> gpio6 */
2113static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
2114 .master = &omap44xx_l4_per_hwmod,
2115 .slave = &omap44xx_gpio6_hwmod,
Benoit Coussonb399bca2010-12-21 21:08:34 -07002116 .clk = "l4_div_ck",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002117 .addr = omap44xx_gpio6_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002118 .user = OCP_USER_MPU | OCP_USER_SDMA,
2119};
2120
2121/* gpio6 slave ports */
2122static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = {
2123 &omap44xx_l4_per__gpio6,
2124};
2125
2126static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
Benoit Coussonb399bca2010-12-21 21:08:34 -07002127 { .role = "dbclk", .clk = "gpio6_dbclk" },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002128};
2129
2130static struct omap_hwmod omap44xx_gpio6_hwmod = {
2131 .name = "gpio6",
2132 .class = &omap44xx_gpio_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002133 .clkdm_name = "l4_per_clkdm",
Benoit Coussonb399bca2010-12-21 21:08:34 -07002134 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002135 .mpu_irqs = omap44xx_gpio6_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002136 .main_clk = "gpio6_ick",
2137 .prcm = {
2138 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002139 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002140 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002141 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002142 },
2143 },
2144 .opt_clks = gpio6_opt_clks,
2145 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2146 .dev_attr = &gpio_dev_attr,
2147 .slaves = omap44xx_gpio6_slaves,
2148 .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves),
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002149};
2150
2151/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002152 * 'hsi' class
2153 * mipi high-speed synchronous serial interface (multichannel and full-duplex
2154 * serial if)
2155 */
2156
2157static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2158 .rev_offs = 0x0000,
2159 .sysc_offs = 0x0010,
2160 .syss_offs = 0x0014,
2161 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE |
2162 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
2163 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2164 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2165 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002166 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002167 .sysc_fields = &omap_hwmod_sysc_type1,
2168};
2169
2170static struct omap_hwmod_class omap44xx_hsi_hwmod_class = {
2171 .name = "hsi",
2172 .sysc = &omap44xx_hsi_sysc,
2173};
2174
2175/* hsi */
2176static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2177 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2178 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2179 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002180 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002181};
2182
2183/* hsi master ports */
2184static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = {
2185 &omap44xx_hsi__l3_main_2,
2186};
2187
2188static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2189 {
2190 .pa_start = 0x4a058000,
2191 .pa_end = 0x4a05bfff,
2192 .flags = ADDR_TYPE_RT
2193 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002194 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002195};
2196
2197/* l4_cfg -> hsi */
2198static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2199 .master = &omap44xx_l4_cfg_hwmod,
2200 .slave = &omap44xx_hsi_hwmod,
2201 .clk = "l4_div_ck",
2202 .addr = omap44xx_hsi_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002203 .user = OCP_USER_MPU | OCP_USER_SDMA,
2204};
2205
2206/* hsi slave ports */
2207static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2208 &omap44xx_l4_cfg__hsi,
2209};
2210
2211static struct omap_hwmod omap44xx_hsi_hwmod = {
2212 .name = "hsi",
2213 .class = &omap44xx_hsi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002214 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002215 .mpu_irqs = omap44xx_hsi_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002216 .main_clk = "hsi_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002217 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002218 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002219 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002220 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002221 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002222 },
2223 },
2224 .slaves = omap44xx_hsi_slaves,
2225 .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves),
2226 .masters = omap44xx_hsi_masters,
2227 .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002228};
2229
2230/*
Benoit Coussonf7764712010-09-21 19:37:14 +05302231 * 'i2c' class
2232 * multimaster high-speed i2c controller
2233 */
2234
2235static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2236 .sysc_offs = 0x0010,
2237 .syss_offs = 0x0090,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07002238 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2239 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07002240 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07002241 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2242 SIDLE_SMART_WKUP),
Benoit Coussonf7764712010-09-21 19:37:14 +05302243 .sysc_fields = &omap_hwmod_sysc_type1,
2244};
2245
2246static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002247 .name = "i2c",
2248 .sysc = &omap44xx_i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06002249 .rev = OMAP_I2C_IP_VERSION_2,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002250 .reset = &omap_i2c_reset,
Benoit Coussonf7764712010-09-21 19:37:14 +05302251};
2252
Andy Green4d4441a2011-07-10 05:27:16 -06002253static struct omap_i2c_dev_attr i2c_dev_attr = {
2254 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2255};
2256
Benoit Coussonf7764712010-09-21 19:37:14 +05302257/* i2c1 */
2258static struct omap_hwmod omap44xx_i2c1_hwmod;
2259static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2260 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002261 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302262};
2263
2264static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2265 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2266 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002267 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302268};
2269
2270static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2271 {
2272 .pa_start = 0x48070000,
2273 .pa_end = 0x480700ff,
2274 .flags = ADDR_TYPE_RT
2275 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002276 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302277};
2278
2279/* l4_per -> i2c1 */
2280static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2281 .master = &omap44xx_l4_per_hwmod,
2282 .slave = &omap44xx_i2c1_hwmod,
2283 .clk = "l4_div_ck",
2284 .addr = omap44xx_i2c1_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302285 .user = OCP_USER_MPU | OCP_USER_SDMA,
2286};
2287
2288/* i2c1 slave ports */
2289static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2290 &omap44xx_l4_per__i2c1,
2291};
2292
2293static struct omap_hwmod omap44xx_i2c1_hwmod = {
2294 .name = "i2c1",
2295 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002296 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002297 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302298 .mpu_irqs = omap44xx_i2c1_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302299 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302300 .main_clk = "i2c1_fck",
2301 .prcm = {
2302 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002303 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002304 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002305 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302306 },
2307 },
2308 .slaves = omap44xx_i2c1_slaves,
2309 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002310 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302311};
2312
2313/* i2c2 */
2314static struct omap_hwmod omap44xx_i2c2_hwmod;
2315static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2316 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002317 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302318};
2319
2320static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2321 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2322 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002323 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302324};
2325
2326static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2327 {
2328 .pa_start = 0x48072000,
2329 .pa_end = 0x480720ff,
2330 .flags = ADDR_TYPE_RT
2331 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002332 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302333};
2334
2335/* l4_per -> i2c2 */
2336static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2337 .master = &omap44xx_l4_per_hwmod,
2338 .slave = &omap44xx_i2c2_hwmod,
2339 .clk = "l4_div_ck",
2340 .addr = omap44xx_i2c2_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302341 .user = OCP_USER_MPU | OCP_USER_SDMA,
2342};
2343
2344/* i2c2 slave ports */
2345static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2346 &omap44xx_l4_per__i2c2,
2347};
2348
2349static struct omap_hwmod omap44xx_i2c2_hwmod = {
2350 .name = "i2c2",
2351 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002352 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002353 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302354 .mpu_irqs = omap44xx_i2c2_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302355 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302356 .main_clk = "i2c2_fck",
2357 .prcm = {
2358 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002359 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002360 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002361 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302362 },
2363 },
2364 .slaves = omap44xx_i2c2_slaves,
2365 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002366 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302367};
2368
2369/* i2c3 */
2370static struct omap_hwmod omap44xx_i2c3_hwmod;
2371static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2372 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002373 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302374};
2375
2376static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2377 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2378 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002379 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302380};
2381
2382static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2383 {
2384 .pa_start = 0x48060000,
2385 .pa_end = 0x480600ff,
2386 .flags = ADDR_TYPE_RT
2387 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002388 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302389};
2390
2391/* l4_per -> i2c3 */
2392static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2393 .master = &omap44xx_l4_per_hwmod,
2394 .slave = &omap44xx_i2c3_hwmod,
2395 .clk = "l4_div_ck",
2396 .addr = omap44xx_i2c3_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302397 .user = OCP_USER_MPU | OCP_USER_SDMA,
2398};
2399
2400/* i2c3 slave ports */
2401static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2402 &omap44xx_l4_per__i2c3,
2403};
2404
2405static struct omap_hwmod omap44xx_i2c3_hwmod = {
2406 .name = "i2c3",
2407 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002408 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002409 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302410 .mpu_irqs = omap44xx_i2c3_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302411 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302412 .main_clk = "i2c3_fck",
2413 .prcm = {
2414 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002415 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002416 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002417 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302418 },
2419 },
2420 .slaves = omap44xx_i2c3_slaves,
2421 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002422 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302423};
2424
2425/* i2c4 */
2426static struct omap_hwmod omap44xx_i2c4_hwmod;
2427static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2428 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002429 { .irq = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302430};
2431
2432static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2433 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2434 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002435 { .dma_req = -1 }
Benoit Coussonf7764712010-09-21 19:37:14 +05302436};
2437
2438static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2439 {
2440 .pa_start = 0x48350000,
2441 .pa_end = 0x483500ff,
2442 .flags = ADDR_TYPE_RT
2443 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002444 { }
Benoit Coussonf7764712010-09-21 19:37:14 +05302445};
2446
2447/* l4_per -> i2c4 */
2448static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2449 .master = &omap44xx_l4_per_hwmod,
2450 .slave = &omap44xx_i2c4_hwmod,
2451 .clk = "l4_div_ck",
2452 .addr = omap44xx_i2c4_addrs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302453 .user = OCP_USER_MPU | OCP_USER_SDMA,
2454};
2455
2456/* i2c4 slave ports */
2457static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2458 &omap44xx_l4_per__i2c4,
2459};
2460
2461static struct omap_hwmod omap44xx_i2c4_hwmod = {
2462 .name = "i2c4",
2463 .class = &omap44xx_i2c_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002464 .clkdm_name = "l4_per_clkdm",
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06002465 .flags = HWMOD_16BIT_REG,
Benoit Coussonf7764712010-09-21 19:37:14 +05302466 .mpu_irqs = omap44xx_i2c4_irqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302467 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
Benoit Coussonf7764712010-09-21 19:37:14 +05302468 .main_clk = "i2c4_fck",
2469 .prcm = {
2470 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002471 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002472 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002473 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussonf7764712010-09-21 19:37:14 +05302474 },
2475 },
2476 .slaves = omap44xx_i2c4_slaves,
2477 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
Andy Green4d4441a2011-07-10 05:27:16 -06002478 .dev_attr = &i2c_dev_attr,
Benoit Coussonf7764712010-09-21 19:37:14 +05302479};
2480
2481/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002482 * 'ipu' class
2483 * imaging processor unit
2484 */
2485
2486static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2487 .name = "ipu",
2488};
2489
2490/* ipu */
2491static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2492 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002493 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002494};
2495
2496static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
2497 { .name = "cpu0", .rst_shift = 0 },
2498};
2499
2500static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = {
2501 { .name = "cpu1", .rst_shift = 1 },
2502};
2503
2504static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = {
2505 { .name = "mmu_cache", .rst_shift = 2 },
2506};
2507
2508/* ipu master ports */
2509static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = {
2510 &omap44xx_ipu__l3_main_2,
2511};
2512
2513/* l3_main_2 -> ipu */
2514static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = {
2515 .master = &omap44xx_l3_main_2_hwmod,
2516 .slave = &omap44xx_ipu_hwmod,
2517 .clk = "l3_div_ck",
2518 .user = OCP_USER_MPU | OCP_USER_SDMA,
2519};
2520
2521/* ipu slave ports */
2522static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2523 &omap44xx_l3_main_2__ipu,
2524};
2525
2526/* Pseudo hwmod for reset control purpose only */
2527static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2528 .name = "ipu_c0",
2529 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002530 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002531 .flags = HWMOD_INIT_NO_RESET,
2532 .rst_lines = omap44xx_ipu_c0_resets,
2533 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002534 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002535 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002536 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002537 },
2538 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002539};
2540
2541/* Pseudo hwmod for reset control purpose only */
2542static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2543 .name = "ipu_c1",
2544 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002545 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002546 .flags = HWMOD_INIT_NO_RESET,
2547 .rst_lines = omap44xx_ipu_c1_resets,
2548 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
Benoit Cousson00fe6102011-07-09 19:14:28 -06002549 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002550 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002551 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson407a6882011-02-15 22:39:48 +01002552 },
2553 },
Benoit Cousson407a6882011-02-15 22:39:48 +01002554};
2555
2556static struct omap_hwmod omap44xx_ipu_hwmod = {
2557 .name = "ipu",
2558 .class = &omap44xx_ipu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002559 .clkdm_name = "ducati_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002560 .mpu_irqs = omap44xx_ipu_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002561 .rst_lines = omap44xx_ipu_resets,
2562 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2563 .main_clk = "ipu_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002564 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002565 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002566 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002567 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002568 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002569 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002570 },
2571 },
2572 .slaves = omap44xx_ipu_slaves,
2573 .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves),
2574 .masters = omap44xx_ipu_masters,
2575 .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002576};
2577
2578/*
2579 * 'iss' class
2580 * external images sensor pixel data processor
2581 */
2582
2583static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2584 .rev_offs = 0x0000,
2585 .sysc_offs = 0x0010,
2586 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS |
2587 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2588 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2589 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02002590 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01002591 .sysc_fields = &omap_hwmod_sysc_type2,
2592};
2593
2594static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2595 .name = "iss",
2596 .sysc = &omap44xx_iss_sysc,
2597};
2598
2599/* iss */
2600static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2601 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002602 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002603};
2604
2605static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2606 { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START },
2607 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2608 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2609 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002610 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002611};
2612
2613/* iss master ports */
2614static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = {
2615 &omap44xx_iss__l3_main_2,
2616};
2617
2618static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2619 {
2620 .pa_start = 0x52000000,
2621 .pa_end = 0x520000ff,
2622 .flags = ADDR_TYPE_RT
2623 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002624 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002625};
2626
2627/* l3_main_2 -> iss */
2628static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2629 .master = &omap44xx_l3_main_2_hwmod,
2630 .slave = &omap44xx_iss_hwmod,
2631 .clk = "l3_div_ck",
2632 .addr = omap44xx_iss_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002633 .user = OCP_USER_MPU | OCP_USER_SDMA,
2634};
2635
2636/* iss slave ports */
2637static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = {
2638 &omap44xx_l3_main_2__iss,
2639};
2640
2641static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2642 { .role = "ctrlclk", .clk = "iss_ctrlclk" },
2643};
2644
2645static struct omap_hwmod omap44xx_iss_hwmod = {
2646 .name = "iss",
2647 .class = &omap44xx_iss_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002648 .clkdm_name = "iss_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002649 .mpu_irqs = omap44xx_iss_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002650 .sdma_reqs = omap44xx_iss_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002651 .main_clk = "iss_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002652 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002653 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002654 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002655 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002656 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002657 },
2658 },
2659 .opt_clks = iss_opt_clks,
2660 .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks),
2661 .slaves = omap44xx_iss_slaves,
2662 .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves),
2663 .masters = omap44xx_iss_masters,
2664 .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01002665};
2666
2667/*
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002668 * 'iva' class
2669 * multi-standard video encoder/decoder hardware accelerator
2670 */
2671
2672static struct omap_hwmod_class omap44xx_iva_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00002673 .name = "iva",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002674};
2675
2676/* iva */
2677static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2678 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2679 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2680 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002681 { .irq = -1 }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002682};
2683
2684static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
2685 { .name = "logic", .rst_shift = 2 },
2686};
2687
2688static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = {
2689 { .name = "seq0", .rst_shift = 0 },
2690};
2691
2692static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = {
2693 { .name = "seq1", .rst_shift = 1 },
2694};
2695
2696/* iva master ports */
2697static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = {
2698 &omap44xx_iva__l3_main_2,
2699 &omap44xx_iva__l3_instr,
2700};
2701
2702static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2703 {
2704 .pa_start = 0x5a000000,
2705 .pa_end = 0x5a07ffff,
2706 .flags = ADDR_TYPE_RT
2707 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002708 { }
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002709};
2710
2711/* l3_main_2 -> iva */
2712static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2713 .master = &omap44xx_l3_main_2_hwmod,
2714 .slave = &omap44xx_iva_hwmod,
2715 .clk = "l3_div_ck",
2716 .addr = omap44xx_iva_addrs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002717 .user = OCP_USER_MPU,
2718};
2719
2720/* iva slave ports */
2721static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2722 &omap44xx_dsp__iva,
2723 &omap44xx_l3_main_2__iva,
2724};
2725
2726/* Pseudo hwmod for reset control purpose only */
2727static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2728 .name = "iva_seq0",
2729 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002730 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002731 .flags = HWMOD_INIT_NO_RESET,
2732 .rst_lines = omap44xx_iva_seq0_resets,
2733 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2734 .prcm = {
2735 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002736 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002737 },
2738 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002739};
2740
2741/* Pseudo hwmod for reset control purpose only */
2742static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2743 .name = "iva_seq1",
2744 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002745 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002746 .flags = HWMOD_INIT_NO_RESET,
2747 .rst_lines = omap44xx_iva_seq1_resets,
2748 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2749 .prcm = {
2750 .omap4 = {
Benoit Coussoneaac3292011-07-10 05:56:31 -06002751 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002752 },
2753 },
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002754};
2755
2756static struct omap_hwmod omap44xx_iva_hwmod = {
2757 .name = "iva",
2758 .class = &omap44xx_iva_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002759 .clkdm_name = "ivahd_clkdm",
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002760 .mpu_irqs = omap44xx_iva_irqs,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002761 .rst_lines = omap44xx_iva_resets,
2762 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2763 .main_clk = "iva_fck",
2764 .prcm = {
2765 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002766 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
Benoit Coussoneaac3292011-07-10 05:56:31 -06002767 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002768 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002769 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002770 },
2771 },
2772 .slaves = omap44xx_iva_slaves,
2773 .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves),
2774 .masters = omap44xx_iva_masters,
2775 .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters),
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07002776};
2777
2778/*
Benoit Cousson407a6882011-02-15 22:39:48 +01002779 * 'kbd' class
2780 * keyboard controller
2781 */
2782
2783static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = {
2784 .rev_offs = 0x0000,
2785 .sysc_offs = 0x0010,
2786 .syss_offs = 0x0014,
2787 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
2788 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
2789 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2790 SYSS_HAS_RESET_STATUS),
2791 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2792 .sysc_fields = &omap_hwmod_sysc_type1,
2793};
2794
2795static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2796 .name = "kbd",
2797 .sysc = &omap44xx_kbd_sysc,
2798};
2799
2800/* kbd */
2801static struct omap_hwmod omap44xx_kbd_hwmod;
2802static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2803 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002804 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01002805};
2806
2807static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2808 {
2809 .pa_start = 0x4a31c000,
2810 .pa_end = 0x4a31c07f,
2811 .flags = ADDR_TYPE_RT
2812 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002813 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01002814};
2815
2816/* l4_wkup -> kbd */
2817static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2818 .master = &omap44xx_l4_wkup_hwmod,
2819 .slave = &omap44xx_kbd_hwmod,
2820 .clk = "l4_wkup_clk_mux_ck",
2821 .addr = omap44xx_kbd_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002822 .user = OCP_USER_MPU | OCP_USER_SDMA,
2823};
2824
2825/* kbd slave ports */
2826static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2827 &omap44xx_l4_wkup__kbd,
2828};
2829
2830static struct omap_hwmod omap44xx_kbd_hwmod = {
2831 .name = "kbd",
2832 .class = &omap44xx_kbd_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002833 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01002834 .mpu_irqs = omap44xx_kbd_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01002835 .main_clk = "kbd_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06002836 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01002837 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002838 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002839 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002840 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01002841 },
2842 },
2843 .slaves = omap44xx_kbd_slaves,
2844 .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01002845};
2846
2847/*
Benoit Coussonec5df922011-02-02 19:27:21 +00002848 * 'mailbox' class
2849 * mailbox module allowing communication between the on-chip processors using a
2850 * queued mailbox-interrupt mechanism.
2851 */
2852
2853static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = {
2854 .rev_offs = 0x0000,
2855 .sysc_offs = 0x0010,
2856 .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
2857 SYSC_HAS_SOFTRESET),
2858 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2859 .sysc_fields = &omap_hwmod_sysc_type2,
2860};
2861
2862static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2863 .name = "mailbox",
2864 .sysc = &omap44xx_mailbox_sysc,
2865};
2866
2867/* mailbox */
2868static struct omap_hwmod omap44xx_mailbox_hwmod;
2869static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2870 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002871 { .irq = -1 }
Benoit Coussonec5df922011-02-02 19:27:21 +00002872};
2873
2874static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2875 {
2876 .pa_start = 0x4a0f4000,
2877 .pa_end = 0x4a0f41ff,
2878 .flags = ADDR_TYPE_RT
2879 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002880 { }
Benoit Coussonec5df922011-02-02 19:27:21 +00002881};
2882
2883/* l4_cfg -> mailbox */
2884static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2885 .master = &omap44xx_l4_cfg_hwmod,
2886 .slave = &omap44xx_mailbox_hwmod,
2887 .clk = "l4_div_ck",
2888 .addr = omap44xx_mailbox_addrs,
Benoit Coussonec5df922011-02-02 19:27:21 +00002889 .user = OCP_USER_MPU | OCP_USER_SDMA,
2890};
2891
2892/* mailbox slave ports */
2893static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2894 &omap44xx_l4_cfg__mailbox,
2895};
2896
2897static struct omap_hwmod omap44xx_mailbox_hwmod = {
2898 .name = "mailbox",
2899 .class = &omap44xx_mailbox_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002900 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussonec5df922011-02-02 19:27:21 +00002901 .mpu_irqs = omap44xx_mailbox_irqs,
Benoit Cousson00fe6102011-07-09 19:14:28 -06002902 .prcm = {
Benoit Coussonec5df922011-02-02 19:27:21 +00002903 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002904 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002905 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
Benoit Coussonec5df922011-02-02 19:27:21 +00002906 },
2907 },
2908 .slaves = omap44xx_mailbox_slaves,
2909 .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves),
Benoit Coussonec5df922011-02-02 19:27:21 +00002910};
2911
2912/*
Benoit Cousson4ddff492011-01-31 14:50:30 +00002913 * 'mcbsp' class
2914 * multi channel buffered serial port controller
2915 */
2916
2917static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = {
2918 .sysc_offs = 0x008c,
2919 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2920 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2921 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2922 .sysc_fields = &omap_hwmod_sysc_type1,
2923};
2924
2925static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2926 .name = "mcbsp",
2927 .sysc = &omap44xx_mcbsp_sysc,
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302928 .rev = MCBSP_CONFIG_TYPE4,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002929};
2930
2931/* mcbsp1 */
2932static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2933static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2934 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06002935 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002936};
2937
2938static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2939 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2940 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06002941 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002942};
2943
2944static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2945 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302946 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002947 .pa_start = 0x40122000,
2948 .pa_end = 0x401220ff,
2949 .flags = ADDR_TYPE_RT
2950 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002951 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002952};
2953
2954/* l4_abe -> mcbsp1 */
2955static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2956 .master = &omap44xx_l4_abe_hwmod,
2957 .slave = &omap44xx_mcbsp1_hwmod,
2958 .clk = "ocp_abe_iclk",
2959 .addr = omap44xx_mcbsp1_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002960 .user = OCP_USER_MPU,
2961};
2962
2963static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2964 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05302965 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002966 .pa_start = 0x49022000,
2967 .pa_end = 0x490220ff,
2968 .flags = ADDR_TYPE_RT
2969 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002970 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00002971};
2972
2973/* l4_abe -> mcbsp1 (dma) */
2974static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2975 .master = &omap44xx_l4_abe_hwmod,
2976 .slave = &omap44xx_mcbsp1_hwmod,
2977 .clk = "ocp_abe_iclk",
2978 .addr = omap44xx_mcbsp1_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002979 .user = OCP_USER_SDMA,
2980};
2981
2982/* mcbsp1 slave ports */
2983static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2984 &omap44xx_l4_abe__mcbsp1,
2985 &omap44xx_l4_abe__mcbsp1_dma,
2986};
2987
2988static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2989 .name = "mcbsp1",
2990 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06002991 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00002992 .mpu_irqs = omap44xx_mcbsp1_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002993 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00002994 .main_clk = "mcbsp1_fck",
2995 .prcm = {
2996 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06002997 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06002998 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06002999 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003000 },
3001 },
3002 .slaves = omap44xx_mcbsp1_slaves,
3003 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003004};
3005
3006/* mcbsp2 */
3007static struct omap_hwmod omap44xx_mcbsp2_hwmod;
3008static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
3009 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003010 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003011};
3012
3013static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
3014 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
3015 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003016 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003017};
3018
3019static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
3020 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303021 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003022 .pa_start = 0x40124000,
3023 .pa_end = 0x401240ff,
3024 .flags = ADDR_TYPE_RT
3025 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003026 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003027};
3028
3029/* l4_abe -> mcbsp2 */
3030static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
3031 .master = &omap44xx_l4_abe_hwmod,
3032 .slave = &omap44xx_mcbsp2_hwmod,
3033 .clk = "ocp_abe_iclk",
3034 .addr = omap44xx_mcbsp2_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003035 .user = OCP_USER_MPU,
3036};
3037
3038static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
3039 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303040 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003041 .pa_start = 0x49024000,
3042 .pa_end = 0x490240ff,
3043 .flags = ADDR_TYPE_RT
3044 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003045 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003046};
3047
3048/* l4_abe -> mcbsp2 (dma) */
3049static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
3050 .master = &omap44xx_l4_abe_hwmod,
3051 .slave = &omap44xx_mcbsp2_hwmod,
3052 .clk = "ocp_abe_iclk",
3053 .addr = omap44xx_mcbsp2_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003054 .user = OCP_USER_SDMA,
3055};
3056
3057/* mcbsp2 slave ports */
3058static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
3059 &omap44xx_l4_abe__mcbsp2,
3060 &omap44xx_l4_abe__mcbsp2_dma,
3061};
3062
3063static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
3064 .name = "mcbsp2",
3065 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003066 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003067 .mpu_irqs = omap44xx_mcbsp2_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003068 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003069 .main_clk = "mcbsp2_fck",
3070 .prcm = {
3071 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003072 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003073 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003074 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003075 },
3076 },
3077 .slaves = omap44xx_mcbsp2_slaves,
3078 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003079};
3080
3081/* mcbsp3 */
3082static struct omap_hwmod omap44xx_mcbsp3_hwmod;
3083static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
3084 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003085 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003086};
3087
3088static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
3089 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
3090 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003091 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003092};
3093
3094static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
3095 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303096 .name = "mpu",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003097 .pa_start = 0x40126000,
3098 .pa_end = 0x401260ff,
3099 .flags = ADDR_TYPE_RT
3100 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003101 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003102};
3103
3104/* l4_abe -> mcbsp3 */
3105static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
3106 .master = &omap44xx_l4_abe_hwmod,
3107 .slave = &omap44xx_mcbsp3_hwmod,
3108 .clk = "ocp_abe_iclk",
3109 .addr = omap44xx_mcbsp3_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003110 .user = OCP_USER_MPU,
3111};
3112
3113static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
3114 {
Kishon Vijay Abraham Icb7e9de2011-02-24 15:16:50 +05303115 .name = "dma",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003116 .pa_start = 0x49026000,
3117 .pa_end = 0x490260ff,
3118 .flags = ADDR_TYPE_RT
3119 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003120 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003121};
3122
3123/* l4_abe -> mcbsp3 (dma) */
3124static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
3125 .master = &omap44xx_l4_abe_hwmod,
3126 .slave = &omap44xx_mcbsp3_hwmod,
3127 .clk = "ocp_abe_iclk",
3128 .addr = omap44xx_mcbsp3_dma_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003129 .user = OCP_USER_SDMA,
3130};
3131
3132/* mcbsp3 slave ports */
3133static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
3134 &omap44xx_l4_abe__mcbsp3,
3135 &omap44xx_l4_abe__mcbsp3_dma,
3136};
3137
3138static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3139 .name = "mcbsp3",
3140 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003141 .clkdm_name = "abe_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003142 .mpu_irqs = omap44xx_mcbsp3_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003143 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003144 .main_clk = "mcbsp3_fck",
3145 .prcm = {
3146 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003147 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003148 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003149 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003150 },
3151 },
3152 .slaves = omap44xx_mcbsp3_slaves,
3153 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003154};
3155
3156/* mcbsp4 */
3157static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3158static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3159 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003160 { .irq = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003161};
3162
3163static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3164 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3165 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003166 { .dma_req = -1 }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003167};
3168
3169static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3170 {
3171 .pa_start = 0x48096000,
3172 .pa_end = 0x480960ff,
3173 .flags = ADDR_TYPE_RT
3174 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003175 { }
Benoit Cousson4ddff492011-01-31 14:50:30 +00003176};
3177
3178/* l4_per -> mcbsp4 */
3179static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3180 .master = &omap44xx_l4_per_hwmod,
3181 .slave = &omap44xx_mcbsp4_hwmod,
3182 .clk = "l4_div_ck",
3183 .addr = omap44xx_mcbsp4_addrs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003184 .user = OCP_USER_MPU | OCP_USER_SDMA,
3185};
3186
3187/* mcbsp4 slave ports */
3188static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3189 &omap44xx_l4_per__mcbsp4,
3190};
3191
3192static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3193 .name = "mcbsp4",
3194 .class = &omap44xx_mcbsp_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003195 .clkdm_name = "l4_per_clkdm",
Benoit Cousson4ddff492011-01-31 14:50:30 +00003196 .mpu_irqs = omap44xx_mcbsp4_irqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003197 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003198 .main_clk = "mcbsp4_fck",
3199 .prcm = {
3200 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003201 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003202 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003203 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson4ddff492011-01-31 14:50:30 +00003204 },
3205 },
3206 .slaves = omap44xx_mcbsp4_slaves,
3207 .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves),
Benoit Cousson4ddff492011-01-31 14:50:30 +00003208};
3209
3210/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003211 * 'mcpdm' class
3212 * multi channel pdm controller (proprietary interface with phoenix power
3213 * ic)
3214 */
3215
3216static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = {
3217 .rev_offs = 0x0000,
3218 .sysc_offs = 0x0010,
3219 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3220 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3221 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3222 SIDLE_SMART_WKUP),
3223 .sysc_fields = &omap_hwmod_sysc_type2,
3224};
3225
3226static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3227 .name = "mcpdm",
3228 .sysc = &omap44xx_mcpdm_sysc,
3229};
3230
3231/* mcpdm */
3232static struct omap_hwmod omap44xx_mcpdm_hwmod;
3233static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3234 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003235 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003236};
3237
3238static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3239 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3240 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003241 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003242};
3243
3244static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3245 {
3246 .pa_start = 0x40132000,
3247 .pa_end = 0x4013207f,
3248 .flags = ADDR_TYPE_RT
3249 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003250 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003251};
3252
3253/* l4_abe -> mcpdm */
3254static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3255 .master = &omap44xx_l4_abe_hwmod,
3256 .slave = &omap44xx_mcpdm_hwmod,
3257 .clk = "ocp_abe_iclk",
3258 .addr = omap44xx_mcpdm_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003259 .user = OCP_USER_MPU,
3260};
3261
3262static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3263 {
3264 .pa_start = 0x49032000,
3265 .pa_end = 0x4903207f,
3266 .flags = ADDR_TYPE_RT
3267 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003268 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003269};
3270
3271/* l4_abe -> mcpdm (dma) */
3272static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3273 .master = &omap44xx_l4_abe_hwmod,
3274 .slave = &omap44xx_mcpdm_hwmod,
3275 .clk = "ocp_abe_iclk",
3276 .addr = omap44xx_mcpdm_dma_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003277 .user = OCP_USER_SDMA,
3278};
3279
3280/* mcpdm slave ports */
3281static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3282 &omap44xx_l4_abe__mcpdm,
3283 &omap44xx_l4_abe__mcpdm_dma,
3284};
3285
3286static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3287 .name = "mcpdm",
3288 .class = &omap44xx_mcpdm_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003289 .clkdm_name = "abe_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003290 .mpu_irqs = omap44xx_mcpdm_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003291 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003292 .main_clk = "mcpdm_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003293 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003294 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003295 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003296 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003297 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003298 },
3299 },
3300 .slaves = omap44xx_mcpdm_slaves,
3301 .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003302};
3303
3304/*
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303305 * 'mcspi' class
3306 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3307 * bus
3308 */
3309
3310static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = {
3311 .rev_offs = 0x0000,
3312 .sysc_offs = 0x0010,
3313 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
3314 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
3315 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3316 SIDLE_SMART_WKUP),
3317 .sysc_fields = &omap_hwmod_sysc_type2,
3318};
3319
3320static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3321 .name = "mcspi",
3322 .sysc = &omap44xx_mcspi_sysc,
Benoit Cousson905a74d2011-02-18 14:01:06 +01003323 .rev = OMAP4_MCSPI_REV,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303324};
3325
3326/* mcspi1 */
3327static struct omap_hwmod omap44xx_mcspi1_hwmod;
3328static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3329 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003330 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303331};
3332
3333static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3334 { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START },
3335 { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START },
3336 { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START },
3337 { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START },
3338 { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START },
3339 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3340 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3341 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003342 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303343};
3344
3345static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3346 {
3347 .pa_start = 0x48098000,
3348 .pa_end = 0x480981ff,
3349 .flags = ADDR_TYPE_RT
3350 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003351 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303352};
3353
3354/* l4_per -> mcspi1 */
3355static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3356 .master = &omap44xx_l4_per_hwmod,
3357 .slave = &omap44xx_mcspi1_hwmod,
3358 .clk = "l4_div_ck",
3359 .addr = omap44xx_mcspi1_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303360 .user = OCP_USER_MPU | OCP_USER_SDMA,
3361};
3362
3363/* mcspi1 slave ports */
3364static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = {
3365 &omap44xx_l4_per__mcspi1,
3366};
3367
Benoit Cousson905a74d2011-02-18 14:01:06 +01003368/* mcspi1 dev_attr */
3369static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3370 .num_chipselect = 4,
3371};
3372
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303373static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3374 .name = "mcspi1",
3375 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003376 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303377 .mpu_irqs = omap44xx_mcspi1_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303378 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303379 .main_clk = "mcspi1_fck",
3380 .prcm = {
3381 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003382 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003383 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003384 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303385 },
3386 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003387 .dev_attr = &mcspi1_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303388 .slaves = omap44xx_mcspi1_slaves,
3389 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303390};
3391
3392/* mcspi2 */
3393static struct omap_hwmod omap44xx_mcspi2_hwmod;
3394static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3395 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003396 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303397};
3398
3399static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3400 { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START },
3401 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3402 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3403 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003404 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303405};
3406
3407static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3408 {
3409 .pa_start = 0x4809a000,
3410 .pa_end = 0x4809a1ff,
3411 .flags = ADDR_TYPE_RT
3412 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003413 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303414};
3415
3416/* l4_per -> mcspi2 */
3417static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3418 .master = &omap44xx_l4_per_hwmod,
3419 .slave = &omap44xx_mcspi2_hwmod,
3420 .clk = "l4_div_ck",
3421 .addr = omap44xx_mcspi2_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303422 .user = OCP_USER_MPU | OCP_USER_SDMA,
3423};
3424
3425/* mcspi2 slave ports */
3426static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = {
3427 &omap44xx_l4_per__mcspi2,
3428};
3429
Benoit Cousson905a74d2011-02-18 14:01:06 +01003430/* mcspi2 dev_attr */
3431static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3432 .num_chipselect = 2,
3433};
3434
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303435static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3436 .name = "mcspi2",
3437 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003438 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303439 .mpu_irqs = omap44xx_mcspi2_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303440 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303441 .main_clk = "mcspi2_fck",
3442 .prcm = {
3443 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003444 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003445 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003446 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303447 },
3448 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003449 .dev_attr = &mcspi2_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303450 .slaves = omap44xx_mcspi2_slaves,
3451 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303452};
3453
3454/* mcspi3 */
3455static struct omap_hwmod omap44xx_mcspi3_hwmod;
3456static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3457 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003458 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303459};
3460
3461static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3462 { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START },
3463 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3464 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3465 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003466 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303467};
3468
3469static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3470 {
3471 .pa_start = 0x480b8000,
3472 .pa_end = 0x480b81ff,
3473 .flags = ADDR_TYPE_RT
3474 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003475 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303476};
3477
3478/* l4_per -> mcspi3 */
3479static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3480 .master = &omap44xx_l4_per_hwmod,
3481 .slave = &omap44xx_mcspi3_hwmod,
3482 .clk = "l4_div_ck",
3483 .addr = omap44xx_mcspi3_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303484 .user = OCP_USER_MPU | OCP_USER_SDMA,
3485};
3486
3487/* mcspi3 slave ports */
3488static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = {
3489 &omap44xx_l4_per__mcspi3,
3490};
3491
Benoit Cousson905a74d2011-02-18 14:01:06 +01003492/* mcspi3 dev_attr */
3493static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3494 .num_chipselect = 2,
3495};
3496
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303497static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3498 .name = "mcspi3",
3499 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003500 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303501 .mpu_irqs = omap44xx_mcspi3_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303502 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303503 .main_clk = "mcspi3_fck",
3504 .prcm = {
3505 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003506 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003507 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003508 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303509 },
3510 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003511 .dev_attr = &mcspi3_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303512 .slaves = omap44xx_mcspi3_slaves,
3513 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303514};
3515
3516/* mcspi4 */
3517static struct omap_hwmod omap44xx_mcspi4_hwmod;
3518static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3519 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003520 { .irq = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303521};
3522
3523static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3524 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3525 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003526 { .dma_req = -1 }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303527};
3528
3529static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3530 {
3531 .pa_start = 0x480ba000,
3532 .pa_end = 0x480ba1ff,
3533 .flags = ADDR_TYPE_RT
3534 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003535 { }
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303536};
3537
3538/* l4_per -> mcspi4 */
3539static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3540 .master = &omap44xx_l4_per_hwmod,
3541 .slave = &omap44xx_mcspi4_hwmod,
3542 .clk = "l4_div_ck",
3543 .addr = omap44xx_mcspi4_addrs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303544 .user = OCP_USER_MPU | OCP_USER_SDMA,
3545};
3546
3547/* mcspi4 slave ports */
3548static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = {
3549 &omap44xx_l4_per__mcspi4,
3550};
3551
Benoit Cousson905a74d2011-02-18 14:01:06 +01003552/* mcspi4 dev_attr */
3553static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3554 .num_chipselect = 1,
3555};
3556
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303557static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3558 .name = "mcspi4",
3559 .class = &omap44xx_mcspi_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003560 .clkdm_name = "l4_per_clkdm",
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303561 .mpu_irqs = omap44xx_mcspi4_irqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303562 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303563 .main_clk = "mcspi4_fck",
3564 .prcm = {
3565 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003566 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003567 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003568 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303569 },
3570 },
Benoit Cousson905a74d2011-02-18 14:01:06 +01003571 .dev_attr = &mcspi4_dev_attr,
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303572 .slaves = omap44xx_mcspi4_slaves,
3573 .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves),
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05303574};
3575
3576/*
Benoit Cousson407a6882011-02-15 22:39:48 +01003577 * 'mmc' class
3578 * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller
3579 */
3580
3581static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3582 .rev_offs = 0x0000,
3583 .sysc_offs = 0x0010,
3584 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE |
3585 SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
3586 SYSC_HAS_SOFTRESET),
3587 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3588 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
Benoit Coussonc614ebf2011-07-01 22:54:01 +02003589 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
Benoit Cousson407a6882011-02-15 22:39:48 +01003590 .sysc_fields = &omap_hwmod_sysc_type2,
3591};
3592
3593static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3594 .name = "mmc",
3595 .sysc = &omap44xx_mmc_sysc,
3596};
3597
3598/* mmc1 */
3599static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3600 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003601 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003602};
3603
3604static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3605 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3606 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003607 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003608};
3609
3610/* mmc1 master ports */
3611static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = {
3612 &omap44xx_mmc1__l3_main_1,
3613};
3614
3615static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3616 {
3617 .pa_start = 0x4809c000,
3618 .pa_end = 0x4809c3ff,
3619 .flags = ADDR_TYPE_RT
3620 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003621 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003622};
3623
3624/* l4_per -> mmc1 */
3625static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3626 .master = &omap44xx_l4_per_hwmod,
3627 .slave = &omap44xx_mmc1_hwmod,
3628 .clk = "l4_div_ck",
3629 .addr = omap44xx_mmc1_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003630 .user = OCP_USER_MPU | OCP_USER_SDMA,
3631};
3632
3633/* mmc1 slave ports */
3634static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = {
3635 &omap44xx_l4_per__mmc1,
3636};
3637
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003638/* mmc1 dev_attr */
3639static struct omap_mmc_dev_attr mmc1_dev_attr = {
3640 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3641};
3642
Benoit Cousson407a6882011-02-15 22:39:48 +01003643static struct omap_hwmod omap44xx_mmc1_hwmod = {
3644 .name = "mmc1",
3645 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003646 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003647 .mpu_irqs = omap44xx_mmc1_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003648 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003649 .main_clk = "mmc1_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003650 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003651 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003652 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003653 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003654 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003655 },
3656 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003657 .dev_attr = &mmc1_dev_attr,
Benoit Cousson407a6882011-02-15 22:39:48 +01003658 .slaves = omap44xx_mmc1_slaves,
3659 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves),
3660 .masters = omap44xx_mmc1_masters,
3661 .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003662};
3663
3664/* mmc2 */
3665static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3666 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003667 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003668};
3669
3670static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3671 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3672 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003673 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003674};
3675
3676/* mmc2 master ports */
3677static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = {
3678 &omap44xx_mmc2__l3_main_1,
3679};
3680
3681static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3682 {
3683 .pa_start = 0x480b4000,
3684 .pa_end = 0x480b43ff,
3685 .flags = ADDR_TYPE_RT
3686 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003687 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003688};
3689
3690/* l4_per -> mmc2 */
3691static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3692 .master = &omap44xx_l4_per_hwmod,
3693 .slave = &omap44xx_mmc2_hwmod,
3694 .clk = "l4_div_ck",
3695 .addr = omap44xx_mmc2_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003696 .user = OCP_USER_MPU | OCP_USER_SDMA,
3697};
3698
3699/* mmc2 slave ports */
3700static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3701 &omap44xx_l4_per__mmc2,
3702};
3703
3704static struct omap_hwmod omap44xx_mmc2_hwmod = {
3705 .name = "mmc2",
3706 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003707 .clkdm_name = "l3_init_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003708 .mpu_irqs = omap44xx_mmc2_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003709 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003710 .main_clk = "mmc2_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003711 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003712 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003713 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003714 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003715 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003716 },
3717 },
3718 .slaves = omap44xx_mmc2_slaves,
3719 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves),
3720 .masters = omap44xx_mmc2_masters,
3721 .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters),
Benoit Cousson407a6882011-02-15 22:39:48 +01003722};
3723
3724/* mmc3 */
3725static struct omap_hwmod omap44xx_mmc3_hwmod;
3726static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3727 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003728 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003729};
3730
3731static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3732 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3733 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003734 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003735};
3736
3737static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3738 {
3739 .pa_start = 0x480ad000,
3740 .pa_end = 0x480ad3ff,
3741 .flags = ADDR_TYPE_RT
3742 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003743 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003744};
3745
3746/* l4_per -> mmc3 */
3747static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3748 .master = &omap44xx_l4_per_hwmod,
3749 .slave = &omap44xx_mmc3_hwmod,
3750 .clk = "l4_div_ck",
3751 .addr = omap44xx_mmc3_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003752 .user = OCP_USER_MPU | OCP_USER_SDMA,
3753};
3754
3755/* mmc3 slave ports */
3756static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3757 &omap44xx_l4_per__mmc3,
3758};
3759
3760static struct omap_hwmod omap44xx_mmc3_hwmod = {
3761 .name = "mmc3",
3762 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003763 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003764 .mpu_irqs = omap44xx_mmc3_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003765 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003766 .main_clk = "mmc3_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003767 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003768 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003769 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003770 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003771 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003772 },
3773 },
3774 .slaves = omap44xx_mmc3_slaves,
3775 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003776};
3777
3778/* mmc4 */
3779static struct omap_hwmod omap44xx_mmc4_hwmod;
3780static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3781 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003782 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003783};
3784
3785static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3786 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3787 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003788 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003789};
3790
3791static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3792 {
3793 .pa_start = 0x480d1000,
3794 .pa_end = 0x480d13ff,
3795 .flags = ADDR_TYPE_RT
3796 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003797 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003798};
3799
3800/* l4_per -> mmc4 */
3801static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3802 .master = &omap44xx_l4_per_hwmod,
3803 .slave = &omap44xx_mmc4_hwmod,
3804 .clk = "l4_div_ck",
3805 .addr = omap44xx_mmc4_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003806 .user = OCP_USER_MPU | OCP_USER_SDMA,
3807};
3808
3809/* mmc4 slave ports */
3810static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3811 &omap44xx_l4_per__mmc4,
3812};
3813
3814static struct omap_hwmod omap44xx_mmc4_hwmod = {
3815 .name = "mmc4",
3816 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003817 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003818 .mpu_irqs = omap44xx_mmc4_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003819
Benoit Cousson407a6882011-02-15 22:39:48 +01003820 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003821 .main_clk = "mmc4_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003822 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003823 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003824 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003825 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003826 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003827 },
3828 },
3829 .slaves = omap44xx_mmc4_slaves,
3830 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003831};
3832
3833/* mmc5 */
3834static struct omap_hwmod omap44xx_mmc5_hwmod;
3835static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3836 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003837 { .irq = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003838};
3839
3840static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3841 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3842 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06003843 { .dma_req = -1 }
Benoit Cousson407a6882011-02-15 22:39:48 +01003844};
3845
3846static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3847 {
3848 .pa_start = 0x480d5000,
3849 .pa_end = 0x480d53ff,
3850 .flags = ADDR_TYPE_RT
3851 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003852 { }
Benoit Cousson407a6882011-02-15 22:39:48 +01003853};
3854
3855/* l4_per -> mmc5 */
3856static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3857 .master = &omap44xx_l4_per_hwmod,
3858 .slave = &omap44xx_mmc5_hwmod,
3859 .clk = "l4_div_ck",
3860 .addr = omap44xx_mmc5_addrs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003861 .user = OCP_USER_MPU | OCP_USER_SDMA,
3862};
3863
3864/* mmc5 slave ports */
3865static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3866 &omap44xx_l4_per__mmc5,
3867};
3868
3869static struct omap_hwmod omap44xx_mmc5_hwmod = {
3870 .name = "mmc5",
3871 .class = &omap44xx_mmc_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003872 .clkdm_name = "l4_per_clkdm",
Benoit Cousson407a6882011-02-15 22:39:48 +01003873 .mpu_irqs = omap44xx_mmc5_irqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003874 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
Benoit Cousson407a6882011-02-15 22:39:48 +01003875 .main_clk = "mmc5_fck",
Benoit Cousson00fe6102011-07-09 19:14:28 -06003876 .prcm = {
Benoit Cousson407a6882011-02-15 22:39:48 +01003877 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003878 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003879 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003880 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson407a6882011-02-15 22:39:48 +01003881 },
3882 },
3883 .slaves = omap44xx_mmc5_slaves,
3884 .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves),
Benoit Cousson407a6882011-02-15 22:39:48 +01003885};
3886
3887/*
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003888 * 'mpu' class
3889 * mpu sub-system
3890 */
3891
3892static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003893 .name = "mpu",
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003894};
3895
3896/* mpu */
3897static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3898 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3899 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3900 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003901 { .irq = -1 }
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003902};
3903
3904/* mpu master ports */
3905static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3906 &omap44xx_mpu__l3_main_1,
3907 &omap44xx_mpu__l4_abe,
3908 &omap44xx_mpu__dmm,
3909};
3910
3911static struct omap_hwmod omap44xx_mpu_hwmod = {
3912 .name = "mpu",
3913 .class = &omap44xx_mpu_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003914 .clkdm_name = "mpuss_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06003915 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003916 .mpu_irqs = omap44xx_mpu_irqs,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003917 .main_clk = "dpll_mpu_m2_ck",
3918 .prcm = {
3919 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003920 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003921 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003922 },
3923 },
3924 .masters = omap44xx_mpu_masters,
3925 .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters),
Benoit Cousson55d2cb02010-05-12 17:54:36 +02003926};
3927
Benoit Cousson92b18d12010-09-23 20:02:41 +05303928/*
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003929 * 'smartreflex' class
3930 * smartreflex module (monitor silicon performance and outputs a measure of
3931 * performance error)
3932 */
3933
3934/* The IP is not compliant to type1 / type2 scheme */
3935static struct omap_hwmod_sysc_fields omap_hwmod_sysc_type_smartreflex = {
3936 .sidle_shift = 24,
3937 .enwkup_shift = 26,
3938};
3939
3940static struct omap_hwmod_class_sysconfig omap44xx_smartreflex_sysc = {
3941 .sysc_offs = 0x0038,
3942 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE),
3943 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3944 SIDLE_SMART_WKUP),
3945 .sysc_fields = &omap_hwmod_sysc_type_smartreflex,
3946};
3947
3948static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00003949 .name = "smartreflex",
3950 .sysc = &omap44xx_smartreflex_sysc,
3951 .rev = 2,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003952};
3953
3954/* smartreflex_core */
3955static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3956static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
3957 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06003958 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003959};
3960
3961static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
3962 {
3963 .pa_start = 0x4a0dd000,
3964 .pa_end = 0x4a0dd03f,
3965 .flags = ADDR_TYPE_RT
3966 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003967 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003968};
3969
3970/* l4_cfg -> smartreflex_core */
3971static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
3972 .master = &omap44xx_l4_cfg_hwmod,
3973 .slave = &omap44xx_smartreflex_core_hwmod,
3974 .clk = "l4_div_ck",
3975 .addr = omap44xx_smartreflex_core_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003976 .user = OCP_USER_MPU | OCP_USER_SDMA,
3977};
3978
3979/* smartreflex_core slave ports */
3980static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
3981 &omap44xx_l4_cfg__smartreflex_core,
3982};
3983
3984static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3985 .name = "smartreflex_core",
3986 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06003987 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003988 .mpu_irqs = omap44xx_smartreflex_core_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06003989
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003990 .main_clk = "smartreflex_core_fck",
3991 .vdd_name = "core",
3992 .prcm = {
3993 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06003994 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06003995 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06003996 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00003997 },
3998 },
3999 .slaves = omap44xx_smartreflex_core_slaves,
4000 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004001};
4002
4003/* smartreflex_iva */
4004static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
4005static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
4006 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004007 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004008};
4009
4010static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
4011 {
4012 .pa_start = 0x4a0db000,
4013 .pa_end = 0x4a0db03f,
4014 .flags = ADDR_TYPE_RT
4015 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004016 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004017};
4018
4019/* l4_cfg -> smartreflex_iva */
4020static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
4021 .master = &omap44xx_l4_cfg_hwmod,
4022 .slave = &omap44xx_smartreflex_iva_hwmod,
4023 .clk = "l4_div_ck",
4024 .addr = omap44xx_smartreflex_iva_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004025 .user = OCP_USER_MPU | OCP_USER_SDMA,
4026};
4027
4028/* smartreflex_iva slave ports */
4029static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
4030 &omap44xx_l4_cfg__smartreflex_iva,
4031};
4032
4033static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
4034 .name = "smartreflex_iva",
4035 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004036 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004037 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004038 .main_clk = "smartreflex_iva_fck",
4039 .vdd_name = "iva",
4040 .prcm = {
4041 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004042 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004043 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004044 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004045 },
4046 },
4047 .slaves = omap44xx_smartreflex_iva_slaves,
4048 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004049};
4050
4051/* smartreflex_mpu */
4052static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
4053static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
4054 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004055 { .irq = -1 }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004056};
4057
4058static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
4059 {
4060 .pa_start = 0x4a0d9000,
4061 .pa_end = 0x4a0d903f,
4062 .flags = ADDR_TYPE_RT
4063 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004064 { }
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004065};
4066
4067/* l4_cfg -> smartreflex_mpu */
4068static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
4069 .master = &omap44xx_l4_cfg_hwmod,
4070 .slave = &omap44xx_smartreflex_mpu_hwmod,
4071 .clk = "l4_div_ck",
4072 .addr = omap44xx_smartreflex_mpu_addrs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004073 .user = OCP_USER_MPU | OCP_USER_SDMA,
4074};
4075
4076/* smartreflex_mpu slave ports */
4077static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
4078 &omap44xx_l4_cfg__smartreflex_mpu,
4079};
4080
4081static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
4082 .name = "smartreflex_mpu",
4083 .class = &omap44xx_smartreflex_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004084 .clkdm_name = "l4_ao_clkdm",
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004085 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004086 .main_clk = "smartreflex_mpu_fck",
4087 .vdd_name = "mpu",
4088 .prcm = {
4089 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004090 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004091 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004092 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004093 },
4094 },
4095 .slaves = omap44xx_smartreflex_mpu_slaves,
4096 .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves),
Benoit Cousson1f6a7172010-12-23 22:30:30 +00004097};
4098
4099/*
Benoit Coussond11c2172011-02-02 12:04:36 +00004100 * 'spinlock' class
4101 * spinlock provides hardware assistance for synchronizing the processes
4102 * running on multiple processors
4103 */
4104
4105static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = {
4106 .rev_offs = 0x0000,
4107 .sysc_offs = 0x0010,
4108 .syss_offs = 0x0014,
4109 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4110 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
4111 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
4112 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4113 SIDLE_SMART_WKUP),
4114 .sysc_fields = &omap_hwmod_sysc_type1,
4115};
4116
4117static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = {
4118 .name = "spinlock",
4119 .sysc = &omap44xx_spinlock_sysc,
4120};
4121
4122/* spinlock */
4123static struct omap_hwmod omap44xx_spinlock_hwmod;
4124static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
4125 {
4126 .pa_start = 0x4a0f6000,
4127 .pa_end = 0x4a0f6fff,
4128 .flags = ADDR_TYPE_RT
4129 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004130 { }
Benoit Coussond11c2172011-02-02 12:04:36 +00004131};
4132
4133/* l4_cfg -> spinlock */
4134static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
4135 .master = &omap44xx_l4_cfg_hwmod,
4136 .slave = &omap44xx_spinlock_hwmod,
4137 .clk = "l4_div_ck",
4138 .addr = omap44xx_spinlock_addrs,
Benoit Coussond11c2172011-02-02 12:04:36 +00004139 .user = OCP_USER_MPU | OCP_USER_SDMA,
4140};
4141
4142/* spinlock slave ports */
4143static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
4144 &omap44xx_l4_cfg__spinlock,
4145};
4146
4147static struct omap_hwmod omap44xx_spinlock_hwmod = {
4148 .name = "spinlock",
4149 .class = &omap44xx_spinlock_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004150 .clkdm_name = "l4_cfg_clkdm",
Benoit Coussond11c2172011-02-02 12:04:36 +00004151 .prcm = {
4152 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004153 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004154 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
Benoit Coussond11c2172011-02-02 12:04:36 +00004155 },
4156 },
4157 .slaves = omap44xx_spinlock_slaves,
4158 .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves),
Benoit Coussond11c2172011-02-02 12:04:36 +00004159};
4160
4161/*
Benoit Cousson35d1a662011-02-11 11:17:14 +00004162 * 'timer' class
4163 * general purpose timer module with accurate 1ms tick
4164 * This class contains several variants: ['timer_1ms', 'timer']
4165 */
4166
4167static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
4168 .rev_offs = 0x0000,
4169 .sysc_offs = 0x0010,
4170 .syss_offs = 0x0014,
4171 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
4172 SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP |
4173 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4174 SYSS_HAS_RESET_STATUS),
4175 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
4176 .sysc_fields = &omap_hwmod_sysc_type1,
4177};
4178
4179static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = {
4180 .name = "timer",
4181 .sysc = &omap44xx_timer_1ms_sysc,
4182};
4183
4184static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = {
4185 .rev_offs = 0x0000,
4186 .sysc_offs = 0x0010,
4187 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
4188 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
4189 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4190 SIDLE_SMART_WKUP),
4191 .sysc_fields = &omap_hwmod_sysc_type2,
4192};
4193
4194static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4195 .name = "timer",
4196 .sysc = &omap44xx_timer_sysc,
4197};
4198
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304199/* always-on timers dev attribute */
4200static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
4201 .timer_capability = OMAP_TIMER_ALWON,
4202};
4203
4204/* pwm timers dev attribute */
4205static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
4206 .timer_capability = OMAP_TIMER_HAS_PWM,
4207};
4208
Benoit Cousson35d1a662011-02-11 11:17:14 +00004209/* timer1 */
4210static struct omap_hwmod omap44xx_timer1_hwmod;
4211static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4212 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004213 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004214};
4215
4216static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4217 {
4218 .pa_start = 0x4a318000,
4219 .pa_end = 0x4a31807f,
4220 .flags = ADDR_TYPE_RT
4221 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004222 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004223};
4224
4225/* l4_wkup -> timer1 */
4226static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4227 .master = &omap44xx_l4_wkup_hwmod,
4228 .slave = &omap44xx_timer1_hwmod,
4229 .clk = "l4_wkup_clk_mux_ck",
4230 .addr = omap44xx_timer1_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004231 .user = OCP_USER_MPU | OCP_USER_SDMA,
4232};
4233
4234/* timer1 slave ports */
4235static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4236 &omap44xx_l4_wkup__timer1,
4237};
4238
4239static struct omap_hwmod omap44xx_timer1_hwmod = {
4240 .name = "timer1",
4241 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004242 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004243 .mpu_irqs = omap44xx_timer1_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004244 .main_clk = "timer1_fck",
4245 .prcm = {
4246 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004247 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004248 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004249 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004250 },
4251 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304252 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004253 .slaves = omap44xx_timer1_slaves,
4254 .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004255};
4256
4257/* timer2 */
4258static struct omap_hwmod omap44xx_timer2_hwmod;
4259static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4260 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004261 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004262};
4263
4264static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4265 {
4266 .pa_start = 0x48032000,
4267 .pa_end = 0x4803207f,
4268 .flags = ADDR_TYPE_RT
4269 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004270 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004271};
4272
4273/* l4_per -> timer2 */
4274static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4275 .master = &omap44xx_l4_per_hwmod,
4276 .slave = &omap44xx_timer2_hwmod,
4277 .clk = "l4_div_ck",
4278 .addr = omap44xx_timer2_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004279 .user = OCP_USER_MPU | OCP_USER_SDMA,
4280};
4281
4282/* timer2 slave ports */
4283static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4284 &omap44xx_l4_per__timer2,
4285};
4286
4287static struct omap_hwmod omap44xx_timer2_hwmod = {
4288 .name = "timer2",
4289 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004290 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004291 .mpu_irqs = omap44xx_timer2_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004292 .main_clk = "timer2_fck",
4293 .prcm = {
4294 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004295 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004296 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004297 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004298 },
4299 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304300 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004301 .slaves = omap44xx_timer2_slaves,
4302 .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004303};
4304
4305/* timer3 */
4306static struct omap_hwmod omap44xx_timer3_hwmod;
4307static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4308 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004309 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004310};
4311
4312static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4313 {
4314 .pa_start = 0x48034000,
4315 .pa_end = 0x4803407f,
4316 .flags = ADDR_TYPE_RT
4317 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004318 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004319};
4320
4321/* l4_per -> timer3 */
4322static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4323 .master = &omap44xx_l4_per_hwmod,
4324 .slave = &omap44xx_timer3_hwmod,
4325 .clk = "l4_div_ck",
4326 .addr = omap44xx_timer3_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004327 .user = OCP_USER_MPU | OCP_USER_SDMA,
4328};
4329
4330/* timer3 slave ports */
4331static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4332 &omap44xx_l4_per__timer3,
4333};
4334
4335static struct omap_hwmod omap44xx_timer3_hwmod = {
4336 .name = "timer3",
4337 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004338 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004339 .mpu_irqs = omap44xx_timer3_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004340 .main_clk = "timer3_fck",
4341 .prcm = {
4342 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004343 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004344 .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004345 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004346 },
4347 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304348 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004349 .slaves = omap44xx_timer3_slaves,
4350 .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004351};
4352
4353/* timer4 */
4354static struct omap_hwmod omap44xx_timer4_hwmod;
4355static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4356 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004357 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004358};
4359
4360static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4361 {
4362 .pa_start = 0x48036000,
4363 .pa_end = 0x4803607f,
4364 .flags = ADDR_TYPE_RT
4365 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004366 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004367};
4368
4369/* l4_per -> timer4 */
4370static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4371 .master = &omap44xx_l4_per_hwmod,
4372 .slave = &omap44xx_timer4_hwmod,
4373 .clk = "l4_div_ck",
4374 .addr = omap44xx_timer4_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004375 .user = OCP_USER_MPU | OCP_USER_SDMA,
4376};
4377
4378/* timer4 slave ports */
4379static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4380 &omap44xx_l4_per__timer4,
4381};
4382
4383static struct omap_hwmod omap44xx_timer4_hwmod = {
4384 .name = "timer4",
4385 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004386 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004387 .mpu_irqs = omap44xx_timer4_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004388 .main_clk = "timer4_fck",
4389 .prcm = {
4390 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004391 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004392 .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004393 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004394 },
4395 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304396 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004397 .slaves = omap44xx_timer4_slaves,
4398 .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004399};
4400
4401/* timer5 */
4402static struct omap_hwmod omap44xx_timer5_hwmod;
4403static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4404 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004405 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004406};
4407
4408static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4409 {
4410 .pa_start = 0x40138000,
4411 .pa_end = 0x4013807f,
4412 .flags = ADDR_TYPE_RT
4413 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004414 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004415};
4416
4417/* l4_abe -> timer5 */
4418static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4419 .master = &omap44xx_l4_abe_hwmod,
4420 .slave = &omap44xx_timer5_hwmod,
4421 .clk = "ocp_abe_iclk",
4422 .addr = omap44xx_timer5_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004423 .user = OCP_USER_MPU,
4424};
4425
4426static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4427 {
4428 .pa_start = 0x49038000,
4429 .pa_end = 0x4903807f,
4430 .flags = ADDR_TYPE_RT
4431 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004432 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004433};
4434
4435/* l4_abe -> timer5 (dma) */
4436static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4437 .master = &omap44xx_l4_abe_hwmod,
4438 .slave = &omap44xx_timer5_hwmod,
4439 .clk = "ocp_abe_iclk",
4440 .addr = omap44xx_timer5_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004441 .user = OCP_USER_SDMA,
4442};
4443
4444/* timer5 slave ports */
4445static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4446 &omap44xx_l4_abe__timer5,
4447 &omap44xx_l4_abe__timer5_dma,
4448};
4449
4450static struct omap_hwmod omap44xx_timer5_hwmod = {
4451 .name = "timer5",
4452 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004453 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004454 .mpu_irqs = omap44xx_timer5_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004455 .main_clk = "timer5_fck",
4456 .prcm = {
4457 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004458 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004459 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004460 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004461 },
4462 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304463 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004464 .slaves = omap44xx_timer5_slaves,
4465 .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004466};
4467
4468/* timer6 */
4469static struct omap_hwmod omap44xx_timer6_hwmod;
4470static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4471 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004472 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004473};
4474
4475static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4476 {
4477 .pa_start = 0x4013a000,
4478 .pa_end = 0x4013a07f,
4479 .flags = ADDR_TYPE_RT
4480 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004481 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004482};
4483
4484/* l4_abe -> timer6 */
4485static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4486 .master = &omap44xx_l4_abe_hwmod,
4487 .slave = &omap44xx_timer6_hwmod,
4488 .clk = "ocp_abe_iclk",
4489 .addr = omap44xx_timer6_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004490 .user = OCP_USER_MPU,
4491};
4492
4493static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4494 {
4495 .pa_start = 0x4903a000,
4496 .pa_end = 0x4903a07f,
4497 .flags = ADDR_TYPE_RT
4498 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004499 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004500};
4501
4502/* l4_abe -> timer6 (dma) */
4503static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4504 .master = &omap44xx_l4_abe_hwmod,
4505 .slave = &omap44xx_timer6_hwmod,
4506 .clk = "ocp_abe_iclk",
4507 .addr = omap44xx_timer6_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004508 .user = OCP_USER_SDMA,
4509};
4510
4511/* timer6 slave ports */
4512static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4513 &omap44xx_l4_abe__timer6,
4514 &omap44xx_l4_abe__timer6_dma,
4515};
4516
4517static struct omap_hwmod omap44xx_timer6_hwmod = {
4518 .name = "timer6",
4519 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004520 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004521 .mpu_irqs = omap44xx_timer6_irqs,
Paul Walmsley212738a2011-07-09 19:14:06 -06004522
Benoit Cousson35d1a662011-02-11 11:17:14 +00004523 .main_clk = "timer6_fck",
4524 .prcm = {
4525 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004526 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004527 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004528 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004529 },
4530 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304531 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004532 .slaves = omap44xx_timer6_slaves,
4533 .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004534};
4535
4536/* timer7 */
4537static struct omap_hwmod omap44xx_timer7_hwmod;
4538static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4539 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004540 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004541};
4542
4543static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4544 {
4545 .pa_start = 0x4013c000,
4546 .pa_end = 0x4013c07f,
4547 .flags = ADDR_TYPE_RT
4548 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004549 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004550};
4551
4552/* l4_abe -> timer7 */
4553static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4554 .master = &omap44xx_l4_abe_hwmod,
4555 .slave = &omap44xx_timer7_hwmod,
4556 .clk = "ocp_abe_iclk",
4557 .addr = omap44xx_timer7_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004558 .user = OCP_USER_MPU,
4559};
4560
4561static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4562 {
4563 .pa_start = 0x4903c000,
4564 .pa_end = 0x4903c07f,
4565 .flags = ADDR_TYPE_RT
4566 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004567 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004568};
4569
4570/* l4_abe -> timer7 (dma) */
4571static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4572 .master = &omap44xx_l4_abe_hwmod,
4573 .slave = &omap44xx_timer7_hwmod,
4574 .clk = "ocp_abe_iclk",
4575 .addr = omap44xx_timer7_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004576 .user = OCP_USER_SDMA,
4577};
4578
4579/* timer7 slave ports */
4580static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4581 &omap44xx_l4_abe__timer7,
4582 &omap44xx_l4_abe__timer7_dma,
4583};
4584
4585static struct omap_hwmod omap44xx_timer7_hwmod = {
4586 .name = "timer7",
4587 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004588 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004589 .mpu_irqs = omap44xx_timer7_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004590 .main_clk = "timer7_fck",
4591 .prcm = {
4592 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004593 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004594 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004595 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004596 },
4597 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304598 .dev_attr = &capability_alwon_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004599 .slaves = omap44xx_timer7_slaves,
4600 .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004601};
4602
4603/* timer8 */
4604static struct omap_hwmod omap44xx_timer8_hwmod;
4605static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4606 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004607 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004608};
4609
4610static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4611 {
4612 .pa_start = 0x4013e000,
4613 .pa_end = 0x4013e07f,
4614 .flags = ADDR_TYPE_RT
4615 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004616 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004617};
4618
4619/* l4_abe -> timer8 */
4620static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4621 .master = &omap44xx_l4_abe_hwmod,
4622 .slave = &omap44xx_timer8_hwmod,
4623 .clk = "ocp_abe_iclk",
4624 .addr = omap44xx_timer8_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004625 .user = OCP_USER_MPU,
4626};
4627
4628static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4629 {
4630 .pa_start = 0x4903e000,
4631 .pa_end = 0x4903e07f,
4632 .flags = ADDR_TYPE_RT
4633 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004634 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004635};
4636
4637/* l4_abe -> timer8 (dma) */
4638static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4639 .master = &omap44xx_l4_abe_hwmod,
4640 .slave = &omap44xx_timer8_hwmod,
4641 .clk = "ocp_abe_iclk",
4642 .addr = omap44xx_timer8_dma_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004643 .user = OCP_USER_SDMA,
4644};
4645
4646/* timer8 slave ports */
4647static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4648 &omap44xx_l4_abe__timer8,
4649 &omap44xx_l4_abe__timer8_dma,
4650};
4651
4652static struct omap_hwmod omap44xx_timer8_hwmod = {
4653 .name = "timer8",
4654 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004655 .clkdm_name = "abe_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004656 .mpu_irqs = omap44xx_timer8_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004657 .main_clk = "timer8_fck",
4658 .prcm = {
4659 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004660 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004661 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004662 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004663 },
4664 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304665 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004666 .slaves = omap44xx_timer8_slaves,
4667 .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004668};
4669
4670/* timer9 */
4671static struct omap_hwmod omap44xx_timer9_hwmod;
4672static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4673 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004674 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004675};
4676
4677static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4678 {
4679 .pa_start = 0x4803e000,
4680 .pa_end = 0x4803e07f,
4681 .flags = ADDR_TYPE_RT
4682 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004683 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004684};
4685
4686/* l4_per -> timer9 */
4687static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4688 .master = &omap44xx_l4_per_hwmod,
4689 .slave = &omap44xx_timer9_hwmod,
4690 .clk = "l4_div_ck",
4691 .addr = omap44xx_timer9_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004692 .user = OCP_USER_MPU | OCP_USER_SDMA,
4693};
4694
4695/* timer9 slave ports */
4696static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4697 &omap44xx_l4_per__timer9,
4698};
4699
4700static struct omap_hwmod omap44xx_timer9_hwmod = {
4701 .name = "timer9",
4702 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004703 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004704 .mpu_irqs = omap44xx_timer9_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004705 .main_clk = "timer9_fck",
4706 .prcm = {
4707 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004708 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004709 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004710 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004711 },
4712 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304713 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004714 .slaves = omap44xx_timer9_slaves,
4715 .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004716};
4717
4718/* timer10 */
4719static struct omap_hwmod omap44xx_timer10_hwmod;
4720static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4721 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004722 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004723};
4724
4725static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4726 {
4727 .pa_start = 0x48086000,
4728 .pa_end = 0x4808607f,
4729 .flags = ADDR_TYPE_RT
4730 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004731 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004732};
4733
4734/* l4_per -> timer10 */
4735static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4736 .master = &omap44xx_l4_per_hwmod,
4737 .slave = &omap44xx_timer10_hwmod,
4738 .clk = "l4_div_ck",
4739 .addr = omap44xx_timer10_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004740 .user = OCP_USER_MPU | OCP_USER_SDMA,
4741};
4742
4743/* timer10 slave ports */
4744static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4745 &omap44xx_l4_per__timer10,
4746};
4747
4748static struct omap_hwmod omap44xx_timer10_hwmod = {
4749 .name = "timer10",
4750 .class = &omap44xx_timer_1ms_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004751 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004752 .mpu_irqs = omap44xx_timer10_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004753 .main_clk = "timer10_fck",
4754 .prcm = {
4755 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004756 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004757 .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004758 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004759 },
4760 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304761 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004762 .slaves = omap44xx_timer10_slaves,
4763 .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004764};
4765
4766/* timer11 */
4767static struct omap_hwmod omap44xx_timer11_hwmod;
4768static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4769 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004770 { .irq = -1 }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004771};
4772
4773static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4774 {
4775 .pa_start = 0x48088000,
4776 .pa_end = 0x4808807f,
4777 .flags = ADDR_TYPE_RT
4778 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004779 { }
Benoit Cousson35d1a662011-02-11 11:17:14 +00004780};
4781
4782/* l4_per -> timer11 */
4783static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4784 .master = &omap44xx_l4_per_hwmod,
4785 .slave = &omap44xx_timer11_hwmod,
4786 .clk = "l4_div_ck",
4787 .addr = omap44xx_timer11_addrs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004788 .user = OCP_USER_MPU | OCP_USER_SDMA,
4789};
4790
4791/* timer11 slave ports */
4792static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4793 &omap44xx_l4_per__timer11,
4794};
4795
4796static struct omap_hwmod omap44xx_timer11_hwmod = {
4797 .name = "timer11",
4798 .class = &omap44xx_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004799 .clkdm_name = "l4_per_clkdm",
Benoit Cousson35d1a662011-02-11 11:17:14 +00004800 .mpu_irqs = omap44xx_timer11_irqs,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004801 .main_clk = "timer11_fck",
4802 .prcm = {
4803 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004804 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004805 .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004806 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004807 },
4808 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05304809 .dev_attr = &capability_pwm_dev_attr,
Benoit Cousson35d1a662011-02-11 11:17:14 +00004810 .slaves = omap44xx_timer11_slaves,
4811 .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves),
Benoit Cousson35d1a662011-02-11 11:17:14 +00004812};
4813
4814/*
Benoit Coussondb12ba52010-09-27 20:19:19 +05304815 * 'uart' class
4816 * universal asynchronous receiver/transmitter (uart)
4817 */
4818
4819static struct omap_hwmod_class_sysconfig omap44xx_uart_sysc = {
4820 .rev_offs = 0x0050,
4821 .sysc_offs = 0x0054,
4822 .syss_offs = 0x0058,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07004823 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07004824 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4825 SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07004826 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4827 SIDLE_SMART_WKUP),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304828 .sysc_fields = &omap_hwmod_sysc_type1,
4829};
4830
4831static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
Benoit Coussonfe134712010-12-23 22:30:32 +00004832 .name = "uart",
4833 .sysc = &omap44xx_uart_sysc,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304834};
4835
4836/* uart1 */
4837static struct omap_hwmod omap44xx_uart1_hwmod;
4838static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4839 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004840 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304841};
4842
4843static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4844 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4845 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004846 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304847};
4848
4849static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4850 {
4851 .pa_start = 0x4806a000,
4852 .pa_end = 0x4806a0ff,
4853 .flags = ADDR_TYPE_RT
4854 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004855 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304856};
4857
4858/* l4_per -> uart1 */
4859static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4860 .master = &omap44xx_l4_per_hwmod,
4861 .slave = &omap44xx_uart1_hwmod,
4862 .clk = "l4_div_ck",
4863 .addr = omap44xx_uart1_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304864 .user = OCP_USER_MPU | OCP_USER_SDMA,
4865};
4866
4867/* uart1 slave ports */
4868static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4869 &omap44xx_l4_per__uart1,
4870};
4871
4872static struct omap_hwmod omap44xx_uart1_hwmod = {
4873 .name = "uart1",
4874 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004875 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304876 .mpu_irqs = omap44xx_uart1_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304877 .sdma_reqs = omap44xx_uart1_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304878 .main_clk = "uart1_fck",
4879 .prcm = {
4880 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004881 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004882 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004883 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304884 },
4885 },
4886 .slaves = omap44xx_uart1_slaves,
4887 .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304888};
4889
4890/* uart2 */
4891static struct omap_hwmod omap44xx_uart2_hwmod;
4892static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4893 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004894 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304895};
4896
4897static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4898 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4899 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004900 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304901};
4902
4903static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4904 {
4905 .pa_start = 0x4806c000,
4906 .pa_end = 0x4806c0ff,
4907 .flags = ADDR_TYPE_RT
4908 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004909 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304910};
4911
4912/* l4_per -> uart2 */
4913static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4914 .master = &omap44xx_l4_per_hwmod,
4915 .slave = &omap44xx_uart2_hwmod,
4916 .clk = "l4_div_ck",
4917 .addr = omap44xx_uart2_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304918 .user = OCP_USER_MPU | OCP_USER_SDMA,
4919};
4920
4921/* uart2 slave ports */
4922static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4923 &omap44xx_l4_per__uart2,
4924};
4925
4926static struct omap_hwmod omap44xx_uart2_hwmod = {
4927 .name = "uart2",
4928 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004929 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05304930 .mpu_irqs = omap44xx_uart2_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304931 .sdma_reqs = omap44xx_uart2_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304932 .main_clk = "uart2_fck",
4933 .prcm = {
4934 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004935 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004936 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004937 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304938 },
4939 },
4940 .slaves = omap44xx_uart2_slaves,
4941 .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304942};
4943
4944/* uart3 */
4945static struct omap_hwmod omap44xx_uart3_hwmod;
4946static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4947 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06004948 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304949};
4950
4951static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
4952 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
4953 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06004954 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304955};
4956
4957static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4958 {
4959 .pa_start = 0x48020000,
4960 .pa_end = 0x480200ff,
4961 .flags = ADDR_TYPE_RT
4962 },
Paul Walmsley78183f32011-07-09 19:14:05 -06004963 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05304964};
4965
4966/* l4_per -> uart3 */
4967static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4968 .master = &omap44xx_l4_per_hwmod,
4969 .slave = &omap44xx_uart3_hwmod,
4970 .clk = "l4_div_ck",
4971 .addr = omap44xx_uart3_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304972 .user = OCP_USER_MPU | OCP_USER_SDMA,
4973};
4974
4975/* uart3 slave ports */
4976static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
4977 &omap44xx_l4_per__uart3,
4978};
4979
4980static struct omap_hwmod omap44xx_uart3_hwmod = {
4981 .name = "uart3",
4982 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06004983 .clkdm_name = "l4_per_clkdm",
Benoit Cousson7ecc53732011-07-09 19:14:28 -06004984 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304985 .mpu_irqs = omap44xx_uart3_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304986 .sdma_reqs = omap44xx_uart3_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304987 .main_clk = "uart3_fck",
4988 .prcm = {
4989 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06004990 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06004991 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06004992 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05304993 },
4994 },
4995 .slaves = omap44xx_uart3_slaves,
4996 .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05304997};
4998
4999/* uart4 */
5000static struct omap_hwmod omap44xx_uart4_hwmod;
5001static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
5002 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005003 { .irq = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305004};
5005
5006static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
5007 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
5008 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
Paul Walmsleybc614952011-07-09 19:14:07 -06005009 { .dma_req = -1 }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305010};
5011
5012static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
5013 {
5014 .pa_start = 0x4806e000,
5015 .pa_end = 0x4806e0ff,
5016 .flags = ADDR_TYPE_RT
5017 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005018 { }
Benoit Coussondb12ba52010-09-27 20:19:19 +05305019};
5020
5021/* l4_per -> uart4 */
5022static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
5023 .master = &omap44xx_l4_per_hwmod,
5024 .slave = &omap44xx_uart4_hwmod,
5025 .clk = "l4_div_ck",
5026 .addr = omap44xx_uart4_addrs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305027 .user = OCP_USER_MPU | OCP_USER_SDMA,
5028};
5029
5030/* uart4 slave ports */
5031static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
5032 &omap44xx_l4_per__uart4,
5033};
5034
5035static struct omap_hwmod omap44xx_uart4_hwmod = {
5036 .name = "uart4",
5037 .class = &omap44xx_uart_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005038 .clkdm_name = "l4_per_clkdm",
Benoit Coussondb12ba52010-09-27 20:19:19 +05305039 .mpu_irqs = omap44xx_uart4_irqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305040 .sdma_reqs = omap44xx_uart4_sdma_reqs,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305041 .main_clk = "uart4_fck",
5042 .prcm = {
5043 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005044 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005045 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005046 .modulemode = MODULEMODE_SWCTRL,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305047 },
5048 },
5049 .slaves = omap44xx_uart4_slaves,
5050 .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves),
Benoit Coussondb12ba52010-09-27 20:19:19 +05305051};
5052
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005053/*
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005054 * 'usb_otg_hs' class
5055 * high-speed on-the-go universal serial bus (usb_otg_hs) controller
5056 */
5057
5058static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
5059 .rev_offs = 0x0400,
5060 .sysc_offs = 0x0404,
5061 .syss_offs = 0x0408,
5062 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
5063 SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE |
5064 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
5065 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5066 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
5067 MSTANDBY_SMART),
5068 .sysc_fields = &omap_hwmod_sysc_type1,
5069};
5070
5071static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
Benoit Cousson00fe6102011-07-09 19:14:28 -06005072 .name = "usb_otg_hs",
5073 .sysc = &omap44xx_usb_otg_hs_sysc,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005074};
5075
5076/* usb_otg_hs */
5077static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
5078 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
5079 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005080 { .irq = -1 }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005081};
5082
5083/* usb_otg_hs master ports */
5084static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = {
5085 &omap44xx_usb_otg_hs__l3_main_2,
5086};
5087
5088static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
5089 {
5090 .pa_start = 0x4a0ab000,
5091 .pa_end = 0x4a0ab003,
5092 .flags = ADDR_TYPE_RT
5093 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005094 { }
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005095};
5096
5097/* l4_cfg -> usb_otg_hs */
5098static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
5099 .master = &omap44xx_l4_cfg_hwmod,
5100 .slave = &omap44xx_usb_otg_hs_hwmod,
5101 .clk = "l4_div_ck",
5102 .addr = omap44xx_usb_otg_hs_addrs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005103 .user = OCP_USER_MPU | OCP_USER_SDMA,
5104};
5105
5106/* usb_otg_hs slave ports */
5107static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = {
5108 &omap44xx_l4_cfg__usb_otg_hs,
5109};
5110
5111static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
5112 { .role = "xclk", .clk = "usb_otg_hs_xclk" },
5113};
5114
5115static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
5116 .name = "usb_otg_hs",
5117 .class = &omap44xx_usb_otg_hs_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005118 .clkdm_name = "l3_init_clkdm",
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005119 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
5120 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005121 .main_clk = "usb_otg_hs_ick",
5122 .prcm = {
5123 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005124 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005125 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005126 .modulemode = MODULEMODE_HWCTRL,
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005127 },
5128 },
5129 .opt_clks = usb_otg_hs_opt_clks,
Benoit Cousson00fe6102011-07-09 19:14:28 -06005130 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005131 .slaves = omap44xx_usb_otg_hs_slaves,
5132 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
5133 .masters = omap44xx_usb_otg_hs_masters,
5134 .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters),
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005135};
5136
5137/*
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005138 * 'wd_timer' class
5139 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
5140 * overflow condition
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005141 */
5142
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005143static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005144 .rev_offs = 0x0000,
5145 .sysc_offs = 0x0010,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005146 .syss_offs = 0x0014,
5147 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE |
Benoit Cousson0cfe8752010-12-21 21:08:33 -07005148 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Benoit Cousson7cffa6b2010-12-21 21:31:28 -07005149 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5150 SIDLE_SMART_WKUP),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005151 .sysc_fields = &omap_hwmod_sysc_type1,
5152};
5153
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005154static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
5155 .name = "wd_timer",
5156 .sysc = &omap44xx_wd_timer_sysc,
Benoit Coussonfe134712010-12-23 22:30:32 +00005157 .pre_shutdown = &omap2_wd_timer_disable,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005158};
5159
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005160/* wd_timer2 */
5161static struct omap_hwmod omap44xx_wd_timer2_hwmod;
5162static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
5163 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005164 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005165};
5166
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005167static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005168 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005169 .pa_start = 0x4a314000,
5170 .pa_end = 0x4a31407f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005171 .flags = ADDR_TYPE_RT
5172 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005173 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005174};
5175
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005176/* l4_wkup -> wd_timer2 */
5177static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005178 .master = &omap44xx_l4_wkup_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005179 .slave = &omap44xx_wd_timer2_hwmod,
5180 .clk = "l4_wkup_clk_mux_ck",
5181 .addr = omap44xx_wd_timer2_addrs,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005182 .user = OCP_USER_MPU | OCP_USER_SDMA,
5183};
5184
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005185/* wd_timer2 slave ports */
5186static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
5187 &omap44xx_l4_wkup__wd_timer2,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005188};
5189
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005190static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
5191 .name = "wd_timer2",
5192 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005193 .clkdm_name = "l4_wkup_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005194 .mpu_irqs = omap44xx_wd_timer2_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005195 .main_clk = "wd_timer2_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005196 .prcm = {
5197 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005198 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005199 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005200 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005201 },
5202 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005203 .slaves = omap44xx_wd_timer2_slaves,
5204 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005205};
5206
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005207/* wd_timer3 */
5208static struct omap_hwmod omap44xx_wd_timer3_hwmod;
5209static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
5210 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
Paul Walmsley212738a2011-07-09 19:14:06 -06005211 { .irq = -1 }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005212};
5213
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005214static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005215 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005216 .pa_start = 0x40130000,
5217 .pa_end = 0x4013007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005218 .flags = ADDR_TYPE_RT
5219 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005220 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005221};
5222
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005223/* l4_abe -> wd_timer3 */
5224static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
5225 .master = &omap44xx_l4_abe_hwmod,
5226 .slave = &omap44xx_wd_timer3_hwmod,
5227 .clk = "ocp_abe_iclk",
5228 .addr = omap44xx_wd_timer3_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005229 .user = OCP_USER_MPU,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005230};
5231
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005232static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005233 {
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005234 .pa_start = 0x49030000,
5235 .pa_end = 0x4903007f,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005236 .flags = ADDR_TYPE_RT
5237 },
Paul Walmsley78183f32011-07-09 19:14:05 -06005238 { }
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005239};
5240
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005241/* l4_abe -> wd_timer3 (dma) */
5242static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5243 .master = &omap44xx_l4_abe_hwmod,
5244 .slave = &omap44xx_wd_timer3_hwmod,
5245 .clk = "ocp_abe_iclk",
5246 .addr = omap44xx_wd_timer3_dma_addrs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005247 .user = OCP_USER_SDMA,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005248};
5249
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005250/* wd_timer3 slave ports */
5251static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5252 &omap44xx_l4_abe__wd_timer3,
5253 &omap44xx_l4_abe__wd_timer3_dma,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005254};
5255
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005256static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5257 .name = "wd_timer3",
5258 .class = &omap44xx_wd_timer_hwmod_class,
Benoit Coussona5322c62011-07-10 05:56:29 -06005259 .clkdm_name = "abe_clkdm",
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005260 .mpu_irqs = omap44xx_wd_timer3_irqs,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005261 .main_clk = "wd_timer3_fck",
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005262 .prcm = {
5263 .omap4 = {
Benoit Coussond0f06312011-07-10 05:56:30 -06005264 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
Benoit Cousson27bb00b2011-07-10 05:56:32 -06005265 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
Benoit Cousson03fdefe52011-07-10 05:56:32 -06005266 .modulemode = MODULEMODE_SWCTRL,
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005267 },
5268 },
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005269 .slaves = omap44xx_wd_timer3_slaves,
5270 .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves),
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005271};
5272
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005273static __initdata struct omap_hwmod *omap44xx_hwmods[] = {
Benoit Coussonfe134712010-12-23 22:30:32 +00005274
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005275 /* dmm class */
5276 &omap44xx_dmm_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005277
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005278 /* emif_fw class */
5279 &omap44xx_emif_fw_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005280
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005281 /* l3 class */
5282 &omap44xx_l3_instr_hwmod,
5283 &omap44xx_l3_main_1_hwmod,
5284 &omap44xx_l3_main_2_hwmod,
5285 &omap44xx_l3_main_3_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005286
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005287 /* l4 class */
5288 &omap44xx_l4_abe_hwmod,
5289 &omap44xx_l4_cfg_hwmod,
5290 &omap44xx_l4_per_hwmod,
5291 &omap44xx_l4_wkup_hwmod,
Benoit Cousson531ce0d2010-12-20 18:27:19 -08005292
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005293 /* mpu_bus class */
5294 &omap44xx_mpu_private_hwmod,
5295
Benoit Cousson407a6882011-02-15 22:39:48 +01005296 /* aess class */
5297/* &omap44xx_aess_hwmod, */
5298
5299 /* bandgap class */
5300 &omap44xx_bandgap_hwmod,
5301
5302 /* counter class */
5303/* &omap44xx_counter_32k_hwmod, */
5304
Benoit Coussond7cf5f32010-12-23 22:30:31 +00005305 /* dma class */
5306 &omap44xx_dma_system_hwmod,
5307
Benoit Cousson8ca476d2011-01-25 22:01:00 +00005308 /* dmic class */
5309 &omap44xx_dmic_hwmod,
5310
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005311 /* dsp class */
5312 &omap44xx_dsp_hwmod,
5313 &omap44xx_dsp_c0_hwmod,
5314
Benoit Coussond63bd742011-01-27 11:17:03 +00005315 /* dss class */
5316 &omap44xx_dss_hwmod,
5317 &omap44xx_dss_dispc_hwmod,
5318 &omap44xx_dss_dsi1_hwmod,
5319 &omap44xx_dss_dsi2_hwmod,
5320 &omap44xx_dss_hdmi_hwmod,
5321 &omap44xx_dss_rfbi_hwmod,
5322 &omap44xx_dss_venc_hwmod,
5323
Benoit Cousson9780a9c2010-12-07 16:26:57 -08005324 /* gpio class */
5325 &omap44xx_gpio1_hwmod,
5326 &omap44xx_gpio2_hwmod,
5327 &omap44xx_gpio3_hwmod,
5328 &omap44xx_gpio4_hwmod,
5329 &omap44xx_gpio5_hwmod,
5330 &omap44xx_gpio6_hwmod,
5331
Benoit Cousson407a6882011-02-15 22:39:48 +01005332 /* hsi class */
5333/* &omap44xx_hsi_hwmod, */
5334
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005335 /* i2c class */
5336 &omap44xx_i2c1_hwmod,
5337 &omap44xx_i2c2_hwmod,
5338 &omap44xx_i2c3_hwmod,
5339 &omap44xx_i2c4_hwmod,
5340
Benoit Cousson407a6882011-02-15 22:39:48 +01005341 /* ipu class */
5342 &omap44xx_ipu_hwmod,
5343 &omap44xx_ipu_c0_hwmod,
5344 &omap44xx_ipu_c1_hwmod,
5345
5346 /* iss class */
5347/* &omap44xx_iss_hwmod, */
5348
Benoit Cousson8f25bdc2010-12-21 21:08:34 -07005349 /* iva class */
5350 &omap44xx_iva_hwmod,
5351 &omap44xx_iva_seq0_hwmod,
5352 &omap44xx_iva_seq1_hwmod,
5353
Benoit Cousson407a6882011-02-15 22:39:48 +01005354 /* kbd class */
Shubhrajyoti D4998b2452011-05-04 14:57:44 -07005355 &omap44xx_kbd_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005356
Benoit Coussonec5df922011-02-02 19:27:21 +00005357 /* mailbox class */
5358 &omap44xx_mailbox_hwmod,
5359
Benoit Cousson4ddff492011-01-31 14:50:30 +00005360 /* mcbsp class */
5361 &omap44xx_mcbsp1_hwmod,
5362 &omap44xx_mcbsp2_hwmod,
5363 &omap44xx_mcbsp3_hwmod,
5364 &omap44xx_mcbsp4_hwmod,
5365
Benoit Cousson407a6882011-02-15 22:39:48 +01005366 /* mcpdm class */
Peter Ujfalusid05e2ea2011-05-01 19:33:15 +01005367 &omap44xx_mcpdm_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005368
Benoit Cousson9bcbd7f2011-02-02 17:52:13 +05305369 /* mcspi class */
5370 &omap44xx_mcspi1_hwmod,
5371 &omap44xx_mcspi2_hwmod,
5372 &omap44xx_mcspi3_hwmod,
5373 &omap44xx_mcspi4_hwmod,
5374
Benoit Cousson407a6882011-02-15 22:39:48 +01005375 /* mmc class */
Anand Gadiyar17203bd2011-03-01 13:12:56 -08005376 &omap44xx_mmc1_hwmod,
5377 &omap44xx_mmc2_hwmod,
5378 &omap44xx_mmc3_hwmod,
5379 &omap44xx_mmc4_hwmod,
5380 &omap44xx_mmc5_hwmod,
Benoit Cousson407a6882011-02-15 22:39:48 +01005381
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005382 /* mpu class */
5383 &omap44xx_mpu_hwmod,
Benoit Coussondb12ba52010-09-27 20:19:19 +05305384
Benoit Cousson1f6a7172010-12-23 22:30:30 +00005385 /* smartreflex class */
5386 &omap44xx_smartreflex_core_hwmod,
5387 &omap44xx_smartreflex_iva_hwmod,
5388 &omap44xx_smartreflex_mpu_hwmod,
5389
Benoit Coussond11c2172011-02-02 12:04:36 +00005390 /* spinlock class */
5391 &omap44xx_spinlock_hwmod,
5392
Benoit Cousson35d1a662011-02-11 11:17:14 +00005393 /* timer class */
5394 &omap44xx_timer1_hwmod,
5395 &omap44xx_timer2_hwmod,
5396 &omap44xx_timer3_hwmod,
5397 &omap44xx_timer4_hwmod,
5398 &omap44xx_timer5_hwmod,
5399 &omap44xx_timer6_hwmod,
5400 &omap44xx_timer7_hwmod,
5401 &omap44xx_timer8_hwmod,
5402 &omap44xx_timer9_hwmod,
5403 &omap44xx_timer10_hwmod,
5404 &omap44xx_timer11_hwmod,
5405
Benoit Coussondb12ba52010-09-27 20:19:19 +05305406 /* uart class */
5407 &omap44xx_uart1_hwmod,
5408 &omap44xx_uart2_hwmod,
5409 &omap44xx_uart3_hwmod,
5410 &omap44xx_uart4_hwmod,
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005411
Benoit Cousson5844c4e2011-02-17 12:41:05 +00005412 /* usb_otg_hs class */
5413 &omap44xx_usb_otg_hs_hwmod,
5414
Benoit Cousson3b54baa2010-12-21 21:08:33 -07005415 /* wd_timer class */
5416 &omap44xx_wd_timer2_hwmod,
5417 &omap44xx_wd_timer3_hwmod,
5418
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005419 NULL,
5420};
5421
5422int __init omap44xx_hwmod_init(void)
5423{
Paul Walmsley550c8092011-02-28 11:58:14 -07005424 return omap_hwmod_register(omap44xx_hwmods);
Benoit Cousson55d2cb02010-05-12 17:54:36 +02005425}
5426