blob: 79127b35fe60b8023859417fa1db9e5c6674ca1b [file] [log] [blame]
Paul Walmsley02bfc032009-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 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/asoc-ti-mcbsp.h>
Andreas Fenkart55143432014-11-08 15:33:09 +010018#include <linux/platform_data/hsmmc-omap.h>
Arnd Bergmann22037472012-08-24 15:21:06 +020019#include <linux/platform_data/spi-omap2-mcspi.h>
Tony Lindgren45c3eb72012-11-30 08:41:50 -080020#include <linux/omap-dma.h>
Thara Gopinathb6b58222011-02-23 00:14:05 -070021#include <plat/dmtimer.h>
Tony Lindgren2a296c82012-10-02 17:41:35 -070022
23#include "omap_hwmod.h"
Tony Lindgren1e0f51a2012-09-20 11:42:02 -070024#include "l3_2xxx.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030025
Tony Lindgrendbc04162012-08-31 10:59:07 -070026#include "soc.h"
Paul Walmsley43b40992010-02-22 22:09:34 -070027#include "omap_hwmod_common_data.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030028#include "prm-regbits-24xx.h"
Varadarajan, Charulatha165e2162010-09-23 20:02:40 +053029#include "cm-regbits-24xx.h"
Tony Lindgren3a8761c2012-10-08 09:11:22 -070030#include "i2c.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070031#include "wd_timer.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030032
Paul Walmsley73591542010-02-22 22:09:32 -070033/*
34 * OMAP2430 hardware module integration data
35 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060036 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070037 * TI hardware database or other technical documentation. Data that
38 * is driver-specific or driver-kernel integration-specific belongs
39 * elsewhere.
40 */
41
Paul Walmsley844a3b62012-04-19 04:04:33 -060042/*
43 * IP blocks
44 */
Senthilvadivu Guruswamyde56dbb2011-02-22 09:51:15 +020045
Paul Walmsley844a3b62012-04-19 04:04:33 -060046/* IVA2 (IVA2) */
Paul Walmsley3af35fb2012-04-19 04:04:38 -060047static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
48 { .name = "logic", .rst_shift = 0 },
49 { .name = "mmu", .rst_shift = 1 },
50};
51
Paul Walmsley08072ac2010-07-26 16:34:33 -060052static struct omap_hwmod omap2430_iva_hwmod = {
53 .name = "iva",
54 .class = &iva_hwmod_class,
Paul Walmsley3af35fb2012-04-19 04:04:38 -060055 .clkdm_name = "dsp_clkdm",
56 .rst_lines = omap2430_iva_resets,
57 .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
58 .main_clk = "dsp_fck",
Paul Walmsley08072ac2010-07-26 16:34:33 -060059};
60
Paul Walmsley20042902010-09-30 02:40:12 +053061/* I2C common */
62static struct omap_hwmod_class_sysconfig i2c_sysc = {
63 .rev_offs = 0x00,
64 .sysc_offs = 0x20,
65 .syss_offs = 0x10,
Avinash.H.Md73d65f2011-03-03 14:22:46 -070066 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
67 SYSS_HAS_RESET_STATUS),
Paul Walmsley20042902010-09-30 02:40:12 +053068 .sysc_fields = &omap_hwmod_sysc_type1,
69};
70
71static struct omap_hwmod_class i2c_class = {
72 .name = "i2c",
73 .sysc = &i2c_sysc,
Andy Greendb791a72011-07-10 05:27:15 -060074 .rev = OMAP_I2C_IP_VERSION_1,
Avinash.H.M6d3c55f2011-07-10 05:27:16 -060075 .reset = &omap_i2c_reset,
Paul Walmsley20042902010-09-30 02:40:12 +053076};
77
Benoit Cousson50ebb772010-12-21 21:08:34 -070078static struct omap_i2c_dev_attr i2c_dev_attr = {
Paul Walmsley20042902010-09-30 02:40:12 +053079 .fifo_depth = 8, /* bytes */
Shubhrajyoti D2c88ab82012-11-05 17:53:39 +053080 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
Andy Green4d4441a2011-07-10 05:27:16 -060081 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
Paul Walmsley20042902010-09-30 02:40:12 +053082};
83
Benoit Cousson50ebb772010-12-21 21:08:34 -070084/* I2C1 */
Paul Walmsley20042902010-09-30 02:40:12 +053085static struct omap_hwmod omap2430_i2c1_hwmod = {
86 .name = "i2c1",
Andy Green3e600522011-07-10 05:27:14 -060087 .flags = HWMOD_16BIT_REG,
Paul Walmsley20042902010-09-30 02:40:12 +053088 .main_clk = "i2chs1_fck",
89 .prcm = {
90 .omap2 = {
91 /*
92 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
93 * I2CHS IP's do not follow the usual pattern.
94 * prcm_reg_id alone cannot be used to program
95 * the iclk and fclk. Needs to be handled using
Lucas De Marchi25985ed2011-03-30 22:57:33 -030096 * additional flags when clk handling is moved
Paul Walmsley20042902010-09-30 02:40:12 +053097 * to hwmod framework.
98 */
99 .module_offs = CORE_MOD,
100 .prcm_reg_id = 1,
101 .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
102 .idlest_reg_id = 1,
103 .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
104 },
105 },
Paul Walmsley20042902010-09-30 02:40:12 +0530106 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -0700107 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +0530108};
109
110/* I2C2 */
Paul Walmsley20042902010-09-30 02:40:12 +0530111static struct omap_hwmod omap2430_i2c2_hwmod = {
112 .name = "i2c2",
Andy Green3e600522011-07-10 05:27:14 -0600113 .flags = HWMOD_16BIT_REG,
Paul Walmsley20042902010-09-30 02:40:12 +0530114 .main_clk = "i2chs2_fck",
115 .prcm = {
116 .omap2 = {
117 .module_offs = CORE_MOD,
118 .prcm_reg_id = 1,
119 .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
120 .idlest_reg_id = 1,
121 .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
122 },
123 },
Paul Walmsley20042902010-09-30 02:40:12 +0530124 .class = &i2c_class,
Benoit Cousson50ebb772010-12-21 21:08:34 -0700125 .dev_attr = &i2c_dev_attr,
Paul Walmsley20042902010-09-30 02:40:12 +0530126};
127
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800128/* gpio5 */
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800129static struct omap_hwmod omap2430_gpio5_hwmod = {
130 .name = "gpio5",
Avinash.H.Mf95440c2011-04-05 21:10:15 +0530131 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800132 .main_clk = "gpio5_fck",
133 .prcm = {
134 .omap2 = {
135 .prcm_reg_id = 2,
136 .module_bit = OMAP2430_EN_GPIO5_SHIFT,
137 .module_offs = CORE_MOD,
138 .idlest_reg_id = 2,
139 .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
140 },
141 },
Paul Walmsley273b9462011-07-09 19:14:08 -0600142 .class = &omap2xxx_gpio_hwmod_class,
Paul Walmsleycb484272012-04-19 04:04:33 -0600143 .dev_attr = &omap2xxx_gpio_dev_attr,
Varadarajan, Charulathaaeac0e42010-12-07 16:26:56 -0800144};
145
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800146/* dma attributes */
147static struct omap_dma_dev_attr dma_dev_attr = {
148 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
149 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
150 .lch_count = 32,
151};
152
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800153static struct omap_hwmod omap2430_dma_system_hwmod = {
154 .name = "dma",
Paul Walmsley273b9462011-07-09 19:14:08 -0600155 .class = &omap2xxx_dma_hwmod_class,
Paul Walmsley0d619a82011-07-09 19:14:07 -0600156 .mpu_irqs = omap2_dma_system_irqs,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800157 .main_clk = "core_l3_ck",
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800158 .dev_attr = &dma_dev_attr,
G, Manjunath Kondaiah82cbd1a2010-12-20 18:27:18 -0800159 .flags = HWMOD_NO_IDLEST,
160};
161
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800162/* mailbox */
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800163static struct omap_hwmod omap2430_mailbox_hwmod = {
164 .name = "mailbox",
Paul Walmsley273b9462011-07-09 19:14:08 -0600165 .class = &omap2xxx_mailbox_hwmod_class,
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800166 .main_clk = "mailboxes_ick",
167 .prcm = {
168 .omap2 = {
169 .prcm_reg_id = 1,
170 .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
171 .module_offs = CORE_MOD,
172 .idlest_reg_id = 1,
173 .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
174 },
175 },
Omar Ramirez Lunafca1ab52011-02-24 12:51:32 -0800176};
177
Charulatha V7f904c72011-02-17 09:53:10 -0800178/* mcspi3 */
Charulatha V7f904c72011-02-17 09:53:10 -0800179static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
180 .num_chipselect = 2,
181};
182
183static struct omap_hwmod omap2430_mcspi3_hwmod = {
Paul Walmsleybec93812012-04-19 04:03:50 -0600184 .name = "mcspi3",
Charulatha V7f904c72011-02-17 09:53:10 -0800185 .main_clk = "mcspi3_fck",
186 .prcm = {
187 .omap2 = {
188 .module_offs = CORE_MOD,
189 .prcm_reg_id = 2,
190 .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
191 .idlest_reg_id = 2,
192 .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
193 },
194 },
Paul Walmsley273b9462011-07-09 19:14:08 -0600195 .class = &omap2xxx_mcspi_class,
196 .dev_attr = &omap_mcspi3_dev_attr,
Charulatha V7f904c72011-02-17 09:53:10 -0800197};
198
Paul Walmsley844a3b62012-04-19 04:04:33 -0600199/* usbhsotg */
Hema HK44d02ac2011-02-17 12:07:17 +0530200static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
201 .rev_offs = 0x0400,
202 .sysc_offs = 0x0404,
203 .syss_offs = 0x0408,
204 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
205 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
206 SYSC_HAS_AUTOIDLE),
207 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
208 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
209 .sysc_fields = &omap_hwmod_sysc_type1,
210};
211
212static struct omap_hwmod_class usbotg_class = {
213 .name = "usbotg",
214 .sysc = &omap2430_usbhsotg_sysc,
215};
216
217/* usb_otg_hs */
Hema HK44d02ac2011-02-17 12:07:17 +0530218static struct omap_hwmod omap2430_usbhsotg_hwmod = {
219 .name = "usb_otg_hs",
Hema HK44d02ac2011-02-17 12:07:17 +0530220 .main_clk = "usbhs_ick",
221 .prcm = {
222 .omap2 = {
223 .prcm_reg_id = 1,
224 .module_bit = OMAP2430_EN_USBHS_MASK,
225 .module_offs = CORE_MOD,
226 .idlest_reg_id = 1,
227 .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
228 },
229 },
Hema HK44d02ac2011-02-17 12:07:17 +0530230 .class = &usbotg_class,
231 /*
232 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
233 * broken when autoidle is enabled
234 * workaround is to disable the autoidle bit at module level.
235 */
236 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
237 | HWMOD_SWSUP_MSTANDBY,
Hema HK44d02ac2011-02-17 12:07:17 +0530238};
239
Charulatha V37801b32011-02-24 12:51:46 -0800240/*
241 * 'mcbsp' class
242 * multi channel buffered serial port controller
243 */
Tony Lindgren04aa67d2011-02-22 10:54:12 -0800244
Charulatha V37801b32011-02-24 12:51:46 -0800245static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
246 .rev_offs = 0x007C,
247 .sysc_offs = 0x008C,
248 .sysc_flags = (SYSC_HAS_SOFTRESET),
249 .sysc_fields = &omap_hwmod_sysc_type1,
250};
251
252static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
253 .name = "mcbsp",
254 .sysc = &omap2430_mcbsp_sysc,
255 .rev = MCBSP_CONFIG_TYPE2,
256};
257
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600258static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
259 { .role = "pad_fck", .clk = "mcbsp_clks" },
260 { .role = "prcm_fck", .clk = "func_96m_ck" },
261};
262
Charulatha V37801b32011-02-24 12:51:46 -0800263/* mcbsp1 */
Charulatha V37801b32011-02-24 12:51:46 -0800264static struct omap_hwmod omap2430_mcbsp1_hwmod = {
265 .name = "mcbsp1",
266 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800267 .main_clk = "mcbsp1_fck",
268 .prcm = {
269 .omap2 = {
270 .prcm_reg_id = 1,
271 .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
272 .module_offs = CORE_MOD,
273 .idlest_reg_id = 1,
274 .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
275 },
276 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600277 .opt_clks = mcbsp_opt_clks,
278 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800279};
280
281/* mcbsp2 */
Charulatha V37801b32011-02-24 12:51:46 -0800282static struct omap_hwmod omap2430_mcbsp2_hwmod = {
283 .name = "mcbsp2",
284 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800285 .main_clk = "mcbsp2_fck",
286 .prcm = {
287 .omap2 = {
288 .prcm_reg_id = 1,
289 .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
290 .module_offs = CORE_MOD,
291 .idlest_reg_id = 1,
292 .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
293 },
294 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600295 .opt_clks = mcbsp_opt_clks,
296 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800297};
298
299/* mcbsp3 */
Charulatha V37801b32011-02-24 12:51:46 -0800300static struct omap_hwmod omap2430_mcbsp3_hwmod = {
301 .name = "mcbsp3",
302 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800303 .main_clk = "mcbsp3_fck",
304 .prcm = {
305 .omap2 = {
306 .prcm_reg_id = 1,
307 .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
308 .module_offs = CORE_MOD,
309 .idlest_reg_id = 2,
310 .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
311 },
312 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600313 .opt_clks = mcbsp_opt_clks,
314 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800315};
316
317/* mcbsp4 */
Charulatha V37801b32011-02-24 12:51:46 -0800318static struct omap_hwmod omap2430_mcbsp4_hwmod = {
319 .name = "mcbsp4",
320 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800321 .main_clk = "mcbsp4_fck",
322 .prcm = {
323 .omap2 = {
324 .prcm_reg_id = 1,
325 .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
326 .module_offs = CORE_MOD,
327 .idlest_reg_id = 2,
328 .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
329 },
330 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600331 .opt_clks = mcbsp_opt_clks,
332 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800333};
334
335/* mcbsp5 */
Charulatha V37801b32011-02-24 12:51:46 -0800336static struct omap_hwmod omap2430_mcbsp5_hwmod = {
337 .name = "mcbsp5",
338 .class = &omap2430_mcbsp_hwmod_class,
Charulatha V37801b32011-02-24 12:51:46 -0800339 .main_clk = "mcbsp5_fck",
340 .prcm = {
341 .omap2 = {
342 .prcm_reg_id = 1,
343 .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
344 .module_offs = CORE_MOD,
345 .idlest_reg_id = 2,
346 .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
347 },
348 },
Peter Ujfalusidb382a82012-06-18 16:18:43 -0600349 .opt_clks = mcbsp_opt_clks,
350 .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
Charulatha V37801b32011-02-24 12:51:46 -0800351};
Tony Lindgren04aa67d2011-02-22 10:54:12 -0800352
Paul Walmsleybce06f32011-03-01 13:12:55 -0800353/* MMC/SD/SDIO common */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800354static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
355 .rev_offs = 0x1fc,
356 .sysc_offs = 0x10,
357 .syss_offs = 0x14,
358 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
359 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
360 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
361 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
362 .sysc_fields = &omap_hwmod_sysc_type1,
363};
364
365static struct omap_hwmod_class omap2430_mmc_class = {
366 .name = "mmc",
367 .sysc = &omap2430_mmc_sysc,
368};
369
370/* MMC/SD/SDIO1 */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800371static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
372 { .role = "dbck", .clk = "mmchsdb1_fck" },
373};
374
Andreas Fenkart55143432014-11-08 15:33:09 +0100375static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Kishore Kadiyala6ab89462011-03-01 13:12:56 -0800376 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
377};
378
Paul Walmsleybce06f32011-03-01 13:12:55 -0800379static struct omap_hwmod omap2430_mmc1_hwmod = {
380 .name = "mmc1",
381 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800382 .opt_clks = omap2430_mmc1_opt_clks,
383 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
384 .main_clk = "mmchs1_fck",
385 .prcm = {
386 .omap2 = {
387 .module_offs = CORE_MOD,
388 .prcm_reg_id = 2,
389 .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
390 .idlest_reg_id = 2,
391 .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
392 },
393 },
Kishore Kadiyala6ab89462011-03-01 13:12:56 -0800394 .dev_attr = &mmc1_dev_attr,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800395 .class = &omap2430_mmc_class,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800396};
397
398/* MMC/SD/SDIO2 */
Paul Walmsleybce06f32011-03-01 13:12:55 -0800399static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
400 { .role = "dbck", .clk = "mmchsdb2_fck" },
401};
402
Paul Walmsleybce06f32011-03-01 13:12:55 -0800403static struct omap_hwmod omap2430_mmc2_hwmod = {
404 .name = "mmc2",
405 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800406 .opt_clks = omap2430_mmc2_opt_clks,
407 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
408 .main_clk = "mmchs2_fck",
409 .prcm = {
410 .omap2 = {
411 .module_offs = CORE_MOD,
412 .prcm_reg_id = 2,
413 .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
414 .idlest_reg_id = 2,
415 .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
416 },
417 },
Paul Walmsleybce06f32011-03-01 13:12:55 -0800418 .class = &omap2430_mmc_class,
Paul Walmsleybce06f32011-03-01 13:12:55 -0800419};
Kevin Hilman046465b2010-09-27 20:19:30 +0530420
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600421/* HDQ1W/1-wire */
422static struct omap_hwmod omap2430_hdq1w_hwmod = {
423 .name = "hdq1w",
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600424 .main_clk = "hdq_fck",
425 .prcm = {
426 .omap2 = {
427 .module_offs = CORE_MOD,
428 .prcm_reg_id = 1,
429 .module_bit = OMAP24XX_EN_HDQ_SHIFT,
430 .idlest_reg_id = 1,
431 .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
432 },
433 },
434 .class = &omap2_hdq1w_class,
435};
436
Paul Walmsley844a3b62012-04-19 04:04:33 -0600437/*
438 * interfaces
439 */
440
441/* L3 -> L4_CORE interface */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600442/* l3_core -> usbhsotg interface */
443static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
444 .master = &omap2430_usbhsotg_hwmod,
Paul Walmsleycb484272012-04-19 04:04:33 -0600445 .slave = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600446 .clk = "core_l3_ck",
447 .user = OCP_USER_MPU,
448};
449
450/* L4 CORE -> I2C1 interface */
451static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600452 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600453 .slave = &omap2430_i2c1_hwmod,
454 .clk = "i2c1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600455 .user = OCP_USER_MPU | OCP_USER_SDMA,
456};
457
458/* L4 CORE -> I2C2 interface */
459static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600460 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600461 .slave = &omap2430_i2c2_hwmod,
462 .clk = "i2c2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600463 .user = OCP_USER_MPU | OCP_USER_SDMA,
464};
465
Paul Walmsley844a3b62012-04-19 04:04:33 -0600466/* l4_core ->usbhsotg interface */
467static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600468 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600469 .slave = &omap2430_usbhsotg_hwmod,
470 .clk = "usb_l4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600471 .user = OCP_USER_MPU,
472};
473
474/* L4 CORE -> MMC1 interface */
475static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600476 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600477 .slave = &omap2430_mmc1_hwmod,
478 .clk = "mmchs1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600479 .user = OCP_USER_MPU | OCP_USER_SDMA,
480};
481
482/* L4 CORE -> MMC2 interface */
483static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600484 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600485 .slave = &omap2430_mmc2_hwmod,
486 .clk = "mmchs2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600487 .user = OCP_USER_MPU | OCP_USER_SDMA,
488};
489
Paul Walmsley844a3b62012-04-19 04:04:33 -0600490/* l4 core -> mcspi3 interface */
491static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600492 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600493 .slave = &omap2430_mcspi3_hwmod,
494 .clk = "mcspi3_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600495 .user = OCP_USER_MPU | OCP_USER_SDMA,
496};
497
498/* IVA2 <- L3 interface */
499static struct omap_hwmod_ocp_if omap2430_l3__iva = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600500 .master = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600501 .slave = &omap2430_iva_hwmod,
Paul Walmsley3af35fb2012-04-19 04:04:38 -0600502 .clk = "core_l3_ck",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600503 .user = OCP_USER_MPU | OCP_USER_SDMA,
504};
505
Paul Walmsley844a3b62012-04-19 04:04:33 -0600506/* l4_wkup -> timer1 */
507static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600508 .master = &omap2xxx_l4_wkup_hwmod,
509 .slave = &omap2xxx_timer1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600510 .clk = "gpt1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600511 .user = OCP_USER_MPU | OCP_USER_SDMA,
512};
513
Paul Walmsley844a3b62012-04-19 04:04:33 -0600514/* l4_wkup -> wd_timer2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600515static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600516 .master = &omap2xxx_l4_wkup_hwmod,
517 .slave = &omap2xxx_wd_timer2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600518 .clk = "mpu_wdt_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600519 .user = OCP_USER_MPU | OCP_USER_SDMA,
520};
521
Paul Walmsley844a3b62012-04-19 04:04:33 -0600522/* l4_wkup -> gpio1 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600523static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600524 .master = &omap2xxx_l4_wkup_hwmod,
525 .slave = &omap2xxx_gpio1_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600526 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600527 .user = OCP_USER_MPU | OCP_USER_SDMA,
528};
529
530/* l4_wkup -> gpio2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600531static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600532 .master = &omap2xxx_l4_wkup_hwmod,
533 .slave = &omap2xxx_gpio2_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600534 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600535 .user = OCP_USER_MPU | OCP_USER_SDMA,
536};
537
538/* l4_wkup -> gpio3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600539static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600540 .master = &omap2xxx_l4_wkup_hwmod,
541 .slave = &omap2xxx_gpio3_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600542 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600543 .user = OCP_USER_MPU | OCP_USER_SDMA,
544};
545
546/* l4_wkup -> gpio4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600547static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600548 .master = &omap2xxx_l4_wkup_hwmod,
549 .slave = &omap2xxx_gpio4_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600550 .clk = "gpios_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600551 .user = OCP_USER_MPU | OCP_USER_SDMA,
552};
553
554/* l4_core -> gpio5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600555static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600556 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600557 .slave = &omap2430_gpio5_hwmod,
558 .clk = "gpio5_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600559 .user = OCP_USER_MPU | OCP_USER_SDMA,
560};
561
562/* dma_system -> L3 */
563static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
564 .master = &omap2430_dma_system_hwmod,
Paul Walmsleycb484272012-04-19 04:04:33 -0600565 .slave = &omap2xxx_l3_main_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600566 .clk = "core_l3_ck",
567 .user = OCP_USER_MPU | OCP_USER_SDMA,
568};
569
570/* l4_core -> dma_system */
571static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600572 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600573 .slave = &omap2430_dma_system_hwmod,
574 .clk = "sdma_ick",
575 .addr = omap2_dma_system_addrs,
576 .user = OCP_USER_MPU | OCP_USER_SDMA,
577};
578
579/* l4_core -> mailbox */
580static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600581 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600582 .slave = &omap2430_mailbox_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600583 .user = OCP_USER_MPU | OCP_USER_SDMA,
584};
585
586/* l4_core -> mcbsp1 */
587static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600588 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600589 .slave = &omap2430_mcbsp1_hwmod,
590 .clk = "mcbsp1_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600591 .user = OCP_USER_MPU | OCP_USER_SDMA,
592};
593
594/* l4_core -> mcbsp2 */
595static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600596 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600597 .slave = &omap2430_mcbsp2_hwmod,
598 .clk = "mcbsp2_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600599 .user = OCP_USER_MPU | OCP_USER_SDMA,
600};
601
Paul Walmsley844a3b62012-04-19 04:04:33 -0600602/* l4_core -> mcbsp3 */
603static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600604 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600605 .slave = &omap2430_mcbsp3_hwmod,
606 .clk = "mcbsp3_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600607 .user = OCP_USER_MPU | OCP_USER_SDMA,
608};
609
Paul Walmsley844a3b62012-04-19 04:04:33 -0600610/* l4_core -> mcbsp4 */
611static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600612 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600613 .slave = &omap2430_mcbsp4_hwmod,
614 .clk = "mcbsp4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600615 .user = OCP_USER_MPU | OCP_USER_SDMA,
616};
617
Paul Walmsley844a3b62012-04-19 04:04:33 -0600618/* l4_core -> mcbsp5 */
619static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
Paul Walmsleycb484272012-04-19 04:04:33 -0600620 .master = &omap2xxx_l4_core_hwmod,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600621 .slave = &omap2430_mcbsp5_hwmod,
622 .clk = "mcbsp5_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600623 .user = OCP_USER_MPU | OCP_USER_SDMA,
624};
625
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600626/* l4_core -> hdq1w */
627static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
628 .master = &omap2xxx_l4_core_hwmod,
629 .slave = &omap2430_hdq1w_hwmod,
630 .clk = "hdq_ick",
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600631 .user = OCP_USER_MPU | OCP_USER_SDMA,
632 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
633};
634
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600635/* l4_wkup -> 32ksync_counter */
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600636static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
637 .master = &omap2xxx_l4_wkup_hwmod,
638 .slave = &omap2xxx_counter_32k_hwmod,
639 .clk = "sync_32k_ick",
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600640 .user = OCP_USER_MPU | OCP_USER_SDMA,
641};
642
Afzal Mohammed49484a62012-09-23 17:28:24 -0600643static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
644 .master = &omap2xxx_l3_main_hwmod,
645 .slave = &omap2xxx_gpmc_hwmod,
646 .clk = "core_l3_ck",
Afzal Mohammed49484a62012-09-23 17:28:24 -0600647 .user = OCP_USER_MPU | OCP_USER_SDMA,
648};
649
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600650static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley6a297552012-04-19 04:04:34 -0600651 &omap2xxx_l3_main__l4_core,
652 &omap2xxx_mpu__l3_main,
653 &omap2xxx_dss__l3,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600654 &omap2430_usbhsotg__l3,
655 &omap2430_l4_core__i2c1,
656 &omap2430_l4_core__i2c2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600657 &omap2xxx_l4_core__l4_wkup,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600658 &omap2_l4_core__uart1,
659 &omap2_l4_core__uart2,
660 &omap2_l4_core__uart3,
661 &omap2430_l4_core__usbhsotg,
662 &omap2430_l4_core__mmc1,
663 &omap2430_l4_core__mmc2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600664 &omap2xxx_l4_core__mcspi1,
665 &omap2xxx_l4_core__mcspi2,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600666 &omap2430_l4_core__mcspi3,
667 &omap2430_l3__iva,
668 &omap2430_l4_wkup__timer1,
Paul Walmsley6a297552012-04-19 04:04:34 -0600669 &omap2xxx_l4_core__timer2,
670 &omap2xxx_l4_core__timer3,
671 &omap2xxx_l4_core__timer4,
672 &omap2xxx_l4_core__timer5,
673 &omap2xxx_l4_core__timer6,
674 &omap2xxx_l4_core__timer7,
675 &omap2xxx_l4_core__timer8,
676 &omap2xxx_l4_core__timer9,
677 &omap2xxx_l4_core__timer10,
678 &omap2xxx_l4_core__timer11,
679 &omap2xxx_l4_core__timer12,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600680 &omap2430_l4_wkup__wd_timer2,
Paul Walmsley6a297552012-04-19 04:04:34 -0600681 &omap2xxx_l4_core__dss,
682 &omap2xxx_l4_core__dss_dispc,
683 &omap2xxx_l4_core__dss_rfbi,
684 &omap2xxx_l4_core__dss_venc,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600685 &omap2430_l4_wkup__gpio1,
686 &omap2430_l4_wkup__gpio2,
687 &omap2430_l4_wkup__gpio3,
688 &omap2430_l4_wkup__gpio4,
689 &omap2430_l4_core__gpio5,
690 &omap2430_dma_system__l3,
691 &omap2430_l4_core__dma_system,
692 &omap2430_l4_core__mailbox,
693 &omap2430_l4_core__mcbsp1,
694 &omap2430_l4_core__mcbsp2,
695 &omap2430_l4_core__mcbsp3,
696 &omap2430_l4_core__mcbsp4,
697 &omap2430_l4_core__mcbsp5,
Paul Walmsleyf32bd772012-05-08 11:34:28 -0600698 &omap2430_l4_core__hdq1w,
Paul Walmsleye9b0a2f2012-09-23 17:28:25 -0600699 &omap2xxx_l4_core__rng,
Mark A. Greere569e992013-03-30 15:49:19 -0600700 &omap2xxx_l4_core__sham,
Mark A. Greer660ffd62012-12-21 09:28:09 -0700701 &omap2xxx_l4_core__aes,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -0600702 &omap2430_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -0600703 &omap2430_l3__gpmc,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300704 NULL,
705};
706
Paul Walmsley73591542010-02-22 22:09:32 -0700707int __init omap2430_hwmod_init(void)
708{
Kevin Hilman9ebfd282012-06-18 12:12:23 -0600709 omap_hwmod_init();
Paul Walmsley0a78c5c2012-04-19 04:04:31 -0600710 return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
Paul Walmsley73591542010-02-22 22:09:32 -0700711}