blob: a6bde34e443a7719fcefcbf447779ea16c9202b0 [file] [log] [blame]
Paul Walmsley02bfc032009-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 Walmsley02bfc032009-09-03 20:14:05 +03003 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley02bfc032009-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 Walmsley02bfc032009-09-03 20:14:05 +030013 */
Tony Lindgrence491cf2009-10-20 09:40:47 -070014#include <plat/omap_hwmod.h>
Paul Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-09-03 20:14:05 +030067 .master = &omap2420_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060068 .slave = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-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 Walmsley02bfc032009-09-03 20:14:05 +0300241 .masters = omap2420_mpu_masters,
242 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
Paul Walmsley02bfc032009-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,
Archit Tanejab923d402011-10-06 18:04:08 -0600946 .dev_attr = &omap2_3_dss_dispc_dev_attr
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200947};
948
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200949/* l4_core -> dss_rfbi */
950static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
951 .master = &omap2420_l4_core_hwmod,
952 .slave = &omap2420_dss_rfbi_hwmod,
953 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600954 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200955 .fw = {
956 .omap2 = {
957 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
958 .flags = OMAP_FIREWALL_L4,
959 }
960 },
961 .user = OCP_USER_MPU | OCP_USER_SDMA,
962};
963
964/* dss_rfbi slave ports */
965static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
966 &omap2420_l4_core__dss_rfbi,
967};
968
Tomi Valkeinenb8ac10d2011-11-08 03:16:09 -0700969static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
970 { .role = "ick", .clk = "dss_ick" },
971};
972
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200973static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
974 .name = "dss_rfbi",
Paul Walmsley273b9462011-07-09 19:14:08 -0600975 .class = &omap2_rfbi_hwmod_class,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200976 .main_clk = "dss1_fck",
977 .prcm = {
978 .omap2 = {
979 .prcm_reg_id = 1,
980 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
981 .module_offs = CORE_MOD,
982 },
983 },
Tomi Valkeinenb8ac10d2011-11-08 03:16:09 -0700984 .opt_clks = dss_rfbi_opt_clks,
985 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200986 .slaves = omap2420_dss_rfbi_slaves,
987 .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200988 .flags = HWMOD_NO_IDLEST,
989};
990
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200991/* l4_core -> dss_venc */
992static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
993 .master = &omap2420_l4_core_hwmod,
994 .slave = &omap2420_dss_venc_hwmod,
Tomi Valkeinenb8ac10d2011-11-08 03:16:09 -0700995 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -0600996 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +0200997 .fw = {
998 .omap2 = {
999 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
1000 .flags = OMAP_FIREWALL_L4,
1001 }
1002 },
1003 .user = OCP_USER_MPU | OCP_USER_SDMA,
1004};
1005
1006/* dss_venc slave ports */
1007static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1008 &omap2420_l4_core__dss_venc,
1009};
1010
1011static struct omap_hwmod omap2420_dss_venc_hwmod = {
1012 .name = "dss_venc",
Paul Walmsley273b9462011-07-09 19:14:08 -06001013 .class = &omap2_venc_hwmod_class,
Tomi Valkeinenb8ac10d2011-11-08 03:16:09 -07001014 .main_clk = "dss_54m_fck",
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001015 .prcm = {
1016 .omap2 = {
1017 .prcm_reg_id = 1,
1018 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
1019 .module_offs = CORE_MOD,
1020 },
1021 },
1022 .slaves = omap2420_dss_venc_slaves,
1023 .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001024 .flags = HWMOD_NO_IDLEST,
1025};
1026
Paul Walmsley20042902010-09-30 02:40:12 +05301027/* I2C common */
1028static struct omap_hwmod_class_sysconfig i2c_sysc = {
1029 .rev_offs = 0x00,
1030 .sysc_offs = 0x20,
1031 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -07001032 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +05301033 .sysc_fields = &omap_hwmod_sysc_type1,
1034};
1035
1036static struct omap_hwmod_class i2c_class = {
1037 .name = "i2c",
1038 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -06001039 .rev = OMAP_I2C_IP_VERSION_1,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -06001040 .reset = &omap_i2c_reset,
Paul Walmsley20042902010-09-30 02:40:12 +05301041};
1042
Andy Green4d4441a2011-07-10 05:27:16 -06001043static struct omap_i2c_dev_attr i2c_dev_attr = {
1044 .flags = OMAP_I2C_FLAG_NO_FIFO |
1045 OMAP_I2C_FLAG_SIMPLE_CLOCK |
1046 OMAP_I2C_FLAG_16BIT_DATA_REG |
1047 OMAP_I2C_FLAG_BUS_SHIFT_2,
1048};
Paul Walmsley20042902010-09-30 02:40:12 +05301049
1050/* I2C1 */
1051
Paul Walmsley20042902010-09-30 02:40:12 +05301052static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1053 &omap2420_l4_core__i2c1,
1054};
1055
1056static struct omap_hwmod omap2420_i2c1_hwmod = {
1057 .name = "i2c1",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001058 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001059 .sdma_reqs = omap2_i2c1_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301060 .main_clk = "i2c1_fck",
1061 .prcm = {
1062 .omap2 = {
1063 .module_offs = CORE_MOD,
1064 .prcm_reg_id = 1,
1065 .module_bit = OMAP2420_EN_I2C1_SHIFT,
1066 .idlest_reg_id = 1,
1067 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
1068 },
1069 },
1070 .slaves = omap2420_i2c1_slaves,
1071 .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
1072 .class = &i2c_class,
1073 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301074 .flags = HWMOD_16BIT_REG,
1075};
1076
1077/* I2C2 */
1078
Paul Walmsley20042902010-09-30 02:40:12 +05301079static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1080 &omap2420_l4_core__i2c2,
1081};
1082
1083static struct omap_hwmod omap2420_i2c2_hwmod = {
1084 .name = "i2c2",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001085 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001086 .sdma_reqs = omap2_i2c2_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +05301087 .main_clk = "i2c2_fck",
1088 .prcm = {
1089 .omap2 = {
1090 .module_offs = CORE_MOD,
1091 .prcm_reg_id = 1,
1092 .module_bit = OMAP2420_EN_I2C2_SHIFT,
1093 .idlest_reg_id = 1,
1094 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
1095 },
1096 },
1097 .slaves = omap2420_i2c2_slaves,
1098 .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
1099 .class = &i2c_class,
1100 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +05301101 .flags = HWMOD_16BIT_REG,
1102};
1103
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001104/* l4_wkup -> gpio1 */
1105static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1106 {
1107 .pa_start = 0x48018000,
1108 .pa_end = 0x480181ff,
1109 .flags = ADDR_TYPE_RT
1110 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001111 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001112};
1113
1114static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1115 .master = &omap2420_l4_wkup_hwmod,
1116 .slave = &omap2420_gpio1_hwmod,
1117 .clk = "gpios_ick",
1118 .addr = omap2420_gpio1_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001119 .user = OCP_USER_MPU | OCP_USER_SDMA,
1120};
1121
1122/* l4_wkup -> gpio2 */
1123static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1124 {
1125 .pa_start = 0x4801a000,
1126 .pa_end = 0x4801a1ff,
1127 .flags = ADDR_TYPE_RT
1128 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001129 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001130};
1131
1132static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1133 .master = &omap2420_l4_wkup_hwmod,
1134 .slave = &omap2420_gpio2_hwmod,
1135 .clk = "gpios_ick",
1136 .addr = omap2420_gpio2_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001137 .user = OCP_USER_MPU | OCP_USER_SDMA,
1138};
1139
1140/* l4_wkup -> gpio3 */
1141static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1142 {
1143 .pa_start = 0x4801c000,
1144 .pa_end = 0x4801c1ff,
1145 .flags = ADDR_TYPE_RT
1146 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001147 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001148};
1149
1150static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1151 .master = &omap2420_l4_wkup_hwmod,
1152 .slave = &omap2420_gpio3_hwmod,
1153 .clk = "gpios_ick",
1154 .addr = omap2420_gpio3_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001155 .user = OCP_USER_MPU | OCP_USER_SDMA,
1156};
1157
1158/* l4_wkup -> gpio4 */
1159static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1160 {
1161 .pa_start = 0x4801e000,
1162 .pa_end = 0x4801e1ff,
1163 .flags = ADDR_TYPE_RT
1164 },
Paul Walmsley78183f32011-07-09 19:14:05 -06001165 { }
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001166};
1167
1168static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1169 .master = &omap2420_l4_wkup_hwmod,
1170 .slave = &omap2420_gpio4_hwmod,
1171 .clk = "gpios_ick",
1172 .addr = omap2420_gpio4_addr_space,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001173 .user = OCP_USER_MPU | OCP_USER_SDMA,
1174};
1175
1176/* gpio dev_attr */
1177static struct omap_gpio_dev_attr gpio_dev_attr = {
1178 .bank_width = 32,
1179 .dbck_flag = false,
1180};
1181
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001182/* gpio1 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001183static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1184 &omap2420_l4_wkup__gpio1,
1185};
1186
1187static struct omap_hwmod omap2420_gpio1_hwmod = {
1188 .name = "gpio1",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301189 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001190 .mpu_irqs = omap2_gpio1_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001191 .main_clk = "gpios_fck",
1192 .prcm = {
1193 .omap2 = {
1194 .prcm_reg_id = 1,
1195 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1196 .module_offs = WKUP_MOD,
1197 .idlest_reg_id = 1,
1198 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1199 },
1200 },
1201 .slaves = omap2420_gpio1_slaves,
1202 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001203 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001204 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001205};
1206
1207/* gpio2 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001208static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1209 &omap2420_l4_wkup__gpio2,
1210};
1211
1212static struct omap_hwmod omap2420_gpio2_hwmod = {
1213 .name = "gpio2",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301214 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001215 .mpu_irqs = omap2_gpio2_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001216 .main_clk = "gpios_fck",
1217 .prcm = {
1218 .omap2 = {
1219 .prcm_reg_id = 1,
1220 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1221 .module_offs = WKUP_MOD,
1222 .idlest_reg_id = 1,
1223 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1224 },
1225 },
1226 .slaves = omap2420_gpio2_slaves,
1227 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001228 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001229 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001230};
1231
1232/* gpio3 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001233static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1234 &omap2420_l4_wkup__gpio3,
1235};
1236
1237static struct omap_hwmod omap2420_gpio3_hwmod = {
1238 .name = "gpio3",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301239 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001240 .mpu_irqs = omap2_gpio3_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001241 .main_clk = "gpios_fck",
1242 .prcm = {
1243 .omap2 = {
1244 .prcm_reg_id = 1,
1245 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1246 .module_offs = WKUP_MOD,
1247 .idlest_reg_id = 1,
1248 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1249 },
1250 },
1251 .slaves = omap2420_gpio3_slaves,
1252 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001253 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001254 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001255};
1256
1257/* gpio4 */
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001258static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1259 &omap2420_l4_wkup__gpio4,
1260};
1261
1262static struct omap_hwmod omap2420_gpio4_hwmod = {
1263 .name = "gpio4",
Avinash.H.Mf95440c2011-04-05 21:10:15 +05301264 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001265 .mpu_irqs = omap2_gpio4_irqs,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001266 .main_clk = "gpios_fck",
1267 .prcm = {
1268 .omap2 = {
1269 .prcm_reg_id = 1,
1270 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
1271 .module_offs = WKUP_MOD,
1272 .idlest_reg_id = 1,
1273 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
1274 },
1275 },
1276 .slaves = omap2420_gpio4_slaves,
1277 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001278 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001279 .dev_attr = &gpio_dev_attr,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001280};
1281
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001282/* dma attributes */
1283static struct omap_dma_dev_attr dma_dev_attr = {
1284 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1285 IS_CSSA_32 | IS_CDSA_32,
1286 .lch_count = 32,
1287};
1288
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001289/* dma_system -> L3 */
1290static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1291 .master = &omap2420_dma_system_hwmod,
1292 .slave = &omap2420_l3_main_hwmod,
1293 .clk = "core_l3_ck",
1294 .user = OCP_USER_MPU | OCP_USER_SDMA,
1295};
1296
1297/* dma_system master ports */
1298static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
1299 &omap2420_dma_system__l3,
1300};
1301
1302/* l4_core -> dma_system */
1303static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1304 .master = &omap2420_l4_core_hwmod,
1305 .slave = &omap2420_dma_system_hwmod,
1306 .clk = "sdma_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001307 .addr = omap2_dma_system_addrs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001308 .user = OCP_USER_MPU | OCP_USER_SDMA,
1309};
1310
1311/* dma_system slave ports */
1312static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1313 &omap2420_l4_core__dma_system,
1314};
1315
1316static struct omap_hwmod omap2420_dma_system_hwmod = {
1317 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -06001318 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -06001319 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001320 .main_clk = "core_l3_ck",
1321 .slaves = omap2420_dma_system_slaves,
1322 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
1323 .masters = omap2420_dma_system_masters,
1324 .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
1325 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001326 .flags = HWMOD_NO_IDLEST,
1327};
1328
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001329/* mailbox */
1330static struct omap_hwmod omap2420_mailbox_hwmod;
1331static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1332 { .name = "dsp", .irq = 26 },
1333 { .name = "iva", .irq = 34 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001334 { .irq = -1 }
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001335};
1336
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001337/* l4_core -> mailbox */
1338static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1339 .master = &omap2420_l4_core_hwmod,
1340 .slave = &omap2420_mailbox_hwmod,
Paul Walmsleyded11382011-07-09 19:14:06 -06001341 .addr = omap2_mailbox_addrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001342 .user = OCP_USER_MPU | OCP_USER_SDMA,
1343};
1344
1345/* mailbox slave ports */
1346static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1347 &omap2420_l4_core__mailbox,
1348};
1349
1350static struct omap_hwmod omap2420_mailbox_hwmod = {
1351 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -06001352 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001353 .mpu_irqs = omap2420_mailbox_irqs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001354 .main_clk = "mailboxes_ick",
1355 .prcm = {
1356 .omap2 = {
1357 .prcm_reg_id = 1,
1358 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
1359 .module_offs = CORE_MOD,
1360 .idlest_reg_id = 1,
1361 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
1362 },
1363 },
1364 .slaves = omap2420_mailbox_slaves,
1365 .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001366};
1367
Charulatha V617871d2011-02-17 09:53:09 -08001368/* mcspi1 */
Charulatha V617871d2011-02-17 09:53:09 -08001369static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1370 &omap2420_l4_core__mcspi1,
1371};
1372
1373static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1374 .num_chipselect = 4,
1375};
1376
1377static struct omap_hwmod omap2420_mcspi1_hwmod = {
1378 .name = "mcspi1_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001379 .mpu_irqs = omap2_mcspi1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001380 .sdma_reqs = omap2_mcspi1_sdma_reqs,
Charulatha V617871d2011-02-17 09:53:09 -08001381 .main_clk = "mcspi1_fck",
1382 .prcm = {
1383 .omap2 = {
1384 .module_offs = CORE_MOD,
1385 .prcm_reg_id = 1,
1386 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
1387 .idlest_reg_id = 1,
1388 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
1389 },
1390 },
1391 .slaves = omap2420_mcspi1_slaves,
1392 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001393 .class = &omap2xxx_mcspi_class,
1394 .dev_attr = &omap_mcspi1_dev_attr,
Charulatha V617871d2011-02-17 09:53:09 -08001395};
1396
1397/* mcspi2 */
Charulatha V617871d2011-02-17 09:53:09 -08001398static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1399 &omap2420_l4_core__mcspi2,
1400};
1401
1402static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1403 .num_chipselect = 2,
1404};
1405
1406static struct omap_hwmod omap2420_mcspi2_hwmod = {
1407 .name = "mcspi2_hwmod",
Paul Walmsley0d619a82011-07-09 19:14:07 -06001408 .mpu_irqs = omap2_mcspi2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001409 .sdma_reqs = omap2_mcspi2_sdma_reqs,
Charulatha V617871d2011-02-17 09:53:09 -08001410 .main_clk = "mcspi2_fck",
1411 .prcm = {
1412 .omap2 = {
1413 .module_offs = CORE_MOD,
1414 .prcm_reg_id = 1,
1415 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
1416 .idlest_reg_id = 1,
1417 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
1418 },
1419 },
1420 .slaves = omap2420_mcspi2_slaves,
1421 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
Paul Walmsley273b9462011-07-09 19:14:08 -06001422 .class = &omap2xxx_mcspi_class,
1423 .dev_attr = &omap_mcspi2_dev_attr,
Charulatha V617871d2011-02-17 09:53:09 -08001424};
1425
Charulatha V3cb72fa2011-02-24 12:51:46 -08001426/*
1427 * 'mcbsp' class
1428 * multi channel buffered serial port controller
1429 */
1430
1431static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
1432 .name = "mcbsp",
1433};
1434
1435/* mcbsp1 */
1436static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
1437 { .name = "tx", .irq = 59 },
1438 { .name = "rx", .irq = 60 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001439 { .irq = -1 }
Charulatha V3cb72fa2011-02-24 12:51:46 -08001440};
1441
Charulatha V3cb72fa2011-02-24 12:51:46 -08001442/* l4_core -> mcbsp1 */
1443static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
1444 .master = &omap2420_l4_core_hwmod,
1445 .slave = &omap2420_mcbsp1_hwmod,
1446 .clk = "mcbsp1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001447 .addr = omap2_mcbsp1_addrs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001448 .user = OCP_USER_MPU | OCP_USER_SDMA,
1449};
1450
1451/* mcbsp1 slave ports */
1452static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
1453 &omap2420_l4_core__mcbsp1,
1454};
1455
1456static struct omap_hwmod omap2420_mcbsp1_hwmod = {
1457 .name = "mcbsp1",
1458 .class = &omap2420_mcbsp_hwmod_class,
1459 .mpu_irqs = omap2420_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001460 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001461 .main_clk = "mcbsp1_fck",
1462 .prcm = {
1463 .omap2 = {
1464 .prcm_reg_id = 1,
1465 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
1466 .module_offs = CORE_MOD,
1467 .idlest_reg_id = 1,
1468 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
1469 },
1470 },
1471 .slaves = omap2420_mcbsp1_slaves,
1472 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
Charulatha V3cb72fa2011-02-24 12:51:46 -08001473};
1474
1475/* mcbsp2 */
1476static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
1477 { .name = "tx", .irq = 62 },
1478 { .name = "rx", .irq = 63 },
Paul Walmsley212738a2011-07-09 19:14:06 -06001479 { .irq = -1 }
Charulatha V3cb72fa2011-02-24 12:51:46 -08001480};
1481
Charulatha V3cb72fa2011-02-24 12:51:46 -08001482/* l4_core -> mcbsp2 */
1483static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
1484 .master = &omap2420_l4_core_hwmod,
1485 .slave = &omap2420_mcbsp2_hwmod,
1486 .clk = "mcbsp2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06001487 .addr = omap2xxx_mcbsp2_addrs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001488 .user = OCP_USER_MPU | OCP_USER_SDMA,
1489};
1490
1491/* mcbsp2 slave ports */
1492static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
1493 &omap2420_l4_core__mcbsp2,
1494};
1495
1496static struct omap_hwmod omap2420_mcbsp2_hwmod = {
1497 .name = "mcbsp2",
1498 .class = &omap2420_mcbsp_hwmod_class,
1499 .mpu_irqs = omap2420_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -06001500 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -08001501 .main_clk = "mcbsp2_fck",
1502 .prcm = {
1503 .omap2 = {
1504 .prcm_reg_id = 1,
1505 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
1506 .module_offs = CORE_MOD,
1507 .idlest_reg_id = 1,
1508 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
1509 },
1510 },
1511 .slaves = omap2420_mcbsp2_slaves,
1512 .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
Charulatha V3cb72fa2011-02-24 12:51:46 -08001513};
1514
Paul Walmsley02bfc032009-09-03 20:14:05 +03001515static __initdata struct omap_hwmod *omap2420_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001516 &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +03001517 &omap2420_l4_core_hwmod,
1518 &omap2420_l4_wkup_hwmod,
1519 &omap2420_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -06001520 &omap2420_iva_hwmod,
Thara Gopinatheddb1262011-02-23 00:14:04 -07001521
1522 &omap2420_timer1_hwmod,
1523 &omap2420_timer2_hwmod,
1524 &omap2420_timer3_hwmod,
1525 &omap2420_timer4_hwmod,
1526 &omap2420_timer5_hwmod,
1527 &omap2420_timer6_hwmod,
1528 &omap2420_timer7_hwmod,
1529 &omap2420_timer8_hwmod,
1530 &omap2420_timer9_hwmod,
1531 &omap2420_timer10_hwmod,
1532 &omap2420_timer11_hwmod,
1533 &omap2420_timer12_hwmod,
1534
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +05301535 &omap2420_wd_timer2_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05301536 &omap2420_uart1_hwmod,
1537 &omap2420_uart2_hwmod,
1538 &omap2420_uart3_hwmod,
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +02001539 /* dss class */
1540 &omap2420_dss_core_hwmod,
1541 &omap2420_dss_dispc_hwmod,
1542 &omap2420_dss_rfbi_hwmod,
1543 &omap2420_dss_venc_hwmod,
1544 /* i2c class */
Paul Walmsley20042902010-09-30 02:40:12 +05301545 &omap2420_i2c1_hwmod,
1546 &omap2420_i2c2_hwmod,
Varadarajan, Charulatha59c348c2010-12-07 16:26:56 -08001547
1548 /* gpio class */
1549 &omap2420_gpio1_hwmod,
1550 &omap2420_gpio2_hwmod,
1551 &omap2420_gpio3_hwmod,
1552 &omap2420_gpio4_hwmod,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -08001553
1554 /* dma_system class*/
1555 &omap2420_dma_system_hwmod,
Charulatha V617871d2011-02-17 09:53:09 -08001556
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -08001557 /* mailbox class */
1558 &omap2420_mailbox_hwmod,
1559
Charulatha V3cb72fa2011-02-24 12:51:46 -08001560 /* mcbsp class */
1561 &omap2420_mcbsp1_hwmod,
1562 &omap2420_mcbsp2_hwmod,
1563
Charulatha V617871d2011-02-17 09:53:09 -08001564 /* mcspi class */
1565 &omap2420_mcspi1_hwmod,
1566 &omap2420_mcspi2_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +03001567 NULL,
1568};
1569
Paul Walmsley73591542010-02-22 22:09:32 -07001570int __init omap2420_hwmod_init(void)
1571{
Paul Walmsley550c8092011-02-28 11:58:14 -07001572 return omap_hwmod_register(omap2420_hwmods);
Paul Walmsley73591542010-02-22 22:09:32 -07001573}