blob: a8b3368dca3dff7825509174d903595ae4d1da87 [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>
18
Lokesh Vutla2b6c4e72012-10-15 14:04:53 -070019#include <plat-omap/dma-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 Walmsley0d619a82011-07-09 19:14:07 -0600111 .mpu_irqs = omap2_i2c1_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600112 .sdma_reqs = omap2_i2c1_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +0530113 .main_clk = "i2c1_fck",
114 .prcm = {
115 .omap2 = {
116 .module_offs = CORE_MOD,
117 .prcm_reg_id = 1,
118 .module_bit = OMAP2420_EN_I2C1_SHIFT,
119 .idlest_reg_id = 1,
120 .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
121 },
122 },
Paul Walmsley20042902010-09-30 02:40:12 +0530123 .class = &i2c_class,
124 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +0530125 .flags = HWMOD_16BIT_REG,
126};
127
128/* I2C2 */
Paul Walmsley20042902010-09-30 02:40:12 +0530129static struct omap_hwmod omap2420_i2c2_hwmod = {
130 .name = "i2c2",
Paul Walmsley0d619a82011-07-09 19:14:07 -0600131 .mpu_irqs = omap2_i2c2_mpu_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600132 .sdma_reqs = omap2_i2c2_sdma_reqs,
Paul Walmsley20042902010-09-30 02:40:12 +0530133 .main_clk = "i2c2_fck",
134 .prcm = {
135 .omap2 = {
136 .module_offs = CORE_MOD,
137 .prcm_reg_id = 1,
138 .module_bit = OMAP2420_EN_I2C2_SHIFT,
139 .idlest_reg_id = 1,
140 .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
141 },
142 },
Paul Walmsley20042902010-09-30 02:40:12 +0530143 .class = &i2c_class,
144 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +0530145 .flags = HWMOD_16BIT_REG,
146};
147
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800148/* dma attributes */
149static struct omap_dma_dev_attr dma_dev_attr = {
150 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
151 IS_CSSA_32 | IS_CDSA_32,
152 .lch_count = 32,
153};
154
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800155static struct omap_hwmod omap2420_dma_system_hwmod = {
156 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -0600157 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600158 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800159 .main_clk = "core_l3_ck",
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800160 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah745685df92010-12-20 18:27:18 -0800161 .flags = HWMOD_NO_IDLEST,
162};
163
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800164/* mailbox */
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800165static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700166 { .name = "dsp", .irq = 26 + OMAP_INTC_START, },
167 { .name = "iva", .irq = 34 + OMAP_INTC_START, },
168 { .irq = -1 },
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800169};
170
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800171static struct omap_hwmod omap2420_mailbox_hwmod = {
172 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -0600173 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800174 .mpu_irqs = omap2420_mailbox_irqs,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800175 .main_clk = "mailboxes_ick",
176 .prcm = {
177 .omap2 = {
178 .prcm_reg_id = 1,
179 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
180 .module_offs = CORE_MOD,
181 .idlest_reg_id = 1,
182 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
183 },
184 },
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800185};
186
Charulatha V3cb72fa2011-02-24 12:51:46 -0800187/*
188 * 'mcbsp' class
189 * multi channel buffered serial port controller
190 */
191
192static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
193 .name = "mcbsp",
194};
195
Peter Ujfalusib3153102012-06-18 16:18:42 -0600196static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
197 { .role = "pad_fck", .clk = "mcbsp_clks" },
198 { .role = "prcm_fck", .clk = "func_96m_ck" },
199};
200
Charulatha V3cb72fa2011-02-24 12:51:46 -0800201/* mcbsp1 */
202static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700203 { .name = "tx", .irq = 59 + OMAP_INTC_START, },
204 { .name = "rx", .irq = 60 + OMAP_INTC_START, },
205 { .irq = -1 },
Charulatha V3cb72fa2011-02-24 12:51:46 -0800206};
207
Charulatha V3cb72fa2011-02-24 12:51:46 -0800208static struct omap_hwmod omap2420_mcbsp1_hwmod = {
209 .name = "mcbsp1",
210 .class = &omap2420_mcbsp_hwmod_class,
211 .mpu_irqs = omap2420_mcbsp1_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600212 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -0800213 .main_clk = "mcbsp1_fck",
214 .prcm = {
215 .omap2 = {
216 .prcm_reg_id = 1,
217 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
218 .module_offs = CORE_MOD,
219 .idlest_reg_id = 1,
220 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
221 },
222 },
Peter Ujfalusib3153102012-06-18 16:18:42 -0600223 .opt_clks = mcbsp_opt_clks,
224 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V3cb72fa2011-02-24 12:51:46 -0800225};
226
227/* mcbsp2 */
228static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700229 { .name = "tx", .irq = 62 + OMAP_INTC_START, },
230 { .name = "rx", .irq = 63 + OMAP_INTC_START, },
231 { .irq = -1 },
Charulatha V3cb72fa2011-02-24 12:51:46 -0800232};
233
Charulatha V3cb72fa2011-02-24 12:51:46 -0800234static struct omap_hwmod omap2420_mcbsp2_hwmod = {
235 .name = "mcbsp2",
236 .class = &omap2420_mcbsp_hwmod_class,
237 .mpu_irqs = omap2420_mcbsp2_irqs,
Paul Walmsleyd826ebf2011-07-09 19:14:07 -0600238 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
Charulatha V3cb72fa2011-02-24 12:51:46 -0800239 .main_clk = "mcbsp2_fck",
240 .prcm = {
241 .omap2 = {
242 .prcm_reg_id = 1,
243 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
244 .module_offs = CORE_MOD,
245 .idlest_reg_id = 1,
246 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
247 },
248 },
Peter Ujfalusib3153102012-06-18 16:18:42 -0600249 .opt_clks = mcbsp_opt_clks,
250 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V3cb72fa2011-02-24 12:51:46 -0800251};
252
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600253static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = {
254 .rev_offs = 0x3c,
255 .sysc_offs = 0x64,
256 .syss_offs = 0x68,
257 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
258 .sysc_fields = &omap_hwmod_sysc_type1,
259};
260
261static struct omap_hwmod_class omap2420_msdi_hwmod_class = {
262 .name = "msdi",
263 .sysc = &omap2420_msdi_sysc,
264 .reset = &omap_msdi_reset,
265};
266
267/* msdi1 */
268static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = {
Tony Lindgren7d7e1eb2012-08-27 17:43:01 -0700269 { .irq = 83 + OMAP_INTC_START, },
270 { .irq = -1 },
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600271};
272
273static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = {
274 { .name = "tx", .dma_req = 61 }, /* OMAP24XX_DMA_MMC1_TX */
275 { .name = "rx", .dma_req = 62 }, /* OMAP24XX_DMA_MMC1_RX */
276 { .dma_req = -1 }
277};
278
279static struct omap_hwmod omap2420_msdi1_hwmod = {
280 .name = "msdi1",
281 .class = &omap2420_msdi_hwmod_class,
282 .mpu_irqs = omap2420_msdi1_irqs,
283 .sdma_reqs = omap2420_msdi1_sdma_reqs,
284 .main_clk = "mmc_fck",
285 .prcm = {
286 .omap2 = {
287 .prcm_reg_id = 1,
288 .module_bit = OMAP2420_EN_MMC_SHIFT,
289 .module_offs = CORE_MOD,
290 .idlest_reg_id = 1,
291 .idlest_idle_bit = OMAP2420_ST_MMC_SHIFT,
292 },
293 },
294 .flags = HWMOD_16BIT_REG,
295};
296
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600297/* HDQ1W/1-wire */
298static struct omap_hwmod omap2420_hdq1w_hwmod = {
299 .name = "hdq1w",
300 .mpu_irqs = omap2_hdq1w_mpu_irqs,
301 .main_clk = "hdq_fck",
302 .prcm = {
303 .omap2 = {
304 .module_offs = CORE_MOD,
305 .prcm_reg_id = 1,
306 .module_bit = OMAP24XX_EN_HDQ_SHIFT,
307 .idlest_reg_id = 1,
308 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
309 },
310 },
311 .class = &omap2_hdq1w_class,
312};
313
Paul Walmsley844a3b62012-04-19 04:04:33 -0600314/*
315 * interfaces
316 */
317
Paul Walmsley844a3b62012-04-19 04:04:33 -0600318/* L4 CORE -> I2C1 interface */
319static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600320 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600321 .slave = &omap2420_i2c1_hwmod,
322 .clk = "i2c1_ick",
323 .addr = omap2_i2c1_addr_space,
324 .user = OCP_USER_MPU | OCP_USER_SDMA,
325};
326
327/* L4 CORE -> I2C2 interface */
328static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600329 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600330 .slave = &omap2420_i2c2_hwmod,
331 .clk = "i2c2_ick",
332 .addr = omap2_i2c2_addr_space,
333 .user = OCP_USER_MPU | OCP_USER_SDMA,
334};
335
336/* IVA <- L3 interface */
337static struct omap_hwmod_ocp_if omap2420_l3__iva = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600338 .master = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600339 .slave = &omap2420_iva_hwmod,
Paul Walmsley3af35fb2012-04-19 04:04:38 -0600340 .clk = "core_l3_ck",
341 .user = OCP_USER_MPU | OCP_USER_SDMA,
342};
343
344/* DSP <- L3 interface */
345static struct omap_hwmod_ocp_if omap2420_l3__dsp = {
346 .master = &omap2xxx_l3_main_hwmod,
347 .slave = &omap2420_dsp_hwmod,
348 .clk = "dsp_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600349 .user = OCP_USER_MPU | OCP_USER_SDMA,
350};
351
352static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
353 {
354 .pa_start = 0x48028000,
355 .pa_end = 0x48028000 + SZ_1K - 1,
356 .flags = ADDR_TYPE_RT
357 },
358 { }
359};
360
361/* l4_wkup -> timer1 */
362static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600363 .master = &omap2xxx_l4_wkup_hwmod,
364 .slave = &omap2xxx_timer1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600365 .clk = "gpt1_ick",
366 .addr = omap2420_timer1_addrs,
367 .user = OCP_USER_MPU | OCP_USER_SDMA,
368};
369
Paul Walmsley844a3b62012-04-19 04:04:33 -0600370/* l4_wkup -> wd_timer2 */
371static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
372 {
373 .pa_start = 0x48022000,
374 .pa_end = 0x4802207f,
375 .flags = ADDR_TYPE_RT
376 },
377 { }
378};
379
380static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600381 .master = &omap2xxx_l4_wkup_hwmod,
382 .slave = &omap2xxx_wd_timer2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600383 .clk = "mpu_wdt_ick",
384 .addr = omap2420_wd_timer2_addrs,
385 .user = OCP_USER_MPU | OCP_USER_SDMA,
386};
387
Paul Walmsley844a3b62012-04-19 04:04:33 -0600388/* l4_wkup -> gpio1 */
389static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
390 {
391 .pa_start = 0x48018000,
392 .pa_end = 0x480181ff,
393 .flags = ADDR_TYPE_RT
394 },
395 { }
396};
397
398static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600399 .master = &omap2xxx_l4_wkup_hwmod,
400 .slave = &omap2xxx_gpio1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600401 .clk = "gpios_ick",
402 .addr = omap2420_gpio1_addr_space,
403 .user = OCP_USER_MPU | OCP_USER_SDMA,
404};
405
406/* l4_wkup -> gpio2 */
407static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
408 {
409 .pa_start = 0x4801a000,
410 .pa_end = 0x4801a1ff,
411 .flags = ADDR_TYPE_RT
412 },
413 { }
414};
415
416static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600417 .master = &omap2xxx_l4_wkup_hwmod,
418 .slave = &omap2xxx_gpio2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600419 .clk = "gpios_ick",
420 .addr = omap2420_gpio2_addr_space,
421 .user = OCP_USER_MPU | OCP_USER_SDMA,
422};
423
424/* l4_wkup -> gpio3 */
425static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
426 {
427 .pa_start = 0x4801c000,
428 .pa_end = 0x4801c1ff,
429 .flags = ADDR_TYPE_RT
430 },
431 { }
432};
433
434static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600435 .master = &omap2xxx_l4_wkup_hwmod,
436 .slave = &omap2xxx_gpio3_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600437 .clk = "gpios_ick",
438 .addr = omap2420_gpio3_addr_space,
439 .user = OCP_USER_MPU | OCP_USER_SDMA,
440};
441
442/* l4_wkup -> gpio4 */
443static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
444 {
445 .pa_start = 0x4801e000,
446 .pa_end = 0x4801e1ff,
447 .flags = ADDR_TYPE_RT
448 },
449 { }
450};
451
452static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600453 .master = &omap2xxx_l4_wkup_hwmod,
454 .slave = &omap2xxx_gpio4_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600455 .clk = "gpios_ick",
456 .addr = omap2420_gpio4_addr_space,
457 .user = OCP_USER_MPU | OCP_USER_SDMA,
458};
459
460/* dma_system -> L3 */
461static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
462 .master = &omap2420_dma_system_hwmod,
Paul Walmsleycb484272012-04-19 04:04:33 -0600463 .slave = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600464 .clk = "core_l3_ck",
465 .user = OCP_USER_MPU | OCP_USER_SDMA,
466};
467
468/* l4_core -> dma_system */
469static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600470 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600471 .slave = &omap2420_dma_system_hwmod,
472 .clk = "sdma_ick",
473 .addr = omap2_dma_system_addrs,
474 .user = OCP_USER_MPU | OCP_USER_SDMA,
475};
476
477/* l4_core -> mailbox */
478static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600479 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600480 .slave = &omap2420_mailbox_hwmod,
481 .addr = omap2_mailbox_addrs,
482 .user = OCP_USER_MPU | OCP_USER_SDMA,
483};
484
485/* l4_core -> mcbsp1 */
486static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600487 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600488 .slave = &omap2420_mcbsp1_hwmod,
489 .clk = "mcbsp1_ick",
490 .addr = omap2_mcbsp1_addrs,
491 .user = OCP_USER_MPU | OCP_USER_SDMA,
492};
493
494/* l4_core -> mcbsp2 */
495static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600496 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600497 .slave = &omap2420_mcbsp2_hwmod,
498 .clk = "mcbsp2_ick",
499 .addr = omap2xxx_mcbsp2_addrs,
500 .user = OCP_USER_MPU | OCP_USER_SDMA,
501};
502
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600503static struct omap_hwmod_addr_space omap2420_msdi1_addrs[] = {
504 {
505 .pa_start = 0x4809c000,
506 .pa_end = 0x4809c000 + SZ_128 - 1,
507 .flags = ADDR_TYPE_RT,
508 },
509 { }
510};
511
512/* l4_core -> msdi1 */
513static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1 = {
514 .master = &omap2xxx_l4_core_hwmod,
515 .slave = &omap2420_msdi1_hwmod,
516 .clk = "mmc_ick",
517 .addr = omap2420_msdi1_addrs,
518 .user = OCP_USER_MPU | OCP_USER_SDMA,
519};
520
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600521/* l4_core -> hdq1w interface */
522static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = {
523 .master = &omap2xxx_l4_core_hwmod,
524 .slave = &omap2420_hdq1w_hwmod,
525 .clk = "hdq_ick",
526 .addr = omap2_hdq1w_addr_space,
527 .user = OCP_USER_MPU | OCP_USER_SDMA,
528 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
529};
530
531
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600532/* l4_wkup -> 32ksync_counter */
533static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = {
534 {
535 .pa_start = 0x48004000,
536 .pa_end = 0x4800401f,
537 .flags = ADDR_TYPE_RT
538 },
539 { }
540};
541
Afzal Mohammed49484a62012-09-23 17:28:24 -0600542static struct omap_hwmod_addr_space omap2420_gpmc_addrs[] = {
543 {
544 .pa_start = 0x6800a000,
545 .pa_end = 0x6800afff,
546 .flags = ADDR_TYPE_RT
547 },
548 { }
549};
550
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600551static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = {
552 .master = &omap2xxx_l4_wkup_hwmod,
553 .slave = &omap2xxx_counter_32k_hwmod,
554 .clk = "sync_32k_ick",
555 .addr = omap2420_counter_32k_addrs,
556 .user = OCP_USER_MPU | OCP_USER_SDMA,
557};
558
Afzal Mohammed49484a62012-09-23 17:28:24 -0600559static struct omap_hwmod_ocp_if omap2420_l3__gpmc = {
560 .master = &omap2xxx_l3_main_hwmod,
561 .slave = &omap2xxx_gpmc_hwmod,
562 .clk = "core_l3_ck",
563 .addr = omap2420_gpmc_addrs,
564 .user = OCP_USER_MPU | OCP_USER_SDMA,
565};
566
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600567static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley6a297552012-04-19 04:04:34 -0600568 &omap2xxx_l3_main__l4_core,
569 &omap2xxx_mpu__l3_main,
570 &omap2xxx_dss__l3,
571 &omap2xxx_l4_core__mcspi1,
572 &omap2xxx_l4_core__mcspi2,
573 &omap2xxx_l4_core__l4_wkup,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600574 &omap2_l4_core__uart1,
575 &omap2_l4_core__uart2,
576 &omap2_l4_core__uart3,
577 &omap2420_l4_core__i2c1,
578 &omap2420_l4_core__i2c2,
579 &omap2420_l3__iva,
Paul Walmsley3af35fb2012-04-19 04:04:38 -0600580 &omap2420_l3__dsp,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600581 &omap2420_l4_wkup__timer1,
Paul Walmsley6a297552012-04-19 04:04:34 -0600582 &omap2xxx_l4_core__timer2,
583 &omap2xxx_l4_core__timer3,
584 &omap2xxx_l4_core__timer4,
585 &omap2xxx_l4_core__timer5,
586 &omap2xxx_l4_core__timer6,
587 &omap2xxx_l4_core__timer7,
588 &omap2xxx_l4_core__timer8,
589 &omap2xxx_l4_core__timer9,
590 &omap2xxx_l4_core__timer10,
591 &omap2xxx_l4_core__timer11,
592 &omap2xxx_l4_core__timer12,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600593 &omap2420_l4_wkup__wd_timer2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600594 &omap2xxx_l4_core__dss,
595 &omap2xxx_l4_core__dss_dispc,
596 &omap2xxx_l4_core__dss_rfbi,
597 &omap2xxx_l4_core__dss_venc,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600598 &omap2420_l4_wkup__gpio1,
599 &omap2420_l4_wkup__gpio2,
600 &omap2420_l4_wkup__gpio3,
601 &omap2420_l4_wkup__gpio4,
602 &omap2420_dma_system__l3,
603 &omap2420_l4_core__dma_system,
604 &omap2420_l4_core__mailbox,
605 &omap2420_l4_core__mcbsp1,
606 &omap2420_l4_core__mcbsp2,
Tony Lindgrenad1b6662012-05-08 17:23:33 -0600607 &omap2420_l4_core__msdi1,
Paul Walmsleye9b0a2f2012-09-23 17:28:25 -0600608 &omap2xxx_l4_core__rng,
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600609 &omap2420_l4_core__hdq1w,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600610 &omap2420_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -0600611 &omap2420_l3__gpmc,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300612 NULL,
613};
614
Paul Walmsley73591542010-02-22 22:09:32 -0700615int __init omap2420_hwmod_init(void)
616{
Kevin Hilman9ebfd282012-06-18 12:12:23 -0600617 omap_hwmod_init();
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600618 return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs);
Paul Walmsley73591542010-02-22 22:09:32 -0700619}