blob: 9605e5fd6c9c70ef5be488e767eeb987349cf93c [file] [log] [blame]
Paul Walmsley73591542010-02-22 22:09:32 -07001/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06005 * Copyright (C) 2012 Texas Instruments, Inc.
Paul Walmsley73591542010-02-22 22:09:32 -07006 * Paul Walmsley
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
14 *
15 * XXX these should be marked initdata for multi-OMAP kernels
16 */
Jean Pihetb86aeaf2012-04-25 16:06:20 +053017#include <linux/power/smartreflex.h>
Tony Lindgren4b254082012-08-30 15:37:24 -070018#include <linux/platform_data/gpio-omap.h>
Jean Pihetb86aeaf2012-04-25 16:06:20 +053019
Paul Walmsley73591542010-02-22 22:09:32 -070020#include <plat/omap_hwmod.h>
Paul Walmsley73591542010-02-22 22:09:32 -070021#include <plat/cpu.h>
22#include <plat/dma.h>
Kevin Hilman046465b2010-09-27 20:19:30 +053023#include <plat/serial.h>
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +000024#include <plat/l3_3xxx.h>
Rajendra Nayak4fe20e92010-09-21 19:37:13 +053025#include <plat/l4_3xxx.h>
26#include <plat/i2c.h>
Kishore Kadiyala6ab89462011-03-01 13:12:56 -080027#include <plat/mmc.h>
Charulatha Vdc48e5f2011-02-24 15:16:49 +053028#include <plat/mcbsp.h>
Charulatha V0f616a42011-02-17 09:53:10 -080029#include <plat/mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070030#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070031
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -070032#include <mach/hardware.h>
33#include <mach/am35xx.h>
34
Paul Walmsley43b40992010-02-22 22:09:34 -070035#include "omap_hwmod_common_data.h"
Paul Walmsley73591542010-02-22 22:09:32 -070036#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053037#include "cm-regbits-34xx.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070038#include "wd_timer.h"
Paul Walmsley73591542010-02-22 22:09:32 -070039
40/*
41 * OMAP3xxx hardware module integration data
42 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060043 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070044 * TI hardware database or other technical documentation. Data that
45 * is driver-specific or driver-kernel integration-specific belongs
46 * elsewhere.
47 */
48
Paul Walmsley844a3b62012-04-19 04:04:33 -060049/*
50 * IP blocks
51 */
Paul Walmsley73591542010-02-22 22:09:32 -070052
Paul Walmsley844a3b62012-04-19 04:04:33 -060053/* L3 */
54static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -070055 { .irq = 9 + OMAP_INTC_START, },
56 { .irq = 10 + OMAP_INTC_START, },
57 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -060058};
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080059
Paul Walmsley844a3b62012-04-19 04:04:33 -060060static struct omap_hwmod omap3xxx_l3_main_hwmod = {
61 .name = "l3_main",
62 .class = &l3_hwmod_class,
63 .mpu_irqs = omap3xxx_l3_main_irqs,
64 .flags = HWMOD_NO_IDLEST,
65};
66
67/* L4 CORE */
68static struct omap_hwmod omap3xxx_l4_core_hwmod = {
69 .name = "l4_core",
70 .class = &l4_hwmod_class,
71 .flags = HWMOD_NO_IDLEST,
72};
73
74/* L4 PER */
75static struct omap_hwmod omap3xxx_l4_per_hwmod = {
76 .name = "l4_per",
77 .class = &l4_hwmod_class,
78 .flags = HWMOD_NO_IDLEST,
79};
80
81/* L4 WKUP */
82static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
83 .name = "l4_wkup",
84 .class = &l4_hwmod_class,
85 .flags = HWMOD_NO_IDLEST,
86};
87
88/* L4 SEC */
89static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
90 .name = "l4_sec",
91 .class = &l4_hwmod_class,
92 .flags = HWMOD_NO_IDLEST,
93};
94
95/* MPU */
96static struct omap_hwmod omap3xxx_mpu_hwmod = {
97 .name = "mpu",
98 .class = &mpu_hwmod_class,
99 .main_clk = "arm_fck",
100};
101
102/* IVA2 (IVA2) */
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600103static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
104 { .name = "logic", .rst_shift = 0 },
105 { .name = "seq0", .rst_shift = 1 },
106 { .name = "seq1", .rst_shift = 2 },
107};
108
Paul Walmsley844a3b62012-04-19 04:04:33 -0600109static struct omap_hwmod omap3xxx_iva_hwmod = {
110 .name = "iva",
111 .class = &iva_hwmod_class,
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600112 .clkdm_name = "iva2_clkdm",
113 .rst_lines = omap3xxx_iva_resets,
114 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
115 .main_clk = "iva2_ck",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600116};
117
118/* timer class */
119static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
120 .rev_offs = 0x0000,
121 .sysc_offs = 0x0010,
122 .syss_offs = 0x0014,
123 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
124 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
125 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
126 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
127 .sysc_fields = &omap_hwmod_sysc_type1,
128};
129
130static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = {
131 .name = "timer",
132 .sysc = &omap3xxx_timer_1ms_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600133};
134
135static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
136 .rev_offs = 0x0000,
137 .sysc_offs = 0x0010,
138 .syss_offs = 0x0014,
139 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
140 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
141 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
142 .sysc_fields = &omap_hwmod_sysc_type1,
143};
144
145static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
146 .name = "timer",
147 .sysc = &omap3xxx_timer_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600148};
149
150/* secure timers dev attribute */
151static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
Jon Hunter139486f2012-06-05 12:34:53 -0500152 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600153};
154
155/* always-on timers dev attribute */
156static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
157 .timer_capability = OMAP_TIMER_ALWON,
158};
159
160/* pwm timers dev attribute */
161static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
162 .timer_capability = OMAP_TIMER_HAS_PWM,
163};
164
165/* timer1 */
166static struct omap_hwmod omap3xxx_timer1_hwmod = {
167 .name = "timer1",
168 .mpu_irqs = omap2_timer1_mpu_irqs,
169 .main_clk = "gpt1_fck",
170 .prcm = {
171 .omap2 = {
172 .prcm_reg_id = 1,
173 .module_bit = OMAP3430_EN_GPT1_SHIFT,
174 .module_offs = WKUP_MOD,
175 .idlest_reg_id = 1,
176 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
177 },
178 },
179 .dev_attr = &capability_alwon_dev_attr,
180 .class = &omap3xxx_timer_1ms_hwmod_class,
181};
182
183/* timer2 */
184static struct omap_hwmod omap3xxx_timer2_hwmod = {
185 .name = "timer2",
186 .mpu_irqs = omap2_timer2_mpu_irqs,
187 .main_clk = "gpt2_fck",
188 .prcm = {
189 .omap2 = {
190 .prcm_reg_id = 1,
191 .module_bit = OMAP3430_EN_GPT2_SHIFT,
192 .module_offs = OMAP3430_PER_MOD,
193 .idlest_reg_id = 1,
194 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
195 },
196 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600197 .class = &omap3xxx_timer_1ms_hwmod_class,
198};
199
200/* timer3 */
201static struct omap_hwmod omap3xxx_timer3_hwmod = {
202 .name = "timer3",
203 .mpu_irqs = omap2_timer3_mpu_irqs,
204 .main_clk = "gpt3_fck",
205 .prcm = {
206 .omap2 = {
207 .prcm_reg_id = 1,
208 .module_bit = OMAP3430_EN_GPT3_SHIFT,
209 .module_offs = OMAP3430_PER_MOD,
210 .idlest_reg_id = 1,
211 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
212 },
213 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600214 .class = &omap3xxx_timer_hwmod_class,
215};
216
217/* timer4 */
218static struct omap_hwmod omap3xxx_timer4_hwmod = {
219 .name = "timer4",
220 .mpu_irqs = omap2_timer4_mpu_irqs,
221 .main_clk = "gpt4_fck",
222 .prcm = {
223 .omap2 = {
224 .prcm_reg_id = 1,
225 .module_bit = OMAP3430_EN_GPT4_SHIFT,
226 .module_offs = OMAP3430_PER_MOD,
227 .idlest_reg_id = 1,
228 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
229 },
230 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600231 .class = &omap3xxx_timer_hwmod_class,
232};
233
234/* timer5 */
235static struct omap_hwmod omap3xxx_timer5_hwmod = {
236 .name = "timer5",
237 .mpu_irqs = omap2_timer5_mpu_irqs,
238 .main_clk = "gpt5_fck",
239 .prcm = {
240 .omap2 = {
241 .prcm_reg_id = 1,
242 .module_bit = OMAP3430_EN_GPT5_SHIFT,
243 .module_offs = OMAP3430_PER_MOD,
244 .idlest_reg_id = 1,
245 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
246 },
247 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600248 .class = &omap3xxx_timer_hwmod_class,
249};
250
251/* timer6 */
252static struct omap_hwmod omap3xxx_timer6_hwmod = {
253 .name = "timer6",
254 .mpu_irqs = omap2_timer6_mpu_irqs,
255 .main_clk = "gpt6_fck",
256 .prcm = {
257 .omap2 = {
258 .prcm_reg_id = 1,
259 .module_bit = OMAP3430_EN_GPT6_SHIFT,
260 .module_offs = OMAP3430_PER_MOD,
261 .idlest_reg_id = 1,
262 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
263 },
264 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600265 .class = &omap3xxx_timer_hwmod_class,
266};
267
268/* timer7 */
269static struct omap_hwmod omap3xxx_timer7_hwmod = {
270 .name = "timer7",
271 .mpu_irqs = omap2_timer7_mpu_irqs,
272 .main_clk = "gpt7_fck",
273 .prcm = {
274 .omap2 = {
275 .prcm_reg_id = 1,
276 .module_bit = OMAP3430_EN_GPT7_SHIFT,
277 .module_offs = OMAP3430_PER_MOD,
278 .idlest_reg_id = 1,
279 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
280 },
281 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600282 .class = &omap3xxx_timer_hwmod_class,
283};
284
285/* timer8 */
286static struct omap_hwmod omap3xxx_timer8_hwmod = {
287 .name = "timer8",
288 .mpu_irqs = omap2_timer8_mpu_irqs,
289 .main_clk = "gpt8_fck",
290 .prcm = {
291 .omap2 = {
292 .prcm_reg_id = 1,
293 .module_bit = OMAP3430_EN_GPT8_SHIFT,
294 .module_offs = OMAP3430_PER_MOD,
295 .idlest_reg_id = 1,
296 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
297 },
298 },
299 .dev_attr = &capability_pwm_dev_attr,
300 .class = &omap3xxx_timer_hwmod_class,
301};
302
303/* timer9 */
304static struct omap_hwmod omap3xxx_timer9_hwmod = {
305 .name = "timer9",
306 .mpu_irqs = omap2_timer9_mpu_irqs,
307 .main_clk = "gpt9_fck",
308 .prcm = {
309 .omap2 = {
310 .prcm_reg_id = 1,
311 .module_bit = OMAP3430_EN_GPT9_SHIFT,
312 .module_offs = OMAP3430_PER_MOD,
313 .idlest_reg_id = 1,
314 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
315 },
316 },
317 .dev_attr = &capability_pwm_dev_attr,
318 .class = &omap3xxx_timer_hwmod_class,
319};
320
321/* timer10 */
322static struct omap_hwmod omap3xxx_timer10_hwmod = {
323 .name = "timer10",
324 .mpu_irqs = omap2_timer10_mpu_irqs,
325 .main_clk = "gpt10_fck",
326 .prcm = {
327 .omap2 = {
328 .prcm_reg_id = 1,
329 .module_bit = OMAP3430_EN_GPT10_SHIFT,
330 .module_offs = CORE_MOD,
331 .idlest_reg_id = 1,
332 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
333 },
334 },
335 .dev_attr = &capability_pwm_dev_attr,
336 .class = &omap3xxx_timer_1ms_hwmod_class,
337};
338
339/* timer11 */
340static struct omap_hwmod omap3xxx_timer11_hwmod = {
341 .name = "timer11",
342 .mpu_irqs = omap2_timer11_mpu_irqs,
343 .main_clk = "gpt11_fck",
344 .prcm = {
345 .omap2 = {
346 .prcm_reg_id = 1,
347 .module_bit = OMAP3430_EN_GPT11_SHIFT,
348 .module_offs = CORE_MOD,
349 .idlest_reg_id = 1,
350 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
351 },
352 },
353 .dev_attr = &capability_pwm_dev_attr,
354 .class = &omap3xxx_timer_hwmod_class,
355};
356
357/* timer12 */
358static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700359 { .irq = 95 + OMAP_INTC_START, },
360 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600361};
362
363static struct omap_hwmod omap3xxx_timer12_hwmod = {
364 .name = "timer12",
365 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
366 .main_clk = "gpt12_fck",
367 .prcm = {
368 .omap2 = {
369 .prcm_reg_id = 1,
370 .module_bit = OMAP3430_EN_GPT12_SHIFT,
371 .module_offs = WKUP_MOD,
372 .idlest_reg_id = 1,
373 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
374 },
375 },
376 .dev_attr = &capability_secure_dev_attr,
377 .class = &omap3xxx_timer_hwmod_class,
378};
379
380/*
381 * 'wd_timer' class
382 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
383 * overflow condition
384 */
385
386static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
387 .rev_offs = 0x0000,
388 .sysc_offs = 0x0010,
389 .syss_offs = 0x0014,
390 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
391 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
392 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
393 SYSS_HAS_RESET_STATUS),
394 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
395 .sysc_fields = &omap_hwmod_sysc_type1,
396};
397
398/* I2C common */
399static struct omap_hwmod_class_sysconfig i2c_sysc = {
400 .rev_offs = 0x00,
401 .sysc_offs = 0x20,
402 .syss_offs = 0x10,
403 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
404 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
405 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
406 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
407 .clockact = CLOCKACT_TEST_ICLK,
408 .sysc_fields = &omap_hwmod_sysc_type1,
409};
410
411static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
412 .name = "wd_timer",
413 .sysc = &omap3xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -0600414 .pre_shutdown = &omap2_wd_timer_disable,
415 .reset = &omap2_wd_timer_reset,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600416};
417
418static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
419 .name = "wd_timer2",
420 .class = &omap3xxx_wd_timer_hwmod_class,
421 .main_clk = "wdt2_fck",
422 .prcm = {
423 .omap2 = {
424 .prcm_reg_id = 1,
425 .module_bit = OMAP3430_EN_WDT2_SHIFT,
426 .module_offs = WKUP_MOD,
427 .idlest_reg_id = 1,
428 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
429 },
430 },
431 /*
432 * XXX: Use software supervised mode, HW supervised smartidle seems to
433 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
434 */
435 .flags = HWMOD_SWSUP_SIDLE,
436};
437
438/* UART1 */
439static struct omap_hwmod omap3xxx_uart1_hwmod = {
440 .name = "uart1",
441 .mpu_irqs = omap2_uart1_mpu_irqs,
442 .sdma_reqs = omap2_uart1_sdma_reqs,
443 .main_clk = "uart1_fck",
444 .prcm = {
445 .omap2 = {
446 .module_offs = CORE_MOD,
447 .prcm_reg_id = 1,
448 .module_bit = OMAP3430_EN_UART1_SHIFT,
449 .idlest_reg_id = 1,
450 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
451 },
452 },
453 .class = &omap2_uart_class,
454};
455
456/* UART2 */
457static struct omap_hwmod omap3xxx_uart2_hwmod = {
458 .name = "uart2",
459 .mpu_irqs = omap2_uart2_mpu_irqs,
460 .sdma_reqs = omap2_uart2_sdma_reqs,
461 .main_clk = "uart2_fck",
462 .prcm = {
463 .omap2 = {
464 .module_offs = CORE_MOD,
465 .prcm_reg_id = 1,
466 .module_bit = OMAP3430_EN_UART2_SHIFT,
467 .idlest_reg_id = 1,
468 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
469 },
470 },
471 .class = &omap2_uart_class,
472};
473
474/* UART3 */
475static struct omap_hwmod omap3xxx_uart3_hwmod = {
476 .name = "uart3",
477 .mpu_irqs = omap2_uart3_mpu_irqs,
478 .sdma_reqs = omap2_uart3_sdma_reqs,
479 .main_clk = "uart3_fck",
480 .prcm = {
481 .omap2 = {
482 .module_offs = OMAP3430_PER_MOD,
483 .prcm_reg_id = 1,
484 .module_bit = OMAP3430_EN_UART3_SHIFT,
485 .idlest_reg_id = 1,
486 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
487 },
488 },
489 .class = &omap2_uart_class,
490};
491
492/* UART4 */
493static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700494 { .irq = 80 + OMAP_INTC_START, },
495 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600496};
497
498static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
499 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
500 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
501 { .dma_req = -1 }
502};
503
504static struct omap_hwmod omap36xx_uart4_hwmod = {
505 .name = "uart4",
506 .mpu_irqs = uart4_mpu_irqs,
507 .sdma_reqs = uart4_sdma_reqs,
508 .main_clk = "uart4_fck",
509 .prcm = {
510 .omap2 = {
511 .module_offs = OMAP3430_PER_MOD,
512 .prcm_reg_id = 1,
513 .module_bit = OMAP3630_EN_UART4_SHIFT,
514 .idlest_reg_id = 1,
515 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
516 },
517 },
518 .class = &omap2_uart_class,
519};
520
521static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700522 { .irq = 84 + OMAP_INTC_START, },
523 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600524};
525
526static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
527 { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
528 { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
Paul Walmsleybf765232012-06-27 14:53:46 -0600529 { .dma_req = -1 }
Paul Walmsley844a3b62012-04-19 04:04:33 -0600530};
531
Paul Walmsley82ee6202012-06-27 14:53:46 -0600532/*
533 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
534 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
535 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
536 * should not be needed. The functional clock structure of the AM35xx
537 * UART4 is extremely unclear and opaque; it is unclear what the role
538 * of uart1/2_fck is for the UART4. Any clarification from either
539 * empirical testing or the AM3505/3517 hardware designers would be
540 * most welcome.
541 */
542static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
543 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
544};
545
Paul Walmsley844a3b62012-04-19 04:04:33 -0600546static struct omap_hwmod am35xx_uart4_hwmod = {
547 .name = "uart4",
548 .mpu_irqs = am35xx_uart4_mpu_irqs,
549 .sdma_reqs = am35xx_uart4_sdma_reqs,
550 .main_clk = "uart4_fck",
551 .prcm = {
552 .omap2 = {
553 .module_offs = CORE_MOD,
554 .prcm_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600555 .module_bit = AM35XX_EN_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600556 .idlest_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600557 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600558 },
559 },
Paul Walmsley82ee6202012-06-27 14:53:46 -0600560 .opt_clks = am35xx_uart4_opt_clks,
561 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
562 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600563 .class = &omap2_uart_class,
564};
565
566static struct omap_hwmod_class i2c_class = {
567 .name = "i2c",
568 .sysc = &i2c_sysc,
569 .rev = OMAP_I2C_IP_VERSION_1,
570 .reset = &omap_i2c_reset,
571};
572
573static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
574 { .name = "dispc", .dma_req = 5 },
575 { .name = "dsi1", .dma_req = 74 },
576 { .dma_req = -1 }
577};
578
579/* dss */
580static struct omap_hwmod_opt_clk dss_opt_clks[] = {
581 /*
582 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
583 * driver does not use these clocks.
584 */
585 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
586 { .role = "tv_clk", .clk = "dss_tv_fck" },
587 /* required only on OMAP3430 */
588 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
589};
590
591static struct omap_hwmod omap3430es1_dss_core_hwmod = {
592 .name = "dss_core",
593 .class = &omap2_dss_hwmod_class,
594 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
595 .sdma_reqs = omap3xxx_dss_sdma_chs,
596 .prcm = {
597 .omap2 = {
598 .prcm_reg_id = 1,
599 .module_bit = OMAP3430_EN_DSS1_SHIFT,
600 .module_offs = OMAP3430_DSS_MOD,
601 .idlest_reg_id = 1,
602 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
603 },
604 },
605 .opt_clks = dss_opt_clks,
606 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
607 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
608};
609
610static struct omap_hwmod omap3xxx_dss_core_hwmod = {
611 .name = "dss_core",
612 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
613 .class = &omap2_dss_hwmod_class,
614 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
615 .sdma_reqs = omap3xxx_dss_sdma_chs,
616 .prcm = {
617 .omap2 = {
618 .prcm_reg_id = 1,
619 .module_bit = OMAP3430_EN_DSS1_SHIFT,
620 .module_offs = OMAP3430_DSS_MOD,
621 .idlest_reg_id = 1,
622 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
623 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
624 },
625 },
626 .opt_clks = dss_opt_clks,
627 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
628};
629
630/*
631 * 'dispc' class
632 * display controller
633 */
634
635static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
636 .rev_offs = 0x0000,
637 .sysc_offs = 0x0010,
638 .syss_offs = 0x0014,
639 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
640 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
641 SYSC_HAS_ENAWAKEUP),
642 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
643 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
644 .sysc_fields = &omap_hwmod_sysc_type1,
645};
646
647static struct omap_hwmod_class omap3_dispc_hwmod_class = {
648 .name = "dispc",
649 .sysc = &omap3_dispc_sysc,
650};
651
652static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
653 .name = "dss_dispc",
654 .class = &omap3_dispc_hwmod_class,
655 .mpu_irqs = omap2_dispc_irqs,
656 .main_clk = "dss1_alwon_fck",
657 .prcm = {
658 .omap2 = {
659 .prcm_reg_id = 1,
660 .module_bit = OMAP3430_EN_DSS1_SHIFT,
661 .module_offs = OMAP3430_DSS_MOD,
662 },
663 },
664 .flags = HWMOD_NO_IDLEST,
665 .dev_attr = &omap2_3_dss_dispc_dev_attr
666};
667
668/*
669 * 'dsi' class
670 * display serial interface controller
671 */
672
673static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
674 .name = "dsi",
675};
676
677static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700678 { .irq = 25 + OMAP_INTC_START, },
679 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600680};
681
682/* dss_dsi1 */
683static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
684 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
685};
686
687static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
688 .name = "dss_dsi1",
689 .class = &omap3xxx_dsi_hwmod_class,
690 .mpu_irqs = omap3xxx_dsi1_irqs,
691 .main_clk = "dss1_alwon_fck",
692 .prcm = {
693 .omap2 = {
694 .prcm_reg_id = 1,
695 .module_bit = OMAP3430_EN_DSS1_SHIFT,
696 .module_offs = OMAP3430_DSS_MOD,
697 },
698 },
699 .opt_clks = dss_dsi1_opt_clks,
700 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
701 .flags = HWMOD_NO_IDLEST,
702};
703
704static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
705 { .role = "ick", .clk = "dss_ick" },
706};
707
708static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
709 .name = "dss_rfbi",
710 .class = &omap2_rfbi_hwmod_class,
711 .main_clk = "dss1_alwon_fck",
712 .prcm = {
713 .omap2 = {
714 .prcm_reg_id = 1,
715 .module_bit = OMAP3430_EN_DSS1_SHIFT,
716 .module_offs = OMAP3430_DSS_MOD,
717 },
718 },
719 .opt_clks = dss_rfbi_opt_clks,
720 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
721 .flags = HWMOD_NO_IDLEST,
722};
723
724static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
725 /* required only on OMAP3430 */
726 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
727};
728
729static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
730 .name = "dss_venc",
731 .class = &omap2_venc_hwmod_class,
732 .main_clk = "dss_tv_fck",
733 .prcm = {
734 .omap2 = {
735 .prcm_reg_id = 1,
736 .module_bit = OMAP3430_EN_DSS1_SHIFT,
737 .module_offs = OMAP3430_DSS_MOD,
738 },
739 },
740 .opt_clks = dss_venc_opt_clks,
741 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
742 .flags = HWMOD_NO_IDLEST,
743};
744
745/* I2C1 */
746static struct omap_i2c_dev_attr i2c1_dev_attr = {
747 .fifo_depth = 8, /* bytes */
748 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
749 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
750 OMAP_I2C_FLAG_BUS_SHIFT_2,
751};
752
753static struct omap_hwmod omap3xxx_i2c1_hwmod = {
754 .name = "i2c1",
755 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
756 .mpu_irqs = omap2_i2c1_mpu_irqs,
757 .sdma_reqs = omap2_i2c1_sdma_reqs,
758 .main_clk = "i2c1_fck",
759 .prcm = {
760 .omap2 = {
761 .module_offs = CORE_MOD,
762 .prcm_reg_id = 1,
763 .module_bit = OMAP3430_EN_I2C1_SHIFT,
764 .idlest_reg_id = 1,
765 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
766 },
767 },
768 .class = &i2c_class,
769 .dev_attr = &i2c1_dev_attr,
770};
771
772/* I2C2 */
773static struct omap_i2c_dev_attr i2c2_dev_attr = {
774 .fifo_depth = 8, /* bytes */
775 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
776 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
777 OMAP_I2C_FLAG_BUS_SHIFT_2,
778};
779
780static struct omap_hwmod omap3xxx_i2c2_hwmod = {
781 .name = "i2c2",
782 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
783 .mpu_irqs = omap2_i2c2_mpu_irqs,
784 .sdma_reqs = omap2_i2c2_sdma_reqs,
785 .main_clk = "i2c2_fck",
786 .prcm = {
787 .omap2 = {
788 .module_offs = CORE_MOD,
789 .prcm_reg_id = 1,
790 .module_bit = OMAP3430_EN_I2C2_SHIFT,
791 .idlest_reg_id = 1,
792 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
793 },
794 },
795 .class = &i2c_class,
796 .dev_attr = &i2c2_dev_attr,
797};
798
799/* I2C3 */
800static struct omap_i2c_dev_attr i2c3_dev_attr = {
801 .fifo_depth = 64, /* bytes */
802 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
803 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
804 OMAP_I2C_FLAG_BUS_SHIFT_2,
805};
806
807static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700808 { .irq = 61 + OMAP_INTC_START, },
809 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600810};
811
812static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
813 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
814 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
815 { .dma_req = -1 }
816};
817
818static struct omap_hwmod omap3xxx_i2c3_hwmod = {
819 .name = "i2c3",
820 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
821 .mpu_irqs = i2c3_mpu_irqs,
822 .sdma_reqs = i2c3_sdma_reqs,
823 .main_clk = "i2c3_fck",
824 .prcm = {
825 .omap2 = {
826 .module_offs = CORE_MOD,
827 .prcm_reg_id = 1,
828 .module_bit = OMAP3430_EN_I2C3_SHIFT,
829 .idlest_reg_id = 1,
830 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
831 },
832 },
833 .class = &i2c_class,
834 .dev_attr = &i2c3_dev_attr,
835};
836
837/*
838 * 'gpio' class
839 * general purpose io module
840 */
841
842static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
843 .rev_offs = 0x0000,
844 .sysc_offs = 0x0010,
845 .syss_offs = 0x0014,
846 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
847 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
848 SYSS_HAS_RESET_STATUS),
849 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
850 .sysc_fields = &omap_hwmod_sysc_type1,
851};
852
853static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
854 .name = "gpio",
855 .sysc = &omap3xxx_gpio_sysc,
856 .rev = 1,
857};
858
859/* gpio_dev_attr */
860static struct omap_gpio_dev_attr gpio_dev_attr = {
861 .bank_width = 32,
862 .dbck_flag = true,
863};
864
865/* gpio1 */
866static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
867 { .role = "dbclk", .clk = "gpio1_dbck", },
868};
869
870static struct omap_hwmod omap3xxx_gpio1_hwmod = {
871 .name = "gpio1",
872 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
873 .mpu_irqs = omap2_gpio1_irqs,
874 .main_clk = "gpio1_ick",
875 .opt_clks = gpio1_opt_clks,
876 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
877 .prcm = {
878 .omap2 = {
879 .prcm_reg_id = 1,
880 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
881 .module_offs = WKUP_MOD,
882 .idlest_reg_id = 1,
883 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
884 },
885 },
886 .class = &omap3xxx_gpio_hwmod_class,
887 .dev_attr = &gpio_dev_attr,
888};
889
890/* gpio2 */
891static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
892 { .role = "dbclk", .clk = "gpio2_dbck", },
893};
894
895static struct omap_hwmod omap3xxx_gpio2_hwmod = {
896 .name = "gpio2",
897 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
898 .mpu_irqs = omap2_gpio2_irqs,
899 .main_clk = "gpio2_ick",
900 .opt_clks = gpio2_opt_clks,
901 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
902 .prcm = {
903 .omap2 = {
904 .prcm_reg_id = 1,
905 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
906 .module_offs = OMAP3430_PER_MOD,
907 .idlest_reg_id = 1,
908 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
909 },
910 },
911 .class = &omap3xxx_gpio_hwmod_class,
912 .dev_attr = &gpio_dev_attr,
913};
914
915/* gpio3 */
916static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
917 { .role = "dbclk", .clk = "gpio3_dbck", },
918};
919
920static struct omap_hwmod omap3xxx_gpio3_hwmod = {
921 .name = "gpio3",
922 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
923 .mpu_irqs = omap2_gpio3_irqs,
924 .main_clk = "gpio3_ick",
925 .opt_clks = gpio3_opt_clks,
926 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
927 .prcm = {
928 .omap2 = {
929 .prcm_reg_id = 1,
930 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
931 .module_offs = OMAP3430_PER_MOD,
932 .idlest_reg_id = 1,
933 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
934 },
935 },
936 .class = &omap3xxx_gpio_hwmod_class,
937 .dev_attr = &gpio_dev_attr,
938};
939
940/* gpio4 */
941static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
942 { .role = "dbclk", .clk = "gpio4_dbck", },
943};
944
945static struct omap_hwmod omap3xxx_gpio4_hwmod = {
946 .name = "gpio4",
947 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
948 .mpu_irqs = omap2_gpio4_irqs,
949 .main_clk = "gpio4_ick",
950 .opt_clks = gpio4_opt_clks,
951 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
952 .prcm = {
953 .omap2 = {
954 .prcm_reg_id = 1,
955 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
956 .module_offs = OMAP3430_PER_MOD,
957 .idlest_reg_id = 1,
958 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
959 },
960 },
961 .class = &omap3xxx_gpio_hwmod_class,
962 .dev_attr = &gpio_dev_attr,
963};
964
965/* gpio5 */
966static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700967 { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
968 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600969};
970
971static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
972 { .role = "dbclk", .clk = "gpio5_dbck", },
973};
974
975static struct omap_hwmod omap3xxx_gpio5_hwmod = {
976 .name = "gpio5",
977 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
978 .mpu_irqs = omap3xxx_gpio5_irqs,
979 .main_clk = "gpio5_ick",
980 .opt_clks = gpio5_opt_clks,
981 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
982 .prcm = {
983 .omap2 = {
984 .prcm_reg_id = 1,
985 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
986 .module_offs = OMAP3430_PER_MOD,
987 .idlest_reg_id = 1,
988 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
989 },
990 },
991 .class = &omap3xxx_gpio_hwmod_class,
992 .dev_attr = &gpio_dev_attr,
993};
994
995/* gpio6 */
996static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700997 { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
998 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600999};
1000
1001static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
1002 { .role = "dbclk", .clk = "gpio6_dbck", },
1003};
1004
1005static struct omap_hwmod omap3xxx_gpio6_hwmod = {
1006 .name = "gpio6",
1007 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1008 .mpu_irqs = omap3xxx_gpio6_irqs,
1009 .main_clk = "gpio6_ick",
1010 .opt_clks = gpio6_opt_clks,
1011 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
1012 .prcm = {
1013 .omap2 = {
1014 .prcm_reg_id = 1,
1015 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
1016 .module_offs = OMAP3430_PER_MOD,
1017 .idlest_reg_id = 1,
1018 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
1019 },
1020 },
1021 .class = &omap3xxx_gpio_hwmod_class,
1022 .dev_attr = &gpio_dev_attr,
1023};
1024
1025/* dma attributes */
1026static struct omap_dma_dev_attr dma_dev_attr = {
1027 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
1028 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
1029 .lch_count = 32,
1030};
1031
1032static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
1033 .rev_offs = 0x0000,
1034 .sysc_offs = 0x002c,
1035 .syss_offs = 0x0028,
1036 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1037 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1038 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1039 SYSS_HAS_RESET_STATUS),
1040 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1041 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1042 .sysc_fields = &omap_hwmod_sysc_type1,
1043};
1044
1045static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1046 .name = "dma",
1047 .sysc = &omap3xxx_dma_sysc,
1048};
1049
1050/* dma_system */
1051static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1052 .name = "dma",
1053 .class = &omap3xxx_dma_hwmod_class,
1054 .mpu_irqs = omap2_dma_system_irqs,
1055 .main_clk = "core_l3_ick",
1056 .prcm = {
1057 .omap2 = {
1058 .module_offs = CORE_MOD,
1059 .prcm_reg_id = 1,
1060 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1061 .idlest_reg_id = 1,
1062 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1063 },
1064 },
1065 .dev_attr = &dma_dev_attr,
1066 .flags = HWMOD_NO_IDLEST,
1067};
1068
1069/*
1070 * 'mcbsp' class
1071 * multi channel buffered serial port controller
1072 */
1073
1074static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1075 .sysc_offs = 0x008c,
1076 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1077 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1078 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1079 .sysc_fields = &omap_hwmod_sysc_type1,
1080 .clockact = 0x2,
1081};
1082
1083static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1084 .name = "mcbsp",
1085 .sysc = &omap3xxx_mcbsp_sysc,
1086 .rev = MCBSP_CONFIG_TYPE3,
1087};
1088
Peter Ujfalusi70391542012-06-18 16:18:43 -06001089/* McBSP functional clock mapping */
1090static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1091 { .role = "pad_fck", .clk = "mcbsp_clks" },
1092 { .role = "prcm_fck", .clk = "core_96m_fck" },
1093};
1094
1095static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1096 { .role = "pad_fck", .clk = "mcbsp_clks" },
1097 { .role = "prcm_fck", .clk = "per_96m_fck" },
1098};
1099
Paul Walmsley844a3b62012-04-19 04:04:33 -06001100/* mcbsp1 */
1101static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001102 { .name = "common", .irq = 16 + OMAP_INTC_START, },
1103 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
1104 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
1105 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001106};
1107
1108static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1109 .name = "mcbsp1",
1110 .class = &omap3xxx_mcbsp_hwmod_class,
1111 .mpu_irqs = omap3xxx_mcbsp1_irqs,
1112 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
1113 .main_clk = "mcbsp1_fck",
1114 .prcm = {
1115 .omap2 = {
1116 .prcm_reg_id = 1,
1117 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1118 .module_offs = CORE_MOD,
1119 .idlest_reg_id = 1,
1120 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1121 },
1122 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001123 .opt_clks = mcbsp15_opt_clks,
1124 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001125};
1126
1127/* mcbsp2 */
1128static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001129 { .name = "common", .irq = 17 + OMAP_INTC_START, },
1130 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
1131 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
1132 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001133};
1134
1135static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1136 .sidetone = "mcbsp2_sidetone",
1137};
1138
1139static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1140 .name = "mcbsp2",
1141 .class = &omap3xxx_mcbsp_hwmod_class,
1142 .mpu_irqs = omap3xxx_mcbsp2_irqs,
1143 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
1144 .main_clk = "mcbsp2_fck",
1145 .prcm = {
1146 .omap2 = {
1147 .prcm_reg_id = 1,
1148 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1149 .module_offs = OMAP3430_PER_MOD,
1150 .idlest_reg_id = 1,
1151 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1152 },
1153 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001154 .opt_clks = mcbsp234_opt_clks,
1155 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001156 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1157};
1158
1159/* mcbsp3 */
1160static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001161 { .name = "common", .irq = 22 + OMAP_INTC_START, },
1162 { .name = "tx", .irq = 89 + OMAP_INTC_START, },
1163 { .name = "rx", .irq = 90 + OMAP_INTC_START, },
1164 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001165};
1166
1167static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1168 .sidetone = "mcbsp3_sidetone",
1169};
1170
1171static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1172 .name = "mcbsp3",
1173 .class = &omap3xxx_mcbsp_hwmod_class,
1174 .mpu_irqs = omap3xxx_mcbsp3_irqs,
1175 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
1176 .main_clk = "mcbsp3_fck",
1177 .prcm = {
1178 .omap2 = {
1179 .prcm_reg_id = 1,
1180 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1181 .module_offs = OMAP3430_PER_MOD,
1182 .idlest_reg_id = 1,
1183 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1184 },
1185 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001186 .opt_clks = mcbsp234_opt_clks,
1187 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001188 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1189};
1190
1191/* mcbsp4 */
1192static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001193 { .name = "common", .irq = 23 + OMAP_INTC_START, },
1194 { .name = "tx", .irq = 54 + OMAP_INTC_START, },
1195 { .name = "rx", .irq = 55 + OMAP_INTC_START, },
1196 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001197};
1198
1199static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
1200 { .name = "rx", .dma_req = 20 },
1201 { .name = "tx", .dma_req = 19 },
1202 { .dma_req = -1 }
1203};
1204
1205static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1206 .name = "mcbsp4",
1207 .class = &omap3xxx_mcbsp_hwmod_class,
1208 .mpu_irqs = omap3xxx_mcbsp4_irqs,
1209 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
1210 .main_clk = "mcbsp4_fck",
1211 .prcm = {
1212 .omap2 = {
1213 .prcm_reg_id = 1,
1214 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1215 .module_offs = OMAP3430_PER_MOD,
1216 .idlest_reg_id = 1,
1217 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1218 },
1219 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001220 .opt_clks = mcbsp234_opt_clks,
1221 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001222};
1223
1224/* mcbsp5 */
1225static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001226 { .name = "common", .irq = 27 + OMAP_INTC_START, },
1227 { .name = "tx", .irq = 81 + OMAP_INTC_START, },
1228 { .name = "rx", .irq = 82 + OMAP_INTC_START, },
1229 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001230};
1231
1232static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
1233 { .name = "rx", .dma_req = 22 },
1234 { .name = "tx", .dma_req = 21 },
1235 { .dma_req = -1 }
1236};
1237
1238static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1239 .name = "mcbsp5",
1240 .class = &omap3xxx_mcbsp_hwmod_class,
1241 .mpu_irqs = omap3xxx_mcbsp5_irqs,
1242 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
1243 .main_clk = "mcbsp5_fck",
1244 .prcm = {
1245 .omap2 = {
1246 .prcm_reg_id = 1,
1247 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1248 .module_offs = CORE_MOD,
1249 .idlest_reg_id = 1,
1250 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1251 },
1252 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001253 .opt_clks = mcbsp15_opt_clks,
1254 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001255};
1256
1257/* 'mcbsp sidetone' class */
1258static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1259 .sysc_offs = 0x0010,
1260 .sysc_flags = SYSC_HAS_AUTOIDLE,
1261 .sysc_fields = &omap_hwmod_sysc_type1,
1262};
1263
1264static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1265 .name = "mcbsp_sidetone",
1266 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1267};
1268
1269/* mcbsp2_sidetone */
1270static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001271 { .name = "irq", .irq = 4 + OMAP_INTC_START, },
1272 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001273};
1274
1275static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1276 .name = "mcbsp2_sidetone",
1277 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1278 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
1279 .main_clk = "mcbsp2_fck",
1280 .prcm = {
1281 .omap2 = {
1282 .prcm_reg_id = 1,
1283 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1284 .module_offs = OMAP3430_PER_MOD,
1285 .idlest_reg_id = 1,
1286 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1287 },
1288 },
1289};
1290
1291/* mcbsp3_sidetone */
1292static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001293 { .name = "irq", .irq = 5 + OMAP_INTC_START, },
1294 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001295};
1296
1297static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1298 .name = "mcbsp3_sidetone",
1299 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
1300 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
1301 .main_clk = "mcbsp3_fck",
1302 .prcm = {
1303 .omap2 = {
1304 .prcm_reg_id = 1,
1305 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1306 .module_offs = OMAP3430_PER_MOD,
1307 .idlest_reg_id = 1,
1308 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1309 },
1310 },
1311};
1312
1313/* SR common */
1314static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1315 .clkact_shift = 20,
1316};
1317
1318static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1319 .sysc_offs = 0x24,
1320 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
1321 .clockact = CLOCKACT_TEST_ICLK,
1322 .sysc_fields = &omap34xx_sr_sysc_fields,
1323};
1324
1325static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1326 .name = "smartreflex",
1327 .sysc = &omap34xx_sr_sysc,
1328 .rev = 1,
1329};
1330
1331static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1332 .sidle_shift = 24,
1333 .enwkup_shift = 26,
1334};
1335
1336static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1337 .sysc_offs = 0x38,
1338 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1339 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1340 SYSC_NO_CACHE),
1341 .sysc_fields = &omap36xx_sr_sysc_fields,
1342};
1343
1344static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1345 .name = "smartreflex",
1346 .sysc = &omap36xx_sr_sysc,
1347 .rev = 2,
1348};
1349
1350/* SR1 */
1351static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1352 .sensor_voltdm_name = "mpu_iva",
1353};
1354
1355static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001356 { .irq = 18 + OMAP_INTC_START, },
1357 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001358};
1359
1360static struct omap_hwmod omap34xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301361 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001362 .class = &omap34xx_smartreflex_hwmod_class,
1363 .main_clk = "sr1_fck",
1364 .prcm = {
1365 .omap2 = {
1366 .prcm_reg_id = 1,
1367 .module_bit = OMAP3430_EN_SR1_SHIFT,
1368 .module_offs = WKUP_MOD,
1369 .idlest_reg_id = 1,
1370 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1371 },
1372 },
1373 .dev_attr = &sr1_dev_attr,
1374 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1375 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1376};
1377
1378static struct omap_hwmod omap36xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301379 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001380 .class = &omap36xx_smartreflex_hwmod_class,
1381 .main_clk = "sr1_fck",
1382 .prcm = {
1383 .omap2 = {
1384 .prcm_reg_id = 1,
1385 .module_bit = OMAP3430_EN_SR1_SHIFT,
1386 .module_offs = WKUP_MOD,
1387 .idlest_reg_id = 1,
1388 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1389 },
1390 },
1391 .dev_attr = &sr1_dev_attr,
1392 .mpu_irqs = omap3_smartreflex_mpu_irqs,
1393};
1394
1395/* SR2 */
1396static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1397 .sensor_voltdm_name = "core",
1398};
1399
1400static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001401 { .irq = 19 + OMAP_INTC_START, },
1402 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001403};
1404
1405static struct omap_hwmod omap34xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301406 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001407 .class = &omap34xx_smartreflex_hwmod_class,
1408 .main_clk = "sr2_fck",
1409 .prcm = {
1410 .omap2 = {
1411 .prcm_reg_id = 1,
1412 .module_bit = OMAP3430_EN_SR2_SHIFT,
1413 .module_offs = WKUP_MOD,
1414 .idlest_reg_id = 1,
1415 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1416 },
1417 },
1418 .dev_attr = &sr2_dev_attr,
1419 .mpu_irqs = omap3_smartreflex_core_irqs,
1420 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1421};
1422
1423static struct omap_hwmod omap36xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301424 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001425 .class = &omap36xx_smartreflex_hwmod_class,
1426 .main_clk = "sr2_fck",
1427 .prcm = {
1428 .omap2 = {
1429 .prcm_reg_id = 1,
1430 .module_bit = OMAP3430_EN_SR2_SHIFT,
1431 .module_offs = WKUP_MOD,
1432 .idlest_reg_id = 1,
1433 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1434 },
1435 },
1436 .dev_attr = &sr2_dev_attr,
1437 .mpu_irqs = omap3_smartreflex_core_irqs,
1438};
1439
1440/*
1441 * 'mailbox' class
1442 * mailbox module allowing communication between the on-chip processors
1443 * using a queued mailbox-interrupt mechanism.
1444 */
1445
1446static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1447 .rev_offs = 0x000,
1448 .sysc_offs = 0x010,
1449 .syss_offs = 0x014,
1450 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1451 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1452 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1453 .sysc_fields = &omap_hwmod_sysc_type1,
1454};
1455
1456static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1457 .name = "mailbox",
1458 .sysc = &omap3xxx_mailbox_sysc,
1459};
1460
1461static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001462 { .irq = 26 + OMAP_INTC_START, },
1463 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001464};
1465
1466static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1467 .name = "mailbox",
1468 .class = &omap3xxx_mailbox_hwmod_class,
1469 .mpu_irqs = omap3xxx_mailbox_irqs,
1470 .main_clk = "mailboxes_ick",
1471 .prcm = {
1472 .omap2 = {
1473 .prcm_reg_id = 1,
1474 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1475 .module_offs = CORE_MOD,
1476 .idlest_reg_id = 1,
1477 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1478 },
1479 },
1480};
1481
1482/*
1483 * 'mcspi' class
1484 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1485 * bus
1486 */
1487
1488static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1489 .rev_offs = 0x0000,
1490 .sysc_offs = 0x0010,
1491 .syss_offs = 0x0014,
1492 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1493 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1494 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1495 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1496 .sysc_fields = &omap_hwmod_sysc_type1,
1497};
1498
1499static struct omap_hwmod_class omap34xx_mcspi_class = {
1500 .name = "mcspi",
1501 .sysc = &omap34xx_mcspi_sysc,
1502 .rev = OMAP3_MCSPI_REV,
1503};
1504
1505/* mcspi1 */
1506static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1507 .num_chipselect = 4,
1508};
1509
1510static struct omap_hwmod omap34xx_mcspi1 = {
1511 .name = "mcspi1",
1512 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1513 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1514 .main_clk = "mcspi1_fck",
1515 .prcm = {
1516 .omap2 = {
1517 .module_offs = CORE_MOD,
1518 .prcm_reg_id = 1,
1519 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1520 .idlest_reg_id = 1,
1521 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1522 },
1523 },
1524 .class = &omap34xx_mcspi_class,
1525 .dev_attr = &omap_mcspi1_dev_attr,
1526};
1527
1528/* mcspi2 */
1529static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1530 .num_chipselect = 2,
1531};
1532
1533static struct omap_hwmod omap34xx_mcspi2 = {
1534 .name = "mcspi2",
1535 .mpu_irqs = omap2_mcspi2_mpu_irqs,
1536 .sdma_reqs = omap2_mcspi2_sdma_reqs,
1537 .main_clk = "mcspi2_fck",
1538 .prcm = {
1539 .omap2 = {
1540 .module_offs = CORE_MOD,
1541 .prcm_reg_id = 1,
1542 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1543 .idlest_reg_id = 1,
1544 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1545 },
1546 },
1547 .class = &omap34xx_mcspi_class,
1548 .dev_attr = &omap_mcspi2_dev_attr,
1549};
1550
1551/* mcspi3 */
1552static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001553 { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
1554 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001555};
1556
1557static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
1558 { .name = "tx0", .dma_req = 15 },
1559 { .name = "rx0", .dma_req = 16 },
1560 { .name = "tx1", .dma_req = 23 },
1561 { .name = "rx1", .dma_req = 24 },
1562 { .dma_req = -1 }
1563};
1564
1565static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1566 .num_chipselect = 2,
1567};
1568
1569static struct omap_hwmod omap34xx_mcspi3 = {
1570 .name = "mcspi3",
1571 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
1572 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
1573 .main_clk = "mcspi3_fck",
1574 .prcm = {
1575 .omap2 = {
1576 .module_offs = CORE_MOD,
1577 .prcm_reg_id = 1,
1578 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1579 .idlest_reg_id = 1,
1580 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1581 },
1582 },
1583 .class = &omap34xx_mcspi_class,
1584 .dev_attr = &omap_mcspi3_dev_attr,
1585};
1586
1587/* mcspi4 */
1588static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001589 { .name = "irq", .irq = 48 + OMAP_INTC_START, },
1590 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001591};
1592
1593static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
1594 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
1595 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
1596 { .dma_req = -1 }
1597};
1598
1599static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1600 .num_chipselect = 1,
1601};
1602
1603static struct omap_hwmod omap34xx_mcspi4 = {
1604 .name = "mcspi4",
1605 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
1606 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
1607 .main_clk = "mcspi4_fck",
1608 .prcm = {
1609 .omap2 = {
1610 .module_offs = CORE_MOD,
1611 .prcm_reg_id = 1,
1612 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1613 .idlest_reg_id = 1,
1614 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1615 },
1616 },
1617 .class = &omap34xx_mcspi_class,
1618 .dev_attr = &omap_mcspi4_dev_attr,
1619};
1620
1621/* usbhsotg */
1622static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1623 .rev_offs = 0x0400,
1624 .sysc_offs = 0x0404,
1625 .syss_offs = 0x0408,
1626 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1627 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1628 SYSC_HAS_AUTOIDLE),
1629 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1630 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1631 .sysc_fields = &omap_hwmod_sysc_type1,
1632};
1633
1634static struct omap_hwmod_class usbotg_class = {
1635 .name = "usbotg",
1636 .sysc = &omap3xxx_usbhsotg_sysc,
1637};
1638
1639/* usb_otg_hs */
1640static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
1641
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001642 { .name = "mc", .irq = 92 + OMAP_INTC_START, },
1643 { .name = "dma", .irq = 93 + OMAP_INTC_START, },
1644 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001645};
1646
1647static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1648 .name = "usb_otg_hs",
1649 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
1650 .main_clk = "hsotgusb_ick",
1651 .prcm = {
1652 .omap2 = {
1653 .prcm_reg_id = 1,
1654 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1655 .module_offs = CORE_MOD,
1656 .idlest_reg_id = 1,
1657 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
1658 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT
1659 },
1660 },
1661 .class = &usbotg_class,
1662
1663 /*
1664 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1665 * broken when autoidle is enabled
1666 * workaround is to disable the autoidle bit at module level.
1667 */
1668 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
1669 | HWMOD_SWSUP_MSTANDBY,
1670};
1671
1672/* usb_otg_hs */
1673static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001674 { .name = "mc", .irq = 71 + OMAP_INTC_START, },
1675 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001676};
1677
1678static struct omap_hwmod_class am35xx_usbotg_class = {
1679 .name = "am35xx_usbotg",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001680};
1681
1682static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1683 .name = "am35x_otg_hs",
1684 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001685 .main_clk = "hsotgusb_fck",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001686 .class = &am35xx_usbotg_class,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001687 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001688};
1689
1690/* MMC/SD/SDIO common */
1691static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1692 .rev_offs = 0x1fc,
1693 .sysc_offs = 0x10,
1694 .syss_offs = 0x14,
1695 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1696 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1697 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1698 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1699 .sysc_fields = &omap_hwmod_sysc_type1,
1700};
1701
1702static struct omap_hwmod_class omap34xx_mmc_class = {
1703 .name = "mmc",
1704 .sysc = &omap34xx_mmc_sysc,
1705};
1706
1707/* MMC/SD/SDIO1 */
1708
1709static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001710 { .irq = 83 + OMAP_INTC_START, },
1711 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001712};
1713
1714static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
1715 { .name = "tx", .dma_req = 61, },
1716 { .name = "rx", .dma_req = 62, },
1717 { .dma_req = -1 }
1718};
1719
1720static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1721 { .role = "dbck", .clk = "omap_32k_fck", },
1722};
1723
1724static struct omap_mmc_dev_attr mmc1_dev_attr = {
1725 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1726};
1727
1728/* See 35xx errata 2.1.1.128 in SPRZ278F */
1729static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = {
1730 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1731 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1732};
1733
1734static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1735 .name = "mmc1",
1736 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1737 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1738 .opt_clks = omap34xx_mmc1_opt_clks,
1739 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1740 .main_clk = "mmchs1_fck",
1741 .prcm = {
1742 .omap2 = {
1743 .module_offs = CORE_MOD,
1744 .prcm_reg_id = 1,
1745 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1746 .idlest_reg_id = 1,
1747 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1748 },
1749 },
1750 .dev_attr = &mmc1_pre_es3_dev_attr,
1751 .class = &omap34xx_mmc_class,
1752};
1753
1754static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1755 .name = "mmc1",
1756 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
1757 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
1758 .opt_clks = omap34xx_mmc1_opt_clks,
1759 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1760 .main_clk = "mmchs1_fck",
1761 .prcm = {
1762 .omap2 = {
1763 .module_offs = CORE_MOD,
1764 .prcm_reg_id = 1,
1765 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1766 .idlest_reg_id = 1,
1767 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1768 },
1769 },
1770 .dev_attr = &mmc1_dev_attr,
1771 .class = &omap34xx_mmc_class,
1772};
1773
1774/* MMC/SD/SDIO2 */
1775
1776static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001777 { .irq = 86 + OMAP_INTC_START, },
1778 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001779};
1780
1781static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
1782 { .name = "tx", .dma_req = 47, },
1783 { .name = "rx", .dma_req = 48, },
1784 { .dma_req = -1 }
1785};
1786
1787static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1788 { .role = "dbck", .clk = "omap_32k_fck", },
1789};
1790
1791/* See 35xx errata 2.1.1.128 in SPRZ278F */
1792static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = {
1793 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1794};
1795
1796static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1797 .name = "mmc2",
1798 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1799 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1800 .opt_clks = omap34xx_mmc2_opt_clks,
1801 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1802 .main_clk = "mmchs2_fck",
1803 .prcm = {
1804 .omap2 = {
1805 .module_offs = CORE_MOD,
1806 .prcm_reg_id = 1,
1807 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1808 .idlest_reg_id = 1,
1809 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1810 },
1811 },
1812 .dev_attr = &mmc2_pre_es3_dev_attr,
1813 .class = &omap34xx_mmc_class,
1814};
1815
1816static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1817 .name = "mmc2",
1818 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
1819 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
1820 .opt_clks = omap34xx_mmc2_opt_clks,
1821 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1822 .main_clk = "mmchs2_fck",
1823 .prcm = {
1824 .omap2 = {
1825 .module_offs = CORE_MOD,
1826 .prcm_reg_id = 1,
1827 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1828 .idlest_reg_id = 1,
1829 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1830 },
1831 },
1832 .class = &omap34xx_mmc_class,
1833};
1834
1835/* MMC/SD/SDIO3 */
1836
1837static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001838 { .irq = 94 + OMAP_INTC_START, },
1839 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001840};
1841
1842static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
1843 { .name = "tx", .dma_req = 77, },
1844 { .name = "rx", .dma_req = 78, },
1845 { .dma_req = -1 }
1846};
1847
1848static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1849 { .role = "dbck", .clk = "omap_32k_fck", },
1850};
1851
1852static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1853 .name = "mmc3",
1854 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
1855 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
1856 .opt_clks = omap34xx_mmc3_opt_clks,
1857 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1858 .main_clk = "mmchs3_fck",
1859 .prcm = {
1860 .omap2 = {
1861 .prcm_reg_id = 1,
1862 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1863 .idlest_reg_id = 1,
1864 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1865 },
1866 },
1867 .class = &omap34xx_mmc_class,
1868};
1869
1870/*
1871 * 'usb_host_hs' class
1872 * high-speed multi-port usb host controller
1873 */
1874
1875static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1876 .rev_offs = 0x0000,
1877 .sysc_offs = 0x0010,
1878 .syss_offs = 0x0014,
1879 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1880 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1881 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1882 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1883 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1884 .sysc_fields = &omap_hwmod_sysc_type1,
1885};
1886
1887static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1888 .name = "usb_host_hs",
1889 .sysc = &omap3xxx_usb_host_hs_sysc,
1890};
1891
1892static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = {
1893 { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", },
1894};
1895
1896static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001897 { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
1898 { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
1899 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001900};
1901
1902static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1903 .name = "usb_host_hs",
1904 .class = &omap3xxx_usb_host_hs_hwmod_class,
1905 .clkdm_name = "l3_init_clkdm",
1906 .mpu_irqs = omap3xxx_usb_host_hs_irqs,
1907 .main_clk = "usbhost_48m_fck",
1908 .prcm = {
1909 .omap2 = {
1910 .module_offs = OMAP3430ES2_USBHOST_MOD,
1911 .prcm_reg_id = 1,
1912 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1913 .idlest_reg_id = 1,
1914 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1915 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1916 },
1917 },
1918 .opt_clks = omap3xxx_usb_host_hs_opt_clks,
1919 .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks),
1920
1921 /*
1922 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1923 * id: i660
1924 *
1925 * Description:
1926 * In the following configuration :
1927 * - USBHOST module is set to smart-idle mode
1928 * - PRCM asserts idle_req to the USBHOST module ( This typically
1929 * happens when the system is going to a low power mode : all ports
1930 * have been suspended, the master part of the USBHOST module has
1931 * entered the standby state, and SW has cut the functional clocks)
1932 * - an USBHOST interrupt occurs before the module is able to answer
1933 * idle_ack, typically a remote wakeup IRQ.
1934 * Then the USB HOST module will enter a deadlock situation where it
1935 * is no more accessible nor functional.
1936 *
1937 * Workaround:
1938 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1939 */
1940
1941 /*
1942 * Errata: USB host EHCI may stall when entering smart-standby mode
1943 * Id: i571
1944 *
1945 * Description:
1946 * When the USBHOST module is set to smart-standby mode, and when it is
1947 * ready to enter the standby state (i.e. all ports are suspended and
1948 * all attached devices are in suspend mode), then it can wrongly assert
1949 * the Mstandby signal too early while there are still some residual OCP
1950 * transactions ongoing. If this condition occurs, the internal state
1951 * machine may go to an undefined state and the USB link may be stuck
1952 * upon the next resume.
1953 *
1954 * Workaround:
1955 * Don't use smart standby; use only force standby,
1956 * hence HWMOD_SWSUP_MSTANDBY
1957 */
1958
1959 /*
1960 * During system boot; If the hwmod framework resets the module
1961 * the module will have smart idle settings; which can lead to deadlock
1962 * (above Errata Id:i660); so, dont reset the module during boot;
1963 * Use HWMOD_INIT_NO_RESET.
1964 */
1965
1966 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY |
1967 HWMOD_INIT_NO_RESET,
1968};
1969
1970/*
1971 * 'usb_tll_hs' class
1972 * usb_tll_hs module is the adapter on the usb_host_hs ports
1973 */
1974static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1975 .rev_offs = 0x0000,
1976 .sysc_offs = 0x0010,
1977 .syss_offs = 0x0014,
1978 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1979 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1980 SYSC_HAS_AUTOIDLE),
1981 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1982 .sysc_fields = &omap_hwmod_sysc_type1,
1983};
1984
1985static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1986 .name = "usb_tll_hs",
1987 .sysc = &omap3xxx_usb_tll_hs_sysc,
1988};
1989
1990static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07001991 { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
1992 { .irq = -1 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001993};
1994
1995static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1996 .name = "usb_tll_hs",
1997 .class = &omap3xxx_usb_tll_hs_hwmod_class,
1998 .clkdm_name = "l3_init_clkdm",
1999 .mpu_irqs = omap3xxx_usb_tll_hs_irqs,
2000 .main_clk = "usbtll_fck",
2001 .prcm = {
2002 .omap2 = {
2003 .module_offs = CORE_MOD,
2004 .prcm_reg_id = 3,
2005 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
2006 .idlest_reg_id = 3,
2007 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
2008 },
2009 },
2010};
2011
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002012static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
2013 .name = "hdq1w",
2014 .mpu_irqs = omap2_hdq1w_mpu_irqs,
2015 .main_clk = "hdq_fck",
2016 .prcm = {
2017 .omap2 = {
2018 .module_offs = CORE_MOD,
2019 .prcm_reg_id = 1,
2020 .module_bit = OMAP3430_EN_HDQ_SHIFT,
2021 .idlest_reg_id = 1,
2022 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
2023 },
2024 },
2025 .class = &omap2_hdq1w_class,
2026};
2027
Paul Walmsley844a3b62012-04-19 04:04:33 -06002028/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002029 * '32K sync counter' class
2030 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
2031 */
2032static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
2033 .rev_offs = 0x0000,
2034 .sysc_offs = 0x0004,
2035 .sysc_flags = SYSC_HAS_SIDLEMODE,
2036 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
2037 .sysc_fields = &omap_hwmod_sysc_type1,
2038};
2039
2040static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
2041 .name = "counter",
2042 .sysc = &omap3xxx_counter_sysc,
2043};
2044
2045static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
2046 .name = "counter_32k",
2047 .class = &omap3xxx_counter_hwmod_class,
2048 .clkdm_name = "wkup_clkdm",
2049 .flags = HWMOD_SWSUP_SIDLE,
2050 .main_clk = "wkup_32k_fck",
2051 .prcm = {
2052 .omap2 = {
2053 .module_offs = WKUP_MOD,
2054 .prcm_reg_id = 1,
2055 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
2056 .idlest_reg_id = 1,
2057 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
2058 },
2059 },
2060};
2061
Paul Walmsley844a3b62012-04-19 04:04:33 -06002062/*
2063 * interfaces
2064 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302065
Paul Walmsley73591542010-02-22 22:09:32 -07002066/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002067static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
2068 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002069 .slave = &omap3xxx_l4_core_hwmod,
2070 .user = OCP_USER_MPU | OCP_USER_SDMA,
2071};
2072
2073/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002074static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
2075 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07002076 .slave = &omap3xxx_l4_per_hwmod,
2077 .user = OCP_USER_MPU | OCP_USER_SDMA,
2078};
2079
sricharan4bb194d2011-02-08 22:13:37 +05302080static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
2081 {
Paul Walmsley844a3b62012-04-19 04:04:33 -06002082 .pa_start = 0x68000000,
2083 .pa_end = 0x6800ffff,
2084 .flags = ADDR_TYPE_RT,
sricharan4bb194d2011-02-08 22:13:37 +05302085 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002086 { }
sricharan4bb194d2011-02-08 22:13:37 +05302087};
2088
Paul Walmsley73591542010-02-22 22:09:32 -07002089/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06002090static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05302091 .master = &omap3xxx_mpu_hwmod,
2092 .slave = &omap3xxx_l3_main_hwmod,
2093 .addr = omap3xxx_l3_main_addrs,
Paul Walmsley73591542010-02-22 22:09:32 -07002094 .user = OCP_USER_MPU,
2095};
2096
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002097/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06002098static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
2099 .master = &omap3430es1_dss_core_hwmod,
2100 .slave = &omap3xxx_l3_main_hwmod,
2101 .user = OCP_USER_MPU | OCP_USER_SDMA,
2102};
2103
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002104static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
2105 .master = &omap3xxx_dss_core_hwmod,
2106 .slave = &omap3xxx_l3_main_hwmod,
2107 .fw = {
2108 .omap2 = {
2109 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
2110 .flags = OMAP_FIREWALL_L3,
2111 }
2112 },
2113 .user = OCP_USER_MPU | OCP_USER_SDMA,
2114};
2115
Hema HK870ea2b2011-02-17 12:07:18 +05302116/* l3_core -> usbhsotg interface */
2117static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
2118 .master = &omap3xxx_usbhsotg_hwmod,
2119 .slave = &omap3xxx_l3_main_hwmod,
2120 .clk = "core_l3_ick",
2121 .user = OCP_USER_MPU,
2122};
Paul Walmsley73591542010-02-22 22:09:32 -07002123
Hema HK273ff8c2011-02-17 12:07:19 +05302124/* l3_core -> am35xx_usbhsotg interface */
2125static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
2126 .master = &am35xx_usbhsotg_hwmod,
2127 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002128 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302129 .user = OCP_USER_MPU,
2130};
Paul Walmsley89ea2582012-06-27 14:53:46 -06002131
Paul Walmsley73591542010-02-22 22:09:32 -07002132/* L4_CORE -> L4_WKUP interface */
2133static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
2134 .master = &omap3xxx_l4_core_hwmod,
2135 .slave = &omap3xxx_l4_wkup_hwmod,
2136 .user = OCP_USER_MPU | OCP_USER_SDMA,
2137};
2138
Paul Walmsleyb1636052011-03-01 13:12:56 -08002139/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002140static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002141 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002142 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
2143 .clk = "mmchs1_ick",
2144 .addr = omap2430_mmc1_addr_space,
2145 .user = OCP_USER_MPU | OCP_USER_SDMA,
2146 .flags = OMAP_FIREWALL_L4
2147};
2148
2149static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
2150 .master = &omap3xxx_l4_core_hwmod,
2151 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002152 .clk = "mmchs1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002153 .addr = omap2430_mmc1_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002154 .user = OCP_USER_MPU | OCP_USER_SDMA,
2155 .flags = OMAP_FIREWALL_L4
2156};
2157
2158/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002159static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08002160 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06002161 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
2162 .clk = "mmchs2_ick",
2163 .addr = omap2430_mmc2_addr_space,
2164 .user = OCP_USER_MPU | OCP_USER_SDMA,
2165 .flags = OMAP_FIREWALL_L4
2166};
2167
2168static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2169 .master = &omap3xxx_l4_core_hwmod,
2170 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002171 .clk = "mmchs2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002172 .addr = omap2430_mmc2_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002173 .user = OCP_USER_MPU | OCP_USER_SDMA,
2174 .flags = OMAP_FIREWALL_L4
2175};
2176
2177/* L4 CORE -> MMC3 interface */
2178static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
2179 {
2180 .pa_start = 0x480ad000,
2181 .pa_end = 0x480ad1ff,
2182 .flags = ADDR_TYPE_RT,
2183 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002184 { }
Paul Walmsleyb1636052011-03-01 13:12:56 -08002185};
2186
2187static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2188 .master = &omap3xxx_l4_core_hwmod,
2189 .slave = &omap3xxx_mmc3_hwmod,
2190 .clk = "mmchs3_ick",
2191 .addr = omap3xxx_mmc3_addr_space,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002192 .user = OCP_USER_MPU | OCP_USER_SDMA,
2193 .flags = OMAP_FIREWALL_L4
2194};
2195
Kevin Hilman046465b2010-09-27 20:19:30 +05302196/* L4 CORE -> UART1 interface */
2197static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
2198 {
2199 .pa_start = OMAP3_UART1_BASE,
2200 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
2201 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2202 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002203 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302204};
2205
2206static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2207 .master = &omap3xxx_l4_core_hwmod,
2208 .slave = &omap3xxx_uart1_hwmod,
2209 .clk = "uart1_ick",
2210 .addr = omap3xxx_uart1_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302211 .user = OCP_USER_MPU | OCP_USER_SDMA,
2212};
2213
2214/* L4 CORE -> UART2 interface */
2215static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
2216 {
2217 .pa_start = OMAP3_UART2_BASE,
2218 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
2219 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2220 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002221 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302222};
2223
2224static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2225 .master = &omap3xxx_l4_core_hwmod,
2226 .slave = &omap3xxx_uart2_hwmod,
2227 .clk = "uart2_ick",
2228 .addr = omap3xxx_uart2_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302229 .user = OCP_USER_MPU | OCP_USER_SDMA,
2230};
2231
2232/* L4 PER -> UART3 interface */
2233static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
2234 {
2235 .pa_start = OMAP3_UART3_BASE,
2236 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
2237 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2238 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002239 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302240};
2241
2242static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2243 .master = &omap3xxx_l4_per_hwmod,
2244 .slave = &omap3xxx_uart3_hwmod,
2245 .clk = "uart3_ick",
2246 .addr = omap3xxx_uart3_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302247 .user = OCP_USER_MPU | OCP_USER_SDMA,
2248};
2249
2250/* L4 PER -> UART4 interface */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002251static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302252 {
2253 .pa_start = OMAP3_UART4_BASE,
2254 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
2255 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
2256 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002257 { }
Kevin Hilman046465b2010-09-27 20:19:30 +05302258};
2259
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002260static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302261 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002262 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302263 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002264 .addr = omap36xx_uart4_addr_space,
Kevin Hilman046465b2010-09-27 20:19:30 +05302265 .user = OCP_USER_MPU | OCP_USER_SDMA,
2266};
2267
Kyle Manna4bf90f62011-10-18 13:47:41 -05002268/* AM35xx: L4 CORE -> UART4 interface */
2269static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
2270 {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002271 .pa_start = OMAP3_UART4_AM35XX_BASE,
2272 .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
2273 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002274 },
Paul Walmsleybf765232012-06-27 14:53:46 -06002275 { }
Kyle Manna4bf90f62011-10-18 13:47:41 -05002276};
2277
2278static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002279 .master = &omap3xxx_l4_core_hwmod,
2280 .slave = &am35xx_uart4_hwmod,
2281 .clk = "uart4_ick",
2282 .addr = am35xx_uart4_addr_space,
2283 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002284};
2285
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302286/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302287static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2288 .master = &omap3xxx_l4_core_hwmod,
2289 .slave = &omap3xxx_i2c1_hwmod,
2290 .clk = "i2c1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002291 .addr = omap2_i2c1_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302292 .fw = {
2293 .omap2 = {
2294 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2295 .l4_prot_group = 7,
2296 .flags = OMAP_FIREWALL_L4,
2297 }
2298 },
2299 .user = OCP_USER_MPU | OCP_USER_SDMA,
2300};
2301
2302/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302303static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2304 .master = &omap3xxx_l4_core_hwmod,
2305 .slave = &omap3xxx_i2c2_hwmod,
2306 .clk = "i2c2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002307 .addr = omap2_i2c2_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302308 .fw = {
2309 .omap2 = {
2310 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2311 .l4_prot_group = 7,
2312 .flags = OMAP_FIREWALL_L4,
2313 }
2314 },
2315 .user = OCP_USER_MPU | OCP_USER_SDMA,
2316};
2317
2318/* L4 CORE -> I2C3 interface */
2319static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
2320 {
2321 .pa_start = 0x48060000,
Paul Walmsleyded11382011-07-09 19:14:06 -06002322 .pa_end = 0x48060000 + SZ_128 - 1,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302323 .flags = ADDR_TYPE_RT,
2324 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002325 { }
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302326};
2327
2328static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2329 .master = &omap3xxx_l4_core_hwmod,
2330 .slave = &omap3xxx_i2c3_hwmod,
2331 .clk = "i2c3_ick",
2332 .addr = omap3xxx_i2c3_addr_space,
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302333 .fw = {
2334 .omap2 = {
2335 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2336 .l4_prot_group = 7,
2337 .flags = OMAP_FIREWALL_L4,
2338 }
2339 },
2340 .user = OCP_USER_MPU | OCP_USER_SDMA,
2341};
2342
Thara Gopinathd3442722010-05-29 22:02:24 +05302343/* L4 CORE -> SR1 interface */
2344static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2345 {
2346 .pa_start = OMAP34XX_SR1_BASE,
2347 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2348 .flags = ADDR_TYPE_RT,
2349 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002350 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302351};
2352
Paul Walmsley844a3b62012-04-19 04:04:33 -06002353static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302354 .master = &omap3xxx_l4_core_hwmod,
2355 .slave = &omap34xx_sr1_hwmod,
2356 .clk = "sr_l4_ick",
2357 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302358 .user = OCP_USER_MPU,
2359};
2360
Paul Walmsley844a3b62012-04-19 04:04:33 -06002361static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2362 .master = &omap3xxx_l4_core_hwmod,
2363 .slave = &omap36xx_sr1_hwmod,
2364 .clk = "sr_l4_ick",
2365 .addr = omap3_sr1_addr_space,
2366 .user = OCP_USER_MPU,
2367};
2368
Thara Gopinathd3442722010-05-29 22:02:24 +05302369/* L4 CORE -> SR1 interface */
2370static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2371 {
2372 .pa_start = OMAP34XX_SR2_BASE,
2373 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2374 .flags = ADDR_TYPE_RT,
2375 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002376 { }
Thara Gopinathd3442722010-05-29 22:02:24 +05302377};
2378
Paul Walmsley844a3b62012-04-19 04:04:33 -06002379static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302380 .master = &omap3xxx_l4_core_hwmod,
2381 .slave = &omap34xx_sr2_hwmod,
2382 .clk = "sr_l4_ick",
2383 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302384 .user = OCP_USER_MPU,
2385};
2386
Paul Walmsley844a3b62012-04-19 04:04:33 -06002387static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2388 .master = &omap3xxx_l4_core_hwmod,
2389 .slave = &omap36xx_sr2_hwmod,
2390 .clk = "sr_l4_ick",
2391 .addr = omap3_sr2_addr_space,
2392 .user = OCP_USER_MPU,
2393};
Hema HK870ea2b2011-02-17 12:07:18 +05302394
2395static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
2396 {
2397 .pa_start = OMAP34XX_HSUSB_OTG_BASE,
2398 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
2399 .flags = ADDR_TYPE_RT
2400 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002401 { }
Hema HK870ea2b2011-02-17 12:07:18 +05302402};
2403
2404/* l4_core -> usbhsotg */
2405static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2406 .master = &omap3xxx_l4_core_hwmod,
2407 .slave = &omap3xxx_usbhsotg_hwmod,
2408 .clk = "l4_ick",
2409 .addr = omap3xxx_usbhsotg_addrs,
Hema HK870ea2b2011-02-17 12:07:18 +05302410 .user = OCP_USER_MPU,
2411};
2412
Hema HK273ff8c2011-02-17 12:07:19 +05302413static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
2414 {
2415 .pa_start = AM35XX_IPSS_USBOTGSS_BASE,
2416 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
2417 .flags = ADDR_TYPE_RT
2418 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002419 { }
Hema HK273ff8c2011-02-17 12:07:19 +05302420};
2421
2422/* l4_core -> usbhsotg */
2423static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2424 .master = &omap3xxx_l4_core_hwmod,
2425 .slave = &am35xx_usbhsotg_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002426 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302427 .addr = am35xx_usbhsotg_addrs,
Hema HK273ff8c2011-02-17 12:07:19 +05302428 .user = OCP_USER_MPU,
2429};
2430
Paul Walmsley43085702012-04-19 04:03:53 -06002431/* L4_WKUP -> L4_SEC interface */
2432static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2433 .master = &omap3xxx_l4_wkup_hwmod,
2434 .slave = &omap3xxx_l4_sec_hwmod,
2435 .user = OCP_USER_MPU | OCP_USER_SDMA,
2436};
2437
Kevin Hilman540064b2010-07-26 16:34:32 -06002438/* IVA2 <- L3 interface */
2439static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2440 .master = &omap3xxx_l3_main_hwmod,
2441 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002442 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002443 .user = OCP_USER_MPU | OCP_USER_SDMA,
2444};
2445
Thara Gopinathce722d22011-02-23 00:14:05 -07002446static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
2447 {
2448 .pa_start = 0x48318000,
2449 .pa_end = 0x48318000 + SZ_1K - 1,
2450 .flags = ADDR_TYPE_RT
2451 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002452 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002453};
2454
2455/* l4_wkup -> timer1 */
2456static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2457 .master = &omap3xxx_l4_wkup_hwmod,
2458 .slave = &omap3xxx_timer1_hwmod,
2459 .clk = "gpt1_ick",
2460 .addr = omap3xxx_timer1_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002461 .user = OCP_USER_MPU | OCP_USER_SDMA,
2462};
2463
Thara Gopinathce722d22011-02-23 00:14:05 -07002464static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
2465 {
2466 .pa_start = 0x49032000,
2467 .pa_end = 0x49032000 + SZ_1K - 1,
2468 .flags = ADDR_TYPE_RT
2469 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002470 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002471};
2472
2473/* l4_per -> timer2 */
2474static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2475 .master = &omap3xxx_l4_per_hwmod,
2476 .slave = &omap3xxx_timer2_hwmod,
2477 .clk = "gpt2_ick",
2478 .addr = omap3xxx_timer2_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002479 .user = OCP_USER_MPU | OCP_USER_SDMA,
2480};
2481
Thara Gopinathce722d22011-02-23 00:14:05 -07002482static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
2483 {
2484 .pa_start = 0x49034000,
2485 .pa_end = 0x49034000 + SZ_1K - 1,
2486 .flags = ADDR_TYPE_RT
2487 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002488 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002489};
2490
2491/* l4_per -> timer3 */
2492static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2493 .master = &omap3xxx_l4_per_hwmod,
2494 .slave = &omap3xxx_timer3_hwmod,
2495 .clk = "gpt3_ick",
2496 .addr = omap3xxx_timer3_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002497 .user = OCP_USER_MPU | OCP_USER_SDMA,
2498};
2499
Thara Gopinathce722d22011-02-23 00:14:05 -07002500static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
2501 {
2502 .pa_start = 0x49036000,
2503 .pa_end = 0x49036000 + SZ_1K - 1,
2504 .flags = ADDR_TYPE_RT
2505 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002506 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002507};
2508
2509/* l4_per -> timer4 */
2510static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2511 .master = &omap3xxx_l4_per_hwmod,
2512 .slave = &omap3xxx_timer4_hwmod,
2513 .clk = "gpt4_ick",
2514 .addr = omap3xxx_timer4_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002515 .user = OCP_USER_MPU | OCP_USER_SDMA,
2516};
2517
Thara Gopinathce722d22011-02-23 00:14:05 -07002518static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
2519 {
2520 .pa_start = 0x49038000,
2521 .pa_end = 0x49038000 + SZ_1K - 1,
2522 .flags = ADDR_TYPE_RT
2523 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002524 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002525};
2526
2527/* l4_per -> timer5 */
2528static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2529 .master = &omap3xxx_l4_per_hwmod,
2530 .slave = &omap3xxx_timer5_hwmod,
2531 .clk = "gpt5_ick",
2532 .addr = omap3xxx_timer5_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002533 .user = OCP_USER_MPU | OCP_USER_SDMA,
2534};
2535
Thara Gopinathce722d22011-02-23 00:14:05 -07002536static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
2537 {
2538 .pa_start = 0x4903A000,
2539 .pa_end = 0x4903A000 + SZ_1K - 1,
2540 .flags = ADDR_TYPE_RT
2541 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002542 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002543};
2544
2545/* l4_per -> timer6 */
2546static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2547 .master = &omap3xxx_l4_per_hwmod,
2548 .slave = &omap3xxx_timer6_hwmod,
2549 .clk = "gpt6_ick",
2550 .addr = omap3xxx_timer6_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002551 .user = OCP_USER_MPU | OCP_USER_SDMA,
2552};
2553
Thara Gopinathce722d22011-02-23 00:14:05 -07002554static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
2555 {
2556 .pa_start = 0x4903C000,
2557 .pa_end = 0x4903C000 + SZ_1K - 1,
2558 .flags = ADDR_TYPE_RT
2559 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002560 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002561};
2562
2563/* l4_per -> timer7 */
2564static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2565 .master = &omap3xxx_l4_per_hwmod,
2566 .slave = &omap3xxx_timer7_hwmod,
2567 .clk = "gpt7_ick",
2568 .addr = omap3xxx_timer7_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002569 .user = OCP_USER_MPU | OCP_USER_SDMA,
2570};
2571
Thara Gopinathce722d22011-02-23 00:14:05 -07002572static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
2573 {
2574 .pa_start = 0x4903E000,
2575 .pa_end = 0x4903E000 + SZ_1K - 1,
2576 .flags = ADDR_TYPE_RT
2577 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002578 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002579};
2580
2581/* l4_per -> timer8 */
2582static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2583 .master = &omap3xxx_l4_per_hwmod,
2584 .slave = &omap3xxx_timer8_hwmod,
2585 .clk = "gpt8_ick",
2586 .addr = omap3xxx_timer8_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002587 .user = OCP_USER_MPU | OCP_USER_SDMA,
2588};
2589
Thara Gopinathce722d22011-02-23 00:14:05 -07002590static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
2591 {
2592 .pa_start = 0x49040000,
2593 .pa_end = 0x49040000 + SZ_1K - 1,
2594 .flags = ADDR_TYPE_RT
2595 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002596 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002597};
2598
2599/* l4_per -> timer9 */
2600static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2601 .master = &omap3xxx_l4_per_hwmod,
2602 .slave = &omap3xxx_timer9_hwmod,
2603 .clk = "gpt9_ick",
2604 .addr = omap3xxx_timer9_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002605 .user = OCP_USER_MPU | OCP_USER_SDMA,
2606};
2607
Thara Gopinathce722d22011-02-23 00:14:05 -07002608/* l4_core -> timer10 */
2609static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2610 .master = &omap3xxx_l4_core_hwmod,
2611 .slave = &omap3xxx_timer10_hwmod,
2612 .clk = "gpt10_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002613 .addr = omap2_timer10_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002614 .user = OCP_USER_MPU | OCP_USER_SDMA,
2615};
2616
Thara Gopinathce722d22011-02-23 00:14:05 -07002617/* l4_core -> timer11 */
2618static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2619 .master = &omap3xxx_l4_core_hwmod,
2620 .slave = &omap3xxx_timer11_hwmod,
2621 .clk = "gpt11_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002622 .addr = omap2_timer11_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002623 .user = OCP_USER_MPU | OCP_USER_SDMA,
2624};
2625
Thara Gopinathce722d22011-02-23 00:14:05 -07002626static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
2627 {
2628 .pa_start = 0x48304000,
2629 .pa_end = 0x48304000 + SZ_1K - 1,
2630 .flags = ADDR_TYPE_RT
2631 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002632 { }
Thara Gopinathce722d22011-02-23 00:14:05 -07002633};
2634
2635/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002636static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2637 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002638 .slave = &omap3xxx_timer12_hwmod,
2639 .clk = "gpt12_ick",
2640 .addr = omap3xxx_timer12_addrs,
Thara Gopinathce722d22011-02-23 00:14:05 -07002641 .user = OCP_USER_MPU | OCP_USER_SDMA,
2642};
2643
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302644/* l4_wkup -> wd_timer2 */
2645static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
2646 {
2647 .pa_start = 0x48314000,
2648 .pa_end = 0x4831407f,
2649 .flags = ADDR_TYPE_RT
2650 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002651 { }
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302652};
2653
2654static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2655 .master = &omap3xxx_l4_wkup_hwmod,
2656 .slave = &omap3xxx_wd_timer2_hwmod,
2657 .clk = "wdt2_ick",
2658 .addr = omap3xxx_wd_timer2_addrs,
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302659 .user = OCP_USER_MPU | OCP_USER_SDMA,
2660};
2661
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002662/* l4_core -> dss */
2663static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2664 .master = &omap3xxx_l4_core_hwmod,
2665 .slave = &omap3430es1_dss_core_hwmod,
2666 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002667 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002668 .fw = {
2669 .omap2 = {
2670 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2671 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2672 .flags = OMAP_FIREWALL_L4,
2673 }
2674 },
2675 .user = OCP_USER_MPU | OCP_USER_SDMA,
2676};
2677
2678static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2679 .master = &omap3xxx_l4_core_hwmod,
2680 .slave = &omap3xxx_dss_core_hwmod,
2681 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002682 .addr = omap2_dss_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002683 .fw = {
2684 .omap2 = {
2685 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2686 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2687 .flags = OMAP_FIREWALL_L4,
2688 }
2689 },
2690 .user = OCP_USER_MPU | OCP_USER_SDMA,
2691};
2692
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002693/* l4_core -> dss_dispc */
2694static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2695 .master = &omap3xxx_l4_core_hwmod,
2696 .slave = &omap3xxx_dss_dispc_hwmod,
2697 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002698 .addr = omap2_dss_dispc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002699 .fw = {
2700 .omap2 = {
2701 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2702 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2703 .flags = OMAP_FIREWALL_L4,
2704 }
2705 },
2706 .user = OCP_USER_MPU | OCP_USER_SDMA,
2707};
2708
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002709static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
2710 {
2711 .pa_start = 0x4804FC00,
2712 .pa_end = 0x4804FFFF,
2713 .flags = ADDR_TYPE_RT
2714 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002715 { }
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002716};
2717
2718/* l4_core -> dss_dsi1 */
2719static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2720 .master = &omap3xxx_l4_core_hwmod,
2721 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002722 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002723 .addr = omap3xxx_dss_dsi1_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002724 .fw = {
2725 .omap2 = {
2726 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2727 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2728 .flags = OMAP_FIREWALL_L4,
2729 }
2730 },
2731 .user = OCP_USER_MPU | OCP_USER_SDMA,
2732};
2733
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002734/* l4_core -> dss_rfbi */
2735static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2736 .master = &omap3xxx_l4_core_hwmod,
2737 .slave = &omap3xxx_dss_rfbi_hwmod,
2738 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002739 .addr = omap2_dss_rfbi_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002740 .fw = {
2741 .omap2 = {
2742 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2743 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2744 .flags = OMAP_FIREWALL_L4,
2745 }
2746 },
2747 .user = OCP_USER_MPU | OCP_USER_SDMA,
2748};
2749
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002750/* l4_core -> dss_venc */
2751static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2752 .master = &omap3xxx_l4_core_hwmod,
2753 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002754 .clk = "dss_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06002755 .addr = omap2_dss_venc_addrs,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002756 .fw = {
2757 .omap2 = {
2758 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2759 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2760 .flags = OMAP_FIREWALL_L4,
2761 }
2762 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002763 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002764 .user = OCP_USER_MPU | OCP_USER_SDMA,
2765};
2766
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002767/* l4_wkup -> gpio1 */
2768static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2769 {
2770 .pa_start = 0x48310000,
2771 .pa_end = 0x483101ff,
2772 .flags = ADDR_TYPE_RT
2773 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002774 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002775};
2776
2777static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2778 .master = &omap3xxx_l4_wkup_hwmod,
2779 .slave = &omap3xxx_gpio1_hwmod,
2780 .addr = omap3xxx_gpio1_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002781 .user = OCP_USER_MPU | OCP_USER_SDMA,
2782};
2783
2784/* l4_per -> gpio2 */
2785static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2786 {
2787 .pa_start = 0x49050000,
2788 .pa_end = 0x490501ff,
2789 .flags = ADDR_TYPE_RT
2790 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002791 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002792};
2793
2794static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2795 .master = &omap3xxx_l4_per_hwmod,
2796 .slave = &omap3xxx_gpio2_hwmod,
2797 .addr = omap3xxx_gpio2_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002798 .user = OCP_USER_MPU | OCP_USER_SDMA,
2799};
2800
2801/* l4_per -> gpio3 */
2802static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2803 {
2804 .pa_start = 0x49052000,
2805 .pa_end = 0x490521ff,
2806 .flags = ADDR_TYPE_RT
2807 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002808 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002809};
2810
2811static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2812 .master = &omap3xxx_l4_per_hwmod,
2813 .slave = &omap3xxx_gpio3_hwmod,
2814 .addr = omap3xxx_gpio3_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002815 .user = OCP_USER_MPU | OCP_USER_SDMA,
2816};
2817
2818/* l4_per -> gpio4 */
2819static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2820 {
2821 .pa_start = 0x49054000,
2822 .pa_end = 0x490541ff,
2823 .flags = ADDR_TYPE_RT
2824 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002825 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002826};
2827
2828static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2829 .master = &omap3xxx_l4_per_hwmod,
2830 .slave = &omap3xxx_gpio4_hwmod,
2831 .addr = omap3xxx_gpio4_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002832 .user = OCP_USER_MPU | OCP_USER_SDMA,
2833};
2834
2835/* l4_per -> gpio5 */
2836static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2837 {
2838 .pa_start = 0x49056000,
2839 .pa_end = 0x490561ff,
2840 .flags = ADDR_TYPE_RT
2841 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002842 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002843};
2844
2845static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2846 .master = &omap3xxx_l4_per_hwmod,
2847 .slave = &omap3xxx_gpio5_hwmod,
2848 .addr = omap3xxx_gpio5_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002849 .user = OCP_USER_MPU | OCP_USER_SDMA,
2850};
2851
2852/* l4_per -> gpio6 */
2853static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2854 {
2855 .pa_start = 0x49058000,
2856 .pa_end = 0x490581ff,
2857 .flags = ADDR_TYPE_RT
2858 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002859 { }
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002860};
2861
2862static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2863 .master = &omap3xxx_l4_per_hwmod,
2864 .slave = &omap3xxx_gpio6_hwmod,
2865 .addr = omap3xxx_gpio6_addrs,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002866 .user = OCP_USER_MPU | OCP_USER_SDMA,
2867};
2868
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002869/* dma_system -> L3 */
2870static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2871 .master = &omap3xxx_dma_system_hwmod,
2872 .slave = &omap3xxx_l3_main_hwmod,
2873 .clk = "core_l3_ick",
2874 .user = OCP_USER_MPU | OCP_USER_SDMA,
2875};
2876
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002877static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2878 {
2879 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002880 .pa_end = 0x48056fff,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002881 .flags = ADDR_TYPE_RT
2882 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002883 { }
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002884};
2885
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002886/* l4_cfg -> dma_system */
2887static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2888 .master = &omap3xxx_l4_core_hwmod,
2889 .slave = &omap3xxx_dma_system_hwmod,
2890 .clk = "core_l4_ick",
2891 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002892 .user = OCP_USER_MPU | OCP_USER_SDMA,
2893};
2894
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302895static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2896 {
2897 .name = "mpu",
2898 .pa_start = 0x48074000,
2899 .pa_end = 0x480740ff,
2900 .flags = ADDR_TYPE_RT
2901 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002902 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302903};
2904
2905/* l4_core -> mcbsp1 */
2906static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2907 .master = &omap3xxx_l4_core_hwmod,
2908 .slave = &omap3xxx_mcbsp1_hwmod,
2909 .clk = "mcbsp1_ick",
2910 .addr = omap3xxx_mcbsp1_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302911 .user = OCP_USER_MPU | OCP_USER_SDMA,
2912};
2913
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302914static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2915 {
2916 .name = "mpu",
2917 .pa_start = 0x49022000,
2918 .pa_end = 0x490220ff,
2919 .flags = ADDR_TYPE_RT
2920 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002921 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302922};
2923
2924/* l4_per -> mcbsp2 */
2925static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2926 .master = &omap3xxx_l4_per_hwmod,
2927 .slave = &omap3xxx_mcbsp2_hwmod,
2928 .clk = "mcbsp2_ick",
2929 .addr = omap3xxx_mcbsp2_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302930 .user = OCP_USER_MPU | OCP_USER_SDMA,
2931};
2932
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302933static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2934 {
2935 .name = "mpu",
2936 .pa_start = 0x49024000,
2937 .pa_end = 0x490240ff,
2938 .flags = ADDR_TYPE_RT
2939 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002940 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302941};
2942
2943/* l4_per -> mcbsp3 */
2944static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2945 .master = &omap3xxx_l4_per_hwmod,
2946 .slave = &omap3xxx_mcbsp3_hwmod,
2947 .clk = "mcbsp3_ick",
2948 .addr = omap3xxx_mcbsp3_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302949 .user = OCP_USER_MPU | OCP_USER_SDMA,
2950};
2951
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302952static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2953 {
2954 .name = "mpu",
2955 .pa_start = 0x49026000,
2956 .pa_end = 0x490260ff,
2957 .flags = ADDR_TYPE_RT
2958 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002959 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302960};
2961
2962/* l4_per -> mcbsp4 */
2963static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2964 .master = &omap3xxx_l4_per_hwmod,
2965 .slave = &omap3xxx_mcbsp4_hwmod,
2966 .clk = "mcbsp4_ick",
2967 .addr = omap3xxx_mcbsp4_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302968 .user = OCP_USER_MPU | OCP_USER_SDMA,
2969};
2970
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302971static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2972 {
2973 .name = "mpu",
2974 .pa_start = 0x48096000,
2975 .pa_end = 0x480960ff,
2976 .flags = ADDR_TYPE_RT
2977 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002978 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302979};
2980
2981/* l4_core -> mcbsp5 */
2982static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2983 .master = &omap3xxx_l4_core_hwmod,
2984 .slave = &omap3xxx_mcbsp5_hwmod,
2985 .clk = "mcbsp5_ick",
2986 .addr = omap3xxx_mcbsp5_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302987 .user = OCP_USER_MPU | OCP_USER_SDMA,
2988};
2989
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302990static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2991 {
2992 .name = "sidetone",
2993 .pa_start = 0x49028000,
2994 .pa_end = 0x490280ff,
2995 .flags = ADDR_TYPE_RT
2996 },
Paul Walmsley78183f32011-07-09 19:14:05 -06002997 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302998};
2999
3000/* l4_per -> mcbsp2_sidetone */
3001static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
3002 .master = &omap3xxx_l4_per_hwmod,
3003 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
3004 .clk = "mcbsp2_ick",
3005 .addr = omap3xxx_mcbsp2_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303006 .user = OCP_USER_MPU,
3007};
3008
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303009static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
3010 {
3011 .name = "sidetone",
3012 .pa_start = 0x4902A000,
3013 .pa_end = 0x4902A0ff,
3014 .flags = ADDR_TYPE_RT
3015 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003016 { }
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303017};
3018
3019/* l4_per -> mcbsp3_sidetone */
3020static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
3021 .master = &omap3xxx_l4_per_hwmod,
3022 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
3023 .clk = "mcbsp3_ick",
3024 .addr = omap3xxx_mcbsp3_sidetone_addrs,
Charulatha Vdc48e5f2011-02-24 15:16:49 +05303025 .user = OCP_USER_MPU,
3026};
3027
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003028static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
3029 {
3030 .pa_start = 0x48094000,
3031 .pa_end = 0x480941ff,
3032 .flags = ADDR_TYPE_RT,
3033 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003034 { }
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003035};
3036
3037/* l4_core -> mailbox */
3038static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3039 .master = &omap3xxx_l4_core_hwmod,
3040 .slave = &omap3xxx_mailbox_hwmod,
3041 .addr = omap3xxx_mailbox_addrs,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08003042 .user = OCP_USER_MPU | OCP_USER_SDMA,
3043};
3044
Charulatha V0f616a42011-02-17 09:53:10 -08003045/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003046static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3047 .master = &omap3xxx_l4_core_hwmod,
3048 .slave = &omap34xx_mcspi1,
3049 .clk = "mcspi1_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003050 .addr = omap2_mcspi1_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003051 .user = OCP_USER_MPU | OCP_USER_SDMA,
3052};
3053
3054/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003055static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3056 .master = &omap3xxx_l4_core_hwmod,
3057 .slave = &omap34xx_mcspi2,
3058 .clk = "mcspi2_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003059 .addr = omap2_mcspi2_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003060 .user = OCP_USER_MPU | OCP_USER_SDMA,
3061};
3062
3063/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08003064static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3065 .master = &omap3xxx_l4_core_hwmod,
3066 .slave = &omap34xx_mcspi3,
3067 .clk = "mcspi3_ick",
Paul Walmsleyded11382011-07-09 19:14:06 -06003068 .addr = omap2430_mcspi3_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003069 .user = OCP_USER_MPU | OCP_USER_SDMA,
3070};
3071
3072/* l4 core -> mcspi4 interface */
3073static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3074 {
3075 .pa_start = 0x480ba000,
3076 .pa_end = 0x480ba0ff,
3077 .flags = ADDR_TYPE_RT,
3078 },
Paul Walmsley78183f32011-07-09 19:14:05 -06003079 { }
Charulatha V0f616a42011-02-17 09:53:10 -08003080};
3081
3082static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3083 .master = &omap3xxx_l4_core_hwmod,
3084 .slave = &omap34xx_mcspi4,
3085 .clk = "mcspi4_ick",
3086 .addr = omap34xx_mcspi4_addr_space,
Charulatha V0f616a42011-02-17 09:53:10 -08003087 .user = OCP_USER_MPU | OCP_USER_SDMA,
3088};
3089
Keshava Munegowdade231382011-12-15 23:14:44 -07003090static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
3091 .master = &omap3xxx_usb_host_hs_hwmod,
3092 .slave = &omap3xxx_l3_main_hwmod,
3093 .clk = "core_l3_ick",
3094 .user = OCP_USER_MPU,
3095};
3096
Keshava Munegowdade231382011-12-15 23:14:44 -07003097static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = {
3098 {
3099 .name = "uhh",
3100 .pa_start = 0x48064000,
3101 .pa_end = 0x480643ff,
3102 .flags = ADDR_TYPE_RT
3103 },
3104 {
3105 .name = "ohci",
3106 .pa_start = 0x48064400,
3107 .pa_end = 0x480647ff,
3108 },
3109 {
3110 .name = "ehci",
3111 .pa_start = 0x48064800,
3112 .pa_end = 0x48064cff,
3113 },
3114 {}
3115};
3116
3117static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
3118 .master = &omap3xxx_l4_core_hwmod,
3119 .slave = &omap3xxx_usb_host_hs_hwmod,
3120 .clk = "usbhost_ick",
3121 .addr = omap3xxx_usb_host_hs_addrs,
3122 .user = OCP_USER_MPU | OCP_USER_SDMA,
3123};
3124
Keshava Munegowdade231382011-12-15 23:14:44 -07003125static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = {
3126 {
3127 .name = "tll",
3128 .pa_start = 0x48062000,
3129 .pa_end = 0x48062fff,
3130 .flags = ADDR_TYPE_RT
3131 },
3132 {}
3133};
3134
3135static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3136 .master = &omap3xxx_l4_core_hwmod,
3137 .slave = &omap3xxx_usb_tll_hs_hwmod,
3138 .clk = "usbtll_ick",
3139 .addr = omap3xxx_usb_tll_hs_addrs,
3140 .user = OCP_USER_MPU | OCP_USER_SDMA,
3141};
3142
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003143/* l4_core -> hdq1w interface */
3144static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3145 .master = &omap3xxx_l4_core_hwmod,
3146 .slave = &omap3xxx_hdq1w_hwmod,
3147 .clk = "hdq_ick",
3148 .addr = omap2_hdq1w_addr_space,
3149 .user = OCP_USER_MPU | OCP_USER_SDMA,
3150 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3151};
3152
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003153/* l4_wkup -> 32ksync_counter */
3154static struct omap_hwmod_addr_space omap3xxx_counter_32k_addrs[] = {
3155 {
3156 .pa_start = 0x48320000,
3157 .pa_end = 0x4832001f,
3158 .flags = ADDR_TYPE_RT
3159 },
3160 { }
3161};
3162
3163static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
3164 .master = &omap3xxx_l4_wkup_hwmod,
3165 .slave = &omap3xxx_counter_32k_hwmod,
3166 .clk = "omap_32ksync_ick",
3167 .addr = omap3xxx_counter_32k_addrs,
3168 .user = OCP_USER_MPU | OCP_USER_SDMA,
3169};
3170
Mark A. Greer31ba8802012-06-27 14:59:57 -06003171/* am35xx has Davinci MDIO & EMAC */
3172static struct omap_hwmod_class am35xx_mdio_class = {
3173 .name = "davinci_mdio",
3174};
3175
3176static struct omap_hwmod am35xx_mdio_hwmod = {
3177 .name = "davinci_mdio",
3178 .class = &am35xx_mdio_class,
3179 .flags = HWMOD_NO_IDLEST,
3180};
3181
3182/*
3183 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3184 * but this will probably require some additional hwmod core support,
3185 * so is left as a future to-do item.
3186 */
3187static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
3188 .master = &am35xx_mdio_hwmod,
3189 .slave = &omap3xxx_l3_main_hwmod,
3190 .clk = "emac_fck",
3191 .user = OCP_USER_MPU,
3192};
3193
3194static struct omap_hwmod_addr_space am35xx_mdio_addrs[] = {
3195 {
3196 .pa_start = AM35XX_IPSS_MDIO_BASE,
3197 .pa_end = AM35XX_IPSS_MDIO_BASE + SZ_4K - 1,
3198 .flags = ADDR_TYPE_RT,
3199 },
3200 { }
3201};
3202
3203/* l4_core -> davinci mdio */
3204/*
3205 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3206 * but this will probably require some additional hwmod core support,
3207 * so is left as a future to-do item.
3208 */
3209static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
3210 .master = &omap3xxx_l4_core_hwmod,
3211 .slave = &am35xx_mdio_hwmod,
3212 .clk = "emac_fck",
3213 .addr = am35xx_mdio_addrs,
3214 .user = OCP_USER_MPU,
3215};
3216
3217static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -07003218 { .name = "rxthresh", .irq = 67 + OMAP_INTC_START, },
3219 { .name = "rx_pulse", .irq = 68 + OMAP_INTC_START, },
3220 { .name = "tx_pulse", .irq = 69 + OMAP_INTC_START },
3221 { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
3222 { .irq = -1 },
Mark A. Greer31ba8802012-06-27 14:59:57 -06003223};
3224
3225static struct omap_hwmod_class am35xx_emac_class = {
3226 .name = "davinci_emac",
3227};
3228
3229static struct omap_hwmod am35xx_emac_hwmod = {
3230 .name = "davinci_emac",
3231 .mpu_irqs = am35xx_emac_mpu_irqs,
3232 .class = &am35xx_emac_class,
3233 .flags = HWMOD_NO_IDLEST,
3234};
3235
3236/* l3_core -> davinci emac interface */
3237/*
3238 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
3239 * but this will probably require some additional hwmod core support,
3240 * so is left as a future to-do item.
3241 */
3242static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
3243 .master = &am35xx_emac_hwmod,
3244 .slave = &omap3xxx_l3_main_hwmod,
3245 .clk = "emac_ick",
3246 .user = OCP_USER_MPU,
3247};
3248
3249static struct omap_hwmod_addr_space am35xx_emac_addrs[] = {
3250 {
3251 .pa_start = AM35XX_IPSS_EMAC_BASE,
3252 .pa_end = AM35XX_IPSS_EMAC_BASE + 0x30000 - 1,
3253 .flags = ADDR_TYPE_RT,
3254 },
3255 { }
3256};
3257
3258/* l4_core -> davinci emac */
3259/*
3260 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
3261 * but this will probably require some additional hwmod core support,
3262 * so is left as a future to-do item.
3263 */
3264static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
3265 .master = &omap3xxx_l4_core_hwmod,
3266 .slave = &am35xx_emac_hwmod,
3267 .clk = "emac_ick",
3268 .addr = am35xx_emac_addrs,
3269 .user = OCP_USER_MPU,
3270};
3271
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003272static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3273 &omap3xxx_l3_main__l4_core,
3274 &omap3xxx_l3_main__l4_per,
3275 &omap3xxx_mpu__l3_main,
3276 &omap3xxx_l4_core__l4_wkup,
3277 &omap3xxx_l4_core__mmc3,
3278 &omap3_l4_core__uart1,
3279 &omap3_l4_core__uart2,
3280 &omap3_l4_per__uart3,
3281 &omap3_l4_core__i2c1,
3282 &omap3_l4_core__i2c2,
3283 &omap3_l4_core__i2c3,
3284 &omap3xxx_l4_wkup__l4_sec,
3285 &omap3xxx_l4_wkup__timer1,
3286 &omap3xxx_l4_per__timer2,
3287 &omap3xxx_l4_per__timer3,
3288 &omap3xxx_l4_per__timer4,
3289 &omap3xxx_l4_per__timer5,
3290 &omap3xxx_l4_per__timer6,
3291 &omap3xxx_l4_per__timer7,
3292 &omap3xxx_l4_per__timer8,
3293 &omap3xxx_l4_per__timer9,
3294 &omap3xxx_l4_core__timer10,
3295 &omap3xxx_l4_core__timer11,
3296 &omap3xxx_l4_wkup__wd_timer2,
3297 &omap3xxx_l4_wkup__gpio1,
3298 &omap3xxx_l4_per__gpio2,
3299 &omap3xxx_l4_per__gpio3,
3300 &omap3xxx_l4_per__gpio4,
3301 &omap3xxx_l4_per__gpio5,
3302 &omap3xxx_l4_per__gpio6,
3303 &omap3xxx_dma_system__l3,
3304 &omap3xxx_l4_core__dma_system,
3305 &omap3xxx_l4_core__mcbsp1,
3306 &omap3xxx_l4_per__mcbsp2,
3307 &omap3xxx_l4_per__mcbsp3,
3308 &omap3xxx_l4_per__mcbsp4,
3309 &omap3xxx_l4_core__mcbsp5,
3310 &omap3xxx_l4_per__mcbsp2_sidetone,
3311 &omap3xxx_l4_per__mcbsp3_sidetone,
3312 &omap34xx_l4_core__mcspi1,
3313 &omap34xx_l4_core__mcspi2,
3314 &omap34xx_l4_core__mcspi3,
3315 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06003316 &omap3xxx_l4_wkup__counter_32k,
Paul Walmsley73591542010-02-22 22:09:32 -07003317 NULL,
3318};
3319
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003320/* GP-only hwmod links */
3321static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = {
3322 &omap3xxx_l4_sec__timer12,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003323 NULL
3324};
3325
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003326/* 3430ES1-only hwmod links */
3327static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3328 &omap3430es1_dss__l3,
3329 &omap3430es1_l4_core__dss,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003330 NULL
3331};
3332
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003333/* 3430ES2+-only hwmod links */
3334static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3335 &omap3xxx_dss__l3,
3336 &omap3xxx_l4_core__dss,
3337 &omap3xxx_usbhsotg__l3,
3338 &omap3xxx_l4_core__usbhsotg,
3339 &omap3xxx_usb_host_hs__l3_main_2,
3340 &omap3xxx_l4_core__usb_host_hs,
3341 &omap3xxx_l4_core__usb_tll_hs,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003342 NULL
3343};
3344
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003345/* <= 3430ES3-only hwmod links */
3346static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3347 &omap3xxx_l4_core__pre_es3_mmc1,
3348 &omap3xxx_l4_core__pre_es3_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003349 NULL
3350};
3351
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003352/* 3430ES3+-only hwmod links */
3353static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3354 &omap3xxx_l4_core__es3plus_mmc1,
3355 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003356 NULL
3357};
3358
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003359/* 34xx-only hwmod links (all ES revisions) */
3360static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3361 &omap3xxx_l3__iva,
3362 &omap34xx_l4_core__sr1,
3363 &omap34xx_l4_core__sr2,
3364 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003365 &omap3xxx_l4_core__hdq1w,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003366 NULL
3367};
3368
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003369/* 36xx-only hwmod links (all ES revisions) */
3370static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3371 &omap3xxx_l3__iva,
3372 &omap36xx_l4_per__uart4,
3373 &omap3xxx_dss__l3,
3374 &omap3xxx_l4_core__dss,
3375 &omap36xx_l4_core__sr1,
3376 &omap36xx_l4_core__sr2,
3377 &omap3xxx_usbhsotg__l3,
3378 &omap3xxx_l4_core__usbhsotg,
3379 &omap3xxx_l4_core__mailbox,
3380 &omap3xxx_usb_host_hs__l3_main_2,
3381 &omap3xxx_l4_core__usb_host_hs,
3382 &omap3xxx_l4_core__usb_tll_hs,
3383 &omap3xxx_l4_core__es3plus_mmc1,
3384 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003385 &omap3xxx_l4_core__hdq1w,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003386 NULL
3387};
3388
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003389static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3390 &omap3xxx_dss__l3,
3391 &omap3xxx_l4_core__dss,
3392 &am35xx_usbhsotg__l3,
3393 &am35xx_l4_core__usbhsotg,
3394 &am35xx_l4_core__uart4,
3395 &omap3xxx_usb_host_hs__l3_main_2,
3396 &omap3xxx_l4_core__usb_host_hs,
3397 &omap3xxx_l4_core__usb_tll_hs,
3398 &omap3xxx_l4_core__es3plus_mmc1,
3399 &omap3xxx_l4_core__es3plus_mmc2,
Mark A. Greer31ba8802012-06-27 14:59:57 -06003400 &am35xx_mdio__l3,
3401 &am35xx_l4_core__mdio,
3402 &am35xx_emac__l3,
3403 &am35xx_l4_core__emac,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003404 NULL
3405};
3406
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003407static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3408 &omap3xxx_l4_core__dss_dispc,
3409 &omap3xxx_l4_core__dss_dsi1,
3410 &omap3xxx_l4_core__dss_rfbi,
3411 &omap3xxx_l4_core__dss_venc,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003412 NULL
3413};
3414
Paul Walmsley73591542010-02-22 22:09:32 -07003415int __init omap3xxx_hwmod_init(void)
3416{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003417 int r;
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003418 struct omap_hwmod_ocp_if **h = NULL;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003419 unsigned int rev;
3420
Kevin Hilman9ebfd282012-06-18 12:12:23 -06003421 omap_hwmod_init();
3422
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003423 /* Register hwmod links common to all OMAP3 */
3424 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003425 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003426 return r;
3427
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003428 /* Register GP-only hwmod links. */
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003429 if (omap_type() == OMAP2_DEVICE_TYPE_GP) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003430 r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs);
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003431 if (r < 0)
3432 return r;
3433 }
3434
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003435 rev = omap_rev();
3436
3437 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003438 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003439 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3440 * All possible revisions should be included in this conditional.
3441 */
3442 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3443 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3444 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003445 h = omap34xx_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07003446 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003447 h = am35xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003448 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3449 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003450 h = omap36xx_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003451 } else {
3452 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3453 return -EINVAL;
3454 };
3455
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003456 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003457 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003458 return r;
3459
3460 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003461 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003462 * particular family of silicon (e.g., 34xx ES1.0)
3463 */
3464 h = NULL;
3465 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003466 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003467 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3468 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3469 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003470 h = omap3430es2plus_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003471 };
3472
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003473 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003474 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003475 if (r < 0)
3476 return r;
3477 }
3478
3479 h = NULL;
3480 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3481 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003482 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003483 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3484 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003485 h = omap3430_es3plus_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003486 };
3487
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003488 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003489 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003490 if (r < 0)
3491 return r;
3492
3493 /*
3494 * DSS code presumes that dss_core hwmod is handled first,
3495 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003496 * DSS hwmod links last to ensure that dss_core is already
3497 * registered. Otherwise some change things may happen, for
3498 * ex. if dispc is handled before dss_core and DSS is enabled
3499 * in bootloader DISPC will be reset with outputs enabled
3500 * which sometimes leads to unrecoverable L3 error. XXX The
3501 * long-term fix to this is to ensure hwmods are set up in
3502 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003503 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003504 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003505
3506 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003507}