blob: 5160e3509d5df336d808f8c9427e0a8827d5613e [file] [log] [blame]
Paul Walmsley02bfc0302009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
Paul Walmsley02bfc0302009-09-03 20:14:05 +03003 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley02bfc0302009-09-03 20:14:05 +03005 * 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 * XXX handle crossbar/shared link difference for L3?
Paul Walmsley73591542010-02-22 22:09:32 -070012 * XXX these should be marked initdata for multi-OMAP kernels
Paul Walmsley02bfc0302009-09-03 20:14:05 +030013 */
Tony Lindgrence491cf2009-10-20 09:40:47 -070014#include <plat/omap_hwmod.h>
Paul Walmsley02bfc0302009-09-03 20:14:05 +030015#include <mach/irqs.h>
Tony Lindgrence491cf2009-10-20 09:40:47 -070016#include <plat/cpu.h>
17#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053018#include <plat/serial.h>
Paul Walmsley20042902010-09-30 02:40:12 +053019#include <plat/i2c.h>
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -080020#include <plat/gpio.h>
Charulatha V617871d2011-02-17 09:53:09 -080021#include <plat/mcspi.h>
Thara Gopinatheddb1262011-02-23 00:14:04 -070022#include <plat/dmtimer.h>
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020023#include <plat/l3_2xxx.h>
24#include <plat/l4_2xxx.h>
Paul Walmsley02bfc0302009-09-03 20:14:05 +030025
Paul Walmsley43b40992010-02-22 22:09:34 -070026#include "omap_hwmod_common_data.h"
27
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053028#include "cm-regbits-24xx.h"
Paul Walmsley20042902010-09-30 02:40:12 +053029#include "prm-regbits-24xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070030#include "wd_timer.h"
Paul Walmsley02bfc0302009-09-03 20:14:05 +030031
Paul Walmsley73591542010-02-22 22:09:32 -070032/*
33 * OMAP2420 hardware module integration data
34 *
35 * ALl of the data in this section should be autogeneratable from the
36 * TI hardware database or other technical documentation. Data that
37 * is driver-specific or driver-kernel integration-specific belongs
38 * elsewhere.
39 */
40
Paul Walmsley02bfc0302009-09-03 20:14:05 +030041static struct omap_hwmod omap2420_mpu_hwmod;
Paul Walmsley08072ac2010-07-26 16:34:33 -060042static struct omap_hwmod omap2420_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060043static struct omap_hwmod omap2420_l3_main_hwmod;
Paul Walmsley02bfc0302009-09-03 20:14:05 +030044static struct omap_hwmod omap2420_l4_core_hwmod;
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020045static struct omap_hwmod omap2420_dss_core_hwmod;
46static struct omap_hwmod omap2420_dss_dispc_hwmod;
47static struct omap_hwmod omap2420_dss_rfbi_hwmod;
48static struct omap_hwmod omap2420_dss_venc_hwmod;
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053049static struct omap_hwmod omap2420_wd_timer2_hwmod;
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -080050static struct omap_hwmod omap2420_gpio1_hwmod;
51static struct omap_hwmod omap2420_gpio2_hwmod;
52static struct omap_hwmod omap2420_gpio3_hwmod;
53static struct omap_hwmod omap2420_gpio4_hwmod;
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -080054static struct omap_hwmod omap2420_dma_system_hwmod;
Charulatha V617871d2011-02-17 09:53:09 -080055static struct omap_hwmod omap2420_mcspi1_hwmod;
56static struct omap_hwmod omap2420_mcspi2_hwmod;
Paul Walmsley02bfc0302009-09-03 20:14:05 +030057
58/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060059static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
60 .master = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc0302009-09-03 20:14:05 +030061 .slave = &omap2420_l4_core_hwmod,
62 .user = OCP_USER_MPU | OCP_USER_SDMA,
63};
64
65/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060066static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
Paul Walmsley02bfc0302009-09-03 20:14:05 +030067 .master = &omap2420_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060068 .slave = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc0302009-09-03 20:14:05 +030069 .user = OCP_USER_MPU,
70};
71
72/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060073static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
74 &omap2420_mpu__l3_main,
Paul Walmsley02bfc0302009-09-03 20:14:05 +030075};
76
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020077/* DSS -> l3 */
78static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
79 .master = &omap2420_dss_core_hwmod,
80 .slave = &omap2420_l3_main_hwmod,
81 .fw = {
82 .omap2 = {
83 .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
84 .flags = OMAP_FIREWALL_L3,
85 }
86 },
87 .user = OCP_USER_MPU | OCP_USER_SDMA,
88};
89
Paul Walmsley02bfc0302009-09-03 20:14:05 +030090/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060091static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
92 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc0302009-09-03 20:14:05 +030093};
94
95/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060096static struct omap_hwmod omap2420_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060097 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -070098 .class = &l3_hwmod_class,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060099 .masters = omap2420_l3_main_masters,
100 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
101 .slaves = omap2420_l3_main_slaves,
102 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600103 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300104};
105
106static struct omap_hwmod omap2420_l4_wkup_hwmod;
Kevin Hilman046465b2010-09-27 20:19:30 +0530107static struct omap_hwmod omap2420_uart1_hwmod;
108static struct omap_hwmod omap2420_uart2_hwmod;
109static struct omap_hwmod omap2420_uart3_hwmod;
Paul Walmsley20042902010-09-30 02:40:12 +0530110static struct omap_hwmod omap2420_i2c1_hwmod;
111static struct omap_hwmod omap2420_i2c2_hwmod;
Charulatha V3cb72fa2011-02-24 12:51:46 -0800112static struct omap_hwmod omap2420_mcbsp1_hwmod;
113static struct omap_hwmod omap2420_mcbsp2_hwmod;
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300114
Charulatha V617871d2011-02-17 09:53:09 -0800115/* l4 core -> mcspi1 interface */
Charulatha V617871d2011-02-17 09:53:09 -0800116static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
117 .master = &omap2420_l4_core_hwmod,
118 .slave = &omap2420_mcspi1_hwmod,
119 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600120 .addr = omap2_mcspi1_addr_space,
Charulatha V617871d2011-02-17 09:53:09 -0800121 .user = OCP_USER_MPU | OCP_USER_SDMA,
122};
123
124/* l4 core -> mcspi2 interface */
Charulatha V617871d2011-02-17 09:53:09 -0800125static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
126 .master = &omap2420_l4_core_hwmod,
127 .slave = &omap2420_mcspi2_hwmod,
128 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600129 .addr = omap2_mcspi2_addr_space,
Charulatha V617871d2011-02-17 09:53:09 -0800130 .user = OCP_USER_MPU | OCP_USER_SDMA,
131};
132
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300133/* L4_CORE -> L4_WKUP interface */
134static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
135 .master = &omap2420_l4_core_hwmod,
136 .slave = &omap2420_l4_wkup_hwmod,
137 .user = OCP_USER_MPU | OCP_USER_SDMA,
138};
139
Kevin Hilman046465b2010-09-27 20:19:30 +0530140/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530141static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
142 .master = &omap2420_l4_core_hwmod,
143 .slave = &omap2420_uart1_hwmod,
144 .clk = "uart1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600145 .addr = omap2xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530146 .user = OCP_USER_MPU | OCP_USER_SDMA,
147};
148
149/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530150static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
151 .master = &omap2420_l4_core_hwmod,
152 .slave = &omap2420_uart2_hwmod,
153 .clk = "uart2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600154 .addr = omap2xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530155 .user = OCP_USER_MPU | OCP_USER_SDMA,
156};
157
158/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +0530159static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
160 .master = &omap2420_l4_core_hwmod,
161 .slave = &omap2420_uart3_hwmod,
162 .clk = "uart3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600163 .addr = omap2xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +0530164 .user = OCP_USER_MPU | OCP_USER_SDMA,
165};
166
Paul Walmsley20042902010-09-30 02:40:12 +0530167/* L4 CORE -> I2C1 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530168static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
169 .master = &omap2420_l4_core_hwmod,
170 .slave = &omap2420_i2c1_hwmod,
171 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600172 .addr = omap2_i2c1_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530173 .user = OCP_USER_MPU | OCP_USER_SDMA,
174};
175
176/* L4 CORE -> I2C2 interface */
Paul Walmsley20042902010-09-30 02:40:12 +0530177static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
178 .master = &omap2420_l4_core_hwmod,
179 .slave = &omap2420_i2c2_hwmod,
180 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600181 .addr = omap2_i2c2_addr_space,
Paul Walmsley20042902010-09-30 02:40:12 +0530182 .user = OCP_USER_MPU | OCP_USER_SDMA,
183};
184
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300185/* Slave interfaces on the L4_CORE interconnect */
186static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600187 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300188};
189
190/* Master interfaces on the L4_CORE interconnect */
191static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
192 &omap2420_l4_core__l4_wkup,
Kevin Hilman046465b2010-09-27 20:19:30 +0530193 &omap2_l4_core__uart1,
194 &omap2_l4_core__uart2,
195 &omap2_l4_core__uart3,
Paul Walmsley20042902010-09-30 02:40:12 +0530196 &omap2420_l4_core__i2c1,
197 &omap2420_l4_core__i2c2
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300198};
199
200/* L4 CORE */
201static struct omap_hwmod omap2420_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600202 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -0700203 .class = &l4_hwmod_class,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300204 .masters = omap2420_l4_core_masters,
205 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
206 .slaves = omap2420_l4_core_slaves,
207 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600208 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300209};
210
211/* Slave interfaces on the L4_WKUP interconnect */
212static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
213 &omap2420_l4_core__l4_wkup,
214};
215
216/* Master interfaces on the L4_WKUP interconnect */
217static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
218};
219
220/* L4 WKUP */
221static struct omap_hwmod omap2420_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600222 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700223 .class = &l4_hwmod_class,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300224 .masters = omap2420_l4_wkup_masters,
225 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
226 .slaves = omap2420_l4_wkup_slaves,
227 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600228 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300229};
230
231/* Master interfaces on the MPU device */
232static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600233 &omap2420_mpu__l3_main,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300234};
235
236/* MPU */
237static struct omap_hwmod omap2420_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600238 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700239 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700240 .main_clk = "mpu_ck",
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300241 .masters = omap2420_mpu_masters,
242 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300243};
244
Paul Walmsley08072ac2010-07-26 16:34:33 -0600245/*
246 * IVA1 interface data
247 */
248
249/* IVA <- L3 interface */
250static struct omap_hwmod_ocp_if omap2420_l3__iva = {
251 .master = &omap2420_l3_main_hwmod,
252 .slave = &omap2420_iva_hwmod,
253 .clk = "iva1_ifck",
254 .user = OCP_USER_MPU | OCP_USER_SDMA,
255};
256
257static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
258 &omap2420_l3__iva,
259};
260
261/*
262 * IVA2 (IVA2)
263 */
264
265static struct omap_hwmod omap2420_iva_hwmod = {
266 .name = "iva",
267 .class = &iva_hwmod_class,
268 .masters = omap2420_iva_masters,
269 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
Paul Walmsley08072ac2010-07-26 16:34:33 -0600270};
271
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530272/* always-on timers dev attribute */
273static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
274 .timer_capability = OMAP_TIMER_ALWON,
275};
276
277/* pwm timers dev attribute */
278static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
279 .timer_capability = OMAP_TIMER_HAS_PWM,
280};
281
Thara Gopinatheddb1262011-02-23 00:14:04 -0700282/* timer1 */
283static struct omap_hwmod omap2420_timer1_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700284
285static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
286 {
287 .pa_start = 0x48028000,
288 .pa_end = 0x48028000 + SZ_1K - 1,
289 .flags = ADDR_TYPE_RT
290 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600291 { }
Thara Gopinatheddb1262011-02-23 00:14:04 -0700292};
293
294/* l4_wkup -> timer1 */
295static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
296 .master = &omap2420_l4_wkup_hwmod,
297 .slave = &omap2420_timer1_hwmod,
298 .clk = "gpt1_ick",
299 .addr = omap2420_timer1_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700300 .user = OCP_USER_MPU | OCP_USER_SDMA,
301};
302
303/* timer1 slave port */
304static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
305 &omap2420_l4_wkup__timer1,
306};
307
308/* timer1 hwmod */
309static struct omap_hwmod omap2420_timer1_hwmod = {
310 .name = "timer1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600311 .mpu_irqs = omap2_timer1_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700312 .main_clk = "gpt1_fck",
313 .prcm = {
314 .omap2 = {
315 .prcm_reg_id = 1,
316 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
317 .module_offs = WKUP_MOD,
318 .idlest_reg_id = 1,
319 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
320 },
321 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530322 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700323 .slaves = omap2420_timer1_slaves,
324 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600325 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700326};
327
328/* timer2 */
329static struct omap_hwmod omap2420_timer2_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700330
331/* l4_core -> timer2 */
332static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
333 .master = &omap2420_l4_core_hwmod,
334 .slave = &omap2420_timer2_hwmod,
335 .clk = "gpt2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600336 .addr = omap2xxx_timer2_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700337 .user = OCP_USER_MPU | OCP_USER_SDMA,
338};
339
340/* timer2 slave port */
341static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
342 &omap2420_l4_core__timer2,
343};
344
345/* timer2 hwmod */
346static struct omap_hwmod omap2420_timer2_hwmod = {
347 .name = "timer2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600348 .mpu_irqs = omap2_timer2_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700349 .main_clk = "gpt2_fck",
350 .prcm = {
351 .omap2 = {
352 .prcm_reg_id = 1,
353 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
354 .module_offs = CORE_MOD,
355 .idlest_reg_id = 1,
356 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
357 },
358 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530359 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700360 .slaves = omap2420_timer2_slaves,
361 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600362 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700363};
364
365/* timer3 */
366static struct omap_hwmod omap2420_timer3_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700367
Thara Gopinatheddb1262011-02-23 00:14:04 -0700368/* l4_core -> timer3 */
369static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
370 .master = &omap2420_l4_core_hwmod,
371 .slave = &omap2420_timer3_hwmod,
372 .clk = "gpt3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600373 .addr = omap2xxx_timer3_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700374 .user = OCP_USER_MPU | OCP_USER_SDMA,
375};
376
377/* timer3 slave port */
378static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
379 &omap2420_l4_core__timer3,
380};
381
382/* timer3 hwmod */
383static struct omap_hwmod omap2420_timer3_hwmod = {
384 .name = "timer3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600385 .mpu_irqs = omap2_timer3_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700386 .main_clk = "gpt3_fck",
387 .prcm = {
388 .omap2 = {
389 .prcm_reg_id = 1,
390 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
391 .module_offs = CORE_MOD,
392 .idlest_reg_id = 1,
393 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
394 },
395 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530396 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700397 .slaves = omap2420_timer3_slaves,
398 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600399 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700400};
401
402/* timer4 */
403static struct omap_hwmod omap2420_timer4_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700404
Thara Gopinatheddb1262011-02-23 00:14:04 -0700405/* l4_core -> timer4 */
406static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
407 .master = &omap2420_l4_core_hwmod,
408 .slave = &omap2420_timer4_hwmod,
409 .clk = "gpt4_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600410 .addr = omap2xxx_timer4_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700411 .user = OCP_USER_MPU | OCP_USER_SDMA,
412};
413
414/* timer4 slave port */
415static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
416 &omap2420_l4_core__timer4,
417};
418
419/* timer4 hwmod */
420static struct omap_hwmod omap2420_timer4_hwmod = {
421 .name = "timer4",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600422 .mpu_irqs = omap2_timer4_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700423 .main_clk = "gpt4_fck",
424 .prcm = {
425 .omap2 = {
426 .prcm_reg_id = 1,
427 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
428 .module_offs = CORE_MOD,
429 .idlest_reg_id = 1,
430 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
431 },
432 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530433 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700434 .slaves = omap2420_timer4_slaves,
435 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600436 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700437};
438
439/* timer5 */
440static struct omap_hwmod omap2420_timer5_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700441
Thara Gopinatheddb1262011-02-23 00:14:04 -0700442/* l4_core -> timer5 */
443static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
444 .master = &omap2420_l4_core_hwmod,
445 .slave = &omap2420_timer5_hwmod,
446 .clk = "gpt5_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600447 .addr = omap2xxx_timer5_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* timer5 slave port */
452static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
453 &omap2420_l4_core__timer5,
454};
455
456/* timer5 hwmod */
457static struct omap_hwmod omap2420_timer5_hwmod = {
458 .name = "timer5",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600459 .mpu_irqs = omap2_timer5_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700460 .main_clk = "gpt5_fck",
461 .prcm = {
462 .omap2 = {
463 .prcm_reg_id = 1,
464 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
465 .module_offs = CORE_MOD,
466 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
468 },
469 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530470 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700471 .slaves = omap2420_timer5_slaves,
472 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600473 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700474};
475
476
477/* timer6 */
478static struct omap_hwmod omap2420_timer6_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700479
Thara Gopinatheddb1262011-02-23 00:14:04 -0700480/* l4_core -> timer6 */
481static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
482 .master = &omap2420_l4_core_hwmod,
483 .slave = &omap2420_timer6_hwmod,
484 .clk = "gpt6_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600485 .addr = omap2xxx_timer6_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700486 .user = OCP_USER_MPU | OCP_USER_SDMA,
487};
488
489/* timer6 slave port */
490static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
491 &omap2420_l4_core__timer6,
492};
493
494/* timer6 hwmod */
495static struct omap_hwmod omap2420_timer6_hwmod = {
496 .name = "timer6",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600497 .mpu_irqs = omap2_timer6_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700498 .main_clk = "gpt6_fck",
499 .prcm = {
500 .omap2 = {
501 .prcm_reg_id = 1,
502 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
503 .module_offs = CORE_MOD,
504 .idlest_reg_id = 1,
505 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
506 },
507 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530508 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700509 .slaves = omap2420_timer6_slaves,
510 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600511 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700512};
513
514/* timer7 */
515static struct omap_hwmod omap2420_timer7_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700516
Thara Gopinatheddb1262011-02-23 00:14:04 -0700517/* l4_core -> timer7 */
518static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
519 .master = &omap2420_l4_core_hwmod,
520 .slave = &omap2420_timer7_hwmod,
521 .clk = "gpt7_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600522 .addr = omap2xxx_timer7_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700523 .user = OCP_USER_MPU | OCP_USER_SDMA,
524};
525
526/* timer7 slave port */
527static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
528 &omap2420_l4_core__timer7,
529};
530
531/* timer7 hwmod */
532static struct omap_hwmod omap2420_timer7_hwmod = {
533 .name = "timer7",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600534 .mpu_irqs = omap2_timer7_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700535 .main_clk = "gpt7_fck",
536 .prcm = {
537 .omap2 = {
538 .prcm_reg_id = 1,
539 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
540 .module_offs = CORE_MOD,
541 .idlest_reg_id = 1,
542 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
543 },
544 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530545 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700546 .slaves = omap2420_timer7_slaves,
547 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600548 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700549};
550
551/* timer8 */
552static struct omap_hwmod omap2420_timer8_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700553
Thara Gopinatheddb1262011-02-23 00:14:04 -0700554/* l4_core -> timer8 */
555static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
556 .master = &omap2420_l4_core_hwmod,
557 .slave = &omap2420_timer8_hwmod,
558 .clk = "gpt8_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600559 .addr = omap2xxx_timer8_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700560 .user = OCP_USER_MPU | OCP_USER_SDMA,
561};
562
563/* timer8 slave port */
564static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
565 &omap2420_l4_core__timer8,
566};
567
568/* timer8 hwmod */
569static struct omap_hwmod omap2420_timer8_hwmod = {
570 .name = "timer8",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600571 .mpu_irqs = omap2_timer8_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700572 .main_clk = "gpt8_fck",
573 .prcm = {
574 .omap2 = {
575 .prcm_reg_id = 1,
576 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
577 .module_offs = CORE_MOD,
578 .idlest_reg_id = 1,
579 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
580 },
581 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530582 .dev_attr = &capability_alwon_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700583 .slaves = omap2420_timer8_slaves,
584 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600585 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700586};
587
588/* timer9 */
589static struct omap_hwmod omap2420_timer9_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700590
Thara Gopinatheddb1262011-02-23 00:14:04 -0700591/* l4_core -> timer9 */
592static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
593 .master = &omap2420_l4_core_hwmod,
594 .slave = &omap2420_timer9_hwmod,
595 .clk = "gpt9_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600596 .addr = omap2xxx_timer9_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700597 .user = OCP_USER_MPU | OCP_USER_SDMA,
598};
599
600/* timer9 slave port */
601static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
602 &omap2420_l4_core__timer9,
603};
604
605/* timer9 hwmod */
606static struct omap_hwmod omap2420_timer9_hwmod = {
607 .name = "timer9",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600608 .mpu_irqs = omap2_timer9_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700609 .main_clk = "gpt9_fck",
610 .prcm = {
611 .omap2 = {
612 .prcm_reg_id = 1,
613 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
614 .module_offs = CORE_MOD,
615 .idlest_reg_id = 1,
616 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
617 },
618 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530619 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700620 .slaves = omap2420_timer9_slaves,
621 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600622 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700623};
624
625/* timer10 */
626static struct omap_hwmod omap2420_timer10_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700627
Thara Gopinatheddb1262011-02-23 00:14:04 -0700628/* l4_core -> timer10 */
629static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
630 .master = &omap2420_l4_core_hwmod,
631 .slave = &omap2420_timer10_hwmod,
632 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600633 .addr = omap2_timer10_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700634 .user = OCP_USER_MPU | OCP_USER_SDMA,
635};
636
637/* timer10 slave port */
638static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
639 &omap2420_l4_core__timer10,
640};
641
642/* timer10 hwmod */
643static struct omap_hwmod omap2420_timer10_hwmod = {
644 .name = "timer10",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600645 .mpu_irqs = omap2_timer10_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700646 .main_clk = "gpt10_fck",
647 .prcm = {
648 .omap2 = {
649 .prcm_reg_id = 1,
650 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
651 .module_offs = CORE_MOD,
652 .idlest_reg_id = 1,
653 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
654 },
655 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530656 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700657 .slaves = omap2420_timer10_slaves,
658 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600659 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700660};
661
662/* timer11 */
663static struct omap_hwmod omap2420_timer11_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700664
Thara Gopinatheddb1262011-02-23 00:14:04 -0700665/* l4_core -> timer11 */
666static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
667 .master = &omap2420_l4_core_hwmod,
668 .slave = &omap2420_timer11_hwmod,
669 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600670 .addr = omap2_timer11_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700671 .user = OCP_USER_MPU | OCP_USER_SDMA,
672};
673
674/* timer11 slave port */
675static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
676 &omap2420_l4_core__timer11,
677};
678
679/* timer11 hwmod */
680static struct omap_hwmod omap2420_timer11_hwmod = {
681 .name = "timer11",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600682 .mpu_irqs = omap2_timer11_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700683 .main_clk = "gpt11_fck",
684 .prcm = {
685 .omap2 = {
686 .prcm_reg_id = 1,
687 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
688 .module_offs = CORE_MOD,
689 .idlest_reg_id = 1,
690 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
691 },
692 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530693 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700694 .slaves = omap2420_timer11_slaves,
695 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600696 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700697};
698
699/* timer12 */
700static struct omap_hwmod omap2420_timer12_hwmod;
Thara Gopinatheddb1262011-02-23 00:14:04 -0700701
Thara Gopinatheddb1262011-02-23 00:14:04 -0700702/* l4_core -> timer12 */
703static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
704 .master = &omap2420_l4_core_hwmod,
705 .slave = &omap2420_timer12_hwmod,
706 .clk = "gpt12_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600707 .addr = omap2xxx_timer12_addrs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700708 .user = OCP_USER_MPU | OCP_USER_SDMA,
709};
710
711/* timer12 slave port */
712static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
713 &omap2420_l4_core__timer12,
714};
715
716/* timer12 hwmod */
717static struct omap_hwmod omap2420_timer12_hwmod = {
718 .name = "timer12",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600719 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700720 .main_clk = "gpt12_fck",
721 .prcm = {
722 .omap2 = {
723 .prcm_reg_id = 1,
724 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
725 .module_offs = CORE_MOD,
726 .idlest_reg_id = 1,
727 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
728 },
729 },
Tarun Kanti DebBarmac345c8b2011-09-20 17:00:18 +0530730 .dev_attr = &capability_pwm_dev_attr,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700731 .slaves = omap2420_timer12_slaves,
732 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600733 .class = &omap2xxx_timer_hwmod_class,
Thara Gopinatheddb1262011-02-23 00:14:04 -0700734};
735
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530736/* l4_wkup -> wd_timer2 */
737static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
738 {
739 .pa_start = 0x48022000,
740 .pa_end = 0x4802207f,
741 .flags = ADDR_TYPE_RT
742 },
Paul Walmsley78183f32011-07-09 19:14:05 -0600743 { }
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530744};
745
746static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
747 .master = &omap2420_l4_wkup_hwmod,
748 .slave = &omap2420_wd_timer2_hwmod,
749 .clk = "mpu_wdt_ick",
750 .addr = omap2420_wd_timer2_addrs,
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530751 .user = OCP_USER_MPU | OCP_USER_SDMA,
752};
753
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530754/* wd_timer2 */
755static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
756 &omap2420_l4_wkup__wd_timer2,
757};
758
759static struct omap_hwmod omap2420_wd_timer2_hwmod = {
760 .name = "wd_timer2",
Paul Walmsley273b9462011-07-09 19:14:08 -0600761 .class = &omap2xxx_wd_timer_hwmod_class,
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530762 .main_clk = "mpu_wdt_fck",
763 .prcm = {
764 .omap2 = {
765 .prcm_reg_id = 1,
766 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
767 .module_offs = WKUP_MOD,
768 .idlest_reg_id = 1,
769 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
770 },
771 },
772 .slaves = omap2420_wd_timer2_slaves,
773 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530774};
775
Kevin Hilman046465b2010-09-27 20:19:30 +0530776/* UART1 */
777
Kevin Hilman046465b2010-09-27 20:19:30 +0530778static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
779 &omap2_l4_core__uart1,
780};
781
782static struct omap_hwmod omap2420_uart1_hwmod = {
783 .name = "uart1",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600784 .mpu_irqs = omap2_uart1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600785 .sdma_reqs = omap2_uart1_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530786 .main_clk = "uart1_fck",
787 .prcm = {
788 .omap2 = {
789 .module_offs = CORE_MOD,
790 .prcm_reg_id = 1,
791 .module_bit = OMAP24XX_EN_UART1_SHIFT,
792 .idlest_reg_id = 1,
793 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
794 },
795 },
796 .slaves = omap2420_uart1_slaves,
797 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600798 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530799};
800
801/* UART2 */
802
Kevin Hilman046465b2010-09-27 20:19:30 +0530803static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
804 &omap2_l4_core__uart2,
805};
806
807static struct omap_hwmod omap2420_uart2_hwmod = {
808 .name = "uart2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600809 .mpu_irqs = omap2_uart2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600810 .sdma_reqs = omap2_uart2_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530811 .main_clk = "uart2_fck",
812 .prcm = {
813 .omap2 = {
814 .module_offs = CORE_MOD,
815 .prcm_reg_id = 1,
816 .module_bit = OMAP24XX_EN_UART2_SHIFT,
817 .idlest_reg_id = 1,
818 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
819 },
820 },
821 .slaves = omap2420_uart2_slaves,
822 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600823 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530824};
825
826/* UART3 */
827
Kevin Hilman046465b2010-09-27 20:19:30 +0530828static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
829 &omap2_l4_core__uart3,
830};
831
832static struct omap_hwmod omap2420_uart3_hwmod = {
833 .name = "uart3",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600834 .mpu_irqs = omap2_uart3_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600835 .sdma_reqs = omap2_uart3_sdma_reqs,
Kevin Hilman046465b2010-09-27 20:19:30 +0530836 .main_clk = "uart3_fck",
837 .prcm = {
838 .omap2 = {
839 .module_offs = CORE_MOD,
840 .prcm_reg_id = 2,
841 .module_bit = OMAP24XX_EN_UART3_SHIFT,
842 .idlest_reg_id = 2,
843 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
844 },
845 },
846 .slaves = omap2420_uart3_slaves,
847 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -0600848 .class = &omap2_uart_class,
Kevin Hilman046465b2010-09-27 20:19:30 +0530849};
850
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200851/* dss */
852/* dss master ports */
853static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
854 &omap2420_dss__l3,
855};
856
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200857/* l4_core -> dss */
858static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
859 .master = &omap2420_l4_core_hwmod,
860 .slave = &omap2420_dss_core_hwmod,
861 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600862 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200863 .fw = {
864 .omap2 = {
865 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
866 .flags = OMAP_FIREWALL_L4,
867 }
868 },
869 .user = OCP_USER_MPU | OCP_USER_SDMA,
870};
871
872/* dss slave ports */
873static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
874 &omap2420_l4_core__dss,
875};
876
877static struct omap_hwmod_opt_clk dss_opt_clks[] = {
Tomi Valkeinen1258ea52011-11-08 03:16:09 -0700878 /*
879 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
880 * driver does not use these clocks.
881 */
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200882 { .role = "tv_clk", .clk = "dss_54m_fck" },
883 { .role = "sys_clk", .clk = "dss2_fck" },
884};
885
886static struct omap_hwmod omap2420_dss_core_hwmod = {
887 .name = "dss_core",
Paul Walmsley273b9462011-07-09 19:14:08 -0600888 .class = &omap2_dss_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200889 .main_clk = "dss1_fck", /* instead of dss_fck */
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600890 .sdma_reqs = omap2xxx_dss_sdma_chs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200891 .prcm = {
892 .omap2 = {
893 .prcm_reg_id = 1,
894 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
895 .module_offs = CORE_MOD,
896 .idlest_reg_id = 1,
897 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
898 },
899 },
900 .opt_clks = dss_opt_clks,
901 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
902 .slaves = omap2420_dss_slaves,
903 .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
904 .masters = omap2420_dss_masters,
905 .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
Tomi Valkeinen1258ea52011-11-08 03:16:09 -0700906 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200907};
908
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200909/* l4_core -> dss_dispc */
910static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
911 .master = &omap2420_l4_core_hwmod,
912 .slave = &omap2420_dss_dispc_hwmod,
913 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600914 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200915 .fw = {
916 .omap2 = {
917 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
918 .flags = OMAP_FIREWALL_L4,
919 }
920 },
921 .user = OCP_USER_MPU | OCP_USER_SDMA,
922};
923
924/* dss_dispc slave ports */
925static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
926 &omap2420_l4_core__dss_dispc,
927};
928
929static struct omap_hwmod omap2420_dss_dispc_hwmod = {
930 .name = "dss_dispc",
Paul Walmsley273b9462011-07-09 19:14:08 -0600931 .class = &omap2_dispc_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600932 .mpu_irqs = omap2_dispc_irqs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200933 .main_clk = "dss1_fck",
934 .prcm = {
935 .omap2 = {
936 .prcm_reg_id = 1,
937 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
938 .module_offs = CORE_MOD,
939 .idlest_reg_id = 1,
940 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
941 },
942 },
943 .slaves = omap2420_dss_dispc_slaves,
944 .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200945 .flags = HWMOD_NO_IDLEST,
946};
947
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200948/* l4_core -> dss_rfbi */
949static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
950 .master = &omap2420_l4_core_hwmod,
951 .slave = &omap2420_dss_rfbi_hwmod,
952 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600953 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200954 .fw = {
955 .omap2 = {
956 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
957 .flags = OMAP_FIREWALL_L4,
958 }
959 },
960 .user = OCP_USER_MPU | OCP_USER_SDMA,
961};
962
963/* dss_rfbi slave ports */
964static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
965 &omap2420_l4_core__dss_rfbi,
966};
967
968static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
969 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -0600970 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200971 .main_clk = "dss1_fck",
972 .prcm = {
973 .omap2 = {
974 .prcm_reg_id = 1,
975 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
976 .module_offs = CORE_MOD,
977 },
978 },
979 .slaves = omap2420_dss_rfbi_slaves,
980 .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200981 .flags = HWMOD_NO_IDLEST,
982};
983
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200984/* l4_core -> dss_venc */
985static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
986 .master = &omap2420_l4_core_hwmod,
987 .slave = &omap2420_dss_venc_hwmod,
988 .clk = "dss_54m_fck",
Paul Walmsleyded11382011-07-09 19:14:06 -0600989 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200990 .fw = {
991 .omap2 = {
992 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
993 .flags = OMAP_FIREWALL_L4,
994 }
995 },
Paul Walmsleyc39bee82011-03-04 06:02:15 +0000996 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200997 .user = OCP_USER_MPU | OCP_USER_SDMA,
998};
999
1000/* dss_venc slave ports */
1001static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1002 &omap2420_l4_core__dss_venc,
1003};
1004
1005static struct omap_hwmod omap2420_dss_venc_hwmod = {
1006 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001007 .class = &omap2_venc_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001008 .main_clk = "dss1_fck",
1009 .prcm = {
1010 .omap2 = {
1011 .prcm_reg_id = 1,
1012 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1013 .module_offs = CORE_MOD,
1014 },
1015 },
1016 .slaves = omap2420_dss_venc_slaves,
1017 .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001018 .flags = HWMOD_NO_IDLEST,
1019};
1020
Paul Walmsley20042902010-09-30 02:40:12 +05301021/* I2C common */
1022static struct omap_hwmod_class_sysconfig i2c_sysc = {
1023 .rev_offs = 0x00,
1024 .sysc_offs = 0x20,
1025 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001026 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +05301027 .sysc_fields = &omap_hwmod_sysc_type1,
1028};
1029
1030static struct omap_hwmod_class i2c_class = {
1031 .name = "i2c",
1032 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06001033 .rev = OMAP_I2C_IP_VERSION_1,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06001034 .reset = &omap_i2c_reset,
Paul Walmsley20042902010-09-30 02:40:12 +05301035};
1036
Andy Green4d4441a2011-07-10 05:27:16 -06001037static struct omap_i2c_dev_attr i2c_dev_attr = {
1038 .flags = OMAP_I2C_FLAG_NO_FIFO |
1039 OMAP_I2C_FLAG_SIMPLE_CLOCK |
1040 OMAP_I2C_FLAG_16BIT_DATA_REG |
1041 OMAP_I2C_FLAG_BUS_SHIFT_2,
1042};
Paul Walmsley20042902010-09-30 02:40:12 +05301043
1044/* I2C1 */
1045
Paul Walmsley20042902010-09-30 02:40:12 +05301046static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1047 &omap2420_l4_core__i2c1,
1048};
1049
1050static struct omap_hwmod omap2420_i2c1_hwmod = {
1051 .name = "i2c1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001052 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001053 .sdma_reqs = omap2_i2c1_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301054 .main_clk = "i2c1_fck",
1055 .prcm = {
1056 .omap2 = {
1057 .module_offs = CORE_MOD,
1058 .prcm_reg_id = 1,
1059 .module_bit = OMAP2420_EN_I2C1_SHIFT,
1060 .idlest_reg_id = 1,
1061 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1062 },
1063 },
1064 .slaves = omap2420_i2c1_slaves,
1065 .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1066 .class = &i2c_class,
1067 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301068 .flags = HWMOD_16BIT_REG,
1069};
1070
1071/* I2C2 */
1072
Paul Walmsley20042902010-09-30 02:40:12 +05301073static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1074 &omap2420_l4_core__i2c2,
1075};
1076
1077static struct omap_hwmod omap2420_i2c2_hwmod = {
1078 .name = "i2c2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001079 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001080 .sdma_reqs = omap2_i2c2_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301081 .main_clk = "i2c2_fck",
1082 .prcm = {
1083 .omap2 = {
1084 .module_offs = CORE_MOD,
1085 .prcm_reg_id = 1,
1086 .module_bit = OMAP2420_EN_I2C2_SHIFT,
1087 .idlest_reg_id = 1,
1088 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1089 },
1090 },
1091 .slaves = omap2420_i2c2_slaves,
1092 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1093 .class = &i2c_class,
1094 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301095 .flags = HWMOD_16BIT_REG,
1096};
1097
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001098/* l4_wkup -> gpio1 */
1099static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1100 {
1101 .pa_start = 0x48018000,
1102 .pa_end = 0x480181ff,
1103 .flags = ADDR_TYPE_RT
1104 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001105 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001106};
1107
1108static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1109 .master = &omap2420_l4_wkup_hwmod,
1110 .slave = &omap2420_gpio1_hwmod,
1111 .clk = "gpios_ick",
1112 .addr = omap2420_gpio1_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001113 .user = OCP_USER_MPU | OCP_USER_SDMA,
1114};
1115
1116/* l4_wkup -> gpio2 */
1117static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1118 {
1119 .pa_start = 0x4801a000,
1120 .pa_end = 0x4801a1ff,
1121 .flags = ADDR_TYPE_RT
1122 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001123 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001124};
1125
1126static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1127 .master = &omap2420_l4_wkup_hwmod,
1128 .slave = &omap2420_gpio2_hwmod,
1129 .clk = "gpios_ick",
1130 .addr = omap2420_gpio2_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001131 .user = OCP_USER_MPU | OCP_USER_SDMA,
1132};
1133
1134/* l4_wkup -> gpio3 */
1135static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1136 {
1137 .pa_start = 0x4801c000,
1138 .pa_end = 0x4801c1ff,
1139 .flags = ADDR_TYPE_RT
1140 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001141 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001142};
1143
1144static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1145 .master = &omap2420_l4_wkup_hwmod,
1146 .slave = &omap2420_gpio3_hwmod,
1147 .clk = "gpios_ick",
1148 .addr = omap2420_gpio3_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001149 .user = OCP_USER_MPU | OCP_USER_SDMA,
1150};
1151
1152/* l4_wkup -> gpio4 */
1153static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1154 {
1155 .pa_start = 0x4801e000,
1156 .pa_end = 0x4801e1ff,
1157 .flags = ADDR_TYPE_RT
1158 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001159 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001160};
1161
1162static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1163 .master = &omap2420_l4_wkup_hwmod,
1164 .slave = &omap2420_gpio4_hwmod,
1165 .clk = "gpios_ick",
1166 .addr = omap2420_gpio4_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001167 .user = OCP_USER_MPU | OCP_USER_SDMA,
1168};
1169
1170/* gpio dev_attr */
1171static struct omap_gpio_dev_attr gpio_dev_attr = {
1172 .bank_width = 32,
1173 .dbck_flag = false,
1174};
1175
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001176/* gpio1 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001177static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1178 &omap2420_l4_wkup__gpio1,
1179};
1180
1181static struct omap_hwmod omap2420_gpio1_hwmod = {
1182 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301183 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001184 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001185 .main_clk = "gpios_fck",
1186 .prcm = {
1187 .omap2 = {
1188 .prcm_reg_id = 1,
1189 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1190 .module_offs = WKUP_MOD,
1191 .idlest_reg_id = 1,
1192 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1193 },
1194 },
1195 .slaves = omap2420_gpio1_slaves,
1196 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001197 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001198 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001199};
1200
1201/* gpio2 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001202static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1203 &omap2420_l4_wkup__gpio2,
1204};
1205
1206static struct omap_hwmod omap2420_gpio2_hwmod = {
1207 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301208 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001209 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001210 .main_clk = "gpios_fck",
1211 .prcm = {
1212 .omap2 = {
1213 .prcm_reg_id = 1,
1214 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1215 .module_offs = WKUP_MOD,
1216 .idlest_reg_id = 1,
1217 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1218 },
1219 },
1220 .slaves = omap2420_gpio2_slaves,
1221 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001222 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001223 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001224};
1225
1226/* gpio3 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001227static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1228 &omap2420_l4_wkup__gpio3,
1229};
1230
1231static struct omap_hwmod omap2420_gpio3_hwmod = {
1232 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301233 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001234 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001235 .main_clk = "gpios_fck",
1236 .prcm = {
1237 .omap2 = {
1238 .prcm_reg_id = 1,
1239 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1240 .module_offs = WKUP_MOD,
1241 .idlest_reg_id = 1,
1242 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1243 },
1244 },
1245 .slaves = omap2420_gpio3_slaves,
1246 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001247 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001248 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001249};
1250
1251/* gpio4 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001252static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1253 &omap2420_l4_wkup__gpio4,
1254};
1255
1256static struct omap_hwmod omap2420_gpio4_hwmod = {
1257 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301258 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001259 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001260 .main_clk = "gpios_fck",
1261 .prcm = {
1262 .omap2 = {
1263 .prcm_reg_id = 1,
1264 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1265 .module_offs = WKUP_MOD,
1266 .idlest_reg_id = 1,
1267 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1268 },
1269 },
1270 .slaves = omap2420_gpio4_slaves,
1271 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001272 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001273 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001274};
1275
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001276/* dma attributes */
1277static struct omap_dma_dev_attr dma_dev_attr = {
1278 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1279 IS_CSSA_32 | IS_CDSA_32,
1280 .lch_count = 32,
1281};
1282
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001283/* dma_system -> L3 */
1284static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1285 .master = &omap2420_dma_system_hwmod,
1286 .slave = &omap2420_l3_main_hwmod,
1287 .clk = "core_l3_ck",
1288 .user = OCP_USER_MPU | OCP_USER_SDMA,
1289};
1290
1291/* dma_system master ports */
1292static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1293 &omap2420_dma_system__l3,
1294};
1295
1296/* l4_core -> dma_system */
1297static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1298 .master = &omap2420_l4_core_hwmod,
1299 .slave = &omap2420_dma_system_hwmod,
1300 .clk = "sdma_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001301 .addr = omap2_dma_system_addrs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001302 .user = OCP_USER_MPU | OCP_USER_SDMA,
1303};
1304
1305/* dma_system slave ports */
1306static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1307 &omap2420_l4_core__dma_system,
1308};
1309
1310static struct omap_hwmod omap2420_dma_system_hwmod = {
1311 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -06001312 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001313 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001314 .main_clk = "core_l3_ck",
1315 .slaves = omap2420_dma_system_slaves,
1316 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1317 .masters = omap2420_dma_system_masters,
1318 .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1319 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001320 .flags = HWMOD_NO_IDLEST,
1321};
1322
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001323/* mailbox */
1324static struct omap_hwmod omap2420_mailbox_hwmod;
1325static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1326 { .name = "dsp", .irq = 26 },
1327 { .name = "iva", .irq = 34 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001328 { .irq = -1 }
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001329};
1330
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001331/* l4_core -> mailbox */
1332static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1333 .master = &omap2420_l4_core_hwmod,
1334 .slave = &omap2420_mailbox_hwmod,
Paul Walmsleyded11382011-07-09 19:14:06 -06001335 .addr = omap2_mailbox_addrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001336 .user = OCP_USER_MPU | OCP_USER_SDMA,
1337};
1338
1339/* mailbox slave ports */
1340static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1341 &omap2420_l4_core__mailbox,
1342};
1343
1344static struct omap_hwmod omap2420_mailbox_hwmod = {
1345 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -06001346 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001347 .mpu_irqs = omap2420_mailbox_irqs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001348 .main_clk = "mailboxes_ick",
1349 .prcm = {
1350 .omap2 = {
1351 .prcm_reg_id = 1,
1352 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1353 .module_offs = CORE_MOD,
1354 .idlest_reg_id = 1,
1355 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1356 },
1357 },
1358 .slaves = omap2420_mailbox_slaves,
1359 .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001360};
1361
Charulatha V617871d2011-02-17 09:53:09 -08001362/* mcspi1 */
Charulatha V617871d2011-02-17 09:53:09 -08001363static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1364 &omap2420_l4_core__mcspi1,
1365};
1366
1367static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1368 .num_chipselect = 4,
1369};
1370
1371static struct omap_hwmod omap2420_mcspi1_hwmod = {
1372 .name = "mcspi1_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001373 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001374 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V617871d2011-02-17 09:53:09 -08001375 .main_clk = "mcspi1_fck",
1376 .prcm = {
1377 .omap2 = {
1378 .module_offs = CORE_MOD,
1379 .prcm_reg_id = 1,
1380 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1381 .idlest_reg_id = 1,
1382 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1383 },
1384 },
1385 .slaves = omap2420_mcspi1_slaves,
1386 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001387 .class = &omap2xxx_mcspi_class,
1388 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V617871d2011-02-17 09:53:09 -08001389};
1390
1391/* mcspi2 */
Charulatha V617871d2011-02-17 09:53:09 -08001392static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1393 &omap2420_l4_core__mcspi2,
1394};
1395
1396static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1397 .num_chipselect = 2,
1398};
1399
1400static struct omap_hwmod omap2420_mcspi2_hwmod = {
1401 .name = "mcspi2_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001402 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001403 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V617871d2011-02-17 09:53:09 -08001404 .main_clk = "mcspi2_fck",
1405 .prcm = {
1406 .omap2 = {
1407 .module_offs = CORE_MOD,
1408 .prcm_reg_id = 1,
1409 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1410 .idlest_reg_id = 1,
1411 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1412 },
1413 },
1414 .slaves = omap2420_mcspi2_slaves,
1415 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001416 .class = &omap2xxx_mcspi_class,
1417 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V617871d2011-02-17 09:53:09 -08001418};
1419
Charulatha V3cb72fa2011-02-24 12:51:46 -08001420/*
1421 * 'mcbsp' class
1422 * multi channel buffered serial port controller
1423 */
1424
1425static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1426 .name = "mcbsp",
1427};
1428
1429/* mcbsp1 */
1430static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1431 { .name = "tx", .irq = 59 },
1432 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001433 { .irq = -1 }
Charulatha V3cb72fa2011-02-24 12:51:46 -08001434};
1435
Charulatha V3cb72fa2011-02-24 12:51:46 -08001436/* l4_core -> mcbsp1 */
1437static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1438 .master = &omap2420_l4_core_hwmod,
1439 .slave = &omap2420_mcbsp1_hwmod,
1440 .clk = "mcbsp1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001441 .addr = omap2_mcbsp1_addrs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001442 .user = OCP_USER_MPU | OCP_USER_SDMA,
1443};
1444
1445/* mcbsp1 slave ports */
1446static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1447 &omap2420_l4_core__mcbsp1,
1448};
1449
1450static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1451 .name = "mcbsp1",
1452 .class = &omap2420_mcbsp_hwmod_class,
1453 .mpu_irqs = omap2420_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001454 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001455 .main_clk = "mcbsp1_fck",
1456 .prcm = {
1457 .omap2 = {
1458 .prcm_reg_id = 1,
1459 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1460 .module_offs = CORE_MOD,
1461 .idlest_reg_id = 1,
1462 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1463 },
1464 },
1465 .slaves = omap2420_mcbsp1_slaves,
1466 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
Charulatha V3cb72fa2011-02-24 12:51:46 -08001467};
1468
1469/* mcbsp2 */
1470static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1471 { .name = "tx", .irq = 62 },
1472 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001473 { .irq = -1 }
Charulatha V3cb72fa2011-02-24 12:51:46 -08001474};
1475
Charulatha V3cb72fa2011-02-24 12:51:46 -08001476/* l4_core -> mcbsp2 */
1477static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1478 .master = &omap2420_l4_core_hwmod,
1479 .slave = &omap2420_mcbsp2_hwmod,
1480 .clk = "mcbsp2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001481 .addr = omap2xxx_mcbsp2_addrs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001482 .user = OCP_USER_MPU | OCP_USER_SDMA,
1483};
1484
1485/* mcbsp2 slave ports */
1486static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
1487 &omap2420_l4_core__mcbsp2,
1488};
1489
1490static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1491 .name = "mcbsp2",
1492 .class = &omap2420_mcbsp_hwmod_class,
1493 .mpu_irqs = omap2420_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001494 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001495 .main_clk = "mcbsp2_fck",
1496 .prcm = {
1497 .omap2 = {
1498 .prcm_reg_id = 1,
1499 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1500 .module_offs = CORE_MOD,
1501 .idlest_reg_id = 1,
1502 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1503 },
1504 },
1505 .slaves = omap2420_mcbsp2_slaves,
1506 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
Charulatha V3cb72fa2011-02-24 12:51:46 -08001507};
1508
Paul Walmsley02bfc0302009-09-03 20:14:05 +03001509static __initdata struct omap_hwmod *omap2420_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001510 &omap2420_l3_main_hwmod,
Paul Walmsley02bfc0302009-09-03 20:14:05 +03001511 &omap2420_l4_core_hwmod,
1512 &omap2420_l4_wkup_hwmod,
1513 &omap2420_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -06001514 &omap2420_iva_hwmod,
Thara Gopinatheddb1262011-02-23 00:14:04 -07001515
1516 &omap2420_timer1_hwmod,
1517 &omap2420_timer2_hwmod,
1518 &omap2420_timer3_hwmod,
1519 &omap2420_timer4_hwmod,
1520 &omap2420_timer5_hwmod,
1521 &omap2420_timer6_hwmod,
1522 &omap2420_timer7_hwmod,
1523 &omap2420_timer8_hwmod,
1524 &omap2420_timer9_hwmod,
1525 &omap2420_timer10_hwmod,
1526 &omap2420_timer11_hwmod,
1527 &omap2420_timer12_hwmod,
1528
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +05301529 &omap2420_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05301530 &omap2420_uart1_hwmod,
1531 &omap2420_uart2_hwmod,
1532 &omap2420_uart3_hwmod,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001533 /* dss class */
1534 &omap2420_dss_core_hwmod,
1535 &omap2420_dss_dispc_hwmod,
1536 &omap2420_dss_rfbi_hwmod,
1537 &omap2420_dss_venc_hwmod,
1538 /* i2c class */
Paul Walmsley20042902010-09-30 02:40:12 +05301539 &omap2420_i2c1_hwmod,
1540 &omap2420_i2c2_hwmod,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001541
1542 /* gpio class */
1543 &omap2420_gpio1_hwmod,
1544 &omap2420_gpio2_hwmod,
1545 &omap2420_gpio3_hwmod,
1546 &omap2420_gpio4_hwmod,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001547
1548 /* dma_system class*/
1549 &omap2420_dma_system_hwmod,
Charulatha V617871d2011-02-17 09:53:09 -08001550
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001551 /* mailbox class */
1552 &omap2420_mailbox_hwmod,
1553
Charulatha V3cb72fa2011-02-24 12:51:46 -08001554 /* mcbsp class */
1555 &omap2420_mcbsp1_hwmod,
1556 &omap2420_mcbsp2_hwmod,
1557
Charulatha V617871d2011-02-17 09:53:09 -08001558 /* mcspi class */
1559 &omap2420_mcspi1_hwmod,
1560 &omap2420_mcspi2_hwmod,
Paul Walmsley02bfc0302009-09-03 20:14:05 +03001561 NULL,
1562};
1563
Paul Walmsley73591542010-02-22 22:09:32 -07001564int __init omap2420_hwmod_init(void)
1565{
Paul Walmsley550c8092011-02-28 11:58:14 -07001566 return omap_hwmod_register(omap2420_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07001567}