blob: de39017d2e28eceabc567ae672ac454928dc6f16 [file] [log] [blame]
Paul Walmsley0d619a82011-07-09 19:14:07 -06001/*
2 * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx
3 *
4 * Copyright (C) 2011 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <plat/omap_hwmod.h>
12#include <plat/serial.h>
Tony Lindgren4b254082012-08-30 15:37:24 -070013#include <linux/platform_data/gpio-omap.h>
Paul Walmsleyd826ebf2011-07-09 19:14:07 -060014#include <plat/dma.h>
Paul Walmsley273b9462011-07-09 19:14:08 -060015#include <plat/dmtimer.h>
16#include <plat/mcspi.h>
Paul Walmsley0d619a82011-07-09 19:14:07 -060017
Paul Walmsley0d619a82011-07-09 19:14:07 -060018#include "omap_hwmod_common_data.h"
Paul Walmsleycb484272012-04-19 04:04:33 -060019#include "cm-regbits-24xx.h"
20#include "prm-regbits-24xx.h"
Paul Walmsley273b9462011-07-09 19:14:08 -060021#include "wd_timer.h"
Paul Walmsley0d619a82011-07-09 19:14:07 -060022
23struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -070024 { .irq = 48 + OMAP_INTC_START, },
25 { .irq = -1 },
Paul Walmsley0d619a82011-07-09 19:14:07 -060026};
Paul Walmsleyd826ebf2011-07-09 19:14:07 -060027
28struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
29 { .name = "dispc", .dma_req = 5 },
30 { .dma_req = -1 }
31};
Tomi Valkeinen1ac6d462012-01-23 14:15:28 +020032
33/*
34 * 'dispc' class
35 * display controller
36 */
37
38static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
39 .rev_offs = 0x0000,
40 .sysc_offs = 0x0010,
41 .syss_offs = 0x0014,
42 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
43 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
44 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
45 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
46 .sysc_fields = &omap_hwmod_sysc_type1,
47};
48
49struct omap_hwmod_class omap2_dispc_hwmod_class = {
50 .name = "dispc",
51 .sysc = &omap2_dispc_sysc,
52};
53
Paul Walmsley273b9462011-07-09 19:14:08 -060054/* OMAP2xxx Timer Common */
55static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
56 .rev_offs = 0x0000,
57 .sysc_offs = 0x0010,
58 .syss_offs = 0x0014,
59 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
60 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
61 SYSC_HAS_AUTOIDLE),
62 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
63 .sysc_fields = &omap_hwmod_sysc_type1,
64};
65
66struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
67 .name = "timer",
68 .sysc = &omap2xxx_timer_sysc,
Paul Walmsley273b9462011-07-09 19:14:08 -060069};
70
71/*
72 * 'wd_timer' class
73 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
74 * overflow condition
75 */
76
77static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
78 .rev_offs = 0x0000,
79 .sysc_offs = 0x0010,
80 .syss_offs = 0x0014,
81 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
82 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
83 .sysc_fields = &omap_hwmod_sysc_type1,
84};
85
86struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
87 .name = "wd_timer",
88 .sysc = &omap2xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -060089 .pre_shutdown = &omap2_wd_timer_disable,
90 .reset = &omap2_wd_timer_reset,
Paul Walmsley273b9462011-07-09 19:14:08 -060091};
92
93/*
94 * 'gpio' class
95 * general purpose io module
96 */
97static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
98 .rev_offs = 0x0000,
99 .sysc_offs = 0x0010,
100 .syss_offs = 0x0014,
101 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
102 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
103 SYSS_HAS_RESET_STATUS),
104 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
105 .sysc_fields = &omap_hwmod_sysc_type1,
106};
107
108struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
109 .name = "gpio",
110 .sysc = &omap2xxx_gpio_sysc,
111 .rev = 0,
112};
113
114/* system dma */
115static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
116 .rev_offs = 0x0000,
117 .sysc_offs = 0x002c,
118 .syss_offs = 0x0028,
119 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
120 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
121 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
122 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
123 .sysc_fields = &omap_hwmod_sysc_type1,
124};
125
126struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
127 .name = "dma",
128 .sysc = &omap2xxx_dma_sysc,
129};
130
131/*
132 * 'mailbox' class
133 * mailbox module allowing communication between the on-chip processors
134 * using a queued mailbox-interrupt mechanism.
135 */
136
137static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = {
138 .rev_offs = 0x000,
139 .sysc_offs = 0x010,
140 .syss_offs = 0x014,
141 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
142 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
143 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
144 .sysc_fields = &omap_hwmod_sysc_type1,
145};
146
147struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = {
148 .name = "mailbox",
149 .sysc = &omap2xxx_mailbox_sysc,
150};
151
152/*
153 * 'mcspi' class
154 * multichannel serial port interface (mcspi) / master/slave synchronous serial
155 * bus
156 */
157
158static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
159 .rev_offs = 0x0000,
160 .sysc_offs = 0x0010,
161 .syss_offs = 0x0014,
162 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
163 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
164 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
165 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
166 .sysc_fields = &omap_hwmod_sysc_type1,
167};
168
169struct omap_hwmod_class omap2xxx_mcspi_class = {
170 .name = "mcspi",
171 .sysc = &omap2xxx_mcspi_sysc,
172 .rev = OMAP2_MCSPI_REV,
173};
Paul Walmsleycb484272012-04-19 04:04:33 -0600174
175/*
Afzal Mohammed49484a62012-09-23 17:28:24 -0600176 * 'gpmc' class
177 * general purpose memory controller
178 */
179
180static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = {
181 .rev_offs = 0x0000,
182 .sysc_offs = 0x0010,
183 .syss_offs = 0x0014,
184 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
185 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
186 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
187 .sysc_fields = &omap_hwmod_sysc_type1,
188};
189
190static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = {
191 .name = "gpmc",
192 .sysc = &omap2xxx_gpmc_sysc,
193};
194
195/*
Paul Walmsleycb484272012-04-19 04:04:33 -0600196 * IP blocks
197 */
198
199/* L3 */
200struct omap_hwmod omap2xxx_l3_main_hwmod = {
201 .name = "l3_main",
202 .class = &l3_hwmod_class,
203 .flags = HWMOD_NO_IDLEST,
204};
205
206/* L4 CORE */
207struct omap_hwmod omap2xxx_l4_core_hwmod = {
208 .name = "l4_core",
209 .class = &l4_hwmod_class,
210 .flags = HWMOD_NO_IDLEST,
211};
212
213/* L4 WKUP */
214struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
215 .name = "l4_wkup",
216 .class = &l4_hwmod_class,
217 .flags = HWMOD_NO_IDLEST,
218};
219
220/* MPU */
221struct omap_hwmod omap2xxx_mpu_hwmod = {
222 .name = "mpu",
223 .class = &mpu_hwmod_class,
224 .main_clk = "mpu_ck",
225};
226
227/* IVA2 */
228struct omap_hwmod omap2xxx_iva_hwmod = {
229 .name = "iva",
230 .class = &iva_hwmod_class,
231};
232
233/* always-on timers dev attribute */
234static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
235 .timer_capability = OMAP_TIMER_ALWON,
236};
237
238/* pwm timers dev attribute */
239static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
240 .timer_capability = OMAP_TIMER_HAS_PWM,
241};
242
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600243/* timers with DSP interrupt dev attribute */
244static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
245 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
246};
247
Paul Walmsleycb484272012-04-19 04:04:33 -0600248/* timer1 */
249
250struct omap_hwmod omap2xxx_timer1_hwmod = {
251 .name = "timer1",
252 .mpu_irqs = omap2_timer1_mpu_irqs,
253 .main_clk = "gpt1_fck",
254 .prcm = {
255 .omap2 = {
256 .prcm_reg_id = 1,
257 .module_bit = OMAP24XX_EN_GPT1_SHIFT,
258 .module_offs = WKUP_MOD,
259 .idlest_reg_id = 1,
260 .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
261 },
262 },
263 .dev_attr = &capability_alwon_dev_attr,
264 .class = &omap2xxx_timer_hwmod_class,
265};
266
267/* timer2 */
268
269struct omap_hwmod omap2xxx_timer2_hwmod = {
270 .name = "timer2",
271 .mpu_irqs = omap2_timer2_mpu_irqs,
272 .main_clk = "gpt2_fck",
273 .prcm = {
274 .omap2 = {
275 .prcm_reg_id = 1,
276 .module_bit = OMAP24XX_EN_GPT2_SHIFT,
277 .module_offs = CORE_MOD,
278 .idlest_reg_id = 1,
279 .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
280 },
281 },
Paul Walmsleycb484272012-04-19 04:04:33 -0600282 .class = &omap2xxx_timer_hwmod_class,
283};
284
285/* timer3 */
286
287struct omap_hwmod omap2xxx_timer3_hwmod = {
288 .name = "timer3",
289 .mpu_irqs = omap2_timer3_mpu_irqs,
290 .main_clk = "gpt3_fck",
291 .prcm = {
292 .omap2 = {
293 .prcm_reg_id = 1,
294 .module_bit = OMAP24XX_EN_GPT3_SHIFT,
295 .module_offs = CORE_MOD,
296 .idlest_reg_id = 1,
297 .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
298 },
299 },
Paul Walmsleycb484272012-04-19 04:04:33 -0600300 .class = &omap2xxx_timer_hwmod_class,
301};
302
303/* timer4 */
304
305struct omap_hwmod omap2xxx_timer4_hwmod = {
306 .name = "timer4",
307 .mpu_irqs = omap2_timer4_mpu_irqs,
308 .main_clk = "gpt4_fck",
309 .prcm = {
310 .omap2 = {
311 .prcm_reg_id = 1,
312 .module_bit = OMAP24XX_EN_GPT4_SHIFT,
313 .module_offs = CORE_MOD,
314 .idlest_reg_id = 1,
315 .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
316 },
317 },
Paul Walmsleycb484272012-04-19 04:04:33 -0600318 .class = &omap2xxx_timer_hwmod_class,
319};
320
321/* timer5 */
322
323struct omap_hwmod omap2xxx_timer5_hwmod = {
324 .name = "timer5",
325 .mpu_irqs = omap2_timer5_mpu_irqs,
326 .main_clk = "gpt5_fck",
327 .prcm = {
328 .omap2 = {
329 .prcm_reg_id = 1,
330 .module_bit = OMAP24XX_EN_GPT5_SHIFT,
331 .module_offs = CORE_MOD,
332 .idlest_reg_id = 1,
333 .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
334 },
335 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600336 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsleycb484272012-04-19 04:04:33 -0600337 .class = &omap2xxx_timer_hwmod_class,
338};
339
340/* timer6 */
341
342struct omap_hwmod omap2xxx_timer6_hwmod = {
343 .name = "timer6",
344 .mpu_irqs = omap2_timer6_mpu_irqs,
345 .main_clk = "gpt6_fck",
346 .prcm = {
347 .omap2 = {
348 .prcm_reg_id = 1,
349 .module_bit = OMAP24XX_EN_GPT6_SHIFT,
350 .module_offs = CORE_MOD,
351 .idlest_reg_id = 1,
352 .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
353 },
354 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600355 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsleycb484272012-04-19 04:04:33 -0600356 .class = &omap2xxx_timer_hwmod_class,
357};
358
359/* timer7 */
360
361struct omap_hwmod omap2xxx_timer7_hwmod = {
362 .name = "timer7",
363 .mpu_irqs = omap2_timer7_mpu_irqs,
364 .main_clk = "gpt7_fck",
365 .prcm = {
366 .omap2 = {
367 .prcm_reg_id = 1,
368 .module_bit = OMAP24XX_EN_GPT7_SHIFT,
369 .module_offs = CORE_MOD,
370 .idlest_reg_id = 1,
371 .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
372 },
373 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600374 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsleycb484272012-04-19 04:04:33 -0600375 .class = &omap2xxx_timer_hwmod_class,
376};
377
378/* timer8 */
379
380struct omap_hwmod omap2xxx_timer8_hwmod = {
381 .name = "timer8",
382 .mpu_irqs = omap2_timer8_mpu_irqs,
383 .main_clk = "gpt8_fck",
384 .prcm = {
385 .omap2 = {
386 .prcm_reg_id = 1,
387 .module_bit = OMAP24XX_EN_GPT8_SHIFT,
388 .module_offs = CORE_MOD,
389 .idlest_reg_id = 1,
390 .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
391 },
392 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600393 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsleycb484272012-04-19 04:04:33 -0600394 .class = &omap2xxx_timer_hwmod_class,
395};
396
397/* timer9 */
398
399struct omap_hwmod omap2xxx_timer9_hwmod = {
400 .name = "timer9",
401 .mpu_irqs = omap2_timer9_mpu_irqs,
402 .main_clk = "gpt9_fck",
403 .prcm = {
404 .omap2 = {
405 .prcm_reg_id = 1,
406 .module_bit = OMAP24XX_EN_GPT9_SHIFT,
407 .module_offs = CORE_MOD,
408 .idlest_reg_id = 1,
409 .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
410 },
411 },
412 .dev_attr = &capability_pwm_dev_attr,
413 .class = &omap2xxx_timer_hwmod_class,
414};
415
416/* timer10 */
417
418struct omap_hwmod omap2xxx_timer10_hwmod = {
419 .name = "timer10",
420 .mpu_irqs = omap2_timer10_mpu_irqs,
421 .main_clk = "gpt10_fck",
422 .prcm = {
423 .omap2 = {
424 .prcm_reg_id = 1,
425 .module_bit = OMAP24XX_EN_GPT10_SHIFT,
426 .module_offs = CORE_MOD,
427 .idlest_reg_id = 1,
428 .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
429 },
430 },
431 .dev_attr = &capability_pwm_dev_attr,
432 .class = &omap2xxx_timer_hwmod_class,
433};
434
435/* timer11 */
436
437struct omap_hwmod omap2xxx_timer11_hwmod = {
438 .name = "timer11",
439 .mpu_irqs = omap2_timer11_mpu_irqs,
440 .main_clk = "gpt11_fck",
441 .prcm = {
442 .omap2 = {
443 .prcm_reg_id = 1,
444 .module_bit = OMAP24XX_EN_GPT11_SHIFT,
445 .module_offs = CORE_MOD,
446 .idlest_reg_id = 1,
447 .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
448 },
449 },
450 .dev_attr = &capability_pwm_dev_attr,
451 .class = &omap2xxx_timer_hwmod_class,
452};
453
454/* timer12 */
455
456struct omap_hwmod omap2xxx_timer12_hwmod = {
457 .name = "timer12",
458 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
459 .main_clk = "gpt12_fck",
460 .prcm = {
461 .omap2 = {
462 .prcm_reg_id = 1,
463 .module_bit = OMAP24XX_EN_GPT12_SHIFT,
464 .module_offs = CORE_MOD,
465 .idlest_reg_id = 1,
466 .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
467 },
468 },
469 .dev_attr = &capability_pwm_dev_attr,
470 .class = &omap2xxx_timer_hwmod_class,
471};
472
473/* wd_timer2 */
474struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
475 .name = "wd_timer2",
476 .class = &omap2xxx_wd_timer_hwmod_class,
477 .main_clk = "mpu_wdt_fck",
478 .prcm = {
479 .omap2 = {
480 .prcm_reg_id = 1,
481 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
482 .module_offs = WKUP_MOD,
483 .idlest_reg_id = 1,
484 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
485 },
486 },
487};
488
489/* UART1 */
490
491struct omap_hwmod omap2xxx_uart1_hwmod = {
492 .name = "uart1",
493 .mpu_irqs = omap2_uart1_mpu_irqs,
494 .sdma_reqs = omap2_uart1_sdma_reqs,
495 .main_clk = "uart1_fck",
496 .prcm = {
497 .omap2 = {
498 .module_offs = CORE_MOD,
499 .prcm_reg_id = 1,
500 .module_bit = OMAP24XX_EN_UART1_SHIFT,
501 .idlest_reg_id = 1,
502 .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
503 },
504 },
505 .class = &omap2_uart_class,
506};
507
508/* UART2 */
509
510struct omap_hwmod omap2xxx_uart2_hwmod = {
511 .name = "uart2",
512 .mpu_irqs = omap2_uart2_mpu_irqs,
513 .sdma_reqs = omap2_uart2_sdma_reqs,
514 .main_clk = "uart2_fck",
515 .prcm = {
516 .omap2 = {
517 .module_offs = CORE_MOD,
518 .prcm_reg_id = 1,
519 .module_bit = OMAP24XX_EN_UART2_SHIFT,
520 .idlest_reg_id = 1,
521 .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
522 },
523 },
524 .class = &omap2_uart_class,
525};
526
527/* UART3 */
528
529struct omap_hwmod omap2xxx_uart3_hwmod = {
530 .name = "uart3",
531 .mpu_irqs = omap2_uart3_mpu_irqs,
532 .sdma_reqs = omap2_uart3_sdma_reqs,
533 .main_clk = "uart3_fck",
534 .prcm = {
535 .omap2 = {
536 .module_offs = CORE_MOD,
537 .prcm_reg_id = 2,
538 .module_bit = OMAP24XX_EN_UART3_SHIFT,
539 .idlest_reg_id = 2,
540 .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
541 },
542 },
543 .class = &omap2_uart_class,
544};
545
546/* dss */
547
548static struct omap_hwmod_opt_clk dss_opt_clks[] = {
549 /*
550 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
551 * driver does not use these clocks.
552 */
553 { .role = "tv_clk", .clk = "dss_54m_fck" },
554 { .role = "sys_clk", .clk = "dss2_fck" },
555};
556
557struct omap_hwmod omap2xxx_dss_core_hwmod = {
558 .name = "dss_core",
559 .class = &omap2_dss_hwmod_class,
560 .main_clk = "dss1_fck", /* instead of dss_fck */
561 .sdma_reqs = omap2xxx_dss_sdma_chs,
562 .prcm = {
563 .omap2 = {
564 .prcm_reg_id = 1,
565 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
566 .module_offs = CORE_MOD,
567 .idlest_reg_id = 1,
568 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
569 },
570 },
571 .opt_clks = dss_opt_clks,
572 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
573 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
574};
575
576struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
577 .name = "dss_dispc",
578 .class = &omap2_dispc_hwmod_class,
579 .mpu_irqs = omap2_dispc_irqs,
580 .main_clk = "dss1_fck",
581 .prcm = {
582 .omap2 = {
583 .prcm_reg_id = 1,
584 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
585 .module_offs = CORE_MOD,
586 .idlest_reg_id = 1,
587 .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
588 },
589 },
590 .flags = HWMOD_NO_IDLEST,
591 .dev_attr = &omap2_3_dss_dispc_dev_attr
592};
593
594static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
595 { .role = "ick", .clk = "dss_ick" },
596};
597
598struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
599 .name = "dss_rfbi",
600 .class = &omap2_rfbi_hwmod_class,
601 .main_clk = "dss1_fck",
602 .prcm = {
603 .omap2 = {
604 .prcm_reg_id = 1,
605 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
606 .module_offs = CORE_MOD,
607 },
608 },
609 .opt_clks = dss_rfbi_opt_clks,
610 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
611 .flags = HWMOD_NO_IDLEST,
612};
613
614struct omap_hwmod omap2xxx_dss_venc_hwmod = {
615 .name = "dss_venc",
616 .class = &omap2_venc_hwmod_class,
617 .main_clk = "dss_54m_fck",
618 .prcm = {
619 .omap2 = {
620 .prcm_reg_id = 1,
621 .module_bit = OMAP24XX_EN_DSS1_SHIFT,
622 .module_offs = CORE_MOD,
623 },
624 },
625 .flags = HWMOD_NO_IDLEST,
626};
627
628/* gpio dev_attr */
629struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = {
630 .bank_width = 32,
631 .dbck_flag = false,
632};
633
634/* gpio1 */
635struct omap_hwmod omap2xxx_gpio1_hwmod = {
636 .name = "gpio1",
637 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
638 .mpu_irqs = omap2_gpio1_irqs,
639 .main_clk = "gpios_fck",
640 .prcm = {
641 .omap2 = {
642 .prcm_reg_id = 1,
643 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
644 .module_offs = WKUP_MOD,
645 .idlest_reg_id = 1,
646 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
647 },
648 },
649 .class = &omap2xxx_gpio_hwmod_class,
650 .dev_attr = &omap2xxx_gpio_dev_attr,
651};
652
653/* gpio2 */
654struct omap_hwmod omap2xxx_gpio2_hwmod = {
655 .name = "gpio2",
656 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
657 .mpu_irqs = omap2_gpio2_irqs,
658 .main_clk = "gpios_fck",
659 .prcm = {
660 .omap2 = {
661 .prcm_reg_id = 1,
662 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
663 .module_offs = WKUP_MOD,
664 .idlest_reg_id = 1,
665 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
666 },
667 },
668 .class = &omap2xxx_gpio_hwmod_class,
669 .dev_attr = &omap2xxx_gpio_dev_attr,
670};
671
672/* gpio3 */
673struct omap_hwmod omap2xxx_gpio3_hwmod = {
674 .name = "gpio3",
675 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
676 .mpu_irqs = omap2_gpio3_irqs,
677 .main_clk = "gpios_fck",
678 .prcm = {
679 .omap2 = {
680 .prcm_reg_id = 1,
681 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
682 .module_offs = WKUP_MOD,
683 .idlest_reg_id = 1,
684 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
685 },
686 },
687 .class = &omap2xxx_gpio_hwmod_class,
688 .dev_attr = &omap2xxx_gpio_dev_attr,
689};
690
691/* gpio4 */
692struct omap_hwmod omap2xxx_gpio4_hwmod = {
693 .name = "gpio4",
694 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
695 .mpu_irqs = omap2_gpio4_irqs,
696 .main_clk = "gpios_fck",
697 .prcm = {
698 .omap2 = {
699 .prcm_reg_id = 1,
700 .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
701 .module_offs = WKUP_MOD,
702 .idlest_reg_id = 1,
703 .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
704 },
705 },
706 .class = &omap2xxx_gpio_hwmod_class,
707 .dev_attr = &omap2xxx_gpio_dev_attr,
708};
709
710/* mcspi1 */
711static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
712 .num_chipselect = 4,
713};
714
715struct omap_hwmod omap2xxx_mcspi1_hwmod = {
716 .name = "mcspi1",
717 .mpu_irqs = omap2_mcspi1_mpu_irqs,
718 .sdma_reqs = omap2_mcspi1_sdma_reqs,
719 .main_clk = "mcspi1_fck",
720 .prcm = {
721 .omap2 = {
722 .module_offs = CORE_MOD,
723 .prcm_reg_id = 1,
724 .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
725 .idlest_reg_id = 1,
726 .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
727 },
728 },
729 .class = &omap2xxx_mcspi_class,
730 .dev_attr = &omap_mcspi1_dev_attr,
731};
732
733/* mcspi2 */
734static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
735 .num_chipselect = 2,
736};
737
738struct omap_hwmod omap2xxx_mcspi2_hwmod = {
739 .name = "mcspi2",
740 .mpu_irqs = omap2_mcspi2_mpu_irqs,
741 .sdma_reqs = omap2_mcspi2_sdma_reqs,
742 .main_clk = "mcspi2_fck",
743 .prcm = {
744 .omap2 = {
745 .module_offs = CORE_MOD,
746 .prcm_reg_id = 1,
747 .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
748 .idlest_reg_id = 1,
749 .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
750 },
751 },
752 .class = &omap2xxx_mcspi_class,
753 .dev_attr = &omap_mcspi2_dev_attr,
754};
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600755
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600756static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
757 .name = "counter",
758};
759
760struct omap_hwmod omap2xxx_counter_32k_hwmod = {
761 .name = "counter_32k",
762 .main_clk = "func_32k_ck",
763 .prcm = {
764 .omap2 = {
765 .module_offs = WKUP_MOD,
766 .prcm_reg_id = 1,
767 .module_bit = OMAP24XX_ST_32KSYNC_SHIFT,
768 .idlest_reg_id = 1,
769 .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT,
770 },
771 },
772 .class = &omap2xxx_counter_hwmod_class,
773};
Afzal Mohammed49484a62012-09-23 17:28:24 -0600774
775/* gpmc */
776static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = {
777 { .irq = 20 },
778 { .irq = -1 }
779};
780
781struct omap_hwmod omap2xxx_gpmc_hwmod = {
782 .name = "gpmc",
783 .class = &omap2xxx_gpmc_hwmod_class,
784 .mpu_irqs = omap2xxx_gpmc_irqs,
785 .main_clk = "gpmc_fck",
786 /*
787 * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
788 * block. It is not being added due to any known bugs with
789 * resetting the GPMC IP block, but rather because any timings
790 * set by the bootloader are not being correctly programmed by
791 * the kernel from the board file or DT data.
792 * HWMOD_INIT_NO_RESET should be removed ASAP.
793 */
794 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
795 HWMOD_NO_IDLEST),
796 .prcm = {
797 .omap2 = {
798 .prcm_reg_id = 3,
799 .module_bit = OMAP24XX_EN_GPMC_MASK,
800 .module_offs = CORE_MOD,
801 },
802 },
803};
Paul Walmsleye9b0a2f2012-09-23 17:28:25 -0600804
805/* RNG */
806
807static struct omap_hwmod_class_sysconfig omap2_rng_sysc = {
808 .rev_offs = 0x3c,
809 .sysc_offs = 0x40,
810 .syss_offs = 0x44,
811 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
812 SYSS_HAS_RESET_STATUS),
813 .sysc_fields = &omap_hwmod_sysc_type1,
814};
815
816static struct omap_hwmod_class omap2_rng_hwmod_class = {
817 .name = "rng",
818 .sysc = &omap2_rng_sysc,
819};
820
821static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = {
822 { .irq = 52 },
823 { .irq = -1 }
824};
825
826struct omap_hwmod omap2xxx_rng_hwmod = {
827 .name = "rng",
828 .mpu_irqs = omap2_rng_mpu_irqs,
829 .main_clk = "l4_ck",
830 .prcm = {
831 .omap2 = {
832 .module_offs = CORE_MOD,
833 .prcm_reg_id = 4,
834 .module_bit = OMAP24XX_EN_RNG_SHIFT,
835 .idlest_reg_id = 4,
836 .idlest_idle_bit = OMAP24XX_ST_RNG_SHIFT,
837 },
838 },
839 /*
840 * XXX The first read from the SYSSTATUS register of the RNG
841 * after the SYSCONFIG SOFTRESET bit is set triggers an
842 * imprecise external abort. It's unclear why this happens.
843 * Until this is analyzed, skip the IP block reset.
844 */
845 .flags = HWMOD_INIT_NO_RESET,
846 .class = &omap2_rng_hwmod_class,
847};