blob: db86ce90c69fbc769fd1c63005a5ad188e43f33b [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 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley73591542010-02-22 22:09:32 -07005 * 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>
Charulatha Vdc48e5f2011-02-24 15:16:49 +053026#include <plat/mcbsp.h>
Charulatha V0f616a42011-02-17 09:53:10 -080027#include <plat/mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070028#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070029
Paul Walmsley43b40992010-02-22 22:09:34 -070030#include "omap_hwmod_common_data.h"
31
Shweta Gulaticea6b942012-02-29 23:33:37 +010032#include "smartreflex.h"
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;
Keshava Munegowdade231382011-12-15 23:14:44 -070088static struct omap_hwmod omap3xxx_usb_host_hs_hwmod;
89static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod;
Charulatha Vdc48e5f2011-02-24 15:16:49 +053090
Paul Walmsley73591542010-02-22 22:09:32 -070091/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060092static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
93 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -070094 .slave = &omap3xxx_l4_core_hwmod,
95 .user = OCP_USER_MPU | OCP_USER_SDMA,
96};
97
98/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060099static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
100 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -0700101 .slave = &omap3xxx_l4_per_hwmod,
102 .user = OCP_USER_MPU | OCP_USER_SDMA,
103};
104
sricharan4bb194d2011-02-08 22:13:37 +0530105/* L3 taret configuration and error log registers */
106static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
107 { .irq = INT_34XX_L3_DBG_IRQ },
108 { .irq = INT_34XX_L3_APP_IRQ },
Paul Walmsley212738a2011-07-09 19:14:06 -0600109 { .irq = -1 }
sricharan4bb194d2011-02-08 22:13:37 +0530110};
111
112static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
113 {
114 .pa_start = 0x68000000,
115 .pa_end = 0x6800ffff,
116 .flags = ADDR_TYPE_RT,
117 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600118 { }
sricharan4bb194d2011-02-08 22:13:37 +0530119};
120
Paul Walmsley73591542010-02-22 22:09:32 -0700121/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600122static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +0530123 .master = &omap3xxx_mpu_hwmod,
124 .slave = &omap3xxx_l3_main_hwmod,
125 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -0700126 .user = OCP_USER_MPU,
127};
128
129/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600130static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
131 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700132};
133
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +0000134/* DSS -> l3 */
135static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
136 .master = &omap3xxx_dss_core_hwmod,
137 .slave = &omap3xxx_l3_main_hwmod,
138 .fw = {
139 .omap2 = {
140 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
141 .flags = OMAP_FIREWALL_L3,
142 }
143 },
144 .user = OCP_USER_MPU | OCP_USER_SDMA,
145};
146
Paul Walmsley73591542010-02-22 22:09:32 -0700147/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600148static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
149 &omap3xxx_l3_main__l4_core,
150 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700151};
152
153/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600154static struct omap_hwmod omap3xxx_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600155 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -0700156 .class = &l3_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600157 .mpu_irqs = omap3xxx_l3_main_irqs,
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600158 .masters = omap3xxx_l3_main_masters,
159 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
160 .slaves = omap3xxx_l3_main_slaves,
161 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600162 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700163};
164
165static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530166static struct omap_hwmod omap3xxx_uart1_hwmod;
167static struct omap_hwmod omap3xxx_uart2_hwmod;
168static struct omap_hwmod omap3xxx_uart3_hwmod;
169static struct omap_hwmod omap3xxx_uart4_hwmod;
Kyle Manna4bf90f62011-10-18 13:47:41 -0500170static struct omap_hwmod am35xx_uart4_hwmod;
Hema HK870ea2b2011-02-17 12:07:18 +0530171static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -0700172
Hema HK870ea2b2011-02-17 12:07:18 +0530173/* l3_core -> usbhsotg interface */
174static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
175 .master = &omap3xxx_usbhsotg_hwmod,
176 .slave = &omap3xxx_l3_main_hwmod,
177 .clk = "core_l3_ick",
178 .user = OCP_USER_MPU,
179};
Paul Walmsley73591542010-02-22 22:09:32 -0700180
Hema HK273ff8c2011-02-17 12:07:19 +0530181/* l3_core -> am35xx_usbhsotg interface */
182static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
183 .master = &am35xx_usbhsotg_hwmod,
184 .slave = &omap3xxx_l3_main_hwmod,
185 .clk = "core_l3_ick",
186 .user = OCP_USER_MPU,
187};
Paul Walmsley73591542010-02-22 22:09:32 -0700188/* L4_CORE -> L4_WKUP interface */
189static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
190 .master = &omap3xxx_l4_core_hwmod,
191 .slave = &omap3xxx_l4_wkup_hwmod,
192 .user = OCP_USER_MPU | OCP_USER_SDMA,
193};
194
Paul Walmsleyb1636052011-03-01 13:12:56 -0800195/* L4 CORE -> MMC1 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -0800196static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
197 .master = &omap3xxx_l4_core_hwmod,
198 .slave = &omap3xxx_mmc1_hwmod,
199 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600200 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800201 .user = OCP_USER_MPU | OCP_USER_SDMA,
202 .flags = OMAP_FIREWALL_L4
203};
204
205/* L4 CORE -> MMC2 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -0800206static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
207 .master = &omap3xxx_l4_core_hwmod,
208 .slave = &omap3xxx_mmc2_hwmod,
209 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600210 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800211 .user = OCP_USER_MPU | OCP_USER_SDMA,
212 .flags = OMAP_FIREWALL_L4
213};
214
215/* L4 CORE -> MMC3 interface */
216static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
217 {
218 .pa_start = 0x480ad000,
219 .pa_end = 0x480ad1ff,
220 .flags = ADDR_TYPE_RT,
221 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600222 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -0800223};
224
225static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
226 .master = &omap3xxx_l4_core_hwmod,
227 .slave = &omap3xxx_mmc3_hwmod,
228 .clk = "mmchs3_ick",
229 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800230 .user = OCP_USER_MPU | OCP_USER_SDMA,
231 .flags = OMAP_FIREWALL_L4
232};
233
Kevin Hilman046465b2010-09-27 20:19:30 +0530234/* L4 CORE -> UART1 interface */
235static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
236 {
237 .pa_start = OMAP3_UART1_BASE,
238 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
239 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
240 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600241 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530242};
243
244static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
245 .master = &omap3xxx_l4_core_hwmod,
246 .slave = &omap3xxx_uart1_hwmod,
247 .clk = "uart1_ick",
248 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530249 .user = OCP_USER_MPU | OCP_USER_SDMA,
250};
251
252/* L4 CORE -> UART2 interface */
253static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
254 {
255 .pa_start = OMAP3_UART2_BASE,
256 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
257 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
258 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600259 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530260};
261
262static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
263 .master = &omap3xxx_l4_core_hwmod,
264 .slave = &omap3xxx_uart2_hwmod,
265 .clk = "uart2_ick",
266 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530267 .user = OCP_USER_MPU | OCP_USER_SDMA,
268};
269
270/* L4 PER -> UART3 interface */
271static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
272 {
273 .pa_start = OMAP3_UART3_BASE,
274 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
275 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
276 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600277 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530278};
279
280static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
281 .master = &omap3xxx_l4_per_hwmod,
282 .slave = &omap3xxx_uart3_hwmod,
283 .clk = "uart3_ick",
284 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530285 .user = OCP_USER_MPU | OCP_USER_SDMA,
286};
287
288/* L4 PER -> UART4 interface */
289static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
290 {
291 .pa_start = OMAP3_UART4_BASE,
292 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
293 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
294 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600295 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530296};
297
298static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
299 .master = &omap3xxx_l4_per_hwmod,
300 .slave = &omap3xxx_uart4_hwmod,
301 .clk = "uart4_ick",
302 .addr = omap3xxx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530303 .user = OCP_USER_MPU | OCP_USER_SDMA,
304};
305
Kyle Manna4bf90f62011-10-18 13:47:41 -0500306/* AM35xx: L4 CORE -> UART4 interface */
307static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
308 {
309 .pa_start = OMAP3_UART4_AM35XX_BASE,
310 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
311 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
312 },
313};
314
315static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
316 .master = &omap3xxx_l4_core_hwmod,
317 .slave = &am35xx_uart4_hwmod,
318 .clk = "uart4_ick",
319 .addr = am35xx_uart4_addr_space,
320 .user = OCP_USER_MPU | OCP_USER_SDMA,
321};
322
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530323/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530324static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
325 .master = &omap3xxx_l4_core_hwmod,
326 .slave = &omap3xxx_i2c1_hwmod,
327 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600328 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530329 .fw = {
330 .omap2 = {
331 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
332 .l4_prot_group = 7,
333 .flags = OMAP_FIREWALL_L4,
334 }
335 },
336 .user = OCP_USER_MPU | OCP_USER_SDMA,
337};
338
339/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530340static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
341 .master = &omap3xxx_l4_core_hwmod,
342 .slave = &omap3xxx_i2c2_hwmod,
343 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600344 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530345 .fw = {
346 .omap2 = {
347 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
348 .l4_prot_group = 7,
349 .flags = OMAP_FIREWALL_L4,
350 }
351 },
352 .user = OCP_USER_MPU | OCP_USER_SDMA,
353};
354
355/* L4 CORE -> I2C3 interface */
356static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
357 {
358 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -0600359 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530360 .flags = ADDR_TYPE_RT,
361 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600362 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530363};
364
365static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
366 .master = &omap3xxx_l4_core_hwmod,
367 .slave = &omap3xxx_i2c3_hwmod,
368 .clk = "i2c3_ick",
369 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530370 .fw = {
371 .omap2 = {
372 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
373 .l4_prot_group = 7,
374 .flags = OMAP_FIREWALL_L4,
375 }
376 },
377 .user = OCP_USER_MPU | OCP_USER_SDMA,
378};
379
Nishanth Menond62bc782012-02-29 23:33:43 +0100380static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
381 { .irq = 18},
382 { .irq = -1 }
383};
384
385static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
386 { .irq = 19},
387 { .irq = -1 }
388};
389
Thara Gopinathd3442722010-05-29 22:02:24 +0530390/* L4 CORE -> SR1 interface */
391static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
392 {
393 .pa_start = OMAP34XX_SR1_BASE,
394 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
395 .flags = ADDR_TYPE_RT,
396 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600397 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530398};
399
400static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
401 .master = &omap3xxx_l4_core_hwmod,
402 .slave = &omap34xx_sr1_hwmod,
403 .clk = "sr_l4_ick",
404 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530405 .user = OCP_USER_MPU,
406};
407
408/* L4 CORE -> SR1 interface */
409static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
410 {
411 .pa_start = OMAP34XX_SR2_BASE,
412 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
413 .flags = ADDR_TYPE_RT,
414 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600415 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530416};
417
418static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
419 .master = &omap3xxx_l4_core_hwmod,
420 .slave = &omap34xx_sr2_hwmod,
421 .clk = "sr_l4_ick",
422 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530423 .user = OCP_USER_MPU,
424};
425
Hema HK870ea2b2011-02-17 12:07:18 +0530426/*
427* usbhsotg interface data
428*/
429
430static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
431 {
432 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
433 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
434 .flags = ADDR_TYPE_RT
435 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600436 { }
Hema HK870ea2b2011-02-17 12:07:18 +0530437};
438
439/* l4_core -> usbhsotg */
440static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
441 .master = &omap3xxx_l4_core_hwmod,
442 .slave = &omap3xxx_usbhsotg_hwmod,
443 .clk = "l4_ick",
444 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +0530445 .user = OCP_USER_MPU,
446};
447
448static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
449 &omap3xxx_usbhsotg__l3,
450};
451
452static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
453 &omap3xxx_l4_core__usbhsotg,
454};
455
Hema HK273ff8c2011-02-17 12:07:19 +0530456static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
457 {
458 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
459 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
460 .flags = ADDR_TYPE_RT
461 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600462 { }
Hema HK273ff8c2011-02-17 12:07:19 +0530463};
464
465/* l4_core -> usbhsotg */
466static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
467 .master = &omap3xxx_l4_core_hwmod,
468 .slave = &am35xx_usbhsotg_hwmod,
469 .clk = "l4_ick",
470 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +0530471 .user = OCP_USER_MPU,
472};
473
474static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
475 &am35xx_usbhsotg__l3,
476};
477
478static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
479 &am35xx_l4_core__usbhsotg,
480};
Paul Walmsley73591542010-02-22 22:09:32 -0700481/* Slave interfaces on the L4_CORE interconnect */
482static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600483 &omap3xxx_l3_main__l4_core,
Paul Walmsley73591542010-02-22 22:09:32 -0700484};
485
486/* L4 CORE */
487static struct omap_hwmod omap3xxx_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600488 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700489 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700490 .slaves = omap3xxx_l4_core_slaves,
491 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600492 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700493};
494
495/* Slave interfaces on the L4_PER interconnect */
496static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600497 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700498};
499
Paul Walmsley73591542010-02-22 22:09:32 -0700500/* L4 PER */
501static struct omap_hwmod omap3xxx_l4_per_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600502 .name = "l4_per",
Paul Walmsley43b40992010-02-22 22:09:34 -0700503 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700504 .slaves = omap3xxx_l4_per_slaves,
505 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600506 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700507};
508
509/* Slave interfaces on the L4_WKUP interconnect */
510static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
511 &omap3xxx_l4_core__l4_wkup,
512};
513
Paul Walmsley73591542010-02-22 22:09:32 -0700514/* L4 WKUP */
515static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600516 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700517 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700518 .slaves = omap3xxx_l4_wkup_slaves,
519 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600520 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700521};
522
523/* Master interfaces on the MPU device */
524static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600525 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700526};
527
528/* MPU */
529static struct omap_hwmod omap3xxx_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600530 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700531 .class = &mpu_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700532 .main_clk = "arm_fck",
533 .masters = omap3xxx_mpu_masters,
534 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
Paul Walmsley73591542010-02-22 22:09:32 -0700535};
536
Kevin Hilman540064b2010-07-26 16:34:32 -0600537/*
538 * IVA2_2 interface data
539 */
540
541/* IVA2 <- L3 interface */
542static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
543 .master = &omap3xxx_l3_main_hwmod,
544 .slave = &omap3xxx_iva_hwmod,
545 .clk = "iva2_ck",
546 .user = OCP_USER_MPU | OCP_USER_SDMA,
547};
548
549static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
550 &omap3xxx_l3__iva,
551};
552
553/*
554 * IVA2 (IVA2)
555 */
556
557static struct omap_hwmod omap3xxx_iva_hwmod = {
558 .name = "iva",
559 .class = &iva_hwmod_class,
560 .masters = omap3xxx_iva_masters,
561 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
Kevin Hilman540064b2010-07-26 16:34:32 -0600562};
563
Thara Gopinathce722d22011-02-23 00:14:05 -0700564/* timer class */
565static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
566 .rev_offs = 0x0000,
567 .sysc_offs = 0x0010,
568 .syss_offs = 0x0014,
569 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
570 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
571 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
572 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
573 .sysc_fields = &omap_hwmod_sysc_type1,
574};
575
576static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
577 .name = "timer",
578 .sysc = &omap3xxx_timer_1ms_sysc,
579 .rev = OMAP_TIMER_IP_VERSION_1,
580};
581
582static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
583 .rev_offs = 0x0000,
584 .sysc_offs = 0x0010,
585 .syss_offs = 0x0014,
586 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
587 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
588 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
589 .sysc_fields = &omap_hwmod_sysc_type1,
590};
591
592static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
593 .name = "timer",
594 .sysc = &omap3xxx_timer_sysc,
595 .rev = OMAP_TIMER_IP_VERSION_1,
596};
597
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530598/* secure timers dev attribute */
599static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
600 .timer_capability = OMAP_TIMER_SECURE,
601};
602
603/* always-on timers dev attribute */
604static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
605 .timer_capability = OMAP_TIMER_ALWON,
606};
607
608/* pwm timers dev attribute */
609static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
610 .timer_capability = OMAP_TIMER_HAS_PWM,
611};
612
Thara Gopinathce722d22011-02-23 00:14:05 -0700613/* timer1 */
614static struct omap_hwmod omap3xxx_timer1_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700615
616static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
617 {
618 .pa_start = 0x48318000,
619 .pa_end = 0x48318000 + SZ_1K - 1,
620 .flags = ADDR_TYPE_RT
621 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600622 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700623};
624
625/* l4_wkup -> timer1 */
626static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
627 .master = &omap3xxx_l4_wkup_hwmod,
628 .slave = &omap3xxx_timer1_hwmod,
629 .clk = "gpt1_ick",
630 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700631 .user = OCP_USER_MPU | OCP_USER_SDMA,
632};
633
634/* timer1 slave port */
635static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
636 &omap3xxx_l4_wkup__timer1,
637};
638
639/* timer1 hwmod */
640static struct omap_hwmod omap3xxx_timer1_hwmod = {
641 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600642 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700643 .main_clk = "gpt1_fck",
644 .prcm = {
645 .omap2 = {
646 .prcm_reg_id = 1,
647 .module_bit = OMAP3430_EN_GPT1_SHIFT,
648 .module_offs = WKUP_MOD,
649 .idlest_reg_id = 1,
650 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
651 },
652 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530653 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700654 .slaves = omap3xxx_timer1_slaves,
655 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
656 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700657};
658
659/* timer2 */
660static struct omap_hwmod omap3xxx_timer2_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700661
662static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
663 {
664 .pa_start = 0x49032000,
665 .pa_end = 0x49032000 + SZ_1K - 1,
666 .flags = ADDR_TYPE_RT
667 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600668 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700669};
670
671/* l4_per -> timer2 */
672static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
673 .master = &omap3xxx_l4_per_hwmod,
674 .slave = &omap3xxx_timer2_hwmod,
675 .clk = "gpt2_ick",
676 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700677 .user = OCP_USER_MPU | OCP_USER_SDMA,
678};
679
680/* timer2 slave port */
681static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
682 &omap3xxx_l4_per__timer2,
683};
684
685/* timer2 hwmod */
686static struct omap_hwmod omap3xxx_timer2_hwmod = {
687 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600688 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700689 .main_clk = "gpt2_fck",
690 .prcm = {
691 .omap2 = {
692 .prcm_reg_id = 1,
693 .module_bit = OMAP3430_EN_GPT2_SHIFT,
694 .module_offs = OMAP3430_PER_MOD,
695 .idlest_reg_id = 1,
696 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
697 },
698 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530699 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700700 .slaves = omap3xxx_timer2_slaves,
701 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
702 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700703};
704
705/* timer3 */
706static struct omap_hwmod omap3xxx_timer3_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700707
708static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
709 {
710 .pa_start = 0x49034000,
711 .pa_end = 0x49034000 + SZ_1K - 1,
712 .flags = ADDR_TYPE_RT
713 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600714 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700715};
716
717/* l4_per -> timer3 */
718static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
719 .master = &omap3xxx_l4_per_hwmod,
720 .slave = &omap3xxx_timer3_hwmod,
721 .clk = "gpt3_ick",
722 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700723 .user = OCP_USER_MPU | OCP_USER_SDMA,
724};
725
726/* timer3 slave port */
727static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
728 &omap3xxx_l4_per__timer3,
729};
730
731/* timer3 hwmod */
732static struct omap_hwmod omap3xxx_timer3_hwmod = {
733 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600734 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700735 .main_clk = "gpt3_fck",
736 .prcm = {
737 .omap2 = {
738 .prcm_reg_id = 1,
739 .module_bit = OMAP3430_EN_GPT3_SHIFT,
740 .module_offs = OMAP3430_PER_MOD,
741 .idlest_reg_id = 1,
742 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
743 },
744 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530745 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700746 .slaves = omap3xxx_timer3_slaves,
747 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
748 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700749};
750
751/* timer4 */
752static struct omap_hwmod omap3xxx_timer4_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700753
754static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
755 {
756 .pa_start = 0x49036000,
757 .pa_end = 0x49036000 + SZ_1K - 1,
758 .flags = ADDR_TYPE_RT
759 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600760 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700761};
762
763/* l4_per -> timer4 */
764static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
765 .master = &omap3xxx_l4_per_hwmod,
766 .slave = &omap3xxx_timer4_hwmod,
767 .clk = "gpt4_ick",
768 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700769 .user = OCP_USER_MPU | OCP_USER_SDMA,
770};
771
772/* timer4 slave port */
773static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
774 &omap3xxx_l4_per__timer4,
775};
776
777/* timer4 hwmod */
778static struct omap_hwmod omap3xxx_timer4_hwmod = {
779 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600780 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700781 .main_clk = "gpt4_fck",
782 .prcm = {
783 .omap2 = {
784 .prcm_reg_id = 1,
785 .module_bit = OMAP3430_EN_GPT4_SHIFT,
786 .module_offs = OMAP3430_PER_MOD,
787 .idlest_reg_id = 1,
788 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
789 },
790 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530791 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700792 .slaves = omap3xxx_timer4_slaves,
793 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
794 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700795};
796
797/* timer5 */
798static struct omap_hwmod omap3xxx_timer5_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700799
800static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
801 {
802 .pa_start = 0x49038000,
803 .pa_end = 0x49038000 + SZ_1K - 1,
804 .flags = ADDR_TYPE_RT
805 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600806 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700807};
808
809/* l4_per -> timer5 */
810static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
811 .master = &omap3xxx_l4_per_hwmod,
812 .slave = &omap3xxx_timer5_hwmod,
813 .clk = "gpt5_ick",
814 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700815 .user = OCP_USER_MPU | OCP_USER_SDMA,
816};
817
818/* timer5 slave port */
819static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
820 &omap3xxx_l4_per__timer5,
821};
822
823/* timer5 hwmod */
824static struct omap_hwmod omap3xxx_timer5_hwmod = {
825 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600826 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700827 .main_clk = "gpt5_fck",
828 .prcm = {
829 .omap2 = {
830 .prcm_reg_id = 1,
831 .module_bit = OMAP3430_EN_GPT5_SHIFT,
832 .module_offs = OMAP3430_PER_MOD,
833 .idlest_reg_id = 1,
834 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
835 },
836 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530837 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700838 .slaves = omap3xxx_timer5_slaves,
839 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
840 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700841};
842
843/* timer6 */
844static struct omap_hwmod omap3xxx_timer6_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700845
846static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
847 {
848 .pa_start = 0x4903A000,
849 .pa_end = 0x4903A000 + SZ_1K - 1,
850 .flags = ADDR_TYPE_RT
851 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600852 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700853};
854
855/* l4_per -> timer6 */
856static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
857 .master = &omap3xxx_l4_per_hwmod,
858 .slave = &omap3xxx_timer6_hwmod,
859 .clk = "gpt6_ick",
860 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700861 .user = OCP_USER_MPU | OCP_USER_SDMA,
862};
863
864/* timer6 slave port */
865static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
866 &omap3xxx_l4_per__timer6,
867};
868
869/* timer6 hwmod */
870static struct omap_hwmod omap3xxx_timer6_hwmod = {
871 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600872 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700873 .main_clk = "gpt6_fck",
874 .prcm = {
875 .omap2 = {
876 .prcm_reg_id = 1,
877 .module_bit = OMAP3430_EN_GPT6_SHIFT,
878 .module_offs = OMAP3430_PER_MOD,
879 .idlest_reg_id = 1,
880 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
881 },
882 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530883 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700884 .slaves = omap3xxx_timer6_slaves,
885 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
886 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700887};
888
889/* timer7 */
890static struct omap_hwmod omap3xxx_timer7_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700891
892static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
893 {
894 .pa_start = 0x4903C000,
895 .pa_end = 0x4903C000 + SZ_1K - 1,
896 .flags = ADDR_TYPE_RT
897 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600898 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700899};
900
901/* l4_per -> timer7 */
902static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
903 .master = &omap3xxx_l4_per_hwmod,
904 .slave = &omap3xxx_timer7_hwmod,
905 .clk = "gpt7_ick",
906 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700907 .user = OCP_USER_MPU | OCP_USER_SDMA,
908};
909
910/* timer7 slave port */
911static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
912 &omap3xxx_l4_per__timer7,
913};
914
915/* timer7 hwmod */
916static struct omap_hwmod omap3xxx_timer7_hwmod = {
917 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600918 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700919 .main_clk = "gpt7_fck",
920 .prcm = {
921 .omap2 = {
922 .prcm_reg_id = 1,
923 .module_bit = OMAP3430_EN_GPT7_SHIFT,
924 .module_offs = OMAP3430_PER_MOD,
925 .idlest_reg_id = 1,
926 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
927 },
928 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530929 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700930 .slaves = omap3xxx_timer7_slaves,
931 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
932 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700933};
934
935/* timer8 */
936static struct omap_hwmod omap3xxx_timer8_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700937
938static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
939 {
940 .pa_start = 0x4903E000,
941 .pa_end = 0x4903E000 + SZ_1K - 1,
942 .flags = ADDR_TYPE_RT
943 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600944 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700945};
946
947/* l4_per -> timer8 */
948static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
949 .master = &omap3xxx_l4_per_hwmod,
950 .slave = &omap3xxx_timer8_hwmod,
951 .clk = "gpt8_ick",
952 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700953 .user = OCP_USER_MPU | OCP_USER_SDMA,
954};
955
956/* timer8 slave port */
957static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
958 &omap3xxx_l4_per__timer8,
959};
960
961/* timer8 hwmod */
962static struct omap_hwmod omap3xxx_timer8_hwmod = {
963 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600964 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700965 .main_clk = "gpt8_fck",
966 .prcm = {
967 .omap2 = {
968 .prcm_reg_id = 1,
969 .module_bit = OMAP3430_EN_GPT8_SHIFT,
970 .module_offs = OMAP3430_PER_MOD,
971 .idlest_reg_id = 1,
972 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
973 },
974 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530975 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700976 .slaves = omap3xxx_timer8_slaves,
977 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
978 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700979};
980
981/* timer9 */
982static struct omap_hwmod omap3xxx_timer9_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700983
984static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
985 {
986 .pa_start = 0x49040000,
987 .pa_end = 0x49040000 + SZ_1K - 1,
988 .flags = ADDR_TYPE_RT
989 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600990 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700991};
992
993/* l4_per -> timer9 */
994static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
995 .master = &omap3xxx_l4_per_hwmod,
996 .slave = &omap3xxx_timer9_hwmod,
997 .clk = "gpt9_ick",
998 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700999 .user = OCP_USER_MPU | OCP_USER_SDMA,
1000};
1001
1002/* timer9 slave port */
1003static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
1004 &omap3xxx_l4_per__timer9,
1005};
1006
1007/* timer9 hwmod */
1008static struct omap_hwmod omap3xxx_timer9_hwmod = {
1009 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001010 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001011 .main_clk = "gpt9_fck",
1012 .prcm = {
1013 .omap2 = {
1014 .prcm_reg_id = 1,
1015 .module_bit = OMAP3430_EN_GPT9_SHIFT,
1016 .module_offs = OMAP3430_PER_MOD,
1017 .idlest_reg_id = 1,
1018 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
1019 },
1020 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301021 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001022 .slaves = omap3xxx_timer9_slaves,
1023 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
1024 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001025};
1026
1027/* timer10 */
1028static struct omap_hwmod omap3xxx_timer10_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -07001029
Thara Gopinathce722d22011-02-23 00:14:05 -07001030/* l4_core -> timer10 */
1031static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1032 .master = &omap3xxx_l4_core_hwmod,
1033 .slave = &omap3xxx_timer10_hwmod,
1034 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001035 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001036 .user = OCP_USER_MPU | OCP_USER_SDMA,
1037};
1038
1039/* timer10 slave port */
1040static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1041 &omap3xxx_l4_core__timer10,
1042};
1043
1044/* timer10 hwmod */
1045static struct omap_hwmod omap3xxx_timer10_hwmod = {
1046 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001047 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001048 .main_clk = "gpt10_fck",
1049 .prcm = {
1050 .omap2 = {
1051 .prcm_reg_id = 1,
1052 .module_bit = OMAP3430_EN_GPT10_SHIFT,
1053 .module_offs = CORE_MOD,
1054 .idlest_reg_id = 1,
1055 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
1056 },
1057 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301058 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001059 .slaves = omap3xxx_timer10_slaves,
1060 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
1061 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001062};
1063
1064/* timer11 */
1065static struct omap_hwmod omap3xxx_timer11_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -07001066
Thara Gopinathce722d22011-02-23 00:14:05 -07001067/* l4_core -> timer11 */
1068static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1069 .master = &omap3xxx_l4_core_hwmod,
1070 .slave = &omap3xxx_timer11_hwmod,
1071 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001072 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001073 .user = OCP_USER_MPU | OCP_USER_SDMA,
1074};
1075
1076/* timer11 slave port */
1077static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1078 &omap3xxx_l4_core__timer11,
1079};
1080
1081/* timer11 hwmod */
1082static struct omap_hwmod omap3xxx_timer11_hwmod = {
1083 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001084 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001085 .main_clk = "gpt11_fck",
1086 .prcm = {
1087 .omap2 = {
1088 .prcm_reg_id = 1,
1089 .module_bit = OMAP3430_EN_GPT11_SHIFT,
1090 .module_offs = CORE_MOD,
1091 .idlest_reg_id = 1,
1092 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
1093 },
1094 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301095 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001096 .slaves = omap3xxx_timer11_slaves,
1097 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
1098 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001099};
1100
1101/* timer12*/
1102static struct omap_hwmod omap3xxx_timer12_hwmod;
1103static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1104 { .irq = 95, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001105 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -07001106};
1107
1108static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1109 {
1110 .pa_start = 0x48304000,
1111 .pa_end = 0x48304000 + SZ_1K - 1,
1112 .flags = ADDR_TYPE_RT
1113 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001114 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07001115};
1116
1117/* l4_core -> timer12 */
1118static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1119 .master = &omap3xxx_l4_core_hwmod,
1120 .slave = &omap3xxx_timer12_hwmod,
1121 .clk = "gpt12_ick",
1122 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001123 .user = OCP_USER_MPU | OCP_USER_SDMA,
1124};
1125
1126/* timer12 slave port */
1127static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1128 &omap3xxx_l4_core__timer12,
1129};
1130
1131/* timer12 hwmod */
1132static struct omap_hwmod omap3xxx_timer12_hwmod = {
1133 .name = "timer12",
1134 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001135 .main_clk = "gpt12_fck",
1136 .prcm = {
1137 .omap2 = {
1138 .prcm_reg_id = 1,
1139 .module_bit = OMAP3430_EN_GPT12_SHIFT,
1140 .module_offs = WKUP_MOD,
1141 .idlest_reg_id = 1,
1142 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
1143 },
1144 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301145 .dev_attr = &capability_secure_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001146 .slaves = omap3xxx_timer12_slaves,
1147 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
1148 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001149};
1150
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301151/* l4_wkup -> wd_timer2 */
1152static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1153 {
1154 .pa_start = 0x48314000,
1155 .pa_end = 0x4831407f,
1156 .flags = ADDR_TYPE_RT
1157 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001158 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301159};
1160
1161static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1162 .master = &omap3xxx_l4_wkup_hwmod,
1163 .slave = &omap3xxx_wd_timer2_hwmod,
1164 .clk = "wdt2_ick",
1165 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301166 .user = OCP_USER_MPU | OCP_USER_SDMA,
1167};
1168
1169/*
1170 * 'wd_timer' class
1171 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1172 * overflow condition
1173 */
1174
1175static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
1176 .rev_offs = 0x0000,
1177 .sysc_offs = 0x0010,
1178 .syss_offs = 0x0014,
1179 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
1180 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001181 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1182 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301183 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1184 .sysc_fields = &omap_hwmod_sysc_type1,
1185};
1186
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301187/* I2C common */
1188static struct omap_hwmod_class_sysconfig i2c_sysc = {
1189 .rev_offs = 0x00,
1190 .sysc_offs = 0x20,
1191 .syss_offs = 0x10,
1192 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1193 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001194 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301195 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301196 .clockact = CLOCKACT_TEST_ICLK,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301197 .sysc_fields = &omap_hwmod_sysc_type1,
1198};
1199
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301200static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -07001201 .name = "wd_timer",
1202 .sysc = &omap3xxx_wd_timer_sysc,
1203 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301204};
1205
1206/* wd_timer2 */
1207static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
1208 &omap3xxx_l4_wkup__wd_timer2,
1209};
1210
1211static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1212 .name = "wd_timer2",
1213 .class = &omap3xxx_wd_timer_hwmod_class,
1214 .main_clk = "wdt2_fck",
1215 .prcm = {
1216 .omap2 = {
1217 .prcm_reg_id = 1,
1218 .module_bit = OMAP3430_EN_WDT2_SHIFT,
1219 .module_offs = WKUP_MOD,
1220 .idlest_reg_id = 1,
1221 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1222 },
1223 },
1224 .slaves = omap3xxx_wd_timer2_slaves,
1225 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
Paul Walmsley2f4dd592011-03-10 22:40:06 -07001226 /*
1227 * XXX: Use software supervised mode, HW supervised smartidle seems to
1228 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
1229 */
1230 .flags = HWMOD_SWSUP_SIDLE,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301231};
1232
Kevin Hilman046465b2010-09-27 20:19:30 +05301233/* UART1 */
1234
Kevin Hilman046465b2010-09-27 20:19:30 +05301235static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1236 &omap3_l4_core__uart1,
1237};
1238
1239static struct omap_hwmod omap3xxx_uart1_hwmod = {
1240 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001241 .mpu_irqs = omap2_uart1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001242 .sdma_reqs = omap2_uart1_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301243 .main_clk = "uart1_fck",
1244 .prcm = {
1245 .omap2 = {
1246 .module_offs = CORE_MOD,
1247 .prcm_reg_id = 1,
1248 .module_bit = OMAP3430_EN_UART1_SHIFT,
1249 .idlest_reg_id = 1,
1250 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1251 },
1252 },
1253 .slaves = omap3xxx_uart1_slaves,
1254 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001255 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301256};
1257
1258/* UART2 */
1259
Kevin Hilman046465b2010-09-27 20:19:30 +05301260static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1261 &omap3_l4_core__uart2,
1262};
1263
1264static struct omap_hwmod omap3xxx_uart2_hwmod = {
1265 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001266 .mpu_irqs = omap2_uart2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001267 .sdma_reqs = omap2_uart2_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301268 .main_clk = "uart2_fck",
1269 .prcm = {
1270 .omap2 = {
1271 .module_offs = CORE_MOD,
1272 .prcm_reg_id = 1,
1273 .module_bit = OMAP3430_EN_UART2_SHIFT,
1274 .idlest_reg_id = 1,
1275 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1276 },
1277 },
1278 .slaves = omap3xxx_uart2_slaves,
1279 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001280 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301281};
1282
1283/* UART3 */
1284
Kevin Hilman046465b2010-09-27 20:19:30 +05301285static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1286 &omap3_l4_per__uart3,
1287};
1288
1289static struct omap_hwmod omap3xxx_uart3_hwmod = {
1290 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001291 .mpu_irqs = omap2_uart3_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001292 .sdma_reqs = omap2_uart3_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301293 .main_clk = "uart3_fck",
1294 .prcm = {
1295 .omap2 = {
1296 .module_offs = OMAP3430_PER_MOD,
1297 .prcm_reg_id = 1,
1298 .module_bit = OMAP3430_EN_UART3_SHIFT,
1299 .idlest_reg_id = 1,
1300 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1301 },
1302 },
1303 .slaves = omap3xxx_uart3_slaves,
1304 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001305 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301306};
1307
1308/* UART4 */
1309
1310static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1311 { .irq = INT_36XX_UART4_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001312 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301313};
1314
1315static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1316 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
1317 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
Paul Walmsleybc614952011-07-09 19:14:07 -06001318 { .dma_req = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301319};
1320
1321static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
1322 &omap3_l4_per__uart4,
1323};
1324
1325static struct omap_hwmod omap3xxx_uart4_hwmod = {
1326 .name = "uart4",
1327 .mpu_irqs = uart4_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301328 .sdma_reqs = uart4_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301329 .main_clk = "uart4_fck",
1330 .prcm = {
1331 .omap2 = {
1332 .module_offs = OMAP3430_PER_MOD,
1333 .prcm_reg_id = 1,
1334 .module_bit = OMAP3630_EN_UART4_SHIFT,
1335 .idlest_reg_id = 1,
1336 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1337 },
1338 },
1339 .slaves = omap3xxx_uart4_slaves,
1340 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001341 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301342};
1343
Kyle Manna4bf90f62011-10-18 13:47:41 -05001344static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
1345 { .irq = INT_35XX_UART4_IRQ, },
1346};
1347
1348static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
1349 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
1350 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
1351};
1352
1353static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = {
1354 &am35xx_l4_core__uart4,
1355};
1356
1357static struct omap_hwmod am35xx_uart4_hwmod = {
1358 .name = "uart4",
1359 .mpu_irqs = am35xx_uart4_mpu_irqs,
1360 .sdma_reqs = am35xx_uart4_sdma_reqs,
1361 .main_clk = "uart4_fck",
1362 .prcm = {
1363 .omap2 = {
1364 .module_offs = CORE_MOD,
1365 .prcm_reg_id = 1,
1366 .module_bit = OMAP3430_EN_UART4_SHIFT,
1367 .idlest_reg_id = 1,
1368 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
1369 },
1370 },
1371 .slaves = am35xx_uart4_slaves,
1372 .slaves_cnt = ARRAY_SIZE(am35xx_uart4_slaves),
1373 .class = &omap2_uart_class,
1374};
1375
1376
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301377static struct omap_hwmod_class i2c_class = {
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06001378 .name = "i2c",
1379 .sysc = &i2c_sysc,
1380 .rev = OMAP_I2C_IP_VERSION_1,
1381 .reset = &omap_i2c_reset,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301382};
1383
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001384static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1385 { .name = "dispc", .dma_req = 5 },
1386 { .name = "dsi1", .dma_req = 74 },
Paul Walmsleybc614952011-07-09 19:14:07 -06001387 { .dma_req = -1 }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001388};
1389
1390/* dss */
1391/* dss master ports */
1392static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1393 &omap3xxx_dss__l3,
1394};
1395
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001396/* l4_core -> dss */
1397static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1398 .master = &omap3xxx_l4_core_hwmod,
1399 .slave = &omap3430es1_dss_core_hwmod,
1400 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001401 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001402 .fw = {
1403 .omap2 = {
1404 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1405 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1406 .flags = OMAP_FIREWALL_L4,
1407 }
1408 },
1409 .user = OCP_USER_MPU | OCP_USER_SDMA,
1410};
1411
1412static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1413 .master = &omap3xxx_l4_core_hwmod,
1414 .slave = &omap3xxx_dss_core_hwmod,
1415 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001416 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001417 .fw = {
1418 .omap2 = {
1419 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1420 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1421 .flags = OMAP_FIREWALL_L4,
1422 }
1423 },
1424 .user = OCP_USER_MPU | OCP_USER_SDMA,
1425};
1426
1427/* dss slave ports */
1428static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
1429 &omap3430es1_l4_core__dss,
1430};
1431
1432static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
1433 &omap3xxx_l4_core__dss,
1434};
1435
1436static struct omap_hwmod_opt_clk dss_opt_clks[] = {
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001437 /*
1438 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
1439 * driver does not use these clocks.
1440 */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001441 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001442 { .role = "tv_clk", .clk = "dss_tv_fck" },
1443 /* required only on OMAP3430 */
1444 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001445};
1446
1447static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1448 .name = "dss_core",
Paul Walmsley273b9462011-07-09 19:14:08 -06001449 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001450 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001451 .sdma_reqs = omap3xxx_dss_sdma_chs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001452 .prcm = {
1453 .omap2 = {
1454 .prcm_reg_id = 1,
1455 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1456 .module_offs = OMAP3430_DSS_MOD,
1457 .idlest_reg_id = 1,
1458 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
1459 },
1460 },
1461 .opt_clks = dss_opt_clks,
1462 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1463 .slaves = omap3430es1_dss_slaves,
1464 .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
1465 .masters = omap3xxx_dss_masters,
1466 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001467 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001468};
1469
1470static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1471 .name = "dss_core",
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001472 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley273b9462011-07-09 19:14:08 -06001473 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001474 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001475 .sdma_reqs = omap3xxx_dss_sdma_chs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001476 .prcm = {
1477 .omap2 = {
1478 .prcm_reg_id = 1,
1479 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1480 .module_offs = OMAP3430_DSS_MOD,
1481 .idlest_reg_id = 1,
1482 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
1483 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
1484 },
1485 },
1486 .opt_clks = dss_opt_clks,
1487 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1488 .slaves = omap3xxx_dss_slaves,
1489 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
1490 .masters = omap3xxx_dss_masters,
1491 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001492};
1493
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +02001494/*
1495 * 'dispc' class
1496 * display controller
1497 */
1498
1499static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
1500 .rev_offs = 0x0000,
1501 .sysc_offs = 0x0010,
1502 .syss_offs = 0x0014,
1503 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
Tomi Valkeinenb0a85fa2012-01-23 14:15:29 +02001504 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1505 SYSC_HAS_ENAWAKEUP),
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +02001506 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1507 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1508 .sysc_fields = &omap_hwmod_sysc_type1,
1509};
1510
1511static struct omap_hwmod_class omap3_dispc_hwmod_class = {
1512 .name = "dispc",
1513 .sysc = &omap3_dispc_sysc,
1514};
1515
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001516/* l4_core -> dss_dispc */
1517static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1518 .master = &omap3xxx_l4_core_hwmod,
1519 .slave = &omap3xxx_dss_dispc_hwmod,
1520 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001521 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001522 .fw = {
1523 .omap2 = {
1524 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1525 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1526 .flags = OMAP_FIREWALL_L4,
1527 }
1528 },
1529 .user = OCP_USER_MPU | OCP_USER_SDMA,
1530};
1531
1532/* dss_dispc slave ports */
1533static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1534 &omap3xxx_l4_core__dss_dispc,
1535};
1536
1537static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1538 .name = "dss_dispc",
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +02001539 .class = &omap3_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001540 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001541 .main_clk = "dss1_alwon_fck",
1542 .prcm = {
1543 .omap2 = {
1544 .prcm_reg_id = 1,
1545 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1546 .module_offs = OMAP3430_DSS_MOD,
1547 },
1548 },
1549 .slaves = omap3xxx_dss_dispc_slaves,
1550 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001551 .flags = HWMOD_NO_IDLEST,
Archit Tanejab923d402011-10-06 18:04:08 -06001552 .dev_attr = &omap2_3_dss_dispc_dev_attr
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001553};
1554
1555/*
1556 * 'dsi' class
1557 * display serial interface controller
1558 */
1559
1560static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
1561 .name = "dsi",
1562};
1563
archit tanejaaffe3602011-02-23 08:41:03 +00001564static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1565 { .irq = 25 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001566 { .irq = -1 }
archit tanejaaffe3602011-02-23 08:41:03 +00001567};
1568
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001569/* dss_dsi1 */
1570static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1571 {
1572 .pa_start = 0x4804FC00,
1573 .pa_end = 0x4804FFFF,
1574 .flags = ADDR_TYPE_RT
1575 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001576 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001577};
1578
1579/* l4_core -> dss_dsi1 */
1580static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1581 .master = &omap3xxx_l4_core_hwmod,
1582 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001583 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001584 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001585 .fw = {
1586 .omap2 = {
1587 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1588 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1589 .flags = OMAP_FIREWALL_L4,
1590 }
1591 },
1592 .user = OCP_USER_MPU | OCP_USER_SDMA,
1593};
1594
1595/* dss_dsi1 slave ports */
1596static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
1597 &omap3xxx_l4_core__dss_dsi1,
1598};
1599
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001600static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1601 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1602};
1603
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001604static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1605 .name = "dss_dsi1",
1606 .class = &omap3xxx_dsi_hwmod_class,
archit tanejaaffe3602011-02-23 08:41:03 +00001607 .mpu_irqs = omap3xxx_dsi1_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001608 .main_clk = "dss1_alwon_fck",
1609 .prcm = {
1610 .omap2 = {
1611 .prcm_reg_id = 1,
1612 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1613 .module_offs = OMAP3430_DSS_MOD,
1614 },
1615 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001616 .opt_clks = dss_dsi1_opt_clks,
1617 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001618 .slaves = omap3xxx_dss_dsi1_slaves,
1619 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001620 .flags = HWMOD_NO_IDLEST,
1621};
1622
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001623/* l4_core -> dss_rfbi */
1624static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1625 .master = &omap3xxx_l4_core_hwmod,
1626 .slave = &omap3xxx_dss_rfbi_hwmod,
1627 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001628 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001629 .fw = {
1630 .omap2 = {
1631 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1632 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1633 .flags = OMAP_FIREWALL_L4,
1634 }
1635 },
1636 .user = OCP_USER_MPU | OCP_USER_SDMA,
1637};
1638
1639/* dss_rfbi slave ports */
1640static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1641 &omap3xxx_l4_core__dss_rfbi,
1642};
1643
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001644static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1645 { .role = "ick", .clk = "dss_ick" },
1646};
1647
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001648static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1649 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -06001650 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001651 .main_clk = "dss1_alwon_fck",
1652 .prcm = {
1653 .omap2 = {
1654 .prcm_reg_id = 1,
1655 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1656 .module_offs = OMAP3430_DSS_MOD,
1657 },
1658 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001659 .opt_clks = dss_rfbi_opt_clks,
1660 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001661 .slaves = omap3xxx_dss_rfbi_slaves,
1662 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001663 .flags = HWMOD_NO_IDLEST,
1664};
1665
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001666/* l4_core -> dss_venc */
1667static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1668 .master = &omap3xxx_l4_core_hwmod,
1669 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001670 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001671 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001672 .fw = {
1673 .omap2 = {
1674 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_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_venc slave ports */
1683static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1684 &omap3xxx_l4_core__dss_venc,
1685};
1686
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001687static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
1688 /* required only on OMAP3430 */
1689 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
1690};
1691
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001692static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1693 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001694 .class = &omap2_venc_hwmod_class,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001695 .main_clk = "dss_tv_fck",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001696 .prcm = {
1697 .omap2 = {
1698 .prcm_reg_id = 1,
1699 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1700 .module_offs = OMAP3430_DSS_MOD,
1701 },
1702 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001703 .opt_clks = dss_venc_opt_clks,
1704 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001705 .slaves = omap3xxx_dss_venc_slaves,
1706 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001707 .flags = HWMOD_NO_IDLEST,
1708};
1709
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301710/* I2C1 */
1711
1712static struct omap_i2c_dev_attr i2c1_dev_attr = {
1713 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001714 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1715 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1716 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301717};
1718
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301719static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1720 &omap3_l4_core__i2c1,
1721};
1722
1723static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1724 .name = "i2c1",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301725 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001726 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001727 .sdma_reqs = omap2_i2c1_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301728 .main_clk = "i2c1_fck",
1729 .prcm = {
1730 .omap2 = {
1731 .module_offs = CORE_MOD,
1732 .prcm_reg_id = 1,
1733 .module_bit = OMAP3430_EN_I2C1_SHIFT,
1734 .idlest_reg_id = 1,
1735 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1736 },
1737 },
1738 .slaves = omap3xxx_i2c1_slaves,
1739 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
1740 .class = &i2c_class,
1741 .dev_attr = &i2c1_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301742};
1743
1744/* I2C2 */
1745
1746static struct omap_i2c_dev_attr i2c2_dev_attr = {
1747 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001748 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1749 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1750 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301751};
1752
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301753static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1754 &omap3_l4_core__i2c2,
1755};
1756
1757static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1758 .name = "i2c2",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301759 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001760 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001761 .sdma_reqs = omap2_i2c2_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301762 .main_clk = "i2c2_fck",
1763 .prcm = {
1764 .omap2 = {
1765 .module_offs = CORE_MOD,
1766 .prcm_reg_id = 1,
1767 .module_bit = OMAP3430_EN_I2C2_SHIFT,
1768 .idlest_reg_id = 1,
1769 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1770 },
1771 },
1772 .slaves = omap3xxx_i2c2_slaves,
1773 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
1774 .class = &i2c_class,
1775 .dev_attr = &i2c2_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301776};
1777
1778/* I2C3 */
1779
1780static struct omap_i2c_dev_attr i2c3_dev_attr = {
1781 .fifo_depth = 64, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001782 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1783 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1784 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301785};
1786
1787static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1788 { .irq = INT_34XX_I2C3_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001789 { .irq = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301790};
1791
1792static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1793 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
1794 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
Paul Walmsleybc614952011-07-09 19:14:07 -06001795 { .dma_req = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301796};
1797
1798static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1799 &omap3_l4_core__i2c3,
1800};
1801
1802static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1803 .name = "i2c3",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301804 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301805 .mpu_irqs = i2c3_mpu_irqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301806 .sdma_reqs = i2c3_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301807 .main_clk = "i2c3_fck",
1808 .prcm = {
1809 .omap2 = {
1810 .module_offs = CORE_MOD,
1811 .prcm_reg_id = 1,
1812 .module_bit = OMAP3430_EN_I2C3_SHIFT,
1813 .idlest_reg_id = 1,
1814 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
1815 },
1816 },
1817 .slaves = omap3xxx_i2c3_slaves,
1818 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
1819 .class = &i2c_class,
1820 .dev_attr = &i2c3_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301821};
1822
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001823/* l4_wkup -> gpio1 */
1824static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
1825 {
1826 .pa_start = 0x48310000,
1827 .pa_end = 0x483101ff,
1828 .flags = ADDR_TYPE_RT
1829 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001830 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001831};
1832
1833static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
1834 .master = &omap3xxx_l4_wkup_hwmod,
1835 .slave = &omap3xxx_gpio1_hwmod,
1836 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001837 .user = OCP_USER_MPU | OCP_USER_SDMA,
1838};
1839
1840/* l4_per -> gpio2 */
1841static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
1842 {
1843 .pa_start = 0x49050000,
1844 .pa_end = 0x490501ff,
1845 .flags = ADDR_TYPE_RT
1846 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001847 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001848};
1849
1850static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
1851 .master = &omap3xxx_l4_per_hwmod,
1852 .slave = &omap3xxx_gpio2_hwmod,
1853 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001854 .user = OCP_USER_MPU | OCP_USER_SDMA,
1855};
1856
1857/* l4_per -> gpio3 */
1858static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
1859 {
1860 .pa_start = 0x49052000,
1861 .pa_end = 0x490521ff,
1862 .flags = ADDR_TYPE_RT
1863 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001864 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001865};
1866
1867static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
1868 .master = &omap3xxx_l4_per_hwmod,
1869 .slave = &omap3xxx_gpio3_hwmod,
1870 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001871 .user = OCP_USER_MPU | OCP_USER_SDMA,
1872};
1873
1874/* l4_per -> gpio4 */
1875static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
1876 {
1877 .pa_start = 0x49054000,
1878 .pa_end = 0x490541ff,
1879 .flags = ADDR_TYPE_RT
1880 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001881 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001882};
1883
1884static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
1885 .master = &omap3xxx_l4_per_hwmod,
1886 .slave = &omap3xxx_gpio4_hwmod,
1887 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001888 .user = OCP_USER_MPU | OCP_USER_SDMA,
1889};
1890
1891/* l4_per -> gpio5 */
1892static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
1893 {
1894 .pa_start = 0x49056000,
1895 .pa_end = 0x490561ff,
1896 .flags = ADDR_TYPE_RT
1897 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001898 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001899};
1900
1901static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
1902 .master = &omap3xxx_l4_per_hwmod,
1903 .slave = &omap3xxx_gpio5_hwmod,
1904 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001905 .user = OCP_USER_MPU | OCP_USER_SDMA,
1906};
1907
1908/* l4_per -> gpio6 */
1909static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
1910 {
1911 .pa_start = 0x49058000,
1912 .pa_end = 0x490581ff,
1913 .flags = ADDR_TYPE_RT
1914 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001915 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001916};
1917
1918static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
1919 .master = &omap3xxx_l4_per_hwmod,
1920 .slave = &omap3xxx_gpio6_hwmod,
1921 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001922 .user = OCP_USER_MPU | OCP_USER_SDMA,
1923};
1924
1925/*
1926 * 'gpio' class
1927 * general purpose io module
1928 */
1929
1930static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
1931 .rev_offs = 0x0000,
1932 .sysc_offs = 0x0010,
1933 .syss_offs = 0x0014,
1934 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001935 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1936 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001937 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1938 .sysc_fields = &omap_hwmod_sysc_type1,
1939};
1940
1941static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
1942 .name = "gpio",
1943 .sysc = &omap3xxx_gpio_sysc,
1944 .rev = 1,
1945};
1946
1947/* gpio_dev_attr*/
1948static struct omap_gpio_dev_attr gpio_dev_attr = {
1949 .bank_width = 32,
1950 .dbck_flag = true,
1951};
1952
1953/* gpio1 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001954static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1955 { .role = "dbclk", .clk = "gpio1_dbck", },
1956};
1957
1958static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
1959 &omap3xxx_l4_wkup__gpio1,
1960};
1961
1962static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1963 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301964 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001965 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001966 .main_clk = "gpio1_ick",
1967 .opt_clks = gpio1_opt_clks,
1968 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1969 .prcm = {
1970 .omap2 = {
1971 .prcm_reg_id = 1,
1972 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
1973 .module_offs = WKUP_MOD,
1974 .idlest_reg_id = 1,
1975 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
1976 },
1977 },
1978 .slaves = omap3xxx_gpio1_slaves,
1979 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
1980 .class = &omap3xxx_gpio_hwmod_class,
1981 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001982};
1983
1984/* gpio2 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001985static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1986 { .role = "dbclk", .clk = "gpio2_dbck", },
1987};
1988
1989static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
1990 &omap3xxx_l4_per__gpio2,
1991};
1992
1993static struct omap_hwmod omap3xxx_gpio2_hwmod = {
1994 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301995 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001996 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001997 .main_clk = "gpio2_ick",
1998 .opt_clks = gpio2_opt_clks,
1999 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
2000 .prcm = {
2001 .omap2 = {
2002 .prcm_reg_id = 1,
2003 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
2004 .module_offs = OMAP3430_PER_MOD,
2005 .idlest_reg_id = 1,
2006 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
2007 },
2008 },
2009 .slaves = omap3xxx_gpio2_slaves,
2010 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
2011 .class = &omap3xxx_gpio_hwmod_class,
2012 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002013};
2014
2015/* gpio3 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002016static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
2017 { .role = "dbclk", .clk = "gpio3_dbck", },
2018};
2019
2020static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
2021 &omap3xxx_l4_per__gpio3,
2022};
2023
2024static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2025 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302026 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06002027 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002028 .main_clk = "gpio3_ick",
2029 .opt_clks = gpio3_opt_clks,
2030 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
2031 .prcm = {
2032 .omap2 = {
2033 .prcm_reg_id = 1,
2034 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
2035 .module_offs = OMAP3430_PER_MOD,
2036 .idlest_reg_id = 1,
2037 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
2038 },
2039 },
2040 .slaves = omap3xxx_gpio3_slaves,
2041 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
2042 .class = &omap3xxx_gpio_hwmod_class,
2043 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002044};
2045
2046/* gpio4 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002047static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2048 { .role = "dbclk", .clk = "gpio4_dbck", },
2049};
2050
2051static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
2052 &omap3xxx_l4_per__gpio4,
2053};
2054
2055static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2056 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302057 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06002058 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002059 .main_clk = "gpio4_ick",
2060 .opt_clks = gpio4_opt_clks,
2061 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2062 .prcm = {
2063 .omap2 = {
2064 .prcm_reg_id = 1,
2065 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
2066 .module_offs = OMAP3430_PER_MOD,
2067 .idlest_reg_id = 1,
2068 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
2069 },
2070 },
2071 .slaves = omap3xxx_gpio4_slaves,
2072 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
2073 .class = &omap3xxx_gpio_hwmod_class,
2074 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002075};
2076
2077/* gpio5 */
2078static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
2079 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002080 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002081};
2082
2083static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2084 { .role = "dbclk", .clk = "gpio5_dbck", },
2085};
2086
2087static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
2088 &omap3xxx_l4_per__gpio5,
2089};
2090
2091static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2092 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302093 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002094 .mpu_irqs = omap3xxx_gpio5_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002095 .main_clk = "gpio5_ick",
2096 .opt_clks = gpio5_opt_clks,
2097 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2098 .prcm = {
2099 .omap2 = {
2100 .prcm_reg_id = 1,
2101 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
2102 .module_offs = OMAP3430_PER_MOD,
2103 .idlest_reg_id = 1,
2104 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
2105 },
2106 },
2107 .slaves = omap3xxx_gpio5_slaves,
2108 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
2109 .class = &omap3xxx_gpio_hwmod_class,
2110 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002111};
2112
2113/* gpio6 */
2114static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
2115 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002116 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002117};
2118
2119static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2120 { .role = "dbclk", .clk = "gpio6_dbck", },
2121};
2122
2123static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
2124 &omap3xxx_l4_per__gpio6,
2125};
2126
2127static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2128 .name = "gpio6",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302129 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002130 .mpu_irqs = omap3xxx_gpio6_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002131 .main_clk = "gpio6_ick",
2132 .opt_clks = gpio6_opt_clks,
2133 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2134 .prcm = {
2135 .omap2 = {
2136 .prcm_reg_id = 1,
2137 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
2138 .module_offs = OMAP3430_PER_MOD,
2139 .idlest_reg_id = 1,
2140 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
2141 },
2142 },
2143 .slaves = omap3xxx_gpio6_slaves,
2144 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
2145 .class = &omap3xxx_gpio_hwmod_class,
2146 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002147};
2148
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002149/* dma_system -> L3 */
2150static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2151 .master = &omap3xxx_dma_system_hwmod,
2152 .slave = &omap3xxx_l3_main_hwmod,
2153 .clk = "core_l3_ick",
2154 .user = OCP_USER_MPU | OCP_USER_SDMA,
2155};
2156
2157/* dma attributes */
2158static struct omap_dma_dev_attr dma_dev_attr = {
2159 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
2160 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
2161 .lch_count = 32,
2162};
2163
2164static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
2165 .rev_offs = 0x0000,
2166 .sysc_offs = 0x002c,
2167 .syss_offs = 0x0028,
2168 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2169 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07002170 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
2171 SYSS_HAS_RESET_STATUS),
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002172 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2173 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2174 .sysc_fields = &omap_hwmod_sysc_type1,
2175};
2176
2177static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2178 .name = "dma",
2179 .sysc = &omap3xxx_dma_sysc,
2180};
2181
2182/* dma_system */
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002183static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2184 {
2185 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002186 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002187 .flags = ADDR_TYPE_RT
2188 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002189 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002190};
2191
2192/* dma_system master ports */
2193static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
2194 &omap3xxx_dma_system__l3,
2195};
2196
2197/* l4_cfg -> dma_system */
2198static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2199 .master = &omap3xxx_l4_core_hwmod,
2200 .slave = &omap3xxx_dma_system_hwmod,
2201 .clk = "core_l4_ick",
2202 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002203 .user = OCP_USER_MPU | OCP_USER_SDMA,
2204};
2205
2206/* dma_system slave ports */
2207static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2208 &omap3xxx_l4_core__dma_system,
2209};
2210
2211static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2212 .name = "dma",
2213 .class = &omap3xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06002214 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002215 .main_clk = "core_l3_ick",
2216 .prcm = {
2217 .omap2 = {
2218 .module_offs = CORE_MOD,
2219 .prcm_reg_id = 1,
2220 .module_bit = OMAP3430_ST_SDMA_SHIFT,
2221 .idlest_reg_id = 1,
2222 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
2223 },
2224 },
2225 .slaves = omap3xxx_dma_system_slaves,
2226 .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
2227 .masters = omap3xxx_dma_system_masters,
2228 .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
2229 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002230 .flags = HWMOD_NO_IDLEST,
2231};
2232
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302233/*
2234 * 'mcbsp' class
2235 * multi channel buffered serial port controller
2236 */
2237
2238static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
2239 .sysc_offs = 0x008c,
2240 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2241 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2242 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2243 .sysc_fields = &omap_hwmod_sysc_type1,
2244 .clockact = 0x2,
2245};
2246
2247static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
2248 .name = "mcbsp",
2249 .sysc = &omap3xxx_mcbsp_sysc,
2250 .rev = MCBSP_CONFIG_TYPE3,
2251};
2252
2253/* mcbsp1 */
2254static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2255 { .name = "irq", .irq = 16 },
2256 { .name = "tx", .irq = 59 },
2257 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002258 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302259};
2260
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302261static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2262 {
2263 .name = "mpu",
2264 .pa_start = 0x48074000,
2265 .pa_end = 0x480740ff,
2266 .flags = ADDR_TYPE_RT
2267 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002268 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302269};
2270
2271/* l4_core -> mcbsp1 */
2272static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2273 .master = &omap3xxx_l4_core_hwmod,
2274 .slave = &omap3xxx_mcbsp1_hwmod,
2275 .clk = "mcbsp1_ick",
2276 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302277 .user = OCP_USER_MPU | OCP_USER_SDMA,
2278};
2279
2280/* mcbsp1 slave ports */
2281static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
2282 &omap3xxx_l4_core__mcbsp1,
2283};
2284
2285static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2286 .name = "mcbsp1",
2287 .class = &omap3xxx_mcbsp_hwmod_class,
2288 .mpu_irqs = omap3xxx_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002289 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302290 .main_clk = "mcbsp1_fck",
2291 .prcm = {
2292 .omap2 = {
2293 .prcm_reg_id = 1,
2294 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
2295 .module_offs = CORE_MOD,
2296 .idlest_reg_id = 1,
2297 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2298 },
2299 },
2300 .slaves = omap3xxx_mcbsp1_slaves,
2301 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302302};
2303
2304/* mcbsp2 */
2305static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2306 { .name = "irq", .irq = 17 },
2307 { .name = "tx", .irq = 62 },
2308 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002309 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302310};
2311
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302312static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2313 {
2314 .name = "mpu",
2315 .pa_start = 0x49022000,
2316 .pa_end = 0x490220ff,
2317 .flags = ADDR_TYPE_RT
2318 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002319 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302320};
2321
2322/* l4_per -> mcbsp2 */
2323static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2324 .master = &omap3xxx_l4_per_hwmod,
2325 .slave = &omap3xxx_mcbsp2_hwmod,
2326 .clk = "mcbsp2_ick",
2327 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302328 .user = OCP_USER_MPU | OCP_USER_SDMA,
2329};
2330
2331/* mcbsp2 slave ports */
2332static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
2333 &omap3xxx_l4_per__mcbsp2,
2334};
2335
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302336static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2337 .sidetone = "mcbsp2_sidetone",
2338};
2339
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302340static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2341 .name = "mcbsp2",
2342 .class = &omap3xxx_mcbsp_hwmod_class,
2343 .mpu_irqs = omap3xxx_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002344 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302345 .main_clk = "mcbsp2_fck",
2346 .prcm = {
2347 .omap2 = {
2348 .prcm_reg_id = 1,
2349 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2350 .module_offs = OMAP3430_PER_MOD,
2351 .idlest_reg_id = 1,
2352 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2353 },
2354 },
2355 .slaves = omap3xxx_mcbsp2_slaves,
2356 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302357 .dev_attr = &omap34xx_mcbsp2_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302358};
2359
2360/* mcbsp3 */
2361static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2362 { .name = "irq", .irq = 22 },
2363 { .name = "tx", .irq = 89 },
2364 { .name = "rx", .irq = 90 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002365 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302366};
2367
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302368static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2369 {
2370 .name = "mpu",
2371 .pa_start = 0x49024000,
2372 .pa_end = 0x490240ff,
2373 .flags = ADDR_TYPE_RT
2374 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002375 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302376};
2377
2378/* l4_per -> mcbsp3 */
2379static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2380 .master = &omap3xxx_l4_per_hwmod,
2381 .slave = &omap3xxx_mcbsp3_hwmod,
2382 .clk = "mcbsp3_ick",
2383 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302384 .user = OCP_USER_MPU | OCP_USER_SDMA,
2385};
2386
2387/* mcbsp3 slave ports */
2388static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
2389 &omap3xxx_l4_per__mcbsp3,
2390};
2391
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302392static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
2393 .sidetone = "mcbsp3_sidetone",
2394};
2395
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302396static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2397 .name = "mcbsp3",
2398 .class = &omap3xxx_mcbsp_hwmod_class,
2399 .mpu_irqs = omap3xxx_mcbsp3_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002400 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302401 .main_clk = "mcbsp3_fck",
2402 .prcm = {
2403 .omap2 = {
2404 .prcm_reg_id = 1,
2405 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2406 .module_offs = OMAP3430_PER_MOD,
2407 .idlest_reg_id = 1,
2408 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2409 },
2410 },
2411 .slaves = omap3xxx_mcbsp3_slaves,
2412 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302413 .dev_attr = &omap34xx_mcbsp3_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302414};
2415
2416/* mcbsp4 */
2417static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
2418 { .name = "irq", .irq = 23 },
2419 { .name = "tx", .irq = 54 },
2420 { .name = "rx", .irq = 55 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002421 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302422};
2423
2424static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2425 { .name = "rx", .dma_req = 20 },
2426 { .name = "tx", .dma_req = 19 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002427 { .dma_req = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302428};
2429
2430static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2431 {
2432 .name = "mpu",
2433 .pa_start = 0x49026000,
2434 .pa_end = 0x490260ff,
2435 .flags = ADDR_TYPE_RT
2436 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002437 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302438};
2439
2440/* l4_per -> mcbsp4 */
2441static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2442 .master = &omap3xxx_l4_per_hwmod,
2443 .slave = &omap3xxx_mcbsp4_hwmod,
2444 .clk = "mcbsp4_ick",
2445 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302446 .user = OCP_USER_MPU | OCP_USER_SDMA,
2447};
2448
2449/* mcbsp4 slave ports */
2450static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
2451 &omap3xxx_l4_per__mcbsp4,
2452};
2453
2454static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2455 .name = "mcbsp4",
2456 .class = &omap3xxx_mcbsp_hwmod_class,
2457 .mpu_irqs = omap3xxx_mcbsp4_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302458 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302459 .main_clk = "mcbsp4_fck",
2460 .prcm = {
2461 .omap2 = {
2462 .prcm_reg_id = 1,
2463 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
2464 .module_offs = OMAP3430_PER_MOD,
2465 .idlest_reg_id = 1,
2466 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2467 },
2468 },
2469 .slaves = omap3xxx_mcbsp4_slaves,
2470 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302471};
2472
2473/* mcbsp5 */
2474static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
2475 { .name = "irq", .irq = 27 },
2476 { .name = "tx", .irq = 81 },
2477 { .name = "rx", .irq = 82 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002478 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302479};
2480
2481static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2482 { .name = "rx", .dma_req = 22 },
2483 { .name = "tx", .dma_req = 21 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002484 { .dma_req = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302485};
2486
2487static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2488 {
2489 .name = "mpu",
2490 .pa_start = 0x48096000,
2491 .pa_end = 0x480960ff,
2492 .flags = ADDR_TYPE_RT
2493 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002494 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302495};
2496
2497/* l4_core -> mcbsp5 */
2498static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2499 .master = &omap3xxx_l4_core_hwmod,
2500 .slave = &omap3xxx_mcbsp5_hwmod,
2501 .clk = "mcbsp5_ick",
2502 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302503 .user = OCP_USER_MPU | OCP_USER_SDMA,
2504};
2505
2506/* mcbsp5 slave ports */
2507static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
2508 &omap3xxx_l4_core__mcbsp5,
2509};
2510
2511static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2512 .name = "mcbsp5",
2513 .class = &omap3xxx_mcbsp_hwmod_class,
2514 .mpu_irqs = omap3xxx_mcbsp5_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302515 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302516 .main_clk = "mcbsp5_fck",
2517 .prcm = {
2518 .omap2 = {
2519 .prcm_reg_id = 1,
2520 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
2521 .module_offs = CORE_MOD,
2522 .idlest_reg_id = 1,
2523 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2524 },
2525 },
2526 .slaves = omap3xxx_mcbsp5_slaves,
2527 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302528};
2529/* 'mcbsp sidetone' class */
2530
2531static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2532 .sysc_offs = 0x0010,
2533 .sysc_flags = SYSC_HAS_AUTOIDLE,
2534 .sysc_fields = &omap_hwmod_sysc_type1,
2535};
2536
2537static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
2538 .name = "mcbsp_sidetone",
2539 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
2540};
2541
2542/* mcbsp2_sidetone */
2543static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2544 { .name = "irq", .irq = 4 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002545 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302546};
2547
2548static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2549 {
2550 .name = "sidetone",
2551 .pa_start = 0x49028000,
2552 .pa_end = 0x490280ff,
2553 .flags = ADDR_TYPE_RT
2554 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002555 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302556};
2557
2558/* l4_per -> mcbsp2_sidetone */
2559static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2560 .master = &omap3xxx_l4_per_hwmod,
2561 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2562 .clk = "mcbsp2_ick",
2563 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302564 .user = OCP_USER_MPU,
2565};
2566
2567/* mcbsp2_sidetone slave ports */
2568static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
2569 &omap3xxx_l4_per__mcbsp2_sidetone,
2570};
2571
2572static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2573 .name = "mcbsp2_sidetone",
2574 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2575 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302576 .main_clk = "mcbsp2_fck",
2577 .prcm = {
2578 .omap2 = {
2579 .prcm_reg_id = 1,
2580 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2581 .module_offs = OMAP3430_PER_MOD,
2582 .idlest_reg_id = 1,
2583 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2584 },
2585 },
2586 .slaves = omap3xxx_mcbsp2_sidetone_slaves,
2587 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302588};
2589
2590/* mcbsp3_sidetone */
2591static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2592 { .name = "irq", .irq = 5 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002593 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302594};
2595
2596static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2597 {
2598 .name = "sidetone",
2599 .pa_start = 0x4902A000,
2600 .pa_end = 0x4902A0ff,
2601 .flags = ADDR_TYPE_RT
2602 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002603 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302604};
2605
2606/* l4_per -> mcbsp3_sidetone */
2607static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2608 .master = &omap3xxx_l4_per_hwmod,
2609 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2610 .clk = "mcbsp3_ick",
2611 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302612 .user = OCP_USER_MPU,
2613};
2614
2615/* mcbsp3_sidetone slave ports */
2616static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
2617 &omap3xxx_l4_per__mcbsp3_sidetone,
2618};
2619
2620static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2621 .name = "mcbsp3_sidetone",
2622 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2623 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302624 .main_clk = "mcbsp3_fck",
2625 .prcm = {
2626 .omap2 = {
2627 .prcm_reg_id = 1,
2628 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2629 .module_offs = OMAP3430_PER_MOD,
2630 .idlest_reg_id = 1,
2631 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2632 },
2633 },
2634 .slaves = omap3xxx_mcbsp3_sidetone_slaves,
2635 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302636};
2637
2638
Thara Gopinathd3442722010-05-29 22:02:24 +05302639/* SR common */
2640static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2641 .clkact_shift = 20,
2642};
2643
2644static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
2645 .sysc_offs = 0x24,
2646 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
2647 .clockact = CLOCKACT_TEST_ICLK,
2648 .sysc_fields = &omap34xx_sr_sysc_fields,
2649};
2650
2651static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2652 .name = "smartreflex",
2653 .sysc = &omap34xx_sr_sysc,
2654 .rev = 1,
2655};
2656
2657static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2658 .sidle_shift = 24,
2659 .enwkup_shift = 26
2660};
2661
2662static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
2663 .sysc_offs = 0x38,
2664 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2665 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
2666 SYSC_NO_CACHE),
2667 .sysc_fields = &omap36xx_sr_sysc_fields,
2668};
2669
2670static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
2671 .name = "smartreflex",
2672 .sysc = &omap36xx_sr_sysc,
2673 .rev = 2,
2674};
2675
2676/* SR1 */
Shweta Gulaticea6b942012-02-29 23:33:37 +01002677static struct omap_smartreflex_dev_attr sr1_dev_attr = {
2678 .sensor_voltdm_name = "mpu_iva",
2679};
2680
Thara Gopinathd3442722010-05-29 22:02:24 +05302681static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
2682 &omap3_l4_core__sr1,
2683};
2684
2685static struct omap_hwmod omap34xx_sr1_hwmod = {
2686 .name = "sr1_hwmod",
2687 .class = &omap34xx_smartreflex_hwmod_class,
2688 .main_clk = "sr1_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302689 .prcm = {
2690 .omap2 = {
2691 .prcm_reg_id = 1,
2692 .module_bit = OMAP3430_EN_SR1_SHIFT,
2693 .module_offs = WKUP_MOD,
2694 .idlest_reg_id = 1,
2695 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2696 },
2697 },
2698 .slaves = omap3_sr1_slaves,
2699 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01002700 .dev_attr = &sr1_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002701 .mpu_irqs = omap3_smartreflex_mpu_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302702 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2703};
2704
2705static struct omap_hwmod omap36xx_sr1_hwmod = {
2706 .name = "sr1_hwmod",
2707 .class = &omap36xx_smartreflex_hwmod_class,
2708 .main_clk = "sr1_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302709 .prcm = {
2710 .omap2 = {
2711 .prcm_reg_id = 1,
2712 .module_bit = OMAP3430_EN_SR1_SHIFT,
2713 .module_offs = WKUP_MOD,
2714 .idlest_reg_id = 1,
2715 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2716 },
2717 },
2718 .slaves = omap3_sr1_slaves,
2719 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01002720 .dev_attr = &sr1_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002721 .mpu_irqs = omap3_smartreflex_mpu_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302722};
2723
2724/* SR2 */
Shweta Gulaticea6b942012-02-29 23:33:37 +01002725static struct omap_smartreflex_dev_attr sr2_dev_attr = {
2726 .sensor_voltdm_name = "core",
2727};
2728
Thara Gopinathd3442722010-05-29 22:02:24 +05302729static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
2730 &omap3_l4_core__sr2,
2731};
2732
2733static struct omap_hwmod omap34xx_sr2_hwmod = {
2734 .name = "sr2_hwmod",
2735 .class = &omap34xx_smartreflex_hwmod_class,
2736 .main_clk = "sr2_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302737 .prcm = {
2738 .omap2 = {
2739 .prcm_reg_id = 1,
2740 .module_bit = OMAP3430_EN_SR2_SHIFT,
2741 .module_offs = WKUP_MOD,
2742 .idlest_reg_id = 1,
2743 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2744 },
2745 },
2746 .slaves = omap3_sr2_slaves,
2747 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01002748 .dev_attr = &sr2_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002749 .mpu_irqs = omap3_smartreflex_core_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302750 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2751};
2752
2753static struct omap_hwmod omap36xx_sr2_hwmod = {
2754 .name = "sr2_hwmod",
2755 .class = &omap36xx_smartreflex_hwmod_class,
2756 .main_clk = "sr2_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302757 .prcm = {
2758 .omap2 = {
2759 .prcm_reg_id = 1,
2760 .module_bit = OMAP3430_EN_SR2_SHIFT,
2761 .module_offs = WKUP_MOD,
2762 .idlest_reg_id = 1,
2763 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2764 },
2765 },
2766 .slaves = omap3_sr2_slaves,
2767 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
Shweta Gulaticea6b942012-02-29 23:33:37 +01002768 .dev_attr = &sr2_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002769 .mpu_irqs = omap3_smartreflex_core_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302770};
2771
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002772/*
2773 * 'mailbox' class
2774 * mailbox module allowing communication between the on-chip processors
2775 * using a queued mailbox-interrupt mechanism.
2776 */
2777
2778static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
2779 .rev_offs = 0x000,
2780 .sysc_offs = 0x010,
2781 .syss_offs = 0x014,
2782 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2783 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2784 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2785 .sysc_fields = &omap_hwmod_sysc_type1,
2786};
2787
2788static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
2789 .name = "mailbox",
2790 .sysc = &omap3xxx_mailbox_sysc,
2791};
2792
2793static struct omap_hwmod omap3xxx_mailbox_hwmod;
2794static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
2795 { .irq = 26 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002796 { .irq = -1 }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002797};
2798
2799static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2800 {
2801 .pa_start = 0x48094000,
2802 .pa_end = 0x480941ff,
2803 .flags = ADDR_TYPE_RT,
2804 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002805 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002806};
2807
2808/* l4_core -> mailbox */
2809static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2810 .master = &omap3xxx_l4_core_hwmod,
2811 .slave = &omap3xxx_mailbox_hwmod,
2812 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002813 .user = OCP_USER_MPU | OCP_USER_SDMA,
2814};
2815
2816/* mailbox slave ports */
2817static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
2818 &omap3xxx_l4_core__mailbox,
2819};
2820
2821static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2822 .name = "mailbox",
2823 .class = &omap3xxx_mailbox_hwmod_class,
2824 .mpu_irqs = omap3xxx_mailbox_irqs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002825 .main_clk = "mailboxes_ick",
2826 .prcm = {
2827 .omap2 = {
2828 .prcm_reg_id = 1,
2829 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
2830 .module_offs = CORE_MOD,
2831 .idlest_reg_id = 1,
2832 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
2833 },
2834 },
2835 .slaves = omap3xxx_mailbox_slaves,
2836 .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002837};
2838
Charulatha V0f616a42011-02-17 09:53:10 -08002839/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002840static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2841 .master = &omap3xxx_l4_core_hwmod,
2842 .slave = &omap34xx_mcspi1,
2843 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002844 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002845 .user = OCP_USER_MPU | OCP_USER_SDMA,
2846};
2847
2848/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002849static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2850 .master = &omap3xxx_l4_core_hwmod,
2851 .slave = &omap34xx_mcspi2,
2852 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002853 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002854 .user = OCP_USER_MPU | OCP_USER_SDMA,
2855};
2856
2857/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002858static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2859 .master = &omap3xxx_l4_core_hwmod,
2860 .slave = &omap34xx_mcspi3,
2861 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002862 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002863 .user = OCP_USER_MPU | OCP_USER_SDMA,
2864};
2865
2866/* l4 core -> mcspi4 interface */
2867static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2868 {
2869 .pa_start = 0x480ba000,
2870 .pa_end = 0x480ba0ff,
2871 .flags = ADDR_TYPE_RT,
2872 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002873 { }
Charulatha V0f616a42011-02-17 09:53:10 -08002874};
2875
2876static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2877 .master = &omap3xxx_l4_core_hwmod,
2878 .slave = &omap34xx_mcspi4,
2879 .clk = "mcspi4_ick",
2880 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002881 .user = OCP_USER_MPU | OCP_USER_SDMA,
2882};
2883
2884/*
2885 * 'mcspi' class
2886 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2887 * bus
2888 */
2889
2890static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
2891 .rev_offs = 0x0000,
2892 .sysc_offs = 0x0010,
2893 .syss_offs = 0x0014,
2894 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2895 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2896 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2897 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2898 .sysc_fields = &omap_hwmod_sysc_type1,
2899};
2900
2901static struct omap_hwmod_class omap34xx_mcspi_class = {
2902 .name = "mcspi",
2903 .sysc = &omap34xx_mcspi_sysc,
2904 .rev = OMAP3_MCSPI_REV,
2905};
2906
2907/* mcspi1 */
Charulatha V0f616a42011-02-17 09:53:10 -08002908static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
2909 &omap34xx_l4_core__mcspi1,
2910};
2911
2912static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2913 .num_chipselect = 4,
2914};
2915
2916static struct omap_hwmod omap34xx_mcspi1 = {
2917 .name = "mcspi1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06002918 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002919 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002920 .main_clk = "mcspi1_fck",
2921 .prcm = {
2922 .omap2 = {
2923 .module_offs = CORE_MOD,
2924 .prcm_reg_id = 1,
2925 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
2926 .idlest_reg_id = 1,
2927 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
2928 },
2929 },
2930 .slaves = omap34xx_mcspi1_slaves,
2931 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
2932 .class = &omap34xx_mcspi_class,
2933 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002934};
2935
2936/* mcspi2 */
Charulatha V0f616a42011-02-17 09:53:10 -08002937static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
2938 &omap34xx_l4_core__mcspi2,
2939};
2940
2941static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2942 .num_chipselect = 2,
2943};
2944
2945static struct omap_hwmod omap34xx_mcspi2 = {
2946 .name = "mcspi2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06002947 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002948 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002949 .main_clk = "mcspi2_fck",
2950 .prcm = {
2951 .omap2 = {
2952 .module_offs = CORE_MOD,
2953 .prcm_reg_id = 1,
2954 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
2955 .idlest_reg_id = 1,
2956 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
2957 },
2958 },
2959 .slaves = omap34xx_mcspi2_slaves,
2960 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
2961 .class = &omap34xx_mcspi_class,
2962 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002963};
2964
2965/* mcspi3 */
2966static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
2967 { .name = "irq", .irq = 91 }, /* 91 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002968 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002969};
2970
2971static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
2972 { .name = "tx0", .dma_req = 15 },
2973 { .name = "rx0", .dma_req = 16 },
2974 { .name = "tx1", .dma_req = 23 },
2975 { .name = "rx1", .dma_req = 24 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002976 { .dma_req = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002977};
2978
2979static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
2980 &omap34xx_l4_core__mcspi3,
2981};
2982
2983static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2984 .num_chipselect = 2,
2985};
2986
2987static struct omap_hwmod omap34xx_mcspi3 = {
2988 .name = "mcspi3",
2989 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002990 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002991 .main_clk = "mcspi3_fck",
2992 .prcm = {
2993 .omap2 = {
2994 .module_offs = CORE_MOD,
2995 .prcm_reg_id = 1,
2996 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
2997 .idlest_reg_id = 1,
2998 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
2999 },
3000 },
3001 .slaves = omap34xx_mcspi3_slaves,
3002 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
3003 .class = &omap34xx_mcspi_class,
3004 .dev_attr = &omap_mcspi3_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08003005};
3006
3007/* SPI4 */
3008static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
3009 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
Paul Walmsley212738a2011-07-09 19:14:06 -06003010 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08003011};
3012
3013static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
3014 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
3015 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
Paul Walmsleybc614952011-07-09 19:14:07 -06003016 { .dma_req = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08003017};
3018
3019static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
3020 &omap34xx_l4_core__mcspi4,
3021};
3022
3023static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
3024 .num_chipselect = 1,
3025};
3026
3027static struct omap_hwmod omap34xx_mcspi4 = {
3028 .name = "mcspi4",
3029 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08003030 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08003031 .main_clk = "mcspi4_fck",
3032 .prcm = {
3033 .omap2 = {
3034 .module_offs = CORE_MOD,
3035 .prcm_reg_id = 1,
3036 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
3037 .idlest_reg_id = 1,
3038 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
3039 },
3040 },
3041 .slaves = omap34xx_mcspi4_slaves,
3042 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
3043 .class = &omap34xx_mcspi_class,
3044 .dev_attr = &omap_mcspi4_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08003045};
3046
Hema HK870ea2b2011-02-17 12:07:18 +05303047/*
3048 * usbhsotg
3049 */
3050static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
3051 .rev_offs = 0x0400,
3052 .sysc_offs = 0x0404,
3053 .syss_offs = 0x0408,
3054 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
3055 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3056 SYSC_HAS_AUTOIDLE),
3057 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3058 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
3059 .sysc_fields = &omap_hwmod_sysc_type1,
3060};
3061
3062static struct omap_hwmod_class usbotg_class = {
3063 .name = "usbotg",
3064 .sysc = &omap3xxx_usbhsotg_sysc,
3065};
Hema HK870ea2b2011-02-17 12:07:18 +05303066/* usb_otg_hs */
3067static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
3068
3069 { .name = "mc", .irq = 92 },
3070 { .name = "dma", .irq = 93 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003071 { .irq = -1 }
Hema HK870ea2b2011-02-17 12:07:18 +05303072};
3073
3074static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3075 .name = "usb_otg_hs",
3076 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
Hema HK870ea2b2011-02-17 12:07:18 +05303077 .main_clk = "hsotgusb_ick",
3078 .prcm = {
3079 .omap2 = {
3080 .prcm_reg_id = 1,
3081 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
3082 .module_offs = CORE_MOD,
3083 .idlest_reg_id = 1,
3084 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
3085 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
3086 },
3087 },
3088 .masters = omap3xxx_usbhsotg_masters,
3089 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
3090 .slaves = omap3xxx_usbhsotg_slaves,
3091 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
3092 .class = &usbotg_class,
3093
3094 /*
3095 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
3096 * broken when autoidle is enabled
3097 * workaround is to disable the autoidle bit at module level.
3098 */
3099 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
3100 | HWMOD_SWSUP_MSTANDBY,
Hema HK870ea2b2011-02-17 12:07:18 +05303101};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003102
Hema HK273ff8c2011-02-17 12:07:19 +05303103/* usb_otg_hs */
3104static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
3105
3106 { .name = "mc", .irq = 71 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003107 { .irq = -1 }
Hema HK273ff8c2011-02-17 12:07:19 +05303108};
3109
3110static struct omap_hwmod_class am35xx_usbotg_class = {
3111 .name = "am35xx_usbotg",
3112 .sysc = NULL,
3113};
3114
3115static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3116 .name = "am35x_otg_hs",
3117 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Hema HK273ff8c2011-02-17 12:07:19 +05303118 .main_clk = NULL,
3119 .prcm = {
3120 .omap2 = {
3121 },
3122 },
3123 .masters = am35xx_usbhsotg_masters,
3124 .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
3125 .slaves = am35xx_usbhsotg_slaves,
3126 .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
3127 .class = &am35xx_usbotg_class,
Hema HK273ff8c2011-02-17 12:07:19 +05303128};
Hema HK870ea2b2011-02-17 12:07:18 +05303129
Paul Walmsleyb1636052011-03-01 13:12:56 -08003130/* MMC/SD/SDIO common */
3131
3132static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
3133 .rev_offs = 0x1fc,
3134 .sysc_offs = 0x10,
3135 .syss_offs = 0x14,
3136 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3137 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3138 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
3139 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3140 .sysc_fields = &omap_hwmod_sysc_type1,
3141};
3142
3143static struct omap_hwmod_class omap34xx_mmc_class = {
3144 .name = "mmc",
3145 .sysc = &omap34xx_mmc_sysc,
3146};
3147
3148/* MMC/SD/SDIO1 */
3149
3150static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
3151 { .irq = 83, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003152 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003153};
3154
3155static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
3156 { .name = "tx", .dma_req = 61, },
3157 { .name = "rx", .dma_req = 62, },
Paul Walmsleybc614952011-07-09 19:14:07 -06003158 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003159};
3160
3161static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
3162 { .role = "dbck", .clk = "omap_32k_fck", },
3163};
3164
3165static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
3166 &omap3xxx_l4_core__mmc1,
3167};
3168
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003169static struct omap_mmc_dev_attr mmc1_dev_attr = {
3170 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3171};
3172
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003173/* See 35xx errata 2.1.1.128 in SPRZ278F */
3174static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
3175 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
3176 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
3177};
3178
3179static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
3180 .name = "mmc1",
3181 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
3182 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
3183 .opt_clks = omap34xx_mmc1_opt_clks,
3184 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
3185 .main_clk = "mmchs1_fck",
3186 .prcm = {
3187 .omap2 = {
3188 .module_offs = CORE_MOD,
3189 .prcm_reg_id = 1,
3190 .module_bit = OMAP3430_EN_MMC1_SHIFT,
3191 .idlest_reg_id = 1,
3192 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
3193 },
3194 },
3195 .dev_attr = &mmc1_pre_es3_dev_attr,
3196 .slaves = omap3xxx_mmc1_slaves,
3197 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3198 .class = &omap34xx_mmc_class,
3199};
3200
3201static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08003202 .name = "mmc1",
3203 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003204 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003205 .opt_clks = omap34xx_mmc1_opt_clks,
3206 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
3207 .main_clk = "mmchs1_fck",
3208 .prcm = {
3209 .omap2 = {
3210 .module_offs = CORE_MOD,
3211 .prcm_reg_id = 1,
3212 .module_bit = OMAP3430_EN_MMC1_SHIFT,
3213 .idlest_reg_id = 1,
3214 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
3215 },
3216 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003217 .dev_attr = &mmc1_dev_attr,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003218 .slaves = omap3xxx_mmc1_slaves,
3219 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3220 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003221};
3222
3223/* MMC/SD/SDIO2 */
3224
3225static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
3226 { .irq = INT_24XX_MMC2_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003227 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003228};
3229
3230static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
3231 { .name = "tx", .dma_req = 47, },
3232 { .name = "rx", .dma_req = 48, },
Paul Walmsleybc614952011-07-09 19:14:07 -06003233 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003234};
3235
3236static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
3237 { .role = "dbck", .clk = "omap_32k_fck", },
3238};
3239
3240static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3241 &omap3xxx_l4_core__mmc2,
3242};
3243
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003244/* See 35xx errata 2.1.1.128 in SPRZ278F */
3245static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
3246 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
3247};
3248
3249static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
3250 .name = "mmc2",
3251 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
3252 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
3253 .opt_clks = omap34xx_mmc2_opt_clks,
3254 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
3255 .main_clk = "mmchs2_fck",
3256 .prcm = {
3257 .omap2 = {
3258 .module_offs = CORE_MOD,
3259 .prcm_reg_id = 1,
3260 .module_bit = OMAP3430_EN_MMC2_SHIFT,
3261 .idlest_reg_id = 1,
3262 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3263 },
3264 },
3265 .dev_attr = &mmc2_pre_es3_dev_attr,
3266 .slaves = omap3xxx_mmc2_slaves,
3267 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3268 .class = &omap34xx_mmc_class,
3269};
3270
3271static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08003272 .name = "mmc2",
3273 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003274 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003275 .opt_clks = omap34xx_mmc2_opt_clks,
3276 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
3277 .main_clk = "mmchs2_fck",
3278 .prcm = {
3279 .omap2 = {
3280 .module_offs = CORE_MOD,
3281 .prcm_reg_id = 1,
3282 .module_bit = OMAP3430_EN_MMC2_SHIFT,
3283 .idlest_reg_id = 1,
3284 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3285 },
3286 },
3287 .slaves = omap3xxx_mmc2_slaves,
3288 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3289 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003290};
3291
3292/* MMC/SD/SDIO3 */
3293
3294static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
3295 { .irq = 94, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003296 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003297};
3298
3299static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
3300 { .name = "tx", .dma_req = 77, },
3301 { .name = "rx", .dma_req = 78, },
Paul Walmsleybc614952011-07-09 19:14:07 -06003302 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003303};
3304
3305static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
3306 { .role = "dbck", .clk = "omap_32k_fck", },
3307};
3308
3309static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3310 &omap3xxx_l4_core__mmc3,
3311};
3312
3313static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3314 .name = "mmc3",
3315 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003316 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003317 .opt_clks = omap34xx_mmc3_opt_clks,
3318 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
3319 .main_clk = "mmchs3_fck",
3320 .prcm = {
3321 .omap2 = {
3322 .prcm_reg_id = 1,
3323 .module_bit = OMAP3430_EN_MMC3_SHIFT,
3324 .idlest_reg_id = 1,
3325 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
3326 },
3327 },
3328 .slaves = omap3xxx_mmc3_slaves,
3329 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
3330 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003331};
3332
Keshava Munegowdade231382011-12-15 23:14:44 -07003333/*
3334 * 'usb_host_hs' class
3335 * high-speed multi-port usb host controller
3336 */
3337static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3338 .master = &omap3xxx_usb_host_hs_hwmod,
3339 .slave = &omap3xxx_l3_main_hwmod,
3340 .clk = "core_l3_ick",
3341 .user = OCP_USER_MPU,
3342};
3343
3344static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
3345 .rev_offs = 0x0000,
3346 .sysc_offs = 0x0010,
3347 .syss_offs = 0x0014,
3348 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
3349 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
3350 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
3351 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3352 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
3353 .sysc_fields = &omap_hwmod_sysc_type1,
3354};
3355
3356static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
3357 .name = "usb_host_hs",
3358 .sysc = &omap3xxx_usb_host_hs_sysc,
3359};
3360
3361static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_masters[] = {
3362 &omap3xxx_usb_host_hs__l3_main_2,
3363};
3364
3365static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3366 {
3367 .name = "uhh",
3368 .pa_start = 0x48064000,
3369 .pa_end = 0x480643ff,
3370 .flags = ADDR_TYPE_RT
3371 },
3372 {
3373 .name = "ohci",
3374 .pa_start = 0x48064400,
3375 .pa_end = 0x480647ff,
3376 },
3377 {
3378 .name = "ehci",
3379 .pa_start = 0x48064800,
3380 .pa_end = 0x48064cff,
3381 },
3382 {}
3383};
3384
3385static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3386 .master = &omap3xxx_l4_core_hwmod,
3387 .slave = &omap3xxx_usb_host_hs_hwmod,
3388 .clk = "usbhost_ick",
3389 .addr = omap3xxx_usb_host_hs_addrs,
3390 .user = OCP_USER_MPU | OCP_USER_SDMA,
3391};
3392
3393static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_slaves[] = {
3394 &omap3xxx_l4_core__usb_host_hs,
3395};
3396
3397static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
3398 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
3399};
3400
3401static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
3402 { .name = "ohci-irq", .irq = 76 },
3403 { .name = "ehci-irq", .irq = 77 },
3404 { .irq = -1 }
3405};
3406
3407static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
3408 .name = "usb_host_hs",
3409 .class = &omap3xxx_usb_host_hs_hwmod_class,
3410 .clkdm_name = "l3_init_clkdm",
3411 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
3412 .main_clk = "usbhost_48m_fck",
3413 .prcm = {
3414 .omap2 = {
3415 .module_offs = OMAP3430ES2_USBHOST_MOD,
3416 .prcm_reg_id = 1,
3417 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
3418 .idlest_reg_id = 1,
3419 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
3420 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
3421 },
3422 },
3423 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
3424 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
3425 .slaves = omap3xxx_usb_host_hs_slaves,
3426 .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_slaves),
3427 .masters = omap3xxx_usb_host_hs_masters,
3428 .masters_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_masters),
3429
3430 /*
3431 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
3432 * id: i660
3433 *
3434 * Description:
3435 * In the following configuration :
3436 * - USBHOST module is set to smart-idle mode
3437 * - PRCM asserts idle_req to the USBHOST module ( This typically
3438 * happens when the system is going to a low power mode : all ports
3439 * have been suspended, the master part of the USBHOST module has
3440 * entered the standby state, and SW has cut the functional clocks)
3441 * - an USBHOST interrupt occurs before the module is able to answer
3442 * idle_ack, typically a remote wakeup IRQ.
3443 * Then the USB HOST module will enter a deadlock situation where it
3444 * is no more accessible nor functional.
3445 *
3446 * Workaround:
3447 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
3448 */
3449
3450 /*
3451 * Errata: USB host EHCI may stall when entering smart-standby mode
3452 * Id: i571
3453 *
3454 * Description:
3455 * When the USBHOST module is set to smart-standby mode, and when it is
3456 * ready to enter the standby state (i.e. all ports are suspended and
3457 * all attached devices are in suspend mode), then it can wrongly assert
3458 * the Mstandby signal too early while there are still some residual OCP
3459 * transactions ongoing. If this condition occurs, the internal state
3460 * machine may go to an undefined state and the USB link may be stuck
3461 * upon the next resume.
3462 *
3463 * Workaround:
3464 * Don't use smart standby; use only force standby,
3465 * hence HWMOD_SWSUP_MSTANDBY
3466 */
3467
3468 /*
3469 * During system boot; If the hwmod framework resets the module
3470 * the module will have smart idle settings; which can lead to deadlock
3471 * (above Errata Id:i660); so, dont reset the module during boot;
3472 * Use HWMOD_INIT_NO_RESET.
3473 */
3474
3475 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
3476 HWMOD_INIT_NO_RESET,
3477};
3478
3479/*
3480 * 'usb_tll_hs' class
3481 * usb_tll_hs module is the adapter on the usb_host_hs ports
3482 */
3483static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
3484 .rev_offs = 0x0000,
3485 .sysc_offs = 0x0010,
3486 .syss_offs = 0x0014,
3487 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3488 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3489 SYSC_HAS_AUTOIDLE),
3490 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3491 .sysc_fields = &omap_hwmod_sysc_type1,
3492};
3493
3494static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
3495 .name = "usb_tll_hs",
3496 .sysc = &omap3xxx_usb_tll_hs_sysc,
3497};
3498
3499static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
3500 { .name = "tll-irq", .irq = 78 },
3501 { .irq = -1 }
3502};
3503
3504static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3505 {
3506 .name = "tll",
3507 .pa_start = 0x48062000,
3508 .pa_end = 0x48062fff,
3509 .flags = ADDR_TYPE_RT
3510 },
3511 {}
3512};
3513
3514static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3515 .master = &omap3xxx_l4_core_hwmod,
3516 .slave = &omap3xxx_usb_tll_hs_hwmod,
3517 .clk = "usbtll_ick",
3518 .addr = omap3xxx_usb_tll_hs_addrs,
3519 .user = OCP_USER_MPU | OCP_USER_SDMA,
3520};
3521
3522static struct omap_hwmod_ocp_if *omap3xxx_usb_tll_hs_slaves[] = {
3523 &omap3xxx_l4_core__usb_tll_hs,
3524};
3525
3526static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
3527 .name = "usb_tll_hs",
3528 .class = &omap3xxx_usb_tll_hs_hwmod_class,
3529 .clkdm_name = "l3_init_clkdm",
3530 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
3531 .main_clk = "usbtll_fck",
3532 .prcm = {
3533 .omap2 = {
3534 .module_offs = CORE_MOD,
3535 .prcm_reg_id = 3,
3536 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
3537 .idlest_reg_id = 3,
3538 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
3539 },
3540 },
3541 .slaves = omap3xxx_usb_tll_hs_slaves,
3542 .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_tll_hs_slaves),
3543};
3544
Paul Walmsley73591542010-02-22 22:09:32 -07003545static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06003546 &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003547 &omap3xxx_l4_core_hwmod,
3548 &omap3xxx_l4_per_hwmod,
3549 &omap3xxx_l4_wkup_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003550 &omap3xxx_mmc3_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003551 &omap3xxx_mpu_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07003552
3553 &omap3xxx_timer1_hwmod,
3554 &omap3xxx_timer2_hwmod,
3555 &omap3xxx_timer3_hwmod,
3556 &omap3xxx_timer4_hwmod,
3557 &omap3xxx_timer5_hwmod,
3558 &omap3xxx_timer6_hwmod,
3559 &omap3xxx_timer7_hwmod,
3560 &omap3xxx_timer8_hwmod,
3561 &omap3xxx_timer9_hwmod,
3562 &omap3xxx_timer10_hwmod,
3563 &omap3xxx_timer11_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07003564
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05303565 &omap3xxx_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05303566 &omap3xxx_uart1_hwmod,
3567 &omap3xxx_uart2_hwmod,
3568 &omap3xxx_uart3_hwmod,
Keshava Munegowdade231382011-12-15 23:14:44 -07003569
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00003570 /* i2c class */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05303571 &omap3xxx_i2c1_hwmod,
3572 &omap3xxx_i2c2_hwmod,
3573 &omap3xxx_i2c3_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003574
3575 /* gpio class */
3576 &omap3xxx_gpio1_hwmod,
3577 &omap3xxx_gpio2_hwmod,
3578 &omap3xxx_gpio3_hwmod,
3579 &omap3xxx_gpio4_hwmod,
3580 &omap3xxx_gpio5_hwmod,
3581 &omap3xxx_gpio6_hwmod,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003582
3583 /* dma_system class*/
3584 &omap3xxx_dma_system_hwmod,
Charulatha V0f616a42011-02-17 09:53:10 -08003585
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303586 /* mcbsp class */
3587 &omap3xxx_mcbsp1_hwmod,
3588 &omap3xxx_mcbsp2_hwmod,
3589 &omap3xxx_mcbsp3_hwmod,
3590 &omap3xxx_mcbsp4_hwmod,
3591 &omap3xxx_mcbsp5_hwmod,
3592 &omap3xxx_mcbsp2_sidetone_hwmod,
3593 &omap3xxx_mcbsp3_sidetone_hwmod,
3594
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003595
Charulatha V0f616a42011-02-17 09:53:10 -08003596 /* mcspi class */
3597 &omap34xx_mcspi1,
3598 &omap34xx_mcspi2,
3599 &omap34xx_mcspi3,
3600 &omap34xx_mcspi4,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003601
Paul Walmsley73591542010-02-22 22:09:32 -07003602 NULL,
3603};
3604
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003605/* GP-only hwmods */
3606static __initdata struct omap_hwmod *omap3xxx_gp_hwmods[] = {
3607 &omap3xxx_timer12_hwmod,
3608 NULL
3609};
3610
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003611/* 3430ES1-only hwmods */
3612static __initdata struct omap_hwmod *omap3430es1_hwmods[] = {
3613 &omap3430es1_dss_core_hwmod,
3614 NULL
3615};
3616
3617/* 3430ES2+-only hwmods */
3618static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = {
3619 &omap3xxx_dss_core_hwmod,
3620 &omap3xxx_usbhsotg_hwmod,
Keshava Munegowdade231382011-12-15 23:14:44 -07003621 &omap3xxx_usb_host_hs_hwmod,
3622 &omap3xxx_usb_tll_hs_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003623 NULL
3624};
3625
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003626/* <= 3430ES3-only hwmods */
3627static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = {
3628 &omap3xxx_pre_es3_mmc1_hwmod,
3629 &omap3xxx_pre_es3_mmc2_hwmod,
3630 NULL
3631};
3632
3633/* 3430ES3+-only hwmods */
3634static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = {
3635 &omap3xxx_es3plus_mmc1_hwmod,
3636 &omap3xxx_es3plus_mmc2_hwmod,
3637 NULL
3638};
3639
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003640/* 34xx-only hwmods (all ES revisions) */
3641static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
Abhilash K V7e890982011-10-07 03:08:56 -06003642 &omap3xxx_iva_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003643 &omap34xx_sr1_hwmod,
3644 &omap34xx_sr2_hwmod,
Abhilash K V7e890982011-10-07 03:08:56 -06003645 &omap3xxx_mailbox_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003646 NULL
3647};
3648
3649/* 36xx-only hwmods (all ES revisions) */
3650static __initdata struct omap_hwmod *omap36xx_hwmods[] = {
Abhilash K V7e890982011-10-07 03:08:56 -06003651 &omap3xxx_iva_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003652 &omap3xxx_uart4_hwmod,
3653 &omap3xxx_dss_core_hwmod,
3654 &omap36xx_sr1_hwmod,
3655 &omap36xx_sr2_hwmod,
3656 &omap3xxx_usbhsotg_hwmod,
Abhilash K V7e890982011-10-07 03:08:56 -06003657 &omap3xxx_mailbox_hwmod,
Keshava Munegowdade231382011-12-15 23:14:44 -07003658 &omap3xxx_usb_host_hs_hwmod,
3659 &omap3xxx_usb_tll_hs_hwmod,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003660 &omap3xxx_es3plus_mmc1_hwmod,
3661 &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003662 NULL
3663};
3664
3665static __initdata struct omap_hwmod *am35xx_hwmods[] = {
3666 &omap3xxx_dss_core_hwmod, /* XXX ??? */
3667 &am35xx_usbhsotg_hwmod,
Kyle Manna4bf90f62011-10-18 13:47:41 -05003668 &am35xx_uart4_hwmod,
Keshava Munegowdade231382011-12-15 23:14:44 -07003669 &omap3xxx_usb_host_hs_hwmod,
3670 &omap3xxx_usb_tll_hs_hwmod,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003671 &omap3xxx_es3plus_mmc1_hwmod,
3672 &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003673 NULL
3674};
3675
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003676static __initdata struct omap_hwmod *omap3xxx_dss_hwmods[] = {
3677 /* dss class */
3678 &omap3xxx_dss_dispc_hwmod,
3679 &omap3xxx_dss_dsi1_hwmod,
3680 &omap3xxx_dss_rfbi_hwmod,
3681 &omap3xxx_dss_venc_hwmod,
3682 NULL
3683};
3684
Paul Walmsley73591542010-02-22 22:09:32 -07003685int __init omap3xxx_hwmod_init(void)
3686{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003687 int r;
3688 struct omap_hwmod **h = NULL;
3689 unsigned int rev;
3690
3691 /* Register hwmods common to all OMAP3 */
3692 r = omap_hwmod_register(omap3xxx_hwmods);
Paul Walmsleyace90212011-10-06 14:39:28 -06003693 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003694 return r;
3695
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003696 /* Register GP-only hwmods. */
3697 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
3698 r = omap_hwmod_register(omap3xxx_gp_hwmods);
3699 if (r < 0)
3700 return r;
3701 }
3702
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003703 rev = omap_rev();
3704
3705 /*
3706 * Register hwmods common to individual OMAP3 families, all
3707 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3708 * All possible revisions should be included in this conditional.
3709 */
3710 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3711 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3712 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3713 h = omap34xx_hwmods;
3714 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
3715 h = am35xx_hwmods;
3716 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3717 rev == OMAP3630_REV_ES1_2) {
3718 h = omap36xx_hwmods;
3719 } else {
3720 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3721 return -EINVAL;
3722 };
3723
3724 r = omap_hwmod_register(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003725 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003726 return r;
3727
3728 /*
3729 * Register hwmods specific to certain ES levels of a
3730 * particular family of silicon (e.g., 34xx ES1.0)
3731 */
3732 h = NULL;
3733 if (rev == OMAP3430_REV_ES1_0) {
3734 h = omap3430es1_hwmods;
3735 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3736 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3737 rev == OMAP3430_REV_ES3_1_2) {
3738 h = omap3430es2plus_hwmods;
3739 };
3740
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003741 if (h) {
3742 r = omap_hwmod_register(h);
3743 if (r < 0)
3744 return r;
3745 }
3746
3747 h = NULL;
3748 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3749 rev == OMAP3430_REV_ES2_1) {
3750 h = omap3430_pre_es3_hwmods;
3751 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3752 rev == OMAP3430_REV_ES3_1_2) {
3753 h = omap3430_es3plus_hwmods;
3754 };
3755
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003756 if (h)
3757 r = omap_hwmod_register(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003758 if (r < 0)
3759 return r;
3760
3761 /*
3762 * DSS code presumes that dss_core hwmod is handled first,
3763 * _before_ any other DSS related hwmods so register common
3764 * DSS hwmods last to ensure that dss_core is already registered.
3765 * Otherwise some change things may happen, for ex. if dispc
3766 * is handled before dss_core and DSS is enabled in bootloader
3767 * DIPSC will be reset with outputs enabled which sometimes leads
3768 * to unrecoverable L3 error.
3769 * XXX The long-term fix to this is to ensure modules are set up
3770 * in dependency order in the hwmod core code.
3771 */
3772 r = omap_hwmod_register(omap3xxx_dss_hwmods);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003773
3774 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003775}