blob: cc178b573fe265112a03fd408b0836f7a7c479ad [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,
sricharan4bb194d2011-02-08 22:13:37 +0530154 .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 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
160 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700161};
162
163static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530164static struct omap_hwmod omap3xxx_uart1_hwmod;
165static struct omap_hwmod omap3xxx_uart2_hwmod;
166static struct omap_hwmod omap3xxx_uart3_hwmod;
167static struct omap_hwmod omap3xxx_uart4_hwmod;
Hema HK870ea2b2011-02-17 12:07:18 +0530168static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
Paul Walmsley73591542010-02-22 22:09:32 -0700169
Hema HK870ea2b2011-02-17 12:07:18 +0530170/* l3_core -> usbhsotg interface */
171static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
172 .master = &omap3xxx_usbhsotg_hwmod,
173 .slave = &omap3xxx_l3_main_hwmod,
174 .clk = "core_l3_ick",
175 .user = OCP_USER_MPU,
176};
Paul Walmsley73591542010-02-22 22:09:32 -0700177
Hema HK273ff8c2011-02-17 12:07:19 +0530178/* l3_core -> am35xx_usbhsotg interface */
179static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
180 .master = &am35xx_usbhsotg_hwmod,
181 .slave = &omap3xxx_l3_main_hwmod,
182 .clk = "core_l3_ick",
183 .user = OCP_USER_MPU,
184};
Paul Walmsley73591542010-02-22 22:09:32 -0700185/* L4_CORE -> L4_WKUP interface */
186static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
187 .master = &omap3xxx_l4_core_hwmod,
188 .slave = &omap3xxx_l4_wkup_hwmod,
189 .user = OCP_USER_MPU | OCP_USER_SDMA,
190};
191
Paul Walmsleyb1636052011-03-01 13:12:56 -0800192/* L4 CORE -> MMC1 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -0800193static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
194 .master = &omap3xxx_l4_core_hwmod,
195 .slave = &omap3xxx_mmc1_hwmod,
196 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600197 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800198 .user = OCP_USER_MPU | OCP_USER_SDMA,
199 .flags = OMAP_FIREWALL_L4
200};
201
202/* L4 CORE -> MMC2 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -0800203static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
204 .master = &omap3xxx_l4_core_hwmod,
205 .slave = &omap3xxx_mmc2_hwmod,
206 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600207 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800208 .user = OCP_USER_MPU | OCP_USER_SDMA,
209 .flags = OMAP_FIREWALL_L4
210};
211
212/* L4 CORE -> MMC3 interface */
213static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
214 {
215 .pa_start = 0x480ad000,
216 .pa_end = 0x480ad1ff,
217 .flags = ADDR_TYPE_RT,
218 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600219 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -0800220};
221
222static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
223 .master = &omap3xxx_l4_core_hwmod,
224 .slave = &omap3xxx_mmc3_hwmod,
225 .clk = "mmchs3_ick",
226 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -0800227 .user = OCP_USER_MPU | OCP_USER_SDMA,
228 .flags = OMAP_FIREWALL_L4
229};
230
Kevin Hilman046465b2010-09-27 20:19:30 +0530231/* L4 CORE -> UART1 interface */
232static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
233 {
234 .pa_start = OMAP3_UART1_BASE,
235 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
236 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
237 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600238 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530239};
240
241static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
242 .master = &omap3xxx_l4_core_hwmod,
243 .slave = &omap3xxx_uart1_hwmod,
244 .clk = "uart1_ick",
245 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530246 .user = OCP_USER_MPU | OCP_USER_SDMA,
247};
248
249/* L4 CORE -> UART2 interface */
250static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
251 {
252 .pa_start = OMAP3_UART2_BASE,
253 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
254 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
255 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600256 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530257};
258
259static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
260 .master = &omap3xxx_l4_core_hwmod,
261 .slave = &omap3xxx_uart2_hwmod,
262 .clk = "uart2_ick",
263 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530264 .user = OCP_USER_MPU | OCP_USER_SDMA,
265};
266
267/* L4 PER -> UART3 interface */
268static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
269 {
270 .pa_start = OMAP3_UART3_BASE,
271 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
272 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
273 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600274 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530275};
276
277static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
278 .master = &omap3xxx_l4_per_hwmod,
279 .slave = &omap3xxx_uart3_hwmod,
280 .clk = "uart3_ick",
281 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530282 .user = OCP_USER_MPU | OCP_USER_SDMA,
283};
284
285/* L4 PER -> UART4 interface */
286static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
287 {
288 .pa_start = OMAP3_UART4_BASE,
289 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
290 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
291 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600292 { }
Kevin Hilman046465b2010-09-27 20:19:30 +0530293};
294
295static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
296 .master = &omap3xxx_l4_per_hwmod,
297 .slave = &omap3xxx_uart4_hwmod,
298 .clk = "uart4_ick",
299 .addr = omap3xxx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530300 .user = OCP_USER_MPU | OCP_USER_SDMA,
301};
302
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530303/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530304static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
305 .master = &omap3xxx_l4_core_hwmod,
306 .slave = &omap3xxx_i2c1_hwmod,
307 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600308 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530309 .fw = {
310 .omap2 = {
311 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
312 .l4_prot_group = 7,
313 .flags = OMAP_FIREWALL_L4,
314 }
315 },
316 .user = OCP_USER_MPU | OCP_USER_SDMA,
317};
318
319/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530320static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
321 .master = &omap3xxx_l4_core_hwmod,
322 .slave = &omap3xxx_i2c2_hwmod,
323 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600324 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530325 .fw = {
326 .omap2 = {
327 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
328 .l4_prot_group = 7,
329 .flags = OMAP_FIREWALL_L4,
330 }
331 },
332 .user = OCP_USER_MPU | OCP_USER_SDMA,
333};
334
335/* L4 CORE -> I2C3 interface */
336static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
337 {
338 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -0600339 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530340 .flags = ADDR_TYPE_RT,
341 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600342 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530343};
344
345static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
346 .master = &omap3xxx_l4_core_hwmod,
347 .slave = &omap3xxx_i2c3_hwmod,
348 .clk = "i2c3_ick",
349 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +0530350 .fw = {
351 .omap2 = {
352 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
353 .l4_prot_group = 7,
354 .flags = OMAP_FIREWALL_L4,
355 }
356 },
357 .user = OCP_USER_MPU | OCP_USER_SDMA,
358};
359
Thara Gopinathd3442722010-05-29 22:02:24 +0530360/* L4 CORE -> SR1 interface */
361static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
362 {
363 .pa_start = OMAP34XX_SR1_BASE,
364 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
365 .flags = ADDR_TYPE_RT,
366 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600367 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530368};
369
370static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
371 .master = &omap3xxx_l4_core_hwmod,
372 .slave = &omap34xx_sr1_hwmod,
373 .clk = "sr_l4_ick",
374 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530375 .user = OCP_USER_MPU,
376};
377
378/* L4 CORE -> SR1 interface */
379static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
380 {
381 .pa_start = OMAP34XX_SR2_BASE,
382 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
383 .flags = ADDR_TYPE_RT,
384 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600385 { }
Thara Gopinathd3442722010-05-29 22:02:24 +0530386};
387
388static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
389 .master = &omap3xxx_l4_core_hwmod,
390 .slave = &omap34xx_sr2_hwmod,
391 .clk = "sr_l4_ick",
392 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +0530393 .user = OCP_USER_MPU,
394};
395
Hema HK870ea2b2011-02-17 12:07:18 +0530396/*
397* usbhsotg interface data
398*/
399
400static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
401 {
402 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
403 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
404 .flags = ADDR_TYPE_RT
405 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600406 { }
Hema HK870ea2b2011-02-17 12:07:18 +0530407};
408
409/* l4_core -> usbhsotg */
410static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
411 .master = &omap3xxx_l4_core_hwmod,
412 .slave = &omap3xxx_usbhsotg_hwmod,
413 .clk = "l4_ick",
414 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +0530415 .user = OCP_USER_MPU,
416};
417
418static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = {
419 &omap3xxx_usbhsotg__l3,
420};
421
422static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = {
423 &omap3xxx_l4_core__usbhsotg,
424};
425
Hema HK273ff8c2011-02-17 12:07:19 +0530426static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
427 {
428 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
429 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
430 .flags = ADDR_TYPE_RT
431 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600432 { }
Hema HK273ff8c2011-02-17 12:07:19 +0530433};
434
435/* l4_core -> usbhsotg */
436static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
437 .master = &omap3xxx_l4_core_hwmod,
438 .slave = &am35xx_usbhsotg_hwmod,
439 .clk = "l4_ick",
440 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +0530441 .user = OCP_USER_MPU,
442};
443
444static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = {
445 &am35xx_usbhsotg__l3,
446};
447
448static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = {
449 &am35xx_l4_core__usbhsotg,
450};
Paul Walmsley73591542010-02-22 22:09:32 -0700451/* Slave interfaces on the L4_CORE interconnect */
452static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600453 &omap3xxx_l3_main__l4_core,
Paul Walmsley73591542010-02-22 22:09:32 -0700454};
455
456/* L4 CORE */
457static struct omap_hwmod omap3xxx_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600458 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700459 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700460 .slaves = omap3xxx_l4_core_slaves,
461 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600462 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
463 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700464};
465
466/* Slave interfaces on the L4_PER interconnect */
467static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600468 &omap3xxx_l3_main__l4_per,
Paul Walmsley73591542010-02-22 22:09:32 -0700469};
470
Paul Walmsley73591542010-02-22 22:09:32 -0700471/* L4 PER */
472static struct omap_hwmod omap3xxx_l4_per_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600473 .name = "l4_per",
Paul Walmsley43b40992010-02-22 22:09:34 -0700474 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700475 .slaves = omap3xxx_l4_per_slaves,
476 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600477 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
478 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700479};
480
481/* Slave interfaces on the L4_WKUP interconnect */
482static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
483 &omap3xxx_l4_core__l4_wkup,
484};
485
Paul Walmsley73591542010-02-22 22:09:32 -0700486/* L4 WKUP */
487static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600488 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700489 .class = &l4_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700490 .slaves = omap3xxx_l4_wkup_slaves,
491 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600492 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
493 .flags = HWMOD_NO_IDLEST,
Paul Walmsley73591542010-02-22 22:09:32 -0700494};
495
496/* Master interfaces on the MPU device */
497static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600498 &omap3xxx_mpu__l3_main,
Paul Walmsley73591542010-02-22 22:09:32 -0700499};
500
501/* MPU */
502static struct omap_hwmod omap3xxx_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600503 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700504 .class = &mpu_hwmod_class,
Paul Walmsley73591542010-02-22 22:09:32 -0700505 .main_clk = "arm_fck",
506 .masters = omap3xxx_mpu_masters,
507 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
508 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
509};
510
Kevin Hilman540064b2010-07-26 16:34:32 -0600511/*
512 * IVA2_2 interface data
513 */
514
515/* IVA2 <- L3 interface */
516static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
517 .master = &omap3xxx_l3_main_hwmod,
518 .slave = &omap3xxx_iva_hwmod,
519 .clk = "iva2_ck",
520 .user = OCP_USER_MPU | OCP_USER_SDMA,
521};
522
523static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
524 &omap3xxx_l3__iva,
525};
526
527/*
528 * IVA2 (IVA2)
529 */
530
531static struct omap_hwmod omap3xxx_iva_hwmod = {
532 .name = "iva",
533 .class = &iva_hwmod_class,
534 .masters = omap3xxx_iva_masters,
535 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
536 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
537};
538
Thara Gopinathce722d22011-02-23 00:14:05 -0700539/* timer class */
540static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
541 .rev_offs = 0x0000,
542 .sysc_offs = 0x0010,
543 .syss_offs = 0x0014,
544 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
545 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
546 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
547 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
548 .sysc_fields = &omap_hwmod_sysc_type1,
549};
550
551static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
552 .name = "timer",
553 .sysc = &omap3xxx_timer_1ms_sysc,
554 .rev = OMAP_TIMER_IP_VERSION_1,
555};
556
557static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
558 .rev_offs = 0x0000,
559 .sysc_offs = 0x0010,
560 .syss_offs = 0x0014,
561 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
562 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
563 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
564 .sysc_fields = &omap_hwmod_sysc_type1,
565};
566
567static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
568 .name = "timer",
569 .sysc = &omap3xxx_timer_sysc,
570 .rev = OMAP_TIMER_IP_VERSION_1,
571};
572
573/* timer1 */
574static struct omap_hwmod omap3xxx_timer1_hwmod;
575static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = {
576 { .irq = 37, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600577 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700578};
579
580static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
581 {
582 .pa_start = 0x48318000,
583 .pa_end = 0x48318000 + SZ_1K - 1,
584 .flags = ADDR_TYPE_RT
585 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600586 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700587};
588
589/* l4_wkup -> timer1 */
590static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
591 .master = &omap3xxx_l4_wkup_hwmod,
592 .slave = &omap3xxx_timer1_hwmod,
593 .clk = "gpt1_ick",
594 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700595 .user = OCP_USER_MPU | OCP_USER_SDMA,
596};
597
598/* timer1 slave port */
599static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
600 &omap3xxx_l4_wkup__timer1,
601};
602
603/* timer1 hwmod */
604static struct omap_hwmod omap3xxx_timer1_hwmod = {
605 .name = "timer1",
606 .mpu_irqs = omap3xxx_timer1_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700607 .main_clk = "gpt1_fck",
608 .prcm = {
609 .omap2 = {
610 .prcm_reg_id = 1,
611 .module_bit = OMAP3430_EN_GPT1_SHIFT,
612 .module_offs = WKUP_MOD,
613 .idlest_reg_id = 1,
614 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
615 },
616 },
617 .slaves = omap3xxx_timer1_slaves,
618 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves),
619 .class = &omap3xxx_timer_1ms_hwmod_class,
620 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
621};
622
623/* timer2 */
624static struct omap_hwmod omap3xxx_timer2_hwmod;
625static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = {
626 { .irq = 38, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600627 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700628};
629
630static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
631 {
632 .pa_start = 0x49032000,
633 .pa_end = 0x49032000 + SZ_1K - 1,
634 .flags = ADDR_TYPE_RT
635 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600636 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700637};
638
639/* l4_per -> timer2 */
640static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
641 .master = &omap3xxx_l4_per_hwmod,
642 .slave = &omap3xxx_timer2_hwmod,
643 .clk = "gpt2_ick",
644 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700645 .user = OCP_USER_MPU | OCP_USER_SDMA,
646};
647
648/* timer2 slave port */
649static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
650 &omap3xxx_l4_per__timer2,
651};
652
653/* timer2 hwmod */
654static struct omap_hwmod omap3xxx_timer2_hwmod = {
655 .name = "timer2",
656 .mpu_irqs = omap3xxx_timer2_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700657 .main_clk = "gpt2_fck",
658 .prcm = {
659 .omap2 = {
660 .prcm_reg_id = 1,
661 .module_bit = OMAP3430_EN_GPT2_SHIFT,
662 .module_offs = OMAP3430_PER_MOD,
663 .idlest_reg_id = 1,
664 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
665 },
666 },
667 .slaves = omap3xxx_timer2_slaves,
668 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves),
669 .class = &omap3xxx_timer_1ms_hwmod_class,
670 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
671};
672
673/* timer3 */
674static struct omap_hwmod omap3xxx_timer3_hwmod;
675static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = {
676 { .irq = 39, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600677 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700678};
679
680static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
681 {
682 .pa_start = 0x49034000,
683 .pa_end = 0x49034000 + SZ_1K - 1,
684 .flags = ADDR_TYPE_RT
685 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600686 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700687};
688
689/* l4_per -> timer3 */
690static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
691 .master = &omap3xxx_l4_per_hwmod,
692 .slave = &omap3xxx_timer3_hwmod,
693 .clk = "gpt3_ick",
694 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700695 .user = OCP_USER_MPU | OCP_USER_SDMA,
696};
697
698/* timer3 slave port */
699static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
700 &omap3xxx_l4_per__timer3,
701};
702
703/* timer3 hwmod */
704static struct omap_hwmod omap3xxx_timer3_hwmod = {
705 .name = "timer3",
706 .mpu_irqs = omap3xxx_timer3_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700707 .main_clk = "gpt3_fck",
708 .prcm = {
709 .omap2 = {
710 .prcm_reg_id = 1,
711 .module_bit = OMAP3430_EN_GPT3_SHIFT,
712 .module_offs = OMAP3430_PER_MOD,
713 .idlest_reg_id = 1,
714 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
715 },
716 },
717 .slaves = omap3xxx_timer3_slaves,
718 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves),
719 .class = &omap3xxx_timer_hwmod_class,
720 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
721};
722
723/* timer4 */
724static struct omap_hwmod omap3xxx_timer4_hwmod;
725static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = {
726 { .irq = 40, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600727 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700728};
729
730static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
731 {
732 .pa_start = 0x49036000,
733 .pa_end = 0x49036000 + SZ_1K - 1,
734 .flags = ADDR_TYPE_RT
735 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600736 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700737};
738
739/* l4_per -> timer4 */
740static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
741 .master = &omap3xxx_l4_per_hwmod,
742 .slave = &omap3xxx_timer4_hwmod,
743 .clk = "gpt4_ick",
744 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700745 .user = OCP_USER_MPU | OCP_USER_SDMA,
746};
747
748/* timer4 slave port */
749static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
750 &omap3xxx_l4_per__timer4,
751};
752
753/* timer4 hwmod */
754static struct omap_hwmod omap3xxx_timer4_hwmod = {
755 .name = "timer4",
756 .mpu_irqs = omap3xxx_timer4_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700757 .main_clk = "gpt4_fck",
758 .prcm = {
759 .omap2 = {
760 .prcm_reg_id = 1,
761 .module_bit = OMAP3430_EN_GPT4_SHIFT,
762 .module_offs = OMAP3430_PER_MOD,
763 .idlest_reg_id = 1,
764 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
765 },
766 },
767 .slaves = omap3xxx_timer4_slaves,
768 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves),
769 .class = &omap3xxx_timer_hwmod_class,
770 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
771};
772
773/* timer5 */
774static struct omap_hwmod omap3xxx_timer5_hwmod;
775static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = {
776 { .irq = 41, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600777 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700778};
779
780static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
781 {
782 .pa_start = 0x49038000,
783 .pa_end = 0x49038000 + SZ_1K - 1,
784 .flags = ADDR_TYPE_RT
785 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600786 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700787};
788
789/* l4_per -> timer5 */
790static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
791 .master = &omap3xxx_l4_per_hwmod,
792 .slave = &omap3xxx_timer5_hwmod,
793 .clk = "gpt5_ick",
794 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700795 .user = OCP_USER_MPU | OCP_USER_SDMA,
796};
797
798/* timer5 slave port */
799static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
800 &omap3xxx_l4_per__timer5,
801};
802
803/* timer5 hwmod */
804static struct omap_hwmod omap3xxx_timer5_hwmod = {
805 .name = "timer5",
806 .mpu_irqs = omap3xxx_timer5_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700807 .main_clk = "gpt5_fck",
808 .prcm = {
809 .omap2 = {
810 .prcm_reg_id = 1,
811 .module_bit = OMAP3430_EN_GPT5_SHIFT,
812 .module_offs = OMAP3430_PER_MOD,
813 .idlest_reg_id = 1,
814 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
815 },
816 },
817 .slaves = omap3xxx_timer5_slaves,
818 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves),
819 .class = &omap3xxx_timer_hwmod_class,
820 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
821};
822
823/* timer6 */
824static struct omap_hwmod omap3xxx_timer6_hwmod;
825static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = {
826 { .irq = 42, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600827 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700828};
829
830static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
831 {
832 .pa_start = 0x4903A000,
833 .pa_end = 0x4903A000 + SZ_1K - 1,
834 .flags = ADDR_TYPE_RT
835 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600836 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700837};
838
839/* l4_per -> timer6 */
840static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
841 .master = &omap3xxx_l4_per_hwmod,
842 .slave = &omap3xxx_timer6_hwmod,
843 .clk = "gpt6_ick",
844 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700845 .user = OCP_USER_MPU | OCP_USER_SDMA,
846};
847
848/* timer6 slave port */
849static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
850 &omap3xxx_l4_per__timer6,
851};
852
853/* timer6 hwmod */
854static struct omap_hwmod omap3xxx_timer6_hwmod = {
855 .name = "timer6",
856 .mpu_irqs = omap3xxx_timer6_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700857 .main_clk = "gpt6_fck",
858 .prcm = {
859 .omap2 = {
860 .prcm_reg_id = 1,
861 .module_bit = OMAP3430_EN_GPT6_SHIFT,
862 .module_offs = OMAP3430_PER_MOD,
863 .idlest_reg_id = 1,
864 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
865 },
866 },
867 .slaves = omap3xxx_timer6_slaves,
868 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves),
869 .class = &omap3xxx_timer_hwmod_class,
870 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
871};
872
873/* timer7 */
874static struct omap_hwmod omap3xxx_timer7_hwmod;
875static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = {
876 { .irq = 43, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600877 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700878};
879
880static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
881 {
882 .pa_start = 0x4903C000,
883 .pa_end = 0x4903C000 + SZ_1K - 1,
884 .flags = ADDR_TYPE_RT
885 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600886 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700887};
888
889/* l4_per -> timer7 */
890static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
891 .master = &omap3xxx_l4_per_hwmod,
892 .slave = &omap3xxx_timer7_hwmod,
893 .clk = "gpt7_ick",
894 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700895 .user = OCP_USER_MPU | OCP_USER_SDMA,
896};
897
898/* timer7 slave port */
899static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
900 &omap3xxx_l4_per__timer7,
901};
902
903/* timer7 hwmod */
904static struct omap_hwmod omap3xxx_timer7_hwmod = {
905 .name = "timer7",
906 .mpu_irqs = omap3xxx_timer7_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700907 .main_clk = "gpt7_fck",
908 .prcm = {
909 .omap2 = {
910 .prcm_reg_id = 1,
911 .module_bit = OMAP3430_EN_GPT7_SHIFT,
912 .module_offs = OMAP3430_PER_MOD,
913 .idlest_reg_id = 1,
914 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
915 },
916 },
917 .slaves = omap3xxx_timer7_slaves,
918 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves),
919 .class = &omap3xxx_timer_hwmod_class,
920 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
921};
922
923/* timer8 */
924static struct omap_hwmod omap3xxx_timer8_hwmod;
925static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = {
926 { .irq = 44, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600927 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700928};
929
930static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
931 {
932 .pa_start = 0x4903E000,
933 .pa_end = 0x4903E000 + SZ_1K - 1,
934 .flags = ADDR_TYPE_RT
935 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600936 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700937};
938
939/* l4_per -> timer8 */
940static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
941 .master = &omap3xxx_l4_per_hwmod,
942 .slave = &omap3xxx_timer8_hwmod,
943 .clk = "gpt8_ick",
944 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700945 .user = OCP_USER_MPU | OCP_USER_SDMA,
946};
947
948/* timer8 slave port */
949static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
950 &omap3xxx_l4_per__timer8,
951};
952
953/* timer8 hwmod */
954static struct omap_hwmod omap3xxx_timer8_hwmod = {
955 .name = "timer8",
956 .mpu_irqs = omap3xxx_timer8_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700957 .main_clk = "gpt8_fck",
958 .prcm = {
959 .omap2 = {
960 .prcm_reg_id = 1,
961 .module_bit = OMAP3430_EN_GPT8_SHIFT,
962 .module_offs = OMAP3430_PER_MOD,
963 .idlest_reg_id = 1,
964 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
965 },
966 },
967 .slaves = omap3xxx_timer8_slaves,
968 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves),
969 .class = &omap3xxx_timer_hwmod_class,
970 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
971};
972
973/* timer9 */
974static struct omap_hwmod omap3xxx_timer9_hwmod;
975static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = {
976 { .irq = 45, },
Paul Walmsley212738a2011-07-09 19:14:06 -0600977 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -0700978};
979
980static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
981 {
982 .pa_start = 0x49040000,
983 .pa_end = 0x49040000 + SZ_1K - 1,
984 .flags = ADDR_TYPE_RT
985 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600986 { }
Thara Gopinathce722d22011-02-23 00:14:05 -0700987};
988
989/* l4_per -> timer9 */
990static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
991 .master = &omap3xxx_l4_per_hwmod,
992 .slave = &omap3xxx_timer9_hwmod,
993 .clk = "gpt9_ick",
994 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -0700995 .user = OCP_USER_MPU | OCP_USER_SDMA,
996};
997
998/* timer9 slave port */
999static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
1000 &omap3xxx_l4_per__timer9,
1001};
1002
1003/* timer9 hwmod */
1004static struct omap_hwmod omap3xxx_timer9_hwmod = {
1005 .name = "timer9",
1006 .mpu_irqs = omap3xxx_timer9_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001007 .main_clk = "gpt9_fck",
1008 .prcm = {
1009 .omap2 = {
1010 .prcm_reg_id = 1,
1011 .module_bit = OMAP3430_EN_GPT9_SHIFT,
1012 .module_offs = OMAP3430_PER_MOD,
1013 .idlest_reg_id = 1,
1014 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
1015 },
1016 },
1017 .slaves = omap3xxx_timer9_slaves,
1018 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves),
1019 .class = &omap3xxx_timer_hwmod_class,
1020 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1021};
1022
1023/* timer10 */
1024static struct omap_hwmod omap3xxx_timer10_hwmod;
1025static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = {
1026 { .irq = 46, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001027 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -07001028};
1029
Thara Gopinathce722d22011-02-23 00:14:05 -07001030/* l4_core -> timer10 */
1031static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1032 .master = &omap3xxx_l4_core_hwmod,
1033 .slave = &omap3xxx_timer10_hwmod,
1034 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001035 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001036 .user = OCP_USER_MPU | OCP_USER_SDMA,
1037};
1038
1039/* timer10 slave port */
1040static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1041 &omap3xxx_l4_core__timer10,
1042};
1043
1044/* timer10 hwmod */
1045static struct omap_hwmod omap3xxx_timer10_hwmod = {
1046 .name = "timer10",
1047 .mpu_irqs = omap3xxx_timer10_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001048 .main_clk = "gpt10_fck",
1049 .prcm = {
1050 .omap2 = {
1051 .prcm_reg_id = 1,
1052 .module_bit = OMAP3430_EN_GPT10_SHIFT,
1053 .module_offs = CORE_MOD,
1054 .idlest_reg_id = 1,
1055 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
1056 },
1057 },
1058 .slaves = omap3xxx_timer10_slaves,
1059 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves),
1060 .class = &omap3xxx_timer_1ms_hwmod_class,
1061 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1062};
1063
1064/* timer11 */
1065static struct omap_hwmod omap3xxx_timer11_hwmod;
1066static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = {
1067 { .irq = 47, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001068 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -07001069};
1070
Thara Gopinathce722d22011-02-23 00:14:05 -07001071/* l4_core -> timer11 */
1072static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1073 .master = &omap3xxx_l4_core_hwmod,
1074 .slave = &omap3xxx_timer11_hwmod,
1075 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001076 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001077 .user = OCP_USER_MPU | OCP_USER_SDMA,
1078};
1079
1080/* timer11 slave port */
1081static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1082 &omap3xxx_l4_core__timer11,
1083};
1084
1085/* timer11 hwmod */
1086static struct omap_hwmod omap3xxx_timer11_hwmod = {
1087 .name = "timer11",
1088 .mpu_irqs = omap3xxx_timer11_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001089 .main_clk = "gpt11_fck",
1090 .prcm = {
1091 .omap2 = {
1092 .prcm_reg_id = 1,
1093 .module_bit = OMAP3430_EN_GPT11_SHIFT,
1094 .module_offs = CORE_MOD,
1095 .idlest_reg_id = 1,
1096 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
1097 },
1098 },
1099 .slaves = omap3xxx_timer11_slaves,
1100 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves),
1101 .class = &omap3xxx_timer_hwmod_class,
1102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1103};
1104
1105/* timer12*/
1106static struct omap_hwmod omap3xxx_timer12_hwmod;
1107static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1108 { .irq = 95, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001109 { .irq = -1 }
Thara Gopinathce722d22011-02-23 00:14:05 -07001110};
1111
1112static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1113 {
1114 .pa_start = 0x48304000,
1115 .pa_end = 0x48304000 + SZ_1K - 1,
1116 .flags = ADDR_TYPE_RT
1117 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001118 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07001119};
1120
1121/* l4_core -> timer12 */
1122static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1123 .master = &omap3xxx_l4_core_hwmod,
1124 .slave = &omap3xxx_timer12_hwmod,
1125 .clk = "gpt12_ick",
1126 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001127 .user = OCP_USER_MPU | OCP_USER_SDMA,
1128};
1129
1130/* timer12 slave port */
1131static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1132 &omap3xxx_l4_core__timer12,
1133};
1134
1135/* timer12 hwmod */
1136static struct omap_hwmod omap3xxx_timer12_hwmod = {
1137 .name = "timer12",
1138 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
Thara Gopinathce722d22011-02-23 00:14:05 -07001139 .main_clk = "gpt12_fck",
1140 .prcm = {
1141 .omap2 = {
1142 .prcm_reg_id = 1,
1143 .module_bit = OMAP3430_EN_GPT12_SHIFT,
1144 .module_offs = WKUP_MOD,
1145 .idlest_reg_id = 1,
1146 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
1147 },
1148 },
1149 .slaves = omap3xxx_timer12_slaves,
1150 .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves),
1151 .class = &omap3xxx_timer_hwmod_class,
1152 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
1153};
1154
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301155/* l4_wkup -> wd_timer2 */
1156static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1157 {
1158 .pa_start = 0x48314000,
1159 .pa_end = 0x4831407f,
1160 .flags = ADDR_TYPE_RT
1161 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001162 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301163};
1164
1165static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1166 .master = &omap3xxx_l4_wkup_hwmod,
1167 .slave = &omap3xxx_wd_timer2_hwmod,
1168 .clk = "wdt2_ick",
1169 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301170 .user = OCP_USER_MPU | OCP_USER_SDMA,
1171};
1172
1173/*
1174 * 'wd_timer' class
1175 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1176 * overflow condition
1177 */
1178
1179static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
1180 .rev_offs = 0x0000,
1181 .sysc_offs = 0x0010,
1182 .syss_offs = 0x0014,
1183 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
1184 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001185 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
1186 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301187 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1188 .sysc_fields = &omap_hwmod_sysc_type1,
1189};
1190
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301191/* I2C common */
1192static struct omap_hwmod_class_sysconfig i2c_sysc = {
1193 .rev_offs = 0x00,
1194 .sysc_offs = 0x20,
1195 .syss_offs = 0x10,
1196 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1197 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001198 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301199 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1200 .sysc_fields = &omap_hwmod_sysc_type1,
1201};
1202
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301203static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
Paul Walmsleyff2516f2010-12-21 15:39:15 -07001204 .name = "wd_timer",
1205 .sysc = &omap3xxx_wd_timer_sysc,
1206 .pre_shutdown = &omap2_wd_timer_disable
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301207};
1208
1209/* wd_timer2 */
1210static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
1211 &omap3xxx_l4_wkup__wd_timer2,
1212};
1213
1214static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1215 .name = "wd_timer2",
1216 .class = &omap3xxx_wd_timer_hwmod_class,
1217 .main_clk = "wdt2_fck",
1218 .prcm = {
1219 .omap2 = {
1220 .prcm_reg_id = 1,
1221 .module_bit = OMAP3430_EN_WDT2_SHIFT,
1222 .module_offs = WKUP_MOD,
1223 .idlest_reg_id = 1,
1224 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
1225 },
1226 },
1227 .slaves = omap3xxx_wd_timer2_slaves,
1228 .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
1229 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
Paul Walmsley2f4dd592011-03-10 22:40:06 -07001230 /*
1231 * XXX: Use software supervised mode, HW supervised smartidle seems to
1232 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
1233 */
1234 .flags = HWMOD_SWSUP_SIDLE,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05301235};
1236
Kevin Hilman046465b2010-09-27 20:19:30 +05301237/* UART common */
1238
1239static struct omap_hwmod_class_sysconfig uart_sysc = {
1240 .rev_offs = 0x50,
1241 .sysc_offs = 0x54,
1242 .syss_offs = 0x58,
1243 .sysc_flags = (SYSC_HAS_SIDLEMODE |
1244 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001245 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
Kevin Hilman046465b2010-09-27 20:19:30 +05301246 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1247 .sysc_fields = &omap_hwmod_sysc_type1,
1248};
1249
1250static struct omap_hwmod_class uart_class = {
1251 .name = "uart",
1252 .sysc = &uart_sysc,
1253};
1254
1255/* UART1 */
1256
1257static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
1258 { .irq = INT_24XX_UART1_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001259 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301260};
1261
1262static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
1263 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
1264 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
1265};
1266
1267static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1268 &omap3_l4_core__uart1,
1269};
1270
1271static struct omap_hwmod omap3xxx_uart1_hwmod = {
1272 .name = "uart1",
1273 .mpu_irqs = uart1_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301274 .sdma_reqs = uart1_sdma_reqs,
1275 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
1276 .main_clk = "uart1_fck",
1277 .prcm = {
1278 .omap2 = {
1279 .module_offs = CORE_MOD,
1280 .prcm_reg_id = 1,
1281 .module_bit = OMAP3430_EN_UART1_SHIFT,
1282 .idlest_reg_id = 1,
1283 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
1284 },
1285 },
1286 .slaves = omap3xxx_uart1_slaves,
1287 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
1288 .class = &uart_class,
1289 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1290};
1291
1292/* UART2 */
1293
1294static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
1295 { .irq = INT_24XX_UART2_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001296 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301297};
1298
1299static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
1300 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
1301 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
1302};
1303
1304static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1305 &omap3_l4_core__uart2,
1306};
1307
1308static struct omap_hwmod omap3xxx_uart2_hwmod = {
1309 .name = "uart2",
1310 .mpu_irqs = uart2_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301311 .sdma_reqs = uart2_sdma_reqs,
1312 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
1313 .main_clk = "uart2_fck",
1314 .prcm = {
1315 .omap2 = {
1316 .module_offs = CORE_MOD,
1317 .prcm_reg_id = 1,
1318 .module_bit = OMAP3430_EN_UART2_SHIFT,
1319 .idlest_reg_id = 1,
1320 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
1321 },
1322 },
1323 .slaves = omap3xxx_uart2_slaves,
1324 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
1325 .class = &uart_class,
1326 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1327};
1328
1329/* UART3 */
1330
1331static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
1332 { .irq = INT_24XX_UART3_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001333 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301334};
1335
1336static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
1337 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
1338 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
1339};
1340
1341static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1342 &omap3_l4_per__uart3,
1343};
1344
1345static struct omap_hwmod omap3xxx_uart3_hwmod = {
1346 .name = "uart3",
1347 .mpu_irqs = uart3_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301348 .sdma_reqs = uart3_sdma_reqs,
1349 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
1350 .main_clk = "uart3_fck",
1351 .prcm = {
1352 .omap2 = {
1353 .module_offs = OMAP3430_PER_MOD,
1354 .prcm_reg_id = 1,
1355 .module_bit = OMAP3430_EN_UART3_SHIFT,
1356 .idlest_reg_id = 1,
1357 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
1358 },
1359 },
1360 .slaves = omap3xxx_uart3_slaves,
1361 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
1362 .class = &uart_class,
1363 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1364};
1365
1366/* UART4 */
1367
1368static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1369 { .irq = INT_36XX_UART4_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001370 { .irq = -1 }
Kevin Hilman046465b2010-09-27 20:19:30 +05301371};
1372
1373static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1374 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
1375 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
1376};
1377
1378static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
1379 &omap3_l4_per__uart4,
1380};
1381
1382static struct omap_hwmod omap3xxx_uart4_hwmod = {
1383 .name = "uart4",
1384 .mpu_irqs = uart4_mpu_irqs,
Kevin Hilman046465b2010-09-27 20:19:30 +05301385 .sdma_reqs = uart4_sdma_reqs,
1386 .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
1387 .main_clk = "uart4_fck",
1388 .prcm = {
1389 .omap2 = {
1390 .module_offs = OMAP3430_PER_MOD,
1391 .prcm_reg_id = 1,
1392 .module_bit = OMAP3630_EN_UART4_SHIFT,
1393 .idlest_reg_id = 1,
1394 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
1395 },
1396 },
1397 .slaves = omap3xxx_uart4_slaves,
1398 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
1399 .class = &uart_class,
1400 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
1401};
1402
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301403static struct omap_hwmod_class i2c_class = {
1404 .name = "i2c",
1405 .sysc = &i2c_sysc,
1406};
1407
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001408/*
1409 * 'dss' class
1410 * display sub-system
1411 */
1412
1413static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
1414 .rev_offs = 0x0000,
1415 .sysc_offs = 0x0010,
1416 .syss_offs = 0x0014,
1417 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1418 .sysc_fields = &omap_hwmod_sysc_type1,
1419};
1420
1421static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
1422 .name = "dss",
1423 .sysc = &omap3xxx_dss_sysc,
1424};
1425
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001426static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1427 { .name = "dispc", .dma_req = 5 },
1428 { .name = "dsi1", .dma_req = 74 },
1429};
1430
1431/* dss */
1432/* dss master ports */
1433static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1434 &omap3xxx_dss__l3,
1435};
1436
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001437/* l4_core -> dss */
1438static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1439 .master = &omap3xxx_l4_core_hwmod,
1440 .slave = &omap3430es1_dss_core_hwmod,
1441 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001442 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001443 .fw = {
1444 .omap2 = {
1445 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
1446 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1447 .flags = OMAP_FIREWALL_L4,
1448 }
1449 },
1450 .user = OCP_USER_MPU | OCP_USER_SDMA,
1451};
1452
1453static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1454 .master = &omap3xxx_l4_core_hwmod,
1455 .slave = &omap3xxx_dss_core_hwmod,
1456 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001457 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001458 .fw = {
1459 .omap2 = {
1460 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
1461 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1462 .flags = OMAP_FIREWALL_L4,
1463 }
1464 },
1465 .user = OCP_USER_MPU | OCP_USER_SDMA,
1466};
1467
1468/* dss slave ports */
1469static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = {
1470 &omap3430es1_l4_core__dss,
1471};
1472
1473static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
1474 &omap3xxx_l4_core__dss,
1475};
1476
1477static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1478 { .role = "tv_clk", .clk = "dss_tv_fck" },
Sumit Semwal872462c2011-01-31 16:27:43 +00001479 { .role = "video_clk", .clk = "dss_96m_fck" },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001480 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
1481};
1482
1483static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1484 .name = "dss_core",
1485 .class = &omap3xxx_dss_hwmod_class,
1486 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001487 .sdma_reqs = omap3xxx_dss_sdma_chs,
1488 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
1489
1490 .prcm = {
1491 .omap2 = {
1492 .prcm_reg_id = 1,
1493 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1494 .module_offs = OMAP3430_DSS_MOD,
1495 .idlest_reg_id = 1,
1496 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
1497 },
1498 },
1499 .opt_clks = dss_opt_clks,
1500 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1501 .slaves = omap3430es1_dss_slaves,
1502 .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves),
1503 .masters = omap3xxx_dss_masters,
1504 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1505 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1),
1506 .flags = HWMOD_NO_IDLEST,
1507};
1508
1509static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1510 .name = "dss_core",
1511 .class = &omap3xxx_dss_hwmod_class,
1512 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001513 .sdma_reqs = omap3xxx_dss_sdma_chs,
1514 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
1515
1516 .prcm = {
1517 .omap2 = {
1518 .prcm_reg_id = 1,
1519 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1520 .module_offs = OMAP3430_DSS_MOD,
1521 .idlest_reg_id = 1,
1522 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
1523 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
1524 },
1525 },
1526 .opt_clks = dss_opt_clks,
1527 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
1528 .slaves = omap3xxx_dss_slaves,
1529 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves),
1530 .masters = omap3xxx_dss_masters,
1531 .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters),
1532 .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 |
1533 CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
1534};
1535
1536/*
1537 * 'dispc' class
1538 * display controller
1539 */
1540
1541static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
1542 .rev_offs = 0x0000,
1543 .sysc_offs = 0x0010,
1544 .syss_offs = 0x0014,
1545 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1546 SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
1547 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1548 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1549 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1550 .sysc_fields = &omap_hwmod_sysc_type1,
1551};
1552
1553static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
1554 .name = "dispc",
1555 .sysc = &omap3xxx_dispc_sysc,
1556};
1557
archit tanejaaffe3602011-02-23 08:41:03 +00001558static struct omap_hwmod_irq_info omap3xxx_dispc_irqs[] = {
1559 { .irq = 25 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001560 { .irq = -1 }
archit tanejaaffe3602011-02-23 08:41:03 +00001561};
1562
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001563/* l4_core -> dss_dispc */
1564static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1565 .master = &omap3xxx_l4_core_hwmod,
1566 .slave = &omap3xxx_dss_dispc_hwmod,
1567 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001568 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001569 .fw = {
1570 .omap2 = {
1571 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
1572 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1573 .flags = OMAP_FIREWALL_L4,
1574 }
1575 },
1576 .user = OCP_USER_MPU | OCP_USER_SDMA,
1577};
1578
1579/* dss_dispc slave ports */
1580static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1581 &omap3xxx_l4_core__dss_dispc,
1582};
1583
1584static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1585 .name = "dss_dispc",
1586 .class = &omap3xxx_dispc_hwmod_class,
archit tanejaaffe3602011-02-23 08:41:03 +00001587 .mpu_irqs = omap3xxx_dispc_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001588 .main_clk = "dss1_alwon_fck",
1589 .prcm = {
1590 .omap2 = {
1591 .prcm_reg_id = 1,
1592 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1593 .module_offs = OMAP3430_DSS_MOD,
1594 },
1595 },
1596 .slaves = omap3xxx_dss_dispc_slaves,
1597 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves),
1598 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1599 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1600 CHIP_GE_OMAP3630ES1_1),
1601 .flags = HWMOD_NO_IDLEST,
1602};
1603
1604/*
1605 * 'dsi' class
1606 * display serial interface controller
1607 */
1608
1609static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
1610 .name = "dsi",
1611};
1612
archit tanejaaffe3602011-02-23 08:41:03 +00001613static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1614 { .irq = 25 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001615 { .irq = -1 }
archit tanejaaffe3602011-02-23 08:41:03 +00001616};
1617
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001618/* dss_dsi1 */
1619static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1620 {
1621 .pa_start = 0x4804FC00,
1622 .pa_end = 0x4804FFFF,
1623 .flags = ADDR_TYPE_RT
1624 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001625 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001626};
1627
1628/* l4_core -> dss_dsi1 */
1629static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1630 .master = &omap3xxx_l4_core_hwmod,
1631 .slave = &omap3xxx_dss_dsi1_hwmod,
1632 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001633 .fw = {
1634 .omap2 = {
1635 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
1636 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1637 .flags = OMAP_FIREWALL_L4,
1638 }
1639 },
1640 .user = OCP_USER_MPU | OCP_USER_SDMA,
1641};
1642
1643/* dss_dsi1 slave ports */
1644static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = {
1645 &omap3xxx_l4_core__dss_dsi1,
1646};
1647
1648static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1649 .name = "dss_dsi1",
1650 .class = &omap3xxx_dsi_hwmod_class,
archit tanejaaffe3602011-02-23 08:41:03 +00001651 .mpu_irqs = omap3xxx_dsi1_irqs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001652 .main_clk = "dss1_alwon_fck",
1653 .prcm = {
1654 .omap2 = {
1655 .prcm_reg_id = 1,
1656 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1657 .module_offs = OMAP3430_DSS_MOD,
1658 },
1659 },
1660 .slaves = omap3xxx_dss_dsi1_slaves,
1661 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves),
1662 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1663 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1664 CHIP_GE_OMAP3630ES1_1),
1665 .flags = HWMOD_NO_IDLEST,
1666};
1667
1668/*
1669 * 'rfbi' class
1670 * remote frame buffer interface
1671 */
1672
1673static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
1674 .rev_offs = 0x0000,
1675 .sysc_offs = 0x0010,
1676 .syss_offs = 0x0014,
1677 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1678 SYSC_HAS_AUTOIDLE),
1679 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1680 .sysc_fields = &omap_hwmod_sysc_type1,
1681};
1682
1683static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
1684 .name = "rfbi",
1685 .sysc = &omap3xxx_rfbi_sysc,
1686};
1687
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001688/* l4_core -> dss_rfbi */
1689static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1690 .master = &omap3xxx_l4_core_hwmod,
1691 .slave = &omap3xxx_dss_rfbi_hwmod,
1692 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001693 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001694 .fw = {
1695 .omap2 = {
1696 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
1697 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
1698 .flags = OMAP_FIREWALL_L4,
1699 }
1700 },
1701 .user = OCP_USER_MPU | OCP_USER_SDMA,
1702};
1703
1704/* dss_rfbi slave ports */
1705static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1706 &omap3xxx_l4_core__dss_rfbi,
1707};
1708
1709static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1710 .name = "dss_rfbi",
1711 .class = &omap3xxx_rfbi_hwmod_class,
1712 .main_clk = "dss1_alwon_fck",
1713 .prcm = {
1714 .omap2 = {
1715 .prcm_reg_id = 1,
1716 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1717 .module_offs = OMAP3430_DSS_MOD,
1718 },
1719 },
1720 .slaves = omap3xxx_dss_rfbi_slaves,
1721 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves),
1722 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1723 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1724 CHIP_GE_OMAP3630ES1_1),
1725 .flags = HWMOD_NO_IDLEST,
1726};
1727
1728/*
1729 * 'venc' class
1730 * video encoder
1731 */
1732
1733static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
1734 .name = "venc",
1735};
1736
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001737/* l4_core -> dss_venc */
1738static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1739 .master = &omap3xxx_l4_core_hwmod,
1740 .slave = &omap3xxx_dss_venc_hwmod,
1741 .clk = "dss_tv_fck",
Paul Walmsleyded11382011-07-09 19:14:06 -06001742 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001743 .fw = {
1744 .omap2 = {
1745 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
1746 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
1747 .flags = OMAP_FIREWALL_L4,
1748 }
1749 },
Paul Walmsleyc39bee82011-03-04 06:02:15 +00001750 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001751 .user = OCP_USER_MPU | OCP_USER_SDMA,
1752};
1753
1754/* dss_venc slave ports */
1755static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1756 &omap3xxx_l4_core__dss_venc,
1757};
1758
1759static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1760 .name = "dss_venc",
1761 .class = &omap3xxx_venc_hwmod_class,
1762 .main_clk = "dss1_alwon_fck",
1763 .prcm = {
1764 .omap2 = {
1765 .prcm_reg_id = 1,
1766 .module_bit = OMAP3430_EN_DSS1_SHIFT,
1767 .module_offs = OMAP3430_DSS_MOD,
1768 },
1769 },
1770 .slaves = omap3xxx_dss_venc_slaves,
1771 .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves),
1772 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
1773 CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 |
1774 CHIP_GE_OMAP3630ES1_1),
1775 .flags = HWMOD_NO_IDLEST,
1776};
1777
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301778/* I2C1 */
1779
1780static struct omap_i2c_dev_attr i2c1_dev_attr = {
1781 .fifo_depth = 8, /* bytes */
1782};
1783
1784static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1785 { .irq = INT_24XX_I2C1_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001786 { .irq = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301787};
1788
1789static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1790 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1791 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1792};
1793
1794static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1795 &omap3_l4_core__i2c1,
1796};
1797
1798static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1799 .name = "i2c1",
1800 .mpu_irqs = i2c1_mpu_irqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301801 .sdma_reqs = i2c1_sdma_reqs,
1802 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1803 .main_clk = "i2c1_fck",
1804 .prcm = {
1805 .omap2 = {
1806 .module_offs = CORE_MOD,
1807 .prcm_reg_id = 1,
1808 .module_bit = OMAP3430_EN_I2C1_SHIFT,
1809 .idlest_reg_id = 1,
1810 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
1811 },
1812 },
1813 .slaves = omap3xxx_i2c1_slaves,
1814 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
1815 .class = &i2c_class,
1816 .dev_attr = &i2c1_dev_attr,
1817 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1818};
1819
1820/* I2C2 */
1821
1822static struct omap_i2c_dev_attr i2c2_dev_attr = {
1823 .fifo_depth = 8, /* bytes */
1824};
1825
1826static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1827 { .irq = INT_24XX_I2C2_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001828 { .irq = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301829};
1830
1831static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1832 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1833 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1834};
1835
1836static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1837 &omap3_l4_core__i2c2,
1838};
1839
1840static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1841 .name = "i2c2",
1842 .mpu_irqs = i2c2_mpu_irqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301843 .sdma_reqs = i2c2_sdma_reqs,
1844 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1845 .main_clk = "i2c2_fck",
1846 .prcm = {
1847 .omap2 = {
1848 .module_offs = CORE_MOD,
1849 .prcm_reg_id = 1,
1850 .module_bit = OMAP3430_EN_I2C2_SHIFT,
1851 .idlest_reg_id = 1,
1852 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
1853 },
1854 },
1855 .slaves = omap3xxx_i2c2_slaves,
1856 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
1857 .class = &i2c_class,
1858 .dev_attr = &i2c2_dev_attr,
1859 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1860};
1861
1862/* I2C3 */
1863
1864static struct omap_i2c_dev_attr i2c3_dev_attr = {
1865 .fifo_depth = 64, /* bytes */
1866};
1867
1868static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1869 { .irq = INT_34XX_I2C3_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06001870 { .irq = -1 }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301871};
1872
1873static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1874 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
1875 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
1876};
1877
1878static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1879 &omap3_l4_core__i2c3,
1880};
1881
1882static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1883 .name = "i2c3",
1884 .mpu_irqs = i2c3_mpu_irqs,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301885 .sdma_reqs = i2c3_sdma_reqs,
1886 .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
1887 .main_clk = "i2c3_fck",
1888 .prcm = {
1889 .omap2 = {
1890 .module_offs = CORE_MOD,
1891 .prcm_reg_id = 1,
1892 .module_bit = OMAP3430_EN_I2C3_SHIFT,
1893 .idlest_reg_id = 1,
1894 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
1895 },
1896 },
1897 .slaves = omap3xxx_i2c3_slaves,
1898 .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
1899 .class = &i2c_class,
1900 .dev_attr = &i2c3_dev_attr,
1901 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1902};
1903
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001904/* l4_wkup -> gpio1 */
1905static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
1906 {
1907 .pa_start = 0x48310000,
1908 .pa_end = 0x483101ff,
1909 .flags = ADDR_TYPE_RT
1910 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001911 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001912};
1913
1914static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
1915 .master = &omap3xxx_l4_wkup_hwmod,
1916 .slave = &omap3xxx_gpio1_hwmod,
1917 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001918 .user = OCP_USER_MPU | OCP_USER_SDMA,
1919};
1920
1921/* l4_per -> gpio2 */
1922static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
1923 {
1924 .pa_start = 0x49050000,
1925 .pa_end = 0x490501ff,
1926 .flags = ADDR_TYPE_RT
1927 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001928 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001929};
1930
1931static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
1932 .master = &omap3xxx_l4_per_hwmod,
1933 .slave = &omap3xxx_gpio2_hwmod,
1934 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001935 .user = OCP_USER_MPU | OCP_USER_SDMA,
1936};
1937
1938/* l4_per -> gpio3 */
1939static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
1940 {
1941 .pa_start = 0x49052000,
1942 .pa_end = 0x490521ff,
1943 .flags = ADDR_TYPE_RT
1944 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001945 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001946};
1947
1948static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
1949 .master = &omap3xxx_l4_per_hwmod,
1950 .slave = &omap3xxx_gpio3_hwmod,
1951 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001952 .user = OCP_USER_MPU | OCP_USER_SDMA,
1953};
1954
1955/* l4_per -> gpio4 */
1956static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
1957 {
1958 .pa_start = 0x49054000,
1959 .pa_end = 0x490541ff,
1960 .flags = ADDR_TYPE_RT
1961 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001962 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001963};
1964
1965static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
1966 .master = &omap3xxx_l4_per_hwmod,
1967 .slave = &omap3xxx_gpio4_hwmod,
1968 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001969 .user = OCP_USER_MPU | OCP_USER_SDMA,
1970};
1971
1972/* l4_per -> gpio5 */
1973static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
1974 {
1975 .pa_start = 0x49056000,
1976 .pa_end = 0x490561ff,
1977 .flags = ADDR_TYPE_RT
1978 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001979 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001980};
1981
1982static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
1983 .master = &omap3xxx_l4_per_hwmod,
1984 .slave = &omap3xxx_gpio5_hwmod,
1985 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001986 .user = OCP_USER_MPU | OCP_USER_SDMA,
1987};
1988
1989/* l4_per -> gpio6 */
1990static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
1991 {
1992 .pa_start = 0x49058000,
1993 .pa_end = 0x490581ff,
1994 .flags = ADDR_TYPE_RT
1995 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001996 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08001997};
1998
1999static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2000 .master = &omap3xxx_l4_per_hwmod,
2001 .slave = &omap3xxx_gpio6_hwmod,
2002 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002003 .user = OCP_USER_MPU | OCP_USER_SDMA,
2004};
2005
2006/*
2007 * 'gpio' class
2008 * general purpose io module
2009 */
2010
2011static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
2012 .rev_offs = 0x0000,
2013 .sysc_offs = 0x0010,
2014 .syss_offs = 0x0014,
2015 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07002016 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
2017 SYSS_HAS_RESET_STATUS),
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002018 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2019 .sysc_fields = &omap_hwmod_sysc_type1,
2020};
2021
2022static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
2023 .name = "gpio",
2024 .sysc = &omap3xxx_gpio_sysc,
2025 .rev = 1,
2026};
2027
2028/* gpio_dev_attr*/
2029static struct omap_gpio_dev_attr gpio_dev_attr = {
2030 .bank_width = 32,
2031 .dbck_flag = true,
2032};
2033
2034/* gpio1 */
2035static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
2036 { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002037 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002038};
2039
2040static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
2041 { .role = "dbclk", .clk = "gpio1_dbck", },
2042};
2043
2044static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
2045 &omap3xxx_l4_wkup__gpio1,
2046};
2047
2048static struct omap_hwmod omap3xxx_gpio1_hwmod = {
2049 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302050 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002051 .mpu_irqs = omap3xxx_gpio1_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002052 .main_clk = "gpio1_ick",
2053 .opt_clks = gpio1_opt_clks,
2054 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
2055 .prcm = {
2056 .omap2 = {
2057 .prcm_reg_id = 1,
2058 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
2059 .module_offs = WKUP_MOD,
2060 .idlest_reg_id = 1,
2061 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
2062 },
2063 },
2064 .slaves = omap3xxx_gpio1_slaves,
2065 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
2066 .class = &omap3xxx_gpio_hwmod_class,
2067 .dev_attr = &gpio_dev_attr,
2068 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2069};
2070
2071/* gpio2 */
2072static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
2073 { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002074 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002075};
2076
2077static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
2078 { .role = "dbclk", .clk = "gpio2_dbck", },
2079};
2080
2081static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
2082 &omap3xxx_l4_per__gpio2,
2083};
2084
2085static struct omap_hwmod omap3xxx_gpio2_hwmod = {
2086 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302087 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002088 .mpu_irqs = omap3xxx_gpio2_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002089 .main_clk = "gpio2_ick",
2090 .opt_clks = gpio2_opt_clks,
2091 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
2092 .prcm = {
2093 .omap2 = {
2094 .prcm_reg_id = 1,
2095 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
2096 .module_offs = OMAP3430_PER_MOD,
2097 .idlest_reg_id = 1,
2098 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
2099 },
2100 },
2101 .slaves = omap3xxx_gpio2_slaves,
2102 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
2103 .class = &omap3xxx_gpio_hwmod_class,
2104 .dev_attr = &gpio_dev_attr,
2105 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2106};
2107
2108/* gpio3 */
2109static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
2110 { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002111 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002112};
2113
2114static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
2115 { .role = "dbclk", .clk = "gpio3_dbck", },
2116};
2117
2118static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
2119 &omap3xxx_l4_per__gpio3,
2120};
2121
2122static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2123 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302124 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002125 .mpu_irqs = omap3xxx_gpio3_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002126 .main_clk = "gpio3_ick",
2127 .opt_clks = gpio3_opt_clks,
2128 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
2129 .prcm = {
2130 .omap2 = {
2131 .prcm_reg_id = 1,
2132 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
2133 .module_offs = OMAP3430_PER_MOD,
2134 .idlest_reg_id = 1,
2135 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
2136 },
2137 },
2138 .slaves = omap3xxx_gpio3_slaves,
2139 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
2140 .class = &omap3xxx_gpio_hwmod_class,
2141 .dev_attr = &gpio_dev_attr,
2142 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2143};
2144
2145/* gpio4 */
2146static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
2147 { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002148 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002149};
2150
2151static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2152 { .role = "dbclk", .clk = "gpio4_dbck", },
2153};
2154
2155static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
2156 &omap3xxx_l4_per__gpio4,
2157};
2158
2159static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2160 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302161 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002162 .mpu_irqs = omap3xxx_gpio4_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002163 .main_clk = "gpio4_ick",
2164 .opt_clks = gpio4_opt_clks,
2165 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
2166 .prcm = {
2167 .omap2 = {
2168 .prcm_reg_id = 1,
2169 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
2170 .module_offs = OMAP3430_PER_MOD,
2171 .idlest_reg_id = 1,
2172 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
2173 },
2174 },
2175 .slaves = omap3xxx_gpio4_slaves,
2176 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
2177 .class = &omap3xxx_gpio_hwmod_class,
2178 .dev_attr = &gpio_dev_attr,
2179 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2180};
2181
2182/* gpio5 */
2183static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
2184 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002185 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002186};
2187
2188static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
2189 { .role = "dbclk", .clk = "gpio5_dbck", },
2190};
2191
2192static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
2193 &omap3xxx_l4_per__gpio5,
2194};
2195
2196static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2197 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302198 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002199 .mpu_irqs = omap3xxx_gpio5_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002200 .main_clk = "gpio5_ick",
2201 .opt_clks = gpio5_opt_clks,
2202 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
2203 .prcm = {
2204 .omap2 = {
2205 .prcm_reg_id = 1,
2206 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
2207 .module_offs = OMAP3430_PER_MOD,
2208 .idlest_reg_id = 1,
2209 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
2210 },
2211 },
2212 .slaves = omap3xxx_gpio5_slaves,
2213 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
2214 .class = &omap3xxx_gpio_hwmod_class,
2215 .dev_attr = &gpio_dev_attr,
2216 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2217};
2218
2219/* gpio6 */
2220static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
2221 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002222 { .irq = -1 }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002223};
2224
2225static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2226 { .role = "dbclk", .clk = "gpio6_dbck", },
2227};
2228
2229static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
2230 &omap3xxx_l4_per__gpio6,
2231};
2232
2233static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2234 .name = "gpio6",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05302235 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002236 .mpu_irqs = omap3xxx_gpio6_irqs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002237 .main_clk = "gpio6_ick",
2238 .opt_clks = gpio6_opt_clks,
2239 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
2240 .prcm = {
2241 .omap2 = {
2242 .prcm_reg_id = 1,
2243 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
2244 .module_offs = OMAP3430_PER_MOD,
2245 .idlest_reg_id = 1,
2246 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
2247 },
2248 },
2249 .slaves = omap3xxx_gpio6_slaves,
2250 .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
2251 .class = &omap3xxx_gpio_hwmod_class,
2252 .dev_attr = &gpio_dev_attr,
2253 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2254};
2255
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002256/* dma_system -> L3 */
2257static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2258 .master = &omap3xxx_dma_system_hwmod,
2259 .slave = &omap3xxx_l3_main_hwmod,
2260 .clk = "core_l3_ick",
2261 .user = OCP_USER_MPU | OCP_USER_SDMA,
2262};
2263
2264/* dma attributes */
2265static struct omap_dma_dev_attr dma_dev_attr = {
2266 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
2267 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
2268 .lch_count = 32,
2269};
2270
2271static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
2272 .rev_offs = 0x0000,
2273 .sysc_offs = 0x002c,
2274 .syss_offs = 0x0028,
2275 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2276 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
Avinash.H.Md73d65f2011-03-03 14:22:46 -07002277 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
2278 SYSS_HAS_RESET_STATUS),
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002279 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2280 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
2281 .sysc_fields = &omap_hwmod_sysc_type1,
2282};
2283
2284static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2285 .name = "dma",
2286 .sysc = &omap3xxx_dma_sysc,
2287};
2288
2289/* dma_system */
2290static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
2291 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
2292 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
2293 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
2294 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
Paul Walmsley212738a2011-07-09 19:14:06 -06002295 { .irq = -1 }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002296};
2297
2298static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2299 {
2300 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002301 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002302 .flags = ADDR_TYPE_RT
2303 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002304 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002305};
2306
2307/* dma_system master ports */
2308static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
2309 &omap3xxx_dma_system__l3,
2310};
2311
2312/* l4_cfg -> dma_system */
2313static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2314 .master = &omap3xxx_l4_core_hwmod,
2315 .slave = &omap3xxx_dma_system_hwmod,
2316 .clk = "core_l4_ick",
2317 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002318 .user = OCP_USER_MPU | OCP_USER_SDMA,
2319};
2320
2321/* dma_system slave ports */
2322static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2323 &omap3xxx_l4_core__dma_system,
2324};
2325
2326static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2327 .name = "dma",
2328 .class = &omap3xxx_dma_hwmod_class,
2329 .mpu_irqs = omap3xxx_dma_system_irqs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002330 .main_clk = "core_l3_ick",
2331 .prcm = {
2332 .omap2 = {
2333 .module_offs = CORE_MOD,
2334 .prcm_reg_id = 1,
2335 .module_bit = OMAP3430_ST_SDMA_SHIFT,
2336 .idlest_reg_id = 1,
2337 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
2338 },
2339 },
2340 .slaves = omap3xxx_dma_system_slaves,
2341 .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
2342 .masters = omap3xxx_dma_system_masters,
2343 .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
2344 .dev_attr = &dma_dev_attr,
2345 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2346 .flags = HWMOD_NO_IDLEST,
2347};
2348
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302349/*
2350 * 'mcbsp' class
2351 * multi channel buffered serial port controller
2352 */
2353
2354static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
2355 .sysc_offs = 0x008c,
2356 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
2357 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2358 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2359 .sysc_fields = &omap_hwmod_sysc_type1,
2360 .clockact = 0x2,
2361};
2362
2363static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
2364 .name = "mcbsp",
2365 .sysc = &omap3xxx_mcbsp_sysc,
2366 .rev = MCBSP_CONFIG_TYPE3,
2367};
2368
2369/* mcbsp1 */
2370static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2371 { .name = "irq", .irq = 16 },
2372 { .name = "tx", .irq = 59 },
2373 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002374 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302375};
2376
2377static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
2378 { .name = "rx", .dma_req = 32 },
2379 { .name = "tx", .dma_req = 31 },
2380};
2381
2382static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2383 {
2384 .name = "mpu",
2385 .pa_start = 0x48074000,
2386 .pa_end = 0x480740ff,
2387 .flags = ADDR_TYPE_RT
2388 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002389 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302390};
2391
2392/* l4_core -> mcbsp1 */
2393static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2394 .master = &omap3xxx_l4_core_hwmod,
2395 .slave = &omap3xxx_mcbsp1_hwmod,
2396 .clk = "mcbsp1_ick",
2397 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302398 .user = OCP_USER_MPU | OCP_USER_SDMA,
2399};
2400
2401/* mcbsp1 slave ports */
2402static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = {
2403 &omap3xxx_l4_core__mcbsp1,
2404};
2405
2406static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2407 .name = "mcbsp1",
2408 .class = &omap3xxx_mcbsp_hwmod_class,
2409 .mpu_irqs = omap3xxx_mcbsp1_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302410 .sdma_reqs = omap3xxx_mcbsp1_sdma_chs,
2411 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs),
2412 .main_clk = "mcbsp1_fck",
2413 .prcm = {
2414 .omap2 = {
2415 .prcm_reg_id = 1,
2416 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
2417 .module_offs = CORE_MOD,
2418 .idlest_reg_id = 1,
2419 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
2420 },
2421 },
2422 .slaves = omap3xxx_mcbsp1_slaves,
2423 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves),
2424 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2425};
2426
2427/* mcbsp2 */
2428static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2429 { .name = "irq", .irq = 17 },
2430 { .name = "tx", .irq = 62 },
2431 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002432 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302433};
2434
2435static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
2436 { .name = "rx", .dma_req = 34 },
2437 { .name = "tx", .dma_req = 33 },
2438};
2439
2440static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2441 {
2442 .name = "mpu",
2443 .pa_start = 0x49022000,
2444 .pa_end = 0x490220ff,
2445 .flags = ADDR_TYPE_RT
2446 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002447 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302448};
2449
2450/* l4_per -> mcbsp2 */
2451static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2452 .master = &omap3xxx_l4_per_hwmod,
2453 .slave = &omap3xxx_mcbsp2_hwmod,
2454 .clk = "mcbsp2_ick",
2455 .addr = omap3xxx_mcbsp2_addrs,
Paul Walmsley78183f32011-07-09 19:14:05 -06002456
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302457 .user = OCP_USER_MPU | OCP_USER_SDMA,
2458};
2459
2460/* mcbsp2 slave ports */
2461static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = {
2462 &omap3xxx_l4_per__mcbsp2,
2463};
2464
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302465static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
2466 .sidetone = "mcbsp2_sidetone",
2467};
2468
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302469static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2470 .name = "mcbsp2",
2471 .class = &omap3xxx_mcbsp_hwmod_class,
2472 .mpu_irqs = omap3xxx_mcbsp2_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302473 .sdma_reqs = omap3xxx_mcbsp2_sdma_chs,
2474 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs),
2475 .main_clk = "mcbsp2_fck",
2476 .prcm = {
2477 .omap2 = {
2478 .prcm_reg_id = 1,
2479 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2480 .module_offs = OMAP3430_PER_MOD,
2481 .idlest_reg_id = 1,
2482 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2483 },
2484 },
2485 .slaves = omap3xxx_mcbsp2_slaves,
2486 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302487 .dev_attr = &omap34xx_mcbsp2_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302488 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2489};
2490
2491/* mcbsp3 */
2492static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2493 { .name = "irq", .irq = 22 },
2494 { .name = "tx", .irq = 89 },
2495 { .name = "rx", .irq = 90 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002496 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302497};
2498
2499static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
2500 { .name = "rx", .dma_req = 18 },
2501 { .name = "tx", .dma_req = 17 },
2502};
2503
2504static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2505 {
2506 .name = "mpu",
2507 .pa_start = 0x49024000,
2508 .pa_end = 0x490240ff,
2509 .flags = ADDR_TYPE_RT
2510 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002511 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302512};
2513
2514/* l4_per -> mcbsp3 */
2515static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2516 .master = &omap3xxx_l4_per_hwmod,
2517 .slave = &omap3xxx_mcbsp3_hwmod,
2518 .clk = "mcbsp3_ick",
2519 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302520 .user = OCP_USER_MPU | OCP_USER_SDMA,
2521};
2522
2523/* mcbsp3 slave ports */
2524static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = {
2525 &omap3xxx_l4_per__mcbsp3,
2526};
2527
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302528static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
2529 .sidetone = "mcbsp3_sidetone",
2530};
2531
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302532static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2533 .name = "mcbsp3",
2534 .class = &omap3xxx_mcbsp_hwmod_class,
2535 .mpu_irqs = omap3xxx_mcbsp3_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302536 .sdma_reqs = omap3xxx_mcbsp3_sdma_chs,
2537 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs),
2538 .main_clk = "mcbsp3_fck",
2539 .prcm = {
2540 .omap2 = {
2541 .prcm_reg_id = 1,
2542 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2543 .module_offs = OMAP3430_PER_MOD,
2544 .idlest_reg_id = 1,
2545 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2546 },
2547 },
2548 .slaves = omap3xxx_mcbsp3_slaves,
2549 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves),
Kishon Vijay Abraham I8b1906f2011-02-24 15:16:51 +05302550 .dev_attr = &omap34xx_mcbsp3_dev_attr,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302551 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2552};
2553
2554/* mcbsp4 */
2555static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
2556 { .name = "irq", .irq = 23 },
2557 { .name = "tx", .irq = 54 },
2558 { .name = "rx", .irq = 55 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002559 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302560};
2561
2562static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2563 { .name = "rx", .dma_req = 20 },
2564 { .name = "tx", .dma_req = 19 },
2565};
2566
2567static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2568 {
2569 .name = "mpu",
2570 .pa_start = 0x49026000,
2571 .pa_end = 0x490260ff,
2572 .flags = ADDR_TYPE_RT
2573 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002574 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302575};
2576
2577/* l4_per -> mcbsp4 */
2578static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2579 .master = &omap3xxx_l4_per_hwmod,
2580 .slave = &omap3xxx_mcbsp4_hwmod,
2581 .clk = "mcbsp4_ick",
2582 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302583 .user = OCP_USER_MPU | OCP_USER_SDMA,
2584};
2585
2586/* mcbsp4 slave ports */
2587static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = {
2588 &omap3xxx_l4_per__mcbsp4,
2589};
2590
2591static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2592 .name = "mcbsp4",
2593 .class = &omap3xxx_mcbsp_hwmod_class,
2594 .mpu_irqs = omap3xxx_mcbsp4_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302595 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
2596 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs),
2597 .main_clk = "mcbsp4_fck",
2598 .prcm = {
2599 .omap2 = {
2600 .prcm_reg_id = 1,
2601 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
2602 .module_offs = OMAP3430_PER_MOD,
2603 .idlest_reg_id = 1,
2604 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
2605 },
2606 },
2607 .slaves = omap3xxx_mcbsp4_slaves,
2608 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves),
2609 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2610};
2611
2612/* mcbsp5 */
2613static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
2614 { .name = "irq", .irq = 27 },
2615 { .name = "tx", .irq = 81 },
2616 { .name = "rx", .irq = 82 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002617 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302618};
2619
2620static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2621 { .name = "rx", .dma_req = 22 },
2622 { .name = "tx", .dma_req = 21 },
2623};
2624
2625static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2626 {
2627 .name = "mpu",
2628 .pa_start = 0x48096000,
2629 .pa_end = 0x480960ff,
2630 .flags = ADDR_TYPE_RT
2631 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002632 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302633};
2634
2635/* l4_core -> mcbsp5 */
2636static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2637 .master = &omap3xxx_l4_core_hwmod,
2638 .slave = &omap3xxx_mcbsp5_hwmod,
2639 .clk = "mcbsp5_ick",
2640 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302641 .user = OCP_USER_MPU | OCP_USER_SDMA,
2642};
2643
2644/* mcbsp5 slave ports */
2645static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = {
2646 &omap3xxx_l4_core__mcbsp5,
2647};
2648
2649static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2650 .name = "mcbsp5",
2651 .class = &omap3xxx_mcbsp_hwmod_class,
2652 .mpu_irqs = omap3xxx_mcbsp5_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302653 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
2654 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs),
2655 .main_clk = "mcbsp5_fck",
2656 .prcm = {
2657 .omap2 = {
2658 .prcm_reg_id = 1,
2659 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
2660 .module_offs = CORE_MOD,
2661 .idlest_reg_id = 1,
2662 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
2663 },
2664 },
2665 .slaves = omap3xxx_mcbsp5_slaves,
2666 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves),
2667 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2668};
2669/* 'mcbsp sidetone' class */
2670
2671static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
2672 .sysc_offs = 0x0010,
2673 .sysc_flags = SYSC_HAS_AUTOIDLE,
2674 .sysc_fields = &omap_hwmod_sysc_type1,
2675};
2676
2677static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
2678 .name = "mcbsp_sidetone",
2679 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
2680};
2681
2682/* mcbsp2_sidetone */
2683static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2684 { .name = "irq", .irq = 4 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002685 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302686};
2687
2688static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2689 {
2690 .name = "sidetone",
2691 .pa_start = 0x49028000,
2692 .pa_end = 0x490280ff,
2693 .flags = ADDR_TYPE_RT
2694 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002695 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302696};
2697
2698/* l4_per -> mcbsp2_sidetone */
2699static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2700 .master = &omap3xxx_l4_per_hwmod,
2701 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2702 .clk = "mcbsp2_ick",
2703 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302704 .user = OCP_USER_MPU,
2705};
2706
2707/* mcbsp2_sidetone slave ports */
2708static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = {
2709 &omap3xxx_l4_per__mcbsp2_sidetone,
2710};
2711
2712static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2713 .name = "mcbsp2_sidetone",
2714 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2715 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302716 .main_clk = "mcbsp2_fck",
2717 .prcm = {
2718 .omap2 = {
2719 .prcm_reg_id = 1,
2720 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
2721 .module_offs = OMAP3430_PER_MOD,
2722 .idlest_reg_id = 1,
2723 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
2724 },
2725 },
2726 .slaves = omap3xxx_mcbsp2_sidetone_slaves,
2727 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves),
2728 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2729};
2730
2731/* mcbsp3_sidetone */
2732static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2733 { .name = "irq", .irq = 5 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002734 { .irq = -1 }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302735};
2736
2737static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2738 {
2739 .name = "sidetone",
2740 .pa_start = 0x4902A000,
2741 .pa_end = 0x4902A0ff,
2742 .flags = ADDR_TYPE_RT
2743 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002744 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302745};
2746
2747/* l4_per -> mcbsp3_sidetone */
2748static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2749 .master = &omap3xxx_l4_per_hwmod,
2750 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2751 .clk = "mcbsp3_ick",
2752 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302753 .user = OCP_USER_MPU,
2754};
2755
2756/* mcbsp3_sidetone slave ports */
2757static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = {
2758 &omap3xxx_l4_per__mcbsp3_sidetone,
2759};
2760
2761static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2762 .name = "mcbsp3_sidetone",
2763 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2764 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302765 .main_clk = "mcbsp3_fck",
2766 .prcm = {
2767 .omap2 = {
2768 .prcm_reg_id = 1,
2769 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
2770 .module_offs = OMAP3430_PER_MOD,
2771 .idlest_reg_id = 1,
2772 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
2773 },
2774 },
2775 .slaves = omap3xxx_mcbsp3_sidetone_slaves,
2776 .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves),
2777 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2778};
2779
2780
Thara Gopinathd3442722010-05-29 22:02:24 +05302781/* SR common */
2782static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
2783 .clkact_shift = 20,
2784};
2785
2786static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
2787 .sysc_offs = 0x24,
2788 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
2789 .clockact = CLOCKACT_TEST_ICLK,
2790 .sysc_fields = &omap34xx_sr_sysc_fields,
2791};
2792
2793static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
2794 .name = "smartreflex",
2795 .sysc = &omap34xx_sr_sysc,
2796 .rev = 1,
2797};
2798
2799static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
2800 .sidle_shift = 24,
2801 .enwkup_shift = 26
2802};
2803
2804static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
2805 .sysc_offs = 0x38,
2806 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2807 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
2808 SYSC_NO_CACHE),
2809 .sysc_fields = &omap36xx_sr_sysc_fields,
2810};
2811
2812static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
2813 .name = "smartreflex",
2814 .sysc = &omap36xx_sr_sysc,
2815 .rev = 2,
2816};
2817
2818/* SR1 */
2819static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
2820 &omap3_l4_core__sr1,
2821};
2822
2823static struct omap_hwmod omap34xx_sr1_hwmod = {
2824 .name = "sr1_hwmod",
2825 .class = &omap34xx_smartreflex_hwmod_class,
2826 .main_clk = "sr1_fck",
2827 .vdd_name = "mpu",
2828 .prcm = {
2829 .omap2 = {
2830 .prcm_reg_id = 1,
2831 .module_bit = OMAP3430_EN_SR1_SHIFT,
2832 .module_offs = WKUP_MOD,
2833 .idlest_reg_id = 1,
2834 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2835 },
2836 },
2837 .slaves = omap3_sr1_slaves,
2838 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2839 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
2840 CHIP_IS_OMAP3430ES3_0 |
2841 CHIP_IS_OMAP3430ES3_1),
2842 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2843};
2844
2845static struct omap_hwmod omap36xx_sr1_hwmod = {
2846 .name = "sr1_hwmod",
2847 .class = &omap36xx_smartreflex_hwmod_class,
2848 .main_clk = "sr1_fck",
2849 .vdd_name = "mpu",
2850 .prcm = {
2851 .omap2 = {
2852 .prcm_reg_id = 1,
2853 .module_bit = OMAP3430_EN_SR1_SHIFT,
2854 .module_offs = WKUP_MOD,
2855 .idlest_reg_id = 1,
2856 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
2857 },
2858 },
2859 .slaves = omap3_sr1_slaves,
2860 .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves),
2861 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
2862};
2863
2864/* SR2 */
2865static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
2866 &omap3_l4_core__sr2,
2867};
2868
2869static struct omap_hwmod omap34xx_sr2_hwmod = {
2870 .name = "sr2_hwmod",
2871 .class = &omap34xx_smartreflex_hwmod_class,
2872 .main_clk = "sr2_fck",
2873 .vdd_name = "core",
2874 .prcm = {
2875 .omap2 = {
2876 .prcm_reg_id = 1,
2877 .module_bit = OMAP3430_EN_SR2_SHIFT,
2878 .module_offs = WKUP_MOD,
2879 .idlest_reg_id = 1,
2880 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2881 },
2882 },
2883 .slaves = omap3_sr2_slaves,
2884 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2885 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 |
2886 CHIP_IS_OMAP3430ES3_0 |
2887 CHIP_IS_OMAP3430ES3_1),
2888 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
2889};
2890
2891static struct omap_hwmod omap36xx_sr2_hwmod = {
2892 .name = "sr2_hwmod",
2893 .class = &omap36xx_smartreflex_hwmod_class,
2894 .main_clk = "sr2_fck",
2895 .vdd_name = "core",
2896 .prcm = {
2897 .omap2 = {
2898 .prcm_reg_id = 1,
2899 .module_bit = OMAP3430_EN_SR2_SHIFT,
2900 .module_offs = WKUP_MOD,
2901 .idlest_reg_id = 1,
2902 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
2903 },
2904 },
2905 .slaves = omap3_sr2_slaves,
2906 .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves),
2907 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
2908};
2909
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002910/*
2911 * 'mailbox' class
2912 * mailbox module allowing communication between the on-chip processors
2913 * using a queued mailbox-interrupt mechanism.
2914 */
2915
2916static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
2917 .rev_offs = 0x000,
2918 .sysc_offs = 0x010,
2919 .syss_offs = 0x014,
2920 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2921 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2922 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2923 .sysc_fields = &omap_hwmod_sysc_type1,
2924};
2925
2926static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
2927 .name = "mailbox",
2928 .sysc = &omap3xxx_mailbox_sysc,
2929};
2930
2931static struct omap_hwmod omap3xxx_mailbox_hwmod;
2932static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
2933 { .irq = 26 },
Paul Walmsley212738a2011-07-09 19:14:06 -06002934 { .irq = -1 }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002935};
2936
2937static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
2938 {
2939 .pa_start = 0x48094000,
2940 .pa_end = 0x480941ff,
2941 .flags = ADDR_TYPE_RT,
2942 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002943 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002944};
2945
2946/* l4_core -> mailbox */
2947static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2948 .master = &omap3xxx_l4_core_hwmod,
2949 .slave = &omap3xxx_mailbox_hwmod,
2950 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002951 .user = OCP_USER_MPU | OCP_USER_SDMA,
2952};
2953
2954/* mailbox slave ports */
2955static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = {
2956 &omap3xxx_l4_core__mailbox,
2957};
2958
2959static struct omap_hwmod omap3xxx_mailbox_hwmod = {
2960 .name = "mailbox",
2961 .class = &omap3xxx_mailbox_hwmod_class,
2962 .mpu_irqs = omap3xxx_mailbox_irqs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002963 .main_clk = "mailboxes_ick",
2964 .prcm = {
2965 .omap2 = {
2966 .prcm_reg_id = 1,
2967 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
2968 .module_offs = CORE_MOD,
2969 .idlest_reg_id = 1,
2970 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
2971 },
2972 },
2973 .slaves = omap3xxx_mailbox_slaves,
2974 .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves),
2975 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
2976};
2977
Charulatha V0f616a42011-02-17 09:53:10 -08002978/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002979static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2980 .master = &omap3xxx_l4_core_hwmod,
2981 .slave = &omap34xx_mcspi1,
2982 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002983 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002984 .user = OCP_USER_MPU | OCP_USER_SDMA,
2985};
2986
2987/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002988static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2989 .master = &omap3xxx_l4_core_hwmod,
2990 .slave = &omap34xx_mcspi2,
2991 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002992 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08002993 .user = OCP_USER_MPU | OCP_USER_SDMA,
2994};
2995
2996/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002997static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2998 .master = &omap3xxx_l4_core_hwmod,
2999 .slave = &omap34xx_mcspi3,
3000 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003001 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003002 .user = OCP_USER_MPU | OCP_USER_SDMA,
3003};
3004
3005/* l4 core -> mcspi4 interface */
3006static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3007 {
3008 .pa_start = 0x480ba000,
3009 .pa_end = 0x480ba0ff,
3010 .flags = ADDR_TYPE_RT,
3011 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003012 { }
Charulatha V0f616a42011-02-17 09:53:10 -08003013};
3014
3015static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3016 .master = &omap3xxx_l4_core_hwmod,
3017 .slave = &omap34xx_mcspi4,
3018 .clk = "mcspi4_ick",
3019 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003020 .user = OCP_USER_MPU | OCP_USER_SDMA,
3021};
3022
3023/*
3024 * 'mcspi' class
3025 * multichannel serial port interface (mcspi) / master/slave synchronous serial
3026 * bus
3027 */
3028
3029static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
3030 .rev_offs = 0x0000,
3031 .sysc_offs = 0x0010,
3032 .syss_offs = 0x0014,
3033 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3034 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3035 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
3036 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3037 .sysc_fields = &omap_hwmod_sysc_type1,
3038};
3039
3040static struct omap_hwmod_class omap34xx_mcspi_class = {
3041 .name = "mcspi",
3042 .sysc = &omap34xx_mcspi_sysc,
3043 .rev = OMAP3_MCSPI_REV,
3044};
3045
3046/* mcspi1 */
3047static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
3048 { .name = "irq", .irq = 65 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003049 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08003050};
3051
3052static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
3053 { .name = "tx0", .dma_req = 35 },
3054 { .name = "rx0", .dma_req = 36 },
3055 { .name = "tx1", .dma_req = 37 },
3056 { .name = "rx1", .dma_req = 38 },
3057 { .name = "tx2", .dma_req = 39 },
3058 { .name = "rx2", .dma_req = 40 },
3059 { .name = "tx3", .dma_req = 41 },
3060 { .name = "rx3", .dma_req = 42 },
3061};
3062
3063static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
3064 &omap34xx_l4_core__mcspi1,
3065};
3066
3067static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
3068 .num_chipselect = 4,
3069};
3070
3071static struct omap_hwmod omap34xx_mcspi1 = {
3072 .name = "mcspi1",
3073 .mpu_irqs = omap34xx_mcspi1_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08003074 .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
3075 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
3076 .main_clk = "mcspi1_fck",
3077 .prcm = {
3078 .omap2 = {
3079 .module_offs = CORE_MOD,
3080 .prcm_reg_id = 1,
3081 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
3082 .idlest_reg_id = 1,
3083 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
3084 },
3085 },
3086 .slaves = omap34xx_mcspi1_slaves,
3087 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves),
3088 .class = &omap34xx_mcspi_class,
3089 .dev_attr = &omap_mcspi1_dev_attr,
3090 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3091};
3092
3093/* mcspi2 */
3094static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
3095 { .name = "irq", .irq = 66 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003096 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08003097};
3098
3099static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
3100 { .name = "tx0", .dma_req = 43 },
3101 { .name = "rx0", .dma_req = 44 },
3102 { .name = "tx1", .dma_req = 45 },
3103 { .name = "rx1", .dma_req = 46 },
3104};
3105
3106static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
3107 &omap34xx_l4_core__mcspi2,
3108};
3109
3110static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
3111 .num_chipselect = 2,
3112};
3113
3114static struct omap_hwmod omap34xx_mcspi2 = {
3115 .name = "mcspi2",
3116 .mpu_irqs = omap34xx_mcspi2_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08003117 .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
3118 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
3119 .main_clk = "mcspi2_fck",
3120 .prcm = {
3121 .omap2 = {
3122 .module_offs = CORE_MOD,
3123 .prcm_reg_id = 1,
3124 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
3125 .idlest_reg_id = 1,
3126 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
3127 },
3128 },
3129 .slaves = omap34xx_mcspi2_slaves,
3130 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves),
3131 .class = &omap34xx_mcspi_class,
3132 .dev_attr = &omap_mcspi2_dev_attr,
3133 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3134};
3135
3136/* mcspi3 */
3137static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
3138 { .name = "irq", .irq = 91 }, /* 91 */
Paul Walmsley212738a2011-07-09 19:14:06 -06003139 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08003140};
3141
3142static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
3143 { .name = "tx0", .dma_req = 15 },
3144 { .name = "rx0", .dma_req = 16 },
3145 { .name = "tx1", .dma_req = 23 },
3146 { .name = "rx1", .dma_req = 24 },
3147};
3148
3149static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
3150 &omap34xx_l4_core__mcspi3,
3151};
3152
3153static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
3154 .num_chipselect = 2,
3155};
3156
3157static struct omap_hwmod omap34xx_mcspi3 = {
3158 .name = "mcspi3",
3159 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08003160 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
3161 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
3162 .main_clk = "mcspi3_fck",
3163 .prcm = {
3164 .omap2 = {
3165 .module_offs = CORE_MOD,
3166 .prcm_reg_id = 1,
3167 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
3168 .idlest_reg_id = 1,
3169 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
3170 },
3171 },
3172 .slaves = omap34xx_mcspi3_slaves,
3173 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves),
3174 .class = &omap34xx_mcspi_class,
3175 .dev_attr = &omap_mcspi3_dev_attr,
3176 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3177};
3178
3179/* SPI4 */
3180static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
3181 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
Paul Walmsley212738a2011-07-09 19:14:06 -06003182 { .irq = -1 }
Charulatha V0f616a42011-02-17 09:53:10 -08003183};
3184
3185static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
3186 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
3187 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
3188};
3189
3190static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
3191 &omap34xx_l4_core__mcspi4,
3192};
3193
3194static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
3195 .num_chipselect = 1,
3196};
3197
3198static struct omap_hwmod omap34xx_mcspi4 = {
3199 .name = "mcspi4",
3200 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
Charulatha V0f616a42011-02-17 09:53:10 -08003201 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
3202 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
3203 .main_clk = "mcspi4_fck",
3204 .prcm = {
3205 .omap2 = {
3206 .module_offs = CORE_MOD,
3207 .prcm_reg_id = 1,
3208 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
3209 .idlest_reg_id = 1,
3210 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
3211 },
3212 },
3213 .slaves = omap34xx_mcspi4_slaves,
3214 .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves),
3215 .class = &omap34xx_mcspi_class,
3216 .dev_attr = &omap_mcspi4_dev_attr,
3217 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3218};
3219
Hema HK870ea2b2011-02-17 12:07:18 +05303220/*
3221 * usbhsotg
3222 */
3223static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
3224 .rev_offs = 0x0400,
3225 .sysc_offs = 0x0404,
3226 .syss_offs = 0x0408,
3227 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
3228 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3229 SYSC_HAS_AUTOIDLE),
3230 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3231 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
3232 .sysc_fields = &omap_hwmod_sysc_type1,
3233};
3234
3235static struct omap_hwmod_class usbotg_class = {
3236 .name = "usbotg",
3237 .sysc = &omap3xxx_usbhsotg_sysc,
3238};
Hema HK870ea2b2011-02-17 12:07:18 +05303239/* usb_otg_hs */
3240static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
3241
3242 { .name = "mc", .irq = 92 },
3243 { .name = "dma", .irq = 93 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003244 { .irq = -1 }
Hema HK870ea2b2011-02-17 12:07:18 +05303245};
3246
3247static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3248 .name = "usb_otg_hs",
3249 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
Hema HK870ea2b2011-02-17 12:07:18 +05303250 .main_clk = "hsotgusb_ick",
3251 .prcm = {
3252 .omap2 = {
3253 .prcm_reg_id = 1,
3254 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
3255 .module_offs = CORE_MOD,
3256 .idlest_reg_id = 1,
3257 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
3258 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
3259 },
3260 },
3261 .masters = omap3xxx_usbhsotg_masters,
3262 .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters),
3263 .slaves = omap3xxx_usbhsotg_slaves,
3264 .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves),
3265 .class = &usbotg_class,
3266
3267 /*
3268 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
3269 * broken when autoidle is enabled
3270 * workaround is to disable the autoidle bit at module level.
3271 */
3272 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
3273 | HWMOD_SWSUP_MSTANDBY,
3274 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
3275};
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003276
Hema HK273ff8c2011-02-17 12:07:19 +05303277/* usb_otg_hs */
3278static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
3279
3280 { .name = "mc", .irq = 71 },
Paul Walmsley212738a2011-07-09 19:14:06 -06003281 { .irq = -1 }
Hema HK273ff8c2011-02-17 12:07:19 +05303282};
3283
3284static struct omap_hwmod_class am35xx_usbotg_class = {
3285 .name = "am35xx_usbotg",
3286 .sysc = NULL,
3287};
3288
3289static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3290 .name = "am35x_otg_hs",
3291 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Hema HK273ff8c2011-02-17 12:07:19 +05303292 .main_clk = NULL,
3293 .prcm = {
3294 .omap2 = {
3295 },
3296 },
3297 .masters = am35xx_usbhsotg_masters,
3298 .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters),
3299 .slaves = am35xx_usbhsotg_slaves,
3300 .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves),
3301 .class = &am35xx_usbotg_class,
3302 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1)
3303};
Hema HK870ea2b2011-02-17 12:07:18 +05303304
Paul Walmsleyb1636052011-03-01 13:12:56 -08003305/* MMC/SD/SDIO common */
3306
3307static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
3308 .rev_offs = 0x1fc,
3309 .sysc_offs = 0x10,
3310 .syss_offs = 0x14,
3311 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3312 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3313 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
3314 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
3315 .sysc_fields = &omap_hwmod_sysc_type1,
3316};
3317
3318static struct omap_hwmod_class omap34xx_mmc_class = {
3319 .name = "mmc",
3320 .sysc = &omap34xx_mmc_sysc,
3321};
3322
3323/* MMC/SD/SDIO1 */
3324
3325static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
3326 { .irq = 83, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003327 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003328};
3329
3330static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
3331 { .name = "tx", .dma_req = 61, },
3332 { .name = "rx", .dma_req = 62, },
3333};
3334
3335static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
3336 { .role = "dbck", .clk = "omap_32k_fck", },
3337};
3338
3339static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = {
3340 &omap3xxx_l4_core__mmc1,
3341};
3342
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003343static struct omap_mmc_dev_attr mmc1_dev_attr = {
3344 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3345};
3346
Paul Walmsleyb1636052011-03-01 13:12:56 -08003347static struct omap_hwmod omap3xxx_mmc1_hwmod = {
3348 .name = "mmc1",
3349 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003350 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
3351 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
3352 .opt_clks = omap34xx_mmc1_opt_clks,
3353 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
3354 .main_clk = "mmchs1_fck",
3355 .prcm = {
3356 .omap2 = {
3357 .module_offs = CORE_MOD,
3358 .prcm_reg_id = 1,
3359 .module_bit = OMAP3430_EN_MMC1_SHIFT,
3360 .idlest_reg_id = 1,
3361 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
3362 },
3363 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -08003364 .dev_attr = &mmc1_dev_attr,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003365 .slaves = omap3xxx_mmc1_slaves,
3366 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves),
3367 .class = &omap34xx_mmc_class,
3368 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3369};
3370
3371/* MMC/SD/SDIO2 */
3372
3373static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
3374 { .irq = INT_24XX_MMC2_IRQ, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003375 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003376};
3377
3378static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
3379 { .name = "tx", .dma_req = 47, },
3380 { .name = "rx", .dma_req = 48, },
3381};
3382
3383static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
3384 { .role = "dbck", .clk = "omap_32k_fck", },
3385};
3386
3387static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3388 &omap3xxx_l4_core__mmc2,
3389};
3390
3391static struct omap_hwmod omap3xxx_mmc2_hwmod = {
3392 .name = "mmc2",
3393 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003394 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
3395 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
3396 .opt_clks = omap34xx_mmc2_opt_clks,
3397 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
3398 .main_clk = "mmchs2_fck",
3399 .prcm = {
3400 .omap2 = {
3401 .module_offs = CORE_MOD,
3402 .prcm_reg_id = 1,
3403 .module_bit = OMAP3430_EN_MMC2_SHIFT,
3404 .idlest_reg_id = 1,
3405 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
3406 },
3407 },
3408 .slaves = omap3xxx_mmc2_slaves,
3409 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves),
3410 .class = &omap34xx_mmc_class,
3411 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3412};
3413
3414/* MMC/SD/SDIO3 */
3415
3416static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
3417 { .irq = 94, },
Paul Walmsley212738a2011-07-09 19:14:06 -06003418 { .irq = -1 }
Paul Walmsleyb1636052011-03-01 13:12:56 -08003419};
3420
3421static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
3422 { .name = "tx", .dma_req = 77, },
3423 { .name = "rx", .dma_req = 78, },
3424};
3425
3426static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
3427 { .role = "dbck", .clk = "omap_32k_fck", },
3428};
3429
3430static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3431 &omap3xxx_l4_core__mmc3,
3432};
3433
3434static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3435 .name = "mmc3",
3436 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003437 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
3438 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
3439 .opt_clks = omap34xx_mmc3_opt_clks,
3440 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
3441 .main_clk = "mmchs3_fck",
3442 .prcm = {
3443 .omap2 = {
3444 .prcm_reg_id = 1,
3445 .module_bit = OMAP3430_EN_MMC3_SHIFT,
3446 .idlest_reg_id = 1,
3447 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
3448 },
3449 },
3450 .slaves = omap3xxx_mmc3_slaves,
3451 .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves),
3452 .class = &omap34xx_mmc_class,
3453 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
3454};
3455
Paul Walmsley73591542010-02-22 22:09:32 -07003456static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06003457 &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003458 &omap3xxx_l4_core_hwmod,
3459 &omap3xxx_l4_per_hwmod,
3460 &omap3xxx_l4_wkup_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08003461 &omap3xxx_mmc1_hwmod,
3462 &omap3xxx_mmc2_hwmod,
3463 &omap3xxx_mmc3_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07003464 &omap3xxx_mpu_hwmod,
Kevin Hilman540064b2010-07-26 16:34:32 -06003465 &omap3xxx_iva_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07003466
3467 &omap3xxx_timer1_hwmod,
3468 &omap3xxx_timer2_hwmod,
3469 &omap3xxx_timer3_hwmod,
3470 &omap3xxx_timer4_hwmod,
3471 &omap3xxx_timer5_hwmod,
3472 &omap3xxx_timer6_hwmod,
3473 &omap3xxx_timer7_hwmod,
3474 &omap3xxx_timer8_hwmod,
3475 &omap3xxx_timer9_hwmod,
3476 &omap3xxx_timer10_hwmod,
3477 &omap3xxx_timer11_hwmod,
3478 &omap3xxx_timer12_hwmod,
3479
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05303480 &omap3xxx_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05303481 &omap3xxx_uart1_hwmod,
3482 &omap3xxx_uart2_hwmod,
3483 &omap3xxx_uart3_hwmod,
3484 &omap3xxx_uart4_hwmod,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00003485 /* dss class */
3486 &omap3430es1_dss_core_hwmod,
3487 &omap3xxx_dss_core_hwmod,
3488 &omap3xxx_dss_dispc_hwmod,
3489 &omap3xxx_dss_dsi1_hwmod,
3490 &omap3xxx_dss_rfbi_hwmod,
3491 &omap3xxx_dss_venc_hwmod,
3492
3493 /* i2c class */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05303494 &omap3xxx_i2c1_hwmod,
3495 &omap3xxx_i2c2_hwmod,
3496 &omap3xxx_i2c3_hwmod,
Thara Gopinathd3442722010-05-29 22:02:24 +05303497 &omap34xx_sr1_hwmod,
3498 &omap34xx_sr2_hwmod,
3499 &omap36xx_sr1_hwmod,
3500 &omap36xx_sr2_hwmod,
3501
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08003502
3503 /* gpio class */
3504 &omap3xxx_gpio1_hwmod,
3505 &omap3xxx_gpio2_hwmod,
3506 &omap3xxx_gpio3_hwmod,
3507 &omap3xxx_gpio4_hwmod,
3508 &omap3xxx_gpio5_hwmod,
3509 &omap3xxx_gpio6_hwmod,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08003510
3511 /* dma_system class*/
3512 &omap3xxx_dma_system_hwmod,
Charulatha V0f616a42011-02-17 09:53:10 -08003513
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303514 /* mcbsp class */
3515 &omap3xxx_mcbsp1_hwmod,
3516 &omap3xxx_mcbsp2_hwmod,
3517 &omap3xxx_mcbsp3_hwmod,
3518 &omap3xxx_mcbsp4_hwmod,
3519 &omap3xxx_mcbsp5_hwmod,
3520 &omap3xxx_mcbsp2_sidetone_hwmod,
3521 &omap3xxx_mcbsp3_sidetone_hwmod,
3522
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003523 /* mailbox class */
3524 &omap3xxx_mailbox_hwmod,
3525
Charulatha V0f616a42011-02-17 09:53:10 -08003526 /* mcspi class */
3527 &omap34xx_mcspi1,
3528 &omap34xx_mcspi2,
3529 &omap34xx_mcspi3,
3530 &omap34xx_mcspi4,
Tony Lindgren04aa67d2011-02-22 10:54:12 -08003531
Hema HK870ea2b2011-02-17 12:07:18 +05303532 /* usbotg class */
3533 &omap3xxx_usbhsotg_hwmod,
3534
Hema HK273ff8c2011-02-17 12:07:19 +05303535 /* usbotg for am35x */
3536 &am35xx_usbhsotg_hwmod,
3537
Paul Walmsley73591542010-02-22 22:09:32 -07003538 NULL,
3539};
3540
3541int __init omap3xxx_hwmod_init(void)
3542{
Paul Walmsley550c8092011-02-28 11:58:14 -07003543 return omap_hwmod_register(omap3xxx_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07003544}