blob: a3eeff733682006d6c91675a080d83cf2f882324 [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 Walmsley0a78c5c2012-04-19 04:04:31 -06005 * Copyright (C) 2012 Texas Instruments, Inc.
Paul Walmsley73591542010-02-22 22:09:32 -07006 * Paul Walmsley
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
14 *
15 * XXX these should be marked initdata for multi-OMAP kernels
16 */
17#include <plat/omap_hwmod.h>
18#include <mach/irqs.h>
19#include <plat/cpu.h>
20#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053021#include <plat/serial.h>
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000022#include <plat/l3_3xxx.h>
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053023#include <plat/l4_3xxx.h>
24#include <plat/i2c.h>
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080025#include <plat/gpio.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080026#include <plat/mmc.h>
Charulatha Vdc48e5f2011-02-24 15:16:49 +053027#include <plat/mcbsp.h>
Charulatha V0f616a42011-02-17 09:53:10 -080028#include <plat/mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070029#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070030
Paul Walmsley43b40992010-02-22 22:09:34 -070031#include "omap_hwmod_common_data.h"
32
Shweta Gulaticea6b942012-02-29 23:33:37 +010033#include "smartreflex.h"
Paul Walmsley73591542010-02-22 22:09:32 -070034#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053035#include "cm-regbits-34xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070036#include "wd_timer.h"
Hema HK273ff8c2011-02-17 12:07:19 +053037#include <mach/am35xx.h>
Paul Walmsley73591542010-02-22 22:09:32 -070038
39/*
40 * OMAP3xxx hardware module integration data
41 *
42 * ALl of the data in this section should be autogeneratable from the
43 * TI hardware database or other technical documentation. Data that
44 * is driver-specific or driver-kernel integration-specific belongs
45 * elsewhere.
46 */
47
48static struct omap_hwmod omap3xxx_mpu_hwmod;
Kevin Hilman540064b2010-07-26 16:34:32 -060049static struct omap_hwmod omap3xxx_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060050static struct omap_hwmod omap3xxx_l3_main_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -070051static struct omap_hwmod omap3xxx_l4_core_hwmod;
52static struct omap_hwmod omap3xxx_l4_per_hwmod;
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053053static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000054static struct omap_hwmod omap3430es1_dss_core_hwmod;
55static struct omap_hwmod omap3xxx_dss_core_hwmod;
56static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
57static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
58static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
59static struct omap_hwmod omap3xxx_dss_venc_hwmod;
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053060static struct omap_hwmod omap3xxx_i2c1_hwmod;
61static struct omap_hwmod omap3xxx_i2c2_hwmod;
62static struct omap_hwmod omap3xxx_i2c3_hwmod;
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080063static struct omap_hwmod omap3xxx_gpio1_hwmod;
64static struct omap_hwmod omap3xxx_gpio2_hwmod;
65static struct omap_hwmod omap3xxx_gpio3_hwmod;
66static struct omap_hwmod omap3xxx_gpio4_hwmod;
67static struct omap_hwmod omap3xxx_gpio5_hwmod;
68static struct omap_hwmod omap3xxx_gpio6_hwmod;
Thara Gopinathd3442722010-05-29 22:02:24 +053069static struct omap_hwmod omap34xx_sr1_hwmod;
70static struct omap_hwmod omap34xx_sr2_hwmod;
Charulatha V0f616a42011-02-17 09:53:10 -080071static struct omap_hwmod omap34xx_mcspi1;
72static struct omap_hwmod omap34xx_mcspi2;
73static struct omap_hwmod omap34xx_mcspi3;
74static struct omap_hwmod omap34xx_mcspi4;
Paul Walmsley4a9efb62012-04-19 04:03:51 -060075static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod;
76static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod;
77static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod;
78static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod;
Paul Walmsleyb1636052011-03-01 13:12:56 -080079static struct omap_hwmod omap3xxx_mmc3_hwmod;
Hema HK273ff8c2011-02-17 12:07:19 +053080static struct omap_hwmod am35xx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -070081
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080082static struct omap_hwmod omap3xxx_dma_system_hwmod;
83
Charulatha Vdc48e5f2011-02-24 15:16:49 +053084static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
85static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
86static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
87static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
88static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
89static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
90static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
Keshava Munegowdade231382011-12-15 23:14:44 -070091static struct omap_hwmod omap3xxx_usb_host_hs_hwmod;
92static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod;
Charulatha Vdc48e5f2011-02-24 15:16:49 +053093
Paul Walmsley73591542010-02-22 22:09:32 -070094/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060095static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
96 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -070097 .slave = &omap3xxx_l4_core_hwmod,
98 .user = OCP_USER_MPU | OCP_USER_SDMA,
99};
100
101/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600102static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
103 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -0700104 .slave = &omap3xxx_l4_per_hwmod,
105 .user = OCP_USER_MPU | OCP_USER_SDMA,
106};
107
sricharan4bb194d2011-02-08 22:13:37 +0530108/* L3 taret configuration and error log registers */
109static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
110 { .irq = INT_34XX_L3_DBG_IRQ },
111 { .irq = INT_34XX_L3_APP_IRQ },
Paul Walmsley212738a2011-07-09 19:14:06 -0600112 { .irq = -1 }
sricharan4bb194d2011-02-08 22:13:37 +0530113};
114
115static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
116 {
117 .pa_start = 0x68000000,
118 .pa_end = 0x6800ffff,
119 .flags = ADDR_TYPE_RT,
120 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600121 { }
sricharan4bb194d2011-02-08 22:13:37 +0530122};
123
Paul Walmsley73591542010-02-22 22:09:32 -0700124/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600125static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +0530126 .master = &omap3xxx_mpu_hwmod,
127 .slave = &omap3xxx_l3_main_hwmod,
128 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -0700129 .user = OCP_USER_MPU,
130};
131
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +0000132/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -0600133static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
134 .master = &omap3430es1_dss_core_hwmod,
135 .slave = &omap3xxx_l3_main_hwmod,
136 .user = OCP_USER_MPU | OCP_USER_SDMA,
137};
138
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +0000139static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
140 .master = &omap3xxx_dss_core_hwmod,
141 .slave = &omap3xxx_l3_main_hwmod,
142 .fw = {
143 .omap2 = {
144 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
145 .flags = OMAP_FIREWALL_L3,
146 }
147 },
148 .user = OCP_USER_MPU | OCP_USER_SDMA,
149};
150
Paul Walmsley73591542010-02-22 22:09:32 -0700151/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600152static struct omap_hwmod omap3xxx_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600153 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -0700154 .class = &l3_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600155 .mpu_irqs = omap3xxx_l3_main_irqs,
Kevin Hilman2eb18752010-07-26 16:34:28 -0600156 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700157};
158
159static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
Paul Walmsley43085702012-04-19 04:03:53 -0600160static struct omap_hwmod omap3xxx_l4_sec_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530161static struct omap_hwmod omap3xxx_uart1_hwmod;
162static struct omap_hwmod omap3xxx_uart2_hwmod;
163static struct omap_hwmod omap3xxx_uart3_hwmod;
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600164static struct omap_hwmod omap36xx_uart4_hwmod;
Kyle Manna4bf90f62011-10-18 13:47:41 -0500165static struct omap_hwmod am35xx_uart4_hwmod;
Hema HK870ea2b2011-02-17 12:07:18 +0530166static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -0700167
Hema HK870ea2b2011-02-17 12:07:18 +0530168/* l3_core -> usbhsotg interface */
169static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
170 .master = &omap3xxx_usbhsotg_hwmod,
171 .slave = &omap3xxx_l3_main_hwmod,
172 .clk = "core_l3_ick",
173 .user = OCP_USER_MPU,
174};
Paul Walmsley73591542010-02-22 22:09:32 -0700175
Hema HK273ff8c2011-02-17 12:07:19 +0530176/* l3_core -> am35xx_usbhsotg interface */
177static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
178 .master = &am35xx_usbhsotg_hwmod,
179 .slave = &omap3xxx_l3_main_hwmod,
180 .clk = "core_l3_ick",
181 .user = OCP_USER_MPU,
182};
Paul Walmsley73591542010-02-22 22:09:32 -0700183/* L4_CORE -> L4_WKUP interface */
184static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
185 .master = &omap3xxx_l4_core_hwmod,
186 .slave = &omap3xxx_l4_wkup_hwmod,
187 .user = OCP_USER_MPU | OCP_USER_SDMA,
188};
189
Paul Walmsleyb1636052011-03-01 13:12:56 -0800190/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -0600191static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -0800192 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -0600193 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
194 .clk = "mmchs1_ick",
195 .addr = omap2430_mmc1_addr_space,
196 .user = OCP_USER_MPU | OCP_USER_SDMA,
197 .flags = OMAP_FIREWALL_L4
198};
199
200static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
201 .master = &omap3xxx_l4_core_hwmod,
202 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800203 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600204 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800205 .user = OCP_USER_MPU | OCP_USER_SDMA,
206 .flags = OMAP_FIREWALL_L4
207};
208
209/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -0600210static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -0800211 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -0600212 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
213 .clk = "mmchs2_ick",
214 .addr = omap2430_mmc2_addr_space,
215 .user = OCP_USER_MPU | OCP_USER_SDMA,
216 .flags = OMAP_FIREWALL_L4
217};
218
219static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
220 .master = &omap3xxx_l4_core_hwmod,
221 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800222 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600223 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800224 .user = OCP_USER_MPU | OCP_USER_SDMA,
225 .flags = OMAP_FIREWALL_L4
226};
227
228/* L4 CORE -> MMC3 interface */
229static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
230 {
231 .pa_start = 0x480ad000,
232 .pa_end = 0x480ad1ff,
233 .flags = ADDR_TYPE_RT,
234 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600235 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -0800236};
237
238static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
239 .master = &omap3xxx_l4_core_hwmod,
240 .slave = &omap3xxx_mmc3_hwmod,
241 .clk = "mmchs3_ick",
242 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800243 .user = OCP_USER_MPU | OCP_USER_SDMA,
244 .flags = OMAP_FIREWALL_L4
245};
246
Kevin Hilman046465b2010-09-27 20:19:30 +0530247/* L4 CORE -> UART1 interface */
248static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
249 {
250 .pa_start = OMAP3_UART1_BASE,
251 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
252 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
253 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600254 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530255};
256
257static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
258 .master = &omap3xxx_l4_core_hwmod,
259 .slave = &omap3xxx_uart1_hwmod,
260 .clk = "uart1_ick",
261 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530262 .user = OCP_USER_MPU | OCP_USER_SDMA,
263};
264
265/* L4 CORE -> UART2 interface */
266static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
267 {
268 .pa_start = OMAP3_UART2_BASE,
269 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
270 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
271 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600272 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530273};
274
275static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
276 .master = &omap3xxx_l4_core_hwmod,
277 .slave = &omap3xxx_uart2_hwmod,
278 .clk = "uart2_ick",
279 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530280 .user = OCP_USER_MPU | OCP_USER_SDMA,
281};
282
283/* L4 PER -> UART3 interface */
284static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
285 {
286 .pa_start = OMAP3_UART3_BASE,
287 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
288 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
289 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600290 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530291};
292
293static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
294 .master = &omap3xxx_l4_per_hwmod,
295 .slave = &omap3xxx_uart3_hwmod,
296 .clk = "uart3_ick",
297 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530298 .user = OCP_USER_MPU | OCP_USER_SDMA,
299};
300
301/* L4 PER -> UART4 interface */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600302static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
Kevin Hilman046465b2010-09-27 20:19:30 +0530303 {
304 .pa_start = OMAP3_UART4_BASE,
305 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
306 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
307 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600308 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530309};
310
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600311static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +0530312 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600313 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +0530314 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600315 .addr = omap36xx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530316 .user = OCP_USER_MPU | OCP_USER_SDMA,
317};
318
Kyle Manna4bf90f62011-10-18 13:47:41 -0500319/* AM35xx: L4 CORE -> UART4 interface */
320static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
321 {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600322 .pa_start = OMAP3_UART4_AM35XX_BASE,
323 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
324 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
Kyle Manna4bf90f62011-10-18 13:47:41 -0500325 },
326};
327
328static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600329 .master = &omap3xxx_l4_core_hwmod,
330 .slave = &am35xx_uart4_hwmod,
331 .clk = "uart4_ick",
332 .addr = am35xx_uart4_addr_space,
333 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -0500334};
335
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530336/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530337static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
338 .master = &omap3xxx_l4_core_hwmod,
339 .slave = &omap3xxx_i2c1_hwmod,
340 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600341 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530342 .fw = {
343 .omap2 = {
344 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
345 .l4_prot_group = 7,
346 .flags = OMAP_FIREWALL_L4,
347 }
348 },
349 .user = OCP_USER_MPU | OCP_USER_SDMA,
350};
351
352/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530353static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
354 .master = &omap3xxx_l4_core_hwmod,
355 .slave = &omap3xxx_i2c2_hwmod,
356 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600357 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530358 .fw = {
359 .omap2 = {
360 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
361 .l4_prot_group = 7,
362 .flags = OMAP_FIREWALL_L4,
363 }
364 },
365 .user = OCP_USER_MPU | OCP_USER_SDMA,
366};
367
368/* L4 CORE -> I2C3 interface */
369static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
370 {
371 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -0600372 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530373 .flags = ADDR_TYPE_RT,
374 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600375 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530376};
377
378static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
379 .master = &omap3xxx_l4_core_hwmod,
380 .slave = &omap3xxx_i2c3_hwmod,
381 .clk = "i2c3_ick",
382 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530383 .fw = {
384 .omap2 = {
385 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
386 .l4_prot_group = 7,
387 .flags = OMAP_FIREWALL_L4,
388 }
389 },
390 .user = OCP_USER_MPU | OCP_USER_SDMA,
391};
392
Nishanth Menond62bc782012-02-29 23:33:43 +0100393static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
394 { .irq = 18},
395 { .irq = -1 }
396};
397
398static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
399 { .irq = 19},
400 { .irq = -1 }
401};
402
Thara Gopinathd3442722010-05-29 22:02:24 +0530403/* L4 CORE -> SR1 interface */
404static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
405 {
406 .pa_start = OMAP34XX_SR1_BASE,
407 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
408 .flags = ADDR_TYPE_RT,
409 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600410 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530411};
412
413static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
414 .master = &omap3xxx_l4_core_hwmod,
415 .slave = &omap34xx_sr1_hwmod,
416 .clk = "sr_l4_ick",
417 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530418 .user = OCP_USER_MPU,
419};
420
421/* L4 CORE -> SR1 interface */
422static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
423 {
424 .pa_start = OMAP34XX_SR2_BASE,
425 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
426 .flags = ADDR_TYPE_RT,
427 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600428 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530429};
430
431static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
432 .master = &omap3xxx_l4_core_hwmod,
433 .slave = &omap34xx_sr2_hwmod,
434 .clk = "sr_l4_ick",
435 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530436 .user = OCP_USER_MPU,
437};
438
Hema HK870ea2b2011-02-17 12:07:18 +0530439/*
440* usbhsotg interface data
441*/
442
443static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
444 {
445 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
446 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
447 .flags = ADDR_TYPE_RT
448 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600449 { }
Hema HK870ea2b2011-02-17 12:07:18 +0530450};
451
452/* l4_core -> usbhsotg */
453static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
454 .master = &omap3xxx_l4_core_hwmod,
455 .slave = &omap3xxx_usbhsotg_hwmod,
456 .clk = "l4_ick",
457 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +0530458 .user = OCP_USER_MPU,
459};
460
Hema HK273ff8c2011-02-17 12:07:19 +0530461static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
462 {
463 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
464 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
465 .flags = ADDR_TYPE_RT
466 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600467 { }
Hema HK273ff8c2011-02-17 12:07:19 +0530468};
469
470/* l4_core -> usbhsotg */
471static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
472 .master = &omap3xxx_l4_core_hwmod,
473 .slave = &am35xx_usbhsotg_hwmod,
474 .clk = "l4_ick",
475 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +0530476 .user = OCP_USER_MPU,
477};
478
Paul Walmsley73591542010-02-22 22:09:32 -0700479/* L4 CORE */
480static struct omap_hwmod omap3xxx_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600481 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700482 .class = &l4_hwmod_class,
Kevin Hilman2eb18752010-07-26 16:34:28 -0600483 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700484};
485
Paul Walmsley73591542010-02-22 22:09:32 -0700486/* L4 PER */
487static struct omap_hwmod omap3xxx_l4_per_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600488 .name = "l4_per",
Paul Walmsley43b40992010-02-22 22:09:34 -0700489 .class = &l4_hwmod_class,
Kevin Hilman2eb18752010-07-26 16:34:28 -0600490 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700491};
492
Paul Walmsley43085702012-04-19 04:03:53 -0600493/* L4_WKUP -> L4_SEC interface */
494static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
495 .master = &omap3xxx_l4_wkup_hwmod,
496 .slave = &omap3xxx_l4_sec_hwmod,
497 .user = OCP_USER_MPU | OCP_USER_SDMA,
498};
499
Paul Walmsley73591542010-02-22 22:09:32 -0700500/* L4 WKUP */
501static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600502 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700503 .class = &l4_hwmod_class,
Kevin Hilman2eb18752010-07-26 16:34:28 -0600504 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700505};
506
Paul Walmsley43085702012-04-19 04:03:53 -0600507/* L4 SEC */
508static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
509 .name = "l4_sec",
510 .class = &l4_hwmod_class,
Paul Walmsley43085702012-04-19 04:03:53 -0600511 .flags = HWMOD_NO_IDLEST,
512};
513
Paul Walmsley73591542010-02-22 22:09:32 -0700514/* MPU */
515static struct omap_hwmod omap3xxx_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600516 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700517 .class = &mpu_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700518 .main_clk = "arm_fck",
Paul Walmsley73591542010-02-22 22:09:32 -0700519};
520
Kevin Hilman540064b2010-07-26 16:34:32 -0600521/*
522 * IVA2_2 interface data
523 */
524
525/* IVA2 <- L3 interface */
526static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
527 .master = &omap3xxx_l3_main_hwmod,
528 .slave = &omap3xxx_iva_hwmod,
529 .clk = "iva2_ck",
530 .user = OCP_USER_MPU | OCP_USER_SDMA,
531};
532
Kevin Hilman540064b2010-07-26 16:34:32 -0600533/*
534 * IVA2 (IVA2)
535 */
536
537static struct omap_hwmod omap3xxx_iva_hwmod = {
538 .name = "iva",
539 .class = &iva_hwmod_class,
Kevin Hilman540064b2010-07-26 16:34:32 -0600540};
541
Thara Gopinathce722d22011-02-23 00:14:05 -0700542/* timer class */
543static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
544 .rev_offs = 0x0000,
545 .sysc_offs = 0x0010,
546 .syss_offs = 0x0014,
547 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
548 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
549 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
550 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
551 .sysc_fields = &omap_hwmod_sysc_type1,
552};
553
554static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
555 .name = "timer",
556 .sysc = &omap3xxx_timer_1ms_sysc,
557 .rev = OMAP_TIMER_IP_VERSION_1,
558};
559
560static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
561 .rev_offs = 0x0000,
562 .sysc_offs = 0x0010,
563 .syss_offs = 0x0014,
564 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
565 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
566 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
567 .sysc_fields = &omap_hwmod_sysc_type1,
568};
569
570static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
571 .name = "timer",
572 .sysc = &omap3xxx_timer_sysc,
573 .rev = OMAP_TIMER_IP_VERSION_1,
574};
575
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530576/* secure timers dev attribute */
577static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600578 .timer_capability = OMAP_TIMER_SECURE,
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530579};
580
581/* always-on timers dev attribute */
582static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600583 .timer_capability = OMAP_TIMER_ALWON,
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530584};
585
586/* pwm timers dev attribute */
587static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
588 .timer_capability = OMAP_TIMER_HAS_PWM,
589};
590
Thara Gopinathce722d22011-02-23 00:14:05 -0700591/* timer1 */
592static struct omap_hwmod omap3xxx_timer1_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700593
594static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
595 {
596 .pa_start = 0x48318000,
597 .pa_end = 0x48318000 + SZ_1K - 1,
598 .flags = ADDR_TYPE_RT
599 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600600 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700601};
602
603/* l4_wkup -> timer1 */
604static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
605 .master = &omap3xxx_l4_wkup_hwmod,
606 .slave = &omap3xxx_timer1_hwmod,
607 .clk = "gpt1_ick",
608 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700609 .user = OCP_USER_MPU | OCP_USER_SDMA,
610};
611
Thara Gopinathce722d22011-02-23 00:14:05 -0700612/* timer1 hwmod */
613static struct omap_hwmod omap3xxx_timer1_hwmod = {
614 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600615 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700616 .main_clk = "gpt1_fck",
617 .prcm = {
618 .omap2 = {
619 .prcm_reg_id = 1,
620 .module_bit = OMAP3430_EN_GPT1_SHIFT,
621 .module_offs = WKUP_MOD,
622 .idlest_reg_id = 1,
623 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
624 },
625 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530626 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700627 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700628};
629
630/* timer2 */
631static struct omap_hwmod omap3xxx_timer2_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700632
633static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
634 {
635 .pa_start = 0x49032000,
636 .pa_end = 0x49032000 + SZ_1K - 1,
637 .flags = ADDR_TYPE_RT
638 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600639 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700640};
641
642/* l4_per -> timer2 */
643static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
644 .master = &omap3xxx_l4_per_hwmod,
645 .slave = &omap3xxx_timer2_hwmod,
646 .clk = "gpt2_ick",
647 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700648 .user = OCP_USER_MPU | OCP_USER_SDMA,
649};
650
Thara Gopinathce722d22011-02-23 00:14:05 -0700651/* timer2 hwmod */
652static struct omap_hwmod omap3xxx_timer2_hwmod = {
653 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600654 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700655 .main_clk = "gpt2_fck",
656 .prcm = {
657 .omap2 = {
658 .prcm_reg_id = 1,
659 .module_bit = OMAP3430_EN_GPT2_SHIFT,
660 .module_offs = OMAP3430_PER_MOD,
661 .idlest_reg_id = 1,
662 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
663 },
664 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530665 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700666 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700667};
668
669/* timer3 */
670static struct omap_hwmod omap3xxx_timer3_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700671
672static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
673 {
674 .pa_start = 0x49034000,
675 .pa_end = 0x49034000 + SZ_1K - 1,
676 .flags = ADDR_TYPE_RT
677 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600678 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700679};
680
681/* l4_per -> timer3 */
682static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
683 .master = &omap3xxx_l4_per_hwmod,
684 .slave = &omap3xxx_timer3_hwmod,
685 .clk = "gpt3_ick",
686 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700687 .user = OCP_USER_MPU | OCP_USER_SDMA,
688};
689
Thara Gopinathce722d22011-02-23 00:14:05 -0700690/* timer3 hwmod */
691static struct omap_hwmod omap3xxx_timer3_hwmod = {
692 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600693 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700694 .main_clk = "gpt3_fck",
695 .prcm = {
696 .omap2 = {
697 .prcm_reg_id = 1,
698 .module_bit = OMAP3430_EN_GPT3_SHIFT,
699 .module_offs = OMAP3430_PER_MOD,
700 .idlest_reg_id = 1,
701 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
702 },
703 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530704 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700705 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700706};
707
708/* timer4 */
709static struct omap_hwmod omap3xxx_timer4_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700710
711static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
712 {
713 .pa_start = 0x49036000,
714 .pa_end = 0x49036000 + SZ_1K - 1,
715 .flags = ADDR_TYPE_RT
716 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600717 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700718};
719
720/* l4_per -> timer4 */
721static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
722 .master = &omap3xxx_l4_per_hwmod,
723 .slave = &omap3xxx_timer4_hwmod,
724 .clk = "gpt4_ick",
725 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700726 .user = OCP_USER_MPU | OCP_USER_SDMA,
727};
728
Thara Gopinathce722d22011-02-23 00:14:05 -0700729/* timer4 hwmod */
730static struct omap_hwmod omap3xxx_timer4_hwmod = {
731 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600732 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700733 .main_clk = "gpt4_fck",
734 .prcm = {
735 .omap2 = {
736 .prcm_reg_id = 1,
737 .module_bit = OMAP3430_EN_GPT4_SHIFT,
738 .module_offs = OMAP3430_PER_MOD,
739 .idlest_reg_id = 1,
740 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
741 },
742 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530743 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700744 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700745};
746
747/* timer5 */
748static struct omap_hwmod omap3xxx_timer5_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700749
750static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
751 {
752 .pa_start = 0x49038000,
753 .pa_end = 0x49038000 + SZ_1K - 1,
754 .flags = ADDR_TYPE_RT
755 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600756 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700757};
758
759/* l4_per -> timer5 */
760static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
761 .master = &omap3xxx_l4_per_hwmod,
762 .slave = &omap3xxx_timer5_hwmod,
763 .clk = "gpt5_ick",
764 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700765 .user = OCP_USER_MPU | OCP_USER_SDMA,
766};
767
Thara Gopinathce722d22011-02-23 00:14:05 -0700768/* timer5 hwmod */
769static struct omap_hwmod omap3xxx_timer5_hwmod = {
770 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600771 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700772 .main_clk = "gpt5_fck",
773 .prcm = {
774 .omap2 = {
775 .prcm_reg_id = 1,
776 .module_bit = OMAP3430_EN_GPT5_SHIFT,
777 .module_offs = OMAP3430_PER_MOD,
778 .idlest_reg_id = 1,
779 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
780 },
781 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530782 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700783 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700784};
785
786/* timer6 */
787static struct omap_hwmod omap3xxx_timer6_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700788
789static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
790 {
791 .pa_start = 0x4903A000,
792 .pa_end = 0x4903A000 + SZ_1K - 1,
793 .flags = ADDR_TYPE_RT
794 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600795 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700796};
797
798/* l4_per -> timer6 */
799static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
800 .master = &omap3xxx_l4_per_hwmod,
801 .slave = &omap3xxx_timer6_hwmod,
802 .clk = "gpt6_ick",
803 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700804 .user = OCP_USER_MPU | OCP_USER_SDMA,
805};
806
Thara Gopinathce722d22011-02-23 00:14:05 -0700807/* timer6 hwmod */
808static struct omap_hwmod omap3xxx_timer6_hwmod = {
809 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600810 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700811 .main_clk = "gpt6_fck",
812 .prcm = {
813 .omap2 = {
814 .prcm_reg_id = 1,
815 .module_bit = OMAP3430_EN_GPT6_SHIFT,
816 .module_offs = OMAP3430_PER_MOD,
817 .idlest_reg_id = 1,
818 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
819 },
820 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530821 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700822 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700823};
824
825/* timer7 */
826static struct omap_hwmod omap3xxx_timer7_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700827
828static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
829 {
830 .pa_start = 0x4903C000,
831 .pa_end = 0x4903C000 + SZ_1K - 1,
832 .flags = ADDR_TYPE_RT
833 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600834 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700835};
836
837/* l4_per -> timer7 */
838static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
839 .master = &omap3xxx_l4_per_hwmod,
840 .slave = &omap3xxx_timer7_hwmod,
841 .clk = "gpt7_ick",
842 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700843 .user = OCP_USER_MPU | OCP_USER_SDMA,
844};
845
Thara Gopinathce722d22011-02-23 00:14:05 -0700846/* timer7 hwmod */
847static struct omap_hwmod omap3xxx_timer7_hwmod = {
848 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600849 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700850 .main_clk = "gpt7_fck",
851 .prcm = {
852 .omap2 = {
853 .prcm_reg_id = 1,
854 .module_bit = OMAP3430_EN_GPT7_SHIFT,
855 .module_offs = OMAP3430_PER_MOD,
856 .idlest_reg_id = 1,
857 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
858 },
859 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530860 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700861 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700862};
863
864/* timer8 */
865static struct omap_hwmod omap3xxx_timer8_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700866
867static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
868 {
869 .pa_start = 0x4903E000,
870 .pa_end = 0x4903E000 + SZ_1K - 1,
871 .flags = ADDR_TYPE_RT
872 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600873 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700874};
875
876/* l4_per -> timer8 */
877static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
878 .master = &omap3xxx_l4_per_hwmod,
879 .slave = &omap3xxx_timer8_hwmod,
880 .clk = "gpt8_ick",
881 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700882 .user = OCP_USER_MPU | OCP_USER_SDMA,
883};
884
Thara Gopinathce722d22011-02-23 00:14:05 -0700885/* timer8 hwmod */
886static struct omap_hwmod omap3xxx_timer8_hwmod = {
887 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600888 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700889 .main_clk = "gpt8_fck",
890 .prcm = {
891 .omap2 = {
892 .prcm_reg_id = 1,
893 .module_bit = OMAP3430_EN_GPT8_SHIFT,
894 .module_offs = OMAP3430_PER_MOD,
895 .idlest_reg_id = 1,
896 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
897 },
898 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530899 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700900 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700901};
902
903/* timer9 */
904static struct omap_hwmod omap3xxx_timer9_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700905
906static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
907 {
908 .pa_start = 0x49040000,
909 .pa_end = 0x49040000 + SZ_1K - 1,
910 .flags = ADDR_TYPE_RT
911 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600912 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700913};
914
915/* l4_per -> timer9 */
916static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
917 .master = &omap3xxx_l4_per_hwmod,
918 .slave = &omap3xxx_timer9_hwmod,
919 .clk = "gpt9_ick",
920 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700921 .user = OCP_USER_MPU | OCP_USER_SDMA,
922};
923
Thara Gopinathce722d22011-02-23 00:14:05 -0700924/* timer9 hwmod */
925static struct omap_hwmod omap3xxx_timer9_hwmod = {
926 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600927 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700928 .main_clk = "gpt9_fck",
929 .prcm = {
930 .omap2 = {
931 .prcm_reg_id = 1,
932 .module_bit = OMAP3430_EN_GPT9_SHIFT,
933 .module_offs = OMAP3430_PER_MOD,
934 .idlest_reg_id = 1,
935 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
936 },
937 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530938 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700939 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700940};
941
942/* timer10 */
943static struct omap_hwmod omap3xxx_timer10_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700944
Thara Gopinathce722d22011-02-23 00:14:05 -0700945/* l4_core -> timer10 */
946static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
947 .master = &omap3xxx_l4_core_hwmod,
948 .slave = &omap3xxx_timer10_hwmod,
949 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600950 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700951 .user = OCP_USER_MPU | OCP_USER_SDMA,
952};
953
Thara Gopinathce722d22011-02-23 00:14:05 -0700954/* timer10 hwmod */
955static struct omap_hwmod omap3xxx_timer10_hwmod = {
956 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600957 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700958 .main_clk = "gpt10_fck",
959 .prcm = {
960 .omap2 = {
961 .prcm_reg_id = 1,
962 .module_bit = OMAP3430_EN_GPT10_SHIFT,
963 .module_offs = CORE_MOD,
964 .idlest_reg_id = 1,
965 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
966 },
967 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530968 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700969 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700970};
971
972/* timer11 */
973static struct omap_hwmod omap3xxx_timer11_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700974
Thara Gopinathce722d22011-02-23 00:14:05 -0700975/* l4_core -> timer11 */
976static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
977 .master = &omap3xxx_l4_core_hwmod,
978 .slave = &omap3xxx_timer11_hwmod,
979 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600980 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700981 .user = OCP_USER_MPU | OCP_USER_SDMA,
982};
983
Thara Gopinathce722d22011-02-23 00:14:05 -0700984/* timer11 hwmod */
985static struct omap_hwmod omap3xxx_timer11_hwmod = {
986 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600987 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700988 .main_clk = "gpt11_fck",
989 .prcm = {
990 .omap2 = {
991 .prcm_reg_id = 1,
992 .module_bit = OMAP3430_EN_GPT11_SHIFT,
993 .module_offs = CORE_MOD,
994 .idlest_reg_id = 1,
995 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
996 },
997 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530998 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700999 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001000};
1001
Paul Walmsleybec93812012-04-19 04:03:50 -06001002/* timer12 */
Thara Gopinathce722d22011-02-23 00:14:05 -07001003static struct omap_hwmod omap3xxx_timer12_hwmod;
1004static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1005 { .irq = 95, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001006 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -07001007};
1008
1009static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1010 {
1011 .pa_start = 0x48304000,
1012 .pa_end = 0x48304000 + SZ_1K - 1,
1013 .flags = ADDR_TYPE_RT
1014 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001015 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07001016};
1017
1018/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06001019static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
1020 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07001021 .slave = &omap3xxx_timer12_hwmod,
1022 .clk = "gpt12_ick",
1023 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001024 .user = OCP_USER_MPU | OCP_USER_SDMA,
1025};
1026
Thara Gopinathce722d22011-02-23 00:14:05 -07001027/* timer12 hwmod */
1028static struct omap_hwmod omap3xxx_timer12_hwmod = {
1029 .name = "timer12",
1030 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001031 .main_clk = "gpt12_fck",
1032 .prcm = {
1033 .omap2 = {
1034 .prcm_reg_id = 1,
1035 .module_bit = OMAP3430_EN_GPT12_SHIFT,
1036 .module_offs = WKUP_MOD,
1037 .idlest_reg_id = 1,
1038 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
1039 },
1040 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301041 .dev_attr = &capability_secure_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001042 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001043};
1044
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301045/* l4_wkup -> wd_timer2 */
1046static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1047 {
1048 .pa_start = 0x48314000,
1049 .pa_end = 0x4831407f,
1050 .flags = ADDR_TYPE_RT
1051 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001052 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301053};
1054
1055static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1056 .master = &omap3xxx_l4_wkup_hwmod,
1057 .slave = &omap3xxx_wd_timer2_hwmod,
1058 .clk = "wdt2_ick",
1059 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301060 .user = OCP_USER_MPU | OCP_USER_SDMA,
1061};
1062
1063/*
1064 * 'wd_timer' class
1065 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1066 * overflow condition
1067 */
1068
1069static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
1070 .rev_offs = 0x0000,
1071 .sysc_offs = 0x0010,
1072 .syss_offs = 0x0014,
1073 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
1074 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001075 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1076 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301077 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1078 .sysc_fields = &omap_hwmod_sysc_type1,
1079};
1080
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301081/* I2C common */
1082static struct omap_hwmod_class_sysconfig i2c_sysc = {
1083 .rev_offs = 0x00,
1084 .sysc_offs = 0x20,
1085 .syss_offs = 0x10,
1086 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1087 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001088 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301089 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301090 .clockact = CLOCKACT_TEST_ICLK,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301091 .sysc_fields = &omap_hwmod_sysc_type1,
1092};
1093
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301094static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -07001095 .name = "wd_timer",
1096 .sysc = &omap3xxx_wd_timer_sysc,
1097 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301098};
1099
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301100static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1101 .name = "wd_timer2",
1102 .class = &omap3xxx_wd_timer_hwmod_class,
1103 .main_clk = "wdt2_fck",
1104 .prcm = {
1105 .omap2 = {
1106 .prcm_reg_id = 1,
1107 .module_bit = OMAP3430_EN_WDT2_SHIFT,
1108 .module_offs = WKUP_MOD,
1109 .idlest_reg_id = 1,
1110 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1111 },
1112 },
Paul Walmsley2f4dd592011-03-10 22:40:06 -07001113 /*
1114 * XXX: Use software supervised mode, HW supervised smartidle seems to
1115 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
1116 */
1117 .flags = HWMOD_SWSUP_SIDLE,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301118};
1119
Kevin Hilman046465b2010-09-27 20:19:30 +05301120/* UART1 */
Kevin Hilman046465b2010-09-27 20:19:30 +05301121static struct omap_hwmod omap3xxx_uart1_hwmod = {
1122 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001123 .mpu_irqs = omap2_uart1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001124 .sdma_reqs = omap2_uart1_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301125 .main_clk = "uart1_fck",
1126 .prcm = {
1127 .omap2 = {
1128 .module_offs = CORE_MOD,
1129 .prcm_reg_id = 1,
1130 .module_bit = OMAP3430_EN_UART1_SHIFT,
1131 .idlest_reg_id = 1,
1132 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1133 },
1134 },
Paul Walmsley273b9462011-07-09 19:14:08 -06001135 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301136};
1137
1138/* UART2 */
Kevin Hilman046465b2010-09-27 20:19:30 +05301139static struct omap_hwmod omap3xxx_uart2_hwmod = {
1140 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001141 .mpu_irqs = omap2_uart2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001142 .sdma_reqs = omap2_uart2_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301143 .main_clk = "uart2_fck",
1144 .prcm = {
1145 .omap2 = {
1146 .module_offs = CORE_MOD,
1147 .prcm_reg_id = 1,
1148 .module_bit = OMAP3430_EN_UART2_SHIFT,
1149 .idlest_reg_id = 1,
1150 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1151 },
1152 },
Paul Walmsley273b9462011-07-09 19:14:08 -06001153 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301154};
1155
1156/* UART3 */
Kevin Hilman046465b2010-09-27 20:19:30 +05301157static struct omap_hwmod omap3xxx_uart3_hwmod = {
1158 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001159 .mpu_irqs = omap2_uart3_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001160 .sdma_reqs = omap2_uart3_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301161 .main_clk = "uart3_fck",
1162 .prcm = {
1163 .omap2 = {
1164 .module_offs = OMAP3430_PER_MOD,
1165 .prcm_reg_id = 1,
1166 .module_bit = OMAP3430_EN_UART3_SHIFT,
1167 .idlest_reg_id = 1,
1168 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1169 },
1170 },
Paul Walmsley273b9462011-07-09 19:14:08 -06001171 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301172};
1173
1174/* UART4 */
1175
1176static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1177 { .irq = INT_36XX_UART4_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001178 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301179};
1180
1181static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1182 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
1183 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
Paul Walmsleybc614952011-07-09 19:14:07 -06001184 { .dma_req = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301185};
1186
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001187static struct omap_hwmod omap36xx_uart4_hwmod = {
Kevin Hilman046465b2010-09-27 20:19:30 +05301188 .name = "uart4",
1189 .mpu_irqs = uart4_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301190 .sdma_reqs = uart4_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301191 .main_clk = "uart4_fck",
1192 .prcm = {
1193 .omap2 = {
1194 .module_offs = OMAP3430_PER_MOD,
1195 .prcm_reg_id = 1,
1196 .module_bit = OMAP3630_EN_UART4_SHIFT,
1197 .idlest_reg_id = 1,
1198 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1199 },
1200 },
Paul Walmsley273b9462011-07-09 19:14:08 -06001201 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301202};
1203
Kyle Manna4bf90f62011-10-18 13:47:41 -05001204static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
1205 { .irq = INT_35XX_UART4_IRQ, },
1206};
1207
1208static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
1209 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
1210 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
1211};
1212
Kyle Manna4bf90f62011-10-18 13:47:41 -05001213static struct omap_hwmod am35xx_uart4_hwmod = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001214 .name = "uart4",
1215 .mpu_irqs = am35xx_uart4_mpu_irqs,
1216 .sdma_reqs = am35xx_uart4_sdma_reqs,
1217 .main_clk = "uart4_fck",
1218 .prcm = {
Kyle Manna4bf90f62011-10-18 13:47:41 -05001219 .omap2 = {
1220 .module_offs = CORE_MOD,
1221 .prcm_reg_id = 1,
1222 .module_bit = OMAP3430_EN_UART4_SHIFT,
1223 .idlest_reg_id = 1,
1224 .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
1225 },
1226 },
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001227 .class = &omap2_uart_class,
Kyle Manna4bf90f62011-10-18 13:47:41 -05001228};
1229
1230
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301231static struct omap_hwmod_class i2c_class = {
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06001232 .name = "i2c",
1233 .sysc = &i2c_sysc,
1234 .rev = OMAP_I2C_IP_VERSION_1,
1235 .reset = &omap_i2c_reset,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301236};
1237
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001238static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1239 { .name = "dispc", .dma_req = 5 },
1240 { .name = "dsi1", .dma_req = 74 },
Paul Walmsleybc614952011-07-09 19:14:07 -06001241 { .dma_req = -1 }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001242};
1243
1244/* dss */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001245
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001246/* l4_core -> dss */
1247static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1248 .master = &omap3xxx_l4_core_hwmod,
1249 .slave = &omap3430es1_dss_core_hwmod,
1250 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001251 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001252 .fw = {
1253 .omap2 = {
1254 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1255 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1256 .flags = OMAP_FIREWALL_L4,
1257 }
1258 },
1259 .user = OCP_USER_MPU | OCP_USER_SDMA,
1260};
1261
1262static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1263 .master = &omap3xxx_l4_core_hwmod,
1264 .slave = &omap3xxx_dss_core_hwmod,
1265 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001266 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001267 .fw = {
1268 .omap2 = {
1269 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1270 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1271 .flags = OMAP_FIREWALL_L4,
1272 }
1273 },
1274 .user = OCP_USER_MPU | OCP_USER_SDMA,
1275};
1276
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001277static struct omap_hwmod_opt_clk dss_opt_clks[] = {
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001278 /*
1279 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
1280 * driver does not use these clocks.
1281 */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001282 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001283 { .role = "tv_clk", .clk = "dss_tv_fck" },
1284 /* required only on OMAP3430 */
1285 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001286};
1287
1288static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1289 .name = "dss_core",
Paul Walmsley273b9462011-07-09 19:14:08 -06001290 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001291 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001292 .sdma_reqs = omap3xxx_dss_sdma_chs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001293 .prcm = {
1294 .omap2 = {
1295 .prcm_reg_id = 1,
1296 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1297 .module_offs = OMAP3430_DSS_MOD,
1298 .idlest_reg_id = 1,
1299 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
1300 },
1301 },
1302 .opt_clks = dss_opt_clks,
1303 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001304 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001305};
1306
1307static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1308 .name = "dss_core",
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001309 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley273b9462011-07-09 19:14:08 -06001310 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001311 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001312 .sdma_reqs = omap3xxx_dss_sdma_chs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001313 .prcm = {
1314 .omap2 = {
1315 .prcm_reg_id = 1,
1316 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1317 .module_offs = OMAP3430_DSS_MOD,
1318 .idlest_reg_id = 1,
1319 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
1320 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
1321 },
1322 },
1323 .opt_clks = dss_opt_clks,
1324 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001325};
1326
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +02001327/*
1328 * 'dispc' class
1329 * display controller
1330 */
1331
1332static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
1333 .rev_offs = 0x0000,
1334 .sysc_offs = 0x0010,
1335 .syss_offs = 0x0014,
1336 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
Tomi Valkeinenb0a85fa2012-01-23 14:15:29 +02001337 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1338 SYSC_HAS_ENAWAKEUP),
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +02001339 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1340 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1341 .sysc_fields = &omap_hwmod_sysc_type1,
1342};
1343
1344static struct omap_hwmod_class omap3_dispc_hwmod_class = {
1345 .name = "dispc",
1346 .sysc = &omap3_dispc_sysc,
1347};
1348
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001349/* l4_core -> dss_dispc */
1350static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1351 .master = &omap3xxx_l4_core_hwmod,
1352 .slave = &omap3xxx_dss_dispc_hwmod,
1353 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001354 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001355 .fw = {
1356 .omap2 = {
1357 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1358 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1359 .flags = OMAP_FIREWALL_L4,
1360 }
1361 },
1362 .user = OCP_USER_MPU | OCP_USER_SDMA,
1363};
1364
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001365static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1366 .name = "dss_dispc",
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +02001367 .class = &omap3_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001368 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001369 .main_clk = "dss1_alwon_fck",
1370 .prcm = {
1371 .omap2 = {
1372 .prcm_reg_id = 1,
1373 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1374 .module_offs = OMAP3430_DSS_MOD,
1375 },
1376 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001377 .flags = HWMOD_NO_IDLEST,
Archit Tanejab923d402011-10-06 18:04:08 -06001378 .dev_attr = &omap2_3_dss_dispc_dev_attr
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001379};
1380
1381/*
1382 * 'dsi' class
1383 * display serial interface controller
1384 */
1385
1386static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
1387 .name = "dsi",
1388};
1389
archit tanejaaffe3602011-02-23 08:41:03 +00001390static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1391 { .irq = 25 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001392 { .irq = -1 }
archit tanejaaffe3602011-02-23 08:41:03 +00001393};
1394
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001395/* dss_dsi1 */
1396static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1397 {
1398 .pa_start = 0x4804FC00,
1399 .pa_end = 0x4804FFFF,
1400 .flags = ADDR_TYPE_RT
1401 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001402 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001403};
1404
1405/* l4_core -> dss_dsi1 */
1406static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1407 .master = &omap3xxx_l4_core_hwmod,
1408 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001409 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001410 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001411 .fw = {
1412 .omap2 = {
1413 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1414 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1415 .flags = OMAP_FIREWALL_L4,
1416 }
1417 },
1418 .user = OCP_USER_MPU | OCP_USER_SDMA,
1419};
1420
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001421static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1422 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1423};
1424
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001425static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1426 .name = "dss_dsi1",
1427 .class = &omap3xxx_dsi_hwmod_class,
archit tanejaaffe3602011-02-23 08:41:03 +00001428 .mpu_irqs = omap3xxx_dsi1_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001429 .main_clk = "dss1_alwon_fck",
1430 .prcm = {
1431 .omap2 = {
1432 .prcm_reg_id = 1,
1433 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1434 .module_offs = OMAP3430_DSS_MOD,
1435 },
1436 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001437 .opt_clks = dss_dsi1_opt_clks,
1438 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001439 .flags = HWMOD_NO_IDLEST,
1440};
1441
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001442/* l4_core -> dss_rfbi */
1443static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1444 .master = &omap3xxx_l4_core_hwmod,
1445 .slave = &omap3xxx_dss_rfbi_hwmod,
1446 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001447 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001448 .fw = {
1449 .omap2 = {
1450 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1451 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1452 .flags = OMAP_FIREWALL_L4,
1453 }
1454 },
1455 .user = OCP_USER_MPU | OCP_USER_SDMA,
1456};
1457
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001458static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1459 { .role = "ick", .clk = "dss_ick" },
1460};
1461
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001462static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1463 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -06001464 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001465 .main_clk = "dss1_alwon_fck",
1466 .prcm = {
1467 .omap2 = {
1468 .prcm_reg_id = 1,
1469 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1470 .module_offs = OMAP3430_DSS_MOD,
1471 },
1472 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001473 .opt_clks = dss_rfbi_opt_clks,
1474 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001475 .flags = HWMOD_NO_IDLEST,
1476};
1477
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001478/* l4_core -> dss_venc */
1479static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1480 .master = &omap3xxx_l4_core_hwmod,
1481 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001482 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001483 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001484 .fw = {
1485 .omap2 = {
1486 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
1487 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1488 .flags = OMAP_FIREWALL_L4,
1489 }
1490 },
1491 .user = OCP_USER_MPU | OCP_USER_SDMA,
1492};
1493
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001494static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
1495 /* required only on OMAP3430 */
1496 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
1497};
1498
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001499static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1500 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001501 .class = &omap2_venc_hwmod_class,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001502 .main_clk = "dss_tv_fck",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001503 .prcm = {
1504 .omap2 = {
1505 .prcm_reg_id = 1,
1506 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1507 .module_offs = OMAP3430_DSS_MOD,
1508 },
1509 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001510 .opt_clks = dss_venc_opt_clks,
1511 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001512 .flags = HWMOD_NO_IDLEST,
1513};
1514
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301515/* I2C1 */
1516
1517static struct omap_i2c_dev_attr i2c1_dev_attr = {
1518 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001519 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1520 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1521 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301522};
1523
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301524static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1525 .name = "i2c1",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301526 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001527 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001528 .sdma_reqs = omap2_i2c1_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301529 .main_clk = "i2c1_fck",
1530 .prcm = {
1531 .omap2 = {
1532 .module_offs = CORE_MOD,
1533 .prcm_reg_id = 1,
1534 .module_bit = OMAP3430_EN_I2C1_SHIFT,
1535 .idlest_reg_id = 1,
1536 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1537 },
1538 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301539 .class = &i2c_class,
1540 .dev_attr = &i2c1_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301541};
1542
1543/* I2C2 */
1544
1545static struct omap_i2c_dev_attr i2c2_dev_attr = {
1546 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001547 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1548 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1549 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301550};
1551
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301552static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1553 .name = "i2c2",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301554 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001555 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001556 .sdma_reqs = omap2_i2c2_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301557 .main_clk = "i2c2_fck",
1558 .prcm = {
1559 .omap2 = {
1560 .module_offs = CORE_MOD,
1561 .prcm_reg_id = 1,
1562 .module_bit = OMAP3430_EN_I2C2_SHIFT,
1563 .idlest_reg_id = 1,
1564 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1565 },
1566 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301567 .class = &i2c_class,
1568 .dev_attr = &i2c2_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301569};
1570
1571/* I2C3 */
1572
1573static struct omap_i2c_dev_attr i2c3_dev_attr = {
1574 .fifo_depth = 64, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001575 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1576 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1577 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301578};
1579
1580static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1581 { .irq = INT_34XX_I2C3_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001582 { .irq = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301583};
1584
1585static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1586 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
1587 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
Paul Walmsleybc614952011-07-09 19:14:07 -06001588 { .dma_req = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301589};
1590
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301591static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1592 .name = "i2c3",
Shubhrajyoti D3e47dc62011-12-13 16:25:54 +05301593 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301594 .mpu_irqs = i2c3_mpu_irqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301595 .sdma_reqs = i2c3_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301596 .main_clk = "i2c3_fck",
1597 .prcm = {
1598 .omap2 = {
1599 .module_offs = CORE_MOD,
1600 .prcm_reg_id = 1,
1601 .module_bit = OMAP3430_EN_I2C3_SHIFT,
1602 .idlest_reg_id = 1,
1603 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
1604 },
1605 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301606 .class = &i2c_class,
1607 .dev_attr = &i2c3_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301608};
1609
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001610/* l4_wkup -> gpio1 */
1611static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
1612 {
1613 .pa_start = 0x48310000,
1614 .pa_end = 0x483101ff,
1615 .flags = ADDR_TYPE_RT
1616 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001617 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001618};
1619
1620static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
1621 .master = &omap3xxx_l4_wkup_hwmod,
1622 .slave = &omap3xxx_gpio1_hwmod,
1623 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001624 .user = OCP_USER_MPU | OCP_USER_SDMA,
1625};
1626
1627/* l4_per -> gpio2 */
1628static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
1629 {
1630 .pa_start = 0x49050000,
1631 .pa_end = 0x490501ff,
1632 .flags = ADDR_TYPE_RT
1633 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001634 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001635};
1636
1637static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
1638 .master = &omap3xxx_l4_per_hwmod,
1639 .slave = &omap3xxx_gpio2_hwmod,
1640 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001641 .user = OCP_USER_MPU | OCP_USER_SDMA,
1642};
1643
1644/* l4_per -> gpio3 */
1645static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
1646 {
1647 .pa_start = 0x49052000,
1648 .pa_end = 0x490521ff,
1649 .flags = ADDR_TYPE_RT
1650 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001651 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001652};
1653
1654static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
1655 .master = &omap3xxx_l4_per_hwmod,
1656 .slave = &omap3xxx_gpio3_hwmod,
1657 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001658 .user = OCP_USER_MPU | OCP_USER_SDMA,
1659};
1660
1661/* l4_per -> gpio4 */
1662static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
1663 {
1664 .pa_start = 0x49054000,
1665 .pa_end = 0x490541ff,
1666 .flags = ADDR_TYPE_RT
1667 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001668 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001669};
1670
1671static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
1672 .master = &omap3xxx_l4_per_hwmod,
1673 .slave = &omap3xxx_gpio4_hwmod,
1674 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001675 .user = OCP_USER_MPU | OCP_USER_SDMA,
1676};
1677
1678/* l4_per -> gpio5 */
1679static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
1680 {
1681 .pa_start = 0x49056000,
1682 .pa_end = 0x490561ff,
1683 .flags = ADDR_TYPE_RT
1684 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001685 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001686};
1687
1688static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
1689 .master = &omap3xxx_l4_per_hwmod,
1690 .slave = &omap3xxx_gpio5_hwmod,
1691 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001692 .user = OCP_USER_MPU | OCP_USER_SDMA,
1693};
1694
1695/* l4_per -> gpio6 */
1696static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
1697 {
1698 .pa_start = 0x49058000,
1699 .pa_end = 0x490581ff,
1700 .flags = ADDR_TYPE_RT
1701 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001702 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001703};
1704
1705static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
1706 .master = &omap3xxx_l4_per_hwmod,
1707 .slave = &omap3xxx_gpio6_hwmod,
1708 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001709 .user = OCP_USER_MPU | OCP_USER_SDMA,
1710};
1711
1712/*
1713 * 'gpio' class
1714 * general purpose io module
1715 */
1716
1717static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
1718 .rev_offs = 0x0000,
1719 .sysc_offs = 0x0010,
1720 .syss_offs = 0x0014,
1721 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001722 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1723 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001724 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1725 .sysc_fields = &omap_hwmod_sysc_type1,
1726};
1727
1728static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
1729 .name = "gpio",
1730 .sysc = &omap3xxx_gpio_sysc,
1731 .rev = 1,
1732};
1733
1734/* gpio_dev_attr*/
1735static struct omap_gpio_dev_attr gpio_dev_attr = {
1736 .bank_width = 32,
1737 .dbck_flag = true,
1738};
1739
1740/* gpio1 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001741static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1742 { .role = "dbclk", .clk = "gpio1_dbck", },
1743};
1744
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001745static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1746 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301747 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001748 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001749 .main_clk = "gpio1_ick",
1750 .opt_clks = gpio1_opt_clks,
1751 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1752 .prcm = {
1753 .omap2 = {
1754 .prcm_reg_id = 1,
1755 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
1756 .module_offs = WKUP_MOD,
1757 .idlest_reg_id = 1,
1758 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
1759 },
1760 },
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001761 .class = &omap3xxx_gpio_hwmod_class,
1762 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001763};
1764
1765/* gpio2 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001766static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1767 { .role = "dbclk", .clk = "gpio2_dbck", },
1768};
1769
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001770static struct omap_hwmod omap3xxx_gpio2_hwmod = {
1771 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301772 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001773 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001774 .main_clk = "gpio2_ick",
1775 .opt_clks = gpio2_opt_clks,
1776 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1777 .prcm = {
1778 .omap2 = {
1779 .prcm_reg_id = 1,
1780 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
1781 .module_offs = OMAP3430_PER_MOD,
1782 .idlest_reg_id = 1,
1783 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
1784 },
1785 },
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001786 .class = &omap3xxx_gpio_hwmod_class,
1787 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001788};
1789
1790/* gpio3 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001791static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1792 { .role = "dbclk", .clk = "gpio3_dbck", },
1793};
1794
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001795static struct omap_hwmod omap3xxx_gpio3_hwmod = {
1796 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301797 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001798 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001799 .main_clk = "gpio3_ick",
1800 .opt_clks = gpio3_opt_clks,
1801 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1802 .prcm = {
1803 .omap2 = {
1804 .prcm_reg_id = 1,
1805 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
1806 .module_offs = OMAP3430_PER_MOD,
1807 .idlest_reg_id = 1,
1808 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
1809 },
1810 },
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001811 .class = &omap3xxx_gpio_hwmod_class,
1812 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001813};
1814
1815/* gpio4 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001816static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
1817 { .role = "dbclk", .clk = "gpio4_dbck", },
1818};
1819
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001820static struct omap_hwmod omap3xxx_gpio4_hwmod = {
1821 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301822 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001823 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001824 .main_clk = "gpio4_ick",
1825 .opt_clks = gpio4_opt_clks,
1826 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
1827 .prcm = {
1828 .omap2 = {
1829 .prcm_reg_id = 1,
1830 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
1831 .module_offs = OMAP3430_PER_MOD,
1832 .idlest_reg_id = 1,
1833 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
1834 },
1835 },
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001836 .class = &omap3xxx_gpio_hwmod_class,
1837 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001838};
1839
1840/* gpio5 */
1841static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
1842 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
Paul Walmsley212738a2011-07-09 19:14:06 -06001843 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001844};
1845
1846static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1847 { .role = "dbclk", .clk = "gpio5_dbck", },
1848};
1849
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001850static struct omap_hwmod omap3xxx_gpio5_hwmod = {
1851 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301852 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001853 .mpu_irqs = omap3xxx_gpio5_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001854 .main_clk = "gpio5_ick",
1855 .opt_clks = gpio5_opt_clks,
1856 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
1857 .prcm = {
1858 .omap2 = {
1859 .prcm_reg_id = 1,
1860 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
1861 .module_offs = OMAP3430_PER_MOD,
1862 .idlest_reg_id = 1,
1863 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
1864 },
1865 },
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001866 .class = &omap3xxx_gpio_hwmod_class,
1867 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001868};
1869
1870/* gpio6 */
1871static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
1872 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
Paul Walmsley212738a2011-07-09 19:14:06 -06001873 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001874};
1875
1876static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1877 { .role = "dbclk", .clk = "gpio6_dbck", },
1878};
1879
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001880static struct omap_hwmod omap3xxx_gpio6_hwmod = {
1881 .name = "gpio6",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301882 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001883 .mpu_irqs = omap3xxx_gpio6_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001884 .main_clk = "gpio6_ick",
1885 .opt_clks = gpio6_opt_clks,
1886 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1887 .prcm = {
1888 .omap2 = {
1889 .prcm_reg_id = 1,
1890 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1891 .module_offs = OMAP3430_PER_MOD,
1892 .idlest_reg_id = 1,
1893 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1894 },
1895 },
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001896 .class = &omap3xxx_gpio_hwmod_class,
1897 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001898};
1899
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001900/* dma_system -> L3 */
1901static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
1902 .master = &omap3xxx_dma_system_hwmod,
1903 .slave = &omap3xxx_l3_main_hwmod,
1904 .clk = "core_l3_ick",
1905 .user = OCP_USER_MPU | OCP_USER_SDMA,
1906};
1907
1908/* dma attributes */
1909static struct omap_dma_dev_attr dma_dev_attr = {
1910 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1911 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1912 .lch_count = 32,
1913};
1914
1915static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1916 .rev_offs = 0x0000,
1917 .sysc_offs = 0x002c,
1918 .syss_offs = 0x0028,
1919 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1920 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001921 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1922 SYSS_HAS_RESET_STATUS),
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001923 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1924 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1925 .sysc_fields = &omap_hwmod_sysc_type1,
1926};
1927
1928static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1929 .name = "dma",
1930 .sysc = &omap3xxx_dma_sysc,
1931};
1932
1933/* dma_system */
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001934static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
1935 {
1936 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06001937 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001938 .flags = ADDR_TYPE_RT
1939 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001940 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001941};
1942
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001943/* l4_cfg -> dma_system */
1944static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
1945 .master = &omap3xxx_l4_core_hwmod,
1946 .slave = &omap3xxx_dma_system_hwmod,
1947 .clk = "core_l4_ick",
1948 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001949 .user = OCP_USER_MPU | OCP_USER_SDMA,
1950};
1951
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001952static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1953 .name = "dma",
1954 .class = &omap3xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001955 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001956 .main_clk = "core_l3_ick",
1957 .prcm = {
1958 .omap2 = {
1959 .module_offs = CORE_MOD,
1960 .prcm_reg_id = 1,
1961 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1962 .idlest_reg_id = 1,
1963 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1964 },
1965 },
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001966 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08001967 .flags = HWMOD_NO_IDLEST,
1968};
1969
Charulatha Vdc48e5f2011-02-24 15:16:49 +05301970/*
1971 * 'mcbsp' class
1972 * multi channel buffered serial port controller
1973 */
1974
1975static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1976 .sysc_offs = 0x008c,
1977 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1978 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1979 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1980 .sysc_fields = &omap_hwmod_sysc_type1,
1981 .clockact = 0x2,
1982};
1983
1984static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1985 .name = "mcbsp",
1986 .sysc = &omap3xxx_mcbsp_sysc,
1987 .rev = MCBSP_CONFIG_TYPE3,
1988};
1989
1990/* mcbsp1 */
1991static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
1992 { .name = "irq", .irq = 16 },
1993 { .name = "tx", .irq = 59 },
1994 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001995 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05301996};
1997
Charulatha Vdc48e5f2011-02-24 15:16:49 +05301998static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
1999 {
2000 .name = "mpu",
2001 .pa_start = 0x48074000,
2002 .pa_end = 0x480740ff,
2003 .flags = ADDR_TYPE_RT
2004 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002005 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302006};
2007
2008/* l4_core -> mcbsp1 */
2009static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2010 .master = &omap3xxx_l4_core_hwmod,
2011 .slave = &omap3xxx_mcbsp1_hwmod,
2012 .clk = "mcbsp1_ick",
2013 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302014 .user = OCP_USER_MPU | OCP_USER_SDMA,
2015};
2016
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302017static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2018 .name = "mcbsp1",
2019 .class = &omap3xxx_mcbsp_hwmod_class,
2020 .mpu_irqs = omap3xxx_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002021 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302022 .main_clk = "mcbsp1_fck",
2023 .prcm = {
2024 .omap2 = {
2025 .prcm_reg_id = 1,
2026 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
2027 .module_offs = CORE_MOD,
2028 .idlest_reg_id = 1,
2029 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2030 },
2031 },
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302032};
2033
2034/* mcbsp2 */
2035static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2036 { .name = "irq", .irq = 17 },
2037 { .name = "tx", .irq = 62 },
2038 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002039 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302040};
2041
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302042static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2043 {
2044 .name = "mpu",
2045 .pa_start = 0x49022000,
2046 .pa_end = 0x490220ff,
2047 .flags = ADDR_TYPE_RT
2048 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002049 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302050};
2051
2052/* l4_per -> mcbsp2 */
2053static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2054 .master = &omap3xxx_l4_per_hwmod,
2055 .slave = &omap3xxx_mcbsp2_hwmod,
2056 .clk = "mcbsp2_ick",
2057 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302058 .user = OCP_USER_MPU | OCP_USER_SDMA,
2059};
2060
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302061static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2062 .sidetone = "mcbsp2_sidetone",
2063};
2064
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302065static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2066 .name = "mcbsp2",
2067 .class = &omap3xxx_mcbsp_hwmod_class,
2068 .mpu_irqs = omap3xxx_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002069 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302070 .main_clk = "mcbsp2_fck",
2071 .prcm = {
2072 .omap2 = {
2073 .prcm_reg_id = 1,
2074 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2075 .module_offs = OMAP3430_PER_MOD,
2076 .idlest_reg_id = 1,
2077 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2078 },
2079 },
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302080 .dev_attr = &omap34xx_mcbsp2_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302081};
2082
2083/* mcbsp3 */
2084static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2085 { .name = "irq", .irq = 22 },
2086 { .name = "tx", .irq = 89 },
2087 { .name = "rx", .irq = 90 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002088 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302089};
2090
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302091static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2092 {
2093 .name = "mpu",
2094 .pa_start = 0x49024000,
2095 .pa_end = 0x490240ff,
2096 .flags = ADDR_TYPE_RT
2097 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002098 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302099};
2100
2101/* l4_per -> mcbsp3 */
2102static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2103 .master = &omap3xxx_l4_per_hwmod,
2104 .slave = &omap3xxx_mcbsp3_hwmod,
2105 .clk = "mcbsp3_ick",
2106 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302107 .user = OCP_USER_MPU | OCP_USER_SDMA,
2108};
2109
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302110static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002111 .sidetone = "mcbsp3_sidetone",
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302112};
2113
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302114static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2115 .name = "mcbsp3",
2116 .class = &omap3xxx_mcbsp_hwmod_class,
2117 .mpu_irqs = omap3xxx_mcbsp3_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002118 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302119 .main_clk = "mcbsp3_fck",
2120 .prcm = {
2121 .omap2 = {
2122 .prcm_reg_id = 1,
2123 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2124 .module_offs = OMAP3430_PER_MOD,
2125 .idlest_reg_id = 1,
2126 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2127 },
2128 },
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302129 .dev_attr = &omap34xx_mcbsp3_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302130};
2131
2132/* mcbsp4 */
2133static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
2134 { .name = "irq", .irq = 23 },
2135 { .name = "tx", .irq = 54 },
2136 { .name = "rx", .irq = 55 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002137 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302138};
2139
2140static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2141 { .name = "rx", .dma_req = 20 },
2142 { .name = "tx", .dma_req = 19 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002143 { .dma_req = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302144};
2145
2146static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2147 {
2148 .name = "mpu",
2149 .pa_start = 0x49026000,
2150 .pa_end = 0x490260ff,
2151 .flags = ADDR_TYPE_RT
2152 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002153 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302154};
2155
2156/* l4_per -> mcbsp4 */
2157static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2158 .master = &omap3xxx_l4_per_hwmod,
2159 .slave = &omap3xxx_mcbsp4_hwmod,
2160 .clk = "mcbsp4_ick",
2161 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302162 .user = OCP_USER_MPU | OCP_USER_SDMA,
2163};
2164
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302165static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2166 .name = "mcbsp4",
2167 .class = &omap3xxx_mcbsp_hwmod_class,
2168 .mpu_irqs = omap3xxx_mcbsp4_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302169 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302170 .main_clk = "mcbsp4_fck",
2171 .prcm = {
2172 .omap2 = {
2173 .prcm_reg_id = 1,
2174 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
2175 .module_offs = OMAP3430_PER_MOD,
2176 .idlest_reg_id = 1,
2177 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2178 },
2179 },
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302180};
2181
2182/* mcbsp5 */
2183static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
2184 { .name = "irq", .irq = 27 },
2185 { .name = "tx", .irq = 81 },
2186 { .name = "rx", .irq = 82 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002187 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302188};
2189
2190static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2191 { .name = "rx", .dma_req = 22 },
2192 { .name = "tx", .dma_req = 21 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002193 { .dma_req = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302194};
2195
2196static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2197 {
2198 .name = "mpu",
2199 .pa_start = 0x48096000,
2200 .pa_end = 0x480960ff,
2201 .flags = ADDR_TYPE_RT
2202 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002203 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302204};
2205
2206/* l4_core -> mcbsp5 */
2207static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2208 .master = &omap3xxx_l4_core_hwmod,
2209 .slave = &omap3xxx_mcbsp5_hwmod,
2210 .clk = "mcbsp5_ick",
2211 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302212 .user = OCP_USER_MPU | OCP_USER_SDMA,
2213};
2214
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302215static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2216 .name = "mcbsp5",
2217 .class = &omap3xxx_mcbsp_hwmod_class,
2218 .mpu_irqs = omap3xxx_mcbsp5_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302219 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302220 .main_clk = "mcbsp5_fck",
2221 .prcm = {
2222 .omap2 = {
2223 .prcm_reg_id = 1,
2224 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
2225 .module_offs = CORE_MOD,
2226 .idlest_reg_id = 1,
2227 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2228 },
2229 },
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302230};
2231/* 'mcbsp sidetone' class */
2232
2233static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2234 .sysc_offs = 0x0010,
2235 .sysc_flags = SYSC_HAS_AUTOIDLE,
2236 .sysc_fields = &omap_hwmod_sysc_type1,
2237};
2238
2239static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
2240 .name = "mcbsp_sidetone",
2241 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
2242};
2243
2244/* mcbsp2_sidetone */
2245static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2246 { .name = "irq", .irq = 4 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002247 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302248};
2249
2250static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2251 {
2252 .name = "sidetone",
2253 .pa_start = 0x49028000,
2254 .pa_end = 0x490280ff,
2255 .flags = ADDR_TYPE_RT
2256 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002257 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302258};
2259
2260/* l4_per -> mcbsp2_sidetone */
2261static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2262 .master = &omap3xxx_l4_per_hwmod,
2263 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2264 .clk = "mcbsp2_ick",
2265 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302266 .user = OCP_USER_MPU,
2267};
2268
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302269static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2270 .name = "mcbsp2_sidetone",
2271 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2272 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302273 .main_clk = "mcbsp2_fck",
2274 .prcm = {
2275 .omap2 = {
2276 .prcm_reg_id = 1,
2277 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2278 .module_offs = OMAP3430_PER_MOD,
2279 .idlest_reg_id = 1,
2280 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2281 },
2282 },
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302283};
2284
2285/* mcbsp3_sidetone */
2286static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2287 { .name = "irq", .irq = 5 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002288 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302289};
2290
2291static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2292 {
2293 .name = "sidetone",
2294 .pa_start = 0x4902A000,
2295 .pa_end = 0x4902A0ff,
2296 .flags = ADDR_TYPE_RT
2297 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002298 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302299};
2300
2301/* l4_per -> mcbsp3_sidetone */
2302static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2303 .master = &omap3xxx_l4_per_hwmod,
2304 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2305 .clk = "mcbsp3_ick",
2306 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302307 .user = OCP_USER_MPU,
2308};
2309
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302310static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2311 .name = "mcbsp3_sidetone",
2312 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2313 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302314 .main_clk = "mcbsp3_fck",
2315 .prcm = {
2316 .omap2 = {
2317 .prcm_reg_id = 1,
2318 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2319 .module_offs = OMAP3430_PER_MOD,
2320 .idlest_reg_id = 1,
2321 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2322 },
2323 },
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302324};
2325
2326
Thara Gopinathd3442722010-05-29 22:02:24 +05302327/* SR common */
2328static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2329 .clkact_shift = 20,
2330};
2331
2332static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
2333 .sysc_offs = 0x24,
2334 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
2335 .clockact = CLOCKACT_TEST_ICLK,
2336 .sysc_fields = &omap34xx_sr_sysc_fields,
2337};
2338
2339static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2340 .name = "smartreflex",
2341 .sysc = &omap34xx_sr_sysc,
2342 .rev = 1,
2343};
2344
2345static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2346 .sidle_shift = 24,
2347 .enwkup_shift = 26
2348};
2349
2350static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
2351 .sysc_offs = 0x38,
2352 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2353 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
2354 SYSC_NO_CACHE),
2355 .sysc_fields = &omap36xx_sr_sysc_fields,
2356};
2357
2358static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
2359 .name = "smartreflex",
2360 .sysc = &omap36xx_sr_sysc,
2361 .rev = 2,
2362};
2363
2364/* SR1 */
Shweta Gulaticea6b942012-02-29 23:33:37 +01002365static struct omap_smartreflex_dev_attr sr1_dev_attr = {
2366 .sensor_voltdm_name = "mpu_iva",
2367};
2368
Thara Gopinathd3442722010-05-29 22:02:24 +05302369static struct omap_hwmod omap34xx_sr1_hwmod = {
Paul Walmsleybec93812012-04-19 04:03:50 -06002370 .name = "sr1",
Thara Gopinathd3442722010-05-29 22:02:24 +05302371 .class = &omap34xx_smartreflex_hwmod_class,
2372 .main_clk = "sr1_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302373 .prcm = {
2374 .omap2 = {
2375 .prcm_reg_id = 1,
2376 .module_bit = OMAP3430_EN_SR1_SHIFT,
2377 .module_offs = WKUP_MOD,
2378 .idlest_reg_id = 1,
2379 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2380 },
2381 },
Shweta Gulaticea6b942012-02-29 23:33:37 +01002382 .dev_attr = &sr1_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002383 .mpu_irqs = omap3_smartreflex_mpu_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302384 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2385};
2386
2387static struct omap_hwmod omap36xx_sr1_hwmod = {
Paul Walmsleybec93812012-04-19 04:03:50 -06002388 .name = "sr1",
Thara Gopinathd3442722010-05-29 22:02:24 +05302389 .class = &omap36xx_smartreflex_hwmod_class,
2390 .main_clk = "sr1_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302391 .prcm = {
2392 .omap2 = {
2393 .prcm_reg_id = 1,
2394 .module_bit = OMAP3430_EN_SR1_SHIFT,
2395 .module_offs = WKUP_MOD,
2396 .idlest_reg_id = 1,
2397 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2398 },
2399 },
Shweta Gulaticea6b942012-02-29 23:33:37 +01002400 .dev_attr = &sr1_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002401 .mpu_irqs = omap3_smartreflex_mpu_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302402};
2403
2404/* SR2 */
Shweta Gulaticea6b942012-02-29 23:33:37 +01002405static struct omap_smartreflex_dev_attr sr2_dev_attr = {
2406 .sensor_voltdm_name = "core",
2407};
2408
Thara Gopinathd3442722010-05-29 22:02:24 +05302409static struct omap_hwmod omap34xx_sr2_hwmod = {
Paul Walmsleybec93812012-04-19 04:03:50 -06002410 .name = "sr2",
Thara Gopinathd3442722010-05-29 22:02:24 +05302411 .class = &omap34xx_smartreflex_hwmod_class,
2412 .main_clk = "sr2_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302413 .prcm = {
2414 .omap2 = {
2415 .prcm_reg_id = 1,
2416 .module_bit = OMAP3430_EN_SR2_SHIFT,
2417 .module_offs = WKUP_MOD,
2418 .idlest_reg_id = 1,
2419 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2420 },
2421 },
Shweta Gulaticea6b942012-02-29 23:33:37 +01002422 .dev_attr = &sr2_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002423 .mpu_irqs = omap3_smartreflex_core_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302424 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2425};
2426
2427static struct omap_hwmod omap36xx_sr2_hwmod = {
Paul Walmsleybec93812012-04-19 04:03:50 -06002428 .name = "sr2",
Thara Gopinathd3442722010-05-29 22:02:24 +05302429 .class = &omap36xx_smartreflex_hwmod_class,
2430 .main_clk = "sr2_fck",
Thara Gopinathd3442722010-05-29 22:02:24 +05302431 .prcm = {
2432 .omap2 = {
2433 .prcm_reg_id = 1,
2434 .module_bit = OMAP3430_EN_SR2_SHIFT,
2435 .module_offs = WKUP_MOD,
2436 .idlest_reg_id = 1,
2437 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2438 },
2439 },
Shweta Gulaticea6b942012-02-29 23:33:37 +01002440 .dev_attr = &sr2_dev_attr,
Nishanth Menond62bc782012-02-29 23:33:43 +01002441 .mpu_irqs = omap3_smartreflex_core_irqs,
Thara Gopinathd3442722010-05-29 22:02:24 +05302442};
2443
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002444/*
2445 * 'mailbox' class
2446 * mailbox module allowing communication between the on-chip processors
2447 * using a queued mailbox-interrupt mechanism.
2448 */
2449
2450static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
2451 .rev_offs = 0x000,
2452 .sysc_offs = 0x010,
2453 .syss_offs = 0x014,
2454 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2455 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2456 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2457 .sysc_fields = &omap_hwmod_sysc_type1,
2458};
2459
2460static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
2461 .name = "mailbox",
2462 .sysc = &omap3xxx_mailbox_sysc,
2463};
2464
2465static struct omap_hwmod omap3xxx_mailbox_hwmod;
2466static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
2467 { .irq = 26 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002468 { .irq = -1 }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002469};
2470
2471static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2472 {
2473 .pa_start = 0x48094000,
2474 .pa_end = 0x480941ff,
2475 .flags = ADDR_TYPE_RT,
2476 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002477 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002478};
2479
2480/* l4_core -> mailbox */
2481static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2482 .master = &omap3xxx_l4_core_hwmod,
2483 .slave = &omap3xxx_mailbox_hwmod,
2484 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002485 .user = OCP_USER_MPU | OCP_USER_SDMA,
2486};
2487
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002488static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2489 .name = "mailbox",
2490 .class = &omap3xxx_mailbox_hwmod_class,
2491 .mpu_irqs = omap3xxx_mailbox_irqs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002492 .main_clk = "mailboxes_ick",
2493 .prcm = {
2494 .omap2 = {
2495 .prcm_reg_id = 1,
2496 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
2497 .module_offs = CORE_MOD,
2498 .idlest_reg_id = 1,
2499 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
2500 },
2501 },
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002502};
2503
Charulatha V0f616a42011-02-17 09:53:10 -08002504/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002505static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2506 .master = &omap3xxx_l4_core_hwmod,
2507 .slave = &omap34xx_mcspi1,
2508 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002509 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002510 .user = OCP_USER_MPU | OCP_USER_SDMA,
2511};
2512
2513/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002514static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2515 .master = &omap3xxx_l4_core_hwmod,
2516 .slave = &omap34xx_mcspi2,
2517 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002518 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002519 .user = OCP_USER_MPU | OCP_USER_SDMA,
2520};
2521
2522/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002523static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2524 .master = &omap3xxx_l4_core_hwmod,
2525 .slave = &omap34xx_mcspi3,
2526 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002527 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002528 .user = OCP_USER_MPU | OCP_USER_SDMA,
2529};
2530
2531/* l4 core -> mcspi4 interface */
2532static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2533 {
2534 .pa_start = 0x480ba000,
2535 .pa_end = 0x480ba0ff,
2536 .flags = ADDR_TYPE_RT,
2537 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002538 { }
Charulatha V0f616a42011-02-17 09:53:10 -08002539};
2540
2541static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2542 .master = &omap3xxx_l4_core_hwmod,
2543 .slave = &omap34xx_mcspi4,
2544 .clk = "mcspi4_ick",
2545 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002546 .user = OCP_USER_MPU | OCP_USER_SDMA,
2547};
2548
2549/*
2550 * 'mcspi' class
2551 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2552 * bus
2553 */
2554
2555static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
2556 .rev_offs = 0x0000,
2557 .sysc_offs = 0x0010,
2558 .syss_offs = 0x0014,
2559 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2560 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2561 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2562 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2563 .sysc_fields = &omap_hwmod_sysc_type1,
2564};
2565
2566static struct omap_hwmod_class omap34xx_mcspi_class = {
2567 .name = "mcspi",
2568 .sysc = &omap34xx_mcspi_sysc,
2569 .rev = OMAP3_MCSPI_REV,
2570};
2571
2572/* mcspi1 */
Charulatha V0f616a42011-02-17 09:53:10 -08002573static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2574 .num_chipselect = 4,
2575};
2576
2577static struct omap_hwmod omap34xx_mcspi1 = {
2578 .name = "mcspi1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06002579 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002580 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002581 .main_clk = "mcspi1_fck",
2582 .prcm = {
2583 .omap2 = {
2584 .module_offs = CORE_MOD,
2585 .prcm_reg_id = 1,
2586 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
2587 .idlest_reg_id = 1,
2588 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
2589 },
2590 },
Charulatha V0f616a42011-02-17 09:53:10 -08002591 .class = &omap34xx_mcspi_class,
2592 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002593};
2594
2595/* mcspi2 */
Charulatha V0f616a42011-02-17 09:53:10 -08002596static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2597 .num_chipselect = 2,
2598};
2599
2600static struct omap_hwmod omap34xx_mcspi2 = {
2601 .name = "mcspi2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06002602 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002603 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002604 .main_clk = "mcspi2_fck",
2605 .prcm = {
2606 .omap2 = {
2607 .module_offs = CORE_MOD,
2608 .prcm_reg_id = 1,
2609 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
2610 .idlest_reg_id = 1,
2611 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
2612 },
2613 },
Charulatha V0f616a42011-02-17 09:53:10 -08002614 .class = &omap34xx_mcspi_class,
2615 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002616};
2617
2618/* mcspi3 */
2619static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
2620 { .name = "irq", .irq = 91 }, /* 91 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002621 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002622};
2623
2624static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
2625 { .name = "tx0", .dma_req = 15 },
2626 { .name = "rx0", .dma_req = 16 },
2627 { .name = "tx1", .dma_req = 23 },
2628 { .name = "rx1", .dma_req = 24 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002629 { .dma_req = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002630};
2631
Charulatha V0f616a42011-02-17 09:53:10 -08002632static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2633 .num_chipselect = 2,
2634};
2635
2636static struct omap_hwmod omap34xx_mcspi3 = {
2637 .name = "mcspi3",
2638 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002639 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002640 .main_clk = "mcspi3_fck",
2641 .prcm = {
2642 .omap2 = {
2643 .module_offs = CORE_MOD,
2644 .prcm_reg_id = 1,
2645 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
2646 .idlest_reg_id = 1,
2647 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
2648 },
2649 },
Charulatha V0f616a42011-02-17 09:53:10 -08002650 .class = &omap34xx_mcspi_class,
2651 .dev_attr = &omap_mcspi3_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002652};
2653
2654/* SPI4 */
2655static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
2656 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002657 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002658};
2659
2660static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
2661 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
2662 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
Paul Walmsleybc614952011-07-09 19:14:07 -06002663 { .dma_req = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002664};
2665
Charulatha V0f616a42011-02-17 09:53:10 -08002666static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
2667 .num_chipselect = 1,
2668};
2669
2670static struct omap_hwmod omap34xx_mcspi4 = {
2671 .name = "mcspi4",
2672 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002673 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002674 .main_clk = "mcspi4_fck",
2675 .prcm = {
2676 .omap2 = {
2677 .module_offs = CORE_MOD,
2678 .prcm_reg_id = 1,
2679 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
2680 .idlest_reg_id = 1,
2681 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
2682 },
2683 },
Charulatha V0f616a42011-02-17 09:53:10 -08002684 .class = &omap34xx_mcspi_class,
2685 .dev_attr = &omap_mcspi4_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002686};
2687
Hema HK870ea2b2011-02-17 12:07:18 +05302688/*
2689 * usbhsotg
2690 */
2691static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
2692 .rev_offs = 0x0400,
2693 .sysc_offs = 0x0404,
2694 .syss_offs = 0x0408,
2695 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
2696 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2697 SYSC_HAS_AUTOIDLE),
2698 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2699 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2700 .sysc_fields = &omap_hwmod_sysc_type1,
2701};
2702
2703static struct omap_hwmod_class usbotg_class = {
2704 .name = "usbotg",
2705 .sysc = &omap3xxx_usbhsotg_sysc,
2706};
Hema HK870ea2b2011-02-17 12:07:18 +05302707/* usb_otg_hs */
2708static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
2709
2710 { .name = "mc", .irq = 92 },
2711 { .name = "dma", .irq = 93 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002712 { .irq = -1 }
Hema HK870ea2b2011-02-17 12:07:18 +05302713};
2714
2715static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
2716 .name = "usb_otg_hs",
2717 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
Hema HK870ea2b2011-02-17 12:07:18 +05302718 .main_clk = "hsotgusb_ick",
2719 .prcm = {
2720 .omap2 = {
2721 .prcm_reg_id = 1,
2722 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
2723 .module_offs = CORE_MOD,
2724 .idlest_reg_id = 1,
2725 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
2726 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
2727 },
2728 },
Hema HK870ea2b2011-02-17 12:07:18 +05302729 .class = &usbotg_class,
2730
2731 /*
2732 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
2733 * broken when autoidle is enabled
2734 * workaround is to disable the autoidle bit at module level.
2735 */
2736 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
2737 | HWMOD_SWSUP_MSTANDBY,
Hema HK870ea2b2011-02-17 12:07:18 +05302738};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08002739
Hema HK273ff8c2011-02-17 12:07:19 +05302740/* usb_otg_hs */
2741static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
2742
2743 { .name = "mc", .irq = 71 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002744 { .irq = -1 }
Hema HK273ff8c2011-02-17 12:07:19 +05302745};
2746
2747static struct omap_hwmod_class am35xx_usbotg_class = {
2748 .name = "am35xx_usbotg",
2749 .sysc = NULL,
2750};
2751
2752static struct omap_hwmod am35xx_usbhsotg_hwmod = {
2753 .name = "am35x_otg_hs",
2754 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Hema HK273ff8c2011-02-17 12:07:19 +05302755 .main_clk = NULL,
2756 .prcm = {
2757 .omap2 = {
2758 },
2759 },
Hema HK273ff8c2011-02-17 12:07:19 +05302760 .class = &am35xx_usbotg_class,
Hema HK273ff8c2011-02-17 12:07:19 +05302761};
Hema HK870ea2b2011-02-17 12:07:18 +05302762
Paul Walmsleyb1636052011-03-01 13:12:56 -08002763/* MMC/SD/SDIO common */
2764
2765static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
2766 .rev_offs = 0x1fc,
2767 .sysc_offs = 0x10,
2768 .syss_offs = 0x14,
2769 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2770 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2771 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2772 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2773 .sysc_fields = &omap_hwmod_sysc_type1,
2774};
2775
2776static struct omap_hwmod_class omap34xx_mmc_class = {
2777 .name = "mmc",
2778 .sysc = &omap34xx_mmc_sysc,
2779};
2780
2781/* MMC/SD/SDIO1 */
2782
2783static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
2784 { .irq = 83, },
Paul Walmsley212738a2011-07-09 19:14:06 -06002785 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002786};
2787
2788static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
2789 { .name = "tx", .dma_req = 61, },
2790 { .name = "rx", .dma_req = 62, },
Paul Walmsleybc614952011-07-09 19:14:07 -06002791 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002792};
2793
2794static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
2795 { .role = "dbck", .clk = "omap_32k_fck", },
2796};
2797
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08002798static struct omap_mmc_dev_attr mmc1_dev_attr = {
2799 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
2800};
2801
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002802/* See 35xx errata 2.1.1.128 in SPRZ278F */
2803static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
2804 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
2805 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
2806};
2807
2808static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
2809 .name = "mmc1",
2810 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
2811 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
2812 .opt_clks = omap34xx_mmc1_opt_clks,
2813 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
2814 .main_clk = "mmchs1_fck",
2815 .prcm = {
2816 .omap2 = {
2817 .module_offs = CORE_MOD,
2818 .prcm_reg_id = 1,
2819 .module_bit = OMAP3430_EN_MMC1_SHIFT,
2820 .idlest_reg_id = 1,
2821 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
2822 },
2823 },
2824 .dev_attr = &mmc1_pre_es3_dev_attr,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002825 .class = &omap34xx_mmc_class,
2826};
2827
2828static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002829 .name = "mmc1",
2830 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002831 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002832 .opt_clks = omap34xx_mmc1_opt_clks,
2833 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
2834 .main_clk = "mmchs1_fck",
2835 .prcm = {
2836 .omap2 = {
2837 .module_offs = CORE_MOD,
2838 .prcm_reg_id = 1,
2839 .module_bit = OMAP3430_EN_MMC1_SHIFT,
2840 .idlest_reg_id = 1,
2841 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
2842 },
2843 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08002844 .dev_attr = &mmc1_dev_attr,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002845 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002846};
2847
2848/* MMC/SD/SDIO2 */
2849
2850static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
2851 { .irq = INT_24XX_MMC2_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06002852 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002853};
2854
2855static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
2856 { .name = "tx", .dma_req = 47, },
2857 { .name = "rx", .dma_req = 48, },
Paul Walmsleybc614952011-07-09 19:14:07 -06002858 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002859};
2860
2861static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
2862 { .role = "dbck", .clk = "omap_32k_fck", },
2863};
2864
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002865/* See 35xx errata 2.1.1.128 in SPRZ278F */
2866static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
2867 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
2868};
2869
2870static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
2871 .name = "mmc2",
2872 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
2873 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
2874 .opt_clks = omap34xx_mmc2_opt_clks,
2875 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
2876 .main_clk = "mmchs2_fck",
2877 .prcm = {
2878 .omap2 = {
2879 .module_offs = CORE_MOD,
2880 .prcm_reg_id = 1,
2881 .module_bit = OMAP3430_EN_MMC2_SHIFT,
2882 .idlest_reg_id = 1,
2883 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
2884 },
2885 },
2886 .dev_attr = &mmc2_pre_es3_dev_attr,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002887 .class = &omap34xx_mmc_class,
2888};
2889
2890static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002891 .name = "mmc2",
2892 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002893 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002894 .opt_clks = omap34xx_mmc2_opt_clks,
2895 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
2896 .main_clk = "mmchs2_fck",
2897 .prcm = {
2898 .omap2 = {
2899 .module_offs = CORE_MOD,
2900 .prcm_reg_id = 1,
2901 .module_bit = OMAP3430_EN_MMC2_SHIFT,
2902 .idlest_reg_id = 1,
2903 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
2904 },
2905 },
Paul Walmsleyb1636052011-03-01 13:12:56 -08002906 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002907};
2908
2909/* MMC/SD/SDIO3 */
2910
2911static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
2912 { .irq = 94, },
Paul Walmsley212738a2011-07-09 19:14:06 -06002913 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002914};
2915
2916static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
2917 { .name = "tx", .dma_req = 77, },
2918 { .name = "rx", .dma_req = 78, },
Paul Walmsleybc614952011-07-09 19:14:07 -06002919 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002920};
2921
2922static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
2923 { .role = "dbck", .clk = "omap_32k_fck", },
2924};
2925
Paul Walmsleyb1636052011-03-01 13:12:56 -08002926static struct omap_hwmod omap3xxx_mmc3_hwmod = {
2927 .name = "mmc3",
2928 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002929 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002930 .opt_clks = omap34xx_mmc3_opt_clks,
2931 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
2932 .main_clk = "mmchs3_fck",
2933 .prcm = {
2934 .omap2 = {
2935 .prcm_reg_id = 1,
2936 .module_bit = OMAP3430_EN_MMC3_SHIFT,
2937 .idlest_reg_id = 1,
2938 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
2939 },
2940 },
Paul Walmsleyb1636052011-03-01 13:12:56 -08002941 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002942};
2943
Keshava Munegowdade231382011-12-15 23:14:44 -07002944/*
2945 * 'usb_host_hs' class
2946 * high-speed multi-port usb host controller
2947 */
2948static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
2949 .master = &omap3xxx_usb_host_hs_hwmod,
2950 .slave = &omap3xxx_l3_main_hwmod,
2951 .clk = "core_l3_ick",
2952 .user = OCP_USER_MPU,
2953};
2954
2955static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
2956 .rev_offs = 0x0000,
2957 .sysc_offs = 0x0010,
2958 .syss_offs = 0x0014,
2959 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
2960 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
2961 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2962 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2963 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2964 .sysc_fields = &omap_hwmod_sysc_type1,
2965};
2966
2967static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
2968 .name = "usb_host_hs",
2969 .sysc = &omap3xxx_usb_host_hs_sysc,
2970};
2971
Keshava Munegowdade231382011-12-15 23:14:44 -07002972static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
2973 {
2974 .name = "uhh",
2975 .pa_start = 0x48064000,
2976 .pa_end = 0x480643ff,
2977 .flags = ADDR_TYPE_RT
2978 },
2979 {
2980 .name = "ohci",
2981 .pa_start = 0x48064400,
2982 .pa_end = 0x480647ff,
2983 },
2984 {
2985 .name = "ehci",
2986 .pa_start = 0x48064800,
2987 .pa_end = 0x48064cff,
2988 },
2989 {}
2990};
2991
2992static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
2993 .master = &omap3xxx_l4_core_hwmod,
2994 .slave = &omap3xxx_usb_host_hs_hwmod,
2995 .clk = "usbhost_ick",
2996 .addr = omap3xxx_usb_host_hs_addrs,
2997 .user = OCP_USER_MPU | OCP_USER_SDMA,
2998};
2999
Keshava Munegowdade231382011-12-15 23:14:44 -07003000static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
3001 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
3002};
3003
3004static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
3005 { .name = "ohci-irq", .irq = 76 },
3006 { .name = "ehci-irq", .irq = 77 },
3007 { .irq = -1 }
3008};
3009
3010static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
3011 .name = "usb_host_hs",
3012 .class = &omap3xxx_usb_host_hs_hwmod_class,
3013 .clkdm_name = "l3_init_clkdm",
3014 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
3015 .main_clk = "usbhost_48m_fck",
3016 .prcm = {
3017 .omap2 = {
3018 .module_offs = OMAP3430ES2_USBHOST_MOD,
3019 .prcm_reg_id = 1,
3020 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
3021 .idlest_reg_id = 1,
3022 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
3023 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
3024 },
3025 },
3026 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
3027 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
Keshava Munegowdade231382011-12-15 23:14:44 -07003028
3029 /*
3030 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
3031 * id: i660
3032 *
3033 * Description:
3034 * In the following configuration :
3035 * - USBHOST module is set to smart-idle mode
3036 * - PRCM asserts idle_req to the USBHOST module ( This typically
3037 * happens when the system is going to a low power mode : all ports
3038 * have been suspended, the master part of the USBHOST module has
3039 * entered the standby state, and SW has cut the functional clocks)
3040 * - an USBHOST interrupt occurs before the module is able to answer
3041 * idle_ack, typically a remote wakeup IRQ.
3042 * Then the USB HOST module will enter a deadlock situation where it
3043 * is no more accessible nor functional.
3044 *
3045 * Workaround:
3046 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
3047 */
3048
3049 /*
3050 * Errata: USB host EHCI may stall when entering smart-standby mode
3051 * Id: i571
3052 *
3053 * Description:
3054 * When the USBHOST module is set to smart-standby mode, and when it is
3055 * ready to enter the standby state (i.e. all ports are suspended and
3056 * all attached devices are in suspend mode), then it can wrongly assert
3057 * the Mstandby signal too early while there are still some residual OCP
3058 * transactions ongoing. If this condition occurs, the internal state
3059 * machine may go to an undefined state and the USB link may be stuck
3060 * upon the next resume.
3061 *
3062 * Workaround:
3063 * Don't use smart standby; use only force standby,
3064 * hence HWMOD_SWSUP_MSTANDBY
3065 */
3066
3067 /*
3068 * During system boot; If the hwmod framework resets the module
3069 * the module will have smart idle settings; which can lead to deadlock
3070 * (above Errata Id:i660); so, dont reset the module during boot;
3071 * Use HWMOD_INIT_NO_RESET.
3072 */
3073
3074 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
3075 HWMOD_INIT_NO_RESET,
3076};
3077
3078/*
3079 * 'usb_tll_hs' class
3080 * usb_tll_hs module is the adapter on the usb_host_hs ports
3081 */
3082static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
3083 .rev_offs = 0x0000,
3084 .sysc_offs = 0x0010,
3085 .syss_offs = 0x0014,
3086 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3087 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3088 SYSC_HAS_AUTOIDLE),
3089 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3090 .sysc_fields = &omap_hwmod_sysc_type1,
3091};
3092
3093static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
3094 .name = "usb_tll_hs",
3095 .sysc = &omap3xxx_usb_tll_hs_sysc,
3096};
3097
3098static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
3099 { .name = "tll-irq", .irq = 78 },
3100 { .irq = -1 }
3101};
3102
3103static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3104 {
3105 .name = "tll",
3106 .pa_start = 0x48062000,
3107 .pa_end = 0x48062fff,
3108 .flags = ADDR_TYPE_RT
3109 },
3110 {}
3111};
3112
3113static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3114 .master = &omap3xxx_l4_core_hwmod,
3115 .slave = &omap3xxx_usb_tll_hs_hwmod,
3116 .clk = "usbtll_ick",
3117 .addr = omap3xxx_usb_tll_hs_addrs,
3118 .user = OCP_USER_MPU | OCP_USER_SDMA,
3119};
3120
Keshava Munegowdade231382011-12-15 23:14:44 -07003121static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
3122 .name = "usb_tll_hs",
3123 .class = &omap3xxx_usb_tll_hs_hwmod_class,
3124 .clkdm_name = "l3_init_clkdm",
3125 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
3126 .main_clk = "usbtll_fck",
3127 .prcm = {
3128 .omap2 = {
3129 .module_offs = CORE_MOD,
3130 .prcm_reg_id = 3,
3131 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
3132 .idlest_reg_id = 3,
3133 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
3134 },
3135 },
Keshava Munegowdade231382011-12-15 23:14:44 -07003136};
3137
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003138static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3139 &omap3xxx_l3_main__l4_core,
3140 &omap3xxx_l3_main__l4_per,
3141 &omap3xxx_mpu__l3_main,
3142 &omap3xxx_l4_core__l4_wkup,
3143 &omap3xxx_l4_core__mmc3,
3144 &omap3_l4_core__uart1,
3145 &omap3_l4_core__uart2,
3146 &omap3_l4_per__uart3,
3147 &omap3_l4_core__i2c1,
3148 &omap3_l4_core__i2c2,
3149 &omap3_l4_core__i2c3,
3150 &omap3xxx_l4_wkup__l4_sec,
3151 &omap3xxx_l4_wkup__timer1,
3152 &omap3xxx_l4_per__timer2,
3153 &omap3xxx_l4_per__timer3,
3154 &omap3xxx_l4_per__timer4,
3155 &omap3xxx_l4_per__timer5,
3156 &omap3xxx_l4_per__timer6,
3157 &omap3xxx_l4_per__timer7,
3158 &omap3xxx_l4_per__timer8,
3159 &omap3xxx_l4_per__timer9,
3160 &omap3xxx_l4_core__timer10,
3161 &omap3xxx_l4_core__timer11,
3162 &omap3xxx_l4_wkup__wd_timer2,
3163 &omap3xxx_l4_wkup__gpio1,
3164 &omap3xxx_l4_per__gpio2,
3165 &omap3xxx_l4_per__gpio3,
3166 &omap3xxx_l4_per__gpio4,
3167 &omap3xxx_l4_per__gpio5,
3168 &omap3xxx_l4_per__gpio6,
3169 &omap3xxx_dma_system__l3,
3170 &omap3xxx_l4_core__dma_system,
3171 &omap3xxx_l4_core__mcbsp1,
3172 &omap3xxx_l4_per__mcbsp2,
3173 &omap3xxx_l4_per__mcbsp3,
3174 &omap3xxx_l4_per__mcbsp4,
3175 &omap3xxx_l4_core__mcbsp5,
3176 &omap3xxx_l4_per__mcbsp2_sidetone,
3177 &omap3xxx_l4_per__mcbsp3_sidetone,
3178 &omap34xx_l4_core__mcspi1,
3179 &omap34xx_l4_core__mcspi2,
3180 &omap34xx_l4_core__mcspi3,
3181 &omap34xx_l4_core__mcspi4,
Paul Walmsley73591542010-02-22 22:09:32 -07003182 NULL,
3183};
3184
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003185/* GP-only hwmod links */
3186static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3187 &omap3xxx_l4_sec__timer12,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003188 NULL
3189};
3190
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003191/* 3430ES1-only hwmod links */
3192static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3193 &omap3430es1_dss__l3,
3194 &omap3430es1_l4_core__dss,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003195 NULL
3196};
3197
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003198/* 3430ES2+-only hwmod links */
3199static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3200 &omap3xxx_dss__l3,
3201 &omap3xxx_l4_core__dss,
3202 &omap3xxx_usbhsotg__l3,
3203 &omap3xxx_l4_core__usbhsotg,
3204 &omap3xxx_usb_host_hs__l3_main_2,
3205 &omap3xxx_l4_core__usb_host_hs,
3206 &omap3xxx_l4_core__usb_tll_hs,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003207 NULL
3208};
3209
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003210/* <= 3430ES3-only hwmod links */
3211static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3212 &omap3xxx_l4_core__pre_es3_mmc1,
3213 &omap3xxx_l4_core__pre_es3_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003214 NULL
3215};
3216
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003217/* 3430ES3+-only hwmod links */
3218static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3219 &omap3xxx_l4_core__es3plus_mmc1,
3220 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003221 NULL
3222};
3223
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003224/* 34xx-only hwmod links (all ES revisions) */
3225static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3226 &omap3xxx_l3__iva,
3227 &omap34xx_l4_core__sr1,
3228 &omap34xx_l4_core__sr2,
3229 &omap3xxx_l4_core__mailbox,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003230 NULL
3231};
3232
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003233/* 36xx-only hwmod links (all ES revisions) */
3234static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3235 &omap3xxx_l3__iva,
3236 &omap36xx_l4_per__uart4,
3237 &omap3xxx_dss__l3,
3238 &omap3xxx_l4_core__dss,
3239 &omap36xx_l4_core__sr1,
3240 &omap36xx_l4_core__sr2,
3241 &omap3xxx_usbhsotg__l3,
3242 &omap3xxx_l4_core__usbhsotg,
3243 &omap3xxx_l4_core__mailbox,
3244 &omap3xxx_usb_host_hs__l3_main_2,
3245 &omap3xxx_l4_core__usb_host_hs,
3246 &omap3xxx_l4_core__usb_tll_hs,
3247 &omap3xxx_l4_core__es3plus_mmc1,
3248 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003249 NULL
3250};
3251
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003252static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3253 &omap3xxx_dss__l3,
3254 &omap3xxx_l4_core__dss,
3255 &am35xx_usbhsotg__l3,
3256 &am35xx_l4_core__usbhsotg,
3257 &am35xx_l4_core__uart4,
3258 &omap3xxx_usb_host_hs__l3_main_2,
3259 &omap3xxx_l4_core__usb_host_hs,
3260 &omap3xxx_l4_core__usb_tll_hs,
3261 &omap3xxx_l4_core__es3plus_mmc1,
3262 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003263 NULL
3264};
3265
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003266static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3267 &omap3xxx_l4_core__dss_dispc,
3268 &omap3xxx_l4_core__dss_dsi1,
3269 &omap3xxx_l4_core__dss_rfbi,
3270 &omap3xxx_l4_core__dss_venc,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003271 NULL
3272};
3273
Paul Walmsley73591542010-02-22 22:09:32 -07003274int __init omap3xxx_hwmod_init(void)
3275{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003276 int r;
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003277 struct omap_hwmod_ocp_if **h = NULL;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003278 unsigned int rev;
3279
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003280 /* Register hwmod links common to all OMAP3 */
3281 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003282 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003283 return r;
3284
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003285 /* Register GP-only hwmod links. */
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003286 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003287 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003288 if (r < 0)
3289 return r;
3290 }
3291
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003292 rev = omap_rev();
3293
3294 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003295 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003296 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3297 * All possible revisions should be included in this conditional.
3298 */
3299 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3300 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3301 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003302 h = omap34xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003303 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003304 h = am35xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003305 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3306 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003307 h = omap36xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003308 } else {
3309 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3310 return -EINVAL;
3311 };
3312
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003313 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003314 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003315 return r;
3316
3317 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003318 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003319 * particular family of silicon (e.g., 34xx ES1.0)
3320 */
3321 h = NULL;
3322 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003323 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003324 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3325 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3326 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003327 h = omap3430es2plus_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003328 };
3329
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003330 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003331 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003332 if (r < 0)
3333 return r;
3334 }
3335
3336 h = NULL;
3337 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3338 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003339 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003340 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3341 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003342 h = omap3430_es3plus_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003343 };
3344
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003345 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003346 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003347 if (r < 0)
3348 return r;
3349
3350 /*
3351 * DSS code presumes that dss_core hwmod is handled first,
3352 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003353 * DSS hwmod links last to ensure that dss_core is already
3354 * registered. Otherwise some change things may happen, for
3355 * ex. if dispc is handled before dss_core and DSS is enabled
3356 * in bootloader DISPC will be reset with outputs enabled
3357 * which sometimes leads to unrecoverable L3 error. XXX The
3358 * long-term fix to this is to ensure hwmods are set up in
3359 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003360 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003361 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003362
3363 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003364}