blob: 2539e469c1e08f22298d242ec3d0e8ee79fff8b0 [file] [log] [blame]
Paul Walmsley73591542010-02-22 22:09:32 -07001/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
4 * Copyright (C) 2009-2010 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * The data in this file should be completely autogeneratable from
12 * the TI hardware database or other technical documentation.
13 *
14 * XXX these should be marked initdata for multi-OMAP kernels
15 */
16#include <plat/omap_hwmod.h>
17#include <mach/irqs.h>
18#include <plat/cpu.h>
19#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053020#include <plat/serial.h>
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000021#include <plat/l3_3xxx.h>
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053022#include <plat/l4_3xxx.h>
23#include <plat/i2c.h>
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080024#include <plat/gpio.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080025#include <plat/mmc.h>
Thara Gopinathd3442722010-05-29 22:02:24 +053026#include <plat/smartreflex.h>
Charulatha Vdc48e5f2011-02-24 15:16:49 +053027#include <plat/mcbsp.h>
Charulatha V0f616a42011-02-17 09:53:10 -080028#include <plat/mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070029#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070030
Paul Walmsley43b40992010-02-22 22:09:34 -070031#include "omap_hwmod_common_data.h"
32
Paul Walmsley73591542010-02-22 22:09:32 -070033#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053034#include "cm-regbits-34xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070035#include "wd_timer.h"
Hema HK273ff8c2011-02-17 12:07:19 +053036#include <mach/am35xx.h>
Paul Walmsley73591542010-02-22 22:09:32 -070037
38/*
39 * OMAP3xxx hardware module integration data
40 *
41 * ALl of the data in this section should be autogeneratable from the
42 * TI hardware database or other technical documentation. Data that
43 * is driver-specific or driver-kernel integration-specific belongs
44 * elsewhere.
45 */
46
47static struct omap_hwmod omap3xxx_mpu_hwmod;
Kevin Hilman540064b2010-07-26 16:34:32 -060048static struct omap_hwmod omap3xxx_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060049static struct omap_hwmod omap3xxx_l3_main_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -070050static struct omap_hwmod omap3xxx_l4_core_hwmod;
51static struct omap_hwmod omap3xxx_l4_per_hwmod;
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053052static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000053static struct omap_hwmod omap3430es1_dss_core_hwmod;
54static struct omap_hwmod omap3xxx_dss_core_hwmod;
55static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
56static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
57static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
58static struct omap_hwmod omap3xxx_dss_venc_hwmod;
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053059static struct omap_hwmod omap3xxx_i2c1_hwmod;
60static struct omap_hwmod omap3xxx_i2c2_hwmod;
61static struct omap_hwmod omap3xxx_i2c3_hwmod;
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080062static struct omap_hwmod omap3xxx_gpio1_hwmod;
63static struct omap_hwmod omap3xxx_gpio2_hwmod;
64static struct omap_hwmod omap3xxx_gpio3_hwmod;
65static struct omap_hwmod omap3xxx_gpio4_hwmod;
66static struct omap_hwmod omap3xxx_gpio5_hwmod;
67static struct omap_hwmod omap3xxx_gpio6_hwmod;
Thara Gopinathd3442722010-05-29 22:02:24 +053068static struct omap_hwmod omap34xx_sr1_hwmod;
69static struct omap_hwmod omap34xx_sr2_hwmod;
Charulatha V0f616a42011-02-17 09:53:10 -080070static struct omap_hwmod omap34xx_mcspi1;
71static struct omap_hwmod omap34xx_mcspi2;
72static struct omap_hwmod omap34xx_mcspi3;
73static struct omap_hwmod omap34xx_mcspi4;
Paul Walmsleyb1636052011-03-01 13:12:56 -080074static struct omap_hwmod omap3xxx_mmc1_hwmod;
75static struct omap_hwmod omap3xxx_mmc2_hwmod;
76static struct omap_hwmod omap3xxx_mmc3_hwmod;
Hema HK273ff8c2011-02-17 12:07:19 +053077static struct omap_hwmod am35xx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -070078
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080079static struct omap_hwmod omap3xxx_dma_system_hwmod;
80
Charulatha Vdc48e5f2011-02-24 15:16:49 +053081static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
82static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
83static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
84static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
85static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
86static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
87static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
88
Paul Walmsley73591542010-02-22 22:09:32 -070089/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060090static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
91 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -070092 .slave = &omap3xxx_l4_core_hwmod,
93 .user = OCP_USER_MPU | OCP_USER_SDMA,
94};
95
96/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060097static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
98 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -070099 .slave = &omap3xxx_l4_per_hwmod,
100 .user = OCP_USER_MPU | OCP_USER_SDMA,
101};
102
sricharan4bb194d2011-02-08 22:13:37 +0530103/* L3 taret configuration and error log registers */
104static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
105 { .irq = INT_34XX_L3_DBG_IRQ },
106 { .irq = INT_34XX_L3_APP_IRQ },
107};
108
109static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
110 {
111 .pa_start = 0x68000000,
112 .pa_end = 0x6800ffff,
113 .flags = ADDR_TYPE_RT,
114 },
115};
116
Paul Walmsley73591542010-02-22 22:09:32 -0700117/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600118static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +0530119 .master = &omap3xxx_mpu_hwmod,
120 .slave = &omap3xxx_l3_main_hwmod,
121 .addr = omap3xxx_l3_main_addrs,
122 .addr_cnt = ARRAY_SIZE(omap3xxx_l3_main_addrs),
Paul Walmsley73591542010-02-22 22:09:32 -0700123 .user = OCP_USER_MPU,
124};
125
126/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600127static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
128 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700129};
130
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +0000131/* DSS -> l3 */
132static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
133 .master = &omap3xxx_dss_core_hwmod,
134 .slave = &omap3xxx_l3_main_hwmod,
135 .fw = {
136 .omap2 = {
137 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
138 .flags = OMAP_FIREWALL_L3,
139 }
140 },
141 .user = OCP_USER_MPU | OCP_USER_SDMA,
142};
143
Paul Walmsley73591542010-02-22 22:09:32 -0700144/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600145static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
146 &omap3xxx_l3_main__l4_core,
147 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700148};
149
150/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600151static struct omap_hwmod omap3xxx_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600152 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -0700153 .class = &l3_hwmod_class,
sricharan4bb194d2011-02-08 22:13:37 +0530154 .mpu_irqs = omap3xxx_l3_main_irqs,
155 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_l3_main_irqs),
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600156 .masters = omap3xxx_l3_main_masters,
157 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
158 .slaves = omap3xxx_l3_main_slaves,
159 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600160 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
161 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700162};
163
164static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530165static struct omap_hwmod omap3xxx_uart1_hwmod;
166static struct omap_hwmod omap3xxx_uart2_hwmod;
167static struct omap_hwmod omap3xxx_uart3_hwmod;
168static struct omap_hwmod omap3xxx_uart4_hwmod;
Hema HK870ea2b2011-02-17 12:07:18 +0530169static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -0700170
Hema HK870ea2b2011-02-17 12:07:18 +0530171/* l3_core -> usbhsotg interface */
172static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
173 .master = &omap3xxx_usbhsotg_hwmod,
174 .slave = &omap3xxx_l3_main_hwmod,
175 .clk = "core_l3_ick",
176 .user = OCP_USER_MPU,
177};
Paul Walmsley73591542010-02-22 22:09:32 -0700178
Hema HK273ff8c2011-02-17 12:07:19 +0530179/* l3_core -> am35xx_usbhsotg interface */
180static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
181 .master = &am35xx_usbhsotg_hwmod,
182 .slave = &omap3xxx_l3_main_hwmod,
183 .clk = "core_l3_ick",
184 .user = OCP_USER_MPU,
185};
Paul Walmsley73591542010-02-22 22:09:32 -0700186/* L4_CORE -> L4_WKUP interface */
187static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
188 .master = &omap3xxx_l4_core_hwmod,
189 .slave = &omap3xxx_l4_wkup_hwmod,
190 .user = OCP_USER_MPU | OCP_USER_SDMA,
191};
192
Paul Walmsleyb1636052011-03-01 13:12:56 -0800193/* L4 CORE -> MMC1 interface */
194static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
195 {
196 .pa_start = 0x4809c000,
197 .pa_end = 0x4809c1ff,
198 .flags = ADDR_TYPE_RT,
199 },
200};
201
202static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
203 .master = &omap3xxx_l4_core_hwmod,
204 .slave = &omap3xxx_mmc1_hwmod,
205 .clk = "mmchs1_ick",
206 .addr = omap3xxx_mmc1_addr_space,
207 .addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space),
208 .user = OCP_USER_MPU | OCP_USER_SDMA,
209 .flags = OMAP_FIREWALL_L4
210};
211
212/* L4 CORE -> MMC2 interface */
213static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = {
214 {
215 .pa_start = 0x480b4000,
216 .pa_end = 0x480b41ff,
217 .flags = ADDR_TYPE_RT,
218 },
219};
220
221static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
222 .master = &omap3xxx_l4_core_hwmod,
223 .slave = &omap3xxx_mmc2_hwmod,
224 .clk = "mmchs2_ick",
225 .addr = omap3xxx_mmc2_addr_space,
226 .addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space),
227 .user = OCP_USER_MPU | OCP_USER_SDMA,
228 .flags = OMAP_FIREWALL_L4
229};
230
231/* L4 CORE -> MMC3 interface */
232static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
233 {
234 .pa_start = 0x480ad000,
235 .pa_end = 0x480ad1ff,
236 .flags = ADDR_TYPE_RT,
237 },
238};
239
240static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
241 .master = &omap3xxx_l4_core_hwmod,
242 .slave = &omap3xxx_mmc3_hwmod,
243 .clk = "mmchs3_ick",
244 .addr = omap3xxx_mmc3_addr_space,
245 .addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space),
246 .user = OCP_USER_MPU | OCP_USER_SDMA,
247 .flags = OMAP_FIREWALL_L4
248};
249
Kevin Hilman046465b2010-09-27 20:19:30 +0530250/* L4 CORE -> UART1 interface */
251static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
252 {
253 .pa_start = OMAP3_UART1_BASE,
254 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
255 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
256 },
257};
258
259static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
260 .master = &omap3xxx_l4_core_hwmod,
261 .slave = &omap3xxx_uart1_hwmod,
262 .clk = "uart1_ick",
263 .addr = omap3xxx_uart1_addr_space,
264 .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
265 .user = OCP_USER_MPU | OCP_USER_SDMA,
266};
267
268/* L4 CORE -> UART2 interface */
269static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
270 {
271 .pa_start = OMAP3_UART2_BASE,
272 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
273 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
274 },
275};
276
277static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
278 .master = &omap3xxx_l4_core_hwmod,
279 .slave = &omap3xxx_uart2_hwmod,
280 .clk = "uart2_ick",
281 .addr = omap3xxx_uart2_addr_space,
282 .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
283 .user = OCP_USER_MPU | OCP_USER_SDMA,
284};
285
286/* L4 PER -> UART3 interface */
287static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
288 {
289 .pa_start = OMAP3_UART3_BASE,
290 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
291 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
292 },
293};
294
295static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
296 .master = &omap3xxx_l4_per_hwmod,
297 .slave = &omap3xxx_uart3_hwmod,
298 .clk = "uart3_ick",
299 .addr = omap3xxx_uart3_addr_space,
300 .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
301 .user = OCP_USER_MPU | OCP_USER_SDMA,
302};
303
304/* L4 PER -> UART4 interface */
305static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
306 {
307 .pa_start = OMAP3_UART4_BASE,
308 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
309 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
310 },
311};
312
313static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
314 .master = &omap3xxx_l4_per_hwmod,
315 .slave = &omap3xxx_uart4_hwmod,
316 .clk = "uart4_ick",
317 .addr = omap3xxx_uart4_addr_space,
318 .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
319 .user = OCP_USER_MPU | OCP_USER_SDMA,
320};
321
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530322/* I2C IP block address space length (in bytes) */
323#define OMAP2_I2C_AS_LEN 128
324
325/* L4 CORE -> I2C1 interface */
326static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
327 {
328 .pa_start = 0x48070000,
329 .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
330 .flags = ADDR_TYPE_RT,
331 },
332};
333
334static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
335 .master = &omap3xxx_l4_core_hwmod,
336 .slave = &omap3xxx_i2c1_hwmod,
337 .clk = "i2c1_ick",
338 .addr = omap3xxx_i2c1_addr_space,
339 .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
340 .fw = {
341 .omap2 = {
342 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
343 .l4_prot_group = 7,
344 .flags = OMAP_FIREWALL_L4,
345 }
346 },
347 .user = OCP_USER_MPU | OCP_USER_SDMA,
348};
349
350/* L4 CORE -> I2C2 interface */
351static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
352 {
353 .pa_start = 0x48072000,
354 .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
355 .flags = ADDR_TYPE_RT,
356 },
357};
358
359static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
360 .master = &omap3xxx_l4_core_hwmod,
361 .slave = &omap3xxx_i2c2_hwmod,
362 .clk = "i2c2_ick",
363 .addr = omap3xxx_i2c2_addr_space,
364 .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
365 .fw = {
366 .omap2 = {
367 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
368 .l4_prot_group = 7,
369 .flags = OMAP_FIREWALL_L4,
370 }
371 },
372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
374
375/* L4 CORE -> I2C3 interface */
376static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
377 {
378 .pa_start = 0x48060000,
379 .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
380 .flags = ADDR_TYPE_RT,
381 },
382};
383
384static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
385 .master = &omap3xxx_l4_core_hwmod,
386 .slave = &omap3xxx_i2c3_hwmod,
387 .clk = "i2c3_ick",
388 .addr = omap3xxx_i2c3_addr_space,
389 .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
390 .fw = {
391 .omap2 = {
392 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
393 .l4_prot_group = 7,
394 .flags = OMAP_FIREWALL_L4,
395 }
396 },
397 .user = OCP_USER_MPU | OCP_USER_SDMA,
398};
399
Thara Gopinathd3442722010-05-29 22:02:24 +0530400/* L4 CORE -> SR1 interface */
401static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
402 {
403 .pa_start = OMAP34XX_SR1_BASE,
404 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
405 .flags = ADDR_TYPE_RT,
406 },
407};
408
409static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
410 .master = &omap3xxx_l4_core_hwmod,
411 .slave = &omap34xx_sr1_hwmod,
412 .clk = "sr_l4_ick",
413 .addr = omap3_sr1_addr_space,
414 .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space),
415 .user = OCP_USER_MPU,
416};
417
418/* L4 CORE -> SR1 interface */
419static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
420 {
421 .pa_start = OMAP34XX_SR2_BASE,
422 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
423 .flags = ADDR_TYPE_RT,
424 },
425};
426
427static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
428 .master = &omap3xxx_l4_core_hwmod,
429 .slave = &omap34xx_sr2_hwmod,
430 .clk = "sr_l4_ick",
431 .addr = omap3_sr2_addr_space,
432 .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space),
433 .user = OCP_USER_MPU,
434};
435
Hema HK870ea2b2011-02-17 12:07:18 +0530436/*
437* usbhsotg interface data
438*/
439
440static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
441 {
442 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
443 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
444 .flags = ADDR_TYPE_RT
445 },
446};
447
448/* l4_core -> usbhsotg */
449static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
450 .master = &omap3xxx_l4_core_hwmod,
451 .slave = &omap3xxx_usbhsotg_hwmod,
452 .clk = "l4_ick",
453 .addr = omap3xxx_usbhsotg_addrs,
454 .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
455 .user = OCP_USER_MPU,
456};
457
458static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
459 &omap3xxx_usbhsotg__l3,
460};
461
462static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
463 &omap3xxx_l4_core__usbhsotg,
464};
465
Hema HK273ff8c2011-02-17 12:07:19 +0530466static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
467 {
468 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
469 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
470 .flags = ADDR_TYPE_RT
471 },
472};
473
474/* l4_core -> usbhsotg */
475static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
476 .master = &omap3xxx_l4_core_hwmod,
477 .slave = &am35xx_usbhsotg_hwmod,
478 .clk = "l4_ick",
479 .addr = am35xx_usbhsotg_addrs,
480 .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs),
481 .user = OCP_USER_MPU,
482};
483
484static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
485 &am35xx_usbhsotg__l3,
486};
487
488static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
489 &am35xx_l4_core__usbhsotg,
490};
Paul Walmsley73591542010-02-22 22:09:32 -0700491/* Slave interfaces on the L4_CORE interconnect */
492static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600493 &omap3xxx_l3_main__l4_core,
Thara Gopinathd3442722010-05-29 22:02:24 +0530494 &omap3_l4_core__sr1,
495 &omap3_l4_core__sr2,
Paul Walmsley73591542010-02-22 22:09:32 -0700496};
497
498/* Master interfaces on the L4_CORE interconnect */
499static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
500 &omap3xxx_l4_core__l4_wkup,
Kevin Hilman046465b2010-09-27 20:19:30 +0530501 &omap3_l4_core__uart1,
502 &omap3_l4_core__uart2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530503 &omap3_l4_core__i2c1,
504 &omap3_l4_core__i2c2,
505 &omap3_l4_core__i2c3,
Paul Walmsley73591542010-02-22 22:09:32 -0700506};
507
508/* L4 CORE */
509static struct omap_hwmod omap3xxx_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600510 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700511 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700512 .masters = omap3xxx_l4_core_masters,
513 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
514 .slaves = omap3xxx_l4_core_slaves,
515 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600516 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
517 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700518};
519
520/* Slave interfaces on the L4_PER interconnect */
521static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600522 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700523};
524
525/* Master interfaces on the L4_PER interconnect */
526static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
Kevin Hilman046465b2010-09-27 20:19:30 +0530527 &omap3_l4_per__uart3,
528 &omap3_l4_per__uart4,
Paul Walmsley73591542010-02-22 22:09:32 -0700529};
530
531/* L4 PER */
532static struct omap_hwmod omap3xxx_l4_per_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600533 .name = "l4_per",
Paul Walmsley43b40992010-02-22 22:09:34 -0700534 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700535 .masters = omap3xxx_l4_per_masters,
536 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
537 .slaves = omap3xxx_l4_per_slaves,
538 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600539 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
540 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700541};
542
543/* Slave interfaces on the L4_WKUP interconnect */
544static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
545 &omap3xxx_l4_core__l4_wkup,
546};
547
548/* Master interfaces on the L4_WKUP interconnect */
549static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
550};
551
552/* L4 WKUP */
553static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600554 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700555 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700556 .masters = omap3xxx_l4_wkup_masters,
557 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
558 .slaves = omap3xxx_l4_wkup_slaves,
559 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600560 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
561 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700562};
563
564/* Master interfaces on the MPU device */
565static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600566 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700567};
568
569/* MPU */
570static struct omap_hwmod omap3xxx_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600571 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700572 .class = &mpu_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700573 .main_clk = "arm_fck",
574 .masters = omap3xxx_mpu_masters,
575 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
576 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
577};
578
Kevin Hilman540064b2010-07-26 16:34:32 -0600579/*
580 * IVA2_2 interface data
581 */
582
583/* IVA2 <- L3 interface */
584static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
585 .master = &omap3xxx_l3_main_hwmod,
586 .slave = &omap3xxx_iva_hwmod,
587 .clk = "iva2_ck",
588 .user = OCP_USER_MPU | OCP_USER_SDMA,
589};
590
591static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
592 &omap3xxx_l3__iva,
593};
594
595/*
596 * IVA2 (IVA2)
597 */
598
599static struct omap_hwmod omap3xxx_iva_hwmod = {
600 .name = "iva",
601 .class = &iva_hwmod_class,
602 .masters = omap3xxx_iva_masters,
603 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
604 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
605};
606
Thara Gopinathce722d22011-02-23 00:14:05 -0700607/* timer class */
608static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
609 .rev_offs = 0x0000,
610 .sysc_offs = 0x0010,
611 .syss_offs = 0x0014,
612 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
613 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
614 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
615 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
616 .sysc_fields = &omap_hwmod_sysc_type1,
617};
618
619static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
620 .name = "timer",
621 .sysc = &omap3xxx_timer_1ms_sysc,
622 .rev = OMAP_TIMER_IP_VERSION_1,
623};
624
625static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
626 .rev_offs = 0x0000,
627 .sysc_offs = 0x0010,
628 .syss_offs = 0x0014,
629 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
630 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
631 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
632 .sysc_fields = &omap_hwmod_sysc_type1,
633};
634
635static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
636 .name = "timer",
637 .sysc = &omap3xxx_timer_sysc,
638 .rev = OMAP_TIMER_IP_VERSION_1,
639};
640
641/* timer1 */
642static struct omap_hwmod omap3xxx_timer1_hwmod;
643static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = {
644 { .irq = 37, },
645};
646
647static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
648 {
649 .pa_start = 0x48318000,
650 .pa_end = 0x48318000 + SZ_1K - 1,
651 .flags = ADDR_TYPE_RT
652 },
653};
654
655/* l4_wkup -> timer1 */
656static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
657 .master = &omap3xxx_l4_wkup_hwmod,
658 .slave = &omap3xxx_timer1_hwmod,
659 .clk = "gpt1_ick",
660 .addr = omap3xxx_timer1_addrs,
661 .addr_cnt = ARRAY_SIZE(omap3xxx_timer1_addrs),
662 .user = OCP_USER_MPU | OCP_USER_SDMA,
663};
664
665/* timer1 slave port */
666static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
667 &omap3xxx_l4_wkup__timer1,
668};
669
670/* timer1 hwmod */
671static struct omap_hwmod omap3xxx_timer1_hwmod = {
672 .name = "timer1",
673 .mpu_irqs = omap3xxx_timer1_mpu_irqs,
674 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs),
675 .main_clk = "gpt1_fck",
676 .prcm = {
677 .omap2 = {
678 .prcm_reg_id = 1,
679 .module_bit = OMAP3430_EN_GPT1_SHIFT,
680 .module_offs = WKUP_MOD,
681 .idlest_reg_id = 1,
682 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
683 },
684 },
685 .slaves = omap3xxx_timer1_slaves,
686 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
687 .class = &omap3xxx_timer_1ms_hwmod_class,
688 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
689};
690
691/* timer2 */
692static struct omap_hwmod omap3xxx_timer2_hwmod;
693static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = {
694 { .irq = 38, },
695};
696
697static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
698 {
699 .pa_start = 0x49032000,
700 .pa_end = 0x49032000 + SZ_1K - 1,
701 .flags = ADDR_TYPE_RT
702 },
703};
704
705/* l4_per -> timer2 */
706static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
707 .master = &omap3xxx_l4_per_hwmod,
708 .slave = &omap3xxx_timer2_hwmod,
709 .clk = "gpt2_ick",
710 .addr = omap3xxx_timer2_addrs,
711 .addr_cnt = ARRAY_SIZE(omap3xxx_timer2_addrs),
712 .user = OCP_USER_MPU | OCP_USER_SDMA,
713};
714
715/* timer2 slave port */
716static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
717 &omap3xxx_l4_per__timer2,
718};
719
720/* timer2 hwmod */
721static struct omap_hwmod omap3xxx_timer2_hwmod = {
722 .name = "timer2",
723 .mpu_irqs = omap3xxx_timer2_mpu_irqs,
724 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs),
725 .main_clk = "gpt2_fck",
726 .prcm = {
727 .omap2 = {
728 .prcm_reg_id = 1,
729 .module_bit = OMAP3430_EN_GPT2_SHIFT,
730 .module_offs = OMAP3430_PER_MOD,
731 .idlest_reg_id = 1,
732 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
733 },
734 },
735 .slaves = omap3xxx_timer2_slaves,
736 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
737 .class = &omap3xxx_timer_1ms_hwmod_class,
738 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
739};
740
741/* timer3 */
742static struct omap_hwmod omap3xxx_timer3_hwmod;
743static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = {
744 { .irq = 39, },
745};
746
747static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
748 {
749 .pa_start = 0x49034000,
750 .pa_end = 0x49034000 + SZ_1K - 1,
751 .flags = ADDR_TYPE_RT
752 },
753};
754
755/* l4_per -> timer3 */
756static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
757 .master = &omap3xxx_l4_per_hwmod,
758 .slave = &omap3xxx_timer3_hwmod,
759 .clk = "gpt3_ick",
760 .addr = omap3xxx_timer3_addrs,
761 .addr_cnt = ARRAY_SIZE(omap3xxx_timer3_addrs),
762 .user = OCP_USER_MPU | OCP_USER_SDMA,
763};
764
765/* timer3 slave port */
766static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
767 &omap3xxx_l4_per__timer3,
768};
769
770/* timer3 hwmod */
771static struct omap_hwmod omap3xxx_timer3_hwmod = {
772 .name = "timer3",
773 .mpu_irqs = omap3xxx_timer3_mpu_irqs,
774 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs),
775 .main_clk = "gpt3_fck",
776 .prcm = {
777 .omap2 = {
778 .prcm_reg_id = 1,
779 .module_bit = OMAP3430_EN_GPT3_SHIFT,
780 .module_offs = OMAP3430_PER_MOD,
781 .idlest_reg_id = 1,
782 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
783 },
784 },
785 .slaves = omap3xxx_timer3_slaves,
786 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
787 .class = &omap3xxx_timer_hwmod_class,
788 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
789};
790
791/* timer4 */
792static struct omap_hwmod omap3xxx_timer4_hwmod;
793static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = {
794 { .irq = 40, },
795};
796
797static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
798 {
799 .pa_start = 0x49036000,
800 .pa_end = 0x49036000 + SZ_1K - 1,
801 .flags = ADDR_TYPE_RT
802 },
803};
804
805/* l4_per -> timer4 */
806static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
807 .master = &omap3xxx_l4_per_hwmod,
808 .slave = &omap3xxx_timer4_hwmod,
809 .clk = "gpt4_ick",
810 .addr = omap3xxx_timer4_addrs,
811 .addr_cnt = ARRAY_SIZE(omap3xxx_timer4_addrs),
812 .user = OCP_USER_MPU | OCP_USER_SDMA,
813};
814
815/* timer4 slave port */
816static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
817 &omap3xxx_l4_per__timer4,
818};
819
820/* timer4 hwmod */
821static struct omap_hwmod omap3xxx_timer4_hwmod = {
822 .name = "timer4",
823 .mpu_irqs = omap3xxx_timer4_mpu_irqs,
824 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs),
825 .main_clk = "gpt4_fck",
826 .prcm = {
827 .omap2 = {
828 .prcm_reg_id = 1,
829 .module_bit = OMAP3430_EN_GPT4_SHIFT,
830 .module_offs = OMAP3430_PER_MOD,
831 .idlest_reg_id = 1,
832 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
833 },
834 },
835 .slaves = omap3xxx_timer4_slaves,
836 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
837 .class = &omap3xxx_timer_hwmod_class,
838 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
839};
840
841/* timer5 */
842static struct omap_hwmod omap3xxx_timer5_hwmod;
843static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = {
844 { .irq = 41, },
845};
846
847static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
848 {
849 .pa_start = 0x49038000,
850 .pa_end = 0x49038000 + SZ_1K - 1,
851 .flags = ADDR_TYPE_RT
852 },
853};
854
855/* l4_per -> timer5 */
856static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
857 .master = &omap3xxx_l4_per_hwmod,
858 .slave = &omap3xxx_timer5_hwmod,
859 .clk = "gpt5_ick",
860 .addr = omap3xxx_timer5_addrs,
861 .addr_cnt = ARRAY_SIZE(omap3xxx_timer5_addrs),
862 .user = OCP_USER_MPU | OCP_USER_SDMA,
863};
864
865/* timer5 slave port */
866static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
867 &omap3xxx_l4_per__timer5,
868};
869
870/* timer5 hwmod */
871static struct omap_hwmod omap3xxx_timer5_hwmod = {
872 .name = "timer5",
873 .mpu_irqs = omap3xxx_timer5_mpu_irqs,
874 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs),
875 .main_clk = "gpt5_fck",
876 .prcm = {
877 .omap2 = {
878 .prcm_reg_id = 1,
879 .module_bit = OMAP3430_EN_GPT5_SHIFT,
880 .module_offs = OMAP3430_PER_MOD,
881 .idlest_reg_id = 1,
882 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
883 },
884 },
885 .slaves = omap3xxx_timer5_slaves,
886 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
887 .class = &omap3xxx_timer_hwmod_class,
888 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
889};
890
891/* timer6 */
892static struct omap_hwmod omap3xxx_timer6_hwmod;
893static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = {
894 { .irq = 42, },
895};
896
897static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
898 {
899 .pa_start = 0x4903A000,
900 .pa_end = 0x4903A000 + SZ_1K - 1,
901 .flags = ADDR_TYPE_RT
902 },
903};
904
905/* l4_per -> timer6 */
906static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
907 .master = &omap3xxx_l4_per_hwmod,
908 .slave = &omap3xxx_timer6_hwmod,
909 .clk = "gpt6_ick",
910 .addr = omap3xxx_timer6_addrs,
911 .addr_cnt = ARRAY_SIZE(omap3xxx_timer6_addrs),
912 .user = OCP_USER_MPU | OCP_USER_SDMA,
913};
914
915/* timer6 slave port */
916static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
917 &omap3xxx_l4_per__timer6,
918};
919
920/* timer6 hwmod */
921static struct omap_hwmod omap3xxx_timer6_hwmod = {
922 .name = "timer6",
923 .mpu_irqs = omap3xxx_timer6_mpu_irqs,
924 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs),
925 .main_clk = "gpt6_fck",
926 .prcm = {
927 .omap2 = {
928 .prcm_reg_id = 1,
929 .module_bit = OMAP3430_EN_GPT6_SHIFT,
930 .module_offs = OMAP3430_PER_MOD,
931 .idlest_reg_id = 1,
932 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
933 },
934 },
935 .slaves = omap3xxx_timer6_slaves,
936 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
937 .class = &omap3xxx_timer_hwmod_class,
938 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
939};
940
941/* timer7 */
942static struct omap_hwmod omap3xxx_timer7_hwmod;
943static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = {
944 { .irq = 43, },
945};
946
947static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
948 {
949 .pa_start = 0x4903C000,
950 .pa_end = 0x4903C000 + SZ_1K - 1,
951 .flags = ADDR_TYPE_RT
952 },
953};
954
955/* l4_per -> timer7 */
956static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
957 .master = &omap3xxx_l4_per_hwmod,
958 .slave = &omap3xxx_timer7_hwmod,
959 .clk = "gpt7_ick",
960 .addr = omap3xxx_timer7_addrs,
961 .addr_cnt = ARRAY_SIZE(omap3xxx_timer7_addrs),
962 .user = OCP_USER_MPU | OCP_USER_SDMA,
963};
964
965/* timer7 slave port */
966static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
967 &omap3xxx_l4_per__timer7,
968};
969
970/* timer7 hwmod */
971static struct omap_hwmod omap3xxx_timer7_hwmod = {
972 .name = "timer7",
973 .mpu_irqs = omap3xxx_timer7_mpu_irqs,
974 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs),
975 .main_clk = "gpt7_fck",
976 .prcm = {
977 .omap2 = {
978 .prcm_reg_id = 1,
979 .module_bit = OMAP3430_EN_GPT7_SHIFT,
980 .module_offs = OMAP3430_PER_MOD,
981 .idlest_reg_id = 1,
982 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
983 },
984 },
985 .slaves = omap3xxx_timer7_slaves,
986 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
987 .class = &omap3xxx_timer_hwmod_class,
988 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
989};
990
991/* timer8 */
992static struct omap_hwmod omap3xxx_timer8_hwmod;
993static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = {
994 { .irq = 44, },
995};
996
997static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
998 {
999 .pa_start = 0x4903E000,
1000 .pa_end = 0x4903E000 + SZ_1K - 1,
1001 .flags = ADDR_TYPE_RT
1002 },
1003};
1004
1005/* l4_per -> timer8 */
1006static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
1007 .master = &omap3xxx_l4_per_hwmod,
1008 .slave = &omap3xxx_timer8_hwmod,
1009 .clk = "gpt8_ick",
1010 .addr = omap3xxx_timer8_addrs,
1011 .addr_cnt = ARRAY_SIZE(omap3xxx_timer8_addrs),
1012 .user = OCP_USER_MPU | OCP_USER_SDMA,
1013};
1014
1015/* timer8 slave port */
1016static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
1017 &omap3xxx_l4_per__timer8,
1018};
1019
1020/* timer8 hwmod */
1021static struct omap_hwmod omap3xxx_timer8_hwmod = {
1022 .name = "timer8",
1023 .mpu_irqs = omap3xxx_timer8_mpu_irqs,
1024 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs),
1025 .main_clk = "gpt8_fck",
1026 .prcm = {
1027 .omap2 = {
1028 .prcm_reg_id = 1,
1029 .module_bit = OMAP3430_EN_GPT8_SHIFT,
1030 .module_offs = OMAP3430_PER_MOD,
1031 .idlest_reg_id = 1,
1032 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
1033 },
1034 },
1035 .slaves = omap3xxx_timer8_slaves,
1036 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
1037 .class = &omap3xxx_timer_hwmod_class,
1038 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1039};
1040
1041/* timer9 */
1042static struct omap_hwmod omap3xxx_timer9_hwmod;
1043static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = {
1044 { .irq = 45, },
1045};
1046
1047static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
1048 {
1049 .pa_start = 0x49040000,
1050 .pa_end = 0x49040000 + SZ_1K - 1,
1051 .flags = ADDR_TYPE_RT
1052 },
1053};
1054
1055/* l4_per -> timer9 */
1056static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
1057 .master = &omap3xxx_l4_per_hwmod,
1058 .slave = &omap3xxx_timer9_hwmod,
1059 .clk = "gpt9_ick",
1060 .addr = omap3xxx_timer9_addrs,
1061 .addr_cnt = ARRAY_SIZE(omap3xxx_timer9_addrs),
1062 .user = OCP_USER_MPU | OCP_USER_SDMA,
1063};
1064
1065/* timer9 slave port */
1066static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
1067 &omap3xxx_l4_per__timer9,
1068};
1069
1070/* timer9 hwmod */
1071static struct omap_hwmod omap3xxx_timer9_hwmod = {
1072 .name = "timer9",
1073 .mpu_irqs = omap3xxx_timer9_mpu_irqs,
1074 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs),
1075 .main_clk = "gpt9_fck",
1076 .prcm = {
1077 .omap2 = {
1078 .prcm_reg_id = 1,
1079 .module_bit = OMAP3430_EN_GPT9_SHIFT,
1080 .module_offs = OMAP3430_PER_MOD,
1081 .idlest_reg_id = 1,
1082 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
1083 },
1084 },
1085 .slaves = omap3xxx_timer9_slaves,
1086 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
1087 .class = &omap3xxx_timer_hwmod_class,
1088 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1089};
1090
1091/* timer10 */
1092static struct omap_hwmod omap3xxx_timer10_hwmod;
1093static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = {
1094 { .irq = 46, },
1095};
1096
1097static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = {
1098 {
1099 .pa_start = 0x48086000,
1100 .pa_end = 0x48086000 + SZ_1K - 1,
1101 .flags = ADDR_TYPE_RT
1102 },
1103};
1104
1105/* l4_core -> timer10 */
1106static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1107 .master = &omap3xxx_l4_core_hwmod,
1108 .slave = &omap3xxx_timer10_hwmod,
1109 .clk = "gpt10_ick",
1110 .addr = omap3xxx_timer10_addrs,
1111 .addr_cnt = ARRAY_SIZE(omap3xxx_timer10_addrs),
1112 .user = OCP_USER_MPU | OCP_USER_SDMA,
1113};
1114
1115/* timer10 slave port */
1116static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1117 &omap3xxx_l4_core__timer10,
1118};
1119
1120/* timer10 hwmod */
1121static struct omap_hwmod omap3xxx_timer10_hwmod = {
1122 .name = "timer10",
1123 .mpu_irqs = omap3xxx_timer10_mpu_irqs,
1124 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs),
1125 .main_clk = "gpt10_fck",
1126 .prcm = {
1127 .omap2 = {
1128 .prcm_reg_id = 1,
1129 .module_bit = OMAP3430_EN_GPT10_SHIFT,
1130 .module_offs = CORE_MOD,
1131 .idlest_reg_id = 1,
1132 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
1133 },
1134 },
1135 .slaves = omap3xxx_timer10_slaves,
1136 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
1137 .class = &omap3xxx_timer_1ms_hwmod_class,
1138 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1139};
1140
1141/* timer11 */
1142static struct omap_hwmod omap3xxx_timer11_hwmod;
1143static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = {
1144 { .irq = 47, },
1145};
1146
1147static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = {
1148 {
1149 .pa_start = 0x48088000,
1150 .pa_end = 0x48088000 + SZ_1K - 1,
1151 .flags = ADDR_TYPE_RT
1152 },
1153};
1154
1155/* l4_core -> timer11 */
1156static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1157 .master = &omap3xxx_l4_core_hwmod,
1158 .slave = &omap3xxx_timer11_hwmod,
1159 .clk = "gpt11_ick",
1160 .addr = omap3xxx_timer11_addrs,
1161 .addr_cnt = ARRAY_SIZE(omap3xxx_timer11_addrs),
1162 .user = OCP_USER_MPU | OCP_USER_SDMA,
1163};
1164
1165/* timer11 slave port */
1166static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1167 &omap3xxx_l4_core__timer11,
1168};
1169
1170/* timer11 hwmod */
1171static struct omap_hwmod omap3xxx_timer11_hwmod = {
1172 .name = "timer11",
1173 .mpu_irqs = omap3xxx_timer11_mpu_irqs,
1174 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs),
1175 .main_clk = "gpt11_fck",
1176 .prcm = {
1177 .omap2 = {
1178 .prcm_reg_id = 1,
1179 .module_bit = OMAP3430_EN_GPT11_SHIFT,
1180 .module_offs = CORE_MOD,
1181 .idlest_reg_id = 1,
1182 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
1183 },
1184 },
1185 .slaves = omap3xxx_timer11_slaves,
1186 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
1187 .class = &omap3xxx_timer_hwmod_class,
1188 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1189};
1190
1191/* timer12*/
1192static struct omap_hwmod omap3xxx_timer12_hwmod;
1193static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1194 { .irq = 95, },
1195};
1196
1197static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1198 {
1199 .pa_start = 0x48304000,
1200 .pa_end = 0x48304000 + SZ_1K - 1,
1201 .flags = ADDR_TYPE_RT
1202 },
1203};
1204
1205/* l4_core -> timer12 */
1206static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1207 .master = &omap3xxx_l4_core_hwmod,
1208 .slave = &omap3xxx_timer12_hwmod,
1209 .clk = "gpt12_ick",
1210 .addr = omap3xxx_timer12_addrs,
1211 .addr_cnt = ARRAY_SIZE(omap3xxx_timer12_addrs),
1212 .user = OCP_USER_MPU | OCP_USER_SDMA,
1213};
1214
1215/* timer12 slave port */
1216static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1217 &omap3xxx_l4_core__timer12,
1218};
1219
1220/* timer12 hwmod */
1221static struct omap_hwmod omap3xxx_timer12_hwmod = {
1222 .name = "timer12",
1223 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
1224 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs),
1225 .main_clk = "gpt12_fck",
1226 .prcm = {
1227 .omap2 = {
1228 .prcm_reg_id = 1,
1229 .module_bit = OMAP3430_EN_GPT12_SHIFT,
1230 .module_offs = WKUP_MOD,
1231 .idlest_reg_id = 1,
1232 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
1233 },
1234 },
1235 .slaves = omap3xxx_timer12_slaves,
1236 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
1237 .class = &omap3xxx_timer_hwmod_class,
1238 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1239};
1240
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301241/* l4_wkup -> wd_timer2 */
1242static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1243 {
1244 .pa_start = 0x48314000,
1245 .pa_end = 0x4831407f,
1246 .flags = ADDR_TYPE_RT
1247 },
1248};
1249
1250static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1251 .master = &omap3xxx_l4_wkup_hwmod,
1252 .slave = &omap3xxx_wd_timer2_hwmod,
1253 .clk = "wdt2_ick",
1254 .addr = omap3xxx_wd_timer2_addrs,
1255 .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
1256 .user = OCP_USER_MPU | OCP_USER_SDMA,
1257};
1258
1259/*
1260 * 'wd_timer' class
1261 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1262 * overflow condition
1263 */
1264
1265static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
1266 .rev_offs = 0x0000,
1267 .sysc_offs = 0x0010,
1268 .syss_offs = 0x0014,
1269 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
1270 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1271 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
1272 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1273 .sysc_fields = &omap_hwmod_sysc_type1,
1274};
1275
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301276/* I2C common */
1277static struct omap_hwmod_class_sysconfig i2c_sysc = {
1278 .rev_offs = 0x00,
1279 .sysc_offs = 0x20,
1280 .syss_offs = 0x10,
1281 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1282 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1283 SYSC_HAS_AUTOIDLE),
1284 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1285 .sysc_fields = &omap_hwmod_sysc_type1,
1286};
1287
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301288static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -07001289 .name = "wd_timer",
1290 .sysc = &omap3xxx_wd_timer_sysc,
1291 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301292};
1293
1294/* wd_timer2 */
1295static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
1296 &omap3xxx_l4_wkup__wd_timer2,
1297};
1298
1299static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1300 .name = "wd_timer2",
1301 .class = &omap3xxx_wd_timer_hwmod_class,
1302 .main_clk = "wdt2_fck",
1303 .prcm = {
1304 .omap2 = {
1305 .prcm_reg_id = 1,
1306 .module_bit = OMAP3430_EN_WDT2_SHIFT,
1307 .module_offs = WKUP_MOD,
1308 .idlest_reg_id = 1,
1309 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1310 },
1311 },
1312 .slaves = omap3xxx_wd_timer2_slaves,
1313 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
1314 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1315};
1316
Kevin Hilman046465b2010-09-27 20:19:30 +05301317/* UART common */
1318
1319static struct omap_hwmod_class_sysconfig uart_sysc = {
1320 .rev_offs = 0x50,
1321 .sysc_offs = 0x54,
1322 .syss_offs = 0x58,
1323 .sysc_flags = (SYSC_HAS_SIDLEMODE |
1324 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1325 SYSC_HAS_AUTOIDLE),
1326 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1327 .sysc_fields = &omap_hwmod_sysc_type1,
1328};
1329
1330static struct omap_hwmod_class uart_class = {
1331 .name = "uart",
1332 .sysc = &uart_sysc,
1333};
1334
1335/* UART1 */
1336
1337static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
1338 { .irq = INT_24XX_UART1_IRQ, },
1339};
1340
1341static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
1342 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
1343 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
1344};
1345
1346static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1347 &omap3_l4_core__uart1,
1348};
1349
1350static struct omap_hwmod omap3xxx_uart1_hwmod = {
1351 .name = "uart1",
1352 .mpu_irqs = uart1_mpu_irqs,
1353 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
1354 .sdma_reqs = uart1_sdma_reqs,
1355 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
1356 .main_clk = "uart1_fck",
1357 .prcm = {
1358 .omap2 = {
1359 .module_offs = CORE_MOD,
1360 .prcm_reg_id = 1,
1361 .module_bit = OMAP3430_EN_UART1_SHIFT,
1362 .idlest_reg_id = 1,
1363 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1364 },
1365 },
1366 .slaves = omap3xxx_uart1_slaves,
1367 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
1368 .class = &uart_class,
1369 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1370};
1371
1372/* UART2 */
1373
1374static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
1375 { .irq = INT_24XX_UART2_IRQ, },
1376};
1377
1378static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
1379 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
1380 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
1381};
1382
1383static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1384 &omap3_l4_core__uart2,
1385};
1386
1387static struct omap_hwmod omap3xxx_uart2_hwmod = {
1388 .name = "uart2",
1389 .mpu_irqs = uart2_mpu_irqs,
1390 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
1391 .sdma_reqs = uart2_sdma_reqs,
1392 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
1393 .main_clk = "uart2_fck",
1394 .prcm = {
1395 .omap2 = {
1396 .module_offs = CORE_MOD,
1397 .prcm_reg_id = 1,
1398 .module_bit = OMAP3430_EN_UART2_SHIFT,
1399 .idlest_reg_id = 1,
1400 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1401 },
1402 },
1403 .slaves = omap3xxx_uart2_slaves,
1404 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
1405 .class = &uart_class,
1406 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1407};
1408
1409/* UART3 */
1410
1411static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
1412 { .irq = INT_24XX_UART3_IRQ, },
1413};
1414
1415static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
1416 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
1417 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
1418};
1419
1420static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1421 &omap3_l4_per__uart3,
1422};
1423
1424static struct omap_hwmod omap3xxx_uart3_hwmod = {
1425 .name = "uart3",
1426 .mpu_irqs = uart3_mpu_irqs,
1427 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
1428 .sdma_reqs = uart3_sdma_reqs,
1429 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
1430 .main_clk = "uart3_fck",
1431 .prcm = {
1432 .omap2 = {
1433 .module_offs = OMAP3430_PER_MOD,
1434 .prcm_reg_id = 1,
1435 .module_bit = OMAP3430_EN_UART3_SHIFT,
1436 .idlest_reg_id = 1,
1437 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1438 },
1439 },
1440 .slaves = omap3xxx_uart3_slaves,
1441 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
1442 .class = &uart_class,
1443 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1444};
1445
1446/* UART4 */
1447
1448static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1449 { .irq = INT_36XX_UART4_IRQ, },
1450};
1451
1452static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1453 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
1454 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
1455};
1456
1457static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
1458 &omap3_l4_per__uart4,
1459};
1460
1461static struct omap_hwmod omap3xxx_uart4_hwmod = {
1462 .name = "uart4",
1463 .mpu_irqs = uart4_mpu_irqs,
1464 .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
1465 .sdma_reqs = uart4_sdma_reqs,
1466 .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
1467 .main_clk = "uart4_fck",
1468 .prcm = {
1469 .omap2 = {
1470 .module_offs = OMAP3430_PER_MOD,
1471 .prcm_reg_id = 1,
1472 .module_bit = OMAP3630_EN_UART4_SHIFT,
1473 .idlest_reg_id = 1,
1474 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1475 },
1476 },
1477 .slaves = omap3xxx_uart4_slaves,
1478 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
1479 .class = &uart_class,
1480 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
1481};
1482
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301483static struct omap_hwmod_class i2c_class = {
1484 .name = "i2c",
1485 .sysc = &i2c_sysc,
1486};
1487
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001488/*
1489 * 'dss' class
1490 * display sub-system
1491 */
1492
1493static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
1494 .rev_offs = 0x0000,
1495 .sysc_offs = 0x0010,
1496 .syss_offs = 0x0014,
1497 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1498 .sysc_fields = &omap_hwmod_sysc_type1,
1499};
1500
1501static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
1502 .name = "dss",
1503 .sysc = &omap3xxx_dss_sysc,
1504};
1505
1506/* dss */
1507static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = {
1508 { .irq = 25 },
1509};
1510
1511static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1512 { .name = "dispc", .dma_req = 5 },
1513 { .name = "dsi1", .dma_req = 74 },
1514};
1515
1516/* dss */
1517/* dss master ports */
1518static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1519 &omap3xxx_dss__l3,
1520};
1521
1522static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = {
1523 {
1524 .pa_start = 0x48050000,
1525 .pa_end = 0x480503FF,
1526 .flags = ADDR_TYPE_RT
1527 },
1528};
1529
1530/* l4_core -> dss */
1531static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1532 .master = &omap3xxx_l4_core_hwmod,
1533 .slave = &omap3430es1_dss_core_hwmod,
1534 .clk = "dss_ick",
1535 .addr = omap3xxx_dss_addrs,
1536 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
1537 .fw = {
1538 .omap2 = {
1539 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1540 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1541 .flags = OMAP_FIREWALL_L4,
1542 }
1543 },
1544 .user = OCP_USER_MPU | OCP_USER_SDMA,
1545};
1546
1547static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1548 .master = &omap3xxx_l4_core_hwmod,
1549 .slave = &omap3xxx_dss_core_hwmod,
1550 .clk = "dss_ick",
1551 .addr = omap3xxx_dss_addrs,
1552 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
1553 .fw = {
1554 .omap2 = {
1555 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1556 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1557 .flags = OMAP_FIREWALL_L4,
1558 }
1559 },
1560 .user = OCP_USER_MPU | OCP_USER_SDMA,
1561};
1562
1563/* dss slave ports */
1564static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
1565 &omap3430es1_l4_core__dss,
1566};
1567
1568static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
1569 &omap3xxx_l4_core__dss,
1570};
1571
1572static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1573 { .role = "tv_clk", .clk = "dss_tv_fck" },
1574 { .role = "dssclk", .clk = "dss_96m_fck" },
1575 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1576};
1577
1578static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1579 .name = "dss_core",
1580 .class = &omap3xxx_dss_hwmod_class,
1581 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
1582 .mpu_irqs = omap3xxx_dss_irqs,
1583 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
1584 .sdma_reqs = omap3xxx_dss_sdma_chs,
1585 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
1586
1587 .prcm = {
1588 .omap2 = {
1589 .prcm_reg_id = 1,
1590 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1591 .module_offs = OMAP3430_DSS_MOD,
1592 .idlest_reg_id = 1,
1593 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
1594 },
1595 },
1596 .opt_clks = dss_opt_clks,
1597 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1598 .slaves = omap3430es1_dss_slaves,
1599 .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
1600 .masters = omap3xxx_dss_masters,
1601 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1602 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
1603 .flags = HWMOD_NO_IDLEST,
1604};
1605
1606static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1607 .name = "dss_core",
1608 .class = &omap3xxx_dss_hwmod_class,
1609 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
1610 .mpu_irqs = omap3xxx_dss_irqs,
1611 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs),
1612 .sdma_reqs = omap3xxx_dss_sdma_chs,
1613 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
1614
1615 .prcm = {
1616 .omap2 = {
1617 .prcm_reg_id = 1,
1618 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1619 .module_offs = OMAP3430_DSS_MOD,
1620 .idlest_reg_id = 1,
1621 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
1622 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
1623 },
1624 },
1625 .opt_clks = dss_opt_clks,
1626 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1627 .slaves = omap3xxx_dss_slaves,
1628 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
1629 .masters = omap3xxx_dss_masters,
1630 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1631 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 |
1632 CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
1633};
1634
1635/*
1636 * 'dispc' class
1637 * display controller
1638 */
1639
1640static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
1641 .rev_offs = 0x0000,
1642 .sysc_offs = 0x0010,
1643 .syss_offs = 0x0014,
1644 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1645 SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
1646 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1647 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1648 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1649 .sysc_fields = &omap_hwmod_sysc_type1,
1650};
1651
1652static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
1653 .name = "dispc",
1654 .sysc = &omap3xxx_dispc_sysc,
1655};
1656
1657static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = {
1658 {
1659 .pa_start = 0x48050400,
1660 .pa_end = 0x480507FF,
1661 .flags = ADDR_TYPE_RT
1662 },
1663};
1664
1665/* l4_core -> dss_dispc */
1666static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1667 .master = &omap3xxx_l4_core_hwmod,
1668 .slave = &omap3xxx_dss_dispc_hwmod,
1669 .clk = "dss_ick",
1670 .addr = omap3xxx_dss_dispc_addrs,
1671 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
1672 .fw = {
1673 .omap2 = {
1674 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1675 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1676 .flags = OMAP_FIREWALL_L4,
1677 }
1678 },
1679 .user = OCP_USER_MPU | OCP_USER_SDMA,
1680};
1681
1682/* dss_dispc slave ports */
1683static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1684 &omap3xxx_l4_core__dss_dispc,
1685};
1686
1687static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1688 .name = "dss_dispc",
1689 .class = &omap3xxx_dispc_hwmod_class,
1690 .main_clk = "dss1_alwon_fck",
1691 .prcm = {
1692 .omap2 = {
1693 .prcm_reg_id = 1,
1694 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1695 .module_offs = OMAP3430_DSS_MOD,
1696 },
1697 },
1698 .slaves = omap3xxx_dss_dispc_slaves,
1699 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
1700 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1701 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1702 CHIP_GE_OMAP3630ES1_1),
1703 .flags = HWMOD_NO_IDLEST,
1704};
1705
1706/*
1707 * 'dsi' class
1708 * display serial interface controller
1709 */
1710
1711static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
1712 .name = "dsi",
1713};
1714
1715/* dss_dsi1 */
1716static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1717 {
1718 .pa_start = 0x4804FC00,
1719 .pa_end = 0x4804FFFF,
1720 .flags = ADDR_TYPE_RT
1721 },
1722};
1723
1724/* l4_core -> dss_dsi1 */
1725static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1726 .master = &omap3xxx_l4_core_hwmod,
1727 .slave = &omap3xxx_dss_dsi1_hwmod,
1728 .addr = omap3xxx_dss_dsi1_addrs,
1729 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs),
1730 .fw = {
1731 .omap2 = {
1732 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1733 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1734 .flags = OMAP_FIREWALL_L4,
1735 }
1736 },
1737 .user = OCP_USER_MPU | OCP_USER_SDMA,
1738};
1739
1740/* dss_dsi1 slave ports */
1741static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
1742 &omap3xxx_l4_core__dss_dsi1,
1743};
1744
1745static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1746 .name = "dss_dsi1",
1747 .class = &omap3xxx_dsi_hwmod_class,
1748 .main_clk = "dss1_alwon_fck",
1749 .prcm = {
1750 .omap2 = {
1751 .prcm_reg_id = 1,
1752 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1753 .module_offs = OMAP3430_DSS_MOD,
1754 },
1755 },
1756 .slaves = omap3xxx_dss_dsi1_slaves,
1757 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
1758 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1759 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1760 CHIP_GE_OMAP3630ES1_1),
1761 .flags = HWMOD_NO_IDLEST,
1762};
1763
1764/*
1765 * 'rfbi' class
1766 * remote frame buffer interface
1767 */
1768
1769static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
1770 .rev_offs = 0x0000,
1771 .sysc_offs = 0x0010,
1772 .syss_offs = 0x0014,
1773 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1774 SYSC_HAS_AUTOIDLE),
1775 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1776 .sysc_fields = &omap_hwmod_sysc_type1,
1777};
1778
1779static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
1780 .name = "rfbi",
1781 .sysc = &omap3xxx_rfbi_sysc,
1782};
1783
1784static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = {
1785 {
1786 .pa_start = 0x48050800,
1787 .pa_end = 0x48050BFF,
1788 .flags = ADDR_TYPE_RT
1789 },
1790};
1791
1792/* l4_core -> dss_rfbi */
1793static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1794 .master = &omap3xxx_l4_core_hwmod,
1795 .slave = &omap3xxx_dss_rfbi_hwmod,
1796 .clk = "dss_ick",
1797 .addr = omap3xxx_dss_rfbi_addrs,
1798 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
1799 .fw = {
1800 .omap2 = {
1801 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1802 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1803 .flags = OMAP_FIREWALL_L4,
1804 }
1805 },
1806 .user = OCP_USER_MPU | OCP_USER_SDMA,
1807};
1808
1809/* dss_rfbi slave ports */
1810static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1811 &omap3xxx_l4_core__dss_rfbi,
1812};
1813
1814static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1815 .name = "dss_rfbi",
1816 .class = &omap3xxx_rfbi_hwmod_class,
1817 .main_clk = "dss1_alwon_fck",
1818 .prcm = {
1819 .omap2 = {
1820 .prcm_reg_id = 1,
1821 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1822 .module_offs = OMAP3430_DSS_MOD,
1823 },
1824 },
1825 .slaves = omap3xxx_dss_rfbi_slaves,
1826 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
1827 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1828 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1829 CHIP_GE_OMAP3630ES1_1),
1830 .flags = HWMOD_NO_IDLEST,
1831};
1832
1833/*
1834 * 'venc' class
1835 * video encoder
1836 */
1837
1838static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
1839 .name = "venc",
1840};
1841
1842/* dss_venc */
1843static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = {
1844 {
1845 .pa_start = 0x48050C00,
1846 .pa_end = 0x48050FFF,
1847 .flags = ADDR_TYPE_RT
1848 },
1849};
1850
1851/* l4_core -> dss_venc */
1852static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1853 .master = &omap3xxx_l4_core_hwmod,
1854 .slave = &omap3xxx_dss_venc_hwmod,
1855 .clk = "dss_tv_fck",
1856 .addr = omap3xxx_dss_venc_addrs,
1857 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
1858 .fw = {
1859 .omap2 = {
1860 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
1861 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1862 .flags = OMAP_FIREWALL_L4,
1863 }
1864 },
1865 .user = OCP_USER_MPU | OCP_USER_SDMA,
1866};
1867
1868/* dss_venc slave ports */
1869static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1870 &omap3xxx_l4_core__dss_venc,
1871};
1872
1873static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1874 .name = "dss_venc",
1875 .class = &omap3xxx_venc_hwmod_class,
1876 .main_clk = "dss1_alwon_fck",
1877 .prcm = {
1878 .omap2 = {
1879 .prcm_reg_id = 1,
1880 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1881 .module_offs = OMAP3430_DSS_MOD,
1882 },
1883 },
1884 .slaves = omap3xxx_dss_venc_slaves,
1885 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
1886 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1887 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1888 CHIP_GE_OMAP3630ES1_1),
1889 .flags = HWMOD_NO_IDLEST,
1890};
1891
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301892/* I2C1 */
1893
1894static struct omap_i2c_dev_attr i2c1_dev_attr = {
1895 .fifo_depth = 8, /* bytes */
1896};
1897
1898static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1899 { .irq = INT_24XX_I2C1_IRQ, },
1900};
1901
1902static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1903 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1904 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1905};
1906
1907static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1908 &omap3_l4_core__i2c1,
1909};
1910
1911static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1912 .name = "i2c1",
1913 .mpu_irqs = i2c1_mpu_irqs,
1914 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
1915 .sdma_reqs = i2c1_sdma_reqs,
1916 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1917 .main_clk = "i2c1_fck",
1918 .prcm = {
1919 .omap2 = {
1920 .module_offs = CORE_MOD,
1921 .prcm_reg_id = 1,
1922 .module_bit = OMAP3430_EN_I2C1_SHIFT,
1923 .idlest_reg_id = 1,
1924 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1925 },
1926 },
1927 .slaves = omap3xxx_i2c1_slaves,
1928 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
1929 .class = &i2c_class,
1930 .dev_attr = &i2c1_dev_attr,
1931 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1932};
1933
1934/* I2C2 */
1935
1936static struct omap_i2c_dev_attr i2c2_dev_attr = {
1937 .fifo_depth = 8, /* bytes */
1938};
1939
1940static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1941 { .irq = INT_24XX_I2C2_IRQ, },
1942};
1943
1944static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1945 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1946 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1947};
1948
1949static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1950 &omap3_l4_core__i2c2,
1951};
1952
1953static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1954 .name = "i2c2",
1955 .mpu_irqs = i2c2_mpu_irqs,
1956 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
1957 .sdma_reqs = i2c2_sdma_reqs,
1958 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1959 .main_clk = "i2c2_fck",
1960 .prcm = {
1961 .omap2 = {
1962 .module_offs = CORE_MOD,
1963 .prcm_reg_id = 1,
1964 .module_bit = OMAP3430_EN_I2C2_SHIFT,
1965 .idlest_reg_id = 1,
1966 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1967 },
1968 },
1969 .slaves = omap3xxx_i2c2_slaves,
1970 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
1971 .class = &i2c_class,
1972 .dev_attr = &i2c2_dev_attr,
1973 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1974};
1975
1976/* I2C3 */
1977
1978static struct omap_i2c_dev_attr i2c3_dev_attr = {
1979 .fifo_depth = 64, /* bytes */
1980};
1981
1982static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1983 { .irq = INT_34XX_I2C3_IRQ, },
1984};
1985
1986static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1987 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
1988 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
1989};
1990
1991static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1992 &omap3_l4_core__i2c3,
1993};
1994
1995static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1996 .name = "i2c3",
1997 .mpu_irqs = i2c3_mpu_irqs,
1998 .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
1999 .sdma_reqs = i2c3_sdma_reqs,
2000 .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
2001 .main_clk = "i2c3_fck",
2002 .prcm = {
2003 .omap2 = {
2004 .module_offs = CORE_MOD,
2005 .prcm_reg_id = 1,
2006 .module_bit = OMAP3430_EN_I2C3_SHIFT,
2007 .idlest_reg_id = 1,
2008 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
2009 },
2010 },
2011 .slaves = omap3xxx_i2c3_slaves,
2012 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
2013 .class = &i2c_class,
2014 .dev_attr = &i2c3_dev_attr,
2015 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2016};
2017
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002018/* l4_wkup -> gpio1 */
2019static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2020 {
2021 .pa_start = 0x48310000,
2022 .pa_end = 0x483101ff,
2023 .flags = ADDR_TYPE_RT
2024 },
2025};
2026
2027static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2028 .master = &omap3xxx_l4_wkup_hwmod,
2029 .slave = &omap3xxx_gpio1_hwmod,
2030 .addr = omap3xxx_gpio1_addrs,
2031 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
2032 .user = OCP_USER_MPU | OCP_USER_SDMA,
2033};
2034
2035/* l4_per -> gpio2 */
2036static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2037 {
2038 .pa_start = 0x49050000,
2039 .pa_end = 0x490501ff,
2040 .flags = ADDR_TYPE_RT
2041 },
2042};
2043
2044static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2045 .master = &omap3xxx_l4_per_hwmod,
2046 .slave = &omap3xxx_gpio2_hwmod,
2047 .addr = omap3xxx_gpio2_addrs,
2048 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
2049 .user = OCP_USER_MPU | OCP_USER_SDMA,
2050};
2051
2052/* l4_per -> gpio3 */
2053static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2054 {
2055 .pa_start = 0x49052000,
2056 .pa_end = 0x490521ff,
2057 .flags = ADDR_TYPE_RT
2058 },
2059};
2060
2061static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2062 .master = &omap3xxx_l4_per_hwmod,
2063 .slave = &omap3xxx_gpio3_hwmod,
2064 .addr = omap3xxx_gpio3_addrs,
2065 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
2066 .user = OCP_USER_MPU | OCP_USER_SDMA,
2067};
2068
2069/* l4_per -> gpio4 */
2070static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2071 {
2072 .pa_start = 0x49054000,
2073 .pa_end = 0x490541ff,
2074 .flags = ADDR_TYPE_RT
2075 },
2076};
2077
2078static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2079 .master = &omap3xxx_l4_per_hwmod,
2080 .slave = &omap3xxx_gpio4_hwmod,
2081 .addr = omap3xxx_gpio4_addrs,
2082 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
2083 .user = OCP_USER_MPU | OCP_USER_SDMA,
2084};
2085
2086/* l4_per -> gpio5 */
2087static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2088 {
2089 .pa_start = 0x49056000,
2090 .pa_end = 0x490561ff,
2091 .flags = ADDR_TYPE_RT
2092 },
2093};
2094
2095static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2096 .master = &omap3xxx_l4_per_hwmod,
2097 .slave = &omap3xxx_gpio5_hwmod,
2098 .addr = omap3xxx_gpio5_addrs,
2099 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
2100 .user = OCP_USER_MPU | OCP_USER_SDMA,
2101};
2102
2103/* l4_per -> gpio6 */
2104static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2105 {
2106 .pa_start = 0x49058000,
2107 .pa_end = 0x490581ff,
2108 .flags = ADDR_TYPE_RT
2109 },
2110};
2111
2112static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2113 .master = &omap3xxx_l4_per_hwmod,
2114 .slave = &omap3xxx_gpio6_hwmod,
2115 .addr = omap3xxx_gpio6_addrs,
2116 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
2117 .user = OCP_USER_MPU | OCP_USER_SDMA,
2118};
2119
2120/*
2121 * 'gpio' class
2122 * general purpose io module
2123 */
2124
2125static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
2126 .rev_offs = 0x0000,
2127 .sysc_offs = 0x0010,
2128 .syss_offs = 0x0014,
2129 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
2130 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2131 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2132 .sysc_fields = &omap_hwmod_sysc_type1,
2133};
2134
2135static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
2136 .name = "gpio",
2137 .sysc = &omap3xxx_gpio_sysc,
2138 .rev = 1,
2139};
2140
2141/* gpio_dev_attr*/
2142static struct omap_gpio_dev_attr gpio_dev_attr = {
2143 .bank_width = 32,
2144 .dbck_flag = true,
2145};
2146
2147/* gpio1 */
2148static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
2149 { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
2150};
2151
2152static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
2153 { .role = "dbclk", .clk = "gpio1_dbck", },
2154};
2155
2156static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
2157 &omap3xxx_l4_wkup__gpio1,
2158};
2159
2160static struct omap_hwmod omap3xxx_gpio1_hwmod = {
2161 .name = "gpio1",
2162 .mpu_irqs = omap3xxx_gpio1_irqs,
2163 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
2164 .main_clk = "gpio1_ick",
2165 .opt_clks = gpio1_opt_clks,
2166 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
2167 .prcm = {
2168 .omap2 = {
2169 .prcm_reg_id = 1,
2170 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
2171 .module_offs = WKUP_MOD,
2172 .idlest_reg_id = 1,
2173 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
2174 },
2175 },
2176 .slaves = omap3xxx_gpio1_slaves,
2177 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
2178 .class = &omap3xxx_gpio_hwmod_class,
2179 .dev_attr = &gpio_dev_attr,
2180 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2181};
2182
2183/* gpio2 */
2184static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
2185 { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
2186};
2187
2188static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
2189 { .role = "dbclk", .clk = "gpio2_dbck", },
2190};
2191
2192static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
2193 &omap3xxx_l4_per__gpio2,
2194};
2195
2196static struct omap_hwmod omap3xxx_gpio2_hwmod = {
2197 .name = "gpio2",
2198 .mpu_irqs = omap3xxx_gpio2_irqs,
2199 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
2200 .main_clk = "gpio2_ick",
2201 .opt_clks = gpio2_opt_clks,
2202 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
2203 .prcm = {
2204 .omap2 = {
2205 .prcm_reg_id = 1,
2206 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
2207 .module_offs = OMAP3430_PER_MOD,
2208 .idlest_reg_id = 1,
2209 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
2210 },
2211 },
2212 .slaves = omap3xxx_gpio2_slaves,
2213 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
2214 .class = &omap3xxx_gpio_hwmod_class,
2215 .dev_attr = &gpio_dev_attr,
2216 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2217};
2218
2219/* gpio3 */
2220static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
2221 { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
2222};
2223
2224static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
2225 { .role = "dbclk", .clk = "gpio3_dbck", },
2226};
2227
2228static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
2229 &omap3xxx_l4_per__gpio3,
2230};
2231
2232static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2233 .name = "gpio3",
2234 .mpu_irqs = omap3xxx_gpio3_irqs,
2235 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
2236 .main_clk = "gpio3_ick",
2237 .opt_clks = gpio3_opt_clks,
2238 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
2239 .prcm = {
2240 .omap2 = {
2241 .prcm_reg_id = 1,
2242 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
2243 .module_offs = OMAP3430_PER_MOD,
2244 .idlest_reg_id = 1,
2245 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
2246 },
2247 },
2248 .slaves = omap3xxx_gpio3_slaves,
2249 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
2250 .class = &omap3xxx_gpio_hwmod_class,
2251 .dev_attr = &gpio_dev_attr,
2252 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2253};
2254
2255/* gpio4 */
2256static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
2257 { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
2258};
2259
2260static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2261 { .role = "dbclk", .clk = "gpio4_dbck", },
2262};
2263
2264static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
2265 &omap3xxx_l4_per__gpio4,
2266};
2267
2268static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2269 .name = "gpio4",
2270 .mpu_irqs = omap3xxx_gpio4_irqs,
2271 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
2272 .main_clk = "gpio4_ick",
2273 .opt_clks = gpio4_opt_clks,
2274 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2275 .prcm = {
2276 .omap2 = {
2277 .prcm_reg_id = 1,
2278 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
2279 .module_offs = OMAP3430_PER_MOD,
2280 .idlest_reg_id = 1,
2281 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
2282 },
2283 },
2284 .slaves = omap3xxx_gpio4_slaves,
2285 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
2286 .class = &omap3xxx_gpio_hwmod_class,
2287 .dev_attr = &gpio_dev_attr,
2288 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2289};
2290
2291/* gpio5 */
2292static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
2293 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
2294};
2295
2296static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2297 { .role = "dbclk", .clk = "gpio5_dbck", },
2298};
2299
2300static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
2301 &omap3xxx_l4_per__gpio5,
2302};
2303
2304static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2305 .name = "gpio5",
2306 .mpu_irqs = omap3xxx_gpio5_irqs,
2307 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
2308 .main_clk = "gpio5_ick",
2309 .opt_clks = gpio5_opt_clks,
2310 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2311 .prcm = {
2312 .omap2 = {
2313 .prcm_reg_id = 1,
2314 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
2315 .module_offs = OMAP3430_PER_MOD,
2316 .idlest_reg_id = 1,
2317 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
2318 },
2319 },
2320 .slaves = omap3xxx_gpio5_slaves,
2321 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
2322 .class = &omap3xxx_gpio_hwmod_class,
2323 .dev_attr = &gpio_dev_attr,
2324 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2325};
2326
2327/* gpio6 */
2328static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
2329 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
2330};
2331
2332static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2333 { .role = "dbclk", .clk = "gpio6_dbck", },
2334};
2335
2336static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
2337 &omap3xxx_l4_per__gpio6,
2338};
2339
2340static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2341 .name = "gpio6",
2342 .mpu_irqs = omap3xxx_gpio6_irqs,
2343 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
2344 .main_clk = "gpio6_ick",
2345 .opt_clks = gpio6_opt_clks,
2346 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2347 .prcm = {
2348 .omap2 = {
2349 .prcm_reg_id = 1,
2350 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
2351 .module_offs = OMAP3430_PER_MOD,
2352 .idlest_reg_id = 1,
2353 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
2354 },
2355 },
2356 .slaves = omap3xxx_gpio6_slaves,
2357 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
2358 .class = &omap3xxx_gpio_hwmod_class,
2359 .dev_attr = &gpio_dev_attr,
2360 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2361};
2362
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002363/* dma_system -> L3 */
2364static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2365 .master = &omap3xxx_dma_system_hwmod,
2366 .slave = &omap3xxx_l3_main_hwmod,
2367 .clk = "core_l3_ick",
2368 .user = OCP_USER_MPU | OCP_USER_SDMA,
2369};
2370
2371/* dma attributes */
2372static struct omap_dma_dev_attr dma_dev_attr = {
2373 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
2374 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
2375 .lch_count = 32,
2376};
2377
2378static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
2379 .rev_offs = 0x0000,
2380 .sysc_offs = 0x002c,
2381 .syss_offs = 0x0028,
2382 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2383 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
2384 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
2385 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2386 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2387 .sysc_fields = &omap_hwmod_sysc_type1,
2388};
2389
2390static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2391 .name = "dma",
2392 .sysc = &omap3xxx_dma_sysc,
2393};
2394
2395/* dma_system */
2396static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
2397 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
2398 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
2399 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
2400 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
2401};
2402
2403static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2404 {
2405 .pa_start = 0x48056000,
2406 .pa_end = 0x4a0560ff,
2407 .flags = ADDR_TYPE_RT
2408 },
2409};
2410
2411/* dma_system master ports */
2412static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
2413 &omap3xxx_dma_system__l3,
2414};
2415
2416/* l4_cfg -> dma_system */
2417static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2418 .master = &omap3xxx_l4_core_hwmod,
2419 .slave = &omap3xxx_dma_system_hwmod,
2420 .clk = "core_l4_ick",
2421 .addr = omap3xxx_dma_system_addrs,
2422 .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
2423 .user = OCP_USER_MPU | OCP_USER_SDMA,
2424};
2425
2426/* dma_system slave ports */
2427static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2428 &omap3xxx_l4_core__dma_system,
2429};
2430
2431static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2432 .name = "dma",
2433 .class = &omap3xxx_dma_hwmod_class,
2434 .mpu_irqs = omap3xxx_dma_system_irqs,
2435 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
2436 .main_clk = "core_l3_ick",
2437 .prcm = {
2438 .omap2 = {
2439 .module_offs = CORE_MOD,
2440 .prcm_reg_id = 1,
2441 .module_bit = OMAP3430_ST_SDMA_SHIFT,
2442 .idlest_reg_id = 1,
2443 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
2444 },
2445 },
2446 .slaves = omap3xxx_dma_system_slaves,
2447 .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
2448 .masters = omap3xxx_dma_system_masters,
2449 .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
2450 .dev_attr = &dma_dev_attr,
2451 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2452 .flags = HWMOD_NO_IDLEST,
2453};
2454
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302455/*
2456 * 'mcbsp' class
2457 * multi channel buffered serial port controller
2458 */
2459
2460static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
2461 .sysc_offs = 0x008c,
2462 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2463 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2464 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2465 .sysc_fields = &omap_hwmod_sysc_type1,
2466 .clockact = 0x2,
2467};
2468
2469static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
2470 .name = "mcbsp",
2471 .sysc = &omap3xxx_mcbsp_sysc,
2472 .rev = MCBSP_CONFIG_TYPE3,
2473};
2474
2475/* mcbsp1 */
2476static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2477 { .name = "irq", .irq = 16 },
2478 { .name = "tx", .irq = 59 },
2479 { .name = "rx", .irq = 60 },
2480};
2481
2482static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
2483 { .name = "rx", .dma_req = 32 },
2484 { .name = "tx", .dma_req = 31 },
2485};
2486
2487static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2488 {
2489 .name = "mpu",
2490 .pa_start = 0x48074000,
2491 .pa_end = 0x480740ff,
2492 .flags = ADDR_TYPE_RT
2493 },
2494};
2495
2496/* l4_core -> mcbsp1 */
2497static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2498 .master = &omap3xxx_l4_core_hwmod,
2499 .slave = &omap3xxx_mcbsp1_hwmod,
2500 .clk = "mcbsp1_ick",
2501 .addr = omap3xxx_mcbsp1_addrs,
2502 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs),
2503 .user = OCP_USER_MPU | OCP_USER_SDMA,
2504};
2505
2506/* mcbsp1 slave ports */
2507static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
2508 &omap3xxx_l4_core__mcbsp1,
2509};
2510
2511static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2512 .name = "mcbsp1",
2513 .class = &omap3xxx_mcbsp_hwmod_class,
2514 .mpu_irqs = omap3xxx_mcbsp1_irqs,
2515 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs),
2516 .sdma_reqs = omap3xxx_mcbsp1_sdma_chs,
2517 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs),
2518 .main_clk = "mcbsp1_fck",
2519 .prcm = {
2520 .omap2 = {
2521 .prcm_reg_id = 1,
2522 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
2523 .module_offs = CORE_MOD,
2524 .idlest_reg_id = 1,
2525 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2526 },
2527 },
2528 .slaves = omap3xxx_mcbsp1_slaves,
2529 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
2530 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2531};
2532
2533/* mcbsp2 */
2534static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2535 { .name = "irq", .irq = 17 },
2536 { .name = "tx", .irq = 62 },
2537 { .name = "rx", .irq = 63 },
2538};
2539
2540static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
2541 { .name = "rx", .dma_req = 34 },
2542 { .name = "tx", .dma_req = 33 },
2543};
2544
2545static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2546 {
2547 .name = "mpu",
2548 .pa_start = 0x49022000,
2549 .pa_end = 0x490220ff,
2550 .flags = ADDR_TYPE_RT
2551 },
2552};
2553
2554/* l4_per -> mcbsp2 */
2555static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2556 .master = &omap3xxx_l4_per_hwmod,
2557 .slave = &omap3xxx_mcbsp2_hwmod,
2558 .clk = "mcbsp2_ick",
2559 .addr = omap3xxx_mcbsp2_addrs,
2560 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs),
2561 .user = OCP_USER_MPU | OCP_USER_SDMA,
2562};
2563
2564/* mcbsp2 slave ports */
2565static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
2566 &omap3xxx_l4_per__mcbsp2,
2567};
2568
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302569static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2570 .sidetone = "mcbsp2_sidetone",
2571};
2572
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302573static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2574 .name = "mcbsp2",
2575 .class = &omap3xxx_mcbsp_hwmod_class,
2576 .mpu_irqs = omap3xxx_mcbsp2_irqs,
2577 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs),
2578 .sdma_reqs = omap3xxx_mcbsp2_sdma_chs,
2579 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs),
2580 .main_clk = "mcbsp2_fck",
2581 .prcm = {
2582 .omap2 = {
2583 .prcm_reg_id = 1,
2584 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2585 .module_offs = OMAP3430_PER_MOD,
2586 .idlest_reg_id = 1,
2587 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2588 },
2589 },
2590 .slaves = omap3xxx_mcbsp2_slaves,
2591 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302592 .dev_attr = &omap34xx_mcbsp2_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302593 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2594};
2595
2596/* mcbsp3 */
2597static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2598 { .name = "irq", .irq = 22 },
2599 { .name = "tx", .irq = 89 },
2600 { .name = "rx", .irq = 90 },
2601};
2602
2603static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
2604 { .name = "rx", .dma_req = 18 },
2605 { .name = "tx", .dma_req = 17 },
2606};
2607
2608static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2609 {
2610 .name = "mpu",
2611 .pa_start = 0x49024000,
2612 .pa_end = 0x490240ff,
2613 .flags = ADDR_TYPE_RT
2614 },
2615};
2616
2617/* l4_per -> mcbsp3 */
2618static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2619 .master = &omap3xxx_l4_per_hwmod,
2620 .slave = &omap3xxx_mcbsp3_hwmod,
2621 .clk = "mcbsp3_ick",
2622 .addr = omap3xxx_mcbsp3_addrs,
2623 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs),
2624 .user = OCP_USER_MPU | OCP_USER_SDMA,
2625};
2626
2627/* mcbsp3 slave ports */
2628static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
2629 &omap3xxx_l4_per__mcbsp3,
2630};
2631
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302632static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
2633 .sidetone = "mcbsp3_sidetone",
2634};
2635
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302636static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2637 .name = "mcbsp3",
2638 .class = &omap3xxx_mcbsp_hwmod_class,
2639 .mpu_irqs = omap3xxx_mcbsp3_irqs,
2640 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs),
2641 .sdma_reqs = omap3xxx_mcbsp3_sdma_chs,
2642 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs),
2643 .main_clk = "mcbsp3_fck",
2644 .prcm = {
2645 .omap2 = {
2646 .prcm_reg_id = 1,
2647 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2648 .module_offs = OMAP3430_PER_MOD,
2649 .idlest_reg_id = 1,
2650 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2651 },
2652 },
2653 .slaves = omap3xxx_mcbsp3_slaves,
2654 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302655 .dev_attr = &omap34xx_mcbsp3_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302656 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2657};
2658
2659/* mcbsp4 */
2660static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
2661 { .name = "irq", .irq = 23 },
2662 { .name = "tx", .irq = 54 },
2663 { .name = "rx", .irq = 55 },
2664};
2665
2666static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2667 { .name = "rx", .dma_req = 20 },
2668 { .name = "tx", .dma_req = 19 },
2669};
2670
2671static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2672 {
2673 .name = "mpu",
2674 .pa_start = 0x49026000,
2675 .pa_end = 0x490260ff,
2676 .flags = ADDR_TYPE_RT
2677 },
2678};
2679
2680/* l4_per -> mcbsp4 */
2681static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2682 .master = &omap3xxx_l4_per_hwmod,
2683 .slave = &omap3xxx_mcbsp4_hwmod,
2684 .clk = "mcbsp4_ick",
2685 .addr = omap3xxx_mcbsp4_addrs,
2686 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs),
2687 .user = OCP_USER_MPU | OCP_USER_SDMA,
2688};
2689
2690/* mcbsp4 slave ports */
2691static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
2692 &omap3xxx_l4_per__mcbsp4,
2693};
2694
2695static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2696 .name = "mcbsp4",
2697 .class = &omap3xxx_mcbsp_hwmod_class,
2698 .mpu_irqs = omap3xxx_mcbsp4_irqs,
2699 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs),
2700 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
2701 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs),
2702 .main_clk = "mcbsp4_fck",
2703 .prcm = {
2704 .omap2 = {
2705 .prcm_reg_id = 1,
2706 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
2707 .module_offs = OMAP3430_PER_MOD,
2708 .idlest_reg_id = 1,
2709 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2710 },
2711 },
2712 .slaves = omap3xxx_mcbsp4_slaves,
2713 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
2714 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2715};
2716
2717/* mcbsp5 */
2718static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
2719 { .name = "irq", .irq = 27 },
2720 { .name = "tx", .irq = 81 },
2721 { .name = "rx", .irq = 82 },
2722};
2723
2724static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2725 { .name = "rx", .dma_req = 22 },
2726 { .name = "tx", .dma_req = 21 },
2727};
2728
2729static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2730 {
2731 .name = "mpu",
2732 .pa_start = 0x48096000,
2733 .pa_end = 0x480960ff,
2734 .flags = ADDR_TYPE_RT
2735 },
2736};
2737
2738/* l4_core -> mcbsp5 */
2739static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2740 .master = &omap3xxx_l4_core_hwmod,
2741 .slave = &omap3xxx_mcbsp5_hwmod,
2742 .clk = "mcbsp5_ick",
2743 .addr = omap3xxx_mcbsp5_addrs,
2744 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs),
2745 .user = OCP_USER_MPU | OCP_USER_SDMA,
2746};
2747
2748/* mcbsp5 slave ports */
2749static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
2750 &omap3xxx_l4_core__mcbsp5,
2751};
2752
2753static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2754 .name = "mcbsp5",
2755 .class = &omap3xxx_mcbsp_hwmod_class,
2756 .mpu_irqs = omap3xxx_mcbsp5_irqs,
2757 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs),
2758 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
2759 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs),
2760 .main_clk = "mcbsp5_fck",
2761 .prcm = {
2762 .omap2 = {
2763 .prcm_reg_id = 1,
2764 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
2765 .module_offs = CORE_MOD,
2766 .idlest_reg_id = 1,
2767 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2768 },
2769 },
2770 .slaves = omap3xxx_mcbsp5_slaves,
2771 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
2772 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2773};
2774/* 'mcbsp sidetone' class */
2775
2776static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2777 .sysc_offs = 0x0010,
2778 .sysc_flags = SYSC_HAS_AUTOIDLE,
2779 .sysc_fields = &omap_hwmod_sysc_type1,
2780};
2781
2782static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
2783 .name = "mcbsp_sidetone",
2784 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
2785};
2786
2787/* mcbsp2_sidetone */
2788static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2789 { .name = "irq", .irq = 4 },
2790};
2791
2792static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2793 {
2794 .name = "sidetone",
2795 .pa_start = 0x49028000,
2796 .pa_end = 0x490280ff,
2797 .flags = ADDR_TYPE_RT
2798 },
2799};
2800
2801/* l4_per -> mcbsp2_sidetone */
2802static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2803 .master = &omap3xxx_l4_per_hwmod,
2804 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2805 .clk = "mcbsp2_ick",
2806 .addr = omap3xxx_mcbsp2_sidetone_addrs,
2807 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs),
2808 .user = OCP_USER_MPU,
2809};
2810
2811/* mcbsp2_sidetone slave ports */
2812static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
2813 &omap3xxx_l4_per__mcbsp2_sidetone,
2814};
2815
2816static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2817 .name = "mcbsp2_sidetone",
2818 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2819 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
2820 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs),
2821 .main_clk = "mcbsp2_fck",
2822 .prcm = {
2823 .omap2 = {
2824 .prcm_reg_id = 1,
2825 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2826 .module_offs = OMAP3430_PER_MOD,
2827 .idlest_reg_id = 1,
2828 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2829 },
2830 },
2831 .slaves = omap3xxx_mcbsp2_sidetone_slaves,
2832 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
2833 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2834};
2835
2836/* mcbsp3_sidetone */
2837static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2838 { .name = "irq", .irq = 5 },
2839};
2840
2841static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2842 {
2843 .name = "sidetone",
2844 .pa_start = 0x4902A000,
2845 .pa_end = 0x4902A0ff,
2846 .flags = ADDR_TYPE_RT
2847 },
2848};
2849
2850/* l4_per -> mcbsp3_sidetone */
2851static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2852 .master = &omap3xxx_l4_per_hwmod,
2853 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2854 .clk = "mcbsp3_ick",
2855 .addr = omap3xxx_mcbsp3_sidetone_addrs,
2856 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs),
2857 .user = OCP_USER_MPU,
2858};
2859
2860/* mcbsp3_sidetone slave ports */
2861static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
2862 &omap3xxx_l4_per__mcbsp3_sidetone,
2863};
2864
2865static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2866 .name = "mcbsp3_sidetone",
2867 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2868 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
2869 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs),
2870 .main_clk = "mcbsp3_fck",
2871 .prcm = {
2872 .omap2 = {
2873 .prcm_reg_id = 1,
2874 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2875 .module_offs = OMAP3430_PER_MOD,
2876 .idlest_reg_id = 1,
2877 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2878 },
2879 },
2880 .slaves = omap3xxx_mcbsp3_sidetone_slaves,
2881 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
2882 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2883};
2884
2885
Thara Gopinathd3442722010-05-29 22:02:24 +05302886/* SR common */
2887static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2888 .clkact_shift = 20,
2889};
2890
2891static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
2892 .sysc_offs = 0x24,
2893 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
2894 .clockact = CLOCKACT_TEST_ICLK,
2895 .sysc_fields = &omap34xx_sr_sysc_fields,
2896};
2897
2898static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2899 .name = "smartreflex",
2900 .sysc = &omap34xx_sr_sysc,
2901 .rev = 1,
2902};
2903
2904static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2905 .sidle_shift = 24,
2906 .enwkup_shift = 26
2907};
2908
2909static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
2910 .sysc_offs = 0x38,
2911 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2912 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
2913 SYSC_NO_CACHE),
2914 .sysc_fields = &omap36xx_sr_sysc_fields,
2915};
2916
2917static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
2918 .name = "smartreflex",
2919 .sysc = &omap36xx_sr_sysc,
2920 .rev = 2,
2921};
2922
2923/* SR1 */
2924static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
2925 &omap3_l4_core__sr1,
2926};
2927
2928static struct omap_hwmod omap34xx_sr1_hwmod = {
2929 .name = "sr1_hwmod",
2930 .class = &omap34xx_smartreflex_hwmod_class,
2931 .main_clk = "sr1_fck",
2932 .vdd_name = "mpu",
2933 .prcm = {
2934 .omap2 = {
2935 .prcm_reg_id = 1,
2936 .module_bit = OMAP3430_EN_SR1_SHIFT,
2937 .module_offs = WKUP_MOD,
2938 .idlest_reg_id = 1,
2939 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2940 },
2941 },
2942 .slaves = omap3_sr1_slaves,
2943 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2944 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
2945 CHIP_IS_OMAP3430ES3_0 |
2946 CHIP_IS_OMAP3430ES3_1),
2947 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2948};
2949
2950static struct omap_hwmod omap36xx_sr1_hwmod = {
2951 .name = "sr1_hwmod",
2952 .class = &omap36xx_smartreflex_hwmod_class,
2953 .main_clk = "sr1_fck",
2954 .vdd_name = "mpu",
2955 .prcm = {
2956 .omap2 = {
2957 .prcm_reg_id = 1,
2958 .module_bit = OMAP3430_EN_SR1_SHIFT,
2959 .module_offs = WKUP_MOD,
2960 .idlest_reg_id = 1,
2961 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2962 },
2963 },
2964 .slaves = omap3_sr1_slaves,
2965 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2966 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
2967};
2968
2969/* SR2 */
2970static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
2971 &omap3_l4_core__sr2,
2972};
2973
2974static struct omap_hwmod omap34xx_sr2_hwmod = {
2975 .name = "sr2_hwmod",
2976 .class = &omap34xx_smartreflex_hwmod_class,
2977 .main_clk = "sr2_fck",
2978 .vdd_name = "core",
2979 .prcm = {
2980 .omap2 = {
2981 .prcm_reg_id = 1,
2982 .module_bit = OMAP3430_EN_SR2_SHIFT,
2983 .module_offs = WKUP_MOD,
2984 .idlest_reg_id = 1,
2985 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2986 },
2987 },
2988 .slaves = omap3_sr2_slaves,
2989 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2990 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
2991 CHIP_IS_OMAP3430ES3_0 |
2992 CHIP_IS_OMAP3430ES3_1),
2993 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2994};
2995
2996static struct omap_hwmod omap36xx_sr2_hwmod = {
2997 .name = "sr2_hwmod",
2998 .class = &omap36xx_smartreflex_hwmod_class,
2999 .main_clk = "sr2_fck",
3000 .vdd_name = "core",
3001 .prcm = {
3002 .omap2 = {
3003 .prcm_reg_id = 1,
3004 .module_bit = OMAP3430_EN_SR2_SHIFT,
3005 .module_offs = WKUP_MOD,
3006 .idlest_reg_id = 1,
3007 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
3008 },
3009 },
3010 .slaves = omap3_sr2_slaves,
3011 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
3012 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
3013};
3014
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003015/*
3016 * 'mailbox' class
3017 * mailbox module allowing communication between the on-chip processors
3018 * using a queued mailbox-interrupt mechanism.
3019 */
3020
3021static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
3022 .rev_offs = 0x000,
3023 .sysc_offs = 0x010,
3024 .syss_offs = 0x014,
3025 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3026 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
3027 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3028 .sysc_fields = &omap_hwmod_sysc_type1,
3029};
3030
3031static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
3032 .name = "mailbox",
3033 .sysc = &omap3xxx_mailbox_sysc,
3034};
3035
3036static struct omap_hwmod omap3xxx_mailbox_hwmod;
3037static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
3038 { .irq = 26 },
3039};
3040
3041static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
3042 {
3043 .pa_start = 0x48094000,
3044 .pa_end = 0x480941ff,
3045 .flags = ADDR_TYPE_RT,
3046 },
3047};
3048
3049/* l4_core -> mailbox */
3050static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3051 .master = &omap3xxx_l4_core_hwmod,
3052 .slave = &omap3xxx_mailbox_hwmod,
3053 .addr = omap3xxx_mailbox_addrs,
3054 .addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs),
3055 .user = OCP_USER_MPU | OCP_USER_SDMA,
3056};
3057
3058/* mailbox slave ports */
3059static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
3060 &omap3xxx_l4_core__mailbox,
3061};
3062
3063static struct omap_hwmod omap3xxx_mailbox_hwmod = {
3064 .name = "mailbox",
3065 .class = &omap3xxx_mailbox_hwmod_class,
3066 .mpu_irqs = omap3xxx_mailbox_irqs,
3067 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs),
3068 .main_clk = "mailboxes_ick",
3069 .prcm = {
3070 .omap2 = {
3071 .prcm_reg_id = 1,
3072 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
3073 .module_offs = CORE_MOD,
3074 .idlest_reg_id = 1,
3075 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
3076 },
3077 },
3078 .slaves = omap3xxx_mailbox_slaves,
3079 .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
3080 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3081};
3082
Charulatha V0f616a42011-02-17 09:53:10 -08003083/* l4 core -> mcspi1 interface */
3084static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
3085 {
3086 .pa_start = 0x48098000,
3087 .pa_end = 0x480980ff,
3088 .flags = ADDR_TYPE_RT,
3089 },
3090};
3091
3092static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3093 .master = &omap3xxx_l4_core_hwmod,
3094 .slave = &omap34xx_mcspi1,
3095 .clk = "mcspi1_ick",
3096 .addr = omap34xx_mcspi1_addr_space,
3097 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
3098 .user = OCP_USER_MPU | OCP_USER_SDMA,
3099};
3100
3101/* l4 core -> mcspi2 interface */
3102static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
3103 {
3104 .pa_start = 0x4809a000,
3105 .pa_end = 0x4809a0ff,
3106 .flags = ADDR_TYPE_RT,
3107 },
3108};
3109
3110static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3111 .master = &omap3xxx_l4_core_hwmod,
3112 .slave = &omap34xx_mcspi2,
3113 .clk = "mcspi2_ick",
3114 .addr = omap34xx_mcspi2_addr_space,
3115 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
3116 .user = OCP_USER_MPU | OCP_USER_SDMA,
3117};
3118
3119/* l4 core -> mcspi3 interface */
3120static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
3121 {
3122 .pa_start = 0x480b8000,
3123 .pa_end = 0x480b80ff,
3124 .flags = ADDR_TYPE_RT,
3125 },
3126};
3127
3128static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3129 .master = &omap3xxx_l4_core_hwmod,
3130 .slave = &omap34xx_mcspi3,
3131 .clk = "mcspi3_ick",
3132 .addr = omap34xx_mcspi3_addr_space,
3133 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
3134 .user = OCP_USER_MPU | OCP_USER_SDMA,
3135};
3136
3137/* l4 core -> mcspi4 interface */
3138static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3139 {
3140 .pa_start = 0x480ba000,
3141 .pa_end = 0x480ba0ff,
3142 .flags = ADDR_TYPE_RT,
3143 },
3144};
3145
3146static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3147 .master = &omap3xxx_l4_core_hwmod,
3148 .slave = &omap34xx_mcspi4,
3149 .clk = "mcspi4_ick",
3150 .addr = omap34xx_mcspi4_addr_space,
3151 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
3152 .user = OCP_USER_MPU | OCP_USER_SDMA,
3153};
3154
3155/*
3156 * 'mcspi' class
3157 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3158 * bus
3159 */
3160
3161static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
3162 .rev_offs = 0x0000,
3163 .sysc_offs = 0x0010,
3164 .syss_offs = 0x0014,
3165 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3166 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3167 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
3168 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3169 .sysc_fields = &omap_hwmod_sysc_type1,
3170};
3171
3172static struct omap_hwmod_class omap34xx_mcspi_class = {
3173 .name = "mcspi",
3174 .sysc = &omap34xx_mcspi_sysc,
3175 .rev = OMAP3_MCSPI_REV,
3176};
3177
3178/* mcspi1 */
3179static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
3180 { .name = "irq", .irq = 65 },
3181};
3182
3183static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
3184 { .name = "tx0", .dma_req = 35 },
3185 { .name = "rx0", .dma_req = 36 },
3186 { .name = "tx1", .dma_req = 37 },
3187 { .name = "rx1", .dma_req = 38 },
3188 { .name = "tx2", .dma_req = 39 },
3189 { .name = "rx2", .dma_req = 40 },
3190 { .name = "tx3", .dma_req = 41 },
3191 { .name = "rx3", .dma_req = 42 },
3192};
3193
3194static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
3195 &omap34xx_l4_core__mcspi1,
3196};
3197
3198static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
3199 .num_chipselect = 4,
3200};
3201
3202static struct omap_hwmod omap34xx_mcspi1 = {
3203 .name = "mcspi1",
3204 .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
3205 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs),
3206 .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
3207 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
3208 .main_clk = "mcspi1_fck",
3209 .prcm = {
3210 .omap2 = {
3211 .module_offs = CORE_MOD,
3212 .prcm_reg_id = 1,
3213 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
3214 .idlest_reg_id = 1,
3215 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
3216 },
3217 },
3218 .slaves = omap34xx_mcspi1_slaves,
3219 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
3220 .class = &omap34xx_mcspi_class,
3221 .dev_attr = &omap_mcspi1_dev_attr,
3222 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3223};
3224
3225/* mcspi2 */
3226static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
3227 { .name = "irq", .irq = 66 },
3228};
3229
3230static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
3231 { .name = "tx0", .dma_req = 43 },
3232 { .name = "rx0", .dma_req = 44 },
3233 { .name = "tx1", .dma_req = 45 },
3234 { .name = "rx1", .dma_req = 46 },
3235};
3236
3237static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
3238 &omap34xx_l4_core__mcspi2,
3239};
3240
3241static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
3242 .num_chipselect = 2,
3243};
3244
3245static struct omap_hwmod omap34xx_mcspi2 = {
3246 .name = "mcspi2",
3247 .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
3248 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs),
3249 .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
3250 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
3251 .main_clk = "mcspi2_fck",
3252 .prcm = {
3253 .omap2 = {
3254 .module_offs = CORE_MOD,
3255 .prcm_reg_id = 1,
3256 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
3257 .idlest_reg_id = 1,
3258 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
3259 },
3260 },
3261 .slaves = omap34xx_mcspi2_slaves,
3262 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
3263 .class = &omap34xx_mcspi_class,
3264 .dev_attr = &omap_mcspi2_dev_attr,
3265 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3266};
3267
3268/* mcspi3 */
3269static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
3270 { .name = "irq", .irq = 91 }, /* 91 */
3271};
3272
3273static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
3274 { .name = "tx0", .dma_req = 15 },
3275 { .name = "rx0", .dma_req = 16 },
3276 { .name = "tx1", .dma_req = 23 },
3277 { .name = "rx1", .dma_req = 24 },
3278};
3279
3280static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
3281 &omap34xx_l4_core__mcspi3,
3282};
3283
3284static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
3285 .num_chipselect = 2,
3286};
3287
3288static struct omap_hwmod omap34xx_mcspi3 = {
3289 .name = "mcspi3",
3290 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
3291 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
3292 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
3293 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
3294 .main_clk = "mcspi3_fck",
3295 .prcm = {
3296 .omap2 = {
3297 .module_offs = CORE_MOD,
3298 .prcm_reg_id = 1,
3299 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
3300 .idlest_reg_id = 1,
3301 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
3302 },
3303 },
3304 .slaves = omap34xx_mcspi3_slaves,
3305 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
3306 .class = &omap34xx_mcspi_class,
3307 .dev_attr = &omap_mcspi3_dev_attr,
3308 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3309};
3310
3311/* SPI4 */
3312static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
3313 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
3314};
3315
3316static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
3317 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
3318 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
3319};
3320
3321static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
3322 &omap34xx_l4_core__mcspi4,
3323};
3324
3325static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
3326 .num_chipselect = 1,
3327};
3328
3329static struct omap_hwmod omap34xx_mcspi4 = {
3330 .name = "mcspi4",
3331 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
3332 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
3333 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
3334 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
3335 .main_clk = "mcspi4_fck",
3336 .prcm = {
3337 .omap2 = {
3338 .module_offs = CORE_MOD,
3339 .prcm_reg_id = 1,
3340 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
3341 .idlest_reg_id = 1,
3342 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
3343 },
3344 },
3345 .slaves = omap34xx_mcspi4_slaves,
3346 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
3347 .class = &omap34xx_mcspi_class,
3348 .dev_attr = &omap_mcspi4_dev_attr,
3349 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3350};
3351
Hema HK870ea2b2011-02-17 12:07:18 +05303352/*
3353 * usbhsotg
3354 */
3355static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
3356 .rev_offs = 0x0400,
3357 .sysc_offs = 0x0404,
3358 .syss_offs = 0x0408,
3359 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
3360 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3361 SYSC_HAS_AUTOIDLE),
3362 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3363 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
3364 .sysc_fields = &omap_hwmod_sysc_type1,
3365};
3366
3367static struct omap_hwmod_class usbotg_class = {
3368 .name = "usbotg",
3369 .sysc = &omap3xxx_usbhsotg_sysc,
3370};
Hema HK870ea2b2011-02-17 12:07:18 +05303371/* usb_otg_hs */
3372static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
3373
3374 { .name = "mc", .irq = 92 },
3375 { .name = "dma", .irq = 93 },
3376};
3377
3378static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3379 .name = "usb_otg_hs",
3380 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
3381 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
3382 .main_clk = "hsotgusb_ick",
3383 .prcm = {
3384 .omap2 = {
3385 .prcm_reg_id = 1,
3386 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
3387 .module_offs = CORE_MOD,
3388 .idlest_reg_id = 1,
3389 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
3390 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
3391 },
3392 },
3393 .masters = omap3xxx_usbhsotg_masters,
3394 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
3395 .slaves = omap3xxx_usbhsotg_slaves,
3396 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
3397 .class = &usbotg_class,
3398
3399 /*
3400 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
3401 * broken when autoidle is enabled
3402 * workaround is to disable the autoidle bit at module level.
3403 */
3404 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
3405 | HWMOD_SWSUP_MSTANDBY,
3406 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
3407};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003408
Hema HK273ff8c2011-02-17 12:07:19 +05303409/* usb_otg_hs */
3410static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
3411
3412 { .name = "mc", .irq = 71 },
3413};
3414
3415static struct omap_hwmod_class am35xx_usbotg_class = {
3416 .name = "am35xx_usbotg",
3417 .sysc = NULL,
3418};
3419
3420static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3421 .name = "am35x_otg_hs",
3422 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
3423 .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
3424 .main_clk = NULL,
3425 .prcm = {
3426 .omap2 = {
3427 },
3428 },
3429 .masters = am35xx_usbhsotg_masters,
3430 .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
3431 .slaves = am35xx_usbhsotg_slaves,
3432 .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
3433 .class = &am35xx_usbotg_class,
3434 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
3435};
Hema HK870ea2b2011-02-17 12:07:18 +05303436
Paul Walmsleyb1636052011-03-01 13:12:56 -08003437/* MMC/SD/SDIO common */
3438
3439static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
3440 .rev_offs = 0x1fc,
3441 .sysc_offs = 0x10,
3442 .syss_offs = 0x14,
3443 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3444 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3445 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
3446 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3447 .sysc_fields = &omap_hwmod_sysc_type1,
3448};
3449
3450static struct omap_hwmod_class omap34xx_mmc_class = {
3451 .name = "mmc",
3452 .sysc = &omap34xx_mmc_sysc,
3453};
3454
3455/* MMC/SD/SDIO1 */
3456
3457static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
3458 { .irq = 83, },
3459};
3460
3461static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
3462 { .name = "tx", .dma_req = 61, },
3463 { .name = "rx", .dma_req = 62, },
3464};
3465
3466static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
3467 { .role = "dbck", .clk = "omap_32k_fck", },
3468};
3469
3470static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
3471 &omap3xxx_l4_core__mmc1,
3472};
3473
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003474static struct omap_mmc_dev_attr mmc1_dev_attr = {
3475 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3476};
3477
Paul Walmsleyb1636052011-03-01 13:12:56 -08003478static struct omap_hwmod omap3xxx_mmc1_hwmod = {
3479 .name = "mmc1",
3480 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
3481 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs),
3482 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
3483 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
3484 .opt_clks = omap34xx_mmc1_opt_clks,
3485 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
3486 .main_clk = "mmchs1_fck",
3487 .prcm = {
3488 .omap2 = {
3489 .module_offs = CORE_MOD,
3490 .prcm_reg_id = 1,
3491 .module_bit = OMAP3430_EN_MMC1_SHIFT,
3492 .idlest_reg_id = 1,
3493 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
3494 },
3495 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003496 .dev_attr = &mmc1_dev_attr,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003497 .slaves = omap3xxx_mmc1_slaves,
3498 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3499 .class = &omap34xx_mmc_class,
3500 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3501};
3502
3503/* MMC/SD/SDIO2 */
3504
3505static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
3506 { .irq = INT_24XX_MMC2_IRQ, },
3507};
3508
3509static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
3510 { .name = "tx", .dma_req = 47, },
3511 { .name = "rx", .dma_req = 48, },
3512};
3513
3514static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
3515 { .role = "dbck", .clk = "omap_32k_fck", },
3516};
3517
3518static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3519 &omap3xxx_l4_core__mmc2,
3520};
3521
3522static struct omap_hwmod omap3xxx_mmc2_hwmod = {
3523 .name = "mmc2",
3524 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
3525 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs),
3526 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
3527 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
3528 .opt_clks = omap34xx_mmc2_opt_clks,
3529 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
3530 .main_clk = "mmchs2_fck",
3531 .prcm = {
3532 .omap2 = {
3533 .module_offs = CORE_MOD,
3534 .prcm_reg_id = 1,
3535 .module_bit = OMAP3430_EN_MMC2_SHIFT,
3536 .idlest_reg_id = 1,
3537 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3538 },
3539 },
3540 .slaves = omap3xxx_mmc2_slaves,
3541 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3542 .class = &omap34xx_mmc_class,
3543 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3544};
3545
3546/* MMC/SD/SDIO3 */
3547
3548static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
3549 { .irq = 94, },
3550};
3551
3552static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
3553 { .name = "tx", .dma_req = 77, },
3554 { .name = "rx", .dma_req = 78, },
3555};
3556
3557static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
3558 { .role = "dbck", .clk = "omap_32k_fck", },
3559};
3560
3561static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3562 &omap3xxx_l4_core__mmc3,
3563};
3564
3565static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3566 .name = "mmc3",
3567 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
3568 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs),
3569 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
3570 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
3571 .opt_clks = omap34xx_mmc3_opt_clks,
3572 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
3573 .main_clk = "mmchs3_fck",
3574 .prcm = {
3575 .omap2 = {
3576 .prcm_reg_id = 1,
3577 .module_bit = OMAP3430_EN_MMC3_SHIFT,
3578 .idlest_reg_id = 1,
3579 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
3580 },
3581 },
3582 .slaves = omap3xxx_mmc3_slaves,
3583 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
3584 .class = &omap34xx_mmc_class,
3585 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3586};
3587
Paul Walmsley73591542010-02-22 22:09:32 -07003588static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06003589 &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003590 &omap3xxx_l4_core_hwmod,
3591 &omap3xxx_l4_per_hwmod,
3592 &omap3xxx_l4_wkup_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003593 &omap3xxx_mmc1_hwmod,
3594 &omap3xxx_mmc2_hwmod,
3595 &omap3xxx_mmc3_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003596 &omap3xxx_mpu_hwmod,
Kevin Hilman540064b2010-07-26 16:34:32 -06003597 &omap3xxx_iva_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07003598
3599 &omap3xxx_timer1_hwmod,
3600 &omap3xxx_timer2_hwmod,
3601 &omap3xxx_timer3_hwmod,
3602 &omap3xxx_timer4_hwmod,
3603 &omap3xxx_timer5_hwmod,
3604 &omap3xxx_timer6_hwmod,
3605 &omap3xxx_timer7_hwmod,
3606 &omap3xxx_timer8_hwmod,
3607 &omap3xxx_timer9_hwmod,
3608 &omap3xxx_timer10_hwmod,
3609 &omap3xxx_timer11_hwmod,
3610 &omap3xxx_timer12_hwmod,
3611
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05303612 &omap3xxx_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05303613 &omap3xxx_uart1_hwmod,
3614 &omap3xxx_uart2_hwmod,
3615 &omap3xxx_uart3_hwmod,
3616 &omap3xxx_uart4_hwmod,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00003617 /* dss class */
3618 &omap3430es1_dss_core_hwmod,
3619 &omap3xxx_dss_core_hwmod,
3620 &omap3xxx_dss_dispc_hwmod,
3621 &omap3xxx_dss_dsi1_hwmod,
3622 &omap3xxx_dss_rfbi_hwmod,
3623 &omap3xxx_dss_venc_hwmod,
3624
3625 /* i2c class */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05303626 &omap3xxx_i2c1_hwmod,
3627 &omap3xxx_i2c2_hwmod,
3628 &omap3xxx_i2c3_hwmod,
Thara Gopinathd3442722010-05-29 22:02:24 +05303629 &omap34xx_sr1_hwmod,
3630 &omap34xx_sr2_hwmod,
3631 &omap36xx_sr1_hwmod,
3632 &omap36xx_sr2_hwmod,
3633
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003634
3635 /* gpio class */
3636 &omap3xxx_gpio1_hwmod,
3637 &omap3xxx_gpio2_hwmod,
3638 &omap3xxx_gpio3_hwmod,
3639 &omap3xxx_gpio4_hwmod,
3640 &omap3xxx_gpio5_hwmod,
3641 &omap3xxx_gpio6_hwmod,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003642
3643 /* dma_system class*/
3644 &omap3xxx_dma_system_hwmod,
Charulatha V0f616a42011-02-17 09:53:10 -08003645
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303646 /* mcbsp class */
3647 &omap3xxx_mcbsp1_hwmod,
3648 &omap3xxx_mcbsp2_hwmod,
3649 &omap3xxx_mcbsp3_hwmod,
3650 &omap3xxx_mcbsp4_hwmod,
3651 &omap3xxx_mcbsp5_hwmod,
3652 &omap3xxx_mcbsp2_sidetone_hwmod,
3653 &omap3xxx_mcbsp3_sidetone_hwmod,
3654
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003655 /* mailbox class */
3656 &omap3xxx_mailbox_hwmod,
3657
Charulatha V0f616a42011-02-17 09:53:10 -08003658 /* mcspi class */
3659 &omap34xx_mcspi1,
3660 &omap34xx_mcspi2,
3661 &omap34xx_mcspi3,
3662 &omap34xx_mcspi4,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003663
Hema HK870ea2b2011-02-17 12:07:18 +05303664 /* usbotg class */
3665 &omap3xxx_usbhsotg_hwmod,
3666
Hema HK273ff8c2011-02-17 12:07:19 +05303667 /* usbotg for am35x */
3668 &am35xx_usbhsotg_hwmod,
3669
Paul Walmsley73591542010-02-22 22:09:32 -07003670 NULL,
3671};
3672
3673int __init omap3xxx_hwmod_init(void)
3674{
Paul Walmsley550c8092011-02-28 11:58:14 -07003675 return omap_hwmod_register(omap3xxx_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07003676}