blob: 74eefd30518c9dd59420ce9f3517987cac897df4 [file] [log] [blame]
Paul Walmsley02bfc0302009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
Paul Walmsley02bfc0302009-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 Walmsley02bfc0302009-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 Walmsley02bfc0302009-09-03 20:14:05 +030014 */
Tony Lindgren3a8761c2012-10-08 09:11:22 -070015
16#include <linux/i2c-omap.h>
Andreas Fenkart551434382014-11-08 15:33:09 +010017#include <linux/platform_data/hsmmc-omap.h>
Tony Lindgren45c3eb72012-11-30 08:41:50 -080018#include <linux/omap-dma.h>
Tony Lindgren2a296c82012-10-02 17:41:35 -070019
20#include "omap_hwmod.h"
Tony Lindgren1e0f51a2012-09-20 11:42:02 -070021#include "l3_2xxx.h"
Paul Walmsley02bfc0302009-09-03 20:14:05 +030022
Tony Lindgrendbc04162012-08-31 10:59:07 -070023#include "soc.h"
Paul Walmsley43b40992010-02-22 22:09:34 -070024#include "omap_hwmod_common_data.h"
Paul Walmsley02bfc0302009-09-03 20:14:05 +030025#include "prm-regbits-24xx.h"
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +053026#include "cm-regbits-24xx.h"
Tony Lindgren3a8761c2012-10-08 09:11:22 -070027#include "i2c.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070028#include "wd_timer.h"
Paul Walmsley02bfc0302009-09-03 20:14:05 +030029
Paul Walmsley73591542010-02-22 22:09:32 -070030/*
31 * OMAP2430 hardware module integration data
32 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060033 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070034 * TI hardware database or other technical documentation. Data that
35 * is driver-specific or driver-kernel integration-specific belongs
36 * elsewhere.
37 */
38
Paul Walmsley844a3b62012-04-19 04:04:33 -060039/*
40 * IP blocks
41 */
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +020042
Paul Walmsley844a3b62012-04-19 04:04:33 -060043/* IVA2 (IVA2) */
Paul Walmsley3af35fb2012-04-19 04:04:38 -060044static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
45 { .name = "logic", .rst_shift = 0 },
46 { .name = "mmu", .rst_shift = 1 },
47};
48
Paul Walmsley08072ac2010-07-26 16:34:33 -060049static struct omap_hwmod omap2430_iva_hwmod = {
50 .name = "iva",
51 .class = &iva_hwmod_class,
Paul Walmsley3af35fb2012-04-19 04:04:38 -060052 .clkdm_name = "dsp_clkdm",
53 .rst_lines = omap2430_iva_resets,
54 .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
55 .main_clk = "dsp_fck",
Paul Walmsley08072ac2010-07-26 16:34:33 -060056};
57
Paul Walmsley20042902010-09-30 02:40:12 +053058/* I2C common */
59static struct omap_hwmod_class_sysconfig i2c_sysc = {
60 .rev_offs = 0x00,
61 .sysc_offs = 0x20,
62 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -070063 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
64 SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +053065 .sysc_fields = &omap_hwmod_sysc_type1,
66};
67
68static struct omap_hwmod_class i2c_class = {
69 .name = "i2c",
70 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -060071 .rev = OMAP_I2C_IP_VERSION_1,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -060072 .reset = &omap_i2c_reset,
Paul Walmsley20042902010-09-30 02:40:12 +053073};
74
Benoit Cousson50ebb772010-12-21 21:08:34 -070075/* I2C1 */
Paul Walmsley20042902010-09-30 02:40:12 +053076static struct omap_hwmod omap2430_i2c1_hwmod = {
77 .name = "i2c1",
Andy Green3e600522011-07-10 05:27:14 -060078 .flags = HWMOD_16BIT_REG,
Paul Walmsley20042902010-09-30 02:40:12 +053079 .main_clk = "i2chs1_fck",
80 .prcm = {
81 .omap2 = {
82 /*
83 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
84 * I2CHS IP's do not follow the usual pattern.
85 * prcm_reg_id alone cannot be used to program
86 * the iclk and fclk. Needs to be handled using
Lucas De Marchi25985ed2011-03-30 22:57:33 -030087 * additional flags when clk handling is moved
Paul Walmsley20042902010-09-30 02:40:12 +053088 * to hwmod framework.
89 */
90 .module_offs = CORE_MOD,
Paul Walmsley20042902010-09-30 02:40:12 +053091 .idlest_reg_id = 1,
92 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
93 },
94 },
Paul Walmsley20042902010-09-30 02:40:12 +053095 .class = &i2c_class,
Paul Walmsley20042902010-09-30 02:40:12 +053096};
97
98/* I2C2 */
Paul Walmsley20042902010-09-30 02:40:12 +053099static struct omap_hwmod omap2430_i2c2_hwmod = {
100 .name = "i2c2",
Andy Green3e600522011-07-10 05:27:14 -0600101 .flags = HWMOD_16BIT_REG,
Paul Walmsley20042902010-09-30 02:40:12 +0530102 .main_clk = "i2chs2_fck",
103 .prcm = {
104 .omap2 = {
105 .module_offs = CORE_MOD,
Paul Walmsley20042902010-09-30 02:40:12 +0530106 .idlest_reg_id = 1,
107 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
108 },
109 },
Paul Walmsley20042902010-09-30 02:40:12 +0530110 .class = &i2c_class,
Paul Walmsley20042902010-09-30 02:40:12 +0530111};
112
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800113/* gpio5 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800114static struct omap_hwmod omap2430_gpio5_hwmod = {
115 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +0530116 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800117 .main_clk = "gpio5_fck",
118 .prcm = {
119 .omap2 = {
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800120 .module_offs = CORE_MOD,
121 .idlest_reg_id = 2,
122 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
123 },
124 },
Paul Walmsley273b9462011-07-09 19:14:08 -0600125 .class = &omap2xxx_gpio_hwmod_class,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800126};
127
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800128/* dma attributes */
129static struct omap_dma_dev_attr dma_dev_attr = {
130 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
131 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
132 .lch_count = 32,
133};
134
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800135static struct omap_hwmod omap2430_dma_system_hwmod = {
136 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -0600137 .class = &omap2xxx_dma_hwmod_class,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800138 .main_clk = "core_l3_ck",
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800139 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800140 .flags = HWMOD_NO_IDLEST,
141};
142
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800143/* mailbox */
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800144static struct omap_hwmod omap2430_mailbox_hwmod = {
145 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -0600146 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800147 .main_clk = "mailboxes_ick",
148 .prcm = {
149 .omap2 = {
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800150 .module_offs = CORE_MOD,
151 .idlest_reg_id = 1,
152 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
153 },
154 },
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800155};
156
Charulatha V7f904c72011-02-17 09:53:10 -0800157/* mcspi3 */
Charulatha V7f904c72011-02-17 09:53:10 -0800158static struct omap_hwmod omap2430_mcspi3_hwmod = {
Paul Walmsleybec93812012-04-19 04:03:50 -0600159 .name = "mcspi3",
Charulatha V7f904c72011-02-17 09:53:10 -0800160 .main_clk = "mcspi3_fck",
161 .prcm = {
162 .omap2 = {
163 .module_offs = CORE_MOD,
Charulatha V7f904c72011-02-17 09:53:10 -0800164 .idlest_reg_id = 2,
165 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
166 },
167 },
Paul Walmsley273b9462011-07-09 19:14:08 -0600168 .class = &omap2xxx_mcspi_class,
Charulatha V7f904c72011-02-17 09:53:10 -0800169};
170
Paul Walmsley844a3b62012-04-19 04:04:33 -0600171/* usbhsotg */
Hema HK44d02ac2011-02-17 12:07:17 +0530172static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
173 .rev_offs = 0x0400,
174 .sysc_offs = 0x0404,
175 .syss_offs = 0x0408,
176 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
177 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
178 SYSC_HAS_AUTOIDLE),
179 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
180 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
181 .sysc_fields = &omap_hwmod_sysc_type1,
182};
183
184static struct omap_hwmod_class usbotg_class = {
185 .name = "usbotg",
186 .sysc = &omap2430_usbhsotg_sysc,
187};
188
189/* usb_otg_hs */
Hema HK44d02ac2011-02-17 12:07:17 +0530190static struct omap_hwmod omap2430_usbhsotg_hwmod = {
191 .name = "usb_otg_hs",
Hema HK44d02ac2011-02-17 12:07:17 +0530192 .main_clk = "usbhs_ick",
193 .prcm = {
194 .omap2 = {
Hema HK44d02ac2011-02-17 12:07:17 +0530195 .module_offs = CORE_MOD,
196 .idlest_reg_id = 1,
197 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
198 },
199 },
Hema HK44d02ac2011-02-17 12:07:17 +0530200 .class = &usbotg_class,
201 /*
202 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
203 * broken when autoidle is enabled
204 * workaround is to disable the autoidle bit at module level.
205 */
206 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
207 | HWMOD_SWSUP_MSTANDBY,
Hema HK44d02ac2011-02-17 12:07:17 +0530208};
209
Charulatha V37801b32011-02-24 12:51:46 -0800210/*
211 * 'mcbsp' class
212 * multi channel buffered serial port controller
213 */
Tony Lindgren04aa67d2011-02-22 10:54:12 -0800214
Charulatha V37801b32011-02-24 12:51:46 -0800215static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
216 .rev_offs = 0x007C,
217 .sysc_offs = 0x008C,
218 .sysc_flags = (SYSC_HAS_SOFTRESET),
219 .sysc_fields = &omap_hwmod_sysc_type1,
220};
221
222static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
223 .name = "mcbsp",
224 .sysc = &omap2430_mcbsp_sysc,
Charulatha V37801b32011-02-24 12:51:46 -0800225};
226
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600227static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
228 { .role = "pad_fck", .clk = "mcbsp_clks" },
229 { .role = "prcm_fck", .clk = "func_96m_ck" },
230};
231
Charulatha V37801b32011-02-24 12:51:46 -0800232/* mcbsp1 */
Charulatha V37801b32011-02-24 12:51:46 -0800233static struct omap_hwmod omap2430_mcbsp1_hwmod = {
234 .name = "mcbsp1",
235 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800236 .main_clk = "mcbsp1_fck",
237 .prcm = {
238 .omap2 = {
Charulatha V37801b32011-02-24 12:51:46 -0800239 .module_offs = CORE_MOD,
240 .idlest_reg_id = 1,
241 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
242 },
243 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600244 .opt_clks = mcbsp_opt_clks,
245 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800246};
247
248/* mcbsp2 */
Charulatha V37801b32011-02-24 12:51:46 -0800249static struct omap_hwmod omap2430_mcbsp2_hwmod = {
250 .name = "mcbsp2",
251 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800252 .main_clk = "mcbsp2_fck",
253 .prcm = {
254 .omap2 = {
Charulatha V37801b32011-02-24 12:51:46 -0800255 .module_offs = CORE_MOD,
256 .idlest_reg_id = 1,
257 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
258 },
259 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600260 .opt_clks = mcbsp_opt_clks,
261 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800262};
263
264/* mcbsp3 */
Charulatha V37801b32011-02-24 12:51:46 -0800265static struct omap_hwmod omap2430_mcbsp3_hwmod = {
266 .name = "mcbsp3",
267 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800268 .main_clk = "mcbsp3_fck",
269 .prcm = {
270 .omap2 = {
Charulatha V37801b32011-02-24 12:51:46 -0800271 .module_offs = CORE_MOD,
272 .idlest_reg_id = 2,
273 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
274 },
275 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600276 .opt_clks = mcbsp_opt_clks,
277 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800278};
279
280/* mcbsp4 */
Charulatha V37801b32011-02-24 12:51:46 -0800281static struct omap_hwmod omap2430_mcbsp4_hwmod = {
282 .name = "mcbsp4",
283 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800284 .main_clk = "mcbsp4_fck",
285 .prcm = {
286 .omap2 = {
Charulatha V37801b32011-02-24 12:51:46 -0800287 .module_offs = CORE_MOD,
288 .idlest_reg_id = 2,
289 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
290 },
291 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600292 .opt_clks = mcbsp_opt_clks,
293 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800294};
295
296/* mcbsp5 */
Charulatha V37801b32011-02-24 12:51:46 -0800297static struct omap_hwmod omap2430_mcbsp5_hwmod = {
298 .name = "mcbsp5",
299 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800300 .main_clk = "mcbsp5_fck",
301 .prcm = {
302 .omap2 = {
Charulatha V37801b32011-02-24 12:51:46 -0800303 .module_offs = CORE_MOD,
304 .idlest_reg_id = 2,
305 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
306 },
307 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600308 .opt_clks = mcbsp_opt_clks,
309 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800310};
Tony Lindgren04aa67d2011-02-22 10:54:12 -0800311
Paul Walmsleybce06f32011-03-01 13:12:55 -0800312/* MMC/SD/SDIO common */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800313static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
314 .rev_offs = 0x1fc,
315 .sysc_offs = 0x10,
316 .syss_offs = 0x14,
317 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
318 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
319 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
320 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
321 .sysc_fields = &omap_hwmod_sysc_type1,
322};
323
324static struct omap_hwmod_class omap2430_mmc_class = {
325 .name = "mmc",
326 .sysc = &omap2430_mmc_sysc,
327};
328
329/* MMC/SD/SDIO1 */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800330static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
331 { .role = "dbck", .clk = "mmchsdb1_fck" },
332};
333
Andreas Fenkart551434382014-11-08 15:33:09 +0100334static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Kishore Kadiyala6ab89462011-03-01 13:12:56 -0800335 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
336};
337
Paul Walmsleybce06f32011-03-01 13:12:55 -0800338static struct omap_hwmod omap2430_mmc1_hwmod = {
339 .name = "mmc1",
340 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800341 .opt_clks = omap2430_mmc1_opt_clks,
342 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
343 .main_clk = "mmchs1_fck",
344 .prcm = {
345 .omap2 = {
346 .module_offs = CORE_MOD,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800347 .idlest_reg_id = 2,
348 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
349 },
350 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -0800351 .dev_attr = &mmc1_dev_attr,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800352 .class = &omap2430_mmc_class,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800353};
354
355/* MMC/SD/SDIO2 */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800356static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
357 { .role = "dbck", .clk = "mmchsdb2_fck" },
358};
359
Paul Walmsleybce06f32011-03-01 13:12:55 -0800360static struct omap_hwmod omap2430_mmc2_hwmod = {
361 .name = "mmc2",
362 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800363 .opt_clks = omap2430_mmc2_opt_clks,
364 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
365 .main_clk = "mmchs2_fck",
366 .prcm = {
367 .omap2 = {
368 .module_offs = CORE_MOD,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800369 .idlest_reg_id = 2,
370 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
371 },
372 },
Paul Walmsleybce06f32011-03-01 13:12:55 -0800373 .class = &omap2430_mmc_class,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800374};
Kevin Hilman046465b2010-09-27 20:19:30 +0530375
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600376/* HDQ1W/1-wire */
377static struct omap_hwmod omap2430_hdq1w_hwmod = {
378 .name = "hdq1w",
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600379 .main_clk = "hdq_fck",
380 .prcm = {
381 .omap2 = {
382 .module_offs = CORE_MOD,
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600383 .idlest_reg_id = 1,
384 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
385 },
386 },
387 .class = &omap2_hdq1w_class,
388};
389
Paul Walmsley844a3b62012-04-19 04:04:33 -0600390/*
391 * interfaces
392 */
393
394/* L3 -> L4_CORE interface */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600395/* l3_core -> usbhsotg interface */
396static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
397 .master = &omap2430_usbhsotg_hwmod,
Paul Walmsleycb484272012-04-19 04:04:33 -0600398 .slave = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600399 .clk = "core_l3_ck",
400 .user = OCP_USER_MPU,
401};
402
403/* L4 CORE -> I2C1 interface */
404static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600405 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600406 .slave = &omap2430_i2c1_hwmod,
407 .clk = "i2c1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600408 .user = OCP_USER_MPU | OCP_USER_SDMA,
409};
410
411/* L4 CORE -> I2C2 interface */
412static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600413 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600414 .slave = &omap2430_i2c2_hwmod,
415 .clk = "i2c2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600416 .user = OCP_USER_MPU | OCP_USER_SDMA,
417};
418
Paul Walmsley844a3b62012-04-19 04:04:33 -0600419/* l4_core ->usbhsotg interface */
420static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600421 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600422 .slave = &omap2430_usbhsotg_hwmod,
423 .clk = "usb_l4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600424 .user = OCP_USER_MPU,
425};
426
427/* L4 CORE -> MMC1 interface */
428static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600429 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600430 .slave = &omap2430_mmc1_hwmod,
431 .clk = "mmchs1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600432 .user = OCP_USER_MPU | OCP_USER_SDMA,
433};
434
435/* L4 CORE -> MMC2 interface */
436static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600437 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600438 .slave = &omap2430_mmc2_hwmod,
439 .clk = "mmchs2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600440 .user = OCP_USER_MPU | OCP_USER_SDMA,
441};
442
Paul Walmsley844a3b62012-04-19 04:04:33 -0600443/* l4 core -> mcspi3 interface */
444static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600445 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600446 .slave = &omap2430_mcspi3_hwmod,
447 .clk = "mcspi3_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600448 .user = OCP_USER_MPU | OCP_USER_SDMA,
449};
450
451/* IVA2 <- L3 interface */
452static struct omap_hwmod_ocp_if omap2430_l3__iva = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600453 .master = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600454 .slave = &omap2430_iva_hwmod,
Paul Walmsley3af35fb2012-04-19 04:04:38 -0600455 .clk = "core_l3_ck",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600456 .user = OCP_USER_MPU | OCP_USER_SDMA,
457};
458
Paul Walmsley844a3b62012-04-19 04:04:33 -0600459/* l4_wkup -> timer1 */
460static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600461 .master = &omap2xxx_l4_wkup_hwmod,
462 .slave = &omap2xxx_timer1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600463 .clk = "gpt1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600464 .user = OCP_USER_MPU | OCP_USER_SDMA,
465};
466
Paul Walmsley844a3b62012-04-19 04:04:33 -0600467/* l4_wkup -> wd_timer2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600468static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600469 .master = &omap2xxx_l4_wkup_hwmod,
470 .slave = &omap2xxx_wd_timer2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600471 .clk = "mpu_wdt_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600472 .user = OCP_USER_MPU | OCP_USER_SDMA,
473};
474
Paul Walmsley844a3b62012-04-19 04:04:33 -0600475/* l4_wkup -> gpio1 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600476static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600477 .master = &omap2xxx_l4_wkup_hwmod,
478 .slave = &omap2xxx_gpio1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600479 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600480 .user = OCP_USER_MPU | OCP_USER_SDMA,
481};
482
483/* l4_wkup -> gpio2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600484static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600485 .master = &omap2xxx_l4_wkup_hwmod,
486 .slave = &omap2xxx_gpio2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600487 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600488 .user = OCP_USER_MPU | OCP_USER_SDMA,
489};
490
491/* l4_wkup -> gpio3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600492static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600493 .master = &omap2xxx_l4_wkup_hwmod,
494 .slave = &omap2xxx_gpio3_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600495 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600496 .user = OCP_USER_MPU | OCP_USER_SDMA,
497};
498
499/* l4_wkup -> gpio4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600500static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600501 .master = &omap2xxx_l4_wkup_hwmod,
502 .slave = &omap2xxx_gpio4_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600503 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600504 .user = OCP_USER_MPU | OCP_USER_SDMA,
505};
506
507/* l4_core -> gpio5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600508static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600509 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600510 .slave = &omap2430_gpio5_hwmod,
511 .clk = "gpio5_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600512 .user = OCP_USER_MPU | OCP_USER_SDMA,
513};
514
515/* dma_system -> L3 */
516static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
517 .master = &omap2430_dma_system_hwmod,
Paul Walmsleycb484272012-04-19 04:04:33 -0600518 .slave = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600519 .clk = "core_l3_ck",
520 .user = OCP_USER_MPU | OCP_USER_SDMA,
521};
522
523/* l4_core -> dma_system */
524static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600525 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600526 .slave = &omap2430_dma_system_hwmod,
527 .clk = "sdma_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600528 .user = OCP_USER_MPU | OCP_USER_SDMA,
529};
530
531/* l4_core -> mailbox */
532static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600533 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600534 .slave = &omap2430_mailbox_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600535 .user = OCP_USER_MPU | OCP_USER_SDMA,
536};
537
538/* l4_core -> mcbsp1 */
539static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600540 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600541 .slave = &omap2430_mcbsp1_hwmod,
542 .clk = "mcbsp1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600543 .user = OCP_USER_MPU | OCP_USER_SDMA,
544};
545
546/* l4_core -> mcbsp2 */
547static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600548 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600549 .slave = &omap2430_mcbsp2_hwmod,
550 .clk = "mcbsp2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600551 .user = OCP_USER_MPU | OCP_USER_SDMA,
552};
553
Paul Walmsley844a3b62012-04-19 04:04:33 -0600554/* l4_core -> mcbsp3 */
555static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600556 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600557 .slave = &omap2430_mcbsp3_hwmod,
558 .clk = "mcbsp3_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600559 .user = OCP_USER_MPU | OCP_USER_SDMA,
560};
561
Paul Walmsley844a3b62012-04-19 04:04:33 -0600562/* l4_core -> mcbsp4 */
563static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600564 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600565 .slave = &omap2430_mcbsp4_hwmod,
566 .clk = "mcbsp4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600567 .user = OCP_USER_MPU | OCP_USER_SDMA,
568};
569
Paul Walmsley844a3b62012-04-19 04:04:33 -0600570/* l4_core -> mcbsp5 */
571static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600572 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600573 .slave = &omap2430_mcbsp5_hwmod,
574 .clk = "mcbsp5_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600575 .user = OCP_USER_MPU | OCP_USER_SDMA,
576};
577
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600578/* l4_core -> hdq1w */
579static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
580 .master = &omap2xxx_l4_core_hwmod,
581 .slave = &omap2430_hdq1w_hwmod,
582 .clk = "hdq_ick",
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600583 .user = OCP_USER_MPU | OCP_USER_SDMA,
584 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
585};
586
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600587/* l4_wkup -> 32ksync_counter */
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600588static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
589 .master = &omap2xxx_l4_wkup_hwmod,
590 .slave = &omap2xxx_counter_32k_hwmod,
591 .clk = "sync_32k_ick",
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600592 .user = OCP_USER_MPU | OCP_USER_SDMA,
593};
594
Afzal Mohammed49484a62012-09-23 17:28:24 -0600595static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
596 .master = &omap2xxx_l3_main_hwmod,
597 .slave = &omap2xxx_gpmc_hwmod,
598 .clk = "core_l3_ck",
Afzal Mohammed49484a62012-09-23 17:28:24 -0600599 .user = OCP_USER_MPU | OCP_USER_SDMA,
600};
601
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600602static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley6a297552012-04-19 04:04:34 -0600603 &omap2xxx_l3_main__l4_core,
604 &omap2xxx_mpu__l3_main,
605 &omap2xxx_dss__l3,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600606 &omap2430_usbhsotg__l3,
607 &omap2430_l4_core__i2c1,
608 &omap2430_l4_core__i2c2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600609 &omap2xxx_l4_core__l4_wkup,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600610 &omap2_l4_core__uart1,
611 &omap2_l4_core__uart2,
612 &omap2_l4_core__uart3,
613 &omap2430_l4_core__usbhsotg,
614 &omap2430_l4_core__mmc1,
615 &omap2430_l4_core__mmc2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600616 &omap2xxx_l4_core__mcspi1,
617 &omap2xxx_l4_core__mcspi2,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600618 &omap2430_l4_core__mcspi3,
619 &omap2430_l3__iva,
620 &omap2430_l4_wkup__timer1,
Paul Walmsley6a297552012-04-19 04:04:34 -0600621 &omap2xxx_l4_core__timer2,
622 &omap2xxx_l4_core__timer3,
623 &omap2xxx_l4_core__timer4,
624 &omap2xxx_l4_core__timer5,
625 &omap2xxx_l4_core__timer6,
626 &omap2xxx_l4_core__timer7,
627 &omap2xxx_l4_core__timer8,
628 &omap2xxx_l4_core__timer9,
629 &omap2xxx_l4_core__timer10,
630 &omap2xxx_l4_core__timer11,
631 &omap2xxx_l4_core__timer12,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600632 &omap2430_l4_wkup__wd_timer2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600633 &omap2xxx_l4_core__dss,
634 &omap2xxx_l4_core__dss_dispc,
635 &omap2xxx_l4_core__dss_rfbi,
636 &omap2xxx_l4_core__dss_venc,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600637 &omap2430_l4_wkup__gpio1,
638 &omap2430_l4_wkup__gpio2,
639 &omap2430_l4_wkup__gpio3,
640 &omap2430_l4_wkup__gpio4,
641 &omap2430_l4_core__gpio5,
642 &omap2430_dma_system__l3,
643 &omap2430_l4_core__dma_system,
644 &omap2430_l4_core__mailbox,
645 &omap2430_l4_core__mcbsp1,
646 &omap2430_l4_core__mcbsp2,
647 &omap2430_l4_core__mcbsp3,
648 &omap2430_l4_core__mcbsp4,
649 &omap2430_l4_core__mcbsp5,
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600650 &omap2430_l4_core__hdq1w,
Paul Walmsleye9b0a2f2012-09-23 17:28:25 -0600651 &omap2xxx_l4_core__rng,
Mark A. Greere569e992013-03-30 15:49:19 -0600652 &omap2xxx_l4_core__sham,
Mark A. Greer660ffd62012-12-21 09:28:09 -0700653 &omap2xxx_l4_core__aes,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600654 &omap2430_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -0600655 &omap2430_l3__gpmc,
Paul Walmsley02bfc0302009-09-03 20:14:05 +0300656 NULL,
657};
658
Paul Walmsley73591542010-02-22 22:09:32 -0700659int __init omap2430_hwmod_init(void)
660{
Kevin Hilman9ebfd282012-06-18 12:12:23 -0600661 omap_hwmod_init();
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600662 return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
Paul Walmsley73591542010-02-22 22:09:32 -0700663}