2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
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.
12 * XXX handle crossbar/shared link difference for L3?
13 * XXX these should be marked initdata for multi-OMAP kernels
16 #include <linux/i2c-omap.h>
17 #include <linux/platform_data/spi-omap2-mcspi.h>
18 #include <linux/omap-dma.h>
19 #include <linux/platform_data/mailbox-omap.h>
20 #include <plat/dmtimer.h>
22 #include "omap_hwmod.h"
26 #include "omap_hwmod_common_data.h"
28 #include "cm-regbits-24xx.h"
29 #include "prm-regbits-24xx.h"
36 * OMAP2420 hardware module integration data
38 * All of the data in this section should be autogeneratable from the
39 * TI hardware database or other technical documentation. Data that
40 * is driver-specific or driver-kernel integration-specific belongs
49 static struct omap_hwmod_class iva1_hwmod_class
= {
53 static struct omap_hwmod_rst_info omap2420_iva_resets
[] = {
54 { .name
= "iva", .rst_shift
= 8 },
57 static struct omap_hwmod omap2420_iva_hwmod
= {
59 .class = &iva1_hwmod_class
,
60 .clkdm_name
= "iva1_clkdm",
61 .rst_lines
= omap2420_iva_resets
,
62 .rst_lines_cnt
= ARRAY_SIZE(omap2420_iva_resets
),
63 .main_clk
= "iva1_ifck",
67 static struct omap_hwmod_class dsp_hwmod_class
= {
71 static struct omap_hwmod_rst_info omap2420_dsp_resets
[] = {
72 { .name
= "logic", .rst_shift
= 0 },
73 { .name
= "mmu", .rst_shift
= 1 },
76 static struct omap_hwmod omap2420_dsp_hwmod
= {
78 .class = &dsp_hwmod_class
,
79 .clkdm_name
= "dsp_clkdm",
80 .rst_lines
= omap2420_dsp_resets
,
81 .rst_lines_cnt
= ARRAY_SIZE(omap2420_dsp_resets
),
82 .main_clk
= "dsp_fck",
86 static struct omap_hwmod_class_sysconfig i2c_sysc
= {
90 .sysc_flags
= (SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
91 .sysc_fields
= &omap_hwmod_sysc_type1
,
94 static struct omap_hwmod_class i2c_class
= {
97 .rev
= OMAP_I2C_IP_VERSION_1
,
98 .reset
= &omap_i2c_reset
,
101 static struct omap_i2c_dev_attr i2c_dev_attr
= {
102 .flags
= OMAP_I2C_FLAG_NO_FIFO
|
103 OMAP_I2C_FLAG_SIMPLE_CLOCK
|
104 OMAP_I2C_FLAG_16BIT_DATA_REG
|
105 OMAP_I2C_FLAG_BUS_SHIFT_2
,
109 static struct omap_hwmod omap2420_i2c1_hwmod
= {
111 .main_clk
= "i2c1_fck",
114 .module_offs
= CORE_MOD
,
116 .module_bit
= OMAP2420_EN_I2C1_SHIFT
,
118 .idlest_idle_bit
= OMAP2420_ST_I2C1_SHIFT
,
122 .dev_attr
= &i2c_dev_attr
,
124 * From mach-omap2/pm24xx.c: "Putting MPU into the WFI state
125 * while a transfer is active seems to cause the I2C block to
126 * timeout. Why? Good question."
128 .flags
= (HWMOD_16BIT_REG
| HWMOD_BLOCK_WFI
),
132 static struct omap_hwmod omap2420_i2c2_hwmod
= {
134 .main_clk
= "i2c2_fck",
137 .module_offs
= CORE_MOD
,
139 .module_bit
= OMAP2420_EN_I2C2_SHIFT
,
141 .idlest_idle_bit
= OMAP2420_ST_I2C2_SHIFT
,
145 .dev_attr
= &i2c_dev_attr
,
146 .flags
= HWMOD_16BIT_REG
,
150 static struct omap_dma_dev_attr dma_dev_attr
= {
151 .dev_caps
= RESERVE_CHANNEL
| DMA_LINKED_LCH
| GLOBAL_PRIORITY
|
152 IS_CSSA_32
| IS_CDSA_32
,
156 static struct omap_hwmod omap2420_dma_system_hwmod
= {
158 .class = &omap2xxx_dma_hwmod_class
,
159 .mpu_irqs
= omap2_dma_system_irqs
,
160 .main_clk
= "core_l3_ck",
161 .dev_attr
= &dma_dev_attr
,
162 .flags
= HWMOD_NO_IDLEST
,
166 static struct omap_mbox_dev_info omap2420_mailbox_info
[] = {
167 { .name
= "dsp", .tx_id
= 0, .rx_id
= 1, .irq_id
= 0, .usr_id
= 0 },
168 { .name
= "iva", .tx_id
= 2, .rx_id
= 3, .irq_id
= 1, .usr_id
= 3 },
171 static struct omap_mbox_pdata omap2420_mailbox_attrs
= {
174 .info_cnt
= ARRAY_SIZE(omap2420_mailbox_info
),
175 .info
= omap2420_mailbox_info
,
178 static struct omap_hwmod omap2420_mailbox_hwmod
= {
180 .class = &omap2xxx_mailbox_hwmod_class
,
181 .main_clk
= "mailboxes_ick",
185 .module_bit
= OMAP24XX_EN_MAILBOXES_SHIFT
,
186 .module_offs
= CORE_MOD
,
188 .idlest_idle_bit
= OMAP24XX_ST_MAILBOXES_SHIFT
,
191 .dev_attr
= &omap2420_mailbox_attrs
,
196 * multi channel buffered serial port controller
199 static struct omap_hwmod_class omap2420_mcbsp_hwmod_class
= {
203 static struct omap_hwmod_opt_clk mcbsp_opt_clks
[] = {
204 { .role
= "pad_fck", .clk
= "mcbsp_clks" },
205 { .role
= "prcm_fck", .clk
= "func_96m_ck" },
209 static struct omap_hwmod omap2420_mcbsp1_hwmod
= {
211 .class = &omap2420_mcbsp_hwmod_class
,
212 .main_clk
= "mcbsp1_fck",
216 .module_bit
= OMAP24XX_EN_MCBSP1_SHIFT
,
217 .module_offs
= CORE_MOD
,
219 .idlest_idle_bit
= OMAP24XX_ST_MCBSP1_SHIFT
,
222 .opt_clks
= mcbsp_opt_clks
,
223 .opt_clks_cnt
= ARRAY_SIZE(mcbsp_opt_clks
),
227 static struct omap_hwmod omap2420_mcbsp2_hwmod
= {
229 .class = &omap2420_mcbsp_hwmod_class
,
230 .main_clk
= "mcbsp2_fck",
234 .module_bit
= OMAP24XX_EN_MCBSP2_SHIFT
,
235 .module_offs
= CORE_MOD
,
237 .idlest_idle_bit
= OMAP24XX_ST_MCBSP2_SHIFT
,
240 .opt_clks
= mcbsp_opt_clks
,
241 .opt_clks_cnt
= ARRAY_SIZE(mcbsp_opt_clks
),
244 static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc
= {
248 .sysc_flags
= (SYSC_HAS_SOFTRESET
| SYSS_HAS_RESET_STATUS
),
249 .sysc_fields
= &omap_hwmod_sysc_type1
,
252 static struct omap_hwmod_class omap2420_msdi_hwmod_class
= {
254 .sysc
= &omap2420_msdi_sysc
,
255 .reset
= &omap_msdi_reset
,
259 static struct omap_hwmod omap2420_msdi1_hwmod
= {
261 .class = &omap2420_msdi_hwmod_class
,
262 .main_clk
= "mmc_fck",
266 .module_bit
= OMAP2420_EN_MMC_SHIFT
,
267 .module_offs
= CORE_MOD
,
269 .idlest_idle_bit
= OMAP2420_ST_MMC_SHIFT
,
272 .flags
= HWMOD_16BIT_REG
,
276 static struct omap_hwmod omap2420_hdq1w_hwmod
= {
278 .main_clk
= "hdq_fck",
281 .module_offs
= CORE_MOD
,
283 .module_bit
= OMAP24XX_EN_HDQ_SHIFT
,
285 .idlest_idle_bit
= OMAP24XX_ST_HDQ_SHIFT
,
288 .class = &omap2_hdq1w_class
,
295 /* L4 CORE -> I2C1 interface */
296 static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1
= {
297 .master
= &omap2xxx_l4_core_hwmod
,
298 .slave
= &omap2420_i2c1_hwmod
,
300 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
303 /* L4 CORE -> I2C2 interface */
304 static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2
= {
305 .master
= &omap2xxx_l4_core_hwmod
,
306 .slave
= &omap2420_i2c2_hwmod
,
308 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
311 /* IVA <- L3 interface */
312 static struct omap_hwmod_ocp_if omap2420_l3__iva
= {
313 .master
= &omap2xxx_l3_main_hwmod
,
314 .slave
= &omap2420_iva_hwmod
,
316 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
319 /* DSP <- L3 interface */
320 static struct omap_hwmod_ocp_if omap2420_l3__dsp
= {
321 .master
= &omap2xxx_l3_main_hwmod
,
322 .slave
= &omap2420_dsp_hwmod
,
324 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
327 /* l4_wkup -> timer1 */
328 static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1
= {
329 .master
= &omap2xxx_l4_wkup_hwmod
,
330 .slave
= &omap2xxx_timer1_hwmod
,
332 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
335 /* l4_wkup -> wd_timer2 */
336 static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2
= {
337 .master
= &omap2xxx_l4_wkup_hwmod
,
338 .slave
= &omap2xxx_wd_timer2_hwmod
,
339 .clk
= "mpu_wdt_ick",
340 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
343 /* l4_wkup -> gpio1 */
344 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1
= {
345 .master
= &omap2xxx_l4_wkup_hwmod
,
346 .slave
= &omap2xxx_gpio1_hwmod
,
348 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
351 /* l4_wkup -> gpio2 */
352 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2
= {
353 .master
= &omap2xxx_l4_wkup_hwmod
,
354 .slave
= &omap2xxx_gpio2_hwmod
,
356 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
359 /* l4_wkup -> gpio3 */
360 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3
= {
361 .master
= &omap2xxx_l4_wkup_hwmod
,
362 .slave
= &omap2xxx_gpio3_hwmod
,
364 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
367 /* l4_wkup -> gpio4 */
368 static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4
= {
369 .master
= &omap2xxx_l4_wkup_hwmod
,
370 .slave
= &omap2xxx_gpio4_hwmod
,
372 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
375 /* dma_system -> L3 */
376 static struct omap_hwmod_ocp_if omap2420_dma_system__l3
= {
377 .master
= &omap2420_dma_system_hwmod
,
378 .slave
= &omap2xxx_l3_main_hwmod
,
380 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
383 /* l4_core -> dma_system */
384 static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system
= {
385 .master
= &omap2xxx_l4_core_hwmod
,
386 .slave
= &omap2420_dma_system_hwmod
,
388 .addr
= omap2_dma_system_addrs
,
389 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
392 /* l4_core -> mailbox */
393 static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox
= {
394 .master
= &omap2xxx_l4_core_hwmod
,
395 .slave
= &omap2420_mailbox_hwmod
,
396 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
399 /* l4_core -> mcbsp1 */
400 static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1
= {
401 .master
= &omap2xxx_l4_core_hwmod
,
402 .slave
= &omap2420_mcbsp1_hwmod
,
404 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
407 /* l4_core -> mcbsp2 */
408 static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2
= {
409 .master
= &omap2xxx_l4_core_hwmod
,
410 .slave
= &omap2420_mcbsp2_hwmod
,
412 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
415 /* l4_core -> msdi1 */
416 static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1
= {
417 .master
= &omap2xxx_l4_core_hwmod
,
418 .slave
= &omap2420_msdi1_hwmod
,
420 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
423 /* l4_core -> hdq1w interface */
424 static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w
= {
425 .master
= &omap2xxx_l4_core_hwmod
,
426 .slave
= &omap2420_hdq1w_hwmod
,
428 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
429 .flags
= OMAP_FIREWALL_L4
| OCPIF_SWSUP_IDLE
,
433 /* l4_wkup -> 32ksync_counter */
434 static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k
= {
435 .master
= &omap2xxx_l4_wkup_hwmod
,
436 .slave
= &omap2xxx_counter_32k_hwmod
,
437 .clk
= "sync_32k_ick",
438 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
441 static struct omap_hwmod_ocp_if omap2420_l3__gpmc
= {
442 .master
= &omap2xxx_l3_main_hwmod
,
443 .slave
= &omap2xxx_gpmc_hwmod
,
445 .user
= OCP_USER_MPU
| OCP_USER_SDMA
,
448 static struct omap_hwmod_ocp_if
*omap2420_hwmod_ocp_ifs
[] __initdata
= {
449 &omap2xxx_l3_main__l4_core
,
450 &omap2xxx_mpu__l3_main
,
452 &omap2xxx_l4_core__mcspi1
,
453 &omap2xxx_l4_core__mcspi2
,
454 &omap2xxx_l4_core__l4_wkup
,
455 &omap2_l4_core__uart1
,
456 &omap2_l4_core__uart2
,
457 &omap2_l4_core__uart3
,
458 &omap2420_l4_core__i2c1
,
459 &omap2420_l4_core__i2c2
,
462 &omap2420_l4_wkup__timer1
,
463 &omap2xxx_l4_core__timer2
,
464 &omap2xxx_l4_core__timer3
,
465 &omap2xxx_l4_core__timer4
,
466 &omap2xxx_l4_core__timer5
,
467 &omap2xxx_l4_core__timer6
,
468 &omap2xxx_l4_core__timer7
,
469 &omap2xxx_l4_core__timer8
,
470 &omap2xxx_l4_core__timer9
,
471 &omap2xxx_l4_core__timer10
,
472 &omap2xxx_l4_core__timer11
,
473 &omap2xxx_l4_core__timer12
,
474 &omap2420_l4_wkup__wd_timer2
,
475 &omap2xxx_l4_core__dss
,
476 &omap2xxx_l4_core__dss_dispc
,
477 &omap2xxx_l4_core__dss_rfbi
,
478 &omap2xxx_l4_core__dss_venc
,
479 &omap2420_l4_wkup__gpio1
,
480 &omap2420_l4_wkup__gpio2
,
481 &omap2420_l4_wkup__gpio3
,
482 &omap2420_l4_wkup__gpio4
,
483 &omap2420_dma_system__l3
,
484 &omap2420_l4_core__dma_system
,
485 &omap2420_l4_core__mailbox
,
486 &omap2420_l4_core__mcbsp1
,
487 &omap2420_l4_core__mcbsp2
,
488 &omap2420_l4_core__msdi1
,
489 &omap2xxx_l4_core__rng
,
490 &omap2xxx_l4_core__sham
,
491 &omap2xxx_l4_core__aes
,
492 &omap2420_l4_core__hdq1w
,
493 &omap2420_l4_wkup__counter_32k
,
498 int __init
omap2420_hwmod_init(void)
501 return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs
);