blob: d2106ae4410a23fb76c8593b6d123b3a94800ade [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 Fenkart551434382014-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
Paul Walmsley844a3b62012-04-19 04:04:33 -0600568/* dss */
569static struct omap_hwmod_opt_clk dss_opt_clks[] = {
570 /*
571 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
572 * driver does not use these clocks.
573 */
574 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
575 { .role = "tv_clk", .clk = "dss_tv_fck" },
576 /* required only on OMAP3430 */
577 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
578};
579
580static struct omap_hwmod omap3430es1_dss_core_hwmod = {
581 .name = "dss_core",
582 .class = &omap2_dss_hwmod_class,
583 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600584 .prcm = {
585 .omap2 = {
586 .prcm_reg_id = 1,
587 .module_bit = OMAP3430_EN_DSS1_SHIFT,
588 .module_offs = OMAP3430_DSS_MOD,
589 .idlest_reg_id = 1,
590 .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT,
591 },
592 },
593 .opt_clks = dss_opt_clks,
594 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
595 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
596};
597
598static struct omap_hwmod omap3xxx_dss_core_hwmod = {
599 .name = "dss_core",
600 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
601 .class = &omap2_dss_hwmod_class,
602 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600603 .prcm = {
604 .omap2 = {
605 .prcm_reg_id = 1,
606 .module_bit = OMAP3430_EN_DSS1_SHIFT,
607 .module_offs = OMAP3430_DSS_MOD,
608 .idlest_reg_id = 1,
609 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
610 .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT,
611 },
612 },
613 .opt_clks = dss_opt_clks,
614 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
615};
616
617/*
618 * 'dispc' class
619 * display controller
620 */
621
622static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
623 .rev_offs = 0x0000,
624 .sysc_offs = 0x0010,
625 .syss_offs = 0x0014,
626 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
627 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
628 SYSC_HAS_ENAWAKEUP),
629 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
630 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
631 .sysc_fields = &omap_hwmod_sysc_type1,
632};
633
634static struct omap_hwmod_class omap3_dispc_hwmod_class = {
635 .name = "dispc",
636 .sysc = &omap3_dispc_sysc,
637};
638
639static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
640 .name = "dss_dispc",
641 .class = &omap3_dispc_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600642 .main_clk = "dss1_alwon_fck",
643 .prcm = {
644 .omap2 = {
645 .prcm_reg_id = 1,
646 .module_bit = OMAP3430_EN_DSS1_SHIFT,
647 .module_offs = OMAP3430_DSS_MOD,
648 },
649 },
650 .flags = HWMOD_NO_IDLEST,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -0700651 .dev_attr = &omap2_3_dss_dispc_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600652};
653
654/*
655 * 'dsi' class
656 * display serial interface controller
657 */
658
Sebastian Reichelb46211d2016-06-24 03:59:33 +0200659static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
660 .rev_offs = 0x0000,
661 .sysc_offs = 0x0010,
662 .syss_offs = 0x0014,
663 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
664 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
665 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
666 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
667 .sysc_fields = &omap_hwmod_sysc_type1,
668};
669
Paul Walmsley844a3b62012-04-19 04:04:33 -0600670static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
671 .name = "dsi",
Sebastian Reichelb46211d2016-06-24 03:59:33 +0200672 .sysc = &omap3xxx_dsi_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600673};
674
Paul Walmsley844a3b62012-04-19 04:04:33 -0600675/* dss_dsi1 */
676static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
677 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
678};
679
680static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
681 .name = "dss_dsi1",
682 .class = &omap3xxx_dsi_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600683 .main_clk = "dss1_alwon_fck",
684 .prcm = {
685 .omap2 = {
686 .prcm_reg_id = 1,
687 .module_bit = OMAP3430_EN_DSS1_SHIFT,
688 .module_offs = OMAP3430_DSS_MOD,
689 },
690 },
691 .opt_clks = dss_dsi1_opt_clks,
692 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
693 .flags = HWMOD_NO_IDLEST,
694};
695
696static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
697 { .role = "ick", .clk = "dss_ick" },
698};
699
700static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
701 .name = "dss_rfbi",
702 .class = &omap2_rfbi_hwmod_class,
703 .main_clk = "dss1_alwon_fck",
704 .prcm = {
705 .omap2 = {
706 .prcm_reg_id = 1,
707 .module_bit = OMAP3430_EN_DSS1_SHIFT,
708 .module_offs = OMAP3430_DSS_MOD,
709 },
710 },
711 .opt_clks = dss_rfbi_opt_clks,
712 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
713 .flags = HWMOD_NO_IDLEST,
714};
715
716static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
717 /* required only on OMAP3430 */
718 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
719};
720
721static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
722 .name = "dss_venc",
723 .class = &omap2_venc_hwmod_class,
724 .main_clk = "dss_tv_fck",
725 .prcm = {
726 .omap2 = {
727 .prcm_reg_id = 1,
728 .module_bit = OMAP3430_EN_DSS1_SHIFT,
729 .module_offs = OMAP3430_DSS_MOD,
730 },
731 },
732 .opt_clks = dss_venc_opt_clks,
733 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
734 .flags = HWMOD_NO_IDLEST,
735};
736
737/* I2C1 */
738static struct omap_i2c_dev_attr i2c1_dev_attr = {
739 .fifo_depth = 8, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530740 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600741};
742
743static struct omap_hwmod omap3xxx_i2c1_hwmod = {
744 .name = "i2c1",
745 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600746 .main_clk = "i2c1_fck",
747 .prcm = {
748 .omap2 = {
749 .module_offs = CORE_MOD,
750 .prcm_reg_id = 1,
751 .module_bit = OMAP3430_EN_I2C1_SHIFT,
752 .idlest_reg_id = 1,
753 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
754 },
755 },
756 .class = &i2c_class,
757 .dev_attr = &i2c1_dev_attr,
758};
759
760/* I2C2 */
761static struct omap_i2c_dev_attr i2c2_dev_attr = {
762 .fifo_depth = 8, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530763 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600764};
765
766static struct omap_hwmod omap3xxx_i2c2_hwmod = {
767 .name = "i2c2",
768 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600769 .main_clk = "i2c2_fck",
770 .prcm = {
771 .omap2 = {
772 .module_offs = CORE_MOD,
773 .prcm_reg_id = 1,
774 .module_bit = OMAP3430_EN_I2C2_SHIFT,
775 .idlest_reg_id = 1,
776 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
777 },
778 },
779 .class = &i2c_class,
780 .dev_attr = &i2c2_dev_attr,
781};
782
783/* I2C3 */
784static struct omap_i2c_dev_attr i2c3_dev_attr = {
785 .fifo_depth = 64, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530786 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600787};
788
Paul Walmsley844a3b62012-04-19 04:04:33 -0600789
Paul Walmsley844a3b62012-04-19 04:04:33 -0600790
791static struct omap_hwmod omap3xxx_i2c3_hwmod = {
792 .name = "i2c3",
793 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600794 .main_clk = "i2c3_fck",
795 .prcm = {
796 .omap2 = {
797 .module_offs = CORE_MOD,
798 .prcm_reg_id = 1,
799 .module_bit = OMAP3430_EN_I2C3_SHIFT,
800 .idlest_reg_id = 1,
801 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
802 },
803 },
804 .class = &i2c_class,
805 .dev_attr = &i2c3_dev_attr,
806};
807
808/*
809 * 'gpio' class
810 * general purpose io module
811 */
812
813static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
814 .rev_offs = 0x0000,
815 .sysc_offs = 0x0010,
816 .syss_offs = 0x0014,
817 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
818 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
819 SYSS_HAS_RESET_STATUS),
820 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
821 .sysc_fields = &omap_hwmod_sysc_type1,
822};
823
824static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
825 .name = "gpio",
826 .sysc = &omap3xxx_gpio_sysc,
827 .rev = 1,
828};
829
830/* gpio_dev_attr */
831static struct omap_gpio_dev_attr gpio_dev_attr = {
832 .bank_width = 32,
833 .dbck_flag = true,
834};
835
836/* gpio1 */
837static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
838 { .role = "dbclk", .clk = "gpio1_dbck", },
839};
840
841static struct omap_hwmod omap3xxx_gpio1_hwmod = {
842 .name = "gpio1",
843 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600844 .main_clk = "gpio1_ick",
845 .opt_clks = gpio1_opt_clks,
846 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
847 .prcm = {
848 .omap2 = {
849 .prcm_reg_id = 1,
850 .module_bit = OMAP3430_EN_GPIO1_SHIFT,
851 .module_offs = WKUP_MOD,
852 .idlest_reg_id = 1,
853 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
854 },
855 },
856 .class = &omap3xxx_gpio_hwmod_class,
857 .dev_attr = &gpio_dev_attr,
858};
859
860/* gpio2 */
861static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
862 { .role = "dbclk", .clk = "gpio2_dbck", },
863};
864
865static struct omap_hwmod omap3xxx_gpio2_hwmod = {
866 .name = "gpio2",
867 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600868 .main_clk = "gpio2_ick",
869 .opt_clks = gpio2_opt_clks,
870 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
871 .prcm = {
872 .omap2 = {
873 .prcm_reg_id = 1,
874 .module_bit = OMAP3430_EN_GPIO2_SHIFT,
875 .module_offs = OMAP3430_PER_MOD,
876 .idlest_reg_id = 1,
877 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
878 },
879 },
880 .class = &omap3xxx_gpio_hwmod_class,
881 .dev_attr = &gpio_dev_attr,
882};
883
884/* gpio3 */
885static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
886 { .role = "dbclk", .clk = "gpio3_dbck", },
887};
888
889static struct omap_hwmod omap3xxx_gpio3_hwmod = {
890 .name = "gpio3",
891 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600892 .main_clk = "gpio3_ick",
893 .opt_clks = gpio3_opt_clks,
894 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
895 .prcm = {
896 .omap2 = {
897 .prcm_reg_id = 1,
898 .module_bit = OMAP3430_EN_GPIO3_SHIFT,
899 .module_offs = OMAP3430_PER_MOD,
900 .idlest_reg_id = 1,
901 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
902 },
903 },
904 .class = &omap3xxx_gpio_hwmod_class,
905 .dev_attr = &gpio_dev_attr,
906};
907
908/* gpio4 */
909static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
910 { .role = "dbclk", .clk = "gpio4_dbck", },
911};
912
913static struct omap_hwmod omap3xxx_gpio4_hwmod = {
914 .name = "gpio4",
915 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600916 .main_clk = "gpio4_ick",
917 .opt_clks = gpio4_opt_clks,
918 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
919 .prcm = {
920 .omap2 = {
921 .prcm_reg_id = 1,
922 .module_bit = OMAP3430_EN_GPIO4_SHIFT,
923 .module_offs = OMAP3430_PER_MOD,
924 .idlest_reg_id = 1,
925 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
926 },
927 },
928 .class = &omap3xxx_gpio_hwmod_class,
929 .dev_attr = &gpio_dev_attr,
930};
931
932/* gpio5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600933
934static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
935 { .role = "dbclk", .clk = "gpio5_dbck", },
936};
937
938static struct omap_hwmod omap3xxx_gpio5_hwmod = {
939 .name = "gpio5",
940 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600941 .main_clk = "gpio5_ick",
942 .opt_clks = gpio5_opt_clks,
943 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
944 .prcm = {
945 .omap2 = {
946 .prcm_reg_id = 1,
947 .module_bit = OMAP3430_EN_GPIO5_SHIFT,
948 .module_offs = OMAP3430_PER_MOD,
949 .idlest_reg_id = 1,
950 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
951 },
952 },
953 .class = &omap3xxx_gpio_hwmod_class,
954 .dev_attr = &gpio_dev_attr,
955};
956
957/* gpio6 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600958
959static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
960 { .role = "dbclk", .clk = "gpio6_dbck", },
961};
962
963static struct omap_hwmod omap3xxx_gpio6_hwmod = {
964 .name = "gpio6",
965 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600966 .main_clk = "gpio6_ick",
967 .opt_clks = gpio6_opt_clks,
968 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
969 .prcm = {
970 .omap2 = {
971 .prcm_reg_id = 1,
972 .module_bit = OMAP3430_EN_GPIO6_SHIFT,
973 .module_offs = OMAP3430_PER_MOD,
974 .idlest_reg_id = 1,
975 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
976 },
977 },
978 .class = &omap3xxx_gpio_hwmod_class,
979 .dev_attr = &gpio_dev_attr,
980};
981
982/* dma attributes */
983static struct omap_dma_dev_attr dma_dev_attr = {
984 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
985 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
986 .lch_count = 32,
987};
988
989static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
990 .rev_offs = 0x0000,
991 .sysc_offs = 0x002c,
992 .syss_offs = 0x0028,
993 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
994 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
995 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
996 SYSS_HAS_RESET_STATUS),
997 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
998 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
999 .sysc_fields = &omap_hwmod_sysc_type1,
1000};
1001
1002static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
1003 .name = "dma",
1004 .sysc = &omap3xxx_dma_sysc,
1005};
1006
1007/* dma_system */
1008static struct omap_hwmod omap3xxx_dma_system_hwmod = {
1009 .name = "dma",
1010 .class = &omap3xxx_dma_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001011 .main_clk = "core_l3_ick",
1012 .prcm = {
1013 .omap2 = {
1014 .module_offs = CORE_MOD,
1015 .prcm_reg_id = 1,
1016 .module_bit = OMAP3430_ST_SDMA_SHIFT,
1017 .idlest_reg_id = 1,
1018 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
1019 },
1020 },
1021 .dev_attr = &dma_dev_attr,
1022 .flags = HWMOD_NO_IDLEST,
1023};
1024
1025/*
1026 * 'mcbsp' class
1027 * multi channel buffered serial port controller
1028 */
1029
1030static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
1031 .sysc_offs = 0x008c,
1032 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
1033 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1034 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1035 .sysc_fields = &omap_hwmod_sysc_type1,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001036};
1037
1038static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
1039 .name = "mcbsp",
1040 .sysc = &omap3xxx_mcbsp_sysc,
1041 .rev = MCBSP_CONFIG_TYPE3,
1042};
1043
Peter Ujfalusi70391542012-06-18 16:18:43 -06001044/* McBSP functional clock mapping */
1045static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
1046 { .role = "pad_fck", .clk = "mcbsp_clks" },
1047 { .role = "prcm_fck", .clk = "core_96m_fck" },
1048};
1049
1050static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
1051 { .role = "pad_fck", .clk = "mcbsp_clks" },
1052 { .role = "prcm_fck", .clk = "per_96m_fck" },
1053};
1054
Paul Walmsley844a3b62012-04-19 04:04:33 -06001055/* mcbsp1 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001056
1057static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
1058 .name = "mcbsp1",
1059 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001060 .main_clk = "mcbsp1_fck",
1061 .prcm = {
1062 .omap2 = {
1063 .prcm_reg_id = 1,
1064 .module_bit = OMAP3430_EN_MCBSP1_SHIFT,
1065 .module_offs = CORE_MOD,
1066 .idlest_reg_id = 1,
1067 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
1068 },
1069 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001070 .opt_clks = mcbsp15_opt_clks,
1071 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001072};
1073
1074/* mcbsp2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001075
1076static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1077 .sidetone = "mcbsp2_sidetone",
1078};
1079
1080static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1081 .name = "mcbsp2",
1082 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001083 .main_clk = "mcbsp2_fck",
1084 .prcm = {
1085 .omap2 = {
1086 .prcm_reg_id = 1,
1087 .module_bit = OMAP3430_EN_MCBSP2_SHIFT,
1088 .module_offs = OMAP3430_PER_MOD,
1089 .idlest_reg_id = 1,
1090 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1091 },
1092 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001093 .opt_clks = mcbsp234_opt_clks,
1094 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001095 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1096};
1097
1098/* mcbsp3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001099
1100static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1101 .sidetone = "mcbsp3_sidetone",
1102};
1103
1104static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1105 .name = "mcbsp3",
1106 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001107 .main_clk = "mcbsp3_fck",
1108 .prcm = {
1109 .omap2 = {
1110 .prcm_reg_id = 1,
1111 .module_bit = OMAP3430_EN_MCBSP3_SHIFT,
1112 .module_offs = OMAP3430_PER_MOD,
1113 .idlest_reg_id = 1,
1114 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1115 },
1116 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001117 .opt_clks = mcbsp234_opt_clks,
1118 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001119 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1120};
1121
1122/* mcbsp4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001123
Paul Walmsley844a3b62012-04-19 04:04:33 -06001124
1125static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1126 .name = "mcbsp4",
1127 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001128 .main_clk = "mcbsp4_fck",
1129 .prcm = {
1130 .omap2 = {
1131 .prcm_reg_id = 1,
1132 .module_bit = OMAP3430_EN_MCBSP4_SHIFT,
1133 .module_offs = OMAP3430_PER_MOD,
1134 .idlest_reg_id = 1,
1135 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1136 },
1137 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001138 .opt_clks = mcbsp234_opt_clks,
1139 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001140};
1141
1142/* mcbsp5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001143
Paul Walmsley844a3b62012-04-19 04:04:33 -06001144
1145static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1146 .name = "mcbsp5",
1147 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001148 .main_clk = "mcbsp5_fck",
1149 .prcm = {
1150 .omap2 = {
1151 .prcm_reg_id = 1,
1152 .module_bit = OMAP3430_EN_MCBSP5_SHIFT,
1153 .module_offs = CORE_MOD,
1154 .idlest_reg_id = 1,
1155 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1156 },
1157 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001158 .opt_clks = mcbsp15_opt_clks,
1159 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001160};
1161
1162/* 'mcbsp sidetone' class */
1163static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1164 .sysc_offs = 0x0010,
1165 .sysc_flags = SYSC_HAS_AUTOIDLE,
1166 .sysc_fields = &omap_hwmod_sysc_type1,
1167};
1168
1169static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1170 .name = "mcbsp_sidetone",
1171 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1172};
1173
1174/* mcbsp2_sidetone */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001175
1176static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1177 .name = "mcbsp2_sidetone",
1178 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
Peter Ujfalusi3b80c9b2016-05-30 11:23:45 +03001179 .main_clk = "mcbsp2_ick",
1180 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001181};
1182
1183/* mcbsp3_sidetone */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001184
1185static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1186 .name = "mcbsp3_sidetone",
1187 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
Peter Ujfalusi3b80c9b2016-05-30 11:23:45 +03001188 .main_clk = "mcbsp3_ick",
1189 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001190};
1191
1192/* SR common */
1193static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = {
1194 .clkact_shift = 20,
1195};
1196
1197static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1198 .sysc_offs = 0x24,
1199 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001200 .sysc_fields = &omap34xx_sr_sysc_fields,
1201};
1202
1203static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1204 .name = "smartreflex",
1205 .sysc = &omap34xx_sr_sysc,
1206 .rev = 1,
1207};
1208
1209static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = {
1210 .sidle_shift = 24,
1211 .enwkup_shift = 26,
1212};
1213
1214static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1215 .sysc_offs = 0x38,
1216 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1217 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1218 SYSC_NO_CACHE),
1219 .sysc_fields = &omap36xx_sr_sysc_fields,
1220};
1221
1222static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1223 .name = "smartreflex",
1224 .sysc = &omap36xx_sr_sysc,
1225 .rev = 2,
1226};
1227
1228/* SR1 */
1229static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1230 .sensor_voltdm_name = "mpu_iva",
1231};
1232
Paul Walmsley844a3b62012-04-19 04:04:33 -06001233
1234static struct omap_hwmod omap34xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301235 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001236 .class = &omap34xx_smartreflex_hwmod_class,
1237 .main_clk = "sr1_fck",
1238 .prcm = {
1239 .omap2 = {
1240 .prcm_reg_id = 1,
1241 .module_bit = OMAP3430_EN_SR1_SHIFT,
1242 .module_offs = WKUP_MOD,
1243 .idlest_reg_id = 1,
1244 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1245 },
1246 },
1247 .dev_attr = &sr1_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001248 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1249};
1250
1251static struct omap_hwmod omap36xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301252 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001253 .class = &omap36xx_smartreflex_hwmod_class,
1254 .main_clk = "sr1_fck",
1255 .prcm = {
1256 .omap2 = {
1257 .prcm_reg_id = 1,
1258 .module_bit = OMAP3430_EN_SR1_SHIFT,
1259 .module_offs = WKUP_MOD,
1260 .idlest_reg_id = 1,
1261 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1262 },
1263 },
1264 .dev_attr = &sr1_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001265};
1266
1267/* SR2 */
1268static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1269 .sensor_voltdm_name = "core",
1270};
1271
Paul Walmsley844a3b62012-04-19 04:04:33 -06001272
1273static struct omap_hwmod omap34xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301274 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001275 .class = &omap34xx_smartreflex_hwmod_class,
1276 .main_clk = "sr2_fck",
1277 .prcm = {
1278 .omap2 = {
1279 .prcm_reg_id = 1,
1280 .module_bit = OMAP3430_EN_SR2_SHIFT,
1281 .module_offs = WKUP_MOD,
1282 .idlest_reg_id = 1,
1283 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1284 },
1285 },
1286 .dev_attr = &sr2_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001287 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1288};
1289
1290static struct omap_hwmod omap36xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301291 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001292 .class = &omap36xx_smartreflex_hwmod_class,
1293 .main_clk = "sr2_fck",
1294 .prcm = {
1295 .omap2 = {
1296 .prcm_reg_id = 1,
1297 .module_bit = OMAP3430_EN_SR2_SHIFT,
1298 .module_offs = WKUP_MOD,
1299 .idlest_reg_id = 1,
1300 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1301 },
1302 },
1303 .dev_attr = &sr2_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001304};
1305
1306/*
1307 * 'mailbox' class
1308 * mailbox module allowing communication between the on-chip processors
1309 * using a queued mailbox-interrupt mechanism.
1310 */
1311
1312static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1313 .rev_offs = 0x000,
1314 .sysc_offs = 0x010,
1315 .syss_offs = 0x014,
1316 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1317 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1318 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1319 .sysc_fields = &omap_hwmod_sysc_type1,
1320};
1321
1322static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1323 .name = "mailbox",
1324 .sysc = &omap3xxx_mailbox_sysc,
1325};
1326
Paul Walmsley844a3b62012-04-19 04:04:33 -06001327static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1328 .name = "mailbox",
1329 .class = &omap3xxx_mailbox_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001330 .main_clk = "mailboxes_ick",
1331 .prcm = {
1332 .omap2 = {
1333 .prcm_reg_id = 1,
1334 .module_bit = OMAP3430_EN_MAILBOXES_SHIFT,
1335 .module_offs = CORE_MOD,
1336 .idlest_reg_id = 1,
1337 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1338 },
1339 },
1340};
1341
1342/*
1343 * 'mcspi' class
1344 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1345 * bus
1346 */
1347
1348static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1349 .rev_offs = 0x0000,
1350 .sysc_offs = 0x0010,
1351 .syss_offs = 0x0014,
1352 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1353 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1354 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1355 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1356 .sysc_fields = &omap_hwmod_sysc_type1,
1357};
1358
1359static struct omap_hwmod_class omap34xx_mcspi_class = {
1360 .name = "mcspi",
1361 .sysc = &omap34xx_mcspi_sysc,
1362 .rev = OMAP3_MCSPI_REV,
1363};
1364
1365/* mcspi1 */
1366static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1367 .num_chipselect = 4,
1368};
1369
1370static struct omap_hwmod omap34xx_mcspi1 = {
1371 .name = "mcspi1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001372 .main_clk = "mcspi1_fck",
1373 .prcm = {
1374 .omap2 = {
1375 .module_offs = CORE_MOD,
1376 .prcm_reg_id = 1,
1377 .module_bit = OMAP3430_EN_MCSPI1_SHIFT,
1378 .idlest_reg_id = 1,
1379 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1380 },
1381 },
1382 .class = &omap34xx_mcspi_class,
1383 .dev_attr = &omap_mcspi1_dev_attr,
1384};
1385
1386/* mcspi2 */
1387static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1388 .num_chipselect = 2,
1389};
1390
1391static struct omap_hwmod omap34xx_mcspi2 = {
1392 .name = "mcspi2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001393 .main_clk = "mcspi2_fck",
1394 .prcm = {
1395 .omap2 = {
1396 .module_offs = CORE_MOD,
1397 .prcm_reg_id = 1,
1398 .module_bit = OMAP3430_EN_MCSPI2_SHIFT,
1399 .idlest_reg_id = 1,
1400 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1401 },
1402 },
1403 .class = &omap34xx_mcspi_class,
1404 .dev_attr = &omap_mcspi2_dev_attr,
1405};
1406
1407/* mcspi3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001408
Paul Walmsley844a3b62012-04-19 04:04:33 -06001409
1410static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1411 .num_chipselect = 2,
1412};
1413
1414static struct omap_hwmod omap34xx_mcspi3 = {
1415 .name = "mcspi3",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001416 .main_clk = "mcspi3_fck",
1417 .prcm = {
1418 .omap2 = {
1419 .module_offs = CORE_MOD,
1420 .prcm_reg_id = 1,
1421 .module_bit = OMAP3430_EN_MCSPI3_SHIFT,
1422 .idlest_reg_id = 1,
1423 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1424 },
1425 },
1426 .class = &omap34xx_mcspi_class,
1427 .dev_attr = &omap_mcspi3_dev_attr,
1428};
1429
1430/* mcspi4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001431
Paul Walmsley844a3b62012-04-19 04:04:33 -06001432
1433static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1434 .num_chipselect = 1,
1435};
1436
1437static struct omap_hwmod omap34xx_mcspi4 = {
1438 .name = "mcspi4",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001439 .main_clk = "mcspi4_fck",
1440 .prcm = {
1441 .omap2 = {
1442 .module_offs = CORE_MOD,
1443 .prcm_reg_id = 1,
1444 .module_bit = OMAP3430_EN_MCSPI4_SHIFT,
1445 .idlest_reg_id = 1,
1446 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1447 },
1448 },
1449 .class = &omap34xx_mcspi_class,
1450 .dev_attr = &omap_mcspi4_dev_attr,
1451};
1452
1453/* usbhsotg */
1454static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1455 .rev_offs = 0x0400,
1456 .sysc_offs = 0x0404,
1457 .syss_offs = 0x0408,
1458 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1459 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1460 SYSC_HAS_AUTOIDLE),
1461 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1462 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1463 .sysc_fields = &omap_hwmod_sysc_type1,
1464};
1465
1466static struct omap_hwmod_class usbotg_class = {
1467 .name = "usbotg",
1468 .sysc = &omap3xxx_usbhsotg_sysc,
1469};
1470
1471/* usb_otg_hs */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001472
1473static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1474 .name = "usb_otg_hs",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001475 .main_clk = "hsotgusb_ick",
1476 .prcm = {
1477 .omap2 = {
1478 .prcm_reg_id = 1,
1479 .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1480 .module_offs = CORE_MOD,
1481 .idlest_reg_id = 1,
1482 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001483 .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001484 },
1485 },
1486 .class = &usbotg_class,
1487
1488 /*
1489 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1490 * broken when autoidle is enabled
1491 * workaround is to disable the autoidle bit at module level.
Grazvydas Ignotas092bc082013-03-11 21:49:00 +02001492 *
1493 * Enabling the device in any other MIDLEMODE setting but force-idle
1494 * causes core_pwrdm not enter idle states at least on OMAP3630.
1495 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1496 * signal when MIDLEMODE is set to force-idle.
Paul Walmsley844a3b62012-04-19 04:04:33 -06001497 */
Tony Lindgren6a08b112014-09-18 08:58:28 -07001498 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
1499 HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001500};
1501
1502/* usb_otg_hs */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001503
1504static struct omap_hwmod_class am35xx_usbotg_class = {
1505 .name = "am35xx_usbotg",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001506};
1507
1508static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1509 .name = "am35x_otg_hs",
Paul Walmsley89ea2582012-06-27 14:53:46 -06001510 .main_clk = "hsotgusb_fck",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001511 .class = &am35xx_usbotg_class,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001512 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001513};
1514
1515/* MMC/SD/SDIO common */
1516static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1517 .rev_offs = 0x1fc,
1518 .sysc_offs = 0x10,
1519 .syss_offs = 0x14,
1520 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1521 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1522 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1523 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1524 .sysc_fields = &omap_hwmod_sysc_type1,
1525};
1526
1527static struct omap_hwmod_class omap34xx_mmc_class = {
1528 .name = "mmc",
1529 .sysc = &omap34xx_mmc_sysc,
1530};
1531
1532/* MMC/SD/SDIO1 */
1533
Paul Walmsley844a3b62012-04-19 04:04:33 -06001534
Paul Walmsley844a3b62012-04-19 04:04:33 -06001535
1536static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1537 { .role = "dbck", .clk = "omap_32k_fck", },
1538};
1539
Andreas Fenkart551434382014-11-08 15:33:09 +01001540static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001541 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1542};
1543
1544/* See 35xx errata 2.1.1.128 in SPRZ278F */
Andreas Fenkart551434382014-11-08 15:33:09 +01001545static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001546 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1547 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1548};
1549
1550static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1551 .name = "mmc1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001552 .opt_clks = omap34xx_mmc1_opt_clks,
1553 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1554 .main_clk = "mmchs1_fck",
1555 .prcm = {
1556 .omap2 = {
1557 .module_offs = CORE_MOD,
1558 .prcm_reg_id = 1,
1559 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1560 .idlest_reg_id = 1,
1561 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1562 },
1563 },
1564 .dev_attr = &mmc1_pre_es3_dev_attr,
1565 .class = &omap34xx_mmc_class,
1566};
1567
1568static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1569 .name = "mmc1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001570 .opt_clks = omap34xx_mmc1_opt_clks,
1571 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1572 .main_clk = "mmchs1_fck",
1573 .prcm = {
1574 .omap2 = {
1575 .module_offs = CORE_MOD,
1576 .prcm_reg_id = 1,
1577 .module_bit = OMAP3430_EN_MMC1_SHIFT,
1578 .idlest_reg_id = 1,
1579 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1580 },
1581 },
1582 .dev_attr = &mmc1_dev_attr,
1583 .class = &omap34xx_mmc_class,
1584};
1585
1586/* MMC/SD/SDIO2 */
1587
Paul Walmsley844a3b62012-04-19 04:04:33 -06001588
Paul Walmsley844a3b62012-04-19 04:04:33 -06001589
1590static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1591 { .role = "dbck", .clk = "omap_32k_fck", },
1592};
1593
1594/* See 35xx errata 2.1.1.128 in SPRZ278F */
Andreas Fenkart551434382014-11-08 15:33:09 +01001595static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001596 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1597};
1598
1599static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1600 .name = "mmc2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001601 .opt_clks = omap34xx_mmc2_opt_clks,
1602 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1603 .main_clk = "mmchs2_fck",
1604 .prcm = {
1605 .omap2 = {
1606 .module_offs = CORE_MOD,
1607 .prcm_reg_id = 1,
1608 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1609 .idlest_reg_id = 1,
1610 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1611 },
1612 },
1613 .dev_attr = &mmc2_pre_es3_dev_attr,
1614 .class = &omap34xx_mmc_class,
1615};
1616
1617static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1618 .name = "mmc2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001619 .opt_clks = omap34xx_mmc2_opt_clks,
1620 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1621 .main_clk = "mmchs2_fck",
1622 .prcm = {
1623 .omap2 = {
1624 .module_offs = CORE_MOD,
1625 .prcm_reg_id = 1,
1626 .module_bit = OMAP3430_EN_MMC2_SHIFT,
1627 .idlest_reg_id = 1,
1628 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1629 },
1630 },
1631 .class = &omap34xx_mmc_class,
1632};
1633
1634/* MMC/SD/SDIO3 */
1635
Paul Walmsley844a3b62012-04-19 04:04:33 -06001636
Paul Walmsley844a3b62012-04-19 04:04:33 -06001637
1638static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1639 { .role = "dbck", .clk = "omap_32k_fck", },
1640};
1641
1642static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1643 .name = "mmc3",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001644 .opt_clks = omap34xx_mmc3_opt_clks,
1645 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1646 .main_clk = "mmchs3_fck",
1647 .prcm = {
1648 .omap2 = {
1649 .prcm_reg_id = 1,
1650 .module_bit = OMAP3430_EN_MMC3_SHIFT,
1651 .idlest_reg_id = 1,
1652 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1653 },
1654 },
1655 .class = &omap34xx_mmc_class,
1656};
1657
1658/*
1659 * 'usb_host_hs' class
1660 * high-speed multi-port usb host controller
1661 */
1662
1663static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1664 .rev_offs = 0x0000,
1665 .sysc_offs = 0x0010,
1666 .syss_offs = 0x0014,
1667 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1668 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
Roger Quadros7f4d3642013-12-08 18:39:02 -07001669 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1670 SYSS_HAS_RESET_STATUS),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001671 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1672 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1673 .sysc_fields = &omap_hwmod_sysc_type1,
1674};
1675
1676static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1677 .name = "usb_host_hs",
1678 .sysc = &omap3xxx_usb_host_hs_sysc,
1679};
1680
Paul Walmsley844a3b62012-04-19 04:04:33 -06001681
1682static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1683 .name = "usb_host_hs",
1684 .class = &omap3xxx_usb_host_hs_hwmod_class,
Roger Quadrosc6c56692014-04-10 10:18:17 +03001685 .clkdm_name = "usbhost_clkdm",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001686 .main_clk = "usbhost_48m_fck",
1687 .prcm = {
1688 .omap2 = {
1689 .module_offs = OMAP3430ES2_USBHOST_MOD,
1690 .prcm_reg_id = 1,
1691 .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
1692 .idlest_reg_id = 1,
1693 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
1694 .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT,
1695 },
1696 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001697
1698 /*
1699 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1700 * id: i660
1701 *
1702 * Description:
1703 * In the following configuration :
1704 * - USBHOST module is set to smart-idle mode
1705 * - PRCM asserts idle_req to the USBHOST module ( This typically
1706 * happens when the system is going to a low power mode : all ports
1707 * have been suspended, the master part of the USBHOST module has
1708 * entered the standby state, and SW has cut the functional clocks)
1709 * - an USBHOST interrupt occurs before the module is able to answer
1710 * idle_ack, typically a remote wakeup IRQ.
1711 * Then the USB HOST module will enter a deadlock situation where it
1712 * is no more accessible nor functional.
1713 *
1714 * Workaround:
1715 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1716 */
1717
1718 /*
1719 * Errata: USB host EHCI may stall when entering smart-standby mode
1720 * Id: i571
1721 *
1722 * Description:
1723 * When the USBHOST module is set to smart-standby mode, and when it is
1724 * ready to enter the standby state (i.e. all ports are suspended and
1725 * all attached devices are in suspend mode), then it can wrongly assert
1726 * the Mstandby signal too early while there are still some residual OCP
1727 * transactions ongoing. If this condition occurs, the internal state
1728 * machine may go to an undefined state and the USB link may be stuck
1729 * upon the next resume.
1730 *
1731 * Workaround:
1732 * Don't use smart standby; use only force standby,
1733 * hence HWMOD_SWSUP_MSTANDBY
1734 */
1735
Roger Quadros7f4d3642013-12-08 18:39:02 -07001736 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001737};
1738
1739/*
1740 * 'usb_tll_hs' class
1741 * usb_tll_hs module is the adapter on the usb_host_hs ports
1742 */
1743static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1744 .rev_offs = 0x0000,
1745 .sysc_offs = 0x0010,
1746 .syss_offs = 0x0014,
1747 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1748 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1749 SYSC_HAS_AUTOIDLE),
1750 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1751 .sysc_fields = &omap_hwmod_sysc_type1,
1752};
1753
1754static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1755 .name = "usb_tll_hs",
1756 .sysc = &omap3xxx_usb_tll_hs_sysc,
1757};
1758
Paul Walmsley844a3b62012-04-19 04:04:33 -06001759
1760static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1761 .name = "usb_tll_hs",
1762 .class = &omap3xxx_usb_tll_hs_hwmod_class,
Roger Quadrosc6c56692014-04-10 10:18:17 +03001763 .clkdm_name = "core_l4_clkdm",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001764 .main_clk = "usbtll_fck",
1765 .prcm = {
1766 .omap2 = {
1767 .module_offs = CORE_MOD,
1768 .prcm_reg_id = 3,
1769 .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
1770 .idlest_reg_id = 3,
1771 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1772 },
1773 },
1774};
1775
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001776static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1777 .name = "hdq1w",
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001778 .main_clk = "hdq_fck",
1779 .prcm = {
1780 .omap2 = {
1781 .module_offs = CORE_MOD,
1782 .prcm_reg_id = 1,
1783 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1784 .idlest_reg_id = 1,
1785 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1786 },
1787 },
1788 .class = &omap2_hdq1w_class,
1789};
1790
Tero Kristo8f993a02012-09-23 17:28:21 -06001791/* SAD2D */
1792static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
1793 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
1794 { .name = "rst_modem_sw", .rst_shift = 1 },
1795};
1796
1797static struct omap_hwmod_class omap3xxx_sad2d_class = {
1798 .name = "sad2d",
1799};
1800
1801static struct omap_hwmod omap3xxx_sad2d_hwmod = {
1802 .name = "sad2d",
1803 .rst_lines = omap3xxx_sad2d_resets,
1804 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
1805 .main_clk = "sad2d_ick",
1806 .prcm = {
1807 .omap2 = {
1808 .module_offs = CORE_MOD,
1809 .prcm_reg_id = 1,
1810 .module_bit = OMAP3430_EN_SAD2D_SHIFT,
1811 .idlest_reg_id = 1,
1812 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
1813 },
1814 },
1815 .class = &omap3xxx_sad2d_class,
1816};
1817
Paul Walmsley844a3b62012-04-19 04:04:33 -06001818/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06001819 * '32K sync counter' class
1820 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1821 */
1822static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
1823 .rev_offs = 0x0000,
1824 .sysc_offs = 0x0004,
1825 .sysc_flags = SYSC_HAS_SIDLEMODE,
1826 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
1827 .sysc_fields = &omap_hwmod_sysc_type1,
1828};
1829
1830static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
1831 .name = "counter",
1832 .sysc = &omap3xxx_counter_sysc,
1833};
1834
1835static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
1836 .name = "counter_32k",
1837 .class = &omap3xxx_counter_hwmod_class,
1838 .clkdm_name = "wkup_clkdm",
1839 .flags = HWMOD_SWSUP_SIDLE,
1840 .main_clk = "wkup_32k_fck",
1841 .prcm = {
1842 .omap2 = {
1843 .module_offs = WKUP_MOD,
1844 .prcm_reg_id = 1,
1845 .module_bit = OMAP3430_ST_32KSYNC_SHIFT,
1846 .idlest_reg_id = 1,
1847 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
1848 },
1849 },
1850};
1851
Paul Walmsley844a3b62012-04-19 04:04:33 -06001852/*
Afzal Mohammed49484a62012-09-23 17:28:24 -06001853 * 'gpmc' class
1854 * general purpose memory controller
1855 */
1856
1857static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
1858 .rev_offs = 0x0000,
1859 .sysc_offs = 0x0010,
1860 .syss_offs = 0x0014,
1861 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1862 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1863 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1864 .sysc_fields = &omap_hwmod_sysc_type1,
1865};
1866
1867static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
1868 .name = "gpmc",
1869 .sysc = &omap3xxx_gpmc_sysc,
1870};
1871
Afzal Mohammed49484a62012-09-23 17:28:24 -06001872static struct omap_hwmod omap3xxx_gpmc_hwmod = {
1873 .name = "gpmc",
1874 .class = &omap3xxx_gpmc_hwmod_class,
1875 .clkdm_name = "core_l3_clkdm",
Afzal Mohammed49484a62012-09-23 17:28:24 -06001876 .main_clk = "gpmc_fck",
Tony Lindgren63aa9452015-06-01 19:22:10 -06001877 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1878 .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
Afzal Mohammed49484a62012-09-23 17:28:24 -06001879};
1880
1881/*
Paul Walmsley844a3b62012-04-19 04:04:33 -06001882 * interfaces
1883 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05301884
Paul Walmsley73591542010-02-22 22:09:32 -07001885/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001886static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1887 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001888 .slave = &omap3xxx_l4_core_hwmod,
1889 .user = OCP_USER_MPU | OCP_USER_SDMA,
1890};
1891
1892/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001893static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1894 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001895 .slave = &omap3xxx_l4_per_hwmod,
1896 .user = OCP_USER_MPU | OCP_USER_SDMA,
1897};
1898
sricharan4bb194d2011-02-08 22:13:37 +05301899
Paul Walmsley73591542010-02-22 22:09:32 -07001900/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001901static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05301902 .master = &omap3xxx_mpu_hwmod,
1903 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001904 .user = OCP_USER_MPU,
1905};
1906
Jon Hunterc7dad45f2012-09-23 17:28:28 -06001907
1908/* l3 -> debugss */
1909static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
1910 .master = &omap3xxx_l3_main_hwmod,
1911 .slave = &omap3xxx_debugss_hwmod,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06001912 .user = OCP_USER_MPU,
1913};
1914
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001915/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06001916static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
1917 .master = &omap3430es1_dss_core_hwmod,
1918 .slave = &omap3xxx_l3_main_hwmod,
1919 .user = OCP_USER_MPU | OCP_USER_SDMA,
1920};
1921
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001922static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
1923 .master = &omap3xxx_dss_core_hwmod,
1924 .slave = &omap3xxx_l3_main_hwmod,
1925 .fw = {
1926 .omap2 = {
1927 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
1928 .flags = OMAP_FIREWALL_L3,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001929 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001930 },
1931 .user = OCP_USER_MPU | OCP_USER_SDMA,
1932};
1933
Hema HK870ea2b2011-02-17 12:07:18 +05301934/* l3_core -> usbhsotg interface */
1935static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
1936 .master = &omap3xxx_usbhsotg_hwmod,
1937 .slave = &omap3xxx_l3_main_hwmod,
1938 .clk = "core_l3_ick",
1939 .user = OCP_USER_MPU,
1940};
Paul Walmsley73591542010-02-22 22:09:32 -07001941
Hema HK273ff8c2011-02-17 12:07:19 +05301942/* l3_core -> am35xx_usbhsotg interface */
1943static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
1944 .master = &am35xx_usbhsotg_hwmod,
1945 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001946 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05301947 .user = OCP_USER_MPU,
1948};
Paul Walmsley89ea2582012-06-27 14:53:46 -06001949
Tero Kristo8f993a02012-09-23 17:28:21 -06001950/* l3_core -> sad2d interface */
1951static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
1952 .master = &omap3xxx_sad2d_hwmod,
1953 .slave = &omap3xxx_l3_main_hwmod,
1954 .clk = "core_l3_ick",
1955 .user = OCP_USER_MPU,
1956};
1957
Paul Walmsley73591542010-02-22 22:09:32 -07001958/* L4_CORE -> L4_WKUP interface */
1959static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
1960 .master = &omap3xxx_l4_core_hwmod,
1961 .slave = &omap3xxx_l4_wkup_hwmod,
1962 .user = OCP_USER_MPU | OCP_USER_SDMA,
1963};
1964
Paul Walmsleyb1636052011-03-01 13:12:56 -08001965/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001966static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08001967 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001968 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
1969 .clk = "mmchs1_ick",
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001970 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001971 .flags = OMAP_FIREWALL_L4,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001972};
1973
1974static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
1975 .master = &omap3xxx_l4_core_hwmod,
1976 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001977 .clk = "mmchs1_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08001978 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001979 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001980};
1981
1982/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001983static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08001984 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001985 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
1986 .clk = "mmchs2_ick",
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001987 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001988 .flags = OMAP_FIREWALL_L4,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001989};
1990
1991static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
1992 .master = &omap3xxx_l4_core_hwmod,
1993 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001994 .clk = "mmchs2_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08001995 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001996 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001997};
1998
1999/* L4 CORE -> MMC3 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -08002000
2001static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
2002 .master = &omap3xxx_l4_core_hwmod,
2003 .slave = &omap3xxx_mmc3_hwmod,
2004 .clk = "mmchs3_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
Kevin Hilman046465b2010-09-27 20:19:30 +05302009/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302010
2011static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
2012 .master = &omap3xxx_l4_core_hwmod,
2013 .slave = &omap3xxx_uart1_hwmod,
2014 .clk = "uart1_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302015 .user = OCP_USER_MPU | OCP_USER_SDMA,
2016};
2017
2018/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302019
2020static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
2021 .master = &omap3xxx_l4_core_hwmod,
2022 .slave = &omap3xxx_uart2_hwmod,
2023 .clk = "uart2_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302024 .user = OCP_USER_MPU | OCP_USER_SDMA,
2025};
2026
2027/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302028
2029static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
2030 .master = &omap3xxx_l4_per_hwmod,
2031 .slave = &omap3xxx_uart3_hwmod,
2032 .clk = "uart3_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302033 .user = OCP_USER_MPU | OCP_USER_SDMA,
2034};
2035
2036/* L4 PER -> UART4 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05302037
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002038static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05302039 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002040 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05302041 .clk = "uart4_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05302042 .user = OCP_USER_MPU | OCP_USER_SDMA,
2043};
2044
Kyle Manna4bf90f62011-10-18 13:47:41 -05002045/* AM35xx: L4 CORE -> UART4 interface */
Kyle Manna4bf90f62011-10-18 13:47:41 -05002046
2047static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002048 .master = &omap3xxx_l4_core_hwmod,
2049 .slave = &am35xx_uart4_hwmod,
2050 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002051 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05002052};
2053
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302054/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302055static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
2056 .master = &omap3xxx_l4_core_hwmod,
2057 .slave = &omap3xxx_i2c1_hwmod,
2058 .clk = "i2c1_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302059 .fw = {
2060 .omap2 = {
2061 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
2062 .l4_prot_group = 7,
2063 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002064 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302065 },
2066 .user = OCP_USER_MPU | OCP_USER_SDMA,
2067};
2068
2069/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302070static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
2071 .master = &omap3xxx_l4_core_hwmod,
2072 .slave = &omap3xxx_i2c2_hwmod,
2073 .clk = "i2c2_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302074 .fw = {
2075 .omap2 = {
2076 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
2077 .l4_prot_group = 7,
2078 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002079 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302080 },
2081 .user = OCP_USER_MPU | OCP_USER_SDMA,
2082};
2083
2084/* L4 CORE -> I2C3 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302085
2086static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
2087 .master = &omap3xxx_l4_core_hwmod,
2088 .slave = &omap3xxx_i2c3_hwmod,
2089 .clk = "i2c3_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302090 .fw = {
2091 .omap2 = {
2092 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
2093 .l4_prot_group = 7,
2094 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002095 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05302096 },
2097 .user = OCP_USER_MPU | OCP_USER_SDMA,
2098};
2099
Thara Gopinathd3442722010-05-29 22:02:24 +05302100/* L4 CORE -> SR1 interface */
Paul Walmsley844a3b62012-04-19 04:04:33 -06002101static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302102 .master = &omap3xxx_l4_core_hwmod,
2103 .slave = &omap34xx_sr1_hwmod,
2104 .clk = "sr_l4_ick",
Thara Gopinathd3442722010-05-29 22:02:24 +05302105 .user = OCP_USER_MPU,
2106};
2107
Paul Walmsley844a3b62012-04-19 04:04:33 -06002108static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
2109 .master = &omap3xxx_l4_core_hwmod,
2110 .slave = &omap36xx_sr1_hwmod,
2111 .clk = "sr_l4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -06002112 .user = OCP_USER_MPU,
2113};
2114
Tony Lindgren9cffb1a2017-10-10 14:27:33 -07002115/* L4 CORE -> SR2 interface */
Thara Gopinathd3442722010-05-29 22:02:24 +05302116
Paul Walmsley844a3b62012-04-19 04:04:33 -06002117static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05302118 .master = &omap3xxx_l4_core_hwmod,
2119 .slave = &omap34xx_sr2_hwmod,
2120 .clk = "sr_l4_ick",
Thara Gopinathd3442722010-05-29 22:02:24 +05302121 .user = OCP_USER_MPU,
2122};
2123
Paul Walmsley844a3b62012-04-19 04:04:33 -06002124static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
2125 .master = &omap3xxx_l4_core_hwmod,
2126 .slave = &omap36xx_sr2_hwmod,
2127 .clk = "sr_l4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -06002128 .user = OCP_USER_MPU,
2129};
Hema HK870ea2b2011-02-17 12:07:18 +05302130
Hema HK870ea2b2011-02-17 12:07:18 +05302131
2132/* l4_core -> usbhsotg */
2133static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2134 .master = &omap3xxx_l4_core_hwmod,
2135 .slave = &omap3xxx_usbhsotg_hwmod,
2136 .clk = "l4_ick",
Hema HK870ea2b2011-02-17 12:07:18 +05302137 .user = OCP_USER_MPU,
2138};
2139
Hema HK273ff8c2011-02-17 12:07:19 +05302140
2141/* l4_core -> usbhsotg */
2142static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2143 .master = &omap3xxx_l4_core_hwmod,
2144 .slave = &am35xx_usbhsotg_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002145 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302146 .user = OCP_USER_MPU,
2147};
2148
Paul Walmsley43085702012-04-19 04:03:53 -06002149/* L4_WKUP -> L4_SEC interface */
2150static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2151 .master = &omap3xxx_l4_wkup_hwmod,
2152 .slave = &omap3xxx_l4_sec_hwmod,
2153 .user = OCP_USER_MPU | OCP_USER_SDMA,
2154};
2155
Kevin Hilman540064b2010-07-26 16:34:32 -06002156/* IVA2 <- L3 interface */
2157static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2158 .master = &omap3xxx_l3_main_hwmod,
2159 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002160 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002161 .user = OCP_USER_MPU | OCP_USER_SDMA,
2162};
2163
Thara Gopinathce722d22011-02-23 00:14:05 -07002164
2165/* l4_wkup -> timer1 */
2166static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2167 .master = &omap3xxx_l4_wkup_hwmod,
2168 .slave = &omap3xxx_timer1_hwmod,
2169 .clk = "gpt1_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002170 .user = OCP_USER_MPU | OCP_USER_SDMA,
2171};
2172
Thara Gopinathce722d22011-02-23 00:14:05 -07002173
2174/* l4_per -> timer2 */
2175static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2176 .master = &omap3xxx_l4_per_hwmod,
2177 .slave = &omap3xxx_timer2_hwmod,
2178 .clk = "gpt2_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002179 .user = OCP_USER_MPU | OCP_USER_SDMA,
2180};
2181
Thara Gopinathce722d22011-02-23 00:14:05 -07002182
2183/* l4_per -> timer3 */
2184static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2185 .master = &omap3xxx_l4_per_hwmod,
2186 .slave = &omap3xxx_timer3_hwmod,
2187 .clk = "gpt3_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002188 .user = OCP_USER_MPU | OCP_USER_SDMA,
2189};
2190
Thara Gopinathce722d22011-02-23 00:14:05 -07002191
2192/* l4_per -> timer4 */
2193static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2194 .master = &omap3xxx_l4_per_hwmod,
2195 .slave = &omap3xxx_timer4_hwmod,
2196 .clk = "gpt4_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002197 .user = OCP_USER_MPU | OCP_USER_SDMA,
2198};
2199
Thara Gopinathce722d22011-02-23 00:14:05 -07002200
2201/* l4_per -> timer5 */
2202static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2203 .master = &omap3xxx_l4_per_hwmod,
2204 .slave = &omap3xxx_timer5_hwmod,
2205 .clk = "gpt5_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002206 .user = OCP_USER_MPU | OCP_USER_SDMA,
2207};
2208
Thara Gopinathce722d22011-02-23 00:14:05 -07002209
2210/* l4_per -> timer6 */
2211static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2212 .master = &omap3xxx_l4_per_hwmod,
2213 .slave = &omap3xxx_timer6_hwmod,
2214 .clk = "gpt6_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002215 .user = OCP_USER_MPU | OCP_USER_SDMA,
2216};
2217
Thara Gopinathce722d22011-02-23 00:14:05 -07002218
2219/* l4_per -> timer7 */
2220static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2221 .master = &omap3xxx_l4_per_hwmod,
2222 .slave = &omap3xxx_timer7_hwmod,
2223 .clk = "gpt7_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002224 .user = OCP_USER_MPU | OCP_USER_SDMA,
2225};
2226
Thara Gopinathce722d22011-02-23 00:14:05 -07002227
2228/* l4_per -> timer8 */
2229static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2230 .master = &omap3xxx_l4_per_hwmod,
2231 .slave = &omap3xxx_timer8_hwmod,
2232 .clk = "gpt8_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002233 .user = OCP_USER_MPU | OCP_USER_SDMA,
2234};
2235
Thara Gopinathce722d22011-02-23 00:14:05 -07002236
2237/* l4_per -> timer9 */
2238static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2239 .master = &omap3xxx_l4_per_hwmod,
2240 .slave = &omap3xxx_timer9_hwmod,
2241 .clk = "gpt9_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002242 .user = OCP_USER_MPU | OCP_USER_SDMA,
2243};
2244
Thara Gopinathce722d22011-02-23 00:14:05 -07002245/* l4_core -> timer10 */
2246static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2247 .master = &omap3xxx_l4_core_hwmod,
2248 .slave = &omap3xxx_timer10_hwmod,
2249 .clk = "gpt10_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002250 .user = OCP_USER_MPU | OCP_USER_SDMA,
2251};
2252
Thara Gopinathce722d22011-02-23 00:14:05 -07002253/* l4_core -> timer11 */
2254static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2255 .master = &omap3xxx_l4_core_hwmod,
2256 .slave = &omap3xxx_timer11_hwmod,
2257 .clk = "gpt11_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002258 .user = OCP_USER_MPU | OCP_USER_SDMA,
2259};
2260
Thara Gopinathce722d22011-02-23 00:14:05 -07002261
2262/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002263static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2264 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002265 .slave = &omap3xxx_timer12_hwmod,
2266 .clk = "gpt12_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002267 .user = OCP_USER_MPU | OCP_USER_SDMA,
2268};
2269
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302270/* l4_wkup -> wd_timer2 */
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302271
2272static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2273 .master = &omap3xxx_l4_wkup_hwmod,
2274 .slave = &omap3xxx_wd_timer2_hwmod,
2275 .clk = "wdt2_ick",
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302276 .user = OCP_USER_MPU | OCP_USER_SDMA,
2277};
2278
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002279/* l4_core -> dss */
2280static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2281 .master = &omap3xxx_l4_core_hwmod,
2282 .slave = &omap3430es1_dss_core_hwmod,
2283 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002284 .fw = {
2285 .omap2 = {
2286 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2287 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2288 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002289 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002290 },
2291 .user = OCP_USER_MPU | OCP_USER_SDMA,
2292};
2293
2294static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2295 .master = &omap3xxx_l4_core_hwmod,
2296 .slave = &omap3xxx_dss_core_hwmod,
2297 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002298 .fw = {
2299 .omap2 = {
2300 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2301 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2302 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002303 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002304 },
2305 .user = OCP_USER_MPU | OCP_USER_SDMA,
2306};
2307
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002308/* l4_core -> dss_dispc */
2309static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2310 .master = &omap3xxx_l4_core_hwmod,
2311 .slave = &omap3xxx_dss_dispc_hwmod,
2312 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002313 .fw = {
2314 .omap2 = {
2315 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2316 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2317 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002318 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002319 },
2320 .user = OCP_USER_MPU | OCP_USER_SDMA,
2321};
2322
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002323/* l4_core -> dss_dsi1 */
2324static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2325 .master = &omap3xxx_l4_core_hwmod,
2326 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002327 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002328 .fw = {
2329 .omap2 = {
2330 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2331 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2332 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002333 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002334 },
2335 .user = OCP_USER_MPU | OCP_USER_SDMA,
2336};
2337
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002338/* l4_core -> dss_rfbi */
2339static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2340 .master = &omap3xxx_l4_core_hwmod,
2341 .slave = &omap3xxx_dss_rfbi_hwmod,
2342 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002343 .fw = {
2344 .omap2 = {
2345 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2346 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2347 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002348 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002349 },
2350 .user = OCP_USER_MPU | OCP_USER_SDMA,
2351};
2352
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002353/* l4_core -> dss_venc */
2354static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2355 .master = &omap3xxx_l4_core_hwmod,
2356 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002357 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002358 .fw = {
2359 .omap2 = {
2360 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2361 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2362 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002363 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002364 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002365 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002366 .user = OCP_USER_MPU | OCP_USER_SDMA,
2367};
2368
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002369/* l4_wkup -> gpio1 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002370
2371static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2372 .master = &omap3xxx_l4_wkup_hwmod,
2373 .slave = &omap3xxx_gpio1_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002374 .user = OCP_USER_MPU | OCP_USER_SDMA,
2375};
2376
2377/* l4_per -> gpio2 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002378
2379static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2380 .master = &omap3xxx_l4_per_hwmod,
2381 .slave = &omap3xxx_gpio2_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002382 .user = OCP_USER_MPU | OCP_USER_SDMA,
2383};
2384
2385/* l4_per -> gpio3 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002386
2387static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2388 .master = &omap3xxx_l4_per_hwmod,
2389 .slave = &omap3xxx_gpio3_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002390 .user = OCP_USER_MPU | OCP_USER_SDMA,
2391};
2392
Paul Walmsley54864742012-09-23 17:28:23 -06002393/*
2394 * 'mmu' class
2395 * The memory management unit performs virtual to physical address translation
2396 * for its requestors.
2397 */
2398
2399static struct omap_hwmod_class_sysconfig mmu_sysc = {
2400 .rev_offs = 0x000,
2401 .sysc_offs = 0x010,
2402 .syss_offs = 0x014,
2403 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2404 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2405 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2406 .sysc_fields = &omap_hwmod_sysc_type1,
2407};
2408
2409static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2410 .name = "mmu",
2411 .sysc = &mmu_sysc,
2412};
2413
2414/* mmu isp */
Paul Walmsley54864742012-09-23 17:28:23 -06002415static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
Paul Walmsley54864742012-09-23 17:28:23 -06002416
2417/* l4_core -> mmu isp */
2418static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2419 .master = &omap3xxx_l4_core_hwmod,
2420 .slave = &omap3xxx_mmu_isp_hwmod,
Paul Walmsley54864742012-09-23 17:28:23 -06002421 .user = OCP_USER_MPU | OCP_USER_SDMA,
2422};
2423
2424static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
2425 .name = "mmu_isp",
2426 .class = &omap3xxx_mmu_hwmod_class,
Paul Walmsley54864742012-09-23 17:28:23 -06002427 .main_clk = "cam_ick",
Paul Walmsley54864742012-09-23 17:28:23 -06002428 .flags = HWMOD_NO_IDLEST,
2429};
2430
Paul Walmsley54864742012-09-23 17:28:23 -06002431/* mmu iva */
2432
Paul Walmsley54864742012-09-23 17:28:23 -06002433static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
Paul Walmsley54864742012-09-23 17:28:23 -06002434
2435static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
2436 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
2437};
2438
Paul Walmsley54864742012-09-23 17:28:23 -06002439/* l3_main -> iva mmu */
2440static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
2441 .master = &omap3xxx_l3_main_hwmod,
2442 .slave = &omap3xxx_mmu_iva_hwmod,
Paul Walmsley54864742012-09-23 17:28:23 -06002443 .user = OCP_USER_MPU | OCP_USER_SDMA,
2444};
2445
2446static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
2447 .name = "mmu_iva",
2448 .class = &omap3xxx_mmu_hwmod_class,
Suman Anna200a2742014-03-05 18:24:11 -06002449 .clkdm_name = "iva2_clkdm",
Paul Walmsley54864742012-09-23 17:28:23 -06002450 .rst_lines = omap3xxx_mmu_iva_resets,
2451 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
2452 .main_clk = "iva2_ck",
2453 .prcm = {
2454 .omap2 = {
2455 .module_offs = OMAP3430_IVA2_MOD,
Suman Anna200a2742014-03-05 18:24:11 -06002456 .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
2457 .idlest_reg_id = 1,
2458 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
Paul Walmsley54864742012-09-23 17:28:23 -06002459 },
2460 },
Paul Walmsley54864742012-09-23 17:28:23 -06002461 .flags = HWMOD_NO_IDLEST,
2462};
2463
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002464/* l4_per -> gpio4 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002465
2466static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2467 .master = &omap3xxx_l4_per_hwmod,
2468 .slave = &omap3xxx_gpio4_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002469 .user = OCP_USER_MPU | OCP_USER_SDMA,
2470};
2471
2472/* l4_per -> gpio5 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002473
2474static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2475 .master = &omap3xxx_l4_per_hwmod,
2476 .slave = &omap3xxx_gpio5_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002477 .user = OCP_USER_MPU | OCP_USER_SDMA,
2478};
2479
2480/* l4_per -> gpio6 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002481
2482static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2483 .master = &omap3xxx_l4_per_hwmod,
2484 .slave = &omap3xxx_gpio6_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002485 .user = OCP_USER_MPU | OCP_USER_SDMA,
2486};
2487
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002488/* dma_system -> L3 */
2489static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2490 .master = &omap3xxx_dma_system_hwmod,
2491 .slave = &omap3xxx_l3_main_hwmod,
2492 .clk = "core_l3_ick",
2493 .user = OCP_USER_MPU | OCP_USER_SDMA,
2494};
2495
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002496/* l4_cfg -> dma_system */
2497static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2498 .master = &omap3xxx_l4_core_hwmod,
2499 .slave = &omap3xxx_dma_system_hwmod,
2500 .clk = "core_l4_ick",
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002501 .user = OCP_USER_MPU | OCP_USER_SDMA,
2502};
2503
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302504
2505/* l4_core -> mcbsp1 */
2506static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2507 .master = &omap3xxx_l4_core_hwmod,
2508 .slave = &omap3xxx_mcbsp1_hwmod,
2509 .clk = "mcbsp1_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302510 .user = OCP_USER_MPU | OCP_USER_SDMA,
2511};
2512
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302513
2514/* l4_per -> mcbsp2 */
2515static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2516 .master = &omap3xxx_l4_per_hwmod,
2517 .slave = &omap3xxx_mcbsp2_hwmod,
2518 .clk = "mcbsp2_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302519 .user = OCP_USER_MPU | OCP_USER_SDMA,
2520};
2521
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302522
2523/* l4_per -> mcbsp3 */
2524static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2525 .master = &omap3xxx_l4_per_hwmod,
2526 .slave = &omap3xxx_mcbsp3_hwmod,
2527 .clk = "mcbsp3_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302528 .user = OCP_USER_MPU | OCP_USER_SDMA,
2529};
2530
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302531
2532/* l4_per -> mcbsp4 */
2533static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2534 .master = &omap3xxx_l4_per_hwmod,
2535 .slave = &omap3xxx_mcbsp4_hwmod,
2536 .clk = "mcbsp4_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302537 .user = OCP_USER_MPU | OCP_USER_SDMA,
2538};
2539
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302540
2541/* l4_core -> mcbsp5 */
2542static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2543 .master = &omap3xxx_l4_core_hwmod,
2544 .slave = &omap3xxx_mcbsp5_hwmod,
2545 .clk = "mcbsp5_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302546 .user = OCP_USER_MPU | OCP_USER_SDMA,
2547};
2548
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302549
2550/* l4_per -> mcbsp2_sidetone */
2551static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2552 .master = &omap3xxx_l4_per_hwmod,
2553 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2554 .clk = "mcbsp2_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302555 .user = OCP_USER_MPU,
2556};
2557
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302558
2559/* l4_per -> mcbsp3_sidetone */
2560static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2561 .master = &omap3xxx_l4_per_hwmod,
2562 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2563 .clk = "mcbsp3_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302564 .user = OCP_USER_MPU,
2565};
2566
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002567/* l4_core -> mailbox */
2568static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2569 .master = &omap3xxx_l4_core_hwmod,
2570 .slave = &omap3xxx_mailbox_hwmod,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002571 .user = OCP_USER_MPU | OCP_USER_SDMA,
2572};
2573
Charulatha V0f616a42011-02-17 09:53:10 -08002574/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002575static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2576 .master = &omap3xxx_l4_core_hwmod,
2577 .slave = &omap34xx_mcspi1,
2578 .clk = "mcspi1_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002579 .user = OCP_USER_MPU | OCP_USER_SDMA,
2580};
2581
2582/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002583static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2584 .master = &omap3xxx_l4_core_hwmod,
2585 .slave = &omap34xx_mcspi2,
2586 .clk = "mcspi2_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002587 .user = OCP_USER_MPU | OCP_USER_SDMA,
2588};
2589
2590/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002591static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2592 .master = &omap3xxx_l4_core_hwmod,
2593 .slave = &omap34xx_mcspi3,
2594 .clk = "mcspi3_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002595 .user = OCP_USER_MPU | OCP_USER_SDMA,
2596};
2597
2598/* l4 core -> mcspi4 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002599
2600static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2601 .master = &omap3xxx_l4_core_hwmod,
2602 .slave = &omap34xx_mcspi4,
2603 .clk = "mcspi4_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002604 .user = OCP_USER_MPU | OCP_USER_SDMA,
2605};
2606
Keshava Munegowdade231382011-12-15 23:14:44 -07002607static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
2608 .master = &omap3xxx_usb_host_hs_hwmod,
2609 .slave = &omap3xxx_l3_main_hwmod,
2610 .clk = "core_l3_ick",
2611 .user = OCP_USER_MPU,
2612};
2613
Keshava Munegowdade231382011-12-15 23:14:44 -07002614
2615static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
2616 .master = &omap3xxx_l4_core_hwmod,
2617 .slave = &omap3xxx_usb_host_hs_hwmod,
2618 .clk = "usbhost_ick",
Keshava Munegowdade231382011-12-15 23:14:44 -07002619 .user = OCP_USER_MPU | OCP_USER_SDMA,
2620};
2621
Keshava Munegowdade231382011-12-15 23:14:44 -07002622
2623static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
2624 .master = &omap3xxx_l4_core_hwmod,
2625 .slave = &omap3xxx_usb_tll_hs_hwmod,
2626 .clk = "usbtll_ick",
Keshava Munegowdade231382011-12-15 23:14:44 -07002627 .user = OCP_USER_MPU | OCP_USER_SDMA,
2628};
2629
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002630/* l4_core -> hdq1w interface */
2631static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
2632 .master = &omap3xxx_l4_core_hwmod,
2633 .slave = &omap3xxx_hdq1w_hwmod,
2634 .clk = "hdq_ick",
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002635 .user = OCP_USER_MPU | OCP_USER_SDMA,
2636 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
2637};
2638
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002639/* l4_wkup -> 32ksync_counter */
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002640
Afzal Mohammed49484a62012-09-23 17:28:24 -06002641
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002642static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
2643 .master = &omap3xxx_l4_wkup_hwmod,
2644 .slave = &omap3xxx_counter_32k_hwmod,
2645 .clk = "omap_32ksync_ick",
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002646 .user = OCP_USER_MPU | OCP_USER_SDMA,
2647};
2648
Mark A. Greer31ba8802012-06-27 14:59:57 -06002649/* am35xx has Davinci MDIO & EMAC */
2650static struct omap_hwmod_class am35xx_mdio_class = {
2651 .name = "davinci_mdio",
2652};
2653
2654static struct omap_hwmod am35xx_mdio_hwmod = {
2655 .name = "davinci_mdio",
2656 .class = &am35xx_mdio_class,
2657 .flags = HWMOD_NO_IDLEST,
2658};
2659
2660/*
2661 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2662 * but this will probably require some additional hwmod core support,
2663 * so is left as a future to-do item.
2664 */
2665static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
2666 .master = &am35xx_mdio_hwmod,
2667 .slave = &omap3xxx_l3_main_hwmod,
2668 .clk = "emac_fck",
2669 .user = OCP_USER_MPU,
2670};
2671
Mark A. Greer31ba8802012-06-27 14:59:57 -06002672/* l4_core -> davinci mdio */
2673/*
2674 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2675 * but this will probably require some additional hwmod core support,
2676 * so is left as a future to-do item.
2677 */
2678static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
2679 .master = &omap3xxx_l4_core_hwmod,
2680 .slave = &am35xx_mdio_hwmod,
2681 .clk = "emac_fck",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002682 .user = OCP_USER_MPU,
2683};
2684
Mark A. Greer31ba8802012-06-27 14:59:57 -06002685static struct omap_hwmod_class am35xx_emac_class = {
2686 .name = "davinci_emac",
2687};
2688
2689static struct omap_hwmod am35xx_emac_hwmod = {
2690 .name = "davinci_emac",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002691 .class = &am35xx_emac_class,
Paul Walmsley814a18a2013-02-06 13:48:56 -07002692 /*
2693 * According to Mark Greer, the MPU will not return from WFI
2694 * when the EMAC signals an interrupt.
2695 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2696 */
2697 .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
Mark A. Greer31ba8802012-06-27 14:59:57 -06002698};
2699
2700/* l3_core -> davinci emac interface */
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_emac__l3 = {
2707 .master = &am35xx_emac_hwmod,
2708 .slave = &omap3xxx_l3_main_hwmod,
2709 .clk = "emac_ick",
2710 .user = OCP_USER_MPU,
2711};
2712
Mark A. Greer31ba8802012-06-27 14:59:57 -06002713/* l4_core -> davinci emac */
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__emac = {
2720 .master = &omap3xxx_l4_core_hwmod,
2721 .slave = &am35xx_emac_hwmod,
2722 .clk = "emac_ick",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002723 .user = OCP_USER_MPU,
2724};
2725
Afzal Mohammed49484a62012-09-23 17:28:24 -06002726static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
2727 .master = &omap3xxx_l3_main_hwmod,
2728 .slave = &omap3xxx_gpmc_hwmod,
2729 .clk = "core_l3_ick",
Afzal Mohammed49484a62012-09-23 17:28:24 -06002730 .user = OCP_USER_MPU | OCP_USER_SDMA,
2731};
2732
Mark A. Greer26f88e62013-03-18 10:06:32 -06002733/* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
2734static struct omap_hwmod_sysc_fields omap3_sham_sysc_fields = {
2735 .sidle_shift = 4,
2736 .srst_shift = 1,
2737 .autoidle_shift = 0,
2738};
2739
2740static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
2741 .rev_offs = 0x5c,
2742 .sysc_offs = 0x60,
2743 .syss_offs = 0x64,
2744 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2745 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2746 .sysc_fields = &omap3_sham_sysc_fields,
2747};
2748
2749static struct omap_hwmod_class omap3xxx_sham_class = {
2750 .name = "sham",
2751 .sysc = &omap3_sham_sysc,
2752};
2753
Mark A. Greer26f88e62013-03-18 10:06:32 -06002754
Mark A. Greer26f88e62013-03-18 10:06:32 -06002755
2756static struct omap_hwmod omap3xxx_sham_hwmod = {
2757 .name = "sham",
Mark A. Greer26f88e62013-03-18 10:06:32 -06002758 .main_clk = "sha12_ick",
2759 .prcm = {
2760 .omap2 = {
2761 .module_offs = CORE_MOD,
2762 .prcm_reg_id = 1,
2763 .module_bit = OMAP3430_EN_SHA12_SHIFT,
2764 .idlest_reg_id = 1,
2765 .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
2766 },
2767 },
2768 .class = &omap3xxx_sham_class,
2769};
2770
Mark A. Greer26f88e62013-03-18 10:06:32 -06002771
2772static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
2773 .master = &omap3xxx_l4_core_hwmod,
2774 .slave = &omap3xxx_sham_hwmod,
2775 .clk = "sha12_ick",
Mark A. Greer26f88e62013-03-18 10:06:32 -06002776 .user = OCP_USER_MPU | OCP_USER_SDMA,
2777};
2778
Mark A. Greer14ae5562012-12-21 09:28:10 -07002779/* l4_core -> AES */
2780static struct omap_hwmod_sysc_fields omap3xxx_aes_sysc_fields = {
2781 .sidle_shift = 6,
2782 .srst_shift = 1,
2783 .autoidle_shift = 0,
2784};
2785
2786static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
2787 .rev_offs = 0x44,
2788 .sysc_offs = 0x48,
2789 .syss_offs = 0x4c,
2790 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2791 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2792 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2793 .sysc_fields = &omap3xxx_aes_sysc_fields,
2794};
2795
2796static struct omap_hwmod_class omap3xxx_aes_class = {
2797 .name = "aes",
2798 .sysc = &omap3_aes_sysc,
2799};
2800
Mark A. Greer14ae5562012-12-21 09:28:10 -07002801
2802static struct omap_hwmod omap3xxx_aes_hwmod = {
2803 .name = "aes",
Mark A. Greer14ae5562012-12-21 09:28:10 -07002804 .main_clk = "aes2_ick",
2805 .prcm = {
2806 .omap2 = {
2807 .module_offs = CORE_MOD,
2808 .prcm_reg_id = 1,
2809 .module_bit = OMAP3430_EN_AES2_SHIFT,
2810 .idlest_reg_id = 1,
2811 .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
2812 },
2813 },
2814 .class = &omap3xxx_aes_class,
2815};
2816
Mark A. Greer14ae5562012-12-21 09:28:10 -07002817
2818static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
2819 .master = &omap3xxx_l4_core_hwmod,
2820 .slave = &omap3xxx_aes_hwmod,
2821 .clk = "aes2_ick",
Mark A. Greer14ae5562012-12-21 09:28:10 -07002822 .user = OCP_USER_MPU | OCP_USER_SDMA,
2823};
2824
Sebastian Reichel398917c2013-10-08 23:46:49 -06002825/*
2826 * 'ssi' class
2827 * synchronous serial interface (multichannel and full-duplex serial if)
2828 */
2829
2830static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
2831 .rev_offs = 0x0000,
2832 .sysc_offs = 0x0010,
2833 .syss_offs = 0x0014,
Tony Lindgrendc94fab2014-05-21 12:31:35 -07002834 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
2835 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2836 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Sebastian Reichel398917c2013-10-08 23:46:49 -06002837 .sysc_fields = &omap_hwmod_sysc_type1,
2838};
2839
Sebastian Reichel77112072016-01-17 16:49:05 +01002840static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002841 .name = "ssi",
2842 .sysc = &omap34xx_ssi_sysc,
2843};
2844
Sebastian Reichel77112072016-01-17 16:49:05 +01002845static struct omap_hwmod omap3xxx_ssi_hwmod = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002846 .name = "ssi",
Sebastian Reichel77112072016-01-17 16:49:05 +01002847 .class = &omap3xxx_ssi_hwmod_class,
Sebastian Reichel398917c2013-10-08 23:46:49 -06002848 .clkdm_name = "core_l4_clkdm",
2849 .main_clk = "ssi_ssr_fck",
2850 .prcm = {
2851 .omap2 = {
2852 .prcm_reg_id = 1,
2853 .module_bit = OMAP3430_EN_SSI_SHIFT,
2854 .module_offs = CORE_MOD,
2855 .idlest_reg_id = 1,
2856 .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
2857 },
2858 },
2859};
2860
2861/* L4 CORE -> SSI */
Sebastian Reichel77112072016-01-17 16:49:05 +01002862static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002863 .master = &omap3xxx_l4_core_hwmod,
Sebastian Reichel77112072016-01-17 16:49:05 +01002864 .slave = &omap3xxx_ssi_hwmod,
Sebastian Reichel398917c2013-10-08 23:46:49 -06002865 .clk = "ssi_ick",
2866 .user = OCP_USER_MPU | OCP_USER_SDMA,
2867};
2868
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002869static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
2870 &omap3xxx_l3_main__l4_core,
2871 &omap3xxx_l3_main__l4_per,
2872 &omap3xxx_mpu__l3_main,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06002873 &omap3xxx_l3_main__l4_debugss,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002874 &omap3xxx_l4_core__l4_wkup,
2875 &omap3xxx_l4_core__mmc3,
2876 &omap3_l4_core__uart1,
2877 &omap3_l4_core__uart2,
2878 &omap3_l4_per__uart3,
2879 &omap3_l4_core__i2c1,
2880 &omap3_l4_core__i2c2,
2881 &omap3_l4_core__i2c3,
2882 &omap3xxx_l4_wkup__l4_sec,
2883 &omap3xxx_l4_wkup__timer1,
2884 &omap3xxx_l4_per__timer2,
2885 &omap3xxx_l4_per__timer3,
2886 &omap3xxx_l4_per__timer4,
2887 &omap3xxx_l4_per__timer5,
2888 &omap3xxx_l4_per__timer6,
2889 &omap3xxx_l4_per__timer7,
2890 &omap3xxx_l4_per__timer8,
2891 &omap3xxx_l4_per__timer9,
2892 &omap3xxx_l4_core__timer10,
2893 &omap3xxx_l4_core__timer11,
2894 &omap3xxx_l4_wkup__wd_timer2,
2895 &omap3xxx_l4_wkup__gpio1,
2896 &omap3xxx_l4_per__gpio2,
2897 &omap3xxx_l4_per__gpio3,
2898 &omap3xxx_l4_per__gpio4,
2899 &omap3xxx_l4_per__gpio5,
2900 &omap3xxx_l4_per__gpio6,
2901 &omap3xxx_dma_system__l3,
2902 &omap3xxx_l4_core__dma_system,
2903 &omap3xxx_l4_core__mcbsp1,
2904 &omap3xxx_l4_per__mcbsp2,
2905 &omap3xxx_l4_per__mcbsp3,
2906 &omap3xxx_l4_per__mcbsp4,
2907 &omap3xxx_l4_core__mcbsp5,
2908 &omap3xxx_l4_per__mcbsp2_sidetone,
2909 &omap3xxx_l4_per__mcbsp3_sidetone,
2910 &omap34xx_l4_core__mcspi1,
2911 &omap34xx_l4_core__mcspi2,
2912 &omap34xx_l4_core__mcspi3,
2913 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002914 &omap3xxx_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -06002915 &omap3xxx_l3_main__gpmc,
Paul Walmsley73591542010-02-22 22:09:32 -07002916 NULL,
2917};
2918
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002919/* GP-only hwmod links */
Mark A. Greer26f88e62013-03-18 10:06:32 -06002920static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002921 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002922 NULL,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002923};
2924
2925static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
2926 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002927 NULL,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002928};
2929
2930static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
2931 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002932 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002933};
2934
2935/* crypto hwmod links */
2936static struct omap_hwmod_ocp_if *omap34xx_sham_hwmod_ocp_ifs[] __initdata = {
2937 &omap3xxx_l4_core__sham,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002938 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002939};
2940
2941static struct omap_hwmod_ocp_if *omap34xx_aes_hwmod_ocp_ifs[] __initdata = {
2942 &omap3xxx_l4_core__aes,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002943 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002944};
2945
2946static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = {
2947 &omap3xxx_l4_core__sham,
2948 NULL
2949};
2950
2951static struct omap_hwmod_ocp_if *omap36xx_aes_hwmod_ocp_ifs[] __initdata = {
2952 &omap3xxx_l4_core__aes,
2953 NULL
2954};
2955
2956/*
2957 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2958 * only present on some AM35xx chips, and no one knows which
2959 * ones. See
2960 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
2961 * if you need these IP blocks on an AM35xx, try uncommenting
2962 * the following lines.
2963 */
2964static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = {
Mark A. Greer26f88e62013-03-18 10:06:32 -06002965 /* &omap3xxx_l4_core__sham, */
Pali Rohára55a7442015-02-26 14:49:52 +01002966 NULL
2967};
2968
2969static struct omap_hwmod_ocp_if *am35xx_aes_hwmod_ocp_ifs[] __initdata = {
Mark A. Greer14ae5562012-12-21 09:28:10 -07002970 /* &omap3xxx_l4_core__aes, */
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002971 NULL,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07002972};
2973
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002974/* 3430ES1-only hwmod links */
2975static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
2976 &omap3430es1_dss__l3,
2977 &omap3430es1_l4_core__dss,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002978 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002979};
2980
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002981/* 3430ES2+-only hwmod links */
2982static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
2983 &omap3xxx_dss__l3,
2984 &omap3xxx_l4_core__dss,
2985 &omap3xxx_usbhsotg__l3,
2986 &omap3xxx_l4_core__usbhsotg,
2987 &omap3xxx_usb_host_hs__l3_main_2,
2988 &omap3xxx_l4_core__usb_host_hs,
2989 &omap3xxx_l4_core__usb_tll_hs,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002990 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002991};
2992
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002993/* <= 3430ES3-only hwmod links */
2994static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
2995 &omap3xxx_l4_core__pre_es3_mmc1,
2996 &omap3xxx_l4_core__pre_es3_mmc2,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002997 NULL,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002998};
2999
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003000/* 3430ES3+-only hwmod links */
3001static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
3002 &omap3xxx_l4_core__es3plus_mmc1,
3003 &omap3xxx_l4_core__es3plus_mmc2,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003004 NULL,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003005};
3006
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003007/* 34xx-only hwmod links (all ES revisions) */
3008static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3009 &omap3xxx_l3__iva,
3010 &omap34xx_l4_core__sr1,
3011 &omap34xx_l4_core__sr2,
3012 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003013 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06003014 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06003015 &omap3xxx_l4_core__mmu_isp,
Paul Walmsley54864742012-09-23 17:28:23 -06003016 &omap3xxx_l3_main__mmu_iva,
Sebastian Reichel77112072016-01-17 16:49:05 +01003017 &omap3xxx_l4_core__ssi,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003018 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003019};
3020
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003021/* 36xx-only hwmod links (all ES revisions) */
3022static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3023 &omap3xxx_l3__iva,
3024 &omap36xx_l4_per__uart4,
3025 &omap3xxx_dss__l3,
3026 &omap3xxx_l4_core__dss,
3027 &omap36xx_l4_core__sr1,
3028 &omap36xx_l4_core__sr2,
3029 &omap3xxx_usbhsotg__l3,
3030 &omap3xxx_l4_core__usbhsotg,
3031 &omap3xxx_l4_core__mailbox,
3032 &omap3xxx_usb_host_hs__l3_main_2,
3033 &omap3xxx_l4_core__usb_host_hs,
3034 &omap3xxx_l4_core__usb_tll_hs,
3035 &omap3xxx_l4_core__es3plus_mmc1,
3036 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06003037 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06003038 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06003039 &omap3xxx_l4_core__mmu_isp,
Paul Walmsley54864742012-09-23 17:28:23 -06003040 &omap3xxx_l3_main__mmu_iva,
Sebastian Reichel77112072016-01-17 16:49:05 +01003041 &omap3xxx_l4_core__ssi,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003042 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003043};
3044
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003045static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
3046 &omap3xxx_dss__l3,
3047 &omap3xxx_l4_core__dss,
3048 &am35xx_usbhsotg__l3,
3049 &am35xx_l4_core__usbhsotg,
3050 &am35xx_l4_core__uart4,
3051 &omap3xxx_usb_host_hs__l3_main_2,
3052 &omap3xxx_l4_core__usb_host_hs,
3053 &omap3xxx_l4_core__usb_tll_hs,
3054 &omap3xxx_l4_core__es3plus_mmc1,
3055 &omap3xxx_l4_core__es3plus_mmc2,
Raphael Assenatb1a923d2012-09-17 10:56:14 -04003056 &omap3xxx_l4_core__hdq1w,
Mark A. Greer31ba8802012-06-27 14:59:57 -06003057 &am35xx_mdio__l3,
3058 &am35xx_l4_core__mdio,
3059 &am35xx_emac__l3,
3060 &am35xx_l4_core__emac,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003061 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003062};
3063
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003064static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
3065 &omap3xxx_l4_core__dss_dispc,
3066 &omap3xxx_l4_core__dss_dsi1,
3067 &omap3xxx_l4_core__dss_rfbi,
3068 &omap3xxx_l4_core__dss_venc,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07003069 NULL,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003070};
3071
Pali Rohára55a7442015-02-26 14:49:52 +01003072/**
3073 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
3074 * @bus: struct device_node * for the top-level OMAP DT data
3075 * @dev_name: device name used in the DT file
3076 *
3077 * Determine whether a "secure" IP block @dev_name is usable by Linux.
3078 * There doesn't appear to be a 100% reliable way to determine this,
3079 * so we rely on heuristics. If @bus is null, meaning there's no DT
3080 * data, then we only assume the IP block is accessible if the OMAP is
3081 * fused as a 'general-purpose' SoC. If however DT data is present,
3082 * test to see if the IP block is described in the DT data and set to
3083 * 'status = "okay"'. If so then we assume the ODM has configured the
3084 * OMAP firewalls to allow access to the IP block.
3085 *
3086 * Return: 0 if device named @dev_name is not likely to be accessible,
3087 * or 1 if it is likely to be accessible.
3088 */
Guenter Roeck10e57782017-03-04 07:02:10 -08003089static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
3090 const char *dev_name)
Pali Rohára55a7442015-02-26 14:49:52 +01003091{
Guenter Roeck10e57782017-03-04 07:02:10 -08003092 struct device_node *node;
3093 bool available;
3094
Pali Rohára55a7442015-02-26 14:49:52 +01003095 if (!bus)
Guenter Roeck10e57782017-03-04 07:02:10 -08003096 return omap_type() == OMAP2_DEVICE_TYPE_GP;
Pali Rohára55a7442015-02-26 14:49:52 +01003097
Guenter Roeck10e57782017-03-04 07:02:10 -08003098 node = of_get_child_by_name(bus, dev_name);
3099 available = of_device_is_available(node);
3100 of_node_put(node);
Pali Rohára55a7442015-02-26 14:49:52 +01003101
Guenter Roeck10e57782017-03-04 07:02:10 -08003102 return available;
Pali Rohára55a7442015-02-26 14:49:52 +01003103}
3104
Paul Walmsley73591542010-02-22 22:09:32 -07003105int __init omap3xxx_hwmod_init(void)
3106{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003107 int r;
Pali Rohára55a7442015-02-26 14:49:52 +01003108 struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL;
3109 struct omap_hwmod_ocp_if **h_aes = NULL;
Markus Elfringd9ecbef2017-10-20 16:37:07 +02003110 struct device_node *bus;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003111 unsigned int rev;
3112
Kevin Hilman9ebfd282012-06-18 12:12:23 -06003113 omap_hwmod_init();
3114
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003115 /* Register hwmod links common to all OMAP3 */
3116 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06003117 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003118 return r;
3119
3120 rev = omap_rev();
3121
3122 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003123 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003124 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
3125 * All possible revisions should be included in this conditional.
3126 */
3127 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3128 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
3129 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003130 h = omap34xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06003131 h_gp = omap34xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01003132 h_sham = omap34xx_sham_hwmod_ocp_ifs;
3133 h_aes = omap34xx_aes_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07003134 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003135 h = am35xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06003136 h_gp = am35xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01003137 h_sham = am35xx_sham_hwmod_ocp_ifs;
3138 h_aes = am35xx_aes_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003139 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
3140 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003141 h = omap36xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06003142 h_gp = omap36xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01003143 h_sham = omap36xx_sham_hwmod_ocp_ifs;
3144 h_aes = omap36xx_aes_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003145 } else {
3146 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
3147 return -EINVAL;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003148 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003149
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003150 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003151 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003152 return r;
3153
Mark A. Greer26f88e62013-03-18 10:06:32 -06003154 /* Register GP-only hwmod links. */
3155 if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
3156 r = omap_hwmod_register_links(h_gp);
3157 if (r < 0)
3158 return r;
3159 }
3160
Pali Rohára55a7442015-02-26 14:49:52 +01003161 /*
3162 * Register crypto hwmod links only if they are not disabled in DT.
3163 * If DT information is missing, enable them only for GP devices.
3164 */
3165
Tony Lindgren1aa8f0c2017-05-31 15:51:37 -07003166 bus = of_find_node_by_name(NULL, "ocp");
Pali Rohára55a7442015-02-26 14:49:52 +01003167
3168 if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
3169 r = omap_hwmod_register_links(h_sham);
Markus Elfringf33aadd2017-10-20 16:30:23 +02003170 if (r < 0)
3171 goto put_node;
Pali Rohára55a7442015-02-26 14:49:52 +01003172 }
3173
3174 if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
3175 r = omap_hwmod_register_links(h_aes);
Markus Elfringf33aadd2017-10-20 16:30:23 +02003176 if (r < 0)
3177 goto put_node;
Pali Rohára55a7442015-02-26 14:49:52 +01003178 }
Guenter Roeckb92675d2017-03-04 07:02:11 -08003179 of_node_put(bus);
Mark A. Greer26f88e62013-03-18 10:06:32 -06003180
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003181 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003182 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003183 * particular family of silicon (e.g., 34xx ES1.0)
3184 */
3185 h = NULL;
3186 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003187 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003188 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3189 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3190 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003191 h = omap3430es2plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003192 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003193
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003194 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003195 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003196 if (r < 0)
3197 return r;
3198 }
3199
3200 h = NULL;
3201 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3202 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003203 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003204 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3205 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003206 h = omap3430_es3plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003207 }
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003208
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003209 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003210 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003211 if (r < 0)
3212 return r;
3213
3214 /*
3215 * DSS code presumes that dss_core hwmod is handled first,
3216 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003217 * DSS hwmod links last to ensure that dss_core is already
3218 * registered. Otherwise some change things may happen, for
3219 * ex. if dispc is handled before dss_core and DSS is enabled
3220 * in bootloader DISPC will be reset with outputs enabled
3221 * which sometimes leads to unrecoverable L3 error. XXX The
3222 * long-term fix to this is to ensure hwmods are set up in
3223 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003224 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003225 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003226
3227 return r;
Markus Elfringf33aadd2017-10-20 16:30:23 +02003228
3229put_node:
3230 of_node_put(bus);
3231 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003232}