blob: 2f15979c2e9c410ed6c8ee42b7deb4a17c8d85ca [file] [log] [blame]
Paul Walmsley02bfc032009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
Paul Walmsley02bfc032009-09-03 20:14:05 +03003 *
Paul Walmsley78183f32011-07-09 19:14:05 -06004 * Copyright (C) 2009-2011 Nokia Corporation
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06005 * Copyright (C) 2012 Texas Instruments, Inc.
Paul Walmsley02bfc032009-09-03 20:14:05 +03006 * 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 * XXX handle crossbar/shared link difference for L3?
Paul Walmsley73591542010-02-22 22:09:32 -070013 * XXX these should be marked initdata for multi-OMAP kernels
Paul Walmsley02bfc032009-09-03 20:14:05 +030014 */
Tony Lindgren3a8761c2012-10-08 09:11:22 -070015
16#include <linux/i2c-omap.h>
Arnd Bergmann22037472012-08-24 15:21:06 +020017#include <linux/platform_data/spi-omap2-mcspi.h>
Tony Lindgren45c3eb72012-11-30 08:41:50 -080018#include <linux/omap-dma.h>
Suman Annab8a7cf82013-01-28 17:21:58 -060019#include <linux/platform_data/mailbox-omap.h>
Thara Gopinatheddb1262011-02-23 00:14:04 -070020#include <plat/dmtimer.h>
Tony Lindgren2a296c82012-10-02 17:41:35 -070021
22#include "omap_hwmod.h"
Tony Lindgren1e0f51a2012-09-20 11:42:02 -070023#include "l3_2xxx.h"
Tony Lindgren70606b12012-09-20 11:42:07 -070024#include "l4_2xxx.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030025
Paul Walmsley43b40992010-02-22 22:09:34 -070026#include "omap_hwmod_common_data.h"
27
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053028#include "cm-regbits-24xx.h"
Paul Walmsley20042902010-09-30 02:40:12 +053029#include "prm-regbits-24xx.h"
Tony Lindgren3a8761c2012-10-08 09:11:22 -070030#include "i2c.h"
Tony Lindgren68f39e72012-10-15 12:09:43 -070031#include "mmc.h"
Tony Lindgren3d82cbb2012-10-15 12:50:46 -070032#include "serial.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070033#include "wd_timer.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030034
Paul Walmsley73591542010-02-22 22:09:32 -070035/*
36 * OMAP2420 hardware module integration data
37 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060038 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070039 * TI hardware database or other technical documentation. Data that
40 * is driver-specific or driver-kernel integration-specific belongs
41 * elsewhere.
42 */
43
Paul Walmsley844a3b62012-04-19 04:04:33 -060044/*
45 * IP blocks
46 */
Senthilvadivu Guruswamy996746c2011-02-22 09:50:36 +020047
Paul Walmsley3af35fb2012-04-19 04:04:38 -060048/* IVA1 (IVA1) */
49static struct omap_hwmod_class iva1_hwmod_class = {
50 .name = "iva1",
51};
52
53static struct omap_hwmod_rst_info omap2420_iva_resets[] = {
54 { .name = "iva", .rst_shift = 8 },
55};
56
Paul Walmsley08072ac2010-07-26 16:34:33 -060057static struct omap_hwmod omap2420_iva_hwmod = {
58 .name = "iva",
Paul Walmsley3af35fb2012-04-19 04:04:38 -060059 .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",
64};
65
66/* DSP */
67static struct omap_hwmod_class dsp_hwmod_class = {
68 .name = "dsp",
69};
70
71static struct omap_hwmod_rst_info omap2420_dsp_resets[] = {
72 { .name = "logic", .rst_shift = 0 },
73 { .name = "mmu", .rst_shift = 1 },
74};
75
76static struct omap_hwmod omap2420_dsp_hwmod = {
77 .name = "dsp",
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",
Paul Walmsley08072ac2010-07-26 16:34:33 -060083};
84
Paul Walmsley20042902010-09-30 02:40:12 +053085/* I2C common */
86static struct omap_hwmod_class_sysconfig i2c_sysc = {
87 .rev_offs = 0x00,
88 .sysc_offs = 0x20,
89 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -070090 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +053091 .sysc_fields = &omap_hwmod_sysc_type1,
92};
93
94static struct omap_hwmod_class i2c_class = {
95 .name = "i2c",
96 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -060097 .rev = OMAP_I2C_IP_VERSION_1,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -060098 .reset = &omap_i2c_reset,
Paul Walmsley20042902010-09-30 02:40:12 +053099};
100
Andy Green4d4441a2011-07-10 05:27:16 -0600101static 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,
106};
Paul Walmsley20042902010-09-30 02:40:12 +0530107
108/* I2C1 */
Paul Walmsley20042902010-09-30 02:40:12 +0530109static struct omap_hwmod omap2420_i2c1_hwmod = {
110 .name = "i2c1",
Paul Walmsley20042902010-09-30 02:40:12 +0530111 .main_clk = "i2c1_fck",
112 .prcm = {
113 .omap2 = {
114 .module_offs = CORE_MOD,
115 .prcm_reg_id = 1,
116 .module_bit = OMAP2420_EN_I2C1_SHIFT,
117 .idlest_reg_id = 1,
118 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
119 },
120 },
Paul Walmsley20042902010-09-30 02:40:12 +0530121 .class = &i2c_class,
122 .dev_attr = &i2c_dev_attr,
Paul Walmsleyaff2f7d2013-01-26 00:48:56 -0700123 /*
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."
127 */
128 .flags = (HWMOD_16BIT_REG | HWMOD_BLOCK_WFI),
Paul Walmsley20042902010-09-30 02:40:12 +0530129};
130
131/* I2C2 */
Paul Walmsley20042902010-09-30 02:40:12 +0530132static struct omap_hwmod omap2420_i2c2_hwmod = {
133 .name = "i2c2",
Paul Walmsley20042902010-09-30 02:40:12 +0530134 .main_clk = "i2c2_fck",
135 .prcm = {
136 .omap2 = {
137 .module_offs = CORE_MOD,
138 .prcm_reg_id = 1,
139 .module_bit = OMAP2420_EN_I2C2_SHIFT,
140 .idlest_reg_id = 1,
141 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
142 },
143 },
Paul Walmsley20042902010-09-30 02:40:12 +0530144 .class = &i2c_class,
145 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +0530146 .flags = HWMOD_16BIT_REG,
147};
148
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800149/* dma attributes */
150static 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,
153 .lch_count = 32,
154};
155
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800156static struct omap_hwmod omap2420_dma_system_hwmod = {
157 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -0600158 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600159 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800160 .main_clk = "core_l3_ck",
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800161 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800162 .flags = HWMOD_NO_IDLEST,
163};
164
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800165/* mailbox */
Suman Annab8a7cf82013-01-28 17:21:58 -0600166static 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 },
169};
170
171static struct omap_mbox_pdata omap2420_mailbox_attrs = {
Suman Annafe32c1f2013-05-07 17:30:27 -0500172 .num_users = 4,
173 .num_fifos = 6,
Suman Annab8a7cf82013-01-28 17:21:58 -0600174 .info_cnt = ARRAY_SIZE(omap2420_mailbox_info),
175 .info = omap2420_mailbox_info,
176};
177
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800178static struct omap_hwmod omap2420_mailbox_hwmod = {
179 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -0600180 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800181 .main_clk = "mailboxes_ick",
182 .prcm = {
183 .omap2 = {
184 .prcm_reg_id = 1,
185 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
186 .module_offs = CORE_MOD,
187 .idlest_reg_id = 1,
188 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
189 },
190 },
Suman Annab8a7cf82013-01-28 17:21:58 -0600191 .dev_attr = &omap2420_mailbox_attrs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800192};
193
Charulatha V3cb72fa2011-02-24 12:51:46 -0800194/*
195 * 'mcbsp' class
196 * multi channel buffered serial port controller
197 */
198
199static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
200 .name = "mcbsp",
201};
202
Peter Ujfalusib3153102012-06-18 16:18:42 -0600203static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
204 { .role = "pad_fck", .clk = "mcbsp_clks" },
205 { .role = "prcm_fck", .clk = "func_96m_ck" },
206};
207
Charulatha V3cb72fa2011-02-24 12:51:46 -0800208/* mcbsp1 */
Charulatha V3cb72fa2011-02-24 12:51:46 -0800209static struct omap_hwmod omap2420_mcbsp1_hwmod = {
210 .name = "mcbsp1",
211 .class = &omap2420_mcbsp_hwmod_class,
Charulatha V3cb72fa2011-02-24 12:51:46 -0800212 .main_clk = "mcbsp1_fck",
213 .prcm = {
214 .omap2 = {
215 .prcm_reg_id = 1,
216 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
217 .module_offs = CORE_MOD,
218 .idlest_reg_id = 1,
219 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
220 },
221 },
Peter Ujfalusib3153102012-06-18 16:18:42 -0600222 .opt_clks = mcbsp_opt_clks,
223 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V3cb72fa2011-02-24 12:51:46 -0800224};
225
226/* mcbsp2 */
Charulatha V3cb72fa2011-02-24 12:51:46 -0800227static struct omap_hwmod omap2420_mcbsp2_hwmod = {
228 .name = "mcbsp2",
229 .class = &omap2420_mcbsp_hwmod_class,
Charulatha V3cb72fa2011-02-24 12:51:46 -0800230 .main_clk = "mcbsp2_fck",
231 .prcm = {
232 .omap2 = {
233 .prcm_reg_id = 1,
234 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
235 .module_offs = CORE_MOD,
236 .idlest_reg_id = 1,
237 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
238 },
239 },
Peter Ujfalusib3153102012-06-18 16:18:42 -0600240 .opt_clks = mcbsp_opt_clks,
241 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V3cb72fa2011-02-24 12:51:46 -0800242};
243
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600244static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = {
245 .rev_offs = 0x3c,
246 .sysc_offs = 0x64,
247 .syss_offs = 0x68,
248 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
249 .sysc_fields = &omap_hwmod_sysc_type1,
250};
251
252static struct omap_hwmod_class omap2420_msdi_hwmod_class = {
253 .name = "msdi",
254 .sysc = &omap2420_msdi_sysc,
255 .reset = &omap_msdi_reset,
256};
257
258/* msdi1 */
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600259static struct omap_hwmod omap2420_msdi1_hwmod = {
260 .name = "msdi1",
261 .class = &omap2420_msdi_hwmod_class,
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600262 .main_clk = "mmc_fck",
263 .prcm = {
264 .omap2 = {
265 .prcm_reg_id = 1,
266 .module_bit = OMAP2420_EN_MMC_SHIFT,
267 .module_offs = CORE_MOD,
268 .idlest_reg_id = 1,
269 .idlest_idle_bit = OMAP2420_ST_MMC_SHIFT,
270 },
271 },
272 .flags = HWMOD_16BIT_REG,
273};
274
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600275/* HDQ1W/1-wire */
276static struct omap_hwmod omap2420_hdq1w_hwmod = {
277 .name = "hdq1w",
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600278 .main_clk = "hdq_fck",
279 .prcm = {
280 .omap2 = {
281 .module_offs = CORE_MOD,
282 .prcm_reg_id = 1,
283 .module_bit = OMAP24XX_EN_HDQ_SHIFT,
284 .idlest_reg_id = 1,
285 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
286 },
287 },
288 .class = &omap2_hdq1w_class,
289};
290
Paul Walmsley844a3b62012-04-19 04:04:33 -0600291/*
292 * interfaces
293 */
294
Paul Walmsley844a3b62012-04-19 04:04:33 -0600295/* L4 CORE -> I2C1 interface */
296static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600297 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600298 .slave = &omap2420_i2c1_hwmod,
299 .clk = "i2c1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600300 .user = OCP_USER_MPU | OCP_USER_SDMA,
301};
302
303/* L4 CORE -> I2C2 interface */
304static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600305 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600306 .slave = &omap2420_i2c2_hwmod,
307 .clk = "i2c2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600308 .user = OCP_USER_MPU | OCP_USER_SDMA,
309};
310
311/* IVA <- L3 interface */
312static struct omap_hwmod_ocp_if omap2420_l3__iva = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600313 .master = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600314 .slave = &omap2420_iva_hwmod,
Paul Walmsley3af35fb2012-04-19 04:04:38 -0600315 .clk = "core_l3_ck",
316 .user = OCP_USER_MPU | OCP_USER_SDMA,
317};
318
319/* DSP <- L3 interface */
320static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
321 .master = &omap2xxx_l3_main_hwmod,
322 .slave = &omap2420_dsp_hwmod,
323 .clk = "dsp_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600324 .user = OCP_USER_MPU | OCP_USER_SDMA,
325};
326
Paul Walmsley844a3b62012-04-19 04:04:33 -0600327/* l4_wkup -> timer1 */
328static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600329 .master = &omap2xxx_l4_wkup_hwmod,
330 .slave = &omap2xxx_timer1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600331 .clk = "gpt1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600332 .user = OCP_USER_MPU | OCP_USER_SDMA,
333};
334
Paul Walmsley844a3b62012-04-19 04:04:33 -0600335/* l4_wkup -> wd_timer2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600336static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600337 .master = &omap2xxx_l4_wkup_hwmod,
338 .slave = &omap2xxx_wd_timer2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600339 .clk = "mpu_wdt_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600340 .user = OCP_USER_MPU | OCP_USER_SDMA,
341};
342
Paul Walmsley844a3b62012-04-19 04:04:33 -0600343/* l4_wkup -> gpio1 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600344static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600345 .master = &omap2xxx_l4_wkup_hwmod,
346 .slave = &omap2xxx_gpio1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600347 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600348 .user = OCP_USER_MPU | OCP_USER_SDMA,
349};
350
351/* l4_wkup -> gpio2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600352static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600353 .master = &omap2xxx_l4_wkup_hwmod,
354 .slave = &omap2xxx_gpio2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600355 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600356 .user = OCP_USER_MPU | OCP_USER_SDMA,
357};
358
359/* l4_wkup -> gpio3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600360static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600361 .master = &omap2xxx_l4_wkup_hwmod,
362 .slave = &omap2xxx_gpio3_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600363 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600364 .user = OCP_USER_MPU | OCP_USER_SDMA,
365};
366
367/* l4_wkup -> gpio4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600368static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600369 .master = &omap2xxx_l4_wkup_hwmod,
370 .slave = &omap2xxx_gpio4_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600371 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600372 .user = OCP_USER_MPU | OCP_USER_SDMA,
373};
374
375/* dma_system -> L3 */
376static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
377 .master = &omap2420_dma_system_hwmod,
Paul Walmsleycb484272012-04-19 04:04:33 -0600378 .slave = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600379 .clk = "core_l3_ck",
380 .user = OCP_USER_MPU | OCP_USER_SDMA,
381};
382
383/* l4_core -> dma_system */
384static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600385 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600386 .slave = &omap2420_dma_system_hwmod,
387 .clk = "sdma_ick",
388 .addr = omap2_dma_system_addrs,
389 .user = OCP_USER_MPU | OCP_USER_SDMA,
390};
391
392/* l4_core -> mailbox */
393static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600394 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600395 .slave = &omap2420_mailbox_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600396 .user = OCP_USER_MPU | OCP_USER_SDMA,
397};
398
399/* l4_core -> mcbsp1 */
400static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600401 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600402 .slave = &omap2420_mcbsp1_hwmod,
403 .clk = "mcbsp1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600404 .user = OCP_USER_MPU | OCP_USER_SDMA,
405};
406
407/* l4_core -> mcbsp2 */
408static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600409 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600410 .slave = &omap2420_mcbsp2_hwmod,
411 .clk = "mcbsp2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600412 .user = OCP_USER_MPU | OCP_USER_SDMA,
413};
414
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600415/* l4_core -> msdi1 */
416static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1 = {
417 .master = &omap2xxx_l4_core_hwmod,
418 .slave = &omap2420_msdi1_hwmod,
419 .clk = "mmc_ick",
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600420 .user = OCP_USER_MPU | OCP_USER_SDMA,
421};
422
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600423/* l4_core -> hdq1w interface */
424static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = {
425 .master = &omap2xxx_l4_core_hwmod,
426 .slave = &omap2420_hdq1w_hwmod,
427 .clk = "hdq_ick",
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600428 .user = OCP_USER_MPU | OCP_USER_SDMA,
429 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
430};
431
432
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600433/* l4_wkup -> 32ksync_counter */
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600434static 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",
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600438 .user = OCP_USER_MPU | OCP_USER_SDMA,
439};
440
Afzal Mohammed49484a62012-09-23 17:28:24 -0600441static struct omap_hwmod_ocp_if omap2420_l3__gpmc = {
442 .master = &omap2xxx_l3_main_hwmod,
443 .slave = &omap2xxx_gpmc_hwmod,
444 .clk = "core_l3_ck",
Afzal Mohammed49484a62012-09-23 17:28:24 -0600445 .user = OCP_USER_MPU | OCP_USER_SDMA,
446};
447
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600448static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley6a297552012-04-19 04:04:34 -0600449 &omap2xxx_l3_main__l4_core,
450 &omap2xxx_mpu__l3_main,
451 &omap2xxx_dss__l3,
452 &omap2xxx_l4_core__mcspi1,
453 &omap2xxx_l4_core__mcspi2,
454 &omap2xxx_l4_core__l4_wkup,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600455 &omap2_l4_core__uart1,
456 &omap2_l4_core__uart2,
457 &omap2_l4_core__uart3,
458 &omap2420_l4_core__i2c1,
459 &omap2420_l4_core__i2c2,
460 &omap2420_l3__iva,
Paul Walmsley3af35fb2012-04-19 04:04:38 -0600461 &omap2420_l3__dsp,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600462 &omap2420_l4_wkup__timer1,
Paul Walmsley6a297552012-04-19 04:04:34 -0600463 &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,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600474 &omap2420_l4_wkup__wd_timer2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600475 &omap2xxx_l4_core__dss,
476 &omap2xxx_l4_core__dss_dispc,
477 &omap2xxx_l4_core__dss_rfbi,
478 &omap2xxx_l4_core__dss_venc,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600479 &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,
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600488 &omap2420_l4_core__msdi1,
Paul Walmsleye9b0a2f2012-09-23 17:28:25 -0600489 &omap2xxx_l4_core__rng,
Mark A. Greere569e992013-03-30 15:49:19 -0600490 &omap2xxx_l4_core__sham,
Mark A. Greer660ffd62012-12-21 09:28:09 -0700491 &omap2xxx_l4_core__aes,
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600492 &omap2420_l4_core__hdq1w,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600493 &omap2420_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -0600494 &omap2420_l3__gpmc,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300495 NULL,
496};
497
Paul Walmsley73591542010-02-22 22:09:32 -0700498int __init omap2420_hwmod_init(void)
499{
Kevin Hilman9ebfd282012-06-18 12:12:23 -0600500 omap_hwmod_init();
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600501 return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
Paul Walmsley73591542010-02-22 22:09:32 -0700502}