blob: 4aaf0caaf3cc3a696de230941620a50024820000 [file] [log] [blame]
Paul Walmsley73591542010-02-22 22:09:32 -07001/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley73591542010-02-22 22:09:32 -07005 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * The data in this file should be completely autogeneratable from
12 * the TI hardware database or other technical documentation.
13 *
14 * XXX these should be marked initdata for multi-OMAP kernels
15 */
16#include <plat/omap_hwmod.h>
17#include <mach/irqs.h>
18#include <plat/cpu.h>
19#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053020#include <plat/serial.h>
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000021#include <plat/l3_3xxx.h>
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053022#include <plat/l4_3xxx.h>
23#include <plat/i2c.h>
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080024#include <plat/gpio.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080025#include <plat/mmc.h>
Charulatha Vdc48e5f2011-02-24 15:16:49 +053026#include <plat/mcbsp.h>
Charulatha V0f616a42011-02-17 09:53:10 -080027#include <plat/mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070028#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070029
Paul Walmsley43b40992010-02-22 22:09:34 -070030#include "omap_hwmod_common_data.h"
31
Paul Walmsley73591542010-02-22 22:09:32 -070032#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053033#include "cm-regbits-34xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070034#include "wd_timer.h"
Hema HK273ff8c2011-02-17 12:07:19 +053035#include <mach/am35xx.h>
Paul Walmsley73591542010-02-22 22:09:32 -070036
37/*
38 * OMAP3xxx hardware module integration data
39 *
40 * ALl of the data in this section should be autogeneratable from the
41 * TI hardware database or other technical documentation. Data that
42 * is driver-specific or driver-kernel integration-specific belongs
43 * elsewhere.
44 */
45
46static struct omap_hwmod omap3xxx_mpu_hwmod;
Kevin Hilman540064b2010-07-26 16:34:32 -060047static struct omap_hwmod omap3xxx_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060048static struct omap_hwmod omap3xxx_l3_main_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -070049static struct omap_hwmod omap3xxx_l4_core_hwmod;
50static struct omap_hwmod omap3xxx_l4_per_hwmod;
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053051static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000052static struct omap_hwmod omap3430es1_dss_core_hwmod;
53static struct omap_hwmod omap3xxx_dss_core_hwmod;
54static struct omap_hwmod omap3xxx_dss_dispc_hwmod;
55static struct omap_hwmod omap3xxx_dss_dsi1_hwmod;
56static struct omap_hwmod omap3xxx_dss_rfbi_hwmod;
57static struct omap_hwmod omap3xxx_dss_venc_hwmod;
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053058static struct omap_hwmod omap3xxx_i2c1_hwmod;
59static struct omap_hwmod omap3xxx_i2c2_hwmod;
60static struct omap_hwmod omap3xxx_i2c3_hwmod;
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -080061static struct omap_hwmod omap3xxx_gpio1_hwmod;
62static struct omap_hwmod omap3xxx_gpio2_hwmod;
63static struct omap_hwmod omap3xxx_gpio3_hwmod;
64static struct omap_hwmod omap3xxx_gpio4_hwmod;
65static struct omap_hwmod omap3xxx_gpio5_hwmod;
66static struct omap_hwmod omap3xxx_gpio6_hwmod;
Thara Gopinathd3442722010-05-29 22:02:24 +053067static struct omap_hwmod omap34xx_sr1_hwmod;
68static struct omap_hwmod omap34xx_sr2_hwmod;
Charulatha V0f616a42011-02-17 09:53:10 -080069static struct omap_hwmod omap34xx_mcspi1;
70static struct omap_hwmod omap34xx_mcspi2;
71static struct omap_hwmod omap34xx_mcspi3;
72static struct omap_hwmod omap34xx_mcspi4;
Paul Walmsleyb1636052011-03-01 13:12:56 -080073static struct omap_hwmod omap3xxx_mmc1_hwmod;
74static struct omap_hwmod omap3xxx_mmc2_hwmod;
75static struct omap_hwmod omap3xxx_mmc3_hwmod;
Hema HK273ff8c2011-02-17 12:07:19 +053076static struct omap_hwmod am35xx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -070077
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080078static struct omap_hwmod omap3xxx_dma_system_hwmod;
79
Charulatha Vdc48e5f2011-02-24 15:16:49 +053080static struct omap_hwmod omap3xxx_mcbsp1_hwmod;
81static struct omap_hwmod omap3xxx_mcbsp2_hwmod;
82static struct omap_hwmod omap3xxx_mcbsp3_hwmod;
83static struct omap_hwmod omap3xxx_mcbsp4_hwmod;
84static struct omap_hwmod omap3xxx_mcbsp5_hwmod;
85static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod;
86static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod;
87
Paul Walmsley73591542010-02-22 22:09:32 -070088/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060089static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
90 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -070091 .slave = &omap3xxx_l4_core_hwmod,
92 .user = OCP_USER_MPU | OCP_USER_SDMA,
93};
94
95/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060096static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
97 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -070098 .slave = &omap3xxx_l4_per_hwmod,
99 .user = OCP_USER_MPU | OCP_USER_SDMA,
100};
101
sricharan4bb194d2011-02-08 22:13:37 +0530102/* L3 taret configuration and error log registers */
103static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
104 { .irq = INT_34XX_L3_DBG_IRQ },
105 { .irq = INT_34XX_L3_APP_IRQ },
Paul Walmsley212738a2011-07-09 19:14:06 -0600106 { .irq = -1 }
sricharan4bb194d2011-02-08 22:13:37 +0530107};
108
109static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
110 {
111 .pa_start = 0x68000000,
112 .pa_end = 0x6800ffff,
113 .flags = ADDR_TYPE_RT,
114 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600115 { }
sricharan4bb194d2011-02-08 22:13:37 +0530116};
117
Paul Walmsley73591542010-02-22 22:09:32 -0700118/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600119static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +0530120 .master = &omap3xxx_mpu_hwmod,
121 .slave = &omap3xxx_l3_main_hwmod,
122 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -0700123 .user = OCP_USER_MPU,
124};
125
126/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600127static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
128 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700129};
130
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +0000131/* DSS -> l3 */
132static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
133 .master = &omap3xxx_dss_core_hwmod,
134 .slave = &omap3xxx_l3_main_hwmod,
135 .fw = {
136 .omap2 = {
137 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
138 .flags = OMAP_FIREWALL_L3,
139 }
140 },
141 .user = OCP_USER_MPU | OCP_USER_SDMA,
142};
143
Paul Walmsley73591542010-02-22 22:09:32 -0700144/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600145static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
146 &omap3xxx_l3_main__l4_core,
147 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700148};
149
150/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600151static struct omap_hwmod omap3xxx_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600152 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -0700153 .class = &l3_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600154 .mpu_irqs = omap3xxx_l3_main_irqs,
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600155 .masters = omap3xxx_l3_main_masters,
156 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
157 .slaves = omap3xxx_l3_main_slaves,
158 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600159 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700160};
161
162static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530163static struct omap_hwmod omap3xxx_uart1_hwmod;
164static struct omap_hwmod omap3xxx_uart2_hwmod;
165static struct omap_hwmod omap3xxx_uart3_hwmod;
166static struct omap_hwmod omap3xxx_uart4_hwmod;
Hema HK870ea2b2011-02-17 12:07:18 +0530167static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -0700168
Hema HK870ea2b2011-02-17 12:07:18 +0530169/* l3_core -> usbhsotg interface */
170static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
171 .master = &omap3xxx_usbhsotg_hwmod,
172 .slave = &omap3xxx_l3_main_hwmod,
173 .clk = "core_l3_ick",
174 .user = OCP_USER_MPU,
175};
Paul Walmsley73591542010-02-22 22:09:32 -0700176
Hema HK273ff8c2011-02-17 12:07:19 +0530177/* l3_core -> am35xx_usbhsotg interface */
178static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
179 .master = &am35xx_usbhsotg_hwmod,
180 .slave = &omap3xxx_l3_main_hwmod,
181 .clk = "core_l3_ick",
182 .user = OCP_USER_MPU,
183};
Paul Walmsley73591542010-02-22 22:09:32 -0700184/* L4_CORE -> L4_WKUP interface */
185static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
186 .master = &omap3xxx_l4_core_hwmod,
187 .slave = &omap3xxx_l4_wkup_hwmod,
188 .user = OCP_USER_MPU | OCP_USER_SDMA,
189};
190
Paul Walmsleyb1636052011-03-01 13:12:56 -0800191/* L4 CORE -> MMC1 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -0800192static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
193 .master = &omap3xxx_l4_core_hwmod,
194 .slave = &omap3xxx_mmc1_hwmod,
195 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600196 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800197 .user = OCP_USER_MPU | OCP_USER_SDMA,
198 .flags = OMAP_FIREWALL_L4
199};
200
201/* L4 CORE -> MMC2 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -0800202static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
203 .master = &omap3xxx_l4_core_hwmod,
204 .slave = &omap3xxx_mmc2_hwmod,
205 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600206 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800207 .user = OCP_USER_MPU | OCP_USER_SDMA,
208 .flags = OMAP_FIREWALL_L4
209};
210
211/* L4 CORE -> MMC3 interface */
212static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
213 {
214 .pa_start = 0x480ad000,
215 .pa_end = 0x480ad1ff,
216 .flags = ADDR_TYPE_RT,
217 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600218 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -0800219};
220
221static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
222 .master = &omap3xxx_l4_core_hwmod,
223 .slave = &omap3xxx_mmc3_hwmod,
224 .clk = "mmchs3_ick",
225 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800226 .user = OCP_USER_MPU | OCP_USER_SDMA,
227 .flags = OMAP_FIREWALL_L4
228};
229
Kevin Hilman046465b2010-09-27 20:19:30 +0530230/* L4 CORE -> UART1 interface */
231static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
232 {
233 .pa_start = OMAP3_UART1_BASE,
234 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
235 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
236 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600237 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530238};
239
240static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
241 .master = &omap3xxx_l4_core_hwmod,
242 .slave = &omap3xxx_uart1_hwmod,
243 .clk = "uart1_ick",
244 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530245 .user = OCP_USER_MPU | OCP_USER_SDMA,
246};
247
248/* L4 CORE -> UART2 interface */
249static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
250 {
251 .pa_start = OMAP3_UART2_BASE,
252 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
253 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
254 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600255 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530256};
257
258static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
259 .master = &omap3xxx_l4_core_hwmod,
260 .slave = &omap3xxx_uart2_hwmod,
261 .clk = "uart2_ick",
262 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530263 .user = OCP_USER_MPU | OCP_USER_SDMA,
264};
265
266/* L4 PER -> UART3 interface */
267static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
268 {
269 .pa_start = OMAP3_UART3_BASE,
270 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
271 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
272 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600273 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530274};
275
276static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
277 .master = &omap3xxx_l4_per_hwmod,
278 .slave = &omap3xxx_uart3_hwmod,
279 .clk = "uart3_ick",
280 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530281 .user = OCP_USER_MPU | OCP_USER_SDMA,
282};
283
284/* L4 PER -> UART4 interface */
285static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
286 {
287 .pa_start = OMAP3_UART4_BASE,
288 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
289 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
290 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600291 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530292};
293
294static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
295 .master = &omap3xxx_l4_per_hwmod,
296 .slave = &omap3xxx_uart4_hwmod,
297 .clk = "uart4_ick",
298 .addr = omap3xxx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530299 .user = OCP_USER_MPU | OCP_USER_SDMA,
300};
301
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530302/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530303static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
304 .master = &omap3xxx_l4_core_hwmod,
305 .slave = &omap3xxx_i2c1_hwmod,
306 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600307 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530308 .fw = {
309 .omap2 = {
310 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
311 .l4_prot_group = 7,
312 .flags = OMAP_FIREWALL_L4,
313 }
314 },
315 .user = OCP_USER_MPU | OCP_USER_SDMA,
316};
317
318/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530319static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
320 .master = &omap3xxx_l4_core_hwmod,
321 .slave = &omap3xxx_i2c2_hwmod,
322 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600323 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530324 .fw = {
325 .omap2 = {
326 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
327 .l4_prot_group = 7,
328 .flags = OMAP_FIREWALL_L4,
329 }
330 },
331 .user = OCP_USER_MPU | OCP_USER_SDMA,
332};
333
334/* L4 CORE -> I2C3 interface */
335static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
336 {
337 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -0600338 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530339 .flags = ADDR_TYPE_RT,
340 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600341 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530342};
343
344static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
345 .master = &omap3xxx_l4_core_hwmod,
346 .slave = &omap3xxx_i2c3_hwmod,
347 .clk = "i2c3_ick",
348 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530349 .fw = {
350 .omap2 = {
351 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
352 .l4_prot_group = 7,
353 .flags = OMAP_FIREWALL_L4,
354 }
355 },
356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
Thara Gopinathd3442722010-05-29 22:02:24 +0530359/* L4 CORE -> SR1 interface */
360static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
361 {
362 .pa_start = OMAP34XX_SR1_BASE,
363 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
364 .flags = ADDR_TYPE_RT,
365 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600366 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530367};
368
369static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
370 .master = &omap3xxx_l4_core_hwmod,
371 .slave = &omap34xx_sr1_hwmod,
372 .clk = "sr_l4_ick",
373 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530374 .user = OCP_USER_MPU,
375};
376
377/* L4 CORE -> SR1 interface */
378static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
379 {
380 .pa_start = OMAP34XX_SR2_BASE,
381 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
382 .flags = ADDR_TYPE_RT,
383 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600384 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530385};
386
387static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
388 .master = &omap3xxx_l4_core_hwmod,
389 .slave = &omap34xx_sr2_hwmod,
390 .clk = "sr_l4_ick",
391 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530392 .user = OCP_USER_MPU,
393};
394
Hema HK870ea2b2011-02-17 12:07:18 +0530395/*
396* usbhsotg interface data
397*/
398
399static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
400 {
401 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
402 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
403 .flags = ADDR_TYPE_RT
404 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600405 { }
Hema HK870ea2b2011-02-17 12:07:18 +0530406};
407
408/* l4_core -> usbhsotg */
409static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
410 .master = &omap3xxx_l4_core_hwmod,
411 .slave = &omap3xxx_usbhsotg_hwmod,
412 .clk = "l4_ick",
413 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +0530414 .user = OCP_USER_MPU,
415};
416
417static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
418 &omap3xxx_usbhsotg__l3,
419};
420
421static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
422 &omap3xxx_l4_core__usbhsotg,
423};
424
Hema HK273ff8c2011-02-17 12:07:19 +0530425static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
426 {
427 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
428 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
429 .flags = ADDR_TYPE_RT
430 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600431 { }
Hema HK273ff8c2011-02-17 12:07:19 +0530432};
433
434/* l4_core -> usbhsotg */
435static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
436 .master = &omap3xxx_l4_core_hwmod,
437 .slave = &am35xx_usbhsotg_hwmod,
438 .clk = "l4_ick",
439 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +0530440 .user = OCP_USER_MPU,
441};
442
443static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
444 &am35xx_usbhsotg__l3,
445};
446
447static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
448 &am35xx_l4_core__usbhsotg,
449};
Paul Walmsley73591542010-02-22 22:09:32 -0700450/* Slave interfaces on the L4_CORE interconnect */
451static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600452 &omap3xxx_l3_main__l4_core,
Paul Walmsley73591542010-02-22 22:09:32 -0700453};
454
455/* L4 CORE */
456static struct omap_hwmod omap3xxx_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600457 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700458 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700459 .slaves = omap3xxx_l4_core_slaves,
460 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600461 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700462};
463
464/* Slave interfaces on the L4_PER interconnect */
465static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600466 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700467};
468
Paul Walmsley73591542010-02-22 22:09:32 -0700469/* L4 PER */
470static struct omap_hwmod omap3xxx_l4_per_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600471 .name = "l4_per",
Paul Walmsley43b40992010-02-22 22:09:34 -0700472 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700473 .slaves = omap3xxx_l4_per_slaves,
474 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600475 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700476};
477
478/* Slave interfaces on the L4_WKUP interconnect */
479static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
480 &omap3xxx_l4_core__l4_wkup,
481};
482
Paul Walmsley73591542010-02-22 22:09:32 -0700483/* L4 WKUP */
484static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600485 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700486 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700487 .slaves = omap3xxx_l4_wkup_slaves,
488 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600489 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700490};
491
492/* Master interfaces on the MPU device */
493static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600494 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700495};
496
497/* MPU */
498static struct omap_hwmod omap3xxx_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600499 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700500 .class = &mpu_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700501 .main_clk = "arm_fck",
502 .masters = omap3xxx_mpu_masters,
503 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
Paul Walmsley73591542010-02-22 22:09:32 -0700504};
505
Kevin Hilman540064b2010-07-26 16:34:32 -0600506/*
507 * IVA2_2 interface data
508 */
509
510/* IVA2 <- L3 interface */
511static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
512 .master = &omap3xxx_l3_main_hwmod,
513 .slave = &omap3xxx_iva_hwmod,
514 .clk = "iva2_ck",
515 .user = OCP_USER_MPU | OCP_USER_SDMA,
516};
517
518static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
519 &omap3xxx_l3__iva,
520};
521
522/*
523 * IVA2 (IVA2)
524 */
525
526static struct omap_hwmod omap3xxx_iva_hwmod = {
527 .name = "iva",
528 .class = &iva_hwmod_class,
529 .masters = omap3xxx_iva_masters,
530 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
Kevin Hilman540064b2010-07-26 16:34:32 -0600531};
532
Thara Gopinathce722d22011-02-23 00:14:05 -0700533/* timer class */
534static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
535 .rev_offs = 0x0000,
536 .sysc_offs = 0x0010,
537 .syss_offs = 0x0014,
538 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
539 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
540 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
541 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
542 .sysc_fields = &omap_hwmod_sysc_type1,
543};
544
545static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
546 .name = "timer",
547 .sysc = &omap3xxx_timer_1ms_sysc,
548 .rev = OMAP_TIMER_IP_VERSION_1,
549};
550
551static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
552 .rev_offs = 0x0000,
553 .sysc_offs = 0x0010,
554 .syss_offs = 0x0014,
555 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
556 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
557 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
558 .sysc_fields = &omap_hwmod_sysc_type1,
559};
560
561static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
562 .name = "timer",
563 .sysc = &omap3xxx_timer_sysc,
564 .rev = OMAP_TIMER_IP_VERSION_1,
565};
566
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530567/* secure timers dev attribute */
568static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
569 .timer_capability = OMAP_TIMER_SECURE,
570};
571
572/* always-on timers dev attribute */
573static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
574 .timer_capability = OMAP_TIMER_ALWON,
575};
576
577/* pwm timers dev attribute */
578static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
579 .timer_capability = OMAP_TIMER_HAS_PWM,
580};
581
Thara Gopinathce722d22011-02-23 00:14:05 -0700582/* timer1 */
583static struct omap_hwmod omap3xxx_timer1_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700584
585static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
586 {
587 .pa_start = 0x48318000,
588 .pa_end = 0x48318000 + SZ_1K - 1,
589 .flags = ADDR_TYPE_RT
590 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600591 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700592};
593
594/* l4_wkup -> timer1 */
595static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
596 .master = &omap3xxx_l4_wkup_hwmod,
597 .slave = &omap3xxx_timer1_hwmod,
598 .clk = "gpt1_ick",
599 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700600 .user = OCP_USER_MPU | OCP_USER_SDMA,
601};
602
603/* timer1 slave port */
604static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
605 &omap3xxx_l4_wkup__timer1,
606};
607
608/* timer1 hwmod */
609static struct omap_hwmod omap3xxx_timer1_hwmod = {
610 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600611 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700612 .main_clk = "gpt1_fck",
613 .prcm = {
614 .omap2 = {
615 .prcm_reg_id = 1,
616 .module_bit = OMAP3430_EN_GPT1_SHIFT,
617 .module_offs = WKUP_MOD,
618 .idlest_reg_id = 1,
619 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
620 },
621 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530622 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700623 .slaves = omap3xxx_timer1_slaves,
624 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
625 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700626};
627
628/* timer2 */
629static struct omap_hwmod omap3xxx_timer2_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700630
631static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
632 {
633 .pa_start = 0x49032000,
634 .pa_end = 0x49032000 + SZ_1K - 1,
635 .flags = ADDR_TYPE_RT
636 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600637 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700638};
639
640/* l4_per -> timer2 */
641static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
642 .master = &omap3xxx_l4_per_hwmod,
643 .slave = &omap3xxx_timer2_hwmod,
644 .clk = "gpt2_ick",
645 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700646 .user = OCP_USER_MPU | OCP_USER_SDMA,
647};
648
649/* timer2 slave port */
650static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
651 &omap3xxx_l4_per__timer2,
652};
653
654/* timer2 hwmod */
655static struct omap_hwmod omap3xxx_timer2_hwmod = {
656 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600657 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700658 .main_clk = "gpt2_fck",
659 .prcm = {
660 .omap2 = {
661 .prcm_reg_id = 1,
662 .module_bit = OMAP3430_EN_GPT2_SHIFT,
663 .module_offs = OMAP3430_PER_MOD,
664 .idlest_reg_id = 1,
665 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
666 },
667 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530668 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700669 .slaves = omap3xxx_timer2_slaves,
670 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
671 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700672};
673
674/* timer3 */
675static struct omap_hwmod omap3xxx_timer3_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700676
677static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
678 {
679 .pa_start = 0x49034000,
680 .pa_end = 0x49034000 + SZ_1K - 1,
681 .flags = ADDR_TYPE_RT
682 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600683 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700684};
685
686/* l4_per -> timer3 */
687static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
688 .master = &omap3xxx_l4_per_hwmod,
689 .slave = &omap3xxx_timer3_hwmod,
690 .clk = "gpt3_ick",
691 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700692 .user = OCP_USER_MPU | OCP_USER_SDMA,
693};
694
695/* timer3 slave port */
696static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
697 &omap3xxx_l4_per__timer3,
698};
699
700/* timer3 hwmod */
701static struct omap_hwmod omap3xxx_timer3_hwmod = {
702 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600703 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700704 .main_clk = "gpt3_fck",
705 .prcm = {
706 .omap2 = {
707 .prcm_reg_id = 1,
708 .module_bit = OMAP3430_EN_GPT3_SHIFT,
709 .module_offs = OMAP3430_PER_MOD,
710 .idlest_reg_id = 1,
711 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
712 },
713 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530714 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700715 .slaves = omap3xxx_timer3_slaves,
716 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
717 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700718};
719
720/* timer4 */
721static struct omap_hwmod omap3xxx_timer4_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700722
723static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
724 {
725 .pa_start = 0x49036000,
726 .pa_end = 0x49036000 + SZ_1K - 1,
727 .flags = ADDR_TYPE_RT
728 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600729 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700730};
731
732/* l4_per -> timer4 */
733static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
734 .master = &omap3xxx_l4_per_hwmod,
735 .slave = &omap3xxx_timer4_hwmod,
736 .clk = "gpt4_ick",
737 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700738 .user = OCP_USER_MPU | OCP_USER_SDMA,
739};
740
741/* timer4 slave port */
742static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
743 &omap3xxx_l4_per__timer4,
744};
745
746/* timer4 hwmod */
747static struct omap_hwmod omap3xxx_timer4_hwmod = {
748 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600749 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700750 .main_clk = "gpt4_fck",
751 .prcm = {
752 .omap2 = {
753 .prcm_reg_id = 1,
754 .module_bit = OMAP3430_EN_GPT4_SHIFT,
755 .module_offs = OMAP3430_PER_MOD,
756 .idlest_reg_id = 1,
757 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
758 },
759 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530760 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700761 .slaves = omap3xxx_timer4_slaves,
762 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
763 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700764};
765
766/* timer5 */
767static struct omap_hwmod omap3xxx_timer5_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700768
769static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
770 {
771 .pa_start = 0x49038000,
772 .pa_end = 0x49038000 + SZ_1K - 1,
773 .flags = ADDR_TYPE_RT
774 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600775 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700776};
777
778/* l4_per -> timer5 */
779static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
780 .master = &omap3xxx_l4_per_hwmod,
781 .slave = &omap3xxx_timer5_hwmod,
782 .clk = "gpt5_ick",
783 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700784 .user = OCP_USER_MPU | OCP_USER_SDMA,
785};
786
787/* timer5 slave port */
788static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
789 &omap3xxx_l4_per__timer5,
790};
791
792/* timer5 hwmod */
793static struct omap_hwmod omap3xxx_timer5_hwmod = {
794 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600795 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700796 .main_clk = "gpt5_fck",
797 .prcm = {
798 .omap2 = {
799 .prcm_reg_id = 1,
800 .module_bit = OMAP3430_EN_GPT5_SHIFT,
801 .module_offs = OMAP3430_PER_MOD,
802 .idlest_reg_id = 1,
803 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
804 },
805 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530806 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700807 .slaves = omap3xxx_timer5_slaves,
808 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
809 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700810};
811
812/* timer6 */
813static struct omap_hwmod omap3xxx_timer6_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700814
815static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
816 {
817 .pa_start = 0x4903A000,
818 .pa_end = 0x4903A000 + SZ_1K - 1,
819 .flags = ADDR_TYPE_RT
820 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600821 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700822};
823
824/* l4_per -> timer6 */
825static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
826 .master = &omap3xxx_l4_per_hwmod,
827 .slave = &omap3xxx_timer6_hwmod,
828 .clk = "gpt6_ick",
829 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700830 .user = OCP_USER_MPU | OCP_USER_SDMA,
831};
832
833/* timer6 slave port */
834static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
835 &omap3xxx_l4_per__timer6,
836};
837
838/* timer6 hwmod */
839static struct omap_hwmod omap3xxx_timer6_hwmod = {
840 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600841 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700842 .main_clk = "gpt6_fck",
843 .prcm = {
844 .omap2 = {
845 .prcm_reg_id = 1,
846 .module_bit = OMAP3430_EN_GPT6_SHIFT,
847 .module_offs = OMAP3430_PER_MOD,
848 .idlest_reg_id = 1,
849 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
850 },
851 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530852 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700853 .slaves = omap3xxx_timer6_slaves,
854 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
855 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700856};
857
858/* timer7 */
859static struct omap_hwmod omap3xxx_timer7_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700860
861static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
862 {
863 .pa_start = 0x4903C000,
864 .pa_end = 0x4903C000 + SZ_1K - 1,
865 .flags = ADDR_TYPE_RT
866 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600867 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700868};
869
870/* l4_per -> timer7 */
871static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
872 .master = &omap3xxx_l4_per_hwmod,
873 .slave = &omap3xxx_timer7_hwmod,
874 .clk = "gpt7_ick",
875 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700876 .user = OCP_USER_MPU | OCP_USER_SDMA,
877};
878
879/* timer7 slave port */
880static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
881 &omap3xxx_l4_per__timer7,
882};
883
884/* timer7 hwmod */
885static struct omap_hwmod omap3xxx_timer7_hwmod = {
886 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600887 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700888 .main_clk = "gpt7_fck",
889 .prcm = {
890 .omap2 = {
891 .prcm_reg_id = 1,
892 .module_bit = OMAP3430_EN_GPT7_SHIFT,
893 .module_offs = OMAP3430_PER_MOD,
894 .idlest_reg_id = 1,
895 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
896 },
897 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530898 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700899 .slaves = omap3xxx_timer7_slaves,
900 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
901 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700902};
903
904/* timer8 */
905static struct omap_hwmod omap3xxx_timer8_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700906
907static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
908 {
909 .pa_start = 0x4903E000,
910 .pa_end = 0x4903E000 + SZ_1K - 1,
911 .flags = ADDR_TYPE_RT
912 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600913 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700914};
915
916/* l4_per -> timer8 */
917static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
918 .master = &omap3xxx_l4_per_hwmod,
919 .slave = &omap3xxx_timer8_hwmod,
920 .clk = "gpt8_ick",
921 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700922 .user = OCP_USER_MPU | OCP_USER_SDMA,
923};
924
925/* timer8 slave port */
926static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
927 &omap3xxx_l4_per__timer8,
928};
929
930/* timer8 hwmod */
931static struct omap_hwmod omap3xxx_timer8_hwmod = {
932 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600933 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700934 .main_clk = "gpt8_fck",
935 .prcm = {
936 .omap2 = {
937 .prcm_reg_id = 1,
938 .module_bit = OMAP3430_EN_GPT8_SHIFT,
939 .module_offs = OMAP3430_PER_MOD,
940 .idlest_reg_id = 1,
941 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
942 },
943 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530944 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700945 .slaves = omap3xxx_timer8_slaves,
946 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
947 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700948};
949
950/* timer9 */
951static struct omap_hwmod omap3xxx_timer9_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700952
953static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
954 {
955 .pa_start = 0x49040000,
956 .pa_end = 0x49040000 + SZ_1K - 1,
957 .flags = ADDR_TYPE_RT
958 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600959 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700960};
961
962/* l4_per -> timer9 */
963static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
964 .master = &omap3xxx_l4_per_hwmod,
965 .slave = &omap3xxx_timer9_hwmod,
966 .clk = "gpt9_ick",
967 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700968 .user = OCP_USER_MPU | OCP_USER_SDMA,
969};
970
971/* timer9 slave port */
972static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
973 &omap3xxx_l4_per__timer9,
974};
975
976/* timer9 hwmod */
977static struct omap_hwmod omap3xxx_timer9_hwmod = {
978 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600979 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700980 .main_clk = "gpt9_fck",
981 .prcm = {
982 .omap2 = {
983 .prcm_reg_id = 1,
984 .module_bit = OMAP3430_EN_GPT9_SHIFT,
985 .module_offs = OMAP3430_PER_MOD,
986 .idlest_reg_id = 1,
987 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
988 },
989 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530990 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -0700991 .slaves = omap3xxx_timer9_slaves,
992 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
993 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -0700994};
995
996/* timer10 */
997static struct omap_hwmod omap3xxx_timer10_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -0700998
Thara Gopinathce722d22011-02-23 00:14:05 -0700999/* l4_core -> timer10 */
1000static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1001 .master = &omap3xxx_l4_core_hwmod,
1002 .slave = &omap3xxx_timer10_hwmod,
1003 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001004 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001005 .user = OCP_USER_MPU | OCP_USER_SDMA,
1006};
1007
1008/* timer10 slave port */
1009static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1010 &omap3xxx_l4_core__timer10,
1011};
1012
1013/* timer10 hwmod */
1014static struct omap_hwmod omap3xxx_timer10_hwmod = {
1015 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001016 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001017 .main_clk = "gpt10_fck",
1018 .prcm = {
1019 .omap2 = {
1020 .prcm_reg_id = 1,
1021 .module_bit = OMAP3430_EN_GPT10_SHIFT,
1022 .module_offs = CORE_MOD,
1023 .idlest_reg_id = 1,
1024 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
1025 },
1026 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301027 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001028 .slaves = omap3xxx_timer10_slaves,
1029 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
1030 .class = &omap3xxx_timer_1ms_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001031};
1032
1033/* timer11 */
1034static struct omap_hwmod omap3xxx_timer11_hwmod;
Thara Gopinathce722d22011-02-23 00:14:05 -07001035
Thara Gopinathce722d22011-02-23 00:14:05 -07001036/* l4_core -> timer11 */
1037static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1038 .master = &omap3xxx_l4_core_hwmod,
1039 .slave = &omap3xxx_timer11_hwmod,
1040 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001041 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001042 .user = OCP_USER_MPU | OCP_USER_SDMA,
1043};
1044
1045/* timer11 slave port */
1046static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1047 &omap3xxx_l4_core__timer11,
1048};
1049
1050/* timer11 hwmod */
1051static struct omap_hwmod omap3xxx_timer11_hwmod = {
1052 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001053 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001054 .main_clk = "gpt11_fck",
1055 .prcm = {
1056 .omap2 = {
1057 .prcm_reg_id = 1,
1058 .module_bit = OMAP3430_EN_GPT11_SHIFT,
1059 .module_offs = CORE_MOD,
1060 .idlest_reg_id = 1,
1061 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
1062 },
1063 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301064 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001065 .slaves = omap3xxx_timer11_slaves,
1066 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
1067 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001068};
1069
1070/* timer12*/
1071static struct omap_hwmod omap3xxx_timer12_hwmod;
1072static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1073 { .irq = 95, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001074 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -07001075};
1076
1077static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1078 {
1079 .pa_start = 0x48304000,
1080 .pa_end = 0x48304000 + SZ_1K - 1,
1081 .flags = ADDR_TYPE_RT
1082 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001083 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07001084};
1085
1086/* l4_core -> timer12 */
1087static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1088 .master = &omap3xxx_l4_core_hwmod,
1089 .slave = &omap3xxx_timer12_hwmod,
1090 .clk = "gpt12_ick",
1091 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001092 .user = OCP_USER_MPU | OCP_USER_SDMA,
1093};
1094
1095/* timer12 slave port */
1096static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1097 &omap3xxx_l4_core__timer12,
1098};
1099
1100/* timer12 hwmod */
1101static struct omap_hwmod omap3xxx_timer12_hwmod = {
1102 .name = "timer12",
1103 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001104 .main_clk = "gpt12_fck",
1105 .prcm = {
1106 .omap2 = {
1107 .prcm_reg_id = 1,
1108 .module_bit = OMAP3430_EN_GPT12_SHIFT,
1109 .module_offs = WKUP_MOD,
1110 .idlest_reg_id = 1,
1111 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
1112 },
1113 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +05301114 .dev_attr = &capability_secure_dev_attr,
Thara Gopinathce722d22011-02-23 00:14:05 -07001115 .slaves = omap3xxx_timer12_slaves,
1116 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
1117 .class = &omap3xxx_timer_hwmod_class,
Thara Gopinathce722d22011-02-23 00:14:05 -07001118};
1119
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301120/* l4_wkup -> wd_timer2 */
1121static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1122 {
1123 .pa_start = 0x48314000,
1124 .pa_end = 0x4831407f,
1125 .flags = ADDR_TYPE_RT
1126 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001127 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301128};
1129
1130static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1131 .master = &omap3xxx_l4_wkup_hwmod,
1132 .slave = &omap3xxx_wd_timer2_hwmod,
1133 .clk = "wdt2_ick",
1134 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301135 .user = OCP_USER_MPU | OCP_USER_SDMA,
1136};
1137
1138/*
1139 * 'wd_timer' class
1140 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1141 * overflow condition
1142 */
1143
1144static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
1145 .rev_offs = 0x0000,
1146 .sysc_offs = 0x0010,
1147 .syss_offs = 0x0014,
1148 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
1149 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001150 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1151 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301152 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1153 .sysc_fields = &omap_hwmod_sysc_type1,
1154};
1155
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301156/* I2C common */
1157static struct omap_hwmod_class_sysconfig i2c_sysc = {
1158 .rev_offs = 0x00,
1159 .sysc_offs = 0x20,
1160 .syss_offs = 0x10,
1161 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1162 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001163 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301164 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1165 .sysc_fields = &omap_hwmod_sysc_type1,
1166};
1167
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301168static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -07001169 .name = "wd_timer",
1170 .sysc = &omap3xxx_wd_timer_sysc,
1171 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301172};
1173
1174/* wd_timer2 */
1175static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
1176 &omap3xxx_l4_wkup__wd_timer2,
1177};
1178
1179static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1180 .name = "wd_timer2",
1181 .class = &omap3xxx_wd_timer_hwmod_class,
1182 .main_clk = "wdt2_fck",
1183 .prcm = {
1184 .omap2 = {
1185 .prcm_reg_id = 1,
1186 .module_bit = OMAP3430_EN_WDT2_SHIFT,
1187 .module_offs = WKUP_MOD,
1188 .idlest_reg_id = 1,
1189 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1190 },
1191 },
1192 .slaves = omap3xxx_wd_timer2_slaves,
1193 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
Paul Walmsley2f4dd592011-03-10 22:40:06 -07001194 /*
1195 * XXX: Use software supervised mode, HW supervised smartidle seems to
1196 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
1197 */
1198 .flags = HWMOD_SWSUP_SIDLE,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301199};
1200
Kevin Hilman046465b2010-09-27 20:19:30 +05301201/* UART1 */
1202
Kevin Hilman046465b2010-09-27 20:19:30 +05301203static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1204 &omap3_l4_core__uart1,
1205};
1206
1207static struct omap_hwmod omap3xxx_uart1_hwmod = {
1208 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001209 .mpu_irqs = omap2_uart1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001210 .sdma_reqs = omap2_uart1_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301211 .main_clk = "uart1_fck",
1212 .prcm = {
1213 .omap2 = {
1214 .module_offs = CORE_MOD,
1215 .prcm_reg_id = 1,
1216 .module_bit = OMAP3430_EN_UART1_SHIFT,
1217 .idlest_reg_id = 1,
1218 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1219 },
1220 },
1221 .slaves = omap3xxx_uart1_slaves,
1222 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001223 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301224};
1225
1226/* UART2 */
1227
Kevin Hilman046465b2010-09-27 20:19:30 +05301228static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1229 &omap3_l4_core__uart2,
1230};
1231
1232static struct omap_hwmod omap3xxx_uart2_hwmod = {
1233 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001234 .mpu_irqs = omap2_uart2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001235 .sdma_reqs = omap2_uart2_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301236 .main_clk = "uart2_fck",
1237 .prcm = {
1238 .omap2 = {
1239 .module_offs = CORE_MOD,
1240 .prcm_reg_id = 1,
1241 .module_bit = OMAP3430_EN_UART2_SHIFT,
1242 .idlest_reg_id = 1,
1243 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1244 },
1245 },
1246 .slaves = omap3xxx_uart2_slaves,
1247 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001248 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301249};
1250
1251/* UART3 */
1252
Kevin Hilman046465b2010-09-27 20:19:30 +05301253static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1254 &omap3_l4_per__uart3,
1255};
1256
1257static struct omap_hwmod omap3xxx_uart3_hwmod = {
1258 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001259 .mpu_irqs = omap2_uart3_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001260 .sdma_reqs = omap2_uart3_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301261 .main_clk = "uart3_fck",
1262 .prcm = {
1263 .omap2 = {
1264 .module_offs = OMAP3430_PER_MOD,
1265 .prcm_reg_id = 1,
1266 .module_bit = OMAP3430_EN_UART3_SHIFT,
1267 .idlest_reg_id = 1,
1268 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1269 },
1270 },
1271 .slaves = omap3xxx_uart3_slaves,
1272 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001273 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301274};
1275
1276/* UART4 */
1277
1278static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1279 { .irq = INT_36XX_UART4_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001280 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301281};
1282
1283static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1284 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
1285 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
Paul Walmsleybc614952011-07-09 19:14:07 -06001286 { .dma_req = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301287};
1288
1289static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
1290 &omap3_l4_per__uart4,
1291};
1292
1293static struct omap_hwmod omap3xxx_uart4_hwmod = {
1294 .name = "uart4",
1295 .mpu_irqs = uart4_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301296 .sdma_reqs = uart4_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301297 .main_clk = "uart4_fck",
1298 .prcm = {
1299 .omap2 = {
1300 .module_offs = OMAP3430_PER_MOD,
1301 .prcm_reg_id = 1,
1302 .module_bit = OMAP3630_EN_UART4_SHIFT,
1303 .idlest_reg_id = 1,
1304 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1305 },
1306 },
1307 .slaves = omap3xxx_uart4_slaves,
1308 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001309 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +05301310};
1311
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301312static struct omap_hwmod_class i2c_class = {
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06001313 .name = "i2c",
1314 .sysc = &i2c_sysc,
1315 .rev = OMAP_I2C_IP_VERSION_1,
1316 .reset = &omap_i2c_reset,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301317};
1318
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001319static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1320 { .name = "dispc", .dma_req = 5 },
1321 { .name = "dsi1", .dma_req = 74 },
Paul Walmsleybc614952011-07-09 19:14:07 -06001322 { .dma_req = -1 }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001323};
1324
1325/* dss */
1326/* dss master ports */
1327static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1328 &omap3xxx_dss__l3,
1329};
1330
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001331/* l4_core -> dss */
1332static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1333 .master = &omap3xxx_l4_core_hwmod,
1334 .slave = &omap3430es1_dss_core_hwmod,
1335 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001336 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001337 .fw = {
1338 .omap2 = {
1339 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1340 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1341 .flags = OMAP_FIREWALL_L4,
1342 }
1343 },
1344 .user = OCP_USER_MPU | OCP_USER_SDMA,
1345};
1346
1347static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1348 .master = &omap3xxx_l4_core_hwmod,
1349 .slave = &omap3xxx_dss_core_hwmod,
1350 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001351 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001352 .fw = {
1353 .omap2 = {
1354 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1355 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1356 .flags = OMAP_FIREWALL_L4,
1357 }
1358 },
1359 .user = OCP_USER_MPU | OCP_USER_SDMA,
1360};
1361
1362/* dss slave ports */
1363static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
1364 &omap3430es1_l4_core__dss,
1365};
1366
1367static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
1368 &omap3xxx_l4_core__dss,
1369};
1370
1371static struct omap_hwmod_opt_clk dss_opt_clks[] = {
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001372 /*
1373 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
1374 * driver does not use these clocks.
1375 */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001376 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001377 { .role = "tv_clk", .clk = "dss_tv_fck" },
1378 /* required only on OMAP3430 */
1379 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001380};
1381
1382static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1383 .name = "dss_core",
Paul Walmsley273b9462011-07-09 19:14:08 -06001384 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001385 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001386 .sdma_reqs = omap3xxx_dss_sdma_chs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001387 .prcm = {
1388 .omap2 = {
1389 .prcm_reg_id = 1,
1390 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1391 .module_offs = OMAP3430_DSS_MOD,
1392 .idlest_reg_id = 1,
1393 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
1394 },
1395 },
1396 .opt_clks = dss_opt_clks,
1397 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1398 .slaves = omap3430es1_dss_slaves,
1399 .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
1400 .masters = omap3xxx_dss_masters,
1401 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001402 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001403};
1404
1405static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1406 .name = "dss_core",
Tomi Valkeinen8c3105c2011-11-08 03:16:10 -07001407 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley273b9462011-07-09 19:14:08 -06001408 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001409 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001410 .sdma_reqs = omap3xxx_dss_sdma_chs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001411 .prcm = {
1412 .omap2 = {
1413 .prcm_reg_id = 1,
1414 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1415 .module_offs = OMAP3430_DSS_MOD,
1416 .idlest_reg_id = 1,
1417 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
1418 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
1419 },
1420 },
1421 .opt_clks = dss_opt_clks,
1422 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1423 .slaves = omap3xxx_dss_slaves,
1424 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
1425 .masters = omap3xxx_dss_masters,
1426 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001427};
1428
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001429/* l4_core -> dss_dispc */
1430static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1431 .master = &omap3xxx_l4_core_hwmod,
1432 .slave = &omap3xxx_dss_dispc_hwmod,
1433 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001434 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001435 .fw = {
1436 .omap2 = {
1437 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1438 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1439 .flags = OMAP_FIREWALL_L4,
1440 }
1441 },
1442 .user = OCP_USER_MPU | OCP_USER_SDMA,
1443};
1444
1445/* dss_dispc slave ports */
1446static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1447 &omap3xxx_l4_core__dss_dispc,
1448};
1449
1450static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1451 .name = "dss_dispc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001452 .class = &omap2_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001453 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001454 .main_clk = "dss1_alwon_fck",
1455 .prcm = {
1456 .omap2 = {
1457 .prcm_reg_id = 1,
1458 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1459 .module_offs = OMAP3430_DSS_MOD,
1460 },
1461 },
1462 .slaves = omap3xxx_dss_dispc_slaves,
1463 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001464 .flags = HWMOD_NO_IDLEST,
1465};
1466
1467/*
1468 * 'dsi' class
1469 * display serial interface controller
1470 */
1471
1472static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
1473 .name = "dsi",
1474};
1475
archit tanejaaffe3602011-02-23 08:41:03 +00001476static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1477 { .irq = 25 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001478 { .irq = -1 }
archit tanejaaffe3602011-02-23 08:41:03 +00001479};
1480
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001481/* dss_dsi1 */
1482static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1483 {
1484 .pa_start = 0x4804FC00,
1485 .pa_end = 0x4804FFFF,
1486 .flags = ADDR_TYPE_RT
1487 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001488 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001489};
1490
1491/* l4_core -> dss_dsi1 */
1492static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1493 .master = &omap3xxx_l4_core_hwmod,
1494 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001495 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001496 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001497 .fw = {
1498 .omap2 = {
1499 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1500 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1501 .flags = OMAP_FIREWALL_L4,
1502 }
1503 },
1504 .user = OCP_USER_MPU | OCP_USER_SDMA,
1505};
1506
1507/* dss_dsi1 slave ports */
1508static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
1509 &omap3xxx_l4_core__dss_dsi1,
1510};
1511
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001512static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1513 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1514};
1515
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001516static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1517 .name = "dss_dsi1",
1518 .class = &omap3xxx_dsi_hwmod_class,
archit tanejaaffe3602011-02-23 08:41:03 +00001519 .mpu_irqs = omap3xxx_dsi1_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001520 .main_clk = "dss1_alwon_fck",
1521 .prcm = {
1522 .omap2 = {
1523 .prcm_reg_id = 1,
1524 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1525 .module_offs = OMAP3430_DSS_MOD,
1526 },
1527 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001528 .opt_clks = dss_dsi1_opt_clks,
1529 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001530 .slaves = omap3xxx_dss_dsi1_slaves,
1531 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001532 .flags = HWMOD_NO_IDLEST,
1533};
1534
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001535/* l4_core -> dss_rfbi */
1536static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1537 .master = &omap3xxx_l4_core_hwmod,
1538 .slave = &omap3xxx_dss_rfbi_hwmod,
1539 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001540 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001541 .fw = {
1542 .omap2 = {
1543 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1544 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1545 .flags = OMAP_FIREWALL_L4,
1546 }
1547 },
1548 .user = OCP_USER_MPU | OCP_USER_SDMA,
1549};
1550
1551/* dss_rfbi slave ports */
1552static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1553 &omap3xxx_l4_core__dss_rfbi,
1554};
1555
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001556static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1557 { .role = "ick", .clk = "dss_ick" },
1558};
1559
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001560static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1561 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -06001562 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001563 .main_clk = "dss1_alwon_fck",
1564 .prcm = {
1565 .omap2 = {
1566 .prcm_reg_id = 1,
1567 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1568 .module_offs = OMAP3430_DSS_MOD,
1569 },
1570 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001571 .opt_clks = dss_rfbi_opt_clks,
1572 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001573 .slaves = omap3xxx_dss_rfbi_slaves,
1574 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001575 .flags = HWMOD_NO_IDLEST,
1576};
1577
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001578/* l4_core -> dss_venc */
1579static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1580 .master = &omap3xxx_l4_core_hwmod,
1581 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001582 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001583 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001584 .fw = {
1585 .omap2 = {
1586 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
1587 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1588 .flags = OMAP_FIREWALL_L4,
1589 }
1590 },
Paul Walmsleyc39bee82011-03-04 06:02:15 +00001591 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001592 .user = OCP_USER_MPU | OCP_USER_SDMA,
1593};
1594
1595/* dss_venc slave ports */
1596static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1597 &omap3xxx_l4_core__dss_venc,
1598};
1599
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001600static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
1601 /* required only on OMAP3430 */
1602 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
1603};
1604
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001605static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1606 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001607 .class = &omap2_venc_hwmod_class,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001608 .main_clk = "dss_tv_fck",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001609 .prcm = {
1610 .omap2 = {
1611 .prcm_reg_id = 1,
1612 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1613 .module_offs = OMAP3430_DSS_MOD,
1614 },
1615 },
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07001616 .opt_clks = dss_venc_opt_clks,
1617 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001618 .slaves = omap3xxx_dss_venc_slaves,
1619 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001620 .flags = HWMOD_NO_IDLEST,
1621};
1622
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301623/* I2C1 */
1624
1625static struct omap_i2c_dev_attr i2c1_dev_attr = {
1626 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001627 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1628 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1629 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301630};
1631
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301632static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1633 &omap3_l4_core__i2c1,
1634};
1635
1636static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1637 .name = "i2c1",
Andy Green3e600522011-07-10 05:27:14 -06001638 .flags = HWMOD_16BIT_REG,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001639 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001640 .sdma_reqs = omap2_i2c1_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301641 .main_clk = "i2c1_fck",
1642 .prcm = {
1643 .omap2 = {
1644 .module_offs = CORE_MOD,
1645 .prcm_reg_id = 1,
1646 .module_bit = OMAP3430_EN_I2C1_SHIFT,
1647 .idlest_reg_id = 1,
1648 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1649 },
1650 },
1651 .slaves = omap3xxx_i2c1_slaves,
1652 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
1653 .class = &i2c_class,
1654 .dev_attr = &i2c1_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301655};
1656
1657/* I2C2 */
1658
1659static struct omap_i2c_dev_attr i2c2_dev_attr = {
1660 .fifo_depth = 8, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001661 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1662 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1663 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301664};
1665
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301666static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1667 &omap3_l4_core__i2c2,
1668};
1669
1670static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1671 .name = "i2c2",
Andy Green3e600522011-07-10 05:27:14 -06001672 .flags = HWMOD_16BIT_REG,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001673 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001674 .sdma_reqs = omap2_i2c2_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301675 .main_clk = "i2c2_fck",
1676 .prcm = {
1677 .omap2 = {
1678 .module_offs = CORE_MOD,
1679 .prcm_reg_id = 1,
1680 .module_bit = OMAP3430_EN_I2C2_SHIFT,
1681 .idlest_reg_id = 1,
1682 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1683 },
1684 },
1685 .slaves = omap3xxx_i2c2_slaves,
1686 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
1687 .class = &i2c_class,
1688 .dev_attr = &i2c2_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301689};
1690
1691/* I2C3 */
1692
1693static struct omap_i2c_dev_attr i2c3_dev_attr = {
1694 .fifo_depth = 64, /* bytes */
Andy Green4d4441a2011-07-10 05:27:16 -06001695 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1696 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1697 OMAP_I2C_FLAG_BUS_SHIFT_2,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301698};
1699
1700static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1701 { .irq = INT_34XX_I2C3_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001702 { .irq = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301703};
1704
1705static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1706 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
1707 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
Paul Walmsleybc614952011-07-09 19:14:07 -06001708 { .dma_req = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301709};
1710
1711static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1712 &omap3_l4_core__i2c3,
1713};
1714
1715static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1716 .name = "i2c3",
Andy Green3e600522011-07-10 05:27:14 -06001717 .flags = HWMOD_16BIT_REG,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301718 .mpu_irqs = i2c3_mpu_irqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301719 .sdma_reqs = i2c3_sdma_reqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301720 .main_clk = "i2c3_fck",
1721 .prcm = {
1722 .omap2 = {
1723 .module_offs = CORE_MOD,
1724 .prcm_reg_id = 1,
1725 .module_bit = OMAP3430_EN_I2C3_SHIFT,
1726 .idlest_reg_id = 1,
1727 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
1728 },
1729 },
1730 .slaves = omap3xxx_i2c3_slaves,
1731 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
1732 .class = &i2c_class,
1733 .dev_attr = &i2c3_dev_attr,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301734};
1735
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001736/* l4_wkup -> gpio1 */
1737static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
1738 {
1739 .pa_start = 0x48310000,
1740 .pa_end = 0x483101ff,
1741 .flags = ADDR_TYPE_RT
1742 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001743 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001744};
1745
1746static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
1747 .master = &omap3xxx_l4_wkup_hwmod,
1748 .slave = &omap3xxx_gpio1_hwmod,
1749 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001750 .user = OCP_USER_MPU | OCP_USER_SDMA,
1751};
1752
1753/* l4_per -> gpio2 */
1754static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
1755 {
1756 .pa_start = 0x49050000,
1757 .pa_end = 0x490501ff,
1758 .flags = ADDR_TYPE_RT
1759 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001760 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001761};
1762
1763static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
1764 .master = &omap3xxx_l4_per_hwmod,
1765 .slave = &omap3xxx_gpio2_hwmod,
1766 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001767 .user = OCP_USER_MPU | OCP_USER_SDMA,
1768};
1769
1770/* l4_per -> gpio3 */
1771static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
1772 {
1773 .pa_start = 0x49052000,
1774 .pa_end = 0x490521ff,
1775 .flags = ADDR_TYPE_RT
1776 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001777 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001778};
1779
1780static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
1781 .master = &omap3xxx_l4_per_hwmod,
1782 .slave = &omap3xxx_gpio3_hwmod,
1783 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001784 .user = OCP_USER_MPU | OCP_USER_SDMA,
1785};
1786
1787/* l4_per -> gpio4 */
1788static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
1789 {
1790 .pa_start = 0x49054000,
1791 .pa_end = 0x490541ff,
1792 .flags = ADDR_TYPE_RT
1793 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001794 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001795};
1796
1797static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
1798 .master = &omap3xxx_l4_per_hwmod,
1799 .slave = &omap3xxx_gpio4_hwmod,
1800 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001801 .user = OCP_USER_MPU | OCP_USER_SDMA,
1802};
1803
1804/* l4_per -> gpio5 */
1805static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
1806 {
1807 .pa_start = 0x49056000,
1808 .pa_end = 0x490561ff,
1809 .flags = ADDR_TYPE_RT
1810 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001811 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001812};
1813
1814static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
1815 .master = &omap3xxx_l4_per_hwmod,
1816 .slave = &omap3xxx_gpio5_hwmod,
1817 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001818 .user = OCP_USER_MPU | OCP_USER_SDMA,
1819};
1820
1821/* l4_per -> gpio6 */
1822static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
1823 {
1824 .pa_start = 0x49058000,
1825 .pa_end = 0x490581ff,
1826 .flags = ADDR_TYPE_RT
1827 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001828 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001829};
1830
1831static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
1832 .master = &omap3xxx_l4_per_hwmod,
1833 .slave = &omap3xxx_gpio6_hwmod,
1834 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001835 .user = OCP_USER_MPU | OCP_USER_SDMA,
1836};
1837
1838/*
1839 * 'gpio' class
1840 * general purpose io module
1841 */
1842
1843static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
1844 .rev_offs = 0x0000,
1845 .sysc_offs = 0x0010,
1846 .syss_offs = 0x0014,
1847 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001848 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1849 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001850 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1851 .sysc_fields = &omap_hwmod_sysc_type1,
1852};
1853
1854static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
1855 .name = "gpio",
1856 .sysc = &omap3xxx_gpio_sysc,
1857 .rev = 1,
1858};
1859
1860/* gpio_dev_attr*/
1861static struct omap_gpio_dev_attr gpio_dev_attr = {
1862 .bank_width = 32,
1863 .dbck_flag = true,
1864};
1865
1866/* gpio1 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001867static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1868 { .role = "dbclk", .clk = "gpio1_dbck", },
1869};
1870
1871static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
1872 &omap3xxx_l4_wkup__gpio1,
1873};
1874
1875static struct omap_hwmod omap3xxx_gpio1_hwmod = {
1876 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301877 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001878 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001879 .main_clk = "gpio1_ick",
1880 .opt_clks = gpio1_opt_clks,
1881 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
1882 .prcm = {
1883 .omap2 = {
1884 .prcm_reg_id = 1,
1885 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
1886 .module_offs = WKUP_MOD,
1887 .idlest_reg_id = 1,
1888 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
1889 },
1890 },
1891 .slaves = omap3xxx_gpio1_slaves,
1892 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
1893 .class = &omap3xxx_gpio_hwmod_class,
1894 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001895};
1896
1897/* gpio2 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001898static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1899 { .role = "dbclk", .clk = "gpio2_dbck", },
1900};
1901
1902static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
1903 &omap3xxx_l4_per__gpio2,
1904};
1905
1906static struct omap_hwmod omap3xxx_gpio2_hwmod = {
1907 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301908 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001909 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001910 .main_clk = "gpio2_ick",
1911 .opt_clks = gpio2_opt_clks,
1912 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
1913 .prcm = {
1914 .omap2 = {
1915 .prcm_reg_id = 1,
1916 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
1917 .module_offs = OMAP3430_PER_MOD,
1918 .idlest_reg_id = 1,
1919 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
1920 },
1921 },
1922 .slaves = omap3xxx_gpio2_slaves,
1923 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
1924 .class = &omap3xxx_gpio_hwmod_class,
1925 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001926};
1927
1928/* gpio3 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001929static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1930 { .role = "dbclk", .clk = "gpio3_dbck", },
1931};
1932
1933static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
1934 &omap3xxx_l4_per__gpio3,
1935};
1936
1937static struct omap_hwmod omap3xxx_gpio3_hwmod = {
1938 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301939 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001940 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001941 .main_clk = "gpio3_ick",
1942 .opt_clks = gpio3_opt_clks,
1943 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
1944 .prcm = {
1945 .omap2 = {
1946 .prcm_reg_id = 1,
1947 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
1948 .module_offs = OMAP3430_PER_MOD,
1949 .idlest_reg_id = 1,
1950 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
1951 },
1952 },
1953 .slaves = omap3xxx_gpio3_slaves,
1954 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
1955 .class = &omap3xxx_gpio_hwmod_class,
1956 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001957};
1958
1959/* gpio4 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001960static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
1961 { .role = "dbclk", .clk = "gpio4_dbck", },
1962};
1963
1964static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
1965 &omap3xxx_l4_per__gpio4,
1966};
1967
1968static struct omap_hwmod omap3xxx_gpio4_hwmod = {
1969 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301970 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001971 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001972 .main_clk = "gpio4_ick",
1973 .opt_clks = gpio4_opt_clks,
1974 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
1975 .prcm = {
1976 .omap2 = {
1977 .prcm_reg_id = 1,
1978 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
1979 .module_offs = OMAP3430_PER_MOD,
1980 .idlest_reg_id = 1,
1981 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
1982 },
1983 },
1984 .slaves = omap3xxx_gpio4_slaves,
1985 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
1986 .class = &omap3xxx_gpio_hwmod_class,
1987 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001988};
1989
1990/* gpio5 */
1991static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
1992 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
Paul Walmsley212738a2011-07-09 19:14:06 -06001993 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001994};
1995
1996static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1997 { .role = "dbclk", .clk = "gpio5_dbck", },
1998};
1999
2000static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
2001 &omap3xxx_l4_per__gpio5,
2002};
2003
2004static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2005 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302006 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002007 .mpu_irqs = omap3xxx_gpio5_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002008 .main_clk = "gpio5_ick",
2009 .opt_clks = gpio5_opt_clks,
2010 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2011 .prcm = {
2012 .omap2 = {
2013 .prcm_reg_id = 1,
2014 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
2015 .module_offs = OMAP3430_PER_MOD,
2016 .idlest_reg_id = 1,
2017 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
2018 },
2019 },
2020 .slaves = omap3xxx_gpio5_slaves,
2021 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
2022 .class = &omap3xxx_gpio_hwmod_class,
2023 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002024};
2025
2026/* gpio6 */
2027static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
2028 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002029 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002030};
2031
2032static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2033 { .role = "dbclk", .clk = "gpio6_dbck", },
2034};
2035
2036static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
2037 &omap3xxx_l4_per__gpio6,
2038};
2039
2040static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2041 .name = "gpio6",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302042 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002043 .mpu_irqs = omap3xxx_gpio6_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002044 .main_clk = "gpio6_ick",
2045 .opt_clks = gpio6_opt_clks,
2046 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2047 .prcm = {
2048 .omap2 = {
2049 .prcm_reg_id = 1,
2050 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
2051 .module_offs = OMAP3430_PER_MOD,
2052 .idlest_reg_id = 1,
2053 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
2054 },
2055 },
2056 .slaves = omap3xxx_gpio6_slaves,
2057 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
2058 .class = &omap3xxx_gpio_hwmod_class,
2059 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002060};
2061
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002062/* dma_system -> L3 */
2063static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2064 .master = &omap3xxx_dma_system_hwmod,
2065 .slave = &omap3xxx_l3_main_hwmod,
2066 .clk = "core_l3_ick",
2067 .user = OCP_USER_MPU | OCP_USER_SDMA,
2068};
2069
2070/* dma attributes */
2071static struct omap_dma_dev_attr dma_dev_attr = {
2072 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
2073 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
2074 .lch_count = 32,
2075};
2076
2077static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
2078 .rev_offs = 0x0000,
2079 .sysc_offs = 0x002c,
2080 .syss_offs = 0x0028,
2081 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2082 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07002083 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
2084 SYSS_HAS_RESET_STATUS),
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002085 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2086 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2087 .sysc_fields = &omap_hwmod_sysc_type1,
2088};
2089
2090static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2091 .name = "dma",
2092 .sysc = &omap3xxx_dma_sysc,
2093};
2094
2095/* dma_system */
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002096static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2097 {
2098 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002099 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002100 .flags = ADDR_TYPE_RT
2101 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002102 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002103};
2104
2105/* dma_system master ports */
2106static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
2107 &omap3xxx_dma_system__l3,
2108};
2109
2110/* l4_cfg -> dma_system */
2111static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2112 .master = &omap3xxx_l4_core_hwmod,
2113 .slave = &omap3xxx_dma_system_hwmod,
2114 .clk = "core_l4_ick",
2115 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002116 .user = OCP_USER_MPU | OCP_USER_SDMA,
2117};
2118
2119/* dma_system slave ports */
2120static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2121 &omap3xxx_l4_core__dma_system,
2122};
2123
2124static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2125 .name = "dma",
2126 .class = &omap3xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06002127 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002128 .main_clk = "core_l3_ick",
2129 .prcm = {
2130 .omap2 = {
2131 .module_offs = CORE_MOD,
2132 .prcm_reg_id = 1,
2133 .module_bit = OMAP3430_ST_SDMA_SHIFT,
2134 .idlest_reg_id = 1,
2135 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
2136 },
2137 },
2138 .slaves = omap3xxx_dma_system_slaves,
2139 .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
2140 .masters = omap3xxx_dma_system_masters,
2141 .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
2142 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002143 .flags = HWMOD_NO_IDLEST,
2144};
2145
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302146/*
2147 * 'mcbsp' class
2148 * multi channel buffered serial port controller
2149 */
2150
2151static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
2152 .sysc_offs = 0x008c,
2153 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2154 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2155 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2156 .sysc_fields = &omap_hwmod_sysc_type1,
2157 .clockact = 0x2,
2158};
2159
2160static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
2161 .name = "mcbsp",
2162 .sysc = &omap3xxx_mcbsp_sysc,
2163 .rev = MCBSP_CONFIG_TYPE3,
2164};
2165
2166/* mcbsp1 */
2167static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2168 { .name = "irq", .irq = 16 },
2169 { .name = "tx", .irq = 59 },
2170 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002171 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302172};
2173
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302174static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2175 {
2176 .name = "mpu",
2177 .pa_start = 0x48074000,
2178 .pa_end = 0x480740ff,
2179 .flags = ADDR_TYPE_RT
2180 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002181 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302182};
2183
2184/* l4_core -> mcbsp1 */
2185static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2186 .master = &omap3xxx_l4_core_hwmod,
2187 .slave = &omap3xxx_mcbsp1_hwmod,
2188 .clk = "mcbsp1_ick",
2189 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302190 .user = OCP_USER_MPU | OCP_USER_SDMA,
2191};
2192
2193/* mcbsp1 slave ports */
2194static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
2195 &omap3xxx_l4_core__mcbsp1,
2196};
2197
2198static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2199 .name = "mcbsp1",
2200 .class = &omap3xxx_mcbsp_hwmod_class,
2201 .mpu_irqs = omap3xxx_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002202 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302203 .main_clk = "mcbsp1_fck",
2204 .prcm = {
2205 .omap2 = {
2206 .prcm_reg_id = 1,
2207 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
2208 .module_offs = CORE_MOD,
2209 .idlest_reg_id = 1,
2210 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2211 },
2212 },
2213 .slaves = omap3xxx_mcbsp1_slaves,
2214 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302215};
2216
2217/* mcbsp2 */
2218static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2219 { .name = "irq", .irq = 17 },
2220 { .name = "tx", .irq = 62 },
2221 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002222 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302223};
2224
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302225static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2226 {
2227 .name = "mpu",
2228 .pa_start = 0x49022000,
2229 .pa_end = 0x490220ff,
2230 .flags = ADDR_TYPE_RT
2231 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002232 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302233};
2234
2235/* l4_per -> mcbsp2 */
2236static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2237 .master = &omap3xxx_l4_per_hwmod,
2238 .slave = &omap3xxx_mcbsp2_hwmod,
2239 .clk = "mcbsp2_ick",
2240 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302241 .user = OCP_USER_MPU | OCP_USER_SDMA,
2242};
2243
2244/* mcbsp2 slave ports */
2245static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
2246 &omap3xxx_l4_per__mcbsp2,
2247};
2248
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302249static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2250 .sidetone = "mcbsp2_sidetone",
2251};
2252
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302253static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2254 .name = "mcbsp2",
2255 .class = &omap3xxx_mcbsp_hwmod_class,
2256 .mpu_irqs = omap3xxx_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002257 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302258 .main_clk = "mcbsp2_fck",
2259 .prcm = {
2260 .omap2 = {
2261 .prcm_reg_id = 1,
2262 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2263 .module_offs = OMAP3430_PER_MOD,
2264 .idlest_reg_id = 1,
2265 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2266 },
2267 },
2268 .slaves = omap3xxx_mcbsp2_slaves,
2269 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302270 .dev_attr = &omap34xx_mcbsp2_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302271};
2272
2273/* mcbsp3 */
2274static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2275 { .name = "irq", .irq = 22 },
2276 { .name = "tx", .irq = 89 },
2277 { .name = "rx", .irq = 90 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002278 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302279};
2280
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302281static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2282 {
2283 .name = "mpu",
2284 .pa_start = 0x49024000,
2285 .pa_end = 0x490240ff,
2286 .flags = ADDR_TYPE_RT
2287 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002288 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302289};
2290
2291/* l4_per -> mcbsp3 */
2292static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2293 .master = &omap3xxx_l4_per_hwmod,
2294 .slave = &omap3xxx_mcbsp3_hwmod,
2295 .clk = "mcbsp3_ick",
2296 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302297 .user = OCP_USER_MPU | OCP_USER_SDMA,
2298};
2299
2300/* mcbsp3 slave ports */
2301static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
2302 &omap3xxx_l4_per__mcbsp3,
2303};
2304
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302305static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
2306 .sidetone = "mcbsp3_sidetone",
2307};
2308
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302309static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2310 .name = "mcbsp3",
2311 .class = &omap3xxx_mcbsp_hwmod_class,
2312 .mpu_irqs = omap3xxx_mcbsp3_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002313 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
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 },
2324 .slaves = omap3xxx_mcbsp3_slaves,
2325 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302326 .dev_attr = &omap34xx_mcbsp3_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302327};
2328
2329/* mcbsp4 */
2330static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
2331 { .name = "irq", .irq = 23 },
2332 { .name = "tx", .irq = 54 },
2333 { .name = "rx", .irq = 55 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002334 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302335};
2336
2337static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2338 { .name = "rx", .dma_req = 20 },
2339 { .name = "tx", .dma_req = 19 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002340 { .dma_req = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302341};
2342
2343static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2344 {
2345 .name = "mpu",
2346 .pa_start = 0x49026000,
2347 .pa_end = 0x490260ff,
2348 .flags = ADDR_TYPE_RT
2349 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002350 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302351};
2352
2353/* l4_per -> mcbsp4 */
2354static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2355 .master = &omap3xxx_l4_per_hwmod,
2356 .slave = &omap3xxx_mcbsp4_hwmod,
2357 .clk = "mcbsp4_ick",
2358 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302359 .user = OCP_USER_MPU | OCP_USER_SDMA,
2360};
2361
2362/* mcbsp4 slave ports */
2363static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
2364 &omap3xxx_l4_per__mcbsp4,
2365};
2366
2367static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2368 .name = "mcbsp4",
2369 .class = &omap3xxx_mcbsp_hwmod_class,
2370 .mpu_irqs = omap3xxx_mcbsp4_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302371 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302372 .main_clk = "mcbsp4_fck",
2373 .prcm = {
2374 .omap2 = {
2375 .prcm_reg_id = 1,
2376 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
2377 .module_offs = OMAP3430_PER_MOD,
2378 .idlest_reg_id = 1,
2379 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2380 },
2381 },
2382 .slaves = omap3xxx_mcbsp4_slaves,
2383 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302384};
2385
2386/* mcbsp5 */
2387static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
2388 { .name = "irq", .irq = 27 },
2389 { .name = "tx", .irq = 81 },
2390 { .name = "rx", .irq = 82 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002391 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302392};
2393
2394static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2395 { .name = "rx", .dma_req = 22 },
2396 { .name = "tx", .dma_req = 21 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002397 { .dma_req = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302398};
2399
2400static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2401 {
2402 .name = "mpu",
2403 .pa_start = 0x48096000,
2404 .pa_end = 0x480960ff,
2405 .flags = ADDR_TYPE_RT
2406 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002407 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302408};
2409
2410/* l4_core -> mcbsp5 */
2411static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2412 .master = &omap3xxx_l4_core_hwmod,
2413 .slave = &omap3xxx_mcbsp5_hwmod,
2414 .clk = "mcbsp5_ick",
2415 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302416 .user = OCP_USER_MPU | OCP_USER_SDMA,
2417};
2418
2419/* mcbsp5 slave ports */
2420static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
2421 &omap3xxx_l4_core__mcbsp5,
2422};
2423
2424static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2425 .name = "mcbsp5",
2426 .class = &omap3xxx_mcbsp_hwmod_class,
2427 .mpu_irqs = omap3xxx_mcbsp5_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302428 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302429 .main_clk = "mcbsp5_fck",
2430 .prcm = {
2431 .omap2 = {
2432 .prcm_reg_id = 1,
2433 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
2434 .module_offs = CORE_MOD,
2435 .idlest_reg_id = 1,
2436 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2437 },
2438 },
2439 .slaves = omap3xxx_mcbsp5_slaves,
2440 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302441};
2442/* 'mcbsp sidetone' class */
2443
2444static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2445 .sysc_offs = 0x0010,
2446 .sysc_flags = SYSC_HAS_AUTOIDLE,
2447 .sysc_fields = &omap_hwmod_sysc_type1,
2448};
2449
2450static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
2451 .name = "mcbsp_sidetone",
2452 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
2453};
2454
2455/* mcbsp2_sidetone */
2456static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2457 { .name = "irq", .irq = 4 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002458 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302459};
2460
2461static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2462 {
2463 .name = "sidetone",
2464 .pa_start = 0x49028000,
2465 .pa_end = 0x490280ff,
2466 .flags = ADDR_TYPE_RT
2467 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002468 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302469};
2470
2471/* l4_per -> mcbsp2_sidetone */
2472static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2473 .master = &omap3xxx_l4_per_hwmod,
2474 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2475 .clk = "mcbsp2_ick",
2476 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302477 .user = OCP_USER_MPU,
2478};
2479
2480/* mcbsp2_sidetone slave ports */
2481static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
2482 &omap3xxx_l4_per__mcbsp2_sidetone,
2483};
2484
2485static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2486 .name = "mcbsp2_sidetone",
2487 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2488 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302489 .main_clk = "mcbsp2_fck",
2490 .prcm = {
2491 .omap2 = {
2492 .prcm_reg_id = 1,
2493 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2494 .module_offs = OMAP3430_PER_MOD,
2495 .idlest_reg_id = 1,
2496 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2497 },
2498 },
2499 .slaves = omap3xxx_mcbsp2_sidetone_slaves,
2500 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302501};
2502
2503/* mcbsp3_sidetone */
2504static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2505 { .name = "irq", .irq = 5 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002506 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302507};
2508
2509static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2510 {
2511 .name = "sidetone",
2512 .pa_start = 0x4902A000,
2513 .pa_end = 0x4902A0ff,
2514 .flags = ADDR_TYPE_RT
2515 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002516 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302517};
2518
2519/* l4_per -> mcbsp3_sidetone */
2520static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2521 .master = &omap3xxx_l4_per_hwmod,
2522 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2523 .clk = "mcbsp3_ick",
2524 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302525 .user = OCP_USER_MPU,
2526};
2527
2528/* mcbsp3_sidetone slave ports */
2529static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
2530 &omap3xxx_l4_per__mcbsp3_sidetone,
2531};
2532
2533static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2534 .name = "mcbsp3_sidetone",
2535 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2536 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302537 .main_clk = "mcbsp3_fck",
2538 .prcm = {
2539 .omap2 = {
2540 .prcm_reg_id = 1,
2541 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2542 .module_offs = OMAP3430_PER_MOD,
2543 .idlest_reg_id = 1,
2544 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2545 },
2546 },
2547 .slaves = omap3xxx_mcbsp3_sidetone_slaves,
2548 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302549};
2550
2551
Thara Gopinathd3442722010-05-29 22:02:24 +05302552/* SR common */
2553static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2554 .clkact_shift = 20,
2555};
2556
2557static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
2558 .sysc_offs = 0x24,
2559 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
2560 .clockact = CLOCKACT_TEST_ICLK,
2561 .sysc_fields = &omap34xx_sr_sysc_fields,
2562};
2563
2564static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2565 .name = "smartreflex",
2566 .sysc = &omap34xx_sr_sysc,
2567 .rev = 1,
2568};
2569
2570static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2571 .sidle_shift = 24,
2572 .enwkup_shift = 26
2573};
2574
2575static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
2576 .sysc_offs = 0x38,
2577 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2578 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
2579 SYSC_NO_CACHE),
2580 .sysc_fields = &omap36xx_sr_sysc_fields,
2581};
2582
2583static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
2584 .name = "smartreflex",
2585 .sysc = &omap36xx_sr_sysc,
2586 .rev = 2,
2587};
2588
2589/* SR1 */
2590static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
2591 &omap3_l4_core__sr1,
2592};
2593
2594static struct omap_hwmod omap34xx_sr1_hwmod = {
2595 .name = "sr1_hwmod",
2596 .class = &omap34xx_smartreflex_hwmod_class,
2597 .main_clk = "sr1_fck",
Kevin Hilman280a7272011-03-23 11:18:08 -07002598 .vdd_name = "mpu_iva",
Thara Gopinathd3442722010-05-29 22:02:24 +05302599 .prcm = {
2600 .omap2 = {
2601 .prcm_reg_id = 1,
2602 .module_bit = OMAP3430_EN_SR1_SHIFT,
2603 .module_offs = WKUP_MOD,
2604 .idlest_reg_id = 1,
2605 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2606 },
2607 },
2608 .slaves = omap3_sr1_slaves,
2609 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
Thara Gopinathd3442722010-05-29 22:02:24 +05302610 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2611};
2612
2613static struct omap_hwmod omap36xx_sr1_hwmod = {
2614 .name = "sr1_hwmod",
2615 .class = &omap36xx_smartreflex_hwmod_class,
2616 .main_clk = "sr1_fck",
Kevin Hilman280a7272011-03-23 11:18:08 -07002617 .vdd_name = "mpu_iva",
Thara Gopinathd3442722010-05-29 22:02:24 +05302618 .prcm = {
2619 .omap2 = {
2620 .prcm_reg_id = 1,
2621 .module_bit = OMAP3430_EN_SR1_SHIFT,
2622 .module_offs = WKUP_MOD,
2623 .idlest_reg_id = 1,
2624 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2625 },
2626 },
2627 .slaves = omap3_sr1_slaves,
2628 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
Thara Gopinathd3442722010-05-29 22:02:24 +05302629};
2630
2631/* SR2 */
2632static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
2633 &omap3_l4_core__sr2,
2634};
2635
2636static struct omap_hwmod omap34xx_sr2_hwmod = {
2637 .name = "sr2_hwmod",
2638 .class = &omap34xx_smartreflex_hwmod_class,
2639 .main_clk = "sr2_fck",
2640 .vdd_name = "core",
2641 .prcm = {
2642 .omap2 = {
2643 .prcm_reg_id = 1,
2644 .module_bit = OMAP3430_EN_SR2_SHIFT,
2645 .module_offs = WKUP_MOD,
2646 .idlest_reg_id = 1,
2647 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2648 },
2649 },
2650 .slaves = omap3_sr2_slaves,
2651 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
Thara Gopinathd3442722010-05-29 22:02:24 +05302652 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2653};
2654
2655static struct omap_hwmod omap36xx_sr2_hwmod = {
2656 .name = "sr2_hwmod",
2657 .class = &omap36xx_smartreflex_hwmod_class,
2658 .main_clk = "sr2_fck",
2659 .vdd_name = "core",
2660 .prcm = {
2661 .omap2 = {
2662 .prcm_reg_id = 1,
2663 .module_bit = OMAP3430_EN_SR2_SHIFT,
2664 .module_offs = WKUP_MOD,
2665 .idlest_reg_id = 1,
2666 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2667 },
2668 },
2669 .slaves = omap3_sr2_slaves,
2670 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
Thara Gopinathd3442722010-05-29 22:02:24 +05302671};
2672
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002673/*
2674 * 'mailbox' class
2675 * mailbox module allowing communication between the on-chip processors
2676 * using a queued mailbox-interrupt mechanism.
2677 */
2678
2679static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
2680 .rev_offs = 0x000,
2681 .sysc_offs = 0x010,
2682 .syss_offs = 0x014,
2683 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2684 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2685 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2686 .sysc_fields = &omap_hwmod_sysc_type1,
2687};
2688
2689static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
2690 .name = "mailbox",
2691 .sysc = &omap3xxx_mailbox_sysc,
2692};
2693
2694static struct omap_hwmod omap3xxx_mailbox_hwmod;
2695static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
2696 { .irq = 26 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002697 { .irq = -1 }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002698};
2699
2700static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2701 {
2702 .pa_start = 0x48094000,
2703 .pa_end = 0x480941ff,
2704 .flags = ADDR_TYPE_RT,
2705 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002706 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002707};
2708
2709/* l4_core -> mailbox */
2710static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2711 .master = &omap3xxx_l4_core_hwmod,
2712 .slave = &omap3xxx_mailbox_hwmod,
2713 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002714 .user = OCP_USER_MPU | OCP_USER_SDMA,
2715};
2716
2717/* mailbox slave ports */
2718static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
2719 &omap3xxx_l4_core__mailbox,
2720};
2721
2722static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2723 .name = "mailbox",
2724 .class = &omap3xxx_mailbox_hwmod_class,
2725 .mpu_irqs = omap3xxx_mailbox_irqs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002726 .main_clk = "mailboxes_ick",
2727 .prcm = {
2728 .omap2 = {
2729 .prcm_reg_id = 1,
2730 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
2731 .module_offs = CORE_MOD,
2732 .idlest_reg_id = 1,
2733 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
2734 },
2735 },
2736 .slaves = omap3xxx_mailbox_slaves,
2737 .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002738};
2739
Charulatha V0f616a42011-02-17 09:53:10 -08002740/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002741static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2742 .master = &omap3xxx_l4_core_hwmod,
2743 .slave = &omap34xx_mcspi1,
2744 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002745 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002746 .user = OCP_USER_MPU | OCP_USER_SDMA,
2747};
2748
2749/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002750static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2751 .master = &omap3xxx_l4_core_hwmod,
2752 .slave = &omap34xx_mcspi2,
2753 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002754 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002755 .user = OCP_USER_MPU | OCP_USER_SDMA,
2756};
2757
2758/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002759static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2760 .master = &omap3xxx_l4_core_hwmod,
2761 .slave = &omap34xx_mcspi3,
2762 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002763 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002764 .user = OCP_USER_MPU | OCP_USER_SDMA,
2765};
2766
2767/* l4 core -> mcspi4 interface */
2768static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
2769 {
2770 .pa_start = 0x480ba000,
2771 .pa_end = 0x480ba0ff,
2772 .flags = ADDR_TYPE_RT,
2773 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002774 { }
Charulatha V0f616a42011-02-17 09:53:10 -08002775};
2776
2777static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2778 .master = &omap3xxx_l4_core_hwmod,
2779 .slave = &omap34xx_mcspi4,
2780 .clk = "mcspi4_ick",
2781 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002782 .user = OCP_USER_MPU | OCP_USER_SDMA,
2783};
2784
2785/*
2786 * 'mcspi' class
2787 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2788 * bus
2789 */
2790
2791static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
2792 .rev_offs = 0x0000,
2793 .sysc_offs = 0x0010,
2794 .syss_offs = 0x0014,
2795 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2796 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2797 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2798 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2799 .sysc_fields = &omap_hwmod_sysc_type1,
2800};
2801
2802static struct omap_hwmod_class omap34xx_mcspi_class = {
2803 .name = "mcspi",
2804 .sysc = &omap34xx_mcspi_sysc,
2805 .rev = OMAP3_MCSPI_REV,
2806};
2807
2808/* mcspi1 */
Charulatha V0f616a42011-02-17 09:53:10 -08002809static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
2810 &omap34xx_l4_core__mcspi1,
2811};
2812
2813static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2814 .num_chipselect = 4,
2815};
2816
2817static struct omap_hwmod omap34xx_mcspi1 = {
2818 .name = "mcspi1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06002819 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002820 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002821 .main_clk = "mcspi1_fck",
2822 .prcm = {
2823 .omap2 = {
2824 .module_offs = CORE_MOD,
2825 .prcm_reg_id = 1,
2826 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
2827 .idlest_reg_id = 1,
2828 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
2829 },
2830 },
2831 .slaves = omap34xx_mcspi1_slaves,
2832 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
2833 .class = &omap34xx_mcspi_class,
2834 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002835};
2836
2837/* mcspi2 */
Charulatha V0f616a42011-02-17 09:53:10 -08002838static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
2839 &omap34xx_l4_core__mcspi2,
2840};
2841
2842static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2843 .num_chipselect = 2,
2844};
2845
2846static struct omap_hwmod omap34xx_mcspi2 = {
2847 .name = "mcspi2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06002848 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06002849 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002850 .main_clk = "mcspi2_fck",
2851 .prcm = {
2852 .omap2 = {
2853 .module_offs = CORE_MOD,
2854 .prcm_reg_id = 1,
2855 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
2856 .idlest_reg_id = 1,
2857 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
2858 },
2859 },
2860 .slaves = omap34xx_mcspi2_slaves,
2861 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
2862 .class = &omap34xx_mcspi_class,
2863 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002864};
2865
2866/* mcspi3 */
2867static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
2868 { .name = "irq", .irq = 91 }, /* 91 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002869 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002870};
2871
2872static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
2873 { .name = "tx0", .dma_req = 15 },
2874 { .name = "rx0", .dma_req = 16 },
2875 { .name = "tx1", .dma_req = 23 },
2876 { .name = "rx1", .dma_req = 24 },
Paul Walmsleybc614952011-07-09 19:14:07 -06002877 { .dma_req = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002878};
2879
2880static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
2881 &omap34xx_l4_core__mcspi3,
2882};
2883
2884static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2885 .num_chipselect = 2,
2886};
2887
2888static struct omap_hwmod omap34xx_mcspi3 = {
2889 .name = "mcspi3",
2890 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002891 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002892 .main_clk = "mcspi3_fck",
2893 .prcm = {
2894 .omap2 = {
2895 .module_offs = CORE_MOD,
2896 .prcm_reg_id = 1,
2897 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
2898 .idlest_reg_id = 1,
2899 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
2900 },
2901 },
2902 .slaves = omap34xx_mcspi3_slaves,
2903 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
2904 .class = &omap34xx_mcspi_class,
2905 .dev_attr = &omap_mcspi3_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002906};
2907
2908/* SPI4 */
2909static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
2910 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002911 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002912};
2913
2914static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
2915 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
2916 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
Paul Walmsleybc614952011-07-09 19:14:07 -06002917 { .dma_req = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08002918};
2919
2920static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
2921 &omap34xx_l4_core__mcspi4,
2922};
2923
2924static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
2925 .num_chipselect = 1,
2926};
2927
2928static struct omap_hwmod omap34xx_mcspi4 = {
2929 .name = "mcspi4",
2930 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002931 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
Charulatha V0f616a42011-02-17 09:53:10 -08002932 .main_clk = "mcspi4_fck",
2933 .prcm = {
2934 .omap2 = {
2935 .module_offs = CORE_MOD,
2936 .prcm_reg_id = 1,
2937 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
2938 .idlest_reg_id = 1,
2939 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
2940 },
2941 },
2942 .slaves = omap34xx_mcspi4_slaves,
2943 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
2944 .class = &omap34xx_mcspi_class,
2945 .dev_attr = &omap_mcspi4_dev_attr,
Charulatha V0f616a42011-02-17 09:53:10 -08002946};
2947
Hema HK870ea2b2011-02-17 12:07:18 +05302948/*
2949 * usbhsotg
2950 */
2951static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
2952 .rev_offs = 0x0400,
2953 .sysc_offs = 0x0404,
2954 .syss_offs = 0x0408,
2955 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
2956 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2957 SYSC_HAS_AUTOIDLE),
2958 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2959 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2960 .sysc_fields = &omap_hwmod_sysc_type1,
2961};
2962
2963static struct omap_hwmod_class usbotg_class = {
2964 .name = "usbotg",
2965 .sysc = &omap3xxx_usbhsotg_sysc,
2966};
Hema HK870ea2b2011-02-17 12:07:18 +05302967/* usb_otg_hs */
2968static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
2969
2970 { .name = "mc", .irq = 92 },
2971 { .name = "dma", .irq = 93 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002972 { .irq = -1 }
Hema HK870ea2b2011-02-17 12:07:18 +05302973};
2974
2975static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
2976 .name = "usb_otg_hs",
2977 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
Hema HK870ea2b2011-02-17 12:07:18 +05302978 .main_clk = "hsotgusb_ick",
2979 .prcm = {
2980 .omap2 = {
2981 .prcm_reg_id = 1,
2982 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
2983 .module_offs = CORE_MOD,
2984 .idlest_reg_id = 1,
2985 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
2986 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
2987 },
2988 },
2989 .masters = omap3xxx_usbhsotg_masters,
2990 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
2991 .slaves = omap3xxx_usbhsotg_slaves,
2992 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
2993 .class = &usbotg_class,
2994
2995 /*
2996 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
2997 * broken when autoidle is enabled
2998 * workaround is to disable the autoidle bit at module level.
2999 */
3000 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
3001 | HWMOD_SWSUP_MSTANDBY,
Hema HK870ea2b2011-02-17 12:07:18 +05303002};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003003
Hema HK273ff8c2011-02-17 12:07:19 +05303004/* usb_otg_hs */
3005static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
3006
3007 { .name = "mc", .irq = 71 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003008 { .irq = -1 }
Hema HK273ff8c2011-02-17 12:07:19 +05303009};
3010
3011static struct omap_hwmod_class am35xx_usbotg_class = {
3012 .name = "am35xx_usbotg",
3013 .sysc = NULL,
3014};
3015
3016static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3017 .name = "am35x_otg_hs",
3018 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Hema HK273ff8c2011-02-17 12:07:19 +05303019 .main_clk = NULL,
3020 .prcm = {
3021 .omap2 = {
3022 },
3023 },
3024 .masters = am35xx_usbhsotg_masters,
3025 .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
3026 .slaves = am35xx_usbhsotg_slaves,
3027 .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
3028 .class = &am35xx_usbotg_class,
Hema HK273ff8c2011-02-17 12:07:19 +05303029};
Hema HK870ea2b2011-02-17 12:07:18 +05303030
Paul Walmsleyb1636052011-03-01 13:12:56 -08003031/* MMC/SD/SDIO common */
3032
3033static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
3034 .rev_offs = 0x1fc,
3035 .sysc_offs = 0x10,
3036 .syss_offs = 0x14,
3037 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3038 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3039 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
3040 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3041 .sysc_fields = &omap_hwmod_sysc_type1,
3042};
3043
3044static struct omap_hwmod_class omap34xx_mmc_class = {
3045 .name = "mmc",
3046 .sysc = &omap34xx_mmc_sysc,
3047};
3048
3049/* MMC/SD/SDIO1 */
3050
3051static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
3052 { .irq = 83, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003053 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003054};
3055
3056static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
3057 { .name = "tx", .dma_req = 61, },
3058 { .name = "rx", .dma_req = 62, },
Paul Walmsleybc614952011-07-09 19:14:07 -06003059 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003060};
3061
3062static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
3063 { .role = "dbck", .clk = "omap_32k_fck", },
3064};
3065
3066static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
3067 &omap3xxx_l4_core__mmc1,
3068};
3069
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003070static struct omap_mmc_dev_attr mmc1_dev_attr = {
3071 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3072};
3073
Paul Walmsleyb1636052011-03-01 13:12:56 -08003074static struct omap_hwmod omap3xxx_mmc1_hwmod = {
3075 .name = "mmc1",
3076 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003077 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003078 .opt_clks = omap34xx_mmc1_opt_clks,
3079 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
3080 .main_clk = "mmchs1_fck",
3081 .prcm = {
3082 .omap2 = {
3083 .module_offs = CORE_MOD,
3084 .prcm_reg_id = 1,
3085 .module_bit = OMAP3430_EN_MMC1_SHIFT,
3086 .idlest_reg_id = 1,
3087 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
3088 },
3089 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003090 .dev_attr = &mmc1_dev_attr,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003091 .slaves = omap3xxx_mmc1_slaves,
3092 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3093 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003094};
3095
3096/* MMC/SD/SDIO2 */
3097
3098static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
3099 { .irq = INT_24XX_MMC2_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003100 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003101};
3102
3103static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
3104 { .name = "tx", .dma_req = 47, },
3105 { .name = "rx", .dma_req = 48, },
Paul Walmsleybc614952011-07-09 19:14:07 -06003106 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003107};
3108
3109static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
3110 { .role = "dbck", .clk = "omap_32k_fck", },
3111};
3112
3113static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3114 &omap3xxx_l4_core__mmc2,
3115};
3116
3117static struct omap_hwmod omap3xxx_mmc2_hwmod = {
3118 .name = "mmc2",
3119 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003120 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003121 .opt_clks = omap34xx_mmc2_opt_clks,
3122 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
3123 .main_clk = "mmchs2_fck",
3124 .prcm = {
3125 .omap2 = {
3126 .module_offs = CORE_MOD,
3127 .prcm_reg_id = 1,
3128 .module_bit = OMAP3430_EN_MMC2_SHIFT,
3129 .idlest_reg_id = 1,
3130 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3131 },
3132 },
3133 .slaves = omap3xxx_mmc2_slaves,
3134 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3135 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003136};
3137
3138/* MMC/SD/SDIO3 */
3139
3140static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
3141 { .irq = 94, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003142 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003143};
3144
3145static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
3146 { .name = "tx", .dma_req = 77, },
3147 { .name = "rx", .dma_req = 78, },
Paul Walmsleybc614952011-07-09 19:14:07 -06003148 { .dma_req = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003149};
3150
3151static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
3152 { .role = "dbck", .clk = "omap_32k_fck", },
3153};
3154
3155static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3156 &omap3xxx_l4_core__mmc3,
3157};
3158
3159static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3160 .name = "mmc3",
3161 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003162 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003163 .opt_clks = omap34xx_mmc3_opt_clks,
3164 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
3165 .main_clk = "mmchs3_fck",
3166 .prcm = {
3167 .omap2 = {
3168 .prcm_reg_id = 1,
3169 .module_bit = OMAP3430_EN_MMC3_SHIFT,
3170 .idlest_reg_id = 1,
3171 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
3172 },
3173 },
3174 .slaves = omap3xxx_mmc3_slaves,
3175 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
3176 .class = &omap34xx_mmc_class,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003177};
3178
Paul Walmsley73591542010-02-22 22:09:32 -07003179static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06003180 &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003181 &omap3xxx_l4_core_hwmod,
3182 &omap3xxx_l4_per_hwmod,
3183 &omap3xxx_l4_wkup_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003184 &omap3xxx_mmc1_hwmod,
3185 &omap3xxx_mmc2_hwmod,
3186 &omap3xxx_mmc3_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003187 &omap3xxx_mpu_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07003188
3189 &omap3xxx_timer1_hwmod,
3190 &omap3xxx_timer2_hwmod,
3191 &omap3xxx_timer3_hwmod,
3192 &omap3xxx_timer4_hwmod,
3193 &omap3xxx_timer5_hwmod,
3194 &omap3xxx_timer6_hwmod,
3195 &omap3xxx_timer7_hwmod,
3196 &omap3xxx_timer8_hwmod,
3197 &omap3xxx_timer9_hwmod,
3198 &omap3xxx_timer10_hwmod,
3199 &omap3xxx_timer11_hwmod,
3200 &omap3xxx_timer12_hwmod,
3201
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05303202 &omap3xxx_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05303203 &omap3xxx_uart1_hwmod,
3204 &omap3xxx_uart2_hwmod,
3205 &omap3xxx_uart3_hwmod,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00003206 /* dss class */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00003207 &omap3xxx_dss_dispc_hwmod,
3208 &omap3xxx_dss_dsi1_hwmod,
3209 &omap3xxx_dss_rfbi_hwmod,
3210 &omap3xxx_dss_venc_hwmod,
3211
3212 /* i2c class */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05303213 &omap3xxx_i2c1_hwmod,
3214 &omap3xxx_i2c2_hwmod,
3215 &omap3xxx_i2c3_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003216
3217 /* gpio class */
3218 &omap3xxx_gpio1_hwmod,
3219 &omap3xxx_gpio2_hwmod,
3220 &omap3xxx_gpio3_hwmod,
3221 &omap3xxx_gpio4_hwmod,
3222 &omap3xxx_gpio5_hwmod,
3223 &omap3xxx_gpio6_hwmod,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003224
3225 /* dma_system class*/
3226 &omap3xxx_dma_system_hwmod,
Charulatha V0f616a42011-02-17 09:53:10 -08003227
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303228 /* mcbsp class */
3229 &omap3xxx_mcbsp1_hwmod,
3230 &omap3xxx_mcbsp2_hwmod,
3231 &omap3xxx_mcbsp3_hwmod,
3232 &omap3xxx_mcbsp4_hwmod,
3233 &omap3xxx_mcbsp5_hwmod,
3234 &omap3xxx_mcbsp2_sidetone_hwmod,
3235 &omap3xxx_mcbsp3_sidetone_hwmod,
3236
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003237
Charulatha V0f616a42011-02-17 09:53:10 -08003238 /* mcspi class */
3239 &omap34xx_mcspi1,
3240 &omap34xx_mcspi2,
3241 &omap34xx_mcspi3,
3242 &omap34xx_mcspi4,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003243
Paul Walmsley73591542010-02-22 22:09:32 -07003244 NULL,
3245};
3246
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003247/* 3430ES1-only hwmods */
3248static __initdata struct omap_hwmod *omap3430es1_hwmods[] = {
Abhilash K V7e890982011-10-07 03:08:56 -06003249 &omap3xxx_iva_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003250 &omap3430es1_dss_core_hwmod,
Abhilash K V7e890982011-10-07 03:08:56 -06003251 &omap3xxx_mailbox_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003252 NULL
3253};
3254
3255/* 3430ES2+-only hwmods */
3256static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = {
Abhilash K V7e890982011-10-07 03:08:56 -06003257 &omap3xxx_iva_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003258 &omap3xxx_dss_core_hwmod,
3259 &omap3xxx_usbhsotg_hwmod,
Abhilash K V7e890982011-10-07 03:08:56 -06003260 &omap3xxx_mailbox_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003261 NULL
3262};
3263
3264/* 34xx-only hwmods (all ES revisions) */
3265static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
Abhilash K V7e890982011-10-07 03:08:56 -06003266 &omap3xxx_iva_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003267 &omap34xx_sr1_hwmod,
3268 &omap34xx_sr2_hwmod,
Abhilash K V7e890982011-10-07 03:08:56 -06003269 &omap3xxx_mailbox_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003270 NULL
3271};
3272
3273/* 36xx-only hwmods (all ES revisions) */
3274static __initdata struct omap_hwmod *omap36xx_hwmods[] = {
Abhilash K V7e890982011-10-07 03:08:56 -06003275 &omap3xxx_iva_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003276 &omap3xxx_uart4_hwmod,
3277 &omap3xxx_dss_core_hwmod,
3278 &omap36xx_sr1_hwmod,
3279 &omap36xx_sr2_hwmod,
3280 &omap3xxx_usbhsotg_hwmod,
Abhilash K V7e890982011-10-07 03:08:56 -06003281 &omap3xxx_mailbox_hwmod,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003282 NULL
3283};
3284
3285static __initdata struct omap_hwmod *am35xx_hwmods[] = {
3286 &omap3xxx_dss_core_hwmod, /* XXX ??? */
3287 &am35xx_usbhsotg_hwmod,
3288 NULL
3289};
3290
Paul Walmsley73591542010-02-22 22:09:32 -07003291int __init omap3xxx_hwmod_init(void)
3292{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003293 int r;
3294 struct omap_hwmod **h = NULL;
3295 unsigned int rev;
3296
3297 /* Register hwmods common to all OMAP3 */
3298 r = omap_hwmod_register(omap3xxx_hwmods);
Paul Walmsleyace90212011-10-06 14:39:28 -06003299 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003300 return r;
3301
3302 rev = omap_rev();
3303
3304 /*
3305 * Register hwmods common to individual OMAP3 families, all
3306 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3307 * All possible revisions should be included in this conditional.
3308 */
3309 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3310 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3311 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
3312 h = omap34xx_hwmods;
3313 } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) {
3314 h = am35xx_hwmods;
3315 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3316 rev == OMAP3630_REV_ES1_2) {
3317 h = omap36xx_hwmods;
3318 } else {
3319 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3320 return -EINVAL;
3321 };
3322
3323 r = omap_hwmod_register(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003324 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003325 return r;
3326
3327 /*
3328 * Register hwmods specific to certain ES levels of a
3329 * particular family of silicon (e.g., 34xx ES1.0)
3330 */
3331 h = NULL;
3332 if (rev == OMAP3430_REV_ES1_0) {
3333 h = omap3430es1_hwmods;
3334 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3335 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3336 rev == OMAP3430_REV_ES3_1_2) {
3337 h = omap3430es2plus_hwmods;
3338 };
3339
3340 if (h)
3341 r = omap_hwmod_register(h);
3342
3343 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003344}