blob: c3276436b0aead51c20f6e158e5e4a8c01042718 [file] [log] [blame]
Paul Walmsley73591542010-02-22 22:09:32 -07001/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
3 *
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 Walmsley73591542010-02-22 22:09:32 -07006 * 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 * The data in this file should be completely autogeneratable from
13 * the TI hardware database or other technical documentation.
14 *
15 * XXX these should be marked initdata for multi-OMAP kernels
16 */
Tony Lindgren3a8761c2012-10-08 09:11:22 -070017
18#include <linux/i2c-omap.h>
Jean Pihetb86aeaf2012-04-25 16:06:20 +053019#include <linux/power/smartreflex.h>
Tony Lindgren4b254082012-08-30 15:37:24 -070020#include <linux/platform_data/gpio-omap.h>
Andreas Fenkart55143432014-11-08 15:33:09 +010021#include <linux/platform_data/hsmmc-omap.h>
Jean Pihetb86aeaf2012-04-25 16:06:20 +053022
Tony Lindgren45c3eb72012-11-30 08:41:50 -080023#include <linux/omap-dma.h>
Tony Lindgren79e3cb222012-09-20 11:42:04 -070024#include "l3_3xxx.h"
Tony Lindgren957988c2012-09-20 11:42:10 -070025#include "l4_3xxx.h"
Arnd Bergmann22037472012-08-24 15:21:06 +020026#include <linux/platform_data/asoc-ti-mcbsp.h>
27#include <linux/platform_data/spi-omap2-mcspi.h>
Thara Gopinathce722d22011-02-23 00:14:05 -070028#include <plat/dmtimer.h>
Paul Walmsley73591542010-02-22 22:09:32 -070029
Tony Lindgrendbc04162012-08-31 10:59:07 -070030#include "soc.h"
Tony Lindgren2a296c82012-10-02 17:41:35 -070031#include "omap_hwmod.h"
Paul Walmsley43b40992010-02-22 22:09:34 -070032#include "omap_hwmod_common_data.h"
Paul Walmsley73591542010-02-22 22:09:32 -070033#include "prm-regbits-34xx.h"
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +053034#include "cm-regbits-34xx.h"
Lokesh Vutlad5e7c862012-10-15 14:03:51 -070035
Tony Lindgren3a8761c2012-10-08 09:11:22 -070036#include "i2c.h"
Paul Walmsleyff2516f2010-12-21 15:39:15 -070037#include "wd_timer.h"
Tony Lindgren3d82cbb2012-10-15 12:50:46 -070038#include "serial.h"
Paul Walmsley73591542010-02-22 22:09:32 -070039
40/*
41 * OMAP3xxx hardware module integration data
42 *
Paul Walmsley844a3b62012-04-19 04:04:33 -060043 * All of the data in this section should be autogeneratable from the
Paul Walmsley73591542010-02-22 22:09:32 -070044 * TI hardware database or other technical documentation. Data that
45 * is driver-specific or driver-kernel integration-specific belongs
46 * elsewhere.
47 */
48
Tony Lindgren13eeb0f2015-01-13 09:00:38 -080049#define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000
50
Paul Walmsley844a3b62012-04-19 04:04:33 -060051/*
52 * IP blocks
53 */
Paul Walmsley73591542010-02-22 22:09:32 -070054
Paul Walmsley844a3b62012-04-19 04:04:33 -060055/* L3 */
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -080056
Paul Walmsley844a3b62012-04-19 04:04:33 -060057static struct omap_hwmod omap3xxx_l3_main_hwmod = {
58 .name = "l3_main",
59 .class = &l3_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -060060 .flags = HWMOD_NO_IDLEST,
61};
62
63/* L4 CORE */
64static struct omap_hwmod omap3xxx_l4_core_hwmod = {
65 .name = "l4_core",
66 .class = &l4_hwmod_class,
67 .flags = HWMOD_NO_IDLEST,
68};
69
70/* L4 PER */
71static struct omap_hwmod omap3xxx_l4_per_hwmod = {
72 .name = "l4_per",
73 .class = &l4_hwmod_class,
74 .flags = HWMOD_NO_IDLEST,
75};
76
77/* L4 WKUP */
78static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
79 .name = "l4_wkup",
80 .class = &l4_hwmod_class,
81 .flags = HWMOD_NO_IDLEST,
82};
83
84/* L4 SEC */
85static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
86 .name = "l4_sec",
87 .class = &l4_hwmod_class,
88 .flags = HWMOD_NO_IDLEST,
89};
90
91/* MPU */
Jon Hunteree75d952012-09-23 17:28:29 -060092
Paul Walmsley844a3b62012-04-19 04:04:33 -060093static struct omap_hwmod omap3xxx_mpu_hwmod = {
94 .name = "mpu",
95 .class = &mpu_hwmod_class,
96 .main_clk = "arm_fck",
97};
98
99/* IVA2 (IVA2) */
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600100static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
Tero Kristoed733612012-09-03 11:50:52 -0600101 { .name = "logic", .rst_shift = 0, .st_shift = 8 },
102 { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
103 { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600104};
105
Paul Walmsley844a3b62012-04-19 04:04:33 -0600106static struct omap_hwmod omap3xxx_iva_hwmod = {
107 .name = "iva",
108 .class = &iva_hwmod_class,
Paul Walmsleyf42c5492012-04-19 04:04:37 -0600109 .clkdm_name = "iva2_clkdm",
110 .rst_lines = omap3xxx_iva_resets,
111 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets),
112 .main_clk = "iva2_ck",
Tero Kristoed733612012-09-03 11:50:52 -0600113 .prcm = {
114 .omap2 = {
115 .module_offs = OMAP3430_IVA2_MOD,
116 .prcm_reg_id = 1,
117 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
118 .idlest_reg_id = 1,
119 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -0700120 },
Tero Kristoed733612012-09-03 11:50:52 -0600121 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600122};
123
Jon Hunterc7dad45f2012-09-23 17:28:28 -0600124/*
125 * 'debugss' class
126 * debug and emulation sub system
127 */
128
129static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
130 .name = "debugss",
131};
132
133/* debugss */
134static struct omap_hwmod omap3xxx_debugss_hwmod = {
135 .name = "debugss",
136 .class = &omap3xxx_debugss_hwmod_class,
137 .clkdm_name = "emu_clkdm",
138 .main_clk = "emu_src_ck",
139 .flags = HWMOD_NO_IDLEST,
140};
141
Paul Walmsley844a3b62012-04-19 04:04:33 -0600142/* timer class */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600143static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
144 .rev_offs = 0x0000,
145 .sysc_offs = 0x0010,
146 .syss_offs = 0x0014,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500147 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
148 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Jon Hunterf3a13e72012-08-28 12:55:27 -0500149 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
150 SYSS_HAS_RESET_STATUS),
Paul Walmsley844a3b62012-04-19 04:04:33 -0600151 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
152 .sysc_fields = &omap_hwmod_sysc_type1,
153};
154
155static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
156 .name = "timer",
157 .sysc = &omap3xxx_timer_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600158};
159
160/* secure timers dev attribute */
161static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
Jon Hunter139486f2012-06-05 12:34:53 -0500162 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600163};
164
165/* always-on timers dev attribute */
166static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
167 .timer_capability = OMAP_TIMER_ALWON,
168};
169
170/* pwm timers dev attribute */
171static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
172 .timer_capability = OMAP_TIMER_HAS_PWM,
173};
174
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600175/* timers with DSP interrupt dev attribute */
176static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
177 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
178};
179
180/* pwm timers with DSP interrupt dev attribute */
181static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
182 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
183};
184
Paul Walmsley844a3b62012-04-19 04:04:33 -0600185/* timer1 */
186static struct omap_hwmod omap3xxx_timer1_hwmod = {
187 .name = "timer1",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600188 .main_clk = "gpt1_fck",
189 .prcm = {
190 .omap2 = {
191 .prcm_reg_id = 1,
192 .module_bit = OMAP3430_EN_GPT1_SHIFT,
193 .module_offs = WKUP_MOD,
194 .idlest_reg_id = 1,
195 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
196 },
197 },
198 .dev_attr = &capability_alwon_dev_attr,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500199 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500200 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600201};
202
203/* timer2 */
204static struct omap_hwmod omap3xxx_timer2_hwmod = {
205 .name = "timer2",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600206 .main_clk = "gpt2_fck",
207 .prcm = {
208 .omap2 = {
209 .prcm_reg_id = 1,
210 .module_bit = OMAP3430_EN_GPT2_SHIFT,
211 .module_offs = OMAP3430_PER_MOD,
212 .idlest_reg_id = 1,
213 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
214 },
215 },
Jon Hunter725a8fe2012-08-28 12:49:39 -0500216 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500217 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600218};
219
220/* timer3 */
221static struct omap_hwmod omap3xxx_timer3_hwmod = {
222 .name = "timer3",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600223 .main_clk = "gpt3_fck",
224 .prcm = {
225 .omap2 = {
226 .prcm_reg_id = 1,
227 .module_bit = OMAP3430_EN_GPT3_SHIFT,
228 .module_offs = OMAP3430_PER_MOD,
229 .idlest_reg_id = 1,
230 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
231 },
232 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600233 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500234 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600235};
236
237/* timer4 */
238static struct omap_hwmod omap3xxx_timer4_hwmod = {
239 .name = "timer4",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600240 .main_clk = "gpt4_fck",
241 .prcm = {
242 .omap2 = {
243 .prcm_reg_id = 1,
244 .module_bit = OMAP3430_EN_GPT4_SHIFT,
245 .module_offs = OMAP3430_PER_MOD,
246 .idlest_reg_id = 1,
247 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
248 },
249 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600250 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500251 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600252};
253
254/* timer5 */
255static struct omap_hwmod omap3xxx_timer5_hwmod = {
256 .name = "timer5",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600257 .main_clk = "gpt5_fck",
258 .prcm = {
259 .omap2 = {
260 .prcm_reg_id = 1,
261 .module_bit = OMAP3430_EN_GPT5_SHIFT,
262 .module_offs = OMAP3430_PER_MOD,
263 .idlest_reg_id = 1,
264 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
265 },
266 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600267 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600268 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500269 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600270};
271
272/* timer6 */
273static struct omap_hwmod omap3xxx_timer6_hwmod = {
274 .name = "timer6",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600275 .main_clk = "gpt6_fck",
276 .prcm = {
277 .omap2 = {
278 .prcm_reg_id = 1,
279 .module_bit = OMAP3430_EN_GPT6_SHIFT,
280 .module_offs = OMAP3430_PER_MOD,
281 .idlest_reg_id = 1,
282 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
283 },
284 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600285 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600286 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500287 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600288};
289
290/* timer7 */
291static struct omap_hwmod omap3xxx_timer7_hwmod = {
292 .name = "timer7",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600293 .main_clk = "gpt7_fck",
294 .prcm = {
295 .omap2 = {
296 .prcm_reg_id = 1,
297 .module_bit = OMAP3430_EN_GPT7_SHIFT,
298 .module_offs = OMAP3430_PER_MOD,
299 .idlest_reg_id = 1,
300 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
301 },
302 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600303 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600304 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500305 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600306};
307
308/* timer8 */
309static struct omap_hwmod omap3xxx_timer8_hwmod = {
310 .name = "timer8",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600311 .main_clk = "gpt8_fck",
312 .prcm = {
313 .omap2 = {
314 .prcm_reg_id = 1,
315 .module_bit = OMAP3430_EN_GPT8_SHIFT,
316 .module_offs = OMAP3430_PER_MOD,
317 .idlest_reg_id = 1,
318 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
319 },
320 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600321 .dev_attr = &capability_dsp_pwm_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600322 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500323 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600324};
325
326/* timer9 */
327static struct omap_hwmod omap3xxx_timer9_hwmod = {
328 .name = "timer9",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600329 .main_clk = "gpt9_fck",
330 .prcm = {
331 .omap2 = {
332 .prcm_reg_id = 1,
333 .module_bit = OMAP3430_EN_GPT9_SHIFT,
334 .module_offs = OMAP3430_PER_MOD,
335 .idlest_reg_id = 1,
336 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
337 },
338 },
339 .dev_attr = &capability_pwm_dev_attr,
340 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500341 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600342};
343
344/* timer10 */
345static struct omap_hwmod omap3xxx_timer10_hwmod = {
346 .name = "timer10",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600347 .main_clk = "gpt10_fck",
348 .prcm = {
349 .omap2 = {
350 .prcm_reg_id = 1,
351 .module_bit = OMAP3430_EN_GPT10_SHIFT,
352 .module_offs = CORE_MOD,
353 .idlest_reg_id = 1,
354 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
355 },
356 },
357 .dev_attr = &capability_pwm_dev_attr,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500358 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500359 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600360};
361
362/* timer11 */
363static struct omap_hwmod omap3xxx_timer11_hwmod = {
364 .name = "timer11",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600365 .main_clk = "gpt11_fck",
366 .prcm = {
367 .omap2 = {
368 .prcm_reg_id = 1,
369 .module_bit = OMAP3430_EN_GPT11_SHIFT,
370 .module_offs = CORE_MOD,
371 .idlest_reg_id = 1,
372 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
373 },
374 },
375 .dev_attr = &capability_pwm_dev_attr,
376 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500377 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600378};
379
380/* timer12 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600381
382static struct omap_hwmod omap3xxx_timer12_hwmod = {
383 .name = "timer12",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600384 .main_clk = "gpt12_fck",
385 .prcm = {
386 .omap2 = {
387 .prcm_reg_id = 1,
388 .module_bit = OMAP3430_EN_GPT12_SHIFT,
389 .module_offs = WKUP_MOD,
390 .idlest_reg_id = 1,
391 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
392 },
393 },
394 .dev_attr = &capability_secure_dev_attr,
395 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500396 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600397};
398
399/*
400 * 'wd_timer' class
401 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
402 * overflow condition
403 */
404
405static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
406 .rev_offs = 0x0000,
407 .sysc_offs = 0x0010,
408 .syss_offs = 0x0014,
409 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
410 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
411 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
412 SYSS_HAS_RESET_STATUS),
413 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
414 .sysc_fields = &omap_hwmod_sysc_type1,
415};
416
417/* I2C common */
418static struct omap_hwmod_class_sysconfig i2c_sysc = {
419 .rev_offs = 0x00,
420 .sysc_offs = 0x20,
421 .syss_offs = 0x10,
422 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
423 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
424 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
425 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Paul Walmsley844a3b62012-04-19 04:04:33 -0600426 .sysc_fields = &omap_hwmod_sysc_type1,
427};
428
429static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
430 .name = "wd_timer",
431 .sysc = &omap3xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -0600432 .pre_shutdown = &omap2_wd_timer_disable,
433 .reset = &omap2_wd_timer_reset,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600434};
435
436static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
437 .name = "wd_timer2",
438 .class = &omap3xxx_wd_timer_hwmod_class,
439 .main_clk = "wdt2_fck",
440 .prcm = {
441 .omap2 = {
442 .prcm_reg_id = 1,
443 .module_bit = OMAP3430_EN_WDT2_SHIFT,
444 .module_offs = WKUP_MOD,
445 .idlest_reg_id = 1,
446 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
447 },
448 },
449 /*
450 * XXX: Use software supervised mode, HW supervised smartidle seems to
451 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
452 */
453 .flags = HWMOD_SWSUP_SIDLE,
454};
455
456/* UART1 */
457static struct omap_hwmod omap3xxx_uart1_hwmod = {
458 .name = "uart1",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600459 .main_clk = "uart1_fck",
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700460 .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600461 .prcm = {
462 .omap2 = {
463 .module_offs = CORE_MOD,
464 .prcm_reg_id = 1,
465 .module_bit = OMAP3430_EN_UART1_SHIFT,
466 .idlest_reg_id = 1,
467 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
468 },
469 },
470 .class = &omap2_uart_class,
471};
472
473/* UART2 */
474static struct omap_hwmod omap3xxx_uart2_hwmod = {
475 .name = "uart2",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600476 .main_clk = "uart2_fck",
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700477 .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600478 .prcm = {
479 .omap2 = {
480 .module_offs = CORE_MOD,
481 .prcm_reg_id = 1,
482 .module_bit = OMAP3430_EN_UART2_SHIFT,
483 .idlest_reg_id = 1,
484 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
485 },
486 },
487 .class = &omap2_uart_class,
488};
489
490/* UART3 */
491static struct omap_hwmod omap3xxx_uart3_hwmod = {
492 .name = "uart3",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600493 .main_clk = "uart3_fck",
Rajendra Nayak7dedd342013-07-28 23:01:48 -0600494 .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700495 HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600496 .prcm = {
497 .omap2 = {
498 .module_offs = OMAP3430_PER_MOD,
499 .prcm_reg_id = 1,
500 .module_bit = OMAP3430_EN_UART3_SHIFT,
501 .idlest_reg_id = 1,
502 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
503 },
504 },
505 .class = &omap2_uart_class,
506};
507
508/* UART4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600509
Paul Walmsley844a3b62012-04-19 04:04:33 -0600510
511static struct omap_hwmod omap36xx_uart4_hwmod = {
512 .name = "uart4",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600513 .main_clk = "uart4_fck",
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700514 .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600515 .prcm = {
516 .omap2 = {
517 .module_offs = OMAP3430_PER_MOD,
518 .prcm_reg_id = 1,
519 .module_bit = OMAP3630_EN_UART4_SHIFT,
520 .idlest_reg_id = 1,
521 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
522 },
523 },
524 .class = &omap2_uart_class,
525};
526
Paul Walmsley844a3b62012-04-19 04:04:33 -0600527
Paul Walmsley844a3b62012-04-19 04:04:33 -0600528
Paul Walmsley82ee6202012-06-27 14:53:46 -0600529/*
530 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
531 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
532 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
533 * should not be needed. The functional clock structure of the AM35xx
534 * UART4 is extremely unclear and opaque; it is unclear what the role
535 * of uart1/2_fck is for the UART4. Any clarification from either
536 * empirical testing or the AM3505/3517 hardware designers would be
537 * most welcome.
538 */
539static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
540 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
541};
542
Paul Walmsley844a3b62012-04-19 04:04:33 -0600543static struct omap_hwmod am35xx_uart4_hwmod = {
544 .name = "uart4",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600545 .main_clk = "uart4_fck",
546 .prcm = {
547 .omap2 = {
548 .module_offs = CORE_MOD,
549 .prcm_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600550 .module_bit = AM35XX_EN_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600551 .idlest_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600552 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600553 },
554 },
Paul Walmsley82ee6202012-06-27 14:53:46 -0600555 .opt_clks = am35xx_uart4_opt_clks,
556 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
557 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600558 .class = &omap2_uart_class,
559};
560
561static struct omap_hwmod_class i2c_class = {
562 .name = "i2c",
563 .sysc = &i2c_sysc,
564 .rev = OMAP_I2C_IP_VERSION_1,
565 .reset = &omap_i2c_reset,
566};
567
568static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
569 { .name = "dispc", .dma_req = 5 },
570 { .name = "dsi1", .dma_req = 74 },
Tony Lindgrend9d9cec2016-10-21 03:02:12 -0700571 { .dma_req = -1, },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600572};
573
574/* dss */
575static struct omap_hwmod_opt_clk dss_opt_clks[] = {
576 /*
577 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
578 * driver does not use these clocks.
579 */
580 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
581 { .role = "tv_clk", .clk = "dss_tv_fck" },
582 /* required only on OMAP3430 */
583 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
584};
585
586static struct omap_hwmod omap3430es1_dss_core_hwmod = {
587 .name = "dss_core",
588 .class = &omap2_dss_hwmod_class,
589 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
590 .sdma_reqs = omap3xxx_dss_sdma_chs,
591 .prcm = {
592 .omap2 = {
593 .prcm_reg_id = 1,
594 .module_bit = OMAP3430_EN_DSS1_SHIFT,
595 .module_offs = OMAP3430_DSS_MOD,
596 .idlest_reg_id = 1,
597 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
598 },
599 },
600 .opt_clks = dss_opt_clks,
601 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
602 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
603};
604
605static struct omap_hwmod omap3xxx_dss_core_hwmod = {
606 .name = "dss_core",
607 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
608 .class = &omap2_dss_hwmod_class,
609 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
610 .sdma_reqs = omap3xxx_dss_sdma_chs,
611 .prcm = {
612 .omap2 = {
613 .prcm_reg_id = 1,
614 .module_bit = OMAP3430_EN_DSS1_SHIFT,
615 .module_offs = OMAP3430_DSS_MOD,
616 .idlest_reg_id = 1,
617 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
618 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
619 },
620 },
621 .opt_clks = dss_opt_clks,
622 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
623};
624
625/*
626 * 'dispc' class
627 * display controller
628 */
629
630static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
631 .rev_offs = 0x0000,
632 .sysc_offs = 0x0010,
633 .syss_offs = 0x0014,
634 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
635 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
636 SYSC_HAS_ENAWAKEUP),
637 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
638 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
639 .sysc_fields = &omap_hwmod_sysc_type1,
640};
641
642static struct omap_hwmod_class omap3_dispc_hwmod_class = {
643 .name = "dispc",
644 .sysc = &omap3_dispc_sysc,
645};
646
647static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
648 .name = "dss_dispc",
649 .class = &omap3_dispc_hwmod_class,
650 .mpu_irqs = omap2_dispc_irqs,
651 .main_clk = "dss1_alwon_fck",
652 .prcm = {
653 .omap2 = {
654 .prcm_reg_id = 1,
655 .module_bit = OMAP3430_EN_DSS1_SHIFT,
656 .module_offs = OMAP3430_DSS_MOD,
657 },
658 },
659 .flags = HWMOD_NO_IDLEST,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -0700660 .dev_attr = &omap2_3_dss_dispc_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600661};
662
663/*
664 * 'dsi' class
665 * display serial interface controller
666 */
667
Sebastian Reichelb46211d2016-06-24 03:59:33 +0200668static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
669 .rev_offs = 0x0000,
670 .sysc_offs = 0x0010,
671 .syss_offs = 0x0014,
672 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
673 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
674 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
675 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
676 .sysc_fields = &omap_hwmod_sysc_type1,
677};
678
Paul Walmsley844a3b62012-04-19 04:04:33 -0600679static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
680 .name = "dsi",
Sebastian Reichelb46211d2016-06-24 03:59:33 +0200681 .sysc = &omap3xxx_dsi_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600682};
683
Paul Walmsley844a3b62012-04-19 04:04:33 -0600684/* dss_dsi1 */
685static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
686 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
687};
688
689static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
690 .name = "dss_dsi1",
691 .class = &omap3xxx_dsi_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600692 .main_clk = "dss1_alwon_fck",
693 .prcm = {
694 .omap2 = {
695 .prcm_reg_id = 1,
696 .module_bit = OMAP3430_EN_DSS1_SHIFT,
697 .module_offs = OMAP3430_DSS_MOD,
698 },
699 },
700 .opt_clks = dss_dsi1_opt_clks,
701 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
702 .flags = HWMOD_NO_IDLEST,
703};
704
705static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
706 { .role = "ick", .clk = "dss_ick" },
707};
708
709static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
710 .name = "dss_rfbi",
711 .class = &omap2_rfbi_hwmod_class,
712 .main_clk = "dss1_alwon_fck",
713 .prcm = {
714 .omap2 = {
715 .prcm_reg_id = 1,
716 .module_bit = OMAP3430_EN_DSS1_SHIFT,
717 .module_offs = OMAP3430_DSS_MOD,
718 },
719 },
720 .opt_clks = dss_rfbi_opt_clks,
721 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
722 .flags = HWMOD_NO_IDLEST,
723};
724
725static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
726 /* required only on OMAP3430 */
727 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
728};
729
730static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
731 .name = "dss_venc",
732 .class = &omap2_venc_hwmod_class,
733 .main_clk = "dss_tv_fck",
734 .prcm = {
735 .omap2 = {
736 .prcm_reg_id = 1,
737 .module_bit = OMAP3430_EN_DSS1_SHIFT,
738 .module_offs = OMAP3430_DSS_MOD,
739 },
740 },
741 .opt_clks = dss_venc_opt_clks,
742 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
743 .flags = HWMOD_NO_IDLEST,
744};
745
746/* I2C1 */
747static struct omap_i2c_dev_attr i2c1_dev_attr = {
748 .fifo_depth = 8, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530749 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600750};
751
752static struct omap_hwmod omap3xxx_i2c1_hwmod = {
753 .name = "i2c1",
754 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600755 .main_clk = "i2c1_fck",
756 .prcm = {
757 .omap2 = {
758 .module_offs = CORE_MOD,
759 .prcm_reg_id = 1,
760 .module_bit = OMAP3430_EN_I2C1_SHIFT,
761 .idlest_reg_id = 1,
762 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
763 },
764 },
765 .class = &i2c_class,
766 .dev_attr = &i2c1_dev_attr,
767};
768
769/* I2C2 */
770static struct omap_i2c_dev_attr i2c2_dev_attr = {
771 .fifo_depth = 8, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530772 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600773};
774
775static struct omap_hwmod omap3xxx_i2c2_hwmod = {
776 .name = "i2c2",
777 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600778 .main_clk = "i2c2_fck",
779 .prcm = {
780 .omap2 = {
781 .module_offs = CORE_MOD,
782 .prcm_reg_id = 1,
783 .module_bit = OMAP3430_EN_I2C2_SHIFT,
784 .idlest_reg_id = 1,
785 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
786 },
787 },
788 .class = &i2c_class,
789 .dev_attr = &i2c2_dev_attr,
790};
791
792/* I2C3 */
793static struct omap_i2c_dev_attr i2c3_dev_attr = {
794 .fifo_depth = 64, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530795 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600796};
797
Paul Walmsley844a3b62012-04-19 04:04:33 -0600798
Paul Walmsley844a3b62012-04-19 04:04:33 -0600799
800static struct omap_hwmod omap3xxx_i2c3_hwmod = {
801 .name = "i2c3",
802 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600803 .main_clk = "i2c3_fck",
804 .prcm = {
805 .omap2 = {
806 .module_offs = CORE_MOD,
807 .prcm_reg_id = 1,
808 .module_bit = OMAP3430_EN_I2C3_SHIFT,
809 .idlest_reg_id = 1,
810 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
811 },
812 },
813 .class = &i2c_class,
814 .dev_attr = &i2c3_dev_attr,
815};
816
817/*
818 * 'gpio' class
819 * general purpose io module
820 */
821
822static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
823 .rev_offs = 0x0000,
824 .sysc_offs = 0x0010,
825 .syss_offs = 0x0014,
826 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
827 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
828 SYSS_HAS_RESET_STATUS),
829 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
830 .sysc_fields = &omap_hwmod_sysc_type1,
831};
832
833static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
834 .name = "gpio",
835 .sysc = &omap3xxx_gpio_sysc,
836 .rev = 1,
837};
838
839/* gpio_dev_attr */
840static struct omap_gpio_dev_attr gpio_dev_attr = {
841 .bank_width = 32,
842 .dbck_flag = true,
843};
844
845/* gpio1 */
846static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
847 { .role = "dbclk", .clk = "gpio1_dbck", },
848};
849
850static struct omap_hwmod omap3xxx_gpio1_hwmod = {
851 .name = "gpio1",
852 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600853 .main_clk = "gpio1_ick",
854 .opt_clks = gpio1_opt_clks,
855 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
856 .prcm = {
857 .omap2 = {
858 .prcm_reg_id = 1,
859 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
860 .module_offs = WKUP_MOD,
861 .idlest_reg_id = 1,
862 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
863 },
864 },
865 .class = &omap3xxx_gpio_hwmod_class,
866 .dev_attr = &gpio_dev_attr,
867};
868
869/* gpio2 */
870static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
871 { .role = "dbclk", .clk = "gpio2_dbck", },
872};
873
874static struct omap_hwmod omap3xxx_gpio2_hwmod = {
875 .name = "gpio2",
876 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600877 .main_clk = "gpio2_ick",
878 .opt_clks = gpio2_opt_clks,
879 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
880 .prcm = {
881 .omap2 = {
882 .prcm_reg_id = 1,
883 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
884 .module_offs = OMAP3430_PER_MOD,
885 .idlest_reg_id = 1,
886 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
887 },
888 },
889 .class = &omap3xxx_gpio_hwmod_class,
890 .dev_attr = &gpio_dev_attr,
891};
892
893/* gpio3 */
894static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
895 { .role = "dbclk", .clk = "gpio3_dbck", },
896};
897
898static struct omap_hwmod omap3xxx_gpio3_hwmod = {
899 .name = "gpio3",
900 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600901 .main_clk = "gpio3_ick",
902 .opt_clks = gpio3_opt_clks,
903 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
904 .prcm = {
905 .omap2 = {
906 .prcm_reg_id = 1,
907 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
908 .module_offs = OMAP3430_PER_MOD,
909 .idlest_reg_id = 1,
910 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
911 },
912 },
913 .class = &omap3xxx_gpio_hwmod_class,
914 .dev_attr = &gpio_dev_attr,
915};
916
917/* gpio4 */
918static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
919 { .role = "dbclk", .clk = "gpio4_dbck", },
920};
921
922static struct omap_hwmod omap3xxx_gpio4_hwmod = {
923 .name = "gpio4",
924 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600925 .main_clk = "gpio4_ick",
926 .opt_clks = gpio4_opt_clks,
927 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
928 .prcm = {
929 .omap2 = {
930 .prcm_reg_id = 1,
931 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
932 .module_offs = OMAP3430_PER_MOD,
933 .idlest_reg_id = 1,
934 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
935 },
936 },
937 .class = &omap3xxx_gpio_hwmod_class,
938 .dev_attr = &gpio_dev_attr,
939};
940
941/* gpio5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600942
943static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
944 { .role = "dbclk", .clk = "gpio5_dbck", },
945};
946
947static struct omap_hwmod omap3xxx_gpio5_hwmod = {
948 .name = "gpio5",
949 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600950 .main_clk = "gpio5_ick",
951 .opt_clks = gpio5_opt_clks,
952 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
953 .prcm = {
954 .omap2 = {
955 .prcm_reg_id = 1,
956 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
957 .module_offs = OMAP3430_PER_MOD,
958 .idlest_reg_id = 1,
959 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
960 },
961 },
962 .class = &omap3xxx_gpio_hwmod_class,
963 .dev_attr = &gpio_dev_attr,
964};
965
966/* gpio6 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600967
968static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
969 { .role = "dbclk", .clk = "gpio6_dbck", },
970};
971
972static struct omap_hwmod omap3xxx_gpio6_hwmod = {
973 .name = "gpio6",
974 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600975 .main_clk = "gpio6_ick",
976 .opt_clks = gpio6_opt_clks,
977 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
978 .prcm = {
979 .omap2 = {
980 .prcm_reg_id = 1,
981 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
982 .module_offs = OMAP3430_PER_MOD,
983 .idlest_reg_id = 1,
984 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
985 },
986 },
987 .class = &omap3xxx_gpio_hwmod_class,
988 .dev_attr = &gpio_dev_attr,
989};
990
991/* dma attributes */
992static struct omap_dma_dev_attr dma_dev_attr = {
993 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
994 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
995 .lch_count = 32,
996};
997
998static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
999 .rev_offs = 0x0000,
1000 .sysc_offs = 0x002c,
1001 .syss_offs = 0x0028,
1002 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1003 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1004 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
1005 SYSS_HAS_RESET_STATUS),
1006 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1007 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1008 .sysc_fields = &omap_hwmod_sysc_type1,
1009};
1010
1011static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1012 .name = "dma",
1013 .sysc = &omap3xxx_dma_sysc,
1014};
1015
1016/* dma_system */
1017static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1018 .name = "dma",
1019 .class = &omap3xxx_dma_hwmod_class,
1020 .mpu_irqs = omap2_dma_system_irqs,
1021 .main_clk = "core_l3_ick",
1022 .prcm = {
1023 .omap2 = {
1024 .module_offs = CORE_MOD,
1025 .prcm_reg_id = 1,
1026 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1027 .idlest_reg_id = 1,
1028 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1029 },
1030 },
1031 .dev_attr = &dma_dev_attr,
1032 .flags = HWMOD_NO_IDLEST,
1033};
1034
1035/*
1036 * 'mcbsp' class
1037 * multi channel buffered serial port controller
1038 */
1039
1040static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1041 .sysc_offs = 0x008c,
1042 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1043 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1044 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1045 .sysc_fields = &omap_hwmod_sysc_type1,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001046};
1047
1048static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1049 .name = "mcbsp",
1050 .sysc = &omap3xxx_mcbsp_sysc,
1051 .rev = MCBSP_CONFIG_TYPE3,
1052};
1053
Peter Ujfalusi70391542012-06-18 16:18:43 -06001054/* McBSP functional clock mapping */
1055static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1056 { .role = "pad_fck", .clk = "mcbsp_clks" },
1057 { .role = "prcm_fck", .clk = "core_96m_fck" },
1058};
1059
1060static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1061 { .role = "pad_fck", .clk = "mcbsp_clks" },
1062 { .role = "prcm_fck", .clk = "per_96m_fck" },
1063};
1064
Paul Walmsley844a3b62012-04-19 04:04:33 -06001065/* mcbsp1 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001066
1067static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1068 .name = "mcbsp1",
1069 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001070 .main_clk = "mcbsp1_fck",
1071 .prcm = {
1072 .omap2 = {
1073 .prcm_reg_id = 1,
1074 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1075 .module_offs = CORE_MOD,
1076 .idlest_reg_id = 1,
1077 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1078 },
1079 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001080 .opt_clks = mcbsp15_opt_clks,
1081 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001082};
1083
1084/* mcbsp2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001085
1086static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1087 .sidetone = "mcbsp2_sidetone",
1088};
1089
1090static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1091 .name = "mcbsp2",
1092 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001093 .main_clk = "mcbsp2_fck",
1094 .prcm = {
1095 .omap2 = {
1096 .prcm_reg_id = 1,
1097 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1098 .module_offs = OMAP3430_PER_MOD,
1099 .idlest_reg_id = 1,
1100 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1101 },
1102 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001103 .opt_clks = mcbsp234_opt_clks,
1104 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001105 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1106};
1107
1108/* mcbsp3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001109
1110static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1111 .sidetone = "mcbsp3_sidetone",
1112};
1113
1114static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1115 .name = "mcbsp3",
1116 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001117 .main_clk = "mcbsp3_fck",
1118 .prcm = {
1119 .omap2 = {
1120 .prcm_reg_id = 1,
1121 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1122 .module_offs = OMAP3430_PER_MOD,
1123 .idlest_reg_id = 1,
1124 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1125 },
1126 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001127 .opt_clks = mcbsp234_opt_clks,
1128 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001129 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1130};
1131
1132/* mcbsp4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001133
Paul Walmsley844a3b62012-04-19 04:04:33 -06001134
1135static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1136 .name = "mcbsp4",
1137 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001138 .main_clk = "mcbsp4_fck",
1139 .prcm = {
1140 .omap2 = {
1141 .prcm_reg_id = 1,
1142 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1143 .module_offs = OMAP3430_PER_MOD,
1144 .idlest_reg_id = 1,
1145 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1146 },
1147 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001148 .opt_clks = mcbsp234_opt_clks,
1149 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001150};
1151
1152/* mcbsp5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001153
Paul Walmsley844a3b62012-04-19 04:04:33 -06001154
1155static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1156 .name = "mcbsp5",
1157 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001158 .main_clk = "mcbsp5_fck",
1159 .prcm = {
1160 .omap2 = {
1161 .prcm_reg_id = 1,
1162 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1163 .module_offs = CORE_MOD,
1164 .idlest_reg_id = 1,
1165 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1166 },
1167 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001168 .opt_clks = mcbsp15_opt_clks,
1169 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001170};
1171
1172/* 'mcbsp sidetone' class */
1173static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1174 .sysc_offs = 0x0010,
1175 .sysc_flags = SYSC_HAS_AUTOIDLE,
1176 .sysc_fields = &omap_hwmod_sysc_type1,
1177};
1178
1179static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1180 .name = "mcbsp_sidetone",
1181 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1182};
1183
1184/* mcbsp2_sidetone */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001185
1186static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1187 .name = "mcbsp2_sidetone",
1188 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
Peter Ujfalusi3b80c9b2016-05-30 11:23:45 +03001189 .main_clk = "mcbsp2_ick",
1190 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001191};
1192
1193/* mcbsp3_sidetone */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001194
1195static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1196 .name = "mcbsp3_sidetone",
1197 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
Peter Ujfalusi3b80c9b2016-05-30 11:23:45 +03001198 .main_clk = "mcbsp3_ick",
1199 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001200};
1201
1202/* SR common */
1203static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1204 .clkact_shift = 20,
1205};
1206
1207static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1208 .sysc_offs = 0x24,
1209 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001210 .sysc_fields = &omap34xx_sr_sysc_fields,
1211};
1212
1213static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1214 .name = "smartreflex",
1215 .sysc = &omap34xx_sr_sysc,
1216 .rev = 1,
1217};
1218
1219static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1220 .sidle_shift = 24,
1221 .enwkup_shift = 26,
1222};
1223
1224static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1225 .sysc_offs = 0x38,
1226 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1227 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1228 SYSC_NO_CACHE),
1229 .sysc_fields = &omap36xx_sr_sysc_fields,
1230};
1231
1232static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1233 .name = "smartreflex",
1234 .sysc = &omap36xx_sr_sysc,
1235 .rev = 2,
1236};
1237
1238/* SR1 */
1239static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1240 .sensor_voltdm_name = "mpu_iva",
1241};
1242
Paul Walmsley844a3b62012-04-19 04:04:33 -06001243
1244static struct omap_hwmod omap34xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301245 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001246 .class = &omap34xx_smartreflex_hwmod_class,
1247 .main_clk = "sr1_fck",
1248 .prcm = {
1249 .omap2 = {
1250 .prcm_reg_id = 1,
1251 .module_bit = OMAP3430_EN_SR1_SHIFT,
1252 .module_offs = WKUP_MOD,
1253 .idlest_reg_id = 1,
1254 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1255 },
1256 },
1257 .dev_attr = &sr1_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001258 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1259};
1260
1261static struct omap_hwmod omap36xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301262 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001263 .class = &omap36xx_smartreflex_hwmod_class,
1264 .main_clk = "sr1_fck",
1265 .prcm = {
1266 .omap2 = {
1267 .prcm_reg_id = 1,
1268 .module_bit = OMAP3430_EN_SR1_SHIFT,
1269 .module_offs = WKUP_MOD,
1270 .idlest_reg_id = 1,
1271 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1272 },
1273 },
1274 .dev_attr = &sr1_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001275};
1276
1277/* SR2 */
1278static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1279 .sensor_voltdm_name = "core",
1280};
1281
Paul Walmsley844a3b62012-04-19 04:04:33 -06001282
1283static struct omap_hwmod omap34xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301284 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001285 .class = &omap34xx_smartreflex_hwmod_class,
1286 .main_clk = "sr2_fck",
1287 .prcm = {
1288 .omap2 = {
1289 .prcm_reg_id = 1,
1290 .module_bit = OMAP3430_EN_SR2_SHIFT,
1291 .module_offs = WKUP_MOD,
1292 .idlest_reg_id = 1,
1293 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1294 },
1295 },
1296 .dev_attr = &sr2_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001297 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1298};
1299
1300static struct omap_hwmod omap36xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301301 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001302 .class = &omap36xx_smartreflex_hwmod_class,
1303 .main_clk = "sr2_fck",
1304 .prcm = {
1305 .omap2 = {
1306 .prcm_reg_id = 1,
1307 .module_bit = OMAP3430_EN_SR2_SHIFT,
1308 .module_offs = WKUP_MOD,
1309 .idlest_reg_id = 1,
1310 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1311 },
1312 },
1313 .dev_attr = &sr2_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001314};
1315
1316/*
1317 * 'mailbox' class
1318 * mailbox module allowing communication between the on-chip processors
1319 * using a queued mailbox-interrupt mechanism.
1320 */
1321
1322static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1323 .rev_offs = 0x000,
1324 .sysc_offs = 0x010,
1325 .syss_offs = 0x014,
1326 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1327 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1328 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1329 .sysc_fields = &omap_hwmod_sysc_type1,
1330};
1331
1332static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1333 .name = "mailbox",
1334 .sysc = &omap3xxx_mailbox_sysc,
1335};
1336
Paul Walmsley844a3b62012-04-19 04:04:33 -06001337static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1338 .name = "mailbox",
1339 .class = &omap3xxx_mailbox_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001340 .main_clk = "mailboxes_ick",
1341 .prcm = {
1342 .omap2 = {
1343 .prcm_reg_id = 1,
1344 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1345 .module_offs = CORE_MOD,
1346 .idlest_reg_id = 1,
1347 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1348 },
1349 },
1350};
1351
1352/*
1353 * 'mcspi' class
1354 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1355 * bus
1356 */
1357
1358static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1359 .rev_offs = 0x0000,
1360 .sysc_offs = 0x0010,
1361 .syss_offs = 0x0014,
1362 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1363 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1364 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1365 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1366 .sysc_fields = &omap_hwmod_sysc_type1,
1367};
1368
1369static struct omap_hwmod_class omap34xx_mcspi_class = {
1370 .name = "mcspi",
1371 .sysc = &omap34xx_mcspi_sysc,
1372 .rev = OMAP3_MCSPI_REV,
1373};
1374
1375/* mcspi1 */
1376static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1377 .num_chipselect = 4,
1378};
1379
1380static struct omap_hwmod omap34xx_mcspi1 = {
1381 .name = "mcspi1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001382 .main_clk = "mcspi1_fck",
1383 .prcm = {
1384 .omap2 = {
1385 .module_offs = CORE_MOD,
1386 .prcm_reg_id = 1,
1387 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1388 .idlest_reg_id = 1,
1389 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1390 },
1391 },
1392 .class = &omap34xx_mcspi_class,
1393 .dev_attr = &omap_mcspi1_dev_attr,
1394};
1395
1396/* mcspi2 */
1397static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1398 .num_chipselect = 2,
1399};
1400
1401static struct omap_hwmod omap34xx_mcspi2 = {
1402 .name = "mcspi2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001403 .main_clk = "mcspi2_fck",
1404 .prcm = {
1405 .omap2 = {
1406 .module_offs = CORE_MOD,
1407 .prcm_reg_id = 1,
1408 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1409 .idlest_reg_id = 1,
1410 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1411 },
1412 },
1413 .class = &omap34xx_mcspi_class,
1414 .dev_attr = &omap_mcspi2_dev_attr,
1415};
1416
1417/* mcspi3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001418
Paul Walmsley844a3b62012-04-19 04:04:33 -06001419
1420static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1421 .num_chipselect = 2,
1422};
1423
1424static struct omap_hwmod omap34xx_mcspi3 = {
1425 .name = "mcspi3",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001426 .main_clk = "mcspi3_fck",
1427 .prcm = {
1428 .omap2 = {
1429 .module_offs = CORE_MOD,
1430 .prcm_reg_id = 1,
1431 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1432 .idlest_reg_id = 1,
1433 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1434 },
1435 },
1436 .class = &omap34xx_mcspi_class,
1437 .dev_attr = &omap_mcspi3_dev_attr,
1438};
1439
1440/* mcspi4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001441
Paul Walmsley844a3b62012-04-19 04:04:33 -06001442
1443static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1444 .num_chipselect = 1,
1445};
1446
1447static struct omap_hwmod omap34xx_mcspi4 = {
1448 .name = "mcspi4",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001449 .main_clk = "mcspi4_fck",
1450 .prcm = {
1451 .omap2 = {
1452 .module_offs = CORE_MOD,
1453 .prcm_reg_id = 1,
1454 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1455 .idlest_reg_id = 1,
1456 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1457 },
1458 },
1459 .class = &omap34xx_mcspi_class,
1460 .dev_attr = &omap_mcspi4_dev_attr,
1461};
1462
1463/* usbhsotg */
1464static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1465 .rev_offs = 0x0400,
1466 .sysc_offs = 0x0404,
1467 .syss_offs = 0x0408,
1468 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1469 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1470 SYSC_HAS_AUTOIDLE),
1471 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1472 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1473 .sysc_fields = &omap_hwmod_sysc_type1,
1474};
1475
1476static struct omap_hwmod_class usbotg_class = {
1477 .name = "usbotg",
1478 .sysc = &omap3xxx_usbhsotg_sysc,
1479};
1480
1481/* usb_otg_hs */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001482
1483static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1484 .name = "usb_otg_hs",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001485 .main_clk = "hsotgusb_ick",
1486 .prcm = {
1487 .omap2 = {
1488 .prcm_reg_id = 1,
1489 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1490 .module_offs = CORE_MOD,
1491 .idlest_reg_id = 1,
1492 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001493 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001494 },
1495 },
1496 .class = &usbotg_class,
1497
1498 /*
1499 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1500 * broken when autoidle is enabled
1501 * workaround is to disable the autoidle bit at module level.
Grazvydas Ignotas092bc082013-03-11 21:49:00 +02001502 *
1503 * Enabling the device in any other MIDLEMODE setting but force-idle
1504 * causes core_pwrdm not enter idle states at least on OMAP3630.
1505 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1506 * signal when MIDLEMODE is set to force-idle.
Paul Walmsley844a3b62012-04-19 04:04:33 -06001507 */
Tony Lindgren6a08b112014-09-18 08:58:28 -07001508 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
1509 HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001510};
1511
1512/* usb_otg_hs */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001513
1514static struct omap_hwmod_class am35xx_usbotg_class = {
1515 .name = "am35xx_usbotg",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001516};
1517
1518static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1519 .name = "am35x_otg_hs",
Paul Walmsley89ea2582012-06-27 14:53:46 -06001520 .main_clk = "hsotgusb_fck",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001521 .class = &am35xx_usbotg_class,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001522 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001523};
1524
1525/* MMC/SD/SDIO common */
1526static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1527 .rev_offs = 0x1fc,
1528 .sysc_offs = 0x10,
1529 .syss_offs = 0x14,
1530 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1531 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1532 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1533 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1534 .sysc_fields = &omap_hwmod_sysc_type1,
1535};
1536
1537static struct omap_hwmod_class omap34xx_mmc_class = {
1538 .name = "mmc",
1539 .sysc = &omap34xx_mmc_sysc,
1540};
1541
1542/* MMC/SD/SDIO1 */
1543
Paul Walmsley844a3b62012-04-19 04:04:33 -06001544
Paul Walmsley844a3b62012-04-19 04:04:33 -06001545
1546static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1547 { .role = "dbck", .clk = "omap_32k_fck", },
1548};
1549
Andreas Fenkart55143432014-11-08 15:33:09 +01001550static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001551 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1552};
1553
1554/* See 35xx errata 2.1.1.128 in SPRZ278F */
Andreas Fenkart55143432014-11-08 15:33:09 +01001555static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001556 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1557 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1558};
1559
1560static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1561 .name = "mmc1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001562 .opt_clks = omap34xx_mmc1_opt_clks,
1563 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1564 .main_clk = "mmchs1_fck",
1565 .prcm = {
1566 .omap2 = {
1567 .module_offs = CORE_MOD,
1568 .prcm_reg_id = 1,
1569 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1570 .idlest_reg_id = 1,
1571 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1572 },
1573 },
1574 .dev_attr = &mmc1_pre_es3_dev_attr,
1575 .class = &omap34xx_mmc_class,
1576};
1577
1578static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1579 .name = "mmc1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001580 .opt_clks = omap34xx_mmc1_opt_clks,
1581 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1582 .main_clk = "mmchs1_fck",
1583 .prcm = {
1584 .omap2 = {
1585 .module_offs = CORE_MOD,
1586 .prcm_reg_id = 1,
1587 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1588 .idlest_reg_id = 1,
1589 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1590 },
1591 },
1592 .dev_attr = &mmc1_dev_attr,
1593 .class = &omap34xx_mmc_class,
1594};
1595
1596/* MMC/SD/SDIO2 */
1597
Paul Walmsley844a3b62012-04-19 04:04:33 -06001598
Paul Walmsley844a3b62012-04-19 04:04:33 -06001599
1600static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1601 { .role = "dbck", .clk = "omap_32k_fck", },
1602};
1603
1604/* See 35xx errata 2.1.1.128 in SPRZ278F */
Andreas Fenkart55143432014-11-08 15:33:09 +01001605static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001606 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1607};
1608
1609static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1610 .name = "mmc2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001611 .opt_clks = omap34xx_mmc2_opt_clks,
1612 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1613 .main_clk = "mmchs2_fck",
1614 .prcm = {
1615 .omap2 = {
1616 .module_offs = CORE_MOD,
1617 .prcm_reg_id = 1,
1618 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1619 .idlest_reg_id = 1,
1620 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1621 },
1622 },
1623 .dev_attr = &mmc2_pre_es3_dev_attr,
1624 .class = &omap34xx_mmc_class,
1625};
1626
1627static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1628 .name = "mmc2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001629 .opt_clks = omap34xx_mmc2_opt_clks,
1630 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1631 .main_clk = "mmchs2_fck",
1632 .prcm = {
1633 .omap2 = {
1634 .module_offs = CORE_MOD,
1635 .prcm_reg_id = 1,
1636 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1637 .idlest_reg_id = 1,
1638 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1639 },
1640 },
1641 .class = &omap34xx_mmc_class,
1642};
1643
1644/* MMC/SD/SDIO3 */
1645
Paul Walmsley844a3b62012-04-19 04:04:33 -06001646
Paul Walmsley844a3b62012-04-19 04:04:33 -06001647
1648static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1649 { .role = "dbck", .clk = "omap_32k_fck", },
1650};
1651
1652static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1653 .name = "mmc3",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001654 .opt_clks = omap34xx_mmc3_opt_clks,
1655 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1656 .main_clk = "mmchs3_fck",
1657 .prcm = {
1658 .omap2 = {
1659 .prcm_reg_id = 1,
1660 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1661 .idlest_reg_id = 1,
1662 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1663 },
1664 },
1665 .class = &omap34xx_mmc_class,
1666};
1667
1668/*
1669 * 'usb_host_hs' class
1670 * high-speed multi-port usb host controller
1671 */
1672
1673static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1674 .rev_offs = 0x0000,
1675 .sysc_offs = 0x0010,
1676 .syss_offs = 0x0014,
1677 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1678 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
Roger Quadros7f4d3642013-12-08 18:39:02 -07001679 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1680 SYSS_HAS_RESET_STATUS),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001681 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1682 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1683 .sysc_fields = &omap_hwmod_sysc_type1,
1684};
1685
1686static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1687 .name = "usb_host_hs",
1688 .sysc = &omap3xxx_usb_host_hs_sysc,
1689};
1690
Paul Walmsley844a3b62012-04-19 04:04:33 -06001691
1692static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1693 .name = "usb_host_hs",
1694 .class = &omap3xxx_usb_host_hs_hwmod_class,
Roger Quadrosc6c56692014-04-10 10:18:17 +03001695 .clkdm_name = "usbhost_clkdm",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001696 .main_clk = "usbhost_48m_fck",
1697 .prcm = {
1698 .omap2 = {
1699 .module_offs = OMAP3430ES2_USBHOST_MOD,
1700 .prcm_reg_id = 1,
1701 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1702 .idlest_reg_id = 1,
1703 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1704 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1705 },
1706 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001707
1708 /*
1709 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1710 * id: i660
1711 *
1712 * Description:
1713 * In the following configuration :
1714 * - USBHOST module is set to smart-idle mode
1715 * - PRCM asserts idle_req to the USBHOST module ( This typically
1716 * happens when the system is going to a low power mode : all ports
1717 * have been suspended, the master part of the USBHOST module has
1718 * entered the standby state, and SW has cut the functional clocks)
1719 * - an USBHOST interrupt occurs before the module is able to answer
1720 * idle_ack, typically a remote wakeup IRQ.
1721 * Then the USB HOST module will enter a deadlock situation where it
1722 * is no more accessible nor functional.
1723 *
1724 * Workaround:
1725 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1726 */
1727
1728 /*
1729 * Errata: USB host EHCI may stall when entering smart-standby mode
1730 * Id: i571
1731 *
1732 * Description:
1733 * When the USBHOST module is set to smart-standby mode, and when it is
1734 * ready to enter the standby state (i.e. all ports are suspended and
1735 * all attached devices are in suspend mode), then it can wrongly assert
1736 * the Mstandby signal too early while there are still some residual OCP
1737 * transactions ongoing. If this condition occurs, the internal state
1738 * machine may go to an undefined state and the USB link may be stuck
1739 * upon the next resume.
1740 *
1741 * Workaround:
1742 * Don't use smart standby; use only force standby,
1743 * hence HWMOD_SWSUP_MSTANDBY
1744 */
1745
Roger Quadros7f4d3642013-12-08 18:39:02 -07001746 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001747};
1748
1749/*
1750 * 'usb_tll_hs' class
1751 * usb_tll_hs module is the adapter on the usb_host_hs ports
1752 */
1753static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1754 .rev_offs = 0x0000,
1755 .sysc_offs = 0x0010,
1756 .syss_offs = 0x0014,
1757 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1758 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1759 SYSC_HAS_AUTOIDLE),
1760 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1761 .sysc_fields = &omap_hwmod_sysc_type1,
1762};
1763
1764static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1765 .name = "usb_tll_hs",
1766 .sysc = &omap3xxx_usb_tll_hs_sysc,
1767};
1768
Paul Walmsley844a3b62012-04-19 04:04:33 -06001769
1770static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1771 .name = "usb_tll_hs",
1772 .class = &omap3xxx_usb_tll_hs_hwmod_class,
Roger Quadrosc6c56692014-04-10 10:18:17 +03001773 .clkdm_name = "core_l4_clkdm",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001774 .main_clk = "usbtll_fck",
1775 .prcm = {
1776 .omap2 = {
1777 .module_offs = CORE_MOD,
1778 .prcm_reg_id = 3,
1779 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1780 .idlest_reg_id = 3,
1781 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1782 },
1783 },
1784};
1785
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001786static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1787 .name = "hdq1w",
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001788 .main_clk = "hdq_fck",
1789 .prcm = {
1790 .omap2 = {
1791 .module_offs = CORE_MOD,
1792 .prcm_reg_id = 1,
1793 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1794 .idlest_reg_id = 1,
1795 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1796 },
1797 },
1798 .class = &omap2_hdq1w_class,
1799};
1800
Tero Kristo8f993a02012-09-23 17:28:21 -06001801/* SAD2D */
1802static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
1803 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
1804 { .name = "rst_modem_sw", .rst_shift = 1 },
1805};
1806
1807static struct omap_hwmod_class omap3xxx_sad2d_class = {
1808 .name = "sad2d",
1809};
1810
1811static struct omap_hwmod omap3xxx_sad2d_hwmod = {
1812 .name = "sad2d",
1813 .rst_lines = omap3xxx_sad2d_resets,
1814 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
1815 .main_clk = "sad2d_ick",
1816 .prcm = {
1817 .omap2 = {
1818 .module_offs = CORE_MOD,
1819 .prcm_reg_id = 1,
1820 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
1821 .idlest_reg_id = 1,
1822 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
1823 },
1824 },
1825 .class = &omap3xxx_sad2d_class,
1826};
1827
Paul Walmsley844a3b62012-04-19 04:04:33 -06001828/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06001829 * '32K sync counter' class
1830 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1831 */
1832static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
1833 .rev_offs = 0x0000,
1834 .sysc_offs = 0x0004,
1835 .sysc_flags = SYSC_HAS_SIDLEMODE,
1836 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
1837 .sysc_fields = &omap_hwmod_sysc_type1,
1838};
1839
1840static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
1841 .name = "counter",
1842 .sysc = &omap3xxx_counter_sysc,
1843};
1844
1845static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
1846 .name = "counter_32k",
1847 .class = &omap3xxx_counter_hwmod_class,
1848 .clkdm_name = "wkup_clkdm",
1849 .flags = HWMOD_SWSUP_SIDLE,
1850 .main_clk = "wkup_32k_fck",
1851 .prcm = {
1852 .omap2 = {
1853 .module_offs = WKUP_MOD,
1854 .prcm_reg_id = 1,
1855 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
1856 .idlest_reg_id = 1,
1857 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
1858 },
1859 },
1860};
1861
Paul Walmsley844a3b62012-04-19 04:04:33 -06001862/*
Afzal Mohammed49484a62012-09-23 17:28:24 -06001863 * 'gpmc' class
1864 * general purpose memory controller
1865 */
1866
1867static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
1868 .rev_offs = 0x0000,
1869 .sysc_offs = 0x0010,
1870 .syss_offs = 0x0014,
1871 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1872 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1873 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1874 .sysc_fields = &omap_hwmod_sysc_type1,
1875};
1876
1877static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
1878 .name = "gpmc",
1879 .sysc = &omap3xxx_gpmc_sysc,
1880};
1881
Afzal Mohammed49484a62012-09-23 17:28:24 -06001882static struct omap_hwmod omap3xxx_gpmc_hwmod = {
1883 .name = "gpmc",
1884 .class = &omap3xxx_gpmc_hwmod_class,
1885 .clkdm_name = "core_l3_clkdm",
Afzal Mohammed49484a62012-09-23 17:28:24 -06001886 .main_clk = "gpmc_fck",
Tony Lindgren63aa9452015-06-01 19:22:10 -06001887 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1888 .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
Afzal Mohammed49484a62012-09-23 17:28:24 -06001889};
1890
1891/*
Paul Walmsley844a3b62012-04-19 04:04:33 -06001892 * interfaces
1893 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05301894
Paul Walmsley73591542010-02-22 22:09:32 -07001895/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001896static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1897 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001898 .slave = &omap3xxx_l4_core_hwmod,
1899 .user = OCP_USER_MPU | OCP_USER_SDMA,
1900};
1901
1902/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001903static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1904 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001905 .slave = &omap3xxx_l4_per_hwmod,
1906 .user = OCP_USER_MPU | OCP_USER_SDMA,
1907};
1908
sricharan4bb194d2011-02-08 22:13:37 +05301909
Paul Walmsley73591542010-02-22 22:09:32 -07001910/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001911static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05301912 .master = &omap3xxx_mpu_hwmod,
1913 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001914 .user = OCP_USER_MPU,
1915};
1916
Jon Hunterc7dad45f2012-09-23 17:28:28 -06001917
1918/* l3 -> debugss */
1919static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
1920 .master = &omap3xxx_l3_main_hwmod,
1921 .slave = &omap3xxx_debugss_hwmod,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06001922 .user = OCP_USER_MPU,
1923};
1924
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001925/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06001926static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
1927 .master = &omap3430es1_dss_core_hwmod,
1928 .slave = &omap3xxx_l3_main_hwmod,
1929 .user = OCP_USER_MPU | OCP_USER_SDMA,
1930};
1931
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001932static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
1933 .master = &omap3xxx_dss_core_hwmod,
1934 .slave = &omap3xxx_l3_main_hwmod,
1935 .fw = {
1936 .omap2 = {
1937 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
1938 .flags = OMAP_FIREWALL_L3,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001939 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001940 },
1941 .user = OCP_USER_MPU | OCP_USER_SDMA,
1942};
1943
Hema HK870ea2b2011-02-17 12:07:18 +05301944/* l3_core -> usbhsotg interface */
1945static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
1946 .master = &omap3xxx_usbhsotg_hwmod,
1947 .slave = &omap3xxx_l3_main_hwmod,
1948 .clk = "core_l3_ick",
1949 .user = OCP_USER_MPU,
1950};
Paul Walmsley73591542010-02-22 22:09:32 -07001951
Hema HK273ff8c2011-02-17 12:07:19 +05301952/* l3_core -> am35xx_usbhsotg interface */
1953static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
1954 .master = &am35xx_usbhsotg_hwmod,
1955 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001956 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05301957 .user = OCP_USER_MPU,
1958};
Paul Walmsley89ea2582012-06-27 14:53:46 -06001959
Tero Kristo8f993a02012-09-23 17:28:21 -06001960/* l3_core -> sad2d interface */
1961static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
1962 .master = &omap3xxx_sad2d_hwmod,
1963 .slave = &omap3xxx_l3_main_hwmod,
1964 .clk = "core_l3_ick",
1965 .user = OCP_USER_MPU,
1966};
1967
Paul Walmsley73591542010-02-22 22:09:32 -07001968/* L4_CORE -> L4_WKUP interface */
1969static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
1970 .master = &omap3xxx_l4_core_hwmod,
1971 .slave = &omap3xxx_l4_wkup_hwmod,
1972 .user = OCP_USER_MPU | OCP_USER_SDMA,
1973};
1974
Paul Walmsleyb1636052011-03-01 13:12:56 -08001975/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001976static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08001977 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001978 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
1979 .clk = "mmchs1_ick",
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001980 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001981 .flags = OMAP_FIREWALL_L4,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001982};
1983
1984static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
1985 .master = &omap3xxx_l4_core_hwmod,
1986 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001987 .clk = "mmchs1_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08001988 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001989 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001990};
1991
1992/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001993static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08001994 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001995 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
1996 .clk = "mmchs2_ick",
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001997 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001998 .flags = OMAP_FIREWALL_L4,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001999};
2000
2001static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
2002 .master = &omap3xxx_l4_core_hwmod,
2003 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002004 .clk = "mmchs2_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08002005 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002006 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002007};
2008
2009/* L4 CORE -> MMC3 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -08002010
2011static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2012 .master = &omap3xxx_l4_core_hwmod,
2013 .slave = &omap3xxx_mmc3_hwmod,
2014 .clk = "mmchs3_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08002015 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002016 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08002017};
2018
Kevin Hilman046465b2010-09-27 20:19:30 +05302019/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302020
2021static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2022 .master = &omap3xxx_l4_core_hwmod,
2023 .slave = &omap3xxx_uart1_hwmod,
2024 .clk = "uart1_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302025 .user = OCP_USER_MPU | OCP_USER_SDMA,
2026};
2027
2028/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302029
2030static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2031 .master = &omap3xxx_l4_core_hwmod,
2032 .slave = &omap3xxx_uart2_hwmod,
2033 .clk = "uart2_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302034 .user = OCP_USER_MPU | OCP_USER_SDMA,
2035};
2036
2037/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302038
2039static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2040 .master = &omap3xxx_l4_per_hwmod,
2041 .slave = &omap3xxx_uart3_hwmod,
2042 .clk = "uart3_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302043 .user = OCP_USER_MPU | OCP_USER_SDMA,
2044};
2045
2046/* L4 PER -> UART4 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302047
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002048static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302049 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002050 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302051 .clk = "uart4_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302052 .user = OCP_USER_MPU | OCP_USER_SDMA,
2053};
2054
Kyle Manna4bf90f62011-10-18 13:47:41 -05002055/* AM35xx: L4 CORE -> UART4 interface */
Kyle Manna4bf90f62011-10-18 13:47:41 -05002056
2057static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002058 .master = &omap3xxx_l4_core_hwmod,
2059 .slave = &am35xx_uart4_hwmod,
2060 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002061 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002062};
2063
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302064/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302065static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2066 .master = &omap3xxx_l4_core_hwmod,
2067 .slave = &omap3xxx_i2c1_hwmod,
2068 .clk = "i2c1_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302069 .fw = {
2070 .omap2 = {
2071 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2072 .l4_prot_group = 7,
2073 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002074 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302075 },
2076 .user = OCP_USER_MPU | OCP_USER_SDMA,
2077};
2078
2079/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302080static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2081 .master = &omap3xxx_l4_core_hwmod,
2082 .slave = &omap3xxx_i2c2_hwmod,
2083 .clk = "i2c2_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302084 .fw = {
2085 .omap2 = {
2086 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2087 .l4_prot_group = 7,
2088 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002089 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302090 },
2091 .user = OCP_USER_MPU | OCP_USER_SDMA,
2092};
2093
2094/* L4 CORE -> I2C3 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302095
2096static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2097 .master = &omap3xxx_l4_core_hwmod,
2098 .slave = &omap3xxx_i2c3_hwmod,
2099 .clk = "i2c3_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302100 .fw = {
2101 .omap2 = {
2102 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2103 .l4_prot_group = 7,
2104 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002105 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302106 },
2107 .user = OCP_USER_MPU | OCP_USER_SDMA,
2108};
2109
Thara Gopinathd3442722010-05-29 22:02:24 +05302110/* L4 CORE -> SR1 interface */
Tony Lindgren17912502017-02-14 10:26:03 -08002111static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
2112 {
2113 .pa_start = OMAP34XX_SR1_BASE,
2114 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
2115 .flags = ADDR_TYPE_RT,
2116 },
2117 { },
2118};
Thara Gopinathd3442722010-05-29 22:02:24 +05302119
Paul Walmsley844a3b62012-04-19 04:04:33 -06002120static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302121 .master = &omap3xxx_l4_core_hwmod,
2122 .slave = &omap34xx_sr1_hwmod,
2123 .clk = "sr_l4_ick",
Tony Lindgren17912502017-02-14 10:26:03 -08002124 .addr = omap3_sr1_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302125 .user = OCP_USER_MPU,
2126};
2127
Paul Walmsley844a3b62012-04-19 04:04:33 -06002128static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2129 .master = &omap3xxx_l4_core_hwmod,
2130 .slave = &omap36xx_sr1_hwmod,
2131 .clk = "sr_l4_ick",
Tony Lindgren17912502017-02-14 10:26:03 -08002132 .addr = omap3_sr1_addr_space,
Paul Walmsley844a3b62012-04-19 04:04:33 -06002133 .user = OCP_USER_MPU,
2134};
2135
Thara Gopinathd3442722010-05-29 22:02:24 +05302136/* L4 CORE -> SR1 interface */
Tony Lindgren17912502017-02-14 10:26:03 -08002137static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
2138 {
2139 .pa_start = OMAP34XX_SR2_BASE,
2140 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
2141 .flags = ADDR_TYPE_RT,
2142 },
2143 { },
2144};
Thara Gopinathd3442722010-05-29 22:02:24 +05302145
Paul Walmsley844a3b62012-04-19 04:04:33 -06002146static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302147 .master = &omap3xxx_l4_core_hwmod,
2148 .slave = &omap34xx_sr2_hwmod,
2149 .clk = "sr_l4_ick",
Tony Lindgren17912502017-02-14 10:26:03 -08002150 .addr = omap3_sr2_addr_space,
Thara Gopinathd3442722010-05-29 22:02:24 +05302151 .user = OCP_USER_MPU,
2152};
2153
Paul Walmsley844a3b62012-04-19 04:04:33 -06002154static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2155 .master = &omap3xxx_l4_core_hwmod,
2156 .slave = &omap36xx_sr2_hwmod,
2157 .clk = "sr_l4_ick",
Tony Lindgren17912502017-02-14 10:26:03 -08002158 .addr = omap3_sr2_addr_space,
Paul Walmsley844a3b62012-04-19 04:04:33 -06002159 .user = OCP_USER_MPU,
2160};
Hema HK870ea2b2011-02-17 12:07:18 +05302161
Hema HK870ea2b2011-02-17 12:07:18 +05302162
2163/* l4_core -> usbhsotg */
2164static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2165 .master = &omap3xxx_l4_core_hwmod,
2166 .slave = &omap3xxx_usbhsotg_hwmod,
2167 .clk = "l4_ick",
Hema HK870ea2b2011-02-17 12:07:18 +05302168 .user = OCP_USER_MPU,
2169};
2170
Hema HK273ff8c2011-02-17 12:07:19 +05302171
2172/* l4_core -> usbhsotg */
2173static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2174 .master = &omap3xxx_l4_core_hwmod,
2175 .slave = &am35xx_usbhsotg_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002176 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302177 .user = OCP_USER_MPU,
2178};
2179
Paul Walmsley43085702012-04-19 04:03:53 -06002180/* L4_WKUP -> L4_SEC interface */
2181static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2182 .master = &omap3xxx_l4_wkup_hwmod,
2183 .slave = &omap3xxx_l4_sec_hwmod,
2184 .user = OCP_USER_MPU | OCP_USER_SDMA,
2185};
2186
Kevin Hilman540064b2010-07-26 16:34:32 -06002187/* IVA2 <- L3 interface */
2188static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2189 .master = &omap3xxx_l3_main_hwmod,
2190 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002191 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002192 .user = OCP_USER_MPU | OCP_USER_SDMA,
2193};
2194
Thara Gopinathce722d22011-02-23 00:14:05 -07002195
2196/* l4_wkup -> timer1 */
2197static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2198 .master = &omap3xxx_l4_wkup_hwmod,
2199 .slave = &omap3xxx_timer1_hwmod,
2200 .clk = "gpt1_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002201 .user = OCP_USER_MPU | OCP_USER_SDMA,
2202};
2203
Thara Gopinathce722d22011-02-23 00:14:05 -07002204
2205/* l4_per -> timer2 */
2206static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2207 .master = &omap3xxx_l4_per_hwmod,
2208 .slave = &omap3xxx_timer2_hwmod,
2209 .clk = "gpt2_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002210 .user = OCP_USER_MPU | OCP_USER_SDMA,
2211};
2212
Thara Gopinathce722d22011-02-23 00:14:05 -07002213
2214/* l4_per -> timer3 */
2215static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2216 .master = &omap3xxx_l4_per_hwmod,
2217 .slave = &omap3xxx_timer3_hwmod,
2218 .clk = "gpt3_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002219 .user = OCP_USER_MPU | OCP_USER_SDMA,
2220};
2221
Thara Gopinathce722d22011-02-23 00:14:05 -07002222
2223/* l4_per -> timer4 */
2224static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2225 .master = &omap3xxx_l4_per_hwmod,
2226 .slave = &omap3xxx_timer4_hwmod,
2227 .clk = "gpt4_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002228 .user = OCP_USER_MPU | OCP_USER_SDMA,
2229};
2230
Thara Gopinathce722d22011-02-23 00:14:05 -07002231
2232/* l4_per -> timer5 */
2233static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2234 .master = &omap3xxx_l4_per_hwmod,
2235 .slave = &omap3xxx_timer5_hwmod,
2236 .clk = "gpt5_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002237 .user = OCP_USER_MPU | OCP_USER_SDMA,
2238};
2239
Thara Gopinathce722d22011-02-23 00:14:05 -07002240
2241/* l4_per -> timer6 */
2242static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2243 .master = &omap3xxx_l4_per_hwmod,
2244 .slave = &omap3xxx_timer6_hwmod,
2245 .clk = "gpt6_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002246 .user = OCP_USER_MPU | OCP_USER_SDMA,
2247};
2248
Thara Gopinathce722d22011-02-23 00:14:05 -07002249
2250/* l4_per -> timer7 */
2251static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2252 .master = &omap3xxx_l4_per_hwmod,
2253 .slave = &omap3xxx_timer7_hwmod,
2254 .clk = "gpt7_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002255 .user = OCP_USER_MPU | OCP_USER_SDMA,
2256};
2257
Thara Gopinathce722d22011-02-23 00:14:05 -07002258
2259/* l4_per -> timer8 */
2260static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2261 .master = &omap3xxx_l4_per_hwmod,
2262 .slave = &omap3xxx_timer8_hwmod,
2263 .clk = "gpt8_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002264 .user = OCP_USER_MPU | OCP_USER_SDMA,
2265};
2266
Thara Gopinathce722d22011-02-23 00:14:05 -07002267
2268/* l4_per -> timer9 */
2269static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2270 .master = &omap3xxx_l4_per_hwmod,
2271 .slave = &omap3xxx_timer9_hwmod,
2272 .clk = "gpt9_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002273 .user = OCP_USER_MPU | OCP_USER_SDMA,
2274};
2275
Thara Gopinathce722d22011-02-23 00:14:05 -07002276/* l4_core -> timer10 */
2277static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2278 .master = &omap3xxx_l4_core_hwmod,
2279 .slave = &omap3xxx_timer10_hwmod,
2280 .clk = "gpt10_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002281 .user = OCP_USER_MPU | OCP_USER_SDMA,
2282};
2283
Thara Gopinathce722d22011-02-23 00:14:05 -07002284/* l4_core -> timer11 */
2285static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2286 .master = &omap3xxx_l4_core_hwmod,
2287 .slave = &omap3xxx_timer11_hwmod,
2288 .clk = "gpt11_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002289 .user = OCP_USER_MPU | OCP_USER_SDMA,
2290};
2291
Thara Gopinathce722d22011-02-23 00:14:05 -07002292
2293/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002294static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2295 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002296 .slave = &omap3xxx_timer12_hwmod,
2297 .clk = "gpt12_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002298 .user = OCP_USER_MPU | OCP_USER_SDMA,
2299};
2300
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302301/* l4_wkup -> wd_timer2 */
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302302
2303static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2304 .master = &omap3xxx_l4_wkup_hwmod,
2305 .slave = &omap3xxx_wd_timer2_hwmod,
2306 .clk = "wdt2_ick",
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302307 .user = OCP_USER_MPU | OCP_USER_SDMA,
2308};
2309
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002310/* l4_core -> dss */
2311static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2312 .master = &omap3xxx_l4_core_hwmod,
2313 .slave = &omap3430es1_dss_core_hwmod,
2314 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002315 .fw = {
2316 .omap2 = {
2317 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2318 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2319 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002320 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002321 },
2322 .user = OCP_USER_MPU | OCP_USER_SDMA,
2323};
2324
2325static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2326 .master = &omap3xxx_l4_core_hwmod,
2327 .slave = &omap3xxx_dss_core_hwmod,
2328 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002329 .fw = {
2330 .omap2 = {
2331 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2332 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2333 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002334 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002335 },
2336 .user = OCP_USER_MPU | OCP_USER_SDMA,
2337};
2338
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002339/* l4_core -> dss_dispc */
2340static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2341 .master = &omap3xxx_l4_core_hwmod,
2342 .slave = &omap3xxx_dss_dispc_hwmod,
2343 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002344 .fw = {
2345 .omap2 = {
2346 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2347 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2348 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002349 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002350 },
2351 .user = OCP_USER_MPU | OCP_USER_SDMA,
2352};
2353
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002354/* l4_core -> dss_dsi1 */
2355static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2356 .master = &omap3xxx_l4_core_hwmod,
2357 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002358 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002359 .fw = {
2360 .omap2 = {
2361 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2362 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2363 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002364 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002365 },
2366 .user = OCP_USER_MPU | OCP_USER_SDMA,
2367};
2368
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002369/* l4_core -> dss_rfbi */
2370static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2371 .master = &omap3xxx_l4_core_hwmod,
2372 .slave = &omap3xxx_dss_rfbi_hwmod,
2373 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002374 .fw = {
2375 .omap2 = {
2376 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2377 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2378 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002379 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002380 },
2381 .user = OCP_USER_MPU | OCP_USER_SDMA,
2382};
2383
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002384/* l4_core -> dss_venc */
2385static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2386 .master = &omap3xxx_l4_core_hwmod,
2387 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002388 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002389 .fw = {
2390 .omap2 = {
2391 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2392 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2393 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002394 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002395 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002396 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002397 .user = OCP_USER_MPU | OCP_USER_SDMA,
2398};
2399
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002400/* l4_wkup -> gpio1 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002401
2402static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2403 .master = &omap3xxx_l4_wkup_hwmod,
2404 .slave = &omap3xxx_gpio1_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002405 .user = OCP_USER_MPU | OCP_USER_SDMA,
2406};
2407
2408/* l4_per -> gpio2 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002409
2410static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2411 .master = &omap3xxx_l4_per_hwmod,
2412 .slave = &omap3xxx_gpio2_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002413 .user = OCP_USER_MPU | OCP_USER_SDMA,
2414};
2415
2416/* l4_per -> gpio3 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002417
2418static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2419 .master = &omap3xxx_l4_per_hwmod,
2420 .slave = &omap3xxx_gpio3_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002421 .user = OCP_USER_MPU | OCP_USER_SDMA,
2422};
2423
Paul Walmsley54864742012-09-23 17:28:23 -06002424/*
2425 * 'mmu' class
2426 * The memory management unit performs virtual to physical address translation
2427 * for its requestors.
2428 */
2429
2430static struct omap_hwmod_class_sysconfig mmu_sysc = {
2431 .rev_offs = 0x000,
2432 .sysc_offs = 0x010,
2433 .syss_offs = 0x014,
2434 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2435 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2436 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2437 .sysc_fields = &omap_hwmod_sysc_type1,
2438};
2439
2440static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2441 .name = "mmu",
2442 .sysc = &mmu_sysc,
2443};
2444
2445/* mmu isp */
Paul Walmsley54864742012-09-23 17:28:23 -06002446static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
Paul Walmsley54864742012-09-23 17:28:23 -06002447
2448/* l4_core -> mmu isp */
2449static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2450 .master = &omap3xxx_l4_core_hwmod,
2451 .slave = &omap3xxx_mmu_isp_hwmod,
Paul Walmsley54864742012-09-23 17:28:23 -06002452 .user = OCP_USER_MPU | OCP_USER_SDMA,
2453};
2454
2455static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
2456 .name = "mmu_isp",
2457 .class = &omap3xxx_mmu_hwmod_class,
Paul Walmsley54864742012-09-23 17:28:23 -06002458 .main_clk = "cam_ick",
Paul Walmsley54864742012-09-23 17:28:23 -06002459 .flags = HWMOD_NO_IDLEST,
2460};
2461
Paul Walmsley54864742012-09-23 17:28:23 -06002462/* mmu iva */
2463
Paul Walmsley54864742012-09-23 17:28:23 -06002464static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
Paul Walmsley54864742012-09-23 17:28:23 -06002465
2466static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
2467 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
2468};
2469
Paul Walmsley54864742012-09-23 17:28:23 -06002470/* l3_main -> iva mmu */
2471static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
2472 .master = &omap3xxx_l3_main_hwmod,
2473 .slave = &omap3xxx_mmu_iva_hwmod,
Paul Walmsley54864742012-09-23 17:28:23 -06002474 .user = OCP_USER_MPU | OCP_USER_SDMA,
2475};
2476
2477static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
2478 .name = "mmu_iva",
2479 .class = &omap3xxx_mmu_hwmod_class,
Suman Anna200a2742014-03-05 18:24:11 -06002480 .clkdm_name = "iva2_clkdm",
Paul Walmsley54864742012-09-23 17:28:23 -06002481 .rst_lines = omap3xxx_mmu_iva_resets,
2482 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
2483 .main_clk = "iva2_ck",
2484 .prcm = {
2485 .omap2 = {
2486 .module_offs = OMAP3430_IVA2_MOD,
Suman Anna200a2742014-03-05 18:24:11 -06002487 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
2488 .idlest_reg_id = 1,
2489 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
Paul Walmsley54864742012-09-23 17:28:23 -06002490 },
2491 },
Paul Walmsley54864742012-09-23 17:28:23 -06002492 .flags = HWMOD_NO_IDLEST,
2493};
2494
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002495/* l4_per -> gpio4 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002496
2497static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2498 .master = &omap3xxx_l4_per_hwmod,
2499 .slave = &omap3xxx_gpio4_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002500 .user = OCP_USER_MPU | OCP_USER_SDMA,
2501};
2502
2503/* l4_per -> gpio5 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002504
2505static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2506 .master = &omap3xxx_l4_per_hwmod,
2507 .slave = &omap3xxx_gpio5_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002508 .user = OCP_USER_MPU | OCP_USER_SDMA,
2509};
2510
2511/* l4_per -> gpio6 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002512
2513static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2514 .master = &omap3xxx_l4_per_hwmod,
2515 .slave = &omap3xxx_gpio6_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002516 .user = OCP_USER_MPU | OCP_USER_SDMA,
2517};
2518
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002519/* dma_system -> L3 */
2520static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2521 .master = &omap3xxx_dma_system_hwmod,
2522 .slave = &omap3xxx_l3_main_hwmod,
2523 .clk = "core_l3_ick",
2524 .user = OCP_USER_MPU | OCP_USER_SDMA,
2525};
2526
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002527static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2528 {
2529 .pa_start = 0x48056000,
Benoit Cousson1286eeb2011-04-19 10:15:36 -06002530 .pa_end = 0x48056fff,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002531 .flags = ADDR_TYPE_RT,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002532 },
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002533 { },
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002534};
2535
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002536/* l4_cfg -> dma_system */
2537static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2538 .master = &omap3xxx_l4_core_hwmod,
2539 .slave = &omap3xxx_dma_system_hwmod,
2540 .clk = "core_l4_ick",
2541 .addr = omap3xxx_dma_system_addrs,
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002542 .user = OCP_USER_MPU | OCP_USER_SDMA,
2543};
2544
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302545
2546/* l4_core -> mcbsp1 */
2547static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2548 .master = &omap3xxx_l4_core_hwmod,
2549 .slave = &omap3xxx_mcbsp1_hwmod,
2550 .clk = "mcbsp1_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302551 .user = OCP_USER_MPU | OCP_USER_SDMA,
2552};
2553
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302554
2555/* l4_per -> mcbsp2 */
2556static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2557 .master = &omap3xxx_l4_per_hwmod,
2558 .slave = &omap3xxx_mcbsp2_hwmod,
2559 .clk = "mcbsp2_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302560 .user = OCP_USER_MPU | OCP_USER_SDMA,
2561};
2562
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302563
2564/* l4_per -> mcbsp3 */
2565static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2566 .master = &omap3xxx_l4_per_hwmod,
2567 .slave = &omap3xxx_mcbsp3_hwmod,
2568 .clk = "mcbsp3_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302569 .user = OCP_USER_MPU | OCP_USER_SDMA,
2570};
2571
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302572
2573/* l4_per -> mcbsp4 */
2574static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2575 .master = &omap3xxx_l4_per_hwmod,
2576 .slave = &omap3xxx_mcbsp4_hwmod,
2577 .clk = "mcbsp4_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302578 .user = OCP_USER_MPU | OCP_USER_SDMA,
2579};
2580
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302581
2582/* l4_core -> mcbsp5 */
2583static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2584 .master = &omap3xxx_l4_core_hwmod,
2585 .slave = &omap3xxx_mcbsp5_hwmod,
2586 .clk = "mcbsp5_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302587 .user = OCP_USER_MPU | OCP_USER_SDMA,
2588};
2589
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302590
2591/* l4_per -> mcbsp2_sidetone */
2592static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2593 .master = &omap3xxx_l4_per_hwmod,
2594 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2595 .clk = "mcbsp2_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302596 .user = OCP_USER_MPU,
2597};
2598
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302599
2600/* l4_per -> mcbsp3_sidetone */
2601static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2602 .master = &omap3xxx_l4_per_hwmod,
2603 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2604 .clk = "mcbsp3_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302605 .user = OCP_USER_MPU,
2606};
2607
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002608/* l4_core -> mailbox */
2609static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2610 .master = &omap3xxx_l4_core_hwmod,
2611 .slave = &omap3xxx_mailbox_hwmod,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002612 .user = OCP_USER_MPU | OCP_USER_SDMA,
2613};
2614
Charulatha V0f616a42011-02-17 09:53:10 -08002615/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002616static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2617 .master = &omap3xxx_l4_core_hwmod,
2618 .slave = &omap34xx_mcspi1,
2619 .clk = "mcspi1_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002620 .user = OCP_USER_MPU | OCP_USER_SDMA,
2621};
2622
2623/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002624static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2625 .master = &omap3xxx_l4_core_hwmod,
2626 .slave = &omap34xx_mcspi2,
2627 .clk = "mcspi2_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002628 .user = OCP_USER_MPU | OCP_USER_SDMA,
2629};
2630
2631/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002632static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2633 .master = &omap3xxx_l4_core_hwmod,
2634 .slave = &omap34xx_mcspi3,
2635 .clk = "mcspi3_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002636 .user = OCP_USER_MPU | OCP_USER_SDMA,
2637};
2638
2639/* l4 core -> mcspi4 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002640
2641static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2642 .master = &omap3xxx_l4_core_hwmod,
2643 .slave = &omap34xx_mcspi4,
2644 .clk = "mcspi4_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002645 .user = OCP_USER_MPU | OCP_USER_SDMA,
2646};
2647
Keshava Munegowdade231382011-12-15 23:14:44 -07002648static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
2649 .master = &omap3xxx_usb_host_hs_hwmod,
2650 .slave = &omap3xxx_l3_main_hwmod,
2651 .clk = "core_l3_ick",
2652 .user = OCP_USER_MPU,
2653};
2654
Keshava Munegowdade231382011-12-15 23:14:44 -07002655
2656static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
2657 .master = &omap3xxx_l4_core_hwmod,
2658 .slave = &omap3xxx_usb_host_hs_hwmod,
2659 .clk = "usbhost_ick",
Keshava Munegowdade231382011-12-15 23:14:44 -07002660 .user = OCP_USER_MPU | OCP_USER_SDMA,
2661};
2662
Keshava Munegowdade231382011-12-15 23:14:44 -07002663
2664static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
2665 .master = &omap3xxx_l4_core_hwmod,
2666 .slave = &omap3xxx_usb_tll_hs_hwmod,
2667 .clk = "usbtll_ick",
Keshava Munegowdade231382011-12-15 23:14:44 -07002668 .user = OCP_USER_MPU | OCP_USER_SDMA,
2669};
2670
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002671/* l4_core -> hdq1w interface */
2672static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
2673 .master = &omap3xxx_l4_core_hwmod,
2674 .slave = &omap3xxx_hdq1w_hwmod,
2675 .clk = "hdq_ick",
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002676 .user = OCP_USER_MPU | OCP_USER_SDMA,
2677 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
2678};
2679
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002680/* l4_wkup -> 32ksync_counter */
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002681
Afzal Mohammed49484a62012-09-23 17:28:24 -06002682
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002683static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
2684 .master = &omap3xxx_l4_wkup_hwmod,
2685 .slave = &omap3xxx_counter_32k_hwmod,
2686 .clk = "omap_32ksync_ick",
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002687 .user = OCP_USER_MPU | OCP_USER_SDMA,
2688};
2689
Mark A. Greer31ba8802012-06-27 14:59:57 -06002690/* am35xx has Davinci MDIO & EMAC */
2691static struct omap_hwmod_class am35xx_mdio_class = {
2692 .name = "davinci_mdio",
2693};
2694
2695static struct omap_hwmod am35xx_mdio_hwmod = {
2696 .name = "davinci_mdio",
2697 .class = &am35xx_mdio_class,
2698 .flags = HWMOD_NO_IDLEST,
2699};
2700
2701/*
2702 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2703 * but this will probably require some additional hwmod core support,
2704 * so is left as a future to-do item.
2705 */
2706static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
2707 .master = &am35xx_mdio_hwmod,
2708 .slave = &omap3xxx_l3_main_hwmod,
2709 .clk = "emac_fck",
2710 .user = OCP_USER_MPU,
2711};
2712
Mark A. Greer31ba8802012-06-27 14:59:57 -06002713/* l4_core -> davinci mdio */
2714/*
2715 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2716 * but this will probably require some additional hwmod core support,
2717 * so is left as a future to-do item.
2718 */
2719static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
2720 .master = &omap3xxx_l4_core_hwmod,
2721 .slave = &am35xx_mdio_hwmod,
2722 .clk = "emac_fck",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002723 .user = OCP_USER_MPU,
2724};
2725
Mark A. Greer31ba8802012-06-27 14:59:57 -06002726static struct omap_hwmod_class am35xx_emac_class = {
2727 .name = "davinci_emac",
2728};
2729
2730static struct omap_hwmod am35xx_emac_hwmod = {
2731 .name = "davinci_emac",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002732 .class = &am35xx_emac_class,
Paul Walmsley814a18a2013-02-06 13:48:56 -07002733 /*
2734 * According to Mark Greer, the MPU will not return from WFI
2735 * when the EMAC signals an interrupt.
2736 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2737 */
2738 .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
Mark A. Greer31ba8802012-06-27 14:59:57 -06002739};
2740
2741/* l3_core -> davinci emac interface */
2742/*
2743 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2744 * but this will probably require some additional hwmod core support,
2745 * so is left as a future to-do item.
2746 */
2747static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
2748 .master = &am35xx_emac_hwmod,
2749 .slave = &omap3xxx_l3_main_hwmod,
2750 .clk = "emac_ick",
2751 .user = OCP_USER_MPU,
2752};
2753
Mark A. Greer31ba8802012-06-27 14:59:57 -06002754/* l4_core -> davinci emac */
2755/*
2756 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2757 * but this will probably require some additional hwmod core support,
2758 * so is left as a future to-do item.
2759 */
2760static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
2761 .master = &omap3xxx_l4_core_hwmod,
2762 .slave = &am35xx_emac_hwmod,
2763 .clk = "emac_ick",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002764 .user = OCP_USER_MPU,
2765};
2766
Afzal Mohammed49484a62012-09-23 17:28:24 -06002767static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
2768 .master = &omap3xxx_l3_main_hwmod,
2769 .slave = &omap3xxx_gpmc_hwmod,
2770 .clk = "core_l3_ick",
Afzal Mohammed49484a62012-09-23 17:28:24 -06002771 .user = OCP_USER_MPU | OCP_USER_SDMA,
2772};
2773
Mark A. Greer26f88e62013-03-18 10:06:32 -06002774/* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2775static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
2776 .sidle_shift = 4,
2777 .srst_shift = 1,
2778 .autoidle_shift = 0,
2779};
2780
2781static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
2782 .rev_offs = 0x5c,
2783 .sysc_offs = 0x60,
2784 .syss_offs = 0x64,
2785 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2786 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2787 .sysc_fields = &omap3_sham_sysc_fields,
2788};
2789
2790static struct omap_hwmod_class omap3xxx_sham_class = {
2791 .name = "sham",
2792 .sysc = &omap3_sham_sysc,
2793};
2794
Mark A. Greer26f88e62013-03-18 10:06:32 -06002795
Mark A. Greer26f88e62013-03-18 10:06:32 -06002796
2797static struct omap_hwmod omap3xxx_sham_hwmod = {
2798 .name = "sham",
Mark A. Greer26f88e62013-03-18 10:06:32 -06002799 .main_clk = "sha12_ick",
2800 .prcm = {
2801 .omap2 = {
2802 .module_offs = CORE_MOD,
2803 .prcm_reg_id = 1,
2804 .module_bit = OMAP3430_EN_SHA12_SHIFT,
2805 .idlest_reg_id = 1,
2806 .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
2807 },
2808 },
2809 .class = &omap3xxx_sham_class,
2810};
2811
Mark A. Greer26f88e62013-03-18 10:06:32 -06002812
2813static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
2814 .master = &omap3xxx_l4_core_hwmod,
2815 .slave = &omap3xxx_sham_hwmod,
2816 .clk = "sha12_ick",
Mark A. Greer26f88e62013-03-18 10:06:32 -06002817 .user = OCP_USER_MPU | OCP_USER_SDMA,
2818};
2819
Mark A. Greer14ae5562012-12-21 09:28:10 -07002820/* l4_core -> AES */
2821static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
2822 .sidle_shift = 6,
2823 .srst_shift = 1,
2824 .autoidle_shift = 0,
2825};
2826
2827static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
2828 .rev_offs = 0x44,
2829 .sysc_offs = 0x48,
2830 .syss_offs = 0x4c,
2831 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2832 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2833 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2834 .sysc_fields = &omap3xxx_aes_sysc_fields,
2835};
2836
2837static struct omap_hwmod_class omap3xxx_aes_class = {
2838 .name = "aes",
2839 .sysc = &omap3_aes_sysc,
2840};
2841
Mark A. Greer14ae5562012-12-21 09:28:10 -07002842
2843static struct omap_hwmod omap3xxx_aes_hwmod = {
2844 .name = "aes",
Mark A. Greer14ae5562012-12-21 09:28:10 -07002845 .main_clk = "aes2_ick",
2846 .prcm = {
2847 .omap2 = {
2848 .module_offs = CORE_MOD,
2849 .prcm_reg_id = 1,
2850 .module_bit = OMAP3430_EN_AES2_SHIFT,
2851 .idlest_reg_id = 1,
2852 .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
2853 },
2854 },
2855 .class = &omap3xxx_aes_class,
2856};
2857
Mark A. Greer14ae5562012-12-21 09:28:10 -07002858
2859static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
2860 .master = &omap3xxx_l4_core_hwmod,
2861 .slave = &omap3xxx_aes_hwmod,
2862 .clk = "aes2_ick",
Mark A. Greer14ae5562012-12-21 09:28:10 -07002863 .user = OCP_USER_MPU | OCP_USER_SDMA,
2864};
2865
Sebastian Reichel398917c2013-10-08 23:46:49 -06002866/*
2867 * 'ssi' class
2868 * synchronous serial interface (multichannel and full-duplex serial if)
2869 */
2870
2871static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
2872 .rev_offs = 0x0000,
2873 .sysc_offs = 0x0010,
2874 .syss_offs = 0x0014,
Tony Lindgrendc94fab2014-05-21 12:31:35 -07002875 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
2876 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2877 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Sebastian Reichel398917c2013-10-08 23:46:49 -06002878 .sysc_fields = &omap_hwmod_sysc_type1,
2879};
2880
Sebastian Reichel77112072016-01-17 16:49:05 +01002881static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002882 .name = "ssi",
2883 .sysc = &omap34xx_ssi_sysc,
2884};
2885
Sebastian Reichel77112072016-01-17 16:49:05 +01002886static struct omap_hwmod omap3xxx_ssi_hwmod = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002887 .name = "ssi",
Sebastian Reichel77112072016-01-17 16:49:05 +01002888 .class = &omap3xxx_ssi_hwmod_class,
Sebastian Reichel398917c2013-10-08 23:46:49 -06002889 .clkdm_name = "core_l4_clkdm",
2890 .main_clk = "ssi_ssr_fck",
2891 .prcm = {
2892 .omap2 = {
2893 .prcm_reg_id = 1,
2894 .module_bit = OMAP3430_EN_SSI_SHIFT,
2895 .module_offs = CORE_MOD,
2896 .idlest_reg_id = 1,
2897 .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
2898 },
2899 },
2900};
2901
2902/* L4 CORE -> SSI */
Sebastian Reichel77112072016-01-17 16:49:05 +01002903static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002904 .master = &omap3xxx_l4_core_hwmod,
Sebastian Reichel77112072016-01-17 16:49:05 +01002905 .slave = &omap3xxx_ssi_hwmod,
Sebastian Reichel398917c2013-10-08 23:46:49 -06002906 .clk = "ssi_ick",
2907 .user = OCP_USER_MPU | OCP_USER_SDMA,
2908};
2909
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002910static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
2911 &omap3xxx_l3_main__l4_core,
2912 &omap3xxx_l3_main__l4_per,
2913 &omap3xxx_mpu__l3_main,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06002914 &omap3xxx_l3_main__l4_debugss,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002915 &omap3xxx_l4_core__l4_wkup,
2916 &omap3xxx_l4_core__mmc3,
2917 &omap3_l4_core__uart1,
2918 &omap3_l4_core__uart2,
2919 &omap3_l4_per__uart3,
2920 &omap3_l4_core__i2c1,
2921 &omap3_l4_core__i2c2,
2922 &omap3_l4_core__i2c3,
2923 &omap3xxx_l4_wkup__l4_sec,
2924 &omap3xxx_l4_wkup__timer1,
2925 &omap3xxx_l4_per__timer2,
2926 &omap3xxx_l4_per__timer3,
2927 &omap3xxx_l4_per__timer4,
2928 &omap3xxx_l4_per__timer5,
2929 &omap3xxx_l4_per__timer6,
2930 &omap3xxx_l4_per__timer7,
2931 &omap3xxx_l4_per__timer8,
2932 &omap3xxx_l4_per__timer9,
2933 &omap3xxx_l4_core__timer10,
2934 &omap3xxx_l4_core__timer11,
2935 &omap3xxx_l4_wkup__wd_timer2,
2936 &omap3xxx_l4_wkup__gpio1,
2937 &omap3xxx_l4_per__gpio2,
2938 &omap3xxx_l4_per__gpio3,
2939 &omap3xxx_l4_per__gpio4,
2940 &omap3xxx_l4_per__gpio5,
2941 &omap3xxx_l4_per__gpio6,
2942 &omap3xxx_dma_system__l3,
2943 &omap3xxx_l4_core__dma_system,
2944 &omap3xxx_l4_core__mcbsp1,
2945 &omap3xxx_l4_per__mcbsp2,
2946 &omap3xxx_l4_per__mcbsp3,
2947 &omap3xxx_l4_per__mcbsp4,
2948 &omap3xxx_l4_core__mcbsp5,
2949 &omap3xxx_l4_per__mcbsp2_sidetone,
2950 &omap3xxx_l4_per__mcbsp3_sidetone,
2951 &omap34xx_l4_core__mcspi1,
2952 &omap34xx_l4_core__mcspi2,
2953 &omap34xx_l4_core__mcspi3,
2954 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002955 &omap3xxx_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -06002956 &omap3xxx_l3_main__gpmc,
Paul Walmsley73591542010-02-22 22:09:32 -07002957 NULL,
2958};
2959
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002960/* GP-only hwmod links */
Mark A. Greer26f88e62013-03-18 10:06:32 -06002961static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002962 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002963 NULL,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002964};
2965
2966static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
2967 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002968 NULL,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002969};
2970
2971static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
2972 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002973 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002974};
2975
2976/* crypto hwmod links */
2977static struct omap_hwmod_ocp_if *omap34xx_sham_hwmod_ocp_ifs[] __initdata = {
2978 &omap3xxx_l4_core__sham,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002979 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002980};
2981
2982static struct omap_hwmod_ocp_if *omap34xx_aes_hwmod_ocp_ifs[] __initdata = {
2983 &omap3xxx_l4_core__aes,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002984 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002985};
2986
2987static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = {
2988 &omap3xxx_l4_core__sham,
2989 NULL
2990};
2991
2992static struct omap_hwmod_ocp_if *omap36xx_aes_hwmod_ocp_ifs[] __initdata = {
2993 &omap3xxx_l4_core__aes,
2994 NULL
2995};
2996
2997/*
2998 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2999 * only present on some AM35xx chips, and no one knows which
3000 * ones. See
3001 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
3002 * if you need these IP blocks on an AM35xx, try uncommenting
3003 * the following lines.
3004 */
3005static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = {
Mark A. Greer26f88e62013-03-18 10:06:32 -06003006 /* &omap3xxx_l4_core__sham, */
Pali Rohára55a7442015-02-26 14:49:52 +01003007 NULL
3008};
3009
3010static struct omap_hwmod_ocp_if *am35xx_aes_hwmod_ocp_ifs[] __initdata = {
Mark A. Greer14ae5562012-12-21 09:28:10 -07003011 /* &omap3xxx_l4_core__aes, */
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003012 NULL,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07003013};
3014
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003015/* 3430ES1-only hwmod links */
3016static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
3017 &omap3430es1_dss__l3,
3018 &omap3430es1_l4_core__dss,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003019 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003020};
3021
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003022/* 3430ES2+-only hwmod links */
3023static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
3024 &omap3xxx_dss__l3,
3025 &omap3xxx_l4_core__dss,
3026 &omap3xxx_usbhsotg__l3,
3027 &omap3xxx_l4_core__usbhsotg,
3028 &omap3xxx_usb_host_hs__l3_main_2,
3029 &omap3xxx_l4_core__usb_host_hs,
3030 &omap3xxx_l4_core__usb_tll_hs,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003031 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003032};
3033
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003034/* <= 3430ES3-only hwmod links */
3035static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
3036 &omap3xxx_l4_core__pre_es3_mmc1,
3037 &omap3xxx_l4_core__pre_es3_mmc2,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003038 NULL,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003039};
3040
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003041/* 3430ES3+-only hwmod links */
3042static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3043 &omap3xxx_l4_core__es3plus_mmc1,
3044 &omap3xxx_l4_core__es3plus_mmc2,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003045 NULL,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003046};
3047
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003048/* 34xx-only hwmod links (all ES revisions) */
3049static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3050 &omap3xxx_l3__iva,
3051 &omap34xx_l4_core__sr1,
3052 &omap34xx_l4_core__sr2,
3053 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003054 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06003055 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06003056 &omap3xxx_l4_core__mmu_isp,
Paul Walmsley54864742012-09-23 17:28:23 -06003057 &omap3xxx_l3_main__mmu_iva,
Sebastian Reichel77112072016-01-17 16:49:05 +01003058 &omap3xxx_l4_core__ssi,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003059 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003060};
3061
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003062/* 36xx-only hwmod links (all ES revisions) */
3063static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3064 &omap3xxx_l3__iva,
3065 &omap36xx_l4_per__uart4,
3066 &omap3xxx_dss__l3,
3067 &omap3xxx_l4_core__dss,
3068 &omap36xx_l4_core__sr1,
3069 &omap36xx_l4_core__sr2,
3070 &omap3xxx_usbhsotg__l3,
3071 &omap3xxx_l4_core__usbhsotg,
3072 &omap3xxx_l4_core__mailbox,
3073 &omap3xxx_usb_host_hs__l3_main_2,
3074 &omap3xxx_l4_core__usb_host_hs,
3075 &omap3xxx_l4_core__usb_tll_hs,
3076 &omap3xxx_l4_core__es3plus_mmc1,
3077 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003078 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06003079 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06003080 &omap3xxx_l4_core__mmu_isp,
Paul Walmsley54864742012-09-23 17:28:23 -06003081 &omap3xxx_l3_main__mmu_iva,
Sebastian Reichel77112072016-01-17 16:49:05 +01003082 &omap3xxx_l4_core__ssi,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003083 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003084};
3085
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003086static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3087 &omap3xxx_dss__l3,
3088 &omap3xxx_l4_core__dss,
3089 &am35xx_usbhsotg__l3,
3090 &am35xx_l4_core__usbhsotg,
3091 &am35xx_l4_core__uart4,
3092 &omap3xxx_usb_host_hs__l3_main_2,
3093 &omap3xxx_l4_core__usb_host_hs,
3094 &omap3xxx_l4_core__usb_tll_hs,
3095 &omap3xxx_l4_core__es3plus_mmc1,
3096 &omap3xxx_l4_core__es3plus_mmc2,
Raphael Assenatb1a923d2012-09-17 10:56:14 -04003097 &omap3xxx_l4_core__hdq1w,
Mark A. Greer31ba8802012-06-27 14:59:57 -06003098 &am35xx_mdio__l3,
3099 &am35xx_l4_core__mdio,
3100 &am35xx_emac__l3,
3101 &am35xx_l4_core__emac,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003102 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003103};
3104
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003105static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3106 &omap3xxx_l4_core__dss_dispc,
3107 &omap3xxx_l4_core__dss_dsi1,
3108 &omap3xxx_l4_core__dss_rfbi,
3109 &omap3xxx_l4_core__dss_venc,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003110 NULL,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003111};
3112
Pali Rohára55a7442015-02-26 14:49:52 +01003113/**
3114 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
3115 * @bus: struct device_node * for the top-level OMAP DT data
3116 * @dev_name: device name used in the DT file
3117 *
3118 * Determine whether a "secure" IP block @dev_name is usable by Linux.
3119 * There doesn't appear to be a 100% reliable way to determine this,
3120 * so we rely on heuristics. If @bus is null, meaning there's no DT
3121 * data, then we only assume the IP block is accessible if the OMAP is
3122 * fused as a 'general-purpose' SoC. If however DT data is present,
3123 * test to see if the IP block is described in the DT data and set to
3124 * 'status = "okay"'. If so then we assume the ODM has configured the
3125 * OMAP firewalls to allow access to the IP block.
3126 *
3127 * Return: 0 if device named @dev_name is not likely to be accessible,
3128 * or 1 if it is likely to be accessible.
3129 */
Guenter Roeck10e57782017-03-04 07:02:10 -08003130static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
3131 const char *dev_name)
Pali Rohára55a7442015-02-26 14:49:52 +01003132{
Guenter Roeck10e57782017-03-04 07:02:10 -08003133 struct device_node *node;
3134 bool available;
3135
Pali Rohára55a7442015-02-26 14:49:52 +01003136 if (!bus)
Guenter Roeck10e57782017-03-04 07:02:10 -08003137 return omap_type() == OMAP2_DEVICE_TYPE_GP;
Pali Rohára55a7442015-02-26 14:49:52 +01003138
Guenter Roeck10e57782017-03-04 07:02:10 -08003139 node = of_get_child_by_name(bus, dev_name);
3140 available = of_device_is_available(node);
3141 of_node_put(node);
Pali Rohára55a7442015-02-26 14:49:52 +01003142
Guenter Roeck10e57782017-03-04 07:02:10 -08003143 return available;
Pali Rohára55a7442015-02-26 14:49:52 +01003144}
3145
Paul Walmsley73591542010-02-22 22:09:32 -07003146int __init omap3xxx_hwmod_init(void)
3147{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003148 int r;
Pali Rohára55a7442015-02-26 14:49:52 +01003149 struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL;
3150 struct omap_hwmod_ocp_if **h_aes = NULL;
3151 struct device_node *bus = NULL;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003152 unsigned int rev;
3153
Kevin Hilman9ebfd282012-06-18 12:12:23 -06003154 omap_hwmod_init();
3155
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003156 /* Register hwmod links common to all OMAP3 */
3157 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003158 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003159 return r;
3160
3161 rev = omap_rev();
3162
3163 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003164 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003165 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3166 * All possible revisions should be included in this conditional.
3167 */
3168 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3169 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3170 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003171 h = omap34xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06003172 h_gp = omap34xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01003173 h_sham = omap34xx_sham_hwmod_ocp_ifs;
3174 h_aes = omap34xx_aes_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07003175 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003176 h = am35xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06003177 h_gp = am35xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01003178 h_sham = am35xx_sham_hwmod_ocp_ifs;
3179 h_aes = am35xx_aes_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003180 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3181 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003182 h = omap36xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06003183 h_gp = omap36xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01003184 h_sham = omap36xx_sham_hwmod_ocp_ifs;
3185 h_aes = omap36xx_aes_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003186 } else {
3187 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3188 return -EINVAL;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003189 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003190
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003191 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003192 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003193 return r;
3194
Mark A. Greer26f88e62013-03-18 10:06:32 -06003195 /* Register GP-only hwmod links. */
3196 if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
3197 r = omap_hwmod_register_links(h_gp);
3198 if (r < 0)
3199 return r;
3200 }
3201
Pali Rohára55a7442015-02-26 14:49:52 +01003202 /*
3203 * Register crypto hwmod links only if they are not disabled in DT.
3204 * If DT information is missing, enable them only for GP devices.
3205 */
3206
Tony Lindgren1aa8f0c2017-05-31 15:51:37 -07003207 bus = of_find_node_by_name(NULL, "ocp");
Pali Rohára55a7442015-02-26 14:49:52 +01003208
3209 if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
3210 r = omap_hwmod_register_links(h_sham);
Guenter Roeckb92675d2017-03-04 07:02:11 -08003211 if (r < 0) {
3212 of_node_put(bus);
Pali Rohára55a7442015-02-26 14:49:52 +01003213 return r;
Guenter Roeckb92675d2017-03-04 07:02:11 -08003214 }
Pali Rohára55a7442015-02-26 14:49:52 +01003215 }
3216
3217 if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
3218 r = omap_hwmod_register_links(h_aes);
Guenter Roeckb92675d2017-03-04 07:02:11 -08003219 if (r < 0) {
3220 of_node_put(bus);
Pali Rohára55a7442015-02-26 14:49:52 +01003221 return r;
Guenter Roeckb92675d2017-03-04 07:02:11 -08003222 }
Pali Rohára55a7442015-02-26 14:49:52 +01003223 }
Guenter Roeckb92675d2017-03-04 07:02:11 -08003224 of_node_put(bus);
Mark A. Greer26f88e62013-03-18 10:06:32 -06003225
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003226 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003227 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003228 * particular family of silicon (e.g., 34xx ES1.0)
3229 */
3230 h = NULL;
3231 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003232 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003233 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3234 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3235 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003236 h = omap3430es2plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003237 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003238
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003239 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003240 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003241 if (r < 0)
3242 return r;
3243 }
3244
3245 h = NULL;
3246 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3247 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003248 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003249 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3250 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003251 h = omap3430_es3plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003252 }
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003253
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003254 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003255 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003256 if (r < 0)
3257 return r;
3258
3259 /*
3260 * DSS code presumes that dss_core hwmod is handled first,
3261 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003262 * DSS hwmod links last to ensure that dss_core is already
3263 * registered. Otherwise some change things may happen, for
3264 * ex. if dispc is handled before dss_core and DSS is enabled
3265 * in bootloader DISPC will be reset with outputs enabled
3266 * which sometimes leads to unrecoverable L3 error. XXX The
3267 * long-term fix to this is to ensure hwmods are set up in
3268 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003269 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003270 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003271
3272 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003273}